diff --git a/.c3i/authorized_users.yml b/.c3i/authorized_users.yml index 1d7876397356e..b3ffb224879e9 100644 --- a/.c3i/authorized_users.yml +++ b/.c3i/authorized_users.yml @@ -7,7 +7,6 @@ authorized_users: - Croydon - Johnnyxy - solvingj -- ericLemanissier - tru - sztomi - theodelrieu @@ -967,7 +966,7 @@ authorized_users: - kletoz - agilemapper - ZXfkSIE -- RubenRBS +- AbrilRBS - Alex-PLACET - antekone - ambroff @@ -1327,3 +1326,128 @@ authorized_users: - sivachandran - oteffahi - Ruwei +- TibiIius +- MattBelanger321 +- X1aomu +- datalogics-rgailiunas +- yhsng +- omdxp +- pierricgimmig +- laci-aura +- BenBudr +- PLeVasseur +- datalogics-staylor +- soroosh-sdi +- TheHugeManatee +- FannoFlow1 +- nayakche +- psi-func +- deniskovalchuk +- zarvox +- ErniGH +- culhatsker +- lubomirjurukov +- jmdaly +- inPhraZ +- nikolay-pv +- Julianiolo +- ErikHons +- enzo-pellegrini +- BLumia +- ydcpp +- tttapa +- zeeshancs07 +- jll63 +- Jie-Cheng +- jjardina +- soonick +- Mercotui +- sunbubble +- praetorian20 +- phbasler +- gsantner +- qihao727 +- qmfrederik +- NukeBird +- vijaiaeroastro +- xoorath +- mike919192 +- ScarletEmanu +- josephbirkner +- glywk +- aniederl +- SvenRoederer +- MridulS +- leemaguire +- RobinQu +- MatthewRasa +- jan-kelemen +- xiadnoring +- FeignClaims +- husitawi +- fpoirotte +- cuppajoeman +- vsbogd +- Nevermore1994 +- maciejjablonsky +- luc-c +- willprice +- pasbi +- liuzicheng1987 +- guyutongxue +- ciclark +- John-LittleBearLabs +- jasal82 +- philipp-m-w +- nine +- OMGtechy +- sabapathi20 +- seekstar +- dcoburnMEDITECH +- mattangus +- arnaudmathias +- hankhsu1996 +- stephematician +- awest03 +- sun-mir +- fhamonic +- simbahebinbo +- alessiosacco +- Blackflame576 +- Bakul-Gaur +- itsmejoeeey +- JustCallMeRay +- shun2wang +- czheng-bt +- jorgen +- simshi +- alatarum +- joda01 +- raplonu +- mattkretz +- DannyLihard +- stevenwdv +- smessmer +- fischjo3SICKAG +- jrosiek +- Thiesius +- xakod +- FWiesner +- aasmune +- sicheste +- Alan5142 +- mefff +- HazyMrf +- danniesim +- witcherofthorns +- amerry +- kulkarniamit +- hypengw +- Deishelon +- mosys +- asutic +- x93008 +- filipjaremczak +- braindigitalis +- vasama +- nonovv diff --git a/.c3i/conan_v2_ready_references.yml b/.c3i/conan_v2_ready_references.yml deleted file mode 100644 index 6994382f1a936..0000000000000 --- a/.c3i/conan_v2_ready_references.yml +++ /dev/null @@ -1,1571 +0,0 @@ -required_for_references: -- 7bitconf -- 7bitdi -- 7zip -- aaf -- aaplus -- abseil -- absent -- acado -- accellera-uvm-systemc -- access_private -- acl -- ada -- ade -- aeron -- aggeom-agg -- ags -- alac -- alembic -- alpaca -- amgcl -- amqp-cpp -- andreasbuhr-cppcoro -- android-ndk -- angelscript -- antlr4 -- antlr4-cppruntime -- any-lite -- anyrpc -- approvaltests.cpp -- apr -- apr-util -- apriltag -- aravis -- archicad-apidevkit -- arcus -- arduinojson -- arg_router -- argh -- argon2 -- argparse -- args-parser -- argtable2 -- argtable3 -- armadillo -- arrow -- arsenalgear -- artery-font-format -- asio -- asio-grpc -- asmjit -- asn1c -- assimp -- astc-codec -- astro-informatics-so3 -- async_simple -- asyncly -- asyncplusplus -- audiofile -- autoconf -- autoconf-archive -- automake -- avahi -- avir -- aws-c-auth -- aws-c-cal -- aws-c-common -- aws-c-compression -- aws-c-event-stream -- aws-c-http -- aws-c-io -- aws-c-mqtt -- aws-c-s3 -- aws-c-sdkutils -- aws-checksums -- aws-crt-cpp -- aws-kvs-pic -- aws-lambda-cpp -- aws-libfabric -- aws-sdk-cpp -- b2 -- b64 -- backport-cpp -- backward-cpp -- bacnet-stack -- baical-p7 -- bandit -- base64 -- bazel -- bdwgc -- bear -- beauty -- behaviortree.cpp -- benchmark -- bertrand -- bezier -- bgfx -- bigint -- bimg -- binutils -- bison -- bit-lite -- bitflags -- bitmagic -- bitserializer -- bitsery -- blaze -- blend2d -- bliss -- boolean-lite -- boolinq -- boost -- boost-ext-ut -- boost-leaf -- boostdep -- botan -- box2d -- breakpad -- brigand -- brotli -- brunsli -- brynet -- bshoshany-thread-pool -- btyacc -- bullet3 -- butteraugli -- bvdberg-ctest -- bx -- byte-lite -- bzip2 -- bzip3 -- c-ares -- c-blosc -- c-blosc2 -- c-client -- c-dbg-macro -- c4core -- caf -- cairomm -- cajun-jsonapi -- calceph -- canary -- canvas_ity -- capnproto -- capstone -- cargs -- cassandra-cpp-driver -- catch2 -- cc65 -- ccache -- cccl -- ccfits -- cctz -- cd3-boost-unit-definitions -- celero -- cereal -- ceres-solver -- certify -- cfgfile -- cfitsio -- cgal -- cgif -- cglm -- cgltf -- cgns -- chaiscript -- charls -- chef-fun -- chipmunk2d -- choc -- chunkio -- cimg -- circularbuffer -- cista -- cityhash -- civetweb -- cjson -- clara -- clhep -- cli -- cli11 -- clickhouse-cpp -- clipboard_lite -- clipp -- clipper -- clipper2 -- clove-unit -- cmake -- cminpack -- cmocka -- cmp -- cn-cbor -- cnats -- cnpy -- cocoyaxi -- coin-cgl -- coin-clp -- coin-lemon -- coin-osi -- coin-utils -- commata -- concurrencpp -- concurrentqueue -- console_bridge -- continuable -- coost -- copypp -- corrade -- cose-c -- cotila -- coz -- cpp-channel -- cpp-httplib -- cpp-ipc -- cpp-jwt -- cpp-lazy -- cpp-optparse -- cpp-peglib -- cpp-sort -- cpp-validator -- cpp_project_framework -- cppbenchmark -- cppcheck -- cppcmd -- cppcodec -- cppcommon -- cppdap -- cppfront -- cppitertools -- cppkafka -- cpprestsdk -- cpptoml -- cpptrace -- cppunit -- cpputest -- cppzmq -- cpr -- cprocessing -- cpu_features -- cpuinfo -- cpython -- cqrlib -- crc32c -- crc_cpp -- crcpp -- create-dmg -- croncpp -- crossguid -- crowcpp-crow -- crunch -- cryptopp -- cryptopp-pem -- cs_libguarded -- csm -- cspice -- csvmonkey -- ctml -- ctpg -- ctre -- cub -- cubicinterpolation -- cuda-api-wrappers -- cuda-kat -- cuda-samples -- cunit -- cute_headers -- cvplot -- cwalk -- cxxopts -- cyclonedds -- cyclonedds-cxx -- cyrus-sasl -- czmq -- dacap-clip -- darknet -- dataframe -- date -- dav1d -- daw_header_libraries -- daw_json_link -- daw_utf_range -- dbcppp -- dbg-macro -- dbus -- dcmtk -- debug_assert -- decimal_for_cpp -- deco -- dependencies -- depot_tools -- detools -- dfp -- di -- dice-template-library -- dime -- directshowbaseclasses -- directx-headers -- dirent -- discount -- djinni-generator -- djinni-support-lib -- dlib -- dlpack -- dnet -- docopt.cpp -- doctest -- double-conversion -- doxygen -- dr_libs -- draco -- dragonbox -- drflac -- drmp3 -- drogon -- drwav -- dsp-filters -- dtl -- duckdb -- duckx -- duktape -- dylib -- eabase -- earcut -- eastl -- easy_profiler -- easyexif -- easyhttpcpp -- easyloggingpp -- easylzma -- ecos -- editline -- edlib -- edyn -- effcee -- effolkronium-random -- egl -- egl-headers -- eigen -- elfio -- elfutils -- embag -- embedded_ringbuf_cpp -- embree3 -- emio -- emsdk -- enchant -- enet -- enhex-generic_serialization -- enhex-strong_type -- enjincppsdk -- enkits -- ensmallen -- entityx -- entt -- enum-flags -- erikzenker-hsm -- erkir -- etc2comp -- etcd-cpp-apiv3 -- eternal -- ethash -- etl -- eudev -- eventpp -- evmc -- exiv2 -- expat -- expected-lite -- exprtk -- extra-cmake-modules -- ezc3d -- faac -- fakeit -- farmhash -- fast-cdr -- fast-cpp-csv-parser -- fast-dds -- fast_double_parser -- fast_float -- fast_io -- fastgltf -- fastnoise2 -- fastpfor -- fastprng -- fernandovelcic-hexdump -- fff -- ffmpeg -- fft -- fftw -- fire-hpp -- fixed-containers -- flac -- flann -- flatbuffers -- flatbush -- flatcc -- flecs -- flex -- flint -- fltk -- flux -- fmi1 -- fmi2 -- fmi3 -- fmt -- fmtlog -- fontconfig -- foonathan-lexy -- foonathan-memory -- forestdb -- foxglove-schemas-protobuf -- foxglove-websocket -- foxi -- fp16 -- fpgen -- fpzip -- freealut -- freeglut -- freeimage -- freetype -- freexl -- fribidi -- frozen -- frugally-deep -- fruit -- ftjam -- ftxui -- function2 -- functionalplus -- functions-framework-cpp -- fusepp -- fxdiv -- g3log -- gainput -- gamenetworkingsockets -- gamma -- gcem -- gdal -- gdbm -- gdcm -- gdk-pixbuf -- gegles-spdlog_setup -- gemmlowp -- genie -- geographiclib -- geos -- geotrans -- getopt-for-visual-studio -- gettext -- gf-complete -- gflags -- gfortran -- ghc-filesystem -- giflib -- ginkgo -- gklib -- glad -- glaze -- glbinding -- glew -- glext -- glfw -- gli -- glib -- glibmm -- glm -- glog -- glpk -- glshaderpp -- glslang -- glu -- gm2calc -- gmp -- gnu-config -- gnulib -- gnutls -- godot-cpp -- godot_headers -- googleapis -- gperf -- gperftools -- graphene -- graphthewy -- greatest -- greg7mdp-gtl -- grpc -- grpc-proto -- gsl -- gsl-lite -- gsoap -- gstreamer -- gtest -- gtk -- gtk-doc-stub -- gtsam -- guetzli -- gumbo-parser -- gurkenlaeufer -- gzip-hpp -- h3 -- h5pp -- half -- happly -- harfbuzz -- hash-library -- hayai -- hazelcast-cpp-client -- hdf4 -- hdf5 -- hdrhistogram-c -- heatshrink -- hedley -- hexl -- hffix -- hictk -- hidapi -- highfive -- highs -- highway -- hipony-enumerate -- hippomocks -- hiredis -- hlslpp -- homog2d -- http_parser -- huffman -- hunspell -- hwdata -- hwloc -- hyperscan -- i2c-tools -- icecream-cpp -- iceoryx -- iconfontcppheaders -- icu -- id3v2lib -- idna -- ignition-cmake -- iguana -- iir1 -- im95able-rea -- imagl -- imake -- imath -- imgui -- imguizmo -- immer -- implot -- imutils-cpp -- incbin -- indicators -- indirect_value -- influxdb-cpp -- influxdb-cxx -- inih -- inja -- intel-ipsec-mb -- intel-neon2sse -- intx -- inversify-cpp -- iowow -- iqa -- irrxml -- isa-l -- isl -- iso8601lib -- itk -- itlib -- ittapi -- ixwebsocket -- jansson -- jasper -- jbig -- jeaiii-itoa -- jemalloc -- jerryscript -- jfalcou-eve -- jinja2cpp -- joltphysics -- jom -- jpcre2 -- jpeg-compressor -- jsbsim -- jsmn -- json-c -- json-schema-validator -- json_dto -- jsoncons -- jsoncpp -- jsonnet -- jthread-lite -- jungle -- jwasm -- jwt-cpp -- jxrlib -- kainjow-mustache -- kaitai_struct_cpp_stl_runtime -- kangaru -- kcp -- kdbindings -- keychain -- khrplatform -- kickcat -- kissfft -- kitten -- kmod -- ktx -- kuba-zip -- lager -- laslib -- laszip -- lazycsv -- lcms -- ldns -- lefticus-tools -- lely-core -- lemon -- leptonica -- lerc -- lest -- leveldb -- lexbor -- libaesgm -- libaio -- libalsa -- libaom-av1 -- libarchive -- libassert -- libatomic_ops -- libattr -- libavif -- libb2 -- libbacktrace -- libbasisu -- libbigwig -- libboxes -- libbpf -- libbsd -- libcap -- libcbor -- libccd -- libcds -- libcheck -- libcoap -- libconfig -- libconfuse -- libcoro -- libcorrect -- libcpuid -- libcuckoo -- libcurl -- libcvd -- libdaemon -- libdb -- libdc1394 -- libde265 -- libdeflate -- libdicom -- libdisasm -- libdisplay-info -- libdivide -- libdmtx -- libdrawille -- libdrm -- libdwarf -- libdxfrw -- libe57format -- libelf -- libelfin -- libenvpp -- libepoxy -- libest -- libev -- libevdev -- libevent -- libexif -- libfdk_aac -- libffi -- libfork -- libfreenect -- libfreenect2 -- libftdi -- libftp -- libfuse -- libgcrypt -- libgd -- libgeotiff -- libgettext -- libglvnd -- libgpg-error -- libgphoto2 -- libgpiod -- libgta -- libhal -- libharu -- libheif -- libhydrogen -- libiberty -- libiconv -- libid3tag -- libinput -- libinterpolate -- libipt -- libjpeg -- libjpeg-turbo -- libkml -- libliftoff -- liblsl -- libltc -- liblzf -- libmad -- libmagic -- libmaxminddb -- libmbus -- libmediainfo -- libmemcached -- libmetalink -- libmicrohttpd -- libmikmod -- libmnl -- libmodbus -- libmodplug -- libmorton -- libmount -- libmp3lame -- libmpdclient -- libmysqlclient -- libnabo -- libnet -- libnetfilter_conntrack -- libnetfilter_queue -- libnfnetlink -- libnfs -- libnghttp2 -- libnice -- libnl -- libnoise -- libnop -- libnova -- libnpy -- libnuma -- liboping -- libpcap -- libpciaccess -- libpfm4 -- libpng -- libpq -- libpqxx -- libproperties -- libpsl -- libqrencode -- librasterlite -- libraw -- librdkafka -- librealsense -- libressl -- librttopo -- libsafec -- libsamplerate -- libsass -- libschrift -- libseat -- libsecret -- libselinux -- libserial -- libsgp4 -- libsigcpp -- libsixel -- libslz -- libsmacker -- libsndfile -- libsodium -- libsolace -- libspatialindex -- libspatialite -- libspng -- libsquish -- libsrtp -- libssh -- libssh2 -- libsvm -- libsvtav1 -- libsystemd -- libtar -- libtasn1 -- libtiff -- libtins -- libtool -- libtorrent -- libucl -- libudev -- libunifex -- libunistring -- libunwind -- liburing -- libusb -- libusb-compat -- libuuid -- libuv -- libuvc -- libva -- libvault -- libvdpau -- libversion -- libverto -- libvips -- libvpx -- libwebm -- libwebp -- libwebsockets -- libx264 -- libx265 -- libxcrypt -- libxft -- libxls -- libxlsxwriter -- libxml2 -- libxmlpp -- libxpm -- libxshmfence -- libxslt -- libyaml -- libyuv -- libzen -- libzip -- libzippp -- lief -- lightgbm -- lightpcapng -- linmath.h -- linux-headers-generic -- linux-syscall-support -- litehtml -- lksctp-tools -- llama-cpp -- llhttp -- llvm-openmp -- lmdb -- lodepng -- log.c -- log4cplus -- log4cxx -- logr -- loguru -- ls-qpack -- lua -- luajit -- luau -- lunasvg -- luple -- lurlparser -- lyra -- lz4 -- lzfse -- lzham -- lzip -- lzma_sdk -- lzo -- m4 -- macdylibbundler -- maddy -- magic_enum -- mailio -- make -- mapbox-geometry -- mapbox-variant -- mapbox-wagyu -- mariadb-connector-c -- marisa -- matchit -- mathfu -- mathter -- matio -- mattiasgustavsson-libs -- maven -- mawk -- mbedtls -- mbits-args -- mbits-diags -- mbits-lngs -- mbits-mstch -- mbits-semver -- mbits-utfconv -- mcap -- md4c -- md4qt -- mdns -- mdnsresponder -- mdspan -- mesa-glu -- meshoptimizer -- meson -- metall -- metis -- mfast -- mgclient -- mgs -- microprofile -- microservice-essentials -- microtar -- mikelankamp-fpm -- mikktspace -- mimalloc -- mingw-builds -- mingw-w64 -- miniaudio -- minicoro -- minimp3 -- minisat -- miniscript -- minitrace -- miniupnpc -- miniz -- minizip -- minizip-ng -- mio -- mm_file -- mocknetworkaccessmanager -- modern-cpp-kafka -- mold -- moltenvk -- mongo-c-driver -- mongo-cxx-driver -- morton-nd -- mosquitto -- mozilla-build -- mozjpeg -- mp-units -- mpark-variant -- mpc -- mpdecimal -- mpfr -- mpg123 -- mpmcqueue -- mppp -- ms-gsl -- msdf-atlas-gen -- msdfgen -- msgpack-c -- msgpack-cxx -- msys2 -- mtdev -- mujs -- muparser -- muparserx -- naive-tsearch -- namedtype -- nameof -- nanobench -- nanodbc -- nanoflann -- nanomsg -- nanorange -- nanort -- nanosvg -- nas -- nasm -- ncurses -- neargye-semver -- netcdf -- nettle -- newmat -- nextsilicon-cpp-subprocess -- nfrechette-acl -- nghttp3 -- ninja -- nlohmann_json -- nlopt -- nmea -- nmos-cpp -- nmslib -- nng -- nodejs -- nodesoup -- norm -- npcap -- nsimd -- nspr -- nsync -- ntv2 -- nudb -- nuklear -- numcpp -- nuraft -- nv-codec-headers -- nvcloth -- nvtx -- oatpp -- oatpp-libressl -- oatpp-postgresql -- oatpp-sqlite -- objectbox -- objectbox-generator -- observer-ptr-lite -- octo-encryption-cpp -- octo-keygen-cpp -- octo-logger-cpp -- octo-wildcardmatching-cpp -- octomap -- odbc -- ode -- ofeli -- ogdf -- ogg -- ohnet -- ois -- onedpl -- onetbb -- oniguruma -- onnx -- onnxruntime -- open-dis-cpp -- open-simulation-interface -- open62541 -- openal -- openal-soft -- openapi-generator -- openblas -- opencascade -- opencl-clhpp-headers -- opencl-headers -- opencl-icd-loader -- opencolorio -- opencore-amr -- opencv -- openddl-parser -- opendis6 -- opene57 -- openexr -- openfbx -- openfst -- openfx -- opengl -- opengl-registry -- opengv -- openh264 -- openimageio -- openjdk -- openjpeg -- openmesh -- openmvg -- openpam -- openssh -- openssl -- opensubdiv -- opentdf-client -- opentelemetry-cpp -- opentelemetry-proto -- opentracing-cpp -- openvdb -- openvino -- openvr -- openxlsx -- optional-lite -- opus -- opusfile -- orc -- orcania -- osmanip -- osqp -- ouster_sdk -- out_ptr -- outcome -- ozz-animation -- p-ranav-glob -- p7zip -- paho-mqtt-c -- paho-mqtt-cpp -- pango -- panzi-portable-endian -- parallel-hashmap -- parg -- parson -- patchelf -- pathie-cpp -- pbtools -- pcapplusplus -- pcg-cpp -- pciutils -- pcl -- pcre -- pcre2 -- pdcurses -- pdf-writer -- pdfgen -- pdfium -- pdqsort -- perf -- perfetto -- perlinnoise -- pexports -- pffft -- pfr -- pgm-index -- physfs -- physx -- picobench -- picojson -- picosha2 -- pipes -- pistache -- pixman -- pkgconf -- platform.converters -- platform.delegates -- platform.equality -- platform.exceptions -- platform.hashing -- platform.interfaces -- playrho -- plf_colony -- plf_indiesort -- plf_list -- plf_nanotimer -- plf_queue -- plf_stack -- plog -- plusaes -- plutovg -- pngpp -- poco -- poly2tri -- polylabel -- polylineencoder -- polymorphic_value -- poppler-data -- popt -- portable-file-dialogs -- poshlib -- pprint -- pranav-csv2 -- premake -- pretty-name -- primesieve -- procxx-boost-ext-simd -- proj -- prometheus-cpp -- proposal -- protobuf -- protobuf-c -- protopuf -- protozero -- proxy -- psimd -- psyinf-gmtl -- ptex -- pthreadpool -- pthreads4w -- pugixml -- pulseaudio -- pupnp -- pybind11 -- pybind11_json -- pystring -- qarchive -- qcbor -- qdbm -- qhull -- qpdf -- qpoases -- qr-code-generator -- qt -- qtawesome -- quantlib -- quaternions -- quazip -- quickcpplib -- quickfix -- quickjs -- quill -- quirc -- qwt -- r8brain-free-src -- rabbitmq-c -- ragel -- rang -- range-v3 -- rangeless -- rangesnext -- rapidcheck -- rapidcsv -- rapidfuzz -- rapidjson -- rapidxml -- rapidyaml -- raylib -- rdma-core -- re2 -- re2c -- reactiveplusplus -- read-excel -- readerwriterqueue -- readline -- readosm -- recastnavigation -- reckless -- rectanglebinpack -- rectpack2d -- redboltz-mqtt_cpp -- redis-plus-plus -- redradist-icc -- refl-cpp -- reflect-cpp -- replxx -- resource_pool -- restbed -- restinio -- rg-etc1 -- rgbcx -- ring-span-lite -- rmm -- roaring -- robin-hood-hashing -- rocksdb -- rotor -- rpclib -- rply -- rsync -- rtklib -- rtm -- rtmidi -- rttr -- ruy -- rvo2 -- rxcpp -- s2geometry -- s2n -- safe -- safeint -- sail -- samurai -- sassc -- sbepp -- sbp -- scdoc -- scip -- scippp -- scnlib -- scons -- scope-lite -- screen_capture_lite -- sdbus-cpp -- sdf -- sdl -- sdl_image -- sdl_net -- sdl_ttf -- seadex-essentials -- seasocks -- semimap -- semver.c -- sentry-breakpad -- sentry-crashpad -- sentry-native -- seqan -- seqan3 -- serd -- serdepp -- serf -- serial -- sfl -- sfml -- shapelib -- shield -- si -- signals-light -- sigslot -- simde -- simdjson -- simdutf -- simfil -- simple-websocket-server -- simple-yaml -- sjson-cpp -- skyr-url -- sleef -- sml -- snappy -- snitch -- snowhouse -- so5extra -- sobjectizer -- soci -- sofa -- sokol -- sol2 -- sonic-cpp -- sophus -- soplex -- soundtouch -- source_location -- soxr -- span-lite -- spdlog -- spectra -- speedb -- spirv-cross -- spirv-headers -- spirv-tools -- spscqueue -- spy -- sqlcipher -- sqlite3 -- sqlite3mc -- sqlite_orm -- sqlitecpp -- sqlpp11 -- sqlpp11-connector-sqlite3 -- squirrel -- srt -- ssht -- ssp -- st_tree -- statslib -- status-code -- status-value-lite -- stb -- stc -- stdgpu -- stduuid -- stlab -- strawberryperl -- streamvbyte -- string-view-lite -- stringtoolbox -- stringzilla -- strong_type -- structopt -- stx -- subunit -- sundials -- suyash-ulid -- svector -- svgpp -- svgwrite -- symengine -- systemc -- systemc-cci -- szip -- tabulate -- taglib -- taocpp-json -- taocpp-operators -- taocpp-pegtl -- taocpp-sequences -- taocpp-taopq -- taocpp-tuple -- tar -- taskflow -- taywee-args -- tcb-span -- tcl -- tclap -- tcp-wrappers -- tcsbank-uconfig -- tcsbank-uri-template -- teemo -- tensorflow-lite -- tensorpipe -- termcap -- termcolor -- tesseract -- tgbot -- tgc -- thelink2012-any -- threadpool -- thrift -- thrust -- tidy-html5 -- timsort -- tinkerforge-bindings -- tiny-aes-c -- tiny-bignum-c -- tiny-dnn -- tiny-regex-c -- tiny-utf8 -- tinyalsa -- tinycbor -- tinycthread -- tinycthreadpool -- tinydir -- tinyexif -- tinyexr -- tinygltf -- tinymidi -- tinyobjloader -- tinyply -- tinyspline -- tinyxml -- tinyxml2 -- tixi3 -- tk -- tl -- tl-expected -- tl-function-ref -- tl-optional -- tllist -- tlx -- tmx -- tmxlite -- tng -- toml11 -- tomlplusplus -- toon -- tqdm-cpp -- tracy -- transwarp -- trantor -- tre -- tree-gen -- tree-sitter -- tree-sitter-c -- troldal-zippy -- trompeloeil -- tscns -- tsil -- tsl-array-hash -- tsl-hat-trie -- tsl-hopscotch-map -- tsl-ordered-map -- tsl-robin-map -- tsl-sparse-map -- tuplet -- turtle -- tweenerspp -- tweetnacl -- twitch-native-ipc -- twitchtv-libsoundtrackutil -- type_safe -- tz -- ua-nodeset -- uchardet -- ulfius -- uncrustify -- uni-algo -- unicorn -- units -- unity -- univalue -- unordered_dense -- unqlite -- upx -- urdfdom -- urdfdom_headers -- uriparser -- usockets -- usrsctp -- utf8.h -- utf8proc -- utfcpp -- uthash -- util-linux-libuuid -- uvw -- uwebsockets -- v-hacd -- vaapi -- valijson -- variant-lite -- vc -- vcglib -- vdpau -- vectorclass -- vectorial -- velodyne_decoder -- veque -- very-simple-smtps -- vincentlaucsb-csv-parser -- vir-simd -- visit_struct -- vk-bootstrap -- vo-amrwbenc -- volk -- vorbis -- voropp -- vsg -- vtu11 -- vulkan-headers -- vulkan-loader -- vulkan-memory-allocator -- vulkan-validationlayers -- vvenc -- waf -- wasm-micro-runtime -- wasmedge -- wasmer -- wasmtime -- wasmtime-cpp -- watcher -- wavelet_buffer -- wayland -- wayland-protocols -- websocketpp -- wg21-linear_algebra -- wglext -- whereami -- whisper-cpp -- wide-integer -- wil -- wildcards -- wildmidi -- winflexbison -- winmd -- winreg -- wiringpi -- wise_enum -- wolfssl -- wslay -- wt -- wtl -- wyhash -- xapian-core -- xbyak -- xege -- xerces-c -- xkbcommon -- xkeyboard-config -- xlnt -- xlsxio -- xmlsec -- xnnpack -- xorg -- xorg-cf-files -- xorg-gccmakedep -- xorg-macros -- xorg-makedepend -- xorg-proto -- xorstr -- xoshiro-cpp -- xpack -- xproperty -- xsd -- xsimd -- xtensor -- xtl -- xtr -- xtrans -- xxhash -- xxsds-sdsl-lite -- xz_utils -- yaclib -- yajl -- yaml-cpp -- yandex-ozo -- yas -- yasm -- yder -- yoga -- yyjson -- z3 -- zbar -- zeromq -- zfp -- zimg -- zint -- zlib -- zlib-ng -- zmarok-semver -- zmqpp -- zoe -- zookeeper-client-c -- zopfli -- zpp_bits -- zpp_throwing -- zserio -- zstd -- zstr -- zug -- zulu-openjdk -- zxing-cpp -- zyre -- zziplib diff --git a/.c3i/config_v1.yml b/.c3i/config_v1.yml deleted file mode 100644 index 68c6f4fbb39ea..0000000000000 --- a/.c3i/config_v1.yml +++ /dev/null @@ -1,169 +0,0 @@ ---- -# Configuration for `https://github.com/conan-io/conan-center-index` repository -id: 'conan-io/conan-center-index' - -conan: - version: 1.64.0 - -artifactory: - url: "https://c3i.jfrog.io/c3i" - main_repo: "conan-center" - pull-request_repo_prefix: "c3i_PR" - pull-request_permission: "c3i-pr" - logs_repo: "misc" - cache_repo: "cache" - -github: - reviewers: "reviewers.yml" - authorized_users: "authorized_users.yml" - waitlist_users: "waitlist_users.yml" - -slack: - credential_success_url: SLACK_SUCCESS_WEBHOOK_URL - ceredential_errors_url: SLACK_FAILURE_WEBHOOK_URL - -# Things related to Jenkins jobs -tasks: - access_request: - request_issue_url: https://github.com/conan-io/conan-center-index/issues/4 - max_inactivity_days: 0 - automatic_merge: - reviews_required_total: 2 # Reviews that a PR needs so it can be merged - reviews_required_team: 1 # Reviews from the Conan team that a PR needs so it can be merged - reviews_required_bump: 1 # Total reviews required for a bump PR to be merged - branches: # PRs from automations that have these as base-branches will be merged automatically - - "conan-io:action-doc-toc" - # Requirements to merge a given pull-request: - # * check_runs refers to notifications from GH actions - # * status_checks refers to notifications coming from external tools (Jenkins, CLA,...) - check_runs: - - name: "Lint changed files (YAML files)" - status_checks: - - name: "license/cla" - - name: "continuous-integration/jenkins/pr-merge" - - name: "c3i/conan-v2/pr-merge" - build_single_reference: - package_id_cache_type: "none" - timeout_minutes: 600 - large_timeout_minutes: 900 - large_timeout_references: - - boost - - qt - - llvm - parallel_strategy: unlimited - cci: - conan_v2_run_export: false - write_comments: true - detailed_status_checks: true - update_labels: true - build_bump_deps_pr: false - description_bump_deps_pr: ":vertical_traffic_light: Thank for your Bump dependencies PR. The build service will be triggered soon by a Conan team member." - wait_for_multibranch: # CCI jobs should wait for other multibranch job for that same PR - job_name: "prod-v2/cci" # e.g. "cci-v2/cci" -> this means waiting for cci-v2/cci/PR- - timeout_seconds: 600 # Maximum time to wait for the multibranch job - merge_messages: true # Merge messages from the multibranch job waited for - merge_labels: true # Merge labels from the multibranch job waited for - job_relauncher: - job_names: - - prod-v1/cci - - prod-v2/cci - scheduled_export_check: - report_issue_url: https://github.com/conan-io/conan-center-index/issues/20516 - report_issue_append: false - validate_infrastructure: - macos_executors: 2 - windows_executors: 4 - create_docs_pull-request: true - -# Profile configurations to build packages -configurations: - - id: linux-gcc-legacy - hrname: "Linux, GCC-legacy" - content: - - os: ["Linux"] - arch: ["x86_64"] - compiler: - - "gcc": - compiler.libcxx: [ "libstdc++11" ] - compiler.version: ["5", "7", "9"] - build_type: ["Release"] - - id: linux-gcc11 - hrname: "Linux, GCC11" - content: - - os: ["Linux"] - arch: ["x86_64"] - compiler: - - "gcc": - compiler.libcxx: [ "libstdc++11" ] - compiler.version: ["11"] - build_type: ["Release", "Debug"] - - id: linux-clang - hrname: "Linux, Clang" - content: - - os: ["Linux"] - arch: ["x86_64"] - compiler: - - "clang": - compiler.libcxx: ["libstdc++", "libc++"] - compiler.version: ["13"] - build_type: ["Release"] - - id: macos-m1-clang - hrname: "macOS, Clang (M1/arm64)" - content: - - os: [ "Macos" ] - arch: [ "armv8" ] - compiler: - - "apple-clang": - compiler.version: [ "13.0" ] - compiler.libcxx: [ "libc++" ] - build_type: [ "Release", "Debug" ] - - id: windows-visual_studio - hrname: "Windows, Visual Studio" - content: - - os: [ "Windows" ] - arch: [ "x86_64" ] - compiler: - - "Visual Studio": - compiler.version: [ "16" ] - build_type: - - "Release": - compiler.runtime: [ "MD" ] - - "Debug": - compiler.runtime: [ "MDd" ] - -jenkins: - url: "http://mb-jenkins-my-bloody-jenkins:8080" - -node_labels: - Windows: - x86_64: - "Visual Studio": - default: "windows20230531" - Macos: - x86_64: - "apple-clang": - default: "mac_apple_clang_${compiler.version}" - armv8: - "apple-clang": - default: "mac_apple_clang_${compiler.version}" - Linux: - x86_64: - "gcc": - default: "linux_gcc_${compiler.version}" - "11": "linux_gcc_${compiler.version}_ubuntu16.04" - "clang": - default: "linux_clang_${compiler.version}_ubuntu16.04" - "11": "linux_clang_${compiler.version}" - -pod_size: - # Map with references that need special memory resources to compile. - # - Can be only by name or by name/version. - # - name/version notation takes preference over the name only one - # - Both notations can be combined for the same reference name - large: - - "duckdb" - - "ceres-solver" - xlarge: - - "llvm" - - "opengv" - - "pcl" diff --git a/.c3i/config_v2.yml b/.c3i/config_v2.yml deleted file mode 100644 index c4ac212386ed7..0000000000000 --- a/.c3i/config_v2.yml +++ /dev/null @@ -1,163 +0,0 @@ ---- -# Configuration for `https://github.com/conan-io/conan-center-index` repository (using Conan v2) -id: 'conan-io/conan-center-index' - -conan: - version: 2.2.2 - backup_sources: - upload_url: "https://c3i.jfrog.io/artifactory/conan-center-backup-sources/" - download_url: "https://c3i.jfrog.io/artifactory/conan-center-backup-sources/" - - globalconf: - - 'core.sources:download_cache={{ CONFIG_HOME }}/backup_sources_cache' - - 'core.sources:download_urls=["{{ ARTI_DOWNLOAD_URL }}", "origin"]' - - 'core.sources:upload_url={{ ARTI_UPLOAD_URL }}' - -artifactory: - url: "https://c3i.jfrog.io/c3i" - main_repo: "conan-center" - pull-request_repo_prefix: "c3i_PR-v2" - pull-request_permission: "c3i-pr" - logs_repo: "misc-v2" - -github: - reviewers: "reviewers.yml" - authorized_users: "authorized_users.yml" - waitlist_users: "waitlist_users.yml" - -# Things related to Jenkins jobs: -tasks: - automatic_merge: - reviews_required_total: 1000 # AutomaticMerge shouldn't run with this file, but just in case - reviews_required_team: 1000 # AutomaticMerge shouldn't run with this file, but just in case - reviews_required_bump: 1000 # AutomaticMerge shouldn't run with this file, but just in case - access_request: - request_issue_url: https://github.com/conan-io/conan-center-index/issues/4 - max_inactivity_days: 0 - build_single_reference: - package_id_cache_type: "none" - timeout_minutes: 600 - large_timeout_minutes: 900 - large_timeout_references: - - boost - - qt - - llvm - - gstreamer - parallel_strategy: unlimited - cci: - conan_v2_run_export: false - detailed_status_checks: false - write_comments: false - update_labels: false - build_bump_deps_pr: false - user_feedback: - title: "Conan v2 pipeline" - description: "> **Note**: Conan v2 builds are now mandatory. Please read our [discussion](https://github.com/conan-io/conan-center-index/discussions/19104) about it." - regression: "> **Regression**: Conan v2 builds are mandatory and they are required for the PR to be merged, because this recipe worked with Conan v2 previously." - text_on_failure: "The v2 pipeline failed. Please, review the errors and note this is required for pull requests to be merged. In case this recipe is still not ported to Conan 2.x, please, ping `@conan-io/barbarians` on the PR and we will help you." - collapse_on_success: false - collapse_on_failure: true - list_packages: - update_yaml_list_path: ".c3i/conan_v2_ready_references" - update_yaml_list_key: "required_for_references" - scheduled_export_check: - report_issue_url: https://github.com/conan-io/conan-center-index/issues/15557 - report_issue_append: false - validate_infrastructure: - macos_executors: 2 - windows_executors: 4 - create_docs_pull-request: false - -configurations: - - id: linux-gcc - hrname: "Linux, GCC" - build_profile: - os: "Linux" - content: - - os: ["Linux"] - arch: ["x86_64"] - compiler: - - "gcc": - compiler.libcxx: ["libstdc++11"] - compiler.version: ["11"] - build_type: ["Release"] - - id: macos-clang - hrname: "macOS, Clang" - build_profile: - os: "Macos" - arch: "armv8" - content: - - os: [ "Macos" ] - arch: [ "x86_64" ] - compiler: - - "apple-clang": - compiler.version: [ "13" ] - compiler.libcxx: [ "libc++" ] - build_type: [ "Release"] - - id: macos-m1-clang - hrname: "macOS M1, Clang" - build_profile: - os: "Macos" - arch: "armv8" - content: - - os: [ "Macos" ] - arch: [ "armv8" ] - compiler: - - "apple-clang": - compiler.version: ["13" ] - compiler.libcxx: [ "libc++" ] - build_type: [ "Release"] - - id: windows-msvc - hrname: "Windows, MSVC" - build_profile: - os: "Windows" - content: - - os: [ "Windows" ] - arch: [ "x86_64" ] - compiler: - - "msvc": - compiler.version: [ "192", "193" ] - build_type: - - "Release": - compiler.runtime: ["dynamic"] - compiler.runtime_type: [ "Release" ] - -cppstd: - apple-clang: - "13": ["17", "gnu17", "20", "gnu20"] - gcc: - "11": ["17", "gnu17", "20", "gnu20", "23", "gnu23"] - msvc: - "192": ["14", "17", "20"] - "193": ["14", "17", "20"] - -jenkins: - url: "http://mb-jenkins-my-bloody-jenkins:8080" - -node_labels: - Windows: - x86_64: - "msvc": - default: "windows20230531" - Macos: - x86_64: - "apple-clang": - default: "mac_apple_clang_${compiler.version}" - armv8: - "apple-clang": - default: "mac_apple_clang_${compiler.version}" - Linux: - x86_64: - "gcc": - default: "linux_gcc_${compiler.version}_ubuntu16.04" - "clang": - default: "linux_clang_${compiler.version}_ubuntu16.04" - - -pod_size: - # Map with references that need special memory resources to compile. - # - Can be only by name or by name/version. - # - name/version notation takes preference over the name only one - # - Both notations can be combined for the same reference name - xlarge: - - "pcl" diff --git a/.c3i/reviewers.yml b/.c3i/reviewers.yml index a5e7a155eee13..e877828a1a9a3 100644 --- a/.c3i/reviewers.yml +++ b/.c3i/reviewers.yml @@ -9,21 +9,45 @@ reviewers: - user: "lasote" type: "team" request_reviews: false - - user: "jgsogo" - type: "community" - request_reviews: false - user: "czoido" type: "team" request_reviews: false - user: "memsharded" type: "team" request_reviews: false - - user: "SSE4" - type: "community" - request_reviews: false - user: "uilianries" type: "team" request_reviews: true + - user: "jcar87" + type: "team" + request_reviews: true + - user: "franramirez688" + type: "team" + request_reviews: true + - user: "AbrilRBS" + type: "team" + request_reviews: true + - user: "davidsanfal" + type: "team" + request_reviews: false + - user: "juansblanco" + type: "team" + request_reviews: false + - user: "perseoGI" + type: "team" + request_reviews: false + - user: "ErniGH" + type: "team" + request_reviews: false + ######## + ### Begin community reviewers + ######## + - user: "jgsogo" + type: "community" + request_reviews: false + - user: "SSE4" + type: "community" + request_reviews: false - user: "madebr" type: "community" request_reviews: false @@ -33,9 +57,6 @@ reviewers: - user: "theirix" type: "community" request_reviews: false - - user: "ericLemanissier" - type: "community" - request_reviews: false - user: "prince-chrismc" type: "community" request_reviews: false @@ -57,21 +78,12 @@ reviewers: - user: "MartinDelille" type: "community" request_reviews: false - - user: "jcar87" - type: "team" - request_reviews: true - - user: "franramirez688" - type: "team" - request_reviews: true - user: "paulocoutinhox" type: "community" request_reviews: false - user: "jwillikers" type: "community" request_reviews: false - - user: "RubenRBS" - type: "team" - request_reviews: true - user: "System-Arch" type: "community" request_reviews: false @@ -81,12 +93,6 @@ reviewers: - user: "StellaSmith" type: "community" request_reviews: false - - user: "davidsanfal" - type: "team" - request_reviews: false - - user: "juansblanco" - type: "team" - request_reviews: false - user: "valgur" type: "community" request_reviews: false diff --git a/.c3i/v1.jenkins b/.c3i/v1.jenkins deleted file mode 100644 index 68f3504079ef2..0000000000000 --- a/.c3i/v1.jenkins +++ /dev/null @@ -1,6 +0,0 @@ -#!groovy - -@Library('c3i') _ - -String configurationFile = '.c3i/config_v1.yml' -cci.runBuild(this, configurationFile) diff --git a/.c3i/v2.jenkins b/.c3i/v2.jenkins deleted file mode 100644 index 865f167f1dcf0..0000000000000 --- a/.c3i/v2.jenkins +++ /dev/null @@ -1,6 +0,0 @@ -#!groovy - -@Library('c3i') _ - -String configurationFile = '.c3i/config_v2.yml' -cci.runBuild(this, configurationFile) diff --git a/.c3i/waitlist_users.yml b/.c3i/waitlist_users.yml deleted file mode 100644 index ead4b94c37882..0000000000000 --- a/.c3i/waitlist_users.yml +++ /dev/null @@ -1,4 +0,0 @@ -waitlist_users: -- Mike-Solar -- retroandchill -- refactorTractor diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 3f6e08d2479e9..80d0ac7cd4153 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,10 +1,15 @@ -Specify library name and version: **lib/1.0** - +### Summary +Changes to recipe: **lib/[version]** +#### Motivation + + +#### Details + ---- -- [ ] I've read the [contributing guidelines](https://github.com/conan-io/conan-center-index/blob/master/CONTRIBUTING.md). -- [ ] I've used a [recent](https://github.com/conan-io/conan/releases/latest) Conan client version close to the [currently deployed](https://github.com/conan-io/conan-center-index/blob/master/.c3i/config_v1.yml#L6). -- [ ] I've tried at least one configuration locally with the [conan-center hook](https://github.com/conan-io/hooks.git) activated. +--- +- [ ] Read the [contributing guidelines](https://github.com/conan-io/conan-center-index/blob/master/CONTRIBUTING.md) +- [ ] Checked that this PR is not a duplicate: [list of PRs by recipe](https://github.com/conan-io/conan-center-index/discussions/24240) +- [ ] Tested locally with at least one configuration using a recent version of Conan diff --git a/.github/actions/alert-community/action.yml b/.github/actions/alert-community/action.yml deleted file mode 100644 index ca390cd38b4e7..0000000000000 --- a/.github/actions/alert-community/action.yml +++ /dev/null @@ -1,31 +0,0 @@ -name: "Alert Community" -description: "Comment on pull request if certain files changes" -author: "prince-chrismc" -inputs: - files: - description: "Check for changes using only this list of files (Defaults to the entire repo)" - required: true - default: "" - reviewers: - description: "List of users to mention (make sure to include the @)" - required: true - default: "" - -runs: - using: "composite" - steps: - # Assume the repo checked out the code since this is running - - uses: ./.github/actions/pr_changed_files - id: changed_files - with: - files: ${{ inputs.files }} - - if: always() && steps.changed_files.outputs.any_changed == 'true' - uses: actions/github-script@v6 - with: - script: | - github.rest.issues.createComment({ - issue_number: context.issue.number, - owner: context.repo.owner, - repo: context.repo.repo, - body: `:robot: **Beep Boop**! This pull request is making changes to '${{ inputs.files }}'.\n\n:wave: ${{ inputs.reviewers }} you might be interested. :wink:` - }) diff --git a/.github/actions/pr_changed_files/action.yml b/.github/actions/pr_changed_files/action.yml deleted file mode 100644 index 70f97c9499430..0000000000000 --- a/.github/actions/pr_changed_files/action.yml +++ /dev/null @@ -1,51 +0,0 @@ -name: 'Changed files in PR' -description: 'Get all changed files in a Pull Request' -author: 'ericLemanissier' -inputs: - files: - description: "Check for changes using only this list of files (Defaults to the entire repo)" - required: false - default: "" - -outputs: - all_changed_files: - description: List of all copied, modified, and added files. - value: ${{ steps.changed-files.outputs.all_changed_files }} - any_changed: - description: Return true only when any files provided using the files input have changed. - value: ${{ steps.changed-files.outputs.any_changed }} -runs: - using: "composite" - steps: - - uses: actions/setup-python@v4 - with: - python-version: ${{ env.PYVER }} - - name: Get changed files - id: changed-files - shell: python - env: - GITHUB_TOKEN: ${{ github.token }} - run: | - import json - import subprocess - import fnmatch - import os - from pathlib import Path - - patterns = [Path(p).parts for p in '''${{ inputs.files }}'''.splitlines()] - - res = subprocess.run(["gh", "api", "/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/files", "--paginate"], capture_output=True, check=True) - files = [] - for f in json.loads(res.stdout): - if f["status"] == "removed": - continue - filename = Path(f["filename"]).parts - for pattern in patterns: - if len(pattern) != len(filename): - continue - if all(fnmatch.fnmatch(filename[i], pattern[i]) for i in range(len(pattern))): - files.append(f["filename"]) - break - with open(os.getenv("GITHUB_OUTPUT"), "a") as output_file: - output_file.write(f"any_changed={'true' if files else 'false'}\n") - output_file.write(f"all_changed_files={' '.join(files)}\n") diff --git a/.github/workflows/alert-community.yml b/.github/workflows/alert-community.yml deleted file mode 100644 index 76a1a4165dd49..0000000000000 --- a/.github/workflows/alert-community.yml +++ /dev/null @@ -1,472 +0,0 @@ -name: "[service] Alert Community" - -on: - pull_request_target: - types: [opened] - -env: - PYVER: "3.10" - -jobs: - comment: - if: github.repository == 'conan-io/conan-center-index' - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - with: - ref: master - - - uses: ./.github/actions/alert-community - with: - files: "docs/*/*" - reviewers: "@prince-chrismc @MartinDelille @Croydon" - - - uses: ./.github/actions/alert-community - with: - files: ".github/*/*" - reviewers: "@ericLemanissier @Croydon" - - - uses: ./.github/actions/alert-community - with: - files: "linter/*/*" - reviewers: "@ericLemanissier @Croydon" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/aaf/*/*" - reviewers: "@MartinDelille" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/abseil/*/*" - reviewers: "@Hopobcn" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/armadillo/*/*" - reviewers: "@samuel-emrys" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/avahi/*/*" - reviewers: "@jwillikers" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/b2/*/*" - reviewers: "@grafikrobot" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/bandit/*/*" - reviewers: "@MartinDelille" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/benchmark/*/*" - reviewers: "@Hopobcn" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/boost/*/*" - reviewers: "@grafikrobot @Hopobcn @jwillikers @paulharris" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/boost-ext-ut/*/*" - reviewers: "@jwillikers" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/bzip2/*/*" - reviewers: "@Hopobcn" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/cereal/*/*" - reviewers: "@Hopobcn" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/cmake/*/*" - reviewers: "@Croydon" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/cppcheck/*/*" - reviewers: "@MartinDelille" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/create-dmg/*/*" - reviewers: "@MartinDelille" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/dbus/*/*" - reviewers: "@jwillikers" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/double-conversion/*/*" - reviewers: "@Hopobcn" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/eigen/*/*" - reviewers: "@jwillikers" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/elfio/*/*" - reviewers: "@Hopobcn" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/ffmpeg/*/*" - reviewers: "@MartinDelille" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/fmt/*/*" - reviewers: "@Hopobcn @jwillikers" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/folly/*/*" - reviewers: "@Hopobcn" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/foxi/*/*" - reviewers: "@Hopobcn" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/fp16/*/*" - reviewers: "@Hopobcn" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/g3log/*/*" - reviewers: "@Hopobcn" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/gcc/*/*" - reviewers: "@samuel-emrys" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/geotrans/*/*" - reviewers: "@samuel-emrys" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/gflags/*/*" - reviewers: "@Hopobcn" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/glew/*/*" - reviewers: "@Hopobcn" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/glfw/*/*" - reviewers: "@Hopobcn" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/glog/*/*" - reviewers: "@Hopobcn" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/gtest/*/*" - reviewers: "@Hopobcn @jwillikers" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/imath/*/*" - reviewers: "@irieger" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/imgui/*/*" - reviewers: "@Hopobcn" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/implot/*/*" - reviewers: "@Hopobcn" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/jemalloc/*/*" - reviewers: "@Hopobcn" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/libalsa/*/*" - reviewers: "@jwillikers" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/libarchive/*/*" - reviewers: "@jwillikers" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/libbacktrace/*/*" - reviewers: "@Hopobcn" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/libcap/*/*" - reviewers: "@Hopobcn" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/libcurl/*/*" - reviewers: "@Hopobcn" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/libdwarf/*/*" - reviewers: "@Hopobcn" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/libelf/*/*" - reviewers: "@Hopobcn" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/libevent/*/*" - reviewers: "@Hopobcn" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/libffi/*/*" - reviewers: "@Hopobcn" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/libiberty/*/*" - reviewers: "@Hopobcn" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/libiconv/*/*" - reviewers: "@Hopobcn" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/libltc/*/*" - reviewers: "@MartinDelille" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/libpng/*/*" - reviewers: "@Hopobcn" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/libraw/*/*" - reviewers: "@irieger" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/libsodium/*/*" - reviewers: "@Hopobcn @paulharris" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/libspatialite/*/*" - reviewers: "@jwillikers" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/libunwind/*/*" - reviewers: "@Hopobcn" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/libuuid/*/*" - reviewers: "@jwillikers" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/libxml2/*/*" - reviewers: "@Hopobcn" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/llvm-core/*/*" - reviewers: "@Hopobcn @paulharris" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/lyra/*/*" - reviewers: "@grafikrobot" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/lz4/*/*" - reviewers: "@Hopobcn" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/mocknetworkaccessmanager/*/*" - reviewers: "@MartinDelille" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/ms-gsl/*/*" - reviewers: "@jwillikers" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/nlohmann_json/*/*" - reviewers: "@Hopobcn @jwillikers" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/onnx/*/*" - reviewers: "@Hopobcn" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/openapi-generator/*/*" - reviewers: "@MartinDelille" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/opencolorio/*/*" - reviewers: "@irieger" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/openexr/*/*" - reviewers: "@irieger" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/opengl/*/*" - reviewers: "@Hopobcn" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/opengl-registry/*/*" - reviewers: "@MartinDelille" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/openimageio/*/*" - reviewers: "@irieger" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/openssl/*/*" - reviewers: "@Hopobcn @Croydon" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/protobuf/*/*" - reviewers: "@Hopobcn" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/psimd/*/*" - reviewers: "@Hopobcn" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/qtawesome/*/*" - reviewers: "@MartinDelille" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/qt/*/*" - reviewers: "@ericLemanissier @jwillikers @MartinDelille @paulharris" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/quazip/*/*" - reviewers: "@MartinDelille" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/rtmidi/*/*" - reviewers: "@MartinDelille" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/sentry-*/*/*" - reviewers: "@MartinDelille" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/shapelib/*/*" - reviewers: "@jwillikers" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/snappy/*/*" - reviewers: "@Hopobcn" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/snowhouse/*/*" - reviewers: "@MartinDelille" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/uncrustify/*/*" - reviewers: "@MartinDelille" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/wayland/*/*" - reviewers: "@jwillikers" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/wayland-protocols/*/*" - reviewers: "@jwillikers" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/xkbcommon/*/*" - reviewers: "@jwillikers" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/xorg/*/*" - reviewers: "@Hopobcn" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/yaml-cpp/*/*" - reviewers: "@jwillikers @MartinDelille" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/xz_utils/*/*" - reviewers: "@Hopobcn" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/zlib/*/*" - reviewers: "@Hopobcn" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/zstd/*/*" - reviewers: "@Hopobcn" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/libhal/*/*" - reviewers: "@kammce" diff --git a/.github/workflows/hooks-warnings.yml b/.github/workflows/hooks-warnings.yml deleted file mode 100644 index e19b8ea189eb5..0000000000000 --- a/.github/workflows/hooks-warnings.yml +++ /dev/null @@ -1,84 +0,0 @@ -name: hooks warnings - -on: - issue_comment: - types: [created] - -jobs: - comment: - if: ${{ github.event.issue.pull_request && github.event.sender.login == 'conan-center-bot' }} - runs-on: ubuntu-latest - steps: - - uses: actions/github-script@v6 - with: - script: | - warnings_map = new Map() - const link_regex = /\[All logs\]\((?https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*))\)/g; - for (const match of context.payload.comment.body.matchAll(link_regex)) - { - prefix = "https://c3i.jfrog.io/c3i/misc/summary.html?json=" - if(!match.groups.url.startsWith(prefix)) - continue; - url = match.groups.url.slice(prefix.length) - try { - result = await github.request({ - url: url, - }); - } catch(err) { - core.warning(`error ${err.status} for url ${err.request.url}`) - continue - } - for (const job of result.data) - { - if (job.build == null) - continue; - try { - log = await github.request({ - baseUrl: "https://c3i.jfrog.io/c3i/misc/", - url: job.build, - }); - } catch(err) { - core.warning(`error ${err.status} for url ${err.request.url}`) - continue - } - prefix = "[HOOK - conan-center.py] " - warnings = log.data.split("\n").filter(line => line.startsWith(prefix) && line.includes(" WARN: ")) - if(warnings.length == 0) - continue - if(!warnings_map.has(job.reference)) - warnings_map.set(job.reference, new Set()) - for(const warning of warnings) - { - msg = warning.slice(prefix.length) - warnings_map.get(job.reference).add(msg) - core.warning(msg) - } - } - } - if(warnings_map.size > 0) - { - comment = "
\n" - comment += "Hooks produced the following warnings" - const shaRegex = /(All green|Failure) in build \d+ \(`(?(\d|[a-z])+)`\):/g; - const shaMatch = shaRegex.exec(context.payload.comment.body) - if(shaMatch) - { - comment += " for commit " + shaMatch.groups.sha - } - comment += "\n\n" - for (const [ref, warnings] of warnings_map) - { - comment += "
\n" - comment += "" + ref + "\n\n```\n" - for(const warning of warnings) - comment += warning + "\n" - comment += "```\n
\n" - } - comment += "
\n" - github.rest.issues.createComment({ - issue_number: context.issue.number, - owner: context.repo.owner, - repo: context.repo.repo, - body: comment - }) - } diff --git a/.github/workflows/linter-conan-v2.yml b/.github/workflows/linter-conan-v2.yml deleted file mode 100644 index 9b437a26e46d8..0000000000000 --- a/.github/workflows/linter-conan-v2.yml +++ /dev/null @@ -1,124 +0,0 @@ -name: "[linter] Conan v2 migration" - -on: - pull_request: - -env: - PYTHONPATH: ${{github.workspace}} - PYVER: "3.8" - REQUIREMENTS: "pylint==2.14" - -jobs: - test_linter: - name: Test linter changes (v2 migration) - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - name: Get changed files - uses: ./.github/actions/pr_changed_files - id: changed_files - with: - files: | - linter/** - .github/workflows/linter-conan-v2.yml - - - name: Get Conan v1 version - id: parse_conan_v1_version - if: steps.changed_files.outputs.any_changed == 'true' - uses: mikefarah/yq@master - with: - cmd: yq '.conan.version' '.c3i/config_v1.yml' - - - uses: actions/setup-python@v4 - if: steps.changed_files.outputs.any_changed == 'true' - with: - python-version: ${{ env.PYVER }} - - - name: Install requirements - if: steps.changed_files.outputs.any_changed == 'true' - run: | - pip install ${{ env.REQUIREMENTS }} conan==${{ steps.parse_conan_v1_version.outputs.result }} - - - name: Execute linter over all recipes in the repository - id: linter_recipes - if: steps.changed_files.outputs.any_changed == 'true' - run: | - echo '## Linter summary (recipes)' >> $GITHUB_STEP_SUMMARY - pylint --rcfile=linter/pylintrc_recipe `ls recipes/*/*/conanfile.py | shuf -n 500` --output-format=json --output=recipes.json --score=y --exit-zero - jq '[map( select(.type=="error")) | group_by (.message)[] | {message: .[0].message, length: length}] | sort_by(.length) | reverse' recipes.json > recipes2.json - jq -r '.[] | " * \(.message): \(.length)"' recipes2.json >> $GITHUB_STEP_SUMMARY - - - name: Execute linter over all test_package/recipes in the repository - id: linter_test_package - if: steps.changed_files.outputs.any_changed == 'true' - run: | - echo '## Linter summary (test_package)' >> $GITHUB_STEP_SUMMARY - pylint --rcfile=linter/pylintrc_testpackage `ls recipes/*/*/test_package/conanfile.py | shuf -n 500` --output-format=json --output=recipes.json --exit-zero - jq '[map( select(.type=="error")) | group_by (.message)[] | {message: .[0].message, length: length}] | sort_by(.length) | reverse' recipes.json > recipes2.json - jq -r '.[] | " * \(.message): \(.length)"' recipes2.json >> $GITHUB_STEP_SUMMARY - - conanfile_recipe: - name: Lint changed conanfile.py (v2 migration) - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - name: Get changed files - id: changed-files - uses: ./.github/actions/pr_changed_files - with: - files: | - recipes/*/*/conanfile.py - - name: Get Conan v1 version - id: parse_conan_v1_version - if: steps.changed-files.outputs.any_changed == 'true' - uses: mikefarah/yq@master - with: - cmd: yq '.conan.version' '.c3i/config_v1.yml' - - uses: actions/setup-python@v4 - if: steps.changed-files.outputs.any_changed == 'true' - with: - python-version: ${{ env.PYVER }} - - name: Install dependencies - if: steps.changed-files.outputs.any_changed == 'true' - run: | - pip install ${{ env.REQUIREMENTS }} conan==${{ steps.parse_conan_v1_version.outputs.result }} - - name: Run linter - if: steps.changed-files.outputs.any_changed == 'true' - run: | - echo "::add-matcher::linter/recipe_linter.json" - for file in ${{ steps.changed-files.outputs.all_changed_files }}; do - pylint --rcfile=linter/pylintrc_recipe --output-format=parseable ${file} - done - - conanfile_test_package: - name: Lint changed test_package/conanfile.py (v2 migration) - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - name: Get changed files - id: changed-files - uses: ./.github/actions/pr_changed_files - with: - files: | - recipes/*/*/test_*/conanfile.py - - name: Get Conan v1 version - id: parse_conan_v1_version - if: steps.changed-files.outputs.any_changed == 'true' - uses: mikefarah/yq@master - with: - cmd: yq '.conan.version' '.c3i/config_v1.yml' - - uses: actions/setup-python@v4 - if: steps.changed-files.outputs.any_changed == 'true' - with: - python-version: ${{ env.PYVER }} - - name: Install dependencies - if: steps.changed-files.outputs.any_changed == 'true' - run: | - pip install ${{ env.REQUIREMENTS }} conan==${{ steps.parse_conan_v1_version.outputs.result }} - - name: Run linter - if: steps.changed-files.outputs.any_changed == 'true' - run: | - echo "::add-matcher::linter/recipe_linter.json" - for file in ${{ steps.changed-files.outputs.all_changed_files }}; do - pylint --rcfile=linter/pylintrc_testpackage --ignore-paths="recipes/[^/]*/[^/]*/test_v1[^/]*/conanfile.py" --output-format=parseable ${file} - done diff --git a/.github/workflows/linter-yaml.yml b/.github/workflows/linter-yaml.yml deleted file mode 100644 index d7d4050e8071d..0000000000000 --- a/.github/workflows/linter-yaml.yml +++ /dev/null @@ -1,118 +0,0 @@ -name: "[linter] YAML files" - -on: - pull_request: - -env: - PYTHONPATH: ${{github.workspace}} - PYVER: "3.8" - CONFIG_FILES_PATH: "recipes/*/config.yml" - CONANDATA_FILES_PATH: "recipes/*/*/conandata.yml" - -jobs: - test_linter: - # A job to run when the linter changes. We want to know in advance how many files will be broken - name: Test linter changes (YAML files) - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - name: Get changed files - uses: ./.github/actions/pr_changed_files - id: changed_files - with: - files: | - linter/** - - - uses: actions/setup-python@v4 - if: steps.changed_files.outputs.any_changed == 'true' - with: - python-version: ${{ env.PYVER }} - - - name: Install dependencies - if: steps.changed_files.outputs.any_changed == 'true' - run: pip install yamllint strictyaml argparse - - - name: Run linter (config.yml) - if: steps.changed_files.outputs.any_changed == 'true' && always() - run: | - echo "::add-matcher::linter/yamllint_matcher.json" - yamllint --config-file linter/yamllint_rules.yml -f standard ${{ env.CONFIG_FILES_PATH }} - echo "::remove-matcher owner=yamllint_matcher::" - - - name: Run schema check (config.yml) - if: steps.changed_files.outputs.any_changed == 'true' && always() - run: | - for file in ${{ env.CONFIG_FILES_PATH }}; do - python3 linter/config_yaml_linter.py ${file} - done - - - name: Run linter (conandata.yml) - if: steps.changed_files.outputs.any_changed == 'true' && always() - run: | - echo "::add-matcher::linter/yamllint_matcher.json" - yamllint --config-file linter/yamllint_rules.yml -f standard ${{ env.CONANDATA_FILES_PATH }} - echo "::remove-matcher owner=yamllint_matcher::" - - - name: Run schema check (conandata.yml) - if: steps.changed_files.outputs.any_changed == 'true' && always() - run: | - for file in ${{ env.CONANDATA_FILES_PATH }}; do - python3 linter/conandata_yaml_linter.py ${file} - done - - lint_pr_files: - # Lint files modified in the pull_request - name: Lint changed files (YAML files) - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-python@v4 - with: - python-version: ${{ env.PYVER }} - - - name: Install dependencies - run: pip install yamllint strictyaml argparse - - ## Work on config.yml files - - name: Get changed files (config) - id: changed_files_config - if: always() - uses: ./.github/actions/pr_changed_files - with: - files: | - ${{ env.CONFIG_FILES_PATH }} - - - name: Run linter (config.yml) - if: steps.changed_files_config.outputs.any_changed == 'true' && always() - run: | - echo "::add-matcher::linter/yamllint_matcher.json" - for file in ${{ steps.changed_files_config.outputs.all_changed_files }}; do - yamllint --config-file linter/yamllint_rules.yml -f standard ${file} - done - echo "::remove-matcher owner=yamllint_matcher::" - - for file in ${{ steps.changed_files_conandata.outputs.all_changed_files }}; do - python3 linter/config_yaml_linter.py ${file} - done - - ## Work on conandata.yml files - - name: Get changed files (conandata) - id: changed_files_conandata - if: always() - uses: ./.github/actions/pr_changed_files - with: - files: | - ${{ env.CONANDATA_FILES_PATH }} - - - name: Run linter (conandata.yml) - if: steps.changed_files_conandata.outputs.any_changed == 'true' && always() - run: | - echo "::add-matcher::linter/yamllint_matcher.json" - for file in ${{ steps.changed_files_conandata.outputs.all_changed_files }}; do - yamllint --config-file linter/yamllint_rules.yml -f standard ${file} - done - echo "::remove-matcher owner=yamllint_matcher::" - - for file in ${{ steps.changed_files_conandata.outputs.all_changed_files }}; do - python3 linter/conandata_yaml_linter.py ${file} - done diff --git a/.github/workflows/markdown-links.yml b/.github/workflows/markdown-links.yml deleted file mode 100644 index 50c393f373fb1..0000000000000 --- a/.github/workflows/markdown-links.yml +++ /dev/null @@ -1,18 +0,0 @@ -name: "[linter] Markdown links" - -on: - pull_request: - paths: - - '**.md' - -jobs: - markdown-link-check-pr: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: gaurav-nelson/github-action-markdown-link-check@v1 - with: - config-file: .github/workflows/mlc_config.json - use-quiet-mode: 'yes' - use-verbose-mode: 'yes' - check-modified-files-only: 'yes' diff --git a/.github/workflows/mlc_config.json b/.github/workflows/mlc_config.json deleted file mode 100644 index d16005bb86641..0000000000000 --- a/.github/workflows/mlc_config.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "retryOn429": true, - "retryCount": 5, - "fallbackRetryDelay": "30s", - "httpHeaders": [ - { - "urls": ["https://github.com/", "https://guides.github.com/", "https://help.github.com/", "https://docs.github.com/"], - "headers": { - "Accept-Encoding": "zstd, br, gzip, deflate" - } - } - ] -} diff --git a/.github/workflows/on-push-do-doco.yml b/.github/workflows/on-push-do-doco.yml deleted file mode 100644 index 17b68406118dd..0000000000000 --- a/.github/workflows/on-push-do-doco.yml +++ /dev/null @@ -1,30 +0,0 @@ -name: docs_markdown_toc -on: - workflow_dispatch: - inputs: {} - push: - branches: - - master - paths: - - 'docs/**' - -jobs: - docs_markdown_toc: - runs-on: windows-latest - steps: - - uses: actions/checkout@v3 - - name: Run MarkdownSnippets - run: | - dotnet tool install --global MarkdownSnippets.Tool - mdsnippets ${GITHUB_WORKSPACE} \ - --convention InPlaceOverwrite \ - --exclude-directories 'recipes' \ - --toc-level 5 - shell: bash - - name: Create Pull Request - uses: peter-evans/create-pull-request@v6 - with: - branch: bot/action-doc-toc - commit-message: "[docs] Regenerate tables of contents" - title: "[docs] Regenerate tables of contents" - body: "Automatic update of the documentation TOCs." diff --git a/.gitignore b/.gitignore index 4955b6cd850e6..366db2f4800f6 100644 --- a/.gitignore +++ b/.gitignore @@ -8,6 +8,8 @@ conanbuildinfo.txt conaninfo.txt graph_info.json build/ +.conanrunner/ +.conanrc # CMake CMakeUserPresets.json diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 6e24832e93e98..e947909b42988 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -32,7 +32,7 @@ To contribute follow the next steps: got everything working or even if you need help. Add the text to the issue body (besides other comments): "fixes #IssueNumber" in the body of the PR, referring to the issue of step 1. -The Conan Community works hard to review all the pull requests and provided assistance where need. +The Conan Community works hard to review all the pull requests and provide assistance where need. The [Review Process](docs/review_process.md) is partially automated with the help of @conan-center-index-bot :rocket: ## Issues diff --git a/README.md b/README.md index 3206926309aed..54cfaefe6c2cc 100644 --- a/README.md +++ b/README.md @@ -14,26 +14,37 @@ The current Conan Center Index CI status can be found on https://status.conan.io Any maintenance, outage or important event related to the CI will be informed there. -### Add ConanCenter remote +### Configure the Conan Center remote -ConanCenter remote is configured by default in any Conan client installation. If, for any reason, you need to add it manually, just execute: +> [!IMPORTANT] +> The Conan Center remote URL changed for **Conan 2** on November 2024 - the new URL is the default on new installations of Conan since version 2.9.2. +> +> New recipe updates are only published to this remote and are only guaranteed to be compatible with recent versions of Conan 2. +> +> All previously published recipes and packages known to be compatible with Conan 2 are also served by this remote. + +To update an existing Conan 2 installation: ``` -conan remote add conancenter https://center.conan.io +conan remote update conancenter --url https://center2.conan.io ``` +#### Conan Center legacy remote + +The legacy remote at `https://center.conan.io` stopped receiving updates on 4 November 2024 and is frozen and will no longer received updates. +It is kept in this state to avoid breaking any existing Conan 1.x installations. + + ### How to consume recipes Starting to use recipes from this repository is as easy as running one simple command after installing Conan: ``` -conan install name/version@ [-g ] +conan install --require=name/version [-g ] ``` -Of course, we really encourage you to use a `conanfile.txt` or `conanfile.py` -to list all the requirements or your project and install them all together -(Conan will build a single graph and ensure congruency). +For further details, please see the [Conan documentation](https://docs.conan.io/2/tutorial/consuming_packages.html). :warning: It is very important to notice that recipes will evolve over time and, while they are fixing some issues, they might introduce new features and @@ -50,10 +61,8 @@ This is a list of shortcuts to some interesting topics: * :rocket: If you want to learn how to **contribute new recipes**, please read [docs/adding_packages/](docs/adding_packages/README.md). * :speech_balloon: **FAQ**: most common questions are listed in [docs/faqs.md](docs/faqs.md). -* :warning: The conan-center **hook errors** reported by CCI Bot can be found in the [docs/error_knowledge_base.md](docs/error_knowledge_base.md). * :hammer_and_wrench: The internal changes related to infrastructure can be checked in [docs/changelog.md](docs/changelog.md). * :world_map: There are various community lead initiatives which are outlined in [docs/community_resources.md](docs/community_resources.md). -* :magic_wand: To start preparing your recipes for **Conan 2.0**, please check [docs/v2_migration.md](docs/v2_migration.md). ### Reporting Issues @@ -65,7 +74,7 @@ You can open issues in the [issue tracker](https://github.com/conan-io/conan-cen - Specify the name and version (`zlib/1.2.11`) and any relevant details about the fail configuration: Applied profile, building machine... * :bulb: Request a **new library** to be added: - - Use the `[request]` label to search the library in the issue tracker in case the it was already requested. + - Use the `[request]` label to search the library in the issue tracker in case it was already requested. - If not, use the same `[request]` tag in the title of the issue to help identifying them. - Indicate the name and the version of the library you would like to have in the repository. Also links to the project's website, source download/repository and in general any relevant information that helps creating a recipe for it. diff --git a/docs/README.md b/docs/README.md index 566801917e5f3..3305d7c06b030 100644 --- a/docs/README.md +++ b/docs/README.md @@ -14,11 +14,7 @@ When pull requests are merged, the CI will upload the generated packages to the + [Developing Recipes Locally](developing_recipes_locally.md) + [Adding Packages to ConanCenter](adding_packages/README.md) :point_left: Best place to learn how to contribute + [Bumping versions to existing packages](bump_version.md) - + [Errors from the conan-center hook (KB-Hxxx)](error_knowledge_base.md) + [Review Process](review_process.md) - + [Labels](labels.md) - + [Supported platforms and configurations](supported_platforms_and_configurations.md) + [Consuming Recipes](consuming_recipes.md) :information_source: Learn how to limit the impact of recipe changes + [Community Resources](community_resources.md) - + [Preparing recipes for Conan 2.0](v2_migration.md) + [FAQs](faqs.md) diff --git a/docs/adding_packages/README.md b/docs/adding_packages/README.md index 409f61c38fc0e..a4d6c0e3a5b4f 100644 --- a/docs/adding_packages/README.md +++ b/docs/adding_packages/README.md @@ -4,44 +4,22 @@ ConanCenterIndex aims to provide the best quality packages of any open source pr Any C/C++ project can be made available by contributing a "recipe". Getting started is easy. Try building an existing package with our [developing recipes](../developing_recipes_locally.md) -tutorial. To deepen you understanding, start with the [How to provide a good recipe](#how-to-provide-a-good-recipe) section. +tutorial. To deepen you understanding, start with the [How to write a good recipe](#how-to-provide-a-good-recipe) section. You can follow the three steps (:one: :two: :three:) described below! :tada: ## Contents - - * [:one: Request access](#one-request-access) - * [Inactivity and user removal](#inactivity-and-user-removal) + * [:one: First time contributors](#one-first-time-contributors) * [:two: Creating a package](#two-creating-a-package) - * [How to provide a good recipe](#how-to-provide-a-good-recipe) + * [How to write a good recipe](#how-to-provide-a-good-recipe) * [:three: Submitting a Package](#three-submitting-a-package) * [The Build Service](#the-build-service) -## :one: Request access - -The first step to add packages to ConanCenter is requesting access. To enroll in ConanCenterIndex repository, please write a comment -requesting access in this GitHub [issue #4](https://github.com/conan-io/conan-center-index/issues/4). Feel free to introduce yourself and -your motivation to join ConanCenter community. - -This process helps ConanCenter against spam and malicious code. The process is not fully automated on purpose and the requests are -generally approved on a weekly basis. Feel free to continue to step :two: while waiting for approval. - -> **Note** The requests are reviewed manually, checking the GitHub profile activity of the requester to avoid any misuse of the service. -> All interactions are subject to the expectations of the [code of conduct](../code_of_conduct.md). Any misuse or inappropriate behavior -> are subject to the same principals. +## :one: First time contributors When submitting a pull request for the first time, you will be prompted to sign the [CLA](https://cla-assistant.io/conan-io/conan-center-index) for your code contributions. You can view your signed CLA's by going to and signing in. -## Inactivity and user removal - -For security reasons related to the CI, when a user no longer contributes for a long period, it will be considered inactive and removed from the authorized user's list. -For now, it's configured for **4 months**, and it's computed based on the latest commit, not comments or opened issues. -After that time, the CI bot will ask to remove the user name from the authorized users' list through the access request PR, which occurs a few times every week. - -When you are interested in contributing again, simply ask again to be included in the [issue #4](https://github.com/conan-io/conan-center-index/issues/4). -The process will be precisely like for newcomers. - ## :two: Creating a package Once you've successfully built an existing recipe following [developing recipes](../developing_recipes_locally.md) tutorial. @@ -66,14 +44,7 @@ In ConanCenter, our belief is recipes should always match upstream, in other wor * Options should [follow these recommendations](conanfile_attributes.md#options) as well as match the default value used by the upstream project. * [Package information](build_and_package.md), libraries, components should match as well. This includes exposing supported build system names. -Where dependencies are involved, there's no shortcuts, inspect the upstream's build scripts for how they are usually consumed. Pick the Conan -generator that matches. The most common example is CMake's `find_package` that can be satisfied by Conan's -[`CMakeDeps`](https://docs.conan.io/1/reference/conanfile/tools/cmake/cmakedeps.html) generator. There are a few -things to be cautious about, many projects like to "vendor" other projects within them. This can be files checked into the repository or -downloaded during the build process. These should be removed, see the [Dependencies section](dependencies.md#handling-internal-dependencies) -for more information. - -### How to provide a good recipe +### How to write a good recipe Take a look at existing [recipes](https://github.com/conan-io/conan-center-index/tree/master/recipes) available in ConanCenterIndex which can be used as good examples, you can use them as the base for your recipe. The GitHub search is very good for matching code snippets, you can see if, @@ -95,7 +66,6 @@ The documents in this folder are written to explain each folder, file, method, a 4. [Dependencies](dependencies.md) 5. [Build and Package](build_and_package.md) 1. [Revisit Patches](sources_and_patches.md#policy-about-patching) -6. [Test Package](test_packages.md) The one place you are certain to find a lot of information is , this has the documentation for everything in Conan. There are helpful tutorials for cross-build, detailed explication for profiles and settings and much much more! @@ -110,8 +80,6 @@ The specific steps to submitting changes are: * Build and test the new recipe in several combinations. Check [developing recipes](../developing_recipes_locally.md) for tips. * [Commit and push to your fork repository](https://docs.github.com/en/get-started/using-git/pushing-commits-to-a-remote-repository) then [submit a pull request](https://github.com/conan-io/conan-center-index/compare). -* Our automated [build service](#the-build-service) will build 100+ different configurations, and provide messages that indicate if there - were any issues found during the pull request on GitHub. When the pull request is [reviewed and merged](../review_process.md), those packages are published to [JFrog's ConanCenter](https://conan.io/center/) and are made available for everyone. @@ -120,14 +88,9 @@ and are made available for everyone. The **build service** associated to this repository will generate binary packages automatically for the most common platforms and compilers. See [the Supported Platforms and Configurations page](../supported_platforms_and_configurations.md) for a list of generated configurations. -For a C++ library, the system is currently generating more than 100 binary packages. +For a C++ library, the system is currently generating more than 30 binary packages. > **Note**: This not a testing service, it is a binary building service for **released** packages. Unit tests shouldn't be built nor run in recipes by default, see the [FAQs](../faqs.md#why-conancenter-does-not-build-and-execute-tests-in-recipes) for more. Before submitting a pull request, please ensure that it works locally for some configurations. -* The CI bot will start a new build only [after the author is approved](#one-request-access). Your PR may be reviewed in the mean time, but is not guaranteed. -* The CI system will also report errors and build logs by creating a comment in the pull-request, the message will include links to the logs for inspecting. -* The Actions are used to lint and ensure the latest conventions are being used. You'll see comments from bots letting you know. - -Packages generated and uploaded by this build service do not include any _user_ or _channel_ (we generally recommend using `@user/channel` for private package -repositories as an easy way to distinguish them from public ones). Once the packages are uploaded, you will be able to install them using the reference as -`name/version` so example `conan install fmt/9.1.0@` for 1.x client or `conan install --requires=fmt/9.1.0` for 2.x clients. +- The CI system will report the build logs in the Checks tab, in the pull-request. +- Linter and Hooks are automatically displayed in the Checks tab as well. diff --git a/docs/adding_packages/build_and_package.md b/docs/adding_packages/build_and_package.md index a64769f6e6b52..0235be181c3e4 100644 --- a/docs/adding_packages/build_and_package.md +++ b/docs/adding_packages/build_and_package.md @@ -17,61 +17,15 @@ Both methods often use build helpers to build binaries and install them into the ## Build Method -* `build()` method should focus on build only, not installation. During the build, nothing should be written in `package` folder. Installation step should only occur in `package()` method. - -* The build itself should only rely on local files. Nothing should be downloaded from the internet during this step. If external files are required, they should come from `requirements` or `build_requirements` in addition to source files downloaded in `source()` or coming from the recipe itself through `export()` or `export_sources()`. - -* Except for CMake, a working build toolchain (compiler, linker, archiver, etc.), and a "native generator" (`make` on *nix platforms, `mingw32-make` for MinGW, `MSBuild`/`NMake` for Visual Studio), the recipe should not assume that any other build tool is installed on the user-build machine (like Meson, autotools, or pkg-config). On Windows, the recipe should not assume that a shell is available (like MSYS2). Therefore, if the build method requires additional tools, they should be added to `build_requirements()`. - Tools explicitly marked as available by users through conf like `tools.gnu:make_program`, `tools.gnu:pkg_config`, `tools.microsoft.bash:path`, `tools.microsoft.bash:subsystem` should be taken into account to conditionally inject a build requirement (these conf should have precedence over build requirement equivalent hardcoded in the recipe). - -* It is forbidden to run other conan client commands during build. In other words, if upstream build files call conan under the hood (through `cmake-conan` for example or any other logic), this logic must be removed. - -* Settings from profile should be honored (`build_type`, `compiler.libcxx`, `compiler.cppstd`, `compiler.runtime` etc). - -* Compiler paths from host profile should be honored and properly propagated to underlying build system during the build: - - | compiler type | conf / env var | - |---------------|----------------| - | C compiler | `c` key of `tools.build:compiler_executables`, otherwise `CC` environment variable | - | C++ compiler | `cpp` key of `tools.build:compiler_executables`, otherwise `CXX` environment variable | - | ASM compiler | `asm` key of `tools.build:compiler_executables`, otherwise `CCAS` environment variable | - | CUDA compiler | `cuda` key of `tools.build:compiler_executables` | - | Fortran compiler | `fortran` key of `tools.build:compiler_executables`, otherwise `FC` environment variable | - | Objective-C compiler | `objc` key of `tools.build:compiler_executables` | - | Objective-C++ compiler | `objcpp` key of `tools.build:compiler_executables` | - | Resource files compiler | `rc` key of `tools.build:compiler_executables`, otherwise `RC` environment variable | - | Archiver | `AR` environment variable | - | Linker | `LD` environment variable | - - They should be curated on the fly if underlying build system expects a specific format (no spaces in path, forward slash instead of back slash, etc). - -* These compiler and linker conf from host profile should be honored and propagated to underlying build system during the build: - * `tools.build:cflags` - * `tools.build:cxxflags` - * `tools.build:defines` - * `tools.build:sharedlinklags` - * `tools.build:exelinkflags` - * `tools.apple:enable_bitcode` (only if host OS is `iOS`/`watchOS`/`tvOS`) - -* Multithread build (if supported by underlying build system): - * if some steps are sensitive to race conditions, monothread should be enforced. - * otherwise multithreaded build should be enabled with a number of cores controlled by `tools.build:jobs` conf from host profile if it is set, otherwise to all cores of build machine. +For the `build()` method, the general scope used to build artifacts. Please, read +the official reference to the [build()](https://docs.conan.io/2/reference/conanfile/methods/build.html) method and the +[Build packages: the build() method](https://docs.conan.io/2/tutorial/creating_packages/build_packages.html). ## Package Method -* CMake config files must be removed. They will be generated for consumers by `CMakeDeps` generator (or legacy `cmake_find_package`/`cmake_find_package_multi` generators). - -* pkg-config files must be removed. They will be generated for consumers by `PkgConfigDeps` generator (or legacy `pkg_config` generator). - -* On *nix systems, executables and shared libraries should have empty `RPATH`/`RUNPATH`/`LC_RPATH`. Though, a relative path pointing inside package itself is allowed. - -* On Apple OS family: - * shared libs: name field of `LC_ID_DYLIB` load command must be `@rpath/`. - * shared libs & executables: name field of each `LC_LOAD_DYLIB` load command should be `@rpath/` (except those refering to system libs or frameworks). - -* Installed files must not contain absolute paths specific to build machine. Relative paths to other packages is also forbidden since relative paths of dependencies during build may not be the same for consumers. Hardcoded relative paths pointing to a location in the package itself are allowed. - -* Static and shared flavors of the same library must not be packaged together. +The `package()` method is used to copy the artifacts to the `package_folder`. Please, read the official reference to the +[package()](https://docs.conan.io/2/reference/conanfile/methods/package.html) method and the +[Package files: the package() method](https://docs.conan.io/2/tutorial/creating_packages/package_method.html). ## Build System Examples @@ -82,31 +36,28 @@ General patterns about how they can be used for OSS in ConanCenterIndex can be f ### Header Only If you are looking for header-only projects, you can take a look on [header-only template](../package_templates/header_only). -Also, Conan Docs have a section about [how to package header-only libraries](https://docs.conan.io/1/howtos/header_only.html). +Also, Conan Docs have a section about [how to package header-only libraries](https://docs.conan.io/2/tutorial/creating_packages/other_types_of_packages/header_only_packages.html). ### CMake For C/C++ projects which use CMake for building, you can take a look on [cmake package template](../package_templates/cmake_package). -Another common use case for CMake based projects, both header only and compiled, is _modeling components_ to match the `find_package` and export the correct targets from Conan's generators. A basic examples of this is [cpu_features](https://github.com/conan-io/conan-center-index/blob/master/recipes/cpu_features/all/conanfile.py), a moderate/intermediate example is [cpprestsdk](https://github.com/conan-io/conan-center-index/blob/master/recipes/cpprestsdk/all/conanfile.py), and a very complex example is [OpenCV](https://github.com/conan-io/conan-center-index/blob/master/recipes/opencv/4.x/conanfile.py). - ### Autotools There is an [autotools package template](../package_templates/autotools_package/) amiable to start from. -However, if you need to use autotools for building, you can take a look on [libalsa](https://github.com/conan-io/conan-center-index/blob/master/recipes/libalsa/all/conanfile.py), [kmod](https://github.com/conan-io/conan-center-index/blob/master/recipes/kmod/all/conanfile.py), [libcap](https://github.com/conan-io/conan-center-index/blob/master/recipes/libcap/all/conanfile.py). - -Many projects offer [**pkg-config**'s](https://www.freedesktop.org/wiki/Software/pkg-config/) `*.pc` files which need to be modeled using components. A prime example of this is [Wayland](https://github.com/conan-io/conan-center-index/blob/master/recipes/wayland/all/conanfile.py). - ### No Upstream Build Scripts -For cases where a project only offers source files, but not a build script, you can add CMake support, but first, contact the upstream and open a PR offering building support. If it's rejected because the author doesn't want any kind of build script, or the project is abandoned, CCI can accept your build script. Take a look at [Bzip2](https://github.com/conan-io/conan-center-index/blob/master/recipes/bzip2/all/CMakeLists.txt) and [DirectShowBaseClasses](https://github.com/conan-io/conan-center-index/blob/master/recipes/directshowbaseclasses/all/CMakeLists.txt) as examples. +For cases where a project only offers source files but does not provide a build script, you can add CMake support. +However, it is essential to first contact the upstream maintainers and open a pull request (PR) offering building support. +If your PR is rejected because the author does not want any kind of build script, or if the project is abandoned, Conan Center Index (CCI) will consider accepting your build script based on the effort required to maintain it, as we aim to avoid adding scripts that may require significant ongoing maintenance. +Take a look at [Bzip2](https://github.com/conan-io/conan-center-index/blob/master/recipes/bzip2/all/CMakeLists.txt) as example. ### System Packages > **Note**: For exceptional cases where only system packages can be used and a regular Conan package may result in an incompatible and fragile package, a separated system package may be created. See the [FAQs](../faqs.md#can-i-install-packages-from-the-system-package-manager) for more. -The [SystemPackageTool](https://docs.conan.io/1/reference/conanfile/methods.html#systempackagetool) can easily manage a system package manager (e.g. apt, +The [package_manager](https://docs.conan.io/2/reference/tools/system/package_manager.html#conan-tools-system-package-manager) can easily manage a system package manager (e.g. apt, pacman, brew, choco) and install packages which are missing on Conan Center but available for most distributions. It is key to correctly fill in the `cpp_info` for the consumers of a system package to have access to whatever was installed. -As example there is [xorg](https://github.com/conan-io/conan-center-index/blob/master/recipes/xorg/all/conanfile.py). Also, it will require an exception rule for [conan-center hook](https://github.com/conan-io/hooks#conan-center), a [pull request](https://github.com/conan-io/hooks/pulls) should be open to allow it over the KB-H032. +As example there is [xorg](https://github.com/conan-io/conan-center-index/blob/master/recipes/xorg/all/conanfile.py). \ No newline at end of file diff --git a/docs/adding_packages/conandata_yml_format.md b/docs/adding_packages/conandata_yml_format.md index ed96865802cc0..943af159a6485 100644 --- a/docs/adding_packages/conandata_yml_format.md +++ b/docs/adding_packages/conandata_yml_format.md @@ -1,6 +1,6 @@ # conandata.yml -[conandata.yml](https://docs.conan.io/1/reference/config_files/conandata.yml.html) is a [YAML](https://yaml.org/) +[conandata.yml](https://docs.conan.io/2/tutorial/creating_packages/handle_sources_in_packages.html#using-the-conandata-yml-file) is a [YAML](https://yaml.org/) file to provide declarative data for the recipe (which is imperative). This is a built-in Conan feature (available since 1.22.0) without a fixed structure, but ConanCenter has a specific format to ensure quality of recipes. @@ -30,8 +30,7 @@ next sections with more detail: * [portability](#portability) * [conan](#conan) * [bugfix](#bugfix) - * [patch_source](#patch_source) - * [base_path](#base_path) + * [patch_source](#patch_source) ## sources @@ -114,7 +113,7 @@ sources: sha256: "f5d48c4b0d558c5d71e8bf6fcdf135b0943210c1ff91f8191dfc447419a6b12e" ``` -This approach requires a special code within [build](https://docs.conan.io/1/reference/conanfile/methods.html#build) method to handle. +This approach requires a special code within [build](https://docs.conan.io/2/reference/conanfile/methods/build.html) method to handle. ### Sources fields @@ -126,8 +125,9 @@ Usually, `url` has a [https](https://tools.ietf.org/html/rfc2660) scheme, but ot #### sha256 [sha256](https://tools.ietf.org/html/rfc6234) is a preferred method to specify hash sum for the released sources. It allows to check the integrity of sources downloaded. -You may use an [online service](https://hash.online-convert.com/sha256-generator) to compute `sha256` sum for the given `url`. -Also, you may use [sha256sum](https://linux.die.net/man/1/sha256sum) command ([windows](https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/get-filehash?view=powershell-7.4) you can use PowerShell). +You may use an [online service](https://hash.online-convert.com/sha256-generator) to compute `sha256` sum for the given file located at `url`. + +If you're using linux you can run `wget -q -O - url | sha256sum` to get the hash which uses the [sha256sum](https://linux.die.net/man/1/sha256sum) command ([windows](https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/get-filehash?view=powershell-7.4) you can use PowerShell). ## patches @@ -172,7 +172,7 @@ An example of a full patch description could be: `port to Android: update config #### patch_type -_Required_ +_Recommended_ The `patch_type` field specifies the type of the patch. In ConanCenterIndex we currently accept only several kind of patches: @@ -219,7 +219,6 @@ Usually, the following kind of problems are good candidates for backports: * Data corruption. * Use of outdated or deprecated API or library. -As sources with backports don't act exactly the same as the version officially released, it may be a source of confusion for the consumers who are relying on the buggy behavior (even if it's completely wrong). Therefore, it's required to introduce a new `cci.` version for such backports, so consumers may choose to use either official version, or modified version with backport(s) included. #### patch_source @@ -235,9 +234,3 @@ _Recommended_ For the `patch_type: portability` there might be no patch source matching the definition above. Although we encourage contributors to submit all such portability fixes upstream first, it's not always possible (e.g. for projects no longer maintained). In that case, a link to the Conan issue is a valid patch source (if there is no issue, you may [create](https://github.com/conan-io/conan-center-index/issues/new/choose) one). For the `patch_type: conan`, it doesn't make sense to submit patch upstream, so there will be no patch source. - -#### base_path - -_Optional_ - -Specifies a sub-directory in project's sources to apply patch. This directory is relative to the [source_folder](https://docs.conan.io/1/reference/conanfile/attributes.html?highlight=source_folder#source-folder). Usually, it would be a `source_subfolder`, but could be a lower-level sub-directory (e.g. if it's a patch for a submodule). diff --git a/docs/adding_packages/conanfile_attributes.md b/docs/adding_packages/conanfile_attributes.md index fb7a767a13b95..f4b962c9c85e1 100644 --- a/docs/adding_packages/conanfile_attributes.md +++ b/docs/adding_packages/conanfile_attributes.md @@ -20,11 +20,11 @@ or are known by ConanCenter's build service and have special meaning. ## Attributes -These are a [key feature](https://docs.conan.io/1/reference/conanfile/attributes.html) which allow the Conan client to understand, +These are a [key feature](https://docs.conan.io/2/reference/conanfile/attributes.html) which allows the Conan client to understand, identify, and expose recipes and which project they expose. In ConanCenter, there are a few conventions that need to be respected to ensure recipes can be discovered there `conan search` command -of through the web UI. Many of which are enforces with the [hooks](../error_knowledge_base.md). +of through the web UI. ### Name @@ -38,50 +38,52 @@ Please see the FAQs for: ### Version -ConanCenter is geared towards quickly added new release, the build service always pass the version it is currently building to the recipe. The `version` attribute MUST NOT be added to any recipe - with exception to "system packages". #### ConanCenter specific releases format -The notation shown below is used for publishing packages which do not match the original library's official releases. This format which includes the "datestamp" corresponding to the date of a commit: `cci.`. +The notation shown below is used for publishing packages which do not match the original library's official releases. -In order to create reproducible builds, we also "commit-lock" to the latest commit on that day. Otherwise, users would get inconsistent results over time when rebuilding the package. An example of this is the [RapidJSON](https://github.com/Tencent/rapidjson) library, where its package reference is `rapidjson/cci.20200410` and its sources are locked the latest commit on that date in [config.yml](https://github.com/conan-io/conan-center-index/blob/master/recipes/rapidjson/config.yml#L4). The prefix `cci.` is mandatory to distinguish as a virtual version provided by CCI. If you are interested to know about the origin, please, read [here](https://github.com/conan-io/conan-center-index/pull/1464). +There are two cases to consider: + +* The library has not had any previous releases/tags. In this case, the version should be of the form + `0.0.0.cci.`. For example, `0.0.0.cci.20240402`. When/if a version of the library is ever released. + this will allow version ranges to properly identify the release as a newer version. +* The library has had previous releases/tags. In this case, the version should be of the form + `...cci.`. For example, `1.2.0.cci.20240402`. + This will allow version ranges to properly identify the release as a newer version. + +In order to create reproducible builds, we also "commit-lock" to the latest commit on that day, so the sources should point +to the commit hash of that day. Otherwise, users would get inconsistent results over time when rebuilding the package. ### License Attribute The license attribute is a mandatory field which provides the legal information that summarizes the contents saved in the package. These follow the -[SPDX license](https://spdx.org/licenses/) as a standard. This is for consummers, in particular in the enterprise sector, that do rely on SDPX compliant identifiers so that they can flag this as a custom license text. +[SPDX license](https://spdx.org/licenses/) as a standard. This is for consumers, in particular in the enterprise sector, that do rely on SDPX compliant identifiers so that they can flag this as a custom license text. * If the library has a license that has a SPDX identifier, use the [short Identifiers](https://spdx.dev/ids/). * If the library has a license text that does not match a SPDX identifier, including custom wording disclaiming copyright or dedicating the words to the ["public domain"](https://fairuse.stanford.edu/overview/public-domain/welcome/), use the [SPDX License Expressions](https://spdx.github.io/spdx-spec/v2-draft/SPDX-license-expressions/), this can follow: * `LicenseRef-` as a prefix, followed by the name of the library. For example:`LicenseRef-libfoo-public-domain` + * If the license is extracted from a specific document, prepend `DocumentRef--` to the license name. For example: `DocumentRef-README.md-LicenseRef-libfoo-public-domain` * If the library makes no mention of a license and the terms of use - it **shall not be accepted in ConanCenter** , even if the code is publicly available in GitHub or any other platforms. In case the license changes in a new release, the recipe should update the license attribute accordingly: ```python class LibfooConan(ConanFile): - license = ("MIT", "BSD-3-Clause") # keep both old and new licenses, so conan inspect can find it + license = "MIT" def configure (self): - # change the license according to the version, so conan graph info can show the correct one - # INFO: Version < 2.0 the license was MIT, but changed to BSD-3-Clause now. - self.license = "BSD-3-Clause" if Version(self.version) >= "2.0.0" else "MIT" + if Version(self.version) >= "2.0.0": + self.license = "BSD-3-Clause" ``` ## Order of methods and attributes Prefer the following order of documented methods in python code (`conanfile.py`, `test_package/conanfile.py`): -For `conan create` the order is listed [here](https://docs.conan.io/1/reference/commands/creator/create.html#methods-execution-order) -test packages recipes should append the following methods: - -* deploy -* test - -the order above resembles the execution order of methods on CI. therefore, for instance, `build` is always executed before `package` method, so `build` should appear before the -`package` in `conanfile.py`. +For `conan create` the order is listed [here](https://docs.conan.io/2/reference/commands/create.html#methods-execution-order). ## Settings @@ -140,61 +142,40 @@ Having the same naming conventions for the options helps consumers. It allows us ### Predefined Options and Known Defaults -ConanCenter supports many combinations, these are outline in the [supported configurations](../supported_platforms_and_configurations.md) document for each platform. -By default recipes should use `shared=False` with `fPIC=True`. If support, `header_only=False` is the default. +By default recipes should use `*/*:shared=False` with `*/*:fPIC=True`. If supported, `&:header_only=False` is the default. Usage of each option should follow the rules: * `shared` (with values `True` or `False`). The CI inspects the recipe looking for this option. The **default should be `shared=False`** and will generate all the configurations with values `shared=True` and `shared=False`. - > **Note**: The CI applies `shared=True` only to the package being built, while every other requirement will `shared=False`. To consume everything as a shared library you will set `--build=always` and/or `-o *:shared=True`) - > It's important to keep this in mind when trying to consume shared packages from ConanCenter - > as their requirements were linked inside the shared library. See [FAQs](../faqs.md#how-to-consume-a-graph-of-shared-libraries) for more information. - * `fPIC` (with values `True` or `False`). The **default should be `fPIC=True`** and will generate all the configurations with values `fPIC=True` and `fPIC=False`. - This option does not make sense on all the support configurations so it should be removed. + This option does not make sense on all the support configurations, so using `implements` is recommended: ```python - def config_options(self): - if self.settings.os == "Windows": - del self.options.fPIC - - def configure(self): - if self.options.shared: - self.options.rm_safe("fPIC") + implements = ["auto_shared_fpic"] ``` * `header_only` (with values `True` or `False`). The **default should be `header_only=False`**. If the CI detects this option, it will generate all the configurations for the value `header_only=False` and add one more configuration with `header_only=True`. **Only one package** will be generated for `header_only=True`, so it is crucial that the package is actually a _header only_ library, with header files only (no libraries or executables inside). - Recipes with such option should include the following in their `package_id` method + Recipes with such options should include the following in their `implements` attribute: ```python - def package_id(self): - if self.options.header_only: - self.info.clear() + implements = ["auto_header_only"] ``` - ensuring that, when the option is active, the recipe ignores all the settings and only one package ID is generated. - ### Options to Avoid * `build_testing` should not be added, nor any other related unit test option. Options affect the package ID, therefore, testing should not be part of that. - Instead, use Conan config [skip_test](https://docs.conan.io/1/reference/config_files/global_conf.html#tools-configurations) feature: - - ```python - def generate(self): - tc = CMakeToolChain(self) - tc.variables['BUILD_TESTING'] = not self.conf.get("tools.build:skip_test", default=true, check_type=bool) - ``` + Instead, use Conan config [skip_test](https://docs.conan.io/2/reference/config_files/global_conf.html#user-tools-configurations) feature. - The `skip_test` configuration is supported by [CMake](https://docs.conan.io/1/reference/build_helpers/cmake.html#test) and [Meson](https://docs.conan.io/1/reference/build_helpers/meson.html#test). + The `skip_test` configuration is supported by [CMake](https://docs.conan.io/2/reference/tools/cmake/cmake.html) and [Meson](https://docs.conan.io/2/reference/tools/meson/meson.html). ### Removing from `package_id` - By default, options are included in the calculation for the `package_id` ([docs](https://docs.conan.io/1/reference/conanfile/methods.html#package-id)). + By default, options are included in the calculation for the `package_id` ([docs](https://docs.conan.io/2/reference/binary_model/package_id.html)). Options which do not impact the generated packages should be deleted, for instance adding a `#define` for a package. ```python diff --git a/docs/adding_packages/dependencies.md b/docs/adding_packages/dependencies.md index 80a83e5335fbf..ac1a5c37c6491 100644 --- a/docs/adding_packages/dependencies.md +++ b/docs/adding_packages/dependencies.md @@ -5,90 +5,24 @@ from handling "vendored" dependencies to what versions should be used. ## Contents - - * [List Dependencies](#list-dependencies) - * [Optional Requirements](#optional-requirements) - * [Build Requirements](#build-requirements) - * [Accessing Dependencies](#accessing-dependencies) - * [Handling Requirement's Options](#handling-requirements-options) - * [Verifying Dependency's Version](#verifying-dependencys-version) - * [Passing Requirement's info to `build()`](#passing-requirements-info-to-build) - * [Overriding the provided properties from the consumer](#overriding-the-provided-properties-from-the-consumer) + * [Handling Requirement's Options](#handling-requirements-options) * [Adherence to Build Service](#adherence-to-build-service) * [Version Ranges](#version-ranges) - * [Adding Version Ranges](#adding-version-ranges) + * [Adding Version Ranges](#adding-version-ranges) * [Handling "internal" dependencies](#handling-internal-dependencies) -## List Dependencies - -Since all ConanCenterIndex recipes are to build and/or package projects they are exclusively done in [`conanfile.py`](https://docs.conan.io/1/reference/conanfile.html). This offers a few -ways to add requirements. The most common way is [requirements](https://docs.conan.io/1/reference/conanfile/methods.html#requirements): - -```py - def requirements(self): - self.requires("fmt/9.1.0") -``` - -> **Note**: With Conan 2.0, you'll also need to pay attention to new properties like the `transitive_header` attributed which is -> needed when a project include a dependencies header files in its public headers. - -When a project supports a range of version of a dependency, it's generally advised to pick the **most recent available in ConanCenter**. -This helps ensure there are fewer conflicts with other, up to-date, recipes that share the same requirement. - -### Optional Requirements - -Many projects support enabling certain features by adding dependencies. In ConanCenterIndex this is done by adding an option, see -[naming recommendation](conanfile_attributes.md#recommended-names), which should be set to match the upstream project's by default. - -```py -class ExampleConan(ConanFile): - options = { - "with_zlib": [True, False], # Possible values - } - default_options = { - "with_zlib": True, # Should match upstream's CMakeLists.txt `option(...)` - } - - def requirements(self): - if self.options.with_zlib: - self.requires("zlib/1.2.13") -``` - -If a dependency was added (or removed) with a release, then the `if` condition could check [`self.version`](https://docs.conan.io/1/reference/conanfile/attributes.html#version). Another common case is -`self.settings.os` dependant requirements which need to be added for certain plaforms. - -### Build Requirements - -In ConanCenter we only assume -[CMake is available](../faqs.md#why-recipes-that-use-build-tools-like-cmake-that-have-packages-in-conan-center-do-not-use-it-as-a-build-require-by-default). -If a project requires any other specific tool, those can be added as well. We like to do this with [build_requirements](https://docs.conan.io/1/reference/conanfile/methods.html#build-requirements): - -```py - def build_requirements(self): - self.tool_requires("ninja/1.1.0") -``` - -## Accessing Dependencies - -It's fairly common to need to pass information from a dependency to the project. This is the job of the [`generate()`](https://docs.conan.io/1/reference/conanfile/methods.html#generate) method. This -is generally covered by the built-in generators like [`CMakeDeps`](https://docs.conan.io/1/reference/conanfile/tools/cmake/cmakedeps.html) -However the [`self.dependencies`](https://docs.conan.io/1/reference/conanfile/dependencies.html?highlight=generate) are available. -Alternatively, a project may depend on a specific versions or configuration of a dependency. This use case is again covered by the -[`self.dependencies`](https://docs.conan.io/1/reference/conanfile/dependencies.html?highlight=validate) within the -[`validate()`](https://docs.conan.io/1/reference/conanfile/methods.html#validate) method. Additionally it's possible to suggest the option's values while the graph is built through [`configure()`](https://docs.conan.io/1/reference/conanfile/methods.html#configure-config-options) -this is not guaranteed and not a common practice. -### Handling Requirement's Options +## Handling Requirement's Options Forcing options of dependencies inside a ConanCenter should be avoided, except if it is mandatory for the library to build. Our general belief is the users input should be the most important; it's unexpected for command line arguments to be over ruled by specifc recipes. -You need to use the [`validate()`](https://docs.conan.io/1/reference/conanfile/methods.html#validate) method in order to ensure they check after the Conan graph is completely built. +You need to use the [`validate()`](https://docs.conan.io/2/reference/conanfile/methods/validate.html) method in order to ensure they check after the Conan graph is completely built. Certain projects are dependent on the configuration (also known as options) of a dependency. This can be enforced in a recipe by -accessing the [`options`](https://docs.conan.io/1/reference/conanfile/dependencies.html?highlight=options) field of +accessing the [`options`](https://docs.conan.io/2/reference/conanfile/methods/generate.html#dependencies-interface) field of the dependency. ```py @@ -100,68 +34,6 @@ the dependency. raise ConanInvalidConfiguration(f"{self.ref} requires foobar/*:enable_feature=True.") ``` -### Verifying Dependency's Version - -Some project requirements need to respect a version constraint, this can be done as follows: - -```py -def validate(self): - if Version(self.dependencies["foobar"].ref.version) < "1.2": - raise ConanInvalidConfiguration(f"{self.ref} requires [foobar>=1.2] to build and work.") -``` - -### Passing Requirement's info to `build()` - -The [`self.dependencies`](https://docs.conan.io/1/reference/conanfile/dependencies.html) are limited to [`generate()`](https://docs.conan.io/1/reference/conanfile/methods.html#generate) and [`validate()`](https://docs.conan.io/1/reference/conanfile/methods.html#validate). This means configuring a projects build scripts -is a touch more complicated when working with unsupported build scripts. - -In general, with [CMake](https://cmake.org/) project, this can be very simple with the [`CMakeToolchain`](https://docs.conan.io/1/reference/conanfile/tools/cmake/cmaketoolchain.html), such as: - -```py - def generate(self): - tc = CMakeToolchain(self) - # deps_cpp_info, deps_env_info and deps_user_info are no longer used - if self.dependencies["dependency"].options.foobar: - tc.variables["DEPENDENCY_LIBPATH"] = self.dependencies["dependency"].cpp_info.libdirs -``` - -This pattern can be recreated for less common build system by, generating a script to call configure or capture the -required values in a YAML files for example. - -> **Note**: This needs to be saved to disk because the [`conan install`](https://docs.conan.io/1/reference/commands/consumer/install.html) and [`conan build`](https://docs.conan.io/1/reference/commands/development/build.html) commands can be separated when -> developing packages so for this reason the `class` may not persists the information. This is a very common workflow, -> even used in ConanCenter in other areas such as testing. - -```py -from conan import ConanFile -from conan.tools.files import save, load - - -class ExampleConan(ConanFile): - _optional_build_args = [] - - @property - def _optional_build_args_filename(self): - return os.path.join(self.recipe_folder, self.folders.generators, "build_args.yml") - - def generate(self): - # This is required as `self.dependencies` is not available in `build()` or `test()` - if self.dependencies["foobar"].options.with_compression: - self._optional_build_args.append("--enable-foobar-compression") - - save(self, self._optional_build_args_filename, file) - - def build(self): - opts_args = load(self, self._optional_build_args_filename) - # Some magic setup - self.run(f"./configure.sh {opts_args}") -``` - -### Overriding the provided properties from the consumer - -> **Note**: This was adding in [Conan 1.55](https://github.com/conan-io/conan/pull/12609) to the generators... we need to -> write docs for when that's available - ## Adherence to Build Service It's very rare we layout "rules", most often it's guidelines, however in order to ensure graph and the package generated are usable @@ -169,38 +41,51 @@ for consumer, we do impose some limits on Conan features to provide a smoother f > **Note**: These are very specific to the ConanCenter being the default remote and may not be relevant to your specifc use case. -* [Version ranges](https://docs.conan.io/1/versioning/version_ranges.html) are generally not allowed (see below for exemption). -* Specify explicit [RREV](https://docs.conan.io/1/versioning/revisions.html) (recipe revision) of dependencies is not allowed. +* [Version ranges](https://docs.conan.io/2/tutorial/versioning/version_ranges.html#range-expressions) are generally not allowed ([see below](https://github.com/conan-io/conan-center-index/blob/master/docs/adding_packages/dependencies.md#version-ranges) for exemptions). +* Specify explicit [RREV](https://docs.conan.io/2/tutorial/versioning/revisions.html) (recipe revision) of dependencies is not allowed. * Only ConanCenter recipes are allowed in `requires`/`requirements()` and `build_requires`/`build_requirements()`. -* [`python_requires`](https://docs.conan.io/1/reference/conanfile/other.html#python-requires) are not allowed. +* [`python_requires`](https://docs.conan.io/2/reference/extensions/python_requires.html) are not allowed. ### Version Ranges Version ranges are a useful Conan feature, [documentation here](https://docs.conan.io/2/tutorial/versioning/version_ranges.html). With the introduction of Conan 2.0, we are currently working to allow the use of version ranges and are allowing this for a handful of dependencies. -Currently, these are: + +Version ranges are being progressively introduced by Conan team maintainers and are being rolled out in phases, and we do not intend +to do it all at once. + +Version ranges for the following dependencies will be accepted in pull requests: * OpenSSL: `[>=1.1 <4]` for libraries known to be compatible with OpenSSL 1.x and 3.x * CMake: `[>3.XX <4]`, where `3.XX` is the minimum version of CMake required by the relevant build scripts. Note that CCI recipes assume 3.15 is installed in the system, so add this version range only when a requirement for a newer version is needed. -* Libcurl: `[>=X.YY <9]`, where `X.YY` is the minimum version of Libcurl required, starting from `7.78` -* Zlib: `[>=1.2.11 <2]` expect if the recipe needs a newer lower version for specific reasons -* Libpng: `[>=1.6 <2]` expect if the recipe needs a newer lower version for specific reasons - -> **Warning**: With Conan 1.x, [version ranges](https://docs.conan.io/1/versioning/version_ranges.html) adhere to a much more strict sematic version spec, -> OpenSSL 1.1.x does not follow this so the client will not resolve to that range and will pick a 3.x version. In order to select a lower version you -> can user the defunct `--require-override openssl/1.1.1t@` from the command line, or override from the recipe with `self.requires(openssl/1.1.1t, override=True)` -> to ensure a lower version is picked. +* Libcurl: `[>=7.78 <9]` +* Zlib: `[>=1.2.11 <2]` +* Libpng: `[>=1.6 <2]` +* Expat: `[>=2.6.2 <3]` +* Libxml2: `[>=2.12.5 <3]` +* Libuv: `[>=1 <2]` +* qt5: `[~5.15]`, if your library depends on qt5, only the 5.15 minor version is allowed +* qt6: `[>=6.x <7]`, where 6.x is the lower bound of your needed qt6 version +* c-ares: `[>=1.27 <2]` +* zstd: `[~1.5]` it's equivalent to `[>=1.5 <1.6]` +* ninja: `[>=1.10.2 <2]` +* meson: `[>=1.2.3 <2]` +* pkgconf: `[>=2.2 <3]` +* xz_utils: `[>=5.4.5 <6]` Conan maintainers may introduce this for other dependencies over time. Outside of the cases outlined above, version ranges are not allowed in ConanCenter recipes. -#### Adding Version Ranges +### Adding Version Ranges -You might also see version ranges in some PR by CCI maintainers. +You might also see version ranges being added in pull requests by Conan maintainers, that +are not in the list above. These are being introduced on a case-by-case basis, and are being rolled out +in phases to ensure that they do not cause problems to users. Note that version ranges can +only be used for libraries and tools that have strong compatibility guarantees - and may not +be suitable in all cases. -These are being done on a case-by-case basis, and are being rolled out in phases to ensure -that they do not cause problems to users. Please do not open PRs that exclusively add version ranges to dependencies, -unless they are solving current conflicts, in which case we welcome them and they will be prioritized. +Please do not open PRs that exclusively add version ranges to dependencies, unless they are solving +current conflicts, in which case we welcome them and they will be prioritized. ## Handling "internal" dependencies diff --git a/docs/adding_packages/folders_and_files.md b/docs/adding_packages/folders_and_files.md index b5a51c8d60309..4e9d94ec5889a 100644 --- a/docs/adding_packages/folders_and_files.md +++ b/docs/adding_packages/folders_and_files.md @@ -10,7 +10,6 @@ to work most efficiently. * [`config.yml`](#configyml) * [The _recipe folder_](#the-_recipe-folder_) * [`conandata.yml`](#conandatayml) - * [`conanfile.py`](#conanfilepy) * [`test_package`](#test_package) ## Recipe File Structure @@ -21,8 +20,6 @@ folders at a time. This is the canonical structure of one of these folders, where the same `conanfile.py` recipe is suitable to build all the versions of the library: -> **Note**: For updating the structure during the [v2 migration](../v2_migration.md) see the [test package](test_packages.md#cmake-targets) document. - ```txt . +-- recipes @@ -32,7 +29,7 @@ This is the canonical structure of one of these folders, where the same `conanfi | +-- conanfile.py | +-- conandata.yml | +-- patches/ -| +-- add-missing-string-header-2.1.0.patch +| +-- 2.1.0-0001-add-missing-string-header-.patch | +-- test_package/ | +-- conanfile.py | +-- CMakeLists.txt @@ -83,19 +80,7 @@ This contains every needed to build packages. #### `conandata.yml` This file lists **all the sources** that are needed to build the package. The most common examples are -source code, build scripts, license files. - -The file is organized into two sections, `"sources"` and `"patches"`, each one of them contains the files that are required -for each version of the library. Resources which need to be downloaded are listed under `"source"` should include a checksum -to validate that they do not change. This helps to ensure the build is reproducible at a later point in time. Often -modifications are required for a variety of reasons, which ones are associated to which version are listed under the `"patches"`. - -```yml -sources: - "9.0.0": - url: "https://github.com/fmtlib/fmt/archive/9.0.0.tar.gz" - sha256: "9a1e0e9e843a356d65c7604e2c8bf9402b50fe294c355de0095ebd42fb9bd2c5" -``` +source code, build scripts, license files. The Conandata is officially documented in [using the conandata.yml](https://docs.conan.io/2/tutorial/creating_packages/handle_sources_in_packages.html#using-the-conandata-yml-file). For more information about picking source tarballs, adding or removing versions, or what the rules are for patches, continue reading our [Sources and Patches](sources_and_patches.md) guide. @@ -106,87 +91,29 @@ For more information about picking source tarballs, adding or removing versions, A detailed breakdown of all the fields can be found in [conandata_yml_format.md](conandata_yml_format.md). We **strongly** recommend adding the [patch fields](conandata_yml_format.md#patches-fields) to help track where patches come from and what issue they solve. -Inside the `conanfile.py` recipe, this data is available in a `self.conan_data` attribute that can be used as follows: - -```py -def source(self): - get(self, **self.conan_data["sources"][self.version], strip_root=True) -``` - -See the [Export Patches](sources_and_patches.md#exporting-patches) and [Applying Patches](sources_and_patches.md#applying-patches) -for more use cases and examples. - -#### `conanfile.py` - -This file is the recipe, it contains the logic to build the libraries from source for all the configurations. -It's the single most important part of writing a package. Every `conanfile.py` should be accompanied by at least one -[folder to test the generated packages](#test_package). - -Each recipe should derive the `ConanFile` class and implement key attributes and methods. - -* Basic attributes and conversions can be found in [`ConanFile` attributes](conanfile_attributes.md) -* Some of the key methods are outlined in this document and will link to more details - -```python -from conan import ConanFile - -class FmtConan(ConanFile): - name = "fmt" - homepage = "https://github.com/fmtlib/fmt" - # ... -``` - -When a package needs other packages those can be include with the `requirements()` method. - -```python - def requirements(self): - self.requires("fmt/9.0.0") -``` - -For more information see the [Dependencies](dependencies.md) documentation. - -For compiled libraries, the `build()` method is used along side the [build helpers](https://docs.conan.io/1/reference/build_helpers.html). -This allows you to use the official build script from a project, see [build and package](build_and_package.md) instructions. - -```python - def build(self): - cmake = CMake(self) - cmake.configure() - cmake.build() -``` - -Most of the projects with build scripts support installing the important files. Avoid installing documentation or examples. - -```python - def package(self): - cmake = CMake(self) - cmake.configure() - cmake.install() -``` - -For some projects, you will need to manually copy files. -Here's an example for a header only library: - -```python - def package(self): - copy(self, "*.h", src=os.path.join(self.source_folder, "include"), dst=os.path.join(self.package_folder, "include")) -``` +Inside the `conanfile.py` recipe, this data is available in through the [self.conan_data](https://docs.conan.io/2/reference/conanfile/attributes.html#conan-data) attribute. #### `test_package` All the packages in this repository need to be tested before they join ConanCenter. A `test_package` folder with its corresponding `conanfile.py` and a minimal project to test the package is strictly required. You can read about it in the -[Conan documentation](https://docs.conan.io/1/creating_packages/getting_started.html) and learn about ConanCenterIndex -specific conventions in [test package](test_packages.md) section. +[Conan documentation](https://docs.conan.io/2/tutorial/creating_packages/test_conan_packages.html#testing-conan-packages). + +The goal for the test package is to make sure the: -The goal for the test package is to make sure the +* Header files are available +* Libraries are available to link against +* Components are correctly exposed -* header files are available -* libraries are available to link against -* components are correctly exposed +When providing a test package, please: -> **Note** It's required to verify that the old generators are not broken. You can do so by using the pattern, see -> [KB-H073](../error_knowledge_base.md#kb-h078) for details. +* Create a minimal usage for the target project here +* Avoid upstream full examples, or code bigger than 15 lines +* Avoid networking connections +* Avoid background apps or servers +* Avoid GUI apps +* Avoid extra files like images, sounds and other binaries +* The propose is testing the generated artifacts ONLY Remember that the `test_` recipes should **test the package configuration that has just been generated** for the _host_ context, otherwise it will fail in cross-building scenarios. diff --git a/docs/adding_packages/sources_and_patches.md b/docs/adding_packages/sources_and_patches.md index 56ff5130c26e4..a57c7355f6978 100644 --- a/docs/adding_packages/sources_and_patches.md +++ b/docs/adding_packages/sources_and_patches.md @@ -14,8 +14,6 @@ These are a very important aspects and it helps us to establish the quality of t * [Adding old versions](#adding-old-versions) * [Policy about patching](#policy-about-patching) * [Format and Conventions](#format-and-conventions) - * [Exporting Patches](#exporting-patches) - * [Applying Patches](#applying-patches) * [Policy on patches](#policy-on-patches) ## Picking the Sources @@ -32,9 +30,8 @@ Where ever possible, downloading source files and compiling is mandated. Downloa Downloaded source code must have a deterministic results where the exact same archive is download each time. See [Conandata's `"sha"` fields](conandata_yml_format.md#sha256) for how this is achieved in ConanCenterIndex. -The sources stored under `self.source_folder` should not be modified. This will enable local workflows to "keep sources" and avoid extra downloads. -Any patch should be applied to the copy of this source code when a build is executed (basically in `build()` method). See [Applying Patches](#applying-patches) -below for more information. +The sources stored under `self.source_folder` should not apply patches or modifications in the `source()` method conditional to options or settings. +Patches should be applied in the `source()` method - taking special care that the patches are platform agnostic. Patches in the `build()` method can be considered where this is not possible, provided that `no_copy_source` is **not** set to `True`. ### Sources not accessible @@ -52,7 +49,9 @@ as a system recipe (`/system`) and making those binaries availabl In this repository we are building a subset of all the versions for a given library. This set of version changes over time as new versions are released and old ones stop being used. -We always welcome latest releases as soon as they are available, and from time to time we remove old versions mainly due to technical reasons: +We welcome the latest release version for its new features and improvements. However, we recommend exercising caution with fresh releases, as upstream may soon release patches or hotfixes to address any unforeseen issues. We usually wait until releases are a few days old to merge them. + +From time to time we remove old versions mainly due to technical reasons: the more versions we have, the more resources that are needed in the CI and the more time it takes to build each pull-request (also, the more chances of failing because of unexpected errors). @@ -61,18 +60,20 @@ more chances of failing because of unexpected errors). The Conan Team may ask you to remove more if they are taking a lot of resources. When removing old versions, please follow these considerations: * keep one version for every major release -* for the latest major release, at least three versions should be available (latest three minor versions) +* for the latest major release, at least two versions should be available (latest two minor versions) Logic associated with removed revisions implies that entries in the `config.yml` and `conandata.yml` files should also be removed. If anyone needs to recover them in the future, Git contains the full history and changes can be recovered from it. +Removed versions should not affect other recipes available in the repository. If a recipe depends on a removed version, it should be updated to +depend on the latest available version. + Please, note that even if those versions are removed from this repository, **the packages will always be accessible in ConanCenter remote** associated to the recipe revision used to build them. ### Adding old versions -We love to hear why in the opening description of the pull requests you need this exact version. -We usually don't add old versions unless there is a specific request for it. Adding versions that are not used by author of the pull request reduces overall resources and time from [the build services](README.md#the-build-service). +We usually don't add old versions unless there is a specific and well-motivated request for it. Adding versions that are not actively used by the author of the pull request reduces overall resources and time from [the build services](README.md#the-build-service). Take into account that the version might be removed in future pull requests according to the [guidelines above](#removing-old-versions). @@ -86,8 +87,7 @@ reading the changelog of the library, the documentation, or any statement by the Patch files are preferred over programmatic `replace_in_file` statements. This makes it easier to review and prevent unwanted side effects when new versions are added. They will be listed in [`conandata.yml`](conandata_yml_format.md) -file and exported together with the recipe. Patches must always include [patch fields](conandata_yml_format.md#patches-fields) -which are enforced by the [linters](../../linter/conandata_yaml_linter.py). +file and exported together with the recipe. Patches should include the required [patch fields](conandata_yml_format.md#patches-fields). Patches must be located in the recipe folder in a `patches/` sub-directory. @@ -100,50 +100,14 @@ There are a few recommendations about naming patches: By clearly indicating what the patch does, when it's applied, and how it relates to existing patches, you can help make the [review process](../review_process.md) easier for readers and help speed up your pull requests. -### Exporting Patches - -It's ideal to minimize the number of files in a package to exactly what's required. When recipes support multiple -versions with differing patches, it's strongly encouraged to only export the patches used for that given recipe. - -Make sure the `export_sources` attribute is replaced by -[`conan.tools.files.export_conandata_patches`](https://docs.conan.io/1/reference/conanfile/tools/files/patches.html?highlight=export_conandata_patches) -helper. - -```py -def export_sources(self): - export_conandata_patches(self) -``` - -### Applying Patches - -Patches can be applied in a separate method, the pattern name is `_patch_sources`. When applying patch files, -using [`conan.tools.files.apply_conandata_patches`](https://docs.conan.io/1/reference/conanfile/tools/files/patches.html?highlight=apply_conandata_patches) -is the best option. - -```py -def build(self): - apply_conandata_patches(self) -``` - -For more complicated cases, -[`conan.tools.files.rm`](https://docs.conan.io/1/reference/conanfile/tools/files/basic.html#conan-tools-files-rm) -or [`conan.tools.files.replace_in_file`](https://docs.conan.io/1/reference/conanfile/tools/files/basic.html#conan-tools-files-replace-in-file) -are good choices. - -```py -def _patch_sources(self): - # remove bundled libfmt - rmdir(self, os.path.join(self.source_folder, "lib", "fmt")) - replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), "${CMAKE_SOURCE_DIR}", "${CMAKE_CURRENT_SOURCE_DIR}") -``` ### Policy on patches Conan Center is a package repository, and the aim of the service is to provide the recipes to build libraries from the sources as provided by the library authors, and to provide binaries for Conan Center’s supported platforms and configurations. -In general, patches to source code should be avoided and only done as a last resort. In situations where it is strictly necessary, the aim should be that the patches could be eventually merged upstream so that in the future they are no longer necessary. +In general, patches to source code should be avoided and only done as a last resort. In situations where it is strictly necessary, the aim should be that the patches could be eventually merged upstream so that in the future they are no longer necessary. -Pull Requests that introduce patches will be carefully reviewed by the Conan Team. We recognize that in some instances, patches are necessary in the build system/build scripts. +Pull Requests that introduce patches will be carefully reviewed by the Conan Team. We recognize that in some instances, patches are necessary in the build system/build scripts. Patches that affect C and C++ code are strongly discouraged and will only be accepted at the discretion of the Conan Team, after a strict validation process. Patches are more likely to be accepted if they are first reported and acknowledged by the library authors. For scenarios that require patching source code, we greatly encourage raising a new issue explaining the need and motivation, reproducible steps and complete logs, behind the patch. Please note that for issues that strictly affect C and C++ source code, it is very unlikely that a patch will be accepted if an issue is not first raised with the original library authors, or if the patches are not addressing a known security advisory. diff --git a/docs/adding_packages/test_packages.md b/docs/adding_packages/test_packages.md deleted file mode 100644 index 220ff43cb0e59..0000000000000 --- a/docs/adding_packages/test_packages.md +++ /dev/null @@ -1,107 +0,0 @@ -# Test Packages - -This is the main way that ConanCenter is able to validate the contents of a package are valid. -It is required to provide a [`test_package/`](https://docs.conan.io/1/reference/commands/creator/create.html?highlight=test_package) -sub-directory with every recipe. These are expected to work regardless of the options or settings used as this is what consumer will encounter when doing a `conan create` -themselves. It's possible to have ConanCenter run `conan test` on more then one `test folder` by using the `test_` prefix. - - -## Contents - - * [Files and Structure](#files-and-structure) - * [CMake targets](#cmake-targets) - * [Testing more generators with `test_`](#testing-more-generators-with-test_something) - * [Testing CMake variables from FindModules](#testing-cmake-variables-from-findmodules) - * [How it works](#how-it-works) - * [Minimalist Source Code](#minimalist-source-code) - -### Files and Structure - -See the [recipe files and structures](README.md#recipe-files-structure) for a visual. - -All ConanCenterIndex recipe should have a two [test_folders](https://docs.conan.io/1/reference/commands/creator/create.html?highlight=test_folder) -One for the current CMake generator in `test_package/`. - -Please refer to the [Package Templates](../package_templates/) for the current practices about which files and what their content should be. - -### CMake targets - -When using CMake to test a package, the information should be consumed using the -[`CMakeDeps` generator](https://docs.conan.io/1/reference/conanfile/tools/cmake/cmakedeps.html?highlight=cmakedeps). - -This typically will look like a `CMakeLists.txt` which contain lines similar to - -```cmake -find_package(fmt REQUIRED CONFIG) -# ... -target_link_libraries(test_ranges PRIVATE fmt::fmt) -``` - -Refer to the [package template](https://github.com/conan-io/conan-center-index/blob/master/docs/package_templates/cmake_package/all/test_package/CMakeLists.txt) for more examples. - -In ConanCenterIndex, we try to accurately represent the names of the targets and the information provided by CMake's modules and config files that some libraries -provide. If CMake or the library itself don't enforce any target name, the default ones provided by Conan should be recommended. The minimal project -in the `test_package` folder should serve as an example of the best way to consume the package, and targets are preferred over raw variables. - -This rule applies for the _global_ target and for components ones. The following snippet should serve as example: - -We encourage contributors to check that not only the _global_ target works properly, but also the ones for the components. It can be -done creating and linking different libraries and/or executables. - -### Testing more generators with `test_` - -The CI will explore all the folders and run the tests for the ones matching `test_*/conanfile.py` pattern. You can find the output of all -of them together in the testing logs. - -Sometimes it is useful to test the package using different build systems (CMake, Autotools,...). Instead of adding complex logic to one -`test_package/conanfile.py` file, it is better to add another `test_/conanfile.py` file with a minimal example for that build system. That -way the examples will be short and easy to understand and maintain. In some other situations it could be useful to test different Conan generators -(e.g. `CMakeDeps`) using different folders and `conanfile.py` files. - -When using more than one `test_` folder, create a different project for each of them to keep the content of the `conanfile.py` and the -project files as simple as possible, without the need of extra logic to handle different scenarios. - -``` -. -+-- recipes -| +-- library_name/ -| +-- config.yml -| +-- all/ -| +-- ... -| +-- test_package/ -| +-- ... -| +-- test_cmakedeps/ -| +-- conanfile.py -| +-- CMakeLists.txt -| +-- test_package.cpp -``` - -### Testing CMake variables from FindModules - -Recipes which provide [Find Modules](https://cmake.org/cmake/help/latest/manual/cmake-modules.7.html#find-modules) are strongly encouraged to -module the file name, targets and or variables. - -**We will provide better docs in the near future**, for now here are a few references: - -- Convo: https://github.com/conan-io/conan-center-index/pull/13511 -- early example: https://github.com/conan-io/conan-center-index/tree/master/recipes/libxml2/all/test_cmake_module_package -- Best reference: https://github.com/conan-io/conan-center-index/blob/master/recipes/expat/all/test_package_module/CMakeLists.txt#L9 - -### How it works - -The [build service](README.md#the-build-service) will explore all the folders and run the tests for the ones matching `test_*/conanfile.py` pattern. -You can find the output of all of them together in the testing logs. Only the end of the logs are posted even if an earlier "test folder" may have failed. - -> **Note**: If, for any reason, it is useful to write a test that should only be checked using Conan v1, you can do so by using the pattern -> `test_v1_*/conanfile.py` for the folder. Please, have a look to [linter notes](../v2_linter.md) to know how to prevent the linter from -> checking these files. - -Remember that the `test_` recipes should **test the package configuration that has just been generated** for the _host_ context, otherwise -it will fail in cross-building scenarios; before running executables, recipes should check -[`conan.tools.build.can_run`](https://docs.conan.io/1/reference/conanfile/tools/build.html?highlight=can_run#conan-tools-build-can-run) - -### Minimalist Source Code - -The contents of `test_package.c` or `test_package.cpp` should be as minimal as possible, including a few headers at most with simple -instantiation of objects to ensure linkage and dependencies are correct. Any build system can be used to test the package, but -CMake or Meson are usually preferred. diff --git a/docs/bump_version.md b/docs/bump_version.md index 132d4ff1bf685..895576989afa9 100644 --- a/docs/bump_version.md +++ b/docs/bump_version.md @@ -44,5 +44,4 @@ In case a patch should be re-used, it should be present in `conandata.yml` to th ## Reviewing and merging -Bumping version PRs follow the same regular [review process](review_process.md), except for being merged automatically -as listed on [Labels](labels.md#bump-version) section. +Bumping version PRs follow the same regular [review process](review_process.md). \ No newline at end of file diff --git a/docs/changelog.md b/docs/changelog.md index 3d6b985571d20..6ee15d19c592c 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -1,5 +1,25 @@ # Changelog +### 04-Nov-2024 - 09:15 CET + +- [feature] Conan 1.x end of support and Conan 2.x as default version in the CI +- [feature] New CI infrastructure for Conan 2.x only + +### 12-Sep-2024 - 09:23 CEST + +- [feature] Add support for Conan 2.7.1 in the CI +- [feature] Add support for Conan 1.65.0 in the CI + +### 10-Jul-2024 - 13:22 CEST + +- [feature] Add support for Conan 2.5.0 in the CI +- [fix] Invalid configuration from tool requirement in Conan 1.x + +### 22-May-2024 - 12:04 CEST + +- [feature] Add support for Conan 2.3.1 in the CI +- [feature] Add support for Conan 1.64.1 in the CI + ### 03-April-2024 - 13:53 CEST - [feature] Add support for Conan 2.2.2 in the CI diff --git a/docs/community_resources.md b/docs/community_resources.md index 06aa0558a52f3..f2806f9377afb 100644 --- a/docs/community_resources.md +++ b/docs/community_resources.md @@ -6,8 +6,7 @@ This is a curated list of various bots and helpful tools that aim to making appr ## Contents * [Social Media and More](#social-media-and-more) - * [Bots](#bots) - * [Tools](#tools) + * [Bots](#bots) ## Social Media and More @@ -19,19 +18,6 @@ If you are looking to stay up to date with the last Conan news, follow us on Twi - [Updatable Recipes](https://github.com/qchateau/conan-center-bot): Automatically scans available recipes and checked for new upstream releases and tests one configuration - The results can be found here: https://qchateau.github.io/conan-center-bot/#/updatable -- [Conflicting Pull Requests](https://github.com/ericLemanissier/conan-center-conflicting-prs): Checks all the open pull requests for those which edit the same -recipe files and posts a message. - - The results can be found here: https://ericlemanissier.github.io/conan-center-conflicting-prs/ -- [Pending Review](https://github.com/prince-chrismc/conan-center-index-pending-review) - - The results can be found here: https://prince-chrismc.github.io/conan-center-index-pending-review/ -- [Pull Request In Progress Status](https://ericlemanissier.github.io/conan-center-pr-status/in_progress_jobs) - [System Package Checks](https://github.com/bincrafters/system-packages-checks): Builds automatically all `system` versions of recipes merged on CCI and being pull requested on a selection of Linux distributions and FreeBSD - The results can be found here: https://bincrafters.github.io/system-packages-checks/ - -## Tools - -- [FreeBSD Testing](https://github.com/ericLemanissier/conan-center-index/tree/freebsd): Detects pull requests with `FreeBSD` in the description and runs a test for -one configuration on that platform - - The results can be found here: https://github.com/ericLemanissier/conan-center-index/actions?query=workflow%3ACI -- [Bincrafters Conventions](https://github.com/bincrafters/bincrafters-conventions): Automatically updates Conan recipes to the latest conventions and rules diff --git a/docs/consuming_recipes.md b/docs/consuming_recipes.md index a777e97d08e79..b898282302020 100644 --- a/docs/consuming_recipes.md +++ b/docs/consuming_recipes.md @@ -29,8 +29,8 @@ There can be several causes if a recipe (a new revision) might stopped to work i New recipe revisions can take into account changes that are introduced in new Conan client version, sometimes these changes modify some experimental behavior without modifying recipe syntax. -This use case is covered by the [`required_conan_version`](https://docs.conan.io/1/reference/conanfile/other.html?highlight=required_conan_version#requiring-a-conan-version-for-the-recipe) feature. It will -substitute the syntax error by one nicer error provided by Conan client. +This use case is covered by the [`required_conan_version`](https://docs.conan.io/2/reference/conanfile/attributes.html#required-conan-version) feature. +It will substitute the syntax error by one nicer error provided by Conan client. To be sure that people using these new experimental features are using the required Conan version and testing the actual behavior of those features (feedback about them is very important to Conan). @@ -43,23 +43,19 @@ Conan is very flexible; you can add your own remote or modify your client’s co Here are a few choices: -- [Running your own Conan Server](https://docs.conan.io/1/uploading_packages/running_your_server.html) - great for local ad-hoc setups -- [Cache recipes in your own ArtifactoryCE](https://docs.conan.io/1/uploading_packages/using_artifactory.html) - recommended for production environments +- [Cache recipes in your own ArtifactoryCE](https://docs.conan.io/2/devops/devops_local_recipes_index.html) - recommended for production environments Using your own ArtifactoryCE instance is easy. You can [deploy it on-premise](https://conan.io/downloads.html) or use a -[cloud provided solution](https://jfrog.com/community/start-free) for **free**. Your project should -[use only this remote](https://docs.conan.io/1/reference/commands/misc/remote.html?highlight=add%20new) and new recipe +[cloud provided solution](https://jfrog.com/start-free) for **trial**. +Your project should [use only this remote](https://docs.conan.io/2/reference/commands/remote.html#conan-remote-add) and new recipe revisions are only pushed to your Artifactory after they have been validated in your project. -The minimum solution, if still choosing to rely on ConanCenter directly, involves small changes to your client configuration by pinning the revision of every reference you consume in your project using using: +The minimum solution, if still choosing to rely on ConanCenter directly, involves small changes to your client configuration by pinning the revision of every reference you consume in your project using the following: -- [recipe revision (RREV)](https://docs.conan.io/1/versioning/revisions.html) can be added to each requirement. +- [recipe revision (RREV)](https://docs.conan.io/2/tutorial/versioning/revisions.html#using-revisions) can be added to each requirement. Instead of `fmt/9.1.0` you can add a pound (or hashtag) to the end followed by the revision `fmt/9.1.0#c93359fba9fd21359d8db6f875d8a233`. - This feature needs to be enabled in Conan 1.x, see the [Activation Instructions](https://docs.conan.io/1/versioning/revisions.html#how-to-activate-the-revisions) for details. -- [Lockfiles](https://docs.conan.io/1/versioning/lockfiles.html) can be created with the `conan lock create` and read with by - adding `--lockfile=conan.lock` to `conan install` or `conan create` commands. See the [lockfile introduction](https://docs.conan.io/1/versioning/lockfiles/introduction.html#) for more information. - -> **Warning** Please, be aware there are some known bugs related to lockfiles that are not being fixed in Conan v1.x - we are really excited for the 2.0 improvements to be widely used. +- [Lockfiles](https://docs.conan.io/2/tutorial/versioning/lockfiles.html) can be created with the `conan lock create` and read with by + adding `--lockfile=conan.lock` to `conan install` or `conan create` commands. See the [lockfile introduction](https://docs.conan.io/2/tutorial/consuming_packages/intro_to_versioning.html#lockfiles) for more information. Both of these give you better control and will allow you to choose when to upgrade your Conan client. diff --git a/docs/developing_recipes_locally.md b/docs/developing_recipes_locally.md index 2d101facc3b5e..3a028a8c6ff61 100644 --- a/docs/developing_recipes_locally.md +++ b/docs/developing_recipes_locally.md @@ -4,15 +4,11 @@ Before you can contribute any code changes, you'll need to make sure you are fam This file is intended to provide all the commands you need to run in order to be an expert ConanCenterIndex contributor. -> **Note**: If you are working with Conan 2.0, the [instructions are below](#using-conan-20) - ## Contents * [Clone your fork](#clone-your-fork) * [Setup your environment](#setup-your-environment) - * [Installing the ConanCenter Hooks](#installing-the-conancenter-hooks) - * [Updating conan hooks on your machine](#updating-conan-hooks-on-your-machine) * [Basic Commands](#basic-commands) * [Try it yourself](#try-it-yourself) * [Debugging Failed Builds](#debugging-failed-builds) @@ -22,10 +18,7 @@ This file is intended to provide all the commands you need to run in order to be * [Yamlschema](#yamlschema) * [Testing the different `test__package`](#testing-the-different-test__package) * [Testing more environments](#testing-more-environments) - * [Docker build images used by ConanCenterIndex](#docker-build-images-used-by-conancenterindex) - * [Using Conan 2.0](#using-conan-20) - * [Installing Conan 2.0 beta](#installing-conan-20-beta) - * [Trying it out](#trying-it-out) + * [Docker build images used by ConanCenterIndex](#docker-build-images-used-by-conancenterindex) ## Clone your fork @@ -35,53 +28,21 @@ This file is intended to provide all the commands you need to run in order to be ## Setup your environment 1. Install a C++ development toolchain - ConanCenter's [build images](#testing-more-environments) are available -2. [Install the Conan client](https://docs.conan.io/1/installation.html) - make sure to keep it up to date! +2. [Install the Conan client](https://docs.conan.io/2/installation.html) - make sure to keep it up to date! 3. Install CMake - this is the only tool which is assumed to be present [see FAQ](faqs.md#why-recipes-that-use-build-tools-like-cmake-that-have-packages-in-conan-center-do-not-use-it-as-a-build-require-by-default) for details. > **Note**: It's recommended to use a dedicated Python virtualenv when installing with `pip`. -### Installing the ConanCenter Hooks - -> **Warning**: This is not yet supported with Conan 2.0. Please, follow the instructions below only in case you are using Conan 1.0. - -The system will use the [conan-center hooks](https://github.com/conan-io/hooks) to perform some quality checks. You can install the hooks by running: - -```sh -conan config install https://github.com/conan-io/hooks.git -sf hooks -tf hooks -conan config set hooks.conan-center -``` - -> **Note**: Hooks are generally for package correctness and the pylinters are for the recipe syntax - -The hooks will show error messages but the `conan create` won’t fail unless you export the environment variable `CONAN_HOOK_ERROR_LEVEL=40`. -All hooks checks will print a similar message: - -```txt -[HOOK - conan-center.py] post_source(): [LIBCXX MANAGEMENT (KB-H011)] OK -[HOOK - conan-center.py] post_package(): ERROR: [PACKAGE LICENSE] No package licenses found -``` - -#### Updating conan hooks on your machine - -The hooks are updated from time to time, so it's worth keeping your own copy of the hooks updated regularly. To do this, simply run: - -```sh -conan config install -``` - ## Basic Commands We recommend working from the `recipes/project` folder itself. You can learn about the [recipe file structure](adding_packages/README.md#recipe-files-structure) to understand the folder and files located there. > **Note**: You can only change one recipe per pull request, and working from the [_recipe folder_](adding_packages/README.md#the-recipe-folder-conanfilepy) will help prevent making a few mistakes. The default for this folder is `all`, follow the link above to learn more. -The [entire workflow of a recipe](https://docs.conan.io/1/developing_packages/package_dev_flow.html) can be execute with the [`conan create`](https://docs.conan.io/1/reference/commands/creator/create.html). This should look like: - -* `conan create all/conanfile.py 0.0.0@ -pr:b=default -pr:h=default` +The [entire workflow of a recipe](https://docs.conan.io/2/tutorial/creating_packages.html) can be executed with the [`conan create`](https://docs.conan.io/2/reference/commands/create.html). This should look like: -ConanCenter also has a few [support settings and options](supported_platforms_and_configurations.md) which highly recommend to test. For example -`conan create all/conanfile.py 0.0.0@ -o project:shared=True -s build_type=Debug` is a easy way to test more configurations ensuring the package is correct. +* `conan create all/conanfile.py --version=0.1.0` ### Try it yourself @@ -89,110 +50,29 @@ For instance you can create packages for `fmt` in various supported configuratio ```sh cd recipes/fmt -conan create all/conanfile.py fmt/9.0.0@ -pr:b=default -pr:h=default -conan create all/conanfile.py fmt/9.0.0@ -o fmt:header_only=True -pr:b=default -pr:h=default -conan create all/conanfile.py fmt/9.0.0@ -s build_type=Debug -o fmt:shared=True -pr:b=default -pr:h=default +conan create all/conanfile.py --version=9.0.0 +conan create all/conanfile.py --version=9.0.0 -o "&:header_only=True" +conan create all/conanfile.py --version=9.0.0 -s build_type=Debug -o "*/*:shared=True" ``` ## Debugging Failed Builds -Some common errors related to Conan can be found on [troubleshooting](https://docs.conan.io/1/faq/troubleshooting.html) section. -For ConanCenter Hook errors, go to the [Error Knowledge Base](error_knowledge_base.md) page to know more about those. +Some common errors related to Conan can be found on [troubleshooting](https://docs.conan.io/2/knowledge/faq.html#troubleshooting) section. -To test with the same environment, the [build images](supported_platforms_and_configurations.md#build-images) are available. Instructions for using these images can be found in [Testing more environments](#testing-more-environments) section. In ConanCenterIndex, the most common failure point is upstream build scripts tailored to their specific use cases. It's not uncommon to [patch build scripts](adding_packages/sources_and_patches.md#rules) but make sure to read the -[patch policy](adding_packages/sources_and_patches.md#policy-about-patching). You are encouraged to submit pull requests upstream. - -## Running the Python Linters - -> **Warning**: This is not yet supported with Conan 2.0 - -Linters are always executed by GitHub Actions to validate parts of your recipe, for instance, if it uses migrated Conan tools imports. - -It is possible to run the linter locally the same way it is being run [using Github actions](../.github/workflows/linter-conan-v2.yml) by: - -* (Recommended) Use a dedicated Python virtualenv. -* Ensure you have required tools installed: `conan` and `pylint` (better to uses fixed versions) - - ```sh - pip install conan~=1.0 pylint==2.14 - ``` - -* Set environment variable `PYTHONPATH` to the root of the repository - - ```sh - export PYTHONPATH=your/path/conan-center-index - ``` - -* Now you just need to execute the `pylint` commands: - - ```sh - # Lint a recipe: - pylint --rcfile=linter/pylintrc_recipe recipes/fmt/all/conanfile.py - - # Lint the test_package - pylint --rcfile=linter/pylintrc_testpackage recipes/fmt/all/test_package/conanfile.py - ``` - -## Running the YAML Linters - -There's two levels of YAML validation, first is syntax and the second is schema. -The style rules are located in [`linter/yamllint_rules.yml`](../linter/yamllint_rules.yml) and are used to ensure consistence. -The [`config.yml`](adding_packages/README.md#configyml) is required for the build infrastructure and the -[`conandata.yml` patch fields](adding_packages/conandata_yml_format.md#patches-fields) have required elements that are enforced with -schema validation. There's are to encourage the best possible quality of recipes and make reviewing faster. - -### Yamllint - -* (Recommended) Use a dedicated Python virtualenv. -* Ensure you have required tools installed: `yamllint` (better to uses fixed versions) - - ```sh - pip install yamllint==1.28 - ``` - -* Now you just need to execute the `yamllint` commands: - - ```sh - # Lint a recipe: - yamllint --config-file linter/yamllint_rules.yml -f standard recipes/config.yml - yamllint --config-file linter/yamllint_rules.yml -f standard recipes/fmt/all/conandata.yml - ``` - -### Yamlschema - -* (Recommended) Use a dedicated Python virtualenv. -* Ensure you have required tools installed: `strictyaml` and `argparse` (better to uses fixed versions) - - ```sh - pip install strictyaml==1.16 argparse==1.4 - ``` - -* Now you just need to execute the validation scripts: +[patch policy](adding_packages/sources_and_patches.md#policy-about-patching). You are encouraged first to submit pull requests upstream. - ```sh - # Lint a config.yml: - python3 linter/config_yaml_linter.py recipes/fmt/config.yml - # Lint a conandata.yml - python3 linter/conandata_yaml_linter.py recipes/fmt/all/conandata.yml - ``` - -## Testing the different `test_*_package` +## Testing This can be selected when calling `conan create` or separately with `conan test` -```sh -# By adding the `-tf` argument -conan create recipes/fmt/all/conanfile.py 9.0.0@ -tf test_v1_package/ -pr:b=default -pr:h=default -``` - ```sh # Passing test package's conanfile directly (make sure to export first) -conan test recipes/fmt/all/test_v1_package/conanfile.py fmt/9.0.0@ -pr:h=default -pr:b=default +conan test recipes/fmt/all/test_package/conanfile.py fmt/9.0.0 ``` ## Testing more environments @@ -207,96 +87,12 @@ Assuming you've already tested it locally and it's been successfully exported to * You can also download them from CCI build summary 2. Build missing packages -Example. - -```sh -docker run -v/Users/barbarian/.conan:/home/conan/.conan conanio/gcc8 bash -c "conan profile new --detect gcc8" -docker run -v/Users/barbarian/.conan:/home/conan/.conan conanio/gcc8 bash -c "conan install -pr gcc8 fmt/9.0.0@ --build missing" -``` +Please, read [how to create Conan package using a Docker runner](https://docs.conan.io/2/examples/runners/docker/basic.html). > **Note**: If you are running on Mac M1, the follow Docker argument is required: `--platform=linux/amd64` If you are working with packages that have system dependencies that are managed by Conan -```sh -docker run -e CONAN_SYSREQUIRES_MODE=enabled conanio/gcc11-ubuntu16.04 conan install fmt/9.0.0@ -if build --build missing -c tools.system.package_manager:mode=install -c tools.system.package_manager:sudo=yes -``` - #### Docker build images used by ConanCenterIndex -The Conan Center Index uses [Conan Docker Tools](https://github.com/conan-io/conan-docker-tools/) to build packages in a variety of environments. All images are hosted in [Docker Hub](https://hub.docker.com/u/conanio). The relation of the images with the build configurations is available according to the Conan configuration, as `node_labels.Linux`, for instance: - - -```yaml -node_labels: - Linux: - x86_64: - "gcc": - default: "linux_gcc_${compiler.version}" - "11": "linux_gcc_${compiler.version}_ubuntu16.04" - "clang": - default: "linux_clang_${compiler.version}_ubuntu16.04" - "11": "linux_clang_${compiler.version}" -``` - -The configuration files are located in the folder [../.c3i](../.c3i). Currently are the files [config_v1.yml](../.c3i/config_v1.yml) and [config_v2.yml](../.c3i/config_v2.yml). The configuration file `config_v1.yml` is used by the Conan 1.0 client, while `config_v2.yml` is used by the Conan 2.0 client. - -The label `linux` refers to any Docker image, while `gcc_${compiler.version}` refers to GCC + a compiler version. For example, `linux_gcc_10` refers to the image `conanio/gcc10`. -The suffix `_ubuntu16.04` refers to the base image used by the Docker image, in this case, `ubuntu16.04`. So, `"11": "linux_gcc_${compiler.version}_ubuntu16.04"` means that the image `conanio/gcc11-ubuntu16.04`. Thus, all GCC versions use `conanio/gcc`, except for the GCC 11, which uses `conanio/gcc11-ubuntu16.04`. The same applies to Clang. - - -## Using Conan 2.0 - -Everything you need to know about the methods, commands line, outputs can be found in the -[Conan 2.0 Migrations](https://docs.conan.io/1/conan_v2.html) docs. - -This should be non-intrusive. Conan 2.0 by default has a different `CONAN_USER_HOME` location, which means that it has separate caches, profiles, and settings. -This will leave your Conan 1.0 setup completely intact when using Conan 2.0. - -> **Note**: There are substantial changes to the CLI so very few of the commands will remain the same. -> The new [Unified Command Pattern](https://docs.conan.io/1/migrating_to_2.0/commands.html#unified-patterns-in-command-arguments), -> as an example, changes how settings and options are passed. - -### Installing Conan 2.0 beta - -Simply install Conan 2.0 with `pip install conan --upgrade --pre`. - -You can confirm the installation with: - -```sh -$ conan --version -Conan version 2.0.0-beta3 -$ conan config home -Current Conan home: /Users/barbarian/.conan2 -``` - -> **Note**: You will most likely see -> -> ```sh -> Initialized file: '/Users/barbarian/.conan2/settings.yml' -> Initialized file: '/Users/barbarian/.conan2/extensions/plugins/compatibility/compatibility.py' -> Initialized file: '/Users/barbarian/.conan2/extensions/plugins/compatibility/app_compat.py' -> Initialized file: '/Users/barbarian/.conan2/extensions/plugins/compatibility/cppstd_compat.py' -> Initialized file: '/Users/barbarian/.conan2/extensions/plugins/profile.py' -> ``` -> -> When running the client for the first time. - -You will need to setup profiles. This is one of the changes in 2.0. The default profile is now opt-in and no longer generated automatically. - -```sh -conan profile detect -``` - -> **Warning**: This is a best guess, you need to make sure it's correct. - -### Trying it out - -Try building an existing recipe. We'll repeat the 1.x example with `fmt` to build the same configurations: - -```sh -cd recipes/fmt -conan create all/conanfile.py --version 9.0.0 -conan create all/conanfile.py --version 9.0.0 -o fmt/9.0.0:header_only=True -conan create all/conanfile.py --version 9.0.0 -s build_type=Debug -o fmt/9.0.0:shared=True -``` +The Conan Center Index uses [Conan Docker Tools](https://github.com/conan-io/conan-docker-tools/) to build packages in a variety of environments. All images are hosted in [Docker Hub](https://hub.docker.com/u/conanio). \ No newline at end of file diff --git a/docs/error_knowledge_base.md b/docs/error_knowledge_base.md deleted file mode 100644 index 415d9fd2e98fc..0000000000000 --- a/docs/error_knowledge_base.md +++ /dev/null @@ -1,499 +0,0 @@ -# Errors from the conan-center hook (KB-Hxxx) - -These are located at [conan-io/hooks](https://github.com/conan-io/hooks/blob/master/hooks/conan-center.py). - -#### **#KB-H001: "DEPRECATED GLOBAL CPPSTD"** - -`Conan > 1.15` deprecated the usage of the global ``cppstd`` setting in favor of ``compiler.cppstd`` to [manage C++ standard](https://docs.conan.io/1/howtos/manage_cpp_standard.html). As a subsetting of the compiler, it shouldn't be declared in the `conanfile.py`. - -#### **#KB-H002: "REFERENCE LOWERCASE"** - -The package names in conan-center have to be [lowercase](https://github.com/conan-io/tribe/blob/main/design/017-lowercase-references.md). e.g: ``zlib/1.2.8``. - -#### **#KB-H003: "RECIPE METADATA"** - -The recipe has to declare the following attributes: - -- [url](https://docs.conan.io/1/reference/conanfile/attributes.html#url) -- [license](https://docs.conan.io/1/reference/conanfile/attributes.html#license) -- [description](https://docs.conan.io/1/reference/conanfile/attributes.html#description) -- [homepage](https://docs.conan.io/1/reference/conanfile/attributes.html#homepage). - -Also we recommend adding [topics](https://docs.conan.io/1/reference/conanfile/attributes.html#topics) attribute. - -#### **#KB-H005: "HEADER_ONLY, NO COPY SOURCE"** - -If the recipe calls [self.info.header_only()](https://docs.conan.io/1/howtos/header_only.html) in the [package_id()](https://docs.conan.io/1/reference/conanfile/methods.html#package-id) method and doesn't declare settings, it should use the [no_copy_source](https://docs.conan.io/1/reference/conanfile/attributes.html#no-copy-source) attribute to avoid unnecessary copies of the source code. - -#### **#KB-H006: "FPIC OPTION"** - -The recipe is not for a header-only library and should have an `fPIC` option: - -```python -class SomeRecipe(ConanFile): - ... - - options = {"fPIC": [True, False]} - default_options = {"fPIC": True} -``` - -#### **#KB-H007: "FPIC MANAGEMENT"** - -The recipe declares `fPIC` but doesn't remove the option for Windows (where it doesn't make sense). - -```python -class SomeRecipe(ConanFile): - ... - - def config_options(self): - if self.settings.os == "Windows": - del self.options.fPIC -``` - -Or, a package is built as `shared` library and `fPIC` is declared. The option `fPIC` should be removed: - -```python -class SomeRecipe(ConanFile): - ... - - def configure(self): - if self.options.shared: - del self.options.fPIC -``` - -Here we use [configure()](https://docs.conan.io/1/reference/conanfile/methods.html#configure-config-options) method, because user options are loaded after [config_options()](https://docs.conan.io/1/reference/conanfile/methods.html#configure-config-options) only. - -#### **#KB-H008: "VERSION RANGES"** - -See [Dependencies Version Ranges](adding_packages/dependencies.md#version-ranges) for details. - -#### **#KB-H009: "RECIPE FOLDER SIZE"** - -The recipe folder (including the `test_package` folder) cannot exceed 256KB. - -#### **#KB-H010: "IMMUTABLE SOURCES"** - -Create a file [conandata.yml](https://docs.conan.io/1/reference/config_files/conandata.yml.html) in the recipe folder containing the source code origins: - -**_recipes/lib/1.2.0/conandata.yml_**: - -```yaml -sources: - 1.2.0: - url: "http://downloads.sourceforge.net/project/mylib/1.2.0/sources.tar.gz" - sha256: "36658cb768a54c1d4dec43c3116c27ed893e88b02ecfcb44f2166f9c0b7f2a0d" -``` - -Then in the recipe, you can access the data to download the URL and validate the checksum doing: - -```python -class SomeRecipe(ConanFile): - ... - - def source(self): - tools.get(**self.conan_data["sources"][self.version]) -``` - -#### **#KB-H011: "LIBCXX MANAGEMENT"** - -If the library is detected as a pure C library (sources doesn't conatain any file with the following extensions: ["cc", "cpp", "cxx", "c++m", "cppm", "cxxm", "h++", "hh", "hxx", "hpp"]) then it has to remove the [compiler.libcxx](https://docs.conan.io/1/reference/config_files/settings.yml.html#c-standard-libraries-aka-compiler-libcxx) subsetting, because the cpp standard library shouldn't affect the binary ID: - -```python -class SomeRecipe(ConanFile): - ... - - def configure(self): - del self.settings.compiler.libcxx -``` - -#### **#KB-H012: "PACKAGE LICENSE"** - -The binary packages should contain a folder named `licenses` containing the contents (library, tool, etc) license/s. - -#### **#KB-H013: "DEFAULT PACKAGE LAYOUT"** - -The binary packages generally do not need any other files or folder except the following: `["lib", "bin", "include", "res", "licenses"]`. -This closely matches the default [`cpp_info`](https://docs.conan.io/1/reference/conanfile/methods.html#package-info) from the client. -The upstream package layout should be followed as much as possible, if a folder is not in the list (like `"share"`) then an exception -can very easily be added by adding it to [this list of exceptions](https://github.com/conan-io/hooks/blob/d587cfebbf2b31c16e477b79c0c2fd4501f60fc8/hooks/conan-center.py#L1089-L1090). - -> **Note**: We are in the process of evaluating this rule, looking at calculating the size impact for problematic packages - -#### **#KB-H014: "MATCHING CONFIGURATION"** - -The binary package contains some file that not corresponds to the configuration of the package, for example, binary libraries for a header-only library, a DLL file when the `settings.os != Windows` and so on. The error message will contain information about the offending file. - -#### **#KB-H015: "SHARED ARTIFACTS"** - -The binary package is shared (self.options.shared == True) but there is no `dll`, `so` or `dylib` files inside the package. - -#### **#KB-H016: "CMAKE-MODULES-CONFIG-FILES"** - -The binary package cannot contain module or config CMake files ("Find\*.cmake", "\*Config.cmake", "\*-config.cmake"). -The package shouldn't contain specific build-system files to inform to the consumers how to link with it. -In order to make sure that the package will be consumed with any build-system, conan-center repository encourages to declare a [def package_info(self)](https://docs.conan.io/1/reference/conanfile/methods.html#package-info) method with all the needed information about the package. - -The consumers of the package will be able to consume the packages using a specific [generators](https://docs.conan.io/1/using_packages/conanfile_txt.html#generators) for the build system they use. - -See also: [Why are CMake find/config files and pkg-config files not packaged?](faqs.md#why-are-cmake-findconfig-files-and-pkg-config-files-not-packaged). - -#### **#KB-H017: "PDB FILES NOT ALLOWED"** - -Because of the big size of the [PDB](https://github.com/Microsoft/microsoft-pdb) files (Program Databse, a debug information format) and the issues using them changing the original folders, the PDB files are not allowed to be packaged. - -See also: [Why PDB files are not allowed?](faqs.md#why-pdb-files-are-not-allowed). - -#### **#KB-H018: "LIBTOOL FILES PRESENCE"** - -Packaging [libtool files](https://www.linuxfromscratch.org/blfs/view/svn/introduction/la-files.html) (\*.la) instead of library files (\*.a) is not allowed. - -#### **#KB-H019: "CMAKE FILE NOT IN BUILD FOLDERS"** - -Some file with `*.cmake` extension has been found in a folder not declared in [cpp_info.builddirs](https://docs.conan.io/1/reference/conanfile/attributes.html#cpp-info). -It is only allowed to put build files in `builddirs` because the generators might be able to include them when needed, but only if they are located in well known paths. - -#### **#KB-H020: "PC-FILES"** - -For the same reasons explained at [KB-H016](#KB-H016) it is not allowed to package `*.pc` files. - -See also: [Why are CMake find/config files and pkg-config files not packaged?](faqs.md#why-are-cmake-findconfig-files-and-pkg-config-files-not-packaged). - -#### **#KB-H021: "MS RUNTIME FILES"** - -For the legal reasons, and in order to reduce the size of packages, it's not allowed to package Microsoft Visual Studio runtime libraries, such as `msvcr80.dll`, `msvcp80.dll`, `vcruntime140.dll` and so on. - -#### **#KB-H022: "CPPSTD MANAGEMENT"** - -If the library is detected as a pure C library (sources doesn't conatain any file with the following extensions: ["cc", "cpp", "cxx", "c++m", "cppm", "cxxm", "h++", "hh", "hxx", "hpp"]) then it has to remove the [compiler.cppstd](https://docs.conan.io/1/howtos/manage_cpp_standard.html) subsetting, because the cpp standard library shouldn't affect the binary ID: - -```python -class SomeRecipe(ConanFile): - ... - - def configure(self): - del self.settings.compiler.cppstd -``` - -#### **#KB-H023: "EXPORT LICENSE"** - -A recipe should not export any license file, as all recipes are under the same license type (in the root of this repo). - -```python -class SomeRecipe(ConanFile): - ... - - exports = "LICENSE.md" # not allowed -``` - -There is a complete explanation in the [FAQ](faqs.md#should-recipes-export-a-recipes-license). - -#### **#KB-H024: "TEST PACKAGE FOLDER"** - -The [test_package](https://docs.conan.io/1/creating_packages/getting_started.html) folder is required for every recipe in Conan Center Index. - -``` -. conanfile.py -. test_package - |- conanfile.py -``` - -#### **#KB-H025: "META LINES"** - -The following metadata lines (and similiar) are not allowed in recipes: - -- [Shebang](https://en.wikipedia.org/wiki/Shebang_(Unix)) to specify Python version: - -```python -#!/usr/bin/env python # not allowed -#!/usr/local/bin/python # not allowed - -class SomeRecipe(ConanFile): - ... -``` - -- [Vim](https://www.vim.org/) configuration: - -```python -# vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4 # not allowed - -class SomeRecipe(ConanFile): - ... -``` - -- [Encoding](https://www.python.org/dev/peps/pep-0263/): - -```python -# -*- coding: utf-8 -*- # not allowed -# coding=utf-16 # not allowed - -class SomeRecipe(ConanFile): - ... -``` - -#### **#KB-H027: "CONAN CENTER INDEX URL"** - -The attribute [url](https://docs.conan.io/1/reference/conanfile/attributes.html#url) should point to the address where the recipe is located. -The current Conan Center Index address is - -#### **#KB-H028: "CMAKE MINIMUM VERSION"** - -All CMake files added to recipe package should contain a [minimal version](https://cmake.org/cmake/help/latest/command/cmake_minimum_required.html) (Not necessarily 2.8.11, it can be any version) available in the file: - -```cmake -# CMakeLists.txt -cmake_minimum_required(VERSION 2.8.11) -project(conanwrapper) - -... -``` - -#### **#KB-H029: "TEST PACKAGE - RUN ENVIRONMENT"** - -The [RunEnvironment()](https://docs.conan.io/1/reference/build_helpers/run_environment.html#runenvironment) build helper is no longer needed in the `test_package/conanfile.py`. It has been integrated by [run_environment](https://docs.conan.io/1/devtools/running_packages.html#running-from-packages) parameter. - -```python -# test_package/conanfile.py -class TestConan(ConanFile): - settings = "os", "compiler", "build_type", "arch" - - def test(self): - self.run("bin/test", run_environment=True) -``` - -#### **#KB-H030: "CONANDATA.YML FORMAT"** - -The structure of the [conandata.yml](https://docs.conan.io/1/reference/config_files/conandata.yml.html) file should follow the schema -defined in [Adding Packages - `Conandata.yml` Format](adding_packages/conandata_yml_format.md). - -#### **#KB-H031: "CONANDATA.YML REDUCE"** - -This [hook](https://docs.conan.io/1/extending/hooks.html) re-creates the information of the [conandata.yml](https://docs.conan.io/1/reference/config_files/conandata.yml.html) file, discarding the fields not relevant to the version of the package exported. This avoids creating new recipe revisions for every new change introduced in the file. -Any additional field in the YAML file will raise an error. - -#### **#KB-H032: "SYSTEM REQUIREMENTS"** - -[System requirements](https://docs.conan.io/1/reference/conanfile/methods.html#systempackagetool) can be used as an option when a Conan package is not available ,the same package can be installed by system package manager. However, it can cause reproducibility problems, since the package may vary according the distribution or OS. Conan is not able to track its metadata, so that, installing system packages by recipe is not allowed. - -See also: [Can I install packages from the system package manager?](faqs.md#can-i-install-packages-from-the-system-package-manager). - -#### **#KB-H034: "TEST PACKAGE - NO IMPORTS()"** - -The method [imports](https://docs.conan.io/1/reference/conanfile/methods.html#imports) helps the test package stage copying all dynamic libraries and special resources. However, the [run_environment](https://docs.conan.io/1/reference/conanfile/other.html#running-commands) parameter, used when running commands, is able to solve all paths to the dynamic libraries installed in your cache. - -#### **#KB-H037: "NO AUTHOR"** - -Since the entire community is maintaining all CCI recipes, putting just one name in a recipe is unfair, putting all names is unmanageable. All authors can be found in the Git logs. - -#### **#KB-H040: "NO TARGET NAME"** - -According the Conan issue [#6269](https://github.com/conan-io/conan/issues/6269), the attribute `cpp_info.name` should be avoided for Conan Center Index in favor of `cpp_info.names["cmake_find_package"]` and `cpp_info.names["cmake_find_package_multi"]`. - -See also: [Migrating legacy cpp_info attributes to set_property()](https://docs.conan.io/1/migrating_to_2.0/properties.html). - -#### **#KB-H041: "NO FINAL ENDLINE"** - -Source files should end with a final endline. -This avoids potential warnings/errors like `no new line at the end of file`. - -#### **#KB-H044: "NO REQUIRES.ADD()"** - -Both `self.requires.add()` and `self.build_requires.add()` have been deprecated in favor of [self.requires()](https://docs.conan.io/1/reference/conanfile/methods.html#requirements) and [self.build_requires()](https://docs.conan.io/1/reference/conanfile/methods.html#build-requirements) which were introduced on Conan 1.x. Both `add()` were introduced during Conan 0.x and since Conan 1.23 they no longer follow the original behavior. - -#### **#KB-H045: "DELETE OPTIONS"** - -The method `self.options.remove()` was introduced in Conan 0.x, however, Conan 1.x brings a more pythonic way for removing options from your recipe: `del self.options.` - -See also: [configure(), config_options()](https://docs.conan.io/1/reference/conanfile/methods.html#configure-config-options). - -#### **#KB-H046: "CMAKE VERBOSE MAKEFILE"** - -The CMake definition [CMAKE_VERBOSE_MAKEFILE](https://cmake.org/cmake/help/latest/variable/CMAKE_VERBOSE_MAKEFILE.html) helps for debugging when developing, however, for regular CI build, it increases the log size and it's only required when problems occur and need to be verified. - -#### **#KB-H048: "CMAKE VERSION REQUIRED"** - -> **Warning**: This is a legacy Conan 1.x details from the deprecated generators - -The file test_package/CMakeLists.txt should require CMake 3.15 by default: [cmake_minimum_required(VERSION 3.15)](https://cmake.org/cmake/help/latest/command/cmake_minimum_required.html). The CMake wrapper file can require CMake 2.8, because Conan recipe and the test package are totally separated. However, if [CMAKE_CXX_STANDARD](https://cmake.org/cmake/help/latest/variable/CMAKE_CXX_STANDARD.html) or [CXX_STANDARD](https://cmake.org/cmake/help/latest/prop_tgt/CXX_STANDARD.html#prop_tgt:CXX_STANDARD) is explicit, CMake 3.1 is mandatory. - -#### **#KB-H049: "CMAKE WINDOWS EXPORT ALL SYMBOLS"** - -The CMakeLists.txt definitions [CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS](https://cmake.org/cmake/help/v3.4/variable/CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS.html) and [WINDOWS_EXPORT_ALL_SYMBOLS](https://cmake.org/cmake/help/v3.4/prop_tgt/WINDOWS_EXPORT_ALL_SYMBOLS.html) are available since CMake 3.4 only. Any previous version will ignore it. - -#### **#KB-H050: "DEFAULT SHARED OPTION VALUE"** - -By default, all packages should be built as static library (the option ``shared`` is ``False`` in ``default_options``). However, some projects can be restricted to shared library only, for those cases, open a new [issue](https://github.com/conan-io/hooks/issues) to include the package name in the allowlist. - -#### **#KB-H051: "DEFAULT OPTIONS AS DICTIONARY"** - -The attribue [default_options](https://docs.conan.io/1/reference/conanfile/attributes.html#default-options) should be a dictionary, for example `default_options = {'shared': False, 'fPIC': True}`. - -#### **#KB-H052: "CONFIG.YML HAS NEW VERSION"** - -It's important to have new library version defined in both [config.yml](adding_packages/folders_and_files.md#configyml) and -[conandata.yml](adding_packages/folders_and_files.md#conandatayml), otherwise newly added version will not be checked and built -by CI and will not be available for download. - -#### **#KB-H053: "PRIVATE IMPORTS"** - -The recipe imports private Conan API, this is strongly discouraged - private imports are subjects to breaking changes. Avoid usage of private APIs, -request to publicly expose needed methods, if necessary. - -#### **#KB-H054: "LIBRARY DOES NOT EXIST"** - -Libraries which are listed on [Components](https://docs.conan.io/1/creating_packages/package_information.html#package-information-components) must be present in [libdirs](https://docs.conan.io/1/reference/conanfile/attributes.html#cpp-info). Check if the library name is correct, or if a library is only generated for a specific platform. - -#### **#KB-H055: "SINGLE REQUIRES"** - -Do not use [requirements()](https://docs.conan.io/1/reference/conanfile/methods.html#requirements) method and [self.requires](https://docs.conan.io/1/reference/conanfile/attributes.html#requires) attribute together in the same recipe. -The duality creates a heterogeneous way of solving dependencies, making it difficult to review and susceptible to prone errors. - -#### **#KB-H056: "LICENSE PUBLIC DOMAIN"** - -See [License Attribute](adding_packages/conanfile_attributes.md#license-attribute) for details. - -#### **#KB-H057: "TOOLS RENAME"** - -The [rename()](https://docs.conan.io/1/reference/conanfile/tools/files.html#conan-tools-rename) method will be the standard for Conan 2.0, and -also, it uses [robocopy](https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/robocopy), which is safer on Windows. - -#### **#KB-H058: "ILLEGAL CHARACTERS"** - -Windows [naming conventions](https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file#naming-conventions) and [reserved](https://en.wikipedia.org/wiki/Filename#Reserved_characters_and_words) characters must be avoided for file naming, otherwise the will not be supported on Windows. - -#### **#KB-H059: "CLASS NAME"** - -Generic class names can cause review confusion. To keep a better naming, it should use `Conan`. - -#### **#KB-H060: "NO CRLF"** - -Files with [CRLF](https://en.wikipedia.org/wiki/Newline) as endline can cause CI errors when building a package, due the conversion to LF and false detection from CI as changed file. -The [.gitattributes](https://git-scm.com/docs/gitattributes) file lists which files should be converted to LF when commit. However, if you want to enforce it in your local copy, you may run: - - > git config --local core.autocrlf false - > git config --local core.eol lf - -The [core.autocrlf](https://git-scm.com/book/en/v2/Customizing-Git-Git-Configuration) disabled means that git will not convert from CRLF to LF on commit. The [core.eol](https://git-scm.com/docs/git-config) sets the specific line ending to be used for every commit. - -#### **#KB-H062: "TOOLS CROSS BUILDING"** - -Replace all occurrences of `tools.cross_building(self.settings)` with [tools.cross_building(self)](https://docs.conan.io/1/reference/tools.html#tools-cross-building). -When cross building, conan needs to compare [self.settings](https://docs.conan.io/1/reference/conanfile/attributes.html#settings) and [self.settings_build](https://docs.conan.io/1/systems_cross_building/cross_building.html), which are attributes of `self`. - -#### **#KB-H064: "INVALID TOPICS"** - -An invalid [topic](https://docs.conan.io/1/reference/conanfile/attributes.html#topics) has been detected. Remove or rename it. -Right now, topic `conan` is considered redundant and it's not needed to explicitly list it within recipe. - -#### **#KB-H065: "NO REQUIRED_CONAN_VERSION"** - -The recipe misses [required_conan_version](https://docs.conan.io/1/reference/conanfile/other.html#requiring-a-conan-version-for-the-recipe) attribute. -It may happen due to the usage of new features within recipe (such as `strip_root` parameter of the [tools.get](https://docs.conan.io/1/reference/conanfile/tools/files/downloads.html#conan-tools-files-get) helper). -The policy of Conan Center Index to support only the latest version of the Conan Client, so it's safe to put the version Conan Center Index currently runs into the recipe. -Otherwise, it's not an easy task on its own to determine the minimal version that has to be specified: checking the Conan Client [Changelog](https://docs.conan.io/1/changelog.html), one has to know in which Conan Client releases all the attributes, methods, build helpers, etc. used by the recipe were first introduced, and then select the most recent of them. -Consider adding the following code: - -```python -required_conan_version = ">=1.43.0" # use the version that Conan Center Index runs - -class SomeRecipe(ConanFile): - ... - -``` - -See also: [Submitting a Package](adding_packages/README.md#submitting-a-package). - -#### **#KB-H066: "SHORT_PATHS USAGE"** - -The recipe missess [short_paths](https://docs.conan.io/1/reference/conanfile/attributes.html#short-paths) attribute. -It may happen due to the very long paths within source, build or package directories during the package creating. -Consider adding the following code: - -```python -class SomeRecipe(ConanFile): - ... - - short_paths = True -``` - -See also: [Maximum Path Length Limitation](https://docs.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation?tabs=cmd). - -#### **#KB-H068: "TEST_TYPE MANAGEMENT"** - -In Conan 2.0, see [migration guide](https://docs.conan.io/1/migrating_to_2.0/recipes.html#changes-in-the-test-package-recipe), -the `test_package/conanfile.py` needs to declare the requirement being tested explicitly. To be prepared you -have to set the attribute `test_type="explicit"` (this will be ignored in 2.0) to make Conan activate the explicit -mode, then declaring the requirement using the `self.tested_reference_str` that contains the reference being tested. - -#### **#KB-H069: "TEST PACKAGE - NO DEFAULT OPTIONS"** - -This is to ensure the exact package that is built and uploaded is tested against. When `options` of `default_options` are modified in a -`test_package` it can possibly result in the graph being modified. The objective is to enforce quality of the packages and to avoid confusing -"missing packages" errors. - -#### **#KB-H070: "MANDATORY SETTINGS"** - -> :information_source: This rule was put in place as it was deemed safe for evaluation however there is room for improvement - -ConanCenter operates is profiles with a predefined list of settings, all of these much be present in the recipe to ensure `package_id`s are -computed correctly. Some libraries, for instance header-only, do not require all the settings and those should be deleted from the `package_id`. -This approach ensure consistency and reduces the learning curve. - -Recipes should include: - -```python -class SomeRecipe(ConanFile): - ... - - settings = "os", "compiler", "build_type", "arch" -``` - -- For header-only recipes ([example](https://github.com/conan-io/conan-center-index/blob/3a773e2d69ada3bd931252c43a48daf636ddfe87/recipes/eigen/all/conanfile.py#L35-L36)): - - ```python - def package_id(self): - self.info.header_only() - ``` - -There is the case when the package is header-only, but the options affects the generated artifact, (e.g. kanguru, pagmo2 ...), so you need to use `self.info.settings.clear()` instead. - -- @prince-chrismc This needs to a better example; For "tool" recipes ([example](https://github.com/conan-io/conan-center-index/blob/e604534bbe0ef56bdb1f8513b83404eff02aebc8/recipes/cmake/3.x.x/conanfile.py#L104-L105)) which only provide binaries, see [our packaging policy](adding_packages/build_and_package.md) for more, should do as follows: - - ```python - def package_id(self): - del self.info.settings.compiler - ``` - -#### **#KB-H071: "INCLUDE PATH DOES NOT EXIST"** - -It's erroneous to leave the default `include` directory when it's not present. Consider adding: - -```python -def package_info(self): - self.cpp_info.includedirs = [] -``` - -#### **#KB-H072: "PYLINT EXECUTION"** - -Pylint is executed by default over all `conanfile.py` files in ConanCenterIndex and it should not be skipped. It's an important tool which helps us keep a standard level of acceptance. Otherwise, it would be incredibly hard to review all recipes and keep them to the same level of standards. - -#### **#KB-H075: "REQUIREMENT OVERRIDE PARAMETER"** - -The [self.requires()](https://docs.conan.io/1/reference/conanfile/methods.html#requirements) allows to override a dependency version, forcing to use that version imposed by the recipe only. As a side-effect, dependencies can use different versions of the same project at the same package, which may cause unpredicted errors, like ABI incompatibility. For that reason, the `override` parameter is forbidden and should not be used. Instead, all dependencies should align their package versions, even when it's necessary to open more pull requests to update dependency versions. - -#### **#KB-H076: "EITHER STATIC OR SHARED OF EACH LIB"** - -It checks whether static & shared artifacts of the same lib are packaged together. Also, if there are tuples of (.a/.dylib) or (.a/.so) files with the same name. -So it works on Unix systems only, not Windows. Putting both same library name as shared and static in the very same package is considered an error, as it should be separated -and managed by the package option `shared`. - -#### **#KB-H077: "APPLE RELOCATABLE SHARED LIBS"** - -It checks whether installed shared libs are relocatable on Linux & macOS. All shared libs on macOS properly have `@rpath/` in install tree (@rpath token is supported since macOS 10.5 Leopard). - -## Deprecated errors - -The following errors from the hooks are deprecated and no longer reported: - -### **#KB-H047: "NO ASCII CHARACTERS"** - -According to PEP [263](https://www.python.org/dev/peps/pep-0263/), Unicode literals should only appear in Python code if the encoding is declared on one of the first two lines of the source file. Without such a declaration, any Unicode literal will cause a syntax error for Python 2 interpreters. diff --git a/docs/faqs.md b/docs/faqs.md index a1714a7a2b37b..d9f87971f7113 100644 --- a/docs/faqs.md +++ b/docs/faqs.md @@ -27,7 +27,6 @@ This section gathers the most common questions from the community related to pac * [What license should I use for Public Domain?](#what-license-should-i-use-for-public-domain) * [What license should I use for a custom project specific license?](#what-license-should-i-use-for-a-custom-project-specific-license) * [How do I flag a problem to a recipe consumer?](#how-do-i-flag-a-problem-to-a-recipe-consumer) - * [Why is a `build.check_min_cppstd` call not enough?](#why-is-a-buildcheck_min_cppstd-call-not-enough) * [What is the policy for adding older versions of a package?](#what-is-the-policy-for-adding-older-versions-of-a-package) * [What is the policy for removing older versions of a package?](#what-is-the-policy-for-removing-older-versions-of-a-package) * [Can I install packages from the system package manager?](#can-i-install-packages-from-the-system-package-manager) @@ -38,14 +37,10 @@ This section gathers the most common questions from the community related to pac * [How to protect my project from breaking changes in recipes?](#how-to-protect-my-project-from-breaking-changes-in-recipes) * [What's the policy on version ranges?](#whats-the-policy-on-version-ranges) * [How to consume a graph of shared libraries?](#how-to-consume-a-graph-of-shared-libraries) - * [How to watch only specific recipes?](#how-to-watch-only-specific-recipes) - * [Is it possible to disable Pylint?](#is-it-possible-to-disable-pylint) - * [How long can I be inactive before being removed from the authorized users list?](#how-long-can-i-be-inactive-before-being-removed-from-the-authorized-users-list) - * [What happens in case I change my user name?](#what-happens-in-case-i-change-my-user-name) * [Can we add package which are parts of bigger projects like Boost?](#can-we-add-package-which-are-parts-of-bigger-projects-like-boost) * [Can I add my project which I will submit to Boost?](#can-i-add-my-project-which-i-will-submit-to-boost) * [Can I add options that do not affect `package_id` or the package contents](#can-i-add-options-that-do-not-affect-package_id-or-the-package-contents) - * [Can I use full_package_mode for a requirement in my recipe?](#can-i-use-full_package_mode-for-a-requirement-in-my-recipe) + ## What is the policy on recipe name collisions? @@ -84,7 +79,7 @@ For libraries with a too generic name, like `variant`, the name of the organizat We know that using `find_package()` and relying on the CMake behavior to find the dependencies is something that should be avoided in favor of the information provided by the package manager. -Conan has an abstraction over the packages build system and description by using [generators](https://docs.conan.io/1/reference/generators.html). Those generators translate the information of the dependency graph and create a suitable file that can be consumed by your build system. +Conan has an abstraction over the packages build system and description by using generators. Those generators translate the information of the dependency graph and create a suitable file that can be consumed by your build system. In the past, we have found that the logic of some of the CMake's find/config or pkg-config files can lead to broken scenarios due to issues with: @@ -94,23 +89,21 @@ In the past, we have found that the logic of some of the CMake's find/config or - Hardcoded versions of dependencies as well as build options that make overriding dependencies from the consumer not possible. We believe that the package manager should be the one responsible to handle this information in order to achieve a deterministic and controlled behavior. -Regarding the integration with CMake, Conan already provides ways to consume those packages in the same way by using generators like [cmake_find_package](https://docs.conan.io/1/reference/generators/cmake_find_package.html)* or [cmake_find_package_multi](https://docs.conan.io/1/reference/generators/cmake_find_package.html) and features like [components](https://docs.conan.io/1/creating_packages/package_information.html#using-components) to define internal libraries of a package and generate proper CMake targets or [build_modules](https://docs.conan.io/1/reference/conanfile/attributes.html) to package build system utilities like CMake macros. +Regarding the integration with CMake, Conan already provides ways to consume those packages in the same way by using generators like [CmakeDeps](https://docs.conan.io/2/reference/tools/cmake/cmakedeps.html) to define internal libraries of a package and generate proper CMake targets or [cmake_build_modules](https://docs.conan.io/2/examples/graph/tool_requires/use_cmake_modules.html) to package build system utilities like CMake macros. -Defining the package information in the recipe is also useful in order to consume those packages from a different build system, for example using pkg-config with the [pkg_config generator](https://docs.conan.io/1/reference/generators/pkg_config.html). +Defining the package information in the recipe is also useful in order to consume those packages from a different build system, for example using pkg-config with the [PkgConfigDeps](https://docs.conan.io/2/reference/tools/gnu/pkgconfigdeps.html). Finally, by not allowing these files we make packages agnostic to the consumer as the logic of those files is not in the package but in the way the consumer wants the information. If you really think this is an issue and there is something missing to cover the use case of a library you want to contribute to ConanCenter, please do not hesitate to open an issue and we will be happy to hear your feedback. -\* Take a look at the integrations section to learn more: https://docs.conan.io/1/integrations/build_system/cmake/cmake_find_package_generator.html - ## Why recipes that use build tools (like CMake) that have packages in Conan Center do not use it as a build require by default? We generally consider tools like CMake as a standard tool to have installed in your system. Having the `cmake` package as a build require in **all** the recipes that use it will be an overkill, as every build requirement is installed like a requirement and takes time to download. However, `cmake` could still be useful to use in your profile: ``` [tool_requires] -cmake/3.17.2 +cmake/[>=3.15 <4] ``` Other packages using more unusual build tools should refer to the [Dependencies - Adding Build Requirements](adding_packages/dependencies.md#build-requirements) section for more information. @@ -121,9 +114,9 @@ The C++ ecosystem has a lot of rare, unique and obscure build systems. Some of t The recipe is expected to encode the specifics of the build system, mapping the `settings`, `options` for the binary configuration, and also mapping `self.dependencies` so the build system can locate the dependencies libraries as required. For these cases, contributors are asked to help reviewers as much as possible as it's likely we will not have expertise. -> TODO: Add a link to docs.conan.io which explains how to write a custom generator in the 2.0 sense +In Conan 2.x is possible to use [custom generatros](https://docs.conan.io/2/reference/extensions/custom_generators.html). But this feature is not allowed in conan-center-index. -For quality assurance the build service is expected to be green and the [hooks](https://github.com/conan-io/hooks) will ensure the package contents match what is expected given the options. These recipes are more likely to have +For quality assurance the build service is expected to be green and the hooks will ensure the package contents match what is expected given the options. These recipes are more likely to have inconsistency with other recipes but make for excellent contributions. ## Are python requires allowed in the `conan-center-index`? @@ -141,12 +134,12 @@ Currently, the Jenkins orchestration library for this build service is not avail ## Why not x86 binaries? -As described in the [Supported platforms and configurations](supported_platforms_and_configurations.md), only the x86_64 architecture is available for download, the rest must be built from sources. The reasons behind this decision are: +Only the x86_64 architecture is available for download, the rest must be built from sources. The reasons behind this decision are: * Few users need different pre-built packages that are not x86_64 packages, this number is less than 10% of total users (data obtained through the download counter from Bintray), and tends to decrease over the years; * Some OS are putting the x86 as obsolete, examples [macOS](https://developer.apple.com/documentation/macos-release-notes/macos-catalina-10_15-release-notes) and Ubuntu 20.04; * For security reasons, most companies build their own packages from sources, even if they already have a pre-built version available, which further reduces the need for extra configurations; -* Each recipe results in around 130 packages, and this is only for x86_64, but not all packages are used, some settings remain with zero downloads throughout their life. So, imagine adding more settings that will rarely be used, but that will consume more resources as time and storage, this leaves us in an impractical situation. +* Each recipe results in several packages, and this is only for x86_64, but not all packages are used, some settings remain with zero downloads throughout their life. So, imagine adding more settings that will rarely be used, but that will consume more resources as time and storage, this leaves us in an impractical situation. ### But if there are no packages available, what will the x86 validation look like? @@ -162,7 +155,7 @@ Yes! You can learn more about default options in [Packaging Policy](adding_packa The project initially decided not to support the PDB files primarily due to the size of the final package, which could add an exaggerated size and not even used by users. In addition, PDB files need the source code to perform the debugging and even follow the path in which it was created and not the one used by the user, which makes it difficult to use when compared to the regular development flow with the IDE. -However, there are ways to get around this, one of them is through the [/Z7](https://docs.microsoft.com/en-us/cpp/build/reference/z7-zi-zi-debug-information-format) compilation flag, which can be passed through [environment variables](https://docs.microsoft.com/en-us/cpp/build/reference/cl-environment-variables). You can use your [profile](https://docs.conan.io/1/reference/profiles.html#package-settings-and-env-vars) to customize your compiler command line. +However, there are ways to get around this, one of them is through the [/Z7](https://docs.microsoft.com/en-us/cpp/build/reference/z7-zi-zi-debug-information-format) compilation flag, which can be passed through [environment variables](https://docs.microsoft.com/en-us/cpp/build/reference/cl-environment-variables). You can use your [profile](https://docs.conan.io/2/reference/config_files/profiles.html) to customize your compiler command line. ### Why is there no option for PDB, as there is for fPIC? @@ -204,7 +197,7 @@ After one month, we will welcome a PR removing the option that was deprecated. ## Can I split a project into an installer and library package? -No. Some projects provide more than a simple library, but also applications. For those projects, both libraries and executables should be kept together under the same Conan package. In the past, we tried to separate popular projects, like Protobuf, and it proved to be a complex and hard task to be maintained, requiring custom patches to disable parts of the building. Also, with the [context](https://docs.conan.io/1/systems_cross_building/cross_building.html#conan-v1-24-and-newer) feature, we can use the same package as build requirement, for the same build platform, and as a regular requirement, for the host platform, when cross-building. It's recommended using 2 profiles in that case, one for build platform (where the compilation tools are being executed) and one for host platform (where the generated binaries will run). +No. Some projects provide more than a simple library, but also applications. For those projects, both libraries and executables should be kept together under the same Conan package. In the past, we tried to separate popular projects, like Protobuf, and it proved to be a complex and hard task to be maintained, requiring custom patches to disable parts of the building. Also, with the [context](https://docs.conan.io/2/reference/commands/install.html#reference-commands-install-composition) feature, we can use the same package as build requirement, for the same build platform, and as a regular requirement, for the host platform, when cross-building. It's recommended using 2 profiles in that case, one for build platform (where the compilation tools are being executed) and one for host platform (where the generated binaries will run). ## Should recipes export a recipe's license? @@ -224,35 +217,17 @@ Regardless of why, if the recipe detects a problem where binaries might not be g incorrect packages which do not work as intended. Use `ConanInvalidConfiguration` which is specially support in ConanCenter. ```py -raise ConanInvalidConfiguration(f"The project {self.ref} requires liba.enable_feature=True.") -``` - -You should not be using the `self.output.warn` and it is not enough to alter consumers or stop the build service. - -## Why is a `build.check_min_cppstd` call not enough? - -Very often C++ projects require a minimum standard version, such as 14 or 17, in order to compile. Conan offers tools which enable checking the relevant setting is enabled and above this support for a certain version is present. Otherwise, it uses the compiler's default. - -```python -def configure(self): - build.check_min_cppstd(self, 14) 👈 Wrong! +raise ConanInvalidConfiguration(f"The project {self.ref} requires liba.enable_feature=True. See ") ``` -This fails to cover the vast number of use cases for the following reasons: +You should not be using the `self.output.warning` and it is not enough to alter consumers or stop the build service. -1. `cppstd` is not configured in the `--detect`ed profiles generated by Conan, the majority of users simply do not have this setting. -2. A shocking number of projects override this setting within their respective build scripts, this setting does not get applied in those cases. -3. Conan-Center-Index does **not** manage the `cppstd` setting for the compilers it supports to generate binaries. +Also, need to point upstream's issue/PR related to the same problem. In case it's a limitation in the recipe, the same should be clear and be merged without full support: -```python -def validate(self): - # 👇 Correct - if self.settings.compiler.cppstd: - build.check_min_cppstd(self, 14) +```py +raise ConanInvalidConfiguration(f"{self.ref} Conan recipe does not support Windows. Contributions are welcome!") ``` -As a result, all calls to `build.check_min_cppstd` must be guarded by a check for the setting and the only way to ensure the C++ standard is to check the compiler's version to know if it offers sufficient support. An example of this can be found [here](https://github.com/conan-io/conan/issues/8002). - ## What is the policy for adding older versions of a package? See [Adding older versions](adding_packages/sources_and_patches.md#adding-old-versions) for details. @@ -264,10 +239,8 @@ See [Removing older versions](adding_packages/sources_and_patches.md#removing-ol ## Can I install packages from the system package manager? It depends. You can not mix both regular projects with system packages, but you can provide package wrappers for system packages. However, Conan can not track system packages, like their version and options, which creates a fragile situation where affects libraries and binaries built in your package but can not be totally reproduced. -Also, system package managers require administrator permission to install packages, which is not always possible and may break limited users. Moreover, more than one Conan package may require the same system package and there is no way to track their mutual usage. -The hook [KB-H032](error_knowledge_base.md#KB-H032) does not allow `system_requirement` nor `SystemPackageTool` in recipes, to avoid mixing both regular projects with -system packages at same recipe. +Also, system package managers require administrator permission to install packages, which is not always possible and may break limited users. Moreover, more than one Conan package may require the same system package and there is no way to track their mutual usage. There are exceptions where some projects are closer to system drivers or hardware and packaging as a regular library could result in an incompatible Conan package. To deal with those cases, you are allowed to provide an exclusive Conan package which only installs system packages, see the [How-to](adding_packages/build_and_package.md#system-packages) for more. @@ -358,7 +331,7 @@ Since these references will be never available in ConanCenter, they will be deac If consumers activate the option explicitly (`with_intel_mkl=True`), Conan will fail because of the unknown reference. -Consumers may use an [override](https://docs.conan.io/1/using_packages/conanfile_txt.html#overriding-requirements) facility in order to use their own private references for Intel MKL, IPP or DNN libraries. +Consumers may use an [override](https://docs.conan.io/2/reference/conanfile/methods/requirements.html#override) facility in order to use their own private references for Intel MKL, IPP or DNN libraries. For instance, if you have a private reference `intel-mkl/2021@mycompany/stable`, then you may use the following override in your `conanfile.txt`: @@ -371,7 +344,7 @@ intel-mkl/2021@mycompany/stable This repository and the CI building recipes is continuously pushing to new Conan versions, sometimes adopting new features as soon as they are released -([Conan client changelog](https://docs.conan.io/1/changelog.html)). +([Conan client changelog](https://docs.conan.io/2/changelog.html)). You should expect that latest revision of recipes can introduce breaking changes and new features that will be broken unless you also upgrade Conan client (and sometimes you will @@ -387,58 +360,12 @@ See [Dependencies Version Ranges](adding_packages/dependencies.md#version-ranges ## How to consume a graph of shared libraries? -When the CI builds packages with `shared=True`, it applies the option only to the package being created, but not to -the requirements. As the default value for the `shared` option is usually `False`, you can expect that the dynamic -library that has just being generated has linked all its requirements as static libraries. - -It is important to remark the default [package id mode](https://docs.conan.io/1/creating_packages/define_abi_compatibility.html#versioning-schema) -used by Conan (which is the same default used by ConanCenter): `semver_direct_mode`. With this default only the major -version of the requirements is encoded in the package ID. - -The two previous behaviors together can lead to unexpected results for a user that want to consume a graph of -dependencies as shared libraries from ConanCenter. They might think that using `*:shared=True` in their profile is -enough, and indeed Conan will retrieve from ConanCenter all the dynamic libraries for all the graph of dependencies, but -**all of them will contain the logic of their respective requirements embedded in the dynamic library**, and this -logic is embedded at the time of building, so it might not match the version of the requirements that was resolved -by Conan, and for sure, the other dynamic libraries won't be used, only the ones linked directly by the consumer -project. See a more detailed [example here](https://github.com/conan-io/conan/issues/9712). - -In order to consume all those libraries as shared ones, building from sources is needed. This can be -easily achievable using `*:shared=True` in the _host_ profile and `--build` in the install command. With these inputs, -Conan will build from sources all the packages and use the shared libraries when linking. - -> **Note**: If you are hosting your own recipes, the proper solution for recipes would be to use something like -> [`shared_library_package_id`](https://docs.conan.io/1/reference/conanfile/methods.html?highlight=shared_library_package_id#self-info-shared-library-package-id), -> that will encode this information in the package ID and ensure that any change in the static libraries that are -> embedded into a shared one is taken into account when computing the package ID. -> -> In this repository we are not using it, because it will lead to many missing packages, making it impossible -> for the CI to actually build consumers in PRs. +When the CI builds packages with the option `*/*:shared=True`, this option is applied not only to the package being created but also to its requirements. +Since the default value for the shared option is typically `False`, you can generally expect that the dependency graph will consist of static libraries, +except for packages specifically defined with `package_type = "shared-library"`. -## How to watch only specific recipes? - -The [Code Owners](https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners) feature requires -write permission for any listed user in the file `.github/CODEOWNERS`, which makes it impossible to be accepted by Conan. However, that file is still important as it can be re-used in -a future Github Action to parse and communicate users. Meanwhile, there is the project https://app.github-file-watcher.com/, -which is able to notify users, but only after merging to the master branch. Feel free to contribute to a new Github Action that -implements a file watcher feature. - -## Is it possible to disable Pylint? - -No. The [pylint](v2_linter.md) has an important role of keeping any recipe prepared for [Conan v2 migration](v2_migration.md). In case you are having -difficult to understand [linter errors](linters.md), please comment on your pull request about the problem to receive help from the community. - -## How long can I be inactive before being removed from the authorized users list? - -Please, read [Inactivity and user removal section](adding_packages/README.md#inactivity-and-user-removal). - -## What happens in case I change my user name? - -Your Github user name is used to identify you in the authorized users list. If you change your user name, you will need to communicate or, in the #4, or opening a new issue. -Otherwise, the CI will not be able to find you and will not build your pull requests. -In case you change you user name just after asking for authorization in #4, please, communicate the change in the same issue. -Users are revised before being added to the authorized users list, in case the user name is not found in #4, it will be asked in the pull request `Update authorized users list`. -If the user does not answer, the user will be moved to the `waitlist_users.yml` file, until having further communication. +To work with a graph that includes only shared libraries, you must explicitly set the `-o */*:shared=True` option in your conan install command. +This ensures that the necessary shared libraries are included in your build environment. ## Can we add package which are parts of bigger projects like Boost? @@ -461,27 +388,3 @@ Generally no, these sorts of options can most likely be set from a profile or do and would otherwise dynamically embed this into the CMake config files or generated pkg-config files then it should be allowed. Doing so requires [deleting the option from the `package_id`](adding_packages/conanfile_attributes.md#removing-from-package_id). - -## Can I use full_package_mode for a requirement in my recipe? - -For some irregular projects, they may need to be aligned when being used as a requirement, using the very same version, options, and settings and maybe not mixing shared with static linkage. -Those projects usually break between patch versions and are very sensitive, so we can not use different versions through Conan graph dependencies, -otherwise, it may result in unexpected behavior or even runtime errors. - -A very known project is GLib, which requires the very same configuration to prevent multiple instances when using static linkage. -As a solution, we could consume GLib on full package id mode, like: - -```python -def package_id(self): - self.info.requires["glib"].full_package_mode() -``` - -Perfect solution on the consumer side, but there is a side-effect: CCI will not re-generate all involved packages for any change in the dependencies graph with which glib is associated, which means, users will start to see **MISSING_PACKAGES** error during their pull requests. -As a trade-off, it would be necessary to update all recipes involved, by opening new PRs, -then it should generate new packages, but it takes many days and still is a process that is not supported by CCI internally. - -To have more context about it, please, visit issues #11684 and #11022 - -In summary, we do not recommend `full_package_mode` or any other custom package id mode for requirements on CCI, it will break other PRs soon or later. -Instead, prefer using `shared=True` by default, when needed. -Also, when having a similar situation, do not hesitate in opening an issue explaining your case, and ask for support from the community. diff --git a/docs/labels.md b/docs/labels.md deleted file mode 100644 index b5f3f5d9cf396..0000000000000 --- a/docs/labels.md +++ /dev/null @@ -1,96 +0,0 @@ -# Labels - -We use [GitHub labels](https://github.com/conan-io/conan-center-index/labels) to signal the status -of pull-requests and issues. Here you can find more information about the ones that have some -special meaning: - - -## Contents - - * [Bump dependencies](#bump-dependencies) - * [Bump version](#bump-version) - * [C3I Conan2 Ready](#c3i-conan2-ready) - * [Infrastructure](#infrastructure) - * [Stale](#stale) - * [Unexpected Error](#unexpected-error) - * [User-approval pending](#user-approval-pending) - * [Library Request](#library-request) - * [Question](#question) - * [Upstream Update](#upstream-update) - * [conan.io/center](#conaniocenter) - -## Bump dependencies - -Label [`Bump dependencies`](https://github.com/conan-io/conan-center-index/pulls?q=is%3Aopen+is%3Apr+label%3A%22Bump+dependencies%22+) -is assigned by the bot to pull-requests that are just upgrading the version of the requirements that were already in the -recipe. - -> These pull-requests will be merged right away without requiring any approval (CI and CLA checks must have passed). - -If the pull request modifies anything else, the label won't be assigned, we need to be very careful about false positives. - -## Bump version - -Label [`Bump version`](https://github.com/conan-io/conan-center-index/pulls?q=is%3Aopen+is%3Apr+label%3A%22Bump+version%22) -is assigned by the bot to pull-requests that are just adding a new version of the library. The new version should satisfy -some extra conditions: sources should provide from the same URL domain as previous versions. -For now, only [SEMVER](https://semver.org/#semantic-versioning-200) and `` are acceptable version formats. - -> These pull-requests will be merged right away without requiring any approval (CI and CLA checks must have passed). - -If the pull request modifies anything else, the label won't be assigned, we need to be very careful about false positives. - -## C3I Conan2 Ready - -Label [`c3i-conan2-ready`](https://github.com/conan-io/conan-center-index/pulls?q=is%3Aopen+is%3Apr+label%3A%22c3i-conan2-ready%22) -is assigned by the bot to pull-requests that are just adding a new package references which passed by Conan v2 and are not listed in `.c3i/conan_v2_ready_references.yml`. -This is a regression test, in case package is working with Conan v2, it can not be merged in a future pull request in case of failure. - -> These pull-requests will be merged right away without requiring any approval (CI and CLA checks must have passed). - -Only team members can open a pull request with these changes. - -## Infrastructure - -Label [`infrastructure`](https://github.com/conan-io/conan-center-index/pulls?q=is%3Aopen+is%3Apr+label%3Ainfrastructure) is -manually assigned to pull requests that are waiting for something on the infrastructure side. Usually they are blocked and -cannot succeed because they need some tools, more memory,... these pull requests won't be marked as `stale`. - -## Stale - -Label [`stale`](https://github.com/conan-io/conan-center-index/pulls?q=is%3Aopen+is%3Apr+label%3Astale) is assigned to -pull requests without any activity during a long period of time. These pull requests will be closed if they don't get -any further activity. - -## Unexpected Error - -Label [`Unexpected Error`](https://github.com/conan-io/conan-center-index/pulls?q=is%3Aopen+is%3Apr+label%3A%22Unexpected+Error%22) -is assigned by the CI when the process finishes abnormally. -Usually it is some _random_ internal error and it won't happen next time the CI runs. -The CI will re-start your build automatically, the Github check `continuous-integration/jenkins/pr-merge` -will be changed to the status `Pending — This commit is being built` to signalize as running. - -> **Note**: Manually restarting a new build, by closing/opening the PR, will be added to the end of the CI build queue. - -## User-approval pending - -Label [`User-approval pending`](https://github.com/conan-io/conan-center-index/pulls?q=is%3Aopen+is%3Apr+label%3A%22User-approval+pending%22) -signals the pull request that have been submitted by an user who is not yet approved in ConanCenter. Once the user is -approved these pull requests will be triggered again automatically. - -## Library Request - -Request a new package to be created. - -## Question - -Further information is requested. Usually these are for issue where help is needed to solve a specific issue. These are a great way -to look for advice or recommendation about making changes to recipes. - -## Upstream Update - -Request a bump of a new package version. - -## conan.io/center - -Issues and features related to Web UI. diff --git a/docs/linters.md b/docs/linters.md deleted file mode 100644 index c108d63beb5a0..0000000000000 --- a/docs/linters.md +++ /dev/null @@ -1,190 +0,0 @@ -# ConanCenterIndex Linters - -Some linter configuration files are available in the folder [linter](../linter), which are executed by Github Actions -and are displayed during [code review](https://github.com/features/code-review) as annotations, to improve recipe quality. -They consume python scripts which are executed to fit CCI rules. Those scripts use [astroid](https://github.com/PyCQA/astroid) -and [pylint](https://pylint.pycqa.org/en/latest/) classes to parse Conan recipe files and manage their warnings and errors. - -Pylint by itself is not able to find ConanCenterIndex rules, so astroid is used to iterate over a conanfile's content and -validate CCI requirements. Pylint uses an [rcfile](https://pylint.pycqa.org/en/latest/user_guide/configuration/index.html) -to configure plugins, warnings and errors which should be enabled or disabled. - - -## Contents - - * [Understanding the different linters](#understanding-the-different-linters) - * [Running the linters locally](#running-the-linters-locally) - * [Pylint configuration files](#pylint-configuration-files) - * [Linter Warning and Errors](#linter-warning-and-errors) - * [E9006 - conan-import-conanfile: ConanFile should be imported from conan](#e9006---conan-import-conanfile-conanfile-should-be-imported-from-conan) - * [E9005 - conan-missing-name: Every conan recipe must contain the attribute name](#e9005---conan-missing-name-every-conan-recipe-must-contain-the-attribute-name) - * [E9004 - conan-package-name: Conan package names must be lower-case](#e9004---conan-package-name-conan-package-names-must-be-lower-case) - * [E9007 - conan-test-no-name: Do not add name attribute in test package recipes](#e9007---conan-test-no-name-do-not-add-name-attribute-in-test-package-recipes) - * [E9008 - conan-import-errors: Deprecated imports should be replaced by new imports](#e9008---conan-import-errors-deprecated-imports-should-be-replaced-by-new-imports) - * [E9009 - conan-import-error-conanexception: conans.errors is deprecated and conan.errors should be used instead](#e9009---conan-import-error-conanexception-conanserrors-is-deprecated-and-conanerrors-should-be-used-instead) - * [E9010 - conan-import-error-conaninvalidconfiguration: conans.errors is deprecated and conan.errors should be used instead](#e9010---conan-import-error-conaninvalidconfiguration-conanserrors-is-deprecated-and-conanerrors-should-be-used-instead) - * [E9011 - conan-import-tools: Importing conan.tools or conan.tools.xxx.zzz.yyy should be considered as private](#e9011---conan-import-tools-importing-conantools-or-conantoolsxxxzzzyyy-should-be-considered-as-private) - * [E9012 - conan-attr-version: Recipe should not contain version attribute](#e9012---conan-attr-version-recipe-should-not-contain-version-attribute) - -## Understanding the different linters - -There's a three classes of linters currently in place for ConanCenterIndex - -- ConanCenter Hook - these are responsible for validating the structure of the recipes and packages. -- Pylint Linter - these are used to ensure the code quality and conventions of a recipes (i.e `conanfile.py`) -- Yaml Checks - stylistic guidance and schema validation check for support files and best practices - -## Running the linters locally - -Check the [Developing Recipes](developing_recipes_locally.md) for more information on each of the three linters. - -## Pylint configuration files - -- [Pylint Recipe](../linter/pylintrc_recipe): This `rcfile` lists plugins and rules to be executed over all recipes (not test package) and validate them. -- [Pylint Test Package Recipe](../linter/pylintrc_testpackage): This `rcfile` lists plugins and rules to be executed over all recipes in test package folders only: - -## Linter Warning and Errors - -Here is the list of current warning and errors provided by pylint, when using CCI configuration. - -### E9006 - conan-import-conanfile: ConanFile should be imported from conan - -```python -from conans import ConanFile -``` - -Should be replaced by: - -```python -from conan import Conanfile -``` - -### E9005 - conan-missing-name: Every conan recipe must contain the attribute name - -The attribute `name` is always expected. On the other hand, `version` should not be listed. - -```python -def BazConanfile(ConanFile): - name = "baz" -``` - -### E9004 - conan-package-name: Conan package names must be lower-case - -The package name is always lower-case, even when the upstream uses another format - -```python -def FoobarConanfile(ConanFile): - name = "foobar" -``` - -### E9007 - conan-test-no-name: Do not add name attribute in test package recipes - -The test package is not a recipe, thus, it should not have a name - -```python -def TestPackageConanFile(ConanFile): - name = "test_package" # Wrong! -``` - -### E9008 - conan-import-errors: Deprecated imports should be replaced by new imports - -Read [v2_linter](v2_linter.md) for a list of mappings of v1 to v2. -Regular imports from `conans.tools` are now updated: - -```python -from conans import tools -... - -tools.rmdir(os.path.join(self.package_folder, "shared")) -``` - -Should be replaced by specialized tools, prepared for Conan 2.0 - -```python -from conan.tools.files import rmdir -... - -rmdir(self, os.path.join(self.package_folder, "shared")) -``` - -### E9009 - conan-import-error-conanexception: conans.errors is deprecated and conan.errors should be used instead - -```python -from conans.errors import ConanException -``` - -Should be replaced by: - -```python -from conan.errors import ConanException -``` - -Only the namespace `conans` has been replaced by `conan`. - -### E9010 - conan-import-error-conaninvalidconfiguration: conans.errors is deprecated and conan.errors should be used instead - -```python -from conans.errors import ConanInvalidConfiguration -``` - -Should be replaced by: - -```python -from conan.errors import ConanInvalidConfiguration -``` - -Only the namespace `conans` has been replaced by `conan`. - -### E9011 - conan-import-tools: Importing conan.tools or conan.tools.xxx.zzz.yyy should be considered as private - -Documented on [conanfile.tools](https://docs.conan.io/1/reference/conanfile/tools.html): -It's not allowed to use `tools.xxx` directly: - -```python -from conan import tools -... - -tools.scm.Version(self.version) -``` - -Neither sub modules: - -```python -from conan.tools.apple.apple import is_apple_os -``` - -Only modules under `conan.tools` and `conan.tools.xxx` are allowed: - -```python -from conan.tools.files import rmdir -from conan.tools import scm -``` - -### E9012 - conan-attr-version: Recipe should not contain version attribute - -All recipes on CCI should be generic enough to support as many versions as possible, so enforcing a specific -version as attribute will not allow to re-use the same recipe for multiple release versions. - -```python -from conan import ConanFile - -class FooConanFile(ConanFile): - version = "1.0.0" # Wrong! -``` - -The package version should be passed as command argument, e.g: - - conan create all/ 1.0.0@ -pr:h=default -pr:b=default - -Or, if you are running Conan 2.0: - - conan create all/ --version=1.0.0 -pr:h=default -pr:b=default - -The only exception is when providing ``system`` packages, which are allowed. - -```python -from conan import ConanFile - -class FooConanFile(ConanFile): - version = "system" # Okay! -``` diff --git a/docs/package_templates/README.md b/docs/package_templates/README.md index 76d696e57b0a0..1ea369a63a8ee 100644 --- a/docs/package_templates/README.md +++ b/docs/package_templates/README.md @@ -12,7 +12,7 @@ It's listed under [cmake_package](cmake_package) folder. It fits projects which #### Header only -It's listed under [header_only](header_only) folder. It fits projects which only copy header and have the same package ID always. +It's listed under [header_only](header_only) folder. It fits projects which only copy header and have the same package ID always. Please note that if the library in question does have a build system (e.g. CMake, Meson, Autotools) that contains install logic - that should be the preferred starting point for the recipe. Copying files directly into the package folder should be reserved for header only libraries where the upstream project does not provide this functionality. #### MSBuild package diff --git a/docs/package_templates/autotools_package/all/conandata.yml b/docs/package_templates/autotools_package/all/conandata.yml index 629a5640adc16..e11d72dbcdc2b 100644 --- a/docs/package_templates/autotools_package/all/conandata.yml +++ b/docs/package_templates/autotools_package/all/conandata.yml @@ -1,17 +1,13 @@ sources: - # Newer versions at the top "1.2.0": url: - "https://mirror1.net/package-1.2.0.tar.gz" - "https://mirror2.net/package-1.2.0.tar.gz" sha256: "________________________________________________________________" "1.1.0": - url: - - "https://mirror1.net/package-1.1.0.tar.gz" - - "https://mirror2.net/package-1.1.0.tar.gz" + url: "https://mirror2.net/package-1.1.0.tar.gz" sha256: "________________________________________________________________" patches: - # Newer versions at the top "1.1.0": - patch_file: "patches/0001-fix-cmake.patch" patch_description: "correct the order of cmake min and project" diff --git a/docs/package_templates/autotools_package/all/conanfile.py b/docs/package_templates/autotools_package/all/conanfile.py index 0d8464ec8e6f0..1457576030fb0 100644 --- a/docs/package_templates/autotools_package/all/conanfile.py +++ b/docs/package_templates/autotools_package/all/conanfile.py @@ -2,16 +2,15 @@ from conan.errors import ConanInvalidConfiguration from conan.tools.apple import fix_apple_shared_install_name from conan.tools.build import check_min_cppstd, cross_building -from conan.tools.env import Environment, VirtualBuildEnv, VirtualRunEnv +from conan.tools.env import Environment, VirtualRunEnv from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rm, rmdir from conan.tools.gnu import Autotools, AutotoolsDeps, AutotoolsToolchain, PkgConfigDeps from conan.tools.layout import basic_layout from conan.tools.microsoft import is_msvc, unix_path -from conan.tools.scm import Version import os -required_conan_version = ">=1.54.0" +required_conan_version = ">=2.0.9" # # INFO: Please, remove all comments before pushing your PR! @@ -22,13 +21,13 @@ class PackageConan(ConanFile): name = "package" description = "short description" # Use short name only, conform to SPDX License List: https://spdx.org/licenses/ - # In case not listed there, use "LicenseRef-" + # In case not listed there, use "DocumentRef-:LicenseRef-" license = "" url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/project/package" # no "conan" and project name in topics. Use topics from the upstream listed on GH topics = ("topic1", "topic2", "topic3") - # package_type should usually be "library" (if there is shared option) + # package_type should usually be "library", "shared-library" or "static-library" package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { @@ -41,73 +40,48 @@ class PackageConan(ConanFile): "fPIC": True, "with_foobar": True, } - - @property - def _min_cppstd(self): - return 14 - - # in case the project requires C++14/17/20/... the minimum compiler version should be listed - @property - def _compilers_minimum_version(self): - return { - "apple-clang": "10", - "clang": "7", - "gcc": "7", - "msvc": "191", - "Visual Studio": "15", - } - - @property - def _settings_build(self): - return getattr(self, "settings_build", self.settings) + implements = ["auto_shared_fpic"] # no exports_sources attribute, but export_sources(self) method instead - # this allows finer grain exportation of patches per version def export_sources(self): export_conandata_patches(self) - def config_options(self): - if self.settings.os == "Windows": - del self.options.fPIC - def configure(self): - if self.options.shared: - self.options.rm_safe("fPIC") - # for plain C projects only + # for plain C projects only. Otherwise, remove this method. self.settings.rm_safe("compiler.cppstd") self.settings.rm_safe("compiler.libcxx") def layout(self): - # src_folder must use the same source folder name the project basic_layout(self, src_folder="src") def requirements(self): - # prefer self.requires method instead of requires attribute + # Prefer self.requirements() method instead of self.requires attribute. self.requires("dependency/0.8.1") if self.options.with_foobar: + # INFO: used in foo/baz.hpp:34 self.requires("foobar/0.1.0") + # Some dependencies on CCI are allowed to use version ranges. + # See https://github.com/conan-io/conan-center-index/blob/master/docs/adding_packages/dependencies.md#version-ranges + self.requires("openssl/[>=1.1 <4]") def validate(self): # validate the minimum cpp standard supported. Only for C++ projects - if self.settings.compiler.get_safe("cppstd"): - check_min_cppstd(self, self._min_cppstd) - minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) - if minimum_version and Version(self.settings.compiler.version) < minimum_version: - raise ConanInvalidConfiguration( - f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." - ) + check_min_cppstd(self, 14) + + # Always comment the reason including the upstream issue. + # INFO: Upstream only support Unix systems. See if self.settings.os not in ["Linux", "FreeBSD", "Macos"]: raise ConanInvalidConfiguration(f"{self.ref} is not supported on {self.settings.os}.") - # if another tool than the compiler or autotools is required to build the project (pkgconf, bison, flex etc) + # if a tool other than the compiler or autotools is required to build the project (pkgconf, bison, flex etc) def build_requirements(self): # only if we have to call autoreconf self.tool_requires("libtool/x.y.z") # only if upstream configure.ac relies on PKG_CHECK_MODULES macro if not self.conf.get("tools.gnu:pkg_config", check_type=str): - self.tool_requires("pkgconf/x.y.z") + self.tool_requires("pkgconf/[>=2.2 <3]") # required to suppport windows as a build machine - if self._settings_build.os == "Windows": + if self.settings_build.os == "Windows": self.win_bash = True if not self.conf.get("tools.microsoft.bash:path", check_type=str): self.tool_requires("msys2/cci.latest") @@ -118,21 +92,20 @@ def build_requirements(self): def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) + # apply patches listed in conandata.yml + # Using patches is always the last resort to fix issues. If possible, try to fix the issue in the upstream project. + apply_conandata_patches(self) def generate(self): - # inject tool_requires env vars in build scope (not needed if there is no tool_requires) - env = VirtualBuildEnv(self) - env.generate() - # inject requires env vars in build scope + # inject required env vars into the build scope # it's required in case of native build when there is AutotoolsDeps & at least one dependency which might be shared, because configure tries to run a test executable if not cross_building(self): - env = VirtualRunEnv(self) - env.generate(scope="build") - # --fpic is automatically managed when 'fPIC'option is declared + VirtualRunEnv(self).generate(scope="build") + # --fpic is automatically managed when 'fPIC' option is declared # --enable/disable-shared is automatically managed when 'shared' option is declared tc = AutotoolsToolchain(self) # autotools usually uses 'yes' and 'no' to enable/disable options - yes_no = lambda v: "yes" if v else "no" + def yes_no(v): return "yes" if v else "no" tc.configure_args.extend([ f"--with-foobar={yes_no(self.options.with_foobar)}", "--enable-tools=no", @@ -143,8 +116,10 @@ def generate(self): tc = PkgConfigDeps(self) tc.generate() # generate dependencies for autotools - tc = AutotoolsDeps(self) - tc.generate() + # some recipes might require a workaround for MSVC (https://github.com/conan-io/conan/issues/12784): + # https://github.com/conan-io/conan-center-index/blob/00ce907b910d0d772f1c73bb699971c141c423c1/recipes/xapian-core/all/conanfile.py#L106-L135 + deps = AutotoolsDeps(self) + deps.generate() # If Visual Studio is supported if is_msvc(self): @@ -158,7 +133,7 @@ def generate(self): env.define("CC", f"{compile_wrapper} cl -nologo") env.define("CXX", f"{compile_wrapper} cl -nologo") env.define("LD", "link -nologo") - env.define("AR", f"{ar_wrapper} \"lib -nologo\"") + env.define("AR", f"{ar_wrapper} lib") env.define("NM", "dumpbin -symbols") env.define("OBJDUMP", ":") env.define("RANLIB", ":") @@ -166,8 +141,7 @@ def generate(self): env.vars(self).save_script("conanbuild_msvc") def build(self): - # apply patches listed in conandata.yml - apply_conandata_patches(self) + autotools = Autotools(self) # (optional) run autoreconf to regenerate configure file (libtool should be in tool_requires) autotools.autoreconf() @@ -180,8 +154,9 @@ def package(self): autotools = Autotools(self) autotools.install() - # some files extensions and folders are not allowed. Please, read the FAQs to get informed. + # Some files extensions and folders are not allowed. Please, read the FAQs to get informed. rm(self, "*.la", os.path.join(self.package_folder, "lib")) + # Consider disabling these at first to verify that the package_info() output matches the info exported by the project. rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) rmdir(self, os.path.join(self.package_folder, "share")) @@ -191,7 +166,7 @@ def package(self): def package_info(self): self.cpp_info.libs = ["package_lib"] - # if package provides a pkgconfig file (package.pc, usually installed in /lib/pkgconfig/) + # if the package provides a pkgconfig file (package.pc, usually installed in /lib/pkgconfig/) self.cpp_info.set_property("pkg_config_name", "package") # If they are needed on Linux, m, pthread and dl are usually needed on FreeBSD too diff --git a/docs/package_templates/autotools_package/all/test_package/CMakeLists.txt b/docs/package_templates/autotools_package/all/test_package/CMakeLists.txt index 006bc198df7b0..c16ec6d748476 100644 --- a/docs/package_templates/autotools_package/all/test_package/CMakeLists.txt +++ b/docs/package_templates/autotools_package/all/test_package/CMakeLists.txt @@ -1,11 +1,7 @@ cmake_minimum_required(VERSION 3.15) -project(test_package LANGUAGES C) # if the project is pure C -# project(test_package LANGUAGES CXX) # if the project uses c++ +project(test_package LANGUAGES CXX) find_package(package REQUIRED CONFIG) -add_executable(${PROJECT_NAME} test_package.c) -# don't link to ${CONAN_LIBS} or CONAN_PKG::package +add_executable(${PROJECT_NAME} test_package.cpp) target_link_libraries(${PROJECT_NAME} PRIVATE package::package) -# In case the target project need a specific C++ standard -# target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) diff --git a/docs/package_templates/autotools_package/all/test_package/conanfile.py b/docs/package_templates/autotools_package/all/test_package/conanfile.py index 0a808db45f245..2e77b4246fa81 100644 --- a/docs/package_templates/autotools_package/all/test_package/conanfile.py +++ b/docs/package_templates/autotools_package/all/test_package/conanfile.py @@ -4,11 +4,9 @@ import os -# It will become the standard on Conan 2.x class TestPackageConan(ConanFile): settings = "os", "arch", "compiler", "build_type" - generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" - test_type = "explicit" + generators = "CMakeDeps", "CMakeToolchain" def layout(self): cmake_layout(self) diff --git a/docs/package_templates/autotools_package/all/test_package/test_package.c b/docs/package_templates/autotools_package/all/test_package/test_package.c deleted file mode 100644 index f949b7f4a20f4..0000000000000 --- a/docs/package_templates/autotools_package/all/test_package/test_package.c +++ /dev/null @@ -1,16 +0,0 @@ -#include -#include -#include "package/foobar.h" // Make sure includes work as expected - - -int main(void) { - printf("Create a minimal usage for the target project here.\n"); - printf("Avoid big examples, bigger than 100 lines\n"); - printf("Avoid networking connections.\n"); - printf("Avoid background apps or servers.\n"); - printf("The propose is testing the generated artifacts only.\n"); - - foobar_print_version(); // Make sure to call something that will require linkage for compiled libraries - - return EXIT_SUCCESS; -} diff --git a/docs/package_templates/autotools_package/all/test_package/test_package.cpp b/docs/package_templates/autotools_package/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..2746a345c92f8 --- /dev/null +++ b/docs/package_templates/autotools_package/all/test_package/test_package.cpp @@ -0,0 +1,21 @@ +#include +#include "package/foobar.h" + + +int main(void) { + /* + * TODO: Remove this comment before pushing the testing code; + * + * Create a minimal usage for the target project here; + * Avoid upstream full examples, or code bigger than 15 lines; + * Avoid networking connections; + * Avoid background apps or servers; + * Avoid GUI apps; + * Avoid extra files like images, sounds and other binaries; + * The propose is testing the generated artifacts ONLY; + */ + + foobar_print_version(); // Make sure to call something that will require linkage for compiled libraries + + return EXIT_SUCCESS; +} diff --git a/docs/package_templates/cmake_package/all/conandata.yml b/docs/package_templates/cmake_package/all/conandata.yml index 629a5640adc16..dacc527595b61 100644 --- a/docs/package_templates/cmake_package/all/conandata.yml +++ b/docs/package_templates/cmake_package/all/conandata.yml @@ -1,17 +1,13 @@ sources: - # Newer versions at the top "1.2.0": url: - "https://mirror1.net/package-1.2.0.tar.gz" - "https://mirror2.net/package-1.2.0.tar.gz" sha256: "________________________________________________________________" "1.1.0": - url: - - "https://mirror1.net/package-1.1.0.tar.gz" - - "https://mirror2.net/package-1.1.0.tar.gz" + url: "https://mirror1.net/package-1.1.0.tar.gz" sha256: "________________________________________________________________" patches: - # Newer versions at the top "1.1.0": - patch_file: "patches/0001-fix-cmake.patch" patch_description: "correct the order of cmake min and project" diff --git a/docs/package_templates/cmake_package/all/conanfile.py b/docs/package_templates/cmake_package/all/conanfile.py index 9635abc398ca9..e9c4c869882aa 100644 --- a/docs/package_templates/cmake_package/all/conanfile.py +++ b/docs/package_templates/cmake_package/all/conanfile.py @@ -2,14 +2,12 @@ from conan.errors import ConanInvalidConfiguration from conan.tools.build import check_min_cppstd from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout -from conan.tools.env import VirtualBuildEnv -from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, replace_in_file, rm, rmdir -from conan.tools.microsoft import check_min_vs, is_msvc, is_msvc_static_runtime -from conan.tools.scm import Version +from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rm, rmdir +from conan.tools.microsoft import is_msvc, is_msvc_static_runtime import os -required_conan_version = ">=1.53.0" +required_conan_version = ">=2.0.9" # # INFO: Please, remove all comments before pushing your PR! @@ -20,13 +18,13 @@ class PackageConan(ConanFile): name = "package" description = "short description" # Use short name only, conform to SPDX License List: https://spdx.org/licenses/ - # In case not listed there, use "LicenseRef-" + # In case not listed there, use "DocumentRef-:LicenseRef-" license = "" url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/project/package" # no "conan" and project name in topics. Use topics from the upstream listed on GH topics = ("topic1", "topic2", "topic3") - # package_type should usually be "library" (if there is shared option) + # package_type should usually be "library", "shared-library" or "static-library" package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { @@ -37,95 +35,64 @@ class PackageConan(ConanFile): "shared": False, "fPIC": True, } - - @property - def _min_cppstd(self): - return 14 - - # in case the project requires C++14/17/20/... the minimum compiler version should be listed - @property - def _compilers_minimum_version(self): - return { - "apple-clang": "10", - "clang": "7", - "gcc": "7", - "msvc": "191", - "Visual Studio": "15", - } + implements = ["auto_shared_fpic"] # no exports_sources attribute, but export_sources(self) method instead - # this allows finer grain exportation of patches per version def export_sources(self): export_conandata_patches(self) - def config_options(self): - if self.settings.os == "Windows": - del self.options.fPIC - def configure(self): - if self.options.shared: - self.options.rm_safe("fPIC") # for plain C projects only self.settings.rm_safe("compiler.cppstd") self.settings.rm_safe("compiler.libcxx") def layout(self): - # src_folder must use the same source folder name the project cmake_layout(self, src_folder="src") def requirements(self): - # prefer self.requires method instead of requires attribute + # Always prefer self.requirements() method instead of self.requires attribute. self.requires("dependency/0.8.1") + if self.options.with_foobar: + # INFO: used in foo/baz.hpp:34 + self.requires("foobar/0.1.0", transitive_headers=True, transitive_libs=True) + # Some dependencies on CCI are allowed to use version ranges. + # See https://github.com/conan-io/conan-center-index/blob/master/docs/adding_packages/dependencies.md#version-ranges + self.requires("openssl/[>=1.1 <4]") def validate(self): - # validate the minimum cpp standard supported. For C++ projects only - if self.settings.compiler.cppstd: - check_min_cppstd(self, self._min_cppstd) - minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) - if minimum_version and Version(self.settings.compiler.version) < minimum_version: - raise ConanInvalidConfiguration( - f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." - ) - # in case it does not work in another configuration, it should validated here too + # validate the minimum cpp standard supported. For C++ projects only. + check_min_cppstd(self, 14) + # in case it does not work in another configuration, it should be validated here. Always comment the reason including the upstream issue. + # INFO: Upstream does not support DLL: See if is_msvc(self) and self.options.shared: raise ConanInvalidConfiguration(f"{self.ref} can not be built as shared on Visual Studio and msvc.") - # if another tool than the compiler or CMake is required to build the project (pkgconf, bison, flex etc) + # if a tool other than the compiler or CMake newer than 3.15 is required to build the project (pkgconf, bison, flex etc) def build_requirements(self): - self.tool_requires("tool/x.y.z") + self.tool_requires("cmake/[>=3.16 <4]") def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) + # Using patches is always the last resort to fix issues. If possible, try to fix the issue in the upstream project. + apply_conandata_patches(self) def generate(self): - # BUILD_SHARED_LIBS and POSITION_INDEPENDENT_CODE are automatically parsed when self.options.shared or self.options.fPIC exist + # BUILD_SHARED_LIBS and POSITION_INDEPENDENT_CODE are set automatically as tc.variables when self.options.shared or self.options.fPIC exist tc = CMakeToolchain(self) # Boolean values are preferred instead of "ON"/"OFF" - tc.variables["PACKAGE_CUSTOM_DEFINITION"] = True + tc.cache_variables["PACKAGE_BUILD_TESTS"] = False if is_msvc(self): - # don't use self.settings.compiler.runtime - tc.variables["USE_MSVC_RUNTIME_LIBRARY_DLL"] = not is_msvc_static_runtime(self) - # deps_cpp_info, deps_env_info and deps_user_info are no longer used - if self.dependencies["dependency"].options.foobar: - tc.variables["DEPENDENCY_LIBPATH"] = self.dependencies["dependency"].cpp_info.libdirs - # cache_variables should be used sparingly, example setting cmake policies - tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0077"] = "NEW" - tc.generate() - # In case there are dependencies listed on requirements, CMakeDeps should be used - tc = CMakeDeps(self) + tc.cache_variables["USE_MSVC_RUNTIME_LIBRARY_DLL"] = not is_msvc_static_runtime(self) tc.generate() - # In case there are dependencies listed on build_requirements, VirtualBuildEnv should be used - tc = VirtualBuildEnv(self) - tc.generate(scope="build") - def _patch_sources(self): - apply_conandata_patches(self) - # remove bundled xxhash - rm(self, "whateer.*", os.path.join(self.source_folder, "lib")) - replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), "...", "") + # In case there are dependencies listed under requirements, CMakeDeps should be used + deps = CMakeDeps(self) + # You can override the CMake package and target names if they don't match the names used in the project + deps.set_property("fontconfig", "cmake_file_name", "Fontconfig") + deps.set_property("fontconfig", "cmake_target_name", "Fontconfig::Fontconfig") + deps.generate() def build(self): - self._patch_sources() # It can be apply_conandata_patches(self) only in case no more patches are needed cmake = CMake(self) cmake.configure() cmake.build() @@ -135,17 +102,16 @@ def package(self): cmake = CMake(self) cmake.install() - # some files extensions and folders are not allowed. Please, read the FAQs to get informed. + # Some files extensions and folders are not allowed. Please, read the FAQs to get informed. + # Consider disabling these at first to verify that the package_info() output matches the info exported by the project. rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) rmdir(self, os.path.join(self.package_folder, "share")) - rm(self, "*.la", os.path.join(self.package_folder, "lib")) - rm(self, "*.pdb", os.path.join(self.package_folder, "lib")) - rm(self, "*.pdb", os.path.join(self.package_folder, "bin")) + rm(self, "*.pdb", self.package_folder, recursive=True) def package_info(self): + # library name to be packaged self.cpp_info.libs = ["package_lib"] - # if package has an official FindPACKAGE.cmake listed in https://cmake.org/cmake/help/latest/manual/cmake-modules.7.html#find-modules # examples: bzip2, freetype, gdal, icu, libcurl, libjpeg, libpng, libtiff, openssl, sqlite3, zlib... self.cpp_info.set_property("cmake_module_file_name", "PACKAGE") @@ -161,9 +127,3 @@ def package_info(self): self.cpp_info.system_libs.append("m") self.cpp_info.system_libs.append("pthread") self.cpp_info.system_libs.append("dl") - - # TODO: to remove in conan v2 once cmake_find_package_* generators removed - self.cpp_info.filenames["cmake_find_package"] = "PACKAGE" - self.cpp_info.filenames["cmake_find_package_multi"] = "package" - self.cpp_info.names["cmake_find_package"] = "PACKAGE" - self.cpp_info.names["cmake_find_package_multi"] = "package" diff --git a/docs/package_templates/cmake_package/all/test_package/CMakeLists.txt b/docs/package_templates/cmake_package/all/test_package/CMakeLists.txt index b1b30db795a84..c16ec6d748476 100644 --- a/docs/package_templates/cmake_package/all/test_package/CMakeLists.txt +++ b/docs/package_templates/cmake_package/all/test_package/CMakeLists.txt @@ -1,12 +1,7 @@ cmake_minimum_required(VERSION 3.15) - -project(test_package LANGUAGES C) # if the project is pure C -# project(test_package LANGUAGES CXX) # if the project uses c++ +project(test_package LANGUAGES CXX) find_package(package REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) -# don't link to ${CONAN_LIBS} or CONAN_PKG::package target_link_libraries(${PROJECT_NAME} PRIVATE package::package) -# In case the target project need a specific C++ standard -target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) diff --git a/docs/package_templates/cmake_package/all/test_package/conanfile.py b/docs/package_templates/cmake_package/all/test_package/conanfile.py index 02eb5ce439fb4..2e77b4246fa81 100644 --- a/docs/package_templates/cmake_package/all/test_package/conanfile.py +++ b/docs/package_templates/cmake_package/all/test_package/conanfile.py @@ -4,18 +4,16 @@ import os -# It will become the standard on Conan 2.x class TestPackageConan(ConanFile): settings = "os", "arch", "compiler", "build_type" - generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" - test_type = "explicit" - - def requirements(self): - self.requires(self.tested_reference_str) + generators = "CMakeDeps", "CMakeToolchain" def layout(self): cmake_layout(self) + def requirements(self): + self.requires(self.tested_reference_str) + def build(self): cmake = CMake(self) cmake.configure() diff --git a/docs/package_templates/cmake_package/all/test_package/config.yml b/docs/package_templates/cmake_package/all/test_package/config.yml new file mode 100644 index 0000000000000..d07c95e596619 --- /dev/null +++ b/docs/package_templates/cmake_package/all/test_package/config.yml @@ -0,0 +1,5 @@ +versions: + "1.2.0": + folder: all + "1.1.0": + folder: all diff --git a/docs/package_templates/cmake_package/all/test_package/test_package.cpp b/docs/package_templates/cmake_package/all/test_package/test_package.cpp index 8e653f30a5476..7480c357a3b18 100644 --- a/docs/package_templates/cmake_package/all/test_package/test_package.cpp +++ b/docs/package_templates/cmake_package/all/test_package/test_package.cpp @@ -1,14 +1,19 @@ #include -#include #include "package/foobar.hpp" int main(void) { - std::cout << "Create a minimal usage for the target project here." << std::endl; - std::cout << "Avoid big examples, bigger than 100 lines" << std::endl; - std::cout << "Avoid networking connections." << std::endl; - std::cout << "Avoid background apps or servers." << std::endl; - std::cout << "The propose is testing the generated artifacts only." << std::endl; + /* + * TODO: Remove this comment before pushing the testing code; + * + * Create a minimal usage for the target project here; + * Avoid upstream full examples, or code bigger than 15 lines; + * Avoid networking connections; + * Avoid background apps or servers; + * Avoid GUI apps; + * Avoid extra files like images, sounds and other binaries; + * The propose is testing the generated artifacts ONLY; + */ foobar.print_version(); diff --git a/docs/package_templates/cmake_package/config.yml b/docs/package_templates/cmake_package/config.yml index a885cbf942a74..d07c95e596619 100644 --- a/docs/package_templates/cmake_package/config.yml +++ b/docs/package_templates/cmake_package/config.yml @@ -1,5 +1,4 @@ versions: - # Newer versions at the top "1.2.0": folder: all "1.1.0": diff --git a/docs/package_templates/header_only/all/conandata.yml b/docs/package_templates/header_only/all/conandata.yml index 629a5640adc16..e11d72dbcdc2b 100644 --- a/docs/package_templates/header_only/all/conandata.yml +++ b/docs/package_templates/header_only/all/conandata.yml @@ -1,17 +1,13 @@ sources: - # Newer versions at the top "1.2.0": url: - "https://mirror1.net/package-1.2.0.tar.gz" - "https://mirror2.net/package-1.2.0.tar.gz" sha256: "________________________________________________________________" "1.1.0": - url: - - "https://mirror1.net/package-1.1.0.tar.gz" - - "https://mirror2.net/package-1.1.0.tar.gz" + url: "https://mirror2.net/package-1.1.0.tar.gz" sha256: "________________________________________________________________" patches: - # Newer versions at the top "1.1.0": - patch_file: "patches/0001-fix-cmake.patch" patch_description: "correct the order of cmake min and project" diff --git a/docs/package_templates/header_only/all/conanfile.py b/docs/package_templates/header_only/all/conanfile.py index 6e443b6024963..6615ea677d66a 100644 --- a/docs/package_templates/header_only/all/conanfile.py +++ b/docs/package_templates/header_only/all/conanfile.py @@ -3,101 +3,73 @@ from conan.tools.build import check_min_cppstd from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get from conan.tools.layout import basic_layout -from conan.tools.scm import Version import os -required_conan_version = ">=1.52.0" +required_conan_version = ">=2.0" class PackageConan(ConanFile): name = "package" description = "short description" # Use short name only, conform to SPDX License List: https://spdx.org/licenses/ - # In case it's not listed there, use "LicenseRef-" + # In case it's not listed there, use "DocumentRef-:LicenseRef-" license = "" url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/project/package" # Do not put "conan" nor the project name in topics. Use topics from the upstream listed on GH - # Keep 'header-only' as topic + # Include 'header-only' as a topic topics = ("topic1", "topic2", "topic3", "header-only") package_type = "header-library" - # Keep these or explain why it's not required for this particular case settings = "os", "arch", "compiler", "build_type" # Do not copy sources to build folder for header only projects, unless you need to apply patches no_copy_source = True - @property - def _min_cppstd(self): - return 14 - - # In case the project requires C++14/17/20/... the minimum compiler version should be listed - @property - def _compilers_minimum_version(self): - return { - "apple-clang": "10", - "clang": "7", - "gcc": "7", - "msvc": "191", - "Visual Studio": "15", - } - # Use the export_sources(self) method instead of the exports_sources attribute. - # This allows finer grain exportation of patches per version def export_sources(self): export_conandata_patches(self) def layout(self): - # src_folder must use the same source folder name than the project basic_layout(self, src_folder="src") def requirements(self): # Prefer self.requires method instead of requires attribute # Direct dependencies of header only libs are always transitive since they are included in public headers - self.requires("dependency/0.8.1", transitive_headers=True) + self.requires("dependency/0.8.1") + # Some dependencies on CCI are allowed to use version ranges. + # See https://github.com/conan-io/conan-center-index/blob/master/docs/adding_packages/dependencies.md#version-ranges + self.requires("openssl/[>=1.1 <4]") # same package ID for any package def package_id(self): self.info.clear() def validate(self): - if self.settings.compiler.get_safe("cppstd"): - # Validate the minimum cpp standard supported when installing the package. For C++ projects only - check_min_cppstd(self, self._min_cppstd) - minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) - if minimum_version and Version(self.settings.compiler.version) < minimum_version: - raise ConanInvalidConfiguration( - f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." - ) - - # In case this library does not work in some another configuration, it should be validated here too + # Validate the minimum cpp standard supported when installing the package. For C++ projects only + check_min_cppstd(self, 14) + # in case it does not work in another configuration, it should be validated here. Always comment the reason including the upstream issue. + # INFO: Upstream does not support DLL: See if self.settings.os == "Windows": raise ConanInvalidConfiguration(f"{self.ref} can not be used on Windows.") def source(self): # Download source package and extract to source folder get(self, **self.conan_data["sources"][self.version], strip_root=True) - - # Not mandatory when there is no patch, but will suppress warning message about missing build() method - def build(self): # The attribute no_copy_source should not be used when applying patches in build + # Using patches is always the last resort to fix issues. If possible, try to fix the issue in the upstream project. apply_conandata_patches(self) + # Suppress warning message about missing build() method when running Conan + def build(self): + pass + # Copy all files to the package folder def package(self): copy(self, "LICENSE", self.source_folder, os.path.join(self.package_folder, "licenses")) - copy( - self, - "*.h", - os.path.join(self.source_folder, "include"), - os.path.join(self.package_folder, "include"), - ) + # Prefer CMake.install() or similar in case the upstream offers an official method to install the headers. + copy(self, "*.h", os.path.join(self.source_folder, "include"), os.path.join(self.package_folder, "include")) def package_info(self): - # Folders not used for header-only - self.cpp_info.bindirs = [] - self.cpp_info.libdirs = [] - # Set these to the appropriate values if the package has an official FindPACKAGE.cmake # listed in https://cmake.org/cmake/help/latest/manual/cmake-modules.7.html#find-modules # examples: bzip2, freetype, gdal, icu, libcurl, libjpeg, libpng, libtiff, openssl, sqlite3, zlib... @@ -111,12 +83,10 @@ def package_info(self): # (package.pc, usually installed in /lib/pkgconfig/) self.cpp_info.set_property("pkg_config_name", "package") + # Folders not used for header-only + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] + # Add m, pthread and dl if needed in Linux/FreeBSD if self.settings.os in ["Linux", "FreeBSD"]: self.cpp_info.system_libs.extend(["dl", "m", "pthread"]) - - # TODO: to remove in conan v2 once cmake_find_package_* generators removed - self.cpp_info.filenames["cmake_find_package"] = "PACKAGE" - self.cpp_info.filenames["cmake_find_package_multi"] = "package" - self.cpp_info.names["cmake_find_package"] = "PACKAGE" - self.cpp_info.names["cmake_find_package_multi"] = "package" diff --git a/docs/package_templates/header_only/all/test_package/CMakeLists.txt b/docs/package_templates/header_only/all/test_package/CMakeLists.txt index eaac388e85a10..c16ec6d748476 100644 --- a/docs/package_templates/header_only/all/test_package/CMakeLists.txt +++ b/docs/package_templates/header_only/all/test_package/CMakeLists.txt @@ -1,11 +1,7 @@ cmake_minimum_required(VERSION 3.15) -project(test_package LANGUAGES C) # if the project is pure C -# project(test_package LANGUAGES CXX) # if the project uses c++ +project(test_package LANGUAGES CXX) find_package(package REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) -# don't link to ${CONAN_LIBS} or CONAN_PKG::package target_link_libraries(${PROJECT_NAME} PRIVATE package::package) -# In case the target project need a specific C++ standard -target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_14) diff --git a/docs/package_templates/header_only/all/test_package/conanfile.py b/docs/package_templates/header_only/all/test_package/conanfile.py index 0a808db45f245..2e77b4246fa81 100644 --- a/docs/package_templates/header_only/all/test_package/conanfile.py +++ b/docs/package_templates/header_only/all/test_package/conanfile.py @@ -4,11 +4,9 @@ import os -# It will become the standard on Conan 2.x class TestPackageConan(ConanFile): settings = "os", "arch", "compiler", "build_type" - generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" - test_type = "explicit" + generators = "CMakeDeps", "CMakeToolchain" def layout(self): cmake_layout(self) diff --git a/docs/package_templates/header_only/all/test_package/test_package.cpp b/docs/package_templates/header_only/all/test_package/test_package.cpp index 8e653f30a5476..7480c357a3b18 100644 --- a/docs/package_templates/header_only/all/test_package/test_package.cpp +++ b/docs/package_templates/header_only/all/test_package/test_package.cpp @@ -1,14 +1,19 @@ #include -#include #include "package/foobar.hpp" int main(void) { - std::cout << "Create a minimal usage for the target project here." << std::endl; - std::cout << "Avoid big examples, bigger than 100 lines" << std::endl; - std::cout << "Avoid networking connections." << std::endl; - std::cout << "Avoid background apps or servers." << std::endl; - std::cout << "The propose is testing the generated artifacts only." << std::endl; + /* + * TODO: Remove this comment before pushing the testing code; + * + * Create a minimal usage for the target project here; + * Avoid upstream full examples, or code bigger than 15 lines; + * Avoid networking connections; + * Avoid background apps or servers; + * Avoid GUI apps; + * Avoid extra files like images, sounds and other binaries; + * The propose is testing the generated artifacts ONLY; + */ foobar.print_version(); diff --git a/docs/package_templates/header_only/config.yml b/docs/package_templates/header_only/config.yml index a885cbf942a74..d07c95e596619 100644 --- a/docs/package_templates/header_only/config.yml +++ b/docs/package_templates/header_only/config.yml @@ -1,5 +1,4 @@ versions: - # Newer versions at the top "1.2.0": folder: all "1.1.0": diff --git a/docs/package_templates/meson_package/all/conandata.yml b/docs/package_templates/meson_package/all/conandata.yml index 629a5640adc16..e11d72dbcdc2b 100644 --- a/docs/package_templates/meson_package/all/conandata.yml +++ b/docs/package_templates/meson_package/all/conandata.yml @@ -1,17 +1,13 @@ sources: - # Newer versions at the top "1.2.0": url: - "https://mirror1.net/package-1.2.0.tar.gz" - "https://mirror2.net/package-1.2.0.tar.gz" sha256: "________________________________________________________________" "1.1.0": - url: - - "https://mirror1.net/package-1.1.0.tar.gz" - - "https://mirror2.net/package-1.1.0.tar.gz" + url: "https://mirror2.net/package-1.1.0.tar.gz" sha256: "________________________________________________________________" patches: - # Newer versions at the top "1.1.0": - patch_file: "patches/0001-fix-cmake.patch" patch_description: "correct the order of cmake min and project" diff --git a/docs/package_templates/meson_package/all/conanfile.py b/docs/package_templates/meson_package/all/conanfile.py index 617e18d12f4ad..19ae7296e875f 100644 --- a/docs/package_templates/meson_package/all/conanfile.py +++ b/docs/package_templates/meson_package/all/conanfile.py @@ -2,8 +2,7 @@ from conan.errors import ConanInvalidConfiguration from conan.tools.apple import fix_apple_shared_install_name from conan.tools.build import check_min_cppstd -from conan.tools.env import VirtualBuildEnv -from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, replace_in_file, rm, rmdir +from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rm, rmdir from conan.tools.gnu import PkgConfigDeps from conan.tools.layout import basic_layout from conan.tools.meson import Meson, MesonToolchain @@ -12,7 +11,7 @@ import os -required_conan_version = ">=1.53.0" +required_conan_version = ">=2.0" # # INFO: Please, remove all comments before pushing your PR! @@ -23,13 +22,13 @@ class PackageConan(ConanFile): name = "package" description = "short description" # Use short name only, conform to SPDX License List: https://spdx.org/licenses/ - # In case not listed there, use "LicenseRef-" + # In case not listed there, use "DocumentRef-:LicenseRef-" license = "" url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/project/package" # no "conan" and project name in topics. Use topics from the upstream listed on GH topics = ("topic1", "topic2", "topic3") - # package_type should usually be "library" (if there is shared option) + # package_type should usually be "library", "shared-library" or "static-library" package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { @@ -42,75 +41,57 @@ class PackageConan(ConanFile): "fPIC": True, "feature": True, } - - @property - def _min_cppstd(self): - return 14 - - # in case the project requires C++14/17/20/... the minimum compiler version should be listed - @property - def _compilers_minimum_version(self): - return { - "apple-clang": "10", - "clang": "7", - "gcc": "7", - "msvc": "191", - "Visual Studio": "15", - } + implements = ["auto_shared_fpic"] # no exports_sources attribute, but export_sources(self) method instead - # this allows finer grain exportation of patches per version def export_sources(self): export_conandata_patches(self) - def config_options(self): - if self.settings.os == "Windows": - del self.options.fPIC - def configure(self): - if self.options.shared: - self.options.rm_safe("fPIC") - # for plain C projects only + # for plain C projects only. Otherwise, remove this method. self.settings.rm_safe("compiler.cppstd") self.settings.rm_safe("compiler.libcxx") def layout(self): - # src_folder must use the same source folder name the project basic_layout(self, src_folder="src") def requirements(self): - # prefer self.requires method instead of requires attribute + # Prefer self.requirements() method instead of self.requires attribute. self.requires("dependency/0.8.1") + if self.options.with_foobar: + # INFO: used in foo/baz.hpp:34 + self.requires("foobar/0.1.0") + # Some dependencies on CCI are allowed to use version ranges. + # See https://github.com/conan-io/conan-center-index/blob/master/docs/adding_packages/dependencies.md#version-ranges + self.requires("openssl/[>=1.1 <4]") def validate(self): # validate the minimum cpp standard supported. For C++ projects only - if self.settings.compiler.get_safe("cppstd"): - check_min_cppstd(self, self._min_cppstd) - minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) - if minimum_version and Version(self.settings.compiler.version) < minimum_version: - raise ConanInvalidConfiguration( - f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." - ) - # in case it does not work in another configuration, it should validated here too + check_min_cppstd(self, 14) + # in case it does not work in another configuration, it should be validated here too + # Always comment the reason including the upstream issue. + # INFO: Upstream does not support DLL: See if is_msvc(self) and self.info.options.shared: raise ConanInvalidConfiguration(f"{self.ref} can not be built as shared on Visual Studio and msvc.") # if another tool than the compiler or Meson is required to build the project (pkgconf, bison, flex etc) def build_requirements(self): # CCI policy assumes that Meson may not be installed on consumers machine - self.tool_requires("meson/1.2.3") + self.tool_requires("meson/[>=1.2.3 <2]") # pkgconf is largely used by Meson, it should be added in build requirement when there are dependencies if not self.conf.get("tools.gnu:pkg_config", default=False, check_type=str): - self.tool_requires("pkgconf/2.0.3") + self.tool_requires("pkgconf/[>=2.2 <3]") def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) + # apply patches listed in conandata.yml + # Using patches is always the last resort to fix issues. If possible, try to fix the issue in the upstream project. + apply_conandata_patches(self) def generate(self): # Meson feature options must be set to "enabled" or "disabled" - feature = lambda option: "enabled" if option else "disabled" - - # default_library and b_staticpic are automatically parsed when self.options.shared and self.options.fpic exist + def feature(v): return "enabled" if v else "disabled" + # default_library and static and fpic are automatically parsed when self.options.shared and self.options.fpic exist # buildtype is automatically parsed for self.settings tc = MesonToolchain(self) # In case need to pass definitions directly to the compiler @@ -122,21 +103,11 @@ def generate(self): # Meson project options may vary their types tc.project_options["tests"] = False tc.generate() - # In case there are dependencies listed on requirements, PkgConfigDeps should be used - tc = PkgConfigDeps(self) - tc.generate() - # In case there are dependencies listed on build_requirements, VirtualBuildEnv should be used - tc = VirtualBuildEnv(self) - tc.generate() - - def _patch_sources(self): - apply_conandata_patches(self) - # remove bundled xxhash - rm(self, "whateer.*", os.path.join(self.source_folder, "lib")) - replace_in_file(self, os.path.join(self.source_folder, "meson.build"), "...", "") + # In case there are dependencies listed under requirements, PkgConfigDeps should be used + deps = PkgConfigDeps(self) + deps.generate() def build(self): - self._patch_sources() # It can be apply_conandata_patches(self) only in case no more patches are needed meson = Meson(self) meson.configure() meson.build() @@ -146,11 +117,11 @@ def package(self): meson = Meson(self) meson.install() - # some files extensions and folders are not allowed. Please, read the FAQs to get informed. + # Some files extensions and folders are not allowed. Please, read the FAQs to get informed. + # Consider disabling these at first to verify that the package_info() output matches the info exported by the project. rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) rmdir(self, os.path.join(self.package_folder, "share")) - rm(self, "*.pdb", os.path.join(self.package_folder, "lib")) - rm(self, "*.pdb", os.path.join(self.package_folder, "bin")) + rm(self, "*.pdb", self.package_folder, recursive=True) # In shared lib/executable files, meson set install_name (macOS) to lib dir absolute path instead of @rpath, it's not relocatable, so fix it fix_apple_shared_install_name(self) diff --git a/docs/package_templates/meson_package/all/test_package/conanfile.py b/docs/package_templates/meson_package/all/test_package/conanfile.py index 8adddf3b7b73c..577771653eaef 100644 --- a/docs/package_templates/meson_package/all/test_package/conanfile.py +++ b/docs/package_templates/meson_package/all/test_package/conanfile.py @@ -5,11 +5,9 @@ import os -# It will become the standard on Conan 2.x class TestPackageConan(ConanFile): settings = "os", "arch", "compiler", "build_type" - generators = "PkgConfigDeps", "MesonToolchain", "VirtualRunEnv", "VirtualBuildEnv" - test_type = "explicit" + generators = "PkgConfigDeps", "MesonToolchain" def layout(self): basic_layout(self) @@ -18,9 +16,9 @@ def requirements(self): self.requires(self.tested_reference_str) def build_requirements(self): - self.tool_requires("meson/1.2.3") + self.tool_requires("meson/[>=1.2.3 <2]") if not self.conf.get("tools.gnu:pkg_config", default=False, check_type=str): - self.tool_requires("pkgconf/2.0.3") + self.tool_requires("pkgconf/[>=2.2 <3]") def build(self): meson = Meson(self) diff --git a/docs/package_templates/meson_package/all/test_package/test_package.cpp b/docs/package_templates/meson_package/all/test_package/test_package.cpp index 315875d954777..7480c357a3b18 100644 --- a/docs/package_templates/meson_package/all/test_package/test_package.cpp +++ b/docs/package_templates/meson_package/all/test_package/test_package.cpp @@ -1,16 +1,19 @@ #include -#include #include "package/foobar.hpp" int main(void) { /* - * Create a minimal usage for the target project here. - * Avoid big examples, bigger than 100 lines. - * Avoid networking connections. - * Avoid background apps or servers. - * The propose is testing the generated artifacts only. - */ + * TODO: Remove this comment before pushing the testing code; + * + * Create a minimal usage for the target project here; + * Avoid upstream full examples, or code bigger than 15 lines; + * Avoid networking connections; + * Avoid background apps or servers; + * Avoid GUI apps; + * Avoid extra files like images, sounds and other binaries; + * The propose is testing the generated artifacts ONLY; + */ foobar.print_version(); diff --git a/docs/package_templates/meson_package/config.yml b/docs/package_templates/meson_package/config.yml index a885cbf942a74..d07c95e596619 100644 --- a/docs/package_templates/meson_package/config.yml +++ b/docs/package_templates/meson_package/config.yml @@ -1,5 +1,4 @@ versions: - # Newer versions at the top "1.2.0": folder: all "1.1.0": diff --git a/docs/package_templates/msbuild_package/all/conandata.yml b/docs/package_templates/msbuild_package/all/conandata.yml index 629a5640adc16..5f2e653489b97 100644 --- a/docs/package_templates/msbuild_package/all/conandata.yml +++ b/docs/package_templates/msbuild_package/all/conandata.yml @@ -1,5 +1,4 @@ sources: - # Newer versions at the top "1.2.0": url: - "https://mirror1.net/package-1.2.0.tar.gz" @@ -11,7 +10,6 @@ sources: - "https://mirror2.net/package-1.1.0.tar.gz" sha256: "________________________________________________________________" patches: - # Newer versions at the top "1.1.0": - patch_file: "patches/0001-fix-cmake.patch" patch_description: "correct the order of cmake min and project" diff --git a/docs/package_templates/msbuild_package/all/conanfile.py b/docs/package_templates/msbuild_package/all/conanfile.py index ca164fc1620f8..900972af0dc8f 100644 --- a/docs/package_templates/msbuild_package/all/conanfile.py +++ b/docs/package_templates/msbuild_package/all/conanfile.py @@ -6,20 +6,20 @@ import os -required_conan_version = ">=1.53.0" +required_conan_version = ">=2.0" class PackageConan(ConanFile): name = "package" description = "short description" # Use short name only, conform to SPDX License List: https://spdx.org/licenses/ - # In case not listed there, use "LicenseRef-" + # In case not listed there, use "DocumentRef-:LicenseRef-" license = "" url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/project/package" # no "conan" and project name in topics. Use topics from the upstream listed on GH topics = ("topic1", "topic2", "topic3") - # package_type should usually be "library" (if there is shared option) + # package_type should usually be "library", "shared-library" or "static-library" package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { @@ -30,20 +30,14 @@ class PackageConan(ConanFile): "shared": False, "fPIC": True, } + implements = ["auto_shared_fpic"] # no exports_sources attribute, but export_sources(self) method instead - # this allows finer grain exportation of patches per version def export_sources(self): export_conandata_patches(self) - def config_options(self): - if self.settings.os == "Windows": - del self.options.fPIC - def configure(self): - if self.options.shared: - self.options.rm_safe("fPIC") - # for plain C projects only + # for plain C projects only. Otherwise, this method is not needed self.settings.rm_safe("compiler.cppstd") self.settings.rm_safe("compiler.libcxx") @@ -51,11 +45,19 @@ def layout(self): basic_layout(self, src_folder="src") def requirements(self): - # prefer self.requires method instead of requires attribute + # Prefer self.requirements() method instead of self.requires attribute. self.requires("dependency/0.8.1") + if self.options.with_foobar: + # used in foo/baz.hpp:34 + self.requires("foobar/0.1.0") + # A small number of dependencies on CCI are allowed to use version ranges. + # See https://github.com/conan-io/conan-center-index/blob/master/docs/adding_packages/dependencies.md#version-ranges + self.requires("openssl/[>=1.1 <4]") def validate(self): - # in case it does not work in another configuration, it should validated here too + # in case it does not work in another configuration, it should be validated here too + # Always comment the reason including the upstream issue. + # INFO: Upstream does not support DLL: See if not is_msvc(self): raise ConanInvalidConfiguration(f"{self.ref} can be built only by Visual Studio and msvc.") @@ -65,6 +67,9 @@ def build_requirements(self): def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) + # apply patches listed in conandata.yml + # Using patches is always the last resort to fix issues. If possible, try to fix the issue in the upstream project. + apply_conandata_patches(self) @property def _msbuild_configuration(self): @@ -88,37 +93,7 @@ def generate(self): deps.configuration = self._msbuild_configuration deps.generate() - def _patch_sources(self): - apply_conandata_patches(self) - # remove bundled xxhash - rm(self, "whateer.*", os.path.join(self.source_folder, "lib")) - replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), "...", "") - - # Allows to inject platform toolset, and props file generated by MSBuildToolchain & MSBuildDeps - # TODO: to remove once https://github.com/conan-io/conan/pull/12817 available in conan client - vcxproj_files = ["path/to/vcxproj_file1", "path/to/vcxproj_file2", "..."] - platform_toolset = MSBuildToolchain(self).toolset - import_conan_generators = "" - for props_file in ["conantoolchain.props", "conandeps.props"]: - props_path = os.path.join(self.generators_folder, props_file) - if os.path.exists(props_path): - import_conan_generators += f"" - for vcxproj_file in vcxproj_files: - replace_in_file( - self, vcxproj_file, - # change this v142 value depending on actual value in vcxproj file - "v142", - f"{platform_toolset}", - ) - if props_path: - replace_in_file( - self, vcxproj_file, - "", - f"{import_conan_generators}", - ) - def build(self): - self._patch_sources() # It can be apply_conandata_patches(self) only in case no more patches are needed msbuild = MSBuild(self) msbuild.build_type = self._msbuild_configuration # customize according the solution file and compiler version diff --git a/docs/package_templates/msbuild_package/all/test_package/CMakeLists.txt b/docs/package_templates/msbuild_package/all/test_package/CMakeLists.txt index 69086f9b189e8..c16ec6d748476 100644 --- a/docs/package_templates/msbuild_package/all/test_package/CMakeLists.txt +++ b/docs/package_templates/msbuild_package/all/test_package/CMakeLists.txt @@ -1,10 +1,7 @@ cmake_minimum_required(VERSION 3.15) - -project(test_package LANGUAGES C) # if the project is pure C -# project(test_package LANGUAGES CXX) # if the project uses C++ +project(test_package LANGUAGES CXX) find_package(package REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) -# don't link to ${CONAN_LIBS} or CONAN_PKG::package target_link_libraries(${PROJECT_NAME} PRIVATE package::package) diff --git a/docs/package_templates/msbuild_package/all/test_package/conanfile.py b/docs/package_templates/msbuild_package/all/test_package/conanfile.py index 02eb5ce439fb4..2e77b4246fa81 100644 --- a/docs/package_templates/msbuild_package/all/test_package/conanfile.py +++ b/docs/package_templates/msbuild_package/all/test_package/conanfile.py @@ -4,18 +4,16 @@ import os -# It will become the standard on Conan 2.x class TestPackageConan(ConanFile): settings = "os", "arch", "compiler", "build_type" - generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" - test_type = "explicit" - - def requirements(self): - self.requires(self.tested_reference_str) + generators = "CMakeDeps", "CMakeToolchain" def layout(self): cmake_layout(self) + def requirements(self): + self.requires(self.tested_reference_str) + def build(self): cmake = CMake(self) cmake.configure() diff --git a/docs/package_templates/msbuild_package/all/test_package/test_package.cpp b/docs/package_templates/msbuild_package/all/test_package/test_package.cpp index 8e653f30a5476..7480c357a3b18 100644 --- a/docs/package_templates/msbuild_package/all/test_package/test_package.cpp +++ b/docs/package_templates/msbuild_package/all/test_package/test_package.cpp @@ -1,14 +1,19 @@ #include -#include #include "package/foobar.hpp" int main(void) { - std::cout << "Create a minimal usage for the target project here." << std::endl; - std::cout << "Avoid big examples, bigger than 100 lines" << std::endl; - std::cout << "Avoid networking connections." << std::endl; - std::cout << "Avoid background apps or servers." << std::endl; - std::cout << "The propose is testing the generated artifacts only." << std::endl; + /* + * TODO: Remove this comment before pushing the testing code; + * + * Create a minimal usage for the target project here; + * Avoid upstream full examples, or code bigger than 15 lines; + * Avoid networking connections; + * Avoid background apps or servers; + * Avoid GUI apps; + * Avoid extra files like images, sounds and other binaries; + * The propose is testing the generated artifacts ONLY; + */ foobar.print_version(); diff --git a/docs/package_templates/msbuild_package/config.yml b/docs/package_templates/msbuild_package/config.yml index a885cbf942a74..d07c95e596619 100644 --- a/docs/package_templates/msbuild_package/config.yml +++ b/docs/package_templates/msbuild_package/config.yml @@ -1,5 +1,4 @@ versions: - # Newer versions at the top "1.2.0": folder: all "1.1.0": diff --git a/docs/package_templates/prebuilt_tool_package/all/conandata.yml b/docs/package_templates/prebuilt_tool_package/all/conandata.yml index efcc89654623a..b9d6d85ec79e3 100644 --- a/docs/package_templates/prebuilt_tool_package/all/conandata.yml +++ b/docs/package_templates/prebuilt_tool_package/all/conandata.yml @@ -1,5 +1,4 @@ sources: - # Newer versions at the top "1.2.0": "Windows": "x86_64": diff --git a/docs/package_templates/prebuilt_tool_package/all/conanfile.py b/docs/package_templates/prebuilt_tool_package/all/conanfile.py index aa042fd087498..eb1d1e11e7805 100644 --- a/docs/package_templates/prebuilt_tool_package/all/conanfile.py +++ b/docs/package_templates/prebuilt_tool_package/all/conanfile.py @@ -5,7 +5,7 @@ import os -required_conan_version = ">=1.47.0" +required_conan_version = ">=2.0" class PackageConan(ConanFile): @@ -19,7 +19,7 @@ class PackageConan(ConanFile): package_type = "application" settings = "os", "arch", "compiler", "build_type" # even for pre-built executables - # not needed but supress warning message from conan commands + # not needed but suppress warning message from conan commands def layout(self): pass @@ -37,7 +37,7 @@ def validate(self): def source(self): pass - # download the source here, than copy to package folder + # download the source here, then copy to package folder def build(self): get( self, @@ -58,7 +58,3 @@ def package_info(self): self.cpp_info.libdirs = [] self.cpp_info.resdirs = [] self.cpp_info.includedirs = [] - - # TODO: Legacy, to be removed on Conan 2.0 - bin_folder = os.path.join(self.package_folder, "bin") - self.env_info.PATH.append(bin_folder) diff --git a/docs/package_templates/prebuilt_tool_package/all/test_package/conanfile.py b/docs/package_templates/prebuilt_tool_package/all/test_package/conanfile.py index b3a58664b7d6b..0358d4cb99039 100644 --- a/docs/package_templates/prebuilt_tool_package/all/test_package/conanfile.py +++ b/docs/package_templates/prebuilt_tool_package/all/test_package/conanfile.py @@ -1,12 +1,12 @@ from conan import ConanFile -from conan.tools.build import can_run +from conan.tools.layout import basic_layout -# It will become the standard on Conan 2.x class TestPackageConan(ConanFile): settings = "os", "arch", "compiler", "build_type" - generators = "VirtualBuildEnv" - test_type = "explicit" + + def layout(self): + basic_layout(self) def build_requirements(self): self.tool_requires(self.tested_reference_str) diff --git a/docs/package_templates/prebuilt_tool_package/config.yml b/docs/package_templates/prebuilt_tool_package/config.yml index a885cbf942a74..d07c95e596619 100644 --- a/docs/package_templates/prebuilt_tool_package/config.yml +++ b/docs/package_templates/prebuilt_tool_package/config.yml @@ -1,5 +1,4 @@ versions: - # Newer versions at the top "1.2.0": folder: all "1.1.0": diff --git a/docs/review_process.md b/docs/review_process.md index b5abea3471d39..bae426df1eaf6 100644 --- a/docs/review_process.md +++ b/docs/review_process.md @@ -1,133 +1,69 @@ # Review process Behind the scenes of conan-center-index, there is a heavily automated process to test and merge pull requests. -As there is a lot of activity from many users and various bots (e.g. bumping versions or updating conventions), many PRs are opened every day. +As there is a lot of activity from many users and many PRs are opened every day. conan-center-index tries to make the process as smooth and simple as possible for the contributors, providing feedback in PRs. In this document will explain the review process in detail. ## Contents - * [conan-center-bot](#conan-center-bot) * [Green build](#green-build) * [Unexpected error](#unexpected-error) * [Avoiding conflicts](#avoiding-conflicts) - * [Draft](#draft) * [Getting your pull request reviewed](#getting-your-pull-request-reviewed) * [Rule of 2 reviews](#rule-of-2-reviews) * [Reviews from others](#reviews-from-others) * [Addressing review comments](#addressing-review-comments) - * [Automatic Merges](#automatic-merges) - * [Merge](#merge) - * [Package available to consume](#package-available-to-consume) - * [Updating web front end](#updating-web-front-end) + * [Package available to consume](#package-available-to-consume) + * [Updating web front end](#updating-web-front-end) * [Stale PRs](#stale-prs) -## [conan-center-bot](https://github.com/conan-center-bot) - -In general, reviews are driven by the automated [bot](https://github.com/conan-center-bot). The bot is responsible for: - -- Adding or removing labels (such as [Bump version](https://github.com/conan-io/conan-center-index/pulls?q=is%3Apr+is%3Aopen+label%3A%22Bump+version%22) or [Docs](https://github.com/conan-io/conan-center-index/pulls?q=is%3Apr+is%3Aopen+label%3ADocs)). -- Writing comments (most of the time, it's a build status, either failure with logs or success). -- Merging pull requests. -- Closing issues (after merging pull requests with GitHub keywords). -- Starting CI builds. -- Assigning CI status (running/failed/successful). - ## Green build The first important prerequisite is ensuring your PR is green (build is successful). It requires a bit of patience, because there are many PRs running and we're building a lot of configurations for a numerous versions of libraries. -Keep attention to the error messages from the bot, and address all the build failures. -The bot tries to provide all the helpful information needed to understand and reproduce an issue, such as: - -- The profile that failed (in other words, the configuration: architecture, operation system, compiler, etc.) -- Failed command line (it might have failed on early stages, like recipe syntax errors, hook errors or later stages, like build or test). -- Logs containing the actual output of the build process (note that some logs like *configure.log* or *CMakeError.log* are not captured, only stdout/stderr). +Keep attention to the error messages from the check tab on your PR, and address all the build failures. +The checks tries to provide all the helpful information needed to understand and reproduce an issue. -If you struggle to fix build errors yourself, you may want to ask for help from other users by mentioning (`@`) individual users in the pull request comments. +If you struggle to fix build errors yourself, you may want to ask for help from other users by mentioning (`@conan-io/barbarians`) group in the pull request comments. ### Unexpected error -Sometimes, build fails with `Unexpected error` message. This indicates an infrastructure problem, and usually it's unrelated to the changes within PR itself. - -To learn more, checkout the [label definition](labels.md#unexpected-error). +Sometimes, build fails with an unexpected error (e.g Pre-Checks hangs forever). This indicates an infrastructure problem, and usually it's unrelated to the changes within PR itself. When this occurs, please, ping `@conan-io/barbarians` in your PR describing your situation. ## Avoiding conflicts -Right now, neither GitHub itself nor conan-center-bot notify about merge conflicts, so it's the contributor's responsibility to periodically check for the conflicts. Pull Requests that have merge conflicts can't be merged, and all the conflicts have to be resolved first. - -Please [synchronize your branch](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork) to take into account the latest changes in the main branch. This is important for ConanCenter to ensure it is building the correct recipe revision, see [this comment](https://github.com/conan-io/conan-center-index/pull/8797#discussion_r781993233) for details. One trick is to look out for comments from the [Community's Conflict PR Bot](https://github.com/prince-chrismc/conan-center-index/blob/patch-41/docs/community_resources.md#bots) which can anticipate possible problems. +Right now, the check `Related Pull Requests` shows other PRs that are affecting the recipe and may result in conflicts, so it's the contributor's responsibility to periodically check for the conflicts. Pull Requests that have merge conflicts can't be merged, and all the conflicts have to be resolved first. -## Draft +In case a PR that affects your recipe is merged first, then, you have to [synchronize your branch](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork) to take into account the latest changes in the main branch. This is important for ConanCenter to ensure it is building the correct recipe revision. -Draft pull requests are also never merged, and they won't likely be reviewed. -Once you're done with your changes, remember to convert from "Draft" to "Normal" pull request. +One trick is to look the [List of open pull requests broken down by recipe](https://github.com/conan-io/conan-center-index/discussions/24240) which can anticipate possible problems. ## Getting your pull request reviewed -Each PR must be reviewed by several reviewers before it will be merged. It cannot be just reviews from anyone, we have two categories of reviewers: - -- Official reviewers: these are active team members who are responsible for developing Conan, ConanCenter, and ConanCenterIndex. -- Community reviewers: this list includes former Conan team members and ConanCenterIndex contributors who are very active and proven to be trusted - they frequently submit pull requests and provide their own useful reviews - -The list or reviewers, located [here](../.c3i/reviewers.yml), -is not constant and will change periodically based on contribution. -That also means **you can be included in this list** as well - submit PRs and provide reviews, and in time you may be added as a trusted contributor. - -> **Note**: GitHubs user interface does not support such custom rules so you should not rely solely on the message it provides. +Each PR must be reviewed before it will be merged. Extra reviews are welcome and appreciated, but the Conan team reviews are required. ### Rule of 2 reviews -At least 2 approving reviews are required, and at least one of them has to be from the official reviewers. -So, it might be 1 official + 1 community, or 2 official, but it couldn't be just 2 community reviews. -Approvals are only counted if they are associated with the latest commit in the PR, while "Change requested" ones (from the Conan team) will persist even if there are new commits. Don't hesitate to dismiss old reviews if the issues have already been addressed. +At least 2 approving reviews are required from maintainers are mandatory to merge a PR. -Pull requests labelled as [`Bump version`](https://github.com/conan-io/conan-center-index/pulls?q=is%3Aopen+is%3Apr+label%3A%22Bump+version%22) -or [`Bump dependencies`](https://github.com/conan-io/conan-center-index/pulls?q=is%3Aopen+is%3Apr+label%3A%22Bump+dependencies%22+) require **just 1 approving review from an official reviewer**. Community reviewers are not required but are still welcome. +Approvals are only counted if they are associated with the latest commit in the PR, while "Change requested" ones (from the Conan team) will persist even if there are new commits. -### Reviews from others +### Reviews from community -All reviews are still valuable and very helpful. Even if you're not listed as an official or community reviewer, **your reviews are very welcome**, so please do not hesitate to provide them. +All reviews are still valuable and very helpful. ### Addressing review comments Please ensure to address the review comments and respond to them in order to get your PR approved and finally merged. -It doesn't always mean accepting all the suggestions, but at least providing a response, so people can understand your position. - -## Automatic Merges - -The bot runs Automatic Merges every 20 minutes. Currently, it can only merge a single PR in this timeframe, so there is a theoretical limit of ~70 PRs merged per day (in practice, it's even less for reasons listed below). -PR is selected for the merge only if: - -- Author is already [approved](https://github.com/conan-io/conan-center-index/issues/4). -- Author has signed the [CLA](https://cla-assistant.io/conan-io/conan-center-index). -- PR is not a Draft. -- PR has a green status (successful build). -- PR doesn't have merge conflicts with `master` branch. -- PR has approved reviews (as described above). -- PR does not have any [official reviewers](#official-reviewers) requesting changes -- Master build is not running already (see below) - -If these conditions are fulfilled, the PR is merged (associated issues are automatically closed), and then the build of `master` is launched. - -The conan-center-bot will perform a [squash and merge](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/incorporating-changes-from-a-pull-request/about-pull-request-merges#squash-and-merge-your-pull-request-commits). You don't need to rebase -your pull request, we ask you not to do it because it will dismiss any reviews and the reviewer will need to restart. - -### Merge - -After merging a pull request, if an actual merge happened (for instance, the recipe changed in PR was already updated in `master` by the time PR merged), -it will introduce a new recipe revision. Therefore, the build should be run one more time, so the `master` build is launched. -In reality this could happen frequently enough if there are multiple PRs aiming to update the same recipe (even if they touch different files in the same recipe). -Such builds can take hours for big packages (like boost), blocking other merges for a while. -So we really appreciate it if changes in `master` to the same recipe are already merged into the proposed PR. +Be polite and open to suggestions. Also, please, read the [code of conduct](code_of_conduct.md) to understand the expected behavior in the community. -### Package available to consume +## Package available to consume -New packages are promoted from the internal repository to ConanCenter. This process is an internal Artifactory promotion that is quite -fast, nevertheless there are some caches and CDNs that need to be invalidated and propagated before the package is finally available for consumption. -The process can take several minutes, so please, consider a *grace period* and understand that the package won't be available immediately. +New packages are promoted from the internal repository to ConanCenter. +The process can take few minutes, so please, consider a *grace period* and understand that the package won't be available immediately. -### Updating web front end +## Updating web front end [ConanCenter](https://conan.io/center/) doesn't directly pull the information from conan-center-index repository. Instead, it's updated by the conan center CI job as its own step. The metadata from the conan repository is @@ -136,4 +72,4 @@ That may explain the fact there are moments when the information showed in the f ## Stale PRs -Conan Center Index uses [stale bot](https://github.com/probot/stale) to close abandoned pull requests. It's configured by [stale.yml](../.github/stale.yml). When a pull request gets stale, we encourage anyone to take ownership of the PR (even submit changes to the author's branch if possible) so existing work doesn't get lost when the pull request is closed without merging. +Conan Center Index uses [stale bot](https://github.com/probot/stale) to close abandoned pull requests. It's configured by [stale.yml](../.github/workflows/stale.yml). When a pull request gets stale, we encourage anyone to take ownership of the PR (even submit changes to the author's branch if possible) so existing work doesn't get lost when the pull request is closed without merging. diff --git a/docs/supported_platforms_and_configurations.md b/docs/supported_platforms_and_configurations.md index 6b1a32e9557cc..d04d4186e6d13 100644 --- a/docs/supported_platforms_and_configurations.md +++ b/docs/supported_platforms_and_configurations.md @@ -4,7 +4,7 @@ ## Contents * [Introduction](#introduction) - * [Build Images](#build-images) + * [Future Steps](#future-steps) * [Windows](#windows) * [Linux](#linux) * [MacOS](#macos) @@ -13,26 +13,28 @@ The pipeline iterates a fixed list of profiles for every Conan reference, it computes the packageID for each profile and discard duplicates. Then it -builds the packages for the remaining profiles and upload them to +builds the packages for the remaining profiles and promoted them to [JFrog ConanCenter](https://conan.io/center/) once the pull-request is merged. -Because duplicated packageIDs are discarded, the pipeline iterates the -profiles always in the same order and the profiles selected to build when -there is a duplicate follow some rules: +Currently, given the following supported platforms and configurations we +are generating **30 different binary packages for a C++ library**. - * Static linkage (option `shared=False`) is preferred over dynamic linking. - * On Windows, `MT/MTd` runtime linkage goes before `MD/MDd` linkage. - * Optimized binaries (`build_type=Release`) are preferred over its _debug_ counterpart. - * Older compiler versions are considered first. - * In Linux, GCC is iterated before Clang. -Currently, given the following supported platforms and configurations we -are generating **136 different binary packages for a C++ library** -and **88 for a C library**. +### Future Steps -### Build Images +With the introduction of our new, more flexible pipeline, +we will be implementing several enhancements to improve our build capabilities and support +a wider range of development environments. The following steps will be taken: -For more information see [conan-io/conan-docker-tools](https://github.com/conan-io/conan-docker-tools) +- Incorporate additional modern GCC versions for Linux builds: + - By adding the latest versions of GCC, we aim to ensure compatibility with the newest C++ standards and features, allowing developers to leverage the latest advancements in the language. +- Integrate more recent Clang versions for Linux builds: + - Clang is known for its fast compilation times and excellent diagnostics. By including more modern versions, we will provide developers with improved performance and better error reporting, enhancing the overall development experience. +- Include updated Apple-Clang versions for macOS builds: + - As macOS continues to evolve, it is crucial to support the latest Apple-Clang versions. This will ensure that our builds are optimized for the latest macOS features and provide a seamless experience for developers working in the Apple ecosystem. +- Add support for Android builds to the pipeline: + - Expanding our pipeline to include Android builds will enable developers to create and test applications for mobile platforms more efficiently. + This addition will help streamline the development process and ensure that our tools are versatile and adaptable to various environments. ## Windows @@ -42,35 +44,28 @@ For more information see [conan-io/conan-docker-tools](https://github.com/conan- > WinSDK version is rolled periodically as [discussed previously](https://github.com/conan-io/conan-center-index/issues/4450). > Please open an issue in case it needs to be updated. - Compilers: Visual Studio: - - - 2019 (19.29.30148) - -- Release (MT/MD) and Debug (MTd, MDd) + - Architectures: x86_64 -- Build types: Release, Debug -- Runtimes: MT/MD (Release), MTd/MDd (Debug) +- Build types: Release +- Runtime: dynamic (MD) - Options: - - Shared, Static (option `"shared": [True, False]` in the recipe when available) - - Header Only (option `"header_only": [True, False]` if available) - -> :warning: The profile with the option `shared=True` and runtime `MT/MTd` is not built. + - Shared, Static (option `"*/*:shared": [True, False]` in the recipe when available) + - Header Only (option `"&:header_only": [True, False]` is only added with the value True) ## Linux - Python: 3.7.17 -- CMake: 3.15.7, 3.18.6 (same version expected after all use [new docker images](https://github.com/conan-io/conan-docker-tools/tree/master/modern)) +- CMake: 3.15.7, 3.18.6 (same version expected after all use [new docker images](https://github.com/conan-io/conan-docker-tools/tree/master/images)) - Compilers: - - GCC versions: 5, 7, 9, 11 - - Clang versions: 13 + - GCC versions: 11 - C++ Standard Library (`libcxx`): - - GCC compiler: `libstdc++`, `libstdc++11` - - Clang compiler: `libstdc++`, `libc++` + - GCC compiler: `libstdc++11` - Architectures: x86_64 -- Build types: Release, Debug +- Build types: Release - Options: - - Shared, Static (option `"shared": [True, False]` in the recipe when available) - - Header Only (option `"header_only": [True, False]` is only added with the value True) + - Shared, Static (option `"*/*:shared": [True, False]` in the recipe when available) + - Header Only (option `"&:header_only": [True, False]` is only added with the value True) ## MacOS @@ -81,7 +76,7 @@ For more information see [conan-io/conan-docker-tools](https://github.com/conan- - Macos deployment target (`minos`): 11.0 - C++ Standard Library (`libcxx`): `libc++` - Architectures: armv8 -- Build types: Release, Debug +- Build types: Release - Options: - - Shared, Static (option ``"shared": [True, False]`` in the recipe when available) - - Header Only (option `"header_only": [True, False]` is only added with the value True) + - Shared, Static (option `"*/*:shared": [True, False]` in the recipe when available) + - Header Only (option `"&:header_only": [True, False]` is only added with the value True) diff --git a/docs/v2_linter.md b/docs/v2_linter.md deleted file mode 100644 index 3d6e3a3f6be33..0000000000000 --- a/docs/v2_linter.md +++ /dev/null @@ -1,71 +0,0 @@ -# Linter to help migration to Conan v2 - - -## Contents - - * [Running the linter locally](#running-the-linter-locally) - * [Import ConanFile from `conan`](#import-conanfile-from-conan) - * [Import tools from `conan`](#import-tools-from-conan) - -We are leveraging on custom Pylint rules. This -linter will run for every pull-request that is submitted to the repository and will -raise some warnings and errors that should be addressed in order to migrate the -recipes to Conan v2. - -It is important to note that these rules are targeting Conan v2 compatibility layer, their -purpose is to fail for v1 syntax that will be no longer available in v2. Even if the syntax -if perfectly valid in Conan v1, the recipe might fail here because it is not v2-compliant. - -> **Note** Some of the errored checks might be just plain Python syntax errors, while -> others might be related to the custom rules added by us. - -Here you can find some examples of the extra rules we are adding: - -## Running the linter locally - -Check the [Developing Recipes](developing_recipes_locally.md#running-the-python-linters) for details. - -## Import ConanFile from `conan` - -The module `conans` is deprecated in Conan v2. Now all the imports should be done from -module `conan`: - -```python -from conan import ConanFile -``` - -## Import tools from `conan` - -All v2-compatible tools are available in module `conan.tools` under different submodules. Recipes -should start to import their tools from this new module. Some of the new tools accept new -argument, please, check the [Conan documentation](https://docs.conan.io/1/reference/conanfile/tools.html). - -Here is a list of different imports and their new equivalent (note that the interface for most of this functions changed, see their respective link to the documentation): - -| **Conan v1** | **Conan v2** | **Required Conan Version** | -|---|---|---| -| conans.tools.get | [conan.tools.files.get](https://docs.conan.io/1/reference/conanfile/tools/files/downloads.html#conan-tools-files-get) | 1.41.0 | -| conans.tools.download | [conan.tools.files.download](https://docs.conan.io/1/reference/conanfile/tools/files/downloads.html#conan-tools-files-download) | 1.41.0 | -| conans.tools.rmdir | [conan.tools.files.rmdir](https://docs.conan.io/1/reference/conanfile/tools/files/basic.html#conan-tools-files-rmdir) | 1.47.0 | -| conans.tools.patch | [conan.tools.files.patch](https://docs.conan.io/1/reference/tools.html#tools-patch) | 1.35.0 | -| conans.tools.remove_files_by_mask | [conan.tools.files.rm](https://docs.conan.io/1/reference/conanfile/tools/files/basic.html#conan-tools-files-rm) | 1.50.0 | -| conans.copy | [conan.tools.files.copy](https://docs.conan.io/1/reference/conanfile/tools/files/basic.html#conan-tools-files-copy) | 1.46.0 | -| conans.tools.load | [conan.tools.files.load](https://docs.conan.io/1/reference/conanfile/tools/files/basic.html#conan-tools-files-load) | 1.35.0 | -| conans.tools.save | [conan.tools.files.save](https://docs.conan.io/1/reference/conanfile/tools/files/basic.html#conan-tools-files-save) | 1.35.0 | -| conans.tools.rename | [conan.tools.files.rename](https://docs.conan.io/1/reference/conanfile/tools/files/basic.html#conan-tools-files-rename) | 1.37.0 | -| conans.tools.replace_in_file | [conan.tools.files.replace_in_file](https://docs.conan.io/1/reference/conanfile/tools/files/basic.html#conan-tools-files-replace-in-file) | 1.46.0 | -| conans.tools.mkdir | [conan.tools.files.mkdir](https://docs.conan.io/1/reference/conanfile/tools/files/basic.html#conan-tools-files-mkdir) | 1.35.0 | -| conans.tools.chdir | [conan.tools.files.chdir](https://docs.conan.io/1/reference/conanfile/tools/files/basic.html#conan-tools-files-chdir) | 1.40.0 | -| conans.tools.unzip | [conan.tools.files.unzip](https://docs.conan.io/1/reference/conanfile/tools/files/basic.html#conan-tools-files-unzip) | 1.46.0 | -| conans.tools.collect_libs | [conan.tools.files.collect_libs](https://docs.conan.io/1/reference/conanfile/tools/files/basic.html#conan-tools-files-collect-libs) | 1.46.0 | -| conans.tools.Version | [conan.tools.scm.Version](https://docs.conan.io/1/reference/conanfile/tools/scm/other.html#version) | 1.46.0 | -| conans.tools.sha256sum | [conan.tools.files.check_sha256](https://docs.conan.io/1/reference/conanfile/tools/files/checksum.html#conan-tools-files-check-sha256) | 1.46.0 | -| conans.tools.unix_path | [conan.tools.microsoft.unix_path](https://docs.conan.io/1/reference/conanfile/tools/microsoft.html#conan-tools-microsoft-unix-path) | 1.47.0 | -| conans.tools.is_apple_os | [conan.tools.apple.is_apple_os](https://docs.conan.io/1/reference/conanfile/tools/apple.html#is-apple-os) | 1.51.3 | -| conans.tools.cpu_count | [conan.tools.build.build_jobs](https://docs.conan.io/1/reference/conanfile/tools/build.html#conan-tools-build-build-jobs) | 1.43.0 | -| conans.tools.check_min_cppstd | [conan.tools.build.check_min_cppstd](https://docs.conan.io/1/reference/conanfile/tools/build.html#conan-tools-build-check-min-cppstd) | 1.50.0 | -| conans.tools.cross_building | [conan.tools.build.cross_building](https://docs.conan.io/1/reference/conanfile/tools/build.html#conan-tools-build-cross-building) | 1.46.0 | -| conans.errors.ConanInvalidConfiguration | [conan.errors.ConanInvalidConfiguration](https://docs.conan.io/1/migrating_to_2.0/recipes.html#migrating-the-recipes) | 1.47.0 | -| conans.errors.ConanException | [conan.errors.ConanException](https://docs.conan.io/1/migrating_to_2.0/recipes.html#migrating-the-recipes) | 1.47.0 | - ---- diff --git a/docs/v2_migration.md b/docs/v2_migration.md deleted file mode 100644 index 9139fefbde135..0000000000000 --- a/docs/v2_migration.md +++ /dev/null @@ -1,147 +0,0 @@ -# Preparing recipes for Conan 2.0 - -This is expected for recipes to be updates in each pull request. - -- Updated helpers are expected, this is enforced by the [v2_linter](v2_linter.md) -- Once a recipe publishes v2 packages, it must pass the v2 pipeline -- The v2 pipeline with **shortly be required** for changes to be merged. - - -## Contents - - * [Using Layout](#using-layout) - * [With New Generators](#with-new-generators) - * [With Multiple Build Helpers](#with-multiple-build-helpers) - * [CMakeToolchain](#cmaketoolchain) - * [New conf_info properties](#new-conf_info-properties) - * [New cpp_info set_property model](#new-cpp_info-set_property-model) - * [Translating .names information to cmake_target_name, cmake_module_target_name and cmake_file_name](#translating-names-information-to-cmake_target_name-cmake_module_target_name-and-cmake_file_name) - * [Translating .filenames information to cmake_file_name, cmake_module_file_name and cmake_find_mode](#translating-filenames-information-to-cmake_file_name-cmake_module_file_name-and-cmake_find_mode) - * [Translating .build_modules to cmake_build_modules](#translating-build_modules-to-cmake_build_modules) - * [PkgConfigDeps](#pkgconfigdeps) - -> **Note**: Read about the [linter in pull requests](v2_linter.md) to learn how this is being enforced. - -It's time to start thinking seriously about Conan v2 and prepare recipes -for the incoming changes. Conan v2 comes with many -changes and improvements, you can read about them in the -[Conan documentation](https://docs.conan.io/1/conan_v2.html). - -This document is a practical guide, offering extended information particular to Conan -Center Index recipes to get them ready to upgrade to Conan 2.0. - -## Using Layout - -All recipes should use a layout. Without one, more manual configuration of folders (e.g. source, build, etc) -and package structure will be required. - -### With New Generators - -When doing this there is no need to manually define `self._subfolder_[...]` in a recipe. -Simply use `self.source_folder` and `self.build_folder` instead of "subfolder properties" that used to be the norm. - -### With Multiple Build Helpers - -When different build tools are use, at least one layout needs to be set. - -```python - def layout(self): - if self._use_cmake(): - cmake_layout(self) - else: # using autotools - basic_layout(self) -``` - -The `src_folder` must be the same when using different layouts and should -not depend on settings or options. - -## CMakeToolchain - -The old `CMake.definition` should be replaced by `CMakeToolchain.variables` and moved to the `generate` method. -However, certain options need to be passed as `cache_variables`. You'll need to check project's `CMakeLists.txt` -as there are a few cases to look out for: - -- When an `option` is configured before `project()` is called. - - ```cmake - cmake_minimum_required(3.1) - option(BUILD_EXAMPLES "Build examples using foorbar") - project(foobar) - ``` - -- When an variable is declared with `CACHE`. - - ```cmake - cmake_minimum_required(3.1) - project(foobar) - set(USE_JPEG ON CACHE BOOL "include jpeg support?") - ``` - -For more information refere to the [CMakeToolchain docs](https://docs.conan.io/1/reference/conanfile/tools/cmake/cmaketoolchain.html) -or check out the converstaion in conan-io/conan#11937 for the brave. - -## New conf_info properties - -As described in the documentation `self.user_info` has been depreated and you are now required to use -`self.conf_info` to define individual properties to expose to downstream recipes. -The [2.0 migrations docs](https://docs.conan.io/1/migrating_to_2.0/recipes.html#removed-self-user-info) -should cover the technical details, however for ConanCenterIndex we need to make sure there are no collisions -`conf_info` must be named `user.:`. - -For usage options of `conf_info`, the [documenation](https://docs.conan.io/1/reference/config_files/global_conf.html?highlight=conf_info#configuration-in-your-recipes) - -In ConanCenterIndex this will typically looks like: - -- defining a value - ```py - def package_info(self): - tool_path = os.path.join(self.package_folder, "bin", "tool") - self.conf_info.define("user.pkg:tool", tool_path) - ``` -- using a value - ```py - #generators = "VirtualBuildEnv", "VirtualRunEnv" - - def build_requirements(self): - self.tool_requires("tool/0.1") - - def build(self): - tool_path = self.conf_info.get("user.pkg:tool") - self.run(f"{tool_path} --build") - ``` - -> **Note**: This should only be used when absolutely required. In the vast majority of cases, the new -> ["Environments"](https://docs.conan.io/1/reference/conanfile/tools/env/environment.html?highlight=Virtual) -> will include the `self.cpp_info.bindirs` which will provide access to the tools in the correct scopes. - -## New cpp_info set_property model - -New Conan generators like -[CMakeDeps](https://docs.conan.io/1/reference/conanfile/tools/cmake/cmakedeps.html) -and -[PkgConfigDeps](https://docs.conan.io/1/reference/conanfile/tools/gnu/pkgconfigdeps.html), -don't listen to `cpp_info`'s ``.names``, ``.filenames`` or ``.build_modules`` attributes. -There is a new way of setting the `cpp_info` information with these -generators using the ``set_property(property_name, value)`` method. - -Both of these two models **will live together in recipes** to make -recipes compatible for both 1.x and 2.0 users. Deprecated feilds are not to be removed at this time. - -To understand the impact of these and the relation between different generates, refer to the -[migrating properties](https://docs.conan.io/1/migrating_to_2.0/properties.html) documentation. - -### Translating .names information to cmake_target_name, cmake_module_target_name and cmake_file_name - -The variation of `names` is covered by the [Conan documentation](https://docs.conan.io/1/migrating_to_2.0/properties.html#migrating-from-names-to-cmake-target-name). - -### Translating .filenames information to cmake_file_name, cmake_module_file_name and cmake_find_mode - -As for `filenames`, refer to [this section](https://docs.conan.io/1/migrating_to_2.0/properties.html#migrating-from-filenames-to-cmake-file-name). - -### Translating .build_modules to cmake_build_modules - -The variation of `build_modules` is covered by the [Conan documentation](https://docs.conan.io/1/migrating_to_2.0/properties.html#translating-build-modules-to-cmake-build-modules). - -### PkgConfigDeps - -For migrating, `names` used with `pkg_config`, see [Conan documentation](https://docs.conan.io/1/migrating_to_2.0/properties.html#migration-from-names-to-pkg-config-name) diff --git a/docs/v2_roadmap.md b/docs/v2_roadmap.md deleted file mode 100644 index 324ec01c47527..0000000000000 --- a/docs/v2_roadmap.md +++ /dev/null @@ -1,150 +0,0 @@ -# Road to Conan v2 - - -## Contents - - * [Short term](#short-term) - * [Prepare the CI infrastructure](#prepare-the-ci-infrastructure) - * [Export recipes using Conan v2 (warning)](#export-recipes-using-conan-v2-warning) - * [Prepare a syntax linter (CCI specific)](#prepare-a-syntax-linter-cci-specific) - * [Run an scheduled job exporting all recipes](#run-an-scheduled-job-exporting-all-recipes) - * [Mid term](#mid-term) - * [Add CI running Conan v2 (hidden)](#add-ci-running-conan-v2-hidden) - * [Show CI results to contributors (info)](#show-ci-results-to-contributors-info) - * [Linter - turn more warnings to errors](#linter---turn-more-warnings-to-errors) - * [Export using Conan v2 becomes an error](#export-using-conan-v2-becomes-an-error) - * [Long term](#long-term) - * [CI running v2 is reported (and required)](#ci-running-v2-is-reported-and-required) - * [Conan v2 remote](#conan-v2-remote) - * [Webpage with v2 information](#webpage-with-v2-information) - * [Future](#future) - * [CI running Conan v1 dropping configuration support](#ci-running-conan-v1-dropping-configuration-support) - -> **Note** This document is not a [guide about how to migrate recipes to Conan v2](v2_migration.md). - -> **Note** This is a working document that will be updated as we walk -> this path. There are no dates intentionally, and if any they should be -> considered as an estimation, there are still some unknowns to provide -> certain steps and dates. - -Conan v2 is under heavy development and it will be released in the -following months. It comes with many improvements that will benefit -recipes and users, and we are willing to adopt it. - -It is a new major version that will come with many breaking changes. Lot -of the features and syntax that we were used to in Conan v1 will no longer -be available and will be supersedes by improved alternatives. All these -alternatives should be backported to v1.x releases, so **there will be a -subset of features that will work using Conan v1 and v2**. - -**Our main goal in ConanCenter during this migration process is to ensure -that recipes work with v1 and v2** and to make the transition as smooth as -possible for contributors and users. In the end we will be providing -working recipes and binaries for both versions. - -This process will require a lot of work also in the internals, we will keep -communicating those changes and the relevant updates in the -[changelog](changelog.md). Here there are the main steps that we are -planning for the following months. - -## Short term - -### Prepare the CI infrastructure - -Workers for Conan v2 will be ready for Windows, Macos and Linux alternatives. -[Modern docker images](https://github.com/conan-io/conan-docker-tools/tree/master/modern) with Conan v2 are already -available to use, for example `conanio/gcc11-ubuntu16.04:2.0.0-pre`. -Note that we will be using tag name `2.0.0-pre` until there is an -actual Conan v2 release, this tag will use the latest pre-release -available (alpha, beta or release candidate). - -### Export recipes using Conan v2 (warning) - -We will start to run `conan export` using Conan v2 and the result will be -added to the comments by the bot. Failing this command won't make the -pull-request fail at this moment, but we expect contributors to start -gaining awareness about changes in Conan v2. - -### Prepare a syntax linter (CCI specific) - -We want to provide a Conan recipe's linter in this repository. We will add -warnings and errors to it following the pace dictated by the community. -The purpose is that this linter will fail pull-requests if there is any -error and, this way, we can start to migrate small (and easy) bits of -recipes... and ensure that future pull-requests don't introduce -regressions. - -This linter can (and surely will) implement some of the checks that are -being currently done by [hooks](https://github.com/conan-io/hooks), but -the purpose is not replace them: - -* hooks are really useful from the CLI, and are easier to install and run. -* linter provides much better output in GitHub interface. - -### Run an scheduled job exporting all recipes - -The same way we [export all the recipes every night using Conan v1](https://github.com/conan-io/conan-center-index/issues/2232), we will -run something similar using Conan v2 and report the results to an issue in -this repository. - -It will help us to know how many recipes are fixed at a given time and -think about efforts and impact of next steps. - -## Mid term - -### Add CI running Conan v2 (hidden) - -We will start working on a CI running Conan v2. Once recipes start to be -exported successfully, next step is to start building the packages. - -We are going to prepare the CI and start running it behind the scenes -(sorry, at this moment hidden to users) in order to understand and -experiment ourself some challenges that will come with Conan v2: syntax, -configuration defaults,... - -### Show CI results to contributors (info) - -Once the errors start to make sense, we will start to provide these outputs -in pull-requests (although successful builds using v2 won't be required to -merge). Again, we expect some contributors to be aware of these errors, -maybe try to fix those builds, and for sure report feedback. - -### Linter - turn more warnings to errors - -During all this time, the plan is to move linter warnings to errors, one -by one and taking into account the effort required to fix them. With the -help of the linter more recipes should start to work (just `conan export`) -using Conan v2. - -### Export using Conan v2 becomes an error - -When a significant number (TBD) of recipes start to be exported -successfully, we will turn those export warnings into actual errors and -they will be become required to merge the pull-requests - -## Long term - -### CI running v2 is reported (and required) - -Next step is to start running and reporting the results of the builds using -v2 for all the configurations, like we do for Conan v1. At this time all -pull-requests need to work with v1 and v2 to be merged. - -### Conan v2 remote - -Packages built using Conan v2 are available for users on ``conancenter`` remote. - -### Webpage with v2 information - -ConanCenter webpage will start to show relevant information related to v2 -packages and, eventually, v2 information will be the only available. - -## Future - -After this process in completed, we will consider the deprecation and -decommission of the infrastructure to generate v1 packages. - -### CI running Conan v1 dropping configuration support - -The change should occur by steps, less used configurations, like older compiler versions, will be dropped first. -Any changed will notified before to occur, so users can be prepared. diff --git a/linter/__init__.py b/linter/__init__.py deleted file mode 100644 index e69de29bb2d1d..0000000000000 diff --git a/linter/check_import_conanfile.py b/linter/check_import_conanfile.py deleted file mode 100644 index bd5a90391b096..0000000000000 --- a/linter/check_import_conanfile.py +++ /dev/null @@ -1,28 +0,0 @@ - -from pylint.checkers import BaseChecker -from pylint.interfaces import IAstroidChecker -from astroid import nodes, Const, AssignName - - -class ImportConanFile(BaseChecker): - """ - Import ConanFile from new 'conan' module - """ - - __implements__ = IAstroidChecker - - name = "conan-import-conanfile" - msgs = { - "E9006": ( - "Import ConanFile from new module: `from conan import ConanFile`. Old import is deprecated in Conan v2.", - "conan-import-conanfile", - "Import ConanFile from new module: `from conan import ConanFile`. Old import is deprecated in Conan v2.", - ), - } - - def visit_importfrom(self, node: nodes.ImportFrom) -> None: - basename = node.modname - if basename == 'conans': - names = [name for name, _ in node.names] - if 'ConanFile' in names: - self.add_message("conan-import-conanfile", node=node) diff --git a/linter/check_import_errors.py b/linter/check_import_errors.py deleted file mode 100644 index b6a0ac1aa9973..0000000000000 --- a/linter/check_import_errors.py +++ /dev/null @@ -1,77 +0,0 @@ - -from pylint.checkers import BaseChecker -from pylint.interfaces import IAstroidChecker -from astroid import nodes, Const, AssignName - - -class ImportErrors(BaseChecker): - """ - Import errors from new 'conan' module - """ - - __implements__ = IAstroidChecker - - name = "conan-import-errors" - msgs = { - "E9008": ( - "Import errors from new module: `from conan import errors`. Old import is deprecated in Conan v2.", - "conan-import-errors", - "Import errors from new module: `from conan import errors`. Old import is deprecated in Conan v2.", - ), - } - - def visit_importfrom(self, node: nodes.ImportFrom) -> None: - basename = node.modname - if basename == 'conans': - names = [name for name, _ in node.names] - if 'errors' in names: - self.add_message("conan-import-errors", node=node) - - -class ImportErrorsConanException(BaseChecker): - """ - Import errors from new 'conan' module - """ - - __implements__ = IAstroidChecker - - name = "conan-import-error-conanexception" - msgs = { - "E9009": ( - "Import ConanException from new module: `from conan.errors import ConanException`. Old import is deprecated in Conan v2.", - "conan-import-error-conanexception", - "Import ConanException from new module: `from conan.errors import ConanException`. Old import is deprecated in Conan v2.", - ), - } - - def visit_importfrom(self, node: nodes.ImportFrom) -> None: - basename = node.modname - if basename == 'conans.errors': - names = [name for name, _ in node.names] - if 'ConanException' in names: - self.add_message("conan-import-error-conanexception", node=node) - - -class ImportErrorsConanInvalidConfiguration(BaseChecker): - """ - Import errors from new 'conan' module - """ - - __implements__ = IAstroidChecker - - name = "conan-import-error-conaninvalidconfiguration" - msgs = { - "E9010": ( - "Import ConanInvalidConfiguration from new module: `from conan.errors import ConanInvalidConfiguration`. Old import is deprecated in Conan v2.", - "conan-import-error-conaninvalidconfiguration", - "Import ConanInvalidConfiguration from new module: `from conan.errors import ConanInvalidConfiguration`. Old import is deprecated in Conan v2.", - ), - } - - def visit_importfrom(self, node: nodes.ImportFrom) -> None: - basename = node.modname - if basename == 'conans.errors': - names = [name for name, _ in node.names] - if 'ConanInvalidConfiguration' in names: - self.add_message("conan-import-error-conaninvalidconfiguration", node=node) - diff --git a/linter/check_import_tools.py b/linter/check_import_tools.py deleted file mode 100644 index 1621c7b3dfd2a..0000000000000 --- a/linter/check_import_tools.py +++ /dev/null @@ -1,30 +0,0 @@ -import re -from email.mime import base -from pylint.checkers import BaseChecker -from pylint.interfaces import IAstroidChecker -from astroid import nodes, Const, AssignName - - -class ImportTools(BaseChecker): - """ - Import tools following pattern 'from conan.tools.xxxx import yyyyy' - """ - - __implements__ = IAstroidChecker - - name = "conan-import-tools" - msgs = { - "E9011": ( - "Import tools following pattern 'from conan.tools.xxxx import yyyyy' (https://docs.conan.io/en/latest/reference/conanfile/tools.html).", - "conan-import-tools", - "Import tools following pattern 'from conan.tools.xxxx import yyyyy' (https://docs.conan.io/en/latest/reference/conanfile/tools.html).", - ), - } - - def visit_importfrom(self, node: nodes.ImportFrom) -> None: - basename = node.modname - names = [name for name, _ in node.names] - if basename == 'conan' and 'tools' in names: - self.add_message("conan-import-tools", node=node) - elif re.match(r'conan\.tools\.[^.]+\..+', basename): - self.add_message("conan-import-tools", node=node) diff --git a/linter/check_layout_src_folder.py b/linter/check_layout_src_folder.py deleted file mode 100644 index b7d418884ca45..0000000000000 --- a/linter/check_layout_src_folder.py +++ /dev/null @@ -1,44 +0,0 @@ -from pylint.checkers import BaseChecker -from pylint.interfaces import IAstroidChecker -from astroid import nodes - -WHY_SRC_FOLDER = "Setting the `src_folder` for layouts will help keep an organized and clean workspace when developing recipes locally. " \ - "The extra folder will help ensure there are no collisions between the upstream sources and recipe's exports - which " \ - "also extends to what happens in the cache when creating packages" - - -class LayoutSrcFolder(BaseChecker): - """ - Ensure `src_folder=src` when using built-in layouts - """ - - __implements__ = IAstroidChecker - - name = "conan-layout-src-folder" - msgs = { - "E9012": ( - "layout is missing `src_folder` argument which should be to `src`", - "conan-missing-layout-src-folder", - WHY_SRC_FOLDER, - ), - "E9013": ( - "layout should set `src_folder` to `src`", - "conan-layout-src-folder-is-src", - WHY_SRC_FOLDER, - ), - } - - def visit_call(self, node: nodes.Call) -> None: - if not isinstance(node.func, nodes.Name): - return - - if node.func.name in ["cmake_layout", "bazel_layout", "basic_layout"]: - for kw in node.keywords: - if kw.arg == "src_folder": - if not kw.value or kw.value.as_string().strip("\"'") != "src": - self.add_message( - "conan-layout-src-folder-is-src", node=node, line=node.lineno - ) - break - else: - self.add_message("conan-missing-layout-src-folder", node=node, line=node.lineno) diff --git a/linter/check_package_name.py b/linter/check_package_name.py deleted file mode 100644 index 4c302243ff26c..0000000000000 --- a/linter/check_package_name.py +++ /dev/null @@ -1,52 +0,0 @@ -from pylint.checkers import BaseChecker -from pylint.interfaces import IAstroidChecker -from astroid import nodes, Const, AssignName -from pathlib import Path - - -class PackageName(BaseChecker): - """ - All packages must have a lower-case name - """ - - __implements__ = IAstroidChecker - - name = "conan-package-name" - msgs = { - "E9004": ( - "Reference name should be all lowercase", - "conan-bad-name", - "Use only lower-case on the package name: `name = 'foobar'`." - ), - "E9005": ( - "Missing name attribute", - "conan-missing-name", - "The member attribute `name` must be declared: `name = 'foobar'`." - ), - "E9007": ( - "No 'name' attribute in test_package conanfile", - "conan-test-no-name", - "No 'name' attribute in test_package conanfile." - ), - } - - def visit_classdef(self, node: nodes) -> None: - filename = Path(node.root().file) - is_test = filename.match('test_*/*.py') - - if node.basenames == ['ConanFile']: - for attr in node.body: - children = list(attr.get_children()) - if len(children) == 2 and \ - isinstance(children[0], AssignName) and \ - children[0].name == "name" and \ - isinstance(children[1], Const): - if is_test: - self.add_message("conan-test-no-name", node=attr, line=attr.lineno) - return - value = children[1].as_string() - if value.lower() != value: - self.add_message("conan-bad-name", node=attr, line=attr.lineno) - return - if not is_test: - self.add_message("conan-missing-name", node=node) diff --git a/linter/check_version_attribute.py b/linter/check_version_attribute.py deleted file mode 100644 index 66e61f47ef183..0000000000000 --- a/linter/check_version_attribute.py +++ /dev/null @@ -1,33 +0,0 @@ -from pylint.checkers import BaseChecker -from pylint.interfaces import IAstroidChecker -from astroid import nodes, Const, AssignName - - -class VersionAttribute(BaseChecker): - """ - All packages should not enforce a specific version in the recipe - """ - - __implements__ = IAstroidChecker - - name = "conan-attr-version" - msgs = { - "E9014": ( - "Recipe should not contain version attribute", - "conan-forced-version", - "Do not enforce a specific version in your recipe. Keep it generic for any version." - ), - } - - def visit_classdef(self, node: nodes) -> None: - if node.basenames == ['ConanFile']: - for attr in node.body: - children = list(attr.get_children()) - if len(children) == 2 and \ - isinstance(children[0], AssignName) and \ - children[0].name == "version" and \ - isinstance(children[1], Const): - value = children[1].as_string().replace('"', "").replace("'", "") - if value and value != "system": - self.add_message("conan-forced-version", node=attr, line=attr.lineno) - return diff --git a/linter/conandata_yaml_linter.py b/linter/conandata_yaml_linter.py deleted file mode 100644 index 51d27b850beec..0000000000000 --- a/linter/conandata_yaml_linter.py +++ /dev/null @@ -1,114 +0,0 @@ -import argparse -from strictyaml import ( - load, - Map, - Str, - YAMLValidationError, - MapPattern, - Optional, - Seq, - Enum, - Any, -) -from yaml_linting import file_path - - -CONANDATA_YAML_URL = "https://github.com/conan-io/conan-center-index/blob/master/docs/adding_packages/conandata_yml_format.md" - - -def main(): - parser = argparse.ArgumentParser( - description="Validate Conan's 'conandata.yaml' file to ConanCenterIndex's requirements." - ) - parser.add_argument( - "path", - nargs="?", - type=file_path, - help="file to validate.", - ) - args = parser.parse_args() - - patch_fields = Map( - { - "patch_file": Str(), - "patch_description": Str(), - "patch_type": Enum( - ["official", "conan", "portability", "bugfix", "vulnerability"] - ), - Optional("patch_source"): Str(), - # No longer required for v2 recipes with layouts - Optional("base_path"): Str(), - } - ) - schema = Map( - { - "sources": MapPattern(Str(), Any(), minimum_keys=1), - Optional("patches"): MapPattern(Str(), Seq(Any()), minimum_keys=1), - } - ) - - with open(args.path, encoding="utf-8") as f: - content = f.read() - - try: - parsed = load(content, schema) - except YAMLValidationError as error: - pretty_print_yaml_validate_error(args, error) # Error when "source" is missing or when "patches" has no versions - return - except BaseException as error: - pretty_print_yaml_validate_error(args, error) # YAML could not be parsed - return - - if "patches" in parsed: - for version in parsed["patches"]: - patches = parsed["patches"][version] - if version not in parsed["sources"]: - print( - f"::warning file={args.path},line={patches.start_line},endline={patches.end_line}," - f"title=conandata.yml inconsistency" - f"::Patch(es) are listed for version `{version}`, but there is source for this version." - f" You should either remove `{version}` from the `patches` section, or add it to the" - f" `sources` section" - ) - for i, patch in enumerate(patches): - # Individual report errors for each patch object - try: - parsed["patches"][version][i].revalidate(patch_fields) - except YAMLValidationError as error: - pretty_print_yaml_validate_warning(args, error) # Warning when patch fields are not followed - continue - - # Make sure `patch_source` exists where it's encouraged - type = parsed["patches"][version][i]["patch_type"] - if ( - type in ["official", "bugfix", "vulnerability"] - and not "patch_source" in patch - ): - print( - f"::warning file={args.path},line={type.start_line},endline={type.end_line}," - f"title=conandata.yml schema warning" - f"::'patch_type' should have 'patch_source' as per {CONANDATA_YAML_URL}#patch_type" - " it is expected to have a source (e.g. a URL) to where it originates from to help with" - " reviewing and consumers to evaluate patches" - ) - - -def pretty_print_yaml_validate_error(args, error): - snippet = error.context_mark.get_snippet().replace("\n", "%0A") - print( - f"::error file={args.path},line={error.context_mark.line},endline={error.problem_mark.line+1}," - f"title=conandata.yml schema error" - f"::Schema outlined in {CONANDATA_YAML_URL}#patches-fields is not followed.%0A%0A{error.problem} in %0A{snippet}%0A" - ) - -def pretty_print_yaml_validate_warning(args, error): - snippet = error.context_mark.get_snippet().replace("\n", "%0A") - print( - f"::warning file={args.path},line={error.context_mark.line},endline={error.problem_mark.line+1}," - f"title=conandata.yml schema warning" - f"::Schema outlined in {CONANDATA_YAML_URL}#patches-fields is not followed.%0A%0A{error.problem} in %0A{snippet}%0A" - ) - - -if __name__ == "__main__": - main() diff --git a/linter/conanv2_transition.py b/linter/conanv2_transition.py deleted file mode 100644 index e330ff1d44590..0000000000000 --- a/linter/conanv2_transition.py +++ /dev/null @@ -1,24 +0,0 @@ -""" - -Pylint plugin/rules for conanfiles in Conan Center Index - -""" - -from pylint.lint import PyLinter -from linter.check_package_name import PackageName -from linter.check_import_conanfile import ImportConanFile -from linter.check_import_errors import ImportErrorsConanException, ImportErrorsConanInvalidConfiguration, ImportErrors -from linter.check_import_tools import ImportTools -from linter.check_layout_src_folder import LayoutSrcFolder -from linter.check_version_attribute import VersionAttribute - - -def register(linter: PyLinter) -> None: - linter.register_checker(PackageName(linter)) - linter.register_checker(ImportConanFile(linter)) - linter.register_checker(ImportErrors(linter)) - linter.register_checker(ImportErrorsConanException(linter)) - linter.register_checker(ImportErrorsConanInvalidConfiguration(linter)) - linter.register_checker(ImportTools(linter)) - linter.register_checker(LayoutSrcFolder(linter)) - linter.register_checker(VersionAttribute(linter)) diff --git a/linter/config_yaml_linter.py b/linter/config_yaml_linter.py deleted file mode 100644 index 29807e6ce3b99..0000000000000 --- a/linter/config_yaml_linter.py +++ /dev/null @@ -1,37 +0,0 @@ -import argparse -from strictyaml import load, Map, Str, YAMLValidationError, MapPattern -from yaml_linting import file_path - - -def main(): - parser = argparse.ArgumentParser( - description="Validate ConanCenterIndex's 'config.yaml' file." - ) - parser.add_argument( - "path", - nargs="?", - type=file_path, - help="file to validate.", - ) - args = parser.parse_args() - - schema = Map( - {"versions": MapPattern(Str(), Map({"folder": Str()}), minimum_keys=1)} - ) - - with open(args.path) as f: - content = f.read() - - try: - load(content, schema) - except YAMLValidationError as error: - e = error.__str__().replace("\n", "%0A") - print( - f"::error file={args.path},line={error.context_mark.line},endline={error.problem_mark.line}," - f"title=config.yml schema error" - f"::{e}\n" - ) - - -if __name__ == "__main__": - main() diff --git a/linter/pylintrc_recipe b/linter/pylintrc_recipe deleted file mode 100644 index 5b4db4ad401f0..0000000000000 --- a/linter/pylintrc_recipe +++ /dev/null @@ -1,30 +0,0 @@ -[MASTER] -load-plugins=linter.conanv2_transition, - linter.transform_conanfile, - linter.transform_imports - -py-version=3.6 -recursive=no -suggestion-mode=yes -unsafe-load-any-extension=no - -[MESSAGES CONTROL] -disable=fixme, - line-too-long, - missing-module-docstring, - missing-function-docstring, - missing-class-docstring, - invalid-name, - wrong-import-order, # TODO: Remove - import-outside-toplevel # TODO: Remove - -enable=conan-bad-name, - conan-missing-name, - conan-import-conanfile, - conan-forced-version - -[REPORTS] -evaluation=max(0, 0 if fatal else 10.0 - ((float(5 * error) / statement) * 10)) -output-format=text -reports=no -score=no diff --git a/linter/pylintrc_testpackage b/linter/pylintrc_testpackage deleted file mode 100644 index c5cf96e8cadf7..0000000000000 --- a/linter/pylintrc_testpackage +++ /dev/null @@ -1,32 +0,0 @@ -[MASTER] -load-plugins=linter.conanv2_transition, - linter.transform_conanfile, - linter.transform_imports - -py-version=3.6 -recursive=no -suggestion-mode=yes -unsafe-load-any-extension=no - -[MESSAGES CONTROL] -disable=fixme, - line-too-long, - missing-module-docstring, - missing-function-docstring, - missing-class-docstring, - invalid-name, - wrong-import-order, # TODO: Remove - import-outside-toplevel, # TODO: Remove - - # Not relevant to test package - conan-missing-layout-src-folder, - conan-layout-src-folder-is-src - -enable=conan-test-no-name, - conan-import-conanfile - -[REPORTS] -evaluation=max(0, 0 if fatal else 10.0 - ((float(5 * error) / statement) * 10)) -output-format=text -reports=no -score=no diff --git a/linter/recipe_linter.json b/linter/recipe_linter.json deleted file mode 100644 index 0b9ff4566b051..0000000000000 --- a/linter/recipe_linter.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "problemMatcher": [ - { - "owner": "recipe_linter_fatals", - "severity": "error", - "pattern": [ - { - "regexp": "(\\S+):(\\d+): \\[(F\\d+\\(\\S+\\)),\\s(.+?)?\\](.+)", - "file": 1, - "line": 2, - "message": 5, - "code": 3 - } - ] - }, - { - "owner": "recipe_linter_errors", - "severity": "error", - "pattern": [ - { - "regexp": "(\\S+):(\\d+): \\[(E\\d+\\(\\S+\\)),\\s(.+?)?\\](.+)", - "file": 1, - "line": 2, - "message": 5, - "code": 3 - } - ] - }, - { - "owner": "recipe_linter_warnings", - "severity": "warning", - "pattern": [ - { - "regexp": "(\\S+):(\\d+): \\[(W\\d+\\(\\S+\\)),\\s(.+?)?\\](.+)", - "file": 1, - "line": 2, - "message": 5, - "code": 3 - } - ] - } - ] -} diff --git a/linter/transform_conanfile.py b/linter/transform_conanfile.py deleted file mode 100644 index 36846a9b3b44b..0000000000000 --- a/linter/transform_conanfile.py +++ /dev/null @@ -1,75 +0,0 @@ - -# Class ConanFile doesn't declare all the valid members and functions, -# some are injected by Conan dynamically to the class. - -import textwrap -import astroid -from astroid.builder import AstroidBuilder -from astroid.manager import AstroidManager - - -def _settings_transform(): - module = AstroidBuilder(AstroidManager()).string_build( - textwrap.dedent(""" - class Settings(object): - os = None - arch = None - compiler = None - build_type = None - """) - ) - return module['Settings'] - -def _user_info_build_transform(): - module = AstroidBuilder(AstroidManager()).string_build( - textwrap.dedent(""" - class UserInfoBuild(defaultdict): - pass - """) - ) - return module['UserInfoBuild'] - - -def register(_): - pass - -def transform_conanfile(node): - """Transform definition of ConanFile class so dynamic fields are visible to pylint""" - - str_class = astroid.builtin_lookup("str") - dict_class = astroid.builtin_lookup("dict") - info_class = astroid.MANAGER.ast_from_module_name("conans.model.info").lookup( - "ConanInfo") - build_requires_class = astroid.MANAGER.ast_from_module_name( - "conans.client.graph.graph_manager").lookup("_RecipeBuildRequires") - file_copier_class = astroid.MANAGER.ast_from_module_name( - "conans.client.file_copier").lookup("FileCopier") - file_importer_class = astroid.MANAGER.ast_from_module_name( - "conans.client.importer").lookup("_FileImporter") - python_requires_class = astroid.MANAGER.ast_from_module_name( - "conans.client.graph.python_requires").lookup("PyRequires") - - dynamic_fields = { - "conan_data": str_class, - "build_requires": build_requires_class, - "test_requires" : build_requires_class, - "tool_requires": build_requires_class, - "info_build": info_class, - "user_info_build": [_user_info_build_transform()], - "info": info_class, - "copy": file_copier_class, - "copy_deps": file_importer_class, - "python_requires": [str_class, python_requires_class], - "recipe_folder": str_class, - "settings_build": [_settings_transform()], - "settings_target": [_settings_transform()], - "conf": dict_class, - } - - for f, t in dynamic_fields.items(): - node.locals[f] = [i for i in t] - - -astroid.MANAGER.register_transform( - astroid.ClassDef, transform_conanfile, - lambda node: node.qname() == "conans.model.conan_file.ConanFile") diff --git a/linter/transform_imports.py b/linter/transform_imports.py deleted file mode 100644 index 78b72e4b16880..0000000000000 --- a/linter/transform_imports.py +++ /dev/null @@ -1,46 +0,0 @@ - -import astroid -from pylint.lint import PyLinter - -""" -Here we are transforming the imports to mimic future Conan v2 release. With -these changes, built-in checks in Pylint will raise with different errors, so -we are modifying the messages to point users in the right direction. -""" - - -def register(linter: PyLinter): - msge1101 = linter.msgs_store._messages_definitions["E1101"] - msge1101.msg += ". Please, check https://github.com/conan-io/conan-center-index/blob/master/docs/v2_linter.md" - linter.msgs_store.register_message(msge1101) - - msge0611 = linter.msgs_store._messages_definitions["E0611"] - msge0611.msg += ". Please, check https://github.com/conan-io/conan-center-index/blob/master/docs/v2_linter.md" - linter.msgs_store.register_message(msge0611) - -def transform_tools(module): - """ Transform import module """ - if 'get' in module.locals: - del module.locals['get'] - if 'cross_building' in module.locals: - del module.locals['cross_building'] - if 'rmdir' in module.locals: - del module.locals['rmdir'] - if 'Version' in module.locals: - del module.locals['Version'] - -def transform_errors(module): - pass - #if 'ConanInvalidConfiguration' in module.locals: - # del module.locals['ConanInvalidConfiguration'] - #if 'ConanException' in module.locals: - # del module.locals['ConanException'] - - -astroid.MANAGER.register_transform( - astroid.Module, transform_tools, - lambda node: node.qname() == "conans.tools") - -astroid.MANAGER.register_transform( - astroid.Module, transform_errors, - lambda node: node.qname() == "conans.errors") diff --git a/linter/yaml_linting.py b/linter/yaml_linting.py deleted file mode 100644 index 8b61d99ba39f9..0000000000000 --- a/linter/yaml_linting.py +++ /dev/null @@ -1,9 +0,0 @@ -import argparse - - -def file_path(a_string): - from os.path import isfile - - if not isfile(a_string): - raise argparse.ArgumentTypeError(f"{a_string} does not point to a file") - return a_string diff --git a/linter/yamllint_matcher.json b/linter/yamllint_matcher.json deleted file mode 100644 index 42a3ef93b5956..0000000000000 --- a/linter/yamllint_matcher.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "problemMatcher": [ - { - "owner": "yamllint_matcher", - "pattern": [ - { - "regexp": "^(.*\\.ya?ml)$", - "file": 1 - }, - { - "regexp": "^\\s{2}(\\d+):(\\d+)\\s+(error|warning)\\s+(.*?)\\s+\\((.*)\\)$", - "line": 1, - "column": 2, - "severity": 3, - "message": 4, - "code": 5, - "loop": true - } - ] - } - ] -} diff --git a/linter/yamllint_rules.yml b/linter/yamllint_rules.yml deleted file mode 100644 index 7c0ce102ddc36..0000000000000 --- a/linter/yamllint_rules.yml +++ /dev/null @@ -1,26 +0,0 @@ -extends: default -rules: - document-start: - level: error - present: false - document-end: - level: error - present: false - empty-values: - forbid-in-block-mappings: true - forbid-in-flow-mappings: true - line-length: disable - indentation: - level: error - new-line-at-end-of-file: - level: error - trailing-spaces: - level: error - comments: - level: error - comments-indentation: - level: error - new-lines: - type: unix - key-duplicates: - level: error diff --git a/recipes/7bitdi/all/conandata.yml b/recipes/7bitdi/all/conandata.yml index a38a06daf64fb..ad96c33d43330 100644 --- a/recipes/7bitdi/all/conandata.yml +++ b/recipes/7bitdi/all/conandata.yml @@ -1,4 +1,13 @@ sources: + "3.4.0": + url: "https://github.com/7bitcoder/7bitDI/archive/refs/tags/v3.4.0.tar.gz" + sha256: "8381102f5966a5d83cf590b8fa45904d055d74ec90822628240786ab100fb929" + "3.3.0": + url: "https://github.com/7bitcoder/7bitDI/archive/refs/tags/v3.3.0.tar.gz" + sha256: "b9ddb2fc263c79cb414544e97d44dcc8cd1e1a91b38129d96b7051728a4583b9" + "3.2.0": + url: "https://github.com/7bitcoder/7bitDI/archive/refs/tags/v3.2.0.tar.gz" + sha256: "4549b651a28b309a31cb3b879b7f31069cbca041cfb9ffad82ccc26f78b8e5e0" "3.1.0": url: "https://github.com/7bitcoder/7bitDI/archive/refs/tags/v3.1.0.tar.gz" sha256: "345bf91e2a33cfe98628cac98c75488ddd55232b8c4bcfeba9b5001fec8d4f7c" diff --git a/recipes/7bitdi/all/conanfile.py b/recipes/7bitdi/all/conanfile.py index 3bdbdc03629c3..6709e44476413 100644 --- a/recipes/7bitdi/all/conanfile.py +++ b/recipes/7bitdi/all/conanfile.py @@ -1,21 +1,20 @@ from conan import ConanFile from conan.errors import ConanInvalidConfiguration from conan.tools.build import check_min_cppstd -from conan.tools.cmake import CMake, CMakeToolchain, CMakeDeps, cmake_layout +from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout from conan.tools.files import get, copy, rmdir from conan.tools.scm import Version import os required_conan_version = ">=1.53.0" - class SevenBitDIConan(ConanFile): name = "7bitdi" + description = "a simple C++ dependency injection library." + license = "MIT" + url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/7bitcoder/7bitDI" - description = "7bitDI is a simple C++ dependency injection library." topics = ("cpp17", "dependency-injector", "injector", "header-only") - url = "https://github.com/conan-io/conan-center-index" - license = "MIT" package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { @@ -29,6 +28,10 @@ class SevenBitDIConan(ConanFile): "fPIC": True, } + @property + def _min_cppstd(self): + return 17 + @property def _minimum_compilers_version(self): return { @@ -61,12 +64,11 @@ def validate(self): compiler_name = str(compiler) if compiler.get_safe("cppstd"): - check_min_cppstd(self, 17) - + check_min_cppstd(self, self._min_cppstd) minimum_version = self._minimum_compilers_version.get(compiler_name, False) if minimum_version and Version(compiler.version) < minimum_version: raise ConanInvalidConfiguration( - f"Requires compiler {compiler_name} minimum version: {minimum_version} with C++17 support." + f"{self.ref} requires compiler {compiler_name} minimum version: {minimum_version} with C++{self._min_cppstd} support." ) def source(self): diff --git a/recipes/7bitdi/config.yml b/recipes/7bitdi/config.yml index 9a995179e264f..3fbfbf1ec3bc5 100644 --- a/recipes/7bitdi/config.yml +++ b/recipes/7bitdi/config.yml @@ -1,4 +1,10 @@ versions: + "3.4.0": + folder: all + "3.3.0": + folder: all + "3.2.0": + folder: all "3.1.0": folder: all "3.0.0": diff --git a/recipes/aaf/all/conanfile.py b/recipes/aaf/all/conanfile.py index ee7906ff05936..471ea8132e2ce 100644 --- a/recipes/aaf/all/conanfile.py +++ b/recipes/aaf/all/conanfile.py @@ -35,7 +35,7 @@ def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - self.requires("expat/2.5.0") + self.requires("expat/[>=2.6.2 <3]") self.requires("libjpeg/9e") if self.settings.os in ("FreeBSD", "Linux"): self.requires("util-linux-libuuid/2.39") diff --git a/recipes/abseil/all/conandata.yml b/recipes/abseil/all/conandata.yml index c6bc5198c7de0..fa078f9fc7138 100644 --- a/recipes/abseil/all/conandata.yml +++ b/recipes/abseil/all/conandata.yml @@ -1,4 +1,10 @@ sources: + "20240722.0": + url: "https://github.com/abseil/abseil-cpp/archive/20240722.0.tar.gz" + sha256: "f50e5ac311a81382da7fa75b97310e4b9006474f9560ac46f54a9967f07d4ae3" + "20240116.2": + url: "https://github.com/abseil/abseil-cpp/archive/20240116.2.tar.gz" + sha256: "733726b8c3a6d39a4120d7e45ea8b41a434cdacde401cba500f14236c49b39dc" "20240116.1": url: "https://github.com/abseil/abseil-cpp/archive/20240116.1.tar.gz" sha256: "3c743204df78366ad2eaf236d6631d83f6bc928d1705dd0000b872e53b73dc6a" @@ -15,6 +21,24 @@ sources: url: "https://github.com/abseil/abseil-cpp/archive/20211102.0.tar.gz" sha256: "dcf71b9cba8dc0ca9940c4b316a0c796be8fab42b070bb6b7cab62b48f0e66c4" patches: + "20240722.0": + - patch_file: "patches/0003-absl-string-libm-20240116.patch" + patch_description: "link libm to absl string" + patch_type: "portability" + patch_source: "https://github.com/abseil/abseil-cpp/issues/1100" + "20240116.2": + - patch_file: "patches/0003-absl-string-libm-20240116.patch" + patch_description: "link libm to absl string" + patch_type: "portability" + patch_source: "https://github.com/abseil/abseil-cpp/issues/1100" + - patch_file: "patches/20240116.1-0001-fix-filesystem-include.patch" + patch_description: "Fix GCC 7 including in C++17 mode when it is not available (until GCC 8)" + patch_type: "portability" + patch_source: "https://github.com/abseil/abseil-cpp/commit/bb83aceacb554e79e7cd2404856f0be30bd00303" + - patch_file: "patches/0004-test-allocator-testonly.patch" + patch_description: "Do not build test_allocator target when tests are disabled" + patch_type: "portability" + patch_source: "https://github.com/abseil/abseil-cpp/commit/779a3565ac6c5b69dd1ab9183e500a27633117d5" "20240116.1": - patch_file: "patches/0003-absl-string-libm-20240116.patch" patch_description: "link libm to absl string" @@ -24,6 +48,10 @@ patches: patch_description: "Fix GCC 7 including in C++17 mode when it is not available (until GCC 8)" patch_type: "portability" patch_source: "https://github.com/abseil/abseil-cpp/commit/bb83aceacb554e79e7cd2404856f0be30bd00303" + - patch_file: "patches/0004-test-allocator-testonly.patch" + patch_description: "Do not build test_allocator target when tests are disabled" + patch_type: "portability" + patch_source: "https://github.com/abseil/abseil-cpp/commit/779a3565ac6c5b69dd1ab9183e500a27633117d5" "20230802.1": - patch_file: "patches/0003-absl-string-libm-20230802.patch" patch_description: "link libm to absl string" diff --git a/recipes/abseil/all/conanfile.py b/recipes/abseil/all/conanfile.py index bcfa3c446e426..55ae607eb9d58 100644 --- a/recipes/abseil/all/conanfile.py +++ b/recipes/abseil/all/conanfile.py @@ -70,9 +70,14 @@ def validate(self): f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." ) - if self.options.shared and is_msvc(self): + if self.options.shared and is_msvc(self) and Version(self.version) < "20230802.1": # upstream tries its best to export symbols, but it's broken for the moment - raise ConanInvalidConfiguration(f"{self.ref} shared not availabe for Visual Studio (yet)") + raise ConanInvalidConfiguration(f"{self.ref} shared not availabe for Visual Studio, please use version 20230802.1 or newer") + + def build_requirements(self): + # https://github.com/abseil/abseil-cpp/blob/20240722.0/CMakeLists.txt#L19 + if Version(self.version) >= "20240722.0": + self.tool_requires("cmake/[>=3.16 <4]") def layout(self): cmake_layout(self, src_folder="src") @@ -161,7 +166,7 @@ def _load_components_from_cmake_target_file(self, absl_target_file_path): if cmake_function_name == "add_library": cmake_imported_target_type = cmake_function_args[1] if cmake_imported_target_type in ["STATIC", "SHARED"]: - components[potential_lib_name]["libs"] = [potential_lib_name] if cmake_target_nonamespace != "abseil_dll" else [] + components[potential_lib_name]["libs"] = [potential_lib_name] if cmake_target_nonamespace != "abseil_dll" else ['abseil_dll'] elif cmake_function_name == "set_target_properties": target_properties = re.findall(r"(?PINTERFACE_COMPILE_DEFINITIONS|INTERFACE_INCLUDE_DIRECTORIES|INTERFACE_LINK_LIBRARIES)[\n|\s]+(?P.+)", cmake_function_args[2]) for target_property in target_properties: diff --git a/recipes/abseil/all/patches/0004-test-allocator-testonly.patch b/recipes/abseil/all/patches/0004-test-allocator-testonly.patch new file mode 100644 index 0000000000000..909c1f791c488 --- /dev/null +++ b/recipes/abseil/all/patches/0004-test-allocator-testonly.patch @@ -0,0 +1,10 @@ +--- a/absl/container/CMakeLists.txt ++++ b/absl/container/CMakeLists.txt +@@ -213,6 +213,7 @@ absl_cc_library( + DEPS + absl::config + GTest::gmock ++ TESTONLY + ) + + absl_cc_test( diff --git a/recipes/abseil/config.yml b/recipes/abseil/config.yml index 4db2fe8f16b71..d29c717557868 100644 --- a/recipes/abseil/config.yml +++ b/recipes/abseil/config.yml @@ -1,4 +1,8 @@ versions: + "20240722.0": + folder: all + "20240116.2": + folder: all "20240116.1": folder: all "20230802.1": diff --git a/recipes/ada/all/conandata.yml b/recipes/ada/all/conandata.yml index 8588363204f2a..d02f03916e176 100644 --- a/recipes/ada/all/conandata.yml +++ b/recipes/ada/all/conandata.yml @@ -1,43 +1,22 @@ sources: - "2.7.7": - url: "https://github.com/ada-url/ada/archive/v2.7.7.tar.gz" - sha256: "7116d86a80b79886efbc9d946d3919801815060ae62daf78de68c508552af554" - "2.7.5": - url: "https://github.com/ada-url/ada/archive/v2.7.5.tar.gz" - sha256: "25a5d62fdd4950dbef785db5725675c15f3df2cf899a4a920449fe9a05fc6d00" - "2.7.4": - url: "https://github.com/ada-url/ada/archive/v2.7.4.tar.gz" - sha256: "897942ba8c99153f916c25698a49604022f3e54441cfa9b76f657ad15b6ca041" - "2.7.3": - url: "https://github.com/ada-url/ada/archive/v2.7.3.tar.gz" - sha256: "8e222d536d237269488f7d454544eedf12847f47b3d42651e8c9963c3fb0cf5e" - "2.7.2": - url: "https://github.com/ada-url/ada/archive/v2.7.2.tar.gz" - sha256: "4dea9dd6a46695547da2dac3dc7254d32187cd35d3170179c0cdc0900090c025" - "2.7.0": - url: "https://github.com/ada-url/ada/archive/v2.7.0.tar.gz" - sha256: "08646b8a41cd6367b282aab2c87c82e5ce4876078a0cbe0799af7e51e4358591" + "2.9.2": + url: "https://github.com/ada-url/ada/archive/v2.9.2.tar.gz" + sha256: "f41575ad7eec833afd9f6a0d6101ee7dc2f947fdf19ae8f1b54a71d59f4ba5ec" + "2.9.1": + url: "https://github.com/ada-url/ada/archive/v2.9.1.tar.gz" + sha256: "64eb3d91db941645d1b68ac8d1cbb7b534fbe446b66c1da11e384e17fca975e7" + "2.9.0": + url: "https://github.com/ada-url/ada/archive/v2.9.0.tar.gz" + sha256: "8b992f0ce9134cb4eafb74b164d2ce2cb3af1900902162713b0e0c5ab0b6acd8" + "2.8.0": + url: "https://github.com/ada-url/ada/archive/v2.8.0.tar.gz" + sha256: "83b77fb53d1a9eea22b1484472cea0215c50478c9ea2b4b44b0ba3b52e07c139" + "2.7.8": + url: "https://github.com/ada-url/ada/archive/v2.7.8.tar.gz" + sha256: "8de067b7cb3da1808bf5439279aee6048d761ba246bf8a854c2af73b16b41c75" "2.6.10": url: "https://github.com/ada-url/ada/archive/v2.6.10.tar.gz" sha256: "a43e1ea0bcdd7585edf538afffe1fc3303b936752e18bac545fa11729de088bc" - "2.6.7": - url: "https://github.com/ada-url/ada/archive/v2.6.7.tar.gz" - sha256: "882a0aa6e19174b60b2fa00ee75d35a31ecd5158fb97d0e4e719ba21bb07acb9" - "2.6.4": - url: "https://github.com/ada-url/ada/archive/v2.6.4.tar.gz" - sha256: "5b488e9a7a700de5d40a749c96c4339bcc9c425e5f5406a0887b13e70bd90907" - "2.6.2": - url: "https://github.com/ada-url/ada/archive/v2.6.2.tar.gz" - sha256: "425b8696a28a22d19ee7aa4516c26fc8ae3ab574870a9a74ef58ba8a345b822e" - "2.6.0": - url: "https://github.com/ada-url/ada/archive/v2.6.0.tar.gz" - sha256: "09551bfbd92853e59d731e5f44a88a690425fd2906977ad03a6a1059615a02a5" "2.5.1": url: "https://github.com/ada-url/ada/archive/v2.5.1.tar.gz" sha256: "a7591d771822c3f16e6665311b0c6b4de7dd7615333183f35d89c7573be7f7fa" - "2.5.0": - url: "https://github.com/ada-url/ada/archive/v2.5.0.tar.gz" - sha256: "bf11c9d0cc1ee9e377080bdd8a3b8a8bf736ac7acaedcae882587e21b3e5625c" - "2.4.2": - url: "https://github.com/ada-url/ada/archive/v2.4.2.tar.gz" - sha256: "d865ab8828c14fc1e2217ca9f5d7918d50775175b2873faf2fbda0085e0623d2" diff --git a/recipes/ada/config.yml b/recipes/ada/config.yml index 2c78344707765..29ab8232ac483 100644 --- a/recipes/ada/config.yml +++ b/recipes/ada/config.yml @@ -1,29 +1,15 @@ versions: - "2.7.7": + "2.9.2": folder: all - "2.7.5": + "2.9.1": folder: all - "2.7.4": + "2.9.0": folder: all - "2.7.3": + "2.8.0": folder: all - "2.7.2": - folder: all - "2.7.0": + "2.7.8": folder: all "2.6.10": folder: all - "2.6.7": - folder: all - "2.6.4": - folder: all - "2.6.2": - folder: all - "2.6.0": - folder: all "2.5.1": folder: all - "2.5.0": - folder: all - "2.4.2": - folder: all diff --git a/recipes/amgcl/all/conandata.yml b/recipes/amgcl/all/conandata.yml index cbd774ff5f231..2059663ce0b33 100644 --- a/recipes/amgcl/all/conandata.yml +++ b/recipes/amgcl/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.4.4": + url: "https://github.com/ddemidov/amgcl/archive/1.4.4.tar.gz" + sha256: "02fd5418e14d669422f65fc739ce72bf9516ced2d8942574d4b8caa05dda9d8c" "1.4.3": url: "https://github.com/ddemidov/amgcl/archive/1.4.3.tar.gz" sha256: "e920d5767814ce697d707d1f359a16c9b9eb79eba28fe19e14c18c2a505fe0ad" diff --git a/recipes/amgcl/all/conanfile.py b/recipes/amgcl/all/conanfile.py index d2ddd6171e66f..e04106ab75c2b 100644 --- a/recipes/amgcl/all/conanfile.py +++ b/recipes/amgcl/all/conanfile.py @@ -2,6 +2,7 @@ from conan.tools.build import check_min_cppstd from conan.tools.files import copy, get from conan.tools.layout import basic_layout +from conan.tools.scm import Version import os required_conan_version = ">=1.51.1" @@ -20,12 +21,19 @@ class AmgclConan(ConanFile): package_type = "header-library" settings = "os", "arch", "compiler", "build_type" no_copy_source = True + options = { 'with_boost': [True, False] } + default_options = { 'with_boost': True } + + def config_options(self): + if Version(self.version) < "1.4.4": + del self.options.with_boost def layout(self): basic_layout(self, src_folder="src") def requirements(self): - self.requires("boost/1.81.0") + if self.options.get_safe("with_boost"): + self.requires("boost/1.85.0") def package_id(self): self.info.clear() @@ -37,9 +45,6 @@ def validate(self): def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) - def build(self): - pass - def package(self): copy(self, "LICENSE.md", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) copy(self, "*", src=os.path.join(self.source_folder, "amgcl"), diff --git a/recipes/amgcl/config.yml b/recipes/amgcl/config.yml index 1d12970eb4fba..02bed7da76340 100644 --- a/recipes/amgcl/config.yml +++ b/recipes/amgcl/config.yml @@ -1,4 +1,6 @@ versions: + "1.4.4": + folder: all "1.4.3": folder: all "1.4.2": diff --git a/recipes/android-ndk/all/conandata.yml b/recipes/android-ndk/all/conandata.yml index 0a73cd9fc973b..28d9619ab0124 100644 --- a/recipes/android-ndk/all/conandata.yml +++ b/recipes/android-ndk/all/conandata.yml @@ -1,4 +1,30 @@ sources: + "r27": + "Windows": + "x86_64": + url: "https://dl.google.com/android/repository/android-ndk-r27-windows.zip" + sha256: "342ceafd7581ae26a0bd650a5e0bbcd0aa2ee15eadfd7508b3dedeb1372d7596" + "Linux": + "x86_64": + url: "https://dl.google.com/android/repository/android-ndk-r27-linux.zip" + sha256: "2f17eb8bcbfdc40201c0b36e9a70826fcd2524ab7a2a235e2c71186c302da1dc" + "Macos": + "x86_64": + url: "https://dl.google.com/android/repository/android-ndk-r27-darwin.zip" + sha256: "2f2ef00b22fe22c1c9c78fda1b38ea7ffa6528e25eac0b70a92f8cb0093143be" + "r26d": + "Windows": + "x86_64": + url: "https://dl.google.com/android/repository/android-ndk-r26d-windows.zip" + sha256: "9b285da57a36818cb65ea5b93ec74f8138f48a40182ff2994f6aade4580ed597" + "Linux": + "x86_64": + url: "https://dl.google.com/android/repository/android-ndk-r26d-linux.zip" + sha256: "eefeafe7ccf177de7cc57158da585e7af119bb7504a63604ad719e4b2a328b54" + "Macos": + "x86_64": + url: "https://dl.google.com/android/repository/android-ndk-r26d-darwin.zip" + sha256: "ee2d0531685a69164fc0a66705d3a30109223f6fc01f1008ca5d8bc3a32d628d" "r26c": "Windows": "x86_64": diff --git a/recipes/android-ndk/all/conanfile.py b/recipes/android-ndk/all/conanfile.py index ecf241f5b5a1a..76b9a2ead193a 100644 --- a/recipes/android-ndk/all/conanfile.py +++ b/recipes/android-ndk/all/conanfile.py @@ -300,12 +300,13 @@ def package_info(self): self.conf_info.update("tools.build:compiler_executables", compiler_executables) self.buildenv_info.define_path("CC", compiler_executables["c"]) self.buildenv_info.define_path("CXX", compiler_executables["cpp"]) + self.buildenv_info.define_path("AS", compiler_executables["c"]) + self.buildenv_info.define_path("LD", compiler_executables["cpp"]) # Versions greater than 23 had the naming convention # changed to no longer include the triplet. bare = self._ndk_version_major >= 23 self.buildenv_info.define_path("AR", self._define_tool_var("AR", "ar", bare)) - self.buildenv_info.define_path("AS", self._define_tool_var("AS", "as", bare)) self.buildenv_info.define_path("RANLIB", self._define_tool_var("RANLIB", "ranlib", bare)) self.buildenv_info.define_path("STRIP", self._define_tool_var("STRIP", "strip", bare)) self.buildenv_info.define_path("ADDR2LINE", self._define_tool_var("ADDR2LINE", "addr2line", bare)) @@ -317,12 +318,6 @@ def package_info(self): if self._ndk_version_major < 23: self.buildenv_info.define_path("ELFEDIT", self._define_tool_var("ELFEDIT", "elfedit", bare)) - # The `ld` tool changed naming conventions earlier than others - if self._ndk_version_major >= 22: - self.buildenv_info.define_path("LD", self._define_tool_var_naked("LD", "ld")) - else: - self.buildenv_info.define_path("LD", self._define_tool_var("LD", "ld")) - self.buildenv_info.define("ANDROID_PLATFORM", f"android-{self.settings_target.os.api_level}") self.buildenv_info.define("ANDROID_TOOLCHAIN", "clang") self.buildenv_info.define("ANDROID_ABI", self._android_abi) diff --git a/recipes/android-ndk/all/test_package/conanfile.py b/recipes/android-ndk/all/test_package/conanfile.py index db186fc2c369f..1c03586bc651b 100644 --- a/recipes/android-ndk/all/test_package/conanfile.py +++ b/recipes/android-ndk/all/test_package/conanfile.py @@ -1,6 +1,8 @@ from conan import ConanFile from conan.tools.cmake import CMake, cmake_layout +from conan.tools.scm import Version import os +import platform class TestPackgeConan(ConanFile): @@ -22,10 +24,14 @@ def build(self): cmake.build() def test(self): - if self.settings.os == "Windows": - self.run("ndk-build.cmd --version") + ndk_build = "ndk-build.cmd" if self.settings.os == "Windows" else "ndk-build" + ndk_version = Version(self.tested_reference_str.split('/')[1]) + skip_run = platform.system() == "Darwin" and "arm" in platform.processor() and ndk_version < "r23c" + if not skip_run: + self.run(f"{ndk_build} --version", env="conanbuild") else: - self.run("ndk-build --version") + self.output.warning("Skipped running ndk-build on macOS Apple Silicon in arm64 mode, please use a newer" + " version of the Android NDK") # INFO: Run the project that was built using Android NDK if self.settings.os == "Android": diff --git a/recipes/android-ndk/all/test_v1_package/conanfile.py b/recipes/android-ndk/all/test_v1_package/conanfile.py deleted file mode 100644 index d61cc4e4da75e..0000000000000 --- a/recipes/android-ndk/all/test_v1_package/conanfile.py +++ /dev/null @@ -1,32 +0,0 @@ -import os -from conan import ConanFile -from conans import CMake -from conan.tools.build import cross_building - - -class TestPackgeConan(ConanFile): - settings = "os", "arch", "compiler", "build_type" - test_type = "explicit" - generators = "cmake", "cmake_find_package_multi" - - def build_requirements(self): - self.build_requires(self.tested_reference_str) - - def build(self): - # It only makes sense to build a library, if the target os is Android - if self.settings.os == "Android": - cmake = CMake(self) - cmake.configure() - cmake.build() - - def test(self): - if not cross_building(self): - if self.settings.os == "Windows": - self.run("ndk-build.cmd --version", run_environment=True) - else: - self.run("ndk-build --version", run_environment=True) - - # Run the project that was built using Android NDK - if self.settings.os == "Android": - test_file = os.path.join("bin", "test_package") - assert os.path.exists(test_file) diff --git a/recipes/android-ndk/config.yml b/recipes/android-ndk/config.yml index 2f8b2364c9c1c..5a16edd20d5af 100644 --- a/recipes/android-ndk/config.yml +++ b/recipes/android-ndk/config.yml @@ -1,4 +1,8 @@ versions: + "r27": + folder: all + "r26d": + folder: all "r26c": folder: all "r26b": diff --git a/recipes/angelscript/all/conandata.yml b/recipes/angelscript/all/conandata.yml index edfe7e005b855..a5590460838fe 100644 --- a/recipes/angelscript/all/conandata.yml +++ b/recipes/angelscript/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.37.0": + url: "https://www.angelcode.com/angelscript/sdk/files/angelscript_2.37.0.zip" + sha256: "0c52d1688016a0b2484e9ca549471c4e295df060770c57840144c64815f54f10" "2.36.1": url: "https://www.angelcode.com/angelscript/sdk/files/angelscript_2.36.1.zip" sha256: "58bb749af9c7e386304705f4e6e627ae41dfe03e0b6a73c3d0d2e017c4fc948f" diff --git a/recipes/angelscript/all/conanfile.py b/recipes/angelscript/all/conanfile.py index 88cdd729c8bf1..0a17df3020929 100644 --- a/recipes/angelscript/all/conanfile.py +++ b/recipes/angelscript/all/conanfile.py @@ -10,13 +10,13 @@ class AngelScriptConan(ConanFile): name = "angelscript" - license = "Zlib" - homepage = "http://www.angelcode.com/angelscript" - url = "https://github.com/conan-io/conan-center-index" description = ( "An extremely flexible cross-platform scripting library designed to " "allow applications to extend their functionality through external scripts." ) + license = "Zlib" + url = "https://github.com/conan-io/conan-center-index" + homepage = "http://www.angelcode.com/angelscript" topics = ("angelcode", "embedded", "scripting", "language", "compiler", "interpreter") package_type = "library" @@ -90,7 +90,7 @@ def package_info(self): # TODO: back to global scope in conan v2 once cmake_find_package* generators removed self.cpp_info.components["_angelscript"].libs = [f"angelscript{postfix}"] if self.settings.os in ("Linux", "FreeBSD", "SunOS"): - self.cpp_info.components["_angelscript"].system_libs.append("pthread") + self.cpp_info.components["_angelscript"].system_libs.extend(["m", "pthread"]) # TODO: to remove in conan v2 once cmake_find_package* generators removed self.cpp_info.names["cmake_find_package"] = "Angelscript" diff --git a/recipes/angelscript/config.yml b/recipes/angelscript/config.yml index f3cbb4fedf454..621b347e7a383 100644 --- a/recipes/angelscript/config.yml +++ b/recipes/angelscript/config.yml @@ -1,4 +1,6 @@ versions: + "2.37.0": + folder: all "2.36.1": folder: all "2.36.0": diff --git a/recipes/ann/all/CMakeLists.txt b/recipes/ann/all/CMakeLists.txt new file mode 100644 index 0000000000000..869e7fed035ec --- /dev/null +++ b/recipes/ann/all/CMakeLists.txt @@ -0,0 +1,29 @@ +cmake_minimum_required(VERSION 3.15) +project(ANN LANGUAGES CXX) + +include(GNUInstallDirs) + +file(GLOB ANN_SRC_FILES ${ANN_SRC_DIR}/src/*.cpp) + +add_library(ANN ${ANN_SRC_FILES}) +target_include_directories(ANN PUBLIC ${ANN_SRC_DIR}/include) + +if(WIN32) + if(BUILD_SHARED_LIBS) + set_target_properties(ANN PROPERTIES + CXX_VISIBILITY_PRESET hidden + VISIBILITY_INLINES_HIDDEN TRUE + ) + target_compile_definitions(ANN PRIVATE DLL_EXPORTS) + else() + target_compile_definitions(ANN PUBLIC ANN_STATIC) + endif() +endif() + +install(DIRECTORY ${ANN_SRC_DIR}/include/ANN DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) +install( + TARGETS ANN + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} +) diff --git a/recipes/ann/all/conandata.yml b/recipes/ann/all/conandata.yml new file mode 100644 index 0000000000000..664adc9ca8f3c --- /dev/null +++ b/recipes/ann/all/conandata.yml @@ -0,0 +1,12 @@ +sources: + "1.1.2": + url: "https://www.cs.umd.edu/~mount/ANN/Files/1.1.2/ann_1.1.2.tar.gz" + sha256: "eea03f2e224b66813226d775053316675375dcec45bd263674c052d9324a49a5" +patches: + "1.1.2": + - patch_file: "patches/1.1.2-0001-fix-windows-static.patch" + patch_description: "Fix windows static" + patch_type: "portability" + - patch_file: "patches/1.1.2-0002-fix-cppstd17+-register-keyword.patch" + patch_description: "Fix compilation with C++17 (or above) standard, by removing register keyword" + patch_type: "portability" diff --git a/recipes/ann/all/conanfile.py b/recipes/ann/all/conanfile.py new file mode 100644 index 0000000000000..01aac4245f259 --- /dev/null +++ b/recipes/ann/all/conanfile.py @@ -0,0 +1,71 @@ +from conan import ConanFile +from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout +from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get +import os + +required_conan_version = ">=1.53.0" + + +class AnnConan(ConanFile): + name = "ann" + description = ( + "ANN is a library written in C++, which supports data structures and " + "algorithms for both exact and approximate nearest neighbor searching " + "in arbitrarily high dimensions." + ) + license = "LGPL-2.1-or-later" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://www.cs.umd.edu/~mount/ANN" + topics = ("nns", "nearest-neighbor-search") + package_type = "library" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + } + + def export_sources(self): + copy(self, "CMakeLists.txt", src=self.recipe_folder, dst=self.export_sources_folder) + export_conandata_patches(self) + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + + def layout(self): + cmake_layout(self, src_folder="src") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + tc.variables["ANN_SRC_DIR"] = self.source_folder.replace("\\", "/") + tc.generate() + + def build(self): + apply_conandata_patches(self) + cmake = CMake(self) + cmake.configure(build_script_folder=os.path.join(self.source_folder, os.pardir)) + cmake.build() + + def package(self): + for license_file in ("Copyright.txt", "License.txt"): + copy(self, license_file, src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) + cmake = CMake(self) + cmake.install() + + def package_info(self): + self.cpp_info.libs = ["ANN"] + if self.settings.os == "Windows" and not self.options.shared: + self.cpp_info.defines.append("ANN_STATIC") + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.system_libs.append("m") diff --git a/recipes/ann/all/patches/1.1.2-0001-fix-windows-static.patch b/recipes/ann/all/patches/1.1.2-0001-fix-windows-static.patch new file mode 100644 index 0000000000000..7e027ada50bbb --- /dev/null +++ b/recipes/ann/all/patches/1.1.2-0001-fix-windows-static.patch @@ -0,0 +1,11 @@ +--- a/include/ANN/ANN.h ++++ b/include/ANN/ANN.h +@@ -59,7 +59,7 @@ + #ifndef ANN_H + #define ANN_H + +-#ifdef WIN32 ++#if defined(_WIN32) && !defined(ANN_STATIC) + //---------------------------------------------------------------------- + // For Microsoft Visual C++, externally accessible symbols must be + // explicitly indicated with DLL_API, which is somewhat like "extern." diff --git a/recipes/ann/all/patches/1.1.2-0002-fix-cppstd17+-register-keyword.patch b/recipes/ann/all/patches/1.1.2-0002-fix-cppstd17+-register-keyword.patch new file mode 100644 index 0000000000000..b7ccbe07fc3a4 --- /dev/null +++ b/recipes/ann/all/patches/1.1.2-0002-fix-cppstd17+-register-keyword.patch @@ -0,0 +1,141 @@ +--- a/src/ANN.cpp ++++ b/src/ANN.cpp +@@ -48,9 +48,9 @@ ANNdist annDist( // interpoint squared distance + ANNpoint p, + ANNpoint q) + { +- register int d; +- register ANNcoord diff; +- register ANNcoord dist; ++ int d; ++ ANNcoord diff; ++ ANNcoord dist; + + dist = 0; + for (d = 0; d < dim; d++) { +--- a/src/kd_fix_rad_search.cpp ++++ b/src/kd_fix_rad_search.cpp +@@ -147,11 +147,11 @@ void ANNkd_split::ann_FR_search(ANNdist box_dist) + + void ANNkd_leaf::ann_FR_search(ANNdist box_dist) + { +- register ANNdist dist; // distance to data point +- register ANNcoord* pp; // data coordinate pointer +- register ANNcoord* qq; // query coordinate pointer +- register ANNcoord t; +- register int d; ++ ANNdist dist; // distance to data point ++ ANNcoord* pp; // data coordinate pointer ++ ANNcoord* qq; // query coordinate pointer ++ ANNcoord t; ++ int d; + + for (int i = 0; i < n_pts; i++) { // check points in bucket + +--- a/src/kd_pr_search.cpp ++++ b/src/kd_pr_search.cpp +@@ -180,12 +180,12 @@ void ANNkd_split::ann_pri_search(ANNdist box_dist) + + void ANNkd_leaf::ann_pri_search(ANNdist box_dist) + { +- register ANNdist dist; // distance to data point +- register ANNcoord* pp; // data coordinate pointer +- register ANNcoord* qq; // query coordinate pointer +- register ANNdist min_dist; // distance to k-th closest point +- register ANNcoord t; +- register int d; ++ ANNdist dist; // distance to data point ++ ANNcoord* pp; // data coordinate pointer ++ ANNcoord* qq; // query coordinate pointer ++ ANNdist min_dist; // distance to k-th closest point ++ ANNcoord t; ++ int d; + + min_dist = ANNprPointMK->max_key(); // k-th smallest distance so far + +--- a/src/kd_search.cpp ++++ b/src/kd_search.cpp +@@ -171,12 +171,12 @@ void ANNkd_split::ann_search(ANNdist box_dist) + + void ANNkd_leaf::ann_search(ANNdist box_dist) + { +- register ANNdist dist; // distance to data point +- register ANNcoord* pp; // data coordinate pointer +- register ANNcoord* qq; // query coordinate pointer +- register ANNdist min_dist; // distance to k-th closest point +- register ANNcoord t; +- register int d; ++ ANNdist dist; // distance to data point ++ ANNcoord* pp; // data coordinate pointer ++ ANNcoord* qq; // query coordinate pointer ++ ANNdist min_dist; // distance to k-th closest point ++ ANNcoord t; ++ int d; + + min_dist = ANNkdPointMK->max_key(); // k-th smallest distance so far + +--- a/src/kd_util.cpp ++++ b/src/kd_util.cpp +@@ -127,10 +127,10 @@ ANNdist annBoxDistance( // compute distance from point to box + const ANNpoint hi, // high point of box + int dim) // dimension of space + { +- register ANNdist dist = 0.0; // sum of squared distances +- register ANNdist t; ++ ANNdist dist = 0.0; // sum of squared distances ++ ANNdist t; + +- for (register int d = 0; d < dim; d++) { ++ for (int d = 0; d < dim; d++) { + if (q[d] < lo[d]) { // q is left of box + t = ANNdist(lo[d]) - ANNdist(q[d]); + dist = ANN_SUM(dist, ANN_POW(t)); +@@ -238,8 +238,8 @@ void annMedianSplit( + int l = 0; // left end of current subarray + int r = n-1; // right end of current subarray + while (l < r) { +- register int i = (r+l)/2; // select middle as pivot +- register int k; ++ int i = (r+l)/2; // select middle as pivot ++ int k; + + if (PA(i,d) > PA(r,d)) // make sure last > pivot + PASWAP(i,r) +--- a/src/pr_queue.h ++++ b/src/pr_queue.h +@@ -86,9 +86,9 @@ public: + PQinfo inf) // item info + { + if (++n > max_size) annError("Priority queue overflow.", ANNabort); +- register int r = n; ++ int r = n; + while (r > 1) { // sift up new item +- register int p = r/2; ++ int p = r/2; + ANN_FLOP(1) // increment floating ops + if (pq[p].key <= kv) // in proper order + break; +@@ -105,9 +105,9 @@ public: + { + kv = pq[1].key; // key of min item + inf = pq[1].info; // information of min item +- register PQkey kn = pq[n--].key;// last item in queue +- register int p = 1; // p points to item out of position +- register int r = p<<1; // left child of p ++ PQkey kn = pq[n--].key;// last item in queue ++ int p = 1; // p points to item out of position ++ int r = p<<1; // left child of p + while (r <= n) { // while r is still within the heap + ANN_FLOP(2) // increment floating ops + // set r to smaller child of p +--- a/src/pr_queue_k.h ++++ b/src/pr_queue_k.h +@@ -100,7 +100,7 @@ public: + PQKkey kv, // key value + PQKinfo inf) // item info + { +- register int i; ++ int i; + // slide larger values up + for (i = n; i > 0; i--) { + if (mk[i-1].key > kv) diff --git a/recipes/ann/all/test_package/CMakeLists.txt b/recipes/ann/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..fe5808fbfdff7 --- /dev/null +++ b/recipes/ann/all/test_package/CMakeLists.txt @@ -0,0 +1,7 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) + +find_package(ann REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE ann::ann) diff --git a/recipes/ann/all/test_package/conanfile.py b/recipes/ann/all/test_package/conanfile.py new file mode 100644 index 0000000000000..0a6bc68712d90 --- /dev/null +++ b/recipes/ann/all/test_package/conanfile.py @@ -0,0 +1,26 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import CMake, cmake_layout +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeToolchain", "CMakeDeps", "VirtualRunEnv" + test_type = "explicit" + + def layout(self): + cmake_layout(self) + + def requirements(self): + self.requires(self.tested_reference_str) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/ann/all/test_package/test_package.cpp b/recipes/ann/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..8a2ab526c32b2 --- /dev/null +++ b/recipes/ann/all/test_package/test_package.cpp @@ -0,0 +1,6 @@ +#include + +int main() { + ANNpoint queryPt = annAllocPt(2); + return 0; +} diff --git a/recipes/ann/config.yml b/recipes/ann/config.yml new file mode 100644 index 0000000000000..8d13aefb6b4fb --- /dev/null +++ b/recipes/ann/config.yml @@ -0,0 +1,3 @@ +versions: + "1.1.2": + folder: all diff --git a/recipes/annoy/all/conandata.yml b/recipes/annoy/all/conandata.yml new file mode 100644 index 0000000000000..540727dc55607 --- /dev/null +++ b/recipes/annoy/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "1.17.3": + url: "https://github.com/spotify/annoy/archive/refs/tags/v1.17.3.tar.gz" + sha256: "c121d38cacd98f5103b24ca4e94ca097f18179eed3037e9eb93ad70ec1e6356e" diff --git a/recipes/annoy/all/conanfile.py b/recipes/annoy/all/conanfile.py new file mode 100644 index 0000000000000..a583978167f26 --- /dev/null +++ b/recipes/annoy/all/conanfile.py @@ -0,0 +1,44 @@ +import os + +from conan import ConanFile +from conan.tools.files import copy, get +from conan.tools.layout import basic_layout + +required_conan_version = ">=1.53.0" + +class AnnoyConan(ConanFile): + name = "annoy" + description = "Approximate Nearest Neighbors optimized for memory usage and loading/saving to disk" + license = "Apache-2.0" + homepage = "https://github.com/spotify/annoy" + url = "https://github.com/conan-io/conan-center-index" + topics = ("approximate-nearest-neighbors", "machine-learning", "nearest-neighbors", "header-only") + + package_type = "header-library" + settings = "os", "arch", "compiler", "build_type" + no_copy_source = True + + def layout(self): + basic_layout(self, src_folder="src") + + def package_id(self): + self.info.clear() + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def package(self): + copy(self, "LICENSE", self.source_folder, os.path.join(self.package_folder, "licenses")) + for header in ["annoylib.h", "kissrandom.h", "mman.h"]: + copy(self, header, os.path.join(self.source_folder, "src"), os.path.join(self.package_folder, "include", "annoy")) + + def package_info(self): + self.cpp_info.set_property("cmake_file_name", "Annoy") + self.cpp_info.set_property("cmake_target_name", "Annoy::Annoy") + + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] + + # TODO: to remove in conan v2 once cmake_find_package_* generators removed + self.cpp_info.names["cmake_find_package"] = "Annoy" + self.cpp_info.names["cmake_find_package_multi"] = "Annoy" diff --git a/recipes/annoy/all/test_package/CMakeLists.txt b/recipes/annoy/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..33d34348b2425 --- /dev/null +++ b/recipes/annoy/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) + +find_package(Annoy REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE Annoy::Annoy) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) diff --git a/recipes/annoy/all/test_package/conanfile.py b/recipes/annoy/all/test_package/conanfile.py new file mode 100644 index 0000000000000..3a91c9439218e --- /dev/null +++ b/recipes/annoy/all/test_package/conanfile.py @@ -0,0 +1,26 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def layout(self): + cmake_layout(self) + + def requirements(self): + self.requires(self.tested_reference_str) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/annoy/all/test_package/test_package.cpp b/recipes/annoy/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..ee5f4538042ea --- /dev/null +++ b/recipes/annoy/all/test_package/test_package.cpp @@ -0,0 +1,27 @@ +#include +#include + +#include +#include + +int main() { + const int n = 3; + Annoy::AnnoyIndex index(n); + + double x[3][3] = {{1, 0, 0}, {0, 1, 0}, {0, 0, 1}}; + double needle[3] = {0.1, 0.1, 0.8}; + + for (int i = 0; i < n; i++) { + index.add_item(i, x[i]); + } + index.build(-1); + + std::vector result; + index.get_nns_by_vector(needle, 1, -1, &result, nullptr); + std::cout << "Nearest neighbor to vector [1.0, 0.5, 0.5]: "; + for (int i : result) { + std::cout << i << " "; + } + std::cout << std::endl; + return 0; +} diff --git a/recipes/annoy/config.yml b/recipes/annoy/config.yml new file mode 100644 index 0000000000000..a138b582eaf2e --- /dev/null +++ b/recipes/annoy/config.yml @@ -0,0 +1,3 @@ +versions: + "1.17.3": + folder: all diff --git a/recipes/approvaltests.cpp/all/conandata.yml b/recipes/approvaltests.cpp/all/conandata.yml index b3f371f3d0cdd..f5f47fc15d2ea 100644 --- a/recipes/approvaltests.cpp/all/conandata.yml +++ b/recipes/approvaltests.cpp/all/conandata.yml @@ -1,4 +1,9 @@ sources: + "10.13.0": + - url: https://github.com/approvals/ApprovalTests.cpp/releases/download/v.10.13.0/ApprovalTests.v.10.13.0.hpp + sha256: c00f6390b81d9924dc646e9d32b61e1e09abda106c13704f714ac349241bb9ff + - url: "https://raw.githubusercontent.com/approvals/ApprovalTests.cpp/v.10.13.0/LICENSE" + sha256: c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4 "10.12.2": - url: https://github.com/approvals/ApprovalTests.cpp/releases/download/v.10.12.2/ApprovalTests.v.10.12.2.hpp sha256: 4c43d0ea98669e3d6fbb5810cc47b19adaf88cabb1421b488aa306b08c434131 diff --git a/recipes/approvaltests.cpp/all/conanfile.py b/recipes/approvaltests.cpp/all/conanfile.py index 167d80165bb6d..1bfdff95cf245 100644 --- a/recipes/approvaltests.cpp/all/conanfile.py +++ b/recipes/approvaltests.cpp/all/conanfile.py @@ -1,11 +1,12 @@ from conan import ConanFile from conan.errors import ConanInvalidConfiguration +from conan.tools.build import check_min_cppstd from conan.tools.files import copy, download, rename from conan.tools.layout import basic_layout from conan.tools.scm import Version import os -required_conan_version = ">=1.51.1" +required_conan_version = ">=1.53" class ApprovalTestsCppConan(ConanFile): @@ -38,6 +39,10 @@ class ApprovalTestsCppConan(ConanFile): @property def _header_file(self): return "ApprovalTests.hpp" + + @property + def _min_cppstd(self): + return 11 def config_options(self): if Version(self.version) < "10.4.0": @@ -62,6 +67,9 @@ def package_id(self): self.info.clear() def validate(self): + if self.settings.get_safe("compiler.cppstd"): + check_min_cppstd(self, self._min_cppstd) + if Version(self.version) >= "10.2.0": if self.settings.compiler == "gcc" and Version(self.settings.compiler.version) < "5": raise ConanInvalidConfiguration(f"{self.ref} with compiler gcc requires at least compiler version 5") diff --git a/recipes/approvaltests.cpp/config.yml b/recipes/approvaltests.cpp/config.yml index caf3f177e07c7..6e7a92b2ed85a 100644 --- a/recipes/approvaltests.cpp/config.yml +++ b/recipes/approvaltests.cpp/config.yml @@ -1,4 +1,6 @@ versions: + "10.13.0": + folder: all "10.12.2": folder: all "10.12.1": diff --git a/recipes/apr-util/all/conanfile.py b/recipes/apr-util/all/conanfile.py index ed635923b1c3a..92e0be4b1f040 100644 --- a/recipes/apr-util/all/conanfile.py +++ b/recipes/apr-util/all/conanfile.py @@ -90,7 +90,7 @@ def requirements(self): if self.options.with_sqlite3: self.requires("sqlite3/3.45.0") if self.options.with_expat: - self.requires("expat/2.5.0") + self.requires("expat/[>=2.6.2 <3]") if self.options.with_postgresql: self.requires("libpq/15.4") diff --git a/recipes/apr/all/conanfile.py b/recipes/apr/all/conanfile.py index 932bac9dcf2ea..2f5b13dc054ed 100644 --- a/recipes/apr/all/conanfile.py +++ b/recipes/apr/all/conanfile.py @@ -1,3 +1,6 @@ +import os +import re + from conan import ConanFile from conan.errors import ConanException, ConanInvalidConfiguration from conan.tools.apple import fix_apple_shared_install_name @@ -9,8 +12,6 @@ from conan.tools.layout import basic_layout from conan.tools.microsoft import is_msvc from conan.tools.scm import Version -import os -import re required_conan_version = ">=1.54.0" @@ -69,7 +70,20 @@ def layout(self): def validate_build(self): if cross_building(self) and not is_msvc(self): - raise ConanInvalidConfiguration("apr recipe doesn't support cross-build yet due to runtime checks in autoconf") + msg = ("apr recipe doesn't support cross-build for all the platforms" + " due to runtime checks in autoconf. You can provide" + " a pre-built cached file as an user Conan conf variable to try it.\n\n" + "Via host profile:\n" + "[conf]\nuser.apr:cache_file=/path/to/cache_file\n\n" + "Via CLI: \n" + "-c \"user.apr:cache_file='/path/to/cache_file'\"") + # Cross-building for apr < 1.7.4 is not supported without a pre-built cached file + if Version(self.version) < "1.7.4" and self.conf.get("user.apr:cache_file") is None: + raise ConanInvalidConfiguration(msg) + # Conan provides for apr >= 1.7.4 and Linux some configuration flags to avoid + # entering a pre-built cached file + if self.settings.os != "Linux" and self.conf.get("user.apr:cache_file") is None: + raise ConanInvalidConfiguration(msg) def build_requirements(self): if not is_msvc(self): @@ -83,6 +97,47 @@ def build_requirements(self): def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) + def _get_cross_building_configure_args(self): + """ + The vast majority of projects that use autotools and make use of the AC_TRY_RUN macro, + do provide a default fallback when cross-compiling, as per the documentation here: + + * https://ftp.gnu.org/old-gnu/Manuals/autoconf-2.53/html_node/Test-Programs.html + + In that regard, APR cannot be cross-compiled by traditional means, and the only fallback + is to use a cache file. Indeed, the only way to cross-compile that is documented by upstream + is by pre-empting the configuration checks with a cache file that needs to be generated on + the target system: + + ./configure --cache-file={gnu_host_triplet}.cache + + The generated cache file can be repeatedly used to cross-compile to the targeted host system + by including it with the recipe data. + + This recipe is reading this custom user conf variable: + + [conf] + user.apr:cache_file=/path/to/{gnu_host_triplet}.cache + + So you can use it to cross-compile on your system. + """ + configure_args = [] + user_cache_file = self.conf.get("user.apr:cache_file", check_type=str) + if user_cache_file: + configure_args.append(f"--cache-file={user_cache_file}") + return configure_args + + self.output.warning("Trying to set some configuration arguments, but it" + " could fail. The best approach is to provide a" + " pre-built cached file.") + if self.settings.os == "Linux": + # Mandatory cross-building configuration flags (tested on Linux ARM and Intel) + configure_args.extend(["apr_cv_mutex_robust_shared=yes", + "ac_cv_file__dev_zero=yes", + "apr_cv_process_shared_works=yes", + "apr_cv_tcp_nodelay_with_cork=yes"]) + return configure_args + def generate(self): if is_msvc(self): tc = CMakeToolchain(self) @@ -95,7 +150,7 @@ def generate(self): tc = AutotoolsToolchain(self) tc.configure_args.append("--with-installbuilddir=${prefix}/res/build-1") if cross_building(self): - tc.configure_args.append("apr_cv_mutex_robust_shared=yes") + tc.configure_args.extend(self._get_cross_building_configure_args()) tc.generate() def _patch_sources(self): diff --git a/recipes/apriltag/all/conandata.yml b/recipes/apriltag/all/conandata.yml index 612b22768b3e7..cdf1bd2eb180f 100644 --- a/recipes/apriltag/all/conandata.yml +++ b/recipes/apriltag/all/conandata.yml @@ -1,20 +1,13 @@ sources: + "3.4.2": + url: "https://github.com/AprilRobotics/apriltag/archive/refs/tags/v3.4.2.tar.gz" + sha256: "7e021bab89f136aa3cf736f772a635aaa353f93f6f8859495f4bd8c519be4805" "3.1.4": url: "https://github.com/AprilRobotics/apriltag/archive/refs/tags/v3.1.4.tar.gz" sha256: "ad2888d432e9ddcad2f639f243479934a4cd677ed5d2f8dee3b3418617b64f5d" - "3.1.2": - url: "https://github.com/AprilRobotics/apriltag/archive/3.1.2.tar.gz" - sha256: "2759b044ff1dc9ef725e7c456b49283399ef78deee24754bc3617cbe369584f1" - "3.1.1": - url: "https://github.com/AprilRobotics/apriltag/archive/3.1.1.tar.gz" - sha256: "7349e1fcc8b2979230b46c0d62ccf2ba2bbd611d87ef80cfd37ffe74425f5efb" patches: "3.1.4": - - patch_file: "patches/3.1.4-0001-fix-cmake.patch" - - patch_file: "patches/3.1.1-0002-windows-nominmax.patch" - "3.1.2": - - patch_file: "patches/3.1.2-0001-fix-cmake.patch" - - patch_file: "patches/3.1.1-0002-windows-nominmax.patch" - "3.1.1": - - patch_file: "patches/3.1.1-0001-fix-cmake.patch" - - patch_file: "patches/3.1.1-0002-windows-nominmax.patch" + - patch_file: "patches/3.1.4-0001-disable-examples.patch" + patch_type: "conan" + patch_description: "Disable building of examples" + - patch_file: "patches/3.1.4-0002-fix-cmake.patch" diff --git a/recipes/apriltag/all/conanfile.py b/recipes/apriltag/all/conanfile.py index c5ee7a9043fc1..8c9220521508c 100644 --- a/recipes/apriltag/all/conanfile.py +++ b/recipes/apriltag/all/conanfile.py @@ -1,6 +1,6 @@ from conan import ConanFile -from conan.errors import ConanInvalidConfiguration from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.env import VirtualBuildEnv from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rmdir from conan.tools.microsoft import is_msvc from conan.tools.scm import Version @@ -11,10 +11,10 @@ class ApriltagConan(ConanFile): name = "apriltag" - description = ("AprilTag is a visual fiducial system, useful for a wide variety of tasks \ - including augmented reality, robotics, and camera calibration") + description = ("AprilTag is a visual fiducial system, useful for a wide variety of tasks" + " including augmented reality, robotics, and camera calibration") homepage = "https://april.eecs.umich.edu/software/apriltag" - topics = ("robotics",) + topics = ("robotics", "computer-vision", "augmented-reality", "camera-calibration") license = "BSD-2-Clause" url = "https://github.com/conan-io/conan-center-index" package_type = "library" @@ -45,24 +45,28 @@ def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - if is_msvc(self): + if is_msvc(self) and Version(self.version) < "3.3.0": self.requires("pthreads4w/3.0.0", transitive_headers=True) - def validate(self): - if is_msvc(self) and self.settings.build_type == "Debug": - # segfault in test package... - raise ConanInvalidConfiguration(f"{self.ref} doesn't support Debug with msvc yet") + def build_requirements(self): + if Version(self.version) >= "3.4.0": + self.tool_requires("cmake/[>=3.16 <4]") def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) def generate(self): + VirtualBuildEnv(self).generate() tc = CMakeToolchain(self) - if Version(self.version) >= "3.1.4": - tc.variables["BUILD_PYTHON_WRAPPER"] = False - tc.variables["CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS"] = True + tc.cache_variables["BUILD_EXAMPLES"] = False + tc.variables["BUILD_PYTHON_WRAPPER"] = False + if Version(self.version) < "3.4.0": + # Newer versions set it in the project CMakelists.txt + tc.variables["CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS"] = True + if self.settings.os == "Windows": + tc.preprocessor_definitions["NOMINMAX"] = "" tc.generate() - if is_msvc(self): + if is_msvc(self) and Version(self.version) < "3.3.0": deps = CMakeDeps(self) deps.generate() @@ -73,7 +77,7 @@ def build(self): cmake.build() def package(self): - copy(self, "LICENSE.md", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) + copy(self, "LICENSE.md", self.source_folder, os.path.join(self.package_folder, "licenses")) cmake = CMake(self) cmake.install() rmdir(self, os.path.join(self.package_folder, "share")) @@ -83,9 +87,13 @@ def package_info(self): self.cpp_info.set_property("cmake_file_name", "apriltag") self.cpp_info.set_property("cmake_target_name", "apriltag::apriltag") self.cpp_info.set_property("pkg_config_name", "apriltag") - self.cpp_info.libs = ["apriltag"] + suffix = "" + if self.settings.build_type == "Debug" and Version(self.version) >= "3.2.0": + suffix = "d" + self.cpp_info.libs = ["apriltag" + suffix] self.cpp_info.includedirs.append(os.path.join("include", "apriltag")) if self.settings.os in ["Linux", "FreeBSD"]: self.cpp_info.system_libs = ["m", "pthread"] elif self.settings.os == "Windows": self.cpp_info.system_libs = ["winmm"] + self.cpp_info.defines.append("NOMINMAX") diff --git a/recipes/apriltag/all/patches/3.1.1-0001-fix-cmake.patch b/recipes/apriltag/all/patches/3.1.1-0001-fix-cmake.patch deleted file mode 100644 index 74b09907feed6..0000000000000 --- a/recipes/apriltag/all/patches/3.1.1-0001-fix-cmake.patch +++ /dev/null @@ -1,67 +0,0 @@ ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -1,24 +1,29 @@ --cmake_minimum_required(VERSION 3.1) --project(apriltag) -+cmake_minimum_required(VERSION 3.8) -+project(apriltag LANGUAGES C) - --find_package(OpenCV QUIET) - - include_directories(.) - aux_source_directory(common COMMON_SRC) - aux_source_directory(. APRILTAG_SRCS) - --set(CMAKE_BUILD_TYPE Release) - - # Library --add_library(${PROJECT_NAME} SHARED ${APRILTAG_SRCS} ${COMMON_SRC}) -+add_library(${PROJECT_NAME} ${APRILTAG_SRCS} ${COMMON_SRC}) -+target_compile_features(${PROJECT_NAME} PRIVATE c_std_99) - if (MSVC) - # FindThreads will not find pthread.h with MSVC - # winmm is necessary for __imp_timeGetTime -- find_library(PTHREAD_LIBRARIES NAMES pthreads) -- target_link_libraries(${PROJECT_NAME} ${PTHREAD_LIBRARIES} winmm) -+ find_package(pthreads4w REQUIRED CONFIG) -+ target_link_libraries(${PROJECT_NAME} pthreads4w::pthreads4w winmm) -+ target_compile_definitions(${PROJECT_NAME} PRIVATE _CRT_SECURE_NO_WARNINGS) - else() - find_package(Threads REQUIRED) -- target_link_libraries(${PROJECT_NAME} Threads::Threads m) -+ target_link_libraries(${PROJECT_NAME} Threads::Threads) -+ include(CheckFunctionExists) -+ check_function_exists(pow HAVE_MATH_SYSTEM) -+ if(NOT HAVE_MATH_SYSTEM) -+ target_link_libraries(${PROJECT_NAME} m) -+ endif() - endif() - - set_target_properties(${PROJECT_NAME} PROPERTIES SOVERSION 3 VERSION 3.1.0) -@@ -39,6 +43,7 @@ set_source_files_properties(SOURCE ${TAG_FILES} PROPERTIES COMPILE_FLAGS -O0) - - # install library - install(TARGETS ${PROJECT_NAME} EXPORT apriltag -+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} - ) -@@ -63,16 +68,13 @@ install(FILES "${PROJECT_BINARY_DIR}/apriltag.pc" DESTINATION "lib/pkgconfig/") - - # Examples - # apriltag_demo --add_executable(apriltag_demo example/apriltag_demo.c) --target_link_libraries(apriltag_demo apriltag) - - # opencv_demo --if(OpenCV_FOUND) -+if(0) - add_executable(opencv_demo example/opencv_demo.cc) - target_link_libraries(opencv_demo apriltag ${OpenCV_LIBRARIES}) - install(TARGETS opencv_demo RUNTIME DESTINATION bin) --endif(OpenCV_FOUND) -+endif() - - # install example programs --install(TARGETS apriltag_demo RUNTIME DESTINATION bin) - diff --git a/recipes/apriltag/all/patches/3.1.1-0002-windows-nominmax.patch b/recipes/apriltag/all/patches/3.1.1-0002-windows-nominmax.patch deleted file mode 100644 index 6ca9d00b5704e..0000000000000 --- a/recipes/apriltag/all/patches/3.1.1-0002-windows-nominmax.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- a/common/time_util.h -+++ b/common/time_util.h -@@ -30,6 +30,7 @@ either expressed or implied, of the Regents of The University of Michigan. - #include - #include - #ifdef _WIN32 -+#define NOMINMAX - #include - typedef long long suseconds_t; - #endif ---- a/common/workerpool.c -+++ b/common/workerpool.c -@@ -33,6 +33,7 @@ either expressed or implied, of the Regents of The University of Michigan. - #include - #include - #ifdef _WIN32 -+#define NOMINMAX - #include - #else - #include diff --git a/recipes/apriltag/all/patches/3.1.2-0001-fix-cmake.patch b/recipes/apriltag/all/patches/3.1.2-0001-fix-cmake.patch deleted file mode 100644 index 58464b0668d96..0000000000000 --- a/recipes/apriltag/all/patches/3.1.2-0001-fix-cmake.patch +++ /dev/null @@ -1,83 +0,0 @@ ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -1,26 +1,31 @@ --cmake_minimum_required(VERSION 3.1) --project(apriltag) -+cmake_minimum_required(VERSION 3.8) -+project(apriltag LANGUAGES C) - --find_package(OpenCV QUIET) - - include_directories(.) - aux_source_directory(common COMMON_SRC) - set(APRILTAG_SRCS apriltag.c apriltag_pose.c apriltag_quad_thresh.c) - --set(CMAKE_BUILD_TYPE Release) - - # Library - file(GLOB TAG_FILES ${CMAKE_SOURCE_DIR}/tag*.c) - set_source_files_properties(SOURCE ${TAG_FILES} PROPERTIES COMPILE_FLAGS -O0) --add_library(${PROJECT_NAME} SHARED ${APRILTAG_SRCS} ${COMMON_SRC} ${TAG_FILES}) -+add_library(${PROJECT_NAME} ${APRILTAG_SRCS} ${COMMON_SRC} ${TAG_FILES}) -+target_compile_features(${PROJECT_NAME} PRIVATE c_std_99) - if (MSVC) - # FindThreads will not find pthread.h with MSVC - # winmm is necessary for __imp_timeGetTime -- find_library(PTHREAD_LIBRARIES NAMES pthreads) -- target_link_libraries(${PROJECT_NAME} ${PTHREAD_LIBRARIES} winmm) -+ find_package(pthreads4w REQUIRED CONFIG) -+ target_link_libraries(${PROJECT_NAME} pthreads4w::pthreads4w winmm) -+ target_compile_definitions(${PROJECT_NAME} PRIVATE _CRT_SECURE_NO_WARNINGS) - else() - find_package(Threads REQUIRED) -- target_link_libraries(${PROJECT_NAME} Threads::Threads m) -+ target_link_libraries(${PROJECT_NAME} Threads::Threads) -+ include(CheckFunctionExists) -+ check_function_exists(pow HAVE_MATH_SYSTEM) -+ if(NOT HAVE_MATH_SYSTEM) -+ target_link_libraries(${PROJECT_NAME} m) -+ endif() - endif() - - set_target_properties(${PROJECT_NAME} PROPERTIES SOVERSION 3 VERSION 3.1.0) -@@ -39,6 +43,7 @@ set_target_properties(${PROJECT_NAME} PROPERTIES - - # install library - install(TARGETS ${PROJECT_NAME} EXPORT apriltag -+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} - ) -@@ -63,6 +68,7 @@ install(FILES "${PROJECT_BINARY_DIR}/apriltag.pc" DESTINATION "lib/pkgconfig/") - - - # Python wrapper -+if(0) - SET(Python_ADDITIONAL_VERSIONS 3) - find_package(PythonLibs) - execute_process(COMMAND which python3 OUTPUT_QUIET RESULT_VARIABLE Python3_NOT_FOUND) -@@ -95,21 +101,19 @@ execute_process(COMMAND python3 -m site --user-site OUTPUT_VARIABLE PY_DEST) - string(STRIP ${PY_DEST} PY_DEST) - install(CODE "execute_process(COMMAND cp ${PROJECT_BINARY_DIR}/apriltag${PY_EXT_SUFFIX} ${PY_DEST})") - endif (NOT Python3_NOT_FOUND AND NOT Numpy_NOT_FOUND AND PYTHONLIBS_FOUND) -+endif() - - - # Examples - # apriltag_demo --add_executable(apriltag_demo example/apriltag_demo.c) --target_link_libraries(apriltag_demo apriltag) - - # opencv_demo --if(OpenCV_FOUND) -+if(0) - add_executable(opencv_demo example/opencv_demo.cc) - target_link_libraries(opencv_demo apriltag ${OpenCV_LIBRARIES}) - set_target_properties(opencv_demo PROPERTIES CXX_STANDARD 11) - install(TARGETS opencv_demo RUNTIME DESTINATION bin) --endif(OpenCV_FOUND) -+endif() - - # install example programs --install(TARGETS apriltag_demo RUNTIME DESTINATION bin) - diff --git a/recipes/apriltag/all/patches/3.1.4-0001-disable-examples.patch b/recipes/apriltag/all/patches/3.1.4-0001-disable-examples.patch new file mode 100644 index 0000000000000..a3696589cece2 --- /dev/null +++ b/recipes/apriltag/all/patches/3.1.4-0001-disable-examples.patch @@ -0,0 +1,15 @@ +--- CMakeLists.txt ++++ CMakeLists.txt +@@ -101,6 +101,7 @@ + + + # Examples ++if(BUILD_EXAMPLES) + # apriltag_demo + add_executable(apriltag_demo example/apriltag_demo.c) + target_link_libraries(apriltag_demo apriltag) +@@ -115,3 +116,4 @@ + + # install example programs + install(TARGETS apriltag_demo RUNTIME DESTINATION bin) ++endif() diff --git a/recipes/apriltag/all/patches/3.1.4-0001-fix-cmake.patch b/recipes/apriltag/all/patches/3.1.4-0001-fix-cmake.patch deleted file mode 100644 index ba813f1dc3969..0000000000000 --- a/recipes/apriltag/all/patches/3.1.4-0001-fix-cmake.patch +++ /dev/null @@ -1,69 +0,0 @@ ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -1,26 +1,31 @@ --cmake_minimum_required(VERSION 3.1) --project(apriltag) -+cmake_minimum_required(VERSION 3.8) -+project(apriltag LANGUAGES C) - --find_package(OpenCV QUIET) - - include_directories(.) - aux_source_directory(common COMMON_SRC) - set(APRILTAG_SRCS apriltag.c apriltag_pose.c apriltag_quad_thresh.c) - --set(CMAKE_BUILD_TYPE Release) - - # Library - file(GLOB TAG_FILES ${PROJECT_SOURCE_DIR}/tag*.c) - set_source_files_properties(SOURCE ${TAG_FILES} PROPERTIES COMPILE_FLAGS -O0) --add_library(${PROJECT_NAME} SHARED ${APRILTAG_SRCS} ${COMMON_SRC} ${TAG_FILES}) -+add_library(${PROJECT_NAME} ${APRILTAG_SRCS} ${COMMON_SRC} ${TAG_FILES}) -+target_compile_features(${PROJECT_NAME} PRIVATE c_std_99) - if (MSVC) - # FindThreads will not find pthread.h with MSVC - # winmm is necessary for __imp_timeGetTime -- find_library(PTHREAD_LIBRARIES NAMES pthreads) -- target_link_libraries(${PROJECT_NAME} ${PTHREAD_LIBRARIES} winmm) -+ find_package(pthreads4w REQUIRED CONFIG) -+ target_link_libraries(${PROJECT_NAME} pthreads4w::pthreads4w winmm) -+ target_compile_definitions(${PROJECT_NAME} PRIVATE _CRT_SECURE_NO_WARNINGS) - else() - find_package(Threads REQUIRED) -- target_link_libraries(${PROJECT_NAME} PUBLIC Threads::Threads m) -+ target_link_libraries(${PROJECT_NAME} Threads::Threads) -+ include(CheckFunctionExists) -+ check_function_exists(pow HAVE_MATH_SYSTEM) -+ if(NOT HAVE_MATH_SYSTEM) -+ target_link_libraries(${PROJECT_NAME} m) -+ endif() - endif() - - set_target_properties(${PROJECT_NAME} PROPERTIES SOVERSION 3 VERSION 3.1.0) -@@ -33,6 +37,7 @@ target_include_directories(${PROJECT_NAME} PUBLIC - - # install library - install(TARGETS ${PROJECT_NAME} EXPORT apriltagTargets -+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} - ) -@@ -102,16 +107,13 @@ endif (NOT Python3_NOT_FOUND AND NOT Numpy_NOT_FOUND AND PYTHONLIBS_FOUND AND BU - - # Examples - # apriltag_demo --add_executable(apriltag_demo example/apriltag_demo.c) --target_link_libraries(apriltag_demo apriltag) - - # opencv_demo --if(OpenCV_FOUND) -+if(0) - add_executable(opencv_demo example/opencv_demo.cc) - target_link_libraries(opencv_demo apriltag ${OpenCV_LIBRARIES}) - set_target_properties(opencv_demo PROPERTIES CXX_STANDARD 11) - install(TARGETS opencv_demo RUNTIME DESTINATION bin) --endif(OpenCV_FOUND) -+endif() - - # install example programs --install(TARGETS apriltag_demo RUNTIME DESTINATION bin) diff --git a/recipes/apriltag/all/patches/3.1.4-0002-fix-cmake.patch b/recipes/apriltag/all/patches/3.1.4-0002-fix-cmake.patch new file mode 100644 index 0000000000000..7baec487b4ea0 --- /dev/null +++ b/recipes/apriltag/all/patches/3.1.4-0002-fix-cmake.patch @@ -0,0 +1,50 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,26 +1,31 @@ +-cmake_minimum_required(VERSION 3.1) +-project(apriltag) ++cmake_minimum_required(VERSION 3.15) ++project(apriltag LANGUAGES C) + +-find_package(OpenCV QUIET) + + include_directories(.) + aux_source_directory(common COMMON_SRC) + set(APRILTAG_SRCS apriltag.c apriltag_pose.c apriltag_quad_thresh.c) + +-set(CMAKE_BUILD_TYPE Release) + + # Library + file(GLOB TAG_FILES ${PROJECT_SOURCE_DIR}/tag*.c) + set_source_files_properties(SOURCE ${TAG_FILES} PROPERTIES COMPILE_FLAGS -O0) +-add_library(${PROJECT_NAME} SHARED ${APRILTAG_SRCS} ${COMMON_SRC} ${TAG_FILES}) ++add_library(${PROJECT_NAME} ${APRILTAG_SRCS} ${COMMON_SRC} ${TAG_FILES}) ++target_compile_features(${PROJECT_NAME} PRIVATE c_std_99) + if (MSVC) + # FindThreads will not find pthread.h with MSVC + # winmm is necessary for __imp_timeGetTime +- find_library(PTHREAD_LIBRARIES NAMES pthreads) +- target_link_libraries(${PROJECT_NAME} ${PTHREAD_LIBRARIES} winmm) ++ find_package(pthreads4w REQUIRED CONFIG) ++ target_link_libraries(${PROJECT_NAME} pthreads4w::pthreads4w winmm) ++ target_compile_definitions(${PROJECT_NAME} PRIVATE _CRT_SECURE_NO_WARNINGS) + else() + find_package(Threads REQUIRED) +- target_link_libraries(${PROJECT_NAME} PUBLIC Threads::Threads m) ++ target_link_libraries(${PROJECT_NAME} Threads::Threads) ++ include(CheckFunctionExists) ++ check_function_exists(pow HAVE_MATH_SYSTEM) ++ if(NOT HAVE_MATH_SYSTEM) ++ target_link_libraries(${PROJECT_NAME} m) ++ endif() + endif() + + set_target_properties(${PROJECT_NAME} PROPERTIES SOVERSION 3 VERSION 3.1.0) +@@ -35,6 +30,7 @@ + install(TARGETS ${PROJECT_NAME} EXPORT apriltagTargets + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + ) + + # install header file hierarchy diff --git a/recipes/apriltag/all/test_package/test_package.c b/recipes/apriltag/all/test_package/test_package.c index 098b0a3741e4d..78f28e3f94542 100644 --- a/recipes/apriltag/all/test_package/test_package.c +++ b/recipes/apriltag/all/test_package/test_package.c @@ -10,8 +10,8 @@ int main(int argc, char *argv[]) apriltag_family_t *tf = tagStandard41h12_create(); apriltag_detector_add_family(td, tf); - tagStandard41h12_destroy(tf); apriltag_detector_destroy(td); + tagStandard41h12_destroy(tf); printf("Apriltag test_package ran successfully\n"); diff --git a/recipes/apriltag/config.yml b/recipes/apriltag/config.yml index 6aa1925bfcd8e..0471f5090e86a 100644 --- a/recipes/apriltag/config.yml +++ b/recipes/apriltag/config.yml @@ -1,7 +1,5 @@ versions: - "3.1.4": - folder: all - "3.1.2": + "3.4.2": folder: all - "3.1.1": + "3.1.4": folder: all diff --git a/recipes/aravis/all/conandata.yml b/recipes/aravis/all/conandata.yml index 768365163e373..07eea0a5354b4 100644 --- a/recipes/aravis/all/conandata.yml +++ b/recipes/aravis/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.8.33": + url: "https://github.com/AravisProject/aravis/releases/download/0.8.33/aravis-0.8.33.tar.xz" + sha256: "3c4409a12ea70bba4de25e5b08c777112de854bc801896594f2cb6f8c2bd6fbc" "0.8.30": url: "https://github.com/AravisProject/aravis/releases/download/0.8.30/aravis-0.8.30.tar.xz" sha256: "40380f06fa04524a7875bd456e5a5ea78b2c058fa84b5598bc6e0642fcef00b0" @@ -8,9 +11,6 @@ sources: "0.8.25": # latest version that supports GenDC data format (supported by U3V 1.1) url: "https://github.com/AravisProject/aravis/releases/download/0.8.25/aravis-0.8.25.tar.xz" sha256: "3ba18f941ae4e2c898fed1f63c4ce67ea41a800a902ee5684eef4ffdb87f1c09" - "0.8.20": - url: "https://github.com/AravisProject/aravis/releases/download/0.8.20/aravis-0.8.20.tar.xz" - sha256: "0c0eb5a76109f29180c09c7e6a23fd403633bf22bbe8468a0ae44995c4449f46" patches: "0.8.30": - patch_file: "patches/0.8.29-gst-shared-lib.patch" @@ -24,7 +24,3 @@ patches: - patch_file: "patches/0.8.25-gst-shared-lib.patch" patch_description: "remove forcing of shared library built for gst-plugins" patch_type: conan - "0.8.20": - - patch_file: "patches/0.8.19-gst-shared-lib.patch" - patch_description: "remove forcing of shared library built for gst-plugins" - patch_type: conan diff --git a/recipes/aravis/all/conanfile.py b/recipes/aravis/all/conanfile.py index af5a8560dea48..1b412478f26e7 100644 --- a/recipes/aravis/all/conanfile.py +++ b/recipes/aravis/all/conanfile.py @@ -33,7 +33,6 @@ class AravisConan(ConanFile): "gst_plugin": [True, False], "tools": [True, False], "introspection": [True, False], - "gv_n_buffers": ["ANY"], } default_options = { "shared": False, @@ -43,7 +42,6 @@ class AravisConan(ConanFile): "gst_plugin": False, "tools": True, "introspection": False, - "gv_n_buffers": 16, } def export_sources(self): @@ -54,10 +52,6 @@ def config_options(self): del self.options.fPIC if self.settings.os not in ["Linux", "FreeBSD"]: del self.options.packet_socket - # https://github.com/AravisProject/aravis/commit/b4211e5e0266d0226e936818b3faefd6d0daaa3a#diff-f28598af2e23aa5d2bc7c72e022ae2c56a33802eb970afffaeca1e40607f97fe - if Version(self.version) < "0.8.21": - del self.options.gv_n_buffers - def configure(self): if self.options.shared: @@ -72,8 +66,8 @@ def layout(self): def requirements(self): # glib-object.h and gio/gio.h are used in several public headers - self.requires("glib/2.78.1", transitive_headers=True) - self.requires("libxml2/2.12.3") + self.requires("glib/2.78.3", transitive_headers=True) + self.requires("libxml2/[>=2.12.5 <3]") self.requires("zlib/[>=1.2.11 <2]") if self.options.usb: @@ -93,18 +87,9 @@ def validate(self): "conan-io/conan#7324 gets merged to fix macOS SIP issue #8443" ) - if self.options.get_safe("gv_n_buffers"): - try: - gv_n_buffers_val = int(str(self.options.gv_n_buffers)) - if gv_n_buffers_val < 1: - raise ConanInvalidConfiguration( - f"gv_n_buffers_val must be greater than 1 Provided: {gv_n_buffers_val}") - except ValueError as e: - raise ConanInvalidConfiguration("gv_n_buffers_val must be an integer.") from e - def build_requirements(self): #windows build: meson/1.2.1 works, meson/1.2.2 breaks for some reason! - self.tool_requires("meson/1.3.1") + self.tool_requires("meson/1.4.0") self.tool_requires("glib/") if not self.conf.get("tools.gnu:pkg_config", check_type=str): self.tool_requires("pkgconf/2.1.0") @@ -129,10 +114,6 @@ def generate(self): tc.project_options["viewer"] = "disabled" tc.project_options["tests"] = False tc.project_options["documentation"] = "disabled" - - if self.options.get_safe("gv_n_buffers"): - tc.project_options["gv-n-buffers"] = int(str(self.options.gv_n_buffers)) - tc.project_options["fast-heartbeat"] = False if self.settings.get_safe("compiler.runtime"): tc.project_options["b_vscrt"] = msvc_runtime_flag(self).lower() diff --git a/recipes/aravis/all/patches/0.8.19-gst-shared-lib.patch b/recipes/aravis/all/patches/0.8.19-gst-shared-lib.patch deleted file mode 100644 index fec845831e656..0000000000000 --- a/recipes/aravis/all/patches/0.8.19-gst-shared-lib.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/gst/meson.build -+++ b/gst/meson.build -@@ -15,7 +15,7 @@ gst_c_args = [ - - gst_plugin_filename = 'gstaravis.@0@'.format (aravis_api_version) - --gst_plugin = shared_library (gst_plugin_filename, -+gst_plugin = library (gst_plugin_filename, - gst_sources, gst_headers, - name_suffix: [], - link_with: aravis_library, diff --git a/recipes/aravis/config.yml b/recipes/aravis/config.yml index 1aa8532edf0e6..456a2949d4232 100644 --- a/recipes/aravis/config.yml +++ b/recipes/aravis/config.yml @@ -1,4 +1,6 @@ versions: + "0.8.33": + folder: all "0.8.30": folder: all "0.8.29": @@ -6,5 +8,3 @@ versions: # 0.8.25 is the last version to support GenDC data format "0.8.25": folder: all - "0.8.20": - folder: all diff --git a/recipes/arcus/all/conanfile.py b/recipes/arcus/all/conanfile.py index 8f6e301a39313..38ae3416bb350 100644 --- a/recipes/arcus/all/conanfile.py +++ b/recipes/arcus/all/conanfile.py @@ -45,7 +45,7 @@ def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - self.requires("protobuf/3.21.9") + self.requires("protobuf/3.21.12") def validate(self): if self.settings.compiler.get_safe("cppstd"): diff --git a/recipes/argparse/all/conandata.yml b/recipes/argparse/all/conandata.yml index 719dc54ae5a72..db1ee3caae6a8 100644 --- a/recipes/argparse/all/conandata.yml +++ b/recipes/argparse/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "3.1": + url: "https://github.com/p-ranav/argparse/archive/v3.1.tar.gz" + sha256: "d01733552ca4a18ab501ae8b8be878131baa32e89090fafdeef018ebfa4c6e46" "3.0": url: "https://github.com/p-ranav/argparse/archive/v3.0.tar.gz" sha256: "ba7b465759bb01069d57302855eaf4d1f7d677f21ad7b0b00b92939645c30f47" diff --git a/recipes/argparse/all/conanfile.py b/recipes/argparse/all/conanfile.py index 11300088df46e..cae941dd0cc89 100644 --- a/recipes/argparse/all/conanfile.py +++ b/recipes/argparse/all/conanfile.py @@ -75,12 +75,11 @@ def package(self): copy(self, "*.hpp", src=os.path.join(self.source_folder, "include"), dst=include_dst) def package_info(self): + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] + self.cpp_info.set_property("cmake_file_name", "argparse") self.cpp_info.set_property("cmake_target_name", "argparse::argparse") self.cpp_info.set_property("pkg_config_name", "argparse") if Version(self.version) <= "2.1": self.cpp_info.includedirs.append(os.path.join("include", "argparse")) - self.cpp_info.bindirs = [] - self.cpp_info.frameworkdirs = [] - self.cpp_info.libdirs = [] - self.cpp_info.resdirs = [] diff --git a/recipes/argparse/config.yml b/recipes/argparse/config.yml index fef29e0dad433..7a2d6d99b91e4 100644 --- a/recipes/argparse/config.yml +++ b/recipes/argparse/config.yml @@ -1,4 +1,6 @@ versions: + "3.1": + folder: all "3.0": folder: all "2.9": diff --git a/recipes/args-parser/all/conandata.yml b/recipes/args-parser/all/conandata.yml index 427c4c05d81dd..5a22686895e16 100644 --- a/recipes/args-parser/all/conandata.yml +++ b/recipes/args-parser/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "6.3.4": + url: "https://github.com/igormironchik/args-parser/archive/refs/tags/6.3.4.tar.gz" + sha256: "874be94baac622e16045b958539e91347f18fc0803356fb500757c0060222aa2" "6.3.3": url: "https://github.com/igormironchik/args-parser/archive/refs/tags/6.3.3.tar.gz" sha256: "67867d7ab624a8c2f391230c54c37830e6127f7f5c716ff634165f674d876b64" diff --git a/recipes/args-parser/all/conanfile.py b/recipes/args-parser/all/conanfile.py index f4ea312819ef0..45b750c9e57c9 100644 --- a/recipes/args-parser/all/conanfile.py +++ b/recipes/args-parser/all/conanfile.py @@ -56,7 +56,10 @@ def build(self): pass def package(self): - copy(self, "COPYING", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) + if Version(self.version) <= "6.3.3": + copy(self, "COPYING", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) + else: + copy(self, "MIT.txt", src=os.path.join(self.source_folder, "LICENSES"), dst=os.path.join(self.package_folder, "licenses")) copy(self, "*.hpp", src=os.path.join(self.source_folder, "args-parser"), dst=os.path.join(self.package_folder, "include", "args-parser")) def package_info(self): diff --git a/recipes/args-parser/config.yml b/recipes/args-parser/config.yml index b67bad0e21e0f..9b0a8042dbf5e 100644 --- a/recipes/args-parser/config.yml +++ b/recipes/args-parser/config.yml @@ -1,4 +1,6 @@ versions: + "6.3.4": + folder: all "6.3.3": folder: all "6.3.2": diff --git a/recipes/argz/all/conandata.yml b/recipes/argz/all/conandata.yml new file mode 100644 index 0000000000000..a8b111b9078ce --- /dev/null +++ b/recipes/argz/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "0.2.1": + url: "https://github.com/stephenberry/argz/archive/refs/tags/v0.2.1.tar.gz" + sha256: "1a9d85ef7e4722f81ce426c2cf8ceaa0a10cc42e7762cdf2465ae6484ece9c7e" diff --git a/recipes/argz/all/conanfile.py b/recipes/argz/all/conanfile.py new file mode 100644 index 0000000000000..1d0b4e30fd7e6 --- /dev/null +++ b/recipes/argz/all/conanfile.py @@ -0,0 +1,70 @@ +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.build import check_min_cppstd +from conan.tools.files import copy, get +from conan.tools.layout import basic_layout +from conan.tools.scm import Version +import os + + +required_conan_version = ">=1.52.0" + + +class ArgzConan(ConanFile): + name = "argz" + description = "A light weight C++ in memory argument parser" + license = "Apache-2.0" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/stephenberry/argz" + topics = ("argument", "parser", "header-only") + package_type = "header-library" + settings = "os", "arch", "compiler", "build_type" + no_copy_source = True + + @property + def _min_cppstd(self): + return 20 + + @property + def _compilers_minimum_version(self): + return { + "gcc": "11", + "clang": "12", + "apple-clang": "14", + "Visual Studio": "16", + "msvc": "192", + } + + def layout(self): + basic_layout(self, src_folder="src") + + def package_id(self): + self.info.clear() + + def validate(self): + if self.settings.compiler.get_safe("cppstd"): + check_min_cppstd(self, self._min_cppstd) + minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) + if minimum_version and Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration( + f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." + ) + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def package(self): + copy(self, "LICENSE", self.source_folder, os.path.join(self.package_folder, "licenses")) + copy( + self, + "*.hpp", + os.path.join(self.source_folder, "include"), + os.path.join(self.package_folder, "include"), + ) + + def package_info(self): + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] + + self.cpp_info.set_property("cmake_file_name", "argz") + self.cpp_info.set_property("cmake_target_name", "argz::argz") diff --git a/recipes/argz/all/test_package/CMakeLists.txt b/recipes/argz/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..8904da5a62a1d --- /dev/null +++ b/recipes/argz/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) + +find_package(argz REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE argz::argz) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_20) diff --git a/recipes/argz/all/test_package/conanfile.py b/recipes/argz/all/test_package/conanfile.py new file mode 100644 index 0000000000000..3a91c9439218e --- /dev/null +++ b/recipes/argz/all/test_package/conanfile.py @@ -0,0 +1,26 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def layout(self): + cmake_layout(self) + + def requirements(self): + self.requires(self.tested_reference_str) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/argz/all/test_package/test_package.cpp b/recipes/argz/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..8e6558ac798fa --- /dev/null +++ b/recipes/argz/all/test_package/test_package.cpp @@ -0,0 +1,28 @@ +#include + +int main(int argc, char* argv[]) { + constexpr std::string_view version = "1.2.3"; + argz::about about{ "My program description", version }; + + std::string input{}; + std::string study{}; + int number = 123; + bool boolean = true; + std::optional number_opt{}; + argz::options opts{ + { { "input", 'i' }, input, "the input file"}, + { { "study", 's' }, study, "a study file"}, + { { "number" }, number, "input an int"}, + { { "boolean" }, boolean, "a boolean" }, + { { "number_opt" }, number_opt, "input an int"} + }; + + try { + argz::parse(about, opts, argc, argv); + } + catch (const std::exception& e) { + std::cerr << e.what() << '\n'; + } + + return 0; +} diff --git a/recipes/argz/config.yml b/recipes/argz/config.yml new file mode 100644 index 0000000000000..f975c1e3261f7 --- /dev/null +++ b/recipes/argz/config.yml @@ -0,0 +1,3 @@ +versions: + "0.2.1": + folder: all diff --git a/recipes/armadillo/all/conanfile.py b/recipes/armadillo/all/conanfile.py index d37ca846e702e..4735e4fcda303 100644 --- a/recipes/armadillo/all/conanfile.py +++ b/recipes/armadillo/all/conanfile.py @@ -1,13 +1,14 @@ from conan import ConanFile from conan.tools.cmake import CMake, CMakeToolchain, CMakeDeps, cmake_layout -from conan.tools.files import copy, get, rmdir, apply_conandata_patches, export_conandata_patches +from conan.tools.files import copy, get, rmdir, apply_conandata_patches, export_conandata_patches, save from conan.tools.build import check_min_cppstd from conan.tools.scm import Version from conan.tools.build import cross_building from conan.errors import ConanInvalidConfiguration import os +import textwrap -required_conan_version = ">=1.53.0" +required_conan_version = ">=1.55.0" class ArmadilloConan(ConanFile): @@ -258,6 +259,40 @@ def build(self): cmake.configure() cmake.build() + @property + def _get_arma_version_name(self): + version_file = os.path.join(self.source_folder, "include", "armadillo_bits", "arma_version.hpp") + with open(version_file, "r") as f: + for line in f: + if "ARMA_VERSION_NAME" in line: + return line.split("\"")[-2].strip() + return "" + + @property + def _module_vars_rel_path(self): + return os.path.join("lib", "cmake", f"conan-official-{self.name}-variables.cmake") + + def _create_cmake_module_variables(self, module_file): + content = textwrap.dedent(f"""\ + set(ARMADILLO_FOUND TRUE) + if(DEFINED Armadillo_INCLUDE_DIRS) + set(ARMADILLO_INCLUDE_DIRS ${{Armadillo_INCLUDE_DIRS}}) + endif() + if(DEFINED Armadillo_LIBRARIES) + set(ARMADILLO_LIBRARIES ${{Armadillo_LIBRARIES}}) + endif() + set(ARMADILLO_VERSION_MAJOR "{Version(self.version).major}") + set(ARMADILLO_VERSION_MINOR "{Version(self.version).minor}") + set(ARMADILLO_VERSION_PATCH "{Version(self.version).patch}") + if(DEFINED Armadillo_VERSION_STRING) + set(ARMADILLO_VERSION_STRING ${{Armadillo_VERSION_STRING}}) + else() + set(ARMADILLO_VERSION_STRING "${{ARMADILLO_VERSION_MAJOR}}.${{ARMADILLO_VERSION_MINOR}}.${{ARMADILLO_VERSION_PATCH}}") + endif() + set(ARMADILLO_VERSION_NAME "{self._get_arma_version_name}") + """) + save(self, module_file, content) + def package(self): cmake = CMake(self) cmake.install() @@ -266,10 +301,25 @@ def package(self): copy(self, "NOTICE.txt", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) rmdir(self, os.path.join(self.package_folder, "share")) + self._create_cmake_module_variables(os.path.join(self.package_folder, self._module_vars_rel_path)) + def package_info(self): self.cpp_info.libs = ["armadillo"] self.cpp_info.set_property("pkg_config_name", "armadillo") + self.cpp_info.set_property("cmake_find_mode", "both") + self.cpp_info.set_property("cmake_file_name", "Armadillo") + self.cpp_info.set_property("cmake_target_name", "Armadillo::Armadillo") + self.cpp_info.set_property("cmake_target_aliases", ["armadillo", "armadillo::armadillo"]) + self.cpp_info.set_property("cmake_build_modules", [self._module_vars_rel_path]) + + # Remove when cmake_find_package and pkg_config generators are no + # longer supported + self.cpp_info.names["pkg_config"] = "armadillo" + self.cpp_info.names["cmake_find_package"] = "Armadillo" + self.cpp_info.names["cmake_find_package_multi"] = "Armadillo" + self.cpp_info.build_modules["cmake_find_package"] = [self._module_vars_rel_path] + self.cpp_info.build_modules["cmake_find_package_multi"] = [self._module_vars_rel_path] if self.options.get_safe("use_extern_rng"): self.cpp_info.defines.append("ARMA_USE_EXTERN_RNG") diff --git a/recipes/armadillo/all/test_package/CMakeLists.txt b/recipes/armadillo/all/test_package/CMakeLists.txt index da38c2d4cf348..7f0a114a2e9e8 100644 --- a/recipes/armadillo/all/test_package/CMakeLists.txt +++ b/recipes/armadillo/all/test_package/CMakeLists.txt @@ -1,12 +1,32 @@ cmake_minimum_required(VERSION 3.15) project(PackageTest CXX) -find_package(armadillo CONFIG REQUIRED) +find_package(Armadillo CONFIG REQUIRED) if (LINK_HDF5) find_package(HDF5) set(HDF5_TARGETS HDF5::HDF5) endif() add_executable(example src/example.cpp) -target_link_libraries(example armadillo::armadillo ${HDF5_TARGETS}) +target_link_libraries(example Armadillo::Armadillo ${HDF5_TARGETS}) set_property(TARGET example PROPERTY CXX_STANDARD 11) + +# Test whether variables from https://cmake.org/cmake/help/latest/module/FindArmadillo.html are properly defined + +set(_custom_vars + ARMADILLO_FOUND + ARMADILLO_INCLUDE_DIRS + ARMADILLO_LIBRARIES + ARMADILLO_VERSION_MAJOR + ARMADILLO_VERSION_MINOR + ARMADILLO_VERSION_PATCH + ARMADILLO_VERSION_STRING + ARMADILLO_VERSION_NAME +) +foreach(_custom_var ${_custom_vars}) + if(DEFINED ${_custom_var}) + message(STATUS "${_custom_var}: ${${_custom_var}}") + else() + message(FATAL_ERROR "${_custom_var} not defined") + endif() +endforeach() diff --git a/recipes/armadillo/all/test_v1_package/CMakeLists.txt b/recipes/armadillo/all/test_v1_package/CMakeLists.txt index 3ac69a9731274..30cc31a24a3d1 100644 --- a/recipes/armadillo/all/test_v1_package/CMakeLists.txt +++ b/recipes/armadillo/all/test_v1_package/CMakeLists.txt @@ -4,8 +4,28 @@ project(PackageTest CXX) include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) conan_basic_setup(TARGETS) -find_package(armadillo REQUIRED) +find_package(Armadillo REQUIRED) add_executable(example ../test_package/src/example.cpp) -target_link_libraries(example armadillo::armadillo) +target_link_libraries(example Armadillo::Armadillo) set_property(TARGET example PROPERTY CXX_STANDARD 11) + +# Test whether variables from https://cmake.org/cmake/help/latest/module/FindArmadillo.html are properly defined + +set(_custom_vars + ARMADILLO_FOUND + ARMADILLO_INCLUDE_DIRS + ARMADILLO_LIBRARIES + ARMADILLO_VERSION_MAJOR + ARMADILLO_VERSION_MINOR + ARMADILLO_VERSION_PATCH + ARMADILLO_VERSION_STRING + ARMADILLO_VERSION_NAME +) +foreach(_custom_var ${_custom_vars}) + if(DEFINED ${_custom_var}) + message(STATUS "${_custom_var}: ${${_custom_var}}") + else() + message(FATAL_ERROR "${_custom_var} not defined") + endif() +endforeach() diff --git a/recipes/arrow/all/conandata.yml b/recipes/arrow/all/conandata.yml index 030422c3d34b6..dfb0971c17f1a 100644 --- a/recipes/arrow/all/conandata.yml +++ b/recipes/arrow/all/conandata.yml @@ -1,4 +1,13 @@ sources: + "17.0.0": + url: "https://www.apache.org/dyn/closer.lua/arrow/arrow-17.0.0/apache-arrow-17.0.0.tar.gz?action=download" + sha256: "9d280d8042e7cf526f8c28d170d93bfab65e50f94569f6a790982a878d8d898d" + "16.1.0": + url: "https://www.apache.org/dyn/closer.lua/arrow/arrow-16.1.0/apache-arrow-16.1.0.tar.gz?action=download" + sha256: "c9e60c7e87e59383d21b20dc874b17153729ee153264af6d21654b7dff2c60d7" + "16.0.0": + url: "https://www.apache.org/dyn/closer.lua/arrow/arrow-16.0.0/apache-arrow-16.0.0.tar.gz?action=download" + sha256: "9f4051ae9473c97991d9af801e2f94ae3455067719ca7f90b8137f9e9a700b8d" "15.0.0": url: "https://www.apache.org/dyn/closer.lua/arrow/arrow-15.0.0/apache-arrow-15.0.0.tar.gz?action=download" sha256: "01dd3f70e85d9b5b933ec92c0db8a4ef504a5105f78d2d8622e84279fb45c25d" @@ -39,24 +48,85 @@ sources: url: "https://www.apache.org/dyn/closer.lua/arrow/arrow-7.0.0/apache-arrow-7.0.0.tar.gz?action=download" sha256: "e8f49b149a15ecef4e40fcfab1b87c113c6b1ee186005c169e5cdf95d31a99de" patches: + "17.0.0": + - patch_file: "patches/16.0.0-0001-fix-cmake.patch" + patch_description: "use cci package" + patch_type: "conan" + "16.1.0": + - patch_file: "patches/16.0.0-0001-fix-cmake.patch" + patch_description: "use cci package" + patch_type: "conan" + "16.0.0": + - patch_file: "patches/16.0.0-0001-fix-cmake.patch" + patch_description: "use cci package" + patch_type: "conan" + "15.0.0": + - patch_file: "patches/11.0.0-0001-fix-cmake.patch" + patch_description: "use cci package" + patch_type: "conan" + "14.0.2": + - patch_file: "patches/11.0.0-0001-fix-cmake.patch" + patch_description: "use cci package" + patch_type: "conan" + "14.0.1": + - patch_file: "patches/11.0.0-0001-fix-cmake.patch" + patch_description: "use cci package" + patch_type: "conan" + "14.0.0": + - patch_file: "patches/11.0.0-0001-fix-cmake.patch" + patch_description: "use cci package" + patch_type: "conan" + "13.0.0": + - patch_file: "patches/11.0.0-0001-fix-cmake.patch" + patch_description: "use cci package" + patch_type: "conan" + "12.0.1": + - patch_file: "patches/11.0.0-0001-fix-cmake.patch" + patch_description: "use cci package" + patch_type: "conan" + "12.0.0": + - patch_file: "patches/11.0.0-0001-fix-cmake.patch" + patch_description: "use cci package" + patch_type: "conan" + "11.0.0": + - patch_file: "patches/11.0.0-0001-fix-cmake.patch" + patch_description: "use cci package" + patch_type: "conan" "8.0.1": - - patch_file: "patches/8.0.0-0005-install-utils.patch" - patch_description: "enable utilis installation" + - patch_file: "patches/8.0.0-0001-static-analyzers.patch" + patch_description: "do not look for static analyzers" + patch_type: "conan" + - patch_file: "patches/8.0.0-0002-install-utils.patch" + patch_description: "enable utils installation" patch_type: "conan" - - patch_file: "patches/8.0.0-0006-fix-cmake.patch" + - patch_file: "patches/8.0.0-0003-fix-cmake.patch" patch_description: "use cci package" patch_type: "conan" + - patch_file: "patches/8.0.0-0004-fix-msvc-build.patch" + patch_description: "patch Arrow such that it can be built using MSVC" + patch_type: "backport" + patch_source: "https://github.com/apache/arrow/pull/13108" "8.0.0": - - patch_file: "patches/8.0.0-0005-install-utils.patch" - patch_description: "enable utilis installation" + - patch_file: "patches/8.0.0-0001-static-analyzers.patch" + patch_description: "do not look for static analyzers" patch_type: "conan" - - patch_file: "patches/8.0.0-0006-fix-cmake.patch" + - patch_file: "patches/8.0.0-0002-install-utils.patch" + patch_description: "enable utils installation" + patch_type: "conan" + - patch_file: "patches/8.0.0-0003-fix-cmake.patch" patch_description: "use cci package" patch_type: "conan" + - patch_file: "patches/8.0.0-0004-fix-msvc-build.patch" + patch_description: "patch Arrow such that it can be built using MSVC" + patch_type: "backport" + patch_source: "https://github.com/apache/arrow/pull/13108" "7.0.0": - - patch_file: "patches/7.0.0-0006-install-utils.patch" - patch_description: "enable utilis installation" + - patch_file: "patches/7.0.0-0001-static-analyzers.patch" + patch_description: "do not look for static analyzers" + patch_type: "conan" + - patch_file: "patches/7.0.0-0002-install-utils.patch" + patch_description: "enable utils installation" patch_type: "conan" - - patch_file: "patches/7.0.0-0007-fix-cmake.patch" + - patch_file: "patches/7.0.0-0003-fix-cmake.patch" patch_description: "use cci package" patch_type: "conan" diff --git a/recipes/arrow/all/conanfile.py b/recipes/arrow/all/conanfile.py index 85669bc3ca76d..af57c69006e28 100644 --- a/recipes/arrow/all/conanfile.py +++ b/recipes/arrow/all/conanfile.py @@ -2,12 +2,13 @@ from conan.errors import ConanInvalidConfiguration, ConanException from conan.tools.build import check_min_cppstd, cross_building from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout -from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rmdir +from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rmdir, save, replace_in_file from conan.tools.microsoft import is_msvc, is_msvc_static_runtime from conan.tools.scm import Version import os import glob +import textwrap required_conan_version = ">=1.53.0" @@ -71,7 +72,7 @@ class ArrowConan(ConanFile): "shared": False, "fPIC": True, "gandiva": False, - "parquet": False, + "parquet": True, "skyhook": False, "substrait": False, "acero": False, @@ -86,7 +87,7 @@ class ArrowConan(ConanFile): "simd_level": "default", "runtime_simd_level": "max", "with_backtrace": False, - "with_boost": False, + "with_boost": True, "with_brotli": False, "with_bz2": False, "with_csv": False, @@ -100,7 +101,7 @@ class ArrowConan(ConanFile): "with_glog": False, "with_grpc": False, "with_json": False, - "with_thrift": False, + "with_thrift": True, "with_llvm": False, "with_openssl": False, "with_opentelemetry": False, @@ -111,7 +112,7 @@ class ArrowConan(ConanFile): "with_utf8proc": False, "with_lz4": False, "with_snappy": False, - "with_zlib": False, + "with_zlib": True, "with_zstd": False, } short_paths = True @@ -161,15 +162,15 @@ def _requires_rapidjson(self): def requirements(self): if self.options.with_thrift: - self.requires("thrift/0.17.0") + self.requires("thrift/0.20.0") if self.options.with_protobuf: - self.requires("protobuf/3.21.9") + self.requires("protobuf/3.21.12") if self.options.with_jemalloc: self.requires("jemalloc/5.3.0") if self.options.with_mimalloc: self.requires("mimalloc/1.7.6") if self.options.with_boost: - self.requires("boost/1.84.0") + self.requires("boost/1.85.0") if self.options.with_gflags: self.requires("gflags/2.2.2") if self.options.with_glog: @@ -201,18 +202,23 @@ def requirements(self): if self.options.with_snappy: self.requires("snappy/1.1.9") if self.options.get_safe("simd_level") != None or \ - self.options.get_safe("runtime_simd_level") != None: - self.requires("xsimd/9.0.1") + self.options.get_safe("runtime_simd_level") != None: + if Version(self.version) < 8: + self.requires("xsimd/9.0.1") + else: + self.requires("xsimd/13.0.0") if self.options.with_zlib: self.requires("zlib/[>=1.2.11 <2]") if self.options.with_zstd: - self.requires("zstd/1.5.5") + self.requires("zstd/[>=1.5 <1.6]") if self.options.with_re2: self.requires("re2/20230301") if self.options.with_utf8proc: self.requires("utf8proc/2.8.0") if self.options.with_backtrace: self.requires("libbacktrace/cci.20210118") + if self.options.with_orc: + self.requires("orc/2.0.0") def validate(self): # Do not allow options with 'auto' value @@ -225,11 +231,18 @@ def validate(self): # From https://github.com/conan-io/conan-center-index/pull/23163#issuecomment-2039808851 if self.options.gandiva: if not self.options.with_re2: - raise ConanException("'with_re2' option should be True when'gandiva=True'") + raise ConanException("'with_re2' option should be True when 'gandiva=True'") if not self.options.with_boost: - raise ConanException("'with_boost' option should be True when'gandiva=True'") + raise ConanException("'with_boost' option should be True when 'gandiva=True'") if not self.options.with_utf8proc: - raise ConanException("'with_utf8proc' option should be True when'gandiva=True'") + raise ConanException("'with_utf8proc' option should be True when 'gandiva=True'") + if self.options.with_thrift and not self.options.with_boost: + raise ConanException("'with_boost' option should be True when 'thrift=True'") + if self.options.parquet: + if not self.options.with_thrift: + raise ConanException("'with_thrift' option should be True when 'parquet=True'") + if self.options.with_flight_rpc and not self.options.with_protobuf: + raise ConanException("'with_protobuf' option should be True when 'with_flight_rpc=True'") if self.settings.compiler.get_safe("cppstd"): check_min_cppstd(self, self._min_cppstd) @@ -244,8 +257,6 @@ def validate(self): raise ConanInvalidConfiguration("CCI has no librados recipe (yet)") if self.options.with_cuda: raise ConanInvalidConfiguration("CCI has no cuda recipe (yet)") - if self.options.with_orc: - raise ConanInvalidConfiguration("CCI has no orc recipe (yet)") if self.options.with_s3 and not self.dependencies["aws-sdk-cpp"].options.config: raise ConanInvalidConfiguration("arrow:with_s3 requires aws-sdk-cpp:config is True.") @@ -253,6 +264,11 @@ def validate(self): if self.dependencies["jemalloc"].options.enable_cxx: raise ConanInvalidConfiguration("jemmalloc.enable_cxx of a static jemalloc must be disabled") + if self.options.with_thrift and not self.options.with_zlib: + raise ConanInvalidConfiguration("arrow:with_thrift requires arrow:with_zlib") + + if self.options.parquet and not self.options.with_thrift: + raise ConanInvalidConfiguration("arrow:parquet requires arrow:with_thrift") def build_requirements(self): if Version(self.version) >= "13.0.0": @@ -310,6 +326,7 @@ def generate(self): tc.variables["GLOG_SOURCE"] = "SYSTEM" tc.variables["ARROW_WITH_BACKTRACE"] = bool(self.options.with_backtrace) tc.variables["ARROW_WITH_BROTLI"] = bool(self.options.with_brotli) + tc.variables["ARROW_WITH_RE2"] = bool(self.options.with_re2) tc.variables["brotli_SOURCE"] = "SYSTEM" if self.options.with_brotli: tc.variables["ARROW_BROTLI_USE_SHARED"] = bool(self.dependencies["brotli"].options.shared) @@ -341,8 +358,10 @@ def generate(self): tc.variables["ARROW_ZSTD_USE_SHARED"] = bool(self.dependencies["zstd"].options.shared) tc.variables["ORC_SOURCE"] = "SYSTEM" tc.variables["ARROW_WITH_THRIFT"] = bool(self.options.with_thrift) + tc.variables["ARROW_THRIFT"] = bool(self.options.with_thrift) tc.variables["Thrift_SOURCE"] = "SYSTEM" if self.options.with_thrift: + tc.variables["ARROW_THRIFT"] = True tc.variables["THRIFT_VERSION"] = bool(self.dependencies["thrift"].ref.version) # a recent thrift does not require boost tc.variables["ARROW_THRIFT_USE_SHARED"] = bool(self.dependencies["thrift"].options.shared) tc.variables["ARROW_USE_OPENSSL"] = self.options.with_openssl @@ -402,28 +421,74 @@ def _patch_sources(self): def build(self): self._patch_sources() - cmake =CMake(self) + cmake = CMake(self) cmake.configure(build_script_folder=os.path.join(self.source_folder, "cpp")) cmake.build() def package(self): copy(self, pattern="LICENSE.txt", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) copy(self, pattern="NOTICE.txt", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) - cmake =CMake(self) + cmake = CMake(self) cmake.install() rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) rmdir(self, os.path.join(self.package_folder, "share")) + cmake_suffix = "shared" if self.options.shared else "static" + + alias_map = { f"Arrow::arrow_{cmake_suffix}": f"arrow::arrow_{cmake_suffix}" } + + if self.options.parquet: + alias_map[f"Parquet::parquet_{cmake_suffix}"] = f"arrow::parquet_{cmake_suffix}" + + if self.options.get_safe("substrait"): + alias_map[f"Arrow::arrow_substrait_{cmake_suffix}"] = f"arrow::arrow_substrait_{cmake_suffix}" + + if self.options.acero: + alias_map[f"Arrow::arrow_acero_{cmake_suffix}"] = f"arrow::arrow_acero_{cmake_suffix}" + + if self.options.gandiva: + alias_map[f"Gandiva::gandiva_{cmake_suffix}"] = f"arrow::gandiva_{cmake_suffix}" + + if self.options.with_flight_rpc: + alias_map[f"ArrowFlight::arrow_flight_sql_{cmake_suffix}"] = f"arrow::arrow_flight_sql_{cmake_suffix}" + + + self._create_cmake_module_alias_targets( + os.path.join(self.package_folder, self._module_file_rel_path), alias_map + ) + + def _create_cmake_module_alias_targets(self, module_file, targets): + content = "" + for alias, aliased in targets.items(): + content += textwrap.dedent("""\ + if(TARGET {aliased} AND NOT TARGET {alias}) + add_library({alias} INTERFACE IMPORTED) + set_property(TARGET {alias} PROPERTY INTERFACE_LINK_LIBRARIES {aliased}) + endif() + """.format(alias=alias, aliased=aliased)) + save(self, module_file, content) + + @property + def _module_subfolder(self): + return os.path.join("lib", "cmake") + + @property + def _module_file_rel_path(self): + return os.path.join(self._module_subfolder, + f"conan-official-{self.name}-targets.cmake") + def package_info(self): # FIXME: fix CMake targets of components self.cpp_info.set_property("cmake_file_name", "Arrow") suffix = "_static" if is_msvc(self) and not self.options.shared else "" + cmake_suffix = "shared" if self.options.shared else "static" self.cpp_info.components["libarrow"].set_property("pkg_config_name", "arrow") + self.cpp_info.components["libarrow"].set_property("cmake_target_name", f"Arrow::arrow_{cmake_suffix}") self.cpp_info.components["libarrow"].libs = [f"arrow{suffix}"] if not self.options.shared: self.cpp_info.components["libarrow"].defines = ["ARROW_STATIC"] @@ -432,6 +497,7 @@ def package_info(self): if self.options.parquet: self.cpp_info.components["libparquet"].set_property("pkg_config_name", "parquet") + self.cpp_info.components["libparquet"].set_property("cmake_target_name", f"Parquet::parquet_{cmake_suffix}") self.cpp_info.components["libparquet"].libs = [f"parquet{suffix}"] self.cpp_info.components["libparquet"].requires = ["libarrow"] if not self.options.shared: @@ -439,6 +505,7 @@ def package_info(self): if self.options.get_safe("substrait"): self.cpp_info.components["libarrow_substrait"].set_property("pkg_config_name", "arrow_substrait") + self.cpp_info.components["libarrow_substrait"].set_property("cmake_target_name", f"Arrow::arrow_substrait_{cmake_suffix}") self.cpp_info.components["libarrow_substrait"].libs = [f"arrow_substrait{suffix}"] self.cpp_info.components["libarrow_substrait"].requires = ["libparquet", "dataset"] @@ -446,6 +513,8 @@ def package_info(self): del self.options.plasma if self.options.acero: + self.cpp_info.components["libacero"].set_property("pkg_config_name", "acero") + self.cpp_info.components["libacero"].set_property("cmake_target_name", f"Acero::arrow_acero_{cmake_suffix}") self.cpp_info.components["libacero"].libs = [f"arrow_acero{suffix}"] self.cpp_info.components["libacero"].names["cmake_find_package"] = "acero" self.cpp_info.components["libacero"].names["cmake_find_package_multi"] = "acero" @@ -454,6 +523,7 @@ def package_info(self): if self.options.gandiva: self.cpp_info.components["libgandiva"].set_property("pkg_config_name", "gandiva") + self.cpp_info.components["libgandiva"].set_property("cmake_target_name", f"Gandiva::gandiva_{cmake_suffix}") self.cpp_info.components["libgandiva"].libs = [f"gandiva{suffix}"] self.cpp_info.components["libgandiva"].requires = ["libarrow"] if not self.options.shared: @@ -461,11 +531,13 @@ def package_info(self): if self.options.with_flight_rpc: self.cpp_info.components["libarrow_flight"].set_property("pkg_config_name", "flight_rpc") + self.cpp_info.components["libarrow_flight"].set_property("cmake_target_name", f"ArrowFlight::arrow_flight_{cmake_suffix}") self.cpp_info.components["libarrow_flight"].libs = [f"arrow_flight{suffix}"] self.cpp_info.components["libarrow_flight"].requires = ["libarrow"] if self.options.get_safe("with_flight_sql"): self.cpp_info.components["libarrow_flight_sql"].set_property("pkg_config_name", "flight_sql") + self.cpp_info.components["libarrow_flight_sql"].set_property("cmake_target_name", f"ArrowFlightSql::arrow_flight_sql_{cmake_suffix}") self.cpp_info.components["libarrow_flight_sql"].libs = [f"arrow_flight_sql{suffix}"] self.cpp_info.components["libarrow_flight_sql"].requires = ["libarrow", "libarrow_flight"] @@ -518,7 +590,8 @@ def package_info(self): if self._requires_rapidjson(): self.cpp_info.components["libarrow"].requires.append("rapidjson::rapidjson") if self.options.with_s3: - self.cpp_info.components["libarrow"].requires.append("aws-sdk-cpp::s3") + # https://github.com/apache/arrow/blob/6b268f62a8a172249ef35f093009c740c32e1f36/cpp/src/arrow/CMakeLists.txt#L98 + self.cpp_info.components["libarrow"].requires.extend([f"aws-sdk-cpp::{x}" for x in ["cognito-identity", "core", "identity-management", "s3", "sts"]]) if self.options.get_safe("with_gcs"): self.cpp_info.components["libarrow"].requires.append("google-cloud-cpp::storage") if self.options.with_orc: @@ -539,8 +612,6 @@ def package_info(self): self.cpp_info.components["libarrow"].requires.append("zlib::zlib") if self.options.with_zstd: self.cpp_info.components["libarrow"].requires.append("zstd::zstd") - if self.options.with_boost: - self.cpp_info.components["libarrow"].requires.append("boost::boost") if self.options.with_grpc: self.cpp_info.components["libarrow"].requires.append("grpc::grpc") if self.options.with_flight_rpc: @@ -549,22 +620,34 @@ def package_info(self): # TODO: to remove in conan v2 self.cpp_info.filenames["cmake_find_package"] = "Arrow" self.cpp_info.filenames["cmake_find_package_multi"] = "Arrow" - self.cpp_info.components["libarrow"].names["cmake_find_package"] = "arrow" - self.cpp_info.components["libarrow"].names["cmake_find_package_multi"] = "arrow" + self.cpp_info.components["libarrow"].names["cmake_find_package"] = f"arrow_{cmake_suffix}" + self.cpp_info.components["libarrow"].names["cmake_find_package_multi"] = f"arrow_{cmake_suffix}" + self.cpp_info.components["libarrow"].build_modules["cmake_find_package"] = [self._module_file_rel_path] + self.cpp_info.components["libarrow"].build_modules["cmake_find_package_multi"] = [self._module_file_rel_path] if self.options.parquet: - self.cpp_info.components["libparquet"].names["cmake_find_package"] = "parquet" - self.cpp_info.components["libparquet"].names["cmake_find_package_multi"] = "parquet" + self.cpp_info.components["libparquet"].names["cmake_find_package"] = f"parquet_{cmake_suffix}" + self.cpp_info.components["libparquet"].names["cmake_find_package_multi"] = f"parquet_{cmake_suffix}" + self.cpp_info.components["libparquet"].build_modules["cmake_find_package"] = [self._module_file_rel_path] + self.cpp_info.components["libparquet"].build_modules["cmake_find_package_multi"] = [self._module_file_rel_path] if self.options.get_safe("substrait"): - self.cpp_info.components["libarrow_substrait"].names["cmake_find_package"] = "arrow_substrait" - self.cpp_info.components["libarrow_substrait"].names["cmake_find_package_multi"] = "arrow_substrait" + self.cpp_info.components["libarrow_substrait"].names["cmake_find_package"] = f"arrow_substrait_{cmake_suffix}" + self.cpp_info.components["libarrow_substrait"].names["cmake_find_package_multi"] = f"arrow_substrait_{cmake_suffix}" + self.cpp_info.components["libarrow_substrait"].build_modules["cmake_find_package"] = [self._module_file_rel_path] + self.cpp_info.components["libarrow_substrait"].build_modules["cmake_find_package_multi"] = [self._module_file_rel_path] if self.options.gandiva: self.cpp_info.components["libgandiva"].names["cmake_find_package"] = "gandiva" self.cpp_info.components["libgandiva"].names["cmake_find_package_multi"] = "gandiva" + self.cpp_info.components["libgandiva"].build_modules["cmake_find_package"] = [self._module_file_rel_path] + self.cpp_info.components["libgandiva"].build_modules["cmake_find_package_multi"] = [self._module_file_rel_path] if self.options.with_flight_rpc: self.cpp_info.components["libarrow_flight"].names["cmake_find_package"] = "flight_rpc" self.cpp_info.components["libarrow_flight"].names["cmake_find_package_multi"] = "flight_rpc" + self.cpp_info.components["libarrow_flight"].build_modules["cmake_find_package"] = [self._module_file_rel_path] + self.cpp_info.components["libarrow_flight"].build_modules["cmake_find_package_multi"] = [self._module_file_rel_path] if self.options.get_safe("with_flight_sql"): self.cpp_info.components["libarrow_flight_sql"].names["cmake_find_package"] = "flight_sql" self.cpp_info.components["libarrow_flight_sql"].names["cmake_find_package_multi"] = "flight_sql" + self.cpp_info.components["libarrow_flight_sql"].build_modules["cmake_find_package"] = [self._module_file_rel_path] + self.cpp_info.components["libarrow_flight_sql"].build_modules["cmake_find_package_multi"] = [self._module_file_rel_path] if self.options.cli and (self.options.with_cuda or self.options.with_flight_rpc or self.options.parquet): self.env_info.PATH.append(os.path.join(self.package_folder, "bin")) diff --git a/recipes/arrow/all/patches/11.0.0-0001-fix-cmake.patch b/recipes/arrow/all/patches/11.0.0-0001-fix-cmake.patch new file mode 100644 index 0000000000000..1d5a752548ee2 --- /dev/null +++ b/recipes/arrow/all/patches/11.0.0-0001-fix-cmake.patch @@ -0,0 +1,42 @@ +diff --git a/cpp/cmake_modules/FindThriftAlt.cmake b/cpp/cmake_modules/FindThriftAlt.cmake +index f3e49021d..95177c2a6 100644 +--- a/cpp/cmake_modules/FindThriftAlt.cmake ++++ b/cpp/cmake_modules/FindThriftAlt.cmake +@@ -45,22 +45,21 @@ endif() + # * https://github.com/apache/thrift/pull/2725 + # * https://github.com/apache/thrift/pull/2726 + # * https://github.com/conda-forge/thrift-cpp-feedstock/issues/68 +-if(NOT WIN32) +- set(find_package_args "") +- if(ThriftAlt_FIND_VERSION) +- list(APPEND find_package_args ${ThriftAlt_FIND_VERSION}) +- endif() +- if(ThriftAlt_FIND_QUIETLY) +- list(APPEND find_package_args QUIET) +- endif() +- find_package(Thrift ${find_package_args}) +- if(Thrift_FOUND) +- set(ThriftAlt_FOUND TRUE) +- add_executable(thrift::compiler IMPORTED) +- set_target_properties(thrift::compiler PROPERTIES IMPORTED_LOCATION +- "${THRIFT_COMPILER}") +- return() +- endif() ++ ++set(find_package_args "") ++if(ThriftAlt_FIND_VERSION) ++ list(APPEND find_package_args ${ThriftAlt_FIND_VERSION}) ++endif() ++if(ThriftAlt_FIND_QUIETLY) ++ list(APPEND find_package_args QUIET) ++endif() ++find_package(Thrift ${find_package_args}) ++if(Thrift_FOUND) ++ set(ThriftAlt_FOUND TRUE) ++ add_executable(thrift::compiler IMPORTED) ++ set_target_properties(thrift::compiler PROPERTIES IMPORTED_LOCATION ++ "${THRIFT_COMPILER}") ++ return() + endif() + + function(extract_thrift_version) diff --git a/recipes/arrow/all/patches/16.0.0-0001-fix-cmake.patch b/recipes/arrow/all/patches/16.0.0-0001-fix-cmake.patch new file mode 100644 index 0000000000000..8c11ce258bb15 --- /dev/null +++ b/recipes/arrow/all/patches/16.0.0-0001-fix-cmake.patch @@ -0,0 +1,62 @@ +diff --git a/cpp/cmake_modules/FindThriftAlt.cmake b/cpp/cmake_modules/FindThriftAlt.cmake +index f3e49021d..3e63f1edf 100644 +--- a/cpp/cmake_modules/FindThriftAlt.cmake ++++ b/cpp/cmake_modules/FindThriftAlt.cmake +@@ -45,23 +45,23 @@ endif() + # * https://github.com/apache/thrift/pull/2725 + # * https://github.com/apache/thrift/pull/2726 + # * https://github.com/conda-forge/thrift-cpp-feedstock/issues/68 +-if(NOT WIN32) +- set(find_package_args "") +- if(ThriftAlt_FIND_VERSION) +- list(APPEND find_package_args ${ThriftAlt_FIND_VERSION}) +- endif() +- if(ThriftAlt_FIND_QUIETLY) +- list(APPEND find_package_args QUIET) +- endif() +- find_package(Thrift ${find_package_args}) +- if(Thrift_FOUND) +- set(ThriftAlt_FOUND TRUE) +- add_executable(thrift::compiler IMPORTED) +- set_target_properties(thrift::compiler PROPERTIES IMPORTED_LOCATION +- "${THRIFT_COMPILER}") +- return() +- endif() ++ ++set(find_package_args "") ++if(ThriftAlt_FIND_VERSION) ++ list(APPEND find_package_args ${ThriftAlt_FIND_VERSION}) ++endif() ++if(ThriftAlt_FIND_QUIETLY) ++ list(APPEND find_package_args QUIET) + endif() ++find_package(Thrift ${find_package_args}) ++if(Thrift_FOUND) ++ set(ThriftAlt_FOUND TRUE) ++ add_executable(thrift::compiler IMPORTED) ++ set_target_properties(thrift::compiler PROPERTIES IMPORTED_LOCATION ++ "${THRIFT_COMPILER}") ++ return() ++endif() ++ + + function(extract_thrift_version) + if(ThriftAlt_INCLUDE_DIR) +diff --git a/cpp/src/parquet/CMakeLists.txt b/cpp/src/parquet/CMakeLists.txt +index 93f2e72d8..e00f73f7d 100644 +--- a/cpp/src/parquet/CMakeLists.txt ++++ b/cpp/src/parquet/CMakeLists.txt +@@ -262,11 +262,11 @@ if(NOT PARQUET_MINIMAL_DEPENDENCY) + + # These are libraries that we will link privately with parquet_shared (as they + # do not need to be linked transitively by other linkers) +- list(APPEND PARQUET_SHARED_PRIVATE_LINK_LIBS thrift::thrift) ++ list(APPEND PARQUET_SHARED_PRIVATE_LINK_LIBS Boost::headers thrift::thrift) + + # Link publicly with parquet_static (because internal users need to + # transitively link all dependencies) +- list(APPEND PARQUET_STATIC_LINK_LIBS thrift::thrift) ++ list(APPEND PARQUET_STATIC_LINK_LIBS Boost::headers thrift::thrift) + if(NOT THRIFT_VENDORED) + list(APPEND PARQUET_STATIC_INSTALL_INTERFACE_LIBS thrift::thrift) + endif() diff --git a/recipes/arrow/all/patches/7.0.0-0001-static-analyzers.patch b/recipes/arrow/all/patches/7.0.0-0001-static-analyzers.patch new file mode 100644 index 0000000000000..b7c585c4cf3d8 --- /dev/null +++ b/recipes/arrow/all/patches/7.0.0-0001-static-analyzers.patch @@ -0,0 +1,17 @@ +diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt +index dff5b1a59..1189a2957 100644 +--- a/cpp/CMakeLists.txt ++++ b/cpp/CMakeLists.txt +@@ -161,11 +161,7 @@ else() + set(MSVC_TOOLCHAIN FALSE) + endif() + +-find_package(ClangTools) +-find_package(InferTools) +-if("$ENV{CMAKE_EXPORT_COMPILE_COMMANDS}" STREQUAL "1" +- OR CLANG_TIDY_FOUND +- OR INFER_FOUND) ++if("$ENV{CMAKE_EXPORT_COMPILE_COMMANDS}" STREQUAL "1") + # Generate a Clang compile_commands.json "compilation database" file for use + # with various development tools, such as Vim's YouCompleteMe plugin. + # See http://clang.llvm.org/docs/JSONCompilationDatabase.html diff --git a/recipes/arrow/all/patches/7.0.0-0002-install-utils.patch b/recipes/arrow/all/patches/7.0.0-0002-install-utils.patch new file mode 100644 index 0000000000000..4660146a84833 --- /dev/null +++ b/recipes/arrow/all/patches/7.0.0-0002-install-utils.patch @@ -0,0 +1,17 @@ +diff --git a/cpp/src/arrow/ipc/CMakeLists.txt b/cpp/src/arrow/ipc/CMakeLists.txt +index 495018ec0..f6cee6fde 100644 +--- a/cpp/src/arrow/ipc/CMakeLists.txt ++++ b/cpp/src/arrow/ipc/CMakeLists.txt +@@ -61,8 +61,12 @@ endif() + if(ARROW_BUILD_UTILITIES OR ARROW_BUILD_INTEGRATION) + add_executable(arrow-file-to-stream file_to_stream.cc) + target_link_libraries(arrow-file-to-stream ${ARROW_UTIL_LIB}) ++ install(TARGETS arrow-file-to-stream ${INSTALL_IS_OPTIONAL} ++ DESTINATION ${CMAKE_INSTALL_BINDIR}) + add_executable(arrow-stream-to-file stream_to_file.cc) + target_link_libraries(arrow-stream-to-file ${ARROW_UTIL_LIB}) ++ install(TARGETS arrow-stream-to-file ${INSTALL_IS_OPTIONAL} ++ DESTINATION ${CMAKE_INSTALL_BINDIR}) + + if(ARROW_BUILD_INTEGRATION) + add_dependencies(arrow-integration arrow-file-to-stream) diff --git a/recipes/arrow/all/patches/7.0.0-0003-fix-cmake.patch b/recipes/arrow/all/patches/7.0.0-0003-fix-cmake.patch new file mode 100644 index 0000000000000..6667caacfd169 --- /dev/null +++ b/recipes/arrow/all/patches/7.0.0-0003-fix-cmake.patch @@ -0,0 +1,347 @@ +diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt +index 9e0d4c0b2..1189a2957 100644 +--- a/cpp/CMakeLists.txt ++++ b/cpp/CMakeLists.txt +@@ -695,7 +695,7 @@ endif() + + if(ARROW_WITH_BROTLI) + # Order is important for static linking +- set(ARROW_BROTLI_LIBS Brotli::brotlienc Brotli::brotlidec Brotli::brotlicommon) ++ set(ARROW_BROTLI_LIBS brotli::brotlienc brotli::brotlidec brotli::brotlicommon) + list(APPEND ARROW_LINK_LIBS ${ARROW_BROTLI_LIBS}) + list(APPEND ARROW_STATIC_LINK_LIBS ${ARROW_BROTLI_LIBS}) + if(Brotli_SOURCE STREQUAL "SYSTEM") +@@ -711,10 +711,17 @@ if(ARROW_WITH_BZ2) + endif() + + if(ARROW_WITH_LZ4) +- list(APPEND ARROW_STATIC_LINK_LIBS LZ4::lz4) +- if(Lz4_SOURCE STREQUAL "SYSTEM") +- list(APPEND ARROW_STATIC_INSTALL_INTERFACE_LIBS LZ4::lz4) +- endif() ++ if (TARGET LZ4::lz4_static) ++ list(APPEND ARROW_STATIC_LINK_LIBS LZ4::lz4_static) ++ if(Lz4_SOURCE STREQUAL "SYSTEM") ++ list(APPEND ARROW_STATIC_INSTALL_INTERFACE_LIBS LZ4::lz4_static) ++ endif() ++ else() ++ list(APPEND ARROW_STATIC_LINK_LIBS LZ4::lz4_shared) ++ if(Lz4_SOURCE STREQUAL "SYSTEM") ++ list(APPEND ARROW_STATIC_INSTALL_INTERFACE_LIBS LZ4::lz4_shared) ++ endif() ++endif() + endif() + + if(ARROW_WITH_SNAPPY) +@@ -903,8 +910,13 @@ endif() + + if(ARROW_MIMALLOC) + add_definitions(-DARROW_MIMALLOC) +- list(APPEND ARROW_LINK_LIBS mimalloc::mimalloc) +- list(APPEND ARROW_STATIC_LINK_LIBS mimalloc::mimalloc) ++ if (TARGET mimalloc-static) ++ list(APPEND ARROW_LINK_LIBS mimalloc-static) ++ list(APPEND ARROW_STATIC_LINK_LIBS mimalloc-static) ++ else() ++ list(APPEND ARROW_LINK_LIBS mimalloc) ++ list(APPEND ARROW_STATIC_LINK_LIBS mimalloc) ++ endif() + endif() + + # ---------------------------------------------------------------------- +diff --git a/cpp/cmake_modules/ThirdpartyToolchain.cmake b/cpp/cmake_modules/ThirdpartyToolchain.cmake +index bc389521b..62bf3144b 100644 +--- a/cpp/cmake_modules/ThirdpartyToolchain.cmake ++++ b/cpp/cmake_modules/ThirdpartyToolchain.cmake +@@ -954,7 +954,7 @@ endif() + + if(ARROW_BOOST_REQUIRED) + resolve_dependency(Boost +- HAVE_ALT ++ USE_CONFIG + TRUE + REQUIRED_VERSION + ${ARROW_BOOST_REQUIRED_VERSION} +@@ -965,7 +965,7 @@ if(ARROW_BOOST_REQUIRED) + if(TARGET Boost::system) + set(BOOST_SYSTEM_LIBRARY Boost::system) + set(BOOST_FILESYSTEM_LIBRARY Boost::filesystem) +- elseif(BoostAlt_FOUND) ++ elseif(Boost_FOUND) + set(BOOST_SYSTEM_LIBRARY ${Boost_SYSTEM_LIBRARY}) + set(BOOST_FILESYSTEM_LIBRARY ${Boost_FILESYSTEM_LIBRARY}) + else() +@@ -1108,9 +1108,9 @@ macro(build_brotli) + endmacro() + + if(ARROW_WITH_BROTLI) +- resolve_dependency(Brotli PC_PACKAGE_NAMES libbrotlidec libbrotlienc) ++ resolve_dependency(brotli PC_PACKAGE_NAMES libbrotlidec libbrotlienc) + # TODO: Don't use global includes but rather target_include_directories +- get_target_property(BROTLI_INCLUDE_DIR Brotli::brotlicommon ++ get_target_property(BROTLI_INCLUDE_DIR brotli::brotlicommon + INTERFACE_INCLUDE_DIRECTORIES) + include_directories(SYSTEM ${BROTLI_INCLUDE_DIR}) + endif() +@@ -1302,22 +1302,17 @@ endmacro() + if(ARROW_NEED_GFLAGS) + set(ARROW_GFLAGS_REQUIRED_VERSION "2.1.0") + resolve_dependency(gflags +- HAVE_ALT ++ USE_CONFIG + TRUE + REQUIRED_VERSION + ${ARROW_GFLAGS_REQUIRED_VERSION} + IS_RUNTIME_DEPENDENCY + FALSE) + # TODO: Don't use global includes but rather target_include_directories +- include_directories(SYSTEM ${GFLAGS_INCLUDE_DIR}) ++ include_directories(SYSTEM ${gflags_INCLUDE_DIR}) + +- if(NOT TARGET ${GFLAGS_LIBRARIES}) +- if(TARGET gflags-shared) +- set(GFLAGS_LIBRARIES gflags-shared) +- elseif(TARGET gflags_shared) +- set(GFLAGS_LIBRARIES gflags_shared) +- endif() +- endif() ++ list(APPEND ARROW_BUNDLED_STATIC_LIBS ${gflags_LIBRARIES_TARGETS}) ++ set(GFLAGS_LIBRARIES gflags::gflags) + endif() + + # ---------------------------------------------------------------------- +@@ -1411,9 +1406,9 @@ if(ARROW_WITH_THRIFT) + thrift) + endif() + # TODO: Don't use global includes but rather target_include_directories +- include_directories(SYSTEM ${THRIFT_INCLUDE_DIR}) ++ include_directories(SYSTEM ${Thrift_INCLUDE_DIR}) + +- string(REPLACE "." ";" VERSION_LIST ${THRIFT_VERSION}) ++ string(REPLACE "." ";" VERSION_LIST ${Thrift_VERSION}) + list(GET VERSION_LIST 0 THRIFT_VERSION_MAJOR) + list(GET VERSION_LIST 1 THRIFT_VERSION_MINOR) + list(GET VERSION_LIST 2 THRIFT_VERSION_PATCH) +@@ -1528,6 +1523,7 @@ if(ARROW_WITH_PROTOBUF) + set(ARROW_PROTOBUF_REQUIRED_VERSION "2.6.1") + endif() + resolve_dependency(Protobuf ++ USE_CONFIG + REQUIRED_VERSION + ${ARROW_PROTOBUF_REQUIRED_VERSION} + PC_PACKAGE_NAMES +@@ -1538,7 +1534,7 @@ if(ARROW_WITH_PROTOBUF) + endif() + + # TODO: Don't use global includes but rather target_include_directories +- include_directories(SYSTEM ${PROTOBUF_INCLUDE_DIR}) ++ include_directories(SYSTEM ${protobuf_INCLUDE_DIR}) + + if(TARGET arrow::protobuf::libprotobuf) + set(ARROW_PROTOBUF_LIBPROTOBUF arrow::protobuf::libprotobuf) +@@ -1547,9 +1543,9 @@ if(ARROW_WITH_PROTOBUF) + if(NOT TARGET protobuf::libprotobuf) + add_library(protobuf::libprotobuf UNKNOWN IMPORTED) + set_target_properties(protobuf::libprotobuf +- PROPERTIES IMPORTED_LOCATION "${PROTOBUF_LIBRARY}" ++ PROPERTIES IMPORTED_LOCATION "${Protobuf_LIBRARY}" + INTERFACE_INCLUDE_DIRECTORIES +- "${PROTOBUF_INCLUDE_DIR}") ++ "${Protobuf_INCLUDE_DIR}") + endif() + set(ARROW_PROTOBUF_LIBPROTOBUF protobuf::libprotobuf) + endif() +@@ -1569,7 +1565,7 @@ if(ARROW_WITH_PROTOBUF) + set_target_properties(protobuf::libprotoc + PROPERTIES IMPORTED_LOCATION "${Protobuf_PROTOC_LIBRARY}" + INTERFACE_INCLUDE_DIRECTORIES +- "${PROTOBUF_INCLUDE_DIR}") ++ "${Protobuf_INCLUDE_DIR}") + endif() + set(ARROW_PROTOBUF_LIBPROTOC protobuf::libprotoc) + endif() +@@ -1600,6 +1596,7 @@ endif() + # jemalloc - Unix-only high-performance allocator + + if(ARROW_JEMALLOC) ++if(0) + message(STATUS "Building (vendored) jemalloc from source") + # We only use a vendored jemalloc as we want to control its version. + # Also our build of jemalloc is specially prefixed so that it will not +@@ -1665,12 +1662,18 @@ if(ARROW_JEMALLOC) + add_dependencies(jemalloc::jemalloc jemalloc_ep) + + list(APPEND ARROW_BUNDLED_STATIC_LIBS jemalloc::jemalloc) ++else() ++ find_package(jemalloc REQUIRED CONFIG) ++ include_directories(SYSTEM "${jemalloc_INCLUDE_DIR}") ++ list(APPEND ARROW_BUNDLED_STATIC_LIBS ${jemalloc_LIBRARIES_TARGETS}) ++endif() + endif() + + # ---------------------------------------------------------------------- + # mimalloc - Cross-platform high-performance allocator, from Microsoft + + if(ARROW_MIMALLOC) ++if(0) + message(STATUS "Building (vendored) mimalloc from source") + # We only use a vendored mimalloc as we want to control its build options. + +@@ -1716,6 +1719,11 @@ if(ARROW_MIMALLOC) + add_dependencies(toolchain mimalloc_ep) + + list(APPEND ARROW_BUNDLED_STATIC_LIBS mimalloc::mimalloc) ++else() ++ find_package(mimalloc REQUIRED CONFIG) ++ include_directories(SYSTEM "${mimalloc_INCLUDE_DIR}") ++ list(APPEND ARROW_BUNDLED_STATIC_LIBS ${mimalloc_LIBRARIES_TARGETS} ) ++endif() + endif() + + # ---------------------------------------------------------------------- +@@ -2001,7 +2009,7 @@ endmacro() + if(ARROW_WITH_RAPIDJSON) + set(ARROW_RAPIDJSON_REQUIRED_VERSION "1.1.0") + resolve_dependency(RapidJSON +- HAVE_ALT ++ USE_CONFIG + TRUE + REQUIRED_VERSION + ${ARROW_RAPIDJSON_REQUIRED_VERSION} +@@ -2038,10 +2046,9 @@ endmacro() + + if((NOT ARROW_SIMD_LEVEL STREQUAL "NONE") OR (NOT ARROW_RUNTIME_SIMD_LEVEL STREQUAL "NONE" + )) +- set(xsimd_SOURCE "BUNDLED") + resolve_dependency(xsimd) + # TODO: Don't use global includes but rather target_include_directories +- include_directories(SYSTEM ${XSIMD_INCLUDE_DIR}) ++ include_directories(SYSTEM ${xsimd_INCLUDE_DIR}) + endif() + + macro(build_zlib) +@@ -2140,10 +2147,14 @@ macro(build_lz4) + endmacro() + + if(ARROW_WITH_LZ4) +- resolve_dependency(Lz4 PC_PACKAGE_NAMES liblz4) ++ resolve_dependency(lz4) + + # TODO: Don't use global includes but rather target_include_directories +- get_target_property(LZ4_INCLUDE_DIR LZ4::lz4 INTERFACE_INCLUDE_DIRECTORIES) ++ if (TARGET LZ4::lz4_static) ++ get_target_property(LZ4_INCLUDE_DIR LZ4::lz4_static INTERFACE_INCLUDE_DIRECTORIES) ++ else() ++ get_target_property(LZ4_INCLUDE_DIR LZ4::lz4_shared INTERFACE_INCLUDE_DIRECTORIES) ++ endif() + include_directories(SYSTEM ${LZ4_INCLUDE_DIR}) + endif() + +@@ -2274,7 +2285,7 @@ if(ARROW_WITH_RE2) + # Don't specify "PC_PACKAGE_NAMES re2" here because re2.pc may + # include -std=c++11. It's not compatible with C source and C++ + # source not uses C++ 11. +- resolve_dependency(re2 HAVE_ALT TRUE) ++ resolve_dependency(re2 USE_CONFIG TRUE) + if(${re2_SOURCE} STREQUAL "SYSTEM") + get_target_property(RE2_LIB re2::re2 IMPORTED_LOCATION) + string(APPEND ARROW_PC_LIBS_PRIVATE " ${RE2_LIB}") +@@ -2337,7 +2348,7 @@ endmacro() + if(ARROW_WITH_BZ2) + resolve_dependency(BZip2) + if(${BZip2_SOURCE} STREQUAL "SYSTEM") +- string(APPEND ARROW_PC_LIBS_PRIVATE " ${BZIP2_LIBRARIES}") ++ string(APPEND ARROW_PC_LIBS_PRIVATE " ${BZip2_LIBRARIES}") + endif() + + if(NOT TARGET BZip2::BZip2) +@@ -2346,7 +2357,7 @@ if(ARROW_WITH_BZ2) + PROPERTIES IMPORTED_LOCATION "${BZIP2_LIBRARIES}" + INTERFACE_INCLUDE_DIRECTORIES "${BZIP2_INCLUDE_DIR}") + endif() +- include_directories(SYSTEM "${BZIP2_INCLUDE_DIR}") ++ include_directories(SYSTEM "${BZip2_INCLUDE_DIR}") + endif() + + macro(build_utf8proc) +@@ -3555,7 +3566,7 @@ if(ARROW_WITH_GRPC) + set(gRPC_SOURCE "${Protobuf_SOURCE}") + endif() + resolve_dependency(gRPC +- HAVE_ALT ++ USE_CONFIG + TRUE + REQUIRED_VERSION + ${ARROW_GRPC_REQUIRED_VERSION} +@@ -3573,9 +3584,9 @@ if(ARROW_WITH_GRPC) + else() + # grpc++ headers may reside in ${GRPC_INCLUDE_DIR}/grpc++ or ${GRPC_INCLUDE_DIR}/grpcpp + # depending on the gRPC version. +- if(EXISTS "${GRPC_INCLUDE_DIR}/grpcpp/impl/codegen/config_protobuf.h") ++ if(EXISTS ${gRPC_INCLUDE_DIR}/grpcpp/impl/codegen/config_protobuf.h) + set(GRPCPP_PP_INCLUDE TRUE) +- elseif(EXISTS "${GRPC_INCLUDE_DIR}/grpc++/impl/codegen/config_protobuf.h") ++ elseif(EXISTS ${gPC_INCLUDE_DIR}/grpc++/impl/codegen/config_protobuf.h) + set(GRPCPP_PP_INCLUDE FALSE) + else() + message(FATAL_ERROR "Cannot find grpc++ headers in ${GRPC_INCLUDE_DIR}") +@@ -4097,9 +4108,9 @@ macro(build_opentelemetry) + endmacro() + + if(ARROW_WITH_OPENTELEMETRY) +- set(opentelemetry-cpp_SOURCE "AUTO") ++ set(opentelemetry-cpp_SOURCE "SYSTEM") + resolve_dependency(opentelemetry-cpp) +- get_target_property(OPENTELEMETRY_INCLUDE_DIR opentelemetry-cpp::api ++ get_target_property(OPENTELEMETRY_INCLUDE_DIR opentelemetry-cpp::opentelemetry_common + INTERFACE_INCLUDE_DIRECTORIES) + include_directories(SYSTEM ${OPENTELEMETRY_INCLUDE_DIR}) + message(STATUS "Found OpenTelemetry headers: ${OPENTELEMETRY_INCLUDE_DIR}") +diff --git a/cpp/src/arrow/CMakeLists.txt b/cpp/src/arrow/CMakeLists.txt +index b984bc104..2c78cd9ec 100644 +--- a/cpp/src/arrow/CMakeLists.txt ++++ b/cpp/src/arrow/CMakeLists.txt +@@ -323,10 +323,14 @@ set(ARROW_TESTING_SRCS + + set(_allocator_dependencies "") # Empty list + if(ARROW_JEMALLOC) +- list(APPEND _allocator_dependencies jemalloc_ep) ++ list(APPEND _allocator_dependencies jemalloc::jemalloc) + endif() + if(ARROW_MIMALLOC) +- list(APPEND _allocator_dependencies mimalloc_ep) ++ if (TARGET mimalloc-static) ++ list(APPEND _allocator_dependencies mimalloc-static) ++ else() ++ list(APPEND _allocator_dependencies mimalloc) ++ endif() + endif() + + if(_allocator_dependencies) +diff --git a/cpp/src/arrow/flight/CMakeLists.txt b/cpp/src/arrow/flight/CMakeLists.txt +index 2cf8c9913..90ebb9ac3 100644 +--- a/cpp/src/arrow/flight/CMakeLists.txt ++++ b/cpp/src/arrow/flight/CMakeLists.txt +@@ -17,6 +17,9 @@ + + add_custom_target(arrow_flight) + ++# TODO: This is a temporary workaround. absl should be LINKED as TARGET. ++include_directories(SYSTEM ${absl_INCLUDE_DIR}) ++ + arrow_install_all_headers("arrow/flight") + + set(ARROW_FLIGHT_LINK_LIBS gRPC::grpc++ ${ARROW_PROTOBUF_LIBPROTOBUF}) +diff --git a/cpp/src/arrow/memory_pool.cc b/cpp/src/arrow/memory_pool.cc +index cf8bf64b2..cf8966b22 100644 +--- a/cpp/src/arrow/memory_pool.cc ++++ b/cpp/src/arrow/memory_pool.cc +@@ -48,7 +48,7 @@ + // Needed to support jemalloc 3 and 4 + #define JEMALLOC_MANGLE + // Explicitly link to our version of jemalloc +-#include "jemalloc_ep/dist/include/jemalloc/jemalloc.h" ++#include "jemalloc/jemalloc.h" + #endif + + #ifdef ARROW_MIMALLOC diff --git a/recipes/arrow/all/patches/7.0.0-0006-install-utils.patch b/recipes/arrow/all/patches/7.0.0-0006-install-utils.patch deleted file mode 100644 index 468fe3a6a6ab5..0000000000000 --- a/recipes/arrow/all/patches/7.0.0-0006-install-utils.patch +++ /dev/null @@ -1,17 +0,0 @@ -diff --git a/cpp/src/arrow/ipc/CMakeLists.txt b/cpp/src/arrow/ipc/CMakeLists.txt -index 495018e..f6cee6f 100644 ---- a/cpp/src/arrow/ipc/CMakeLists.txt -+++ b/cpp/src/arrow/ipc/CMakeLists.txt -@@ -61,8 +61,12 @@ endif() - if(ARROW_BUILD_UTILITIES OR ARROW_BUILD_INTEGRATION) - add_executable(arrow-file-to-stream file_to_stream.cc) - target_link_libraries(arrow-file-to-stream ${ARROW_UTIL_LIB}) -+ install(TARGETS arrow-file-to-stream ${INSTALL_IS_OPTIONAL} -+ DESTINATION ${CMAKE_INSTALL_BINDIR}) - add_executable(arrow-stream-to-file stream_to_file.cc) - target_link_libraries(arrow-stream-to-file ${ARROW_UTIL_LIB}) -+ install(TARGETS arrow-stream-to-file ${INSTALL_IS_OPTIONAL} -+ DESTINATION ${CMAKE_INSTALL_BINDIR}) - - if(ARROW_BUILD_INTEGRATION) - add_dependencies(arrow-integration arrow-file-to-stream) diff --git a/recipes/arrow/all/patches/7.0.0-0007-fix-cmake.patch b/recipes/arrow/all/patches/7.0.0-0007-fix-cmake.patch deleted file mode 100644 index 8b4d5d5518dcc..0000000000000 --- a/recipes/arrow/all/patches/7.0.0-0007-fix-cmake.patch +++ /dev/null @@ -1,347 +0,0 @@ -diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt -index 2d7baf1..dff5b1a 100644 ---- a/cpp/CMakeLists.txt -+++ b/cpp/CMakeLists.txt -@@ -699,7 +699,7 @@ endif() - - if(ARROW_WITH_BROTLI) - # Order is important for static linking -- set(ARROW_BROTLI_LIBS Brotli::brotlienc Brotli::brotlidec Brotli::brotlicommon) -+ set(ARROW_BROTLI_LIBS brotli::brotlienc brotli::brotlidec brotli::brotlicommon) - list(APPEND ARROW_LINK_LIBS ${ARROW_BROTLI_LIBS}) - list(APPEND ARROW_STATIC_LINK_LIBS ${ARROW_BROTLI_LIBS}) - if(Brotli_SOURCE STREQUAL "SYSTEM") -@@ -715,10 +715,17 @@ if(ARROW_WITH_BZ2) - endif() - - if(ARROW_WITH_LZ4) -- list(APPEND ARROW_STATIC_LINK_LIBS LZ4::lz4) -- if(Lz4_SOURCE STREQUAL "SYSTEM") -- list(APPEND ARROW_STATIC_INSTALL_INTERFACE_LIBS LZ4::lz4) -- endif() -+ if (TARGET LZ4::lz4_static) -+ list(APPEND ARROW_STATIC_LINK_LIBS LZ4::lz4_static) -+ if(Lz4_SOURCE STREQUAL "SYSTEM") -+ list(APPEND ARROW_STATIC_INSTALL_INTERFACE_LIBS LZ4::lz4_static) -+ endif() -+ else() -+ list(APPEND ARROW_STATIC_LINK_LIBS LZ4::lz4_shared) -+ if(Lz4_SOURCE STREQUAL "SYSTEM") -+ list(APPEND ARROW_STATIC_INSTALL_INTERFACE_LIBS LZ4::lz4_shared) -+ endif() -+endif() - endif() - - if(ARROW_WITH_SNAPPY) -@@ -907,8 +914,13 @@ endif() - - if(ARROW_MIMALLOC) - add_definitions(-DARROW_MIMALLOC) -- list(APPEND ARROW_LINK_LIBS mimalloc::mimalloc) -- list(APPEND ARROW_STATIC_LINK_LIBS mimalloc::mimalloc) -+ if (TARGET mimalloc-static) -+ list(APPEND ARROW_LINK_LIBS mimalloc-static) -+ list(APPEND ARROW_STATIC_LINK_LIBS mimalloc-static) -+ else() -+ list(APPEND ARROW_LINK_LIBS mimalloc) -+ list(APPEND ARROW_STATIC_LINK_LIBS mimalloc) -+ endif() - endif() - - # ---------------------------------------------------------------------- -diff --git a/cpp/cmake_modules/ThirdpartyToolchain.cmake b/cpp/cmake_modules/ThirdpartyToolchain.cmake -index bc38952..62bf314 100644 ---- a/cpp/cmake_modules/ThirdpartyToolchain.cmake -+++ b/cpp/cmake_modules/ThirdpartyToolchain.cmake -@@ -954,7 +954,7 @@ endif() - - if(ARROW_BOOST_REQUIRED) - resolve_dependency(Boost -- HAVE_ALT -+ USE_CONFIG - TRUE - REQUIRED_VERSION - ${ARROW_BOOST_REQUIRED_VERSION} -@@ -965,7 +965,7 @@ if(ARROW_BOOST_REQUIRED) - if(TARGET Boost::system) - set(BOOST_SYSTEM_LIBRARY Boost::system) - set(BOOST_FILESYSTEM_LIBRARY Boost::filesystem) -- elseif(BoostAlt_FOUND) -+ elseif(Boost_FOUND) - set(BOOST_SYSTEM_LIBRARY ${Boost_SYSTEM_LIBRARY}) - set(BOOST_FILESYSTEM_LIBRARY ${Boost_FILESYSTEM_LIBRARY}) - else() -@@ -1108,9 +1108,9 @@ macro(build_brotli) - endmacro() - - if(ARROW_WITH_BROTLI) -- resolve_dependency(Brotli PC_PACKAGE_NAMES libbrotlidec libbrotlienc) -+ resolve_dependency(brotli PC_PACKAGE_NAMES libbrotlidec libbrotlienc) - # TODO: Don't use global includes but rather target_include_directories -- get_target_property(BROTLI_INCLUDE_DIR Brotli::brotlicommon -+ get_target_property(BROTLI_INCLUDE_DIR brotli::brotlicommon - INTERFACE_INCLUDE_DIRECTORIES) - include_directories(SYSTEM ${BROTLI_INCLUDE_DIR}) - endif() -@@ -1302,22 +1302,17 @@ endmacro() - if(ARROW_NEED_GFLAGS) - set(ARROW_GFLAGS_REQUIRED_VERSION "2.1.0") - resolve_dependency(gflags -- HAVE_ALT -+ USE_CONFIG - TRUE - REQUIRED_VERSION - ${ARROW_GFLAGS_REQUIRED_VERSION} - IS_RUNTIME_DEPENDENCY - FALSE) - # TODO: Don't use global includes but rather target_include_directories -- include_directories(SYSTEM ${GFLAGS_INCLUDE_DIR}) -+ include_directories(SYSTEM ${gflags_INCLUDE_DIR}) - -- if(NOT TARGET ${GFLAGS_LIBRARIES}) -- if(TARGET gflags-shared) -- set(GFLAGS_LIBRARIES gflags-shared) -- elseif(TARGET gflags_shared) -- set(GFLAGS_LIBRARIES gflags_shared) -- endif() -- endif() -+ list(APPEND ARROW_BUNDLED_STATIC_LIBS ${gflags_LIBRARIES_TARGETS}) -+ set(GFLAGS_LIBRARIES gflags::gflags) - endif() - - # ---------------------------------------------------------------------- -@@ -1411,9 +1406,9 @@ if(ARROW_WITH_THRIFT) - thrift) - endif() - # TODO: Don't use global includes but rather target_include_directories -- include_directories(SYSTEM ${THRIFT_INCLUDE_DIR}) -+ include_directories(SYSTEM ${Thrift_INCLUDE_DIR}) - -- string(REPLACE "." ";" VERSION_LIST ${THRIFT_VERSION}) -+ string(REPLACE "." ";" VERSION_LIST ${Thrift_VERSION}) - list(GET VERSION_LIST 0 THRIFT_VERSION_MAJOR) - list(GET VERSION_LIST 1 THRIFT_VERSION_MINOR) - list(GET VERSION_LIST 2 THRIFT_VERSION_PATCH) -@@ -1528,6 +1523,7 @@ if(ARROW_WITH_PROTOBUF) - set(ARROW_PROTOBUF_REQUIRED_VERSION "2.6.1") - endif() - resolve_dependency(Protobuf -+ USE_CONFIG - REQUIRED_VERSION - ${ARROW_PROTOBUF_REQUIRED_VERSION} - PC_PACKAGE_NAMES -@@ -1538,7 +1534,7 @@ if(ARROW_WITH_PROTOBUF) - endif() - - # TODO: Don't use global includes but rather target_include_directories -- include_directories(SYSTEM ${PROTOBUF_INCLUDE_DIR}) -+ include_directories(SYSTEM ${protobuf_INCLUDE_DIR}) - - if(TARGET arrow::protobuf::libprotobuf) - set(ARROW_PROTOBUF_LIBPROTOBUF arrow::protobuf::libprotobuf) -@@ -1547,9 +1543,9 @@ if(ARROW_WITH_PROTOBUF) - if(NOT TARGET protobuf::libprotobuf) - add_library(protobuf::libprotobuf UNKNOWN IMPORTED) - set_target_properties(protobuf::libprotobuf -- PROPERTIES IMPORTED_LOCATION "${PROTOBUF_LIBRARY}" -+ PROPERTIES IMPORTED_LOCATION "${Protobuf_LIBRARY}" - INTERFACE_INCLUDE_DIRECTORIES -- "${PROTOBUF_INCLUDE_DIR}") -+ "${Protobuf_INCLUDE_DIR}") - endif() - set(ARROW_PROTOBUF_LIBPROTOBUF protobuf::libprotobuf) - endif() -@@ -1569,7 +1565,7 @@ if(ARROW_WITH_PROTOBUF) - set_target_properties(protobuf::libprotoc - PROPERTIES IMPORTED_LOCATION "${Protobuf_PROTOC_LIBRARY}" - INTERFACE_INCLUDE_DIRECTORIES -- "${PROTOBUF_INCLUDE_DIR}") -+ "${Protobuf_INCLUDE_DIR}") - endif() - set(ARROW_PROTOBUF_LIBPROTOC protobuf::libprotoc) - endif() -@@ -1600,6 +1596,7 @@ endif() - # jemalloc - Unix-only high-performance allocator - - if(ARROW_JEMALLOC) -+if(0) - message(STATUS "Building (vendored) jemalloc from source") - # We only use a vendored jemalloc as we want to control its version. - # Also our build of jemalloc is specially prefixed so that it will not -@@ -1665,12 +1662,18 @@ if(ARROW_JEMALLOC) - add_dependencies(jemalloc::jemalloc jemalloc_ep) - - list(APPEND ARROW_BUNDLED_STATIC_LIBS jemalloc::jemalloc) -+else() -+ find_package(jemalloc REQUIRED CONFIG) -+ include_directories(SYSTEM "${jemalloc_INCLUDE_DIR}") -+ list(APPEND ARROW_BUNDLED_STATIC_LIBS ${jemalloc_LIBRARIES_TARGETS}) -+endif() - endif() - - # ---------------------------------------------------------------------- - # mimalloc - Cross-platform high-performance allocator, from Microsoft - - if(ARROW_MIMALLOC) -+if(0) - message(STATUS "Building (vendored) mimalloc from source") - # We only use a vendored mimalloc as we want to control its build options. - -@@ -1716,6 +1719,11 @@ if(ARROW_MIMALLOC) - add_dependencies(toolchain mimalloc_ep) - - list(APPEND ARROW_BUNDLED_STATIC_LIBS mimalloc::mimalloc) -+else() -+ find_package(mimalloc REQUIRED CONFIG) -+ include_directories(SYSTEM "${mimalloc_INCLUDE_DIR}") -+ list(APPEND ARROW_BUNDLED_STATIC_LIBS ${mimalloc_LIBRARIES_TARGETS} ) -+endif() - endif() - - # ---------------------------------------------------------------------- -@@ -2001,7 +2009,7 @@ endmacro() - if(ARROW_WITH_RAPIDJSON) - set(ARROW_RAPIDJSON_REQUIRED_VERSION "1.1.0") - resolve_dependency(RapidJSON -- HAVE_ALT -+ USE_CONFIG - TRUE - REQUIRED_VERSION - ${ARROW_RAPIDJSON_REQUIRED_VERSION} -@@ -2038,10 +2046,9 @@ endmacro() - - if((NOT ARROW_SIMD_LEVEL STREQUAL "NONE") OR (NOT ARROW_RUNTIME_SIMD_LEVEL STREQUAL "NONE" - )) -- set(xsimd_SOURCE "BUNDLED") - resolve_dependency(xsimd) - # TODO: Don't use global includes but rather target_include_directories -- include_directories(SYSTEM ${XSIMD_INCLUDE_DIR}) -+ include_directories(SYSTEM ${xsimd_INCLUDE_DIR}) - endif() - - macro(build_zlib) -@@ -2140,10 +2147,14 @@ macro(build_lz4) - endmacro() - - if(ARROW_WITH_LZ4) -- resolve_dependency(Lz4 PC_PACKAGE_NAMES liblz4) -+ resolve_dependency(lz4) - - # TODO: Don't use global includes but rather target_include_directories -- get_target_property(LZ4_INCLUDE_DIR LZ4::lz4 INTERFACE_INCLUDE_DIRECTORIES) -+ if (TARGET LZ4::lz4_static) -+ get_target_property(LZ4_INCLUDE_DIR LZ4::lz4_static INTERFACE_INCLUDE_DIRECTORIES) -+ else() -+ get_target_property(LZ4_INCLUDE_DIR LZ4::lz4_shared INTERFACE_INCLUDE_DIRECTORIES) -+ endif() - include_directories(SYSTEM ${LZ4_INCLUDE_DIR}) - endif() - -@@ -2274,7 +2285,7 @@ if(ARROW_WITH_RE2) - # Don't specify "PC_PACKAGE_NAMES re2" here because re2.pc may - # include -std=c++11. It's not compatible with C source and C++ - # source not uses C++ 11. -- resolve_dependency(re2 HAVE_ALT TRUE) -+ resolve_dependency(re2 USE_CONFIG TRUE) - if(${re2_SOURCE} STREQUAL "SYSTEM") - get_target_property(RE2_LIB re2::re2 IMPORTED_LOCATION) - string(APPEND ARROW_PC_LIBS_PRIVATE " ${RE2_LIB}") -@@ -2337,7 +2348,7 @@ endmacro() - if(ARROW_WITH_BZ2) - resolve_dependency(BZip2) - if(${BZip2_SOURCE} STREQUAL "SYSTEM") -- string(APPEND ARROW_PC_LIBS_PRIVATE " ${BZIP2_LIBRARIES}") -+ string(APPEND ARROW_PC_LIBS_PRIVATE " ${BZip2_LIBRARIES}") - endif() - - if(NOT TARGET BZip2::BZip2) -@@ -2346,7 +2357,7 @@ if(ARROW_WITH_BZ2) - PROPERTIES IMPORTED_LOCATION "${BZIP2_LIBRARIES}" - INTERFACE_INCLUDE_DIRECTORIES "${BZIP2_INCLUDE_DIR}") - endif() -- include_directories(SYSTEM "${BZIP2_INCLUDE_DIR}") -+ include_directories(SYSTEM "${BZip2_INCLUDE_DIR}") - endif() - - macro(build_utf8proc) -@@ -3555,7 +3566,7 @@ if(ARROW_WITH_GRPC) - set(gRPC_SOURCE "${Protobuf_SOURCE}") - endif() - resolve_dependency(gRPC -- HAVE_ALT -+ USE_CONFIG - TRUE - REQUIRED_VERSION - ${ARROW_GRPC_REQUIRED_VERSION} -@@ -3573,9 +3584,9 @@ if(ARROW_WITH_GRPC) - else() - # grpc++ headers may reside in ${GRPC_INCLUDE_DIR}/grpc++ or ${GRPC_INCLUDE_DIR}/grpcpp - # depending on the gRPC version. -- if(EXISTS "${GRPC_INCLUDE_DIR}/grpcpp/impl/codegen/config_protobuf.h") -+ if(EXISTS ${gRPC_INCLUDE_DIR}/grpcpp/impl/codegen/config_protobuf.h) - set(GRPCPP_PP_INCLUDE TRUE) -- elseif(EXISTS "${GRPC_INCLUDE_DIR}/grpc++/impl/codegen/config_protobuf.h") -+ elseif(EXISTS ${gPC_INCLUDE_DIR}/grpc++/impl/codegen/config_protobuf.h) - set(GRPCPP_PP_INCLUDE FALSE) - else() - message(FATAL_ERROR "Cannot find grpc++ headers in ${GRPC_INCLUDE_DIR}") -@@ -4097,9 +4108,9 @@ macro(build_opentelemetry) - endmacro() - - if(ARROW_WITH_OPENTELEMETRY) -- set(opentelemetry-cpp_SOURCE "AUTO") -+ set(opentelemetry-cpp_SOURCE "SYSTEM") - resolve_dependency(opentelemetry-cpp) -- get_target_property(OPENTELEMETRY_INCLUDE_DIR opentelemetry-cpp::api -+ get_target_property(OPENTELEMETRY_INCLUDE_DIR opentelemetry-cpp::opentelemetry_common - INTERFACE_INCLUDE_DIRECTORIES) - include_directories(SYSTEM ${OPENTELEMETRY_INCLUDE_DIR}) - message(STATUS "Found OpenTelemetry headers: ${OPENTELEMETRY_INCLUDE_DIR}") -diff --git a/cpp/src/arrow/CMakeLists.txt b/cpp/src/arrow/CMakeLists.txt -index b984bc1..2c78cd9 100644 ---- a/cpp/src/arrow/CMakeLists.txt -+++ b/cpp/src/arrow/CMakeLists.txt -@@ -323,10 +323,14 @@ set(ARROW_TESTING_SRCS - - set(_allocator_dependencies "") # Empty list - if(ARROW_JEMALLOC) -- list(APPEND _allocator_dependencies jemalloc_ep) -+ list(APPEND _allocator_dependencies jemalloc::jemalloc) - endif() - if(ARROW_MIMALLOC) -- list(APPEND _allocator_dependencies mimalloc_ep) -+ if (TARGET mimalloc-static) -+ list(APPEND _allocator_dependencies mimalloc-static) -+ else() -+ list(APPEND _allocator_dependencies mimalloc) -+ endif() - endif() - - if(_allocator_dependencies) -diff --git a/cpp/src/arrow/flight/CMakeLists.txt b/cpp/src/arrow/flight/CMakeLists.txt -index 2cf8c99..90ebb9a 100644 ---- a/cpp/src/arrow/flight/CMakeLists.txt -+++ b/cpp/src/arrow/flight/CMakeLists.txt -@@ -17,6 +17,9 @@ - - add_custom_target(arrow_flight) - -+# TODO: This is a temporary workaround. absl should be LINKED as TARGET. -+include_directories(SYSTEM ${absl_INCLUDE_DIR}) -+ - arrow_install_all_headers("arrow/flight") - - set(ARROW_FLIGHT_LINK_LIBS gRPC::grpc++ ${ARROW_PROTOBUF_LIBPROTOBUF}) -diff --git a/cpp/src/arrow/memory_pool.cc b/cpp/src/arrow/memory_pool.cc -index 2dcfb01..0394c01 100644 ---- a/cpp/src/arrow/memory_pool.cc -+++ b/cpp/src/arrow/memory_pool.cc -@@ -48,7 +48,7 @@ - // Needed to support jemalloc 3 and 4 - #define JEMALLOC_MANGLE - // Explicitly link to our version of jemalloc --#include "jemalloc_ep/dist/include/jemalloc/jemalloc.h" -+#include "jemalloc/jemalloc.h" - #endif - - #ifdef ARROW_MIMALLOC diff --git a/recipes/arrow/all/patches/8.0.0-0001-static-analyzers.patch b/recipes/arrow/all/patches/8.0.0-0001-static-analyzers.patch new file mode 100644 index 0000000000000..236c60c859c27 --- /dev/null +++ b/recipes/arrow/all/patches/8.0.0-0001-static-analyzers.patch @@ -0,0 +1,17 @@ +diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt +index aba18c8d2..5eec4ea72 100644 +--- a/cpp/CMakeLists.txt ++++ b/cpp/CMakeLists.txt +@@ -162,11 +162,7 @@ else() + set(MSVC_TOOLCHAIN FALSE) + endif() + +-find_package(ClangTools) +-find_package(InferTools) +-if("$ENV{CMAKE_EXPORT_COMPILE_COMMANDS}" STREQUAL "1" +- OR CLANG_TIDY_FOUND +- OR INFER_FOUND) ++if("$ENV{CMAKE_EXPORT_COMPILE_COMMANDS}" STREQUAL "1") + # Generate a Clang compile_commands.json "compilation database" file for use + # with various development tools, such as Vim's YouCompleteMe plugin. + # See http://clang.llvm.org/docs/JSONCompilationDatabase.html diff --git a/recipes/arrow/all/patches/8.0.0-0002-install-utils.patch b/recipes/arrow/all/patches/8.0.0-0002-install-utils.patch new file mode 100644 index 0000000000000..16a21d2e1a272 --- /dev/null +++ b/recipes/arrow/all/patches/8.0.0-0002-install-utils.patch @@ -0,0 +1,43 @@ +diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt +index 5eec4ea72..301f0074c 100644 +--- a/cpp/CMakeLists.txt ++++ b/cpp/CMakeLists.txt +@@ -717,7 +717,7 @@ if(ARROW_WITH_BZ2) + endif() + + if(ARROW_WITH_LZ4) +- list(APPEND ARROW_STATIC_LINK_LIBS LZ4::lz4) ++ list(APPEND ARROW_STATIC_LINK_LIBS lz4::lz4) + if(Lz4_SOURCE STREQUAL "SYSTEM") + list(APPEND ARROW_STATIC_INSTALL_INTERFACE_LIBS LZ4::lz4) + endif() +@@ -903,8 +903,8 @@ endif() + if(ARROW_JEMALLOC) + add_definitions(-DARROW_JEMALLOC) + add_definitions(-DARROW_JEMALLOC_INCLUDE_DIR=${JEMALLOC_INCLUDE_DIR}) +- list(APPEND ARROW_LINK_LIBS jemalloc::jemalloc) +- list(APPEND ARROW_STATIC_LINK_LIBS jemalloc::jemalloc) ++ list(APPEND ARROW_LINK_LIBS jemalloc) ++ list(APPEND ARROW_STATIC_LINK_LIBS jemalloc) + endif() + + if(ARROW_MIMALLOC) +diff --git a/cpp/src/arrow/ipc/CMakeLists.txt b/cpp/src/arrow/ipc/CMakeLists.txt +index 495018ec0..3dcb35d04 100644 +--- a/cpp/src/arrow/ipc/CMakeLists.txt ++++ b/cpp/src/arrow/ipc/CMakeLists.txt +@@ -61,9 +61,13 @@ endif() + if(ARROW_BUILD_UTILITIES OR ARROW_BUILD_INTEGRATION) + add_executable(arrow-file-to-stream file_to_stream.cc) + target_link_libraries(arrow-file-to-stream ${ARROW_UTIL_LIB}) ++ install(TARGETS arrow-file-to-stream ${INSTALL_IS_OPTIONAL} ++ DESTINATION ${CMAKE_INSTALL_BINDIR}) + add_executable(arrow-stream-to-file stream_to_file.cc) + target_link_libraries(arrow-stream-to-file ${ARROW_UTIL_LIB}) +- ++ install(TARGETS arrow-stream-to-file ${INSTALL_IS_OPTIONAL} ++ DESTINATION ${CMAKE_INSTALL_BINDIR}) ++ + if(ARROW_BUILD_INTEGRATION) + add_dependencies(arrow-integration arrow-file-to-stream) + add_dependencies(arrow-integration arrow-stream-to-file) diff --git a/recipes/arrow/all/patches/8.0.0-0003-fix-cmake.patch b/recipes/arrow/all/patches/8.0.0-0003-fix-cmake.patch new file mode 100644 index 0000000000000..3440e2df0b601 --- /dev/null +++ b/recipes/arrow/all/patches/8.0.0-0003-fix-cmake.patch @@ -0,0 +1,425 @@ +diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt +index 301f0074c..279d92685 100644 +--- a/cpp/CMakeLists.txt ++++ b/cpp/CMakeLists.txt +@@ -701,7 +701,7 @@ endif() + + if(ARROW_WITH_BROTLI) + # Order is important for static linking +- set(ARROW_BROTLI_LIBS Brotli::brotlienc Brotli::brotlidec Brotli::brotlicommon) ++ set(ARROW_BROTLI_LIBS brotli::brotlienc brotli::brotlidec brotli::brotlicommon) + list(APPEND ARROW_LINK_LIBS ${ARROW_BROTLI_LIBS}) + list(APPEND ARROW_STATIC_LINK_LIBS ${ARROW_BROTLI_LIBS}) + if(Brotli_SOURCE STREQUAL "SYSTEM") +@@ -717,11 +717,18 @@ if(ARROW_WITH_BZ2) + endif() + + if(ARROW_WITH_LZ4) +- list(APPEND ARROW_STATIC_LINK_LIBS lz4::lz4) +- if(Lz4_SOURCE STREQUAL "SYSTEM") +- list(APPEND ARROW_STATIC_INSTALL_INTERFACE_LIBS LZ4::lz4) ++ if (TARGET LZ4::lz4_static) ++ list(APPEND ARROW_STATIC_LINK_LIBS LZ4::lz4_static) ++ if(Lz4_SOURCE STREQUAL "SYSTEM") ++ list(APPEND ARROW_STATIC_INSTALL_INTERFACE_LIBS LZ4::lz4_static) ++ endif() ++ else() ++ list(APPEND ARROW_STATIC_LINK_LIBS LZ4::lz4_shared) ++ if(Lz4_SOURCE STREQUAL "SYSTEM") ++ list(APPEND ARROW_STATIC_INSTALL_INTERFACE_LIBS LZ4::lz4_shared) + endif() + endif() ++endif() + + if(ARROW_WITH_SNAPPY) + list(APPEND ARROW_STATIC_LINK_LIBS Snappy::snappy) +@@ -909,8 +916,13 @@ endif() + + if(ARROW_MIMALLOC) + add_definitions(-DARROW_MIMALLOC) +- list(APPEND ARROW_LINK_LIBS mimalloc::mimalloc) +- list(APPEND ARROW_STATIC_LINK_LIBS mimalloc::mimalloc) ++ if (TARGET mimalloc-static) ++ list(APPEND ARROW_LINK_LIBS mimalloc-static) ++ list(APPEND ARROW_STATIC_LINK_LIBS mimalloc-static) ++ else() ++ list(APPEND ARROW_LINK_LIBS mimalloc) ++ list(APPEND ARROW_STATIC_LINK_LIBS mimalloc) ++ endif() + endif() + + # ---------------------------------------------------------------------- +diff --git a/cpp/cmake_modules/ThirdpartyToolchain.cmake b/cpp/cmake_modules/ThirdpartyToolchain.cmake +index f070323e2..16faf73b6 100644 +--- a/cpp/cmake_modules/ThirdpartyToolchain.cmake ++++ b/cpp/cmake_modules/ThirdpartyToolchain.cmake +@@ -959,6 +959,7 @@ endif() + # - Tests need Boost at runtime. + # - S3FS and Flight benchmarks need Boost at runtime. + if(ARROW_BUILD_INTEGRATION ++ OR ARROW_BOOST_REQUIRED + OR ARROW_BUILD_TESTS + OR (ARROW_FLIGHT AND ARROW_BUILD_BENCHMARKS) + OR (ARROW_S3 AND ARROW_BUILD_BENCHMARKS)) +@@ -975,7 +976,7 @@ endif() + + if(ARROW_BOOST_REQUIRED) + resolve_dependency(Boost +- HAVE_ALT ++ USE_CONFIG + TRUE + REQUIRED_VERSION + ${ARROW_BOOST_REQUIRED_VERSION} +@@ -986,7 +987,7 @@ if(ARROW_BOOST_REQUIRED) + if(TARGET Boost::system) + set(BOOST_SYSTEM_LIBRARY Boost::system) + set(BOOST_FILESYSTEM_LIBRARY Boost::filesystem) +- elseif(BoostAlt_FOUND) ++ elseif(Boost_FOUND) + set(BOOST_SYSTEM_LIBRARY ${Boost_SYSTEM_LIBRARY}) + set(BOOST_FILESYSTEM_LIBRARY ${Boost_FILESYSTEM_LIBRARY}) + else() +@@ -1129,9 +1130,9 @@ macro(build_brotli) + endmacro() + + if(ARROW_WITH_BROTLI) +- resolve_dependency(Brotli PC_PACKAGE_NAMES libbrotlidec libbrotlienc) ++ resolve_dependency(brotli PC_PACKAGE_NAMES libbrotlidec libbrotlienc) + # TODO: Don't use global includes but rather target_include_directories +- get_target_property(BROTLI_INCLUDE_DIR Brotli::brotlicommon ++ get_target_property(BROTLI_INCLUDE_DIR brotli::brotlicommon + INTERFACE_INCLUDE_DIRECTORIES) + include_directories(SYSTEM ${BROTLI_INCLUDE_DIR}) + endif() +@@ -1323,22 +1324,16 @@ endmacro() + if(ARROW_NEED_GFLAGS) + set(ARROW_GFLAGS_REQUIRED_VERSION "2.1.0") + resolve_dependency(gflags +- HAVE_ALT ++ USE_CONFIG + TRUE + REQUIRED_VERSION + ${ARROW_GFLAGS_REQUIRED_VERSION} + IS_RUNTIME_DEPENDENCY + FALSE) + # TODO: Don't use global includes but rather target_include_directories +- include_directories(SYSTEM ${GFLAGS_INCLUDE_DIR}) +- +- if(NOT TARGET ${GFLAGS_LIBRARIES}) +- if(TARGET gflags-shared) +- set(GFLAGS_LIBRARIES gflags-shared) +- elseif(TARGET gflags_shared) +- set(GFLAGS_LIBRARIES gflags_shared) +- endif() +- endif() ++ include_directories(SYSTEM ${gflags_INCLUDE_DIR}) ++ list(APPEND ARROW_BUNDLED_STATIC_LIBS ${gflags_LIBRARIES_TARGETS}) ++ set(GFLAGS_LIBRARIES gflags::gflags) + endif() + + # ---------------------------------------------------------------------- +@@ -1432,9 +1427,9 @@ if(ARROW_WITH_THRIFT) + thrift) + endif() + # TODO: Don't use global includes but rather target_include_directories +- include_directories(SYSTEM ${THRIFT_INCLUDE_DIR}) ++ include_directories(SYSTEM ${Thrift_INCLUDE_DIR}) + +- string(REPLACE "." ";" VERSION_LIST ${THRIFT_VERSION}) ++ string(REPLACE "." ";" VERSION_LIST ${Thrift_VERSION}) + list(GET VERSION_LIST 0 THRIFT_VERSION_MAJOR) + list(GET VERSION_LIST 1 THRIFT_VERSION_MINOR) + list(GET VERSION_LIST 2 THRIFT_VERSION_PATCH) +@@ -1557,6 +1552,7 @@ if(ARROW_WITH_PROTOBUF) + set(ARROW_PROTOBUF_REQUIRED_VERSION "2.6.1") + endif() + resolve_dependency(Protobuf ++ USE_CONFIG + REQUIRED_VERSION + ${ARROW_PROTOBUF_REQUIRED_VERSION} + PC_PACKAGE_NAMES +@@ -1567,7 +1563,7 @@ if(ARROW_WITH_PROTOBUF) + endif() + + # TODO: Don't use global includes but rather target_include_directories +- include_directories(SYSTEM ${PROTOBUF_INCLUDE_DIR}) ++ include_directories(SYSTEM ${protobuf_INCLUDE_DIR}) + + if(TARGET arrow::protobuf::libprotobuf) + set(ARROW_PROTOBUF_LIBPROTOBUF arrow::protobuf::libprotobuf) +@@ -1576,9 +1572,9 @@ if(ARROW_WITH_PROTOBUF) + if(NOT TARGET protobuf::libprotobuf) + add_library(protobuf::libprotobuf UNKNOWN IMPORTED) + set_target_properties(protobuf::libprotobuf +- PROPERTIES IMPORTED_LOCATION "${PROTOBUF_LIBRARY}" ++ PROPERTIES IMPORTED_LOCATION "${Protobuf_LIBRARY}" + INTERFACE_INCLUDE_DIRECTORIES +- "${PROTOBUF_INCLUDE_DIR}") ++ "${Protobuf_INCLUDE_DIR}") + endif() + set(ARROW_PROTOBUF_LIBPROTOBUF protobuf::libprotobuf) + endif() +@@ -1598,7 +1594,7 @@ if(ARROW_WITH_PROTOBUF) + set_target_properties(protobuf::libprotoc + PROPERTIES IMPORTED_LOCATION "${Protobuf_PROTOC_LIBRARY}" + INTERFACE_INCLUDE_DIRECTORIES +- "${PROTOBUF_INCLUDE_DIR}") ++ "${Protobuf_INCLUDE_DIR}") + endif() + set(ARROW_PROTOBUF_LIBPROTOC protobuf::libprotoc) + endif() +@@ -1690,11 +1686,12 @@ macro(build_substrait) + + add_custom_target(substrait_gen ALL DEPENDS ${SUBSTRAIT_PROTO_GEN_ALL}) + +- set(SUBSTRAIT_INCLUDES ${SUBSTRAIT_CPP_DIR} ${PROTOBUF_INCLUDE_DIR}) ++ set(SUBSTRAIT_INCLUDES ${SUBSTRAIT_CPP_DIR} ${protobuf_INCLUDE_DIR}) + + add_library(substrait STATIC ${SUBSTRAIT_SOURCES}) + set_target_properties(substrait PROPERTIES POSITION_INDEPENDENT_CODE ON) + target_include_directories(substrait PUBLIC ${SUBSTRAIT_INCLUDES}) ++ target_include_directories(substrait PUBLIC ${PROTOBUF_INCLUDE_DIR}) + target_link_libraries(substrait INTERFACE ${ARROW_PROTOBUF_LIBPROTOBUF}) + add_dependencies(substrait substrait_gen) + +@@ -1711,6 +1708,7 @@ endif() + # jemalloc - Unix-only high-performance allocator + + if(ARROW_JEMALLOC) ++if(0) + message(STATUS "Building (vendored) jemalloc from source") + # We only use a vendored jemalloc as we want to control its version. + # Also our build of jemalloc is specially prefixed so that it will not +@@ -1780,12 +1778,18 @@ if(ARROW_JEMALLOC) + add_dependencies(jemalloc::jemalloc jemalloc_ep) + + list(APPEND ARROW_BUNDLED_STATIC_LIBS jemalloc::jemalloc) ++else() ++ find_package(jemalloc REQUIRED CONFIG) ++ include_directories(SYSTEM "${jemalloc_INCLUDE_DIR}") ++ list(APPEND ARROW_BUNDLED_STATIC_LIBS ${jemalloc_LIBRARIES_TARGETS}) ++endif() + endif() + + # ---------------------------------------------------------------------- + # mimalloc - Cross-platform high-performance allocator, from Microsoft + + if(ARROW_MIMALLOC) ++if(0) + message(STATUS "Building (vendored) mimalloc from source") + # We only use a vendored mimalloc as we want to control its build options. + +@@ -1836,6 +1840,11 @@ if(ARROW_MIMALLOC) + add_dependencies(toolchain mimalloc_ep) + + list(APPEND ARROW_BUNDLED_STATIC_LIBS mimalloc::mimalloc) ++else() ++ find_package(mimalloc REQUIRED CONFIG) ++ include_directories(SYSTEM "${mimalloc_INCLUDE_DIR}") ++ list(APPEND ARROW_BUNDLED_STATIC_LIBS ${mimalloc_LIBRARIES_TARGETS} ) ++endif() + endif() + + # ---------------------------------------------------------------------- +@@ -2121,7 +2130,7 @@ endmacro() + if(ARROW_WITH_RAPIDJSON) + set(ARROW_RAPIDJSON_REQUIRED_VERSION "1.1.0") + resolve_dependency(RapidJSON +- HAVE_ALT ++ USE_CONFIG + TRUE + REQUIRED_VERSION + ${ARROW_RAPIDJSON_REQUIRED_VERSION} +@@ -2158,10 +2167,10 @@ endmacro() + + if((NOT ARROW_SIMD_LEVEL STREQUAL "NONE") OR (NOT ARROW_RUNTIME_SIMD_LEVEL STREQUAL "NONE" + )) +- set(xsimd_SOURCE "BUNDLED") ++ set(xsimd_SOURCE "SYSTEM") + resolve_dependency(xsimd) + # TODO: Don't use global includes but rather target_include_directories +- include_directories(SYSTEM ${XSIMD_INCLUDE_DIR}) ++ include_directories(SYSTEM ${xsimd_INCLUDE_DIR}) + endif() + + macro(build_zlib) +@@ -2260,10 +2269,14 @@ macro(build_lz4) + endmacro() + + if(ARROW_WITH_LZ4) +- resolve_dependency(Lz4 PC_PACKAGE_NAMES liblz4) ++ resolve_dependency(Lz4) + + # TODO: Don't use global includes but rather target_include_directories +- get_target_property(LZ4_INCLUDE_DIR LZ4::lz4 INTERFACE_INCLUDE_DIRECTORIES) ++ if (TARGET LZ4::lz4_static) ++ get_target_property(LZ4_INCLUDE_DIR LZ4::lz4_static INTERFACE_INCLUDE_DIRECTORIES) ++ else() ++ get_target_property(LZ4_INCLUDE_DIR LZ4::lz4_shared INTERFACE_INCLUDE_DIRECTORIES) ++ endif() + include_directories(SYSTEM ${LZ4_INCLUDE_DIR}) + endif() + +@@ -2394,7 +2407,7 @@ if(ARROW_WITH_RE2) + # Don't specify "PC_PACKAGE_NAMES re2" here because re2.pc may + # include -std=c++11. It's not compatible with C source and C++ + # source not uses C++ 11. +- resolve_dependency(re2 HAVE_ALT TRUE) ++ resolve_dependency(re2 USE_CONFIG TRUE) + if(${re2_SOURCE} STREQUAL "SYSTEM") + get_target_property(RE2_LIB re2::re2 IMPORTED_LOCATION_${UPPERCASE_BUILD_TYPE}) + if(NOT RE2_LIB) +@@ -2464,7 +2477,7 @@ endmacro() + if(ARROW_WITH_BZ2) + resolve_dependency(BZip2) + if(${BZip2_SOURCE} STREQUAL "SYSTEM") +- string(APPEND ARROW_PC_LIBS_PRIVATE " ${BZIP2_LIBRARIES}") ++ string(APPEND ARROW_PC_LIBS_PRIVATE " ${BZip2_LIBRARIES}") + endif() + + if(NOT TARGET BZip2::BZip2) +@@ -2473,7 +2486,7 @@ if(ARROW_WITH_BZ2) + PROPERTIES IMPORTED_LOCATION "${BZIP2_LIBRARIES}" + INTERFACE_INCLUDE_DIRECTORIES "${BZIP2_INCLUDE_DIR}") + endif() +- include_directories(SYSTEM "${BZIP2_INCLUDE_DIR}") ++ include_directories(SYSTEM "${BZip2_INCLUDE_DIR}") + endif() + + macro(build_utf8proc) +@@ -3709,7 +3722,7 @@ if(ARROW_WITH_GRPC) + set(gRPC_SOURCE "${Protobuf_SOURCE}") + endif() + resolve_dependency(gRPC +- HAVE_ALT ++ USE_CONFIG + TRUE + REQUIRED_VERSION + ${ARROW_GRPC_REQUIRED_VERSION} +@@ -3727,9 +3740,9 @@ if(ARROW_WITH_GRPC) + else() + # grpc++ headers may reside in ${GRPC_INCLUDE_DIR}/grpc++ or ${GRPC_INCLUDE_DIR}/grpcpp + # depending on the gRPC version. +- if(EXISTS "${GRPC_INCLUDE_DIR}/grpcpp/impl/codegen/config_protobuf.h") ++ if(EXISTS ${gRPC_INCLUDE_DIR}/grpcpp/impl/codegen/config_protobuf.h) + set(GRPCPP_PP_INCLUDE TRUE) +- elseif(EXISTS "${GRPC_INCLUDE_DIR}/grpc++/impl/codegen/config_protobuf.h") ++ elseif(EXISTS ${gRPC_INCLUDE_DIR}/grpc++/impl/codegen/config_protobuf.h) + set(GRPCPP_PP_INCLUDE FALSE) + else() + message(FATAL_ERROR "Cannot find grpc++ headers in ${GRPC_INCLUDE_DIR}") +@@ -3937,7 +3950,7 @@ macro(build_google_cloud_cpp_storage) + endmacro() + + if(ARROW_WITH_GOOGLE_CLOUD_CPP) +- resolve_dependency(google_cloud_cpp_storage) ++ resolve_dependency(google_cloud_cpp) + get_target_property(google_cloud_cpp_storage_INCLUDE_DIR google-cloud-cpp::storage + INTERFACE_INCLUDE_DIRECTORIES) + include_directories(SYSTEM ${google_cloud_cpp_storage_INCLUDE_DIR}) +@@ -4264,9 +4277,9 @@ if(ARROW_WITH_OPENTELEMETRY) + # cURL is required whether we build from source or use an existing installation + # (OTel's cmake files do not call find_curl for you) + find_curl() +- set(opentelemetry-cpp_SOURCE "AUTO") ++ set(opentelemetry-cpp_SOURCE "SYSTEM") + resolve_dependency(opentelemetry-cpp) +- get_target_property(OPENTELEMETRY_INCLUDE_DIR opentelemetry-cpp::api ++ get_target_property(OPENTELEMETRY_INCLUDE_DIR opentelemetry-cpp::opentelemetry_common + INTERFACE_INCLUDE_DIRECTORIES) + include_directories(SYSTEM ${OPENTELEMETRY_INCLUDE_DIR}) + message(STATUS "Found OpenTelemetry headers: ${OPENTELEMETRY_INCLUDE_DIR}") +diff --git a/cpp/src/arrow/CMakeLists.txt b/cpp/src/arrow/CMakeLists.txt +index 690c51a4a..752f3b903 100644 +--- a/cpp/src/arrow/CMakeLists.txt ++++ b/cpp/src/arrow/CMakeLists.txt +@@ -326,10 +326,14 @@ set(ARROW_TESTING_SRCS + + set(_allocator_dependencies "") # Empty list + if(ARROW_JEMALLOC) +- list(APPEND _allocator_dependencies jemalloc_ep) ++ list(APPEND _allocator_dependencies jemalloc::jemalloc) + endif() + if(ARROW_MIMALLOC) +- list(APPEND _allocator_dependencies mimalloc_ep) ++ if (TARGET mimalloc-static) ++ list(APPEND _allocator_dependencies mimalloc-static) ++ else() ++ list(APPEND _allocator_dependencies mimalloc) ++ endif() + endif() + + if(_allocator_dependencies) +diff --git a/cpp/src/arrow/flight/CMakeLists.txt b/cpp/src/arrow/flight/CMakeLists.txt +index f9d135654..c9bcf7933 100644 +--- a/cpp/src/arrow/flight/CMakeLists.txt ++++ b/cpp/src/arrow/flight/CMakeLists.txt +@@ -17,6 +17,9 @@ + + add_custom_target(arrow_flight) + ++# TODO: This is a temporary workaround. absl should be LINKED as TARGET. ++include_directories(SYSTEM ${absl_INCLUDE_DIR}) ++ + arrow_install_all_headers("arrow/flight") + + set(ARROW_FLIGHT_LINK_LIBS gRPC::grpc++ ${ARROW_PROTOBUF_LIBPROTOBUF}) +diff --git a/cpp/src/arrow/memory_pool.cc b/cpp/src/arrow/memory_pool.cc +index 2fab6f382..1f8f8964b 100644 +--- a/cpp/src/arrow/memory_pool.cc ++++ b/cpp/src/arrow/memory_pool.cc +@@ -52,7 +52,7 @@ + // Needed to support jemalloc 3 and 4 + #define JEMALLOC_MANGLE + // Explicitly link to our version of jemalloc +-#include "jemalloc_ep/dist/include/jemalloc/jemalloc.h" ++#include "jemalloc/jemalloc.h" + #endif + + #ifdef ARROW_MIMALLOC +diff --git a/cpp/src/gandiva/CMakeLists.txt b/cpp/src/gandiva/CMakeLists.txt +index 71faf9a38..3aabea18b 100644 +--- a/cpp/src/gandiva/CMakeLists.txt ++++ b/cpp/src/gandiva/CMakeLists.txt +@@ -25,7 +25,7 @@ add_custom_target(gandiva-benchmarks) + + add_dependencies(gandiva-all gandiva gandiva-tests gandiva-benchmarks) + +-find_package(LLVMAlt REQUIRED) ++find_package(LLVM REQUIRED) + + if(LLVM_VERSION_MAJOR LESS "10") + set(GANDIVA_CXX_STANDARD ${CMAKE_CXX_STANDARD}) +@@ -40,7 +40,7 @@ endif() + + add_definitions(-DGANDIVA_LLVM_VERSION=${LLVM_VERSION_MAJOR}) + +-find_package(OpenSSLAlt REQUIRED) ++find_package(OpenSSL REQUIRED) + + # Set the path where the bitcode file generated, see precompiled/CMakeLists.txt + set(GANDIVA_PRECOMPILED_BC_PATH "${CMAKE_CURRENT_BINARY_DIR}/irhelpers.bc") +@@ -98,10 +98,11 @@ set(SRC_FILES + random_generator_holder.cc + ${GANDIVA_PRECOMPILED_CC_PATH}) + +-set(GANDIVA_SHARED_PRIVATE_LINK_LIBS arrow_shared LLVM::LLVM_INTERFACE +- ${GANDIVA_OPENSSL_LIBS}) ++set(GANDIVA_SHARED_PRIVATE_LINK_LIBS arrow_shared llvm-core::llvm-core NTERFACE ++ ${GANDIVA_OPENSSL_LIBS}) ++ ++set(GANDIVA_STATIC_LINK_LIBS arrow_static llvm-core::llvm-core ${GANDIVA_OPENSSL_LIBS}) + +-set(GANDIVA_STATIC_LINK_LIBS arrow_static LLVM::LLVM_INTERFACE ${GANDIVA_OPENSSL_LIBS}) + + if(ARROW_GANDIVA_STATIC_LIBSTDCPP AND (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX + )) +@@ -139,7 +140,7 @@ add_arrow_lib(gandiva + arrow_dependencies + precompiled + EXTRA_INCLUDES +- $ ++ $ + ${GANDIVA_OPENSSL_INCLUDE_DIR} + ${UTF8PROC_INCLUDE_DIR} + SHARED_LINK_FLAGS diff --git a/recipes/arrow/all/patches/8.0.0-0004-fix-msvc-build.patch b/recipes/arrow/all/patches/8.0.0-0004-fix-msvc-build.patch new file mode 100644 index 0000000000000..8a74b6c36b662 --- /dev/null +++ b/recipes/arrow/all/patches/8.0.0-0004-fix-msvc-build.patch @@ -0,0 +1,395 @@ +From 642d5f26f71e88976b4e10c4aa23084c927c2fa7 Mon Sep 17 00:00:00 2001 +From: Will Jones +Date: Mon, 13 Jun 2022 15:09:36 +0200 +Subject: [PATCH] ARROW-15415: [C++] Fixes for MSVC + vcpkg Debug build + (#13108) + +These are the changes needed for me to be able to compile Arrow in MSCV (from Visual Studio 2022) with the following CMakeUserPresets entry: + +```json +{ + "name": "user-cpp-debug-mscv", + "inherits": [ "ninja-debug"], + "cacheVariables": { + "ARROW_DEPENDENCY_SOURCE": "VCPKG", + "CMAKE_BUILD_TYPE": "Debug", + "VCPKG_TARGET_TRIPLET": "x64-windows", + "VCPKG_LIBRARY_LINKAGE": "dynamic", + "ARROW_DEPENDENCY_USE_SHARED": "ON", + "ARROW_BUILD_EXAMPLES": "ON" + } +} +``` + +Authored-by: Will Jones +Signed-off-by: David Li +(cherry picked from commit a53f2bda5dfa50f2d1dbfd9d7fbc98d8c9725564) +--- + cpp/cmake_modules/FindThrift.cmake | 12 +++- + cpp/src/arrow/compute/exec/exec_plan.cc | 6 +- + cpp/src/arrow/compute/exec/hash_join.cc | 1 + + cpp/src/arrow/compute/exec/hash_join.h | 2 +- + cpp/src/arrow/compute/exec/hash_join_node.cc | 1 + + cpp/src/arrow/compute/function.cc | 1 + + cpp/src/arrow/compute/light_array_test.cc | 1 + + cpp/src/arrow/util/tracing.cc | 18 +++-- + cpp/src/arrow/util/tracing.h | 44 +++--------- + cpp/src/arrow/util/tracing_internal.cc | 30 +++++++- + cpp/src/arrow/util/tracing_internal.h | 75 ++++++++++++-------- + 11 files changed, 107 insertions(+), 84 deletions(-) + +diff --git a/cpp/cmake_modules/FindThrift.cmake b/cpp/cmake_modules/FindThrift.cmake +index 750d8ce83..dd54fd10f 100644 +--- a/cpp/cmake_modules/FindThrift.cmake ++++ b/cpp/cmake_modules/FindThrift.cmake +@@ -46,9 +46,17 @@ endfunction(EXTRACT_THRIFT_VERSION) + if(MSVC_TOOLCHAIN AND NOT DEFINED THRIFT_MSVC_LIB_SUFFIX) + if(NOT ARROW_THRIFT_USE_SHARED) + if(ARROW_USE_STATIC_CRT) +- set(THRIFT_MSVC_LIB_SUFFIX "mt") ++ if("${CMAKE_BUILD_TYPE}" STREQUAL "DEBUG") ++ set(THRIFT_MSVC_LIB_SUFFIX "mtd") ++ else() ++ set(THRIFT_MSVC_LIB_SUFFIX "mt") ++ endif() + else() +- set(THRIFT_MSVC_LIB_SUFFIX "md") ++ if("${CMAKE_BUILD_TYPE}" STREQUAL "DEBUG") ++ set(THRIFT_MSVC_LIB_SUFFIX "mdd") ++ else() ++ set(THRIFT_MSVC_LIB_SUFFIX "md") ++ endif() + endif() + endif() + endif() +diff --git a/cpp/src/arrow/compute/exec/exec_plan.cc b/cpp/src/arrow/compute/exec/exec_plan.cc +index b7a9c7e1b..e1f90084d 100644 +--- a/cpp/src/arrow/compute/exec/exec_plan.cc ++++ b/cpp/src/arrow/compute/exec/exec_plan.cc +@@ -85,9 +85,11 @@ struct ExecPlanImpl : public ExecPlan { + #ifdef ARROW_WITH_OPENTELEMETRY + if (HasMetadata()) { + auto pairs = metadata().get()->sorted_pairs(); ++ opentelemetry::nostd::shared_ptr span = ++ ::arrow::internal::tracing::UnwrapSpan(span_.details.get()); + std::for_each(std::begin(pairs), std::end(pairs), +- [this](std::pair const& pair) { +- span_.Get().span->SetAttribute(pair.first, pair.second); ++ [span](std::pair const& pair) { ++ span->SetAttribute(pair.first, pair.second); + }); + } + #endif +diff --git a/cpp/src/arrow/compute/exec/hash_join.cc b/cpp/src/arrow/compute/exec/hash_join.cc +index 3207bb969..4efe865b9 100644 +--- a/cpp/src/arrow/compute/exec/hash_join.cc ++++ b/cpp/src/arrow/compute/exec/hash_join.cc +@@ -28,6 +28,7 @@ + #include "arrow/compute/exec/hash_join_dict.h" + #include "arrow/compute/exec/task_util.h" + #include "arrow/compute/kernels/row_encoder.h" ++#include "arrow/util/tracing_internal.h" + + namespace arrow { + namespace compute { +diff --git a/cpp/src/arrow/compute/exec/hash_join.h b/cpp/src/arrow/compute/exec/hash_join.h +index 12455f0c6..10819fb9c 100644 +--- a/cpp/src/arrow/compute/exec/hash_join.h ++++ b/cpp/src/arrow/compute/exec/hash_join.h +@@ -27,7 +27,7 @@ + #include "arrow/result.h" + #include "arrow/status.h" + #include "arrow/type.h" +-#include "arrow/util/tracing_internal.h" ++#include "arrow/util/tracing.h" + + namespace arrow { + namespace compute { +diff --git a/cpp/src/arrow/compute/exec/hash_join_node.cc b/cpp/src/arrow/compute/exec/hash_join_node.cc +index 0282e387c..c9e2c2929 100644 +--- a/cpp/src/arrow/compute/exec/hash_join_node.cc ++++ b/cpp/src/arrow/compute/exec/hash_join_node.cc +@@ -27,6 +27,7 @@ + #include "arrow/util/future.h" + #include "arrow/util/make_unique.h" + #include "arrow/util/thread_pool.h" ++#include "arrow/util/tracing_internal.h" + + namespace arrow { + +diff --git a/cpp/src/arrow/compute/function.cc b/cpp/src/arrow/compute/function.cc +index 1c18243f5..a4fd510d2 100644 +--- a/cpp/src/arrow/compute/function.cc ++++ b/cpp/src/arrow/compute/function.cc +@@ -215,6 +215,7 @@ Result Function::Execute(const std::vector& args, + } + + util::tracing::Span span; ++ + START_COMPUTE_SPAN(span, name(), + {{"function.name", name()}, + {"function.options", options ? options->ToString() : ""}, +diff --git a/cpp/src/arrow/compute/light_array_test.cc b/cpp/src/arrow/compute/light_array_test.cc +index 3f6d47803..dcc7841a0 100644 +--- a/cpp/src/arrow/compute/light_array_test.cc ++++ b/cpp/src/arrow/compute/light_array_test.cc +@@ -18,6 +18,7 @@ + #include "arrow/compute/light_array.h" + + #include ++#include + + #include "arrow/compute/exec/test_util.h" + #include "arrow/testing/generator.h" +diff --git a/cpp/src/arrow/util/tracing.cc b/cpp/src/arrow/util/tracing.cc +index b8bddcd50..8bf21f688 100644 +--- a/cpp/src/arrow/util/tracing.cc ++++ b/cpp/src/arrow/util/tracing.cc +@@ -16,30 +16,28 @@ + // under the License. + + #include "arrow/util/tracing.h" ++ ++#include "arrow/util/config.h" + #include "arrow/util/make_unique.h" + #include "arrow/util/tracing_internal.h" + + namespace arrow { ++ ++using internal::make_unique; + namespace util { + namespace tracing { + + #ifdef ARROW_WITH_OPENTELEMETRY + +-Span::Impl& Span::Set(const Impl& impl) { +- inner_impl.reset(new Impl(impl)); +- return *inner_impl; +-} ++Span::Span() noexcept { details = make_unique<::arrow::internal::tracing::SpanImpl>(); } + +-Span::Impl& Span::Set(Impl&& impl) { +- inner_impl.reset(new Impl(std::move(impl))); +- return *inner_impl; ++#else ++ ++Span::Span() noexcept { /* details is left a nullptr */ + } + + #endif + +-// Default destructor when impl type is complete. +-Span::~Span() = default; +- + } // namespace tracing + } // namespace util + } // namespace arrow +diff --git a/cpp/src/arrow/util/tracing.h b/cpp/src/arrow/util/tracing.h +index 15f7fca1e..c6968219b 100644 +--- a/cpp/src/arrow/util/tracing.h ++++ b/cpp/src/arrow/util/tracing.h +@@ -19,49 +19,21 @@ + + #include + +-#include "arrow/util/logging.h" ++#include "arrow/util/visibility.h" + + namespace arrow { +- +-namespace internal { +-namespace tracing { +- +-// Forward declaration SpanImpl. +-class SpanImpl; +- +-} // namespace tracing +-} // namespace internal +- + namespace util { + namespace tracing { + +-class ARROW_EXPORT Span { ++class ARROW_EXPORT SpanDetails { + public: +- using Impl = arrow::internal::tracing::SpanImpl; +- +- Span() = default; // Default constructor. The inner_impl is a nullptr. +- ~Span(); // Destructor. Default destructor defined in tracing.cc where impl is a +- // complete type. +- +- Impl& Set(const Impl&); +- Impl& Set(Impl&&); +- +- const Impl& Get() const { +- ARROW_CHECK(inner_impl) +- << "Attempted to dereference a null pointer. Use Span::Set before " +- "dereferencing."; +- return *inner_impl; +- } +- +- Impl& Get() { +- ARROW_CHECK(inner_impl) +- << "Attempted to dereference a null pointer. Use Span::Set before " +- "dereferencing."; +- return *inner_impl; +- } ++ virtual ~SpanDetails() {} ++}; + +- private: +- std::unique_ptr inner_impl; ++class ARROW_EXPORT Span { ++ public: ++ Span() noexcept; ++ std::unique_ptr details; + }; + + } // namespace tracing +diff --git a/cpp/src/arrow/util/tracing_internal.cc b/cpp/src/arrow/util/tracing_internal.cc +index 904a1fd76..668a2aaba 100644 +--- a/cpp/src/arrow/util/tracing_internal.cc ++++ b/cpp/src/arrow/util/tracing_internal.cc +@@ -202,14 +202,38 @@ opentelemetry::trace::Tracer* GetTracer() { + return tracer.get(); + } + +-#ifdef ARROW_WITH_OPENTELEMETRY ++opentelemetry::nostd::shared_ptr& UnwrapSpan( ++ ::arrow::util::tracing::SpanDetails* span) { ++ SpanImpl* span_impl = checked_cast(span); ++ ARROW_CHECK(span_impl->ot_span) ++ << "Attempted to dereference a null pointer. Use Span::Set before " ++ "dereferencing."; ++ return span_impl->ot_span; ++} ++ ++const opentelemetry::nostd::shared_ptr& UnwrapSpan( ++ const ::arrow::util::tracing::SpanDetails* span) { ++ const SpanImpl* span_impl = checked_cast(span); ++ ARROW_CHECK(span_impl->ot_span) ++ << "Attempted to dereference a null pointer. Use Span::Set before " ++ "dereferencing."; ++ return span_impl->ot_span; ++} ++ ++opentelemetry::nostd::shared_ptr& RewrapSpan( ++ ::arrow::util::tracing::SpanDetails* span, ++ opentelemetry::nostd::shared_ptr ot_span) { ++ SpanImpl* span_impl = checked_cast(span); ++ span_impl->ot_span = std::move(ot_span); ++ return span_impl->ot_span; ++} ++ + opentelemetry::trace::StartSpanOptions SpanOptionsWithParent( + const util::tracing::Span& parent_span) { + opentelemetry::trace::StartSpanOptions options; +- options.parent = parent_span.Get().span->GetContext(); ++ options.parent = UnwrapSpan(parent_span.details.get())->GetContext(); + return options; + } +-#endif + + } // namespace tracing + } // namespace internal +diff --git a/cpp/src/arrow/util/tracing_internal.h b/cpp/src/arrow/util/tracing_internal.h +index d0d6062e6..2898fd245 100644 +--- a/cpp/src/arrow/util/tracing_internal.h ++++ b/cpp/src/arrow/util/tracing_internal.h +@@ -106,48 +106,63 @@ AsyncGenerator PropagateSpanThroughAsyncGenerator(AsyncGenerator wrapped) + return PropagateSpanThroughAsyncGenerator(std::move(wrapped), std::move(span)); + } + +-class SpanImpl { ++class SpanImpl : public ::arrow::util::tracing::SpanDetails { + public: +- opentelemetry::nostd::shared_ptr span; ++ ~SpanImpl() override = default; ++ opentelemetry::nostd::shared_ptr ot_span; + }; + ++opentelemetry::nostd::shared_ptr& UnwrapSpan( ++ ::arrow::util::tracing::SpanDetails* span); ++ ++const opentelemetry::nostd::shared_ptr& UnwrapSpan( ++ const ::arrow::util::tracing::SpanDetails* span); ++ ++opentelemetry::nostd::shared_ptr& RewrapSpan( ++ ::arrow::util::tracing::SpanDetails* span, ++ opentelemetry::nostd::shared_ptr ot_span); ++ + opentelemetry::trace::StartSpanOptions SpanOptionsWithParent( + const util::tracing::Span& parent_span); + +-#define START_SPAN(target_span, ...) \ +- auto opentelemetry_scope##__LINE__ = \ +- ::arrow::internal::tracing::GetTracer()->WithActiveSpan( \ +- target_span \ +- .Set(::arrow::util::tracing::Span::Impl{ \ +- ::arrow::internal::tracing::GetTracer()->StartSpan(__VA_ARGS__)}) \ +- .span) +- +-#define START_SPAN_WITH_PARENT(target_span, parent_span, ...) \ +- auto opentelemetry_scope##__LINE__ = \ +- ::arrow::internal::tracing::GetTracer()->WithActiveSpan( \ +- target_span \ +- .Set(::arrow::util::tracing::Span::Impl{ \ +- ::arrow::internal::tracing::GetTracer()->StartSpan( \ +- __VA_ARGS__, \ +- ::arrow::internal::tracing::SpanOptionsWithParent(parent_span))}) \ +- .span) +- +-#define START_COMPUTE_SPAN(target_span, ...) \ +- START_SPAN(target_span, __VA_ARGS__); \ +- target_span.Get().span->SetAttribute( \ +- "arrow.memory_pool_bytes", ::arrow::default_memory_pool()->bytes_allocated()) ++#define START_SPAN(target_span, ...) \ ++ auto opentelemetry_scope##__LINE__ = \ ++ ::arrow::internal::tracing::GetTracer()->WithActiveSpan( \ ++ ::arrow::internal::tracing::RewrapSpan( \ ++ target_span.details.get(), \ ++ ::arrow::internal::tracing::GetTracer()->StartSpan(__VA_ARGS__))) ++ ++#define START_SPAN_WITH_PARENT(target_span, parent_span, ...) \ ++ auto opentelemetry_scope##__LINE__ = \ ++ ::arrow::internal::tracing::GetTracer()->WithActiveSpan( \ ++ ::arrow::internal::tracing::RewrapSpan( \ ++ target_span.details.get(), \ ++ \ ++ ::arrow::internal::tracing::GetTracer()->StartSpan( \ ++ __VA_ARGS__, \ ++ ::arrow::internal::tracing::SpanOptionsWithParent(parent_span)))) ++ ++#define START_COMPUTE_SPAN(target_span, ...) \ ++ START_SPAN(target_span, __VA_ARGS__); \ ++ ::arrow::internal::tracing::UnwrapSpan(target_span.details.get()) \ ++ ->SetAttribute("arrow.memory_pool_bytes", \ ++ ::arrow::default_memory_pool()->bytes_allocated()) + + #define START_COMPUTE_SPAN_WITH_PARENT(target_span, parent_span, ...) \ + START_SPAN_WITH_PARENT(target_span, parent_span, __VA_ARGS__); \ +- target_span.Get().span->SetAttribute( \ +- "arrow.memory_pool_bytes", ::arrow::default_memory_pool()->bytes_allocated()) ++ ::arrow::internal::tracing::UnwrapSpan(target_span.details.get()) \ ++ ->SetAttribute("arrow.memory_pool_bytes", \ ++ ::arrow::default_memory_pool()->bytes_allocated()) + +-#define EVENT(target_span, ...) target_span.Get().span->AddEvent(__VA_ARGS__) ++#define EVENT(target_span, ...) \ ++ ::arrow::internal::tracing::UnwrapSpan(target_span.details.get())->AddEvent(__VA_ARGS__) + +-#define MARK_SPAN(target_span, status) \ +- ::arrow::internal::tracing::MarkSpan(status, target_span.Get().span.get()) ++#define MARK_SPAN(target_span, status) \ ++ ::arrow::internal::tracing::MarkSpan( \ ++ status, ::arrow::internal::tracing::UnwrapSpan(target_span.details.get()).get()) + +-#define END_SPAN(target_span) target_span.Get().span->End() ++#define END_SPAN(target_span) \ ++ ::arrow::internal::tracing::UnwrapSpan(target_span.details.get())->End() + + #define END_SPAN_ON_FUTURE_COMPLETION(target_span, target_future, target_capture) \ + target_future = target_future.Then( \ +-- +2.45.0 + diff --git a/recipes/arrow/all/patches/8.0.0-0005-install-utils.patch b/recipes/arrow/all/patches/8.0.0-0005-install-utils.patch deleted file mode 100644 index 397c4b1d043c7..0000000000000 --- a/recipes/arrow/all/patches/8.0.0-0005-install-utils.patch +++ /dev/null @@ -1,43 +0,0 @@ -diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt -index aba18c8..bb463d0 100644 ---- a/cpp/CMakeLists.txt -+++ b/cpp/CMakeLists.txt -@@ -721,7 +721,7 @@ if(ARROW_WITH_BZ2) - endif() - - if(ARROW_WITH_LZ4) -- list(APPEND ARROW_STATIC_LINK_LIBS LZ4::lz4) -+ list(APPEND ARROW_STATIC_LINK_LIBS lz4::lz4) - if(Lz4_SOURCE STREQUAL "SYSTEM") - list(APPEND ARROW_STATIC_INSTALL_INTERFACE_LIBS LZ4::lz4) - endif() -@@ -907,8 +907,8 @@ endif() - if(ARROW_JEMALLOC) - add_definitions(-DARROW_JEMALLOC) - add_definitions(-DARROW_JEMALLOC_INCLUDE_DIR=${JEMALLOC_INCLUDE_DIR}) -- list(APPEND ARROW_LINK_LIBS jemalloc::jemalloc) -- list(APPEND ARROW_STATIC_LINK_LIBS jemalloc::jemalloc) -+ list(APPEND ARROW_LINK_LIBS jemalloc) -+ list(APPEND ARROW_STATIC_LINK_LIBS jemalloc) - endif() - - if(ARROW_MIMALLOC) -diff --git a/cpp/src/arrow/ipc/CMakeLists.txt b/cpp/src/arrow/ipc/CMakeLists.txt -index 495018e..3dcb35d 100644 ---- a/cpp/src/arrow/ipc/CMakeLists.txt -+++ b/cpp/src/arrow/ipc/CMakeLists.txt -@@ -61,9 +61,13 @@ endif() - if(ARROW_BUILD_UTILITIES OR ARROW_BUILD_INTEGRATION) - add_executable(arrow-file-to-stream file_to_stream.cc) - target_link_libraries(arrow-file-to-stream ${ARROW_UTIL_LIB}) -+ install(TARGETS arrow-file-to-stream ${INSTALL_IS_OPTIONAL} -+ DESTINATION ${CMAKE_INSTALL_BINDIR}) - add_executable(arrow-stream-to-file stream_to_file.cc) - target_link_libraries(arrow-stream-to-file ${ARROW_UTIL_LIB}) -- -+ install(TARGETS arrow-stream-to-file ${INSTALL_IS_OPTIONAL} -+ DESTINATION ${CMAKE_INSTALL_BINDIR}) -+ - if(ARROW_BUILD_INTEGRATION) - add_dependencies(arrow-integration arrow-file-to-stream) - add_dependencies(arrow-integration arrow-stream-to-file) diff --git a/recipes/arrow/all/patches/8.0.0-0006-fix-cmake.patch b/recipes/arrow/all/patches/8.0.0-0006-fix-cmake.patch deleted file mode 100644 index eb60d6e795ad5..0000000000000 --- a/recipes/arrow/all/patches/8.0.0-0006-fix-cmake.patch +++ /dev/null @@ -1,425 +0,0 @@ -diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt -index bb463d0..ce2d1df 100644 ---- a/cpp/CMakeLists.txt -+++ b/cpp/CMakeLists.txt -@@ -705,7 +705,7 @@ endif() - - if(ARROW_WITH_BROTLI) - # Order is important for static linking -- set(ARROW_BROTLI_LIBS Brotli::brotlienc Brotli::brotlidec Brotli::brotlicommon) -+ set(ARROW_BROTLI_LIBS brotli::brotlienc brotli::brotlidec brotli::brotlicommon) - list(APPEND ARROW_LINK_LIBS ${ARROW_BROTLI_LIBS}) - list(APPEND ARROW_STATIC_LINK_LIBS ${ARROW_BROTLI_LIBS}) - if(Brotli_SOURCE STREQUAL "SYSTEM") -@@ -721,11 +721,18 @@ if(ARROW_WITH_BZ2) - endif() - - if(ARROW_WITH_LZ4) -- list(APPEND ARROW_STATIC_LINK_LIBS lz4::lz4) -- if(Lz4_SOURCE STREQUAL "SYSTEM") -- list(APPEND ARROW_STATIC_INSTALL_INTERFACE_LIBS LZ4::lz4) -+ if (TARGET LZ4::lz4_static) -+ list(APPEND ARROW_STATIC_LINK_LIBS LZ4::lz4_static) -+ if(Lz4_SOURCE STREQUAL "SYSTEM") -+ list(APPEND ARROW_STATIC_INSTALL_INTERFACE_LIBS LZ4::lz4_static) -+ endif() -+ else() -+ list(APPEND ARROW_STATIC_LINK_LIBS LZ4::lz4_shared) -+ if(Lz4_SOURCE STREQUAL "SYSTEM") -+ list(APPEND ARROW_STATIC_INSTALL_INTERFACE_LIBS LZ4::lz4_shared) - endif() - endif() -+endif() - - if(ARROW_WITH_SNAPPY) - list(APPEND ARROW_STATIC_LINK_LIBS Snappy::snappy) -@@ -913,8 +920,13 @@ endif() - - if(ARROW_MIMALLOC) - add_definitions(-DARROW_MIMALLOC) -- list(APPEND ARROW_LINK_LIBS mimalloc::mimalloc) -- list(APPEND ARROW_STATIC_LINK_LIBS mimalloc::mimalloc) -+ if (TARGET mimalloc-static) -+ list(APPEND ARROW_LINK_LIBS mimalloc-static) -+ list(APPEND ARROW_STATIC_LINK_LIBS mimalloc-static) -+ else() -+ list(APPEND ARROW_LINK_LIBS mimalloc) -+ list(APPEND ARROW_STATIC_LINK_LIBS mimalloc) -+ endif() - endif() - - # ---------------------------------------------------------------------- -diff --git a/cpp/cmake_modules/ThirdpartyToolchain.cmake b/cpp/cmake_modules/ThirdpartyToolchain.cmake -index f070323..16faf73 100644 ---- a/cpp/cmake_modules/ThirdpartyToolchain.cmake -+++ b/cpp/cmake_modules/ThirdpartyToolchain.cmake -@@ -959,6 +959,7 @@ endif() - # - Tests need Boost at runtime. - # - S3FS and Flight benchmarks need Boost at runtime. - if(ARROW_BUILD_INTEGRATION -+ OR ARROW_BOOST_REQUIRED - OR ARROW_BUILD_TESTS - OR (ARROW_FLIGHT AND ARROW_BUILD_BENCHMARKS) - OR (ARROW_S3 AND ARROW_BUILD_BENCHMARKS)) -@@ -975,7 +976,7 @@ endif() - - if(ARROW_BOOST_REQUIRED) - resolve_dependency(Boost -- HAVE_ALT -+ USE_CONFIG - TRUE - REQUIRED_VERSION - ${ARROW_BOOST_REQUIRED_VERSION} -@@ -986,7 +987,7 @@ if(ARROW_BOOST_REQUIRED) - if(TARGET Boost::system) - set(BOOST_SYSTEM_LIBRARY Boost::system) - set(BOOST_FILESYSTEM_LIBRARY Boost::filesystem) -- elseif(BoostAlt_FOUND) -+ elseif(Boost_FOUND) - set(BOOST_SYSTEM_LIBRARY ${Boost_SYSTEM_LIBRARY}) - set(BOOST_FILESYSTEM_LIBRARY ${Boost_FILESYSTEM_LIBRARY}) - else() -@@ -1129,9 +1130,9 @@ macro(build_brotli) - endmacro() - - if(ARROW_WITH_BROTLI) -- resolve_dependency(Brotli PC_PACKAGE_NAMES libbrotlidec libbrotlienc) -+ resolve_dependency(brotli PC_PACKAGE_NAMES libbrotlidec libbrotlienc) - # TODO: Don't use global includes but rather target_include_directories -- get_target_property(BROTLI_INCLUDE_DIR Brotli::brotlicommon -+ get_target_property(BROTLI_INCLUDE_DIR brotli::brotlicommon - INTERFACE_INCLUDE_DIRECTORIES) - include_directories(SYSTEM ${BROTLI_INCLUDE_DIR}) - endif() -@@ -1323,22 +1324,16 @@ endmacro() - if(ARROW_NEED_GFLAGS) - set(ARROW_GFLAGS_REQUIRED_VERSION "2.1.0") - resolve_dependency(gflags -- HAVE_ALT -+ USE_CONFIG - TRUE - REQUIRED_VERSION - ${ARROW_GFLAGS_REQUIRED_VERSION} - IS_RUNTIME_DEPENDENCY - FALSE) - # TODO: Don't use global includes but rather target_include_directories -- include_directories(SYSTEM ${GFLAGS_INCLUDE_DIR}) -- -- if(NOT TARGET ${GFLAGS_LIBRARIES}) -- if(TARGET gflags-shared) -- set(GFLAGS_LIBRARIES gflags-shared) -- elseif(TARGET gflags_shared) -- set(GFLAGS_LIBRARIES gflags_shared) -- endif() -- endif() -+ include_directories(SYSTEM ${gflags_INCLUDE_DIR}) -+ list(APPEND ARROW_BUNDLED_STATIC_LIBS ${gflags_LIBRARIES_TARGETS}) -+ set(GFLAGS_LIBRARIES gflags::gflags) - endif() - - # ---------------------------------------------------------------------- -@@ -1432,9 +1427,9 @@ if(ARROW_WITH_THRIFT) - thrift) - endif() - # TODO: Don't use global includes but rather target_include_directories -- include_directories(SYSTEM ${THRIFT_INCLUDE_DIR}) -+ include_directories(SYSTEM ${Thrift_INCLUDE_DIR}) - -- string(REPLACE "." ";" VERSION_LIST ${THRIFT_VERSION}) -+ string(REPLACE "." ";" VERSION_LIST ${Thrift_VERSION}) - list(GET VERSION_LIST 0 THRIFT_VERSION_MAJOR) - list(GET VERSION_LIST 1 THRIFT_VERSION_MINOR) - list(GET VERSION_LIST 2 THRIFT_VERSION_PATCH) -@@ -1557,6 +1552,7 @@ if(ARROW_WITH_PROTOBUF) - set(ARROW_PROTOBUF_REQUIRED_VERSION "2.6.1") - endif() - resolve_dependency(Protobuf -+ USE_CONFIG - REQUIRED_VERSION - ${ARROW_PROTOBUF_REQUIRED_VERSION} - PC_PACKAGE_NAMES -@@ -1567,7 +1563,7 @@ if(ARROW_WITH_PROTOBUF) - endif() - - # TODO: Don't use global includes but rather target_include_directories -- include_directories(SYSTEM ${PROTOBUF_INCLUDE_DIR}) -+ include_directories(SYSTEM ${protobuf_INCLUDE_DIR}) - - if(TARGET arrow::protobuf::libprotobuf) - set(ARROW_PROTOBUF_LIBPROTOBUF arrow::protobuf::libprotobuf) -@@ -1576,9 +1572,9 @@ if(ARROW_WITH_PROTOBUF) - if(NOT TARGET protobuf::libprotobuf) - add_library(protobuf::libprotobuf UNKNOWN IMPORTED) - set_target_properties(protobuf::libprotobuf -- PROPERTIES IMPORTED_LOCATION "${PROTOBUF_LIBRARY}" -+ PROPERTIES IMPORTED_LOCATION "${Protobuf_LIBRARY}" - INTERFACE_INCLUDE_DIRECTORIES -- "${PROTOBUF_INCLUDE_DIR}") -+ "${Protobuf_INCLUDE_DIR}") - endif() - set(ARROW_PROTOBUF_LIBPROTOBUF protobuf::libprotobuf) - endif() -@@ -1598,7 +1594,7 @@ if(ARROW_WITH_PROTOBUF) - set_target_properties(protobuf::libprotoc - PROPERTIES IMPORTED_LOCATION "${Protobuf_PROTOC_LIBRARY}" - INTERFACE_INCLUDE_DIRECTORIES -- "${PROTOBUF_INCLUDE_DIR}") -+ "${Protobuf_INCLUDE_DIR}") - endif() - set(ARROW_PROTOBUF_LIBPROTOC protobuf::libprotoc) - endif() -@@ -1690,11 +1686,12 @@ macro(build_substrait) - - add_custom_target(substrait_gen ALL DEPENDS ${SUBSTRAIT_PROTO_GEN_ALL}) - -- set(SUBSTRAIT_INCLUDES ${SUBSTRAIT_CPP_DIR} ${PROTOBUF_INCLUDE_DIR}) -+ set(SUBSTRAIT_INCLUDES ${SUBSTRAIT_CPP_DIR} ${protobuf_INCLUDE_DIR}) - - add_library(substrait STATIC ${SUBSTRAIT_SOURCES}) - set_target_properties(substrait PROPERTIES POSITION_INDEPENDENT_CODE ON) - target_include_directories(substrait PUBLIC ${SUBSTRAIT_INCLUDES}) -+ target_include_directories(substrait PUBLIC ${PROTOBUF_INCLUDE_DIR}) - target_link_libraries(substrait INTERFACE ${ARROW_PROTOBUF_LIBPROTOBUF}) - add_dependencies(substrait substrait_gen) - -@@ -1711,6 +1708,7 @@ endif() - # jemalloc - Unix-only high-performance allocator - - if(ARROW_JEMALLOC) -+if(0) - message(STATUS "Building (vendored) jemalloc from source") - # We only use a vendored jemalloc as we want to control its version. - # Also our build of jemalloc is specially prefixed so that it will not -@@ -1780,12 +1778,18 @@ if(ARROW_JEMALLOC) - add_dependencies(jemalloc::jemalloc jemalloc_ep) - - list(APPEND ARROW_BUNDLED_STATIC_LIBS jemalloc::jemalloc) -+else() -+ find_package(jemalloc REQUIRED CONFIG) -+ include_directories(SYSTEM "${jemalloc_INCLUDE_DIR}") -+ list(APPEND ARROW_BUNDLED_STATIC_LIBS ${jemalloc_LIBRARIES_TARGETS}) -+endif() - endif() - - # ---------------------------------------------------------------------- - # mimalloc - Cross-platform high-performance allocator, from Microsoft - - if(ARROW_MIMALLOC) -+if(0) - message(STATUS "Building (vendored) mimalloc from source") - # We only use a vendored mimalloc as we want to control its build options. - -@@ -1836,6 +1840,11 @@ if(ARROW_MIMALLOC) - add_dependencies(toolchain mimalloc_ep) - - list(APPEND ARROW_BUNDLED_STATIC_LIBS mimalloc::mimalloc) -+else() -+ find_package(mimalloc REQUIRED CONFIG) -+ include_directories(SYSTEM "${mimalloc_INCLUDE_DIR}") -+ list(APPEND ARROW_BUNDLED_STATIC_LIBS ${mimalloc_LIBRARIES_TARGETS} ) -+endif() - endif() - - # ---------------------------------------------------------------------- -@@ -2121,7 +2130,7 @@ endmacro() - if(ARROW_WITH_RAPIDJSON) - set(ARROW_RAPIDJSON_REQUIRED_VERSION "1.1.0") - resolve_dependency(RapidJSON -- HAVE_ALT -+ USE_CONFIG - TRUE - REQUIRED_VERSION - ${ARROW_RAPIDJSON_REQUIRED_VERSION} -@@ -2158,10 +2167,10 @@ endmacro() - - if((NOT ARROW_SIMD_LEVEL STREQUAL "NONE") OR (NOT ARROW_RUNTIME_SIMD_LEVEL STREQUAL "NONE" - )) -- set(xsimd_SOURCE "BUNDLED") -+ set(xsimd_SOURCE "SYSTEM") - resolve_dependency(xsimd) - # TODO: Don't use global includes but rather target_include_directories -- include_directories(SYSTEM ${XSIMD_INCLUDE_DIR}) -+ include_directories(SYSTEM ${xsimd_INCLUDE_DIR}) - endif() - - macro(build_zlib) -@@ -2260,10 +2269,14 @@ macro(build_lz4) - endmacro() - - if(ARROW_WITH_LZ4) -- resolve_dependency(Lz4 PC_PACKAGE_NAMES liblz4) -+ resolve_dependency(Lz4) - - # TODO: Don't use global includes but rather target_include_directories -- get_target_property(LZ4_INCLUDE_DIR LZ4::lz4 INTERFACE_INCLUDE_DIRECTORIES) -+ if (TARGET LZ4::lz4_static) -+ get_target_property(LZ4_INCLUDE_DIR LZ4::lz4_static INTERFACE_INCLUDE_DIRECTORIES) -+ else() -+ get_target_property(LZ4_INCLUDE_DIR LZ4::lz4_shared INTERFACE_INCLUDE_DIRECTORIES) -+ endif() - include_directories(SYSTEM ${LZ4_INCLUDE_DIR}) - endif() - -@@ -2394,7 +2407,7 @@ if(ARROW_WITH_RE2) - # Don't specify "PC_PACKAGE_NAMES re2" here because re2.pc may - # include -std=c++11. It's not compatible with C source and C++ - # source not uses C++ 11. -- resolve_dependency(re2 HAVE_ALT TRUE) -+ resolve_dependency(re2 USE_CONFIG TRUE) - if(${re2_SOURCE} STREQUAL "SYSTEM") - get_target_property(RE2_LIB re2::re2 IMPORTED_LOCATION_${UPPERCASE_BUILD_TYPE}) - if(NOT RE2_LIB) -@@ -2464,7 +2477,7 @@ endmacro() - if(ARROW_WITH_BZ2) - resolve_dependency(BZip2) - if(${BZip2_SOURCE} STREQUAL "SYSTEM") -- string(APPEND ARROW_PC_LIBS_PRIVATE " ${BZIP2_LIBRARIES}") -+ string(APPEND ARROW_PC_LIBS_PRIVATE " ${BZip2_LIBRARIES}") - endif() - - if(NOT TARGET BZip2::BZip2) -@@ -2473,7 +2486,7 @@ if(ARROW_WITH_BZ2) - PROPERTIES IMPORTED_LOCATION "${BZIP2_LIBRARIES}" - INTERFACE_INCLUDE_DIRECTORIES "${BZIP2_INCLUDE_DIR}") - endif() -- include_directories(SYSTEM "${BZIP2_INCLUDE_DIR}") -+ include_directories(SYSTEM "${BZip2_INCLUDE_DIR}") - endif() - - macro(build_utf8proc) -@@ -3709,7 +3722,7 @@ if(ARROW_WITH_GRPC) - set(gRPC_SOURCE "${Protobuf_SOURCE}") - endif() - resolve_dependency(gRPC -- HAVE_ALT -+ USE_CONFIG - TRUE - REQUIRED_VERSION - ${ARROW_GRPC_REQUIRED_VERSION} -@@ -3727,9 +3740,9 @@ if(ARROW_WITH_GRPC) - else() - # grpc++ headers may reside in ${GRPC_INCLUDE_DIR}/grpc++ or ${GRPC_INCLUDE_DIR}/grpcpp - # depending on the gRPC version. -- if(EXISTS "${GRPC_INCLUDE_DIR}/grpcpp/impl/codegen/config_protobuf.h") -+ if(EXISTS ${gRPC_INCLUDE_DIR}/grpcpp/impl/codegen/config_protobuf.h) - set(GRPCPP_PP_INCLUDE TRUE) -- elseif(EXISTS "${GRPC_INCLUDE_DIR}/grpc++/impl/codegen/config_protobuf.h") -+ elseif(EXISTS ${gRPC_INCLUDE_DIR}/grpc++/impl/codegen/config_protobuf.h) - set(GRPCPP_PP_INCLUDE FALSE) - else() - message(FATAL_ERROR "Cannot find grpc++ headers in ${GRPC_INCLUDE_DIR}") -@@ -3937,7 +3950,7 @@ macro(build_google_cloud_cpp_storage) - endmacro() - - if(ARROW_WITH_GOOGLE_CLOUD_CPP) -- resolve_dependency(google_cloud_cpp_storage) -+ resolve_dependency(google_cloud_cpp) - get_target_property(google_cloud_cpp_storage_INCLUDE_DIR google-cloud-cpp::storage - INTERFACE_INCLUDE_DIRECTORIES) - include_directories(SYSTEM ${google_cloud_cpp_storage_INCLUDE_DIR}) -@@ -4264,9 +4277,9 @@ if(ARROW_WITH_OPENTELEMETRY) - # cURL is required whether we build from source or use an existing installation - # (OTel's cmake files do not call find_curl for you) - find_curl() -- set(opentelemetry-cpp_SOURCE "AUTO") -+ set(opentelemetry-cpp_SOURCE "SYSTEM") - resolve_dependency(opentelemetry-cpp) -- get_target_property(OPENTELEMETRY_INCLUDE_DIR opentelemetry-cpp::api -+ get_target_property(OPENTELEMETRY_INCLUDE_DIR opentelemetry-cpp::opentelemetry_common - INTERFACE_INCLUDE_DIRECTORIES) - include_directories(SYSTEM ${OPENTELEMETRY_INCLUDE_DIR}) - message(STATUS "Found OpenTelemetry headers: ${OPENTELEMETRY_INCLUDE_DIR}") -diff --git a/cpp/src/arrow/CMakeLists.txt b/cpp/src/arrow/CMakeLists.txt -index 690c51a..752f3b9 100644 ---- a/cpp/src/arrow/CMakeLists.txt -+++ b/cpp/src/arrow/CMakeLists.txt -@@ -326,10 +326,14 @@ set(ARROW_TESTING_SRCS - - set(_allocator_dependencies "") # Empty list - if(ARROW_JEMALLOC) -- list(APPEND _allocator_dependencies jemalloc_ep) -+ list(APPEND _allocator_dependencies jemalloc::jemalloc) - endif() - if(ARROW_MIMALLOC) -- list(APPEND _allocator_dependencies mimalloc_ep) -+ if (TARGET mimalloc-static) -+ list(APPEND _allocator_dependencies mimalloc-static) -+ else() -+ list(APPEND _allocator_dependencies mimalloc) -+ endif() - endif() - - if(_allocator_dependencies) -diff --git a/cpp/src/arrow/flight/CMakeLists.txt b/cpp/src/arrow/flight/CMakeLists.txt -index f9d1356..c9bcf79 100644 ---- a/cpp/src/arrow/flight/CMakeLists.txt -+++ b/cpp/src/arrow/flight/CMakeLists.txt -@@ -17,6 +17,9 @@ - - add_custom_target(arrow_flight) - -+# TODO: This is a temporary workaround. absl should be LINKED as TARGET. -+include_directories(SYSTEM ${absl_INCLUDE_DIR}) -+ - arrow_install_all_headers("arrow/flight") - - set(ARROW_FLIGHT_LINK_LIBS gRPC::grpc++ ${ARROW_PROTOBUF_LIBPROTOBUF}) -diff --git a/cpp/src/arrow/memory_pool.cc b/cpp/src/arrow/memory_pool.cc -index ed1c2d8..37a89da 100644 ---- a/cpp/src/arrow/memory_pool.cc -+++ b/cpp/src/arrow/memory_pool.cc -@@ -52,7 +52,7 @@ - // Needed to support jemalloc 3 and 4 - #define JEMALLOC_MANGLE - // Explicitly link to our version of jemalloc --#include "jemalloc_ep/dist/include/jemalloc/jemalloc.h" -+#include "jemalloc/jemalloc.h" - #endif - - #ifdef ARROW_MIMALLOC -diff --git a/cpp/src/gandiva/CMakeLists.txt b/cpp/src/gandiva/CMakeLists.txt -index 71faf9a..3aabea1 100644 ---- a/cpp/src/gandiva/CMakeLists.txt -+++ b/cpp/src/gandiva/CMakeLists.txt -@@ -25,7 +25,7 @@ add_custom_target(gandiva-benchmarks) - - add_dependencies(gandiva-all gandiva gandiva-tests gandiva-benchmarks) - --find_package(LLVMAlt REQUIRED) -+find_package(LLVM REQUIRED) - - if(LLVM_VERSION_MAJOR LESS "10") - set(GANDIVA_CXX_STANDARD ${CMAKE_CXX_STANDARD}) -@@ -40,7 +40,7 @@ endif() - - add_definitions(-DGANDIVA_LLVM_VERSION=${LLVM_VERSION_MAJOR}) - --find_package(OpenSSLAlt REQUIRED) -+find_package(OpenSSL REQUIRED) - - # Set the path where the bitcode file generated, see precompiled/CMakeLists.txt - set(GANDIVA_PRECOMPILED_BC_PATH "${CMAKE_CURRENT_BINARY_DIR}/irhelpers.bc") -@@ -98,10 +98,11 @@ set(SRC_FILES - random_generator_holder.cc - ${GANDIVA_PRECOMPILED_CC_PATH}) - --set(GANDIVA_SHARED_PRIVATE_LINK_LIBS arrow_shared LLVM::LLVM_INTERFACE -- ${GANDIVA_OPENSSL_LIBS}) -+set(GANDIVA_SHARED_PRIVATE_LINK_LIBS arrow_shared llvm-core::llvm-core NTERFACE -+ ${GANDIVA_OPENSSL_LIBS}) -+ -+set(GANDIVA_STATIC_LINK_LIBS arrow_static llvm-core::llvm-core ${GANDIVA_OPENSSL_LIBS}) - --set(GANDIVA_STATIC_LINK_LIBS arrow_static LLVM::LLVM_INTERFACE ${GANDIVA_OPENSSL_LIBS}) - - if(ARROW_GANDIVA_STATIC_LIBSTDCPP AND (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX - )) -@@ -139,7 +140,7 @@ add_arrow_lib(gandiva - arrow_dependencies - precompiled - EXTRA_INCLUDES -- $ -+ $ - ${GANDIVA_OPENSSL_INCLUDE_DIR} - ${UTF8PROC_INCLUDE_DIR} - SHARED_LINK_FLAGS diff --git a/recipes/arrow/all/test_package/CMakeLists.txt b/recipes/arrow/all/test_package/CMakeLists.txt index 9b721bbe6a17c..bd890a4dd57e5 100644 --- a/recipes/arrow/all/test_package/CMakeLists.txt +++ b/recipes/arrow/all/test_package/CMakeLists.txt @@ -4,7 +4,13 @@ project(test_package LANGUAGES CXX) find_package(Arrow REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) -target_link_libraries(${PROJECT_NAME} PRIVATE arrow::arrow) + +if (TARGET Arrow::arrow_shared) + target_link_libraries(${PROJECT_NAME} PRIVATE Arrow::arrow_shared) +else() + target_link_libraries(${PROJECT_NAME} PRIVATE Arrow::arrow_static) +endif() + if (${Arrow_VERSION} VERSION_LESS "10.0.0") target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) else() diff --git a/recipes/arrow/config.yml b/recipes/arrow/config.yml index 316731612eda2..6d012719cd8e2 100644 --- a/recipes/arrow/config.yml +++ b/recipes/arrow/config.yml @@ -1,4 +1,10 @@ versions: + "17.0.0": + folder: all + "16.1.0": + folder: all + "16.0.0": + folder: all "15.0.0": folder: all "14.0.2": diff --git a/recipes/artery-font-format/all/conandata.yml b/recipes/artery-font-format/all/conandata.yml index b248576ab34a5..d7128685d341e 100644 --- a/recipes/artery-font-format/all/conandata.yml +++ b/recipes/artery-font-format/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.1": + url: "https://github.com/Chlumsky/artery-font-format/archive/v1.1.tar.gz" + sha256: "cd8eb58590d85069312b831ce5bc6eba21778ef2fa8ca8ac06e1ecf8eca53a7c" "1.0.1": url: "https://github.com/Chlumsky/artery-font-format/archive/v1.0.1.tar.gz" sha256: "23dc9450d2364c9f1a67fcb0ae8f2bef365fabc5a3f4af55d9a646f8fbcdc537" diff --git a/recipes/artery-font-format/all/conanfile.py b/recipes/artery-font-format/all/conanfile.py index 0b2ff0a648da1..ec8583e598e0b 100644 --- a/recipes/artery-font-format/all/conanfile.py +++ b/recipes/artery-font-format/all/conanfile.py @@ -1,4 +1,5 @@ from conan import ConanFile +from conan.tools.build import check_min_cppstd from conan.tools.files import get, copy import os @@ -7,24 +8,29 @@ class ArteryFontFormatConan(ConanFile): name = "artery-font-format" + description = "Artery Atlas Font format library" license = "MIT" - homepage = "https://github.com/Chlumsky/artery-font-format" url = "https://github.com/conan-io/conan-center-index" - description = "Artery Atlas Font format library" - topics = ("artery", "font", "atlas") + homepage = "https://github.com/Chlumsky/artery-font-format" + topics = ("artery", "font", "atlas", "header-only") package_type = "header-library" + settings = "os", "arch", "compiler", "build_type" no_copy_source = True + @property + def _min_cppstd(self): + return 11 + def package_id(self): self.info.clear() + def validate(self): + if self.settings.compiler.get_safe("cppstd"): + check_min_cppstd(self, self._min_cppstd) + def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) - def build(self): - # header only: no build step - pass - def package(self): copy(self, pattern="LICENSE.txt", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) copy( @@ -39,3 +45,7 @@ def package(self): dst=os.path.join(self.package_folder, "include"), src=self.source_folder, ) + + def package_info(self): + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] diff --git a/recipes/artery-font-format/all/test_package/CMakeLists.txt b/recipes/artery-font-format/all/test_package/CMakeLists.txt index 240a8cec38d93..d7b8e200d1115 100644 --- a/recipes/artery-font-format/all/test_package/CMakeLists.txt +++ b/recipes/artery-font-format/all/test_package/CMakeLists.txt @@ -4,5 +4,5 @@ project(test_package LANGUAGES CXX) find_package(artery-font-format REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) -target_link_libraries(${PROJECT_NAME} artery-font-format::artery-font-format) +target_link_libraries(${PROJECT_NAME} PRIVATE artery-font-format::artery-font-format) target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) diff --git a/recipes/artery-font-format/all/test_package/conanfile.py b/recipes/artery-font-format/all/test_package/conanfile.py index 26110ca175735..3a91c9439218e 100644 --- a/recipes/artery-font-format/all/test_package/conanfile.py +++ b/recipes/artery-font-format/all/test_package/conanfile.py @@ -4,7 +4,6 @@ import os -# It will become the standard on Conan 2.x class TestPackageConan(ConanFile): settings = "os", "arch", "compiler", "build_type" generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" @@ -24,5 +23,4 @@ def build(self): def test(self): if can_run(self): bin_path = os.path.join(self.cpp.build.bindir, "test_package") - arfont = os.path.join(self.source_folder, "example.arfont") - self.run(f"{bin_path} {arfont}", env="conanrun") + self.run(bin_path, env="conanrun") diff --git a/recipes/artery-font-format/all/test_package/example.arfont b/recipes/artery-font-format/all/test_package/example.arfont deleted file mode 100644 index a1530434762b6..0000000000000 Binary files a/recipes/artery-font-format/all/test_package/example.arfont and /dev/null differ diff --git a/recipes/artery-font-format/all/test_package/test_package.cpp b/recipes/artery-font-format/all/test_package/test_package.cpp index 8e85c6f96e501..ff1d420aff0b0 100644 --- a/recipes/artery-font-format/all/test_package/test_package.cpp +++ b/recipes/artery-font-format/all/test_package/test_package.cpp @@ -1,32 +1,9 @@ -#include -#include #include #include -#include int main(int argc, char *argv[]) { - if (argc < 2) { - std::cerr << "usage: test_package \n"; - return EXIT_FAILURE; - } - - FILE *const font_file = fopen(argv[1], "rb"); - if (font_file == nullptr) { - std::cerr << "couldn't open font file" << std::endl; - return EXIT_FAILURE; - } - - artery_font::StdArteryFont font; - if (!artery_font::read(font, font_file)) { - std::cerr << "couldn't read artery font" << std::endl; - return EXIT_FAILURE; - } - - if (fclose(font_file) != 0) { - std::cerr << "an error occured when closing font file" << std::endl; - return EXIT_FAILURE; - } - - return EXIT_SUCCESS; + auto list = artery_font::StdList(5); + std::cout << "There are " << list.length() << " elements in the list" << std::endl; + return EXIT_SUCCESS; } diff --git a/recipes/artery-font-format/config.yml b/recipes/artery-font-format/config.yml index 7b06dd8bf61ea..3c69caf4158b5 100644 --- a/recipes/artery-font-format/config.yml +++ b/recipes/artery-font-format/config.yml @@ -1,4 +1,6 @@ versions: + "1.1": + folder: all "1.0.1": folder: all "1.0": diff --git a/recipes/aruco/3.x.x/conandata.yml b/recipes/aruco/3.x.x/conandata.yml index eb3415158ea14..ac03e59367f66 100644 --- a/recipes/aruco/3.x.x/conandata.yml +++ b/recipes/aruco/3.x.x/conandata.yml @@ -1,4 +1,7 @@ sources: + "3.1.15": + url: "https://downloads.sourceforge.net/project/aruco/3.1.15/3.1.15.zip" + sha256: "8408ad1621b92c885b0740641ab98ec022705d48a08deb6f071ffebf455cc8b2" "3.1.12": url: "https://downloads.sourceforge.net/project/aruco/3.1.12/aruco-3.1.12.zip" sha256: "70b9ec8aa8eac6fe3f622201747a3e32c77bbb5f015e28a95c1c7c91f8ee8a09" diff --git a/recipes/aruco/3.x.x/conanfile.py b/recipes/aruco/3.x.x/conanfile.py index fb95bc3ec62e7..2e12e936c956e 100644 --- a/recipes/aruco/3.x.x/conanfile.py +++ b/recipes/aruco/3.x.x/conanfile.py @@ -1,6 +1,6 @@ from conan import ConanFile from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout -from conan.tools.files import collect_libs, copy, get, rmdir +from conan.tools.files import collect_libs, copy, get, rmdir, replace_in_file import os required_conan_version = ">=1.53.0" @@ -37,8 +37,11 @@ def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - self.requires("opencv/4.5.5") - self.requires("eigen/3.4.0") + # Header used in public markerdetector.h + # cv::FileStorage::FileStorage used by aruco::CameraParameters::saveToFile + self.requires("opencv/4.9.0", transitive_headers=True, transitive_libs=True) + # Header used in levmarq.h + self.requires("eigen/3.4.0", transitive_headers=False) def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) @@ -55,6 +58,7 @@ def generate(self): tc.variables["USE_OWN_EIGEN3"] = False tc.generate() deps = CMakeDeps(self) + deps.set_property("eigen", "cmake_additional_variables_prefixes", ["Eigen3"]) deps.generate() def build(self): diff --git a/recipes/aruco/3.x.x/test_package/test_package.cpp b/recipes/aruco/3.x.x/test_package/test_package.cpp index 4632ed7b42bd6..6a6b41f258933 100644 --- a/recipes/aruco/3.x.x/test_package/test_package.cpp +++ b/recipes/aruco/3.x.x/test_package/test_package.cpp @@ -1,10 +1,10 @@ -#include -#include +#include #include #include -#include +#include +#include int main() { cv::Mat image = cv::Mat::zeros(600,600,CV_8UC3); diff --git a/recipes/aruco/config.yml b/recipes/aruco/config.yml index 243128b45c736..84539a1974a56 100644 --- a/recipes/aruco/config.yml +++ b/recipes/aruco/config.yml @@ -1,3 +1,5 @@ versions: + "3.1.15": + folder: 3.x.x "3.1.12": folder: 3.x.x diff --git a/recipes/asio/all/conandata.yml b/recipes/asio/all/conandata.yml index 7484b2d50e440..001d8ff55af6f 100644 --- a/recipes/asio/all/conandata.yml +++ b/recipes/asio/all/conandata.yml @@ -1,79 +1,30 @@ sources: - "1.30.1": - url: "https://github.com/chriskohlhoff/asio/archive/asio-1-30-1.tar.gz" - sha256: "94b121cc2016680f2314ef58eadf169c2d34fff97fba01df325a192d502d3a58" + "1.32.0": + url: "https://github.com/chriskohlhoff/asio/archive/asio-1-32-0.tar.gz" + sha256: "f1b94b80eeb00bb63a3c8cef5047d4e409df4d8a3fe502305976965827d95672" + "1.31.0": + url: "https://github.com/chriskohlhoff/asio/archive/asio-1-31-0.tar.gz" + sha256: "530540f973498c2d297771af1bc852f69b27509bbb56bc7ac3309c928373286f" + "1.30.2": + url: "https://github.com/chriskohlhoff/asio/archive/asio-1-30-2.tar.gz" + sha256: "755bd7f85a4b269c67ae0ea254907c078d408cce8e1a352ad2ed664d233780e8" + # keep 1.29.0 for crowcpp-crow, restinio, fast-dds, asio-grpc "1.29.0": url: "https://github.com/chriskohlhoff/asio/archive/asio-1-29-0.tar.gz" sha256: "44305859b4e6664dbbf853c1ef8ca0259d694f033753ae309fcb2534ca20f721" - "1.28.2": - url: "https://github.com/chriskohlhoff/asio/archive/asio-1-28-2.tar.gz" - sha256: "5705a0e403017eba276625107160498518838064a6dd7fd8b00b2e30c0ffbdee" + # keep 1.28.1 for openscenegraph, restinio, simple-websocket-server, websocketpp "1.28.1": url: "https://github.com/chriskohlhoff/asio/archive/asio-1-28-1.tar.gz" sha256: "5ff6111ec8cbe73a168d997c547f562713aa7bd004c5c02326f0e9d579a5f2ce" - "1.28.0": - url: "https://github.com/chriskohlhoff/asio/archive/asio-1-28-0.tar.gz" - sha256: "226438b0798099ad2a202563a83571ce06dd13b570d8fded4840dbc1f97fa328" + # keep 1.27.0 for cppserver "1.27.0": url: "https://github.com/chriskohlhoff/asio/archive/asio-1-27-0.tar.gz" sha256: "b31c63867daaba0e460ee2c85dc508a52c81db0a7318e0d2147f444b26f80ed7" - "1.26.0": - url: "https://github.com/chriskohlhoff/asio/archive/asio-1-26-0.tar.gz" - sha256: "935583f86825b7b212479277d03543e0f419a55677fa8cb73a79a927b858a72d" - "1.24.0": - url: "https://github.com/chriskohlhoff/asio/archive/asio-1-24-0.tar.gz" - sha256: "cbcaaba0f66722787b1a7c33afe1befb3a012b5af3ad7da7ff0f6b8c9b7a8a5b" - "1.23.0": - url: "https://github.com/chriskohlhoff/asio/archive/asio-1-23-0.tar.gz" - sha256: "facae7627ce6c716add3f328eee3d78c2e6e133a46ac5ecb80897b37ebacf05e" - "1.22.1": - url: "https://github.com/chriskohlhoff/asio/archive/asio-1-22-1.tar.gz" - sha256: "30cb54a5de5e465d10ec0c2026d6b5917f5e89fffabdbabeb1475846fc9a2cf0" - "1.22.0": - url: "https://github.com/chriskohlhoff/asio/archive/asio-1-22-0.tar.gz" - sha256: "17bfd506f6d55c85a33603277a256b42ca5883bf290930040489ffeeed23724a" - "1.21.0": - url: "https://github.com/chriskohlhoff/asio/archive/asio-1-21-0.tar.gz" - sha256: "5d2d2dcb7bfb39bff941cabbfc8c27ee322a495470bf0f3a7c5238648cf5e6a9" - "1.20.0": - url: "https://github.com/chriskohlhoff/asio/archive/asio-1-20-0.tar.gz" - sha256: "34a8f07be6f54e3753874d46ecfa9b7ab7051c4e3f67103c52a33dfddaea48e6" - "1.19.2": - url: "https://github.com/chriskohlhoff/asio/archive/asio-1-19-2.tar.gz" - sha256: "5ee191aee825dfb1325cbacf643d599b186de057c88464ea98f1bae5ba4ff47a" - "1.19.1": - url: "https://github.com/chriskohlhoff/asio/archive/refs/tags/asio-1-19-1.tar.gz" - sha256: "2555e0a29256de5c77d6a34b14faefd28c76555e094ba0371acb0b91d483520e" - "1.19.0": - url: "https://github.com/chriskohlhoff/asio/archive/asio-1-19-0.tar.gz" - sha256: "11bc0e22fcdfb3f0b77574ac33760a3592c0dac7e7eece7668b823c158243629" - "1.18.2": - url: "https://github.com/chriskohlhoff/asio/archive/asio-1-18-2.tar.gz" - sha256: "8d67133b89e0f8b212e9f82fdcf1c7b21a978d453811e2cd941c680e72c2ca32" + # keep 1.18.1 for packio "1.18.1": url: "https://github.com/chriskohlhoff/asio/archive/asio-1-18-1.tar.gz" sha256: "39c721b987b7a0d2fe2aee64310bd128cd8cc10f43481604d18cb2d8b342fd40" - "1.18.0": - sha256: 820688d1e0387ff55194ae20036cbae0fb3c7d11b7c3f46492369723c01df96f - url: https://github.com/chriskohlhoff/asio/archive/asio-1-18-0.tar.gz - "1.17.0": - sha256: 46406a830f8334b3789e7352ed7309a39c7c30b685b0499d289eda4fd4ae2067 - url: https://github.com/chriskohlhoff/asio/archive/asio-1-17-0.tar.gz + # keep 1.16.1 for simple-websocket-server "1.16.1": sha256: e40bbd531530f08318b7c7d7e84e457176d8eae6f5ad2e3714dc27b9131ecd35 url: https://github.com/chriskohlhoff/asio/archive/asio-1-16-1.tar.gz - "1.16.0": - sha256: c87410ea62de6245aa239b9ed2057edf01d7f66acc3f5e50add9a29343c87512 - url: https://github.com/chriskohlhoff/asio/archive/asio-1-16-0.tar.gz - "1.14.1": - sha256: 5b12ce2cdb658025e67785f954f74b052709cfc9b5941b8fb889c049b0955e1d - url: https://github.com/chriskohlhoff/asio/archive/asio-1-14-1.tar.gz - "1.14.0": - sha256: bdb01a649c24d73ca4a836662e7af442d935313ed6deef6b07f17f3bc5f78d7a - url: https://github.com/chriskohlhoff/asio/archive/asio-1-14-0.tar.gz - "1.13.0": - sha256: 54a1208d20f2104dbd6b7a04a9262f5ab649f4b7a9faf7eac4c2294e9e104c06 - url: https://github.com/chriskohlhoff/asio/archive/asio-1-13-0.tar.gz - "1.12.2": - sha256: 1de23266b956674e766cd0b6c929a11259f2284ea8e96b765cc8c67b1689e0fd - url: https://github.com/chriskohlhoff/asio/archive/asio-1-12-2.tar.gz diff --git a/recipes/asio/config.yml b/recipes/asio/config.yml index 1a239b697b8da..b6ec3bff0f46c 100644 --- a/recipes/asio/config.yml +++ b/recipes/asio/config.yml @@ -1,53 +1,17 @@ versions: - "1.30.1": + "1.32.0": folder: all - "1.29.0": + "1.31.0": folder: all - "1.28.2": + "1.30.2": folder: all - "1.28.1": + "1.29.0": folder: all - "1.28.0": + "1.28.1": folder: all "1.27.0": folder: all - "1.26.0": - folder: all - "1.24.0": - folder: all - "1.23.0": - folder: all - "1.22.1": - folder: all - "1.22.0": - folder: all - "1.21.0": - folder: all - "1.20.0": - folder: all - "1.19.2": - folder: all - "1.19.1": - folder: all - "1.19.0": - folder: all - "1.18.2": - folder: all "1.18.1": folder: all - "1.18.0": - folder: all - "1.17.0": - folder: all "1.16.1": folder: all - "1.16.0": - folder: all - "1.14.1": - folder: all - "1.14.0": - folder: all - "1.13.0": - folder: all - "1.12.2": - folder: all diff --git a/recipes/asmjit/all/conandata.yml b/recipes/asmjit/all/conandata.yml index c714f763c3707..0e6689d1ee9fc 100644 --- a/recipes/asmjit/all/conandata.yml +++ b/recipes/asmjit/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "cci.20240531": + url: "https://github.com/asmjit/asmjit/archive/d6c5be2212b9a50ba56ec6d1e9b68693c62136c1.zip" + sha256: "678549712d4708d0513fb0017d03211df415387aea4c031923d4dd5c07b43db6" "cci.20230325": url: "https://github.com/asmjit/asmjit/archive/51b10b19b6631434d3f9ad536a6fb140944a36d2.zip" sha256: "4f62b1b6247864417fb50a2928d541ccf8e9273b0c3ce36ccd443c9d6ca7bc9a" diff --git a/recipes/asmjit/all/conanfile.py b/recipes/asmjit/all/conanfile.py index ad8cb46dcf24d..5461e75517fb2 100644 --- a/recipes/asmjit/all/conanfile.py +++ b/recipes/asmjit/all/conanfile.py @@ -2,20 +2,20 @@ from conan.tools.build import check_min_cppstd from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout from conan.tools.files import copy, get, rmdir +from conan.tools.scm import Version +from conan.errors import ConanInvalidConfiguration import os required_conan_version = ">=1.53.0" - class AsmjitConan(ConanFile): name = "asmjit" description = "AsmJit is a lightweight library for machine code " \ "generation written in C++ language." license = "Zlib" topics = ("asmjit", "compiler", "assembler", "jit") - homepage = "https://asmjit.com" url = "https://github.com/conan-io/conan-center-index" - + homepage = "https://asmjit.com" package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { @@ -27,6 +27,16 @@ class AsmjitConan(ConanFile): "fPIC": True, } + @property + def _min_cppstd(self): + return 11 + + @property + def _compilers_minimum_version(self): + return { + "gcc": "7", + } + def config_options(self): if self.settings.os == "Windows": del self.options.fPIC @@ -40,7 +50,14 @@ def layout(self): def validate(self): if self.settings.compiler.get_safe("cppstd"): - check_min_cppstd(self, 11) + check_min_cppstd(self, self._min_cppstd) + + if self.version >= "cci.20240531": + minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) + if minimum_version and Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration( + f"{self.ref} does not support {self.settings.compiler}/{self.settings.compiler.version}." + ) def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) diff --git a/recipes/asmjit/all/test_package/CMakeLists.txt b/recipes/asmjit/all/test_package/CMakeLists.txt index 39640d23a5929..f8fba8f71f0a1 100644 --- a/recipes/asmjit/all/test_package/CMakeLists.txt +++ b/recipes/asmjit/all/test_package/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.8) +cmake_minimum_required(VERSION 3.15) project(test_package LANGUAGES CXX) find_package(asmjit REQUIRED CONFIG) diff --git a/recipes/asmjit/all/test_package/test_package.cpp b/recipes/asmjit/all/test_package/test_package.cpp index 4b85962e0942d..f6d920ca6d627 100644 --- a/recipes/asmjit/all/test_package/test_package.cpp +++ b/recipes/asmjit/all/test_package/test_package.cpp @@ -1,27 +1,16 @@ -#include +#include -#include - -typedef int (*Func)(void); +#include "asmjit/asmjit.h" int main(int argc, char* argv[]) { asmjit::JitRuntime rt; - asmjit::CodeHolder code; code.init(rt.environment()); - asmjit::x86::Assembler a(&code); - a.mov(asmjit::x86::eax, 1); - a.ret(); - - Func fn; - asmjit::Error err = rt.add(&fn, &code); - if (err) return 1; - - int result = fn(); - printf("%d\n", result); - - rt.release(fn); + std::cout << + unsigned((ASMJIT_LIBRARY_VERSION >> 16)) << "." << + unsigned((ASMJIT_LIBRARY_VERSION >> 8) & 0xFF) << "." << + unsigned((ASMJIT_LIBRARY_VERSION ) & 0xFF) << "\n"; return 0; } diff --git a/recipes/asmjit/config.yml b/recipes/asmjit/config.yml index ea0049ba18227..03449364f4128 100644 --- a/recipes/asmjit/config.yml +++ b/recipes/asmjit/config.yml @@ -1,4 +1,6 @@ versions: + "cci.20240531": + folder: all "cci.20230325": folder: all "cci.20221111": diff --git a/recipes/asmtk/all/conandata.yml b/recipes/asmtk/all/conandata.yml new file mode 100644 index 0000000000000..0305fe3116b8e --- /dev/null +++ b/recipes/asmtk/all/conandata.yml @@ -0,0 +1,9 @@ +sources: + "0.0.0.cci.20230718": + url: "https://github.com/asmjit/asmtk/archive/e2752c85d39da4b0c5c729737a6faa25286b8e0c.zip" + sha256: "8cce0edf5f83df44853469c58037c59ae51b3630ed48be7c2370473f89d0986d" +patches: + "0.0.0.cci.20230718": + - patch_file: "patches/0001-update-cmakelist.patch" + patch_description: "Simple update to CMakeLists.txt to let asmtk link conan asmjit::asmjit instead of trying to do some magic" + patch_type: "conan" diff --git a/recipes/asmtk/all/conanfile.py b/recipes/asmtk/all/conanfile.py new file mode 100644 index 0000000000000..4897022fb9ed0 --- /dev/null +++ b/recipes/asmtk/all/conanfile.py @@ -0,0 +1,74 @@ +from conan import ConanFile +from conan.tools.build import check_min_cppstd +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.files import copy, get, rmdir, apply_conandata_patches, export_conandata_patches +import os + +required_conan_version = ">=2.1" + +class AsmjitConan(ConanFile): + name = "asmtk" + description = "AsmTK provides concepts that are useful mostly in AOT code-generation." + license = "Zlib" + topics = ("asmjit", "compiler", "assembler", "jit", "asmtk") + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://asmjit.com" + package_type = "library" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + } + implements = ["auto_shared_fpic"] + + def requirements(self): + # INFO: asmtk/globals.h: #include + # INFO asmtk consumes asmjit directly + self.requires("asmjit/cci.20240531", transitive_headers=True) + + def export_sources(self): + export_conandata_patches(self) + + def layout(self): + cmake_layout(self, src_folder="src") + + def validate(self): + check_min_cppstd(self, 11) + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + tc.cache_variables["ASMTK_EMBED"] = False + tc.cache_variables["ASMTK_STATIC"] = not self.options.shared + tc.cache_variables["ASMTK_TEST"] = False + tc.cache_variables["ASMJIT_EXTERNAL"] = True + tc.generate() + + deps = CMakeDeps(self) + deps.generate() + + def build(self): + apply_conandata_patches(self) + cmake = CMake(self) + cmake.configure() + cmake.build() + + def package(self): + copy(self, "LICENSE.md", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) + cmake = CMake(self) + cmake.install() + rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) + + def package_info(self): + self.cpp_info.set_property("cmake_file_name", "asmtk") + self.cpp_info.set_property("cmake_target_name", "asmjit::asmtk") + + self.cpp_info.libs = ["asmtk"] + if not self.options.shared: + self.cpp_info.defines = ["ASMTK_STATIC"] diff --git a/recipes/asmtk/all/patches/0001-update-cmakelist.patch b/recipes/asmtk/all/patches/0001-update-cmakelist.patch new file mode 100644 index 0000000000000..e471e79ea5a7b --- /dev/null +++ b/recipes/asmtk/all/patches/0001-update-cmakelist.patch @@ -0,0 +1,11 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -171,7 +171,7 @@ if (NOT ASMTK_EMBED) + $<$:${ASMTK_PRIVATE_CFLAGS_DBG}> + $<$>:${ASMTK_PRIVATE_CFLAGS_REL}>) + +- if(ASMJIT_EXTERNAL) ++ if(NOT ASMJIT_EXTERNAL) + target_link_libraries(asmtk PUBLIC ${ASMJIT_LIBRARY}) + find_path(ASMJIT_INCLUDE_DIR NAMES asmjit/asmjit.h) + target_include_directories(asmtk PRIVATE ${ASMJIT_INCLUDE_DIR}) \ No newline at end of file diff --git a/recipes/asmtk/all/test_package/CMakeLists.txt b/recipes/asmtk/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..2b6a3fb962b42 --- /dev/null +++ b/recipes/asmtk/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) + +find_package(asmtk REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE asmjit::asmtk asmjit::asmjit) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) diff --git a/recipes/asmtk/all/test_package/conanfile.py b/recipes/asmtk/all/test_package/conanfile.py new file mode 100644 index 0000000000000..a9e627ca89b29 --- /dev/null +++ b/recipes/asmtk/all/test_package/conanfile.py @@ -0,0 +1,26 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import CMake, cmake_layout +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeToolchain", "CMakeDeps", "VirtualRunEnv" + + def layout(self): + cmake_layout(self) + + def requirements(self): + self.requires(self.tested_reference_str) + self.requires("asmjit/[*]") # whichever version was already resolved + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/asmtk/all/test_package/test_package.cpp b/recipes/asmtk/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..32cd848e0803c --- /dev/null +++ b/recipes/asmtk/all/test_package/test_package.cpp @@ -0,0 +1,19 @@ +#include + +#include +#include + + +int main(void) { + asmjit::Environment env(asmjit::Arch::kX64); + asmjit::CodeHolder code; + code.init(env); + + asmjit::x86::Assembler assembler(&code); + asmtk::AsmParser parser(&assembler); + parser.parse( + "mov rax, rbx\n" + "vaddpd zmm0, zmm1, [rax + 128]\n"); + + return EXIT_SUCCESS; +} \ No newline at end of file diff --git a/recipes/asmtk/config.yml b/recipes/asmtk/config.yml new file mode 100644 index 0000000000000..ec4883f2dc46a --- /dev/null +++ b/recipes/asmtk/config.yml @@ -0,0 +1,3 @@ +versions: + "0.0.0.cci.20230718": + folder: all diff --git a/recipes/assimp/5.x/conandata.yml b/recipes/assimp/5.x/conandata.yml index 42aa3dd3fee85..677866f0307dc 100644 --- a/recipes/assimp/5.x/conandata.yml +++ b/recipes/assimp/5.x/conandata.yml @@ -1,18 +1,22 @@ sources: + "5.4.3": + url: "https://github.com/assimp/assimp/archive/refs/tags/v5.4.3.tar.gz" + sha256: "66dfbaee288f2bc43172440a55d0235dfc7bf885dda6435c038e8000e79582cb" + "5.4.2": + url: "https://github.com/assimp/assimp/archive/refs/tags/v5.4.2.tar.gz" + sha256: "7414861a7b038e407b510e8b8c9e58d5bf8ca76c9dfe07a01d20af388ec5086a" + "5.4.1": + url: "https://github.com/assimp/assimp/archive/refs/tags/v5.4.1.tar.gz" + sha256: "a1bf71c4eb851ca336bba301730cd072b366403e98e3739d6a024f6313b8f954" "5.3.1": url: "https://github.com/assimp/assimp/archive/refs/tags/v5.3.1.tar.gz" sha256: "a07666be71afe1ad4bc008c2336b7c688aca391271188eb9108d0c6db1be53f1" "5.2.5": url: "https://github.com/assimp/assimp/archive/refs/tags/v5.2.5.tar.gz" sha256: "b5219e63ae31d895d60d98001ee5bb809fb2c7b2de1e7f78ceeb600063641e1a" - "5.2.2": - url: "https://github.com/assimp/assimp/archive/refs/tags/v5.2.2.tar.gz" - sha256: "ad76c5d86c380af65a9d9f64e8fc57af692ffd80a90f613dfc6bd945d0b80bb4" "5.1.6": url: "https://github.com/assimp/assimp/archive/refs/tags/v5.1.6.tar.gz" sha256: "52ad3a3776ce320c8add531dbcb2d3b93f2e1f10fcff5ac30178b09ba934d084" patches: - "5.2.2": - - patch_file: "patches/0005-fix-unzip.patch" "5.1.6": - patch_file: "patches/0005-fix-unzip.patch" diff --git a/recipes/assimp/5.x/conanfile.py b/recipes/assimp/5.x/conanfile.py index 9d8d654edce03..f06d14969a98f 100644 --- a/recipes/assimp/5.x/conanfile.py +++ b/recipes/assimp/5.x/conanfile.py @@ -2,8 +2,9 @@ from conan.errors import ConanInvalidConfiguration from conan.tools.build import stdcpp_library, check_min_cppstd from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.env import VirtualBuildEnv from conan.tools.files import apply_conandata_patches, collect_libs, copy, export_conandata_patches, get, replace_in_file, rmdir, save -from conan.tools.microsoft import is_msvc +from conan.tools.microsoft import is_msvc, is_msvc_static_runtime from conan.tools.scm import Version import os @@ -104,6 +105,8 @@ class AssimpConan(ConanFile): options.update(dict.fromkeys(_format_option_map, [True, False])) default_options.update(dict.fromkeys(_format_option_map, True)) + short_paths = True + @property def _min_cppstd(self): if Version(self.version) < "5.2.0": @@ -205,31 +208,48 @@ def validate(self): if Version(self.version) < "5.3.0" and self._depends_on_clipper and Version(self.dependencies["clipper"].ref.version).major != "4": raise ConanInvalidConfiguration("Only 'clipper/4.x' is supported") + def build_requirements(self): + if Version(self.version) >= "5.4.0": + self.tool_requires("cmake/[>=3.22 <4]") + def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) def generate(self): tc = CMakeToolchain(self) - tc.variables["ASSIMP_HUNTER_ENABLED"] = False - tc.variables["ASSIMP_IGNORE_GIT_HASH"] = True - tc.variables["ASSIMP_RAPIDJSON_NO_MEMBER_ITERATOR"] = False tc.variables["ASSIMP_ANDROID_JNIIOSYSTEM"] = False tc.variables["ASSIMP_BUILD_ALL_IMPORTERS_BY_DEFAULT"] = False tc.variables["ASSIMP_BUILD_ALL_EXPORTERS_BY_DEFAULT"] = False tc.variables["ASSIMP_BUILD_ASSIMP_TOOLS"] = False + tc.variables["ASSIMP_BUILD_DOCS"] = False + tc.variables["ASSIMP_BUILD_DRACO"] = False + tc.variables["ASSIMP_BUILD_FRAMEWORK"] = False + tc.variables["ASSIMP_BUILD_MINIZIP"] = False tc.variables["ASSIMP_BUILD_SAMPLES"] = False tc.variables["ASSIMP_BUILD_TESTS"] = False + tc.variables["ASSIMP_BUILD_ZLIB"] = False tc.variables["ASSIMP_DOUBLE_PRECISION"] = self.options.double_precision + tc.variables["ASSIMP_HUNTER_ENABLED"] = False + tc.variables["ASSIMP_IGNORE_GIT_HASH"] = True + tc.variables["ASSIMP_INJECT_DEBUG_POSTFIX"] = False + tc.variables["ASSIMP_INSTALL"] = True tc.variables["ASSIMP_INSTALL_PDB"] = False tc.variables["ASSIMP_NO_EXPORT"] = False - tc.variables["ASSIMP_BUILD_MINIZIP"] = False + tc.variables["ASSIMP_OPT_BUILD_PACKAGES"] = False + tc.variables["ASSIMP_RAPIDJSON_NO_MEMBER_ITERATOR"] = False + tc.variables["ASSIMP_UBSAN"] = False + tc.variables["ASSIMP_WARNINGS_AS_ERRORS"] = False + tc.variables["USE_STATIC_CRT"] = is_msvc_static_runtime(self) + tc.variables["ASSIMP_BUILD_USE_CCACHE"] = False + for option, (definition, _) in self._format_option_map.items(): value = self.options.get_safe(option) if value is not None: tc.variables[definition] = value if self.settings.os == "Windows": tc.preprocessor_definitions["NOMINMAX"] = 1 - tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0077"] = "NEW" # to avoid warnings + if Version(self.version) < "5.4.0": + tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0077"] = "NEW" tc.cache_variables["CMAKE_PROJECT_Assimp_INCLUDE"] = "conan_deps.cmake" tc.cache_variables["WITH_CLIPPER"] = self._depends_on_clipper @@ -246,24 +266,25 @@ def generate(self): cd.set_property("utfcpp", "cmake_target_name", "utf8cpp::utf8cpp") cd.generate() + venv = VirtualBuildEnv(self) + venv.generate() + def _patch_sources(self): apply_conandata_patches(self) # Don't force several compiler and linker flags - replace_mapping = [ - ("-fPIC", ""), - ("-g ", ""), - ("/WX", ""), - ("-Werror", ""), - ("SET(CMAKE_POSITION_INDEPENDENT_CODE ON)", ""), - ('SET(CMAKE_CXX_FLAGS_DEBUG "/D_DEBUG /MDd /Ob2 /DEBUG:FULL /Zi")', ""), - ('SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /D_DEBUG /Zi /Od")', ""), - ('SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /Zi")', ""), - ('SET(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE} /DEBUG:FULL /PDBALTPATH:%_PDB% /OPT:REF /OPT:ICF")', ""), - ] - for before, after in replace_mapping: - replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), before, after, strict=False) - replace_in_file(self, os.path.join(self.source_folder, "code", "CMakeLists.txt"), before, after, strict=False) + for pattern in [ + "-fPIC", + "-g ", + "SET(CMAKE_POSITION_INDEPENDENT_CODE ON)", + 'SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /D_DEBUG /Zi /Od")', + 'SET(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE} /DEBUG:FULL /PDBALTPATH:%_PDB% /OPT:REF /OPT:ICF")', + ]: + replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), pattern, "") + + for pattern in ["-Werror", "/WX"]: + replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), pattern, "") + replace_in_file(self, os.path.join(self.source_folder, "code", "CMakeLists.txt"), pattern, "") # Make sure vendored libs are not used by accident by removing their subdirs allow_vendored = ["Open3DGC"] @@ -298,6 +319,8 @@ def _patch_sources(self): ]: save(self, os.path.join(self.source_folder, "contrib", contrib_header), f"#include <{include}>\n") + if Version(self.version) >= "5.4.0": + rmdir(self, self.source_path.joinpath("contrib", "utf8cpp")) # minizip is provided via conan_deps.cmake, no need to use pkgconfig replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), diff --git a/recipes/assimp/config.yml b/recipes/assimp/config.yml index c3337bd62baf1..51044970f061a 100644 --- a/recipes/assimp/config.yml +++ b/recipes/assimp/config.yml @@ -1,9 +1,13 @@ versions: + "5.4.3": + folder: "5.x" + "5.4.2": + folder: "5.x" + "5.4.1": + folder: "5.x" "5.3.1": folder: "5.x" "5.2.5": folder: "5.x" - "5.2.2": - folder: "5.x" "5.1.6": folder: "5.x" diff --git a/recipes/astc-codec/all/test_package/atlas_small_4x4.astc b/recipes/astc-codec/all/test_package/atlas_small_4x4.astc deleted file mode 100644 index 0dd080b12d23f..0000000000000 Binary files a/recipes/astc-codec/all/test_package/atlas_small_4x4.astc and /dev/null differ diff --git a/recipes/astc-codec/all/test_package/conanfile.py b/recipes/astc-codec/all/test_package/conanfile.py index 9f50bbe4c73b2..98ab55852ad56 100644 --- a/recipes/astc-codec/all/test_package/conanfile.py +++ b/recipes/astc-codec/all/test_package/conanfile.py @@ -23,5 +23,4 @@ def build(self): def test(self): if can_run(self): bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") - bees = os.path.join(self.source_folder, "atlas_small_4x4.astc") - self.run(f"{bin_path} {bees} 256 256", env="conanrun") + self.run(bin_path, env="conanrun") diff --git a/recipes/astc-codec/all/test_package/test_package.cpp b/recipes/astc-codec/all/test_package/test_package.cpp index ec0a2e3ad6195..266f4473a5391 100644 --- a/recipes/astc-codec/all/test_package/test_package.cpp +++ b/recipes/astc-codec/all/test_package/test_package.cpp @@ -8,21 +8,13 @@ int main(int argc, char **argv) { - if (argc < 4) { - std::cerr << "Need at least three argument\n"; - } - std::ifstream stream(argv[1], std::ios::in | std::ios::binary); + std::ifstream stream("fake-file.astc", std::ios::in | std::ios::binary); std::vector astc_data((std::istreambuf_iterator(stream)), std::istreambuf_iterator()); - const size_t width = std::stoi(argv[2]); - const size_t height = std::stoi(argv[3]); - - std::vector result; - result.resize(width * height * 4); - bool success = astc_codec::ASTCDecompressToRGBA( - astc_data.data(), astc_data.size(), width, height, astc_codec::FootprintType::k4x4, - result.data(), result.size(), /* stride */ width * 4); + astc_data.data(), 100, 100, 100, astc_codec::FootprintType::k4x4, NULL, 100, 100); + + std::cout << "Test: " << success << std::endl; stream.close(); diff --git a/recipes/astc-codec/all/test_v1_package/conanfile.py b/recipes/astc-codec/all/test_v1_package/conanfile.py index 3605ef5403092..38f4483872d47 100644 --- a/recipes/astc-codec/all/test_v1_package/conanfile.py +++ b/recipes/astc-codec/all/test_v1_package/conanfile.py @@ -14,5 +14,4 @@ def build(self): def test(self): if not tools.cross_building(self): bin_path = os.path.join("bin", "test_package") - bees = os.path.join(self.source_folder, os.pardir, "test_package", "atlas_small_4x4.astc") - self.run(f"{bin_path} {bees} 256 256", run_environment=True) + self.run(bin_path, run_environment=True) diff --git a/recipes/async_simple/all/conandata.yml b/recipes/async_simple/all/conandata.yml index 884ed02955ab2..4befe3006ae91 100644 --- a/recipes/async_simple/all/conandata.yml +++ b/recipes/async_simple/all/conandata.yml @@ -1,7 +1,16 @@ sources: + "1.3": + url: "https://github.com/alibaba/async_simple/archive/refs/tags/v1.3.tar.gz" + sha256: "0BA0DC3397882611B538D04B8EE6668B1A04CE046128599205184C598B718743" "1.2": url: "https://github.com/alibaba/async_simple/archive/refs/tags/1.2.tar.gz" sha256: "a59a2674ac2b0a3997b90873b2bf0fbe4d96fdedbe6a2628c16c92a65a3fa39a" "1.0.0": url: "https://github.com/alibaba/async_simple/archive/refs/tags/1.0.tar.gz" sha256: "b243fb7af5d61b534fe18b662d16498392bbce1deffdc68e58829aa31db7badf" +patches: + "1.0.0": + - patch_file: "patches/disable-asan-1.0.patch" + patch_description: "Add option for disabling address sanitizer in root CMakeLists" + patch_type: "portability" + patch_source: "https://github.com/alibaba/async_simple/commit/ccb760356b9d7481ca73f0c58d15928bf8b0aa0b" diff --git a/recipes/async_simple/all/conanfile.py b/recipes/async_simple/all/conanfile.py index 52e7c0ae4b223..f0da3ed24785b 100644 --- a/recipes/async_simple/all/conanfile.py +++ b/recipes/async_simple/all/conanfile.py @@ -1,7 +1,7 @@ from conan import ConanFile from conan.errors import ConanInvalidConfiguration -from conan.tools.microsoft import check_min_vs, is_msvc -from conan.tools.files import apply_conandata_patches, export_conandata_patches, get, copy +from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout +from conan.tools.files import apply_conandata_patches, export_conandata_patches, get, copy, rename, replace_in_file from conan.tools.build import check_min_cppstd from conan.tools.scm import Version from conan.tools.layout import basic_layout @@ -18,9 +18,18 @@ class AsyncSimpleConan(ConanFile): homepage = "https://github.com/alibaba/async_simple" topics = ("modules", "asynchronous", "coroutines", "cpp20", "header-only") - package_type = "header-library" + package_type = "library" settings = "os", "arch", "compiler", "build_type" - no_copy_source = True + options = { + "shared": [True, False], + "fPIC": [True, False], + "header_only": [True, False] + } + default_options = { + "shared": False, + "fPIC": True, + "header_only": True + } @property def _min_cppstd(self): @@ -29,6 +38,8 @@ def _min_cppstd(self): @property def _compilers_minimum_version(self): return { + "Visual Studio": "17", + "msvc": "193", "gcc": "10.3", "clang": "13", "apple-clang": "14", @@ -37,59 +48,111 @@ def _compilers_minimum_version(self): def export_sources(self): export_conandata_patches(self) - def layout(self): - basic_layout(self, src_folder="src") + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def configure(self): + if self.options.header_only: + self.options.rm_safe("fPIC") + self.options.rm_safe("shared") + elif self.options.shared: + self.options.rm_safe("fPIC") - def requirements(self): - pass + def layout(self): + if self.options.header_only: + basic_layout(self, src_folder="src") + else: + cmake_layout(self, src_folder="src") def package_id(self): - self.info.clear() + if self.info.options.header_only: + self.info.clear() def validate(self): - if self.settings.compiler.cppstd: + if self.settings.get_safe("compiler.cppstd"): check_min_cppstd(self, self._min_cppstd) - if not is_msvc(self): - minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) - if minimum_version and Version(self.settings.compiler.version) < minimum_version: - raise ConanInvalidConfiguration( - f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." - ) - else: - raise ConanInvalidConfiguration("msvc not supported now") - - def build_requirements(self): - pass + minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) + if minimum_version and Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration(f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support.") + if not self.options.header_only and self.settings.os == "Windows": + raise ConanInvalidConfiguration(f'{self.ref} cannot use uthread on Windows, and therefore it\'s only supported as a header-only library in this configuration with "{self.name}/*:header_only=True"') def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) + def generate(self): + if not self.options.header_only: + tc = CMakeToolchain(self) + tc.cache_variables["ASYNC_SIMPLE_BUILD_DEMO_EXAMPLE"] = False + tc.cache_variables["ASYNC_SIMPLE_ENABLE_TESTS"] = False + tc.cache_variables["ASYNC_SIMPLE_ENABLE_ASAN"] = False + #libaio is only used in SimpleIOExecutor which is only used in executor tests and not meant for end users + tc.cache_variables["ASYNC_SIMPLE_DISABLE_AIO"] = True + tc.generate() + def build(self): apply_conandata_patches(self) + if not self.options.header_only: + replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), '-D_GLIBCXX_USE_CXX11_ABI=1', '') + cmake = CMake(self) + cmake.configure() + cmake.build() def package(self): copy(self, pattern="LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) - copy( - self, - pattern="*.h", + + if self.options.header_only: + hCopyExcludes = ("test", "uthread", "executors") + if not self.options.header_only: + hCopyExcludes = ("test", "executors") + if self.options.shared: + if self.settings.os == "Macos": + sharedLibExt = "*.dylib*" + else: + sharedLibExt = "*.so*" + copy(self, pattern=sharedLibExt, + dst=os.path.join(self.package_folder, "lib"), + src=os.path.join(self.build_folder, "async_simple") + ) + else: + copy(self, pattern="*.a", + dst=os.path.join(self.package_folder, "lib"), + src=os.path.join(self.build_folder, "async_simple") + ) + libTarget = os.path.join(self.package_folder, "lib", "libasync_simple.a") + if not os.path.isfile(libTarget): + rename(self, os.path.join(self.package_folder, "lib", "libasync_simple_static.a"), + libTarget) + + copy(self, pattern="*.h", dst=os.path.join(self.package_folder, "include/async_simple"), src=os.path.join(self.source_folder, "async_simple"), - excludes=("test", "executors", "uthread") + excludes=hCopyExcludes ) def package_info(self): - self.cpp_info.bindirs = [] - self.cpp_info.frameworkdirs = [] - self.cpp_info.libdirs = [] - self.cpp_info.resdirs = [] + if not self.options.header_only: + self.cpp_info.libs = ["async_simple"] + + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.system_libs = ["m", "pthread"] self.cpp_info.set_property("cmake_file_name", "async_simple") - self.cpp_info.set_property("cmake_target_name", "async_simple::async_simple") + if self.options.header_only: + self.cpp_info.set_property("cmake_target_name", "async_simple::async_simple_header_only") + + self.cpp_info.components["_async_simple"].names["cmake_find_package"] = "async_simple_header_only" + self.cpp_info.components["_async_simple"].names["cmake_find_package_multi"] = "async_simple_header_only" + self.cpp_info.components["_async_simple"].set_property("cmake_target_name", "async_simple::async_simple_header_only") + else: + self.cpp_info.set_property("cmake_target_name", "async_simple::async_simple") + + self.cpp_info.components["_async_simple"].names["cmake_find_package"] = "async_simple" + self.cpp_info.components["_async_simple"].names["cmake_find_package_multi"] = "async_simple" + self.cpp_info.components["_async_simple"].set_property("cmake_target_name", "async_simple::async_simple") self.cpp_info.filenames["cmake_find_package"] = "async_simple" self.cpp_info.filenames["cmake_find_package_multi"] = "async_simple" self.cpp_info.names["cmake_find_package"] = "async_simple" self.cpp_info.names["cmake_find_package_multi"] = "async_simple" - self.cpp_info.components["_async_simple"].names["cmake_find_package"] = "async_simple_header_only" - self.cpp_info.components["_async_simple"].names["cmake_find_package_multi"] = "async_simple_header_only" - self.cpp_info.components["_async_simple"].set_property("cmake_target_name", "async_simple::async_simple_header_only") diff --git a/recipes/async_simple/all/patches/disable-asan-1.0.patch b/recipes/async_simple/all/patches/disable-asan-1.0.patch new file mode 100644 index 0000000000000..ce18632f1b35d --- /dev/null +++ b/recipes/async_simple/all/patches/disable-asan-1.0.patch @@ -0,0 +1,21 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -106,11 +106,13 @@ + #list(APPEND deplibs "-m64") + endif() + endif() +- +-if(NOT CMAKE_CXX_COMPILER_ID MATCHES "MSVC") +- if (CMAKE_BUILD_TYPE STREQUAL "Debug") +- message("-- Use flag -fsanitize=address") +- list(APPEND CXX_FLAGS "-fsanitize=address") ++option(ASYNC_SIMPLE_ENABLE_ASAN "enable asan in debug when compiler is not msvc" ON) ++if (ASYNC_SIMPLE_ENABLE_ASAN) ++ if(NOT CMAKE_CXX_COMPILER_ID MATCHES "MSVC") ++ if (CMAKE_BUILD_TYPE STREQUAL "Debug") ++ message("-- Use flag -fsanitize=address") ++ list(APPEND CXX_FLAGS "-fsanitize=address") ++ endif() + endif() + endif() + diff --git a/recipes/async_simple/all/test_package/CMakeLists.txt b/recipes/async_simple/all/test_package/CMakeLists.txt index 8b854aa258e40..ccb7b85dadd81 100644 --- a/recipes/async_simple/all/test_package/CMakeLists.txt +++ b/recipes/async_simple/all/test_package/CMakeLists.txt @@ -7,4 +7,8 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON) find_package(async_simple REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) -target_link_libraries(${PROJECT_NAME} PRIVATE async_simple::async_simple_header_only) +if(ASYNC_SIMPLE_HEADER_ONLY) + target_link_libraries(test_package PRIVATE async_simple::async_simple_header_only) +else() + target_link_libraries(test_package PRIVATE async_simple::async_simple) +endif() diff --git a/recipes/async_simple/all/test_package/conanfile.py b/recipes/async_simple/all/test_package/conanfile.py index 1111583fea732..be622ed71cf62 100644 --- a/recipes/async_simple/all/test_package/conanfile.py +++ b/recipes/async_simple/all/test_package/conanfile.py @@ -1,13 +1,13 @@ from conan import ConanFile from conan.tools.build import can_run -from conan.tools.cmake import cmake_layout, CMake +from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout import os # It will become the standard on Conan 2.x class TestPackageConan(ConanFile): settings = "os", "arch", "compiler", "build_type" - generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + generators = "CMakeDeps", "VirtualRunEnv" test_type = "explicit" def requirements(self): @@ -15,7 +15,12 @@ def requirements(self): def layout(self): cmake_layout(self) - + + def generate(self): + tc = CMakeToolchain(self) + tc.variables["ASYNC_SIMPLE_HEADER_ONLY"] = self.dependencies[self.tested_reference_str].options.header_only + tc.generate() + def build(self): cmake = CMake(self) cmake.configure() diff --git a/recipes/async_simple/config.yml b/recipes/async_simple/config.yml index 0b3d8acdb470b..e526b1e8db52a 100644 --- a/recipes/async_simple/config.yml +++ b/recipes/async_simple/config.yml @@ -1,4 +1,7 @@ versions: + # Newer versions at the top + "1.3": + folder: all "1.2": folder: all "1.0.0": diff --git a/recipes/asyncplusplus/all/conandata.yml b/recipes/asyncplusplus/all/conandata.yml index 6e8a1f4ce6c53..44d6673d4265c 100644 --- a/recipes/asyncplusplus/all/conandata.yml +++ b/recipes/asyncplusplus/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.2": + url: "https://github.com/Amanieu/asyncplusplus/archive/v1.2.tar.gz" + sha256: "0711c8db231bf3eb1066400f49ed73b5c3211a10eb3b8c3e64da3d5fdee8a4bf" "1.1": url: "https://github.com/Amanieu/asyncplusplus/archive/v1.1.tar.gz" sha256: "d160d3a433a1e08f51c785742843182c2b81a7bc872766f57bf5f3108377b858" diff --git a/recipes/asyncplusplus/all/conanfile.py b/recipes/asyncplusplus/all/conanfile.py index 1846058ae1e44..e0b83a2a00e4a 100644 --- a/recipes/asyncplusplus/all/conanfile.py +++ b/recipes/asyncplusplus/all/conanfile.py @@ -2,6 +2,8 @@ from conan.tools.build import check_min_cppstd from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout from conan.tools.files import copy, get, rmdir, save +from conan.tools.microsoft import is_msvc, check_min_vs +from conan.tools.scm import Version import os import textwrap @@ -12,9 +14,9 @@ class AsyncplusplusConan(ConanFile): name = "asyncplusplus" description = "Async++ concurrency framework for C++11" license = "MIT" - topics = ("async", "parallel", "task", "scheduler") - homepage = "https://github.com/Amanieu/asyncplusplus" url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/Amanieu/asyncplusplus" + topics = ("async", "parallel", "task", "scheduler") package_type = "library" settings = "os", "arch", "compiler", "build_type" @@ -89,6 +91,9 @@ def package_info(self): self.cpp_info.defines = ["LIBASYNC_STATIC"] if self.settings.os in ["Linux", "FreeBSD"]: self.cpp_info.system_libs = ["pthread"] + + if Version(self.version) >= "1.2" and is_msvc(self) and check_min_vs(self, 191): + self.cpp_info.cxxflags.extend(["/Zc:__cplusplus"]) # TODO: to remove in conan v2 once cmake_find_package* & pkg_config generators removed self.cpp_info.names["cmake_find_package"] = "Async++" diff --git a/recipes/asyncplusplus/config.yml b/recipes/asyncplusplus/config.yml index 3f8a45fae5832..03361fccd564f 100644 --- a/recipes/asyncplusplus/config.yml +++ b/recipes/asyncplusplus/config.yml @@ -1,3 +1,5 @@ versions: + "1.2": + folder: all "1.1": folder: all diff --git a/recipes/asyncpp/all/conandata.yml b/recipes/asyncpp/all/conandata.yml new file mode 100644 index 0000000000000..4b083e872c16b --- /dev/null +++ b/recipes/asyncpp/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "0.2.4": + url: "https://github.com/petiaccja/asyncpp/archive/refs/tags/v0.2.4.tar.gz" + sha256: "58138FF5801D3A547EAAD9ADC2C30FE7A0D506C0E41DC56071CEAAD5747210B5" diff --git a/recipes/asyncpp/all/conanfile.py b/recipes/asyncpp/all/conanfile.py new file mode 100644 index 0000000000000..b93928908c5e6 --- /dev/null +++ b/recipes/asyncpp/all/conanfile.py @@ -0,0 +1,100 @@ +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.build import check_min_cppstd +from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout +from conan.tools.env import VirtualBuildEnv +from conan.tools.files import copy, get, rm, rmdir +from conan.tools.scm import Version +import os + + +required_conan_version = ">=1.53.0" + + +class AsyncppRecipe(ConanFile): + name = "asyncpp" + description = "A C++20 coroutine library for asynchronous and parallel programming." + license = "MIT" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/petiaccja/asyncpp/" + topics = ("coroutine", "c++20", "async", "parallel", "concurrency") + + package_type = "library" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + } + + @property + def _min_cppstd(self): + return 20 + + @property + def _compilers_minimum_version(self): + return { + "gcc": "13", + "clang": "17", + "msvc": "193", + "Visual Studio": "17", + } + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + + def layout(self): + cmake_layout(self, src_folder="src") + + def validate(self): + if self.settings.compiler.cppstd: + check_min_cppstd(self, self._min_cppstd) + minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) + if minimum_version and Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration( + f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." + ) + + if self.settings.compiler == "apple-clang": + # As per https://en.cppreference.com/w/cpp/compiler_support, apple-clang 14.0.0 partially supports C++20 but not jthread + raise ConanInvalidConfiguration(f"{self.ref} does not support apple-clang compiler, as it lacks jthread support.") + + def build_requirements(self): + self.tool_requires("cmake/[>=3.25 <4]") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + tc.variables["ASYNCPP_BUILD_TESTS"] = "OFF" + tc.variables["ASYNCPP_BUILD_BENCHMARKS"] = "OFF" + tc.generate() + venv = VirtualBuildEnv(self) + venv.generate() + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def package(self): + copy(self, "LICENSE.md", self.source_folder, os.path.join(self.package_folder, "licenses")) + cmake = CMake(self) + cmake.install() + + def package_info(self): + self.cpp_info.libs = ["asyncpp"] + if self.settings.os == "Windows" and self.options.shared: + self.cpp_info.bindirs = ["libs"] + + if self.settings.os in ("Linux", "FreeBSD"): + self.cpp_info.system_libs = ["pthread"] diff --git a/recipes/asyncpp/all/test_package/CMakeLists.txt b/recipes/asyncpp/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..74c5adfc3219b --- /dev/null +++ b/recipes/asyncpp/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(TestPackage LANGUAGES CXX) + +find_package(asyncpp CONFIG REQUIRED) + +add_executable(test_package test_package.cpp) +target_link_libraries(test_package asyncpp::asyncpp) +target_compile_features(test_package PUBLIC cxx_std_20) diff --git a/recipes/asyncpp/all/test_package/conanfile.py b/recipes/asyncpp/all/test_package/conanfile.py new file mode 100644 index 0000000000000..224348be46988 --- /dev/null +++ b/recipes/asyncpp/all/test_package/conanfile.py @@ -0,0 +1,27 @@ +import os + +from conan import ConanFile +from conan.tools.cmake import CMake, cmake_layout +from conan.tools.build import can_run + + +class AsyncppTestConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/asyncpp/all/test_package/test_package.cpp b/recipes/asyncpp/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..070acd2fe6b83 --- /dev/null +++ b/recipes/asyncpp/all/test_package/test_package.cpp @@ -0,0 +1,18 @@ +#include +#include + +#include +#include + +using namespace asyncpp; + + +task message() { + co_return std::string("async++ installation works."); +} + + +int main() { + std::cout << join(message()) << std::endl; + return 0; +} diff --git a/recipes/asyncpp/config.yml b/recipes/asyncpp/config.yml new file mode 100644 index 0000000000000..a718e51b057ea --- /dev/null +++ b/recipes/asyncpp/config.yml @@ -0,0 +1,3 @@ +versions: + "0.2.4": + folder: all diff --git a/recipes/at-spi2-core/config.yml b/recipes/at-spi2-core/config.yml index f37e219eb66cb..c890631d2ad5f 100644 --- a/recipes/at-spi2-core/config.yml +++ b/recipes/at-spi2-core/config.yml @@ -25,3 +25,5 @@ versions: folder: new "2.51.0": folder: new + "2.53.1": + folder: new diff --git a/recipes/at-spi2-core/new/conandata.yml b/recipes/at-spi2-core/new/conandata.yml index 58e8f4f097094..225eb1193882e 100644 --- a/recipes/at-spi2-core/new/conandata.yml +++ b/recipes/at-spi2-core/new/conandata.yml @@ -1,13 +1,16 @@ sources: + "2.53.1": + url: "https://ftp.gnome.org/pub/gnome/sources/at-spi2-core/2.53/at-spi2-core-2.53.1.tar.xz" + sha256: "2affe2c88dae3defcd754c2c2bcecfb2e52b9541edf2e469f94b3a0bb1307cf4" "2.51.0": - sha256: 8dd07c6160e3115f4f77e2205963449def6822a3dc85d495c5db389f56663037 - url: https://ftp.gnome.org/pub/gnome/sources/at-spi2-core/2.51/at-spi2-core-2.51.0.tar.xz + url: "https://ftp.gnome.org/pub/gnome/sources/at-spi2-core/2.51/at-spi2-core-2.51.0.tar.xz" + sha256: "8dd07c6160e3115f4f77e2205963449def6822a3dc85d495c5db389f56663037" "2.50.0": - sha256: e9f5a8c8235c9dd963b2171de9120301129c677dde933955e1df618b949c4adc - url: https://ftp.gnome.org/pub/gnome/sources/at-spi2-core/2.50/at-spi2-core-2.50.0.tar.xz + url: "https://ftp.gnome.org/pub/gnome/sources/at-spi2-core/2.50/at-spi2-core-2.50.0.tar.xz" + sha256: "e9f5a8c8235c9dd963b2171de9120301129c677dde933955e1df618b949c4adc" "2.49.1": - sha256: 53ed9eb77e4c48b3bf6ac4afb5689391e0d7d0f44f7ca4443d8b13c7dd26119c - url: https://ftp.gnome.org/pub/gnome/sources/at-spi2-core/2.49/at-spi2-core-2.49.1.tar.xz + url: "https://ftp.gnome.org/pub/gnome/sources/at-spi2-core/2.49/at-spi2-core-2.49.1.tar.xz" + sha256: "53ed9eb77e4c48b3bf6ac4afb5689391e0d7d0f44f7ca4443d8b13c7dd26119c" "2.48.3": url: "https://ftp.gnome.org/pub/gnome/sources/at-spi2-core/2.48/at-spi2-core-2.48.3.tar.xz" sha256: "37316df43ca9989ce539d54cf429a768c28bb38a0b34950beadd0421827edf55" diff --git a/recipes/at-spi2-core/new/conanfile.py b/recipes/at-spi2-core/new/conanfile.py index 265bde97b8ace..e12168d36a06f 100644 --- a/recipes/at-spi2-core/new/conanfile.py +++ b/recipes/at-spi2-core/new/conanfile.py @@ -1,6 +1,6 @@ from conan import ConanFile -from conan.errors import ConanException, ConanInvalidConfiguration -from conan.tools.apple import fix_apple_shared_install_name +from conan.errors import ConanInvalidConfiguration +from conan.tools.apple import fix_apple_shared_install_name, is_apple_os from conan.tools.env import VirtualBuildEnv from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, replace_in_file, rm, rmdir from conan.tools.gnu import PkgConfigDeps @@ -32,7 +32,7 @@ class AtSpi2CoreConan(ConanFile): default_options = { "shared": False, "fPIC": True, - "with_x11": False, + "with_x11": True, } def export_sources(self): @@ -41,6 +41,8 @@ def export_sources(self): def config_options(self): if self.settings.os == "Windows": del self.options.fPIC + if self.settings.os not in ["Linux", "FreeBSD"]: + del self.options.with_x11 def configure(self): if self.options.shared: @@ -56,22 +58,20 @@ def build_requirements(self): def requirements(self): self.requires("glib/2.78.3") - if self.options.with_x11: - self.requires("xorg/system") - if self.settings.os == "Linux": + if self.settings.os in ["Linux", "FreeBSD"]: self.requires("dbus/1.15.8") + if self.options.get_safe("with_x11"): + self.requires("xorg/system") def validate(self): - if self.options.shared and not self.dependencies["glib"].options.shared: + if self.options.shared and not self.dependencies["glib"].options.shared: raise ConanInvalidConfiguration( "Linking a shared library against static glib can cause unexpected behaviour." ) - if Version(self.version) < "2.49.1": - if self.settings.os == "Windows": - raise ConanInvalidConfiguration("Windows is not supported before version 2.49.1") - if Version(self.version) < "2.50.0": - if self.settings.os == "Macos": - raise ConanInvalidConfiguration("macos is not supported before version 2.50.0") + if Version(self.version) < "2.49.1" and self.settings.os == "Windows": + raise ConanInvalidConfiguration("Windows is not supported before version 2.49.1") + if Version(self.version) < "2.50.0" and is_apple_os(self): + raise ConanInvalidConfiguration("macOS is not supported before version 2.50.0") def layout(self): basic_layout(self, src_folder="src") @@ -86,10 +86,10 @@ def generate(self): tc = MesonToolchain(self) if Version(self.version) >= "2.47.1": tc.project_options["introspection"] = "disabled" - tc.project_options["x11"] = "enabled" if self.options.with_x11 else "disabled" + tc.project_options["x11"] = "enabled" if self.options.get_safe("with_x11") else "disabled" else: tc.project_options["introspection"] = "no" - tc.project_options["x11"] = "yes" if self.options.with_x11 else "no" + tc.project_options["x11"] = "yes" if self.options.get_safe("with_x11") else "no" if self.settings.os != "Linux": tc.project_options["atk_only"] = "true" @@ -124,24 +124,25 @@ def package(self): fix_apple_shared_install_name(self) fix_msvc_libname(self) - def package_info(self): - if self.settings.os == "Linux": - self.cpp_info.components["atspi"].libs = ['atspi'] - self.cpp_info.components["atspi"].includedirs = ["include/at-spi-2.0"] - self.cpp_info.components["atspi"].requires = ["dbus::dbus", "glib::glib"] + if self.settings.os in ["Linux", "FreeBSD"]: self.cpp_info.components["atspi"].set_property("pkg_config_name", "atspi-2") + self.cpp_info.components["atspi"].libs = ["atspi"] + self.cpp_info.components["atspi"].includedirs = ["include/at-spi-2.0"] + self.cpp_info.components["atspi"].requires = ["dbus::dbus", "glib::glib-2.0", "glib::gobject-2.0"] + if self.options.with_x11: + self.cpp_info.components["atspi"].requires.extend(["xorg::x11", "xorg::xtst", "xorg::xi"]) + self.cpp_info.components["atk"].set_property("pkg_config_name", "atk") self.cpp_info.components["atk"].libs = ["atk-1.0"] - self.cpp_info.components["atk"].includedirs = ['include/atk-1.0'] - self.cpp_info.components["atk"].requires = ["glib::glib"] - self.cpp_info.components["atk"].set_property("pkg_config_name", 'atk') - - if self.settings.os == "Linux": - self.cpp_info.components["atk-bridge"].libs = ['atk-bridge-2.0'] - self.cpp_info.components["atk-bridge"].includedirs = [os.path.join('include', 'at-spi2-atk', '2.0')] - self.cpp_info.components["atk-bridge"].requires = ["dbus::dbus", "atk", "glib::glib", "atspi"] - self.cpp_info.components["atk-bridge"].set_property("pkg_config_name", 'atk-bridge-2.0') + self.cpp_info.components["atk"].includedirs = ["include/atk-1.0"] + self.cpp_info.components["atk"].requires = ["glib::glib-2.0", "glib::gobject-2.0"] + + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.components["atk-bridge"].set_property("pkg_config_name", "atk-bridge-2.0") + self.cpp_info.components["atk-bridge"].libs = ["atk-bridge-2.0"] + self.cpp_info.components["atk-bridge"].includedirs = [os.path.join("include", "at-spi2-atk", "2.0")] + self.cpp_info.components["atk-bridge"].requires = ["atspi", "atk", "glib::gmodule-2.0"] def fix_msvc_libname(conanfile, remove_lib_prefix=True): diff --git a/recipes/atomic_queue/all/conandata.yml b/recipes/atomic_queue/all/conandata.yml new file mode 100644 index 0000000000000..f19fe2ba05117 --- /dev/null +++ b/recipes/atomic_queue/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "1.6.3": + url: "https://github.com/max0x7ba/atomic_queue/archive/refs/tags/v1.6.3.tar.gz" + sha256: "0ad6e0203d90367f6a4e496449dfd9ad65b80168fadafef4eac08820c6bda79c" diff --git a/recipes/atomic_queue/all/conanfile.py b/recipes/atomic_queue/all/conanfile.py new file mode 100644 index 0000000000000..8e73409204f38 --- /dev/null +++ b/recipes/atomic_queue/all/conanfile.py @@ -0,0 +1,46 @@ +from conan import ConanFile +from conan.tools.build import check_min_cppstd +from conan.tools.files import copy, get +from conan.tools.layout import basic_layout +import os + +required_conan_version = ">=1.50.0" + +class CxxOptsConan(ConanFile): + name = "atomic_queue" + homepage = "https://github.com/max0x7ba/atomic_queue" + url = "https://github.com/conan-io/conan-center-index" + description = "Multiple-producer-multiple-consumer lock-free queues based on circular buffer and std::atomic." + license = "MIT" + topics = ("queue", "lockfree", "atomic") + package_type = "header-library" + settings = "os", "arch", "compiler", "build_type" + no_copy_source = True + + @property + def _min_cppstd(self): + return 14 + + def layout(self): + basic_layout(self, src_folder="src") + + def package_id(self): + self.info.clear() + + def validate(self): + if self.settings.compiler.get_safe("cppstd"): + check_min_cppstd(self, self._min_cppstd) + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def build(self): + pass + + def package(self): + copy(self, "LICENSE", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) + copy(self, pattern="*", src=os.path.join(self.source_folder, "include"), dst=os.path.join(self.package_folder, "include")) + + def package_info(self): + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] diff --git a/recipes/atomic_queue/all/test_package/CMakeLists.txt b/recipes/atomic_queue/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..2935185362d0c --- /dev/null +++ b/recipes/atomic_queue/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.8) +project(test_package LANGUAGES CXX) + +find_package(atomic_queue REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE atomic_queue::atomic_queue) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_14) diff --git a/recipes/atomic_queue/all/test_package/conanfile.py b/recipes/atomic_queue/all/test_package/conanfile.py new file mode 100644 index 0000000000000..081c97abefb38 --- /dev/null +++ b/recipes/atomic_queue/all/test_package/conanfile.py @@ -0,0 +1,26 @@ +import os +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import CMake, cmake_layout + +required_conan_version = ">=1.50.0" + +class TestPackageConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + self.run(os.path.join(self.cpp.build.bindirs[0], "test_package"), env="conanrun") diff --git a/recipes/atomic_queue/all/test_package/test_package.cpp b/recipes/atomic_queue/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..bdfe611442b89 --- /dev/null +++ b/recipes/atomic_queue/all/test_package/test_package.cpp @@ -0,0 +1,13 @@ +#include + +int main(int argc, char* argv[]) +{ + atomic_queue::AtomicQueue q; + + const int iPush = 42; + q.push(iPush); + + const int iPop = q.pop(); + + return (iPush - iPop); +} diff --git a/recipes/atomic_queue/config.yml b/recipes/atomic_queue/config.yml new file mode 100644 index 0000000000000..6a0b843662fca --- /dev/null +++ b/recipes/atomic_queue/config.yml @@ -0,0 +1,3 @@ +versions: + "1.6.3": + folder: "all" diff --git a/recipes/au/all/conandata.yml b/recipes/au/all/conandata.yml new file mode 100644 index 0000000000000..bce186970361a --- /dev/null +++ b/recipes/au/all/conandata.yml @@ -0,0 +1,9 @@ +sources: + "0.3.5": + url: "https://github.com/aurora-opensource/au/archive/refs/tags/0.3.5.tar.gz" + sha256: "7ec826dc42968dc1633de56e4f9d06e70de73e820d2ac4788e8453343a622c9b" +patches: + "0.3.5": + - patch_file: "patches/0001-v0.3.5-disable-gtest.patch" + patch_description: "Remove GTest dependency and disable tests build" + patch_type: "conan" diff --git a/recipes/au/all/conanfile.py b/recipes/au/all/conanfile.py new file mode 100644 index 0000000000000..a6d9acc2f5311 --- /dev/null +++ b/recipes/au/all/conanfile.py @@ -0,0 +1,90 @@ +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.build import check_min_cppstd +from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout +from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rm, rmdir +from conan.tools.scm import Version +import os + + +required_conan_version = ">=1.53.0" + +class PackageConan(ConanFile): + name = "au" + description = "A C++14-compatible physical units library" + license = "Apache-2.0" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/aurora-opensource/au" + topics = ("units", "C++14") + package_type = "header-library" + settings = "os", "arch", "compiler", "build_type" + + @property + def _min_cppstd(self): + return 14 + + @property + def _compilers_minimum_version(self): + return { + "apple-clang": "10", + "clang": "7", + "gcc": "7", + "msvc": "191", + "Visual Studio": "15", + } + + def export_sources(self): + export_conandata_patches(self) + + def layout(self): + cmake_layout(self, src_folder="src") + + def package_id(self): + self.info.clear() + + def validate(self): + if self.settings.compiler.cppstd: + check_min_cppstd(self, self._min_cppstd) + minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) + if minimum_version and Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration( + f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." + ) + + def build_requirements(self): + self.tool_requires("cmake/[>=3.24 <4]") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + tc.generate() + + def build(self): + apply_conandata_patches(self) + cmake = CMake(self) + cmake.configure() + cmake.build() + + def package(self): + cmake = CMake(self) + cmake.install() + + copy(self, "LICENSE.txt", self.source_folder, os.path.join(self.package_folder, "licenses")) + rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) + + def package_info(self): + self.cpp_info.set_property("cmake_file_name", "Au") + self.cpp_info.set_property("cmake_target_name", "Au::au") + + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.system_libs.append("m") + self.cpp_info.system_libs.append("pthread") + self.cpp_info.system_libs.append("dl") + + # TODO: to remove in conan v2 once cmake_find_package_* generators removed + self.cpp_info.filenames["cmake_find_package"] = "Au" + self.cpp_info.filenames["cmake_find_package_multi"] = "Au" + self.cpp_info.names["cmake_find_package"] = "Au::au" + self.cpp_info.names["cmake_find_package_multi"] = "Au::au" diff --git a/recipes/au/all/patches/0001-v0.3.5-disable-gtest.patch b/recipes/au/all/patches/0001-v0.3.5-disable-gtest.patch new file mode 100644 index 0000000000000..1fb8b92d19f4d --- /dev/null +++ b/recipes/au/all/patches/0001-v0.3.5-disable-gtest.patch @@ -0,0 +1,58 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index b18407f..dbd35af 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -37,23 +37,23 @@ set(AU_EXPORT_SET_NAME AuHeaders) + + enable_testing() + +-# Bring in GoogleTest so we can build and run the tests. +-include(FetchContent) +-FetchContent_Declare( +- googletest +- GIT_REPOSITORY https://github.com/google/googletest.git +- GIT_TAG 58d77fa8070e8cec2dc1ed015d66b454c8d78850 # Release 1.12.1 +- FIND_PACKAGE_ARGS +- 1.12.1 +- NAMES GTest +-) +- +-# https://google.github.io/googletest/quickstart-cmake.html +-# For Windows: Prevent overriding the parent project's compiler/linker settings +-set(gtest_force_shared_crt ON CACHE BOOL "" FORCE) +- +-FetchContent_MakeAvailable(googletest) +-include(GoogleTest) ++## Bring in GoogleTest so we can build and run the tests. ++#include(FetchContent) ++#FetchContent_Declare( ++# googletest ++# GIT_REPOSITORY https://github.com/google/googletest.git ++# GIT_TAG 58d77fa8070e8cec2dc1ed015d66b454c8d78850 # Release 1.12.1 ++# FIND_PACKAGE_ARGS ++# 1.12.1 ++# NAMES GTest ++#) ++# ++## https://google.github.io/googletest/quickstart-cmake.html ++## For Windows: Prevent overriding the parent project's compiler/linker settings ++#set(gtest_force_shared_crt ON CACHE BOOL "" FORCE) ++# ++#FetchContent_MakeAvailable(googletest) ++#include(GoogleTest) + + add_subdirectory(au) + +diff --git a/cmake/HeaderOnlyLibrary.cmake b/cmake/HeaderOnlyLibrary.cmake +index 28daf00..fbf0fab 100644 +--- a/cmake/HeaderOnlyLibrary.cmake ++++ b/cmake/HeaderOnlyLibrary.cmake +@@ -75,7 +75,7 @@ function(header_only_library) + ) + + # Add the test, if requested. +- if (DEFINED ARG_GTEST_SRCS) ++ if (OFF) + add_executable("${ARG_NAME}_test") + target_sources("${ARG_NAME}_test" PRIVATE ${ARG_GTEST_SRCS}) + target_link_libraries( diff --git a/recipes/au/all/test_package/CMakeLists.txt b/recipes/au/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..1c8798b44ab97 --- /dev/null +++ b/recipes/au/all/test_package/CMakeLists.txt @@ -0,0 +1,9 @@ +cmake_minimum_required(VERSION 3.15) + +project(test_package LANGUAGES CXX) + +find_package(Au REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE Au::au) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_14) diff --git a/recipes/au/all/test_package/conanfile.py b/recipes/au/all/test_package/conanfile.py new file mode 100644 index 0000000000000..02eb5ce439fb4 --- /dev/null +++ b/recipes/au/all/test_package/conanfile.py @@ -0,0 +1,27 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake +import os + + +# It will become the standard on Conan 2.x +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/au/all/test_package/test_package.cpp b/recipes/au/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..35bad3194d8e4 --- /dev/null +++ b/recipes/au/all/test_package/test_package.cpp @@ -0,0 +1,15 @@ +#include + +#include "au/au.hh" +#include "au/io.hh" +#include "au/units/meters.hh" + +using namespace au; + +int main(void) { + constexpr auto length = meters(100.0); + + std::cout << length << " == " << length.in(kilo(meters)) <<" km" << std::endl; + + return EXIT_SUCCESS; +} diff --git a/recipes/au/config.yml b/recipes/au/config.yml new file mode 100644 index 0000000000000..ef7972c36ec69 --- /dev/null +++ b/recipes/au/config.yml @@ -0,0 +1,3 @@ +versions: + "0.3.5": + folder: all diff --git a/recipes/audiofile/all/test_package/conanfile.py b/recipes/audiofile/all/test_package/conanfile.py index fb1d035fc5b12..d120a992c06a6 100644 --- a/recipes/audiofile/all/test_package/conanfile.py +++ b/recipes/audiofile/all/test_package/conanfile.py @@ -22,5 +22,4 @@ def build(self): def test(self): if can_run(self): bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") - wav_path = os.path.join(self.source_folder, "sine.wav") - self.run(f"{bin_path} {wav_path}", env="conanrun") + self.run(bin_path, env="conanrun") diff --git a/recipes/audiofile/all/test_package/sine.wav b/recipes/audiofile/all/test_package/sine.wav deleted file mode 100644 index a3225d12bf297..0000000000000 Binary files a/recipes/audiofile/all/test_package/sine.wav and /dev/null differ diff --git a/recipes/audiofile/all/test_package/test_package.cpp b/recipes/audiofile/all/test_package/test_package.cpp index d95bc64031cda..906aa9efa0327 100644 --- a/recipes/audiofile/all/test_package/test_package.cpp +++ b/recipes/audiofile/all/test_package/test_package.cpp @@ -1,18 +1,15 @@ // workaround for a missing include in v1.0.9 and earlier +#include +#include #include - #include -#include + int main(int argc, char **argv) { - if (argc < 2) { - std::cerr << "Need at least one argument" << std::endl; - return 1; - } AudioFile audioFile; - audioFile.load(argv[1]); + audioFile.load("fake-file.wav"); audioFile.printSummary(); return 0; } diff --git a/recipes/audiofile/all/test_v1_package/conanfile.py b/recipes/audiofile/all/test_v1_package/conanfile.py index 21642db6ce1ba..38f4483872d47 100644 --- a/recipes/audiofile/all/test_v1_package/conanfile.py +++ b/recipes/audiofile/all/test_v1_package/conanfile.py @@ -14,5 +14,4 @@ def build(self): def test(self): if not tools.cross_building(self): bin_path = os.path.join("bin", "test_package") - wav_path = os.path.join(self.source_folder, os.pardir, "test_package", "sine.wav") - self.run(f"{bin_path} {wav_path}", run_environment=True) + self.run(bin_path, run_environment=True) diff --git a/recipes/audiowaveform/all/conandata.yml b/recipes/audiowaveform/all/conandata.yml new file mode 100644 index 0000000000000..2e2ba28ceca12 --- /dev/null +++ b/recipes/audiowaveform/all/conandata.yml @@ -0,0 +1,15 @@ +sources: + "1.10.1": + url: "https://github.com/bbc/audiowaveform/archive/refs/tags/1.10.1.tar.gz" + sha256: "bd283d84dc84fda84f4090fddde9a5bef924c588dd7bf6acaa8f7b946efb42a4" +patches: + "1.10.1": + - patch_file: "patches/0001-1.10.1_find_packages.patch" + patch_description: "Inject thirdparties from conan" + patch_type: "conan" + - patch_file: "patches/0002-1.10.1_remove_flags.patch" + patch_description: "Remove custom compile flags" + patch_type: "conan" + - patch_file: "patches/0003-1.10.1_remove_documentation.patch" + patch_description: "Remove documenation" + patch_type: "conan" diff --git a/recipes/audiowaveform/all/conanfile.py b/recipes/audiowaveform/all/conanfile.py new file mode 100644 index 0000000000000..4d5e42ee98a02 --- /dev/null +++ b/recipes/audiowaveform/all/conanfile.py @@ -0,0 +1,94 @@ +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.build import check_min_cppstd, valid_min_cppstd +from conan.tools.files import apply_conandata_patches, export_conandata_patches, get, copy, rm, rmdir +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.microsoft import is_msvc +import os + + +required_conan_version = ">=1.53.0" + + +class AudiowaveformConan(ConanFile): + name = "audiowaveform" + description = "C++ program to generate waveform data and render waveform images from audio files" + license = "GPL-3.0-or-later" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://waveform.prototyping.bbc.co.uk/" + topics = ("audio", "c-plus-plus") + package_type = "application" + settings = "os", "arch", "compiler", "build_type" + + @property + def _min_cppstd(self): + return 11 + + def export_sources(self): + export_conandata_patches(self) + + def config_options(self): + pass + + def configure(self): + pass + + def layout(self): + cmake_layout(self, src_folder="src") + + def requirements(self): + self.requires("libgd/2.3.3") + self.requires("libid3tag/0.15.1b") + self.requires("libmad/0.15.1b") + self.requires("libsndfile/1.2.2") + self.requires("boost/1.85.0") + + def package_id(self): + del self.info.settings.compiler + + def validate(self): + if self.settings.compiler.cppstd: + check_min_cppstd(self, self._min_cppstd) + if is_msvc(self): + raise ConanInvalidConfiguration(f"{self.ref} can not be built on Visual Studio and msvc.") + + def build_requirements(self): + pass + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + tc.variables["ENABLE_TESTS"] = False + if not valid_min_cppstd(self, self._min_cppstd): + tc.variables["CMAKE_CXX_STANDARD"] = self._min_cppstd + tc.generate() + tc = CMakeDeps(self) + tc.generate() + + def _patch_sources(self): + apply_conandata_patches(self) + rm(self, "Find*.cmake", os.path.join(self.source_folder, "CMake")) + + def build(self): + self._patch_sources() + cmake = CMake(self) + cmake.configure() + cmake.build() + + def package(self): + copy(self, pattern="COPYING", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) + cmake = CMake(self) + cmake.install() + rmdir(self, os.path.join(self.package_folder, "share")) + + def package_info(self): + self.cpp_info.frameworkdirs = [] + self.cpp_info.libdirs = [] + self.cpp_info.resdirs = [] + self.cpp_info.includedirs = [] + + # TODO: Legacy, to be removed on Conan 2.0 + bin_folder = os.path.join(self.package_folder, "bin") + self.env_info.PATH.append(bin_folder) diff --git a/recipes/audiowaveform/all/patches/0001-1.10.1_find_packages.patch b/recipes/audiowaveform/all/patches/0001-1.10.1_find_packages.patch new file mode 100644 index 0000000000000..e4f3afcf4da27 --- /dev/null +++ b/recipes/audiowaveform/all/patches/0001-1.10.1_find_packages.patch @@ -0,0 +1,66 @@ +Use packages that are provided by conan +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -88,40 +88,11 @@ if(BUILD_STATIC) + endif() + endif(BUILD_STATIC) + +-find_package(LibGD REQUIRED) +-if(LIBGD_FOUND) +- message(STATUS "LIBGD_INCLUDE_DIRS='${LIBGD_INCLUDE_DIRS}'") +- message(STATUS "LIBGD_LIBRARIES=${LIBGD_LIBRARIES}") +- include_directories(${LIBGD_INCLUDE_DIRS}) +-endif(LIBGD_FOUND) +- +-find_package(LibSndFile REQUIRED) +-if(LIBSNDFILE_FOUND) +- message(STATUS "LIBSNDFILE_INCLUDE_DIRS='${LIBSNDFILE_INCLUDE_DIRS}'") +- message(STATUS "LIBSNDFILE_LIBRARIES=${LIBSNDFILE_LIBRARIES}") +- include_directories(${LIBSNDFILE_INCLUDE_DIRS}) +-endif(LIBSNDFILE_FOUND) +- +-find_package(LibMad REQUIRED) +-if(LIBMAD_FOUND) +- message(STATUS "LIBMAD_INCLUDE_DIRS='${LIBMAD_INCLUDE_DIRS}'") +- message(STATUS "LIBMAD_LIBRARIES=${LIBMAD_LIBRARIES}") +- include_directories(${LIBMAD_INCLUDE_DIRS}) +-endif(LIBMAD_FOUND) +- +-find_package(LibId3Tag REQUIRED) +-if(LIBID3TAG_FOUND) +- message(STATUS "LIBID3TAG_INCLUDE_DIRS='${LIBID3TAG_INCLUDE_DIRS}'") +- message(STATUS "LIBID3TAG_LIBRARIES=${LIBID3TAG_LIBRARIES}") +- include_directories(${LIBID3TAG_INCLUDE_DIRS}) +-endif(LIBID3TAG_FOUND) +- +-find_package(Boost 1.46.0 COMPONENTS program_options filesystem regex system REQUIRED) +-if(Boost_FOUND) +- message(STATUS "Boost_INCLUDE_DIRS='${Boost_INCLUDE_DIRS}'") +- message(STATUS "Boost_LIBRARIES='${Boost_LIBRARIES}'") +- include_directories(${Boost_INCLUDE_DIRS}) +-endif(Boost_FOUND) ++find_package(libgd REQUIRED CONFIG) ++find_package(SndFile REQUIRED CONFIG) ++find_package(libmad REQUIRED CONFIG) ++find_package(libid3tag REQUIRED CONFIG) ++find_package(Boost COMPONENTS program_options filesystem regex REQUIRED) + + #------------------------------------------------------------------------------- + # +@@ -278,11 +249,11 @@ add_executable(audiowaveform ${SRCS}) + + # Specify libraries to link against. + set(LIBS +- ${LIBSNDFILE_LIBRARIES} +- ${LIBGD_LIBRARIES} +- ${LIBMAD_LIBRARIES} +- ${LIBID3TAG_LIBRARIES} +- ${Boost_LIBRARIES} ++ SndFile::sndfile ++ libgd::libgd ++ libmad::libmad ++ libid3tag::libid3tag ++ Boost::program_options Boost::filesystem Boost::regex + ) + + target_link_libraries(audiowaveform ${LIBS}) diff --git a/recipes/audiowaveform/all/patches/0002-1.10.1_remove_flags.patch b/recipes/audiowaveform/all/patches/0002-1.10.1_remove_flags.patch new file mode 100644 index 0000000000000..ac2bac6bbfe1a --- /dev/null +++ b/recipes/audiowaveform/all/patches/0002-1.10.1_remove_flags.patch @@ -0,0 +1,19 @@ +Remove custom compile flags +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -162,6 +162,7 @@ if(CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS "4.6.3") + message(FATAL_ERROR "g++ 4.6.3 or later required") + endif() + ++if(0) + if(CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER "4.7") + set(CMAKE_CXX_FLAGS "-std=c++11") + else() +@@ -178,6 +179,7 @@ if(APPLE AND BUILD_STATIC) + set(CMAKE_CXX_FLAGS "-stdlib=libc++ ${CMAKE_CXX_FLAGS} -fvisibility=hidden -fvisibility-inlines-hidden") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fvisibility=hidden -fvisibility-inlines-hidden") + endif() ++endif() + + message(STATUS "CMAKE_CXX_COMPILER_VERSION='${CMAKE_CXX_COMPILER_VERSION}'") + message(STATUS "CMAKE_CXX_FLAGS='${CMAKE_CXX_FLAGS}'") diff --git a/recipes/audiowaveform/all/patches/0003-1.10.1_remove_documentation.patch b/recipes/audiowaveform/all/patches/0003-1.10.1_remove_documentation.patch new file mode 100644 index 0000000000000..c8cc66eaa8a38 --- /dev/null +++ b/recipes/audiowaveform/all/patches/0003-1.10.1_remove_documentation.patch @@ -0,0 +1,34 @@ +Remove documentation target +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -314,6 +314,7 @@ endif() + # + #------------------------------------------------------------------------------- + ++if(0) + file(MAKE_DIRECTORY ${PROJECT_BINARY_DIR}/doc) + + add_custom_command( +@@ -334,6 +335,7 @@ add_custom_target(doc + ) + + add_dependencies(audiowaveform doc) ++endif() + + #------------------------------------------------------------------------------- + # +@@ -347,6 +349,7 @@ message(STATUS "CMAKE_INSTALL_PREFIX='${CMAKE_INSTALL_PREFIX}'") + install(TARGETS audiowaveform DESTINATION bin) + + # Install man pages ++if(0) + install( + FILES ${PROJECT_BINARY_DIR}/doc/audiowaveform.1.gz + DESTINATION share/man/man1 +@@ -356,5 +359,6 @@ install( + FILES ${PROJECT_BINARY_DIR}/doc/audiowaveform.5.gz + DESTINATION share/man/man5 + ) ++endif() + + #------------------------------------------------------------------------------- diff --git a/recipes/audiowaveform/all/test_package/conanfile.py b/recipes/audiowaveform/all/test_package/conanfile.py new file mode 100644 index 0000000000000..5b8eaa02f81b6 --- /dev/null +++ b/recipes/audiowaveform/all/test_package/conanfile.py @@ -0,0 +1,13 @@ +from conan import ConanFile + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "VirtualBuildEnv" + test_type = "explicit" + + def build_requirements(self): + self.tool_requires(self.tested_reference_str) + + def test(self): + self.run("audiowaveform --version") diff --git a/recipes/audiowaveform/config.yml b/recipes/audiowaveform/config.yml new file mode 100644 index 0000000000000..5492c2a9aab5c --- /dev/null +++ b/recipes/audiowaveform/config.yml @@ -0,0 +1,3 @@ +versions: + "1.10.1": + folder: all diff --git a/recipes/avahi/all/conanfile.py b/recipes/avahi/all/conanfile.py index 7c5e4d7f868ae..2920eabb9e448 100644 --- a/recipes/avahi/all/conanfile.py +++ b/recipes/avahi/all/conanfile.py @@ -46,7 +46,7 @@ def layout(self): def requirements(self): self.requires("glib/2.78.3") - self.requires("expat/2.6.0") + self.requires("expat/[>=2.6.2 <3]") self.requires("libdaemon/0.14") self.requires("dbus/1.15.8") self.requires("gdbm/1.23") diff --git a/recipes/avcpp/all/conandata.yml b/recipes/avcpp/all/conandata.yml index 1ba5e69f511c2..88c010aba2113 100644 --- a/recipes/avcpp/all/conandata.yml +++ b/recipes/avcpp/all/conandata.yml @@ -1,17 +1,30 @@ sources: + "2.4.0": + url: "https://github.com/h4tr3d/avcpp/archive/refs/tags/v2.4.0.tar.gz" + sha256: "47e044c10fa232f0d12d80351e675d5a5ef1480f81a93f288f33f8d03e94ae17" + "2.3.2": + url: "https://github.com/h4tr3d/avcpp/archive/refs/tags/v2.3.2.tar.gz" + sha256: "ce1a7296e6b1bf808ad4f9f486723c88e4cd12d80a96e226635ce3316ca73733" + "2.3.0": + url: "https://github.com/h4tr3d/avcpp/archive/refs/tags/v2.3.0.tar.gz" + sha256: "8ecb98caa9640a21772562c326f7c1f6ad99cd7f15d7ea40fe37d114fabbe2b5" "2.1.0": url: "https://github.com/h4tr3d/avcpp/archive/refs/tags/v2.1.0.tar.gz" sha256: "8398217dccb9f5b4cbb41e5bf4f73f47b461ed3ba8c3aefdda9f9dd714649855" - "cci.20220301": - url: "https://github.com/h4tr3d/avcpp/archive/fd4bc4662eb39853de8fcac4a663bebd0eea30b8.tar.gz" - sha256: "e48eae2ec154bc69aed16159c8b18c9ffb4925ba672b022e94a3c9b96782a4bf" - patches: - "2.1.0": - - patch_file: "patches/2.1.0-fix-ffmpeg.patch" + "2.4.0": + - patch_file: "patches/2.3.0-fix-ffmpeg.patch" + patch_description: "fix ffmpeg package name and remove ffmpeg from install targets" + patch_type: "conan" + "2.3.2": + - patch_file: "patches/2.3.0-fix-ffmpeg.patch" patch_description: "fix ffmpeg package name and remove ffmpeg from install targets" patch_type: "conan" - "cci.20220301": - - patch_file: "patches/cci.20220301-fix-ffmpeg.patch" + "2.3.0": + - patch_file: "patches/2.3.0-fix-ffmpeg.patch" + patch_description: "fix ffmpeg package name and remove ffmpeg from install targets" + patch_type: "conan" + "2.1.0": + - patch_file: "patches/2.1.0-fix-ffmpeg.patch" patch_description: "fix ffmpeg package name and remove ffmpeg from install targets" patch_type: "conan" diff --git a/recipes/avcpp/all/conanfile.py b/recipes/avcpp/all/conanfile.py index e1479bc47146c..dfef33000726b 100644 --- a/recipes/avcpp/all/conanfile.py +++ b/recipes/avcpp/all/conanfile.py @@ -56,7 +56,7 @@ def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - self.requires("ffmpeg/5.0") + self.requires("ffmpeg/6.1", transitive_headers=True) def validate(self): if self.settings.compiler.get_safe("cppstd"): @@ -68,6 +68,10 @@ def validate(self): f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." ) + def build_requirements(self): + if Version(self.version) >= "2.2.0": + self.tool_requires("cmake/[>=3.19 <4]") + def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) diff --git a/recipes/avcpp/all/patches/2.3.0-fix-ffmpeg.patch b/recipes/avcpp/all/patches/2.3.0-fix-ffmpeg.patch new file mode 100644 index 0000000000000..e316cd9d624ba --- /dev/null +++ b/recipes/avcpp/all/patches/2.3.0-fix-ffmpeg.patch @@ -0,0 +1,46 @@ +diff --git CMakeLists.txt CMakeLists.txt +index b086352..91d3165 100644 +--- CMakeLists.txt ++++ CMakeLists.txt +@@ -9,8 +9,6 @@ endif() + + project(AvCpp LANGUAGES CXX VERSION ${AVCPP_VERSION}) + +-set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake ${CMAKE_MODULE_PATH}) +- + set(FFMPEG_PKG_CONFIG_SUFFIX "" CACHE STRING "This suffix uses for FFmpeg component names searches by pkg-config") + set(AV_ENABLE_STATIC On CACHE BOOL "Enable static library build (On)") + set(AV_ENABLE_SHARED On CACHE BOOL "Enable shared library build (On)") +@@ -31,8 +29,8 @@ set (AVCPP_WARNING_OPTIONS + set(THREADS_PREFER_PTHREAD_FLAG ON) + find_package(Threads) + +-find_package(FFmpeg +- COMPONENTS AVCODEC AVFORMAT AVUTIL AVDEVICE AVFILTER SWSCALE SWRESAMPLE REQUIRED) ++find_package(ffmpeg ++ COMPONENTS avcodec avformat avutil avdevice avfilter swscale swresample REQUIRED) + + add_subdirectory(src) + +diff --git src/CMakeLists.txt src/CMakeLists.txt +index 3c00150..c3818cf 100644 +--- src/CMakeLists.txt ++++ src/CMakeLists.txt +@@ -29,7 +29,7 @@ foreach(TARGET ${AV_TARGETS}) + + target_compile_options(${TARGET} PRIVATE ${AVCPP_WARNING_OPTIONS}) + target_compile_definitions(${TARGET} PUBLIC __STDC_CONSTANT_MACROS) +- target_link_libraries(${TARGET} PRIVATE Threads::Threads PUBLIC FFmpeg::FFmpeg) ++ target_link_libraries(${TARGET} PRIVATE Threads::Threads PUBLIC ffmpeg::ffmpeg) + target_include_directories(${TARGET} + PUBLIC + $ +@@ -58,7 +58,7 @@ if (AVCPP_NOT_SUBPROJECT) + # APPEND + # FILE ${CMAKE_CURRENT_BINARY_DIR}/avcpp-targets.cmake) + +- install(TARGETS ${AV_TARGETS} FFmpeg ++ install(TARGETS ${AV_TARGETS} + EXPORT avcpp-targets + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} diff --git a/recipes/avcpp/all/patches/cci.20220301-fix-ffmpeg.patch b/recipes/avcpp/all/patches/cci.20220301-fix-ffmpeg.patch deleted file mode 100644 index 3207ead4b4610..0000000000000 --- a/recipes/avcpp/all/patches/cci.20220301-fix-ffmpeg.patch +++ /dev/null @@ -1,46 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index a5fed05..d077b96 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -6,7 +6,7 @@ endif() - - project(AvCpp LANGUAGES CXX VERSION 2.0.99) - --set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake ${CMAKE_MODULE_PATH}) -+# set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake ${CMAKE_MODULE_PATH}) - - set(FFMPEG_PKG_CONFIG_SUFFIX "" CACHE STRING "This suffix uses for FFmpeg component names searches by pkg-config") - set(AV_ENABLE_STATIC On CACHE BOOL "Enable static library build (On)") -@@ -28,8 +28,8 @@ set (AVCPP_WARNING_OPTIONS - set(THREADS_PREFER_PTHREAD_FLAG ON) - find_package(Threads) - --find_package(FFmpeg -- COMPONENTS AVCODEC AVFORMAT AVUTIL AVDEVICE AVFILTER SWSCALE SWRESAMPLE REQUIRED) -+find_package(ffmpeg -+ COMPONENTS avcodec avformat avutil avdevice avfilter swscale swresample REQUIRED) - - add_subdirectory(src) - -diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt -index 80c6faa..262c16c 100644 ---- a/src/CMakeLists.txt -+++ b/src/CMakeLists.txt -@@ -24,7 +24,7 @@ foreach(TARGET ${AV_TARGETS}) - add_library(${TARGET} ${TYPE} ${AV_SOURCES} ${AV_HEADERS}) - - target_compile_options(${TARGET} PRIVATE ${AVCPP_WARNING_OPTIONS}) -- target_link_libraries(${TARGET} PRIVATE Threads::Threads PUBLIC FFmpeg::FFmpeg) -+ target_link_libraries(${TARGET} PRIVATE Threads::Threads PUBLIC ffmpeg::ffmpeg) - target_include_directories(${TARGET} - PUBLIC - $ -@@ -53,7 +53,7 @@ if (AVCPP_NOT_SUBPROJECT) - # APPEND - # FILE ${CMAKE_CURRENT_BINARY_DIR}/avcpp-targets.cmake) - -- install(TARGETS ${AV_TARGETS} FFmpeg -+ install(TARGETS ${AV_TARGETS} - EXPORT avcpp-targets - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} diff --git a/recipes/avcpp/config.yml b/recipes/avcpp/config.yml index deb0eb011c7ea..ceaa4af535269 100644 --- a/recipes/avcpp/config.yml +++ b/recipes/avcpp/config.yml @@ -1,5 +1,9 @@ versions: - "2.1.0": + "2.4.0": + folder: all + "2.3.2": folder: all - "cci.20220301": + "2.3.0": + folder: all + "2.1.0": folder: all diff --git a/recipes/aws-c-auth/all/conandata.yml b/recipes/aws-c-auth/all/conandata.yml index 027010126b13f..be2876a831b62 100644 --- a/recipes/aws-c-auth/all/conandata.yml +++ b/recipes/aws-c-auth/all/conandata.yml @@ -1,28 +1,7 @@ sources: - "0.7.8": - url: "https://github.com/awslabs/aws-c-auth/archive/v0.7.8.tar.gz" - sha256: "5db8ab91262b5c055e3634f2c9dc2bc1a3285c2dd5513fdcafcb3e79468dc7de" - "0.7.7": - url: "https://github.com/awslabs/aws-c-auth/archive/v0.7.7.tar.gz" - sha256: "ea3c9e75b59b36aaf9147deec655d1669f197745bbe914cd3b8e234740be29ba" - "0.6.17": - url: "https://github.com/awslabs/aws-c-auth/archive/v0.6.17.tar.gz" - sha256: "b43678ad3a779c9c7fccf8f931c162eaaf4d5d64d2955ac1fcfd32e538545c0f" - "0.6.11": - url: "https://github.com/awslabs/aws-c-auth/archive/v0.6.11.tar.gz" - sha256: "d8a0d373cf8b0ff148a014ae2ba24c51f2e7a598b5b0cf3a6e64482c1cd37f90" - "0.6.8": - url: "https://github.com/awslabs/aws-c-auth/archive/v0.6.8.tar.gz" - sha256: "48b1c0008265ea8e7d7b653b34640ce8111e00d6e0e3f4855f3fba71e1ac5704" + "0.7.16": + url: "https://github.com/awslabs/aws-c-auth/archive/v0.7.16.tar.gz" + sha256: "7ee5afe05482f750dd0406b8b5b55dafb446fc21288f98c0b4118d62795003ba" "0.6.4": url: "https://github.com/awslabs/aws-c-auth/archive/v0.6.4.tar.gz" sha256: "119cec67e85b01af8c01b11d962c610d8e9b183cde96fee77db669cccaa19ac9" - "0.6.0": - url: "https://github.com/awslabs/aws-c-auth/archive/v0.6.0.tar.gz" - sha256: "5f5fff63110c3e8f619385ca563f77886bc101d3e054987eecbb87586e27b651" -patches: - "0.6.17": - - patch_file: "patches/0.6.17-0001-fix-macro-usage.patch" - patch_description: "Fix inconsistent usage of macros" - patch_type: "backport" - patch_source: "https://github.com/awslabs/aws-c-auth/pull/181" diff --git a/recipes/aws-c-auth/all/conanfile.py b/recipes/aws-c-auth/all/conanfile.py index edc82083e9c0b..924a52fe64d4d 100644 --- a/recipes/aws-c-auth/all/conanfile.py +++ b/recipes/aws-c-auth/all/conanfile.py @@ -47,23 +47,17 @@ def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - if Version(self.version) <= "0.6.17": - self.requires("aws-c-common/0.8.2", transitive_headers=True, transitive_libs=True) - self.requires("aws-c-cal/0.5.13") - if Version(self.version) < "0.6.17": - self.requires("aws-c-io/0.10.20", transitive_headers=True, transitive_libs=True) - self.requires("aws-c-http/0.6.13", transitive_headers=True) - else: - self.requires("aws-c-io/0.13.4", transitive_headers=True, transitive_libs=True) - self.requires("aws-c-http/0.6.22", transitive_headers=True) - if Version(self.version) >= "0.6.5": - self.requires("aws-c-sdkutils/0.1.3", transitive_headers=True) - else: - self.requires("aws-c-common/0.9.6", transitive_headers=True, transitive_libs=True) - self.requires("aws-c-cal/0.6.9") - self.requires("aws-c-io/0.13.35", transitive_headers=True, transitive_libs=True) - self.requires("aws-c-http/0.7.14", transitive_headers=True) - self.requires("aws-c-sdkutils/0.1.12", transitive_headers=True) + if self.version == "0.7.16": + self.requires("aws-c-common/0.9.15", transitive_headers=True, transitive_libs=True) + self.requires("aws-c-cal/0.6.14") + self.requires("aws-c-io/0.14.7", transitive_headers=True, transitive_libs=True) + self.requires("aws-c-http/0.8.1", transitive_headers=True) + self.requires("aws-c-sdkutils/0.1.15", transitive_headers=True) + if self.version == "0.6.4": + self.requires("aws-c-common/0.6.11", transitive_headers=True, transitive_libs=True) + self.requires("aws-c-cal/0.5.12") + self.requires("aws-c-io/0.10.9", transitive_headers=True, transitive_libs=True) + self.requires("aws-c-http/0.6.7", transitive_headers=True) def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) diff --git a/recipes/aws-c-auth/all/patches/0.6.17-0001-fix-macro-usage.patch b/recipes/aws-c-auth/all/patches/0.6.17-0001-fix-macro-usage.patch deleted file mode 100644 index bed12b1bd563b..0000000000000 --- a/recipes/aws-c-auth/all/patches/0.6.17-0001-fix-macro-usage.patch +++ /dev/null @@ -1,132 +0,0 @@ -diff --git a/source/aws_signing.c b/source/aws_signing.c -index 940d7be..ecc1144 100644 ---- a/source/aws_signing.c -+++ b/source/aws_signing.c -@@ -2500,7 +2500,7 @@ int aws_verify_sigv4a_signing( - aws_credentials_release(signing_state->config.credentials); - signing_state->config.credentials = ecc_credentials; - if (signing_state->config.credentials == NULL) { -- AWS_LOGF_ERROR(AWS_LS_AUTH_SIGNING, "Unable to create ECC from provided credentials") -+ AWS_LOGF_ERROR(AWS_LS_AUTH_SIGNING, "Unable to create ECC from provided credentials"); - goto done; - } - } -diff --git a/source/credentials_provider_process.c b/source/credentials_provider_process.c -index 655df86..29f99d0 100644 ---- a/source/credentials_provider_process.c -+++ b/source/credentials_provider_process.c -@@ -187,7 +187,7 @@ static struct aws_string *s_get_command(struct aws_allocator *allocator, struct - if (!command_buf.len) { - AWS_LOGF_ERROR( - AWS_LS_AUTH_CREDENTIALS_PROVIDER, -- "Failed to resolve credentials_process command during process credentials provider initialization.") -+ "Failed to resolve credentials_process command during process credentials provider initialization."); - goto on_finish; - } - -@@ -202,7 +202,7 @@ static struct aws_string *s_get_command(struct aws_allocator *allocator, struct - - AWS_LOGF_DEBUG( - AWS_LS_AUTH_CREDENTIALS_PROVIDER, -- "Successfully loaded credentials_process command for process credentials provider.") -+ "Successfully loaded credentials_process command for process credentials provider."); - - on_finish: - aws_string_destroy(profile_name); -diff --git a/source/credentials_provider_sts_web_identity.c b/source/credentials_provider_sts_web_identity.c -index cb03cb5..c3e4697 100644 ---- a/source/credentials_provider_sts_web_identity.c -+++ b/source/credentials_provider_sts_web_identity.c -@@ -231,7 +231,7 @@ static bool s_parse_retryable_error_from_response(struct aws_allocator *allocato - if (xml_parser == NULL) { - AWS_LOGF_ERROR( - AWS_LS_AUTH_CREDENTIALS_PROVIDER, -- "Failed to init xml parser for sts web identity credentials provider to parse error information.") -+ "Failed to init xml parser for sts web identity credentials provider to parse error information."); - return false; - } - bool get_retryable_error = false; -@@ -330,14 +330,14 @@ static struct aws_credentials *s_parse_credentials_from_response( - if (xml_parser == NULL) { - AWS_LOGF_ERROR( - AWS_LS_AUTH_CREDENTIALS_PROVIDER, -- "Failed to init xml parser for sts web identity credentials provider to parse error information.") -+ "Failed to init xml parser for sts web identity credentials provider to parse error information."); - return NULL; - } - uint64_t now = UINT64_MAX; - if (aws_sys_clock_get_ticks(&now) != AWS_OP_SUCCESS) { - AWS_LOGF_ERROR( - AWS_LS_AUTH_CREDENTIALS_PROVIDER, -- "Failed to get sys clock for sts web identity credentials provider to parse error information.") -+ "Failed to get sys clock for sts web identity credentials provider to parse error information."); - goto on_finish; - } - uint64_t now_seconds = aws_timestamp_convert(now, AWS_TIMESTAMP_NANOS, AWS_TIMESTAMP_SECS, NULL); -@@ -998,7 +998,7 @@ static struct sts_web_identity_parameters *s_parameters_new(struct aws_allocator - AWS_LOGF_ERROR( - AWS_LS_AUTH_CREDENTIALS_PROVIDER, - "Failed to resolve either region, role arn or token file path during sts web identity provider " -- "initialization.") -+ "initialization."); - goto on_finish; - - } else { -@@ -1021,7 +1021,7 @@ static struct sts_web_identity_parameters *s_parameters_new(struct aws_allocator - aws_byte_buf_init_copy_from_cursor(¶meters->role_arn, allocator, aws_byte_cursor_from_string(role_arn))) { - AWS_LOGF_ERROR( - AWS_LS_AUTH_CREDENTIALS_PROVIDER, -- "Failed to resolve role arn during sts web identity provider initialization.") -+ "Failed to resolve role arn during sts web identity provider initialization."); - goto on_finish; - } - -@@ -1031,7 +1031,7 @@ static struct sts_web_identity_parameters *s_parameters_new(struct aws_allocator - ¶meters->token_file_path, allocator, aws_byte_cursor_from_string(token_file_path))) { - AWS_LOGF_ERROR( - AWS_LS_AUTH_CREDENTIALS_PROVIDER, -- "Failed to resolve token file path during sts web identity provider initialization.") -+ "Failed to resolve token file path during sts web identity provider initialization."); - goto on_finish; - } - -@@ -1047,7 +1047,7 @@ static struct sts_web_identity_parameters *s_parameters_new(struct aws_allocator - - AWS_LOGF_DEBUG( - AWS_LS_AUTH_CREDENTIALS_PROVIDER, -- "Successfully loaded all required parameters for sts web identity credentials provider.") -+ "Successfully loaded all required parameters for sts web identity credentials provider."); - success = true; - - on_finish: -diff --git a/source/credentials_utils.c b/source/credentials_utils.c -index 061e26b..2cb61d6 100644 ---- a/source/credentials_utils.c -+++ b/source/credentials_utils.c -@@ -98,7 +98,7 @@ static bool s_parse_expiration_value_from_json_object( - - if (expiration_cursor.len == 0) { - AWS_LOGF_INFO( -- AWS_LS_AUTH_CREDENTIALS_PROVIDER, "Parsed a credentials json document with empty expiration.") -+ AWS_LS_AUTH_CREDENTIALS_PROVIDER, "Parsed a credentials json document with empty expiration."); - return false; - } - -@@ -211,7 +211,7 @@ struct aws_credentials *aws_parse_credentials_from_aws_json_object( - if (access_key_id_cursor.len == 0 || secrete_access_key_cursor.len == 0) { - AWS_LOGF_ERROR( - AWS_LS_AUTH_CREDENTIALS_PROVIDER, -- "Parsed an unexpected credentials json document, either access key, secret key is empty.") -+ "Parsed an unexpected credentials json document, either access key, secret key is empty."); - goto done; - } - -@@ -222,7 +222,7 @@ struct aws_credentials *aws_parse_credentials_from_aws_json_object( - aws_json_value_get_string(token, &session_token_cursor); - if (options->token_required && session_token_cursor.len == 0) { - AWS_LOGF_ERROR( -- AWS_LS_AUTH_CREDENTIALS_PROVIDER, "Parsed an unexpected credentials json document with empty token.") -+ AWS_LS_AUTH_CREDENTIALS_PROVIDER, "Parsed an unexpected credentials json document with empty token."); - goto done; - } - } diff --git a/recipes/aws-c-auth/config.yml b/recipes/aws-c-auth/config.yml index 8edcc1ff10f28..485e385b44014 100644 --- a/recipes/aws-c-auth/config.yml +++ b/recipes/aws-c-auth/config.yml @@ -1,15 +1,5 @@ versions: - "0.7.8": - folder: all - "0.7.7": - folder: all - "0.6.17": - folder: all - "0.6.11": - folder: all - "0.6.8": + "0.7.16": folder: all "0.6.4": folder: all - "0.6.0": - folder: all diff --git a/recipes/aws-c-cal/all/conandata.yml b/recipes/aws-c-cal/all/conandata.yml index 0bf0d966b7d3a..e4a0abfc8c668 100644 --- a/recipes/aws-c-cal/all/conandata.yml +++ b/recipes/aws-c-cal/all/conandata.yml @@ -1,56 +1,11 @@ sources: - "0.6.9": - url: "https://github.com/awslabs/aws-c-cal/archive/v0.6.9.tar.gz" - sha256: "46defd807034ca9d873cc1459bc60f0bb4662029f7120db1af464421907fb480" - "0.6.1": - url: "https://github.com/awslabs/aws-c-cal/archive/v0.6.1.tar.gz" - sha256: "52df95150a8548ac35a0e4b6f59fbdebff27e4124c0b7e5eaa969ed3ba62fc82" - "0.5.20": - url: "https://github.com/awslabs/aws-c-cal/archive/v0.5.20.tar.gz" - sha256: "acc352359bd06f8597415c366cf4ec4f00d0b0da92d637039a73323dd55b6cd0" - "0.5.19": - url: "https://github.com/awslabs/aws-c-cal/archive/refs/tags/v0.5.19.tar.gz" - sha256: "23452ab7960c480f1ec0a96ac55bde32d7d27c4a664baeadc248923b19c12086" - "0.5.17": - url: "https://github.com/awslabs/aws-c-cal/archive/v0.5.17.tar.gz" - sha256: "40297da04443d4ee2988d1c5fb0dc4a156d0e4cfaf80e6a1df1867452566d540" - "0.5.13": - url: "https://github.com/awslabs/aws-c-cal/archive/v0.5.13.tar.gz" - sha256: "3aba3954877ea5271ce68361f3bd9c155b422b1149eed403874f6493285ca04d" + "0.6.14": + url: "https://github.com/awslabs/aws-c-cal/archive/v0.6.14.tar.gz" + sha256: "2326304b15bec45b212f6b738020c21afa41f9da295936687e103f9f2efb7b5e" "0.5.12": url: "https://github.com/awslabs/aws-c-cal/archive/v0.5.12.tar.gz" sha256: "350c29a288d5d498bd6574fca659cffc9453bf62691fbde5788399716c2bd132" patches: - "0.6.9": - - patch_file: "patches/0002-apple-corefoundation-0.6.9.patch" - patch_description: "Link to CoreFoundation on Apple" - patch_type: "backport" - patch_source: "https://github.com/awslabs/aws-c-cal/pull/126" - "0.6.1": - - patch_file: "patches/0002-apple-corefoundation-0.6.1.patch" - patch_description: "Link to CoreFoundation on Apple" - patch_type: "backport" - patch_source: "https://github.com/awslabs/aws-c-cal/pull/126" - "0.5.20": - - patch_file: "patches/0002-apple-corefoundation-0.5.13.patch" - patch_description: "Link to CoreFoundation on Apple" - patch_type: "backport" - patch_source: "https://github.com/awslabs/aws-c-cal/pull/126" - "0.5.19": - - patch_file: "patches/0002-apple-corefoundation-0.5.13.patch" - patch_description: "Link to CoreFoundation on Apple" - patch_type: "backport" - patch_source: "https://github.com/awslabs/aws-c-cal/pull/126" - "0.5.17": - - patch_file: "patches/0002-apple-corefoundation-0.5.13.patch" - patch_description: "Link to CoreFoundation on Apple" - patch_type: "backport" - patch_source: "https://github.com/awslabs/aws-c-cal/pull/126" - "0.5.13": - - patch_file: "patches/0002-apple-corefoundation-0.5.13.patch" - patch_description: "Link to CoreFoundation on Apple" - patch_type: "backport" - patch_source: "https://github.com/awslabs/aws-c-cal/pull/126" "0.5.12": - patch_file: "patches/0001-use-openssl-cmake-imported-target.patch" - patch_file: "patches/0002-apple-corefoundation-0.5.11.patch" diff --git a/recipes/aws-c-cal/all/conanfile.py b/recipes/aws-c-cal/all/conanfile.py index de7ce7d5e222d..c0ea74e4902c8 100644 --- a/recipes/aws-c-cal/all/conanfile.py +++ b/recipes/aws-c-cal/all/conanfile.py @@ -48,10 +48,10 @@ def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - if Version(self.version) <= "0.5.20": - self.requires("aws-c-common/0.8.2", transitive_headers=True, transitive_libs=True) - else: - self.requires("aws-c-common/0.9.6", transitive_headers=True, transitive_libs=True) + if self.version == "0.6.14": + self.requires("aws-c-common/0.9.15", transitive_headers=True, transitive_libs=True) + if self.version == "0.5.12": + self.requires("aws-c-common/0.6.11", transitive_headers=True, transitive_libs=True) if self._needs_openssl: self.requires("openssl/[>=1.1 <4]") diff --git a/recipes/aws-c-cal/all/patches/0002-apple-corefoundation-0.5.13.patch b/recipes/aws-c-cal/all/patches/0002-apple-corefoundation-0.5.13.patch deleted file mode 100644 index 422624b80de7e..0000000000000 --- a/recipes/aws-c-cal/all/patches/0002-apple-corefoundation-0.5.13.patch +++ /dev/null @@ -1,26 +0,0 @@ ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -78,7 +78,12 @@ elseif (APPLE) - message(FATAL_ERROR "Security Framework not found") - endif () - -- list(APPEND PLATFORM_LIBS "-framework Security") -+ find_library(COREFOUNDATION_LIB CoreFoundation) -+ if(NOT COREFOUNDATION_LIB) -+ message(FATAL_ERROR "CoreFoundation Framework not found") -+ endif() -+ -+ list(APPEND PLATFORM_LIBS "-framework Security -framework CoreFoundation") - endif() - else () - if (NOT BYO_CRYPTO) ---- a/source/darwin/securityframework_ecc.c -+++ b/source/darwin/securityframework_ecc.c -@@ -7,6 +7,7 @@ - #include - #include - -+#include - #include - #include - diff --git a/recipes/aws-c-cal/all/patches/0002-apple-corefoundation-0.6.1.patch b/recipes/aws-c-cal/all/patches/0002-apple-corefoundation-0.6.1.patch deleted file mode 100644 index 616d8257a2980..0000000000000 --- a/recipes/aws-c-cal/all/patches/0002-apple-corefoundation-0.6.1.patch +++ /dev/null @@ -1,26 +0,0 @@ ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -84,7 +84,12 @@ elseif (APPLE) - message(FATAL_ERROR "Security Framework not found") - endif () - -- list(APPEND PLATFORM_LIBS "-framework Security") -+ find_library(COREFOUNDATION_LIB CoreFoundation) -+ if(NOT COREFOUNDATION_LIB) -+ message(FATAL_ERROR "CoreFoundation Framework not found") -+ endif() -+ -+ list(APPEND PLATFORM_LIBS "-framework Security -framework CoreFoundation") - endif() - else () - if (NOT BYO_CRYPTO) ---- a/source/darwin/securityframework_ecc.c -+++ b/source/darwin/securityframework_ecc.c -@@ -7,6 +7,7 @@ - #include - #include - -+#include - #include - #include - diff --git a/recipes/aws-c-cal/all/patches/0002-apple-corefoundation-0.6.9.patch b/recipes/aws-c-cal/all/patches/0002-apple-corefoundation-0.6.9.patch deleted file mode 100644 index 1059e3dd42f14..0000000000000 --- a/recipes/aws-c-cal/all/patches/0002-apple-corefoundation-0.6.9.patch +++ /dev/null @@ -1,30 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index d57a3fd..7d1d5f2 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -79,7 +79,11 @@ elseif (APPLE) - message(FATAL_ERROR "Security Framework not found") - endif () - -- list(APPEND PLATFORM_LIBS "-framework Security") -+ find_library(COREFOUNDATION_LIB CoreFoundation) -+ if(NOT COREFOUNDATION_LIB) -+ message(FATAL_ERROR "CoreFoundation Framework not found") -+ endif() -+ list(APPEND PLATFORM_LIBS "-framework Security -framework CoreFoundation") - endif() - else () - if (NOT BYO_CRYPTO) -diff --git a/source/darwin/securityframework_ecc.c b/source/darwin/securityframework_ecc.c -index adedadd..d34531e 100644 ---- a/source/darwin/securityframework_ecc.c -+++ b/source/darwin/securityframework_ecc.c -@@ -6,7 +6,7 @@ - - #include - #include -- -+#include - #include - #include - diff --git a/recipes/aws-c-cal/config.yml b/recipes/aws-c-cal/config.yml index f62f1684b8f2a..05b13d1c5771c 100644 --- a/recipes/aws-c-cal/config.yml +++ b/recipes/aws-c-cal/config.yml @@ -1,15 +1,5 @@ versions: - "0.6.9": - folder: all - "0.6.1": - folder: all - "0.5.20": - folder: all - "0.5.19": - folder: all - "0.5.17": - folder: all - "0.5.13": + "0.6.14": folder: all "0.5.12": folder: all diff --git a/recipes/aws-c-common/all/conandata.yml b/recipes/aws-c-common/all/conandata.yml index 0b34391746ed3..615dbce394f02 100644 --- a/recipes/aws-c-common/all/conandata.yml +++ b/recipes/aws-c-common/all/conandata.yml @@ -1,36 +1,7 @@ sources: - "0.9.12": - url: "https://github.com/awslabs/aws-c-common/archive/v0.9.12.tar.gz" - sha256: "10ef8f5629fb6ac24aa4893f3bb9a8480997e96a58c81043e019bf6b149f4332" - "0.9.6": - url: "https://github.com/awslabs/aws-c-common/archive/v0.9.6.tar.gz" - sha256: "5c30cc066a7f05fb8e4728f93aeed0e0e2698197a6df76237ac4e1200977d090" - "0.9.3": - url: "https://github.com/awslabs/aws-c-common/archive/v0.9.3.tar.gz" - sha256: "389eaac7f64d7d5a91ca3decad6810429eb5a65bbba54798b9beffcb4d1d1ed6" - "0.9.0": - url: "https://github.com/awslabs/aws-c-common/archive/v0.9.0.tar.gz" - sha256: "9b62ab1dcece3107810ea4f4511fe8e1e010a83cb0cb502b6ec685ce752a7b0c" - "0.8.23": - url: "https://github.com/awslabs/aws-c-common/archive/v0.8.23.tar.gz" - sha256: "67455d8149c74b1db3e4dd68db47dc7372de02dd78fbc620f9c7f0270d9d6018" - "0.8.2": - url: "https://github.com/awslabs/aws-c-common/archive/v0.8.2.tar.gz" - sha256: "36edc6e486c43bbb34059dde227e872c0d41ab54f0b3609d38f188cfbbc6d1f8" - "0.7.5": - url: "https://github.com/awslabs/aws-c-common/archive/v0.7.5.tar.gz" - sha256: "e34fd3d3d32e3597f572205aaabbe995e162f4015e14c7328987b596bd25812c" - "0.6.20": - url: "https://github.com/awslabs/aws-c-common/archive/v0.6.20.tar.gz" - sha256: "6eb0b806c78b36a32eec9bcba8d2833e3973491a29d46fe3d11edc3f8d3e7f73" - "0.4.25": - url: "https://github.com/awslabs/aws-c-common/archive/v0.4.25.tar.gz" - sha256: "f85a8f74e42bd983a4615654457f8037876bc6b8dbf890e368bb516cbc2e9844" -patches: - "0.4.25": - - patch_file: "patches/0001-disable-fPIC.patch" - patch_description: "Don't enable position independent code (will be handled by conan)" - patch_type: "conan" - - patch_file: "patches/0002-no-warnings-as-errors.patch" - patch_description: "Don't make all warnings into errors" - patch_type: "portability" + "0.9.15": + url: "https://github.com/awslabs/aws-c-common/archive/v0.9.15.tar.gz" + sha256: "8f36c7a6a5d2e17365759d15591f800d3e76dcaa34a226389b92647cbd92393a" + "0.6.11": + url: "https://github.com/awslabs/aws-c-common/archive/v0.6.11.tar.gz" + sha256: "86159bd1128eee2813f705c275d319e14d1b77017fab46f6ca5dafcc66edaea9" diff --git a/recipes/aws-c-common/all/conanfile.py b/recipes/aws-c-common/all/conanfile.py index 4c7af96e0f6da..f3f589547f059 100644 --- a/recipes/aws-c-common/all/conanfile.py +++ b/recipes/aws-c-common/all/conanfile.py @@ -41,8 +41,6 @@ def export_sources(self): def config_options(self): if self.settings.os == "Windows": del self.options.fPIC - if Version(self.version) < "0.6.11": - del self.options.cpu_extensions def configure(self): if self.options.shared: @@ -64,8 +62,7 @@ def generate(self): tc = CMakeToolchain(self) tc.variables["BUILD_TESTING"] = False tc.variables["AWS_ENABLE_LTO"] = False - if Version(self.version) >= "0.6.0": - tc.variables["AWS_WARNINGS_ARE_ERRORS"] = False + tc.variables["AWS_WARNINGS_ARE_ERRORS"] = False if is_msvc(self): tc.variables["STATIC_CRT"] = is_msvc_static_runtime(self) tc.variables["USE_CPU_EXTENSIONS"] = self.options.get_safe("cpu_extensions", False) diff --git a/recipes/aws-c-common/all/patches/0001-disable-fPIC.patch b/recipes/aws-c-common/all/patches/0001-disable-fPIC.patch deleted file mode 100644 index 1c3c5cada4202..0000000000000 --- a/recipes/aws-c-common/all/patches/0001-disable-fPIC.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- cmake/AwsCFlags.cmake -+++ cmake/AwsCFlags.cmake -@@ -62,8 +62,8 @@ - # Warning disables always go last to avoid future flags re-enabling them - list(APPEND AWS_C_FLAGS -Wno-long-long) - -- # Always enable position independent code, since this code will always end up in a shared lib -- list(APPEND AWS_C_FLAGS -fPIC) -+ # Don't always set fPIC as conan will handle position independent code. -+ # list(APPEND AWS_C_FLAGS -fPIC) - - if (LEGACY_COMPILER_SUPPORT) - list(APPEND AWS_C_FLAGS -Wno-strict-aliasing) diff --git a/recipes/aws-c-common/all/patches/0002-no-warnings-as-errors.patch b/recipes/aws-c-common/all/patches/0002-no-warnings-as-errors.patch deleted file mode 100644 index 8abe45bd0a3d6..0000000000000 --- a/recipes/aws-c-common/all/patches/0002-no-warnings-as-errors.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- a/cmake/AwsCFlags.cmake -+++ b/cmake/AwsCFlags.cmake -@@ -34,7 +34,7 @@ function(aws_set_common_properties target) - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}" PARENT_SCOPE) - endif() - -- list(APPEND AWS_C_FLAGS /W4 /WX /MP) -+ list(APPEND AWS_C_FLAGS /W4 /MP) - # /volatile:iso relaxes some implicit memory barriers that MSVC normally applies for volatile accesses - # Since we want to be compatible with user builds using /volatile:iso, use it for the tests. - list(APPEND AWS_C_FLAGS /volatile:iso) -@@ -49,7 +49,7 @@ function(aws_set_common_properties target) - list(APPEND AWS_C_FLAGS "${_FLAGS}") - - else() -- list(APPEND AWS_C_FLAGS -Wall -Werror -Wstrict-prototypes) -+ list(APPEND AWS_C_FLAGS -Wall -Wstrict-prototypes) - - if(NOT SET_PROPERTIES_NO_WEXTRA) - list(APPEND AWS_C_FLAGS -Wextra) diff --git a/recipes/aws-c-common/config.yml b/recipes/aws-c-common/config.yml index 0ba98edce43a1..e7b9215f4c431 100644 --- a/recipes/aws-c-common/config.yml +++ b/recipes/aws-c-common/config.yml @@ -1,19 +1,5 @@ versions: - "0.9.12": + "0.9.15": folder: all - "0.9.6": - folder: all - "0.9.3": - folder: all - "0.9.0": - folder: all - "0.8.23": - folder: all - "0.8.2": - folder: all - "0.7.5": - folder: all - "0.6.20": - folder: all - "0.4.25": + "0.6.11": folder: all diff --git a/recipes/aws-c-compression/all/conandata.yml b/recipes/aws-c-compression/all/conandata.yml index d936f5ef9af18..1bbf0a0f551fb 100644 --- a/recipes/aws-c-compression/all/conandata.yml +++ b/recipes/aws-c-compression/all/conandata.yml @@ -1,13 +1,7 @@ sources: - "0.2.17": - url: "https://github.com/awslabs/aws-c-compression/archive/v0.2.17.tar.gz" - sha256: "703d1671e395ea26f8b0b70d678ed471421685a89e127f8aa125e2b2ecedb0e0" - "0.2.15": - url: "https://github.com/awslabs/aws-c-compression/archive/v0.2.15.tar.gz" - sha256: "11d58a229e2961b2b36493155a981dea2c8a0bc0d113b0073deb8c3189cfa04e" + "0.2.18": + url: "https://github.com/awslabs/aws-c-compression/archive/v0.2.18.tar.gz" + sha256: "517c361f3b7fffca08efd5ad251a20489794f056eab0dfffacc6d5b341df8e86" "0.2.14": url: "https://github.com/awslabs/aws-c-compression/archive/v0.2.14.tar.gz" sha256: "8737863ced57d92f5a0bdde554bf0fe70eaa76aae118fec09a6c361dfc55d0d5" - "0.2.13": - url: "https://github.com/awslabs/aws-c-compression/archive/v0.2.13.tar.gz" - sha256: "6b6ebb223408b48a8b2c74ba7042ff61e5333dc900acd67c40ca1cd4b382c137" diff --git a/recipes/aws-c-compression/all/conanfile.py b/recipes/aws-c-compression/all/conanfile.py index a6b8eb1260a1b..eda11edf4e93e 100644 --- a/recipes/aws-c-compression/all/conanfile.py +++ b/recipes/aws-c-compression/all/conanfile.py @@ -40,10 +40,10 @@ def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - if Version(self.version) <= "0.2.15": - self.requires("aws-c-common/0.8.2", transitive_headers=True, transitive_libs=True) - else: - self.requires("aws-c-common/0.9.6", transitive_headers=True, transitive_libs=True) + if self.version == "0.2.18": + self.requires("aws-c-common/0.9.15", transitive_headers=True, transitive_libs=True) + if self.version == "0.2.14": + self.requires("aws-c-common/0.6.11", transitive_headers=True, transitive_libs=True) def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) diff --git a/recipes/aws-c-compression/config.yml b/recipes/aws-c-compression/config.yml index aae181600c27e..ddebab3901e18 100644 --- a/recipes/aws-c-compression/config.yml +++ b/recipes/aws-c-compression/config.yml @@ -1,9 +1,5 @@ versions: - "0.2.17": - folder: all - "0.2.15": + "0.2.18": folder: all "0.2.14": folder: all - "0.2.13": - folder: all diff --git a/recipes/aws-c-event-stream/all/conandata.yml b/recipes/aws-c-event-stream/all/conandata.yml index dd1f6736ca7be..63e6c5f58778f 100644 --- a/recipes/aws-c-event-stream/all/conandata.yml +++ b/recipes/aws-c-event-stream/all/conandata.yml @@ -1,26 +1,7 @@ sources: - "0.3.2": - url: "https://github.com/awslabs/aws-c-event-stream/archive/v0.3.2.tar.gz" - sha256: "3134b35a45e9f9d974c2b78ee44fd2ea0aebc04df80236b80692aa63bee2092e" - "0.3.1": - url: "https://github.com/awslabs/aws-c-event-stream/archive/v0.3.1.tar.gz" - sha256: "bdbc420efc2572689fb167ac288e982a01224876eb79d80e2411fad4c43e9dc0" - "0.2.15": - url: "https://github.com/awslabs/aws-c-event-stream/archive/v0.2.15.tar.gz" - sha256: "4ff2ada07ede3c6afa4b8e6e20de541e717038307f29b38c27efa7c4d875ee26" - "0.2.12": - url: "https://github.com/awslabs/aws-c-event-stream/archive/v0.2.12.tar.gz" - sha256: "cc4ebfe715d8df5b9e3f4a3ce9b67d5f480017a7ebbbfa1d5e64ea53ec672580" - "0.2.11": - url: "https://github.com/awslabs/aws-c-event-stream/archive/v0.2.11.tar.gz" - sha256: "4818b8d3fe02016fcfdd033c1e9d8f6be07ccaeb38664fe8c31c0fd153ea56e6" + "0.4.2": + url: "https://github.com/awslabs/aws-c-event-stream/archive/v0.4.2.tar.gz" + sha256: "c98b8fa05c2ca10aacfce7327b92a84669c2da95ccb8e7d7b3e3285fcec8beee" "0.2.7": url: "https://github.com/awslabs/aws-c-event-stream/archive/v0.2.7.tar.gz" sha256: "bb5c94cdff70c1985fb0b5f30d81756cedb5a3c3075d37f7e1e2b34e2a33c8c0" - "0.1.5": - url: "https://github.com/awslabs/aws-c-event-stream/archive/v0.1.5.tar.gz" - sha256: "f1b423a487b5d6dca118bfc0d0c6cc596dc476b282258a3228e73a8f730422d4" -patches: - "0.1.5": - - patch_file: "patches/0001-disable-tests-bin.patch" - - patch_file: "patches/0002-use-PROJECT_SOURCE_DIR.patch" diff --git a/recipes/aws-c-event-stream/all/conanfile.py b/recipes/aws-c-event-stream/all/conanfile.py index e7d1df562c48b..7fc076d11b4af 100644 --- a/recipes/aws-c-event-stream/all/conanfile.py +++ b/recipes/aws-c-event-stream/all/conanfile.py @@ -43,19 +43,14 @@ def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - if Version(self.version) < "0.3.1": - self.requires("aws-c-common/0.8.2", transitive_headers=True, transitive_libs=True) - self.requires("aws-checksums/0.1.13") - else: - self.requires("aws-c-common/0.9.6", transitive_headers=True, transitive_libs=True) - self.requires("aws-checksums/0.1.17") - if Version(self.version) >= "0.2": - if Version(self.version) < "0.2.11": - self.requires("aws-c-io/0.10.20") - elif Version(self.version) < "0.3.1": - self.requires("aws-c-io/0.13.4") - else: - self.requires("aws-c-io/0.13.35") + if self.version == "0.4.2": + self.requires("aws-c-common/0.9.15", transitive_headers=True, transitive_libs=True) + self.requires("aws-checksums/0.1.18") + self.requires("aws-c-io/0.14.7") + if self.version == "0.2.7": + self.requires("aws-c-common/0.6.11", transitive_headers=True, transitive_libs=True) + self.requires("aws-checksums/0.1.12") + self.requires("aws-c-io/0.10.9") def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) diff --git a/recipes/aws-c-event-stream/all/patches/0001-disable-tests-bin.patch b/recipes/aws-c-event-stream/all/patches/0001-disable-tests-bin.patch deleted file mode 100644 index 21eae44486c93..0000000000000 --- a/recipes/aws-c-event-stream/all/patches/0001-disable-tests-bin.patch +++ /dev/null @@ -1,25 +0,0 @@ ---- CMakeLists.txt -+++ CMakeLists.txt -@@ -112,14 +112,18 @@ - install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_PROJECT_NAME}-config.cmake" - DESTINATION "${LIBRARY_DIRECTORY}/${CMAKE_PROJECT_NAME}/cmake/" - COMPONENT Development) - - --include(CTest) --enable_testing() --add_subdirectory(tests) -+if(BUILD_TESTING) -+ include(CTest) -+ enable_testing() -+ add_subdirectory(tests) -+endif() - - if(NOT MSVC) - set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) - endif() - --add_subdirectory(bin) -+if(BUILD_BINARIES) -+ add_subdirectory(bin) -+endif() diff --git a/recipes/aws-c-event-stream/all/patches/0002-use-PROJECT_SOURCE_DIR.patch b/recipes/aws-c-event-stream/all/patches/0002-use-PROJECT_SOURCE_DIR.patch deleted file mode 100644 index f2b60bb0f9a1d..0000000000000 --- a/recipes/aws-c-event-stream/all/patches/0002-use-PROJECT_SOURCE_DIR.patch +++ /dev/null @@ -1,61 +0,0 @@ ---- CMakeLists.txt -+++ CMakeLists.txt -@@ -70,25 +70,25 @@ - ${AWS_EVENT_STREAM_SRC} - ) - --add_library(${CMAKE_PROJECT_NAME} ${EVENT_STREAM_SRC}) --aws_set_common_properties(${CMAKE_PROJECT_NAME}) --aws_add_sanitizers(${CMAKE_PROJECT_NAME}) --aws_prepare_symbol_visibility_args(${CMAKE_PROJECT_NAME} "AWS_EVENT_STREAM") -+add_library(${PROJECT_NAME} ${EVENT_STREAM_SRC}) -+aws_set_common_properties(${PROJECT_NAME}) -+aws_add_sanitizers(${PROJECT_NAME}) -+aws_prepare_symbol_visibility_args(${PROJECT_NAME} "AWS_EVENT_STREAM") - --target_include_directories(${CMAKE_PROJECT_NAME} PUBLIC -+target_include_directories(${PROJECT_NAME} PUBLIC - $ - $) - - --set_target_properties(${CMAKE_PROJECT_NAME} PROPERTIES VERSION 1.0.0) --set_target_properties(${CMAKE_PROJECT_NAME} PROPERTIES SOVERSION 0unstable) -+set_target_properties(${PROJECT_NAME} PROPERTIES VERSION 1.0.0) -+set_target_properties(${PROJECT_NAME} PROPERTIES SOVERSION 0unstable) - - find_package(aws-c-common REQUIRED) - find_package(aws-checksums REQUIRED) - --target_link_libraries(${CMAKE_PROJECT_NAME} PUBLIC AWS::aws-c-common AWS::aws-checksums) -+target_link_libraries(${PROJECT_NAME} PUBLIC AWS::aws-c-common AWS::aws-checksums) - --aws_prepare_shared_lib_exports(${CMAKE_PROJECT_NAME}) -+aws_prepare_shared_lib_exports(${PROJECT_NAME}) - - install(FILES ${AWS_EVENT_STREAM_HEADERS} - DESTINATION "include/aws/event-stream" -@@ -100,17 +100,17 @@ - set (TARGET_DIR "static") - endif() - --install(EXPORT "${CMAKE_PROJECT_NAME}-targets" -- DESTINATION "${LIBRARY_DIRECTORY}/${CMAKE_PROJECT_NAME}/cmake/${TARGET_DIR}/" -+install(EXPORT "${PROJECT_NAME}-targets" -+ DESTINATION "${LIBRARY_DIRECTORY}/${PROJECT_NAME}/cmake/${TARGET_DIR}/" - NAMESPACE AWS:: - COMPONENT Development) - --configure_file("cmake/${CMAKE_PROJECT_NAME}-config.cmake" -- "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_PROJECT_NAME}-config.cmake" -+configure_file("cmake/${PROJECT_NAME}-config.cmake" -+ "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-config.cmake" - @ONLY) - --install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_PROJECT_NAME}-config.cmake" -- DESTINATION "${LIBRARY_DIRECTORY}/${CMAKE_PROJECT_NAME}/cmake/" -+install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-config.cmake" -+ DESTINATION "${LIBRARY_DIRECTORY}/${PROJECT_NAME}/cmake/" - COMPONENT Development) - - diff --git a/recipes/aws-c-event-stream/all/test_package/test_package.c b/recipes/aws-c-event-stream/all/test_package/test_package.c index 1b923438da34f..2cb953a451bf1 100644 --- a/recipes/aws-c-event-stream/all/test_package/test_package.c +++ b/recipes/aws-c-event-stream/all/test_package/test_package.c @@ -15,7 +15,7 @@ int main() { int res = aws_event_stream_message_init(&message, allocator, NULL, NULL); if (res != 0) { - fprintf(stderr, "Failed to init messag\n"); + fprintf(stderr, "Failed to init message\n"); } if (sizeof(expected_data) != aws_event_stream_message_total_length(&message)) { @@ -31,5 +31,7 @@ int main() { } } + aws_event_stream_message_clean_up(&message); + return EXIT_SUCCESS; } diff --git a/recipes/aws-c-event-stream/config.yml b/recipes/aws-c-event-stream/config.yml index 38b22762f5273..015334b5552b6 100644 --- a/recipes/aws-c-event-stream/config.yml +++ b/recipes/aws-c-event-stream/config.yml @@ -1,15 +1,5 @@ versions: - "0.3.2": - folder: all - "0.3.1": - folder: all - "0.2.15": - folder: all - "0.2.12": - folder: all - "0.2.11": + "0.4.2": folder: all "0.2.7": folder: all - "0.1.5": - folder: all diff --git a/recipes/aws-c-http/all/conandata.yml b/recipes/aws-c-http/all/conandata.yml index 6ee734ea998ca..515176a226691 100644 --- a/recipes/aws-c-http/all/conandata.yml +++ b/recipes/aws-c-http/all/conandata.yml @@ -2,21 +2,6 @@ sources: "0.8.1": url: "https://github.com/awslabs/aws-c-http/archive/v0.8.1.tar.gz" sha256: "83fb47e2d7956469bb328f16dea96663e96f8f20dc60dc4e9676b82804588530" - "0.7.14": - url: "https://github.com/awslabs/aws-c-http/archive/v0.7.14.tar.gz" - sha256: "afb935395c93427ac0853d6363900a71816a0508f18c86e84da0e6ebe7271429" - "0.6.22": - url: "https://github.com/awslabs/aws-c-http/archive/v0.6.22.tar.gz" - sha256: "a178fd04bd1618469cd21afc5b84cbe436d1f9d9e036fefbd3a8f00356da4d4c" - "0.6.13": - url: "https://github.com/awslabs/aws-c-http/archive/v0.6.13.tar.gz" - sha256: "8c69f8fc58b7073039e598383da3e1fd9b23f392cb992dbe769a7b80f342dbaf" - "0.6.10": - url: "https://github.com/awslabs/aws-c-http/archive/v0.6.10.tar.gz" - sha256: "4413faf2b8f6a83c898bb535cf83542fa548d7ecc1acf681dc79b7959a07231a" "0.6.7": url: "https://github.com/awslabs/aws-c-http/archive/v0.6.7.tar.gz" sha256: "2244d1e26ce5b5f40f96e570b1c4332a07c645ef744644d5b90b089d3695ec3b" - "0.6.5": - url: "https://github.com/awslabs/aws-c-http/archive/v0.6.5.tar.gz" - sha256: "9cb82f1cfe1342f4bbd58f51b74beaeb6a544fb6792c48f9b0d3967619b33221" diff --git a/recipes/aws-c-http/all/conanfile.py b/recipes/aws-c-http/all/conanfile.py index f9311547cb20c..2c2aed337ab03 100644 --- a/recipes/aws-c-http/all/conanfile.py +++ b/recipes/aws-c-http/all/conanfile.py @@ -40,19 +40,15 @@ def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - if Version(self.version) <= "0.6.22": - self.requires("aws-c-compression/0.2.15") - self.requires("aws-c-common/0.8.2", transitive_headers=True, transitive_libs=True) - else: - self.requires("aws-c-compression/0.2.17") - self.requires("aws-c-common/0.9.6", transitive_headers=True, transitive_libs=True) - - if Version(self.version) <= "0.6.13": - self.requires("aws-c-io/0.10.20", transitive_headers=True, transitive_libs=True) - elif Version(self.version) <= "0.6.22": - self.requires("aws-c-io/0.13.4", transitive_headers=True, transitive_libs=True) - else: - self.requires("aws-c-io/0.13.35", transitive_headers=True, transitive_libs=True) + if self.version == "0.8.1": + self.requires("aws-c-common/0.9.15", transitive_headers=True, transitive_libs=True) + self.requires("aws-c-compression/0.2.18") + self.requires("aws-c-cal/0.6.14") + self.requires("aws-c-io/0.14.7", transitive_headers=True, transitive_libs=True) + if self.version == "0.6.7": + self.requires("aws-c-common/0.6.11", transitive_headers=True, transitive_libs=True) + self.requires("aws-c-compression/0.2.14") + self.requires("aws-c-io/0.10.9", transitive_headers=True, transitive_libs=True) def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) diff --git a/recipes/aws-c-http/config.yml b/recipes/aws-c-http/config.yml index 9ef90600a046d..b4cfbdf31c4fc 100644 --- a/recipes/aws-c-http/config.yml +++ b/recipes/aws-c-http/config.yml @@ -1,15 +1,5 @@ versions: "0.8.1": folder: all - "0.7.14": - folder: all - "0.6.22": - folder: all - "0.6.13": - folder: all - "0.6.10": - folder: all "0.6.7": folder: all - "0.6.5": - folder: all diff --git a/recipes/aws-c-io/all/conandata.yml b/recipes/aws-c-io/all/conandata.yml index 1e15f1d87d7c3..60d48a7600965 100644 --- a/recipes/aws-c-io/all/conandata.yml +++ b/recipes/aws-c-io/all/conandata.yml @@ -1,19 +1,7 @@ sources: - "0.13.35": - url: "https://github.com/awslabs/aws-c-io/archive/v0.13.35.tar.gz" - sha256: "a9232dbbb3324de36a280859a4ea84dd2b75e47961805f1cffe0f3a7e1831711" - "0.13.32": - url: "https://github.com/awslabs/aws-c-io/archive/v0.13.32.tar.gz" - sha256: "2a6b18c544d014ca4f55cb96002dbbc1e52a2120541c809fa974cb0838ea72cc" - "0.13.4": - url: "https://github.com/awslabs/aws-c-io/archive/v0.13.4.tar.gz" - sha256: "133bd0aa46caa2041962cd4f6d076209686ce2934af82f86d1a258df4cbdce8b" - "0.11.2": - url: "https://github.com/awslabs/aws-c-io/archive/v0.11.2.tar.gz" - sha256: "b60270d23b6e2f4a5d80e64ca6538ba114cd6044b53752964c940f87e59bf0d9" - "0.10.20": - url: "https://github.com/awslabs/aws-c-io/archive/v0.10.20.tar.gz" - sha256: "293248ef96166826370223865bff2537bea5e08f6913919884c53add8238ba97" - "0.10.13": - url: "https://github.com/awslabs/aws-c-io/archive/v0.10.13.tar.gz" - sha256: "ee34a93190e35a5c372ba73661dd69c48986e051a4b26dedb62bc5aa78f1660f" + "0.14.7": + url: "https://github.com/awslabs/aws-c-io/archive/v0.14.7.tar.gz" + sha256: "ecf1f660d7d43913aa8a416be6a2027101ce87c3b241344342d608335b4df7d4" + "0.10.9": + url: "https://github.com/awslabs/aws-c-io/archive/v0.10.9.tar.gz" + sha256: "c64464152abe8b7e23f10bc026ed54a15eaf0ec0aae625d28e2caf4489090327" diff --git a/recipes/aws-c-io/all/conanfile.py b/recipes/aws-c-io/all/conanfile.py index 36c3965b9abd8..3bc22662e6f6c 100644 --- a/recipes/aws-c-io/all/conanfile.py +++ b/recipes/aws-c-io/all/conanfile.py @@ -1,7 +1,6 @@ from conan import ConanFile from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout from conan.tools.files import get, copy, rmdir, save -from conan.tools.scm import Version import os import textwrap @@ -40,17 +39,18 @@ def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - # the versions of aws-c-common and aws-c-io are tied since aws-c-common/0.6.12 and aws-c-io/0.10.10 - # Please refer https://github.com/conan-io/conan-center-index/issues/7763 - if Version(self.version) <= "0.13.4": - self.requires("aws-c-common/0.8.2", transitive_headers=True, transitive_libs=True) - self.requires("aws-c-cal/0.5.13") - else: - self.requires("aws-c-common/0.9.6", transitive_headers=True, transitive_libs=True) - self.requires("aws-c-cal/0.6.9", transitive_headers=True, transitive_libs=True) - - if self.settings.os in ["Linux", "FreeBSD", "Android"]: - self.requires("s2n/1.3.55") + # These versions come from aws-sdl-cpp prefetch_crt_dependency.sh file, + # dont bump them independently, check the file and update all the dependencies at once + if self.version == "0.14.7": + self.requires("aws-c-common/0.9.15", transitive_headers=True, transitive_libs=True) + self.requires("aws-c-cal/0.6.14") + if self.settings.os in ["Linux", "FreeBSD", "Android"]: + self.requires("s2n/1.4.16") # 1.4.11 not available, using next available version + if self.version == "0.10.9": + self.requires("aws-c-common/0.6.11", transitive_headers=True, transitive_libs=True) + self.requires("aws-c-cal/0.5.12") + if self.settings.os in ["Linux", "FreeBSD", "Android"]: + self.requires("s2n/1.3.15") def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) diff --git a/recipes/aws-c-io/config.yml b/recipes/aws-c-io/config.yml index 8a602cc8c0e60..659ff80091e7d 100644 --- a/recipes/aws-c-io/config.yml +++ b/recipes/aws-c-io/config.yml @@ -1,13 +1,5 @@ versions: - "0.13.35": + "0.14.7": folder: all - "0.13.32": - folder: all - "0.13.4": - folder: all - "0.11.2": - folder: all - "0.10.20": - folder: all - "0.10.13": + "0.10.9": folder: all diff --git a/recipes/aws-c-mqtt/all/conandata.yml b/recipes/aws-c-mqtt/all/conandata.yml index 275052c56df7c..d212e8cf3426a 100644 --- a/recipes/aws-c-mqtt/all/conandata.yml +++ b/recipes/aws-c-mqtt/all/conandata.yml @@ -1,19 +1,7 @@ sources: - "0.9.10": - url: "https://github.com/awslabs/aws-c-mqtt/archive/v0.9.10.tar.gz" - sha256: "a8f92cb045e2c1e0b7e87e5c43ca373eb020014b5d3ebd75ed67ffff430d9ab6" - "0.8.12": - url: "https://github.com/awslabs/aws-c-mqtt/archive/v0.8.12.tar.gz" - sha256: "df02de478ab1806bb57bcb78e5faa21b567716dcb64f8a52ae90a2b84f43cba1" - "0.7.12": - url: "https://github.com/awslabs/aws-c-mqtt/archive/v0.7.12.tar.gz" - sha256: "cf80f1b4f37aa8a6b8698315fae32cbf2bd944b67784f07b5762f392f18e64df" - "0.7.10": - url: "https://github.com/awslabs/aws-c-mqtt/archive/v0.7.10.tar.gz" - sha256: "95667477e17bc99d49a1d6674d7fb98f9a0379b6966cb2ed4863152e959d9e8f" - "0.7.9": - url: "https://github.com/awslabs/aws-c-mqtt/archive/v0.7.9.tar.gz" - sha256: "8556ae7c2b30ebb4ccb61becb120a848ea33315f7cf85436ebe5f21b75ab09c4" - "0.7.6": - url: "https://github.com/awslabs/aws-c-mqtt/archive/v0.7.6.tar.gz" - sha256: "a02c0525f7ddcdc058cd9f507b2f3a8be0383fc946920ed32c9d780cc29703ac" + "0.10.3": + url: "https://github.com/awslabs/aws-c-mqtt/archive/v0.10.3.tar.gz" + sha256: "bb938d794b0757d669b5877526363dc6f6f0e43869ca19fc196ffd0f7a35f5b9" + "0.7.8": + url: "https://github.com/awslabs/aws-c-mqtt/archive/v0.7.8.tar.gz" + sha256: "bf5ed63706f3f1aed86a878462fac78e5f045dfc34567bfb86c38f8b9d9d51ef" diff --git a/recipes/aws-c-mqtt/all/conanfile.py b/recipes/aws-c-mqtt/all/conanfile.py index 4740c4414b3ba..1405aeca68d5a 100644 --- a/recipes/aws-c-mqtt/all/conanfile.py +++ b/recipes/aws-c-mqtt/all/conanfile.py @@ -41,16 +41,16 @@ def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - if Version(self.version) <= "0.7.12": - self.requires("aws-c-common/0.8.2", transitive_headers=True, transitive_libs=True) - self.requires("aws-c-cal/0.5.13") - self.requires("aws-c-io/0.10.20", transitive_headers=True) - self.requires("aws-c-http/0.6.13") - else: - self.requires("aws-c-common/0.9.6", transitive_headers=True, transitive_libs=True) - self.requires("aws-c-cal/0.6.9") - self.requires("aws-c-io/0.13.35", transitive_headers=True) - self.requires("aws-c-http/0.7.14") + if self.version == "0.10.3": + self.requires("aws-c-common/0.9.15", transitive_headers=True, transitive_libs=True) + self.requires("aws-c-cal/0.6.14") + self.requires("aws-c-io/0.14.7", transitive_headers=True) + self.requires("aws-c-http/0.8.1") + if self.version == "0.7.8": + self.requires("aws-c-common/0.6.11", transitive_headers=True, transitive_libs=True) + self.requires("aws-c-cal/0.5.12") + self.requires("aws-c-io/0.10.9", transitive_headers=True) + self.requires("aws-c-http/0.6.7") def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) diff --git a/recipes/aws-c-mqtt/config.yml b/recipes/aws-c-mqtt/config.yml index 788eeccfb0963..a54bded63fa25 100644 --- a/recipes/aws-c-mqtt/config.yml +++ b/recipes/aws-c-mqtt/config.yml @@ -1,13 +1,5 @@ versions: - "0.9.10": + "0.10.3": folder: all - "0.8.12": - folder: all - "0.7.12": - folder: all - "0.7.10": - folder: all - "0.7.9": - folder: all - "0.7.6": + "0.7.8": folder: all diff --git a/recipes/aws-c-s3/all/conandata.yml b/recipes/aws-c-s3/all/conandata.yml index 2433ee657645c..bacf4d1932974 100644 --- a/recipes/aws-c-s3/all/conandata.yml +++ b/recipes/aws-c-s3/all/conandata.yml @@ -1,19 +1,7 @@ sources: - "0.4.5": - url: "https://github.com/awslabs/aws-c-s3/archive/v0.4.5.tar.gz" - sha256: "c9b588f5761ae6754dab2b51124784be78887f054856f02e44b6e51c25873055" - "0.3.24": - url: "https://github.com/awslabs/aws-c-s3/archive/v0.3.24.tar.gz" - sha256: "09803db4af98bba0af263434e2de432cdccdb3ab709411abba8e05d34840f815" - "0.1.49": - url: "https://github.com/awslabs/aws-c-s3/archive/v0.1.49.tar.gz" - sha256: "71acbba41a02477a6c352172da561bc2138bf239b936490c773d7aaa83afc9ab" - "0.1.37": - url: "https://github.com/awslabs/aws-c-s3/archive/v0.1.37.tar.gz" - sha256: "2c35100c1739300e438d47f49aaa2c374001416a79fe3c6f27d79371fb2ac90b" - "0.1.29": - url: "https://github.com/awslabs/aws-c-s3/archive/v0.1.29.tar.gz" - sha256: "bcbc38d091ad994fec2789bffd1d99e157c5e29a60685e836f028006e531bc60" - "0.1.27": - url: "https://github.com/awslabs/aws-c-s3/archive/v0.1.27.tar.gz" - sha256: "8fccbf967c3b29f0feaa1ba3de158b7ead805c3b4302c45b7cad3429f045920c" + "0.5.5": + url: "https://github.com/awslabs/aws-c-s3/archive/v0.5.5.tar.gz" + sha256: "81d3913826953cb634ef1183a0c241d5e117419a877b625d69d7e1e54bbe5219" + "0.1.26": + url: "https://github.com/awslabs/aws-c-s3/archive/v0.1.26.tar.gz" + sha256: "68467095ce2c523caa9ecac27453cd83f4c195c33c6ab8c8b0fa6534565d19bf" diff --git a/recipes/aws-c-s3/all/conanfile.py b/recipes/aws-c-s3/all/conanfile.py index 1813ec30adc8a..957de6e997292 100644 --- a/recipes/aws-c-s3/all/conanfile.py +++ b/recipes/aws-c-s3/all/conanfile.py @@ -40,28 +40,19 @@ def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - if Version(self.version) < "0.3.24": - self.requires("aws-c-common/0.8.2", transitive_headers=True, transitive_libs=True) - self.requires("aws-c-cal/0.5.13") - else: - self.requires("aws-c-common/0.9.6", transitive_headers=True, transitive_libs=True) - self.requires("aws-c-cal/0.6.9") - if Version(self.version) < "0.1.49": - self.requires("aws-c-auth/0.6.11", transitive_headers=True) - self.requires("aws-c-http/0.6.13") - self.requires("aws-c-io/0.10.20", transitive_headers=True) - elif Version(self.version) < "0.3.24": - self.requires("aws-c-auth/0.6.17", transitive_headers=True) - self.requires("aws-c-http/0.6.22") - self.requires("aws-c-io/0.13.4", transitive_headers=True) - else: - self.requires("aws-c-auth/0.7.8", transitive_headers=True) - self.requires("aws-c-http/0.7.14") - self.requires("aws-c-io/0.13.35", transitive_headers=True) - if Version(self.version) >= "0.3.24": - self.requires("aws-checksums/0.1.17") - elif Version(self.version) >= "0.1.36": - self.requires("aws-checksums/0.1.13") + if self.version == "0.5.5": + self.requires("aws-c-common/0.9.15", transitive_headers=True, transitive_libs=True) + self.requires("aws-c-cal/0.6.14") + self.requires("aws-c-auth/0.7.16", transitive_headers=True) + self.requires("aws-c-http/0.8.1") + self.requires("aws-c-io/0.14.7", transitive_headers=True) + self.requires("aws-checksums/0.1.18") + if self.version == "0.1.26": + self.requires("aws-c-common/0.6.11", transitive_headers=True, transitive_libs=True) + self.requires("aws-c-cal/0.5.12") + self.requires("aws-c-auth/0.6.4", transitive_headers=True) + self.requires("aws-c-http/0.6.7") + self.requires("aws-c-io/0.10.9", transitive_headers=True) def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) diff --git a/recipes/aws-c-s3/config.yml b/recipes/aws-c-s3/config.yml index 9dc59a14978b9..31b0a063a88bd 100644 --- a/recipes/aws-c-s3/config.yml +++ b/recipes/aws-c-s3/config.yml @@ -1,13 +1,5 @@ versions: - "0.4.5": + "0.5.5": folder: all - "0.3.24": - folder: all - "0.1.49": - folder: all - "0.1.37": - folder: all - "0.1.29": - folder: all - "0.1.27": + "0.1.26": folder: all diff --git a/recipes/aws-c-sdkutils/all/conandata.yml b/recipes/aws-c-sdkutils/all/conandata.yml index 4f2cc09884562..36557b2156d5c 100644 --- a/recipes/aws-c-sdkutils/all/conandata.yml +++ b/recipes/aws-c-sdkutils/all/conandata.yml @@ -1,13 +1,4 @@ sources: - "0.1.12": - url: "https://github.com/awslabs/aws-c-sdkutils/archive/v0.1.12.tar.gz" - sha256: "c876c3ce2918f1181c24829f599c8f06e29733f0bd6556d4c4fb523390561316" - "0.1.3": - url: "https://github.com/awslabs/aws-c-sdkutils/archive/v0.1.3.tar.gz" - sha256: "13d99c0877424a8fad40f312762968012dd54ec60a4438fb601ee65ff8b2484b" - "0.1.2": - url: "https://github.com/awslabs/aws-c-sdkutils/archive/refs/tags/v0.1.2.tar.gz" - sha256: "d654670c145212ed3ce0699a988b9f83ebf3e7c44ed74d4d0772dc95ad46b38e" - "0.1.1": - url: "https://github.com/awslabs/aws-c-sdkutils/archive/refs/tags/v0.1.1.tar.gz" - sha256: "201a5f694c912c952f50abab54fa0e576db75ddf6e8710c589896038ff9673f7" + "0.1.15": + url: "https://github.com/awslabs/aws-c-sdkutils/archive/v0.1.15.tar.gz" + sha256: "15fa30b8b0a357128388f2f40ab0ba3df63742fd333cc2f89cb91a9169f03bdc" diff --git a/recipes/aws-c-sdkutils/all/conanfile.py b/recipes/aws-c-sdkutils/all/conanfile.py index e2bfcefef6878..1aca7b380c09d 100644 --- a/recipes/aws-c-sdkutils/all/conanfile.py +++ b/recipes/aws-c-sdkutils/all/conanfile.py @@ -40,10 +40,8 @@ def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - if Version(self.version) <= "0.1.3": - self.requires("aws-c-common/0.8.2", transitive_headers=True, transitive_libs=True) - else: - self.requires("aws-c-common/0.9.6", transitive_headers=True, transitive_libs=True) + if self.version == "0.1.15": + self.requires("aws-c-common/0.9.15", transitive_headers=True, transitive_libs=True) def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) diff --git a/recipes/aws-c-sdkutils/config.yml b/recipes/aws-c-sdkutils/config.yml index c2aa05a42982f..d90a2c03c7832 100644 --- a/recipes/aws-c-sdkutils/config.yml +++ b/recipes/aws-c-sdkutils/config.yml @@ -1,9 +1,3 @@ versions: - "0.1.12": - folder: all - "0.1.3": - folder: all - "0.1.2": - folder: all - "0.1.1": + "0.1.15": folder: all diff --git a/recipes/aws-checksums/all/conandata.yml b/recipes/aws-checksums/all/conandata.yml index 989708680b889..19b138c8eb788 100644 --- a/recipes/aws-checksums/all/conandata.yml +++ b/recipes/aws-checksums/all/conandata.yml @@ -1,27 +1,7 @@ sources: - "0.1.17": - url: "https://github.com/awslabs/aws-checksums/archive/v0.1.17.tar.gz" - sha256: "83c1fbae826631361a529e9565e64a942c412baaec6b705ae5da3f056b97b958" - "0.1.13": - url: "https://github.com/awslabs/aws-checksums/archive/v0.1.13.tar.gz" - sha256: "0f897686f1963253c5069a0e495b85c31635ba146cd3ac38cc2ea31eaf54694d" + "0.1.18": + url: "https://github.com/awslabs/aws-checksums/archive/v0.1.18.tar.gz" + sha256: "bdba9d0a8b8330a89c6b8cbc00b9aa14f403d3449b37ff2e0d96d62a7301b2ee" "0.1.12": url: "https://github.com/awslabs/aws-checksums/archive/v0.1.12.tar.gz" sha256: "394723034b81cc7cd528401775bc7aca2b12c7471c92350c80a0e2fb9d2909fe" - "0.1.11": - url: "https://github.com/awslabs/aws-checksums/archive/v0.1.11.tar.gz" - sha256: "9312e305428655bcea1f81524c3a8f617ce5299b903187047078929e850fb6d4" - "0.1.5": - url: "https://github.com/awslabs/aws-checksums/archive/v0.1.5.tar.gz" - sha256: "6e6bed6f75cf54006b6bafb01b3b96df19605572131a2260fddaf0e87949ced0" -patches: - "0.1.5": - - patch_file: "patches/0001-use-PROJECT_SOURCE_DIR.patch" - patch_description: "use PROJECT_NAME instead of CMAKE_PROJECT_NAME" - patch_type: "conan" - - patch_file: "patches/0002-disable-overriding-fPIC.patch" - patch_description: "disable overriding -fPIC" - patch_type: "conan" - - patch_file: "patches/0003-disable-building-tests.patch" - patch_description: "build no tests" - patch_type: "conan" diff --git a/recipes/aws-checksums/all/conanfile.py b/recipes/aws-checksums/all/conanfile.py index e2711f6d5488f..135cd94267f12 100644 --- a/recipes/aws-checksums/all/conanfile.py +++ b/recipes/aws-checksums/all/conanfile.py @@ -46,10 +46,10 @@ def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - if Version(self.version) < "0.1.17": - self.requires("aws-c-common/0.8.2") - else: - self.requires("aws-c-common/0.9.6", transitive_headers=True) + if self.version == "0.1.18": + self.requires("aws-c-common/0.9.15", transitive_headers=True) + if self.version == "0.1.12": + self.requires("aws-c-common/0.6.11", transitive_headers=True) def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) @@ -62,7 +62,6 @@ def generate(self): deps.generate() def build(self): - apply_conandata_patches(self) cmake = CMake(self) cmake.configure() cmake.build() diff --git a/recipes/aws-checksums/all/patches/0001-use-PROJECT_SOURCE_DIR.patch b/recipes/aws-checksums/all/patches/0001-use-PROJECT_SOURCE_DIR.patch deleted file mode 100644 index 9a309a9f74658..0000000000000 --- a/recipes/aws-checksums/all/patches/0001-use-PROJECT_SOURCE_DIR.patch +++ /dev/null @@ -1,41 +0,0 @@ ---- CMakeLists.txt -+++ CMakeLists.txt -@@ -98,7 +98,7 @@ - target_compile_definitions(aws-checksums PRIVATE "-DDEBUG_BUILD") - endif() - --target_include_directories(${CMAKE_PROJECT_NAME} PUBLIC -+target_include_directories(${PROJECT_NAME} PUBLIC - $ - $) - -@@ -129,7 +129,7 @@ - endif() - - install(FILES ${AWS_CHECKSUMS_HEADERS} DESTINATION "include/aws/checksums") --aws_prepare_shared_lib_exports(${CMAKE_PROJECT_NAME}) -+aws_prepare_shared_lib_exports(${PROJECT_NAME}) - - if (BUILD_SHARED_LIBS) - set (TARGET_DIR "shared") -@@ -137,14 +137,14 @@ - set (TARGET_DIR "static") - endif() - --install(EXPORT "${CMAKE_PROJECT_NAME}-targets" -- DESTINATION "${LIBRARY_DIRECTORY}/${CMAKE_PROJECT_NAME}/cmake/${TARGET_DIR}/" -+install(EXPORT "${PROJECT_NAME}-targets" -+ DESTINATION "${LIBRARY_DIRECTORY}/${PROJECT_NAME}/cmake/${TARGET_DIR}/" - NAMESPACE AWS::) - --configure_file("cmake/${CMAKE_PROJECT_NAME}-config.cmake" -- "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_PROJECT_NAME}-config.cmake" -+configure_file("cmake/${PROJECT_NAME}-config.cmake" -+ "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-config.cmake" - @ONLY) - --install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_PROJECT_NAME}-config.cmake" -- DESTINATION "${LIBRARY_DIRECTORY}/${CMAKE_PROJECT_NAME}/cmake/") -+install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-config.cmake" -+ DESTINATION "${LIBRARY_DIRECTORY}/${PROJECT_NAME}/cmake/") - diff --git a/recipes/aws-checksums/all/patches/0002-disable-overriding-fPIC.patch b/recipes/aws-checksums/all/patches/0002-disable-overriding-fPIC.patch deleted file mode 100644 index 31249bcf0671b..0000000000000 --- a/recipes/aws-checksums/all/patches/0002-disable-overriding-fPIC.patch +++ /dev/null @@ -1,15 +0,0 @@ ---- CMakeLists.txt -+++ CMakeLists.txt -@@ -83,9 +83,9 @@ - target_compile_definitions(aws-checksums PRIVATE "-DAWS_CHECKSUMS_EXPORTS") - endif() - --if(NOT MSVC) -- target_compile_options(aws-checksums PRIVATE -fPIC) --endif() -+#if(NOT MSVC) -+# target_compile_options(aws-checksums PRIVATE -fPIC) -+#endif() - - if(BUILD_JNI_BINDINGS) - find_package(JNI) diff --git a/recipes/aws-checksums/all/patches/0003-disable-building-tests.patch b/recipes/aws-checksums/all/patches/0003-disable-building-tests.patch deleted file mode 100644 index f62f7e4733e64..0000000000000 --- a/recipes/aws-checksums/all/patches/0003-disable-building-tests.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- CMakeLists.txt -+++ CMakeLists.txt -@@ -109,7 +109,7 @@ - file(GLOB TESTS ${TEST_HDRS} ${TEST_SRC}) - - include_directories(${CMAKE_CURRENT_SOURCE_DIR}/tests) --add_executable(aws-checksums-tests ${TESTS}) -+add_executable(aws-checksums-tests EXCLUDE_FROM_ALL ${TESTS}) - target_compile_options(aws-checksums-tests PRIVATE ${_FLAGS}) - target_link_libraries(aws-checksums-tests aws-checksums) - set_target_properties(aws-checksums-tests PROPERTIES LINKER_LANGUAGE C) diff --git a/recipes/aws-checksums/config.yml b/recipes/aws-checksums/config.yml index efe23bdebe7e1..932ab94596844 100644 --- a/recipes/aws-checksums/config.yml +++ b/recipes/aws-checksums/config.yml @@ -1,11 +1,5 @@ versions: - "0.1.17": - folder: all - "0.1.13": + "0.1.18": folder: all "0.1.12": folder: all - "0.1.11": - folder: all - "0.1.5": - folder: all diff --git a/recipes/aws-crt-cpp/all/conandata.yml b/recipes/aws-crt-cpp/all/conandata.yml index 9126f56004fa0..a6902dfc92a08 100644 --- a/recipes/aws-crt-cpp/all/conandata.yml +++ b/recipes/aws-crt-cpp/all/conandata.yml @@ -1,29 +1,13 @@ sources: - "0.24.1": - url: "https://github.com/awslabs/aws-crt-cpp/archive/v0.24.1.tar.gz" - sha256: "c627fbc76fc31332801e29872203a11ce0234b7c17e75811277aa913f1550d6f" - "0.17.23": - url: "https://github.com/awslabs/aws-crt-cpp/archive/v0.17.23.tar.gz" - sha256: "28061c3efa493519cfae46e4ea96389f03a81eeec7613d7da861dd8c5f4f6598" - "0.17.12": - url: "https://github.com/awslabs/aws-crt-cpp/archive/v0.17.12.tar.gz" - sha256: "acdd8b83198c5a471f92702bc4101828fe55361005764143704c39acd6f80ffc" - "0.14.3": - url: "https://github.com/awslabs/aws-crt-cpp/archive/v0.14.3.tar.gz" - sha256: "3ea16c43e691bab0c373ba1ad072f6535390c516ebda658dfaf4d074d920e0fb" + "0.26.9": + url: "https://github.com/awslabs/aws-crt-cpp/archive/v0.26.9.tar.gz" + sha256: "5b5760d34fbbfcc971f561296e828de4c788750472fd9bd3ac20068a083620f2" + "0.17.1a": + url: "https://github.com/awslabs/aws-crt-cpp/archive/v0.17.1a.tar.gz" + sha256: "64053c8237e350cfbec24984a3696aaf914bfa64e6200ef19bebe9cf5bb0692b" patches: - "0.24.1": - - patch_file: "patches/0.24.1-fix-cast-error.patch" - patch_description: "fix const cast error" - patch_type: "portability" - - patch_file: "patches/0.24.1-disable-sanitizers.patch" - patch_description: "disable sanitizers" - patch_type: "conan" - "0.17.23": - - patch_file: "patches/0.17.23-fix-cast-error.patch" - patch_description: "fix const cast error" - patch_type: "portability" - "0.17.12": - - patch_file: "patches/0.17.12-fix-cast-error.patch" - patch_description: "fix const cast error" - patch_type: "portability" + "0.17.1a": + - patch_file: "patches/0.17.23-fix-cpp20-windows.patch" + patch_description: "Fixes cpp 20 builds for windows." + patch_type: "bugfix" + patch_source: "https://github.com/awslabs/aws-crt-cpp/pull/364" diff --git a/recipes/aws-crt-cpp/all/conanfile.py b/recipes/aws-crt-cpp/all/conanfile.py index 459770aa822b1..92652a3ebbf87 100644 --- a/recipes/aws-crt-cpp/all/conanfile.py +++ b/recipes/aws-crt-cpp/all/conanfile.py @@ -48,29 +48,31 @@ def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - if Version(self.version) < "0.24.1": - self.requires("aws-c-cal/0.5.13", transitive_headers=True) - self.requires("aws-c-common/0.8.2", transitive_headers=True) - self.requires("aws-checksums/0.1.13") - else: - self.requires("aws-c-cal/0.6.9", transitive_headers=True) - self.requires("aws-c-common/0.9.6", transitive_headers=True) - self.requires("aws-checksums/0.1.17") - if Version(self.version) < "0.17.29": - self.requires("aws-c-auth/0.6.11", transitive_headers=True) + if self.version == "0.26.9": + # From add_subdirectory() calls in https://github.com/awslabs/aws-crt-cpp/blob/v0.26.9/CMakeLists.txt + self.requires("aws-c-common/0.9.15") + self.requires("aws-c-sdkutils/0.1.15") + self.requires("aws-c-io/0.14.7", transitive_headers=True) + self.requires("aws-c-cal/0.6.14") + self.requires("aws-c-compression/0.2.18") + self.requires("aws-c-http/0.8.1", transitive_headers=True) + self.requires("aws-c-auth/0.7.16", transitive_headers=True) + self.requires("aws-c-mqtt/0.10.3", transitive_headers=True) + self.requires("aws-checksums/0.1.18") + self.requires("aws-c-event-stream/0.4.2") + self.requires("aws-c-s3/0.5.5") + if self.version == "0.17.1a": + # From add_subdirectory() calls in https://github.com/awslabs/aws-crt-cpp/blob/v0.17.1a/CMakeLists.txt#L95 + self.requires("aws-c-http/0.6.7", transitive_headers=True) + self.requires("aws-c-mqtt/0.7.8", transitive_headers=True) + self.requires("aws-c-cal/0.5.12") + self.requires("aws-c-compression/0.2.14") + self.requires("aws-c-auth/0.6.4", transitive_headers=True) + self.requires("aws-c-common/0.6.11") + self.requires("aws-c-io/0.10.9", transitive_headers=True) + self.requires("aws-checksums/0.1.12") self.requires("aws-c-event-stream/0.2.7") - self.requires("aws-c-http/0.6.13", transitive_headers=True) - self.requires("aws-c-io/0.10.20", transitive_headers=True) - self.requires("aws-c-mqtt/0.7.10", transitive_headers=True) - self.requires("aws-c-s3/0.1.37") - else: - self.requires("aws-c-auth/0.7.8", transitive_headers=True) - self.requires("aws-c-event-stream/0.3.1") - self.requires("aws-c-http/0.7.14", transitive_headers=True) - self.requires("aws-c-io/0.13.35", transitive_headers=True) - self.requires("aws-c-mqtt/0.9.10", transitive_headers=True) - self.requires("aws-c-s3/0.3.24") - self.requires("aws-c-sdkutils/0.1.12") + self.requires("aws-c-s3/0.1.26") def validate(self): if self.settings.compiler.get_safe("cppstd"): diff --git a/recipes/aws-crt-cpp/all/patches/0.17.12-fix-cast-error.patch b/recipes/aws-crt-cpp/all/patches/0.17.12-fix-cast-error.patch deleted file mode 100644 index be886c030a52c..0000000000000 --- a/recipes/aws-crt-cpp/all/patches/0.17.12-fix-cast-error.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/source/io/TlsOptions.cpp b/source/io/TlsOptions.cpp -index 9f9f8cf..e9913ef 100644 ---- a/source/io/TlsOptions.cpp -+++ b/source/io/TlsOptions.cpp -@@ -216,7 +216,7 @@ namespace Aws - - if (m_slotId) - { -- options.slot_id = &(*m_slotId); -+ options.slot_id = const_cast(&(*m_slotId)); - } - - if (m_userPin) diff --git a/recipes/aws-crt-cpp/all/patches/0.17.23-fix-cast-error.patch b/recipes/aws-crt-cpp/all/patches/0.17.23-fix-cast-error.patch deleted file mode 100644 index 676d3a87fbac2..0000000000000 --- a/recipes/aws-crt-cpp/all/patches/0.17.23-fix-cast-error.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/source/io/TlsOptions.cpp b/source/io/TlsOptions.cpp -index 3018e4c..eb5e129 100644 ---- a/source/io/TlsOptions.cpp -+++ b/source/io/TlsOptions.cpp -@@ -213,7 +213,7 @@ namespace Aws - - if (m_slotId) - { -- options.slot_id = &(*m_slotId); -+ options.slot_id = const_cast(&(*m_slotId)); - } - - if (m_userPin) diff --git a/recipes/aws-crt-cpp/all/patches/0.17.23-fix-cpp20-windows.patch b/recipes/aws-crt-cpp/all/patches/0.17.23-fix-cpp20-windows.patch new file mode 100644 index 0000000000000..9f32e19e32b8b --- /dev/null +++ b/recipes/aws-crt-cpp/all/patches/0.17.23-fix-cpp20-windows.patch @@ -0,0 +1,28 @@ +From 3216ce53fa7f276ae4407a450cafafa9e809fea1 Mon Sep 17 00:00:00 2001 +From: Sam Bisciglia +Date: Tue, 12 Apr 2022 14:42:26 -0400 +Subject: [PATCH] Fixes cpp 20 builds for windows. (#364) + +--- +diff --git a/include/aws/crt/StringView.h b/include/aws/crt/StringView.h +index a0fec83..dc2f05b 100644 +--- a/include/aws/crt/StringView.h ++++ b/include/aws/crt/StringView.h +@@ -15,7 +15,7 @@ + #include + #include + +-#if __cplusplus >= 201703L || (defined(_MSC_LANG) && _MSC_LANG >= 201703L) ++#if __cplusplus >= 201703L || (defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) + # include + #endif + +@@ -53,7 +53,7 @@ namespace Aws + + basic_string_view &operator=(const basic_string_view &) noexcept = default; + +-#if __cplusplus >= 201703L || (defined(_MSC_LANG) && _MSC_LANG >= 201703L) ++#if __cplusplus >= 201703L || (defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) + constexpr basic_string_view(const std::basic_string_view &other) noexcept + : m_size(other.size()), m_data(other.data()) + { diff --git a/recipes/aws-crt-cpp/all/patches/0.24.1-disable-sanitizers.patch b/recipes/aws-crt-cpp/all/patches/0.24.1-disable-sanitizers.patch deleted file mode 100644 index bb37fbe98b61a..0000000000000 --- a/recipes/aws-crt-cpp/all/patches/0.24.1-disable-sanitizers.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- CMakeLists.txt.orig 2024-02-23 17:49:55 -+++ CMakeLists.txt 2024-02-23 17:50:20 -@@ -314,7 +314,7 @@ - aws_use_package(aws-c-event-stream) - aws_use_package(aws-c-s3) - --aws_add_sanitizers(${PROJECT_NAME}) -+#aws_add_sanitizers(${PROJECT_NAME}) - - target_link_libraries(${PROJECT_NAME} PUBLIC ${DEP_AWS_LIBS}) - diff --git a/recipes/aws-crt-cpp/all/patches/0.24.1-fix-cast-error.patch b/recipes/aws-crt-cpp/all/patches/0.24.1-fix-cast-error.patch deleted file mode 100644 index 78b3163f7e6d5..0000000000000 --- a/recipes/aws-crt-cpp/all/patches/0.24.1-fix-cast-error.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/source/io/TlsOptions.cpp b/source/io/TlsOptions.cpp -index 6077912..74a55c9 100644 ---- a/source/io/TlsOptions.cpp -+++ b/source/io/TlsOptions.cpp -@@ -219,7 +219,7 @@ namespace Aws - - if (m_slotId) - { -- options.slot_id = &(*m_slotId); -+ options.slot_id = const_cast(&(*m_slotId)); - } - - if (m_userPin) diff --git a/recipes/aws-crt-cpp/config.yml b/recipes/aws-crt-cpp/config.yml index 20f59bce0267f..b1a11f4753b30 100644 --- a/recipes/aws-crt-cpp/config.yml +++ b/recipes/aws-crt-cpp/config.yml @@ -1,9 +1,5 @@ versions: - "0.24.1": + "0.26.9": folder: all - "0.17.23": - folder: all - "0.17.12": - folder: all - "0.14.3": + "0.17.1a": folder: all diff --git a/recipes/aws-kvs-pic/all/conandata.yml b/recipes/aws-kvs-pic/all/conandata.yml index 4be3843841ab1..5e5052a1a9680 100644 --- a/recipes/aws-kvs-pic/all/conandata.yml +++ b/recipes/aws-kvs-pic/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.1.0": + url: "https://github.com/awslabs/amazon-kinesis-video-streams-pic/archive/refs/tags/v1.1.0.tar.gz" + sha256: "ef45723cd439f855bae2304d9488b68cd6d1e0dc3203c97ebd1cbb26197edb55" "1.0.1": url: "https://github.com/awslabs/amazon-kinesis-video-streams-pic/archive/refs/tags/v1.0.1.tar.gz" sha256: "d04732217c74687c5498665b353cb089d725ca7f5b5da61a3f984f7fbefb2ac9" diff --git a/recipes/aws-kvs-pic/all/conanfile.py b/recipes/aws-kvs-pic/all/conanfile.py index a0653e082edea..e8a1073232807 100644 --- a/recipes/aws-kvs-pic/all/conanfile.py +++ b/recipes/aws-kvs-pic/all/conanfile.py @@ -4,6 +4,7 @@ from conan.errors import ConanInvalidConfiguration from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout from conan.tools.files import copy, get, rmdir, replace_in_file +from conan.tools.scm import Version required_conan_version = ">=1.53.0" @@ -72,6 +73,10 @@ def package_info(self): self.cpp_info.components["kvspic"].set_property("pkg_config_name", "libkvspic") if self.settings.os in ["Linux", "FreeBSD"]: self.cpp_info.components["kvspic"].system_libs = ["dl", "rt", "pthread"] + + if Version(self.version) >= "1.1.0": + if self.settings.build_type == "Debug": + self.cpp_info.components["kvspic"].defines = ["DEBUG_BUILD"] self.cpp_info.components["kvspicClient"].libs = ["kvspicClient"] self.cpp_info.components["kvspicClient"].set_property("pkg_config_name", "libkvspicClient") diff --git a/recipes/aws-kvs-pic/config.yml b/recipes/aws-kvs-pic/config.yml index 42adf0e62a4df..f7630e1054b00 100644 --- a/recipes/aws-kvs-pic/config.yml +++ b/recipes/aws-kvs-pic/config.yml @@ -1,4 +1,6 @@ versions: + "1.1.0": + folder: all "1.0.1": folder: all "cci.20210812": diff --git a/recipes/aws-lambda-cpp/all/conanfile.py b/recipes/aws-lambda-cpp/all/conanfile.py index 0b0de62c879d3..849efb9333447 100644 --- a/recipes/aws-lambda-cpp/all/conanfile.py +++ b/recipes/aws-lambda-cpp/all/conanfile.py @@ -1,6 +1,6 @@ from conan import ConanFile -from conan.errors import ConanInvalidConfiguration -from conan.tools.files import get, copy, rmdir +from conan.errors import ConanInvalidConfiguration, ConanException +from conan.tools.files import get, copy, rmdir, load, save, rename from conan.tools.build import check_min_cppstd from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout from conan.tools.scm import Version @@ -72,16 +72,29 @@ def build(self): cmake.configure() cmake.build() + def _extract_cmake_module(self): + cmake_module = load(self, os.path.join(self.source_folder, "cmake", "aws-lambda-runtime-config.cmake")) + start = "set(AWS_LAMBDA_PACKAGING_SCRIPT ${CMAKE_CURRENT_LIST_DIR}/packager)" + start_index = cmake_module.find(start) + if start_index == -1: + raise ConanException("Could not extract aws_lambda_package_target from aws-lambda-runtime-config.cmake file.") + return cmake_module[start_index:] + def package(self): copy(self, pattern="LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) cmake = CMake(self) cmake.install() + + save(self, os.path.join(self.package_folder, "lib", "cmake", "aws_lambda_package_target.cmake"), self._extract_cmake_module()) + rename(self, os.path.join(self.package_folder, "lib", "aws-lambda-runtime", "cmake", "packager"), os.path.join(self.package_folder, "lib", "cmake", "packager")) rmdir(self, os.path.join(self.package_folder, "lib", "aws-lambda-runtime")) def package_info(self): self.cpp_info.libs = ["aws-lambda-runtime"] + self.cpp_info.builddirs.append(os.path.join("lib", "cmake")) self.cpp_info.set_property("cmake_file_name", "aws-lambda-runtime") self.cpp_info.set_property("cmake_target_name", "AWS::aws-lambda-runtime") + self.cpp_info.set_property("cmake_build_modules", [os.path.join("lib", "cmake", "aws_lambda_package_target.cmake")]) self.cpp_info.system_libs.append("m") diff --git a/recipes/aws-lambda-cpp/all/test_package/CMakeLists.txt b/recipes/aws-lambda-cpp/all/test_package/CMakeLists.txt index 073c5e204a51e..1821ed75da1ec 100644 --- a/recipes/aws-lambda-cpp/all/test_package/CMakeLists.txt +++ b/recipes/aws-lambda-cpp/all/test_package/CMakeLists.txt @@ -6,3 +6,7 @@ find_package(aws-lambda-runtime REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) target_link_libraries(${PROJECT_NAME} PRIVATE AWS::aws-lambda-runtime) target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) + +if(NOT COMMAND aws_lambda_package_target) + message(FATAL_ERROR "aws_lambda_package_target should have been defined as part of find_package(aws-lambda-runtime)") +endif() diff --git a/recipes/aws-sdk-cpp/all/conandata.yml b/recipes/aws-sdk-cpp/all/conandata.yml index 5818aef791db0..36f76d76bbf97 100644 --- a/recipes/aws-sdk-cpp/all/conandata.yml +++ b/recipes/aws-sdk-cpp/all/conandata.yml @@ -1,28 +1,19 @@ sources: + "1.11.352": + url: "https://github.com/aws/aws-sdk-cpp/archive/1.11.352.tar.gz" + sha256: "999583df108a5363ff33563f86ea23a528761ebea3577348867932ba7eeacae2" "1.9.234": url: "https://github.com/aws/aws-sdk-cpp/archive/1.9.234.tar.gz" sha256: "52e36cf568fe0b2a0fc82a9333c0b31ba843db16670f4ccbb7b9fd142f1b00a5" - "1.9.100": - url: "https://github.com/aws/aws-sdk-cpp/archive/1.9.100.tar.gz" - sha256: "f0930d14ec92b9ddf1e3c966d9a3fe70d2a01b80e79e3e76da78d108bb81e5c4" - "1.8.130": - url: "https://github.com/aws/aws-sdk-cpp/archive/1.8.130.tar.gz" - sha256: "5dd09baa28d3f6f4fb03fbba1a4269724d79bcca3d47752cd3e15caf97276bda" patches: + "1.11.352": + - patch_file: patches/1.11.352-0001-pulseaudio.patch + patch_description: Use pulseaudio from conan + patch_type: conan + - patch_file: patches/1.11.352-0002-disable-sort-links.patch + - patch_file: patches/1.9.100-0002-aws-plugin-conf.patch "1.9.234": - patch_file: patches/1.9.234-0001-issue-1816.patch - patch_file: patches/1.9.234-0002-disable-sort-links.patch - patch_file: patches/1.9.100-0002-aws-plugin-conf.patch - patch_file: patches/1.8.130-0004-improve-pulseaudio-detection.patch - "1.9.100": - - patch_file: patches/1.9.100-0001-disable-sort-links.patch - - patch_file: patches/1.9.100-0002-aws-plugin-conf.patch - - patch_file: patches/1.9.100-0003-issue-1816.patch - - patch_file: patches/1.8.130-0004-improve-pulseaudio-detection.patch - "1.8.130": - - patch_file: patches/1.8.130-0001-disable-sort-links.patch - - patch_file: patches/1.8.130-0002-force-archive-directory-to-library-directory.patch - - patch_file: patches/1.8.130-0003-disable-cmake-install-rpath-use-link-path.patch - - patch_file: patches/1.8.130-0004-improve-pulseaudio-detection.patch - - patch_file: patches/1.8.130-0005-aws-plugin-conf.patch - - patch_file: patches/1.8.130-0006-issue-1816.patch diff --git a/recipes/aws-sdk-cpp/all/conanfile.py b/recipes/aws-sdk-cpp/all/conanfile.py index 678d3e32eb8c9..7e075ddde0985 100644 --- a/recipes/aws-sdk-cpp/all/conanfile.py +++ b/recipes/aws-sdk-cpp/all/conanfile.py @@ -20,274 +20,408 @@ class AwsSdkCppConan(ConanFile): topics = ("aws", "cpp", "cross-platform", "amazon", "cloud") package_type = "library" settings = "os", "arch", "compiler", "build_type" + # This list comes from tools/code-generation/api-description, which then generates the sdk sources + # To generate for a new one, run the build once and check src/generated/src inside your build_folder, remove the common aws-sdk-cpp prefix + # and that's the list of sdks. The join it to the below one _sdks = ( - "access-management", - "accessanalyzer", - "acm", - "acm-pca", - "alexaforbusiness", - "amp", - "amplify", - "amplifybackend", - "apigateway", - "apigatewaymanagementapi", - "apigatewayv2", - "appconfig", - "appflow", - "appintegrations", - "application-autoscaling", - "application-insights", - "appmesh", - "appstream", - "appsync", - "athena", - "auditmanager", - "autoscaling", - "autoscaling-plans", - "awstransfer", - "backup", - "batch", - "braket", - "budgets", - "ce", - "chime", - "cloud9", - "clouddirectory", - "cloudformation", - "cloudfront", - "cloudhsm", - "cloudhsmv2", - "cloudsearch", - "cloudsearchdomain", - "cloudtrail", - "codeartifact", - "codebuild", - "codecommit", - "codedeploy", - "codeguru-reviewer", - "codeguruprofiler", - "codepipeline", - "codestar", - "codestar-connections", - "codestar-notifications", - "cognito-identity", - "cognito-idp", - "cognito-sync", - "comprehend", - "comprehendmedical", - "compute-optimizer", - "config", - "connect", - "connect-contact-lens", - "connectparticipant", - "cur", - "customer-profiles", - "databrew", - "dataexchange", - "datapipeline", - "datasync", - "dax", - "detective", - "devicefarm", - "devops-guru", - "directconnect", - "discovery", - "dlm", - "dms", - "docdb", - "ds", - "dynamodb", - "dynamodbstreams", - "ebs", - "ec2", - "ec2-instance-connect", - "ecr", - "ecr-public", - "ecs", - "eks", - "elastic-inference", - "elasticache", - "elasticbeanstalk", - "elasticfilesystem", - "elasticloadbalancing", - "elasticloadbalancingv2", - "elasticmapreduce", - "elastictranscoder", - "email", - "emr-containers", - "es", - "eventbridge", - "events", - "firehose", - "fms", - "forecast", - "forecastquery", - "frauddetector", - "fsx", - "gamelift", - "glacier", - "globalaccelerator", - "glue", - "greengrass", - "greengrassv2", - "groundstation", - "guardduty", - "health", - "healthlake", - "honeycode", - "iam", - "identity-management", - "identitystore", - "imagebuilder", - "importexport", - "inspector", - "iot", - "iot-data", - "iot-jobs-data", - "iot1click-devices", - "iot1click-projects", - "iotanalytics", - "iotdeviceadvisor", - "iotevents", - "iotevents-data", - "iotfleethub", - "iotsecuretunneling", - "iotsitewise", - "iotthingsgraph", - "iotwireless", - "ivs", - "kafka", - "kendra", - "kinesis", - "kinesis-video-archived-media", - "kinesis-video-media", - "kinesis-video-signaling", - "kinesisanalytics", - "kinesisanalyticsv2", - "kinesisvideo", - "kms", - "lakeformation", - "lambda", - "lex", - "lex-models", - "lexv2-models", - "lexv2-runtime", - "license-manager", - "lightsail", - "location", - "logs", - "lookoutvision", - "machinelearning", - "macie", - "macie2", - "managedblockchain", - "marketplace-catalog", - "marketplace-entitlement", - "marketplacecommerceanalytics", - "mediaconnect", - "mediaconvert", - "medialive", - "mediapackage", - "mediapackage-vod", - "mediastore", - "mediastore-data", - "mediatailor", - "meteringmarketplace", - "migrationhub-config", - "mobile", - "mobileanalytics", - "monitoring", - "mq", - "mturk-requester", - "mwaa", - "neptune", - "network-firewall", - "networkmanager", - "opsworks", - "opsworkscm", - "organizations", - "outposts", - "personalize", - "personalize-events", - "personalize-runtime", - "pi", - "pinpoint", - "pinpoint-email", - "polly", - "polly-sample", - "pricing", - "qldb", - "qldb-session", - "queues", - "quicksight", - "ram", - "rds", - "rds-data", - "redshift", - "redshift-data", - "rekognition", - "resource-groups", - "resourcegroupstaggingapi", - "robomaker", - "route53", - "route53domains", - "route53resolver", - "s3", - "s3-crt", - "s3-encryption", - "s3control", - "s3outposts", - "sagemaker", - "sagemaker-a2i-runtime", - "sagemaker-edge", - "sagemaker-featurestore-runtime", - "sagemaker-runtime", - "savingsplans", - "schemas", - "sdb", - "secretsmanager", - "securityhub", - "serverlessrepo", - "service-quotas", - "servicecatalog", - "servicecatalog-appregistry", - "servicediscovery", - "sesv2", - "shield", - "signer", - "sms", - "sms-voice", - "snowball", - "sns", - "sqs", - "ssm", - "sso", - "sso-admin", - "sso-oidc", - "states", - "storagegateway", - "sts", - "support", - "swf", - "synthetics", - "text-to-speech", - "textract", - "timestream-query", - "timestream-write", - "transcribe", - "transcribestreaming", - "transfer", - "translate", - "waf", - "waf-regional", - "wafv2", - "wellarchitected", - "workdocs", - "worklink", - "workmail", - "workmailmessageflow", - "workspaces", - "xray", + ('AWSMigrationHub', ['1.11.352']), + ('access-management', ['1.9.234', '1.11.352']), + ('accessanalyzer', ['1.9.234', '1.11.352']), + ('account', ['1.11.352']), + ('acm', ['1.9.234', '1.11.352']), + ('acm-pca', ['1.9.234', '1.11.352']), + ('alexaforbusiness', ['1.9.234']), + ('amp', ['1.9.234', '1.11.352']), + ('amplify', ['1.9.234', '1.11.352']), + ('amplifybackend', ['1.9.234', '1.11.352']), + ('amplifyuibuilder', ['1.11.352']), + ('apigateway', ['1.9.234', '1.11.352']), + ('apigatewaymanagementapi', ['1.9.234', '1.11.352']), + ('apigatewayv2', ['1.9.234', '1.11.352']), + ('appconfig', ['1.9.234', '1.11.352']), + ('appconfigdata', ['1.11.352']), + ('appfabric', ['1.11.352']), + ('appflow', ['1.9.234', '1.11.352']), + ('appintegrations', ['1.9.234', '1.11.352']), + ('application-autoscaling', ['1.9.234', '1.11.352']), + ('application-insights', ['1.9.234', '1.11.352']), + ('application-signals', ['1.11.352']), + ('applicationcostprofiler', ['1.11.352']), + ('appmesh', ['1.9.234', '1.11.352']), + ('apprunner', ['1.11.352']), + ('appstream', ['1.9.234', '1.11.352']), + ('appsync', ['1.9.234', '1.11.352']), + ('apptest', ['1.11.352']), + ('arc-zonal-shift', ['1.11.352']), + ('artifact', ['1.11.352']), + ('athena', ['1.9.234', '1.11.352']), + ('auditmanager', ['1.9.234', '1.11.352']), + ('autoscaling', ['1.9.234', '1.11.352']), + ('autoscaling-plans', ['1.9.234', '1.11.352']), + ('awstransfer', ['1.9.234', '1.11.352']), + ('b2bi', ['1.11.352']), + ('backup', ['1.9.234', '1.11.352']), + ('backup-gateway', ['1.11.352']), + ('batch', ['1.9.234', '1.11.352']), + ('bcm-data-exports', ['1.11.352']), + ('bedrock', ['1.11.352']), + ('bedrock-agent', ['1.11.352']), + ('bedrock-agent-runtime', ['1.11.352']), + ('bedrock-runtime', ['1.11.352']), + ('billingconductor', ['1.11.352']), + ('braket', ['1.9.234', '1.11.352']), + ('budgets', ['1.9.234', '1.11.352']), + ('ce', ['1.9.234', '1.11.352']), + ('chatbot', ['1.11.352']), + ('chime', ['1.9.234', '1.11.352']), + ('chime-sdk-identity', ['1.11.352']), + ('chime-sdk-media-pipelines', ['1.11.352']), + ('chime-sdk-meetings', ['1.11.352']), + ('chime-sdk-messaging', ['1.11.352']), + ('chime-sdk-voice', ['1.11.352']), + ('cleanrooms', ['1.11.352']), + ('cleanroomsml', ['1.11.352']), + ('cloud9', ['1.9.234', '1.11.352']), + ('cloudcontrol', ['1.11.352']), + ('clouddirectory', ['1.9.234', '1.11.352']), + ('cloudformation', ['1.9.234', '1.11.352']), + ('cloudfront', ['1.9.234', '1.11.352']), + ('cloudfront-keyvaluestore', ['1.11.352']), + ('cloudhsm', ['1.9.234', '1.11.352']), + ('cloudhsmv2', ['1.9.234', '1.11.352']), + ('cloudsearch', ['1.9.234', '1.11.352']), + ('cloudsearchdomain', ['1.9.234', '1.11.352']), + ('cloudtrail', ['1.9.234', '1.11.352']), + ('cloudtrail-data', ['1.11.352']), + ('codeartifact', ['1.9.234', '1.11.352']), + ('codebuild', ['1.9.234', '1.11.352']), + ('codecatalyst', ['1.11.352']), + ('codecommit', ['1.9.234', '1.11.352']), + ('codeconnections', ['1.11.352']), + ('codedeploy', ['1.9.234', '1.11.352']), + ('codeguru-reviewer', ['1.9.234', '1.11.352']), + ('codeguru-security', ['1.11.352']), + ('codeguruprofiler', ['1.9.234', '1.11.352']), + ('codepipeline', ['1.9.234', '1.11.352']), + ('codestar', ['1.9.234', '1.11.352']), + ('codestar-connections', ['1.9.234', '1.11.352']), + ('codestar-notifications', ['1.9.234', '1.11.352']), + ('cognito-identity', ['1.9.234', '1.11.352']), + ('cognito-idp', ['1.9.234', '1.11.352']), + ('cognito-sync', ['1.9.234', '1.11.352']), + ('comprehend', ['1.9.234', '1.11.352']), + ('comprehendmedical', ['1.9.234', '1.11.352']), + ('compute-optimizer', ['1.9.234', '1.11.352']), + ('config', ['1.9.234', '1.11.352']), + ('connect', ['1.9.234', '1.11.352']), + ('connect-contact-lens', ['1.9.234', '1.11.352']), + ('connectcampaigns', ['1.11.352']), + ('connectcases', ['1.11.352']), + ('connectparticipant', ['1.9.234', '1.11.352']), + ('controlcatalog', ['1.11.352']), + ('controltower', ['1.11.352']), + ('cost-optimization-hub', ['1.11.352']), + ('cur', ['1.9.234', '1.11.352']), + ('customer-profiles', ['1.9.234', '1.11.352']), + ('databrew', ['1.9.234', '1.11.352']), + ('dataexchange', ['1.9.234', '1.11.352']), + ('datapipeline', ['1.9.234', '1.11.352']), + ('datasync', ['1.9.234', '1.11.352']), + ('datazone', ['1.11.352']), + ('dax', ['1.9.234', '1.11.352']), + ('deadline', ['1.11.352']), + ('detective', ['1.9.234', '1.11.352']), + ('devicefarm', ['1.9.234', '1.11.352']), + ('devops-guru', ['1.9.234', '1.11.352']), + ('directconnect', ['1.9.234', '1.11.352']), + ('discovery', ['1.9.234', '1.11.352']), + ('dlm', ['1.9.234', '1.11.352']), + ('dms', ['1.9.234', '1.11.352']), + ('docdb', ['1.9.234', '1.11.352']), + ('docdb-elastic', ['1.11.352']), + ('drs', ['1.11.352']), + ('ds', ['1.9.234', '1.11.352']), + ('dynamodb', ['1.9.234', '1.11.352']), + ('dynamodbstreams', ['1.9.234', '1.11.352']), + ('ebs', ['1.9.234', '1.11.352']), + ('ec2', ['1.9.234', '1.11.352']), + ('ec2-instance-connect', ['1.9.234', '1.11.352']), + ('ecr', ['1.9.234', '1.11.352']), + ('ecr-public', ['1.9.234', '1.11.352']), + ('ecs', ['1.9.234', '1.11.352']), + ('eks', ['1.9.234', '1.11.352']), + ('eks-auth', ['1.11.352']), + ('elastic-inference', ['1.9.234', '1.11.352']), + ('elasticache', ['1.9.234', '1.11.352']), + ('elasticbeanstalk', ['1.9.234', '1.11.352']), + ('elasticfilesystem', ['1.9.234', '1.11.352']), + ('elasticloadbalancing', ['1.9.234', '1.11.352']), + ('elasticloadbalancingv2', ['1.9.234', '1.11.352']), + ('elasticmapreduce', ['1.9.234', '1.11.352']), + ('elastictranscoder', ['1.9.234', '1.11.352']), + ('email', ['1.9.234', '1.11.352']), + ('emr-containers', ['1.9.234', '1.11.352']), + ('emr-serverless', ['1.11.352']), + ('entityresolution', ['1.11.352']), + ('es', ['1.9.234', '1.11.352']), + ('eventbridge', ['1.9.234', '1.11.352']), + ('events', ['1.9.234', '1.11.352']), + ('evidently', ['1.11.352']), + ('finspace', ['1.11.352']), + ('finspace-data', ['1.11.352']), + ('firehose', ['1.9.234', '1.11.352']), + ('fis', ['1.11.352']), + ('fms', ['1.9.234', '1.11.352']), + ('forecast', ['1.9.234', '1.11.352']), + ('forecastquery', ['1.9.234', '1.11.352']), + ('frauddetector', ['1.9.234', '1.11.352']), + ('freetier', ['1.11.352']), + ('fsx', ['1.9.234', '1.11.352']), + ('gamelift', ['1.9.234', '1.11.352']), + ('glacier', ['1.9.234', '1.11.352']), + ('globalaccelerator', ['1.9.234', '1.11.352']), + ('glue', ['1.9.234', '1.11.352']), + ('grafana', ['1.11.352']), + ('greengrass', ['1.9.234', '1.11.352']), + ('greengrassv2', ['1.9.234', '1.11.352']), + ('groundstation', ['1.9.234', '1.11.352']), + ('guardduty', ['1.9.234', '1.11.352']), + ('health', ['1.9.234', '1.11.352']), + ('healthlake', ['1.9.234', '1.11.352']), + ('honeycode', ['1.9.234']), + ('iam', ['1.9.234', '1.11.352']), + ('identity-management', ['1.9.234', '1.11.352']), + ('identitystore', ['1.9.234', '1.11.352']), + ('imagebuilder', ['1.9.234', '1.11.352']), + ('importexport', ['1.9.234', '1.11.352']), + ('inspector', ['1.9.234', '1.11.352']), + ('inspector-scan', ['1.11.352']), + ('inspector2', ['1.11.352']), + ('internetmonitor', ['1.11.352']), + ('iot', ['1.9.234', '1.11.352']), + ('iot-data', ['1.9.234', '1.11.352']), + ('iot-jobs-data', ['1.9.234', '1.11.352']), + ('iot1click-devices', ['1.9.234', '1.11.352']), + ('iot1click-projects', ['1.9.234', '1.11.352']), + ('iotanalytics', ['1.9.234', '1.11.352']), + ('iotdeviceadvisor', ['1.9.234', '1.11.352']), + ('iotevents', ['1.9.234', '1.11.352']), + ('iotevents-data', ['1.9.234', '1.11.352']), + ('iotfleethub', ['1.9.234', '1.11.352']), + ('iotfleetwise', ['1.11.352']), + ('iotsecuretunneling', ['1.9.234', '1.11.352']), + ('iotsitewise', ['1.9.234', '1.11.352']), + ('iotthingsgraph', ['1.9.234', '1.11.352']), + ('iottwinmaker', ['1.11.352']), + ('iotwireless', ['1.9.234', '1.11.352']), + ('ivs', ['1.9.234', '1.11.352']), + ('ivs-realtime', ['1.11.352']), + ('ivschat', ['1.11.352']), + ('kafka', ['1.9.234', '1.11.352']), + ('kafkaconnect', ['1.11.352']), + ('kendra', ['1.9.234', '1.11.352']), + ('kendra-ranking', ['1.11.352']), + ('keyspaces', ['1.11.352']), + ('kinesis', ['1.9.234', '1.11.352']), + ('kinesis-video-archived-media', ['1.9.234', '1.11.352']), + ('kinesis-video-media', ['1.9.234', '1.11.352']), + ('kinesis-video-signaling', ['1.9.234', '1.11.352']), + ('kinesis-video-webrtc-storage', ['1.11.352']), + ('kinesisanalytics', ['1.9.234', '1.11.352']), + ('kinesisanalyticsv2', ['1.9.234', '1.11.352']), + ('kinesisvideo', ['1.9.234', '1.11.352']), + ('kms', ['1.9.234', '1.11.352']), + ('lakeformation', ['1.9.234', '1.11.352']), + ('lambda', ['1.9.234', '1.11.352']), + ('launch-wizard', ['1.11.352']), + ('lex', ['1.9.234', '1.11.352']), + ('lex-models', ['1.9.234', '1.11.352']), + ('lexv2-models', ['1.9.234', '1.11.352']), + ('lexv2-runtime', ['1.9.234', '1.11.352']), + ('license-manager', ['1.9.234', '1.11.352']), + ('license-manager-linux-subscriptions', ['1.11.352']), + ('license-manager-user-subscriptions', ['1.11.352']), + ('lightsail', ['1.9.234', '1.11.352']), + ('location', ['1.9.234', '1.11.352']), + ('logs', ['1.9.234', '1.11.352']), + ('lookoutequipment', ['1.11.352']), + ('lookoutmetrics', ['1.11.352']), + ('lookoutvision', ['1.9.234', '1.11.352']), + ('m2', ['1.11.352']), + ('machinelearning', ['1.9.234', '1.11.352']), + ('macie', ['1.9.234']), + ('macie2', ['1.9.234', '1.11.352']), + ('mailmanager', ['1.11.352']), + ('managedblockchain', ['1.9.234', '1.11.352']), + ('managedblockchain-query', ['1.11.352']), + ('marketplace-agreement', ['1.11.352']), + ('marketplace-catalog', ['1.9.234', '1.11.352']), + ('marketplace-deployment', ['1.11.352']), + ('marketplace-entitlement', ['1.9.234', '1.11.352']), + ('marketplacecommerceanalytics', ['1.9.234', '1.11.352']), + ('mediaconnect', ['1.9.234', '1.11.352']), + ('mediaconvert', ['1.9.234', '1.11.352']), + ('medialive', ['1.9.234', '1.11.352']), + ('mediapackage', ['1.9.234', '1.11.352']), + ('mediapackage-vod', ['1.9.234', '1.11.352']), + ('mediapackagev2', ['1.11.352']), + ('mediastore', ['1.9.234', '1.11.352']), + ('mediastore-data', ['1.9.234', '1.11.352']), + ('mediatailor', ['1.9.234', '1.11.352']), + ('medical-imaging', ['1.11.352']), + ('memorydb', ['1.11.352']), + ('meteringmarketplace', ['1.9.234', '1.11.352']), + ('mgn', ['1.11.352']), + ('migration-hub-refactor-spaces', ['1.11.352']), + ('migrationhub-config', ['1.9.234', '1.11.352']), + ('migrationhuborchestrator', ['1.11.352']), + ('migrationhubstrategy', ['1.11.352']), + ('mobile', ['1.9.234', '1.11.352']), + ('mobileanalytics', ['1.9.234']), + ('monitoring', ['1.9.234', '1.11.352']), + ('mq', ['1.9.234', '1.11.352']), + ('mturk-requester', ['1.9.234', '1.11.352']), + ('mwaa', ['1.9.234', '1.11.352']), + ('neptune', ['1.9.234', '1.11.352']), + ('neptune-graph', ['1.11.352']), + ('neptunedata', ['1.11.352']), + ('network-firewall', ['1.9.234', '1.11.352']), + ('networkmanager', ['1.9.234', '1.11.352']), + ('networkmonitor', ['1.11.352']), + ('nimble', ['1.11.352']), + ('oam', ['1.11.352']), + ('omics', ['1.11.352']), + ('opensearch', ['1.11.352']), + ('opensearchserverless', ['1.11.352']), + ('opsworks', ['1.9.234', '1.11.352']), + ('opsworkscm', ['1.9.234', '1.11.352']), + ('organizations', ['1.9.234', '1.11.352']), + ('osis', ['1.11.352']), + ('outposts', ['1.9.234', '1.11.352']), + ('panorama', ['1.11.352']), + ('payment-cryptography', ['1.11.352']), + ('payment-cryptography-data', ['1.11.352']), + ('pca-connector-ad', ['1.11.352']), + ('pca-connector-scep', ['1.11.352']), + ('personalize', ['1.9.234', '1.11.352']), + ('personalize-events', ['1.9.234', '1.11.352']), + ('personalize-runtime', ['1.9.234', '1.11.352']), + ('pi', ['1.9.234', '1.11.352']), + ('pinpoint', ['1.9.234', '1.11.352']), + ('pinpoint-email', ['1.9.234', '1.11.352']), + ('pinpoint-sms-voice-v2', ['1.11.352']), + ('pipes', ['1.11.352']), + ('polly', ['1.9.234', '1.11.352']), + # ('polly-sample', ['1.9.234']), # This gets generated, but is only sample code + ('pricing', ['1.9.234', '1.11.352']), + ('privatenetworks', ['1.11.352']), + ('proton', ['1.11.352']), + ('qbusiness', ['1.11.352']), + ('qconnect', ['1.11.352']), + ('qldb', ['1.9.234', '1.11.352']), + ('qldb-session', ['1.9.234', '1.11.352']), + ('queues', ['1.9.234', '1.11.352']), + ('quicksight', ['1.9.234', '1.11.352']), + ('ram', ['1.9.234', '1.11.352']), + ('rbin', ['1.11.352']), + ('rds', ['1.9.234', '1.11.352']), + ('rds-data', ['1.9.234', '1.11.352']), + ('redshift', ['1.9.234', '1.11.352']), + ('redshift-data', ['1.9.234', '1.11.352']), + ('redshift-serverless', ['1.11.352']), + ('rekognition', ['1.9.234', '1.11.352']), + ('repostspace', ['1.11.352']), + ('resiliencehub', ['1.11.352']), + ('resource-explorer-2', ['1.11.352']), + ('resource-groups', ['1.9.234', '1.11.352']), + ('resourcegroupstaggingapi', ['1.9.234', '1.11.352']), + ('robomaker', ['1.9.234', '1.11.352']), + ('rolesanywhere', ['1.11.352']), + ('route53', ['1.9.234', '1.11.352']), + ('route53-recovery-cluster', ['1.11.352']), + ('route53-recovery-control-config', ['1.11.352']), + ('route53-recovery-readiness', ['1.11.352']), + ('route53domains', ['1.9.234', '1.11.352']), + ('route53profiles', ['1.11.352']), + ('route53resolver', ['1.9.234', '1.11.352']), + ('rum', ['1.11.352']), + ('s3', ['1.9.234', '1.11.352']), + ('s3-crt', ['1.9.234', '1.11.352']), + ('s3-encryption', ['1.9.234', '1.11.352']), + ('s3control', ['1.9.234', '1.11.352']), + ('s3outposts', ['1.9.234', '1.11.352']), + ('sagemaker', ['1.9.234', '1.11.352']), + ('sagemaker-a2i-runtime', ['1.9.234', '1.11.352']), + ('sagemaker-edge', ['1.9.234', '1.11.352']), + ('sagemaker-featurestore-runtime', ['1.9.234', '1.11.352']), + ('sagemaker-geospatial', ['1.11.352']), + ('sagemaker-metrics', ['1.11.352']), + ('sagemaker-runtime', ['1.9.234', '1.11.352']), + ('savingsplans', ['1.9.234', '1.11.352']), + ('scheduler', ['1.11.352']), + ('schemas', ['1.9.234', '1.11.352']), + ('sdb', ['1.9.234', '1.11.352']), + ('secretsmanager', ['1.9.234', '1.11.352']), + ('securityhub', ['1.9.234', '1.11.352']), + ('securitylake', ['1.11.352']), + ('serverlessrepo', ['1.9.234', '1.11.352']), + ('service-quotas', ['1.9.234', '1.11.352']), + ('servicecatalog', ['1.9.234', '1.11.352']), + ('servicecatalog-appregistry', ['1.9.234', '1.11.352']), + ('servicediscovery', ['1.9.234', '1.11.352']), + ('sesv2', ['1.9.234', '1.11.352']), + ('shield', ['1.9.234', '1.11.352']), + ('signer', ['1.9.234', '1.11.352']), + ('simspaceweaver', ['1.11.352']), + ('sms', ['1.9.234', '1.11.352']), + ('sms-voice', ['1.9.234', '1.11.352']), + ('snow-device-management', ['1.11.352']), + ('snowball', ['1.9.234', '1.11.352']), + ('sns', ['1.9.234', '1.11.352']), + ('sqs', ['1.9.234', '1.11.352']), + ('ssm', ['1.9.234', '1.11.352']), + ('ssm-contacts', ['1.11.352']), + ('ssm-incidents', ['1.11.352']), + ('ssm-sap', ['1.11.352']), + ('sso', ['1.9.234', '1.11.352']), + ('sso-admin', ['1.9.234', '1.11.352']), + ('sso-oidc', ['1.9.234', '1.11.352']), + ('states', ['1.9.234', '1.11.352']), + ('storagegateway', ['1.9.234', '1.11.352']), + ('sts', ['1.9.234', '1.11.352']), + ('supplychain', ['1.11.352']), + ('support', ['1.9.234', '1.11.352']), + ('support-app', ['1.11.352']), + ('swf', ['1.9.234', '1.11.352']), + ('synthetics', ['1.9.234', '1.11.352']), + ('taxsettings', ['1.11.352']), + ('text-to-speech', ['1.9.234', '1.11.352']), + ('textract', ['1.9.234', '1.11.352']), + ('timestream-influxdb', ['1.11.352']), + ('timestream-query', ['1.9.234', '1.11.352']), + ('timestream-write', ['1.9.234', '1.11.352']), + ('tnb', ['1.11.352']), + ('transcribe', ['1.9.234', '1.11.352']), + ('transcribestreaming', ['1.9.234', '1.11.352']), + ('transfer', ['1.9.234', '1.11.352']), + ('translate', ['1.9.234', '1.11.352']), + ('trustedadvisor', ['1.11.352']), + ('verifiedpermissions', ['1.11.352']), + ('voice-id', ['1.11.352']), + ('vpc-lattice', ['1.11.352']), + ('waf', ['1.9.234', '1.11.352']), + ('waf-regional', ['1.9.234', '1.11.352']), + ('wafv2', ['1.9.234', '1.11.352']), + ('wellarchitected', ['1.9.234', '1.11.352']), + ('wisdom', ['1.11.352']), + ('workdocs', ['1.9.234', '1.11.352']), + ('worklink', ['1.9.234', '1.11.352']), + ('workmail', ['1.9.234', '1.11.352']), + ('workmailmessageflow', ['1.9.234', '1.11.352']), + ('workspaces', ['1.9.234', '1.11.352']), + ('workspaces-thin-client', ['1.11.352']), + ('workspaces-web', ['1.11.352']), + ('xray', ['1.9.234', '1.11.352']) ) options = { **{ @@ -295,22 +429,24 @@ class AwsSdkCppConan(ConanFile): "fPIC": [True, False], "min_size": [True, False], }, - **{ x: [True, False] for x in _sdks}, + **{sdk_name: [None, True, False] for sdk_name, _ in _sdks}, + } + default_options = { + **{ + "shared": False, + "fPIC": True, + "min_size": False + }, + **{sdk_name: None for sdk_name, _ in _sdks}, + # Overrides + "monitoring": True # TODO: Clarify why monitoring is True by default } - default_options = {key: False for key in options.keys()} - default_options["fPIC"] = True - default_options["access-management"] = True - default_options["identity-management"] = True - default_options["monitoring"] = True - default_options["queues"] = True - default_options["s3-encryption"] = True - default_options["transfer"] = True - default_options["text-to-speech"] = True short_paths = True @property def _internal_requirements(self): + # These modules and dependencies come from https://github.com/aws/aws-sdk-cpp/blob/1.11.352/cmake/sdksCommon.cmake#L147 and below return { "access-management": ["iam", "cognito-identity"], "identity-management": ["cognito-identity", "sts"], @@ -320,86 +456,144 @@ def _internal_requirements(self): "transfer": ["s3"], } - @property - def _use_aws_crt_cpp(self): - return Version(self.version) >= "1.9" - def export_sources(self): export_conandata_patches(self) def config_options(self): if self.settings.os == "Windows": del self.options.fPIC - if Version(self.version) < "1.9": - self.options.rm_safe("s3-crt") + + # Main modules are true by default, but the user can set them to false + for module in self._internal_requirements: + setattr(self.options, module, True) + + # Remove all sdk options not belonging to the current version + for sdk_name, sdk_versions in self._sdks: + if self.version not in sdk_versions: + self.options.rm_safe(sdk_name) def configure(self): if self.options.shared: self.options.rm_safe("fPIC") + # If the user does not specify a value for a specific sdk: + # - Set it to True if it's a dependency of a main module that is set to True + for module, dependencies in self._internal_requirements.items(): + if self.options.get_safe(module): + for dependency in dependencies: + # Don't listen to the linter, get_safe should be compared like this to None + # TODO: Remove str comparison when Conan 1 is disabled + if str(self.options.get_safe(dependency)) == "None": + setattr(self.options, dependency, True) + + # - Otherwise set it to False + # This way there are no None options past this method, and we can control default values + # of the dependencies of the main modules but still give the user control over them + for sdk_name, sdk_versions in self._sdks: + # == None is true for both "was deleted" and "was not set by the user", + # ensure we only try to set the value to false for the latter + if self.version in sdk_versions and self.options.get_safe(sdk_name) == None: + setattr(self.options, sdk_name, False) + def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - self.requires("aws-c-common/0.8.2") - self.requires("aws-c-event-stream/0.2.7") - self.requires("aws-checksums/0.1.13") - if self._use_aws_crt_cpp: - self.requires("aws-c-cal/0.5.13") - self.requires("aws-c-http/0.6.13") - self.requires("aws-c-io/0.10.20") - self.requires("aws-crt-cpp/0.17.23", transitive_headers=True) + # These versions come from prefetch_crt_dependency.sh, + # dont bump them independently, check the file + if self.version == "1.11.352": + self.requires("aws-crt-cpp/0.26.9", transitive_headers=True) + self.requires("aws-c-auth/0.7.16") + self.requires("aws-c-cal/0.6.14") + self.requires("aws-c-common/0.9.15") + self.requires("aws-c-compression/0.2.18") # No mention of this in the code + self.requires("aws-c-event-stream/0.4.2") + self.requires("aws-c-http/0.8.1") + self.requires("aws-c-io/0.14.7") + self.requires("aws-c-mqtt/0.10.3") + if self.options.get_safe("s3-crt"): + self.requires("aws-c-s3/0.5.5") + self.requires("aws-c-sdkutils/0.1.15") # No mention of this in the code + self.requires("aws-checksums/0.1.18") + # missing aws-lc, but only needed as openssl replacement if USE_OPENSSL is OFF + if self.settings.os in ["Linux", "FreeBSD", "Android"]: + self.requires("s2n/1.4.16") # No mention of this in the code, we might be overlinking + if self.version == "1.9.234": + self.requires("aws-crt-cpp/0.17.1a", transitive_headers=True) + self.requires("aws-c-auth/0.6.4") + self.requires("aws-c-cal/0.5.12") + self.requires("aws-c-common/0.6.11") + self.requires("aws-c-compression/0.2.14") + self.requires("aws-c-event-stream/0.2.7") + self.requires("aws-c-http/0.6.7") + self.requires("aws-c-io/0.10.9") + self.requires("aws-c-mqtt/0.7.8") + if self.options.get_safe("s3-crt"): + self.requires("aws-c-s3/0.1.26") + self.requires("aws-checksums/0.1.12") + if self.settings.os in ["Linux", "FreeBSD", "Android"]: + self.requires("s2n/1.3.15") # No mention of this in the code, we might be overlinking if self.settings.os != "Windows": - self.requires("openssl/[>=1.1 <4]") - self.requires("libcurl/[>=7.78.0 <9]") - if self.settings.os in ["Linux", "FreeBSD"]: + # Used transitively in core/utils/crypto/openssl/CryptoImpl.h public header + self.requires("openssl/[>=1.1 <4]", transitive_headers=True) + # Used transitively in core/http/curl/CurlHandleContainer.h public header + self.requires("libcurl/[>=7.78.0 <9]", transitive_headers=True) + if self.settings.os == "Linux": + # Pulseaudio -> libcap, libalsa only support linux, don't use pulseaudio on other platforms if self.options.get_safe("text-to-speech"): - self.requires("pulseaudio/14.2") + # Used transitively in text-to-speech/PulseAudioPCMOutputDriver.h public header + self.requires("pulseaudio/14.2", transitive_headers=True, transitive_libs=True) + # zlib is used if ENABLE_ZLIB_REQUEST_COMPRESSION is enabled, set ot ON by default + self.requires("zlib/[>=1.2.11 <2]") - def validate(self): + @property + def _settings_build(self): + return getattr(self, "settings_build", self.settings) + + def validate_build(self): + if self._settings_build.os == "Windows" and self.settings.os == "Android": + raise ConanInvalidConfiguration("Cross-building from Windows to Android is not supported") + + def validate_build(self): if (self.options.shared - and self.settings.compiler == "gcc" - and Version(self.settings.compiler.version) < "6.0"): + and self.settings.compiler == "gcc" + and Version(self.settings.compiler.version) < "6.0"): raise ConanInvalidConfiguration( "Doesn't support gcc5 / shared. " "See https://github.com/conan-io/conan-center-index/pull/4401#issuecomment-802631744" ) - if (Version(self.version) < "1.9.234" - and self.settings.compiler == "gcc" - and Version(self.settings.compiler.version) >= "11.0" - and self.settings.build_type == "Release"): - raise ConanInvalidConfiguration( - "Versions prior to 1.9.234 don't support release builds on >= gcc 11 " - "See https://github.com/aws/aws-sdk-cpp/issues/1505" - ) - if self._use_aws_crt_cpp: - if is_msvc(self) and is_msvc_static_runtime(self): - raise ConanInvalidConfiguration("Static runtime is not working for more recent releases") - else: - if self.settings.os == "Macos" and self.settings.arch == "armv8": - raise ConanInvalidConfiguration( - "This version doesn't support arm8. " - "See https://github.com/aws/aws-sdk-cpp/issues/1542" - ) - - def package_id(self): - for hl_comp in self._internal_requirements.keys(): - if getattr(self.info.options, hl_comp): - for internal_requirement in self._internal_requirements[hl_comp]: - setattr(self.info.options, internal_requirement, True) + + def validate(self): + if is_msvc(self) and is_msvc_static_runtime(self): + raise ConanInvalidConfiguration("Static runtime is not working for more recent releases") + if (is_msvc(self) and self.options.shared + and not self.dependencies["aws-c-common"].options.shared): + raise ConanInvalidConfiguration(f"{self.ref} with shared is not supported with aws-c-common static") + + # If the user has explicitly set a main module dependency to False, + # error out if the main module itself is not also disabled + for main_module, dependencies in self._internal_requirements.items(): + if self.options.get_safe(main_module): + for internal_requirement in dependencies: + if not self.options.get_safe(internal_requirement): + raise ConanInvalidConfiguration(f"-o={self.ref}:{main_module}=True requires -o={self.ref}:{internal_requirement}=True") def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) + def _enabled_sdks(self): + for sdk in self._sdks: + if self.options.get_safe(sdk[0]): + yield sdk + def generate(self): tc = CMakeToolchain(self) # All option() are defined before project() in upstream CMakeLists, # therefore we must use cache_variables build_only = ["core"] - for sdk in self._sdks: - if self.options.get_safe(sdk): - build_only.append(sdk) + for sdk_name, _ in self._enabled_sdks(): + build_only.append(sdk_name) tc.cache_variables["BUILD_ONLY"] = ";".join(build_only) tc.cache_variables["ENABLE_UNITY_BUILD"] = True @@ -407,10 +601,11 @@ def generate(self): tc.cache_variables["AUTORUN_UNIT_TESTS"] = False tc.cache_variables["BUILD_DEPS"] = False if self.settings.os != "Windows": + tc.cache_variables["USE_OPENSSL"] = True tc.cache_variables["ENABLE_OPENSSL_ENCRYPTION"] = True tc.cache_variables["MINIMIZE_SIZE"] = self.options.min_size - if is_msvc(self) and not self._use_aws_crt_cpp: + if is_msvc(self): tc.cache_variables["FORCE_SHARED_CRT"] = not is_msvc_static_runtime(self) if cross_building(self): @@ -429,10 +624,11 @@ def generate(self): def _patch_sources(self): apply_conandata_patches(self) # Disable warnings as errors - replace_in_file( - self, os.path.join(self.source_folder, "cmake", "compiler_settings.cmake"), - 'list(APPEND AWS_COMPILER_WARNINGS "-Wall" "-Werror" "-pedantic" "-Wextra")', "", - ) + if self.version == "1.9.234": + replace_in_file( + self, os.path.join(self.source_folder, "cmake", "compiler_settings.cmake"), + 'list(APPEND AWS_COMPILER_WARNINGS "-Wall" "-Werror" "-pedantic" "-Wextra")', "", + ) def build(self): self._patch_sources() @@ -446,15 +642,19 @@ def _res_folder(self): def _create_project_cmake_module(self): # package files needed to build other components (e.g. aws-cdi-sdk) with this SDK - for file in [ + dependant_files = [ "cmake/compiler_settings.cmake", "cmake/initialize_project_version.cmake", "cmake/utilities.cmake", "cmake/sdk_plugin_conf.cmake", "toolchains/cmakeProjectConfig.cmake", - "toolchains/pkg-config.pc.in", - "aws-cpp-sdk-core/include/aws/core/VersionConfig.h" - ]: + "toolchains/pkg-config.pc.in" + ] + if Version(self.version) >= "1.11.352": + dependant_files.append("src/aws-cpp-sdk-core/include/aws/core/VersionConfig.h") + else: + dependant_files.append("aws-cpp-sdk-core/include/aws/core/VersionConfig.h") + for file in dependant_files: copy(self, file, src=self.source_folder, dst=os.path.join(self.package_folder, self._res_folder)) replace_in_file( self, os.path.join(self.package_folder, self._res_folder, file), @@ -464,7 +664,7 @@ def _create_project_cmake_module(self): # avoid getting error from hook rename(self, os.path.join(self.package_folder, self._res_folder, "toolchains", "cmakeProjectConfig.cmake"), - os.path.join(self.package_folder, self._res_folder, "toolchains", "cmakeProjectConf.cmake")) + os.path.join(self.package_folder, self._res_folder, "toolchains", "cmakeProjectConf.cmake")) replace_in_file( self, os.path.join(self.package_folder, self._res_folder, "cmake", "utilities.cmake"), "cmakeProjectConfig.cmake", "cmakeProjectConf.cmake", @@ -494,27 +694,28 @@ def package_info(self): self.cpp_info.components["core"].set_property("pkg_config_name", "aws-sdk-cpp-core") self.cpp_info.components["core"].libs = ["aws-cpp-sdk-core"] self.cpp_info.components["core"].requires = [ + "aws-crt-cpp::aws-crt-cpp", + "aws-c-auth::aws-c-auth", + "aws-c-cal::aws-c-cal", "aws-c-common::aws-c-common", + "aws-c-compression::aws-c-compression", "aws-c-event-stream::aws-c-event-stream", + "aws-c-http::aws-c-http", + "aws-c-io::aws-c-io", + "aws-c-mqtt::aws-c-mqtt", "aws-checksums::aws-checksums", + "zlib::zlib" ] - if self._use_aws_crt_cpp: + + if self.settings.os in ["Linux", "FreeBSD", "Android"]: + self.cpp_info.components["core"].requires.append("s2n::s2n") + + if Version(self.version) >= "1.11.352": self.cpp_info.components["core"].requires.extend([ - "aws-c-cal::aws-c-cal", - "aws-c-http::aws-c-http", - "aws-c-io::aws-c-io", - "aws-crt-cpp::aws-crt-cpp", + "aws-c-sdkutils::aws-c-sdkutils", ]) - # other components - enabled_sdks = [sdk for sdk in self._sdks if self.options.get_safe(sdk)] - for hl_comp in self._internal_requirements.keys(): - if getattr(self.options, hl_comp): - for internal_requirement in self._internal_requirements[hl_comp]: - if internal_requirement not in enabled_sdks: - enabled_sdks.append(internal_requirement) - - for sdk in enabled_sdks: + for sdk, _ in self._enabled_sdks(): # TODO: there is no way to properly emulate COMPONENTS names for # find_package(AWSSDK COMPONENTS ) in set_property() # right now: see https://github.com/conan-io/conan/issues/10258 @@ -528,7 +729,7 @@ def package_info(self): # TODO: to remove in conan v2 once cmake_find_package_* generators removed self.cpp_info.components[sdk].names["cmake_find_package"] = "aws-sdk-cpp-" + sdk self.cpp_info.components[sdk].names["cmake_find_package_multi"] = "aws-sdk-cpp-" + sdk - component_alias = f"aws-sdk-cpp-{sdk}_alias" # to emulate COMPONENTS names for find_package() + component_alias = f"aws-sdk-cpp-{sdk}_alias" # to emulate COMPONENTS names for find_package() self.cpp_info.components[component_alias].names["cmake_find_package"] = sdk self.cpp_info.components[component_alias].names["cmake_find_package_multi"] = sdk self.cpp_info.components[component_alias].requires = [sdk] @@ -543,14 +744,19 @@ def package_info(self): else: self.cpp_info.components["core"].requires.extend(["libcurl::curl", "openssl::openssl"]) - if self.settings.os in ["Linux", "FreeBSD"]: - self.cpp_info.components["core"].system_libs.append("atomic") + if self.settings.os == "Linux": if self.options.get_safe("text-to-speech"): self.cpp_info.components["text-to-speech"].requires.append("pulseaudio::pulseaudio") + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.components["core"].system_libs.append("atomic") + + if self.options.get_safe("s3-crt"): + self.cpp_info.components["s3-crt"].requires.append("aws-c-s3::aws-c-s3") + if self.settings.os == "Macos": if self.options.get_safe("text-to-speech"): - self.cpp_info.components["text-to-speech"].frameworks.append("CoreAudio") + self.cpp_info.components["text-to-speech"].frameworks.extend(["CoreAudio", "AudioToolbox"]) libcxx = stdcpp_library(self) if libcxx: diff --git a/recipes/aws-sdk-cpp/all/patches/1.11.352-0001-pulseaudio.patch b/recipes/aws-sdk-cpp/all/patches/1.11.352-0001-pulseaudio.patch new file mode 100644 index 0000000000000..c2a64d3dd0446 --- /dev/null +++ b/recipes/aws-sdk-cpp/all/patches/1.11.352-0001-pulseaudio.patch @@ -0,0 +1,32 @@ +diff --git a/src/aws-cpp-sdk-text-to-speech/CMakeLists.txt b/src/aws-cpp-sdk-text-to-speech/CMakeLists.txt +index 5a40f1906..4136a4690 100644 +--- a/src/aws-cpp-sdk-text-to-speech/CMakeLists.txt ++++ b/src/aws-cpp-sdk-text-to-speech/CMakeLists.txt +@@ -9,8 +9,6 @@ file( GLOB TEXT_TO_SPEECH_HEADERS "include/aws/text-to-speech/*.h" ) + + set(PLATFORM_LIBS "") + +-check_include_files("pulse/simple.h" HAVE_PULSE) +- + if(PLATFORM_WINDOWS) + file( GLOB TEXT_TO_SPEECH_PLATFORM_HEADERS "include/aws/text-to-speech/windows/*.h" ) + file( GLOB TEXT_TO_SPEECH_PLATFORM_SOURCE "source/text-to-speech/windows/*.cpp" ) +@@ -19,14 +17,15 @@ if(PLATFORM_WINDOWS) + set(PLATFORM_LIBS ${PLATFORM_LIBS} Winmm) + endif() + +-if (PLATFORM_LINUX) +- if(HAVE_PULSE) ++if (CMAKE_SYSTEM_NAME STREQUAL "Linux") ++ find_package(pulseaudio) ++ if(pulseaudio_FOUND) + file( GLOB TEXT_TO_SPEECH_PLATFORM_HEADERS "include/aws/text-to-speech/linux/*.h" ) + file( GLOB TEXT_TO_SPEECH_PLATFORM_SOURCE "source/text-to-speech/linux/*.cpp" ) + + message(STATUS "Pulse audio header files have been detected, included pulse audio as a possible sound driver implementation.") + add_definitions("-DPULSE") +- set(PLATFORM_LIBS ${PLATFORM_LIBS} pulse pulse-simple) ++ set(PLATFORM_LIBS ${PLATFORM_LIBS} "pulseaudio::pulseaudio") + else() + message(WARNING "We've detected that you are building on linux, but the header files for pulseaudio are not available.\ + If you are providing your own audio implementation or you will not be using the text-to-speech library, this is fine.\ diff --git a/recipes/aws-sdk-cpp/all/patches/1.11.352-0002-disable-sort-links.patch b/recipes/aws-sdk-cpp/all/patches/1.11.352-0002-disable-sort-links.patch new file mode 100644 index 0000000000000..9ba1170c20c17 --- /dev/null +++ b/recipes/aws-sdk-cpp/all/patches/1.11.352-0002-disable-sort-links.patch @@ -0,0 +1,13 @@ +diff --git a/cmake/sdks.cmake b/cmake/sdks.cmake +index 1b1ada7fc..606f5db18 100644 +--- a/cmake/sdks.cmake ++++ b/cmake/sdks.cmake +@@ -271,7 +271,7 @@ function(add_sdks) + + # the catch-all config needs to list all the targets in a dependency-sorted order + include(dependencies) +- sort_links(EXPORTS) ++ #sort_links(EXPORTS) + + # make an everything config by just including all the individual configs + file(WRITE ${CMAKE_BINARY_DIR}/aws-sdk-cpp-config.cmake "") \ No newline at end of file diff --git a/recipes/aws-sdk-cpp/all/patches/1.8.130-0001-disable-sort-links.patch b/recipes/aws-sdk-cpp/all/patches/1.8.130-0001-disable-sort-links.patch deleted file mode 100644 index bd8fbce5589dc..0000000000000 --- a/recipes/aws-sdk-cpp/all/patches/1.8.130-0001-disable-sort-links.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/cmake/sdks.cmake b/cmake/sdks.cmake -index 975281faaa..ebedbcc6e5 100644 ---- a/cmake/sdks.cmake -+++ b/cmake/sdks.cmake -@@ -236,7 +236,7 @@ function(add_sdks) - - # the catch-all config needs to list all the targets in a dependency-sorted order - include(dependencies) -- sort_links(EXPORTS) -+ # sort_links(EXPORTS) - - # make an everything config by just including all the individual configs - file(WRITE ${CMAKE_BINARY_DIR}/aws-sdk-cpp-config.cmake "") diff --git a/recipes/aws-sdk-cpp/all/patches/1.8.130-0002-force-archive-directory-to-library-directory.patch b/recipes/aws-sdk-cpp/all/patches/1.8.130-0002-force-archive-directory-to-library-directory.patch deleted file mode 100644 index ae9310e5bb684..0000000000000 --- a/recipes/aws-sdk-cpp/all/patches/1.8.130-0002-force-archive-directory-to-library-directory.patch +++ /dev/null @@ -1,17 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index a653e38628..6761052856 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -295,11 +295,7 @@ if (CMAKE_INSTALL_INCLUDEDIR) - set(INCLUDE_DIRECTORY "${CMAKE_INSTALL_INCLUDEDIR}") - endif() - --if(BUILD_SHARED_LIBS) -- set(ARCHIVE_DIRECTORY "${BINARY_DIRECTORY}") --else() -- set(ARCHIVE_DIRECTORY "${LIBRARY_DIRECTORY}") --endif() -+set(ARCHIVE_DIRECTORY "${LIBRARY_DIRECTORY}") - - if (ENABLE_ADDRESS_SANITIZER) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address -g -fno-omit-frame-pointer") diff --git a/recipes/aws-sdk-cpp/all/patches/1.8.130-0003-disable-cmake-install-rpath-use-link-path.patch b/recipes/aws-sdk-cpp/all/patches/1.8.130-0003-disable-cmake-install-rpath-use-link-path.patch deleted file mode 100644 index 6f85ba392127f..0000000000000 --- a/recipes/aws-sdk-cpp/all/patches/1.8.130-0003-disable-cmake-install-rpath-use-link-path.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index a653e38628..4aac800fde 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -142,7 +142,7 @@ else() - endif() - - # Add Linker search paths to RPATH so as to fix the problem where some linkers can't find cross-compiled dependent libraries in customer paths when linking executables. --set(CMAKE_INSTALL_RPATH_USE_LINK_PATH true) -+# set(CMAKE_INSTALL_RPATH_USE_LINK_PATH true) - - # build third-party targets - if (BUILD_DEPS) diff --git a/recipes/aws-sdk-cpp/all/patches/1.8.130-0004-improve-pulseaudio-detection.patch b/recipes/aws-sdk-cpp/all/patches/1.8.130-0004-improve-pulseaudio-detection.patch index 9930b981211f6..84537aa466936 100644 --- a/recipes/aws-sdk-cpp/all/patches/1.8.130-0004-improve-pulseaudio-detection.patch +++ b/recipes/aws-sdk-cpp/all/patches/1.8.130-0004-improve-pulseaudio-detection.patch @@ -1,5 +1,5 @@ diff --git a/aws-cpp-sdk-text-to-speech/CMakeLists.txt b/aws-cpp-sdk-text-to-speech/CMakeLists.txt -index b1054515d5..d1a34ddfc5 100644 +index b105451..7de9367 100644 --- a/aws-cpp-sdk-text-to-speech/CMakeLists.txt +++ b/aws-cpp-sdk-text-to-speech/CMakeLists.txt @@ -9,8 +9,6 @@ file( GLOB TEXT_TO_SPEECH_HEADERS "include/aws/text-to-speech/*.h" ) @@ -11,13 +11,15 @@ index b1054515d5..d1a34ddfc5 100644 if(PLATFORM_WINDOWS) file( GLOB TEXT_TO_SPEECH_PLATFORM_HEADERS "include/aws/text-to-speech/windows/*.h" ) file( GLOB TEXT_TO_SPEECH_PLATFORM_SOURCE "source/text-to-speech/windows/*.cpp" ) -@@ -20,13 +18,14 @@ if(PLATFORM_WINDOWS) +@@ -19,14 +17,15 @@ if(PLATFORM_WINDOWS) + set(PLATFORM_LIBS ${PLATFORM_LIBS} Winmm) endif() - if (PLATFORM_LINUX) +-if (PLATFORM_LINUX) - if(HAVE_PULSE) ++if (CMAKE_SYSTEM_NAME STREQUAL "Linux") + find_package(pulseaudio) -+ if (1) ++ if (pulseaudio_FOUND) file( GLOB TEXT_TO_SPEECH_PLATFORM_HEADERS "include/aws/text-to-speech/linux/*.h" ) file( GLOB TEXT_TO_SPEECH_PLATFORM_SOURCE "source/text-to-speech/linux/*.cpp" ) diff --git a/recipes/aws-sdk-cpp/all/patches/1.8.130-0005-aws-plugin-conf.patch b/recipes/aws-sdk-cpp/all/patches/1.8.130-0005-aws-plugin-conf.patch deleted file mode 100644 index b3eccfe69cc45..0000000000000 --- a/recipes/aws-sdk-cpp/all/patches/1.8.130-0005-aws-plugin-conf.patch +++ /dev/null @@ -1,44 +0,0 @@ -commit 1179cb040d6b9292d30eb7d444298cd286f9f574 -Author: dvirtz -Date: Tue Nov 16 21:38:45 2021 +0200 - - add a file to configure SDK plugins - -diff --git a/cmake/sdk_plugin_conf.cmake b/cmake/sdk_plugin_conf.cmake -new file mode 100644 -index 0000000000..474ead75bd ---- /dev/null -+++ b/cmake/sdk_plugin_conf.cmake -@@ -0,0 +1,32 @@ -+get_filename_component(AWS_NATIVE_SDK_ROOT ${CMAKE_CURRENT_LIST_DIR} DIRECTORY) -+set(SIMPLE_INSTALL TRUE) -+ -+if (CMAKE_INSTALL_BINDIR) -+ set(BINARY_DIRECTORY "${CMAKE_INSTALL_BINDIR}") -+endif() -+ -+if (CMAKE_INSTALL_LIBDIR) -+ set(LIBRARY_DIRECTORY "${CMAKE_INSTALL_LIBDIR}") -+endif() -+ -+if (CMAKE_INSTALL_INCLUDEDIR) -+ set(INCLUDE_DIRECTORY "${CMAKE_INSTALL_INCLUDEDIR}") -+endif() -+ -+if(BUILD_SHARED_LIBS) -+ set(ARCHIVE_DIRECTORY "${BINARY_DIRECTORY}") -+else() -+ set(ARCHIVE_DIRECTORY "${LIBRARY_DIRECTORY}") -+endif() -+ -+if(DEFINED CMAKE_CXX_STANDARD) -+ set(STANDARD_DEFAULT ${CMAKE_CXX_STANDARD}) -+else() -+ set(STANDARD_DEFAULT "11") -+endif() -+set(CPP_STANDARD ${STANDARD_DEFAULT} CACHE STRING "Flag to upgrade the C++ standard used. The default is 11. The minimum is 11.") -+ -+include(CMakePackageConfigHelpers) -+include(initialize_project_version) -+include(utilities) -+include(compiler_settings) diff --git a/recipes/aws-sdk-cpp/all/patches/1.8.130-0006-issue-1816.patch b/recipes/aws-sdk-cpp/all/patches/1.8.130-0006-issue-1816.patch deleted file mode 100644 index 6abce1b705a47..0000000000000 --- a/recipes/aws-sdk-cpp/all/patches/1.8.130-0006-issue-1816.patch +++ /dev/null @@ -1,20 +0,0 @@ -diff --git aws-cpp-sdk-text-to-speech/source/text-to-speech/TextToSpeechManager.cpp aws-cpp-sdk-text-to-speech/source/text-to-speech/TextToSpeechManager.cpp -index c633f3fabe..abb1ab7332 100644 ---- aws-cpp-sdk-text-to-speech/source/text-to-speech/TextToSpeechManager.cpp -+++ aws-cpp-sdk-text-to-speech/source/text-to-speech/TextToSpeechManager.cpp -@@ -146,7 +146,6 @@ namespace Aws - AWS_LOGSTREAM_TRACE(CLASS_TAG, "Audio retrieved from Polly. " << result.GetContentType() << " with " - << result.GetRequestCharacters() << " characters syntesized"); - -- std::streamsize amountRead(0); - unsigned char buffer[BUFF_SIZE]; - - std::lock_guard m(m_driverLock); -@@ -159,7 +158,6 @@ namespace Aws - AWS_LOGSTREAM_TRACE(CLASS_TAG, "Writing " << read << " bytes to device."); - - successfullyPlayed = m_activeDriver->WriteBufferToDevice(buffer, (std::size_t)read); -- amountRead += read; - played = successfullyPlayed; - } - diff --git a/recipes/aws-sdk-cpp/all/patches/1.9.100-0001-disable-sort-links.patch b/recipes/aws-sdk-cpp/all/patches/1.9.100-0001-disable-sort-links.patch deleted file mode 100644 index 6e93f7675b327..0000000000000 --- a/recipes/aws-sdk-cpp/all/patches/1.9.100-0001-disable-sort-links.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/cmake/sdks.cmake b/cmake/sdks.cmake -index 0ec9981ddf..d86a9f4874 100644 ---- a/cmake/sdks.cmake -+++ b/cmake/sdks.cmake -@@ -250,7 +250,7 @@ function(add_sdks) - - # the catch-all config needs to list all the targets in a dependency-sorted order - include(dependencies) -- sort_links(EXPORTS) -+ #sort_links(EXPORTS) - - # make an everything config by just including all the individual configs - file(WRITE ${CMAKE_BINARY_DIR}/aws-sdk-cpp-config.cmake "") diff --git a/recipes/aws-sdk-cpp/all/patches/1.9.100-0003-issue-1816.patch b/recipes/aws-sdk-cpp/all/patches/1.9.100-0003-issue-1816.patch deleted file mode 100644 index 6abce1b705a47..0000000000000 --- a/recipes/aws-sdk-cpp/all/patches/1.9.100-0003-issue-1816.patch +++ /dev/null @@ -1,20 +0,0 @@ -diff --git aws-cpp-sdk-text-to-speech/source/text-to-speech/TextToSpeechManager.cpp aws-cpp-sdk-text-to-speech/source/text-to-speech/TextToSpeechManager.cpp -index c633f3fabe..abb1ab7332 100644 ---- aws-cpp-sdk-text-to-speech/source/text-to-speech/TextToSpeechManager.cpp -+++ aws-cpp-sdk-text-to-speech/source/text-to-speech/TextToSpeechManager.cpp -@@ -146,7 +146,6 @@ namespace Aws - AWS_LOGSTREAM_TRACE(CLASS_TAG, "Audio retrieved from Polly. " << result.GetContentType() << " with " - << result.GetRequestCharacters() << " characters syntesized"); - -- std::streamsize amountRead(0); - unsigned char buffer[BUFF_SIZE]; - - std::lock_guard m(m_driverLock); -@@ -159,7 +158,6 @@ namespace Aws - AWS_LOGSTREAM_TRACE(CLASS_TAG, "Writing " << read << " bytes to device."); - - successfullyPlayed = m_activeDriver->WriteBufferToDevice(buffer, (std::size_t)read); -- amountRead += read; - played = successfullyPlayed; - } - diff --git a/recipes/aws-sdk-cpp/config.yml b/recipes/aws-sdk-cpp/config.yml index 3af57130465e4..15dd4365a90bb 100644 --- a/recipes/aws-sdk-cpp/config.yml +++ b/recipes/aws-sdk-cpp/config.yml @@ -1,7 +1,5 @@ versions: - "1.9.234": - folder: "all" - "1.9.100": + "1.11.352": folder: "all" - "1.8.130": + "1.9.234": folder: "all" diff --git a/recipes/azure-sdk-for-cpp/all/CMakeLists.txt b/recipes/azure-sdk-for-cpp/all/CMakeLists.txt new file mode 100644 index 0000000000000..46e5bc05a5d70 --- /dev/null +++ b/recipes/azure-sdk-for-cpp/all/CMakeLists.txt @@ -0,0 +1,18 @@ +cmake_minimum_required(VERSION 3.15) +project(cmake_wrapper) + +# The cmake_wrapper allows users to build only modules they want and not the entire sdk, +# the CMakeLists.txt from source does not provide this modularity to users (it's all or nothing). + +foreach(sdk ${BUILD_LIST}) + if(${sdk} STREQUAL azure-core) + # Always build Core + add_subdirectory("src/sdk/core") + elseif(${sdk} STREQUAL azure-storage-common) + add_subdirectory("src/sdk/storage/azure-storage-common") + elseif(${sdk} STREQUAL azure-storage-blobs) + add_subdirectory("src/sdk/storage/azure-storage-blobs") + elseif(${sdk} STREQUAL azure-storage-files-shares) + add_subdirectory("src/sdk/storage/azure-storage-files-shares") + endif() +endforeach() diff --git a/recipes/azure-sdk-for-cpp/all/conandata.yml b/recipes/azure-sdk-for-cpp/all/conandata.yml new file mode 100644 index 0000000000000..62ba6f53644b1 --- /dev/null +++ b/recipes/azure-sdk-for-cpp/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "1.11.3": + url: "https://github.com/Azure/azure-sdk-for-cpp/archive/refs/tags/azure-core_1.11.3.tar.gz" + sha256: "c67e42622bf1ebafee29aa09f333e41adc24712b0c993ada5dd97c9265b444cc" diff --git a/recipes/azure-sdk-for-cpp/all/conanfile.py b/recipes/azure-sdk-for-cpp/all/conanfile.py new file mode 100644 index 0000000000000..48f2abf1a5de9 --- /dev/null +++ b/recipes/azure-sdk-for-cpp/all/conanfile.py @@ -0,0 +1,110 @@ +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.build import check_min_cppstd +from conan.tools.cmake import CMakeToolchain, CMake, CMakeDeps, cmake_layout +from conan.tools.files import get, copy, rmdir +from conan.tools.scm import Version +import os + +required_conan_version = ">=1.54.0" + +AZURE_SDK_MODULES = ( + "azure-storage-common", + "azure-storage-blobs", + "azure-storage-files-shares" +) + +class AzureSDKForCppConan(ConanFile): + name = "azure-sdk-for-cpp" + description = "Microsoft Azure Storage Client Library for C++" + license = "Apache-2.0" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/Azure/azure-sdk-for-cpp" + topics = ("azure", "cpp", "cross-platform", "microsoft", "cloud") + package_type = "library" + settings = "os", "arch", "compiler", "build_type" + options = {"shared": [True, False], "fPIC": [True, False]} + options.update({_name: [True, False] for _name in AZURE_SDK_MODULES}) + default_options = {"shared": False, "fPIC": True} + default_options.update({_name: True for _name in AZURE_SDK_MODULES}) # Build all modules by default, let users pick what they do not want + + def export_sources(self): + copy(self, "CMakeLists.txt", src=self.recipe_folder, dst=self.export_sources_folder) + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def configure(self): + if self.options.get_safe("shared"): + self.options.rm_safe("fPIC") + + def requirements(self): + self.requires("openssl/[>=1.1 <4]") + self.requires("libcurl/[>=7.78 <9]") + self.requires("libxml2/[>=2.12.5 <3]") + + def layout(self): + cmake_layout(self, src_folder="src") + + def validate(self): + if self.settings.compiler.get_safe("cppstd"): + check_min_cppstd(self, 14) + + # Open to contributions for windows and apple + if self.settings.os != "Linux": + raise ConanInvalidConfiguration( + f"{self.ref} Conan recipe in ConanCenter still does not support {self.settings.os}, contributions to the recipe welcome.") + + if self.settings.compiler != "gcc": + raise ConanInvalidConfiguration( + f"{self.ref} Conan recipe in ConanCenter still does not support {self.settings.compiler}, contributions to the recipe welcome.") + + if self.settings.compiler == 'gcc' and Version(self.settings.compiler.version) < "6": + raise ConanInvalidConfiguration("Building requires GCC >= 6") + + def generate(self): + tc = CMakeToolchain(self) + + build_list = ["azure-core"] + for sdk in AZURE_SDK_MODULES: + if self.options.get_safe(sdk): + build_list.append(sdk) + tc.cache_variables["BUILD_LIST"] = ";".join(build_list) + + tc.variables["AZ_ALL_LIBRARIES"] = "ON" + tc.variables["FETCH_SOURCE_DEPS"] = "OFF" + tc.cache_variables["BUILD_TESTING"] = "OFF" + tc.cache_variables["BUILD_WINDOWS_UWP"] = "ON" + tc.cache_variables["DISABLE_AZURE_CORE_OPENTELEMETRY"] = "ON" + tc.cache_variables["BUILD_TRANSPORT_CURL"] = "ON" + tc.generate() + + deps = CMakeDeps(self) + deps.generate() + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def package(self): + copy(self, "LICENSE.txt", + dst=os.path.join(self.package_folder, "licenses"), + src=self.source_folder) + cmake = CMake(self) + cmake.install() + + rmdir(self, os.path.join(self.package_folder, "share")) + + def package_info(self): + self.cpp_info.set_property("cmake_file_name", "AzureSDK") + + # core component + self.cpp_info.components["azure-core"].set_property("cmake_target_name", "Azure::azure-core") + self.cpp_info.components["azure-core"].libs = ["azure-core"] + self.cpp_info.components["azure-core"].requires.extend(["openssl::openssl", "libcurl::curl", "libxml2::libxml2"]) + + enabled_sdks = [sdk for sdk in AZURE_SDK_MODULES if self.options.get_safe(sdk)] + for sdk in enabled_sdks: + self.cpp_info.components[sdk].set_property("cmake_target_name", f"Azure::{sdk}") + self.cpp_info.components[sdk].libs = [sdk] diff --git a/recipes/azure-sdk-for-cpp/all/test_package/CMakeLists.txt b/recipes/azure-sdk-for-cpp/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..8347b50cbb47d --- /dev/null +++ b/recipes/azure-sdk-for-cpp/all/test_package/CMakeLists.txt @@ -0,0 +1,17 @@ +cmake_minimum_required(VERSION 3.8) + +project(test_package LANGUAGES CXX) + +find_package(AzureSDK CONFIG REQUIRED) + +add_executable(test_azure-core test_azure-core.cc) +target_link_libraries(test_azure-core PRIVATE Azure::azure-core) + +add_executable(test_azure-storage-common test_azure-storage-common.cc) +target_link_libraries(test_azure-storage-common PRIVATE Azure::azure-core Azure::azure-storage-common) + +add_executable(test_azure-storage-blobs test_azure-storage-blobs.cc) +target_link_libraries(test_azure-storage-blobs PRIVATE Azure::azure-core Azure::azure-storage-common Azure::azure-storage-blobs) + +add_executable(test_azure-storage-files-shares test_azure-storage-files-shares.cc) +target_link_libraries(test_azure-storage-files-shares PRIVATE Azure::azure-core Azure::azure-storage-common Azure::azure-storage-files-shares) diff --git a/recipes/azure-sdk-for-cpp/all/test_package/conanfile.py b/recipes/azure-sdk-for-cpp/all/test_package/conanfile.py new file mode 100644 index 0000000000000..2dfe88d001d05 --- /dev/null +++ b/recipes/azure-sdk-for-cpp/all/test_package/conanfile.py @@ -0,0 +1,33 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import CMake, cmake_layout +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + + @property + def _tested_modules(self): + return ["azure-core", + "azure-storage-common", + "azure-storage-blobs", + "azure-storage-files-shares"] + + def layout(self): + cmake_layout(self) + + def requirements(self): + self.requires(self.tested_reference_str) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + for module in self._tested_modules: + bin_path = os.path.join(self.cpp.build.bindirs[0], f"test_{module}") + self.run(bin_path, env="conanrun") diff --git a/recipes/azure-sdk-for-cpp/all/test_package/test_azure-core.cc b/recipes/azure-sdk-for-cpp/all/test_package/test_azure-core.cc new file mode 100644 index 0000000000000..bfd5501b81141 --- /dev/null +++ b/recipes/azure-sdk-for-cpp/all/test_package/test_azure-core.cc @@ -0,0 +1,10 @@ +#include +#include + +int main() +{ + std::vector data = {1, 2, 3, 4}; + Azure::Core::IO::MemoryBodyStream stream(data); + + return 0; +} diff --git a/recipes/azure-sdk-for-cpp/all/test_package/test_azure-storage-blobs.cc b/recipes/azure-sdk-for-cpp/all/test_package/test_azure-storage-blobs.cc new file mode 100644 index 0000000000000..23cc6b485edbc --- /dev/null +++ b/recipes/azure-sdk-for-cpp/all/test_package/test_azure-storage-blobs.cc @@ -0,0 +1,10 @@ +#include + +using namespace Azure::Storage::Blobs; + +int main() +{ + BlobAudience audience{"TEST"}; + + return 0; +} diff --git a/recipes/azure-sdk-for-cpp/all/test_package/test_azure-storage-common.cc b/recipes/azure-sdk-for-cpp/all/test_package/test_azure-storage-common.cc new file mode 100644 index 0000000000000..5fdbe6d99f6dc --- /dev/null +++ b/recipes/azure-sdk-for-cpp/all/test_package/test_azure-storage-common.cc @@ -0,0 +1,10 @@ +#include + +using namespace Azure::Storage; + +int main() +{ + ContentHash contentHash{}; + + return 0; +} diff --git a/recipes/azure-sdk-for-cpp/all/test_package/test_azure-storage-files-shares.cc b/recipes/azure-sdk-for-cpp/all/test_package/test_azure-storage-files-shares.cc new file mode 100644 index 0000000000000..00034be2a0119 --- /dev/null +++ b/recipes/azure-sdk-for-cpp/all/test_package/test_azure-storage-files-shares.cc @@ -0,0 +1,10 @@ +#include + +using namespace Azure::Storage::Files::Shares; + +int main() +{ + SetSharePropertiesOptions options; + + return 0; +} diff --git a/recipes/azure-sdk-for-cpp/config.yml b/recipes/azure-sdk-for-cpp/config.yml new file mode 100644 index 0000000000000..dc736edb41043 --- /dev/null +++ b/recipes/azure-sdk-for-cpp/config.yml @@ -0,0 +1,3 @@ +versions: + "1.11.3": + folder: "all" diff --git a/recipes/azure-storage-cpp/all/CMakeLists.txt b/recipes/azure-storage-cpp/all/CMakeLists.txt index 82ba25e8c2576..3d130cd5365bf 100644 --- a/recipes/azure-storage-cpp/all/CMakeLists.txt +++ b/recipes/azure-storage-cpp/all/CMakeLists.txt @@ -1,7 +1,16 @@ -cmake_minimum_required(VERSION 2.8.12) +cmake_minimum_required(VERSION 3.15) project(cmake_wrapper) -include(conanbuildinfo.cmake) -conan_basic_setup() +find_package(cpprestsdk REQUIRED) +find_package(OpenSSL REQUIRED) +find_package(LibXml2 REQUIRED) +find_package(UUID QUIET) -add_subdirectory("source_subfolder/Microsoft.WindowsAzure.Storage") +add_subdirectory(src/Microsoft.WindowsAzure.Storage) + +target_link_libraries(azurestorage + cpprestsdk::cpprestsdk + OpenSSL::SSL + LibXml2::LibXml2 + $ +) diff --git a/recipes/azure-storage-cpp/all/conandata.yml b/recipes/azure-storage-cpp/all/conandata.yml index ccef8ba8c5bd6..5ce9572d0f722 100644 --- a/recipes/azure-storage-cpp/all/conandata.yml +++ b/recipes/azure-storage-cpp/all/conandata.yml @@ -4,5 +4,7 @@ sources: sha256: "446a821d115949f6511b7eb01e6a0e4f014b17bfeba0f3dc33a51750a9d5eca5" patches: "7.5.0": - - base_path: source_subfolder - patch_file: patches/0001-cmake-fixes.patch + - patch_file: "patches/fix-cpp17-incompatibility.patch" + patch_description: "Fix a minor C++17 incompatibility in util.cpp" + patch_type: "portability" + patch_source: "https://patch-diff.githubusercontent.com/raw/Azure/azure-storage-cpp/pull/366" diff --git a/recipes/azure-storage-cpp/all/conanfile.py b/recipes/azure-storage-cpp/all/conanfile.py index 92f05a255ac83..b86e79067f57c 100644 --- a/recipes/azure-storage-cpp/all/conanfile.py +++ b/recipes/azure-storage-cpp/all/conanfile.py @@ -1,19 +1,27 @@ -from conans import ConanFile, CMake, tools -from conans.errors import ConanInvalidConfiguration import os -required_conan_version = ">=1.33.0" +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.apple import is_apple_os +from conan.tools.build import check_min_cppstd, valid_min_cppstd +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.files import copy, get, replace_in_file, export_conandata_patches, apply_conandata_patches +from conan.tools.microsoft import check_min_vs, is_msvc_static_runtime, is_msvc +from conan.tools.scm import Version + +required_conan_version = ">=1.53.0" + class AzureStorageCppConan(ConanFile): name = "azure-storage-cpp" + description = "Microsoft Azure Storage Client Library for C++" license = "Apache-2.0" url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/Azure/azure-storage-cpp" - description = "Microsoft Azure Storage Client Library for C++" topics = ("azure", "cpp", "cross-platform", "microsoft", "cloud") - settings = "os", "compiler", "build_type", "arch" - generators = "cmake", "cmake_find_package" - exports_sources = ["CMakeLists.txt", "patches/**"] + + package_type = "library" + settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], "fPIC": [True, False], @@ -22,16 +30,10 @@ class AzureStorageCppConan(ConanFile): "shared": False, "fPIC": True, } - short_paths = True - _cmake = None - @property - def _source_subfolder(self): - return "source_subfolder" - - @property - def _build_subfolder(self): - return "build_subfolder" + # Use azure-sdk-for-cpp::azure-storage-blobs-cpp instead + # https://github.com/Azure/azure-sdk-for-cpp/blob/main/sdk/storage/MigrationGuide.md + deprecated = "azure-sdk-for-cpp" @property def _minimum_cpp_standard(self): @@ -40,41 +42,16 @@ def _minimum_cpp_standard(self): @property def _minimum_compiler_version(self): return { - "gcc": "5", + "gcc": "6", "Visual Studio": "14", + "msvc": "190", "clang": "3.4", "apple-clang": "5.1", } - def requirements(self): - self.requires("cpprestsdk/2.10.18") - if self.settings.os != "Windows": - self.requires("boost/1.76.0") - self.requires("libxml2/2.9.10") - self.requires("util-linux-libuuid/2.39") - if self.settings.os == "Macos": - self.requires("libgettext/0.20.1") - - def source(self): - tools.get(**self.conan_data["sources"][self.version], - destination=self._source_subfolder, strip_root=True) - - def _configure_cmake(self): - if self._cmake: - return self._cmake - self._cmake = CMake(self) - - self._cmake.definitions["CMAKE_FIND_FRAMEWORK"] = "LAST" - self._cmake.definitions["BUILD_TESTS"] = False - self._cmake.definitions["BUILD_SAMPLES"] = False - if not self.settings.compiler.cppstd: - self._cmake.definitions["CMAKE_CXX_STANDARD"] = self._minimum_cpp_standard - - if self.settings.os == "Macos": - self._cmake.definitions["GETTEXT_LIB_DIR"] = self.deps_cpp_info["libgettext"].lib_paths[0] - - self._cmake.configure(build_folder=self._build_subfolder) - return self._cmake + def export_sources(self): + copy(self, "CMakeLists.txt", src=self.recipe_folder, dst=self.export_sources_folder) + export_conandata_patches(self) def config_options(self): if self.settings.os == "Windows": @@ -82,42 +59,100 @@ def config_options(self): def configure(self): if self.options.shared: - del self.options.fPIC + self.options.rm_safe("fPIC") + + def layout(self): + cmake_layout(self, src_folder="src") + + def requirements(self): + self.requires("cpprestsdk/2.10.19", transitive_headers=True, transitive_libs=True) + self.requires("libxml2/[>=2.12.5 <3]", transitive_headers=True, transitive_libs=True) + if self.settings.os != "Windows": + # Boost.Asio is used in a public header here: + # https://github.com/Azure/azure-storage-cpp/blob/v7.5.0/Microsoft.WindowsAzure.Storage/includes/wascore/timer_handler.h#L27 + self.requires("boost/1.83.0", transitive_headers=True, transitive_libs=True) + self.requires("util-linux-libuuid/2.39.2", transitive_headers=True, transitive_libs=True) + self.requires("openssl/[>=1.1 <4]") + if is_apple_os(self): + self.requires("libgettext/0.22") def validate(self): if self.settings.compiler.cppstd: - tools.check_min_cppstd(self, self._minimum_cpp_standard) + check_min_cppstd(self, self._minimum_cpp_standard) min_version = self._minimum_compiler_version.get(str(self.settings.compiler)) if not min_version: - self.output.warn("{} recipe lacks information about the {} compiler support.".format( - self.name, self.settings.compiler)) + self.output.warning( + f"{self.name} recipe lacks information about the {self.settings.compiler} compiler support." + ) else: - if tools.Version(self.settings.compiler.version) < min_version: - raise ConanInvalidConfiguration("{} requires C++{} support. The current compiler {} {} does not support it.".format( - self.name, self._minimum_cpp_standard, self.settings.compiler, self.settings.compiler.version)) + if Version(self.settings.compiler.version) < min_version: + raise ConanInvalidConfiguration( + f"{self.name} requires C++{self._minimum_cpp_standard} support. The current compiler" + f" {self.settings.compiler} {self.settings.compiler.version} does not support it." + ) # FIXME: Visual Studio 2015 & 2017 are supported but CI of CCI lacks several Win SDK components # https://github.com/conan-io/conan-center-index/issues/4195 - if self.settings.compiler == "Visual Studio" and tools.Version(self.settings.compiler.version) < "16": + if not check_min_vs(self, 192, raise_invalid=False): raise ConanInvalidConfiguration("Visual Studio < 2019 not yet supported in this recipe") - if self.settings.compiler == "Visual Studio" and self.options.shared and "MT" in self.settings.compiler.runtime: + if self.options.shared and is_msvc_static_runtime(self): raise ConanInvalidConfiguration("Visual Studio build for shared library with MT runtime is not supported") + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + tc.variables["CMAKE_FIND_FRAMEWORK"] = "LAST" + tc.variables["BUILD_TESTS"] = False + tc.variables["BUILD_SAMPLES"] = False + if is_apple_os(self): + tc.variables["GETTEXT_LIB_DIR"] = self.dependencies["libgettext"].cpp_info.libdir + if not valid_min_cppstd(self, self._minimum_cpp_standard): + tc.variables["CMAKE_CXX_STANDARD"] = self._minimum_cpp_standard + # Allow non-cache_variables to be used + tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0077"] = "NEW" + # Relocatable shared libs on macOS + tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0042"] = "NEW" + tc.generate() + + deps = CMakeDeps(self) + deps.set_property("util-linux-libuuid", "cmake_file_name", "UUID") + deps.generate() + + def _patch_sources(self): + apply_conandata_patches(self) + cmakelists_path = os.path.join(self.source_folder, "Microsoft.WindowsAzure.Storage", "CMakeLists.txt") + # Do not force C++11 and libc++ + replace_in_file(self, cmakelists_path, "-std=c++11", "") + replace_in_file(self, cmakelists_path, "-stdlib=libc++", "") + # Let Conan handle the Boost defines + replace_in_file(self, cmakelists_path, "add_definitions(-DBOOST_LOG_DYN_LINK)", "") + def build(self): - for patch in self.conan_data.get("patches", {}).get(self.version, []): - tools.patch(**patch) - cmake = self._configure_cmake() + self._patch_sources() + cmake = CMake(self) + cmake.configure(build_script_folder=self.source_path.parent) cmake.build() def package(self): - self.copy("LICENSE.txt", dst="licenses", src=self._source_subfolder) - cmake = self._configure_cmake() + copy(self, "LICENSE.txt", + dst=os.path.join(self.package_folder, "licenses"), + src=self.source_folder) + cmake = CMake(self) cmake.install() def package_info(self): - - self.cpp_info.libs = tools.collect_libs(self) if self.settings.os == "Windows": + # https://github.com/Azure/azure-storage-cpp/blob/v7.5.0/Microsoft.WindowsAzure.Storage/src/CMakeLists.txt#L100 + self.cpp_info.libs = ["wastorage"] + # https://github.com/Azure/azure-storage-cpp/blob/v7.5.0/Microsoft.WindowsAzure.Storage/src/CMakeLists.txt#L90 self.cpp_info.system_libs = ["ws2_32", "rpcrt4", "xmllite", "bcrypt"] - if not self.options.shared: - self.cpp_info.defines = ["_NO_WASTORAGE_API"] + if is_msvc(self): + # https://github.com/Azure/azure-storage-cpp/blob/v7.5.0/Microsoft.WindowsAzure.Storage/CMakeLists.txt#L116-L120 + if self.options.shared: + self.cpp_info.defines = ["WASTORAGE_DLL", "_USRDLL"] + else: + self.cpp_info.defines = ["_NO_WASTORAGE_API"] + else: + self.cpp_info.libs = ["azurestorage"] diff --git a/recipes/azure-storage-cpp/all/patches/0001-cmake-fixes.patch b/recipes/azure-storage-cpp/all/patches/0001-cmake-fixes.patch deleted file mode 100644 index c775329eb84fe..0000000000000 --- a/recipes/azure-storage-cpp/all/patches/0001-cmake-fixes.patch +++ /dev/null @@ -1,72 +0,0 @@ -diff --git a/Microsoft.WindowsAzure.Storage/CMakeLists.txt b/Microsoft.WindowsAzure.Storage/CMakeLists.txt -index ac9e65d..f5988f6 100644 ---- a/Microsoft.WindowsAzure.Storage/CMakeLists.txt -+++ b/Microsoft.WindowsAzure.Storage/CMakeLists.txt -@@ -46,9 +46,9 @@ if(UNIX) - find_package(OpenSSL 1.0.0 REQUIRED) - - -- find_package(UUID REQUIRED) -- find_package(Casablanca REQUIRED) -- find_package(LibXML2 REQUIRED) -+ find_package(libuuid REQUIRED) -+ find_package(cpprestsdk REQUIRED) -+ find_package(LibXml2 REQUIRED) - - if(BUILD_TESTS) - find_package(UnitTest++ REQUIRED) -@@ -57,7 +57,7 @@ if(UNIX) - - elseif(WIN32) - message("-- Setting WIN32 options") -- find_package(Casablanca REQUIRED) -+ find_package(cpprestsdk REQUIRED) - add_definitions(-DUNICODE -D_UNICODE -D_WIN32) - else() - message("-- Unsupported Build Platform.") -@@ -85,13 +85,10 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "GNU") - - set(LD_FLAGS "${LD_FLAGS} -Wl,-z,defs") - -- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -fno-strict-aliasing") -+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-strict-aliasing") - - set(STRICT_CXX_FLAGS ${WARNINGS} "-Werror -pedantic") - -- if (BUILD_SHARED_LIBS) -- add_definitions(-DBOOST_LOG_DYN_LINK) -- endif() - add_definitions(-D_TURN_OFF_PLATFORM_STRING) - elseif(CMAKE_CXX_COMPILER_ID MATCHES "Clang") - message("-- Setting clang options") -@@ -100,14 +97,11 @@ elseif(CMAKE_CXX_COMPILER_ID MATCHES "Clang") - set(OSX_SUPPRESSIONS "-Wno-overloaded-virtual -Wno-sign-conversion -Wno-deprecated -Wno-unknown-pragmas -Wno-reorder -Wno-char-subscripts -Wno-switch -Wno-unused-parameter -Wno-unused-variable -Wno-deprecated -Wno-unused-value -Wno-unknown-warning-option -Wno-return-type-c-linkage -Wno-unused-function -Wno-sign-compare -Wno-shorten-64-to-32 -Wno-reorder -Wno-unused-local-typedefs") - set(WARNINGS "${WARNINGS} ${OSX_SUPPRESSIONS}") - -- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++ -Wno-return-type-c-linkage -Wno-unneeded-internal-declaration") -+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-return-type-c-linkage -Wno-unneeded-internal-declaration") - set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LIBRARY "libc++") - set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LANGUAGE_STANDARD "c++11") - -- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -fno-strict-aliasing") -- if (BUILD_SHARED_LIBS) -- add_definitions(-DBOOST_LOG_DYN_LINK) -- endif() -+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-strict-aliasing") - add_definitions(-D_TURN_OFF_PLATFORM_STRING) - elseif(CMAKE_CXX_COMPILER_ID MATCHES "MSVC") - message("-- Setting MSVC options") -@@ -142,11 +136,11 @@ set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/Binaries) - set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/Binaries) - - set(AZURESTORAGE_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/includes) --set(AZURESTORAGE_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/includes ${CASABLANCA_INCLUDE_DIR} ${Boost_INCLUDE_DIRS} ${OPENSSL_INCLUDE_DIRS} ${UUID_INCLUDE_DIRS} ${LibXML2_INCLUDE_DIR}) -+set(AZURESTORAGE_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/includes ${cpprestsdk_INCLUDE_DIR} ${Boost_INCLUDE_DIRS} ${OpenSSL_INCLUDE_DIRS} ${libuuid_INCLUDE_DIRS} ${LibXml2_INCLUDE_DIR}) - - - set(AZURESTORAGE_LIBRARY azurestorage) --set(AZURESTORAGE_LIBRARIES ${AZURESTORAGE_LIBRARY} ${CASABLANCA_LIBRARY} ${Boost_LIBRARIES} ${Boost_FRAMEWORK} ${OPENSSL_LIBRARIES} ${UUID_LIBRARIES} ${LibXML2_LIBRARY} ${CMAKE_THREAD_LIBS_INIT}) -+set(AZURESTORAGE_LIBRARIES ${AZURESTORAGE_LIBRARY} ${cpprestsdk_LIBRARIES} ${Boost_LIBRARIES} ${OpenSSL_LIBRARIES} ${libuuid_LIBRARIES} ${LibXml2_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT}) - - # Set version numbers centralized - set (AZURESTORAGE_VERSION_MAJOR 7) diff --git a/recipes/azure-storage-cpp/all/patches/fix-cpp17-incompatibility.patch b/recipes/azure-storage-cpp/all/patches/fix-cpp17-incompatibility.patch new file mode 100644 index 0000000000000..23af9f8243be8 --- /dev/null +++ b/recipes/azure-storage-cpp/all/patches/fix-cpp17-incompatibility.patch @@ -0,0 +1,51 @@ +From b81d6349d3f6c05741978bab9b07372150c85137 Mon Sep 17 00:00:00 2001 +From: Adam Mensel +Date: Mon, 31 Aug 2020 19:44:24 -0600 +Subject: [PATCH 1/2] Use lambdas instead of std::fun_ptr, to get free C++17 + compatibility. + +--- + Microsoft.WindowsAzure.Storage/src/util.cpp | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/Microsoft.WindowsAzure.Storage/src/util.cpp b/Microsoft.WindowsAzure.Storage/src/util.cpp +index cf0a3116..2d0d540c 100644 +--- a/Microsoft.WindowsAzure.Storage/src/util.cpp ++++ b/Microsoft.WindowsAzure.Storage/src/util.cpp +@@ -334,8 +334,8 @@ namespace azure { namespace storage { namespace core { + + utility::string_t str_trim_starting_trailing_whitespaces(const utility::string_t& str) + { +- auto non_space_begin = std::find_if(str.begin(), str.end(), std::not1(std::ptr_fun(isspace))); +- auto non_space_end = std::find_if(str.rbegin(), str.rend(), std::not1(std::ptr_fun(isspace))).base(); ++ auto non_space_begin = std::find_if(str.begin(), str.end(), [](char c) { return !std::isspace(c); }); ++ auto non_space_end = std::find_if(str.rbegin(), str.rend(), [](char c) { return !std::isspace(c); }).base(); + return utility::string_t(non_space_begin, non_space_end); + } + + +From b71db982b9f7065494c950c558f7e30b89026a89 Mon Sep 17 00:00:00 2001 +From: Adam Mensel +Date: Mon, 31 Aug 2020 23:02:29 -0600 +Subject: [PATCH 2/2] Keep the exact same logic as before, but still using a + lambda instead of std::fun_ptr. + +--- + Microsoft.WindowsAzure.Storage/src/util.cpp | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/Microsoft.WindowsAzure.Storage/src/util.cpp b/Microsoft.WindowsAzure.Storage/src/util.cpp +index 2d0d540c..c2a3d7d4 100644 +--- a/Microsoft.WindowsAzure.Storage/src/util.cpp ++++ b/Microsoft.WindowsAzure.Storage/src/util.cpp +@@ -334,8 +334,8 @@ namespace azure { namespace storage { namespace core { + + utility::string_t str_trim_starting_trailing_whitespaces(const utility::string_t& str) + { +- auto non_space_begin = std::find_if(str.begin(), str.end(), [](char c) { return !std::isspace(c); }); +- auto non_space_end = std::find_if(str.rbegin(), str.rend(), [](char c) { return !std::isspace(c); }).base(); ++ auto non_space_begin = std::find_if(str.begin(), str.end(), [](int c) { return !isspace(c); }); ++ auto non_space_end = std::find_if(str.rbegin(), str.rend(), [](int c) { return !isspace(c); }).base(); + return utility::string_t(non_space_begin, non_space_end); + } + diff --git a/recipes/azure-storage-cpp/all/test_package/CMakeLists.txt b/recipes/azure-storage-cpp/all/test_package/CMakeLists.txt index 1c789ba4ceba1..b3dc1a61ac7d2 100644 --- a/recipes/azure-storage-cpp/all/test_package/CMakeLists.txt +++ b/recipes/azure-storage-cpp/all/test_package/CMakeLists.txt @@ -1,12 +1,8 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.15) project(PackageTest CXX) -set(CMAKE_CXX_STANDARD 11) - -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup() - find_package(azure-storage-cpp REQUIRED CONFIG) add_executable(example example.cpp) target_link_libraries(example azure-storage-cpp::azure-storage-cpp) +target_compile_features(example PRIVATE cxx_std_11) diff --git a/recipes/azure-storage-cpp/all/test_package/conanfile.py b/recipes/azure-storage-cpp/all/test_package/conanfile.py index 33fb4c0ecc216..8d52b7021efe1 100644 --- a/recipes/azure-storage-cpp/all/test_package/conanfile.py +++ b/recipes/azure-storage-cpp/all/test_package/conanfile.py @@ -1,11 +1,19 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake import os -from conans import ConanFile, CMake, tools +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" -class AwsSdkCppTestConan(ConanFile): - settings = "os", "compiler", "build_type", "arch" - generators = "cmake", "cmake_find_package_multi" + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) def build(self): cmake = CMake(self) @@ -13,6 +21,6 @@ def build(self): cmake.build() def test(self): - if not tools.cross_building(self): - bin_path = os.path.join("bin", "example") - self.run(bin_path, run_environment=True) + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "example") + self.run(bin_path, env="conanrun") diff --git a/recipes/android-ndk/all/test_v1_package/CMakeLists.txt b/recipes/azure-storage-cpp/all/test_v1_package/CMakeLists.txt similarity index 100% rename from recipes/android-ndk/all/test_v1_package/CMakeLists.txt rename to recipes/azure-storage-cpp/all/test_v1_package/CMakeLists.txt diff --git a/recipes/azure-storage-cpp/all/test_v1_package/conanfile.py b/recipes/azure-storage-cpp/all/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..33fb4c0ecc216 --- /dev/null +++ b/recipes/azure-storage-cpp/all/test_v1_package/conanfile.py @@ -0,0 +1,18 @@ +import os + +from conans import ConanFile, CMake, tools + + +class AwsSdkCppTestConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake", "cmake_find_package_multi" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if not tools.cross_building(self): + bin_path = os.path.join("bin", "example") + self.run(bin_path, run_environment=True) diff --git a/recipes/b2/config.yml b/recipes/b2/config.yml index fc7ada07a386e..0e3bbe203df45 100644 --- a/recipes/b2/config.yml +++ b/recipes/b2/config.yml @@ -9,3 +9,9 @@ versions: folder: portable "5.0.0": folder: portable + "5.1.0": + folder: portable + "5.2.0": + folder: portable + "5.2.1": + folder: portable diff --git a/recipes/b2/portable/conandata.yml b/recipes/b2/portable/conandata.yml index 4bd954865dc3a..18e6c7ae29c82 100644 --- a/recipes/b2/portable/conandata.yml +++ b/recipes/b2/portable/conandata.yml @@ -14,3 +14,12 @@ sources: "5.0.0": url: "https://github.com/bfgroup/b2/releases/download/5.0.0/b2-5.0.0.tar.bz2" sha256: "1ef867f7d374345a948baca025ed277dadda05a68439aa383a06aceb9911f7d3" + "5.1.0": + url: "https://github.com/bfgroup/b2/releases/download/5.1.0/b2-5.1.0.tar.bz2" + sha256: "8429a2e7c9c4484f6a4bd7fb18743f0ea1dba41eb024479a9b23381bcb813623" + "5.2.0": + url: "https://github.com/bfgroup/b2/releases/download/5.2.0/b2-5.2.0.tar.bz2" + sha256: "c27adfb4e667d748bb7d3e18657938fa8bcf185b74a29bf091113299f532ed6d" + "5.2.1": + url: "https://github.com/bfgroup/b2/releases/download/5.2.1/b2-5.2.1.tar.bz2" + sha256: "6428edec31731aa479b4e7d8f83898831a0919352ec7d7f9874145abe165a578" diff --git a/recipes/b2/portable/conanfile.py b/recipes/b2/portable/conanfile.py index eb45936017eef..68803d254a16d 100644 --- a/recipes/b2/portable/conanfile.py +++ b/recipes/b2/portable/conanfile.py @@ -21,6 +21,8 @@ class B2Conan(ConanFile): url = "https://github.com/conan-io/conan-center-index" settings = "os", "arch" + package_type = "application" + ''' * use_cxx_env: False, True @@ -193,6 +195,7 @@ def build(self): def package(self): copy(self, "LICENSE.txt", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) + copy(self, "*.LICENSE", src=self._b2_engine_dir, dst=os.path.join(self.package_folder, "licenses")) copy(self, "*b2", dst=self._pkg_bin_dir, src=self._b2_output_dir) copy(self, "*b2.exe", dst=self._pkg_bin_dir, src=self._b2_output_dir) copy(self, "*.jam", dst=self._pkg_bin_dir, src=self._b2_output_dir) diff --git a/recipes/b2/portable/test_package/.gitignore b/recipes/b2/portable/test_package/.gitignore new file mode 100644 index 0000000000000..c97f963b3da62 --- /dev/null +++ b/recipes/b2/portable/test_package/.gitignore @@ -0,0 +1 @@ +*.sh diff --git a/recipes/battery-embed/all/conandata.yml b/recipes/battery-embed/all/conandata.yml new file mode 100644 index 0000000000000..b94490b90ffc3 --- /dev/null +++ b/recipes/battery-embed/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "1.2.19": + url: "https://github.com/batterycenter/embed/archive/refs/tags/v1.2.19.tar.gz" + sha256: "d472655b6eec215cd7cd20411f3596f22f597ea6a82fbbc5a5d7271e102b610e" diff --git a/recipes/battery-embed/all/conanfile.py b/recipes/battery-embed/all/conanfile.py new file mode 100644 index 0000000000000..42b1dc0f23c98 --- /dev/null +++ b/recipes/battery-embed/all/conanfile.py @@ -0,0 +1,74 @@ +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.build import check_min_cppstd +from conan.tools.files import copy, get +from conan.tools.cmake import cmake_layout +from conan.tools.scm import Version +import os + +required_conan_version = ">=1.53.0" + +class BatteryEmbedConan(ConanFile): + name = "battery-embed" + description = "A CMake/C++20 library to embed resource files at compile time" + license = "Apache-2.0" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/batterycenter/embed" + topics = ("embed") + package_type = "build-scripts" + settings = "os", "arch", "compiler", "build_type" + + @property + def _min_cppstd(self): + return 20 + + @property + def _compilers_minimum_version(self): + return { + "gcc": "11", + "clang": "12", + "apple-clang": "13", + "Visual Studio": "16", + "msvc": "192", + } + + def export_sources(self): + copy(self, "embed.cmake", src=self.recipe_folder, dst=self.export_sources_folder) + + def layout(self): + cmake_layout(self, src_folder="src") + + def validate(self): + if self.settings.compiler.cppstd: + check_min_cppstd(self, self._min_cppstd) + minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) + if minimum_version and Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration( + f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." + ) + + def package_id(self): + del self.info.settings.arch + del self.info.settings.compiler + del self.info.settings.build_type + del self.info.settings.os + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def build(self): + copy(self, "embed.cmake", os.path.join(self.source_folder, os.pardir), self.recipe_folder) + + def package(self): + copy(self, "LICENSE", self.source_folder, os.path.join(self.package_folder, "licenses")) + copy(self, "embed.cmake", self.recipe_folder, os.path.join(self.package_folder, "lib", "cmake")) + copy(self, "CMakeLists.txt", self.source_folder, os.path.join(self.package_folder, "lib", "cmake", "battery-embed")) + + def package_info(self): + self.cpp_info.libdirs = [] + self.cpp_info.bindirs = [] + self.cpp_info.includedirs = [] + + self.cpp_info.set_property("cmake_target_name", "battery::embed") + self.cpp_info.builddirs.append(os.path.join("lib", "cmake")) + self.cpp_info.set_property("cmake_build_modules", [os.path.join("lib", "cmake", "embed.cmake")]) diff --git a/recipes/battery-embed/all/embed.cmake b/recipes/battery-embed/all/embed.cmake new file mode 100644 index 0000000000000..59fe1f00e55a0 --- /dev/null +++ b/recipes/battery-embed/all/embed.cmake @@ -0,0 +1,4 @@ +# cmake proxy module +cmake_minimum_required(VERSION 3.21) + +add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/battery-embed battery-embed-build) diff --git a/recipes/battery-embed/all/test_package/CMakeLists.txt b/recipes/battery-embed/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..b5eb771902175 --- /dev/null +++ b/recipes/battery-embed/all/test_package/CMakeLists.txt @@ -0,0 +1,9 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) + +find_package(battery-embed REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_20) + +b_embed(${PROJECT_NAME} test_package.cpp) diff --git a/recipes/battery-embed/all/test_package/conanfile.py b/recipes/battery-embed/all/test_package/conanfile.py new file mode 100644 index 0000000000000..065416112515f --- /dev/null +++ b/recipes/battery-embed/all/test_package/conanfile.py @@ -0,0 +1,29 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) + + def build_requirements(self): + self.tool_requires("cmake/[>=3.21 <4]") + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/battery-embed/all/test_package/test_package.cpp b/recipes/battery-embed/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..feb15d322e7f2 --- /dev/null +++ b/recipes/battery-embed/all/test_package/test_package.cpp @@ -0,0 +1,8 @@ +#include + +#include "battery/embed.hpp" + +int main(void) { + std::cout << b::embed<"test_package.cpp">() << std::endl; + return EXIT_SUCCESS; +} diff --git a/recipes/battery-embed/config.yml b/recipes/battery-embed/config.yml new file mode 100644 index 0000000000000..a18e338f675d9 --- /dev/null +++ b/recipes/battery-embed/config.yml @@ -0,0 +1,3 @@ +versions: + "1.2.19": + folder: all diff --git a/recipes/bazel/all/conandata.yml b/recipes/bazel/all/conandata.yml index 243efd0d24b9d..554c60438f66f 100644 --- a/recipes/bazel/all/conandata.yml +++ b/recipes/bazel/all/conandata.yml @@ -1,4 +1,30 @@ sources: + "7.2.1": + license: + url: "https://raw.githubusercontent.com/bazelbuild/bazel/7.2.1/LICENSE" + sha256: "cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30" + Macos: + x86_64: + url: "https://github.com/bazelbuild/bazel/releases/download/7.2.1/bazel-7.2.1-darwin-x86_64" + sha256: "2c29176d6ce9ccdd16d5a15e348c756abd6e0005c77d4695b61871219295fa96" + armv8: + url: "https://github.com/bazelbuild/bazel/releases/download/7.2.1/bazel-7.2.1-darwin-arm64" + sha256: "6ac72cd7c0b422e3e8162a6912f963ddee45c645bf7dadb924728a80076c38b2" + Linux: + x86_64: + url: "https://github.com/bazelbuild/bazel/releases/download/7.2.1/bazel-7.2.1-linux-x86_64" + sha256: "80ccd1ecb4b88750fbe5d7622d67072fddcba9da7808f13356555e480bf67875" + armv8: + url: "https://github.com/bazelbuild/bazel/releases/download/7.2.1/bazel-7.2.1-linux-arm64" + sha256: "5a4cc979353671e438b9469b833924c2361e25a580cc278a75877aedc27c1c53" + Windows: + x86_64: + url: "https://github.com/bazelbuild/bazel/releases/download/7.2.1/bazel-7.2.1-windows-x86_64.exe" + sha256: "4926bd3bf580b8b3323e0d09bde5dc6120fdd262d99f753eb61fedfb9a2cfc49" + armv8: + url: "https://github.com/bazelbuild/bazel/releases/download/7.2.1/bazel-7.2.1-windows-arm64.exe" + sha256: "d8b1a0da1c6e9d94a5ac4a2728d344e496c32e68cf27ed6a2c117d38fa994fc8" + "7.0.0": license: url: "https://raw.githubusercontent.com/bazelbuild/bazel/7.0.0/LICENSE" @@ -25,6 +51,32 @@ sources: url: "https://github.com/bazelbuild/bazel/releases/download/7.0.0/bazel-7.0.0-windows-arm64.exe" sha256: "7846fc1180c7cf1985f7748db40066590f20a62a9e5c56ee5b1f1f127cb978c5" + "6.5.0": + license: + url: "https://raw.githubusercontent.com/bazelbuild/bazel/6.5.0/LICENSE" + sha256: "cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30" + Macos: + x86_64: + url: "https://github.com/bazelbuild/bazel/releases/download/6.5.0/bazel-6.5.0-darwin-x86_64" + sha256: "bbf9c2c03bac48e0514f46db0295027935535d91f6d8dcd960c53393559eab29" + armv8: + url: "https://github.com/bazelbuild/bazel/releases/download/6.5.0/bazel-6.5.0-darwin-arm64" + sha256: "c6b6dc17efcdf13fba484c6fe0b6c3361b888ae7b9573bc25a2dbe8c502448eb" + Linux: + x86_64: + url: "https://github.com/bazelbuild/bazel/releases/download/6.5.0/bazel-6.5.0-linux-x86_64" + sha256: "a40ac69263440761199fcb8da47ad4e3f328cbe79ffbf4ecc14e5ba252857307" + armv8: + url: "https://github.com/bazelbuild/bazel/releases/download/6.5.0/bazel-6.5.0-linux-arm64" + sha256: "5afe973cadc036496cac66f1414ca9be36881423f576db363d83afc9084c0c2f" + Windows: + x86_64: + url: "https://github.com/bazelbuild/bazel/releases/download/6.5.0/bazel-6.5.0-windows-x86_64.exe" + sha256: "6eae8e7f28e1b68b833503d1a58caf139c11e52de19df0d787d974653a0ea4c6" + armv8: + url: "https://github.com/bazelbuild/bazel/releases/download/6.5.0/bazel-6.5.0-windows-arm64.exe" + sha256: "b40d2ab8aa0b8413b2bdd599ec1c571d09714275f35ba476e89b3fca6857a937" + "6.2.0": license: url: "https://raw.githubusercontent.com/bazelbuild/bazel/6.2.0/LICENSE" @@ -77,6 +129,29 @@ sources: url: "https://github.com/bazelbuild/bazel/releases/download/5.4.1/bazel-5.4.1-windows-arm64.exe" sha256: "1e273c20dfa8493bf21b002614592a6cb3aa9eabe8b30eda96f8a517fca1a619" + "4.2.4": + license: + url: "https://raw.githubusercontent.com/bazelbuild/bazel/4.2.4/LICENSE" + sha256: "cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30" + Macos: + x86_64: + url: "https://github.com/bazelbuild/bazel/releases/download/4.2.4/bazel-4.2.4-darwin-x86_64" + sha256: "84e5c594ce4c1d4354b68c90f6e81eb3a7d89737f60c3e3f4a689212d984dbc6" + armv8: + url: "https://github.com/bazelbuild/bazel/releases/download/4.2.4/bazel-4.2.4-darwin-arm64" + sha256: "6bc6acf5049f8ac78d083dce9538bade04186e56157e21330b0d565575547759" + Linux: + x86_64: + url: "https://github.com/bazelbuild/bazel/releases/download/4.2.4/bazel-4.2.4-linux-x86_64" + sha256: "29921e744399018efa0038bb770d2d11c77457e9162e5dcb58e6e11ab2bca7d3" + armv8: + url: "https://github.com/bazelbuild/bazel/releases/download/4.2.4/bazel-4.2.4-linux-arm64" + sha256: "1479d683ac64b8b4d8fc07f72da1c58914f4ef1113412beaa421b341b947a3dd" + Windows: + x86_64: + url: "https://github.com/bazelbuild/bazel/releases/download/4.2.4/bazel-4.2.4-windows-x86_64.exe" + sha256: "92103ac197fa53883e0671fbfda77b435619f94279fabf0694ec8623959348f8" + "4.0.0": license: url: "https://raw.githubusercontent.com/bazelbuild/bazel/4.0.0/LICENSE" diff --git a/recipes/bazel/config.yml b/recipes/bazel/config.yml index e9824e01dcd11..51015201a5c54 100644 --- a/recipes/bazel/config.yml +++ b/recipes/bazel/config.yml @@ -1,9 +1,15 @@ versions: + "7.2.1": + folder: all "7.0.0": folder: all + "6.5.0": + folder: all "6.2.0": folder: all "5.4.1": folder: all + "4.2.4": + folder: all "4.0.0": folder: all diff --git a/recipes/bdwgc/all/conandata.yml b/recipes/bdwgc/all/conandata.yml index d463c9bb2301b..3e842ffa56b67 100644 --- a/recipes/bdwgc/all/conandata.yml +++ b/recipes/bdwgc/all/conandata.yml @@ -14,6 +14,9 @@ sources: "8.2.6": url: "https://github.com/ivmai/bdwgc/releases/download/v8.2.6/gc-8.2.6.tar.gz" sha256: "b9183fe49d4c44c7327992f626f8eaa1d8b14de140f243edb1c9dcff7719a7fc" + "8.2.8": + url: "https://github.com/ivmai/bdwgc/releases/download/v8.2.8/gc-8.2.8.tar.gz" + sha256: "7649020621cb26325e1fb5c8742590d92fb48ce5c259b502faf7d9fb5dabb160" patches: "8.0.4": - patch_file: "patches/update-cmake-8_0_4.patch" @@ -25,3 +28,5 @@ patches: - patch_file: "patches/update-cmake-8_2_4.patch" "8.2.6": - patch_file: "patches/update-cmake-8_2_6.patch" + "8.2.8": + - patch_file: "patches/update-cmake-8_2_6.patch" diff --git a/recipes/bdwgc/config.yml b/recipes/bdwgc/config.yml index c736cacb36944..2171a77e5a1a9 100644 --- a/recipes/bdwgc/config.yml +++ b/recipes/bdwgc/config.yml @@ -9,3 +9,5 @@ versions: folder: all "8.2.6": folder: all + "8.2.8": + folder: all diff --git a/recipes/beauty/all/conandata.yml b/recipes/beauty/all/conandata.yml index ba365a8d82861..42c96b3a5b488 100644 --- a/recipes/beauty/all/conandata.yml +++ b/recipes/beauty/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.0.4": + url: "https://github.com/dfleury2/beauty/archive/refs/tags/1.0.4.tar.gz" + sha256: "8bfd3718470bdbed05b6b9253543d6ab9b33e21e25028e53fa513c67893a39f3" "1.0.3": url: "https://github.com/dfleury2/beauty/archive/refs/tags/1.0.3.tar.gz" sha256: "1707b0974537cfd8d1d2fd0b5accd5a662c0b408042aa01384cf5840ecc43594" @@ -6,8 +9,19 @@ sources: url: "https://github.com/dfleury2/beauty/archive/refs/tags/1.0.2.tar.gz" sha256: "627294d04a91c85e14d9c29475d539da5172c6d7306a48dca7c72413e47eebd6" patches: + "1.0.4": + - patch_file: "patches/0002-remove-openssl-target.patch" + patch_description: "Avoid defining openssl::openssl target when defined by Conan" + patch_type: "conan" + "1.0.3": + - patch_file: "patches/0002-remove-openssl-target.patch" + patch_description: "Avoid defining openssl::openssl target when defined by Conan" + patch_type: "conan" "1.0.2": - patch_file: "patches/0001-apple-compatibility.patch" patch_description: "Handle pthread_setname_np not being defined on macOS" patch_type: "portability" patch_source: "https://github.com/dfleury2/beauty/pull/28" + - patch_file: "patches/0002-remove-openssl-target.patch" + patch_description: "Avoid defining openssl::openssl target when defined by Conan" + patch_type: "conan" diff --git a/recipes/beauty/all/conanfile.py b/recipes/beauty/all/conanfile.py index cb6e4434731c3..f8b9acb4c99ef 100644 --- a/recipes/beauty/all/conanfile.py +++ b/recipes/beauty/all/conanfile.py @@ -23,23 +23,26 @@ class BeautyConan(ConanFile): options = { "shared": [True, False], "fPIC": [True, False], + "with_openssl": [True, False], } default_options = { "shared": False, "fPIC": True, + "with_openssl": True, } @property def _min_cppstd(self): - return "20" + return "17" @property def _compilers_minimum_version(self): return { "gcc": "8", - "clang": "11", + "clang": "7", "Visual Studio": "16", "msvc": "192", + "apple-clang": "10" } def export_sources(self): @@ -59,9 +62,14 @@ def layout(self): def requirements(self): # beauty public headers include some boost headers. # For example beauty/application.hpp includes boost/asio.hpp - self.requires("boost/1.83.0", transitive_headers=True) - # dependency of asio in boost, exposed in boost/asio/ssl/detail/openssl_types.hpp - self.requires("openssl/[>=1.1 <4]", transitive_headers=True, transitive_libs=True) + if Version(self.version) >= "1.0.4": + # https://github.com/dfleury2/beauty/issues/30 + self.requires("boost/1.85.0", transitive_headers=True) + else: + self.requires("boost/1.84.0", transitive_headers=True) + if self.options.with_openssl: + # dependency of asio in boost, exposed in boost/asio/ssl/detail/openssl_types.hpp + self.requires("openssl/[>=1.1 <4]", transitive_headers=True, transitive_libs=True) def validate(self): if self.settings.compiler.get_safe("cppstd"): @@ -74,13 +82,13 @@ def validate(self): ) if self.settings.compiler == "clang" and self.settings.compiler.libcxx != "libc++": - raise ConanInvalidConfiguration("Only libc++ is supported for clang") + raise ConanInvalidConfiguration(f"{self.ref} clang compiler requires -s compiler.libcxx=libc++") if self.settings.compiler == "apple-clang" and self.options.shared: - raise ConanInvalidConfiguration("shared is not supported on apple-clang") + raise ConanInvalidConfiguration(f"The option {self.ref}:shared=True is not supported on Apple Clang. Use static instead.") if is_msvc(self) and self.options.shared: - raise ConanInvalidConfiguration("shared is not supported on Visual Studio") + raise ConanInvalidConfiguration(f"{self.ref} shared=True is not supported with {self.settings.compiler}") def build_requirements(self): self.tool_requires("cmake/[>=3.21 <4]") @@ -92,6 +100,7 @@ def generate(self): VirtualBuildEnv(self).generate() tc = CMakeToolchain(self) tc.variables["CONAN"] = False + tc.variables["BEAUTY_ENABLE_OPENSSL"] = self.options.with_openssl tc.generate() deps = CMakeDeps(self) deps.generate() @@ -112,6 +121,12 @@ def package_info(self): self.cpp_info.set_property("cmake_file_name", "beauty") self.cpp_info.set_property("cmake_target_name", "beauty::beauty") self.cpp_info.libs = ["beauty"] - self.cpp_info.requires = ["boost::headers", "openssl::openssl"] + self.cpp_info.requires = ["boost::headers"] + if self.options.with_openssl: + self.cpp_info.requires.append("openssl::ssl") if self.settings.os in ["Linux", "FreeBSD"]: - self.cpp_info.system_libs = ["m"] + self.cpp_info.system_libs = ["m", "pthread"] + elif self.settings.os == "Windows": + self.cpp_info.system_libs = ["crypt32"] + if self.options.with_openssl: + self.cpp_info.defines = ["BEAUTY_ENABLE_OPENSSL"] diff --git a/recipes/beauty/all/patches/0002-remove-openssl-target.patch b/recipes/beauty/all/patches/0002-remove-openssl-target.patch new file mode 100644 index 0000000000000..28cfd66f4489f --- /dev/null +++ b/recipes/beauty/all/patches/0002-remove-openssl-target.patch @@ -0,0 +1,12 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 7cc5bda..12a5e71 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -27,7 +27,6 @@ else() + + if (BEAUTY_ENABLE_OPENSSL) + find_package(OpenSSL REQUIRED) +- add_library(openssl::openssl ALIAS OpenSSL::SSL) + endif() + endif() + diff --git a/recipes/beauty/all/test_package/CMakeLists.txt b/recipes/beauty/all/test_package/CMakeLists.txt index 8673671fd5aab..485e39c140276 100644 --- a/recipes/beauty/all/test_package/CMakeLists.txt +++ b/recipes/beauty/all/test_package/CMakeLists.txt @@ -5,4 +5,4 @@ find_package(beauty REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) target_link_libraries(${PROJECT_NAME} PRIVATE beauty::beauty) -target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_20) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) diff --git a/recipes/beauty/config.yml b/recipes/beauty/config.yml index f625d5d2b747f..55b20570619c0 100644 --- a/recipes/beauty/config.yml +++ b/recipes/beauty/config.yml @@ -1,4 +1,6 @@ versions: + "1.0.4": + folder: all "1.0.3": folder: all "1.0.2": diff --git a/recipes/behaviortree.cpp/all/conandata.yml b/recipes/behaviortree.cpp/all/conandata.yml index e0d26c089d74f..38e09ddf41730 100644 --- a/recipes/behaviortree.cpp/all/conandata.yml +++ b/recipes/behaviortree.cpp/all/conandata.yml @@ -1,4 +1,13 @@ sources: + "4.6.2": + url: "https://github.com/BehaviorTree/BehaviorTree.CPP/archive/refs/tags/4.6.2.tar.gz" + sha256: "b0e7e53b27feae894e2df3f3faadfdd49f2108ebccfb1bd7cc0d405ffc56cecd" + "4.6.1": + url: "https://github.com/BehaviorTree/BehaviorTree.CPP/archive/refs/tags/4.6.1.tar.gz" + sha256: "a4e0dd92b200eedfbc6a16bebe613aeeb84b685416211b68fd097d21254f324b" + "4.6.0": + url: "https://github.com/BehaviorTree/BehaviorTree.CPP/archive/refs/tags/4.6.0.tar.gz" + sha256: "b24fed4f51212ea40bc492f7d4a310b1672bc05df6a83f2341c41ccf233307a9" "4.5.2": url: "https://github.com/BehaviorTree/BehaviorTree.CPP/archive/refs/tags/4.5.2.tar.gz" sha256: "1aaac034fc6a2f03d9347934e3baf3cabd5edc8bb416b9d7f5d944598019aeb9" @@ -11,3 +20,8 @@ sources: "3.7.0": url: "https://github.com/BehaviorTree/BehaviorTree.CPP/archive/refs/tags/3.7.0.tar.gz" sha256: "ab0d8ac1a0df4dd43cf45da8a784bab7fdedf711bd0e227f7ed071f79b0c7b5c" +patches: + "4.6.2": + - patch_file: "patches/001-minitrace.patch" + patch_description: "Consume minitrace from Conan" + patch_type: "conan" diff --git a/recipes/behaviortree.cpp/all/conanfile.py b/recipes/behaviortree.cpp/all/conanfile.py index abd62b04171b4..df11b679e6fcb 100644 --- a/recipes/behaviortree.cpp/all/conanfile.py +++ b/recipes/behaviortree.cpp/all/conanfile.py @@ -5,6 +5,7 @@ from conan.tools.build import check_min_cppstd, cross_building from conan.tools.scm import Version from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.files import export_conandata_patches, apply_conandata_patches import os @@ -17,6 +18,7 @@ class BehaviorTreeCPPConan(ConanFile): url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/BehaviorTree/BehaviorTree.CPP" topics = ("ai", "robotics", "games", "coordination") + package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], @@ -73,6 +75,7 @@ def _minimum_compilers_version(self): } def export_sources(self): + export_conandata_patches(self) copy(self, "conan_deps.cmake", self.recipe_folder, os.path.join(self.export_sources_folder, "src")) def config_options(self): @@ -215,6 +218,7 @@ def generate(self): deps.generate() def _patch_sources(self): + apply_conandata_patches(self) cmakelists = os.path.join(self.source_folder, "CMakeLists.txt") # Let Conan handle -fPIC replace_in_file(self, cmakelists, "set(CMAKE_POSITION_INDEPENDENT_CODE ON)\n", "") @@ -225,7 +229,9 @@ def _patch_sources(self): # Unvendor minitrace if self._with_minitrace: rmdir(self, os.path.join(self.source_folder, "3rdparty", "minitrace")) - replace_in_file(self, cmakelists, "3rdparty/minitrace/minitrace.cpp", "") + if Version(self.version) < "4.6.2": + # INFO: Version 4.6.2 removed minitrace via patch file 001-minitrace.patch + replace_in_file(self, cmakelists, "3rdparty/minitrace/minitrace.cpp", "") replace_in_file(self, os.path.join(self.source_folder, "src", "loggers", "bt_minitrace_logger.cpp"), "minitrace/minitrace.h", "minitrace.h") # Unvendor tinyxml2 diff --git a/recipes/behaviortree.cpp/all/patches/001-minitrace.patch b/recipes/behaviortree.cpp/all/patches/001-minitrace.patch new file mode 100644 index 0000000000000..734c4e7f4c8b5 --- /dev/null +++ b/recipes/behaviortree.cpp/all/patches/001-minitrace.patch @@ -0,0 +1,32 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 9b6d1eb..fd0e84f 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -39,6 +39,7 @@ endif() + + #---- Find other packages ---- + find_package(Threads REQUIRED) ++find_package(minitrace REQUIRED) + + + set(BEHAVIOR_TREE_LIBRARY ${PROJECT_NAME}) +@@ -80,10 +81,6 @@ endif() + + add_subdirectory(3rdparty/lexy) + +-add_library(minitrace STATIC 3rdparty/minitrace/minitrace.cpp) +-target_compile_definitions(minitrace PRIVATE MTR_ENABLED=True) +-set_property(TARGET minitrace PROPERTY POSITION_INDEPENDENT_CODE ON) +- + list(APPEND BT_SOURCE + src/action_node.cpp + src/basic_types.cpp +@@ -166,7 +163,7 @@ target_link_libraries(${BTCPP_LIBRARY} + Threads::Threads + ${CMAKE_DL_LIBS} + $ +- minitrace ++ minitrace::minitrace + PUBLIC + ${BTCPP_EXTRA_LIBRARIES} + ) diff --git a/recipes/behaviortree.cpp/config.yml b/recipes/behaviortree.cpp/config.yml index f6b53df246238..12e603c7e2db2 100644 --- a/recipes/behaviortree.cpp/config.yml +++ b/recipes/behaviortree.cpp/config.yml @@ -1,4 +1,10 @@ versions: + "4.6.2": + folder: all + "4.6.1": + folder: all + "4.6.0": + folder: all "4.5.2": folder: all "4.0.1": diff --git a/recipes/benchmark/all/conandata.yml b/recipes/benchmark/all/conandata.yml index 8a3c24a77b927..fac51279a430d 100644 --- a/recipes/benchmark/all/conandata.yml +++ b/recipes/benchmark/all/conandata.yml @@ -1,4 +1,14 @@ sources: + "1.9.0": + url: "https://github.com/google/benchmark/archive/refs/tags/v1.9.0.tar.gz" + sha256: "35a77f46cc782b16fac8d3b107fbfbb37dcd645f7c28eee19f3b8e0758b48994" + "1.8.5": + url: "https://github.com/google/benchmark/archive/refs/tags/v1.8.5.tar.gz" + sha256: "d26789a2b46d8808a48a4556ee58ccc7c497fcd4c0af9b90197674a81e04798a" + # keep 1.8.4, the last release for c++11 + "1.8.4": + url: "https://github.com/google/benchmark/archive/refs/tags/v1.8.4.tar.gz" + sha256: "3e7059b6b11fb1bbe28e33e02519398ca94c1818874ebed18e504dc6f709be45" "1.8.3": url: "https://github.com/google/benchmark/archive/refs/tags/v1.8.3.tar.gz" sha256: "6bc180a57d23d4d9515519f92b0c83d61b05b5bab188961f36ac7b06b0d9e9ce" diff --git a/recipes/benchmark/all/conanfile.py b/recipes/benchmark/all/conanfile.py index 4143dd1a1d5dd..ff99379d8d400 100644 --- a/recipes/benchmark/all/conanfile.py +++ b/recipes/benchmark/all/conanfile.py @@ -1,8 +1,8 @@ from conan import ConanFile from conan.errors import ConanInvalidConfiguration -from conan.tools.build import cross_building +from conan.tools.build import cross_building, check_min_cppstd from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout -from conan.tools.files import copy, get, rmdir +from conan.tools.files import copy, get, rmdir, replace_in_file from conan.tools.microsoft import is_msvc, check_min_vs from conan.tools.scm import Version import os @@ -35,6 +35,26 @@ class BenchmarkConan(ConanFile): "enable_libpfm": False, } + @property + def _min_cppstd(self): + if Version(self.version) >= "1.8.5": + return 14 + if is_msvc(self): + return 14 + return 11 + + @property + def _compilers_minimum_version(self): + return { + "14": { + "apple-clang": "10", + "clang": "7", + "gcc": "7", + "msvc": "191", + "Visual Studio": "15", + } + }.get(self._min_cppstd, {}) + def config_options(self): if self.settings.os == "Windows": del self.options.fPIC @@ -49,6 +69,14 @@ def layout(self): cmake_layout(self, src_folder="src") def validate(self): + if self.settings.compiler.cppstd: + check_min_cppstd(self, self._min_cppstd) + minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) + if minimum_version and Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration( + f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." + ) + check_min_vs(self, "190") if Version(self.version) < "1.7.0" and is_msvc(self) and self.options.shared: raise ConanInvalidConfiguration(f"{self.ref} doesn't support msvc shared builds") @@ -71,6 +99,8 @@ def generate(self): tc.variables["BENCHMARK_ENABLE_LTO"] = self.options.enable_lto tc.variables["BENCHMARK_ENABLE_EXCEPTIONS"] = self.options.enable_exceptions tc.variables["BENCHMARK_ENABLE_LIBPFM"] = self.options.get_safe("enable_libpfm", False) + if not self.settings.compiler.cppstd: + tc.cache_variables["CMAKE_CXX_STANDARD"] = self._min_cppstd if Version(self.version) >= "1.6.1": tc.variables["BENCHMARK_ENABLE_WERROR"] = False tc.variables["BENCHMARK_FORCE_WERROR"] = False @@ -83,8 +113,17 @@ def generate(self): else: tc.variables["BENCHMARK_USE_LIBCXX"] = False tc.generate() + + def _patch_sources(self): + if Version(self.version) > "1.7.0": + replace_in_file(self, + os.path.join(self.source_folder, "CMakeLists.txt"), + "set(CMAKE_CXX_STANDARD", + "#" + ) def build(self): + self._patch_sources() cmake = CMake(self) cmake.configure() cmake.build() @@ -113,7 +152,6 @@ def package_info(self): self.cpp_info.components["_benchmark"].system_libs.append("kstat") if self.options.get_safe("enable_libpfm"): self.cpp_info.components["_benchmark"].requires.append("libpfm4::libpfm4") - self.cpp_info.components["benchmark_main"].set_property("cmake_target_name", "benchmark::benchmark_main") self.cpp_info.components["benchmark_main"].libs = ["benchmark_main"] diff --git a/recipes/benchmark/config.yml b/recipes/benchmark/config.yml index f3ed1f1e95743..f5694a4c32d21 100644 --- a/recipes/benchmark/config.yml +++ b/recipes/benchmark/config.yml @@ -1,4 +1,10 @@ versions: + "1.9.0": + folder: all + "1.8.5": + folder: all + "1.8.4": + folder: all "1.8.3": folder: all "1.8.2": diff --git a/recipes/bgfx/all/conanfile.py b/recipes/bgfx/all/conanfile.py index 9de812b7f94ea..7ce8c351c03cf 100644 --- a/recipes/bgfx/all/conanfile.py +++ b/recipes/bgfx/all/conanfile.py @@ -160,7 +160,7 @@ def build(self): if is_msvc(self): # Conan to Genie translation maps vs_ver_to_genie = {"17": "2022", "16": "2019", "15": "2017", - "193": "2022", "192": "2019", "191": "2017"} + "194": "2022", "193": "2022", "192": "2019", "191": "2017"} # Use genie directly, then msbuild on specific projects based on requirements genie_VS = f"vs{vs_ver_to_genie[str(self.settings.compiler.version)]}" diff --git a/recipes/bimg/all/conanfile.py b/recipes/bimg/all/conanfile.py index 83eb227558d62..e261d422055f7 100644 --- a/recipes/bimg/all/conanfile.py +++ b/recipes/bimg/all/conanfile.py @@ -130,7 +130,7 @@ def build(self): if is_msvc(self): # Conan to Genie translation maps vs_ver_to_genie = {"17": "2022", "16": "2019", "15": "2017", - "193": "2022", "192": "2019", "191": "2017"} + "194": "2022", "193": "2022", "192": "2019", "191": "2017"} # Use genie directly, then msbuild on specific projects based on requirements genie_VS = f"vs{vs_ver_to_genie[str(self.settings.compiler.version)]}" diff --git a/recipes/binutils/all/conandata.yml b/recipes/binutils/all/conandata.yml index 92a40425b2590..f0dd0d5db997f 100644 --- a/recipes/binutils/all/conandata.yml +++ b/recipes/binutils/all/conandata.yml @@ -1,26 +1,16 @@ sources: + "2.42": + url: "https://ftp.gnu.org/gnu/binutils/binutils-2.42.tar.xz" + sha256: "f6e4d41fd5fc778b06b7891457b3620da5ecea1006c6a4a41ae998109f85a800" "2.41": - url: "https://ftp.gnu.org/gnu/binutils/binutils-2.41.tar.gz" - sha256: "48d00a8dc73aa7d2394a7dc069b96191d95e8de8f0da6dc91da5cce655c20e45" - "2.40": - url: "https://ftp.gnu.org/gnu/binutils/binutils-2.40.tar.gz" - sha256: "d7f82c4047decf43a6f769ac32456a92ddb6932409a585c633cdd4e9df23d956" - "2.38": # 2022-02-09 - url: "https://ftp.gnu.org/gnu/binutils/binutils-2.38.tar.gz" - sha256: "b3f1dc5b17e75328f19bd88250bee2ef9f91fc8cbb7bd48bdb31390338636052" - "2.37": - url: "https://ftp.gnu.org/gnu/binutils/binutils-2.37.tar.gz" - sha256: "c44968b97cd86499efbc4b4ab7d98471f673e5414c554ef54afa930062dbbfcb" + url: "https://ftp.gnu.org/gnu/binutils/binutils-2.41.tar.xz" + sha256: "ae9a5789e23459e59606e6714723f2d3ffc31c03174191ef0d015bdf06007450" patches: + "2.42": + - patch_file: "patches/2.42-0001-no-texinfo.patch" + patch_type: "conan" + patch_description: "disable texinfo" "2.41": - patch_file: "patches/2.41-0001-no-texinfo.patch" - patch_type: conan - patch_description: "disable texinfo" - "2.40": - - patch_file: "patches/2.40-0001-no-texinfo.patch" - patch_type: conan - patch_description: "disable texinfo" - "2.38": - - patch_file: "patches/2.38-0001-no-texinfo.patch" - patch_type: conan + patch_type: "conan" patch_description: "disable texinfo" diff --git a/recipes/binutils/all/conanfile.py b/recipes/binutils/all/conanfile.py index 327c2f6a2a198..09d66fc511d1f 100644 --- a/recipes/binutils/all/conanfile.py +++ b/recipes/binutils/all/conanfile.py @@ -132,10 +132,8 @@ def build_requirements(self): self.win_bash = True if not self.conf.get("tools.microsoft.bash:path", check_type="str"): self.tool_requires("msys2/cci.latest") - - if self.version >= "2.39": - self.tool_requires("bison/3.8.2") - self.tool_requires("flex/2.6.4") + self.tool_requires("bison/3.8.2") + self.tool_requires("flex/2.6.4") def requirements(self): self.requires("zlib/[>=1.2.11 <2]") diff --git a/recipes/binutils/all/patches/2.38-0001-no-texinfo.patch b/recipes/binutils/all/patches/2.38-0001-no-texinfo.patch deleted file mode 100644 index 1e0698965c0de..0000000000000 --- a/recipes/binutils/all/patches/2.38-0001-no-texinfo.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- gas/Makefile.in -+++ gas/Makefile.in -@@ -1778,7 +1778,7 @@ - check-am: all-am - $(MAKE) $(AM_MAKEFLAGS) check-DEJAGNU - check: check-recursive --all-am: Makefile $(INFO_DEPS) $(PROGRAMS) $(SCRIPTS) $(MANS) config.h -+all-am: Makefile $(PROGRAMS) $(SCRIPTS) $(MANS) config.h - installdirs: installdirs-recursive - installdirs-am: - for dir in "$(DESTDIR)$(infodir)" "$(DESTDIR)$(man1dir)"; do \ -@@ -1854,7 +1854,7 @@ info: info-recursive - - info-am: $(INFO_DEPS) info-local - --install-data-am: install-data-local install-info-am install-man -+install-data-am: install-man - - install-dvi: install-dvi-recursive - diff --git a/recipes/binutils/all/patches/2.40-0001-no-texinfo.patch b/recipes/binutils/all/patches/2.40-0001-no-texinfo.patch deleted file mode 100644 index fbd00f17e49e4..0000000000000 --- a/recipes/binutils/all/patches/2.40-0001-no-texinfo.patch +++ /dev/null @@ -1,50 +0,0 @@ ---- gas/Makefile.in -+++ gas/Makefile.in -@@ -1794,7 +1794,7 @@ - check-am: all-am - $(MAKE) $(AM_MAKEFLAGS) check-DEJAGNU - check: check-recursive --all-am: Makefile $(INFO_DEPS) $(PROGRAMS) $(SCRIPTS) $(MANS) config.h -+all-am: Makefile $(PROGRAMS) $(SCRIPTS) $(MANS) config.h - installdirs: installdirs-recursive - installdirs-am: - for dir in "$(DESTDIR)$(infodir)" "$(DESTDIR)$(man1dir)"; do \ -@@ -1870,7 +1870,7 @@ - - info-am: $(INFO_DEPS) info-local - --install-data-am: install-info-am install-man -+install-data-am: install-man - - install-dvi: install-dvi-recursive - ---- bfd/Makefile.in -+++ bfd/Makefile.in -@@ -266,7 +266,7 @@ - am__v_texidevnull_0 = > /dev/null - am__v_texidevnull_1 = - am__dirstamp = $(am__leading_dot)dirstamp --INFO_DEPS = doc/bfd.info -+INFO_DEPS = - am__TEXINFO_TEX_DIR = $(srcdir) - DVIS = doc/bfd.dvi - PDFS = doc/bfd.pdf -@@ -2053,7 +2053,7 @@ - check-am: all-am - check: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) check-recursive --all-am: Makefile $(INFO_DEPS) $(LIBRARIES) $(LTLIBRARIES) $(HEADERS) \ -+all-am: Makefile $(LIBRARIES) $(LTLIBRARIES) $(HEADERS) \ - config.h - installdirs: installdirs-recursive - installdirs-am: -@@ -2122,8 +2122,7 @@ - - info-am: $(INFO_DEPS) - --install-data-am: install-bfdincludeHEADERS install-bfdlibLTLIBRARIES \ -- install-info-am -+install-data-am: install-bfdincludeHEADERS install-bfdlibLTLIBRARIES - - install-dvi: install-dvi-recursive - diff --git a/recipes/binutils/all/patches/2.42-0001-no-texinfo.patch b/recipes/binutils/all/patches/2.42-0001-no-texinfo.patch new file mode 100644 index 0000000000000..231668a13cce4 --- /dev/null +++ b/recipes/binutils/all/patches/2.42-0001-no-texinfo.patch @@ -0,0 +1,51 @@ +--- bfd/Makefile.in ++++ bfd/Makefile.in +@@ -259,7 +259,7 @@ + am__v_texidevnull_0 = > /dev/null + am__v_texidevnull_1 = + am__dirstamp = $(am__leading_dot)dirstamp +-INFO_DEPS = doc/bfd.info ++INFO_DEPS = + am__TEXINFO_TEX_DIR = $(srcdir) + DVIS = doc/bfd.dvi + PDFS = doc/bfd.pdf +@@ -2050,7 +2050,7 @@ + check-am: all-am + check: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) check-recursive +-all-am: Makefile $(INFO_DEPS) $(LTLIBRARIES) $(HEADERS) config.h ++all-am: Makefile $(LTLIBRARIES) $(HEADERS) config.h + installdirs: installdirs-recursive + installdirs-am: + for dir in "$(DESTDIR)$(bfdlibdir)" "$(DESTDIR)$(infodir)" "$(DESTDIR)$(bfdincludedir)"; do \ +@@ -2117,8 +2117,7 @@ + + info-am: $(INFO_DEPS) + +-install-data-am: install-bfdincludeHEADERS install-bfdlibLTLIBRARIES \ +- install-info-am ++install-data-am: install-bfdincludeHEADERS install-bfdlibLTLIBRARIES + + install-dvi: install-dvi-recursive + + +--- gas/Makefile.in ++++ gas/Makefile.in +@@ -1825,7 +1825,7 @@ + check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) check-DEJAGNU + check: check-recursive +-all-am: Makefile $(INFO_DEPS) $(PROGRAMS) $(SCRIPTS) $(MANS) config.h ++all-am: Makefile $(PROGRAMS) $(SCRIPTS) $(MANS) config.h + installdirs: installdirs-recursive + installdirs-am: + for dir in "$(DESTDIR)$(infodir)" "$(DESTDIR)$(man1dir)"; do \ +@@ -1901,7 +1901,7 @@ + + info-am: $(INFO_DEPS) info-local + +-install-data-am: install-info-am install-man ++install-data-am: install-man + + install-dvi: install-dvi-recursive + diff --git a/recipes/binutils/config.yml b/recipes/binutils/config.yml index 97d0d2ecab157..58766488a2584 100644 --- a/recipes/binutils/config.yml +++ b/recipes/binutils/config.yml @@ -1,9 +1,5 @@ versions: - "2.41": - folder: all - "2.40": + "2.42": folder: all - "2.38": - folder: all - "2.37": + "2.41": folder: all diff --git a/recipes/bitserializer/all/conandata.yml b/recipes/bitserializer/all/conandata.yml index 1571f9c56284c..26d9d94803f91 100644 --- a/recipes/bitserializer/all/conandata.yml +++ b/recipes/bitserializer/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.70": + url: "https://github.com/PavelKisliak/BitSerializer/archive/v0.70.tar.gz" + sha256: "094b12c729b35bf2cede8b55e8193db7793482646f0307c17bcc736de6cce7c9" "0.65": url: "https://github.com/PavelKisliak/BitSerializer/archive/v0.65.tar.gz" sha256: "b4d90f13dd424faebe3ee57ee0cb86ff304e893990afd259c6a29d1f8533b2ef" diff --git a/recipes/bitserializer/all/conanfile.py b/recipes/bitserializer/all/conanfile.py index 5acbd3659a4cb..0f0a334d614b2 100644 --- a/recipes/bitserializer/all/conanfile.py +++ b/recipes/bitserializer/all/conanfile.py @@ -12,8 +12,8 @@ class BitserializerConan(ConanFile): name = "bitserializer" - description = "C++ 17 library for serialization to multiple output formats (JSON, XML, YAML, CSV)" - topics = ("serialization", "json", "xml", "yaml", "csv") + description = "C++ 17 library for serialization to multiple output formats (JSON, XML, YAML, CSV, MsgPack)" + topics = ("serialization", "json", "xml", "yaml", "csv", "msgpack") url = "https://github.com/conan-io/conan-center-index" homepage = "https://bitbucket.org/Pavel_Kisliak/bitserializer" license = "MIT" @@ -26,6 +26,7 @@ class BitserializerConan(ConanFile): "with_pugixml": [True, False], "with_rapidyaml": [True, False], "with_csv": [True, False], + "with_msgpack": [True, False], } default_options = { "fPIC": True, @@ -34,10 +35,9 @@ class BitserializerConan(ConanFile): "with_pugixml": False, "with_rapidyaml": False, "with_csv": False, + "with_msgpack": False, } - no_copy_source = True - @property def _min_cppstd(self): return "17" @@ -55,9 +55,9 @@ def _compilers_minimum_version(self): def _is_header_only(self, info=False): if Version(self.version) < "0.50": return True - # All components of library are header-only except csv-archive + # All components of library are header-only except csv-archive and msgpack-archive options = self.info.options if info else self.options - return not options.with_csv + return not (options.with_csv or options.get_safe("with_msgpack")) def config_options(self): if self.settings.os == "Windows" or Version(self.version) < "0.50": @@ -65,6 +65,8 @@ def config_options(self): if Version(self.version) < "0.50": del self.options.with_rapidyaml del self.options.with_csv + if Version(self.version) < "0.70": + del self.options.with_msgpack def configure(self): if self._is_header_only(): @@ -80,13 +82,13 @@ def layout(self): def requirements(self): if self.options.with_cpprestsdk: - self.requires("cpprestsdk/2.10.18", transitive_headers=True, transitive_libs=True) + self.requires("cpprestsdk/2.10.19", transitive_headers=True, transitive_libs=True) if self.options.with_rapidjson: - self.requires("rapidjson/cci.20220822", transitive_headers=True, transitive_libs=True) + self.requires("rapidjson/1.1.0", transitive_headers=True, transitive_libs=True) if self.options.with_pugixml: - self.requires("pugixml/1.13", transitive_headers=True, transitive_libs=True) + self.requires("pugixml/1.14", transitive_headers=True, transitive_libs=True) if self.options.get_safe("with_rapidyaml"): - self.requires("rapidyaml/0.4.1", transitive_headers=True, transitive_libs=True) + self.requires("rapidyaml/0.5.0", transitive_headers=True, transitive_libs=True) def package_id(self): if self._is_header_only(info=True): @@ -121,16 +123,19 @@ def generate(self): tc.variables["BUILD_PUGIXML_ARCHIVE"] = self.options.with_pugixml tc.variables["BUILD_RAPIDYAML_ARCHIVE"] = self.options.with_rapidyaml tc.variables["BUILD_CSV_ARCHIVE"] = self.options.with_csv + tc.variables["BUILD_MSGPACK_ARCHIVE"] = self.options.get_safe("with_msgpack") tc.generate() deps = CMakeDeps(self) deps.generate() def _patch_sources(self): - if Version(self.version) >= "0.50" and self.options.with_rapidyaml: + if Version(self.version) >= "0.50": # Remove 'ryml' subdirectory from #include replace_in_file( - self, os.path.join(self.source_folder, "include", "bitserializer", "rapidyaml_archive.h"), - "#include :BitSerializer::pugixml-archive> $<$:BitSerializer::rapidyaml-archive> $<$:BitSerializer::csv-archive> + $<$:BitSerializer::msgpack-archive> ) target_compile_definitions(${PROJECT_NAME} PRIVATE $<$:"WITH_CPPRESTSDK"> @@ -38,4 +42,5 @@ target_compile_definitions(${PROJECT_NAME} PRIVATE $<$:"WITH_PUGIXML"> $<$:"WITH_RAPIDYAML"> $<$:"WITH_CSV"> + $<$:"WITH_MSGPACK"> ) diff --git a/recipes/bitserializer/all/test_package/conanfile.py b/recipes/bitserializer/all/test_package/conanfile.py index abab9f750547c..86588bf359b36 100644 --- a/recipes/bitserializer/all/test_package/conanfile.py +++ b/recipes/bitserializer/all/test_package/conanfile.py @@ -23,6 +23,7 @@ def generate(self): tc.variables["WITH_PUGIXML"] = bitserializerOptions.with_pugixml tc.variables["WITH_RAPIDYAML"] = bitserializerOptions.get_safe("with_rapidyaml", False) tc.variables["WITH_CSV"] = bitserializerOptions.get_safe("with_csv", False) + tc.variables["WITH_MSGPACK"] = bitserializerOptions.get_safe("with_msgpack", False) tc.generate() def build(self): diff --git a/recipes/bitserializer/all/test_package/test_package.cpp b/recipes/bitserializer/all/test_package/test_package.cpp index aba11c808ba19..e3fd28d5e32b4 100644 --- a/recipes/bitserializer/all/test_package/test_package.cpp +++ b/recipes/bitserializer/all/test_package/test_package.cpp @@ -18,6 +18,9 @@ #ifdef WITH_CSV #include #endif +#ifdef WITH_MSGPACK +#include +#endif #include #include @@ -33,12 +36,28 @@ class CTest template void Serialize(TArchive& archive) { +#if BITSERIALIZER_VERSION >= 7000 + archive << BitSerializer::KeyValue("Message", mMessage); +#else archive << BitSerializer::MakeAutoKeyValue("Message", mMessage); +#endif } std::string mMessage; }; +std::string PrintAsHexString(const std::string& data) +{ + constexpr char hexChars[] = "0123456789ABCDEF"; + std::string result; + for (const char ch : data) + { + if (!result.empty()) result.push_back(' '); + result.append({ hexChars[(ch & 0xF0) >> 4], hexChars[(ch & 0x0F) >> 0] }); + } + return result; +} + template void TestArchive(const std::string& message) { @@ -47,21 +66,34 @@ void TestArchive(const std::string& message) BitSerializer::SerializationOptions serializationOptions; serializationOptions.streamOptions.writeBom = false; - CTest testObj[1] = { message }; + CTest testObj[1] = { message }; std::stringstream outputStream; BitSerializer::SaveObject(testObj, outputStream, serializationOptions); - std::cout << outputStream.str() << std::endl; +#if BITSERIALIZER_VERSION >= 7000 + const std::string result = TArchive::is_binary ? PrintAsHexString(outputStream.str()) : outputStream.str(); +#else + const std::string result = outputStream.str(); +#endif + std::cout << result<< std::endl; } int main() { std::cout << "BitSerializer version: " +#ifdef BITSERIALIZER_VERSION + << BitSerializer::Convert::To(BITSERIALIZER_VERSION_MAJOR) << "." + << BitSerializer::Convert::To(BITSERIALIZER_VERSION_MINOR) << "." + << BitSerializer::Convert::To(BITSERIALIZER_VERSION_PATCH) +#else << BitSerializer::Convert::To(BitSerializer::Version::Major) << "." << BitSerializer::Convert::To(BitSerializer::Version::Minor) << "." << BitSerializer::Convert::To(BitSerializer::Version::Maintenance) +#endif << std::endl; +#if !defined BITSERIALIZER_VERSION || BITSERIALIZER_HAS_FILESYSTEM // Some compilers does not link filesystem automatically std::cout << "Testing the link of C++17 filesystem: " << std::filesystem::temp_directory_path() << std::endl; +#endif #ifdef WITH_CPPRESTSDK TestArchive("Implementation based on cpprestsdk"); @@ -78,4 +110,7 @@ int main() { #ifdef WITH_CSV TestArchive("CSV archive (built-in implementation)"); #endif +#ifdef WITH_MSGPACK + TestArchive("MsgPack archive (built-in implementation)"); +#endif } diff --git a/recipes/bitserializer/all/test_v1_package/conanfile.py b/recipes/bitserializer/all/test_v1_package/conanfile.py index 599ba5557b9dc..cc693be1ab4b9 100644 --- a/recipes/bitserializer/all/test_v1_package/conanfile.py +++ b/recipes/bitserializer/all/test_v1_package/conanfile.py @@ -20,6 +20,7 @@ def build(self): cmake.definitions["WITH_PUGIXML"] = self.options["bitserializer"].with_pugixml cmake.definitions["WITH_RAPIDYAML"] = self._bitserializer_option("with_rapidyaml", False) cmake.definitions["WITH_CSV"] = self._bitserializer_option("with_csv", False) + cmake.definitions["WITH_MSGPACK"] = self._bitserializer_option("with_msgpack", False) cmake.configure() cmake.build() diff --git a/recipes/bitserializer/config.yml b/recipes/bitserializer/config.yml index 7319ee088f906..a645049195724 100644 --- a/recipes/bitserializer/config.yml +++ b/recipes/bitserializer/config.yml @@ -1,4 +1,6 @@ versions: + "0.70": + folder: "all" "0.65": folder: "all" "0.50": diff --git a/recipes/bitsery/all/conandata.yml b/recipes/bitsery/all/conandata.yml index 6d53e1633d5bf..fd5e93d076949 100644 --- a/recipes/bitsery/all/conandata.yml +++ b/recipes/bitsery/all/conandata.yml @@ -1,16 +1,10 @@ sources: + "5.2.4": + url: "https://github.com/fraillt/bitsery/archive/v5.2.4.tar.gz" + sha256: "ff741a3fee5420b31af31c7a8cefbcc3aaaf6f7f8c3ac49aa020f99b21d96020" "5.2.3": url: "https://github.com/fraillt/bitsery/archive/v5.2.3.tar.gz" sha256: "896d82ab4ccea9899ff2098aa69ad6d25e524ee1d4c747ce3232d0afe3cd05a5" "5.2.2": url: "https://github.com/fraillt/bitsery/archive/v5.2.2.tar.gz" sha256: "5e932c463f16db15228b2546632a5851a502c68e605a1e313b0f1a35c061e4ae" - "5.2.1": - url: "https://github.com/fraillt/bitsery/archive/v5.2.1.tar.gz" - sha256: "1e2ee66827c55ef82eaf6ef4c87a2c5b3a010dfe6c770eb0feeb3f0c35254d00" - "5.2.0": - url: "https://github.com/fraillt/bitsery/archive/v5.2.0.tar.gz" - sha256: "99f47bca227abb6b9e8030703dcc402ab930ff3bf0a87c89c3f0fb9536cad448" - "5.1.0": - url: "https://github.com/fraillt/bitsery/archive/v5.1.0.tar.gz" - sha256: "8f46667db5d0b62fdaab33612108498bcbcbe9cfa48d2cd220b2129734440a8d" diff --git a/recipes/bitsery/all/conanfile.py b/recipes/bitsery/all/conanfile.py index dd2f676b3757f..26bcf9c123505 100644 --- a/recipes/bitsery/all/conanfile.py +++ b/recipes/bitsery/all/conanfile.py @@ -13,13 +13,17 @@ class BitseryConan(ConanFile): "Header only C++ binary serialization library. It is designed around " "the networking requirements for real-time data delivery, especially for games." ) - topics = ("serialization", "binary", "header-only") + license = "MIT" url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/fraillt/bitsery" - license = "MIT" + topics = ("serialization", "binary", "header-only") + package_type = "header-library" settings = "os", "arch", "compiler", "build_type" no_copy_source = True + def layout(self): + basic_layout(self, src_folder="src") + def package_id(self): self.info.clear() @@ -27,12 +31,8 @@ def validate(self): if self.settings.compiler.get_safe("cppstd"): check_min_cppstd(self, 11) - def layout(self): - basic_layout(self, src_folder="src") - def source(self): - get(self, **self.conan_data["sources"][self.version], - destination=self.source_folder, strip_root=True) + get(self, **self.conan_data["sources"][self.version], strip_root=True) def build(self): pass @@ -44,11 +44,8 @@ def package(self): def package_info(self): self.cpp_info.set_property("cmake_file_name", "Bitsery") self.cpp_info.set_property("cmake_target_name", "Bitsery::bitsery") - # TODO: back to global scope in conan v2 once cmake_find_package_* generators removed - self.cpp_info.components["bitserylib"].bindirs = [] - self.cpp_info.components["bitserylib"].frameworkdirs = [] - self.cpp_info.components["bitserylib"].libdirs = [] - self.cpp_info.components["bitserylib"].resdirs = [] + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] # TODO: to remove in conan v2 once cmake_find_package* generators removed self.cpp_info.names["cmake_find_package"] = "Bitsery" @@ -56,3 +53,5 @@ def package_info(self): self.cpp_info.components["bitserylib"].names["cmake_find_package"] = "bitsery" self.cpp_info.components["bitserylib"].names["cmake_find_package_multi"] = "bitsery" self.cpp_info.components["bitserylib"].set_property("cmake_target_name", "Bitsery::bitsery") + self.cpp_info.components["bitserylib"].bindirs = [] + self.cpp_info.components["bitserylib"].libdirs = [] diff --git a/recipes/bitsery/config.yml b/recipes/bitsery/config.yml index 07e67c2710fe5..ef54c243e956f 100644 --- a/recipes/bitsery/config.yml +++ b/recipes/bitsery/config.yml @@ -1,11 +1,7 @@ versions: + "5.2.4": + folder: all "5.2.3": folder: all "5.2.2": folder: all - "5.2.1": - folder: all - "5.2.0": - folder: all - "5.1.0": - folder: all diff --git a/recipes/blend2d/all/conandata.yml b/recipes/blend2d/all/conandata.yml index 06ef79b273e89..54dc0ba094e18 100644 --- a/recipes/blend2d/all/conandata.yml +++ b/recipes/blend2d/all/conandata.yml @@ -1,28 +1,33 @@ sources: + "0.11.4": + url: "https://blend2d.com/download/blend2d-0.11.4.tar.gz" + sha256: "07f7d99d2ebb7b42a707a4f0035745b781faf9083933f944084f66e6246bb01c" + "0.11.3": + url: "https://blend2d.com/download/blend2d-0.11.3.tar.gz" + sha256: "6dfb2c0260073f2af6c3dfe6c30a31da637e6facf7802f6b2836cc3c4e74fdd8" + "0.11.1": + url: "https://blend2d.com/download/blend2d-0.11.1.tar.gz" + sha256: "f46d61b6aa477fea1a353a41f5906d4e861817ae059ed22fc6ecdd50ff859dd2" + # When upstream will have new release, tarball may be deleted. + # Use following url: https://github.com/blend2d/blend2d/archive/a7f947677e85441abe1769586d3bb935b4086a07.tar.gz "0.10.6": - url: "https://blend2d.com/download/blend2d-0.10.6.tar.xz" - sha256: "0377f747b76d5602874351501bbbd648ba73b486273a5dcabfd6dc85c4d289b4" + url: "https://github.com/blend2d/blend2d/archive/df124784fd3e9765251c74d412d88c625e3587e9.tar.gz" + sha256: "d8a91745c79beeab29d781357308b49ef51d009237b342ce50304ea618e977ad" "0.10.5": - url: "https://blend2d.com/download/blend2d-0.10.5.tar.xz" - sha256: "fff5a7b1a6b16c986f3d02052a9a030f138fbae3a9c16bf07915416515d6b9cd" + url: "https://github.com/blend2d/blend2d/archive/99fc3aa9a1d113e913df67166d40d2a81bef1dcb.tar.gz" + sha256: "cb7426a483156721c02b28cf65969bdeeb13ffed6cf9bc4a9493d7ec4d5de8c3" "0.10.4": - url: "https://blend2d.com/download/blend2d-0.10.4.tar.xz" - sha256: "6363e5c13c1c9e4709f949585a6af772ee13a16f75b0084f91b3918dece2fff3" + url: "https://github.com/blend2d/blend2d/archive/d60f62b9d008be096daff329dfe9b8409c344651.tar.gz" + sha256: "ce197422ae8ec0d0310895bebed396091e0144ec09482439d24040196957e740" "0.10": - url: "https://blend2d.com/download/blend2d-0.10.tar.xz" - sha256: "eaed6cc5f1fc33061a99d70cf166836994d952f75762bfacb397ee388e13ccc9" + url: "https://github.com/blend2d/blend2d/archive/000d55c75994fa88efcb7a31ae32be9ec8435f7d.tar.gz" + sha256: "7a986e14d08d687bfc7510bd762a29f01b1c2449b4e60f85268dd0072c65b698" "0.9": - url: "https://blend2d.com/download/blend2d-0.9.tar.xz" - sha256: "a70a2a57c67017afa1067a11807fef9808788c69b4012ba4d56a5c47a5ba87c3" + url: "https://github.com/blend2d/blend2d/archive/346555924752f085a2a06265858bc63c8987bf98.tar.gz" + sha256: "89639d60320e8d684c3708b849ede9ac660cbd2acc33de6baa846ee7fbed24b8" "0.8": - url: "https://blend2d.com/download/blend2d-0.8.zip" - sha256: "0c1e2cc94cd4aa054c527b2dc51d533c8783a8e31779de3ba7bb49f8bd9afca1" - "0.0.18": - url: "https://blend2d.com/download/blend2d-beta18.zip" - sha256: "02d23b185183705215241d7b161937bbda5b427c54cc5aa4c03238ef8dd1e60b" - "0.0.17": - url: "https://blend2d.com/download/blend2d-beta17.zip" - sha256: "06ee8fb0bea281d09291e498900093139426501a1a7f09dba0ec801dd340635e" + url: "https://github.com/blend2d/blend2d/archive/2910c87c5e8ddedcf80bbf4871bb59d70e1170c1.tar.gz" + sha256: "34ff6f0f2dd10b39e1e6a3b07c5f76844b38f780c6849a65a34351e76e36cd3d" patches: "0.10.6": - patch_file: "patches/0.10.6-0001-disable-embed-asmjit.patch" @@ -48,15 +53,3 @@ patches: - patch_file: "patches/0.8-0001-disable-embed-asmjit.patch" patch_description: "use asmjit cci package" patch_type: "conan" - "0.0.18": - - patch_file: "patches/0.0.17-0001-disable-embed-asmjit.patch" - patch_description: "use asmjit cci package" - patch_type: "conan" - - patch_file: "patches/0.0.18-0002-fix-gcc12-compilationerror.patch" - patch_description: "fix gcc12 compilation error, backport from upstream" - patch_type: "portability" - patch_source: "https://github.com/blend2d/blend2d/commit/2574d90ebc61b5195491cc79bfa6da162084242b" - "0.0.17": - - patch_file: "patches/0.0.17-0001-disable-embed-asmjit.patch" - patch_description: "use asmjit cci package" - patch_type: "conan" diff --git a/recipes/blend2d/all/conanfile.py b/recipes/blend2d/all/conanfile.py index adbef317cace4..5663998a64f81 100644 --- a/recipes/blend2d/all/conanfile.py +++ b/recipes/blend2d/all/conanfile.py @@ -4,6 +4,7 @@ from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rmdir from conan.tools.scm import Version from conan.tools.microsoft import check_min_vs +from conan.tools.env import VirtualBuildEnv import os required_conan_version = ">=1.53.0" @@ -45,7 +46,7 @@ def layout(self): def requirements(self): if self.options.with_jit: - self.requires("asmjit/cci.20230325") + self.requires("asmjit/cci.20240531") def validate(self): if self.settings.compiler.get_safe("cppstd"): @@ -56,6 +57,10 @@ def validate(self): # https://github.com/blend2d/blend2d/commit/63db360c7eb2c1c3ca9cd92a867dbb23dc95ca7d check_min_vs(self, 192) + def build_requirements(self): + if Version(self.version) >= "0.11.1": + self.tool_requires("cmake/[>=3.18 <4]") + def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) @@ -67,15 +72,17 @@ def generate(self): tc.variables["BLEND2D_STATIC"] = not self.options.shared tc.variables["BLEND2D_NO_STDCXX"] = False tc.variables["CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS"] = True + tc.variables["BLEND2D_EXTERNAL_ASMJIT"] = True if not valid_min_cppstd(self, 11): tc.variables["CMAKE_CXX_STANDARD"] = 11 if not self.options.shared: tc.preprocessor_definitions["BL_STATIC"] = "1" tc.variables["BLEND2D_NO_JIT"] = not self.options.with_jit tc.generate() - deps = CMakeDeps(self) deps.generate() + venv = VirtualBuildEnv(self) + venv.generate(scope="build") def build(self): apply_conandata_patches(self) diff --git a/recipes/blend2d/all/patches/0.0.17-0001-disable-embed-asmjit.patch b/recipes/blend2d/all/patches/0.0.17-0001-disable-embed-asmjit.patch deleted file mode 100644 index 6a3ccd1e255b1..0000000000000 --- a/recipes/blend2d/all/patches/0.0.17-0001-disable-embed-asmjit.patch +++ /dev/null @@ -1,19 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 52d295a..b1a78a5 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -398,10 +398,10 @@ if (NOT BLEND2D_NO_JIT) - set(ASMJIT_EMBED TRUE CACHE BOOL "") - endif() - -- include("${ASMJIT_DIR}/CMakeLists.txt") -- list(APPEND BLEND2D_DEPS ${ASMJIT_LIBS}) -- list(APPEND BLEND2D_PRIVATE_CFLAGS ${ASMJIT_CFLAGS}) -- list(APPEND BLEND2D_PRIVATE_CFLAGS -DASMJIT_NO_STDCXX) -+ find_package(asmjit CONFIG REQUIRED) -+ list(APPEND BLEND2D_DEPS asmjit::asmjit) -+ list(APPEND BLEND2D_PRIVATE_CFLAGS ${asmjit_DEFINITIONS_DEBUG}${asmjit_DEFINITIONS_RELEASE}) -+ - - # A possibility to reduce the resulting binary size by disabling asmjit logging. - if (BLEND2D_NO_JIT_LOGGING) diff --git a/recipes/blend2d/all/patches/0.0.18-0002-fix-gcc12-compilationerror.patch b/recipes/blend2d/all/patches/0.0.18-0002-fix-gcc12-compilationerror.patch deleted file mode 100644 index b089c5a2e867f..0000000000000 --- a/recipes/blend2d/all/patches/0.0.18-0002-fix-gcc12-compilationerror.patch +++ /dev/null @@ -1,39 +0,0 @@ -diff --git a/src/blend2d/support/arenaallocator_p.h b/src/blend2d/support/arenaallocator_p.h -index d09b6da..eebd854 100644 ---- a/src/blend2d/support/arenaallocator_p.h -+++ b/src/blend2d/support/arenaallocator_p.h -@@ -445,7 +445,7 @@ public: - template - class BLArenaAllocatorTmp : public BLArenaAllocator { - public: -- BL_NONCOPYABLE(BLArenaAllocatorTmp) -+ BL_NONCOPYABLE(BLArenaAllocatorTmp) - - BL_INLINE explicit BLArenaAllocatorTmp(size_t blockSize, size_t blockAlignment = 1) noexcept - : BLArenaAllocator(blockSize, blockAlignment, _storage.data, N) {} -diff --git a/src/blend2d/support/arenahashmap_p.h b/src/blend2d/support/arenahashmap_p.h -index 29882e1..911d985 100644 ---- a/src/blend2d/support/arenahashmap_p.h -+++ b/src/blend2d/support/arenahashmap_p.h -@@ -185,7 +185,7 @@ public: - template - class BLArenaHashMap : public BLArenaHashMapBase { - public: -- BL_NONCOPYABLE(BLArenaHashMap) -+ BL_NONCOPYABLE(BLArenaHashMap) - - typedef NodeT Node; - -diff --git a/src/blend2d/support/scopedbuffer_p.h b/src/blend2d/support/scopedbuffer_p.h -index e14df50..379f519 100644 ---- a/src/blend2d/support/scopedbuffer_p.h -+++ b/src/blend2d/support/scopedbuffer_p.h -@@ -82,7 +82,7 @@ public: - template - class BLScopedBufferTmp : public BLScopedBuffer { - public: -- BL_NONCOPYABLE(BLScopedBufferTmp) -+ BL_NONCOPYABLE(BLScopedBufferTmp) - - uint8_t _storage[N]; - diff --git a/recipes/blend2d/config.yml b/recipes/blend2d/config.yml index 219f4d22f536c..b62e83e2e1cd2 100644 --- a/recipes/blend2d/config.yml +++ b/recipes/blend2d/config.yml @@ -1,4 +1,10 @@ versions: + "0.11.4": + folder: all + "0.11.3": + folder: all + "0.11.1": + folder: all "0.10.6": folder: all "0.10.5": @@ -11,7 +17,3 @@ versions: folder: all "0.8": folder: all - "0.0.18": - folder: all - "0.0.17": - folder: all diff --git a/recipes/bmx/all/conandata.yml b/recipes/bmx/all/conandata.yml new file mode 100644 index 0000000000000..0b6f6445f92a3 --- /dev/null +++ b/recipes/bmx/all/conandata.yml @@ -0,0 +1,20 @@ +sources: + "1.2": + url: "https://github.com/bbc/bmx/archive/refs/tags/v1.2.tar.gz" + sha256: "e64d91b2d27478d6b892d72183e1ecf79c99880b079ce04442432f3caed1e259" + "cci.20240517": + url: "https://github.com/bbc/bmx/archive/52c7517923dde6e4de881fe1e47fbae5e60df731.tar.gz" + sha256: "b4a0545e2fa33bd7c25adce3b61fd4b06a68a192d037dd0e5eb14defd0b2c936" +patches: + "1.2": + - patch_file: "patches/1.2-cmake-fixes.patch" + patch_description: "Ensure project builds correctly with Conan (don't pick up disabled dependencies from the system, fix different spelling of libraries)" + patch_type: "conan" + - patch_file: "patches/1.2-fix-cpp20.patch" + patch_description: "Fix a compilation problem with C++20" + patch_type: "portability" + patch_source: "https://github.com/bbc/bmx/pull/69" + "cci.20240517": + - patch_file: "patches/cci.20240517-cmake-fixes.patch" + patch_description: "Ensure project builds correctly with Conan (don't pick up disabled dependencies from the system, fix different spelling of libraries)" + patch_type: "conan" diff --git a/recipes/bmx/all/conanfile.py b/recipes/bmx/all/conanfile.py new file mode 100644 index 0000000000000..2a7415f432502 --- /dev/null +++ b/recipes/bmx/all/conanfile.py @@ -0,0 +1,140 @@ +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.build import check_min_cppstd +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.files import apply_conandata_patches, export_conandata_patches, copy, get, rmdir +import os + +required_conan_version = ">=1.53.0" + + +class BmxConan(ConanFile): + name = "bmx" + description = ( + "Library for handling broadcast/production oriented media file formats. " + "Allows reading, modifying and writing media metadata and file essences." + ) + topics = ("vfx", "image", "picture", "video", "multimedia", "mxf") + license = "BSD-3-Clause" + homepage = "https://github.com/bbc/bmx" + url = "https://github.com/conan-io/conan-center-index" + + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + "with_libcurl": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + "with_libcurl": True, + } + + def export_sources(self): + export_conandata_patches(self) + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + + def requirements(self): + # Required libraries + self.requires("uriparser/0.9.8") + self.requires("expat/[>=2.6.2 <3]") + + if not (self.settings.os == 'Windows' or self.settings.os == 'Macos'): + self.requires('libuuid/1.0.3') + + # Configuration dependent requirements + if self.options.with_libcurl: + self.requires("libcurl/[>=7.78.0 <9]") + + def validate(self): + if self.settings.compiler.cppstd: + check_min_cppstd(self, 11) + + # Symbol export is currently not working properly on Windows so shared + # libraries are currently deactivated. This can later be revisited based + # on https://github.com/bbc/bmx/issues/80 + if self.settings.os == "Windows" and self.options.shared: + raise ConanInvalidConfiguration( + "Building as a shared library currently not supported on Windows!" + ) + + def layout(self): + cmake_layout(self, src_folder="src") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + tc.variables["BMX_BUILD_WITH_LIBCURL"] = self.options.with_libcurl + tc.generate() + + cd = CMakeDeps(self) + cd.generate() + + def build(self): + apply_conandata_patches(self) + cmake = CMake(self) + cmake.configure() + cmake.build() + + def package(self): + copy(self, "COPYING", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) + cmake = CMake(self) + cmake.install() + rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) + + @staticmethod + def _conan_comp(name): + return f"bmx_{name.lower()}" + + def _add_component(self, name): + component = self.cpp_info.components[self._conan_comp(name)] + component.set_property("cmake_target_name", f"bmx::{name}") + component.names["cmake_find_package"] = name + component.names["cmake_find_package_multi"] = name + return component + + def package_info(self): + self.cpp_info.set_property("cmake_file_name", "bmx") + self.cpp_info.set_property("pkg_config_name", "bmx") + + self.cpp_info.names["cmake_find_package"] = "bmx" + self.cpp_info.names["cmake_find_package_multi"] = "bmx" + + # bbc-bmx::MXF + libmxf = self._add_component("MXF") + libmxf.libs = ["MXF"] + libmxf.requires = [] + if not (self.settings.os == 'Windows' or self.settings.os == 'Macos'): + libmxf.requires.append("libuuid::libuuid") + + # bbc-bmx::MXF++ + libmxfpp = self._add_component("MXF++") + libmxfpp.libs = ["MXF++"] + libmxfpp.requires = [ + "bmx_mxf" + ] + + # bbc-bmx::bmx + libbmx = self._add_component("bmx") + libbmx.libs = ["bmx"] + libbmx.requires = [ + "bmx_mxf", + "bmx_mxf++", + "expat::expat", + "uriparser::uriparser", + ] + if not (self.settings.os == 'Windows' or self.settings.os == 'Macos'): + libbmx.requires.append("libuuid::libuuid") + + if self.options.with_libcurl: + libbmx.requires.append("libcurl::libcurl") diff --git a/recipes/bmx/all/patches/1.2-cmake-fixes.patch b/recipes/bmx/all/patches/1.2-cmake-fixes.patch new file mode 100644 index 0000000000000..29a8742dbedbb --- /dev/null +++ b/recipes/bmx/all/patches/1.2-cmake-fixes.patch @@ -0,0 +1,141 @@ +diff --git CMakeLists.txt CMakeLists.txt +index 6fe9540e7..8b2578852 100644 +--- CMakeLists.txt ++++ CMakeLists.txt +@@ -34,7 +34,7 @@ if(BUILD_SHARED_LIBS OR NOT DEFINED CMAKE_POSITION_INDEPENDENT_CODE) + set(CMAKE_POSITION_INDEPENDENT_CODE ON) + endif() + +-set(CMAKE_CXX_STANDARD 11) ++#set(CMAKE_CXX_STANDARD 11) + + # Set the test samples output directory + if(BMX_TEST_SAMPLES_DIR STREQUAL "") +@@ -75,7 +75,7 @@ if(MSVC) + endforeach() + endif() + else() +- add_compile_options(-W -Wall -O2) ++ add_compile_options(-W -Wall) + + # Enable large file support on 32-bit systems. + add_definitions( +@@ -93,11 +93,25 @@ add_custom_target(bmx_test_data) + + include("${PROJECT_SOURCE_DIR}/cmake/libmxf.cmake") + include("${PROJECT_SOURCE_DIR}/cmake/libmxfpp.cmake") +-include("${PROJECT_SOURCE_DIR}/cmake/ext_uuid.cmake") +-include("${PROJECT_SOURCE_DIR}/cmake/ext_expat.cmake") +-include("${PROJECT_SOURCE_DIR}/cmake/ext_uriparser.cmake") ++#include("${PROJECT_SOURCE_DIR}/cmake/ext_uuid.cmake") ++#include("${PROJECT_SOURCE_DIR}/cmake/ext_expat.cmake") ++#include("${PROJECT_SOURCE_DIR}/cmake/ext_uriparser.cmake") ++#if(BMX_BUILD_WITH_LIBCURL) ++# include("${PROJECT_SOURCE_DIR}/cmake/ext_libcurl.cmake") ++#endif() ++ ++find_package(expat REQUIRED) ++find_package(uriparser REQUIRED) ++if(UNIX AND NOT APPLE) ++ find_package(libuuid REQUIRED) ++ set(uuid_link_lib libuuid::libuuid) ++else() ++ # MSVC: "ole" will already be linked in ++ # APPLE: doesn't require uuid library ++ set(uuid_link_lib) ++endif() + if(BMX_BUILD_WITH_LIBCURL) +- include("${PROJECT_SOURCE_DIR}/cmake/ext_libcurl.cmake") ++ find_package(CURL REQUIRED) + endif() + + configure_file(config.h.in config.h) +diff --git deps/libMXF/CMakeLists.txt deps/libMXF/CMakeLists.txt +index d36fde6c0..6a1af100b 100644 +--- deps/libMXF/CMakeLists.txt ++++ deps/libMXF/CMakeLists.txt +@@ -35,7 +35,7 @@ if(BUILD_SHARED_LIBS OR NOT DEFINED CMAKE_POSITION_INDEPENDENT_CODE) + set(CMAKE_POSITION_INDEPENDENT_CODE ON) + endif() + +-set(CMAKE_CXX_STANDARD 11) ++#set(CMAKE_CXX_STANDARD 11) + + # Set the test samples output directory + if(LIBMXF_TEST_SAMPLES_DIR STREQUAL "") +@@ -76,7 +76,7 @@ if(MSVC) + endforeach() + endif() + else() +- add_compile_options(-W -Wall -O2) ++ add_compile_options(-W -Wall) + + # Enable large file support on 32-bit systems. + add_definitions( +diff --git deps/libMXFpp/CMakeLists.txt deps/libMXFpp/CMakeLists.txt +index 2272a2709..924fdf770 100644 +--- deps/libMXFpp/CMakeLists.txt ++++ deps/libMXFpp/CMakeLists.txt +@@ -35,7 +35,7 @@ if(BUILD_SHARED_LIBS OR NOT DEFINED CMAKE_POSITION_INDEPENDENT_CODE) + set(CMAKE_POSITION_INDEPENDENT_CODE ON) + endif() + +-set(CMAKE_CXX_STANDARD 11) ++#set(CMAKE_CXX_STANDARD 11) + + if(MSVC) + add_compile_options(/W3 /EHsc) +@@ -61,7 +61,7 @@ if(MSVC) + endforeach() + endif() + else() +- add_compile_options(-W -Wall -O2) ++ add_compile_options(-W -Wall) + + # Enable large file support on 32-bit systems. + add_definitions( +diff --git deps/libMXFpp/libMXF++/CMakeLists.txt deps/libMXFpp/libMXF++/CMakeLists.txt +index 94d48c905..e6c6a63f9 100644 +--- deps/libMXFpp/libMXF++/CMakeLists.txt ++++ deps/libMXFpp/libMXF++/CMakeLists.txt +@@ -32,6 +32,8 @@ add_library(MXFpp + ${MXFpp_sources} + ) + ++target_compile_features(MXFpp PUBLIC cxx_std_11) ++ + target_include_directories(MXFpp PUBLIC + ${PROJECT_SOURCE_DIR} + ) +diff --git src/CMakeLists.txt src/CMakeLists.txt +index 1c0824d8a..94f9c00d6 100644 +--- src/CMakeLists.txt ++++ src/CMakeLists.txt +@@ -26,6 +26,8 @@ target_include_directories(bmx PUBLIC + ${PROJECT_SOURCE_DIR}/include + ) + ++target_compile_features(bmx PUBLIC cxx_std_11) ++ + # Add path to header files if not included in MSVC distribution + if(MSVC) + include(CheckIncludeFile) +@@ -65,13 +67,14 @@ target_link_libraries(bmx + ${MXFpp_link_lib} + PRIVATE + ${uuid_link_lib} +- ${expat_link_lib} +- ${uriparser_link_lib} ++ expat::expat ++ uriparser::uriparser + ) + + if(BMX_BUILD_WITH_LIBCURL) +- target_link_libraries(bmx PRIVATE +- ${libcurl_link_lib} ++ # Linking public to see if the shared library for curls dependencies correctly link ++ target_link_libraries(bmx PUBLIC ++ CURL::libcurl + ) + endif() + diff --git a/recipes/bmx/all/patches/1.2-fix-cpp20.patch b/recipes/bmx/all/patches/1.2-fix-cpp20.patch new file mode 100644 index 0000000000000..862806a6a30d2 --- /dev/null +++ b/recipes/bmx/all/patches/1.2-fix-cpp20.patch @@ -0,0 +1,26 @@ +diff --git deps/libMXFpp/libMXF++/MXFVersion.cpp deps/libMXFpp/libMXF++/MXFVersion.cpp +index 333d5871..bb247a32 100644 +--- deps/libMXFpp/libMXF++/MXFVersion.cpp ++++ deps/libMXFpp/libMXF++/MXFVersion.cpp +@@ -33,6 +33,8 @@ + #include "config.h" + #endif + ++#include ++ + #include "git.h" + #include "fallback_git_version.h" + +diff --git src/common/Version.cpp src/common/Version.cpp +index a4f00e14..d51da64a 100644 +--- src/common/Version.cpp ++++ src/common/Version.cpp +@@ -219,7 +219,7 @@ mxfProductVersion bmx::get_bmx_mxf_product_version() + // Set the patch version value to the commit offset from the release tag. + // The commit offset is part of the git describe tag string which has the + // format "--g" +- string describe = bmx_git::DescribeTag(); ++ string describe = std::string(bmx_git::DescribeTag()); + #ifdef PACKAGE_GIT_VERSION_STRING + if (describe.empty() || describe == "unknown") + describe = PACKAGE_GIT_VERSION_STRING; diff --git a/recipes/bmx/all/patches/cci.20240517-cmake-fixes.patch b/recipes/bmx/all/patches/cci.20240517-cmake-fixes.patch new file mode 100644 index 0000000000000..51915e0cc5aa0 --- /dev/null +++ b/recipes/bmx/all/patches/cci.20240517-cmake-fixes.patch @@ -0,0 +1,57 @@ +diff --git CMakeLists.txt CMakeLists.txt +index 3139ef78e..a08fbb589 100644 +--- CMakeLists.txt ++++ CMakeLists.txt +@@ -91,11 +91,26 @@ add_custom_target(bmx_test_data) + + include("${PROJECT_SOURCE_DIR}/cmake/libmxf.cmake") + include("${PROJECT_SOURCE_DIR}/cmake/libmxfpp.cmake") +-include("${PROJECT_SOURCE_DIR}/cmake/ext_uuid.cmake") +-include("${PROJECT_SOURCE_DIR}/cmake/ext_expat.cmake") +-include("${PROJECT_SOURCE_DIR}/cmake/ext_uriparser.cmake") ++#include("${PROJECT_SOURCE_DIR}/cmake/ext_uuid.cmake") ++#include("${PROJECT_SOURCE_DIR}/cmake/ext_expat.cmake") ++#include("${PROJECT_SOURCE_DIR}/cmake/ext_uriparser.cmake") ++#if(BMX_BUILD_WITH_LIBCURL) ++# include("${PROJECT_SOURCE_DIR}/cmake/ext_libcurl.cmake") ++#endif() ++ ++find_package(expat REQUIRED) ++find_package(uriparser REQUIRED) ++if(UNIX AND NOT APPLE) ++ find_package(libuuid REQUIRED) ++ set(uuid_link_lib libuuid::libuuid) ++else() ++ # MSVC: "ole" will already be linked in ++ # APPLE: doesn't require uuid library ++ set(uuid_link_lib) ++endif() + if(BMX_BUILD_WITH_LIBCURL) + include("${PROJECT_SOURCE_DIR}/cmake/ext_libcurl.cmake") ++ find_package(CURL REQUIRED) + endif() + + configure_file(config.h.in config.h) +diff --git src/CMakeLists.txt src/CMakeLists.txt +index 59c94b8b9..94f9c00d6 100644 +--- src/CMakeLists.txt ++++ src/CMakeLists.txt +@@ -67,13 +67,14 @@ target_link_libraries(bmx + ${MXFpp_link_lib} + PRIVATE + ${uuid_link_lib} +- ${expat_link_lib} +- ${uriparser_link_lib} ++ expat::expat ++ uriparser::uriparser + ) + + if(BMX_BUILD_WITH_LIBCURL) +- target_link_libraries(bmx PRIVATE +- ${libcurl_link_lib} ++ # Linking public to see if the shared library for curls dependencies correctly link ++ target_link_libraries(bmx PUBLIC ++ CURL::libcurl + ) + endif() + diff --git a/recipes/bmx/all/test_package/CMakeLists.txt b/recipes/bmx/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..e178912ec45f8 --- /dev/null +++ b/recipes/bmx/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.8) +project(test_package LANGUAGES CXX) + +find_package(bmx REQUIRED) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_compile_features(${PROJECT_NAME} PUBLIC cxx_std_11) +target_link_libraries(${PROJECT_NAME} PRIVATE bmx::bmx) diff --git a/recipes/bmx/all/test_package/conanfile.py b/recipes/bmx/all/test_package/conanfile.py new file mode 100644 index 0000000000000..a9fb96656f203 --- /dev/null +++ b/recipes/bmx/all/test_package/conanfile.py @@ -0,0 +1,26 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/bmx/all/test_package/test_package.cpp b/recipes/bmx/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..708a858acfc27 --- /dev/null +++ b/recipes/bmx/all/test_package/test_package.cpp @@ -0,0 +1,14 @@ +#include +#include + +#include + +int main() { + std::cout << bmx::get_bmx_library_name() << " library version " << bmx::get_bmx_version_string() << std::endl; + + const auto mxf_version = mxf_get_version(); + std::cout << "MXF library version " + << mxf_version->major << '.' << mxf_version->minor << '.' << mxf_version->patch << std::endl; + + return 0; +} diff --git a/recipes/bmx/config.yml b/recipes/bmx/config.yml new file mode 100644 index 0000000000000..67c5069aa3fb3 --- /dev/null +++ b/recipes/bmx/config.yml @@ -0,0 +1,5 @@ +versions: + "1.2": + folder: all + "cci.20240517": + folder: all diff --git a/recipes/boost-ext-ut/all/conandata.yml b/recipes/boost-ext-ut/all/conandata.yml index 6a4836cd7d3f2..81761a3dd0a75 100644 --- a/recipes/boost-ext-ut/all/conandata.yml +++ b/recipes/boost-ext-ut/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.1.0": + url: "https://github.com/boost-ext/ut/archive/v2.1.0.tar.gz" + sha256: "1c9c35c039ad3a9795a278447db6da0a4ec1a1d223bf7d64687ad28f673b7ae8" "2.0.1": url: "https://github.com/boost-ext/ut/archive/v2.0.1.tar.gz" sha256: "1e43be17045a881c95cedc843d72fe9c1e53239b02ed179c1e39e041ebcd7dad" diff --git a/recipes/boost-ext-ut/all/conanfile.py b/recipes/boost-ext-ut/all/conanfile.py index a73d7aef01853..87082efe83c5e 100644 --- a/recipes/boost-ext-ut/all/conanfile.py +++ b/recipes/boost-ext-ut/all/conanfile.py @@ -52,6 +52,11 @@ def layout(self): cmake_layout(self, src_folder="src") def validate(self): + if (Version(self.version) == "2.1.0" and self.settings.os == "Linux" and self.settings.compiler == "clang" and + 12 <= Version(self.settings.compiler.version) <= 16 and "libstdc++" in self.settings.compiler.libcxx): + # https://github.com/boost-ext/ut/issues/637 + raise ConanInvalidConfiguration(f"{self.ref} does support Clang + libstdc++. Use -s compiler.libcxx=libc++ or Clang >16.") + if self.settings.compiler.get_safe("cppstd"): check_min_cppstd(self, self._minimum_cpp_standard) if Version(self.version) <= "1.1.8" and is_msvc(self): diff --git a/recipes/boost-ext-ut/config.yml b/recipes/boost-ext-ut/config.yml index c1e4e8bebed11..61e709f7dc6a2 100644 --- a/recipes/boost-ext-ut/config.yml +++ b/recipes/boost-ext-ut/config.yml @@ -1,4 +1,6 @@ versions: + "2.1.0": + folder: "all" "2.0.1": folder: "all" "2.0.0": diff --git a/recipes/boost/all/conandata.yml b/recipes/boost/all/conandata.yml index f0c416fba2531..c7a797f162a96 100644 --- a/recipes/boost/all/conandata.yml +++ b/recipes/boost/all/conandata.yml @@ -1,4 +1,14 @@ sources: + "1.86.0": + url: + - "https://boostorg.jfrog.io/artifactory/main/release/1.86.0/source/boost_1_86_0.tar.bz2" + - "https://sourceforge.net/projects/boost/files/boost/1.86.0/boost_1_86_0.tar.bz2" + sha256: "1bed88e40401b2cb7a1f76d4bab499e352fa4d0c5f31c0dbae64e24d34d7513b" + "1.85.0": + url: + - "https://boostorg.jfrog.io/artifactory/main/release/1.85.0/source/boost_1_85_0.tar.bz2" + - "https://sourceforge.net/projects/boost/files/boost/1.85.0/boost_1_85_0.tar.bz2" + sha256: "7009fe1faa1697476bdc7027703a2badb84e849b7b0baad5086b087b971f8617" "1.84.0": url: - "https://boostorg.jfrog.io/artifactory/main/release/1.84.0/source/boost_1_84_0.tar.bz2" @@ -34,40 +44,19 @@ sources: - "https://boostorg.jfrog.io/artifactory/main/release/1.78.0/source/boost_1_78_0.tar.bz2" - "https://sourceforge.net/projects/boost/files/boost/1.78.0/boost_1_78_0.tar.bz2" sha256: "8681f175d4bdb26c52222665793eef08490d7758529330f98d3b29dd0735bccc" - "1.77.0": - url: - - "https://boostorg.jfrog.io/artifactory/main/release/1.77.0/source/boost_1_77_0.tar.bz2" - - "https://sourceforge.net/projects/boost/files/boost/1.77.0/boost_1_77_0.tar.bz2" - sha256: "fc9f85fc030e233142908241af7a846e60630aa7388de9a5fafb1f3a26840854" - "1.76.0": - url: - - "https://boostorg.jfrog.io/artifactory/main/release/1.76.0/source/boost_1_76_0.tar.bz2" - - "https://sourceforge.net/projects/boost/files/boost/1.76.0/boost_1_76_0.tar.bz2" - sha256: "f0397ba6e982c4450f27bf32a2a83292aba035b827a5623a14636ea583318c41" - "1.75.0": - url: - - "https://boostorg.jfrog.io/artifactory/main/release/1.75.0/source/boost_1_75_0.tar.bz2" - - "https://sourceforge.net/projects/boost/files/boost/1.75.0/boost_1_75_0.tar.bz2" - sha256: "953db31e016db7bb207f11432bef7df100516eeb746843fa0486a222e3fd49cb" - "1.74.0": - url: - - "https://boostorg.jfrog.io/artifactory/main/release/1.74.0/source/boost_1_74_0.tar.bz2" - - "https://sourceforge.net/projects/boost/files/boost/1.74.0/boost_1_74_0.tar.bz2" - sha256: "83bfc1507731a0906e387fc28b7ef5417d591429e51e788417fe9ff025e116b1" - "1.73.0": - url: - - "https://boostorg.jfrog.io/artifactory/main/release/1.73.0/source/boost_1_73_0.tar.bz2" - - "https://sourceforge.net/projects/boost/files/boost/1.73.0/boost_1_73_0.tar.bz2" - sha256: "4eb3b8d442b426dc35346235c8733b5ae35ba431690e38c6a8263dce9fcbb402" - "1.72.0": - url: - - "https://boostorg.jfrog.io/artifactory/main/release/1.72.0/source/boost_1_72_0.tar.bz2" - - "https://sourceforge.net/projects/boost/files/boost/1.72.0/boost_1_72_0.tar.bz2" - sha256: "59c9b274bc451cf91a9ba1dd2c7fdcaf5d60b1b3aa83f2c9fa143417cc660722" - "1.71.0": - url: "https://boostorg.jfrog.io/artifactory/main/release/1.71.0/source/boost_1_71_0.tar.bz2" - sha256: "d73a8da01e8bf8c7eda40b4c84915071a8c8a0df4a6734537ddde4a8580524ee" patches: + "1.86.0": + - patch_file: "patches/1.82.0-locale-iconv-library-option.patch" + patch_description: "Optional flag to specify iconv from either libc of libiconv" + patch_type: "conan" + "1.85.0": + - patch_file: "patches/1.82.0-locale-iconv-library-option.patch" + patch_description: "Optional flag to specify iconv from either libc of libiconv" + patch_type: "conan" + - patch_file: "patches/1.85.0-container-aliasing-violation-fix.patch" + patch_description: "Fix aliasing violation in boost::container" + patch_type: "official" + patch_source: "https://github.com/boostorg/container/commit/20ad12f20e661978e90dc7f36d8ab8ac05e5a5a9" "1.84.0": - patch_file: "patches/1.82.0-locale-iconv-library-option.patch" patch_description: "Optional flag to specify iconv from either libc of libiconv" @@ -170,191 +159,3 @@ patches: patch_description: "Don't skip install targets if there's no in ureqs" patch_type: "official" patch_source: "https://github.com/boostorg/build/pull/113" - "1.77.0": - - patch_file: "patches/boost_locale_fail_on_missing_backend.patch" - patch_description: "Fails the build when there is no iconv backend" - patch_type: "conan" - - patch_file: "patches/boost_1_77_mpi_check.patch" - patch_description: "Fails the build when mpi is not configured" - patch_type: "conan" - - patch_file: "patches/1.69.0-locale-no-system.patch" - patch_description: "This library links to boost_system, even though that library is header-only" - patch_type: "conan" - - patch_file: "patches/1.77.0-type_erasure-no-system.patch" - patch_description: "This library links to boost_system, even though that library is header-only" - patch_type: "conan" - - patch_file: "patches/1.77.0-fiber-mingw.patch" - patch_description: "fix layout=versioned for clang@Macos + mingw@Windows" - patch_type: "conan" - - patch_file: "patches/1.77.0-boost_build-with-newer-b2.patch" - patch_description: "Bump build_requires of 'b2' to '4.7.1' (was '4.5.0')" - patch_type: "conan" - "1.76.0": - - patch_file: "patches/boost_locale_fail_on_missing_backend.patch" - patch_description: "Fails the build when there is no iconv backend" - patch_type: "conan" - - patch_file: "patches/boost_mpi_check.patch" - patch_description: "Fails the build when mpi is not configured" - patch_type: "conan" - - patch_file: "patches/1.69.0-locale-no-system.patch" - patch_description: "This library links to boost_system, even though that library is header-only" - patch_type: "conan" - - patch_file: "patches/1.76.0-0001-fix-include-inside-boost-namespace.patch" - patch_description: "Fix #include inside boost namespace" - patch_type: "bugfix" - patch_source: "https://github.com/boostorg/math/pull/670" - - patch_file: "patches/1.77.0-type_erasure-no-system.patch" - patch_description: "This library links to boost_system, even though that library is header-only" - patch_type: "conan" - - patch_file: "patches/1.77.0-boost_build-with-newer-b2.patch" - patch_description: "Bump build_requires of 'b2' to '4.7.1' (was '4.5.0')" - patch_type: "conan" - "1.75.0": - - patch_file: "patches/boost_build_qcc_fix_debug_build_parameter_since_1_74.patch" - patch_description: "" - patch_type: "conan" - - patch_file: "patches/python_base_prefix_since_1_74.patch" - patch_description: "" - patch_type: "conan" - - patch_file: "patches/boost_locale_fail_on_missing_backend.patch" - patch_description: "Fails the build when there is no iconv backend" - patch_type: "conan" - - patch_file: "patches/boost_mpi_check.patch" - patch_description: "Fails the build when mpi is not configured" - patch_type: "conan" - - patch_file: "patches/1.69.0-locale-no-system.patch" - patch_description: "This library links to boost_system, even though that library is header-only" - patch_type: "conan" - - patch_file: "patches/1.77.0-type_erasure-no-system.patch" - patch_description: "This library links to boost_system, even though that library is header-only" - patch_type: "conan" - - patch_file: "patches/1.75.0-boost_build-with-newer-b2.patch" - patch_description: "Bump build_requires of 'b2' to '4.7.1' (was '4.5.0')" - patch_type: "conan" - "1.74.0": - - patch_file: "patches/boost_build_qcc_fix_debug_build_parameter_since_1_74.patch" - patch_description: "" - patch_type: "conan" - - patch_file: "patches/python_base_prefix_since_1_74.patch" - patch_description: "" - patch_type: "conan" - - patch_file: "patches/boost_locale_fail_on_missing_backend.patch" - patch_description: "Fails the build when there is no iconv backend" - patch_type: "conan" - - patch_file: "patches/boost_mpi_check.patch" - patch_description: "Fails the build when mpi is not configured" - patch_type: "conan" - - patch_file: "patches/1.69.0-locale-no-system.patch" - patch_description: "This library links to boost_system, even though that library is header-only" - patch_type: "conan" - - patch_file: "patches/1.69.0-random-no-system.patch" - patch_description: "This library links to boost_system, even though that library is header-only" - patch_type: "conan" - - patch_file: "patches/1.69.0-type_erasure-no-system.patch" - patch_description: "This library links to boost_system, even though that library is header-only" - patch_type: "conan" - - patch_file: "patches/1.75.0-boost_build-with-newer-b2.patch" - patch_description: "Bump build_requires of 'b2' to '4.7.1' (was '4.5.0')" - patch_type: "conan" - "1.73.0": - - patch_file: "patches/boost_build_qcc_fix_debug_build_parameter.patch" - patch_description: "" - patch_type: "conan" - - patch_file: "patches/python_base_prefix.patch" - patch_description: "" - patch_type: "conan" - - patch_file: "patches/boost_locale_fail_on_missing_backend.patch" - patch_description: "Fails the build when there is no iconv backend" - patch_type: "conan" - - patch_file: "patches/boost_mpi_check.patch" - patch_description: "Fails the build when mpi is not configured" - patch_type: "conan" - - patch_file: "patches/1.69.0-locale-no-system.patch" - patch_description: "This library links to boost_system, even though that library is header-only" - patch_type: "conan" - - patch_file: "patches/1.69.0-random-no-system.patch" - patch_description: "This library links to boost_system, even though that library is header-only" - patch_type: "conan" - - patch_file: "patches/1.69.0-type_erasure-no-system.patch" - patch_description: "This library links to boost_system, even though that library is header-only" - patch_type: "conan" - - patch_file: "patches/1.75.0-boost_build-with-newer-b2.patch" - patch_description: "Bump build_requires of 'b2' to '4.7.1' (was '4.5.0')" - patch_type: "conan" - "1.72.0": - - patch_file: "patches/bcp_namespace_issues_1_72.patch" - patch_description: "" - patch_type: "conan" - - patch_file: "patches/boost_build_qcc_fix_debug_build_parameter.patch" - patch_description: "" - patch_type: "conan" - - patch_file: "patches/boost_core_qnx_cxx_provide___cxa_get_globals.patch" - patch_description: "" - patch_type: "conan" - - patch_file: "patches/python_base_prefix.patch" - patch_description: "" - patch_type: "conan" - - patch_file: "patches/solaris_pthread_data.patch" - patch_description: "" - patch_type: "conan" - - patch_file: "patches/0001-revert-cease-dependence-on-range.patch" - patch_description: "" - patch_type: "conan" - - patch_file: "patches/boost_log_filesystem_no_deprecated_1_72.patch" - patch_description: "" - patch_type: "conan" - - patch_file: "patches/boost_locale_fail_on_missing_backend.patch" - patch_description: "Fails the build when there is no iconv backend" - patch_type: "conan" - - patch_file: "patches/boost_mpi_check.patch" - patch_description: "Fails the build when mpi is not configured" - patch_type: "conan" - - patch_file: "patches/1.69.0-locale-no-system.patch" - patch_description: "This library links to boost_system, even though that library is header-only" - patch_type: "conan" - - patch_file: "patches/1.69.0-random-no-system.patch" - patch_description: "This library links to boost_system, even though that library is header-only" - patch_type: "conan" - - patch_file: "patches/1.69.0-type_erasure-no-system.patch" - patch_description: "This library links to boost_system, even though that library is header-only" - patch_type: "conan" - - patch_file: "patches/1.75.0-boost_build-with-newer-b2.patch" - patch_description: "Bump build_requires of 'b2' to '4.7.1' (was '4.5.0')" - patch_type: "conan" - "1.71.0": - - patch_file: "patches/bcp_namespace_issues_1_71.patch" - patch_description: "" - patch_type: "conan" - - patch_file: "patches/boost_build_qcc_fix_debug_build_parameter.patch" - patch_description: "" - patch_type: "conan" - - patch_file: "patches/boost_core_qnx_cxx_provide___cxa_get_globals.patch" - patch_description: "" - patch_type: "conan" - - patch_file: "patches/python_base_prefix.patch" - patch_description: "" - patch_type: "conan" - - patch_file: "patches/solaris_pthread_data.patch" - patch_description: "" - patch_type: "conan" - - patch_file: "patches/boost_locale_fail_on_missing_backend.patch" - patch_description: "Fails the build when there is no iconv backend" - patch_type: "conan" - - patch_file: "patches/boost_mpi_check.patch" - patch_description: "Fails the build when mpi is not configured" - patch_type: "conan" - - patch_file: "patches/1.69.0-contract-no-system.patch" - patch_description: "This library links to boost_system, even though that library is header-only" - patch_type: "conan" - - patch_file: "patches/1.69.0-locale-no-system.patch" - patch_description: "This library links to boost_system, even though that library is header-only" - patch_type: "conan" - - patch_file: "patches/1.69.0-random-no-system.patch" - patch_description: "This library links to boost_system, even though that library is header-only" - patch_type: "conan" - - patch_file: "patches/1.69.0-type_erasure-no-system.patch" - patch_description: "This library links to boost_system, even though that library is header-only" - patch_type: "conan" - - patch_file: "patches/1.75.0-boost_build-with-newer-b2.patch" - patch_description: "Bump build_requires of 'b2' to '4.7.1' (was '4.5.0')" - patch_type: "conan" diff --git a/recipes/boost/all/conanfile.py b/recipes/boost/all/conanfile.py index 25b060af95c59..e746f46c77c4c 100644 --- a/recipes/boost/all/conanfile.py +++ b/recipes/boost/all/conanfile.py @@ -1,7 +1,7 @@ from conan import ConanFile from conan.errors import ConanException, ConanInvalidConfiguration from conan.tools.apple import is_apple_os, to_apple_arch, XCRun -from conan.tools.build import build_jobs, check_min_cppstd, cross_building, valid_min_cppstd, supported_cppstd +from conan.tools.build import build_jobs, cross_building, valid_min_cppstd, supported_cppstd from conan.tools.env import VirtualBuildEnv from conan.tools.files import ( apply_conandata_patches, chdir, collect_libs, copy, export_conandata_patches, @@ -23,11 +23,11 @@ required_conan_version = ">=1.53.0" - # When adding (or removing) an option, also add this option to the list in # `rebuild-dependencies.yml` and re-run that script. CONFIGURE_OPTIONS = ( "atomic", + "charconv", "chrono", "cobalt", "container", @@ -47,6 +47,7 @@ "math", "mpi", "nowide", + "process", "program_options", "python", "random", @@ -82,7 +83,7 @@ class BoostConan(ConanFile): "filesystem_no_deprecated": [True, False], "filesystem_use_std_fs": [True, False], "filesystem_version": [None, "3", "4"], - "layout": ["system", "versioned", "tagged", "b2-default"], + "layout": ["system", "versioned", "tagged"], "magic_autolink": [True, False], # enables BOOST_ALL_NO_LIB "diagnostic_definitions": [True, False], # enables BOOST_LIB_DIAGNOSTIC "python_executable": [None, "ANY"], # system default python installation is used, if None @@ -233,6 +234,21 @@ def _min_compiler_version_default_cxx11(self): "msvc": 190, # guess }.get(str(self.settings.compiler)) + @property + def _min_compiler_version_default_cxx14(self): + """ Minimum compiler version having c++ standard >= 14 + https://gcc.gnu.org/gcc-6/changes.html + https://releases.llvm.org/6.0.0/tools/clang/docs/ReleaseNotes.html#id9 + https://learn.microsoft.com/en-us/cpp/build/reference/std-specify-language-standard-version?view=msvc-150#remarks + """ + return { + "gcc": 6, + "clang": 6, + "apple-clang": 99, # still uses C++98 by default. XCode does not reflect apple-clang + "Visual Studio": 15, # guess + "msvc": 191, # guess + }.get(str(self.settings.compiler)) + @property def _min_compiler_version_default_cxx20(self): return { @@ -252,11 +268,61 @@ def _has_cppstd_11_supported(self): if compiler_version: return (Version(self.settings.compiler.version) >= compiler_version) or "11" in supported_cppstd(self) + @property + def _has_cppstd_14_supported(self): + cppstd = self.settings.compiler.get_safe("cppstd") + if cppstd: + return valid_min_cppstd(self, 14) + required_compiler_version = self._min_compiler_version_default_cxx14 + if required_compiler_version: + msvc_versions = {14: 190, 15: 191, 16: 192, 17: 193} + compiler_version = Version(self.settings.compiler.version) + is_visual_studio = str(self.settings.compiler) == "Visual Studio" + # supported_cppstd only supports msvc, but not Visual Studio as compiler + supported_cxx14 = "14" in supported_cppstd(self, "msvc", msvc_versions.get(compiler_version)) if is_visual_studio else "14" in supported_cppstd(self) + # supported_cppstd: lists GCC 5 due partial support for C++14, but not enough for Boost + return (compiler_version >= required_compiler_version) and supported_cxx14 + + @property + def _has_cppstd_20_supported(self): + cppstd = self.settings.compiler.get_safe("cppstd") + if cppstd: + return valid_min_cppstd(self, 20) + required_compiler_version = self._min_compiler_version_default_cxx20 + if required_compiler_version: + msvc_versions = {14: 190, 15: 191, 16: 192, 17: 193} + compiler_version = Version(self.settings.compiler.version) + is_visual_studio = str(self.settings.compiler) == "Visual Studio" + # supported_cppstd only supports msvc, but not Visual Studio as compiler + supported_cxx20 = "20" in supported_cppstd(self, "msvc", msvc_versions.get(compiler_version)) if is_visual_studio else "20" in supported_cppstd(self) + # We still dont have a compiler using C++20 by default + return (compiler_version >= required_compiler_version) or supported_cxx20 + + @property + def _has_coroutine_supported(self): + cppstd = self.settings.compiler.get_safe("cppstd") + cppstd_20_supported = True + if cppstd: + cppstd_20_supported = valid_min_cppstd(self, 20) + # https://en.cppreference.com/w/cpp/compiler_support#cpp20 + # https://releases.llvm.org/14.0.0/tools/clang/docs/ReleaseNotes.html#clang-format: before is experimental header + # https://gcc.gnu.org/gcc-10/changes.html: requires -fcoroutines + min_compiler_versions = { + "apple-clang": "12", + "clang": "14", + "gcc": "10", + "msvc": "192", + "Visual Studio": "16",} + required_compiler_version = min_compiler_versions.get(str(self.settings.compiler)) + if not required_compiler_version: + return cppstd_20_supported + return cppstd_20_supported and Version(self.settings.compiler.version) >= required_compiler_version + @property def _min_compiler_version_nowide(self): # Nowide needs c++11 + swappable std::fstream return { - "gcc": 5, + "gcc": 4.8, "clang": 5, "Visual Studio": 14, # guess "msvc": 190, # guess @@ -365,6 +431,10 @@ def config_options(self): self.options.without_json = True self.options.without_nowide = True self.options.without_url = True + if Version(self.version) >= "1.85.0" and not self._has_cppstd_14_supported: + self.options.without_math = True + if Version(self.version) >= "1.86.0" and not self._has_cppstd_14_supported: + self.options.without_graph = True # iconv is off by default on Windows and Solaris if self._is_windows_platform or self.settings.os == "SunOS": @@ -382,27 +452,36 @@ def config_options(self): if dep_name not in self._configure_options: delattr(self.options, f"without_{dep_name}") - if Version(self.version) >= "1.76.0": - # Starting from 1.76.0, Boost.Math requires a c++11 capable compiler - # ==> disable it by default for older compilers or c++ standards - - def disable_math(): - super_modules = self._all_super_modules("math") - for smod in super_modules: - try: - setattr(self.options, f"without_{smod}", True) - except ConanException: - pass - - if self.settings.compiler.get_safe("cppstd"): - if not valid_min_cppstd(self, 11): - disable_math() - else: - min_compiler_version = self._min_compiler_version_default_cxx11 - if min_compiler_version is None: - self.output.warning("Assuming the compiler supports c++11 by default") - elif not self._has_cppstd_11_supported: - disable_math() + def disable_math(): + super_modules = self._all_super_modules("math") + for smod in super_modules: + try: + setattr(self.options, f"without_{smod}", True) + except ConanException: + pass + + def disable_graph(): + super_modules = self._all_super_modules("graph") + for smod in super_modules: + try: + setattr(self.options, f"without_{smod}", True) + except ConanException: + pass + + # Starting from 1.76.0, Boost.Math requires a c++11 capable compiler + # ==> disable it by default for older compilers or c++ standards + if self.settings.compiler.get_safe("cppstd"): + if not valid_min_cppstd(self, 11): + disable_math() + else: + min_compiler_version = self._min_compiler_version_default_cxx11 + if min_compiler_version is None: + self.output.warning("Assuming the compiler supports c++11 by default") + elif not self._has_cppstd_11_supported: + disable_math() + # Boost.Math is not built when the compiler is GCC < 5 and uses C++11 + elif self.settings.compiler == "gcc" and Version(self.settings.compiler.version) < "5": + disable_math() if Version(self.version) >= "1.79.0": # Starting from 1.79.0, Boost.Wave requires a c++11 capable compiler @@ -425,6 +504,9 @@ def disable_wave(): self.output.warning("Assuming the compiler supports c++11 by default") elif not self._has_cppstd_11_supported: disable_wave() + # Boost.Wave is not built when the compiler is GCC < 5 and uses C++11 + elif self.settings.compiler == "gcc" and Version(self.settings.compiler.version) < "5": + disable_wave() if Version(self.version) >= "1.81.0": # Starting from 1.81.0, Boost.Locale requires a c++11 capable compiler @@ -447,6 +529,9 @@ def disable_locale(): self.output.warning("Assuming the compiler supports c++11 by default") elif not self._has_cppstd_11_supported: disable_locale() + # Boost.Locale is not built when the compiler is GCC < 5 and uses C++11 + elif self.settings.compiler == "gcc" and Version(self.settings.compiler.version) < "5": + disable_locale() if Version(self.version) >= "1.84.0": # Starting from 1.84.0, Boost.Cobalt requires a c++20 capable compiler @@ -460,7 +545,9 @@ def disable_cobalt(): except ConanException: pass - if self.settings.compiler.get_safe("cppstd"): + if not self._has_coroutine_supported: + disable_cobalt() + elif self.settings.compiler.get_safe("cppstd"): if not valid_min_cppstd(self, 20): disable_cobalt() else: @@ -474,6 +561,40 @@ def disable_cobalt(): if is_msvc(self): self.options.without_fiber = True + if Version(self.version) >= "1.85.0": + # Starting from 1.85.0, Boost.Math requires a c++14 capable compiler + # https://github.com/boostorg/math/blob/boost-1.85.0/README.md + # ==> disable it by default for older compilers or c++ standards + if self.settings.compiler.get_safe("cppstd"): + if not valid_min_cppstd(self, 14): + disable_math() + else: + min_compiler_version = self._min_compiler_version_default_cxx14 + if min_compiler_version is None: + self.output.warning("Assuming the compiler supports c++14 by default") + elif not self._has_cppstd_14_supported: + disable_math() + + if Version(self.version) >= "1.86.0": + # Boost 1.86.0 updated more components that require C++14 and C++17 + # https://www.boost.org/users/history/version_1_86_0.html + if self.settings.compiler.get_safe("cppstd"): + if not valid_min_cppstd(self, 14): + disable_graph() + else: + min_compiler_version = self._min_compiler_version_default_cxx14 + if min_compiler_version is None: + self.output.warning("Assuming the compiler supports c++14 by default") + elif not self._has_cppstd_14_supported: + disable_graph() + + # TODO: Revisit on Boost 1.87.0 + # It's not possible to disable process only when having shared parsed already. + # https://github.com/boostorg/process/issues/408 + # https://github.com/boostorg/process/pull/409 + if Version(self.version) == "1.86.0" and is_msvc(self): + setattr(self.options, "without_process", True) + @property def _configure_options(self): return self._dependencies["configure_options"] @@ -493,6 +614,15 @@ def _stacktrace_addr2line_available(self): return False return not self.options.header_only and not self.options.without_stacktrace and self.settings.os != "Windows" + @property + def _stacktrace_from_exception_available(self): + if Version(self.version) == "1.85.0": + # https://github.com/boostorg/stacktrace/blob/boost-1.85.0/build/Jamfile.v2#L143 + return not self.options.header_only and not self.options.without_stacktrace and self.settings.os != "Windows" + elif Version(self.version) >= "1.86.0": + # https://github.com/boostorg/stacktrace/blob/boost-1.86.0/build/Jamfile.v2#L148 + return not self.options.header_only and not self.options.without_stacktrace and self._b2_architecture == "x86" + def configure(self): if self.options.header_only: self.options.rm_safe("shared") @@ -528,20 +658,21 @@ def configure(self): if self.options.get_safe("without_stacktrace", True): self.options.rm_safe("with_stacktrace_backtrace") - if self.options.layout == "b2-default": - self.options.layout = "versioned" if self.settings.os == "Windows" else "system" - if self.options.without_fiber: self.options.rm_safe("numa") + # Use verbosity from [conf] if specified + verbosity = self.conf.get("tools.build:verbosity", default="quiet") + if verbosity == "verbose" and int(self.options.debug_level) < 2: + self.options.debug_level.value = 2 + def layout(self): basic_layout(self, src_folder="src") @property def _cxx11_boost_libraries(self): libraries = ["fiber", "json", "nowide", "url"] - if Version(self.version) >= "1.76.0": - libraries.append("math") + libraries.append("math") if Version(self.version) >= "1.79.0": libraries.append("wave") if Version(self.version) >= "1.81.0": @@ -554,8 +685,28 @@ def _cxx11_boost_libraries(self): libraries.append("stacktrace") libraries.append("test") libraries.append("thread") + if Version(self.version) >= "1.85.0": + libraries.append("system") libraries.sort() - return filter(lambda library: f"without_{library}" in self.options, libraries) + return list(filter(lambda library: f"without_{library}" in self.options, libraries)) + + @property + def _cxx14_boost_libraries(self): + libraries = [] + if Version(self.version) >= "1.85.0": + # https://github.com/boostorg/math/blob/develop/README.md#boost-math-library + libraries.append("math") + libraries.sort() + return list(filter(lambda library: f"without_{library}" in self.options, libraries)) + + @property + def _cxx20_boost_libraries(self): + libraries = [] + if Version(self.version) >= "1.84.0": + # https://github.com/boostorg/cobalt/blob/boost-1.84.0/build/Jamfile#L54 + libraries.append("cobalt") + libraries.sort() + return list(filter(lambda library: f"without_{library}" in self.options, libraries)) def validate(self): if not self.options.multithreading: @@ -597,15 +748,24 @@ def validate(self): if mincompiler_version and Version(self.settings.compiler.version) < mincompiler_version: raise ConanInvalidConfiguration("This compiler is too old to build Boost.nowide.") - if any([not self.options.get_safe(f"without_{library}", True) for library in self._cxx11_boost_libraries]): - if self.settings.compiler.get_safe("cppstd"): - check_min_cppstd(self, 11) - else: - if not self._has_cppstd_11_supported: + for cxx_standard, boost_libraries, has_cppstd_supported in [ + (11, self._cxx11_boost_libraries, self._has_cppstd_11_supported), + (14, self._cxx14_boost_libraries, self._has_cppstd_14_supported), + (20, self._cxx20_boost_libraries, self._has_cppstd_20_supported)]: + if any([not self.options.get_safe(f"without_{library}", True) for library in boost_libraries]): + if (self.settings.compiler.get_safe("cppstd") and not valid_min_cppstd(self, cxx_standard)) or \ + not has_cppstd_supported: raise ConanInvalidConfiguration( - f"Boost.{{{','.join(self._cxx11_boost_libraries)}}} requires a c++11 compiler " - "(please set compiler.cppstd or use a newer compiler)" + f"Boost libraries {', '.join(boost_libraries)} requires a C++{cxx_standard} compiler. " + "Please, set compiler.cppstd or use a newer compiler version or disable from building." ) + if not self.options.get_safe("without_cobalt", True) and not self._has_coroutine_supported: + raise ConanInvalidConfiguration("Boost.Cobalt requires a C++20 capable compiler. " + "Please, set compiler.cppstd and use a newer compiler version, or disable from building.") + + # TODO: Revisit on Boost 1.87.0. Remove in case Process is fixed. + if Version(self.version) == "1.86.0" and is_msvc(self) and self.options.get_safe("shared") and self.options.get_safe("without_process", None) == False: + raise ConanInvalidConfiguration(f"{self.ref} Boost.Process will fail to be consumed as shared library on MSVC. See https://github.com/boostorg/process/issues/408.") def _with_dependency(self, dependency): """ @@ -651,14 +811,14 @@ def requirements(self): if self._with_bzip2: self.requires("bzip2/1.0.8") if self._with_lzma: - self.requires("xz_utils/5.4.4") + self.requires("xz_utils/[>=5.4.5 <6]") if self._with_zstd: - self.requires("zstd/1.5.5") + self.requires("zstd/[>=1.5 <1.6]") if self._with_stacktrace_backtrace: self.requires("libbacktrace/cci.20210118", transitive_headers=True, transitive_libs=True) if self._with_icu: - self.requires("icu/73.2") + self.requires("icu/74.2") if self._with_iconv: self.requires("libiconv/1.17") @@ -677,7 +837,7 @@ def package_id(self): def build_requirements(self): if not self.options.header_only: - self.tool_requires("b2/4.10.1") + self.tool_requires("b2/[>=5.2 <6]") def source(self): get(self, **self.conan_data["sources"][self.version], @@ -1019,7 +1179,7 @@ def _b2_os(self): @property def _b2_address_model(self): - if self.settings.arch in ("x86_64", "ppc64", "ppc64le", "mips64", "armv8", "armv8.3", "sparcv9"): + if self.settings.arch in ("x86_64", "ppc64", "ppc64le", "mips64", "armv8", "armv8.3", "sparcv9", "s390x"): return "64" return "32" @@ -1172,6 +1332,9 @@ def add_defines(library): flags.append(f"cxxstd={cppstd_version}") if "gnu" in safe_cppstd: flags.append("cxxstd-dialect=gnu") + elif Version(self.version) >= "1.85.0" and self._has_cppstd_14_supported: + cppstd_version = self._cppstd_flag("14") + flags.append(f"cxxstd={cppstd_version}") elif self._has_cppstd_11_supported: cppstd_version = self._cppstd_flag("11") flags.append(f"cxxstd={cppstd_version}") @@ -1241,6 +1404,10 @@ def add_defines(library): cxx_flags.append("-fembed-bitcode") if self._with_stacktrace_backtrace: flags.append(f"-sLIBBACKTRACE_PATH={self.dependencies['libbacktrace'].package_folder}") + if self._stacktrace_from_exception_available and "x86" not in str(self.settings.arch): + # https://github.com/boostorg/stacktrace/blob/boost-1.85.0/src/from_exception.cpp#L29 + # This feature is guarded by BOOST_STACKTRACE_ALWAYS_STORE_IN_PADDING, but that is only enabled on x86. + flags.append("define=BOOST_STACKTRACE_LIBCXX_RUNTIME_MAY_CAUSE_MEMORY_LEAK=1") if self._with_iconv: flags.append(f"-sICONV_PATH={self.dependencies['libiconv'].package_folder}") if self._with_icu: @@ -1260,6 +1427,10 @@ def add_defines(library): if self.options.get_safe("addr2line_location"): cxx_flags.append(f"-DBOOST_STACKTRACE_ADDR2LINE_LOCATION={self.options.addr2line_location}") + if not self.options.get_safe('without_cobalt', True) and \ + (self.settings.compiler == "gcc" and Version(self.settings.compiler.version) == "10"): + cxx_flags.append("-fcoroutines") + cxx_flags = f'cxxflags="{" ".join(cxx_flags)}"' flags.append(cxx_flags) @@ -1344,6 +1515,9 @@ def _create_user_config_jam(self, folder): def create_library_config(deps_name, name): aggregated_cpp_info = self.dependencies[deps_name].cpp_info.aggregated_components() + if len(aggregated_cpp_info.libs) == 0: + return "" + includedir = aggregated_cpp_info.includedirs[0].replace("\\", "/") includedir = f"\"{includedir}\"" libdir = aggregated_cpp_info.libdirs[0].replace("\\", "/") @@ -1460,7 +1634,7 @@ def _toolset(self): return str(self.settings.compiler) if self.settings.compiler == "sun-cc": return "sunpro" - if self.settings.compiler == "intel": + if "intel" in str(self.settings.compiler): return { "Macos": "intel-darwin", "Windows": "intel-win", @@ -1738,6 +1912,8 @@ def add_libprefix(n): libprefix = "" if is_msvc(self) and (not self._shared or n in self._dependencies["static_only"]): libprefix = "lib" + elif self._toolset == "clang-win": + libprefix = "lib" return libprefix + n all_detected_libraries = set(l[:-4] if l.endswith(".dll") else l for l in collect_libs(self)) @@ -1751,7 +1927,9 @@ def filter_transform_module_libraries(names): continue if name in ("boost_math_c99l", "boost_math_tr1l") and str(self.settings.arch).startswith("ppc"): continue - if name in ("boost_stacktrace_addr2line", "boost_stacktrace_backtrace", "boost_stacktrace_basic",) and self.settings.os == "Windows": + if name in ("boost_stacktrace_addr2line", "boost_stacktrace_backtrace", "boost_stacktrace_basic") and self.settings.os == "Windows": + continue + if name == "boost_stacktrace_from_exception" and not self._stacktrace_from_exception_available: continue if name == "boost_stacktrace_addr2line" and not self._stacktrace_addr2line_available: continue @@ -1835,6 +2013,8 @@ def filter_transform_module_libraries(names): self.cpp_info.components["stacktrace_addr2line"].system_libs.append("dl") if self._with_stacktrace_backtrace: self.cpp_info.components["stacktrace_backtrace"].system_libs.append("dl") + if self._stacktrace_from_exception_available: + self.cpp_info.components["stacktrace_from_exception"].system_libs.append("dl") if self._stacktrace_addr2line_available: self.cpp_info.components["stacktrace_addr2line"].defines.extend([ @@ -1864,6 +2044,13 @@ def filter_transform_module_libraries(names): self.cpp_info.components[f"numpy{pyversion.major}{pyversion.minor}"].requires = ["numpy"] + if not self.options.get_safe("without_process"): + if self.settings.os == "Windows": + self.cpp_info.components["process"].system_libs.extend(["ntdll", "shell32", "Advapi32", "user32"]) + if self._shared: + self.cpp_info.components["process"].defines.append("BOOST_PROCESS_DYN_LINK") + + if is_msvc(self) or self._is_clang_cl: # https://github.com/conan-community/conan-boost/issues/127#issuecomment-404750974 self.cpp_info.components["_libboost"].system_libs.append("bcrypt") @@ -1893,6 +2080,11 @@ def filter_transform_module_libraries(names): self.cpp_info.components["headers"].defines.append("BOOST_SP_USE_SPINLOCK") else: self.cpp_info.components["headers"].defines.extend(["BOOST_AC_DISABLE_THREADS", "BOOST_SP_DISABLE_THREADS"]) + + if not self.options.get_safe('without_cobalt', True) and \ + (self.settings.compiler == "gcc" and Version(self.settings.compiler.version) == "10"): + self.cpp_info.components["cobalt"].cxxflags.append("-fcoroutines") + #TODO: remove in the future, user_info deprecated in conan2, but kept for compatibility while recipe is cross-compatible. self.user_info.stacktrace_addr2line_available = self._stacktrace_addr2line_available self.conf_info.define("user.boost:stacktrace_addr2line_available", self._stacktrace_addr2line_available) diff --git a/recipes/boost/all/dependencies/dependencies-1.71.0.yml b/recipes/boost/all/dependencies/dependencies-1.71.0.yml deleted file mode 100644 index 9c2d0a8c22410..0000000000000 --- a/recipes/boost/all/dependencies/dependencies-1.71.0.yml +++ /dev/null @@ -1,269 +0,0 @@ -configure_options: -- atomic -- chrono -- container -- context -- contract -- coroutine -- date_time -- exception -- fiber -- filesystem -- graph -- graph_parallel -- iostreams -- locale -- log -- math -- mpi -- program_options -- python -- random -- regex -- serialization -- stacktrace -- system -- test -- thread -- timer -- type_erasure -- wave -dependencies: - atomic: [] - chrono: - - system - container: [] - context: - - thread - contract: - - exception - - thread - coroutine: - - context - - exception - - system - - thread - date_time: - - serialization - exception: [] - fiber: - - context - - filesystem - fiber_numa: - - fiber - filesystem: - - system - graph: - - math - - random - - regex - - serialization - graph_parallel: - - filesystem - - graph - - mpi - - random - - serialization - iostreams: - - random - - regex - locale: - - thread - log: - - atomic - - container - - date_time - - exception - - filesystem - - locale - - random - - regex - - system - - thread - log_setup: - - log - math: - - atomic - math_c99: - - math - math_c99f: - - math - math_c99l: - - math - math_tr1: - - math - math_tr1f: - - math - math_tr1l: - - math - mpi: - - graph - - serialization - mpi_python: - - mpi - - python - numpy: - - python - prg_exec_monitor: - - test - program_options: [] - python: [] - random: - - math - - system - regex: [] - serialization: [] - stacktrace: [] - stacktrace_addr2line: - - stacktrace - stacktrace_backtrace: - - stacktrace - stacktrace_basic: - - stacktrace - stacktrace_noop: - - stacktrace - stacktrace_windbg: - - stacktrace - stacktrace_windbg_cached: - - stacktrace - system: [] - test: - - exception - test_exec_monitor: - - test - thread: - - atomic - - chrono - - container - - date_time - - exception - - system - timer: - - chrono - - system - type_erasure: - - thread - unit_test_framework: - - prg_exec_monitor - - test - - test_exec_monitor - wave: - - filesystem - - serialization - wserialization: - - serialization -libs: - atomic: - - boost_atomic - chrono: - - boost_chrono - container: - - boost_container - context: - - boost_context - contract: - - boost_contract - coroutine: - - boost_coroutine - date_time: - - boost_date_time - exception: - - boost_exception - fiber: - - boost_fiber - fiber_numa: - - boost_fiber_numa - filesystem: - - boost_filesystem - graph: - - boost_graph - graph_parallel: - - boost_graph_parallel - iostreams: - - boost_iostreams - locale: - - boost_locale - log: - - boost_log - log_setup: - - boost_log_setup - math: [] - math_c99: - - boost_math_c99 - math_c99f: - - boost_math_c99f - math_c99l: - - boost_math_c99l - math_tr1: - - boost_math_tr1 - math_tr1f: - - boost_math_tr1f - math_tr1l: - - boost_math_tr1l - mpi: - - boost_mpi - mpi_python: - - boost_mpi_python - numpy: - - boost_numpy{py_major}{py_minor} - prg_exec_monitor: - - boost_prg_exec_monitor - program_options: - - boost_program_options - python: - - boost_python{py_major}{py_minor} - random: - - boost_random - regex: - - boost_regex - serialization: - - boost_serialization - stacktrace: [] - stacktrace_addr2line: - - boost_stacktrace_addr2line - stacktrace_backtrace: - - boost_stacktrace_backtrace - stacktrace_basic: - - boost_stacktrace_basic - stacktrace_noop: - - boost_stacktrace_noop - stacktrace_windbg: - - boost_stacktrace_windbg - stacktrace_windbg_cached: - - boost_stacktrace_windbg_cached - system: - - boost_system - test: [] - test_exec_monitor: - - boost_test_exec_monitor - thread: - - boost_thread - timer: - - boost_timer - type_erasure: - - boost_type_erasure - unit_test_framework: - - boost_unit_test_framework - wave: - - boost_wave - wserialization: - - boost_wserialization -requirements: - iostreams: - - bzip2 - - lzma - - zlib - - zstd - locale: - - iconv - - icu - python: - - python - regex: - - icu - stacktrace: - - backtrace -static_only: -- boost_exception -- boost_test_exec_monitor -version: 1.71.0 diff --git a/recipes/boost/all/dependencies/dependencies-1.72.0.yml b/recipes/boost/all/dependencies/dependencies-1.72.0.yml deleted file mode 100644 index f0213a24374bb..0000000000000 --- a/recipes/boost/all/dependencies/dependencies-1.72.0.yml +++ /dev/null @@ -1,270 +0,0 @@ -configure_options: -- atomic -- chrono -- container -- context -- contract -- coroutine -- date_time -- exception -- fiber -- filesystem -- graph -- graph_parallel -- iostreams -- locale -- log -- math -- mpi -- program_options -- python -- random -- regex -- serialization -- stacktrace -- system -- test -- thread -- timer -- type_erasure -- wave -dependencies: - atomic: [] - chrono: - - system - container: [] - context: - - thread - contract: - - exception - - thread - coroutine: - - context - - exception - - system - - thread - date_time: - - serialization - exception: [] - fiber: - - context - - filesystem - fiber_numa: - - fiber - filesystem: - - system - graph: - - math - - random - - regex - - serialization - graph_parallel: - - filesystem - - graph - - mpi - - random - - serialization - iostreams: - - random - - regex - locale: - - thread - log: - - atomic - - container - - date_time - - exception - - filesystem - - locale - - random - - regex - - system - - thread - log_setup: - - log - math: - - atomic - - chrono - math_c99: - - math - math_c99f: - - math - math_c99l: - - math - math_tr1: - - math - math_tr1f: - - math - math_tr1l: - - math - mpi: - - graph - - serialization - mpi_python: - - mpi - - python - numpy: - - python - prg_exec_monitor: - - test - program_options: [] - python: [] - random: - - math - - system - regex: [] - serialization: [] - stacktrace: [] - stacktrace_addr2line: - - stacktrace - stacktrace_backtrace: - - stacktrace - stacktrace_basic: - - stacktrace - stacktrace_noop: - - stacktrace - stacktrace_windbg: - - stacktrace - stacktrace_windbg_cached: - - stacktrace - system: [] - test: - - exception - test_exec_monitor: - - test - thread: - - atomic - - chrono - - container - - date_time - - exception - - system - timer: - - chrono - - system - type_erasure: - - thread - unit_test_framework: - - prg_exec_monitor - - test - - test_exec_monitor - wave: - - filesystem - - serialization - wserialization: - - serialization -libs: - atomic: - - boost_atomic - chrono: - - boost_chrono - container: - - boost_container - context: - - boost_context - contract: - - boost_contract - coroutine: - - boost_coroutine - date_time: - - boost_date_time - exception: - - boost_exception - fiber: - - boost_fiber - fiber_numa: - - boost_fiber_numa - filesystem: - - boost_filesystem - graph: - - boost_graph - graph_parallel: - - boost_graph_parallel - iostreams: - - boost_iostreams - locale: - - boost_locale - log: - - boost_log - log_setup: - - boost_log_setup - math: [] - math_c99: - - boost_math_c99 - math_c99f: - - boost_math_c99f - math_c99l: - - boost_math_c99l - math_tr1: - - boost_math_tr1 - math_tr1f: - - boost_math_tr1f - math_tr1l: - - boost_math_tr1l - mpi: - - boost_mpi - mpi_python: - - boost_mpi_python - numpy: - - boost_numpy{py_major}{py_minor} - prg_exec_monitor: - - boost_prg_exec_monitor - program_options: - - boost_program_options - python: - - boost_python{py_major}{py_minor} - random: - - boost_random - regex: - - boost_regex - serialization: - - boost_serialization - stacktrace: [] - stacktrace_addr2line: - - boost_stacktrace_addr2line - stacktrace_backtrace: - - boost_stacktrace_backtrace - stacktrace_basic: - - boost_stacktrace_basic - stacktrace_noop: - - boost_stacktrace_noop - stacktrace_windbg: - - boost_stacktrace_windbg - stacktrace_windbg_cached: - - boost_stacktrace_windbg_cached - system: - - boost_system - test: [] - test_exec_monitor: - - boost_test_exec_monitor - thread: - - boost_thread - timer: - - boost_timer - type_erasure: - - boost_type_erasure - unit_test_framework: - - boost_unit_test_framework - wave: - - boost_wave - wserialization: - - boost_wserialization -requirements: - iostreams: - - bzip2 - - lzma - - zlib - - zstd - locale: - - iconv - - icu - python: - - python - regex: - - icu - stacktrace: - - backtrace -static_only: -- boost_exception -- boost_test_exec_monitor -version: 1.72.0 diff --git a/recipes/boost/all/dependencies/dependencies-1.73.0.yml b/recipes/boost/all/dependencies/dependencies-1.73.0.yml deleted file mode 100644 index d26d67c9c338d..0000000000000 --- a/recipes/boost/all/dependencies/dependencies-1.73.0.yml +++ /dev/null @@ -1,274 +0,0 @@ -configure_options: -- atomic -- chrono -- container -- context -- contract -- coroutine -- date_time -- exception -- fiber -- filesystem -- graph -- graph_parallel -- iostreams -- locale -- log -- math -- mpi -- nowide -- program_options -- python -- random -- regex -- serialization -- stacktrace -- system -- test -- thread -- timer -- type_erasure -- wave -dependencies: - atomic: [] - chrono: - - system - container: [] - context: - - thread - contract: - - exception - - thread - coroutine: - - context - - exception - - system - - thread - date_time: - - serialization - exception: [] - fiber: - - context - - filesystem - fiber_numa: - - fiber - filesystem: - - system - graph: - - math - - random - - regex - - serialization - graph_parallel: - - filesystem - - graph - - mpi - - random - - serialization - iostreams: - - random - - regex - locale: - - thread - log: - - atomic - - container - - date_time - - exception - - filesystem - - locale - - random - - regex - - system - - thread - log_setup: - - log - math: - - atomic - math_c99: - - math - math_c99f: - - math - math_c99l: - - math - math_tr1: - - math - math_tr1f: - - math - math_tr1l: - - math - mpi: - - graph - - serialization - mpi_python: - - mpi - - python - nowide: - - filesystem - numpy: - - python - prg_exec_monitor: - - test - program_options: [] - python: [] - random: - - math - - system - regex: [] - serialization: [] - stacktrace: [] - stacktrace_addr2line: - - stacktrace - stacktrace_backtrace: - - stacktrace - stacktrace_basic: - - stacktrace - stacktrace_noop: - - stacktrace - stacktrace_windbg: - - stacktrace - stacktrace_windbg_cached: - - stacktrace - system: [] - test: - - exception - test_exec_monitor: - - test - thread: - - atomic - - chrono - - container - - date_time - - exception - - system - timer: - - chrono - - system - type_erasure: - - thread - unit_test_framework: - - prg_exec_monitor - - test - - test_exec_monitor - wave: - - filesystem - - serialization - wserialization: - - serialization -libs: - atomic: - - boost_atomic - chrono: - - boost_chrono - container: - - boost_container - context: - - boost_context - contract: - - boost_contract - coroutine: - - boost_coroutine - date_time: - - boost_date_time - exception: - - boost_exception - fiber: - - boost_fiber - fiber_numa: - - boost_fiber_numa - filesystem: - - boost_filesystem - graph: - - boost_graph - graph_parallel: - - boost_graph_parallel - iostreams: - - boost_iostreams - locale: - - boost_locale - log: - - boost_log - log_setup: - - boost_log_setup - math: [] - math_c99: - - boost_math_c99 - math_c99f: - - boost_math_c99f - math_c99l: - - boost_math_c99l - math_tr1: - - boost_math_tr1 - math_tr1f: - - boost_math_tr1f - math_tr1l: - - boost_math_tr1l - mpi: - - boost_mpi - mpi_python: - - boost_mpi_python - nowide: - - boost_nowide - numpy: - - boost_numpy{py_major}{py_minor} - prg_exec_monitor: - - boost_prg_exec_monitor - program_options: - - boost_program_options - python: - - boost_python{py_major}{py_minor} - random: - - boost_random - regex: - - boost_regex - serialization: - - boost_serialization - stacktrace: [] - stacktrace_addr2line: - - boost_stacktrace_addr2line - stacktrace_backtrace: - - boost_stacktrace_backtrace - stacktrace_basic: - - boost_stacktrace_basic - stacktrace_noop: - - boost_stacktrace_noop - stacktrace_windbg: - - boost_stacktrace_windbg - stacktrace_windbg_cached: - - boost_stacktrace_windbg_cached - system: - - boost_system - test: [] - test_exec_monitor: - - boost_test_exec_monitor - thread: - - boost_thread - timer: - - boost_timer - type_erasure: - - boost_type_erasure - unit_test_framework: - - boost_unit_test_framework - wave: - - boost_wave - wserialization: - - boost_wserialization -requirements: - iostreams: - - bzip2 - - lzma - - zlib - - zstd - locale: - - iconv - - icu - python: - - python - regex: - - icu - stacktrace: - - backtrace -static_only: -- boost_exception -- boost_test_exec_monitor -version: 1.73.0 diff --git a/recipes/boost/all/dependencies/dependencies-1.74.0.yml b/recipes/boost/all/dependencies/dependencies-1.74.0.yml deleted file mode 100644 index 679e8d616f324..0000000000000 --- a/recipes/boost/all/dependencies/dependencies-1.74.0.yml +++ /dev/null @@ -1,273 +0,0 @@ -configure_options: -- atomic -- chrono -- container -- context -- contract -- coroutine -- date_time -- exception -- fiber -- filesystem -- graph -- graph_parallel -- iostreams -- locale -- log -- math -- mpi -- nowide -- program_options -- python -- random -- regex -- serialization -- stacktrace -- system -- test -- thread -- timer -- type_erasure -- wave -dependencies: - atomic: [] - chrono: - - system - container: [] - context: - - thread - contract: - - exception - - thread - coroutine: - - context - - exception - - system - - thread - date_time: [] - exception: [] - fiber: - - context - - filesystem - fiber_numa: - - fiber - filesystem: - - system - graph: - - math - - random - - regex - - serialization - graph_parallel: - - filesystem - - graph - - mpi - - random - - serialization - iostreams: - - random - - regex - locale: - - thread - log: - - atomic - - container - - date_time - - exception - - filesystem - - locale - - random - - regex - - system - - thread - log_setup: - - log - math: - - atomic - math_c99: - - math - math_c99f: - - math - math_c99l: - - math - math_tr1: - - math - math_tr1f: - - math - math_tr1l: - - math - mpi: - - graph - - serialization - mpi_python: - - mpi - - python - nowide: - - filesystem - numpy: - - python - prg_exec_monitor: - - test - program_options: [] - python: [] - random: - - math - - system - regex: [] - serialization: [] - stacktrace: [] - stacktrace_addr2line: - - stacktrace - stacktrace_backtrace: - - stacktrace - stacktrace_basic: - - stacktrace - stacktrace_noop: - - stacktrace - stacktrace_windbg: - - stacktrace - stacktrace_windbg_cached: - - stacktrace - system: [] - test: - - exception - test_exec_monitor: - - test - thread: - - atomic - - chrono - - container - - date_time - - exception - - system - timer: - - chrono - - system - type_erasure: - - thread - unit_test_framework: - - prg_exec_monitor - - test - - test_exec_monitor - wave: - - filesystem - - serialization - wserialization: - - serialization -libs: - atomic: - - boost_atomic - chrono: - - boost_chrono - container: - - boost_container - context: - - boost_context - contract: - - boost_contract - coroutine: - - boost_coroutine - date_time: - - boost_date_time - exception: - - boost_exception - fiber: - - boost_fiber - fiber_numa: - - boost_fiber_numa - filesystem: - - boost_filesystem - graph: - - boost_graph - graph_parallel: - - boost_graph_parallel - iostreams: - - boost_iostreams - locale: - - boost_locale - log: - - boost_log - log_setup: - - boost_log_setup - math: [] - math_c99: - - boost_math_c99 - math_c99f: - - boost_math_c99f - math_c99l: - - boost_math_c99l - math_tr1: - - boost_math_tr1 - math_tr1f: - - boost_math_tr1f - math_tr1l: - - boost_math_tr1l - mpi: - - boost_mpi - mpi_python: - - boost_mpi_python - nowide: - - boost_nowide - numpy: - - boost_numpy{py_major}{py_minor} - prg_exec_monitor: - - boost_prg_exec_monitor - program_options: - - boost_program_options - python: - - boost_python{py_major}{py_minor} - random: - - boost_random - regex: - - boost_regex - serialization: - - boost_serialization - stacktrace: [] - stacktrace_addr2line: - - boost_stacktrace_addr2line - stacktrace_backtrace: - - boost_stacktrace_backtrace - stacktrace_basic: - - boost_stacktrace_basic - stacktrace_noop: - - boost_stacktrace_noop - stacktrace_windbg: - - boost_stacktrace_windbg - stacktrace_windbg_cached: - - boost_stacktrace_windbg_cached - system: - - boost_system - test: [] - test_exec_monitor: - - boost_test_exec_monitor - thread: - - boost_thread - timer: - - boost_timer - type_erasure: - - boost_type_erasure - unit_test_framework: - - boost_unit_test_framework - wave: - - boost_wave - wserialization: - - boost_wserialization -requirements: - iostreams: - - bzip2 - - lzma - - zlib - - zstd - locale: - - iconv - - icu - python: - - python - regex: - - icu - stacktrace: - - backtrace -static_only: -- boost_exception -- boost_test_exec_monitor -version: 1.74.0 diff --git a/recipes/boost/all/dependencies/dependencies-1.75.0.yml b/recipes/boost/all/dependencies/dependencies-1.75.0.yml deleted file mode 100644 index 4d24ca98d6337..0000000000000 --- a/recipes/boost/all/dependencies/dependencies-1.75.0.yml +++ /dev/null @@ -1,280 +0,0 @@ -configure_options: -- atomic -- chrono -- container -- context -- contract -- coroutine -- date_time -- exception -- fiber -- filesystem -- graph -- graph_parallel -- iostreams -- json -- locale -- log -- math -- mpi -- nowide -- program_options -- python -- random -- regex -- serialization -- stacktrace -- system -- test -- thread -- timer -- type_erasure -- wave -dependencies: - atomic: [] - chrono: - - system - container: [] - context: - - thread - contract: - - exception - - thread - coroutine: - - context - - exception - - system - - thread - date_time: [] - exception: [] - fiber: - - context - - filesystem - fiber_numa: - - fiber - filesystem: - - system - graph: - - math - - random - - regex - - serialization - graph_parallel: - - filesystem - - graph - - mpi - - random - - serialization - iostreams: - - random - - regex - json: - - container - - exception - - system - locale: - - thread - log: - - atomic - - container - - date_time - - exception - - filesystem - - locale - - random - - regex - - system - - thread - log_setup: - - log - math: - - atomic - math_c99: - - math - math_c99f: - - math - math_c99l: - - math - math_tr1: - - math - math_tr1f: - - math - math_tr1l: - - math - mpi: - - graph - - serialization - mpi_python: - - mpi - - python - nowide: - - filesystem - numpy: - - python - prg_exec_monitor: - - test - program_options: [] - python: [] - random: - - math - - system - regex: [] - serialization: [] - stacktrace: [] - stacktrace_addr2line: - - stacktrace - stacktrace_backtrace: - - stacktrace - stacktrace_basic: - - stacktrace - stacktrace_noop: - - stacktrace - stacktrace_windbg: - - stacktrace - stacktrace_windbg_cached: - - stacktrace - system: [] - test: - - exception - test_exec_monitor: - - test - thread: - - atomic - - chrono - - container - - date_time - - exception - - system - timer: - - chrono - - system - type_erasure: - - thread - unit_test_framework: - - prg_exec_monitor - - test - - test_exec_monitor - wave: - - filesystem - - serialization - wserialization: - - serialization -libs: - atomic: - - boost_atomic - chrono: - - boost_chrono - container: - - boost_container - context: - - boost_context - contract: - - boost_contract - coroutine: - - boost_coroutine - date_time: - - boost_date_time - exception: - - boost_exception - fiber: - - boost_fiber - fiber_numa: - - boost_fiber_numa - filesystem: - - boost_filesystem - graph: - - boost_graph - graph_parallel: - - boost_graph_parallel - iostreams: - - boost_iostreams - json: - - boost_json - locale: - - boost_locale - log: - - boost_log - log_setup: - - boost_log_setup - math: [] - math_c99: - - boost_math_c99 - math_c99f: - - boost_math_c99f - math_c99l: - - boost_math_c99l - math_tr1: - - boost_math_tr1 - math_tr1f: - - boost_math_tr1f - math_tr1l: - - boost_math_tr1l - mpi: - - boost_mpi - mpi_python: - - boost_mpi_python - nowide: - - boost_nowide - numpy: - - boost_numpy{py_major}{py_minor} - prg_exec_monitor: - - boost_prg_exec_monitor - program_options: - - boost_program_options - python: - - boost_python{py_major}{py_minor} - random: - - boost_random - regex: - - boost_regex - serialization: - - boost_serialization - stacktrace: [] - stacktrace_addr2line: - - boost_stacktrace_addr2line - stacktrace_backtrace: - - boost_stacktrace_backtrace - stacktrace_basic: - - boost_stacktrace_basic - stacktrace_noop: - - boost_stacktrace_noop - stacktrace_windbg: - - boost_stacktrace_windbg - stacktrace_windbg_cached: - - boost_stacktrace_windbg_cached - system: - - boost_system - test: [] - test_exec_monitor: - - boost_test_exec_monitor - thread: - - boost_thread - timer: - - boost_timer - type_erasure: - - boost_type_erasure - unit_test_framework: - - boost_unit_test_framework - wave: - - boost_wave - wserialization: - - boost_wserialization -requirements: - iostreams: - - bzip2 - - lzma - - zlib - - zstd - locale: - - iconv - - icu - python: - - python - regex: - - icu - stacktrace: - - backtrace -static_only: -- boost_exception -- boost_test_exec_monitor -version: 1.75.0 diff --git a/recipes/boost/all/dependencies/dependencies-1.76.0.yml b/recipes/boost/all/dependencies/dependencies-1.76.0.yml deleted file mode 100644 index b404c36315ae1..0000000000000 --- a/recipes/boost/all/dependencies/dependencies-1.76.0.yml +++ /dev/null @@ -1,279 +0,0 @@ -configure_options: -- atomic -- chrono -- container -- context -- contract -- coroutine -- date_time -- exception -- fiber -- filesystem -- graph -- graph_parallel -- iostreams -- json -- locale -- log -- math -- mpi -- nowide -- program_options -- python -- random -- regex -- serialization -- stacktrace -- system -- test -- thread -- timer -- type_erasure -- wave -dependencies: - atomic: [] - chrono: - - system - container: [] - context: - - thread - contract: - - exception - - thread - coroutine: - - context - - exception - - system - - thread - date_time: [] - exception: [] - fiber: - - context - - filesystem - fiber_numa: - - fiber - filesystem: - - system - graph: - - math - - random - - regex - - serialization - graph_parallel: - - filesystem - - graph - - mpi - - random - - serialization - iostreams: - - random - - regex - json: - - container - - exception - - system - locale: - - thread - log: - - atomic - - container - - date_time - - exception - - filesystem - - locale - - random - - regex - - system - - thread - log_setup: - - log - math: - - atomic - math_c99: - - math - math_c99f: - - math - math_c99l: - - math - math_tr1: - - math - math_tr1f: - - math - math_tr1l: - - math - mpi: - - graph - - serialization - mpi_python: - - mpi - - python - nowide: - - filesystem - numpy: - - python - prg_exec_monitor: - - test - program_options: [] - python: [] - random: - - system - regex: [] - serialization: [] - stacktrace: [] - stacktrace_addr2line: - - stacktrace - stacktrace_backtrace: - - stacktrace - stacktrace_basic: - - stacktrace - stacktrace_noop: - - stacktrace - stacktrace_windbg: - - stacktrace - stacktrace_windbg_cached: - - stacktrace - system: [] - test: - - exception - test_exec_monitor: - - test - thread: - - atomic - - chrono - - container - - date_time - - exception - - system - timer: - - chrono - - system - type_erasure: - - thread - unit_test_framework: - - prg_exec_monitor - - test - - test_exec_monitor - wave: - - filesystem - - serialization - wserialization: - - serialization -libs: - atomic: - - boost_atomic - chrono: - - boost_chrono - container: - - boost_container - context: - - boost_context - contract: - - boost_contract - coroutine: - - boost_coroutine - date_time: - - boost_date_time - exception: - - boost_exception - fiber: - - boost_fiber - fiber_numa: - - boost_fiber_numa - filesystem: - - boost_filesystem - graph: - - boost_graph - graph_parallel: - - boost_graph_parallel - iostreams: - - boost_iostreams - json: - - boost_json - locale: - - boost_locale - log: - - boost_log - log_setup: - - boost_log_setup - math: [] - math_c99: - - boost_math_c99 - math_c99f: - - boost_math_c99f - math_c99l: - - boost_math_c99l - math_tr1: - - boost_math_tr1 - math_tr1f: - - boost_math_tr1f - math_tr1l: - - boost_math_tr1l - mpi: - - boost_mpi - mpi_python: - - boost_mpi_python - nowide: - - boost_nowide - numpy: - - boost_numpy{py_major}{py_minor} - prg_exec_monitor: - - boost_prg_exec_monitor - program_options: - - boost_program_options - python: - - boost_python{py_major}{py_minor} - random: - - boost_random - regex: - - boost_regex - serialization: - - boost_serialization - stacktrace: [] - stacktrace_addr2line: - - boost_stacktrace_addr2line - stacktrace_backtrace: - - boost_stacktrace_backtrace - stacktrace_basic: - - boost_stacktrace_basic - stacktrace_noop: - - boost_stacktrace_noop - stacktrace_windbg: - - boost_stacktrace_windbg - stacktrace_windbg_cached: - - boost_stacktrace_windbg_cached - system: - - boost_system - test: [] - test_exec_monitor: - - boost_test_exec_monitor - thread: - - boost_thread - timer: - - boost_timer - type_erasure: - - boost_type_erasure - unit_test_framework: - - boost_unit_test_framework - wave: - - boost_wave - wserialization: - - boost_wserialization -requirements: - iostreams: - - bzip2 - - lzma - - zlib - - zstd - locale: - - iconv - - icu - python: - - python - regex: - - icu - stacktrace: - - backtrace -static_only: -- boost_exception -- boost_test_exec_monitor -version: 1.76.0 diff --git a/recipes/boost/all/dependencies/dependencies-1.77.0.yml b/recipes/boost/all/dependencies/dependencies-1.77.0.yml deleted file mode 100644 index 921d8f4f45b12..0000000000000 --- a/recipes/boost/all/dependencies/dependencies-1.77.0.yml +++ /dev/null @@ -1,277 +0,0 @@ -configure_options: -- atomic -- chrono -- container -- context -- contract -- coroutine -- date_time -- exception -- fiber -- filesystem -- graph -- graph_parallel -- iostreams -- json -- locale -- log -- math -- mpi -- nowide -- program_options -- python -- random -- regex -- serialization -- stacktrace -- system -- test -- thread -- timer -- type_erasure -- wave -dependencies: - atomic: [] - chrono: - - system - container: [] - context: [] - contract: - - exception - - thread - coroutine: - - context - - exception - - system - - thread - date_time: [] - exception: [] - fiber: - - context - - filesystem - fiber_numa: - - fiber - filesystem: - - atomic - - system - graph: - - math - - random - - regex - - serialization - graph_parallel: - - filesystem - - graph - - mpi - - random - - serialization - iostreams: - - random - - regex - json: - - container - - exception - - system - locale: - - thread - log: - - atomic - - container - - date_time - - exception - - filesystem - - random - - regex - - system - - thread - log_setup: - - log - math: [] - math_c99: - - math - math_c99f: - - math - math_c99l: - - math - math_tr1: - - math - math_tr1f: - - math - math_tr1l: - - math - mpi: - - graph - - serialization - mpi_python: - - mpi - - python - nowide: - - filesystem - numpy: - - python - prg_exec_monitor: - - test - program_options: [] - python: [] - random: - - system - regex: [] - serialization: [] - stacktrace: [] - stacktrace_addr2line: - - stacktrace - stacktrace_backtrace: - - stacktrace - stacktrace_basic: - - stacktrace - stacktrace_noop: - - stacktrace - stacktrace_windbg: - - stacktrace - stacktrace_windbg_cached: - - stacktrace - system: [] - test: - - exception - test_exec_monitor: - - test - thread: - - atomic - - chrono - - container - - date_time - - exception - - system - timer: - - chrono - - system - type_erasure: - - thread - unit_test_framework: - - prg_exec_monitor - - test - - test_exec_monitor - wave: - - filesystem - - serialization - wserialization: - - serialization -libs: - atomic: - - boost_atomic - chrono: - - boost_chrono - container: - - boost_container - context: - - boost_context - contract: - - boost_contract - coroutine: - - boost_coroutine - date_time: - - boost_date_time - exception: - - boost_exception - fiber: - - boost_fiber - fiber_numa: - - boost_fiber_numa - filesystem: - - boost_filesystem - graph: - - boost_graph - graph_parallel: - - boost_graph_parallel - iostreams: - - boost_iostreams - json: - - boost_json - locale: - - boost_locale - log: - - boost_log - log_setup: - - boost_log_setup - math: [] - math_c99: - - boost_math_c99 - math_c99f: - - boost_math_c99f - math_c99l: - - boost_math_c99l - math_tr1: - - boost_math_tr1 - math_tr1f: - - boost_math_tr1f - math_tr1l: - - boost_math_tr1l - mpi: - - boost_mpi - mpi_python: - - boost_mpi_python - nowide: - - boost_nowide - numpy: - - boost_numpy{py_major}{py_minor} - prg_exec_monitor: - - boost_prg_exec_monitor - program_options: - - boost_program_options - python: - - boost_python{py_major}{py_minor} - random: - - boost_random - regex: - - boost_regex - serialization: - - boost_serialization - stacktrace: [] - stacktrace_addr2line: - - boost_stacktrace_addr2line - stacktrace_backtrace: - - boost_stacktrace_backtrace - stacktrace_basic: - - boost_stacktrace_basic - stacktrace_noop: - - boost_stacktrace_noop - stacktrace_windbg: - - boost_stacktrace_windbg - stacktrace_windbg_cached: - - boost_stacktrace_windbg_cached - system: - - boost_system - test: [] - test_exec_monitor: - - boost_test_exec_monitor - thread: - - boost_thread - timer: - - boost_timer - type_erasure: - - boost_type_erasure - unit_test_framework: - - boost_unit_test_framework - wave: - - boost_wave - wserialization: - - boost_wserialization -requirements: - iostreams: - - bzip2 - - lzma - - zlib - - zstd - locale: - - iconv - - icu - python: - - python - regex: - - icu - stacktrace: - - backtrace -static_only: -- boost_exception -- boost_test_exec_monitor -version: 1.77.0 diff --git a/recipes/boost/all/dependencies/dependencies-1.85.0.yml b/recipes/boost/all/dependencies/dependencies-1.85.0.yml new file mode 100644 index 0000000000000..2306346f43372 --- /dev/null +++ b/recipes/boost/all/dependencies/dependencies-1.85.0.yml @@ -0,0 +1,291 @@ +configure_options: +- atomic +- charconv +- chrono +- cobalt +- container +- context +- contract +- coroutine +- date_time +- exception +- fiber +- filesystem +- graph +- graph_parallel +- iostreams +- json +- locale +- log +- math +- mpi +- nowide +- program_options +- python +- random +- regex +- serialization +- stacktrace +- system +- test +- thread +- timer +- type_erasure +- url +- wave +dependencies: + atomic: [] + charconv: [] + chrono: + - system + cobalt: + - container + - system + container: [] + context: [] + contract: + - exception + - thread + coroutine: + - context + - exception + - system + date_time: [] + exception: [] + fiber: + - context + - filesystem + fiber_numa: + - fiber + filesystem: + - atomic + - system + graph: + - math + - random + - regex + - serialization + graph_parallel: + - filesystem + - graph + - mpi + - random + - serialization + iostreams: + - random + - regex + json: + - container + - system + locale: + - thread + log: + - atomic + - date_time + - exception + - filesystem + - random + - regex + - system + - thread + log_setup: + - log + math: [] + math_c99: + - math + math_c99f: + - math + math_c99l: + - math + math_tr1: + - math + math_tr1f: + - math + math_tr1l: + - math + mpi: + - graph + - serialization + mpi_python: + - mpi + - python + nowide: + - filesystem + numpy: + - python + prg_exec_monitor: + - test + program_options: [] + python: [] + random: + - system + regex: [] + serialization: [] + stacktrace: [] + stacktrace_addr2line: + - stacktrace + stacktrace_backtrace: + - stacktrace + stacktrace_basic: + - stacktrace + stacktrace_from_exception: + - stacktrace + stacktrace_noop: + - stacktrace + stacktrace_windbg: + - stacktrace + stacktrace_windbg_cached: + - stacktrace + system: [] + test: + - exception + test_exec_monitor: + - test + thread: + - atomic + - chrono + - container + - date_time + - exception + - system + timer: [] + type_erasure: + - thread + unit_test_framework: + - prg_exec_monitor + - test + - test_exec_monitor + url: + - system + wave: + - filesystem + - serialization + wserialization: + - serialization +libs: + atomic: + - boost_atomic + charconv: + - boost_charconv + chrono: + - boost_chrono + cobalt: + - boost_cobalt + container: + - boost_container + context: + - boost_context + contract: + - boost_contract + coroutine: + - boost_coroutine + date_time: + - boost_date_time + exception: + - boost_exception + fiber: + - boost_fiber + fiber_numa: + - boost_fiber_numa + filesystem: + - boost_filesystem + graph: + - boost_graph + graph_parallel: + - boost_graph_parallel + iostreams: + - boost_iostreams + json: + - boost_json + locale: + - boost_locale + log: + - boost_log + log_setup: + - boost_log_setup + math: [] + math_c99: + - boost_math_c99 + math_c99f: + - boost_math_c99f + math_c99l: + - boost_math_c99l + math_tr1: + - boost_math_tr1 + math_tr1f: + - boost_math_tr1f + math_tr1l: + - boost_math_tr1l + mpi: + - boost_mpi + mpi_python: + - boost_mpi_python + nowide: + - boost_nowide + numpy: + - boost_numpy{py_major}{py_minor} + prg_exec_monitor: + - boost_prg_exec_monitor + program_options: + - boost_program_options + python: + - boost_python{py_major}{py_minor} + random: + - boost_random + regex: + - boost_regex + serialization: + - boost_serialization + stacktrace: [] + stacktrace_addr2line: + - boost_stacktrace_addr2line + stacktrace_backtrace: + - boost_stacktrace_backtrace + stacktrace_basic: + - boost_stacktrace_basic + stacktrace_from_exception: + - boost_stacktrace_from_exception + stacktrace_noop: + - boost_stacktrace_noop + stacktrace_windbg: + - boost_stacktrace_windbg + stacktrace_windbg_cached: + - boost_stacktrace_windbg_cached + system: + - boost_system + test: [] + test_exec_monitor: + - boost_test_exec_monitor + thread: + - boost_thread + timer: + - boost_timer + type_erasure: + - boost_type_erasure + unit_test_framework: + - boost_unit_test_framework + url: + - boost_url + wave: + - boost_wave + wserialization: + - boost_wserialization +requirements: + iostreams: + - bzip2 + - lzma + - zlib + - zstd + locale: + - iconv + - icu + python: + - python + regex: + - icu + stacktrace: + - backtrace +static_only: +- boost_exception +- boost_test_exec_monitor +version: 1.85.0 diff --git a/recipes/boost/all/dependencies/dependencies-1.86.0.yml b/recipes/boost/all/dependencies/dependencies-1.86.0.yml new file mode 100644 index 0000000000000..ae5b6de30e121 --- /dev/null +++ b/recipes/boost/all/dependencies/dependencies-1.86.0.yml @@ -0,0 +1,298 @@ +configure_options: +- atomic +- charconv +- chrono +- cobalt +- container +- context +- contract +- coroutine +- date_time +- exception +- fiber +- filesystem +- graph +- graph_parallel +- iostreams +- json +- locale +- log +- math +- mpi +- nowide +- process +- program_options +- python +- random +- regex +- serialization +- stacktrace +- system +- test +- thread +- timer +- type_erasure +- url +- wave +dependencies: + atomic: [] + charconv: [] + chrono: + - system + cobalt: + - container + - context + - system + container: [] + context: [] + contract: + - exception + - thread + coroutine: + - context + - exception + - system + date_time: [] + exception: [] + fiber: + - context + - filesystem + fiber_numa: + - fiber + filesystem: + - atomic + - system + graph: + - math + - random + - regex + - serialization + graph_parallel: + - filesystem + - graph + - mpi + - random + - serialization + iostreams: + - random + - regex + json: + - container + - system + locale: + - thread + log: + - atomic + - date_time + - exception + - filesystem + - random + - regex + - system + - thread + log_setup: + - log + math: [] + math_c99: + - math + math_c99f: + - math + math_c99l: + - math + math_tr1: + - math + math_tr1f: + - math + math_tr1l: + - math + mpi: + - graph + - serialization + mpi_python: + - mpi + - python + nowide: + - filesystem + numpy: + - python + prg_exec_monitor: + - test + process: + - filesystem + - system + program_options: [] + python: [] + random: + - system + regex: [] + serialization: [] + stacktrace: [] + stacktrace_addr2line: + - stacktrace + stacktrace_backtrace: + - stacktrace + stacktrace_basic: + - stacktrace + stacktrace_from_exception: + - stacktrace + stacktrace_noop: + - stacktrace + stacktrace_windbg: + - stacktrace + stacktrace_windbg_cached: + - stacktrace + system: [] + test: + - exception + test_exec_monitor: + - test + thread: + - atomic + - chrono + - container + - date_time + - exception + - system + timer: [] + type_erasure: + - thread + unit_test_framework: + - prg_exec_monitor + - test + - test_exec_monitor + url: + - system + wave: + - filesystem + - serialization + wserialization: + - serialization +libs: + atomic: + - boost_atomic + charconv: + - boost_charconv + chrono: + - boost_chrono + cobalt: + - boost_cobalt + container: + - boost_container + context: + - boost_context + contract: + - boost_contract + coroutine: + - boost_coroutine + date_time: + - boost_date_time + exception: + - boost_exception + fiber: + - boost_fiber + fiber_numa: + - boost_fiber_numa + filesystem: + - boost_filesystem + graph: + - boost_graph + graph_parallel: + - boost_graph_parallel + iostreams: + - boost_iostreams + json: + - boost_json + locale: + - boost_locale + log: + - boost_log + log_setup: + - boost_log_setup + math: [] + math_c99: + - boost_math_c99 + math_c99f: + - boost_math_c99f + math_c99l: + - boost_math_c99l + math_tr1: + - boost_math_tr1 + math_tr1f: + - boost_math_tr1f + math_tr1l: + - boost_math_tr1l + mpi: + - boost_mpi + mpi_python: + - boost_mpi_python + nowide: + - boost_nowide + numpy: + - boost_numpy{py_major}{py_minor} + prg_exec_monitor: + - boost_prg_exec_monitor + process: + - boost_process + program_options: + - boost_program_options + python: + - boost_python{py_major}{py_minor} + random: + - boost_random + regex: + - boost_regex + serialization: + - boost_serialization + stacktrace: [] + stacktrace_addr2line: + - boost_stacktrace_addr2line + stacktrace_backtrace: + - boost_stacktrace_backtrace + stacktrace_basic: + - boost_stacktrace_basic + stacktrace_from_exception: + - boost_stacktrace_from_exception + stacktrace_noop: + - boost_stacktrace_noop + stacktrace_windbg: + - boost_stacktrace_windbg + stacktrace_windbg_cached: + - boost_stacktrace_windbg_cached + system: + - boost_system + test: [] + test_exec_monitor: + - boost_test_exec_monitor + thread: + - boost_thread + timer: + - boost_timer + type_erasure: + - boost_type_erasure + unit_test_framework: + - boost_unit_test_framework + url: + - boost_url + wave: + - boost_wave + wserialization: + - boost_wserialization +requirements: + iostreams: + - bzip2 + - lzma + - zlib + - zstd + locale: + - iconv + - icu + python: + - python + regex: + - icu + stacktrace: + - backtrace +static_only: +- boost_exception +- boost_test_exec_monitor +version: 1.86.0 diff --git a/recipes/boost/all/patches/0001-revert-cease-dependence-on-range.patch b/recipes/boost/all/patches/0001-revert-cease-dependence-on-range.patch deleted file mode 100644 index fd069197a95a0..0000000000000 --- a/recipes/boost/all/patches/0001-revert-cease-dependence-on-range.patch +++ /dev/null @@ -1,49 +0,0 @@ -From 188eac4acf37313fcec27d7b266c6517b99ed23d Mon Sep 17 00:00:00 2001 -From: Oliver Kowalke -Date: Sun, 1 Dec 2019 20:40:28 +0100 -Subject: [PATCH] Revert "Cease dependence on Range" - -This reverts commit 0c556bb59241e682bbcd3f572815149c5a9b17db. - -see #44 (One test fails to compile after boostorg/coroutine submodule updated) ---- - boost/coroutine/asymmetric_coroutine.hpp | 12 +++--------- - 1 file changed, 3 insertions(+), 9 deletions(-) - -diff --git a/boost/coroutine/asymmetric_coroutine.hpp b/boost/coroutine/asymmetric_coroutine.hpp -index f2ae16f..78b1842 100644 ---- a/boost/coroutine/asymmetric_coroutine.hpp -+++ b/boost/coroutine/asymmetric_coroutine.hpp -@@ -14,6 +14,7 @@ - #include - #include - #include -+#include - #include - #include - -@@ -2390,19 +2391,12 @@ end( push_coroutine< R > & c) - - } - --// forward declaration of Boost.Range traits to break dependency on it --template --struct range_mutable_iterator; -- --template --struct range_const_iterator; -- - template< typename Arg > --struct range_mutable_iterator< coroutines::push_coroutine< Arg >, void > -+struct range_mutable_iterator< coroutines::push_coroutine< Arg > > - { typedef typename coroutines::push_coroutine< Arg >::iterator type; }; - - template< typename R > --struct range_mutable_iterator< coroutines::pull_coroutine< R >, void > -+struct range_mutable_iterator< coroutines::pull_coroutine< R > > - { typedef typename coroutines::pull_coroutine< R >::iterator type; }; - - } --- -2.21.0 - diff --git a/recipes/boost/all/patches/1.69.0-contract-no-system.patch b/recipes/boost/all/patches/1.69.0-contract-no-system.patch deleted file mode 100644 index d98fe7b2f7e3e..0000000000000 --- a/recipes/boost/all/patches/1.69.0-contract-no-system.patch +++ /dev/null @@ -1,11 +0,0 @@ -This library links to boost_system, even though that library is header-only. ---- libs/contract/build/Jamfile.v2 -+++ libs/contract/build/Jamfile.v2 -@@ -18,5 +18,5 @@ - ; - - # If lib as header-only, none of following will be used. --lib boost_contract : contract.cpp : shared /boost//system ; --lib boost_contract : contract.cpp : static /boost//system ; -+lib boost_contract : contract.cpp : shared ; -+lib boost_contract : contract.cpp : static ; diff --git a/recipes/boost/all/patches/1.69.0-random-no-system.patch b/recipes/boost/all/patches/1.69.0-random-no-system.patch deleted file mode 100644 index ad03e39931654..0000000000000 --- a/recipes/boost/all/patches/1.69.0-random-no-system.patch +++ /dev/null @@ -1,11 +0,0 @@ -This library links to boost_system, even though that library is header-only. ---- libs/random/build/Jamfile.v2 -+++ libs/random/build/Jamfile.v2 -@@ -13,6 +13,6 @@ - : usage-requirements shared:BOOST_RANDOM_DYN_LINK - ; - --lib boost_random : [ glob *.cpp ] /boost//system ; -+lib boost_random : [ glob *.cpp ] ; - - boost-install boost_random ; diff --git a/recipes/boost/all/patches/1.69.0-type_erasure-no-system.patch b/recipes/boost/all/patches/1.69.0-type_erasure-no-system.patch deleted file mode 100644 index c3b7cde662175..0000000000000 --- a/recipes/boost/all/patches/1.69.0-type_erasure-no-system.patch +++ /dev/null @@ -1,9 +0,0 @@ -This library links to boost_system, even though that library is header-only. ---- libs/type_erasure/build/Jamfile.v2 -+++ libs/type_erasure/build/Jamfile.v2 -@@ -12,4 +12,4 @@ - : usage-requirements shared:BOOST_TYPE_ERASURE_DYN_LINK - ; - --lib boost_type_erasure : dynamic_binding.cpp /boost//thread /boost//system ; -+lib boost_type_erasure : dynamic_binding.cpp /boost//thread ; diff --git a/recipes/boost/all/patches/1.75.0-boost_build-with-newer-b2.patch b/recipes/boost/all/patches/1.75.0-boost_build-with-newer-b2.patch deleted file mode 100644 index 4c22c748fe894..0000000000000 --- a/recipes/boost/all/patches/1.75.0-boost_build-with-newer-b2.patch +++ /dev/null @@ -1,51 +0,0 @@ ---- tools/build/src/build/configure.jam.orig 2020-12-03 00:02:49.000000000 -0500 -+++ tools/build/src/build/configure.jam 2022-01-28 20:32:41.260634800 -0500 -@@ -454,7 +454,7 @@ - return [ find-builds-raw $(p) : $(ps) : $(what) : - $(3) : $(4) : $(5) : $(6) : $(7) : $(8) : $(9) : - $(10) : $(11) : $(12) : $(13) : $(14) : $(15) : -- $(16) : $(17) : $(18) : $(19) ] ; -+ $(16) : $(17) : $(18) ] ; - } - - -@@ -518,7 +518,7 @@ - { - local project = [ project.current ] ; - self.message = $(message) ; -- for i in 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 -+ for i in 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 - { - local name = [ CALC $(i) - 1 ] ; - self.targets.$(name) = $($(i)[1]) ; -@@ -537,7 +537,7 @@ - } - rule all-properties ( ) - { -- local i = 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 ; -+ local i = 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 ; - return $(self.props.$(i)) ; - } - rule check ( properties * ) -@@ -559,9 +559,7 @@ - : $(self.targets.14) $(self.what.14) - : $(self.targets.15) $(self.what.15) - : $(self.targets.16) $(self.what.16) -- : $(self.targets.17) $(self.what.17) -- : $(self.targets.18) $(self.what.18) -- : $(self.targets.19) $(self.what.19) ] ; -+ : $(self.targets.17) $(self.what.17) ] ; - if $(self.props.$(i)) - { - return [ property.evaluate-conditionals-in-context $(self.props.$(i)) : $(properties) ] ; ---- tools/build/src/util/indirect.jam.orig 2020-12-03 00:02:49.000000000 -0500 -+++ tools/build/src/util/indirect.jam 2022-01-28 20:32:41.249509200 -0500 -@@ -102,7 +102,7 @@ - { - return [ modules.call-in [ get-module $(r) ] : [ get-rule $(r) ] $(args) : - $(2) : $(3) : $(4) : $(5) : $(6) : $(7) : $(8) : $(9) : $(10) : $(11) : -- $(12) : $(13) : $(14) : $(15) : $(16) : $(17) : $(18) : $(19) ] ; -+ $(12) : $(13) : $(14) : $(15) : $(16) : $(17) : $(18) ] ; - } - - diff --git a/recipes/boost/all/patches/1.76.0-0001-fix-include-inside-boost-namespace.patch b/recipes/boost/all/patches/1.76.0-0001-fix-include-inside-boost-namespace.patch deleted file mode 100644 index c06566b5a75fb..0000000000000 --- a/recipes/boost/all/patches/1.76.0-0001-fix-include-inside-boost-namespace.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 1ec5c98d80de97f9e962c5627e1a0e6096099894 Mon Sep 17 00:00:00 2001 -From: Daniel Scharrer -Date: Wed, 28 Jul 2021 19:56:31 +0200 -Subject: [PATCH] Fix #include inside boost namespace - -The existing code fails to build if was not already included. ---- - boost/math/tools/mp.hpp | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/boost/math/tools/mp.hpp b/boost/math/tools/mp.hpp -index 35565646f..dc8440988 100644 ---- a/boost/math/tools/mp.hpp -+++ b/boost/math/tools/mp.hpp -@@ -13,6 +13,7 @@ - - #include - #include -+#include - - namespace boost { namespace math { namespace tools { namespace meta_programming { - -@@ -338,7 +339,6 @@ using mp_remove_if_q = mp_remove_if; - // Index sequence - // Use C++14 index sequence if available - #if defined(__cpp_lib_integer_sequence) && (__cpp_lib_integer_sequence >= 201304) --#include - template - using index_sequence = std::index_sequence; - --- -2.39.1 - diff --git a/recipes/boost/all/patches/1.77.0-boost_build-with-newer-b2.patch b/recipes/boost/all/patches/1.77.0-boost_build-with-newer-b2.patch deleted file mode 100644 index bdc7476f27137..0000000000000 --- a/recipes/boost/all/patches/1.77.0-boost_build-with-newer-b2.patch +++ /dev/null @@ -1,51 +0,0 @@ ---- tools/build/src/build/configure.jam.orig 2021-08-05 05:42:46.000000000 -0400 -+++ tools/build/src/build/configure.jam 2022-01-28 19:55:37.960877600 -0500 -@@ -467,7 +467,7 @@ - return [ find-builds-raw $(p) : $(ps) : $(what) : - $(3) : $(4) : $(5) : $(6) : $(7) : $(8) : $(9) : - $(10) : $(11) : $(12) : $(13) : $(14) : $(15) : -- $(16) : $(17) : $(18) : $(19) ] ; -+ $(16) : $(17) : $(18) ] ; - } - - -@@ -531,7 +531,7 @@ - { - local project = [ project.current ] ; - self.message = $(message) ; -- for i in 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 -+ for i in 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 - { - local name = [ CALC $(i) - 1 ] ; - self.targets.$(name) = $($(i)[1]) ; -@@ -550,7 +550,7 @@ - } - rule all-properties ( ) - { -- local i = 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 ; -+ local i = 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 ; - return $(self.props.$(i)) ; - } - rule check ( properties * ) -@@ -572,9 +572,7 @@ - : $(self.targets.14) $(self.what.14) - : $(self.targets.15) $(self.what.15) - : $(self.targets.16) $(self.what.16) -- : $(self.targets.17) $(self.what.17) -- : $(self.targets.18) $(self.what.18) -- : $(self.targets.19) $(self.what.19) ] ; -+ : $(self.targets.17) $(self.what.17) ] ; - if $(self.props.$(i)) - { - return [ property.evaluate-conditionals-in-context $(self.props.$(i)) : $(properties) ] ; ---- tools/build/src/util/indirect.jam.orig 2021-08-05 05:42:46.000000000 -0400 -+++ tools/build/src/util/indirect.jam 2021-12-02 01:48:03.000000000 -0500 -@@ -102,7 +102,7 @@ - { - return [ modules.call-in [ get-module $(r) ] : [ get-rule $(r) ] $(args) : - $(2) : $(3) : $(4) : $(5) : $(6) : $(7) : $(8) : $(9) : $(10) : $(11) : -- $(12) : $(13) : $(14) : $(15) : $(16) : $(17) : $(18) : $(19) ] ; -+ $(12) : $(13) : $(14) : $(15) : $(16) : $(17) : $(18) ] ; - } - - .parts_regex = "^([^@]*)@" "([^%]*)%" "([^%]+)$" ; diff --git a/recipes/boost/all/patches/1.85.0-container-aliasing-violation-fix.patch b/recipes/boost/all/patches/1.85.0-container-aliasing-violation-fix.patch new file mode 100644 index 0000000000000..aa3c821fde524 --- /dev/null +++ b/recipes/boost/all/patches/1.85.0-container-aliasing-violation-fix.patch @@ -0,0 +1,417 @@ +From a92131b34b78f7f010881750ecb8b4ce274511d2 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Ion=20Gazta=C3=B1aga?= +Date: Sun, 28 Apr 2024 23:29:59 +0200 +Subject: [PATCH 1/1] Remove UB in flat_map implementation when the + implementation has a movable std::pair + +--- + boost/container/allocator_traits.hpp | 144 +++++++++++++++++- + boost/container/detail/construct_in_place.hpp | 36 ++++- + boost/container/flat_map.hpp | 67 ++++++-- + 3 files changed, 229 insertions(+), 18 deletions(-) + +diff --git a/boost/container/allocator_traits.hpp b/boost/container/allocator_traits.hpp +index cdb6683e8..8e2fafa7f 100644 +--- a/boost/container/allocator_traits.hpp ++++ b/boost/container/allocator_traits.hpp +@@ -32,6 +32,8 @@ + #include + #include //is_empty + #include ++#include ++#include + #ifndef BOOST_CONTAINER_DETAIL_STD_FWD_HPP + #include + #endif +@@ -81,6 +83,144 @@ + + namespace boost { + namespace container { ++namespace dtl { ++ ++#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) ++ ++template ++BOOST_CONTAINER_FORCEINLINE void construct_type(T *p, BOOST_FWD_REF(Args) ...args) ++{ ++ ::new((void*)p, boost_container_new_t()) T(::boost::forward(args)...); ++} ++ ++template < class Pair, class KeyType, class ... Args> ++typename dtl::enable_if< dtl::is_pair, void >::type ++construct_type ++ (Pair* p, try_emplace_t, BOOST_FWD_REF(KeyType) k, BOOST_FWD_REF(Args) ...args) ++{ ++ construct_type(dtl::addressof(p->first), ::boost::forward(k)); ++ BOOST_CONTAINER_TRY{ ++ construct_type(dtl::addressof(p->second), ::boost::forward(args)...); ++ } ++ BOOST_CONTAINER_CATCH(...) { ++ typedef typename Pair::first_type first_type; ++ dtl::addressof(p->first)->~first_type(); ++ BOOST_CONTAINER_RETHROW ++ } ++ BOOST_CONTAINER_CATCH_END ++} ++ ++#else ++ ++#define BOOST_CONTAINER_ALLOCATOR_TRAITS_CONSTRUCT_TYPEJ(N) \ ++template\ ++BOOST_CONTAINER_FORCEINLINE \ ++ typename dtl::disable_if_c::value, void >::type \ ++construct_type(T *p BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\ ++{\ ++ ::new((void*)p, boost_container_new_t()) T( BOOST_MOVE_FWD##N );\ ++}\ ++// ++BOOST_MOVE_ITERATE_0TO8(BOOST_CONTAINER_ALLOCATOR_TRAITS_CONSTRUCT_TYPEJ) ++#undef BOOST_CONTAINER_ALLOCATOR_TRAITS_CONSTRUCT_TYPEJ ++ ++#define BOOST_CONTAINER_ALLOCATOR_TRAITS_CONSTRUCT_TYPE(N) \ ++template < class Pair, class KeyType BOOST_MOVE_I##N BOOST_MOVE_CLASS##N>\ ++typename dtl::enable_if< dtl::is_pair, void >::type construct_type\ ++ (Pair* p, try_emplace_t, BOOST_FWD_REF(KeyType) k BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\ ++{\ ++ construct_type(dtl::addressof(p->first), ::boost::forward(k));\ ++ BOOST_CONTAINER_TRY{\ ++ construct_type(dtl::addressof(p->second) BOOST_MOVE_I##N BOOST_MOVE_FWD##N);\ ++ }\ ++ BOOST_CONTAINER_CATCH(...) {\ ++ typedef typename Pair::first_type first_type;\ ++ dtl::addressof(p->first)->~first_type();\ ++ BOOST_CONTAINER_RETHROW\ ++ }\ ++ BOOST_CONTAINER_CATCH_END\ ++}\ ++// ++BOOST_MOVE_ITERATE_0TO8(BOOST_CONTAINER_ALLOCATOR_TRAITS_CONSTRUCT_TYPE) ++#undef BOOST_CONTAINER_ALLOCATOR_TRAITS_CONSTRUCT_TYPE ++ ++#endif ++ ++template ++inline ++typename dtl::enable_if, void >::type ++construct_type(T* p) ++{ ++ dtl::construct_type(dtl::addressof(p->first)); ++ BOOST_CONTAINER_TRY{ ++ dtl::construct_type(dtl::addressof(p->second)); ++ } ++ BOOST_CONTAINER_CATCH(...) { ++ typedef typename T::first_type first_type; ++ dtl::addressof(p->first)->~first_type(); ++ BOOST_CONTAINER_RETHROW ++ } ++ BOOST_CONTAINER_CATCH_END ++} ++ ++ ++template ++inline ++typename dtl::enable_if_c ++ < dtl::is_pair::value ++ , void >::type ++construct_type(T* p, U &u) ++{ ++ dtl::construct_type(dtl::addressof(p->first), u.first); ++ BOOST_CONTAINER_TRY{ ++ dtl::construct_type(dtl::addressof(p->second), u.second); ++ } ++ BOOST_CONTAINER_CATCH(...) { ++ typedef typename T::first_type first_type; ++ dtl::addressof(p->first)->~first_type(); ++ BOOST_CONTAINER_RETHROW ++ } ++ BOOST_CONTAINER_CATCH_END ++} ++ ++template ++inline ++typename dtl::enable_if_c ++ < dtl::is_pair::type>::value && ++ !boost::move_detail::is_reference::value //This is needed for MSVC10 and ambiguous overloads ++ , void >::type ++construct_type(T* p, BOOST_RV_REF(U) u) ++{ ++ dtl::construct_type(dtl::addressof(p->first), ::boost::move(u.first)); ++ BOOST_CONTAINER_TRY{ ++ dtl::construct_type(dtl::addressof(p->second), ::boost::move(u.second)); ++ } ++ BOOST_CONTAINER_CATCH(...) { ++ typedef typename T::first_type first_type; ++ dtl::addressof(p->first)->~first_type(); ++ BOOST_CONTAINER_RETHROW ++ } ++ BOOST_CONTAINER_CATCH_END ++} ++ ++template ++inline ++typename dtl::enable_if, void >::type ++construct_type(T* p, BOOST_FWD_REF(U) x, BOOST_FWD_REF(V) y) ++{ ++ dtl::construct_type(dtl::addressof(p->first), ::boost::forward(x)); ++ BOOST_CONTAINER_TRY{ ++ dtl::construct_type(dtl::addressof(p->second), ::boost::forward(y)); ++ } ++ BOOST_CONTAINER_CATCH(...) { ++ typedef typename T::first_type first_type; ++ dtl::addressof(p->first)->~first_type(); ++ BOOST_CONTAINER_RETHROW ++ } ++ BOOST_CONTAINER_CATCH_END ++} ++ ++} //namespace dtl + + #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED + +@@ -419,7 +559,7 @@ struct allocator_traits + + template + inline static void priv_construct(dtl::false_type, Allocator &, T *p, BOOST_FWD_REF(Args) ...args) +- { ::new((void*)p, boost_container_new_t()) T(::boost::forward(args)...); } ++ { dtl::construct_type(p, ::boost::forward(args)...); } + #else // #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) + public: + +@@ -450,7 +590,7 @@ struct allocator_traits + \ + template\ + inline static void priv_construct(dtl::false_type, Allocator &, T *p BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\ +- { ::new((void*)p, boost_container_new_t()) T(BOOST_MOVE_FWD##N); }\ ++ { dtl::construct_type(p BOOST_MOVE_I##N BOOST_MOVE_FWD##N); }\ + // + BOOST_MOVE_ITERATE_0TO8(BOOST_CONTAINER_ALLOCATOR_TRAITS_PRIV_CONSTRUCT_IMPL) + #undef BOOST_CONTAINER_ALLOCATOR_TRAITS_PRIV_CONSTRUCT_IMPL +diff --git a/boost/container/detail/construct_in_place.hpp b/boost/container/detail/construct_in_place.hpp +index d824d814a..bfdf05c2e 100644 +--- a/boost/container/detail/construct_in_place.hpp ++++ b/boost/container/detail/construct_in_place.hpp +@@ -24,6 +24,7 @@ + #include + #include + #include ++#include + + namespace boost { + namespace container { +@@ -62,9 +63,42 @@ BOOST_CONTAINER_FORCEINLINE void construct_in_place(Allocator &a, T *dest, empla + + //Assignment + ++template ++BOOST_CONTAINER_FORCEINLINE ++ typename dtl::disable_if_c ++ < dtl::is_pair::type>::value ++ && dtl::is_pair::type>::value ++ , void>::type ++assign_in_place_ref(T &t, BOOST_FWD_REF(U) u) ++{ t = ::boost::forward(u); } ++ ++template ++BOOST_CONTAINER_FORCEINLINE ++ typename dtl::enable_if_c ++ < dtl::is_pair::type>::value ++ && dtl::is_pair::type>::value ++ , void>::type ++assign_in_place_ref(T &t, const U &u) ++{ ++ assign_in_place_ref(t.first, u.first); ++ assign_in_place_ref(t.second, u.second); ++} ++ ++template ++BOOST_CONTAINER_FORCEINLINE ++ typename dtl::enable_if_c ++ < dtl::is_pair::type>::value ++ && dtl::is_pair::type>::value ++ , void>::type ++assign_in_place_ref(T &t, BOOST_RV_REF(U) u) ++{ ++ assign_in_place_ref(t.first, ::boost::move(u.first)); ++ assign_in_place_ref(t.second, ::boost::move(u.second)); ++} ++ + template + BOOST_CONTAINER_FORCEINLINE void assign_in_place(DstIt dest, InpIt source) +-{ *dest = *source; } ++{ assign_in_place_ref(*dest, *source); } + + template + BOOST_CONTAINER_FORCEINLINE void assign_in_place(DstIt dest, value_init_construct_iterator) +diff --git a/boost/container/flat_map.hpp b/boost/container/flat_map.hpp +index b092fb212..e4843f566 100644 +--- a/boost/container/flat_map.hpp ++++ b/boost/container/flat_map.hpp +@@ -48,6 +48,11 @@ + #include + #endif + ++#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) ++#define BOOST_CONTAINER_STD_PAIR_IS_MOVABLE ++#endif ++ ++ + namespace boost { + namespace container { + +@@ -58,21 +63,37 @@ class flat_multimap; + + namespace dtl{ + ++#if defined(BOOST_CONTAINER_STD_PAIR_IS_MOVABLE) + template + BOOST_CONTAINER_FORCEINLINE static D &force(S &s) +-{ return *move_detail::force_ptr(&s); } ++{ return s; } + + template + BOOST_CONTAINER_FORCEINLINE static const D &force(const S &s) +-{ return *move_detail::force_ptr(&s); } ++{ return s; } ++ ++template ++BOOST_CONTAINER_FORCEINLINE static D force_copy(D s) ++{ return s; } ++ ++#else //!BOOST_CONTAINER_DOXYGEN_INVOKED ++ ++template ++BOOST_CONTAINER_FORCEINLINE static D &force(S &s) ++{ return *move_detail::launder_cast(&s); } ++ ++template ++BOOST_CONTAINER_FORCEINLINE static const D &force(const S &s) ++{ return *move_detail::launder_cast(&s); } + + template + BOOST_CONTAINER_FORCEINLINE static D force_copy(const S &s) + { +- const D *const vp = move_detail::force_ptr(&s); ++ const D *const vp = move_detail::launder_cast(&s); + D ret_val(*vp); + return ret_val; + } ++#endif //BOOST_CONTAINER_DOXYGEN_INVOKED + + } //namespace dtl{ + +@@ -118,18 +139,27 @@ class flat_map + private: + BOOST_COPYABLE_AND_MOVABLE(flat_map) + //This is the tree that we should store if pair was movable ++ typedef std::pair std_pair_t; + typedef dtl::flat_tree< +- std::pair, ++ std_pair_t, + dtl::select1st, + Compare, + AllocatorOrContainer> tree_t; + + //This is the real tree stored here. It's based on a movable pair ++ typedef dtl::pair dtl_pair_t; ++ ++ #ifdef BOOST_CONTAINER_STD_PAIR_IS_MOVABLE ++ typedef std_pair_t impl_pair_t; ++ #else ++ typedef dtl_pair_t impl_pair_t; ++ #endif ++ + typedef dtl::flat_tree< +- dtl::pair, ++ impl_pair_t, + dtl::select1st, + Compare, +- typename dtl::container_or_allocator_rebind >::type ++ typename dtl::container_or_allocator_rebind::type + > impl_tree_t; + impl_tree_t m_flat_tree; // flat tree representing flat_map + +@@ -851,7 +881,7 @@ class flat_map + //! @copydoc ::boost::container::flat_set::nth(size_type) const + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline + const_iterator nth(size_type n) const BOOST_NOEXCEPT_OR_NOTHROW +- { return dtl::force_copy(m_flat_tree.nth(n)); } ++ { return dtl::force_copy(m_flat_tree.nth(n)); } + + //! @copydoc ::boost::container::flat_set::index_of(iterator) + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline +@@ -1099,7 +1129,7 @@ class flat_map + template + inline BOOST_CONTAINER_DOC1ST + ( std::pair +- , typename dtl::enable_if_c::value ++ , typename dtl::enable_if_c::value + BOOST_MOVE_I std::pair >::type) + insert(BOOST_FWD_REF(Pair) x) + { +@@ -1153,7 +1183,7 @@ class flat_map + template + inline BOOST_CONTAINER_DOC1ST + ( iterator +- , typename dtl::enable_if_c::value ++ , typename dtl::enable_if_c::value + BOOST_MOVE_I iterator>::type) + insert(const_iterator p, BOOST_FWD_REF(Pair) x) + { +@@ -1777,17 +1807,24 @@ class flat_multimap + #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED + private: + BOOST_COPYABLE_AND_MOVABLE(flat_multimap) ++ typedef std::pair std_pair_t; + typedef dtl::flat_tree< +- std::pair, ++ std_pair_t, + dtl::select1st, + Compare, + AllocatorOrContainer> tree_t; + //This is the real tree stored here. It's based on a movable pair ++ typedef dtl::pair dtl_pair_t; ++ #ifdef BOOST_CONTAINER_STD_PAIR_IS_MOVABLE ++ typedef std_pair_t impl_pair_t; ++ #else ++ typedef dtl_pair_t impl_pair_t; ++ #endif + typedef dtl::flat_tree< +- dtl::pair, ++ impl_pair_t, + dtl::select1st, + Compare, +- typename dtl::container_or_allocator_rebind >::type ++ typename dtl::container_or_allocator_rebind::type + > impl_tree_t; + impl_tree_t m_flat_tree; // flat tree representing flat_map + +@@ -2388,7 +2425,7 @@ class flat_multimap + //! @copydoc ::boost::container::flat_set::nth(size_type) const + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline + const_iterator nth(size_type n) const BOOST_NOEXCEPT_OR_NOTHROW +- { return dtl::force_copy(m_flat_tree.nth(n)); } ++ { return dtl::force_copy(m_flat_tree.nth(n)); } + + //! @copydoc ::boost::container::flat_set::index_of(iterator) + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline +@@ -2477,7 +2514,7 @@ class flat_multimap + template + inline BOOST_CONTAINER_DOC1ST + ( iterator +- , typename dtl::enable_if_c::value ++ , typename dtl::enable_if_c::value + BOOST_MOVE_I iterator >::type) + insert(BOOST_FWD_REF(Pair) x) + { return dtl::force_copy(m_flat_tree.emplace_equal(boost::forward(x))); } +@@ -2514,7 +2551,7 @@ class flat_multimap + template + inline BOOST_CONTAINER_DOC1ST + ( iterator +- , typename dtl::enable_if_c::value ++ , typename dtl::enable_if_c::value + BOOST_MOVE_I iterator>::type) + insert(const_iterator p, BOOST_FWD_REF(Pair) x) + { +-- +2.31.1 + diff --git a/recipes/boost/all/patches/bcp_namespace_issues_1_71.patch b/recipes/boost/all/patches/bcp_namespace_issues_1_71.patch deleted file mode 100644 index 94e748ef55f4b..0000000000000 --- a/recipes/boost/all/patches/bcp_namespace_issues_1_71.patch +++ /dev/null @@ -1,33 +0,0 @@ -From d0586e88122f41cd5ac9666db70c37d6f0fc7480 Mon Sep 17 00:00:00 2001 -From: Peter Dimov -Date: Sun, 26 May 2019 18:49:12 +0300 -Subject: [PATCH] Fix `bcp --namespace` issues - ---- - Jamroot | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - -diff --git a/Jamroot b/Jamroot -index e0d7c90f51d..4e913c2b3f3 100644 ---- a/Jamroot -+++ b/Jamroot -@@ -140,7 +140,8 @@ import "class" : new ; - import property-set ; - import threadapi-feature ; - import option ; --import tools/boost_install/boost-install ; -+# Backslash because of `bcp --namespace` -+import tools/boost\_install/boost-install ; - - path-constant BOOST_ROOT : . ; - constant BOOST_VERSION : 1.71.0 ; -@@ -311,8 +312,8 @@ rule boost-install ( libraries * ) - # stage and install targets via boost-install, above. - rule boost-lib ( name : sources * : requirements * : default-build * : usage-requirements * ) - { -+ autolink = shared:BOOST_$(name:U)_DYN_LINK=1 ; - name = boost_$(name) ; -- autolink = shared:$(name:U)_DYN_LINK=1 ; - lib $(name) - : $(sources) - : $(requirements) $(autolink) diff --git a/recipes/boost/all/patches/bcp_namespace_issues_1_72.patch b/recipes/boost/all/patches/bcp_namespace_issues_1_72.patch deleted file mode 100644 index 5ffe1ec157b19..0000000000000 --- a/recipes/boost/all/patches/bcp_namespace_issues_1_72.patch +++ /dev/null @@ -1,33 +0,0 @@ -From d0586e88122f41cd5ac9666db70c37d6f0fc7480 Mon Sep 17 00:00:00 2001 -From: Peter Dimov -Date: Sun, 26 May 2019 18:49:12 +0300 -Subject: [PATCH] Fix `bcp --namespace` issues - ---- - Jamroot | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - -diff --git a/Jamroot b/Jamroot -index e0d7c90f51d..4e913c2b3f3 100644 ---- a/Jamroot -+++ b/Jamroot -@@ -140,7 +140,8 @@ import "class" : new ; - import property-set ; - import threadapi-feature ; - import option ; --import tools/boost_install/boost-install ; -+# Backslash because of `bcp --namespace` -+import tools/boost\_install/boost-install ; - - path-constant BOOST_ROOT : . ; - constant BOOST_VERSION : 1.72.0 ; -@@ -311,8 +312,8 @@ rule boost-install ( libraries * ) - # stage and install targets via boost-install, above. - rule boost-lib ( name : sources * : requirements * : default-build * : usage-requirements * ) - { -+ autolink = shared:BOOST_$(name:U)_DYN_LINK=1 ; - name = boost_$(name) ; -- autolink = shared:$(name:U)_DYN_LINK=1 ; - lib $(name) - : $(sources) - : $(requirements) $(autolink) diff --git a/recipes/boost/all/patches/boost_build_qcc_fix_debug_build_parameter.patch b/recipes/boost/all/patches/boost_build_qcc_fix_debug_build_parameter.patch deleted file mode 100644 index 5e6c660ee96c2..0000000000000 --- a/recipes/boost/all/patches/boost_build_qcc_fix_debug_build_parameter.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff --git a/tools/build/src/tools/qcc.jam b/tools/build/src/tools/qcc.jam -index 155b1ac3..64274e65 100644 ---- a/tools/build/src/tools/qcc.jam -+++ b/tools/build/src/tools/qcc.jam -@@ -48,7 +48,7 @@ generators.register-c-compiler qcc.compile.asm : ASM : OBJ : qcc ; - - - # Declare flags for compilation. --toolset.flags qcc.compile OPTIONS on : -gstabs+ ; -+toolset.flags qcc.compile OPTIONS on : -g ; - - # Declare flags and action for compilation. - toolset.flags qcc.compile OPTIONS off : -O0 ; -@@ -164,7 +164,7 @@ generators.override qcc.searched-lib-generator : searched-lib-generator ; - - # Declare flags for linking. - # First, the common flags. --toolset.flags qcc.link OPTIONS on : -gstabs+ ; -+toolset.flags qcc.link OPTIONS on : -g ; - toolset.flags qcc.link OPTIONS on : -p ; - toolset.flags qcc.link OPTIONS ; - toolset.flags qcc.link LINKPATH ; diff --git a/recipes/boost/all/patches/boost_build_qcc_fix_debug_build_parameter_since_1_74.patch b/recipes/boost/all/patches/boost_build_qcc_fix_debug_build_parameter_since_1_74.patch deleted file mode 100644 index 29b744e9667d3..0000000000000 --- a/recipes/boost/all/patches/boost_build_qcc_fix_debug_build_parameter_since_1_74.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff --git a/tools/build/src/tools/qcc.jam b/tools/build/src/tools/qcc.jam -index 740e907..b0653f1 100644 ---- a/tools/build/src/tools/qcc.jam -+++ b/tools/build/src/tools/qcc.jam -@@ -86,7 +86,7 @@ local rule check-target-platform - } - - # Declare flags for compilation. --toolset.flags qcc.compile OPTIONS on : -gstabs+ ; -+toolset.flags qcc.compile OPTIONS on : -g ; - - # Declare flags and action for compilation. - toolset.flags qcc.compile OPTIONS off : -O0 ; -@@ -216,7 +216,7 @@ generators.override qcc.searched-lib-generator : searched-lib-generator ; - - # Declare flags for linking. - # First, the common flags. --toolset.flags qcc.link OPTIONS on : -gstabs+ ; -+toolset.flags qcc.link OPTIONS on : -g ; - toolset.flags qcc.link OPTIONS on : -p ; - toolset.flags qcc.link OPTIONS ; - toolset.flags qcc.link LINKPATH ; diff --git a/recipes/boost/all/patches/boost_core_qnx_cxx_provide___cxa_get_globals.patch b/recipes/boost/all/patches/boost_core_qnx_cxx_provide___cxa_get_globals.patch deleted file mode 100644 index dffef671e7992..0000000000000 --- a/recipes/boost/all/patches/boost_core_qnx_cxx_provide___cxa_get_globals.patch +++ /dev/null @@ -1,20 +0,0 @@ -diff --git a/boost/core/uncaught_exceptions.hpp b/boost/core/uncaught_exceptions.hpp -index c39120b..436717f 100644 ---- a/boost/core/uncaught_exceptions.hpp -+++ b/boost/core/uncaught_exceptions.hpp -@@ -56,10 +56,15 @@ - // On Linux with clang and libc++ and on OS X, there is a version of cxxabi.h from libc++abi that doesn't declare __cxa_get_globals, but provides __cxa_uncaught_exceptions. - // The function only appeared in version _LIBCPPABI_VERSION >= 1002 of the library. Unfortunately, there are linking errors about undefined reference to __cxa_uncaught_exceptions - // on Ubuntu Trusty and OS X, so we avoid using it and forward-declare __cxa_get_globals instead. -+// On QNX SDP 7.0 (QCC 5.4.0), there are multiple cxxabi.h, one from glibcxx from gcc and another from libc++abi from LLVM. Which one is included will be determined by the qcc -+// command line arguments (-V and/or -Y; http://www.qnx.com/developers/docs/7.0.0/#com.qnx.doc.neutrino.utilities/topic/q/qcc.html). The LLVM libc++abi is missing the declaration -+// of __cxa_get_globals but it is also patched by QNX developers to not define _LIBCPPABI_VERSION. Older QNX SDP versions, up to and including 6.6, don't provide LLVM and libc++abi. -+// See https://github.com/boostorg/core/issues/59. - #if !defined(__FreeBSD__) && \ - ( \ - (defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__) < 407) || \ - defined(__OpenBSD__) || \ -+ (defined(__QNXNTO__) && !defined(__GLIBCXX__) && !defined(__GLIBCPP__)) || \ - defined(_LIBCPPABI_VERSION) \ - ) - namespace __cxxabiv1 { diff --git a/recipes/boost/all/patches/boost_log_filesystem_no_deprecated_1_72.patch b/recipes/boost/all/patches/boost_log_filesystem_no_deprecated_1_72.patch deleted file mode 100644 index bb010943f2bde..0000000000000 --- a/recipes/boost/all/patches/boost_log_filesystem_no_deprecated_1_72.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/libs/log/src/text_file_backend.cpp b/libs/log/src/text_file_backend.cpp -index 50cef3b..d5fd02e 100644 ---- a/libs/log/src/text_file_backend.cpp -+++ b/libs/log/src/text_file_backend.cpp -@@ -39,6 +39,8 @@ - #include - #include - #include -+#include -+#include - #include - #include - #include diff --git a/recipes/boost/all/patches/boost_mpi_check.patch b/recipes/boost/all/patches/boost_mpi_check.patch deleted file mode 100644 index af7e45f610510..0000000000000 --- a/recipes/boost/all/patches/boost_mpi_check.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff -ru a/tools/build/src/tools/mpi.jam b/tools/build/src/tools/mpi.jam ---- a/tools/build/src/tools/mpi.jam 2019-12-10 01:20:16.000000000 +0100 -+++ b/tools/build/src/tools/mpi.jam 2020-09-02 13:17:22.942349254 +0200 -@@ -66,6 +66,8 @@ - import type ; - import path ; - -+import errors ; -+ - # Make this module a project - project.initialize $(__name__) ; - project mpi ; -@@ -539,6 +541,11 @@ - # Set up the "mpi" alias - alias mpi : : : : $(options) ; - } -+ -+ if ! $(.configured) -+ { -+ errors.user-error "MPI not configured" ; -+ } - } - - # States whether MPI has bee configured diff --git a/recipes/boost/all/patches/python_base_prefix.patch b/recipes/boost/all/patches/python_base_prefix.patch deleted file mode 100644 index 47371cba773df..0000000000000 --- a/recipes/boost/all/patches/python_base_prefix.patch +++ /dev/null @@ -1,25 +0,0 @@ -diff -ru a/tools/build/src/tools/python.jam b/tools/build/src/tools/python.jam ---- a/tools/build/src/tools/python.jam -+++ b/tools/build/src/tools/python.jam -@@ -746,7 +746,7 @@ local rule configure ( version ? : cmd-or-prefix ? : includes * : libraries ? : - { - # Values to be extracted from python's sys module. These will be set by - # the probe rule, above, using Jam's dynamic scoping. -- local sys-elements = version platform prefix exec_prefix executable ; -+ local sys-elements = version platform base_prefix base_exec_prefix executable ; - local sys.$(sys-elements) ; - - # Compute the string Python's sys.platform needs to match. If not -@@ -786,10 +786,10 @@ local rule configure ( version ? : cmd-or-prefix ? : includes * : libraries ? : - { - debug-message ...requested configuration matched! ; - -- exec-prefix = $(sys.exec_prefix) ; -+ exec-prefix = $(sys.base_exec_prefix) ; - - compute-default-paths $(target-os) : $(sys.version) : -- $(sys.prefix) : $(sys.exec_prefix) ; -+ $(sys.base_prefix) : $(sys.base_exec_prefix) ; - - version = $(sys.version) ; - interpreter-cmd ?= $(cmd) ; diff --git a/recipes/boost/all/patches/python_base_prefix_since_1_74.patch b/recipes/boost/all/patches/python_base_prefix_since_1_74.patch deleted file mode 100644 index 2267fe4762dc8..0000000000000 --- a/recipes/boost/all/patches/python_base_prefix_since_1_74.patch +++ /dev/null @@ -1,26 +0,0 @@ -diff --git a/tools/build/src/tools/python.jam b/tools/build/src/tools/python.jam -index cf8c379..3e3f095 100644 ---- a/tools/build/src/tools/python.jam -+++ b/tools/build/src/tools/python.jam -@@ -749,7 +749,7 @@ local rule configure ( version ? : cmd-or-prefix ? : includes * : libraries ? : - { - # Values to be extracted from python's sys module. These will be set by - # the probe rule, above, using Jam's dynamic scoping. -- local sys-elements = version platform prefix exec_prefix executable ; -+ local sys-elements = version platform base_prefix base_exec_prefix executable ; - local sys.$(sys-elements) ; - - # Compute the string Python's sys.platform needs to match. If not -@@ -789,10 +789,10 @@ local rule configure ( version ? : cmd-or-prefix ? : includes * : libraries ? : - { - debug-message ...requested configuration matched! ; - -- exec-prefix = $(sys.exec_prefix) ; -+ exec-prefix = $(sys.base_exec_prefix) ; - - compute-default-paths $(target-os) : $(sys.version) : -- $(sys.prefix) : $(sys.exec_prefix) ; -+ $(sys.base_prefix) : $(sys.base_exec_prefix) ; - - version = $(sys.version) ; - interpreter-cmd ?= $(cmd) ; diff --git a/recipes/boost/all/patches/solaris_pthread_data.patch b/recipes/boost/all/patches/solaris_pthread_data.patch deleted file mode 100644 index ea5e4d7048d4e..0000000000000 --- a/recipes/boost/all/patches/solaris_pthread_data.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/include/boost/thread/pthread/thread_data.hpp b/include/boost/thread/pthread/thread_data.hpp -index aefbeb4..bc9b136 100644 ---- a/boost/thread/pthread/thread_data.hpp -+++ b/boost/thread/pthread/thread_data.hpp -@@ -57,7 +57,7 @@ namespace boost - #else - std::size_t page_size = ::sysconf( _SC_PAGESIZE); - #endif --#if PTHREAD_STACK_MIN > 0 -+#ifdef PTHREAD_STACK_MIN - if (size +#include +// clang-format: on + +#include +#include + +#include +#include + +#if defined(BOOST_NAMESPACE) +namespace boost = BOOST_NAMESPACE; +#endif + +namespace proc = boost::process::v2; +namespace asio = boost::asio; + +int main() +{ + asio::io_context ctx; + asio::readable_pipe p{ctx}; + + const auto exe = proc::environment::find_executable("cmake"); + + proc::process c{ctx, exe, {"--version"}, proc::process_stdio{nullptr, p}}; + + std::string line; + boost::system::error_code ec; + + auto sz = asio::read(p, asio::dynamic_buffer(line), ec); + + std::cout << "CMake version: '" << line << "'" << std::endl; + + c.wait(); +} diff --git a/recipes/boost/all/test_v1_package/CMakeLists.txt b/recipes/boost/all/test_v1_package/CMakeLists.txt deleted file mode 100644 index c23ed5cfe6d98..0000000000000 --- a/recipes/boost/all/test_v1_package/CMakeLists.txt +++ /dev/null @@ -1,10 +0,0 @@ -cmake_minimum_required(VERSION 3.1) -project(test_v1_package) - -enable_testing() - -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) - -add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package - ${CMAKE_CURRENT_BINARY_DIR}/test_package) diff --git a/recipes/boost/all/test_v1_package/conanfile.py b/recipes/boost/all/test_v1_package/conanfile.py deleted file mode 100644 index 4bdbddf498bcc..0000000000000 --- a/recipes/boost/all/test_v1_package/conanfile.py +++ /dev/null @@ -1,52 +0,0 @@ -from conans import ConanFile, CMake, tools -from conans.errors import ConanException -import os - - -class TestPackageConan(ConanFile): - settings = "os", "arch", "compiler", "build_type" - generators = "cmake", "cmake_find_package" - - def _boost_option(self, name, default): - try: - return getattr(self.options["boost"], name, default) - except (AttributeError, ConanException): - return default - - def build(self): - # FIXME: tools.vcvars added for clang-cl. Remove once conan supports clang-cl properly. (https://github.com/conan-io/conan-center-index/pull/1453) - with tools.vcvars(self.settings) if (self.settings.os == "Windows" and self.settings.compiler == "clang") else tools.no_op(): - cmake = CMake(self) - cmake.definitions["HEADER_ONLY"] = self.options["boost"].header_only - if not self.options["boost"].header_only: - cmake.definitions["Boost_USE_STATIC_LIBS"] = not self.options["boost"].shared - cmake.definitions["WITH_PYTHON"] = not self.options["boost"].without_python - if not self.options["boost"].without_python: - pyversion = tools.Version(self.options["boost"].python_version) - cmake.definitions["PYTHON_VERSION_TO_SEARCH"] = pyversion - cmake.definitions["Python_EXECUTABLE"] = self.options["boost"].python_executable - cmake.definitions["WITH_RANDOM"] = not self.options["boost"].without_random - cmake.definitions["WITH_REGEX"] = not self.options["boost"].without_regex - cmake.definitions["WITH_TEST"] = not self.options["boost"].without_test - cmake.definitions["WITH_COROUTINE"] = not self.options["boost"].without_coroutine - cmake.definitions["WITH_CHRONO"] = not self.options["boost"].without_chrono - cmake.definitions["WITH_FIBER"] = not self.options["boost"].without_fiber - cmake.definitions["WITH_LOCALE"] = not self.options["boost"].without_locale - cmake.definitions["WITH_NOWIDE"] = not self._boost_option("without_nowide", True) - cmake.definitions["WITH_JSON"] = not self._boost_option("without_json", True) - cmake.definitions["WITH_STACKTRACE"] = not self.options["boost"].without_stacktrace - cmake.definitions["WITH_STACKTRACE_ADDR2LINE"] = self.deps_user_info["boost"].stacktrace_addr2line_available - cmake.definitions["WITH_STACKTRACE_BACKTRACE"] = self._boost_option("with_stacktrace_backtrace", False) - cmake.definitions["WITH_URL"] = not self._boost_option("without_url", True) - if self.options["boost"].namespace != 'boost' and not self.options["boost"].namespace_alias: - cmake.definitions['BOOST_NAMESPACE'] = self.options["boost"].namespace - cmake.configure() - # Disable parallel builds because c3i (=conan-center's test/build infrastructure) seems to choke here - cmake.parallel = False - cmake.build() - - def test(self): - if tools.cross_building(self): - return - self.run(f"ctest --output-on-failure -C {self.settings.build_type}", run_environment=True) - diff --git a/recipes/boost/config.yml b/recipes/boost/config.yml index 0b6963fec8f23..2e1c34508d9b9 100644 --- a/recipes/boost/config.yml +++ b/recipes/boost/config.yml @@ -1,4 +1,8 @@ versions: + "1.86.0": + folder: all + "1.85.0": + folder: all "1.84.0": folder: all "1.83.0": @@ -13,17 +17,3 @@ versions: folder: all "1.78.0": folder: all - "1.77.0": - folder: all - "1.76.0": - folder: all - "1.75.0": - folder: all - "1.74.0": - folder: all - "1.73.0": - folder: all - "1.72.0": - folder: all - "1.71.0": - folder: all diff --git a/recipes/botan/all/conandata.yml b/recipes/botan/all/conandata.yml index 3472b4e6e2200..e82beb6c7b70e 100644 --- a/recipes/botan/all/conandata.yml +++ b/recipes/botan/all/conandata.yml @@ -17,6 +17,9 @@ sources: "2.19.4": url: "https://github.com/randombit/botan/archive/2.19.4.tar.gz" sha256: "5754a6b5ddc3c74b0cb8671531feea69d03a4f3b5bdafa5f75e4c73a1242e5b1" + "2.19.5": + url: "https://github.com/randombit/botan/archive/2.19.5.tar.gz" + sha256: "8d4a3826787f9febbdc225172ad2d39d7d3960346c5721fe46cb27d480d7e1de" "3.0.0": url: "https://github.com/randombit/botan/archive/3.0.0.tar.gz" sha256: "8bafe2e965fa9ccf92ef5741165d735c9fbbe6376c373bbf5702495ad2dfb814" @@ -35,6 +38,15 @@ sources: "3.4.0": url: "https://github.com/randombit/botan/archive/3.4.0.tar.gz" sha256: "6ef2a16a0527b1cfc9648a644877f7b95c4d07e8ef237273b030c623418c5e5b" + "3.5.0": + url: "https://github.com/randombit/botan/archive/3.5.0.tar.gz" + sha256: "7d91d3349e6029e1a6929a50ab587f9fd4e29a9af3f3d698553451365564001f" + "3.6.0": + url: "https://github.com/randombit/botan/archive/3.6.0.tar.gz" + sha256: "950199a891fab62dca78780b36e12f89031c37350b2a16a2c35f2e423c041bad" + "3.6.1": + url: "https://github.com/randombit/botan/archive/3.6.1.tar.gz" + sha256: "a6c4e8dcb6c7f4b9b67e2c8b43069d65b548970ca17847e3b1e031d3ffdd874a" patches: "2.18.2": - patch_file: "patches/fix-amalgamation-build.patch" diff --git a/recipes/botan/all/conanfile.py b/recipes/botan/all/conanfile.py index d211b39ca041f..8ed902567cf53 100644 --- a/recipes/botan/all/conanfile.py +++ b/recipes/botan/all/conanfile.py @@ -53,6 +53,8 @@ class BotanConan(ConanFile): "with_powercrypto": [True, False], "enable_modules": [None, "ANY"], "disable_modules": [None, "ANY"], + "enable_experimental_features": [True, False], + "enable_deprecated_features": [True, False], "system_cert_bundle": [None, "ANY"], "module_policy": [None, "bsi", "modern", "nist"], } @@ -81,6 +83,8 @@ class BotanConan(ConanFile): "with_powercrypto": True, "enable_modules": None, "disable_modules": None, + "enable_experimental_features": False, + "enable_deprecated_features": True, "system_cert_bundle": None, "module_policy": None, } @@ -193,7 +197,7 @@ def validate(self): minimum_version = self._compilers_minimum_version.get(compiler_name, False) if minimum_version and Version(self.settings.compiler.version) < minimum_version: raise ConanInvalidConfiguration( - f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." + f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support (minimum {compiler_name} {minimum_version})." ) if not minimum_version: self.output.warning(f"{self.name} recipe lacks information about the {compiler_name} compiler support.") @@ -336,6 +340,20 @@ def _configure_cmd(self): if self._extra_cxxflags: botan_extra_cxx_flags.append(self._extra_cxxflags) + if Version(self.version) >= '3.4': + # Botan 3.4.0 introduced a 'module life cycle' feature, before that + # the experimental/deprecated feature switches are ignored. + + if self.options.enable_experimental_features: + build_flags.append('--enable-experimental-features') + else: + build_flags.append('--disable-experimental-features') + + if self.options.enable_deprecated_features: + build_flags.append('--enable-deprecated-features') + else: + build_flags.append('--disable-deprecated-features') + if self.options.enable_modules: build_flags.append('--minimized-build') build_flags.append('--enable-modules={}'.format(self.options.enable_modules)) @@ -457,7 +475,7 @@ def _configure_cmd(self): ' --extra-cxxflags="{cxxflags}"' ' --cc={compiler}' ' --cpu={cpu}' - ' --prefix={prefix}' + ' --prefix="{prefix}"' ' --os={os}' ' {build_flags}').format( python_call=call_python, @@ -516,6 +534,8 @@ def _is_glibc_older_than_2_25_on_linux(self): # https://github.com/conan-io/conan-center-index/pull/18079#issuecomment-1919206949 # https://github.com/conan-io/conan-center-index/pull/18079#issuecomment-1919486839 + if self.settings.os != 'Linux': + return False libver = platform.libc_ver() return ( self.settings.os == 'Linux' and diff --git a/recipes/botan/config.yml b/recipes/botan/config.yml index 97827ec9a391e..2b65b22fb483e 100644 --- a/recipes/botan/config.yml +++ b/recipes/botan/config.yml @@ -11,6 +11,8 @@ versions: folder: all "2.19.4": folder: all + "2.19.5": + folder: all "3.0.0": folder: all "3.1.0": @@ -23,3 +25,9 @@ versions: folder: all "3.4.0": folder: all + "3.5.0": + folder: all + "3.6.0": + folder: all + "3.6.1": + folder: all diff --git a/recipes/box2d/2.4.x/conandata.yml b/recipes/box2d/2.4.x/conandata.yml deleted file mode 100644 index c7372e2a8f037..0000000000000 --- a/recipes/box2d/2.4.x/conandata.yml +++ /dev/null @@ -1,10 +0,0 @@ -sources: - "2.4.0": - url: "https://github.com/erincatto/Box2D/archive/v2.4.0.zip" - sha256: "6aebbc54c93e367c97e382a57ba12546731dcde51526964c2ab97dec2050f8b9" - "2.4.1": - url: "https://github.com/erincatto/box2d/archive/refs/tags/v2.4.1.tar.gz" - sha256: "d6b4650ff897ee1ead27cf77a5933ea197cbeef6705638dd181adc2e816b23c2" -patches: - "2.4.0": - - patch_file: "patches/0001-install-and-allow-shared.patch" diff --git a/recipes/box2d/2.4.x/conanfile.py b/recipes/box2d/2.4.x/conanfile.py deleted file mode 100644 index ae09ce435deda..0000000000000 --- a/recipes/box2d/2.4.x/conanfile.py +++ /dev/null @@ -1,71 +0,0 @@ -import os -from conan import ConanFile -from conan.tools.files import apply_conandata_patches, export_conandata_patches, get, rm, rmdir, copy -from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout -from conan.tools.scm import Version - -required_conan_version = ">=1.52.0" - - -class Box2dConan(ConanFile): - name = "box2d" - license = "Zlib" - description = "Box2D is a 2D physics engine for games" - homepage = "http://box2d.org/" - url = "https://github.com/conan-io/conan-center-index" - topics = ("physics-engine", "graphic", "2d", "collision") - settings = "os", "compiler", "build_type", "arch" - options = {"shared": [True, False], - "fPIC": [True, False]} - default_options = {"shared": False, "fPIC": True,} - - def export_sources(self): - export_conandata_patches(self) - - def config_options(self): - if self.settings.os == "Windows": - try: - del self.options.fPIC - except Exception: - pass - - def configure(self): - if self.options.shared: - try: - del self.options.fPIC - except Exception: - pass - - def layout(self): - cmake_layout(self, src_folder="src") - - def source(self): - get(self, **self.conan_data["sources"][self.version], destination=self.source_folder, strip_root=True) - - def generate(self): - tc = CMakeToolchain(self) - tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0077"] = "NEW" - tc.variables["BOX2D_BUILD_TESTBED"] = False - tc.variables["BOX2D_BUILD_UNIT_TESTS"] = False - tc.generate() - - def build(self): - apply_conandata_patches(self) - cmake = CMake(self) - cmake.configure() - cmake.build() - - def package(self): - copy(self, "LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) - cmake = CMake(self) - cmake.configure() - cmake.install() - rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) - rm(self, "*.pdb", self.package_folder, recursive=True) - - def package_info(self): - self.cpp_info.names["cmake_find_package"] = "box2d" - self.cpp_info.names["cmake_find_package_multi"] = "box2d" - self.cpp_info.libs = ["box2d"] - if Version(self.version) >= "2.4.1" and self.options.shared: - self.cpp_info.defines.append("B2_SHARED") diff --git a/recipes/box2d/2.4.x/test_package/CMakeLists.txt b/recipes/box2d/2.4.x/test_package/CMakeLists.txt deleted file mode 100644 index fb4d8d7f5888a..0000000000000 --- a/recipes/box2d/2.4.x/test_package/CMakeLists.txt +++ /dev/null @@ -1,8 +0,0 @@ -cmake_minimum_required(VERSION 3.1) -project(test_package) - -find_package(box2d REQUIRED CONFIG) - -add_executable(${PROJECT_NAME} test_package.cpp) -target_link_libraries(${PROJECT_NAME} box2d::box2d) -set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 11) diff --git a/recipes/box2d/2.4.x/test_package/conanfile.py b/recipes/box2d/2.4.x/test_package/conanfile.py deleted file mode 100644 index d1ce1a2cbc477..0000000000000 --- a/recipes/box2d/2.4.x/test_package/conanfile.py +++ /dev/null @@ -1,26 +0,0 @@ -import os -from conan import ConanFile -from conan.tools.build import can_run -from conan.tools.cmake import CMake, cmake_layout - - -class Box2DTestConan(ConanFile): - settings = "os", "compiler", "build_type", "arch" - generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" - test_type = "explicit" - - def layout(self): - cmake_layout(self) - - def requirements(self): - self.requires(self.tested_reference_str) - - def build(self): - cmake = CMake(self) - cmake.configure() - cmake.build() - - def test(self): - if can_run(self): - bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") - self.run(bin_path, env="conanrun") diff --git a/recipes/box2d/2.4.x/test_package/test_package.cpp b/recipes/box2d/2.4.x/test_package/test_package.cpp deleted file mode 100644 index 7dfa813bc1d2e..0000000000000 --- a/recipes/box2d/2.4.x/test_package/test_package.cpp +++ /dev/null @@ -1,16 +0,0 @@ -#include -#include "box2d/box2d.h" - -int main(void) { - b2Vec2 gravity(0.0f, -10.0f); - b2World world(gravity); - - b2BodyDef groundBodyDef; - groundBodyDef.position.Set(0.0f, -10.0f); - - b2Body* groundBody = world.CreateBody(&groundBodyDef); - b2PolygonShape groundBox; - groundBox.SetAsBox(50.0f, 10.0f); - - return 0; -} diff --git a/recipes/box2d/2.4.x/test_v1_package/CMakeLists.txt b/recipes/box2d/2.4.x/test_v1_package/CMakeLists.txt deleted file mode 100644 index 373fb5bb61846..0000000000000 --- a/recipes/box2d/2.4.x/test_v1_package/CMakeLists.txt +++ /dev/null @@ -1,11 +0,0 @@ -cmake_minimum_required(VERSION 3.1) -project(test_package) - -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) - -find_package(box2d REQUIRED CONFIG) - -add_executable(${PROJECT_NAME} test_package.cpp) -target_link_libraries(${PROJECT_NAME} box2d::box2d) -set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 11) diff --git a/recipes/box2d/2.4.x/test_v1_package/conanfile.py b/recipes/box2d/2.4.x/test_v1_package/conanfile.py deleted file mode 100644 index 7513484720425..0000000000000 --- a/recipes/box2d/2.4.x/test_v1_package/conanfile.py +++ /dev/null @@ -1,17 +0,0 @@ -import os -from conans import ConanFile, CMake, tools - - -class Box2DTestConan(ConanFile): - settings = "os", "compiler", "build_type", "arch" - generators = "cmake", "cmake_find_package_multi" - - def build(self): - cmake = CMake(self) - cmake.configure() - cmake.build() - - def test(self): - if not tools.cross_building(self.settings): - bin_path = os.path.join("bin", "test_package") - self.run(bin_path, run_environment=True) diff --git a/recipes/box2d/2.4.x/test_v1_package/test_package.cpp b/recipes/box2d/2.4.x/test_v1_package/test_package.cpp deleted file mode 100644 index 7dfa813bc1d2e..0000000000000 --- a/recipes/box2d/2.4.x/test_v1_package/test_package.cpp +++ /dev/null @@ -1,16 +0,0 @@ -#include -#include "box2d/box2d.h" - -int main(void) { - b2Vec2 gravity(0.0f, -10.0f); - b2World world(gravity); - - b2BodyDef groundBodyDef; - groundBodyDef.position.Set(0.0f, -10.0f); - - b2Body* groundBody = world.CreateBody(&groundBodyDef); - b2PolygonShape groundBox; - groundBox.SetAsBox(50.0f, 10.0f); - - return 0; -} diff --git a/recipes/box2d/all/conandata.yml b/recipes/box2d/all/conandata.yml index 857c8f5d17268..28c5a38b19b94 100644 --- a/recipes/box2d/all/conandata.yml +++ b/recipes/box2d/all/conandata.yml @@ -1,4 +1,25 @@ sources: - "2.3.1": - url: "https://github.com/erincatto/Box2D/archive/v2.3.1.zip" - sha256: "8ddd947400c59bcf09774bd75787e6253098a0bd337f5c61dae38b91aea678cf" + "3.0.0": + url: "https://github.com/erincatto/box2d/archive/refs/tags/v3.0.0.tar.gz" + sha256: "64ad759006cd2377c99367f51fb36942b57f0e9ad690ed41548dd620e6f6c8b1" + "2.4.2": + url: "https://github.com/erincatto/box2d/archive/refs/tags/v2.4.2.tar.gz" + sha256: "85b9b104d256c985e6e244b4227d447897fac429071cc114e5cc819dae848852" + "2.4.1": + url: "https://github.com/erincatto/box2d/archive/refs/tags/v2.4.1.tar.gz" + sha256: "d6b4650ff897ee1ead27cf77a5933ea197cbeef6705638dd181adc2e816b23c2" + "2.4.0": + url: "https://github.com/erincatto/Box2D/archive/v2.4.0.zip" + sha256: "6aebbc54c93e367c97e382a57ba12546731dcde51526964c2ab97dec2050f8b9" +patches: + "3.0.0": + - patch_file: "patches/3.0.0-0001-fix-cmake.patch" + patch_description: "fix installer" + patch_type: "conan" + - patch_file: "patches/3.0.0-0002-use-cci.patch" + patch_description: "use cci package" + patch_type: "conan" + "2.4.0": + - patch_file: "patches/0001-install-and-allow-shared.patch" + patch_description: "add install, allow shared build" + patch_type: "conan" diff --git a/recipes/box2d/all/conanfile.py b/recipes/box2d/all/conanfile.py index e5adde1f2b06a..085cd30b96269 100644 --- a/recipes/box2d/all/conanfile.py +++ b/recipes/box2d/all/conanfile.py @@ -1,68 +1,117 @@ import os -from conan import ConanFile, tools -from conan.tools.cmake import CMakeToolchain, CMake, cmake_layout +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.files import apply_conandata_patches, export_conandata_patches, get, rm, rmdir, copy +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.microsoft import is_msvc +from conan.tools.scm import Version -required_conan_version = ">=1.46.0" +required_conan_version = ">=1.53.0" class Box2dConan(ConanFile): name = "box2d" - license = "Zlib" description = "Box2D is a 2D physics engine for games" - topics = ("physics", "engine", "game development") - homepage = "http://box2d.org/" + license = "Zlib" url = "https://github.com/conan-io/conan-center-index" - settings = "os", "compiler", "build_type", "arch" - options = {"shared": [True, False], - "fPIC": [True, False]} - default_options = {"shared": False, "fPIC": True,} + homepage = "http://box2d.org/" + topics = ("physics-engine", "graphic", "2d", "collision") + package_type = "library" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False] + } + default_options = { + "shared": False, + "fPIC": True + } + + @property + def _compilers_minimum_version(self): + return { + "apple-clang": "10", + "clang": "7", + "gcc": "8", + "msvc": "193", + "Visual Studio": "17", + } + + def export_sources(self): + export_conandata_patches(self) def config_options(self): if self.settings.os == "Windows": - try: - del self.options.fPIC - except Exception: - pass + self.options.rm_safe("fPIC") def configure(self): if self.options.shared: - try: - del self.options.fPIC - except Exception: - pass + self.options.rm_safe("fPIC") + if Version(self.version) >= "3.0.0": + self.settings.rm_safe("compiler.cppstd") + self.settings.rm_safe("compiler.libcxx") def layout(self): - cmake_layout(self, src_folder="Box2D") + cmake_layout(self, src_folder="src") + + def requirements(self): + if Version(self.version) >= "3.0.0": + self.requires("simde/0.8.2") + + def validate(self): + if Version(self.version) < "3.0.0": + return + + minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) + if minimum_version and Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration( + f"{self.ref} requires C17, which your compiler does not support." + ) + + def build_requirements(self): + if Version(self.version) >= "3.0.0": + self.tool_requires("cmake/[>=3.22 <4]") def source(self): - tools.files.get(self, - **self.conan_data["sources"][self.version], - strip_root=True) + get(self, **self.conan_data["sources"][self.version], strip_root=True) def generate(self): tc = CMakeToolchain(self) - tc.variables["BOX2D_BUILD_SHARED"] = self.options.shared - tc.variables["BOX2D_BUILD_STATIC"] = not self.options.shared - if self.settings.os == "Windows" and self.options.shared: - tc.variables["CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS"] = True - tc.variables["BOX2D_BUILD_EXAMPLES"] = False + tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0077"] = "NEW" + tc.cache_variables["CMAKE_COMPILE_WARNING_AS_ERROR"] = False + if Version(self.version) < "3.0.0": + tc.variables["BOX2D_BUILD_TESTBED"] = False + tc.variables["BOX2D_BUILD_UNIT_TESTS"] = False + else: + tc.variables["BOX2D_SAMPLES"] = False + tc.variables["BOX2D_VALIDATE"] = False + tc.variables["BOX2D_UNIT_TESTS"] = False tc.generate() + if Version(self.version) >= "3.0.0": + deps = CMakeDeps(self) + deps.generate() def build(self): + apply_conandata_patches(self) cmake = CMake(self) - cmake.configure(build_script_folder="Box2D") + cmake.configure() cmake.build() def package(self): - tools.files.copy(self, "License.txt", src=os.path.join(self.source_folder, "Box2D"), dst=os.path.join(self.package_folder,"licenses")) - tools.files.copy(self, os.path.join("Box2D", "*.h"), src=os.path.join(self.source_folder, "Box2D"), dst=os.path.join(self.package_folder, "include")) - tools.files.copy(self, "*.lib", src=self.build_folder, dst=os.path.join(self.package_folder, "lib"), keep_path=False) - tools.files.copy(self, "*.dll", src=self.build_folder, dst=os.path.join(self.package_folder, "bin"), keep_path=False) - tools.files.copy(self, "*.so*", src=self.build_folder, dst=os.path.join(self.package_folder, "lib"), keep_path=False) - tools.files.copy(self, "*.dylib", src=self.build_folder, dst=os.path.join(self.package_folder, "lib"), keep_path=False) - tools.files.copy(self, "*.a", src=self.build_folder, dst=os.path.join(self.package_folder, "lib"), keep_path=False) + copy(self, "LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) + cmake = CMake(self) + cmake.configure() + cmake.install() + rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) + rm(self, "*.pdb", self.package_folder, recursive=True) def package_info(self): - self.cpp_info.libs = ["Box2D"] - if self.settings.os in ("FreeBSD", "Linux"): - self.cpp_info.system_libs = ["m"] + self.cpp_info.names["cmake_find_package"] = "box2d" + self.cpp_info.names["cmake_find_package_multi"] = "box2d" + self.cpp_info.libs = ["box2d"] + if Version(self.version) >= "3.0.0" and is_msvc(self) and self.options.shared: + self.cpp_info.defines.append("BOX2D_DLL") + elif Version(self.version) >= "2.4.1" and self.options.shared: + self.cpp_info.defines.append("B2_SHARED") + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.system_libs.append("m") diff --git a/recipes/box2d/2.4.x/patches/0001-install-and-allow-shared.patch b/recipes/box2d/all/patches/0001-install-and-allow-shared.patch similarity index 100% rename from recipes/box2d/2.4.x/patches/0001-install-and-allow-shared.patch rename to recipes/box2d/all/patches/0001-install-and-allow-shared.patch diff --git a/recipes/box2d/all/patches/3.0.0-0001-fix-cmake.patch b/recipes/box2d/all/patches/3.0.0-0001-fix-cmake.patch new file mode 100644 index 0000000000000..156dff0943ae2 --- /dev/null +++ b/recipes/box2d/all/patches/3.0.0-0001-fix-cmake.patch @@ -0,0 +1,17 @@ +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 5078d14..7ec17bc 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -180,4 +180,11 @@ endif() + source_group(TREE "${CMAKE_CURRENT_SOURCE_DIR}" PREFIX "src" FILES ${BOX2D_SOURCE_FILES}) + source_group(TREE "${CMAKE_CURRENT_SOURCE_DIR}/../include" PREFIX "include" FILES ${BOX2D_API_FILES}) + +-install(TARGETS box2d) ++include(GNUInstallDirs) ++ ++install(TARGETS box2d ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} ++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} ++) ++install(FILES ${BOX2D_API_FILES} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/box2d) diff --git a/recipes/box2d/all/patches/3.0.0-0002-use-cci.patch b/recipes/box2d/all/patches/3.0.0-0002-use-cci.patch new file mode 100644 index 0000000000000..b9d850f931bb8 --- /dev/null +++ b/recipes/box2d/all/patches/3.0.0-0002-use-cci.patch @@ -0,0 +1,76 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 8c1390e..d6590d7 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -53,7 +53,7 @@ set_property(GLOBAL PROPERTY USE_FOLDERS ON) + set(CMAKE_VERBOSE_MAKEFILE ON) + + # The Box2D library uses simde https://github.com/simd-everywhere/simde +-add_subdirectory(extern/simde) ++# add_subdirectory(extern/simde) + add_subdirectory(src) + + # This hides samples, test, and doxygen from apps that use box2d via FetchContent +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 5078d14..7ec17bc 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -78,7 +78,7 @@ add_library(box2d ${BOX2D_SOURCE_FILES} ${BOX2D_API_FILES}) + # turned this off to make Box2D easier to use without cmake + # include(GenerateExportHeader) + # generate_export_header(box2d) +- ++find_package(simde REQUIRED CONFIG) + target_include_directories(box2d + PUBLIC + $ +@@ -89,7 +89,7 @@ target_include_directories(box2d + ) + + # SIMDE is used to support SIMD math on multiple platforms +-target_link_libraries(box2d PRIVATE simde) ++target_link_libraries(box2d PRIVATE simde::simde) + + # Box2D uses C17 + set_target_properties(box2d PROPERTIES +diff --git a/src/contact_solver.c b/src/contact_solver.c +index b190501..c61e250 100644 +--- a/src/contact_solver.c ++++ b/src/contact_solver.c +@@ -9,8 +9,8 @@ + #include "core.h" + #include "solver_set.h" + #include "world.h" +-#include "x86/avx2.h" +-#include "x86/fma.h" ++#include "simde/x86/avx2.h" ++#include "simde/x86/fma.h" + + // Soft contact constraints with sub-stepping support + // http://mmacklin.com/smallsteps.pdf +diff --git a/src/contact_solver.h b/src/contact_solver.h +index e265e93..dcdc1fb 100644 +--- a/src/contact_solver.h ++++ b/src/contact_solver.h +@@ -4,7 +4,7 @@ + #pragma once + + #include "solver.h" +-#include "x86/avx.h" ++#include "simde/x86/avx.h" + + typedef struct b2ContactSim b2ContactSim; + +diff --git a/src/solver.c b/src/solver.c +index d83a471..a115417 100644 +--- a/src/solver.c ++++ b/src/solver.c +@@ -17,7 +17,7 @@ + #include "world.h" + + // for mm_pause +-#include "x86/sse2.h" ++#include "simde/x86/sse2.h" + + #include + #include diff --git a/recipes/box2d/all/test_package/CMakeLists.txt b/recipes/box2d/all/test_package/CMakeLists.txt index 22c1118333f4f..4648d77c658ec 100644 --- a/recipes/box2d/all/test_package/CMakeLists.txt +++ b/recipes/box2d/all/test_package/CMakeLists.txt @@ -1,7 +1,13 @@ -cmake_minimum_required(VERSION 3.4) -project(test_package) +cmake_minimum_required(VERSION 3.21) +project(test_package LANGUAGES C CXX) -find_package(box2d) +find_package(box2d REQUIRED CONFIG) -add_executable(test_package test_package.cpp) -target_link_libraries(test_package box2d::box2d) +if(box2d_VERSION VERSION_LESS "3.0.0") + add_executable(${PROJECT_NAME} test_package.cpp) + target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) +else() + add_executable(${PROJECT_NAME} test_package3.c) + target_compile_features(${PROJECT_NAME} PRIVATE c_std_17) +endif() +target_link_libraries(${PROJECT_NAME} PRIVATE box2d::box2d) diff --git a/recipes/box2d/all/test_package/conanfile.py b/recipes/box2d/all/test_package/conanfile.py index a3a0294a68898..3526395bd33d5 100644 --- a/recipes/box2d/all/test_package/conanfile.py +++ b/recipes/box2d/all/test_package/conanfile.py @@ -1,11 +1,13 @@ import os -from conan import ConanFile, tools +from conan import ConanFile +from conan.tools.build import can_run from conan.tools.cmake import CMake, cmake_layout - +from conan.tools.scm import Version class Box2DTestConan(ConanFile): settings = "os", "compiler", "build_type", "arch" generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" def layout(self): cmake_layout(self) @@ -13,12 +15,15 @@ def layout(self): def requirements(self): self.requires(self.tested_reference_str) + def build_requirements(self): + self.tool_requires("cmake/[>=3.21 <4]") + def build(self): cmake = CMake(self) cmake.configure() cmake.build() def test(self): - if not tools.build.cross_building(self): + if can_run(self): bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") self.run(bin_path, env="conanrun") diff --git a/recipes/box2d/all/test_package/test_package.cpp b/recipes/box2d/all/test_package/test_package.cpp index 045f0bf063169..31112b0dcea5a 100644 --- a/recipes/box2d/all/test_package/test_package.cpp +++ b/recipes/box2d/all/test_package/test_package.cpp @@ -1,88 +1,15 @@ -#include -#include +#include "box2d/box2d.h" -#include - -// This is a simple example of building and running a simulation -// using Box2D. Here we create a large ground box and a small dynamic -// box. -// There are no graphics for this example. Box2D is meant to be used -// with your rendering engine in your game engine. -int main(int argc, char **argv) -{ - B2_NOT_USED(argc); - B2_NOT_USED(argv); - - // Define the gravity vector. +int main(void) { b2Vec2 gravity(0.0f, -10.0f); - - // Construct a world object, which will hold and simulate the rigid bodies. b2World world(gravity); - // Define the ground body. b2BodyDef groundBodyDef; groundBodyDef.position.Set(0.0f, -10.0f); - // Call the body factory which allocates memory for the ground body - // from a pool and creates the ground box shape (also from a pool). - // The body is also added to the world. - b2Body *groundBody = world.CreateBody(&groundBodyDef); - - // Define the ground box shape. + b2Body* groundBody = world.CreateBody(&groundBodyDef); b2PolygonShape groundBox; - - // The extents are the half-widths of the box. groundBox.SetAsBox(50.0f, 10.0f); - // Add the ground fixture to the ground body. - groundBody->CreateFixture(&groundBox, 0.0f); - - // Define the dynamic body. We set its position and call the body factory. - b2BodyDef bodyDef; - bodyDef.type = b2_dynamicBody; - bodyDef.position.Set(0.0f, 4.0f); - b2Body *body = world.CreateBody(&bodyDef); - - // Define another box shape for our dynamic body. - b2PolygonShape dynamicBox; - dynamicBox.SetAsBox(1.0f, 1.0f); - - // Define the dynamic body fixture. - b2FixtureDef fixtureDef; - fixtureDef.shape = &dynamicBox; - - // Set the box density to be non-zero, so it will be dynamic. - fixtureDef.density = 1.0f; - - // Override the default friction. - fixtureDef.friction = 0.3f; - - // Add the shape to the body. - body->CreateFixture(&fixtureDef); - - // Prepare for simulation. Typically we use a time step of 1/60 of a - // second (60Hz) and 10 iterations. This provides a high quality simulation - // in most game scenarios. - float32 timeStep = 1.0f / 60.0f; - int32 velocityIterations = 6; - int32 positionIterations = 2; - - // This is our little game loop. - for (int32 i = 0; i < 60; ++i) - { - // Instruct the world to perform a single step of simulation. - // It is generally best to keep the time step and iterations fixed. - world.Step(timeStep, velocityIterations, positionIterations); - - // Now print the position and angle of the body. - b2Vec2 position = body->GetPosition(); - float32 angle = body->GetAngle(); - - printf("%4.2f %4.2f %4.2f\n", position.x, position.y, angle); - } - - // When the world destructor is called, all bodies and joints are freed. This can - // create orphaned pointers, so be careful about your world management. - return 0; } diff --git a/recipes/box2d/all/test_package/test_package3.c b/recipes/box2d/all/test_package/test_package3.c new file mode 100644 index 0000000000000..abad79d1a39be --- /dev/null +++ b/recipes/box2d/all/test_package/test_package3.c @@ -0,0 +1,13 @@ +#include "box2d/box2d.h" + +int main() { + b2WorldDef worldDef = b2DefaultWorldDef(); + + worldDef.gravity = (b2Vec2){0.0f, -10.0f}; + b2WorldId worldId = b2CreateWorld(&worldDef); + + b2BodyDef groundBodyDef = b2DefaultBodyDef(); + groundBodyDef.position = (b2Vec2){0.0f, -10.0f}; + + return 0; +} diff --git a/recipes/box2d/all/test_v1_package/CMakeLists.txt b/recipes/box2d/all/test_v1_package/CMakeLists.txt deleted file mode 100644 index 458981ad5eb24..0000000000000 --- a/recipes/box2d/all/test_v1_package/CMakeLists.txt +++ /dev/null @@ -1,8 +0,0 @@ -cmake_minimum_required(VERSION 3.4) -project(test_package) - -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup() - -add_executable(test_package ../test_package/test_package.cpp) -target_link_libraries(test_package ${CONAN_LIBS}) diff --git a/recipes/box2d/all/test_v1_package/conanfile.py b/recipes/box2d/all/test_v1_package/conanfile.py deleted file mode 100644 index 133228fb54665..0000000000000 --- a/recipes/box2d/all/test_v1_package/conanfile.py +++ /dev/null @@ -1,17 +0,0 @@ -import os -from conans import ConanFile, CMake, tools - - -class Box2DTestConan(ConanFile): - settings = "os", "compiler", "build_type", "arch" - generators = "cmake" - - def build(self): - cmake = CMake(self) - cmake.configure() - cmake.build() - - def test(self): - if not tools.cross_building(self.settings): - bin_path = os.path.join("bin", "test_package") - self.run(bin_path, run_environment=True) diff --git a/recipes/box2d/config.yml b/recipes/box2d/config.yml index 1922ed59d887d..476a7f5aa4a7c 100644 --- a/recipes/box2d/config.yml +++ b/recipes/box2d/config.yml @@ -1,7 +1,9 @@ versions: - "2.3.1": + "3.0.0": + folder: "all" + "2.4.2": folder: "all" - "2.4.0": - folder: "2.4.x" "2.4.1": - folder: "2.4.x" + folder: "all" + "2.4.0": + folder: "all" diff --git a/recipes/bredis/all/conandata.yml b/recipes/bredis/all/conandata.yml new file mode 100644 index 0000000000000..b75947b37ddc5 --- /dev/null +++ b/recipes/bredis/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "0.12": + url: "https://github.com/basiliscos/cpp-bredis/archive/refs/tags/v0.12.tar.gz" + sha256: "c5a6aa58835d5ef8cd97c4ae7e677f6237ef4ee01ae4a609293e2351c01db6cc" diff --git a/recipes/bredis/all/conanfile.py b/recipes/bredis/all/conanfile.py new file mode 100644 index 0000000000000..c73f99338488a --- /dev/null +++ b/recipes/bredis/all/conanfile.py @@ -0,0 +1,57 @@ +from conan import ConanFile +from conan.tools.build import check_min_cppstd +from conan.tools.files import get, copy +from conan.tools.layout import basic_layout +import os + +required_conan_version = ">=1.52.0" + +class BredisConan(ConanFile): + name = "bredis" + description = "Boost::ASIO low-level redis client (connector)" + license = "MIT" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/basiliscos/cpp-bredis" + topics = ("redis", "network", "asio", "header-only") + package_type = "header-library" + settings = "os", "arch", "compiler", "build_type" + no_copy_source = True + + @property + def _min_cppstd(self): + return 11 + + def layout(self): + basic_layout(self, src_folder="src") + + def requirements(self): + self.requires("boost/1.85.0") + + def package_id(self): + self.info.clear() + + def validate(self): + if self.settings.compiler.get_safe("cppstd"): + check_min_cppstd(self, self._min_cppstd) + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def package(self): + copy(self, pattern="LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) + copy( + self, + pattern="*.hpp", + dst=os.path.join(self.package_folder, "include"), + src=os.path.join(self.source_folder, "include"), + ) + copy( + self, + pattern="*.ipp", + dst=os.path.join(self.package_folder, "include"), + src=os.path.join(self.source_folder, "include"), + ) + + def package_info(self): + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] diff --git a/recipes/bredis/all/test_package/CMakeLists.txt b/recipes/bredis/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..ede594d5b149f --- /dev/null +++ b/recipes/bredis/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) + +find_package(bredis REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE bredis::bredis) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) diff --git a/recipes/bredis/all/test_package/conanfile.py b/recipes/bredis/all/test_package/conanfile.py new file mode 100644 index 0000000000000..b9d7f11e89dcd --- /dev/null +++ b/recipes/bredis/all/test_package/conanfile.py @@ -0,0 +1,25 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake +import os + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def layout(self): + cmake_layout(self) + + def requirements(self): + self.requires(self.tested_reference_str) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/bredis/all/test_package/test_package.cpp b/recipes/bredis/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..9a85a98f4bd7f --- /dev/null +++ b/recipes/bredis/all/test_package/test_package.cpp @@ -0,0 +1,12 @@ +#include +#include + +#include "bredis/Connection.hpp" +#include "bredis/MarkerHelpers.hpp" + +int main(int argc, const char **argv) { + // Basic test avoiding any kind of access to network layer + bredis::bredis_category category; + std::cout << category.name() << '\n'; + return 0; +} diff --git a/recipes/bredis/config.yml b/recipes/bredis/config.yml new file mode 100644 index 0000000000000..f30ab3fc58bb9 --- /dev/null +++ b/recipes/bredis/config.yml @@ -0,0 +1,3 @@ +versions: + "0.12": + folder: all diff --git a/recipes/bvdberg-ctest/all/conandata.yml b/recipes/bvdberg-ctest/all/conandata.yml index c756f17b12c18..31bd2b82ba362 100644 --- a/recipes/bvdberg-ctest/all/conandata.yml +++ b/recipes/bvdberg-ctest/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.1.0": + url: "https://github.com/bvdberg/ctest/archive/1.1.0.tar.gz" + sha256: "6792d7a21f62ec9caa64fc5106c8c8eed9201f1d98571917d370d0b5af721f49" "1.0.0": - sha256: 80c5899f529dc57c1eb44113fe452cd90fd69cd1ab3a0431635282f56837205c - url: https://github.com/bvdberg/ctest/archive/1.0.0.tar.gz + url: "https://github.com/bvdberg/ctest/archive/1.0.0.tar.gz" + sha256: "80c5899f529dc57c1eb44113fe452cd90fd69cd1ab3a0431635282f56837205c" diff --git a/recipes/bvdberg-ctest/all/conanfile.py b/recipes/bvdberg-ctest/all/conanfile.py index 7786a8fb5c6c8..28b74d733c02a 100644 --- a/recipes/bvdberg-ctest/all/conanfile.py +++ b/recipes/bvdberg-ctest/all/conanfile.py @@ -6,14 +6,13 @@ required_conan_version = ">=1.50.0" - class BvdbergCtestConan(ConanFile): name = "bvdberg-ctest" + description = "ctest is a unit test framework for software written in C." license = "Apache-2.0" - homepage = "https://github.com/bvdberg/ctest" url = "https://github.com/conan-io/conan-center-index" - description = "ctest is a unit test framework for software written in C." - topics = ("testing", "testing-framework", "unit-testing") + homepage = "https://github.com/bvdberg/ctest" + topics = ("testing", "testing-framework", "unit-testing", "header-only") package_type = "header-library" settings = "os", "arch", "compiler", "build_type" no_copy_source = True @@ -26,14 +25,11 @@ def package_id(self): def validate(self): if self.settings.os == "Windows": - raise ConanInvalidConfiguration("Windows not supported") + raise ConanInvalidConfiguration(f"{self.ref} does not support Windows.") def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) - def build(self): - pass - def package(self): copy(self, "LICENSE", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) copy(self, "*.h", src=self.source_folder, dst=os.path.join(self.package_folder, "include")) diff --git a/recipes/bvdberg-ctest/all/test_package/conanfile.py b/recipes/bvdberg-ctest/all/test_package/conanfile.py index d120a992c06a6..8a5bb47f50c4c 100644 --- a/recipes/bvdberg-ctest/all/test_package/conanfile.py +++ b/recipes/bvdberg-ctest/all/test_package/conanfile.py @@ -7,6 +7,7 @@ class TestPackageConan(ConanFile): settings = "os", "arch", "compiler", "build_type" generators = "CMakeToolchain", "CMakeDeps", "VirtualRunEnv" + test_type = "explicit" def requirements(self): self.requires(self.tested_reference_str) diff --git a/recipes/bvdberg-ctest/all/test_v1_package/CMakeLists.txt b/recipes/bvdberg-ctest/all/test_v1_package/CMakeLists.txt deleted file mode 100644 index fd0d83ce8ad41..0000000000000 --- a/recipes/bvdberg-ctest/all/test_v1_package/CMakeLists.txt +++ /dev/null @@ -1,10 +0,0 @@ -cmake_minimum_required(VERSION 3.1) -project(test_package LANGUAGES C) - -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) - -find_package(bvdberg-ctest REQUIRED CONFIG) - -add_executable(${PROJECT_NAME} ../test_package/test_package.c) -target_link_libraries(${PROJECT_NAME} PRIVATE bvdberg-ctest::bvdberg-ctest) diff --git a/recipes/bvdberg-ctest/all/test_v1_package/conanfile.py b/recipes/bvdberg-ctest/all/test_v1_package/conanfile.py deleted file mode 100644 index f2243371b7f1d..0000000000000 --- a/recipes/bvdberg-ctest/all/test_v1_package/conanfile.py +++ /dev/null @@ -1,17 +0,0 @@ -from conans import ConanFile, CMake, tools -import os - - -class TestPackageConan(ConanFile): - settings = "os", "arch", "compiler", "build_type" - generators = "cmake", "cmake_find_package_multi" - - def build(self): - cmake = CMake(self) - cmake.configure() - cmake.build() - - def test(self): - if not tools.cross_building(self): - bin_path = os.path.join("bin", "test_package") - bin_path = self.run(bin_path, run_environment=True) diff --git a/recipes/bvdberg-ctest/config.yml b/recipes/bvdberg-ctest/config.yml index c7f13630776fb..fcbfca5b9011e 100644 --- a/recipes/bvdberg-ctest/config.yml +++ b/recipes/bvdberg-ctest/config.yml @@ -1,3 +1,5 @@ versions: + "1.1.0": + folder: "all" "1.0.0": folder: "all" diff --git a/recipes/bx/all/conanfile.py b/recipes/bx/all/conanfile.py index c1e1bfa91952f..cc80401d96abd 100644 --- a/recipes/bx/all/conanfile.py +++ b/recipes/bx/all/conanfile.py @@ -105,7 +105,7 @@ def build(self): if is_msvc(self): # Conan to Genie translation maps vs_ver_to_genie = {"17": "2022", "16": "2019", "15": "2017", - "193": "2022", "192": "2019", "191": "2017"} + "194": "2022", "193": "2022", "192": "2019", "191": "2017"} # Use genie directly, then msbuild on specific projects based on requirements genie_VS = f"vs{vs_ver_to_genie[str(self.settings.compiler.version)]}" diff --git a/recipes/byte-lite/all/conanfile.py b/recipes/byte-lite/all/conanfile.py index 67d695dbd0333..b53cb06ab6fdb 100644 --- a/recipes/byte-lite/all/conanfile.py +++ b/recipes/byte-lite/all/conanfile.py @@ -14,18 +14,18 @@ class ByteLiteConan(ConanFile): C++98, C++11 and later") topics = ("cpp11", "cpp14", "cpp17", "byte", "byte-implementations") license = "BSL-1.0" + package_type = "header-library" settings = "os", "arch", "compiler", "build_type" no_copy_source = True - def package_id(self): - self.info.clear() - def layout(self): basic_layout(self, src_folder="src") + def package_id(self): + self.info.clear() + def source(self): - get(self, **self.conan_data["sources"][self.version], - destination=self.source_folder, strip_root=True) + get(self, **self.conan_data["sources"][self.version], strip_root=True) def build(self): pass @@ -38,19 +38,4 @@ def package_info(self): self.cpp_info.set_property("cmake_file_name", "byte-lite") self.cpp_info.set_property("cmake_target_name", "nonstd::byte-lite") self.cpp_info.bindirs = [] - self.cpp_info.frameworkdirs = [] self.cpp_info.libdirs = [] - self.cpp_info.resdirs = [] - - # TODO: to remove in conan v2 once cmake_find_package* generators removed - self.cpp_info.filenames["cmake_find_package"] = "byte-lite" - self.cpp_info.filenames["cmake_find_package_multi"] = "byte-lite" - self.cpp_info.names["cmake_find_package"] = "nonstd" - self.cpp_info.names["cmake_find_package_multi"] = "nonstd" - self.cpp_info.components["bytelite"].names["cmake_find_package"] = "byte-lite" - self.cpp_info.components["bytelite"].names["cmake_find_package_multi"] = "byte-lite" - self.cpp_info.components["bytelite"].set_property("cmake_target_name", "nonstd::byte-lite") - self.cpp_info.components["bytelite"].bindirs = [] - self.cpp_info.components["bytelite"].frameworkdirs = [] - self.cpp_info.components["bytelite"].libdirs = [] - self.cpp_info.components["bytelite"].resdirs = [] diff --git a/recipes/byte-lite/all/test_package/test_package.cpp b/recipes/byte-lite/all/test_package/test_package.cpp index bf423f8963b2a..62a18e7db80fc 100644 --- a/recipes/byte-lite/all/test_package/test_package.cpp +++ b/recipes/byte-lite/all/test_package/test_package.cpp @@ -1,14 +1,8 @@ #include "nonstd/byte.hpp" -#include - -using namespace nonstd; +#include int main() { - byte b1 = to_byte( 0x5a ); // to_byte() is non-standard, needed for pre-C++17 - byte b2 = to_byte( 0xa5 ); - - byte r1 = b1 ^ b2; if( 0xff != to_integer( r1 ) ) throw std::exception(); // not (yet) standard, needs C++11 - byte r2 = b1 ^ b2; if( 0xff != to_integer( r2 ) ) throw std::exception(); + std::cout << "Byte lite version: " << byte_lite_VERSION << ", Test package successful\n"; } diff --git a/recipes/byte-lite/all/test_v1_package/CMakeLists.txt b/recipes/byte-lite/all/test_v1_package/CMakeLists.txt deleted file mode 100644 index 65ad56138429f..0000000000000 --- a/recipes/byte-lite/all/test_v1_package/CMakeLists.txt +++ /dev/null @@ -1,10 +0,0 @@ -cmake_minimum_required(VERSION 3.1) -project(test_package LANGUAGES CXX) - -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) - -find_package(byte-lite REQUIRED CONFIG) - -add_executable(${PROJECT_NAME} ../test_package/test_package.cpp) -target_link_libraries(${PROJECT_NAME} PRIVATE nonstd::byte-lite) diff --git a/recipes/bzip2/all/conanfile.py b/recipes/bzip2/all/conanfile.py index 2a39045a8299d..ce77ac1450e7d 100644 --- a/recipes/bzip2/all/conanfile.py +++ b/recipes/bzip2/all/conanfile.py @@ -12,7 +12,7 @@ class Bzip2Conan(ConanFile): name = "bzip2" url = "https://github.com/conan-io/conan-center-index" homepage = "https://sourceware.org/bzip2" - license = "bzip2-1.0.8" + license = "bzip2-1.0.6" description = "bzip2 is a free and open-source file compression program that uses the Burrows Wheeler algorithm." topics = ("data-compressor", "file-compression") package_type = "library" diff --git a/recipes/c-ares/all/conandata.yml b/recipes/c-ares/all/conandata.yml index 3a07eb4a811b8..09ee1b4f0a111 100644 --- a/recipes/c-ares/all/conandata.yml +++ b/recipes/c-ares/all/conandata.yml @@ -1,34 +1,35 @@ sources: - "1.28.1": - url: "https://github.com/c-ares/c-ares/releases/download/cares-1_28_1/c-ares-1.28.1.tar.gz" - sha256: "675a69fc54ddbf42e6830bc671eeb6cd89eeca43828eb413243fd2c0a760809d" - "1.27.0": - url: "https://github.com/c-ares/c-ares/releases/download/cares-1_27_0/c-ares-1.27.0.tar.gz" - sha256: "0a72be66959955c43e2af2fbd03418e82a2bd5464604ec9a62147e37aceb420b" - "1.26.0": - url: "https://github.com/c-ares/c-ares/releases/download/cares-1_26_0/c-ares-1.26.0.tar.gz" - sha256: "bed58c4f02b009080ebda6c2467ba469722ac6aebbf4497dc44a83d8c6194e50" + "1.34.3": + url: "https://github.com/c-ares/c-ares/releases/download/v1.34.3/c-ares-1.34.3.tar.gz" + sha256: "26e1f7771da23e42a18fdf1e58912a396629e53a2ac71b130af93bbcfb90adbe" + "1.34.1": + url: "https://github.com/c-ares/c-ares/releases/download/v1.34.1/c-ares-1.34.1.tar.gz" + sha256: "7e846f1742ab5998aced36d170408557de5292b92ec404fb0f7422f946d60103" + "1.33.1": + url: "https://github.com/c-ares/c-ares/releases/download/v1.33.1/c-ares-1.33.1.tar.gz" + sha256: "06869824094745872fa26efd4c48e622b9bd82a89ef0ce693dc682a23604f415" + "1.33.0": + url: "https://github.com/c-ares/c-ares/releases/download/v1.33.0/c-ares-1.33.0.tar.gz" + sha256: "3e41df2f172041eb4ecb754a464c11ccc5046b2a1c8b1d6a40dac45d3a3b2346" + "1.32.3": + url: "https://github.com/c-ares/c-ares/releases/download/v1.32.3/c-ares-1.32.3.tar.gz" + sha256: "5f02cc809aac3f6cc5edc1fac6c4423fd5616d7406ce47b904c24adf0ff2cd0f" + "1.32.2": + url: "https://github.com/c-ares/c-ares/releases/download/v1.32.2/c-ares-1.32.2.tar.gz" + sha256: "072ff6b30b9682d965b87eb9b77851dc1cd8e6d8090f6821a56bd8fa89595061" + "1.32.1": + url: "https://github.com/c-ares/c-ares/releases/download/v1.32.1/c-ares-1.32.1.tar.gz" + sha256: "63be2c4ee121faa47e9766f735b4cde750fff2c563f81c11e572d3dc6401e5e7" + "1.31.0": + url: "https://github.com/c-ares/c-ares/releases/download/v1.31.0/c-ares-1.31.0.tar.gz" + sha256: "0167a33dba96ca8de29f3f598b1e6cabe531799269fd63d0153aa0e6f5efeabd" + # keep 1.25.0 for libnghttp2, trantor, libcoro "1.25.0": url: "https://github.com/c-ares/c-ares/releases/download/cares-1_25_0/c-ares-1.25.0.tar.gz" sha256: "71832b93a48f5ff579c505f4869120c14e57b783275367207f1a98314aa724e5" - "1.22.1": - url: "https://github.com/c-ares/c-ares/releases/download/cares-1_22_1/c-ares-1.22.1.tar.gz" - sha256: "f67c180deb799c670d9dda995a18ce06f6c7320b6c6363ff8fa85b77d0da9db8" - "1.22.0": - url: "https://github.com/c-ares/c-ares/releases/download/cares-1_22_0/c-ares-1.22.0.tar.gz" - sha256: "ad2e205088083317147c9f9eab5f24b82c3d50927c381a7c963deeb1182dbc21" - "1.21.0": - url: "https://github.com/c-ares/c-ares/releases/download/cares-1_21_0/c-ares-1.21.0.tar.gz" - sha256: "cd7aa3af1d3ee780d6437039a7ddb7f1ec029f9c4f7aabb0197e384eb5bc2f2d" - "1.20.1": - url: "https://github.com/c-ares/c-ares/releases/download/cares-1_20_1/c-ares-1.20.1.tar.gz" - sha256: "de24a314844cb157909730828560628704f4f896d167dd7da0fa2fb93ea18b10" - "1.19.1": - url: "https://github.com/c-ares/c-ares/releases/download/cares-1_19_1/c-ares-1.19.1.tar.gz" - sha256: "321700399b72ed0e037d0074c629e7741f6b2ec2dda92956abe3e9671d3e268e" - "1.19.0": - url: "https://github.com/c-ares/c-ares/releases/download/cares-1_19_0/c-ares-1.19.0.tar.gz" - sha256: "bfceba37e23fd531293829002cac0401ef49a6dc55923f7f92236585b7ad1dd3" - "1.18.1": - url: "https://github.com/c-ares/c-ares/releases/download/cares-1_18_1/c-ares-1.18.1.tar.gz" - sha256: "1a7d52a8a84a9fbffb1be9133c0f6e17217d91ea5a6fa61f6b4729cda78ebbcf" +patches: + "1.33.0": + - patch_file: "patches/1.33.0-0001-fix-tcp-fastopen.patch" + patch_description: "fix compilation error for TCP_FASTOPEN_CONNECT" + patch_type: "portability" + patch_source: "https://github.com/c-ares/c-ares/commit/4abdf7de3678d98f474bd2abeedea741f6c50231" diff --git a/recipes/c-ares/all/conanfile.py b/recipes/c-ares/all/conanfile.py index 48b02d5029162..e4428917c336f 100644 --- a/recipes/c-ares/all/conanfile.py +++ b/recipes/c-ares/all/conanfile.py @@ -1,7 +1,7 @@ from conan import ConanFile from conan.tools.apple import is_apple_os from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout -from conan.tools.files import collect_libs, copy, get, rm, rmdir +from conan.tools.files import collect_libs, copy, get, rm, rmdir, apply_conandata_patches, export_conandata_patches from conan.tools.scm import Version import os @@ -10,12 +10,11 @@ class CAresConan(ConanFile): name = "c-ares" + description = "A C library for asynchronous DNS requests" license = "MIT" url = "https://github.com/conan-io/conan-center-index" - description = "A C library for asynchronous DNS requests" - topics = ("dns", "resolver", "async") homepage = "https://c-ares.haxx.se/" - + topics = ("dns", "resolver", "async") package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { @@ -29,6 +28,9 @@ class CAresConan(ConanFile): "tools": True, } + def export_sources(self): + export_conandata_patches(self) + def config_options(self): if self.settings.os == "Windows": del self.options.fPIC @@ -55,6 +57,7 @@ def generate(self): tc.generate() def build(self): + apply_conandata_patches(self) cmake = CMake(self) cmake.configure() cmake.build() @@ -83,8 +86,7 @@ def package_info(self): self.cpp_info.components["cares"].system_libs.append("pthread") elif self.settings.os == "Windows": self.cpp_info.components["cares"].system_libs.extend(["ws2_32", "advapi32"]) - if Version(self.version) >= "1.18.0": - self.cpp_info.components["cares"].system_libs.append("iphlpapi") + self.cpp_info.components["cares"].system_libs.append("iphlpapi") elif is_apple_os(self): self.cpp_info.components["cares"].system_libs.append("resolv") diff --git a/recipes/c-ares/all/patches/1.33.0-0001-fix-tcp-fastopen.patch b/recipes/c-ares/all/patches/1.33.0-0001-fix-tcp-fastopen.patch new file mode 100644 index 0000000000000..a5aff6174105f --- /dev/null +++ b/recipes/c-ares/all/patches/1.33.0-0001-fix-tcp-fastopen.patch @@ -0,0 +1,13 @@ +diff --git a/src/lib/ares__socket.c b/src/lib/ares__socket.c +index 2e360ef..86e281f 100644 +--- a/src/lib/ares__socket.c ++++ b/src/lib/ares__socket.c +@@ -56,7 +56,7 @@ + #include + #include + +-#if defined(__linux__) && defined(MSG_FASTOPEN) ++#if defined(__linux__) && defined(TCP_FASTOPEN_CONNECT) + # define TFO_SUPPORTED 1 + # define TFO_SKIP_CONNECT 0 + # define TFO_USE_SENDTO 0 diff --git a/recipes/c-ares/all/test_package/test_package.c b/recipes/c-ares/all/test_package/test_package.c index 0023e9dae2282..0636b1f4dce35 100644 --- a/recipes/c-ares/all/test_package/test_package.c +++ b/recipes/c-ares/all/test_package/test_package.c @@ -103,7 +103,6 @@ main(void) return 1; } - ares_gethostbyname(channel, "google.com", AF_INET, callback, NULL); wait_ares(channel); ares_destroy(channel); ares_library_cleanup(); diff --git a/recipes/c-ares/config.yml b/recipes/c-ares/config.yml index 78e892e1326a4..18797eb3802c4 100644 --- a/recipes/c-ares/config.yml +++ b/recipes/c-ares/config.yml @@ -1,23 +1,19 @@ versions: - "1.28.1": + "1.34.3": folder: all - "1.27.0": + "1.34.1": folder: all - "1.26.0": + "1.33.1": folder: all - "1.25.0": - folder: all - "1.22.1": + "1.33.0": folder: all - "1.22.0": + "1.32.3": folder: all - "1.21.0": + "1.32.2": folder: all - "1.20.1": + "1.32.1": folder: all - "1.19.1": + "1.31.0": folder: all - "1.19.0": - folder: all - "1.18.1": + "1.25.0": folder: all diff --git a/recipes/c-blosc2/all/conandata.yml b/recipes/c-blosc2/all/conandata.yml index 6975b1d26667a..5b441b6002794 100644 --- a/recipes/c-blosc2/all/conandata.yml +++ b/recipes/c-blosc2/all/conandata.yml @@ -1,4 +1,10 @@ sources: + "2.15.0": + url: "https://github.com/Blosc/c-blosc2/archive/v2.15.0.tar.gz" + sha256: "1e7d9d099963ad0123ddd76b2b715b5aa1ea4b95c491d3a11508e487ebab7307" + "2.14.4": + url: "https://github.com/Blosc/c-blosc2/archive/v2.14.4.tar.gz" + sha256: "b5533c79aacc9ac152c80760ed1295a6608938780c3e1eecd7e53ea72ad986b0" "2.13.1": url: "https://github.com/Blosc/c-blosc2/archive/v2.13.1.tar.gz" sha256: "6e7f5940269acd54d8dfe87c2102a442ad0407b1a62266a6f916134bae234399" @@ -14,38 +20,32 @@ sources: "2.10.5": url: "https://github.com/Blosc/c-blosc2/archive/v2.10.5.tar.gz" sha256: "a88f94bf839c1371aab8207a6a43698ceb92c72f65d0d7fe5b6e59f24c138b4d" - "2.8.0": - url: "https://github.com/Blosc/c-blosc2/archive/v2.8.0.tar.gz" - sha256: "be608cdf68deb02e0d3ee62e183942a0fe5d5d3185375b9b6566e2ae35a9bdbd" - "2.6.1": - url: "https://github.com/Blosc/c-blosc2/archive/v2.6.1.tar.gz" - sha256: "514a793368093893c1a7cae030f7e31faca7f86465ae69dd576f256d8bf28c08" patches: + "2.15.0": + - patch_file: "patches/2.10.5-0001-fix-cmake.patch" + patch_description: "use cci package" + patch_type: "conan" + "2.14.4": + - patch_file: "patches/2.10.5-0001-fix-cmake.patch" + patch_description: "use cci package" + patch_type: "conan" "2.13.1": - - patch_file: "patches/2.11.1-0001-fix-cmake.patch" + - patch_file: "patches/2.10.5-0001-fix-cmake.patch" patch_description: "use cci package" patch_type: "conan" "2.13.0": - - patch_file: "patches/2.11.1-0001-fix-cmake.patch" + - patch_file: "patches/2.10.5-0001-fix-cmake.patch" patch_description: "use cci package" patch_type: "conan" "2.12.0": - - patch_file: "patches/2.11.1-0001-fix-cmake.patch" + - patch_file: "patches/2.10.5-0001-fix-cmake.patch" patch_description: "use cci package" patch_type: "conan" "2.11.3": - - patch_file: "patches/2.11.1-0001-fix-cmake.patch" + - patch_file: "patches/2.10.5-0001-fix-cmake.patch" patch_description: "use cci package" patch_type: "conan" "2.10.5": - patch_file: "patches/2.10.5-0001-fix-cmake.patch" patch_description: "use cci package" patch_type: "conan" - "2.8.0": - - patch_file: "patches/2.8.0-0001-fix-cmake.patch" - patch_description: "use cci package" - patch_type: "conan" - "2.6.1": - - patch_file: "patches/2.6.0-0001-fix-cmake.patch" - patch_description: "use cci package" - patch_type: "conan" diff --git a/recipes/c-blosc2/all/conanfile.py b/recipes/c-blosc2/all/conanfile.py index 33223628423bf..658605c2a4d22 100644 --- a/recipes/c-blosc2/all/conanfile.py +++ b/recipes/c-blosc2/all/conanfile.py @@ -2,7 +2,7 @@ from conan.errors import ConanInvalidConfiguration from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout from conan.tools.env import VirtualBuildEnv -from conan.tools.files import export_conandata_patches, apply_conandata_patches, get, copy, rm, rmdir +from conan.tools.files import get, copy, rm, rmdir, export_conandata_patches, apply_conandata_patches from conan.tools.microsoft import is_msvc from conan.tools.scm import Version @@ -68,7 +68,7 @@ def requirements(self): if self.options.with_lz4: self.requires("lz4/1.9.4") if self.options.with_zlib in ["zlib-ng", "zlib-ng-compat"]: - self.requires("zlib-ng/2.1.6") + self.requires("zlib-ng/2.2.0") elif self.options.with_zlib == "zlib": self.requires("zlib/[>=1.2.11 <2]") if self.options.with_zstd: @@ -114,6 +114,13 @@ def generate(self): tc.generate() deps = CMakeDeps(self) + if self.options.with_lz4: + deps.set_property("lz4", "cmake_file_name", "LZ4") + if self.options.with_zlib =="zlib-ng": + deps.set_property("zlib-ng", "cmake_file_name", "ZLIB_NG") + deps.set_property("zlib-ng", "cmake_target_name", "ZLIB_NG::ZLIB_NG") + if self.options.with_zstd: + deps.set_property("zstd", "cmake_file_name", "ZSTD") deps.generate() def _patch_sources(self): diff --git a/recipes/c-blosc2/all/patches/2.10.5-0001-fix-cmake.patch b/recipes/c-blosc2/all/patches/2.10.5-0001-fix-cmake.patch index 743a69c503d24..7b59364e4a949 100644 --- a/recipes/c-blosc2/all/patches/2.10.5-0001-fix-cmake.patch +++ b/recipes/c-blosc2/all/patches/2.10.5-0001-fix-cmake.patch @@ -1,138 +1,54 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 19e203a..aa6ccdd 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -167,26 +167,26 @@ else() - endif() - - if(PREFER_EXTERNAL_LZ4) -- find_package(LZ4) -+ find_package(lz4) - else() - message(STATUS "Using LZ4 internal sources.") - endif() - - if(NOT DEACTIVATE_ZLIB) - if(PREFER_EXTERNAL_ZLIB) -- find_package(ZLIB_NG) -- if(ZLIB_NG_FOUND) -+ find_package(zlib-ng) -+ if(zlib-ng_FOUND) - set(HAVE_ZLIB_NG TRUE) - else() - find_package(ZLIB) - endif() - -- if(NOT (ZLIB_NG_FOUND OR ZLIB_FOUND)) -+ if(NOT (zlib-ng_FOUND OR ZLIB_FOUND)) - message(STATUS "No ZLIB found. Using ZLIB-NG internal sources.") - endif() - endif() - -- if(NOT (ZLIB_NG_FOUND OR ZLIB_FOUND)) -+ if(0) - message(STATUS "Using ZLIB-NG internal sources for ZLIB support.") - set(HAVE_ZLIB_NG TRUE) - add_definitions(-DZLIB_COMPAT) -@@ -207,8 +207,8 @@ endif() - - if(NOT DEACTIVATE_ZSTD) - if(PREFER_EXTERNAL_ZSTD) -- find_package(ZSTD) -- if(NOT ZSTD_FOUND) -+ find_package(zstd) -+ if(NOT zstd_FOUND) - message(STATUS "No ZSTD library found. Using internal sources.") - endif() - else() diff --git a/blosc/CMakeLists.txt b/blosc/CMakeLists.txt index 8c7cf90..f7efbf5 100644 --- a/blosc/CMakeLists.txt +++ b/blosc/CMakeLists.txt -@@ -79,15 +79,15 @@ set(INTERNAL_LIBS ${PROJECT_SOURCE_DIR}/internal-complibs) +@@ -79,8 +79,8 @@ set(INTERNAL_LIBS ${PROJECT_SOURCE_DIR}/internal-complibs) # link dependencies # "link" dependent targets via target_link_libraries (preferred) and # manually add includes / libs for others -if(LZ4_FOUND) +if(lz4_FOUND) if(BUILD_SHARED) -- target_include_directories(blosc2_shared PUBLIC ${LZ4_INCLUDE_DIR}) -+ target_include_directories(blosc2_shared PUBLIC ${lz4_INCLUDE_DIR}) + target_include_directories(blosc2_shared PUBLIC ${LZ4_INCLUDE_DIR}) endif() if(BUILD_STATIC) -- target_include_directories(blosc2_static PUBLIC ${LZ4_INCLUDE_DIR}) -+ target_include_directories(blosc2_static PUBLIC ${lz4_INCLUDE_DIR}) - endif() - if(BUILD_TESTS) -- target_include_directories(blosc_testing PUBLIC ${LZ4_INCLUDE_DIR}) -+ target_include_directories(blosc_testing PUBLIC ${lz4_INCLUDE_DIR}) - endif() - else() - set(LZ4_LOCAL_DIR ${INTERNAL_LIBS}/lz4-1.9.4) -@@ -138,18 +138,18 @@ if(NOT DEACTIVATE_ZLIB) +@@ -138,8 +138,8 @@ if(NOT DEACTIVATE_ZLIB) endif() - + if(NOT DEACTIVATE_ZSTD) - if(ZSTD_FOUND) + if(zstd_FOUND) if(BUILD_SHARED) -- target_include_directories(blosc2_shared PUBLIC ${ZSTD_INCLUDE_DIR}) -- target_link_libraries(blosc2_shared PUBLIC ${ZSTD_LIBRARY}) -+ target_include_directories(blosc2_shared PUBLIC ${zstd_INCLUDE_DIR}) -+ target_link_libraries(blosc2_shared PUBLIC ${zstd_LIBRARY}) - endif() - if(BUILD_STATIC) - target_include_directories(blosc2_static PUBLIC ${ZSTD_INCLUDE_DIR}) -- target_link_libraries(blosc2_static PUBLIC ${ZSTD_LIBRARY}) -+ target_link_libraries(blosc2_static PUBLIC ${zstd_LIBRARY}) + target_include_directories(blosc2_shared PUBLIC ${ZSTD_INCLUDE_DIR}) + target_link_libraries(blosc2_shared PUBLIC ${ZSTD_LIBRARY}) endif() - if(BUILD_TESTS) -- target_include_directories(blosc_testing PUBLIC ${ZSTD_INCLUDE_DIR}) -- target_link_libraries(blosc_testing PUBLIC ${ZSTD_LIBRARY}) -+ target_include_directories(blosc_testing PUBLIC ${zstd_INCLUDE_DIR}) -+ target_link_libraries(blosc_testing PUBLIC ${zstd_LIBRARY}) - endif() - else() - set(ZSTD_LOCAL_DIR ${INTERNAL_LIBS}/zstd-1.5.5) @@ -184,8 +184,8 @@ if(NOT WIN32) set(LIBS ${LIBS} ${CMAKE_DL_LIBS}) endif() - + -if(LZ4_FOUND) -- set(LIBS ${LIBS} ${LZ4_LIBRARY}) +if(lz4_FOUND) -+ set(LIBS ${LIBS} ${lz4_LIBRARIES}) + set(LIBS ${LIBS} ${LZ4_LIBRARY}) else() file(GLOB LZ4_FILES ${LZ4_LOCAL_DIR}/*.c) list(APPEND SOURCES ${LZ4_FILES}) @@ -193,8 +193,8 @@ else() endif() - + if(NOT DEACTIVATE_ZLIB) - if(ZLIB_NG_FOUND) -- set(LIBS ${LIBS} ${ZLIB_NG_LIBRARY}) + if(zlib-ng_FOUND) -+ set(LIBS ${LIBS} ${zlib-ng_LIBRARIES}) + set(LIBS ${LIBS} ${ZLIB_NG_LIBRARY}) elseif(ZLIB_FOUND) set(LIBS ${LIBS} ${ZLIB_LIBRARIES}) else() @@ -206,8 +206,8 @@ if(NOT DEACTIVATE_ZLIB) endif() - + if(NOT DEACTIVATE_ZSTD) - if(ZSTD_FOUND) -- set(LIBS ${LIBS} ${ZSTD_LIBRARY}) + if(zstd_FOUND) -+ set(LIBS ${LIBS} ${zstd_LIBRARIES}) + set(LIBS ${LIBS} ${ZSTD_LIBRARY}) else() # Enable assembly code only when not using MSVC *and* x86 is there if((NOT MSVC) AND COMPILER_SUPPORT_SSE2) # if SSE2 is here, this is an x86 platform -@@ -262,7 +262,7 @@ list(APPEND SOURCES - blosc/directories.c - blosc/blosc2-stdio.c - blosc/b2nd.c -- blosc/b2nd_utils.c -+ blosc/b2nd_utils.c - ) - if(NOT CMAKE_SYSTEM_PROCESSOR STREQUAL arm64) - if(COMPILER_SUPPORT_SSE2) diff --git a/recipes/c-blosc2/all/patches/2.11.1-0001-fix-cmake.patch b/recipes/c-blosc2/all/patches/2.11.1-0001-fix-cmake.patch deleted file mode 100644 index 5a88b5696c4af..0000000000000 --- a/recipes/c-blosc2/all/patches/2.11.1-0001-fix-cmake.patch +++ /dev/null @@ -1,124 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index bff2f36..581f189 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -171,26 +171,26 @@ else() - endif() - - if(PREFER_EXTERNAL_LZ4) -- find_package(LZ4) -+ find_package(lz4) - else() - message(STATUS "Using LZ4 internal sources.") - endif() - - if(NOT DEACTIVATE_ZLIB) - if(PREFER_EXTERNAL_ZLIB) -- find_package(ZLIB_NG) -- if(ZLIB_NG_FOUND) -+ find_package(zlib-ng) -+ if(zlib-ng_FOUND) - set(HAVE_ZLIB_NG TRUE) - else() - find_package(ZLIB) - endif() - -- if(NOT (ZLIB_NG_FOUND OR ZLIB_FOUND)) -+ if(NOT (zlib-ng_FOUND OR ZLIB_FOUND)) - message(STATUS "No ZLIB found. Using ZLIB-NG internal sources.") - endif() - endif() - -- if(NOT (ZLIB_NG_FOUND OR ZLIB_FOUND)) -+ if(0) - message(STATUS "Using ZLIB-NG internal sources for ZLIB support.") - set(HAVE_ZLIB_NG TRUE) - add_definitions(-DZLIB_COMPAT) -@@ -211,8 +211,8 @@ endif() - - if(NOT DEACTIVATE_ZSTD) - if(PREFER_EXTERNAL_ZSTD) -- find_package(ZSTD) -- if(NOT ZSTD_FOUND) -+ find_package(zstd) -+ if(NOT zstd_FOUND) - message(STATUS "No ZSTD library found. Using internal sources.") - endif() - else() -diff --git a/blosc/CMakeLists.txt b/blosc/CMakeLists.txt -index bf8527d..d467346 100644 ---- a/blosc/CMakeLists.txt -+++ b/blosc/CMakeLists.txt -@@ -79,15 +79,15 @@ set(INTERNAL_LIBS ${PROJECT_SOURCE_DIR}/internal-complibs) - # link dependencies - # "link" dependent targets via target_link_libraries (preferred) and - # manually add includes / libs for others --if(LZ4_FOUND) -+if(lz4_FOUND) - if(BUILD_SHARED) -- target_include_directories(blosc2_shared PUBLIC ${LZ4_INCLUDE_DIR}) -+ target_include_directories(blosc2_shared PUBLIC ${lz4_INCLUDE_DIR}) - endif() - if(BUILD_STATIC) -- target_include_directories(blosc2_static PUBLIC ${LZ4_INCLUDE_DIR}) -+ target_include_directories(blosc2_static PUBLIC ${lz4_INCLUDE_DIR}) - endif() - if(BUILD_TESTS) -- target_include_directories(blosc_testing PUBLIC ${LZ4_INCLUDE_DIR}) -+ target_include_directories(blosc_testing PUBLIC ${lz4_INCLUDE_DIR}) - endif() - else() - set(LZ4_LOCAL_DIR ${INTERNAL_LIBS}/lz4-1.9.4) -@@ -138,14 +138,14 @@ if(NOT DEACTIVATE_ZLIB) - endif() - - if(NOT DEACTIVATE_ZSTD) -- if(ZSTD_FOUND) -+ if(zstd_FOUND) - if(BUILD_SHARED) -- target_include_directories(blosc2_shared PUBLIC ${ZSTD_INCLUDE_DIR}) -- target_link_libraries(blosc2_shared PUBLIC ${ZSTD_LIBRARY}) -+ target_include_directories(blosc2_shared PUBLIC ${zstd_INCLUDE_DIR}) -+ target_link_libraries(blosc2_shared PUBLIC ${zstd_LIBRARIES}) - endif() - if(BUILD_STATIC) -- target_include_directories(blosc2_static PUBLIC ${ZSTD_INCLUDE_DIR}) -- target_link_libraries(blosc2_static PUBLIC ${ZSTD_LIBRARY}) -+ target_include_directories(blosc2_static PUBLIC ${zstd_INCLUDE_DIR}) -+ target_link_libraries(blosc2_static PUBLIC ${zstd_LIBRARIES}) - endif() - if(BUILD_TESTS) - target_include_directories(blosc_testing PUBLIC ${ZSTD_INCLUDE_DIR}) -@@ -184,8 +184,8 @@ if(NOT WIN32) - set(LIBS ${LIBS} ${CMAKE_DL_LIBS}) - endif() - --if(LZ4_FOUND) -- set(LIBS ${LIBS} ${LZ4_LIBRARY}) -+if(lz4_FOUND) -+ set(LIBS ${LIBS} ${lz4_LIBRARIES}) - else() - file(GLOB LZ4_FILES ${LZ4_LOCAL_DIR}/*.c) - list(APPEND SOURCES ${LZ4_FILES}) -@@ -193,8 +193,8 @@ else() - endif() - - if(NOT DEACTIVATE_ZLIB) -- if(ZLIB_NG_FOUND) -- set(LIBS ${LIBS} ${ZLIB_NG_LIBRARY}) -+ if(zlib-ng_FOUND) -+ set(LIBS ${LIBS} ${zlib-ng_LIBRARIES}) - elseif(ZLIB_FOUND) - set(LIBS ${LIBS} ${ZLIB_LIBRARIES}) - else() -@@ -206,8 +206,8 @@ if(NOT DEACTIVATE_ZLIB) - endif() - - if(NOT DEACTIVATE_ZSTD) -- if(ZSTD_FOUND) -- set(LIBS ${LIBS} ${ZSTD_LIBRARY}) -+ if(zstd_FOUND) -+ set(LIBS ${LIBS} ${zstd_LIBRARIES}) - else() - # Enable assembly code only when not using MSVC *and* x86 is there - if((NOT MSVC) AND COMPILER_SUPPORT_SSE2) # if SSE2 is here, this is an x86 platform diff --git a/recipes/c-blosc2/all/patches/2.6.0-0001-fix-cmake.patch b/recipes/c-blosc2/all/patches/2.6.0-0001-fix-cmake.patch deleted file mode 100644 index 5c30c1a180c48..0000000000000 --- a/recipes/c-blosc2/all/patches/2.6.0-0001-fix-cmake.patch +++ /dev/null @@ -1,122 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 43910d1..199ef1d 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -144,26 +144,26 @@ if(BUILD_LITE) - endif() - - if(PREFER_EXTERNAL_LZ4) -- find_package(LZ4) -+ find_package(lz4) - else() - message(STATUS "Using LZ4 internal sources.") - endif() - - if(NOT DEACTIVATE_ZLIB) - if(PREFER_EXTERNAL_ZLIB) -- find_package(ZLIB_NG) -- if(ZLIB_NG_FOUND) -- set(HAVE_ZLIB_NG TRUE) -+ find_package(zlib-ng) -+ if (zlib-ng_FOUND) -+ set(HAVE_ZLIB_NG TRUE) - else() - find_package(ZLIB) - endif() - -- if(NOT (ZLIB_NG_FOUND OR ZLIB_FOUND)) -+ if(NOT (zlib-ng_FOUND OR ZLIB_FOUND)) - message(STATUS "No ZLIB found. Using ZLIB-NG internal sources.") - endif() - endif() - -- if(NOT (ZLIB_NG_FOUND OR ZLIB_FOUND)) -+ if(0) - message(STATUS "Using ZLIB-NG internal sources for ZLIB support.") - set(HAVE_ZLIB_NG TRUE) - add_definitions(-DZLIB_COMPAT) -@@ -184,9 +184,9 @@ endif() - - if(NOT DEACTIVATE_ZSTD) - if(PREFER_EXTERNAL_ZSTD) -- find_package(ZSTD) -- if(NOT ZSTD_FOUND) -- message(STATUS "No ZSTD library found. Using internal sources.") -+ find_package(zstd) -+ if(NOT zstd_FOUND) -+ message(STATUS "No ZSTD library found. Using internal sources.") - endif() - else() - message(STATUS "Using ZSTD internal sources.") -diff --git a/blosc/CMakeLists.txt b/blosc/CMakeLists.txt -index 441bab6..f17e467 100644 ---- a/blosc/CMakeLists.txt -+++ b/blosc/CMakeLists.txt -@@ -10,16 +10,16 @@ set(CMAKE_C_VISIBILITY_PRESET hidden) - - # includes - set(BLOSC_INCLUDE_DIRS ${BLOSC_INCLUDE_DIRS} ${CMAKE_CURRENT_SOURCE_DIR}) --if(LZ4_FOUND) -- set(BLOSC_INCLUDE_DIRS ${BLOSC_INCLUDE_DIRS} ${LZ4_INCLUDE_DIR}) -+if(lz4_FOUND) -+ set(BLOSC_INCLUDE_DIRS ${BLOSC_INCLUDE_DIRS} ${lz4_INCLUDE_DIR}) - else() - set(LZ4_LOCAL_DIR ${INTERNAL_LIBS}/lz4-1.9.4) - set(BLOSC_INCLUDE_DIRS ${BLOSC_INCLUDE_DIRS} ${LZ4_LOCAL_DIR}) - endif() - - if(NOT DEACTIVATE_ZLIB) -- if(ZLIB_NG_FOUND) -- set(BLOSC_INCLUDE_DIRS ${BLOSC_INCLUDE_DIRS} ${ZLIB_NG_INCLUDE_DIR}) -+ if(zlib-ng_FOUND) -+ set(BLOSC_INCLUDE_DIRS ${BLOSC_INCLUDE_DIRS} ${zlib-ng_INCLUDE_DIR}) - elseif(ZLIB_FOUND) - set(BLOSC_INCLUDE_DIRS ${BLOSC_INCLUDE_DIRS} ${ZLIB_INCLUDE_DIR}) - else() -@@ -29,8 +29,8 @@ if(NOT DEACTIVATE_ZLIB) - endif() - - if(NOT DEACTIVATE_ZSTD) -- if(ZSTD_FOUND) -- set(BLOSC_INCLUDE_DIRS ${BLOSC_INCLUDE_DIRS} ${ZSTD_INCLUDE_DIR}) -+ if(zstd_FOUND) -+ set(BLOSC_INCLUDE_DIRS ${BLOSC_INCLUDE_DIRS} ${zstd_INCLUDE_DIR}) - else() - set(ZSTD_LOCAL_DIR ${INTERNAL_LIBS}/zstd-1.5.2) - set(BLOSC_INCLUDE_DIRS ${BLOSC_INCLUDE_DIRS} ${ZSTD_LOCAL_DIR} -@@ -90,8 +90,8 @@ else() - endif() - endif() - --if(LZ4_FOUND) -- set(LIBS ${LIBS} ${LZ4_LIBRARY}) -+if(lz4_FOUND) -+ set(LIBS ${LIBS} ${lz4_LIBRARIES}) - else() - file(GLOB LZ4_FILES ${LZ4_LOCAL_DIR}/*.c) - set(SOURCES ${SOURCES} ${LZ4_FILES}) -@@ -99,10 +99,10 @@ else() - endif() - - if(NOT DEACTIVATE_ZLIB) -- if(ZLIB_NG_FOUND) -- set(LIBS ${LIBS} ${ZLIB_NG_LIBRARY}) -+ if(zlib-ng_FOUND) -+ set(LIBS ${LIBS} ${zlib-ng_LIBRARIES}) - elseif(ZLIB_FOUND) -- set(LIBS ${LIBS} ${ZLIB_LIBRARY}) -+ set(LIBS ${LIBS} ${ZLIB_LIBRARIES}) - else() - set(ZLIB_LOCAL_DIR ${INTERNAL_LIBS}/${ZLIB_NG_DIR}) - file(GLOB ZLIB_FILES ${ZLIB_LOCAL_DIR}/*.c) -@@ -112,8 +112,8 @@ if(NOT DEACTIVATE_ZLIB) - endif() - - if(NOT DEACTIVATE_ZSTD) -- if(ZSTD_FOUND) -- set(LIBS ${LIBS} ${ZSTD_LIBRARY}) -+ if(zstd_FOUND) -+ set(LIBS ${LIBS} ${zstd_LIBRARIES}) - else() - # Enable assembly code only when not using MSVC *and* x86 is there - if((NOT MSVC) AND COMPILER_SUPPORT_SSE2) # if SSE2 is here, this is an x86 platform diff --git a/recipes/c-blosc2/all/patches/2.8.0-0001-fix-cmake.patch b/recipes/c-blosc2/all/patches/2.8.0-0001-fix-cmake.patch deleted file mode 100644 index a0812cb90ffab..0000000000000 --- a/recipes/c-blosc2/all/patches/2.8.0-0001-fix-cmake.patch +++ /dev/null @@ -1,119 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index bb7882f..92ac61c 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -152,26 +152,26 @@ if(BUILD_LITE) - endif() - - if(PREFER_EXTERNAL_LZ4) -- find_package(LZ4) -+ find_package(lz4) - else() - message(STATUS "Using LZ4 internal sources.") - endif() - - if(NOT DEACTIVATE_ZLIB) - if(PREFER_EXTERNAL_ZLIB) -- find_package(ZLIB_NG) -- if(ZLIB_NG_FOUND) -+ find_package(zlib-ng) -+ if(zlib-ng_FOUND) - set(HAVE_ZLIB_NG TRUE) - else() - find_package(ZLIB) - endif() - -- if(NOT (ZLIB_NG_FOUND OR ZLIB_FOUND)) -+ if(NOT (zlib-ng_FOUND OR ZLIB_FOUND)) - message(STATUS "No ZLIB found. Using ZLIB-NG internal sources.") - endif() - endif() - -- if(NOT (ZLIB_NG_FOUND OR ZLIB_FOUND)) -+ if(0) - message(STATUS "Using ZLIB-NG internal sources for ZLIB support.") - set(HAVE_ZLIB_NG TRUE) - add_definitions(-DZLIB_COMPAT) -@@ -192,8 +192,8 @@ endif() - - if(NOT DEACTIVATE_ZSTD) - if(PREFER_EXTERNAL_ZSTD) -- find_package(ZSTD) -- if(NOT ZSTD_FOUND) -+ find_package(zstd) -+ if(NOT zstd_FOUND) - message(STATUS "No ZSTD library found. Using internal sources.") - endif() - else() -diff --git a/blosc/CMakeLists.txt b/blosc/CMakeLists.txt -index 365de33..74ed32e 100644 ---- a/blosc/CMakeLists.txt -+++ b/blosc/CMakeLists.txt -@@ -18,16 +18,16 @@ set(CMAKE_C_VISIBILITY_PRESET hidden) - - # includes - set(BLOSC_INCLUDE_DIRS ${BLOSC_INCLUDE_DIRS} ${CMAKE_CURRENT_SOURCE_DIR}) --if(LZ4_FOUND) -- set(BLOSC_INCLUDE_DIRS ${BLOSC_INCLUDE_DIRS} ${LZ4_INCLUDE_DIR}) -+if(lz4_FOUND) -+ set(BLOSC_INCLUDE_DIRS ${BLOSC_INCLUDE_DIRS} ${lz4_INCLUDE_DIR}) - else() - set(LZ4_LOCAL_DIR ${INTERNAL_LIBS}/lz4-1.9.4) - set(BLOSC_INCLUDE_DIRS ${BLOSC_INCLUDE_DIRS} ${LZ4_LOCAL_DIR}) - endif() - - if(NOT DEACTIVATE_ZLIB) -- if(ZLIB_NG_FOUND) -- set(BLOSC_INCLUDE_DIRS ${BLOSC_INCLUDE_DIRS} ${ZLIB_NG_INCLUDE_DIR}) -+ if(zlib-ng_FOUND) -+ set(BLOSC_INCLUDE_DIRS ${BLOSC_INCLUDE_DIRS} ${zlib-ng_INCLUDE_DIR}) - elseif(ZLIB_FOUND) - set(BLOSC_INCLUDE_DIRS ${BLOSC_INCLUDE_DIRS} ${ZLIB_INCLUDE_DIR}) - else() -@@ -37,8 +37,8 @@ if(NOT DEACTIVATE_ZLIB) - endif() - - if(NOT DEACTIVATE_ZSTD) -- if(ZSTD_FOUND) -- set(BLOSC_INCLUDE_DIRS ${BLOSC_INCLUDE_DIRS} ${ZSTD_INCLUDE_DIR}) -+ if(zstd_FOUND) -+ set(BLOSC_INCLUDE_DIRS ${BLOSC_INCLUDE_DIRS} ${zstd_INCLUDE_DIR}) - else() - set(ZSTD_LOCAL_DIR ${INTERNAL_LIBS}/zstd-1.5.4) - set(BLOSC_INCLUDE_DIRS ${BLOSC_INCLUDE_DIRS} ${ZSTD_LOCAL_DIR} -@@ -99,8 +99,8 @@ else() - endif() - endif() - --if(LZ4_FOUND) -- set(LIBS ${LIBS} ${LZ4_LIBRARY}) -+if(lz4_FOUND) -+ set(LIBS ${LIBS} ${lz4_LIBRARIES}) - else() - file(GLOB LZ4_FILES ${LZ4_LOCAL_DIR}/*.c) - set(SOURCES ${SOURCES} ${LZ4_FILES}) -@@ -108,10 +108,10 @@ else() - endif() - - if(NOT DEACTIVATE_ZLIB) -- if(ZLIB_NG_FOUND) -- set(LIBS ${LIBS} ${ZLIB_NG_LIBRARY}) -+ if(zlib-ng_FOUND) -+ set(LIBS ${LIBS} ${zlib-ng_LIBRARY}) - elseif(ZLIB_FOUND) -- set(LIBS ${LIBS} ${ZLIB_LIBRARY}) -+ set(LIBS ${LIBS} ${ZLIB_LIBRARIES}) - else() - set(ZLIB_LOCAL_DIR ${INTERNAL_LIBS}/${ZLIB_NG_DIR}) - file(GLOB ZLIB_FILES ${ZLIB_LOCAL_DIR}/*.c) -@@ -121,8 +121,8 @@ if(NOT DEACTIVATE_ZLIB) - endif() - - if(NOT DEACTIVATE_ZSTD) -- if(ZSTD_FOUND) -- set(LIBS ${LIBS} ${ZSTD_LIBRARY}) -+ if(zstd_FOUND) -+ set(LIBS ${LIBS} ${zstd_LIBRARIES}) - else() - # Enable assembly code only when not using MSVC *and* x86 is there - if((NOT MSVC) AND COMPILER_SUPPORT_SSE2) # if SSE2 is here, this is an x86 platform diff --git a/recipes/c-blosc2/config.yml b/recipes/c-blosc2/config.yml index 44d877a4a4290..7d50a7f518889 100644 --- a/recipes/c-blosc2/config.yml +++ b/recipes/c-blosc2/config.yml @@ -1,4 +1,8 @@ versions: + "2.15.0": + folder: all + "2.14.4": + folder: all "2.13.1": folder: all "2.13.0": @@ -9,7 +13,3 @@ versions: folder: all "2.10.5": folder: all - "2.8.0": - folder: all - "2.6.1": - folder: all diff --git a/recipes/c4core/all/conandata.yml b/recipes/c4core/all/conandata.yml index ab9592ebfbdbe..8abc810fc0588 100644 --- a/recipes/c4core/all/conandata.yml +++ b/recipes/c4core/all/conandata.yml @@ -1,4 +1,13 @@ sources: + "0.2.2": + url: "https://github.com/biojppm/c4core/releases/download/v0.2.2/c4core-0.2.2-src.tgz" + sha256: "beea43a5bdc64616d897cc0af728f408e35e2d75a8bb6014e6e25e90e0484578" + "0.2.1": + url: "https://github.com/biojppm/c4core/releases/download/v0.2.1/c4core-0.2.1-src.tgz" + sha256: "6447896444c59002af58c8543d0bc64184b9a5c5992c8fc09d6d71935d039f89" + "0.2.0": + url: "https://github.com/biojppm/c4core/releases/download/v0.2.0/c4core-0.2.0-src.tgz" + sha256: "7843e6fb41c200fff69fc71105dbbf56bb410bdbab6b330e02cbe18430fe23bd" "0.1.11": url: "https://github.com/biojppm/c4core/releases/download/v0.1.11/c4core-0.1.11-src.tgz" sha256: "67f4443f3742424f42453594e26e656f616dddfcf225a1d810e00473a741408c" @@ -12,6 +21,18 @@ sources: url: "https://github.com/biojppm/c4core/releases/download/v0.1.8/c4core-0.1.8-src.tgz" sha256: "95c0663192c6bff7a098b50afcb05d22a34dd0fd8e6be2e1b61edad2b9675fde" patches: + "0.2.2": + - patch_file: "patches/0.2.2-0001-make-fast_float-external.patch" + patch_description: "use cci's fast_float recipe" + patch_type: "conan" + "0.2.1": + - patch_file: "patches/0.2.0-0001-make-fast_float-external.patch" + patch_description: "use cci's fast_float recipe" + patch_type: "conan" + "0.2.0": + - patch_file: "patches/0.2.0-0001-make-fast_float-external.patch" + patch_description: "use cci's fast_float recipe" + patch_type: "conan" "0.1.11": - patch_file: "patches/0.1.11-0001-make-fast_float-external.patch" patch_description: "use cci's fast_float recipe" diff --git a/recipes/c4core/all/conanfile.py b/recipes/c4core/all/conanfile.py index d4620ffd7f7a8..91680b53adcd5 100644 --- a/recipes/c4core/all/conanfile.py +++ b/recipes/c4core/all/conanfile.py @@ -82,7 +82,7 @@ def package(self): cmake.install() rmdir(self, os.path.join(self.package_folder, "cmake")) rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) - rm(self, "*.natvis", os.path.join(self.package_folder, "include")) + rm(self, "*.natvis", os.path.join(self.package_folder, "include"), recursive=True) def package_info(self): self.cpp_info.libs = ["c4core"] diff --git a/recipes/c4core/all/patches/0.2.0-0001-make-fast_float-external.patch b/recipes/c4core/all/patches/0.2.0-0001-make-fast_float-external.patch new file mode 100644 index 0000000000000..2fbe458a72084 --- /dev/null +++ b/recipes/c4core/all/patches/0.2.0-0001-make-fast_float-external.patch @@ -0,0 +1,38 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index f1d62be..cda061c 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -76,7 +76,7 @@ set(C4CORE_SRC_FILES + if(C4CORE_WITH_FASTFLOAT) + list(APPEND C4CORE_SRC_FILES + c4/ext/fast_float.hpp +- c4/ext/fast_float_all.h ++# c4/ext/fast_float_all.h + ) + endif() + set(C4CORE_AMALGAMATED ${C4CORE_SRC_DIR}/../src_singleheader/c4/c4core_all.hpp) +@@ -95,7 +95,10 @@ c4_add_library(c4core + SOURCE_ROOT ${C4CORE_SRC_DIR} + SOURCES ${C4CORE_SRC_FILES} + ) +-if(NOT C4CORE_WITH_FASTFLOAT) ++if(C4CORE_WITH_FASTFLOAT) ++ find_package(FastFloat REQUIRED CONFIG) ++ target_link_libraries(c4core PUBLIC "FastFloat::fast_float") ++else() + target_compile_definitions(c4core PUBLIC -DC4CORE_NO_FAST_FLOAT) + endif() + if(C4CORE_NO_DEBUG_BREAK) +diff --git a/src/c4/ext/fast_float.hpp b/src/c4/ext/fast_float.hpp +index 77fac4f..db14534 100644 +--- a/src/c4/ext/fast_float.hpp ++++ b/src/c4/ext/fast_float.hpp +@@ -18,7 +18,7 @@ + # pragma GCC diagnostic ignored "-Wold-style-cast" + #endif + +-#include "c4/ext/fast_float_all.h" ++#include "fast_float/fast_float.h" + + #ifdef _MSC_VER + # pragma warning(pop) diff --git a/recipes/c4core/all/patches/0.2.2-0001-make-fast_float-external.patch b/recipes/c4core/all/patches/0.2.2-0001-make-fast_float-external.patch new file mode 100644 index 0000000000000..159c3bcb4195b --- /dev/null +++ b/recipes/c4core/all/patches/0.2.2-0001-make-fast_float-external.patch @@ -0,0 +1,38 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 79451c5..c93511a 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -76,7 +76,7 @@ set(C4CORE_SRC_FILES + if(C4CORE_WITH_FASTFLOAT) + list(APPEND C4CORE_SRC_FILES + c4/ext/fast_float.hpp +- c4/ext/fast_float_all.h ++# c4/ext/fast_float_all.h + ) + endif() + set(C4CORE_AMALGAMATED ${C4CORE_SRC_DIR}/../src_singleheader/c4/c4core_all.hpp) +@@ -95,7 +95,10 @@ c4_add_library(c4core + SOURCE_ROOT ${C4CORE_SRC_DIR} + SOURCES ${C4CORE_SRC_FILES} + ) +-if(NOT C4CORE_WITH_FASTFLOAT) ++if(C4CORE_WITH_FASTFLOAT) ++ find_package(FastFloat REQUIRED CONFIG) ++ target_link_libraries(c4core PUBLIC "FastFloat::fast_float") ++else() + target_compile_definitions(c4core PUBLIC -DC4CORE_NO_FAST_FLOAT) + endif() + if(C4CORE_NO_DEBUG_BREAK) +diff --git a/src/c4/ext/fast_float.hpp b/src/c4/ext/fast_float.hpp +index 4bf3c0d..b6a3a77 100644 +--- a/src/c4/ext/fast_float.hpp ++++ b/src/c4/ext/fast_float.hpp +@@ -20,7 +20,7 @@ + # pragma GCC diagnostic ignored "-Wold-style-cast" + #endif + +-#include "c4/ext/fast_float_all.h" ++#include "fast_float/fast_float.h" + + #ifdef _MSC_VER + # pragma warning(pop) diff --git a/recipes/c4core/config.yml b/recipes/c4core/config.yml index b3f909b6c9664..6368871bf45ae 100644 --- a/recipes/c4core/config.yml +++ b/recipes/c4core/config.yml @@ -1,4 +1,10 @@ versions: + "0.2.2": + folder: all + "0.2.1": + folder: all + "0.2.0": + folder: all "0.1.11": folder: all "0.1.10": diff --git a/recipes/caf/all/conandata.yml b/recipes/caf/all/conandata.yml index 4b177005e2f51..ae0696f7a640b 100644 --- a/recipes/caf/all/conandata.yml +++ b/recipes/caf/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.0.0": + url: "https://github.com/actor-framework/actor-framework/archive/1.0.0.tar.gz" + sha256: "602018239d23a1805d35ebda704fd5c969a0693fc513fcf7459063b628459e5b" "0.19.4": url: "https://github.com/actor-framework/actor-framework/archive/0.19.4.tar.gz" sha256: "114d43e3a7a2305ca1d2106cd0daeff471564f62b90db1e453ba9eb5c47c02f6" diff --git a/recipes/caf/all/conanfile.py b/recipes/caf/all/conanfile.py index 08713d4f8b3b0..a477d38bc4ce6 100644 --- a/recipes/caf/all/conanfile.py +++ b/recipes/caf/all/conanfile.py @@ -12,11 +12,10 @@ class CAFConan(ConanFile): name = "caf" description = "An open source implementation of the Actor Model in C++" + license = "BSD-3-Clause", "BSL-1.0" url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/actor-framework/actor-framework" - topics = "actor-framework", "actor-model", "pattern-matching", "actors" - license = "BSD-3-Clause", "BSL-1.0" - + topics = ("actor-framework", "actor-model", "pattern-matching", "actors") package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { @@ -41,7 +40,7 @@ def _minimum_compilers_version(self): return { "Visual Studio": "16", "msvc": "192", - "gcc": "7", + "gcc": "7" if Version(self.version) < "1.0.0" else "8", "clang": "6", # Should be 5 but clang 5 has a bug that breaks compiling CAF # see https://github.com/actor-framework/actor-framework/issues/1226 "apple-clang": "10", @@ -90,6 +89,8 @@ def generate(self): tc = CMakeToolchain(self) if not valid_min_cppstd(self, self._min_cppstd): tc.variables["CMAKE_CXX_STANDARD"] = self._min_cppstd + else: + tc.variables["CAF_CXX_VERSION"] = str(self.settings.compiler.cppstd).replace("gnu", "") tc.variables["CAF_ENABLE_OPENSSL_MODULE"] = self.options.with_openssl tc.variables["CAF_ENABLE_EXAMPLES"] = False tc.variables["CAF_ENABLE_TOOLS"] = False diff --git a/recipes/caf/config.yml b/recipes/caf/config.yml index 548a9345742d5..a133d776e2a27 100644 --- a/recipes/caf/config.yml +++ b/recipes/caf/config.yml @@ -1,4 +1,6 @@ versions: + "1.0.0": + folder: all "0.19.4": folder: all "0.19.3": diff --git a/recipes/cairo/all/conandata.yml b/recipes/cairo/all/conandata.yml new file mode 100644 index 0000000000000..ab830d86cca25 --- /dev/null +++ b/recipes/cairo/all/conandata.yml @@ -0,0 +1,45 @@ +sources: + "1.18.0": + sha256: "abf8fba4d510086a492783c3e0828e90b32734738fd80906595617d229d02bab" + url: "https://gitlab.freedesktop.org/cairo/cairo/-/archive/1.18.0/cairo-1.18.0.tar.bz2" + "1.17.8": + url: "https://gitlab.freedesktop.org/cairo/cairo/-/archive/1.17.8/cairo-1.17.8.tar.bz2" + sha256: "ead4724423eb969f98b456fe1e3ee1e1741fe1c8dfb1a41ca12afa81a6c1665f" + "1.17.6": + url: "https://gitlab.freedesktop.org/cairo/cairo/-/archive/1.17.6/cairo-1.17.6.tar.bz2" + sha256: "90496d135c9ef7612c98f8ee358390cdec0825534573778a896ea021155599d2" + "1.17.4": + url: + - "https://www.cairographics.org/snapshots/cairo-1.17.4.tar.xz" + - "https://mirror.koddos.net/blfs/conglomeration/cairo/cairo-1.17.4.tar.xz" + sha256: "74b24c1ed436bbe87499179a3b27c43f4143b8676d8ad237a6fa787401959705" +patches: + "1.18.0": + - patch_file: "patches/1.18.0-msvc-alloca.patch" + patch_type: "backport" + patch_description: "Fix alloca undefined with MSVC" + patch_source: "https://gitlab.freedesktop.org/cairo/cairo/-/merge_requests/520" + "1.17.4": + - patch_file: "patches/binutils-2.34-libbfd-fix.patch" + patch_type: "backport" + patch_description: "fix build with newer versions of bfd" + patch_source: "https://gitlab.freedesktop.org/cairo/cairo/-/commit/e30259f6237571c61992433c110bc6e1ef900244" + base_path: "util/cairo-trace" + - patch_file: "patches/cairo-1.17.4-trace-cflags-fix.patch" + patch_type: "conan" + patch_description: | + Add missing 'PACKAGE' and 'PACKAGE_VERSION' defines for libbfd headers included by 'lookup-symbol.c'. + base_path: "util/cairo-trace" + - patch_file: "patches/cairo-1.17.4-xlib-xrender-option.patch" + patch_type: "conan" + patch_description: >- + This patch adds option to enable or disable xlib-xrender component. + Without it 'xrender' is always required when 'xlib' option is enabled. @sh0 + - patch_file: "patches/cairo-1.17.4-symbol-lookup-backport.patch" + patch_type: "backport" + patch_description: "add symbol-lookup option to allow disabling bfd/libiberty usage" + patch_source: "https://gitlab.freedesktop.org/cairo/cairo/-/commit/e0cf7b869fb1c6b73cf4a9aad2fc8aea4ff1f6ee" + - patch_file: "patches/cairo-1.17.4-encoding-backport.patch" + patch_type: "backport" + patch_description: "use encoding=utf-8 when reading/writing files in helper script" + patch_source: "https://gitlab.freedesktop.org/cairo/cairo/-/commit/9732f4e80f906fab85b97ae55ee44bfd3ee4945e" diff --git a/recipes/cairo/all/conanfile.py b/recipes/cairo/all/conanfile.py new file mode 100644 index 0000000000000..9b42f6bc4a8e0 --- /dev/null +++ b/recipes/cairo/all/conanfile.py @@ -0,0 +1,351 @@ +import glob +import os + +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.apple import fix_apple_shared_install_name, is_apple_os +from conan.tools.build import cross_building +from conan.tools.env import VirtualBuildEnv +from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rename, replace_in_file, rm, rmdir +from conan.tools.gnu import PkgConfigDeps +from conan.tools.layout import basic_layout +from conan.tools.meson import MesonToolchain, Meson +from conan.tools.microsoft import is_msvc, is_msvc_static_runtime +from conan.tools.scm import Version + +required_conan_version = ">=1.53.0" + + +class CairoConan(ConanFile): + name = "cairo" + description = "Cairo is a 2D graphics library with support for multiple output devices" + topics = ("cairo", "graphics") + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://cairographics.org/" + license = ("LGPL-2.1-only", "MPL-1.1") + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + "with_freetype": [True, False], + "with_fontconfig": [True, False], + "with_xlib": [True, False], + "with_xlib_xrender": [True, False], + "with_xcb": [True, False], + "with_glib": [True, False], + "with_lzo": [True, False], + "with_zlib": [True, False], + "with_png": [True, False], + "with_opengl": [False, "desktop", "gles2", "gles3"], + "with_symbol_lookup": [True, False], + "tee": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + "with_freetype": True, + "with_fontconfig": True, + "with_xlib": True, + "with_xlib_xrender": True, + "with_xcb": True, + "with_glib": True, + "with_lzo": True, + "with_zlib": True, + "with_png": True, + "with_opengl": "desktop", + "with_symbol_lookup": False, + "tee": False, + } + short_paths = True + + @property + def _settings_build(self): + return getattr(self, "settings_build", self.settings) + + def export_sources(self): + export_conandata_patches(self) + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + if self.settings.os not in ["Linux", "FreeBSD"]: + del self.options.with_xlib + del self.options.with_xlib_xrender + del self.options.with_xcb + del self.options.with_symbol_lookup + if Version(self.version) >= "1.17.8" or self.settings.os == "Windows" or is_apple_os(self): + del self.options.with_opengl + + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + self.settings.rm_safe("compiler.cppstd") + self.settings.rm_safe("compiler.libcxx") + + def layout(self): + basic_layout(self, src_folder="src") + + def requirements(self): + self.requires("pixman/0.43.4") + if self.options.with_zlib and self.options.with_png: + self.requires("expat/[>=2.6.2 <3]") + if self.options.with_lzo: + self.requires("lzo/2.10") + if self.options.with_zlib: + self.requires("zlib/[>=1.2.11 <2]") + if self.options.with_freetype: + self.requires("freetype/2.13.2", transitive_headers=True, transitive_libs=True) + if self.options.with_fontconfig: + self.requires("fontconfig/2.15.0", transitive_headers=True, transitive_libs=True) + if self.options.with_png: + self.requires("libpng/[>=1.6 <2]") + if self.options.with_glib: + self.requires("glib/2.78.3") + if self.settings.os in ["Linux", "FreeBSD"]: + if self.options.with_xlib or self.options.with_xlib_xrender or self.options.with_xcb: + self.requires("xorg/system", transitive_headers=True, transitive_libs=True) + if self.options.get_safe("with_opengl") == "desktop": + self.requires("opengl/system", transitive_headers=True, transitive_libs=True) + if self.settings.os == "Windows": + self.requires("glext/cci.20210420") + self.requires("wglext/cci.20200813") + self.requires("khrplatform/cci.20200529") + if self.options.get_safe("with_opengl") and self.settings.os in ["Linux", "FreeBSD"]: + self.requires("egl/system", transitive_headers=True, transitive_libs=True) + + def validate(self): + if self.options.get_safe("with_xlib_xrender") and not self.options.get_safe("with_xlib"): + raise ConanInvalidConfiguration("'with_xlib_xrender' option requires 'with_xlib' option to be enabled as well!") + if self.options.with_glib: + if self.dependencies["glib"].options.shared: + if is_msvc_static_runtime(self): + raise ConanInvalidConfiguration( + "Linking shared glib with the MSVC static runtime is not supported" + ) + elif self.options.shared: + raise ConanInvalidConfiguration( + "Linking a shared library against static glib can cause unexpected behaviour." + ) + + def build_requirements(self): + self.tool_requires("meson/1.4.0") + if not self.conf.get("tools.gnu:pkg_config", check_type=str): + self.tool_requires("pkgconf/2.1.0") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + def is_enabled(value): + return "enabled" if value else "disabled" + + env = VirtualBuildEnv(self) + env.generate() + + pkg_deps = PkgConfigDeps(self) + pkg_deps.generate() + + options = dict() + options["tests"] = "disabled" + options["zlib"] = is_enabled(self.options.with_zlib) + options["png"] = is_enabled(self.options.with_png) + options["freetype"] = is_enabled(self.options.with_freetype) + options["fontconfig"] = is_enabled(self.options.with_fontconfig) + if self.settings.os in ["Linux", "FreeBSD"]: + options["xcb"] = is_enabled(self.options.with_xcb) + options["xlib"] = is_enabled(self.options.with_xlib) + else: + options["xcb"] = "disabled" + options["xlib"] = "disabled" + if Version(self.version) < "1.17.8": + if self.options.get_safe("with_opengl") == "desktop": + options["gl-backend"] = "gl" + elif self.options.get_safe("with_opengl") == "gles2": + options["gl-backend"] = "glesv2" + elif self.options.get_safe("with_opengl") == "gles3": + options["gl-backend"] = "glesv3" + else: + options["gl-backend"] = "disabled" + options["glesv2"] = is_enabled(self.options.get_safe("with_opengl") == "gles2") + options["glesv3"] = is_enabled(self.options.get_safe("with_opengl") == "gles3") + options["tee"] = is_enabled(self.options.tee) + options["symbol-lookup"] = is_enabled(self.options.get_safe("with_symbol_lookup")) + + # future options to add, see meson_options.txt. + # for now, disabling explicitly, to avoid non-reproducible auto-detection of system libs + + version = Version(self.version) + if version < "1.17.6": + options["cogl"] = "disabled" # https://gitlab.gnome.org/GNOME/cogl + options["directfb"] = "disabled" + options["drm"] = "disabled" # not yet compilable in cairo 1.17.4 + options["openvg"] = "disabled" # https://www.khronos.org/openvg/ + options["qt"] = "disabled" # not yet compilable in cairo 1.17.4 + if self.settings.os in ["Linux", "FreeBSD"]: + options["xlib-xrender"] = is_enabled(self.options.with_xlib_xrender) + + options["gtk2-utils"] = "disabled" + options["spectre"] = "disabled" # https://www.freedesktop.org/wiki/Software/libspectre/ + + meson = MesonToolchain(self) + meson.project_options.update(options) + + if cross_building(self): + meson.properties["ipc_rmid_deferred_release"] = self.settings.os == "Linux" + + if is_apple_os(self) and Version(self.version) < "1.17.6": + # This was fixed in the meson build from 1.17.6 + meson.c_link_args += ["-framework", "ApplicationServices", "-framework", "CoreFoundation"] + + if not self.options.shared: + meson.c_args.append("-DCAIRO_WIN32_STATIC_BUILD") + + meson.generate() + + def build(self): + apply_conandata_patches(self) + + # Dependency freetype2 found: NO found 2.11.0 but need: '>= 9.7.3' + if self.options.with_freetype: + replace_in_file(self, os.path.join(self.source_folder, "meson.build"), + "freetype_required_version = '>= 9.7.3'", + f"freetype_required_version = '>= {self.dependencies['freetype'].ref.version}'") + meson = Meson(self) + meson.configure() + meson.build() + + def _fix_library_names(self, path): + if is_msvc(self): + for filename_old in glob.glob(os.path.join(path, "*.a")): + root, _ = os.path.splitext(filename_old) + folder, basename = os.path.split(root) + rename(self, filename_old, os.path.join(folder, basename.replace("lib", "") + ".lib")) + + def package(self): + meson = Meson(self) + meson.install() + self._fix_library_names(os.path.join(self.package_folder, "lib")) + copy(self, "COPYING*", self.source_folder, os.path.join(self.package_folder, "licenses")) + rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) + rm(self, "*.pdb", os.path.join(self.package_folder, "bin")) + fix_apple_shared_install_name(self) + + def package_info(self): + base_requirements = {"pixman::pixman"} + base_system_libs = {} + + def add_component_and_base_requirements(component, requirements, system_libs=None): + self.cpp_info.components[component].set_property("pkg_config_name", component) + self.cpp_info.components[component].requires += ["cairo_"] + requirements + base_requirements.update(set(requirements)) + if system_libs is not None: + self.cpp_info.components[component].system_libs += system_libs + base_system_libs.update(set(system_libs)) + + self.cpp_info.set_property("pkg_config_name", "cairo-all-do-no-use") + + self.cpp_info.components["cairo_"].set_property("pkg_config_name", "cairo") + self.cpp_info.components["cairo_"].libs = ["cairo"] + self.cpp_info.components["cairo_"].includedirs.insert(0, os.path.join("include", "cairo")) + + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.components["cairo_"].system_libs.extend(["m", "dl", "pthread"]) + if self.options.get_safe("with_symbol_lookup"): + self.cpp_info.components["cairo_"].system_libs.append("bfd") + self.cpp_info.components["cairo_"].cflags = ["-pthread"] + self.cpp_info.components["cairo_"].cxxflags = ["-pthread"] + + if self.options.with_lzo: + self.cpp_info.components["cairo_"].requires.append("lzo::lzo") + + if self.options.with_zlib: + self.cpp_info.components["cairo_"].requires.append("zlib::zlib") + + if self.options.with_png: + add_component_and_base_requirements("cairo-png", ["libpng::libpng"]) + add_component_and_base_requirements("cairo-svg", ["libpng::libpng"]) + + if self.options.with_fontconfig: + add_component_and_base_requirements("cairo-fc", ["fontconfig::fontconfig"]) + + if self.options.with_freetype: + add_component_and_base_requirements("cairo-ft", ["freetype::freetype"]) + + if self.options.get_safe("with_xlib"): + add_component_and_base_requirements("cairo-xlib", ["xorg::x11", "xorg::xext"]) + + if self.options.get_safe("with_xlib_xrender"): + add_component_and_base_requirements("cairo-xlib-xrender", ["xorg::xrender"]) + + if self.options.get_safe("with_xcb"): + add_component_and_base_requirements("cairo-xcb", ["xorg::xcb", "xorg::xcb-render"]) + add_component_and_base_requirements("cairo-xcb-shm", ["xorg::xcb", "xorg::xcb-shm"]) + + if self.options.get_safe("with_xlib"): + add_component_and_base_requirements("cairo-xlib-xcb", ["xorg::x11-xcb"]) + + if is_apple_os(self): + self.cpp_info.components["cairo-quartz"].set_property("pkg_config_name", "cairo-quartz") + self.cpp_info.components["cairo-quartz"].requires = ["cairo_"] + + self.cpp_info.components["cairo-quartz-image"].set_property("pkg_config_name", "cairo-quartz-image") + self.cpp_info.components["cairo-quartz-image"].requires = ["cairo_"] + + self.cpp_info.components["cairo-quartz-font"].set_property("pkg_config_name", "cairo-quartz-font") + self.cpp_info.components["cairo-quartz-font"].requires = ["cairo_"] + + self.cpp_info.components["cairo_"].frameworks += ["ApplicationServices", "CoreFoundation", "CoreGraphics"] + + if self.settings.os == "Windows": + self.cpp_info.components["cairo-win32"].set_property("pkg_config_name", "cairo-win32") + self.cpp_info.components["cairo-win32"].requires = ["cairo_"] + + self.cpp_info.components["cairo-win32-font"].set_property("pkg_config_name", "cairo-win32-font") + self.cpp_info.components["cairo-win32-font"].requires = ["cairo_"] + + self.cpp_info.components["cairo_"].system_libs.extend(["gdi32", "msimg32", "user32"]) + + if not self.options.shared: + self.cpp_info.components["cairo_"].defines.append("CAIRO_WIN32_STATIC_BUILD=1") + + if self.options.get_safe("with_opengl"): + if self.options.with_opengl == "desktop": + add_component_and_base_requirements("cairo-gl", ["opengl::opengl"]) + + if self.settings.os in ["Linux", "FreeBSD"]: + add_component_and_base_requirements("cairo-glx", ["opengl::opengl"]) + + if self.settings.os == "Windows": + add_component_and_base_requirements("cairo-wgl", ["glext::glext", "wglext::wglext", "khrplatform::khrplatform"]) + + elif self.options.with_opengl == "gles3": + add_component_and_base_requirements("cairo-glesv3", [], ["GLESv2"]) + elif self.options.with_opengl == "gles2": + add_component_and_base_requirements("cairo-glesv2", [], ["GLESv2"]) + if self.settings.os in ["Linux", "FreeBSD"]: + add_component_and_base_requirements("cairo-egl", ["egl::egl"]) + + if self.options.with_zlib: + add_component_and_base_requirements("cairo-script", ["zlib::zlib"]) + add_component_and_base_requirements("cairo-ps", ["zlib::zlib"]) + add_component_and_base_requirements("cairo-pdf", ["zlib::zlib"]) + self.cpp_info.components["cairo-script-interpreter"].set_property("pkg_config_name", "cairo-script-interpreter") + self.cpp_info.components["cairo-script-interpreter"].libs = ["cairo-script-interpreter"] + self.cpp_info.components["cairo-script-interpreter"].requires = ["cairo_"] + + if self.options.with_png: + add_component_and_base_requirements("cairo-xml", ["zlib::zlib"]) + add_component_and_base_requirements("cairo-util_", ["expat::expat"]) + + if self.options.tee: + self.cpp_info.components["cairo-tee"].set_property("pkg_config_name", "cairo-tee") + self.cpp_info.components["cairo-tee"].requires = ["cairo_"] + + # util directory + if self.options.with_glib: + self.cpp_info.components["cairo-gobject"].set_property("pkg_config_name", "cairo-gobject") + self.cpp_info.components["cairo-gobject"].libs = ["cairo-gobject"] + self.cpp_info.components["cairo-gobject"].requires = ["cairo_", "glib::gobject-2.0", "glib::glib-2.0"] + + self.cpp_info.components["cairo_"].requires += list(base_requirements) + self.cpp_info.components["cairo_"].system_libs += list(base_system_libs) diff --git a/recipes/cairo/all/patches/1.18.0-msvc-alloca.patch b/recipes/cairo/all/patches/1.18.0-msvc-alloca.patch new file mode 100644 index 0000000000000..3be0a4002a73e --- /dev/null +++ b/recipes/cairo/all/patches/1.18.0-msvc-alloca.patch @@ -0,0 +1,28 @@ +From 27cdee5e4cf19e7959b80fe1a39e61188de1b654 Mon Sep 17 00:00:00 2001 +From: Dan Yeaw +Date: Sat, 30 Sep 2023 13:30:51 -0400 +Subject: [PATCH] Fix alloca undefined with MSVC + +Conditionally includes malloc.h when compiling with +MSVC so that alloca is defined. +--- + src/cairo-colr-glyph-render.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/src/cairo-colr-glyph-render.c b/src/cairo-colr-glyph-render.c +index 28254fd51..a9ad84bbf 100644 +--- a/src/cairo-colr-glyph-render.c ++++ b/src/cairo-colr-glyph-render.c +@@ -43,6 +43,10 @@ + #include + #include + ++#ifdef _MSC_VER ++#include ++#endif ++ + #if HAVE_FT_COLR_V1 + + #include +-- +GitLab diff --git a/recipes/cairo/meson/patches/binutils-2.34-libbfd-fix.patch b/recipes/cairo/all/patches/binutils-2.34-libbfd-fix.patch similarity index 100% rename from recipes/cairo/meson/patches/binutils-2.34-libbfd-fix.patch rename to recipes/cairo/all/patches/binutils-2.34-libbfd-fix.patch diff --git a/recipes/cairo/meson/patches/cairo-1.17.4-encoding-backport.patch b/recipes/cairo/all/patches/cairo-1.17.4-encoding-backport.patch similarity index 100% rename from recipes/cairo/meson/patches/cairo-1.17.4-encoding-backport.patch rename to recipes/cairo/all/patches/cairo-1.17.4-encoding-backport.patch diff --git a/recipes/cairo/meson/patches/cairo-1.17.4-symbol-lookup-backport.patch b/recipes/cairo/all/patches/cairo-1.17.4-symbol-lookup-backport.patch similarity index 100% rename from recipes/cairo/meson/patches/cairo-1.17.4-symbol-lookup-backport.patch rename to recipes/cairo/all/patches/cairo-1.17.4-symbol-lookup-backport.patch diff --git a/recipes/cairo/meson/patches/cairo-1.17.4-trace-cflags-fix.patch b/recipes/cairo/all/patches/cairo-1.17.4-trace-cflags-fix.patch similarity index 100% rename from recipes/cairo/meson/patches/cairo-1.17.4-trace-cflags-fix.patch rename to recipes/cairo/all/patches/cairo-1.17.4-trace-cflags-fix.patch diff --git a/recipes/cairo/meson/patches/cairo-1.17.4-xlib-xrender-option.patch b/recipes/cairo/all/patches/cairo-1.17.4-xlib-xrender-option.patch similarity index 100% rename from recipes/cairo/meson/patches/cairo-1.17.4-xlib-xrender-option.patch rename to recipes/cairo/all/patches/cairo-1.17.4-xlib-xrender-option.patch diff --git a/recipes/cairo/meson/test_package/CMakeLists.txt b/recipes/cairo/all/test_package/CMakeLists.txt similarity index 100% rename from recipes/cairo/meson/test_package/CMakeLists.txt rename to recipes/cairo/all/test_package/CMakeLists.txt diff --git a/recipes/cairo/meson/test_package/conanfile.py b/recipes/cairo/all/test_package/conanfile.py similarity index 100% rename from recipes/cairo/meson/test_package/conanfile.py rename to recipes/cairo/all/test_package/conanfile.py diff --git a/recipes/cairo/meson/test_package/test_package.c b/recipes/cairo/all/test_package/test_package.c similarity index 100% rename from recipes/cairo/meson/test_package/test_package.c rename to recipes/cairo/all/test_package/test_package.c diff --git a/recipes/cairo/meson/test_v1_package/CMakeLists.txt b/recipes/cairo/all/test_v1_package/CMakeLists.txt similarity index 100% rename from recipes/cairo/meson/test_v1_package/CMakeLists.txt rename to recipes/cairo/all/test_v1_package/CMakeLists.txt diff --git a/recipes/cairo/meson/test_v1_package/conanfile.py b/recipes/cairo/all/test_v1_package/conanfile.py similarity index 100% rename from recipes/cairo/meson/test_v1_package/conanfile.py rename to recipes/cairo/all/test_v1_package/conanfile.py diff --git a/recipes/cairo/config.yml b/recipes/cairo/config.yml index 63606cbea47b1..ec5b451e74c04 100644 --- a/recipes/cairo/config.yml +++ b/recipes/cairo/config.yml @@ -1,9 +1,9 @@ versions: "1.18.0": - folder: meson + folder: all "1.17.8": - folder: meson + folder: all "1.17.6": - folder: meson + folder: all "1.17.4": - folder: meson + folder: all diff --git a/recipes/cairo/meson/conandata.yml b/recipes/cairo/meson/conandata.yml deleted file mode 100644 index 278a3653016c5..0000000000000 --- a/recipes/cairo/meson/conandata.yml +++ /dev/null @@ -1,40 +0,0 @@ -sources: - "1.18.0": - sha256: "abf8fba4d510086a492783c3e0828e90b32734738fd80906595617d229d02bab" - url: "https://gitlab.freedesktop.org/cairo/cairo/-/archive/1.18.0/cairo-1.18.0.tar.bz2" - "1.17.8": - url: "https://gitlab.freedesktop.org/cairo/cairo/-/archive/1.17.8/cairo-1.17.8.tar.bz2" - sha256: "ead4724423eb969f98b456fe1e3ee1e1741fe1c8dfb1a41ca12afa81a6c1665f" - "1.17.6": - url: "https://gitlab.freedesktop.org/cairo/cairo/-/archive/1.17.6/cairo-1.17.6.tar.bz2" - sha256: "90496d135c9ef7612c98f8ee358390cdec0825534573778a896ea021155599d2" - "1.17.4": - url: - - "https://www.cairographics.org/snapshots/cairo-1.17.4.tar.xz" - - "https://mirror.koddos.net/blfs/conglomeration/cairo/cairo-1.17.4.tar.xz" - sha256: "74b24c1ed436bbe87499179a3b27c43f4143b8676d8ad237a6fa787401959705" -patches: - "1.17.4": - - patch_file: "patches/binutils-2.34-libbfd-fix.patch" - patch_type: "backport" - patch_description: "fix build with newer versions of bfd" - patch_source: "https://gitlab.freedesktop.org/cairo/cairo/-/commit/e30259f6237571c61992433c110bc6e1ef900244" - base_path: "util/cairo-trace" - - patch_file: "patches/cairo-1.17.4-trace-cflags-fix.patch" - patch_type: "conan" - patch_description: | - Add missing 'PACKAGE' and 'PACKAGE_VERSION' defines for libbfd headers included by 'lookup-symbol.c'. - base_path: "util/cairo-trace" - - patch_file: "patches/cairo-1.17.4-xlib-xrender-option.patch" - patch_type: "conan" - patch_description: >- - This patch adds option to enable or disable xlib-xrender component. - Without it 'xrender' is always required when 'xlib' option is enabled. @sh0 - - patch_file: "patches/cairo-1.17.4-symbol-lookup-backport.patch" - patch_type: "backport" - patch_description: "add symbol-lookup option to allow disabling bfd/libiberty usage" - patch_source: "https://gitlab.freedesktop.org/cairo/cairo/-/commit/e0cf7b869fb1c6b73cf4a9aad2fc8aea4ff1f6ee" - - patch_file: "patches/cairo-1.17.4-encoding-backport.patch" - patch_type: "backport" - patch_description: "use encoding=utf-8 when reading/writing files in helper script" - patch_source: "https://gitlab.freedesktop.org/cairo/cairo/-/commit/9732f4e80f906fab85b97ae55ee44bfd3ee4945e" diff --git a/recipes/cairo/meson/conanfile.py b/recipes/cairo/meson/conanfile.py deleted file mode 100644 index 69fa936ada1c4..0000000000000 --- a/recipes/cairo/meson/conanfile.py +++ /dev/null @@ -1,351 +0,0 @@ -import glob -import os - -from conan import ConanFile -from conan.errors import ConanInvalidConfiguration -from conan.tools.apple import fix_apple_shared_install_name, is_apple_os -from conan.tools.build import cross_building -from conan.tools.env import VirtualBuildEnv -from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rename, replace_in_file, rm, rmdir -from conan.tools.gnu import PkgConfigDeps -from conan.tools.layout import basic_layout -from conan.tools.meson import MesonToolchain, Meson -from conan.tools.microsoft import is_msvc, is_msvc_static_runtime -from conan.tools.scm import Version - -required_conan_version = ">=1.53.0" - - -class CairoConan(ConanFile): - name = "cairo" - description = "Cairo is a 2D graphics library with support for multiple output devices" - topics = ("cairo", "graphics") - url = "https://github.com/conan-io/conan-center-index" - homepage = "https://cairographics.org/" - license = ("LGPL-2.1-only", "MPL-1.1") - settings = "os", "arch", "compiler", "build_type" - options = { - "shared": [True, False], - "fPIC": [True, False], - "with_freetype": [True, False], - "with_fontconfig": [True, False], - "with_xlib": [True, False], - "with_xlib_xrender": [True, False], - "with_xcb": [True, False], - "with_glib": [True, False], - "with_lzo": [True, False], - "with_zlib": [True, False], - "with_png": [True, False], - "with_opengl": [False, "desktop", "gles2", "gles3"], - "with_symbol_lookup": [True, False], - "tee": [True, False], - } - default_options = { - "shared": False, - "fPIC": True, - "with_freetype": True, - "with_fontconfig": True, - "with_xlib": True, - "with_xlib_xrender": True, - "with_xcb": True, - "with_glib": True, - "with_lzo": True, - "with_zlib": True, - "with_png": True, - "with_opengl": "desktop", - "with_symbol_lookup": False, - "tee": False, - } - short_paths = True - - @property - def _settings_build(self): - return getattr(self, "settings_build", self.settings) - - def export_sources(self): - export_conandata_patches(self) - - def config_options(self): - if self.settings.os == "Windows": - del self.options.fPIC - if self.settings.os not in ["Linux", "FreeBSD"]: - del self.options.with_xlib - del self.options.with_xlib_xrender - del self.options.with_xcb - del self.options.with_symbol_lookup - if Version(self.version) >= "1.17.8" or self.settings.os == "Windows" or is_apple_os(self): - del self.options.with_opengl - - def configure(self): - if self.options.shared: - self.options.rm_safe("fPIC") - self.settings.rm_safe("compiler.cppstd") - self.settings.rm_safe("compiler.libcxx") - - def layout(self): - basic_layout(self, src_folder="src") - - def requirements(self): - self.requires("pixman/0.43.4") - if self.options.with_zlib and self.options.with_png: - self.requires("expat/2.6.0") - if self.options.with_lzo: - self.requires("lzo/2.10") - if self.options.with_zlib: - self.requires("zlib/[>=1.2.11 <2]") - if self.options.with_freetype: - self.requires("freetype/2.13.2", transitive_headers=True, transitive_libs=True) - if self.options.with_fontconfig: - self.requires("fontconfig/2.15.0", transitive_headers=True, transitive_libs=True) - if self.options.with_png: - self.requires("libpng/[>=1.6 <2]") - if self.options.with_glib: - self.requires("glib/2.78.3") - if self.settings.os in ["Linux", "FreeBSD"]: - if self.options.with_xlib or self.options.with_xlib_xrender or self.options.with_xcb: - self.requires("xorg/system", transitive_headers=True, transitive_libs=True) - if self.options.get_safe("with_opengl") == "desktop": - self.requires("opengl/system", transitive_headers=True, transitive_libs=True) - if self.settings.os == "Windows": - self.requires("glext/cci.20210420") - self.requires("wglext/cci.20200813") - self.requires("khrplatform/cci.20200529") - if self.options.get_safe("with_opengl") and self.settings.os in ["Linux", "FreeBSD"]: - self.requires("egl/system", transitive_headers=True, transitive_libs=True) - - def validate(self): - if self.options.get_safe("with_xlib_xrender") and not self.options.get_safe("with_xlib"): - raise ConanInvalidConfiguration("'with_xlib_xrender' option requires 'with_xlib' option to be enabled as well!") - if self.options.with_glib: - if self.dependencies["glib"].options.shared: - if is_msvc_static_runtime(self): - raise ConanInvalidConfiguration( - "Linking shared glib with the MSVC static runtime is not supported" - ) - elif self.options.shared: - raise ConanInvalidConfiguration( - "Linking a shared library against static glib can cause unexpected behaviour." - ) - - def build_requirements(self): - self.tool_requires("meson/1.4.0") - if not self.conf.get("tools.gnu:pkg_config", check_type=str): - self.tool_requires("pkgconf/2.1.0") - - def source(self): - get(self, **self.conan_data["sources"][self.version], strip_root=True) - - def generate(self): - def is_enabled(value): - return "enabled" if value else "disabled" - - env = VirtualBuildEnv(self) - env.generate() - - pkg_deps = PkgConfigDeps(self) - pkg_deps.generate() - - options = dict() - options["tests"] = "disabled" - options["zlib"] = is_enabled(self.options.with_zlib) - options["png"] = is_enabled(self.options.with_png) - options["freetype"] = is_enabled(self.options.with_freetype) - options["fontconfig"] = is_enabled(self.options.with_fontconfig) - if self.settings.os in ["Linux", "FreeBSD"]: - options["xcb"] = is_enabled(self.options.with_xcb) - options["xlib"] = is_enabled(self.options.with_xlib) - else: - options["xcb"] = "disabled" - options["xlib"] = "disabled" - if Version(self.version) < "1.17.8": - if self.options.get_safe("with_opengl") == "desktop": - options["gl-backend"] = "gl" - elif self.options.get_safe("with_opengl") == "gles2": - options["gl-backend"] = "glesv2" - elif self.options.get_safe("with_opengl") == "gles3": - options["gl-backend"] = "glesv3" - else: - options["gl-backend"] = "disabled" - options["glesv2"] = is_enabled(self.options.get_safe("with_opengl") == "gles2") - options["glesv3"] = is_enabled(self.options.get_safe("with_opengl") == "gles3") - options["tee"] = is_enabled(self.options.tee) - options["symbol-lookup"] = is_enabled(self.options.get_safe("with_symbol_lookup")) - - # future options to add, see meson_options.txt. - # for now, disabling explicitly, to avoid non-reproducible auto-detection of system libs - - version = Version(self.version) - if version < "1.17.6": - options["cogl"] = "disabled" # https://gitlab.gnome.org/GNOME/cogl - options["directfb"] = "disabled" - options["drm"] = "disabled" # not yet compilable in cairo 1.17.4 - options["openvg"] = "disabled" # https://www.khronos.org/openvg/ - options["qt"] = "disabled" # not yet compilable in cairo 1.17.4 - if self.settings.os in ["Linux", "FreeBSD"]: - options["xlib-xrender"] = is_enabled(self.options.with_xlib_xrender) - - options["gtk2-utils"] = "disabled" - options["spectre"] = "disabled" # https://www.freedesktop.org/wiki/Software/libspectre/ - - meson = MesonToolchain(self) - meson.project_options.update(options) - - if cross_building(self): - meson.properties["ipc_rmid_deferred_release"] = self.settings.os == "Linux" - - if is_apple_os(self) and Version(self.version) < "1.17.6": - # This was fixed in the meson build from 1.17.6 - meson.c_link_args += ["-framework", "ApplicationServices", "-framework", "CoreFoundation"] - - if not self.options.shared: - meson.c_args.append("-DCAIRO_WIN32_STATIC_BUILD") - - meson.generate() - - def build(self): - apply_conandata_patches(self) - - # Dependency freetype2 found: NO found 2.11.0 but need: '>= 9.7.3' - if self.options.with_freetype: - replace_in_file(self, os.path.join(self.source_folder, "meson.build"), - "freetype_required_version = '>= 9.7.3'", - f"freetype_required_version = '>= {self.dependencies['freetype'].ref.version}'") - meson = Meson(self) - meson.configure() - meson.build() - - def _fix_library_names(self, path): - if is_msvc(self): - for filename_old in glob.glob(os.path.join(path, "*.a")): - root, _ = os.path.splitext(filename_old) - folder, basename = os.path.split(root) - rename(self, filename_old, os.path.join(folder, basename.replace("lib", "") + ".lib")) - - def package(self): - meson = Meson(self) - meson.install() - self._fix_library_names(os.path.join(self.package_folder, "lib")) - copy(self, "COPYING*", self.source_folder, os.path.join(self.package_folder, "licenses")) - rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) - rm(self, "*.pdb", os.path.join(self.package_folder, "bin")) - fix_apple_shared_install_name(self) - - def package_info(self): - base_requirements = {"pixman::pixman"} - base_system_libs = {} - - def add_component_and_base_requirements(component, requirements, system_libs=None): - self.cpp_info.components[component].set_property("pkg_config_name", component) - self.cpp_info.components[component].requires += ["cairo_"] + requirements - base_requirements.update(set(requirements)) - if system_libs is not None: - self.cpp_info.components[component].system_libs += system_libs - base_system_libs.update(set(system_libs)) - - self.cpp_info.set_property("pkg_config_name", "cairo-all-do-no-use") - - self.cpp_info.components["cairo_"].set_property("pkg_config_name", "cairo") - self.cpp_info.components["cairo_"].libs = ["cairo"] - self.cpp_info.components["cairo_"].includedirs.insert(0, os.path.join("include", "cairo")) - - if self.settings.os in ["Linux", "FreeBSD"]: - self.cpp_info.components["cairo_"].system_libs.extend(["m", "dl", "pthread"]) - if self.options.get_safe("with_symbol_lookup"): - self.cpp_info.components["cairo_"].system_libs.append("bfd") - self.cpp_info.components["cairo_"].cflags = ["-pthread"] - self.cpp_info.components["cairo_"].cxxflags = ["-pthread"] - - if self.options.with_lzo: - self.cpp_info.components["cairo_"].requires.append("lzo::lzo") - - if self.options.with_zlib: - self.cpp_info.components["cairo_"].requires.append("zlib::zlib") - - if self.options.with_png: - add_component_and_base_requirements("cairo-png", ["libpng::libpng"]) - add_component_and_base_requirements("cairo-svg", ["libpng::libpng"]) - - if self.options.with_fontconfig: - add_component_and_base_requirements("cairo-fc", ["fontconfig::fontconfig"]) - - if self.options.with_freetype: - add_component_and_base_requirements("cairo-ft", ["freetype::freetype"]) - - if self.options.get_safe("with_xlib"): - add_component_and_base_requirements("cairo-xlib", ["xorg::x11", "xorg::xext"]) - - if self.options.get_safe("with_xlib_xrender"): - add_component_and_base_requirements("cairo-xlib-xrender", ["xorg::xrender"]) - - if self.options.get_safe("with_xcb"): - add_component_and_base_requirements("cairo-xcb", ["xorg::xcb", "xorg::xcb-render"]) - add_component_and_base_requirements("cairo-xcb-shm", ["xorg::xcb", "xorg::xcb-shm"]) - - if self.options.get_safe("with_xlib"): - add_component_and_base_requirements("cairo-xlib-xcb", ["xorg::x11-xcb"]) - - if is_apple_os(self): - self.cpp_info.components["cairo-quartz"].set_property("pkg_config_name", "cairo-quartz") - self.cpp_info.components["cairo-quartz"].requires = ["cairo_"] - - self.cpp_info.components["cairo-quartz-image"].set_property("pkg_config_name", "cairo-quartz-image") - self.cpp_info.components["cairo-quartz-image"].requires = ["cairo_"] - - self.cpp_info.components["cairo-quartz-font"].set_property("pkg_config_name", "cairo-quartz-font") - self.cpp_info.components["cairo-quartz-font"].requires = ["cairo_"] - - self.cpp_info.components["cairo_"].frameworks += ["ApplicationServices", "CoreFoundation", "CoreGraphics"] - - if self.settings.os == "Windows": - self.cpp_info.components["cairo-win32"].set_property("pkg_config_name", "cairo-win32") - self.cpp_info.components["cairo-win32"].requires = ["cairo_"] - - self.cpp_info.components["cairo-win32-font"].set_property("pkg_config_name", "cairo-win32-font") - self.cpp_info.components["cairo-win32-font"].requires = ["cairo_"] - - self.cpp_info.components["cairo_"].system_libs.extend(["gdi32", "msimg32", "user32"]) - - if not self.options.shared: - self.cpp_info.components["cairo_"].defines.append("CAIRO_WIN32_STATIC_BUILD=1") - - if self.options.get_safe("with_opengl"): - if self.options.with_opengl == "desktop": - add_component_and_base_requirements("cairo-gl", ["opengl::opengl"]) - - if self.settings.os in ["Linux", "FreeBSD"]: - add_component_and_base_requirements("cairo-glx", ["opengl::opengl"]) - - if self.settings.os == "Windows": - add_component_and_base_requirements("cairo-wgl", ["glext::glext", "wglext::wglext", "khrplatform::khrplatform"]) - - elif self.options.with_opengl == "gles3": - add_component_and_base_requirements("cairo-glesv3", [], ["GLESv2"]) - elif self.options.with_opengl == "gles2": - add_component_and_base_requirements("cairo-glesv2", [], ["GLESv2"]) - if self.settings.os in ["Linux", "FreeBSD"]: - add_component_and_base_requirements("cairo-egl", ["egl::egl"]) - - if self.options.with_zlib: - add_component_and_base_requirements("cairo-script", ["zlib::zlib"]) - add_component_and_base_requirements("cairo-ps", ["zlib::zlib"]) - add_component_and_base_requirements("cairo-pdf", ["zlib::zlib"]) - self.cpp_info.components["cairo-script-interpreter"].set_property("pkg_config_name", "cairo-script-interpreter") - self.cpp_info.components["cairo-script-interpreter"].libs = ["cairo-script-interpreter"] - self.cpp_info.components["cairo-script-interpreter"].requires = ["cairo_"] - - if self.options.with_png: - add_component_and_base_requirements("cairo-xml", ["zlib::zlib"]) - add_component_and_base_requirements("cairo-util_", ["expat::expat"]) - - if self.options.tee: - self.cpp_info.components["cairo-tee"].set_property("pkg_config_name", "cairo-tee") - self.cpp_info.components["cairo-tee"].requires = ["cairo_"] - - # util directory - if self.options.with_glib: - self.cpp_info.components["cairo-gobject"].set_property("pkg_config_name", "cairo-gobject") - self.cpp_info.components["cairo-gobject"].libs = ["cairo-gobject"] - self.cpp_info.components["cairo-gobject"].requires = ["cairo_", "glib::gobject-2.0", "glib::glib-2.0"] - - self.cpp_info.components["cairo_"].requires += list(base_requirements) - self.cpp_info.components["cairo_"].system_libs += list(base_system_libs) diff --git a/recipes/cairomm/all/conanfile.py b/recipes/cairomm/all/conanfile.py index 3b77adb9dbed4..4380e40cd818e 100644 --- a/recipes/cairomm/all/conanfile.py +++ b/recipes/cairomm/all/conanfile.py @@ -58,7 +58,7 @@ def layout(self): def requirements(self): self.requires("cairo/1.18.0", transitive_headers=True, transitive_libs=True) - self.requires("fontconfig/2.14.2", transitive_headers=True, transitive_libs=True) + self.requires("fontconfig/2.15.0", transitive_headers=True, transitive_libs=True) if self._abi_version == "1.16": self.requires("libsigcpp/3.0.7", transitive_headers=True, transitive_libs=True) else: @@ -76,9 +76,9 @@ def validate(self): ) def build_requirements(self): - self.tool_requires("meson/1.2.3") + self.tool_requires("meson/1.4.0") if not self.conf.get("tools.gnu:pkg_config", default=False, check_type=str): - self.tool_requires("pkgconf/2.0.3") + self.tool_requires("pkgconf/2.1.0") def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) diff --git a/recipes/calceph/all/conandata.yml b/recipes/calceph/all/conandata.yml index f4d850c349cf0..ccee59129b991 100644 --- a/recipes/calceph/all/conandata.yml +++ b/recipes/calceph/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "3.5.5": + url: "https://www.imcce.fr/content/medias/recherche/equipes/asd/calceph/calceph-3.5.5.tar.gz" + sha256: "f7acf529a9267793126d7fdbdf79d4d26ae33274c99d09a9fc9d6191a3c72aca" "3.5.1": url: "https://www.imcce.fr/content/medias/recherche/equipes/asd/calceph/calceph-3.5.1.tar.gz" sha256: "33cc0be1b8ffb647aff9d3ac1cf025e460451e00144050d3bbc4f13bceb11c1d" diff --git a/recipes/calceph/all/conanfile.py b/recipes/calceph/all/conanfile.py index fda6184d24ab9..cd9be15961cb0 100644 --- a/recipes/calceph/all/conanfile.py +++ b/recipes/calceph/all/conanfile.py @@ -1,5 +1,4 @@ from conan import ConanFile -from conan.errors import ConanInvalidConfiguration from conan.tools.apple import fix_apple_shared_install_name from conan.tools.env import VirtualBuildEnv from conan.tools.files import chdir, copy, get, replace_in_file, rm, rmdir @@ -15,11 +14,12 @@ class CalcephConan(ConanFile): name = "calceph" description = "C Library designed to access the binary planetary ephemeris " \ "files, such INPOPxx, JPL DExxx and SPICE ephemeris files." - license = ["CECILL-C", "CECILL-B", "CECILL-2.1"] + license = ("CECILL-C", "CECILL-B", "CECILL-2.1") topics = ("ephemeris", "astronomy", "space", "planet") homepage = "https://www.imcce.fr/inpop/calceph" url = "https://github.com/conan-io/conan-center-index" + package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], @@ -43,7 +43,10 @@ def config_options(self): del self.options.threadsafe def configure(self): - if self.options.shared: + if self.settings.os == "Windows": + del self.options.shared + self.package_type = "static-library" + if self.options.get_safe("shared"): self.options.rm_safe("fPIC") self.settings.rm_safe("compiler.cppstd") self.settings.rm_safe("compiler.libcxx") @@ -51,10 +54,6 @@ def configure(self): def layout(self): basic_layout(self, src_folder="src") - def validate(self): - if is_msvc(self) and self.options.shared: - raise ConanInvalidConfiguration(f"{self.ref} doesn't support shared builds with Visual Studio yet") - def build_requirements(self): if self._settings_build.os == "Windows" and not is_msvc(self): self.win_bash = True diff --git a/recipes/calceph/config.yml b/recipes/calceph/config.yml index 8843656f63225..6a2ba2d0468ee 100644 --- a/recipes/calceph/config.yml +++ b/recipes/calceph/config.yml @@ -1,4 +1,6 @@ versions: + "3.5.5": + folder: all "3.5.1": folder: all "3.5.0": diff --git a/recipes/capnproto/all/conandata.yml b/recipes/capnproto/all/conandata.yml index e635b41da8f05..6ecc4845785b6 100644 --- a/recipes/capnproto/all/conandata.yml +++ b/recipes/capnproto/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.0.2": + url: "https://github.com/capnproto/capnproto/archive/v1.0.2.tar.gz" + sha256: "3cfd0ed58080d78b3a3381305489f2175cdaf1ef1cb55425d8fc8246a76bdff3" "1.0.1": url: "https://github.com/capnproto/capnproto/archive/v1.0.1.tar.gz" sha256: "5bdb16f6b389a9e29b04214b9bae1759e8b7fe2b45049d7e3f1f286ba050a200" @@ -27,6 +30,10 @@ sources: url: "https://github.com/capnproto/capnproto/archive/v0.7.0.tar.gz" sha256: "76c7114a3d142ad08b7208b3964a26e72a6320ee81331d3f0b87569fc9c47a28" patches: + "1.0.2": + - patch_file: "patches/0015-disable-tests-for-1.0.0.patch" + patch_description: "disable test build" + patch_type: "conan" "1.0.1": - patch_file: "patches/0015-disable-tests-for-1.0.0.patch" patch_description: "disable test build" diff --git a/recipes/capnproto/all/test_package/CMakeLists.txt b/recipes/capnproto/all/test_package/CMakeLists.txt index 8ffc65e9ffa4b..5e0d93f57dde5 100644 --- a/recipes/capnproto/all/test_package/CMakeLists.txt +++ b/recipes/capnproto/all/test_package/CMakeLists.txt @@ -3,19 +3,9 @@ project(test_package LANGUAGES CXX) find_package(CapnProto REQUIRED capnp capnp-rpc CONFIG) -capnp_generate_cpp(addressbookSources addressbookHeaders addressbook.capnp) -add_executable(addressbook addressbook.c++ ${addressbookSources}) + +add_executable(addressbook test_package.c++ ${addressbookSources}) target_include_directories(addressbook PRIVATE ${CMAKE_CURRENT_BINARY_DIR}) target_link_libraries(addressbook PRIVATE CapnProto::capnp) target_compile_features(addressbook PRIVATE cxx_std_14) -capnp_generate_cpp(calculatorSources calculatorHeaders calculator.capnp) -add_library(calculator_protocol STATIC ${calculatorSources}) -target_include_directories(calculator_protocol PUBLIC ${CMAKE_CURRENT_BINARY_DIR}) -target_link_libraries(calculator_protocol PUBLIC CapnProto::capnp-rpc) -target_compile_features(calculator_protocol PUBLIC cxx_std_14) - -add_executable(calculator-client calculator-client.c++) -target_link_libraries(calculator-client PRIVATE calculator_protocol) -add_executable(calculator-server calculator-server.c++) -target_link_libraries(calculator-server PRIVATE calculator_protocol) diff --git a/recipes/capnproto/all/test_package/addressbook.c++ b/recipes/capnproto/all/test_package/addressbook.c++ deleted file mode 100644 index b2bece9472b88..0000000000000 --- a/recipes/capnproto/all/test_package/addressbook.c++ +++ /dev/null @@ -1,288 +0,0 @@ -// Copyright (c) 2013-2014 Sandstorm Development Group, Inc. and contributors -// Licensed under the MIT License: -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -// This sample code appears in the documentation for the C++ implementation. -// -// If Cap'n Proto is installed, build the sample like: -// capnp compile -oc++ addressbook.capnp -// c++ -std=c++14 -Wall addressbook.c++ addressbook.capnp.c++ `pkg-config --cflags --libs capnp` -o addressbook -// -// If Cap'n Proto is not installed, but the source is located at $SRC and has been -// compiled in $BUILD (often both are simply ".." from here), you can do: -// $BUILD/capnp compile -I$SRC/src -o$BUILD/capnpc-c++ addressbook.capnp -// c++ -std=c++14 -Wall addressbook.c++ addressbook.capnp.c++ -I$SRC/src -L$BUILD/.libs -lcapnp -lkj -o addressbook -// -// Run like: -// ./addressbook write | ./addressbook read -// Use "dwrite" and "dread" to use dynamic code instead. - -// TODO(test): Needs cleanup. - -#include "addressbook.capnp.h" -#include -#include -#include - -using addressbook::Person; -using addressbook::AddressBook; - -void writeAddressBook(int fd) { - ::capnp::MallocMessageBuilder message; - - AddressBook::Builder addressBook = message.initRoot(); - ::capnp::List::Builder people = addressBook.initPeople(2); - - Person::Builder alice = people[0]; - alice.setId(123); - alice.setName("Alice"); - alice.setEmail("alice@example.com"); - // Type shown for explanation purposes; normally you'd use auto. - ::capnp::List::Builder alicePhones = - alice.initPhones(1); - alicePhones[0].setNumber("555-1212"); - alicePhones[0].setType(Person::PhoneNumber::Type::MOBILE); - alice.getEmployment().setSchool("MIT"); - - Person::Builder bob = people[1]; - bob.setId(456); - bob.setName("Bob"); - bob.setEmail("bob@example.com"); - auto bobPhones = bob.initPhones(2); - bobPhones[0].setNumber("555-4567"); - bobPhones[0].setType(Person::PhoneNumber::Type::HOME); - bobPhones[1].setNumber("555-7654"); - bobPhones[1].setType(Person::PhoneNumber::Type::WORK); - bob.getEmployment().setUnemployed(); - - writePackedMessageToFd(fd, message); -} - -void printAddressBook(int fd) { - ::capnp::PackedFdMessageReader message(fd); - - AddressBook::Reader addressBook = message.getRoot(); - - for (Person::Reader person : addressBook.getPeople()) { - std::cout << person.getName().cStr() << ": " - << person.getEmail().cStr() << std::endl; - for (Person::PhoneNumber::Reader phone: person.getPhones()) { - const char* typeName = "UNKNOWN"; - switch (phone.getType()) { - case Person::PhoneNumber::Type::MOBILE: typeName = "mobile"; break; - case Person::PhoneNumber::Type::HOME: typeName = "home"; break; - case Person::PhoneNumber::Type::WORK: typeName = "work"; break; - } - std::cout << " " << typeName << " phone: " - << phone.getNumber().cStr() << std::endl; - } - Person::Employment::Reader employment = person.getEmployment(); - switch (employment.which()) { - case Person::Employment::UNEMPLOYED: - std::cout << " unemployed" << std::endl; - break; - case Person::Employment::EMPLOYER: - std::cout << " employer: " - << employment.getEmployer().cStr() << std::endl; - break; - case Person::Employment::SCHOOL: - std::cout << " student at: " - << employment.getSchool().cStr() << std::endl; - break; - case Person::Employment::SELF_EMPLOYED: - std::cout << " self-employed" << std::endl; - break; - } - } -} - -#if !CAPNP_LITE - -#include "addressbook.capnp.h" -#include -#include -#include -#include -#include - -using ::capnp::DynamicValue; -using ::capnp::DynamicStruct; -using ::capnp::DynamicEnum; -using ::capnp::DynamicList; -using ::capnp::List; -using ::capnp::Schema; -using ::capnp::StructSchema; -using ::capnp::EnumSchema; - -using ::capnp::Void; -using ::capnp::Text; -using ::capnp::MallocMessageBuilder; -using ::capnp::PackedFdMessageReader; - -void dynamicWriteAddressBook(int fd, StructSchema schema) { - // Write a message using the dynamic API to set each - // field by text name. This isn't something you'd - // normally want to do; it's just for illustration. - - MallocMessageBuilder message; - - // Types shown for explanation purposes; normally you'd - // use auto. - DynamicStruct::Builder addressBook = - message.initRoot(schema); - - DynamicList::Builder people = - addressBook.init("people", 2).as(); - - DynamicStruct::Builder alice = - people[0].as(); - alice.set("id", 123); - alice.set("name", "Alice"); - alice.set("email", "alice@example.com"); - auto alicePhones = alice.init("phones", 1).as(); - auto phone0 = alicePhones[0].as(); - phone0.set("number", "555-1212"); - phone0.set("type", "mobile"); - alice.get("employment").as() - .set("school", "MIT"); - - auto bob = people[1].as(); - bob.set("id", 456); - bob.set("name", "Bob"); - bob.set("email", "bob@example.com"); - - // Some magic: We can convert a dynamic sub-value back to - // the native type with as()! - List::Builder bobPhones = - bob.init("phones", 2).as>(); - bobPhones[0].setNumber("555-4567"); - bobPhones[0].setType(Person::PhoneNumber::Type::HOME); - bobPhones[1].setNumber("555-7654"); - bobPhones[1].setType(Person::PhoneNumber::Type::WORK); - bob.get("employment").as() - .set("unemployed", ::capnp::VOID); - - writePackedMessageToFd(fd, message); -} - -void dynamicPrintValue(DynamicValue::Reader value) { - // Print an arbitrary message via the dynamic API by - // iterating over the schema. Look at the handling - // of STRUCT in particular. - - switch (value.getType()) { - case DynamicValue::VOID: - std::cout << ""; - break; - case DynamicValue::BOOL: - std::cout << (value.as() ? "true" : "false"); - break; - case DynamicValue::INT: - std::cout << value.as(); - break; - case DynamicValue::UINT: - std::cout << value.as(); - break; - case DynamicValue::FLOAT: - std::cout << value.as(); - break; - case DynamicValue::TEXT: - std::cout << '\"' << value.as().cStr() << '\"'; - break; - case DynamicValue::LIST: { - std::cout << "["; - bool first = true; - for (auto element: value.as()) { - if (first) { - first = false; - } else { - std::cout << ", "; - } - dynamicPrintValue(element); - } - std::cout << "]"; - break; - } - case DynamicValue::ENUM: { - auto enumValue = value.as(); - KJ_IF_MAYBE(enumerant, enumValue.getEnumerant()) { - std::cout << - enumerant->getProto().getName().cStr(); - } else { - // Unknown enum value; output raw number. - std::cout << enumValue.getRaw(); - } - break; - } - case DynamicValue::STRUCT: { - std::cout << "("; - auto structValue = value.as(); - bool first = true; - for (auto field: structValue.getSchema().getFields()) { - if (!structValue.has(field)) continue; - if (first) { - first = false; - } else { - std::cout << ", "; - } - std::cout << field.getProto().getName().cStr() - << " = "; - dynamicPrintValue(structValue.get(field)); - } - std::cout << ")"; - break; - } - default: - // There are other types, we aren't handling them. - std::cout << "?"; - break; - } -} - -void dynamicPrintMessage(int fd, StructSchema schema) { - PackedFdMessageReader message(fd); - dynamicPrintValue(message.getRoot(schema)); - std::cout << std::endl; -} - -#endif // !CAPNP_LITE - -int main(int argc, char* argv[]) { - if (argc != 2) { - std::cerr << "Missing arg." << std::endl; - return 1; - } else if (strcmp(argv[1], "write") == 0) { - writeAddressBook(1); - } else if (strcmp(argv[1], "read") == 0) { - printAddressBook(0); -#if !CAPNP_LITE - } else if (strcmp(argv[1], "dwrite") == 0) { - StructSchema schema = Schema::from(); - dynamicWriteAddressBook(1, schema); - } else if (strcmp(argv[1], "dread") == 0) { - StructSchema schema = Schema::from(); - dynamicPrintMessage(0, schema); -#endif - } else { - std::cerr << "Invalid arg: " << argv[1] << std::endl; - return 1; - } - return 0; -} diff --git a/recipes/capnproto/all/test_package/addressbook.capnp b/recipes/capnproto/all/test_package/addressbook.capnp deleted file mode 100644 index 1a6c60937e8af..0000000000000 --- a/recipes/capnproto/all/test_package/addressbook.capnp +++ /dev/null @@ -1,55 +0,0 @@ -# Copyright (c) 2013-2014 Sandstorm Development Group, Inc. and contributors -# Licensed under the MIT License: -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. - -@0x9eb32e19f86ee174; - -using Cxx = import "/capnp/c++.capnp"; -$Cxx.namespace("addressbook"); - -struct Person { - id @0 :UInt32; - name @1 :Text; - email @2 :Text; - phones @3 :List(PhoneNumber); - - struct PhoneNumber { - number @0 :Text; - type @1 :Type; - - enum Type { - mobile @0; - home @1; - work @2; - } - } - - employment :union { - unemployed @4 :Void; - employer @5 :Text; - school @6 :Text; - selfEmployed @7 :Void; - # We assume that a person is only one of these. - } -} - -struct AddressBook { - people @0 :List(Person); -} diff --git a/recipes/capnproto/all/test_package/calculator-client.c++ b/recipes/capnproto/all/test_package/calculator-client.c++ deleted file mode 100644 index 5d8452921cde9..0000000000000 --- a/recipes/capnproto/all/test_package/calculator-client.c++ +++ /dev/null @@ -1,367 +0,0 @@ -// Copyright (c) 2013-2014 Sandstorm Development Group, Inc. and contributors -// Licensed under the MIT License: -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -#include "calculator.capnp.h" -#include -#include -#include -#include - -class PowerFunction final: public Calculator::Function::Server { - // An implementation of the Function interface wrapping pow(). Note that - // we're implementing this on the client side and will pass a reference to - // the server. The server will then be able to make calls back to the client. - -public: - kj::Promise call(CallContext context) { - auto params = context.getParams().getParams(); - KJ_REQUIRE(params.size() == 2, "Wrong number of parameters."); - context.getResults().setValue(pow(params[0], params[1])); - return kj::READY_NOW; - } -}; - -int main(int argc, const char* argv[]) { - if (argc != 2) { - std::cerr << "usage: " << argv[0] << " HOST:PORT\n" - "Connects to the Calculator server at the given address and " - "does some RPCs." << std::endl; - return 1; - } - - capnp::EzRpcClient client(argv[1]); - Calculator::Client calculator = client.getMain(); - - // Keep an eye on `waitScope`. Whenever you see it used is a place where we - // stop and wait for the server to respond. If a line of code does not use - // `waitScope`, then it does not block! - auto& waitScope = client.getWaitScope(); - - { - // Make a request that just evaluates the literal value 123. - // - // What's interesting here is that evaluate() returns a "Value", which is - // another interface and therefore points back to an object living on the - // server. We then have to call read() on that object to read it. - // However, even though we are making two RPC's, this block executes in - // *one* network round trip because of promise pipelining: we do not wait - // for the first call to complete before we send the second call to the - // server. - - std::cout << "Evaluating a literal... "; - std::cout.flush(); - - // Set up the request. - auto request = calculator.evaluateRequest(); - request.getExpression().setLiteral(123); - - // Send it, which returns a promise for the result (without blocking). - auto evalPromise = request.send(); - - // Using the promise, create a pipelined request to call read() on the - // returned object, and then send that. - auto readPromise = evalPromise.getValue().readRequest().send(); - - // Now that we've sent all the requests, wait for the response. Until this - // point, we haven't waited at all! - auto response = readPromise.wait(waitScope); - KJ_ASSERT(response.getValue() == 123); - - std::cout << "PASS" << std::endl; - } - - { - // Make a request to evaluate 123 + 45 - 67. - // - // The Calculator interface requires that we first call getOperator() to - // get the addition and subtraction functions, then call evaluate() to use - // them. But, once again, we can get both functions, call evaluate(), and - // then read() the result -- four RPCs -- in the time of *one* network - // round trip, because of promise pipelining. - - std::cout << "Using add and subtract... "; - std::cout.flush(); - - Calculator::Function::Client add = nullptr; - Calculator::Function::Client subtract = nullptr; - - { - // Get the "add" function from the server. - auto request = calculator.getOperatorRequest(); - request.setOp(Calculator::Operator::ADD); - add = request.send().getFunc(); - } - - { - // Get the "subtract" function from the server. - auto request = calculator.getOperatorRequest(); - request.setOp(Calculator::Operator::SUBTRACT); - subtract = request.send().getFunc(); - } - - // Build the request to evaluate 123 + 45 - 67. - auto request = calculator.evaluateRequest(); - - auto subtractCall = request.getExpression().initCall(); - subtractCall.setFunction(subtract); - auto subtractParams = subtractCall.initParams(2); - subtractParams[1].setLiteral(67); - - auto addCall = subtractParams[0].initCall(); - addCall.setFunction(add); - auto addParams = addCall.initParams(2); - addParams[0].setLiteral(123); - addParams[1].setLiteral(45); - - // Send the evaluate() request, read() the result, and wait for read() to - // finish. - auto evalPromise = request.send(); - auto readPromise = evalPromise.getValue().readRequest().send(); - - auto response = readPromise.wait(waitScope); - KJ_ASSERT(response.getValue() == 101); - - std::cout << "PASS" << std::endl; - } - - { - // Make a request to evaluate 4 * 6, then use the result in two more - // requests that add 3 and 5. - // - // Since evaluate() returns its result wrapped in a `Value`, we can pass - // that `Value` back to the server in subsequent requests before the first - // `evaluate()` has actually returned. Thus, this example again does only - // one network round trip. - - std::cout << "Pipelining eval() calls... "; - std::cout.flush(); - - Calculator::Function::Client add = nullptr; - Calculator::Function::Client multiply = nullptr; - - { - // Get the "add" function from the server. - auto request = calculator.getOperatorRequest(); - request.setOp(Calculator::Operator::ADD); - add = request.send().getFunc(); - } - - { - // Get the "multiply" function from the server. - auto request = calculator.getOperatorRequest(); - request.setOp(Calculator::Operator::MULTIPLY); - multiply = request.send().getFunc(); - } - - // Build the request to evaluate 4 * 6 - auto request = calculator.evaluateRequest(); - - auto multiplyCall = request.getExpression().initCall(); - multiplyCall.setFunction(multiply); - auto multiplyParams = multiplyCall.initParams(2); - multiplyParams[0].setLiteral(4); - multiplyParams[1].setLiteral(6); - - auto multiplyResult = request.send().getValue(); - - // Use the result in two calls that add 3 and add 5. - - auto add3Request = calculator.evaluateRequest(); - auto add3Call = add3Request.getExpression().initCall(); - add3Call.setFunction(add); - auto add3Params = add3Call.initParams(2); - add3Params[0].setPreviousResult(multiplyResult); - add3Params[1].setLiteral(3); - auto add3Promise = add3Request.send().getValue().readRequest().send(); - - auto add5Request = calculator.evaluateRequest(); - auto add5Call = add5Request.getExpression().initCall(); - add5Call.setFunction(add); - auto add5Params = add5Call.initParams(2); - add5Params[0].setPreviousResult(multiplyResult); - add5Params[1].setLiteral(5); - auto add5Promise = add5Request.send().getValue().readRequest().send(); - - // Now wait for the results. - KJ_ASSERT(add3Promise.wait(waitScope).getValue() == 27); - KJ_ASSERT(add5Promise.wait(waitScope).getValue() == 29); - - std::cout << "PASS" << std::endl; - } - - { - // Our calculator interface supports defining functions. Here we use it - // to define two functions and then make calls to them as follows: - // - // f(x, y) = x * 100 + y - // g(x) = f(x, x + 1) * 2; - // f(12, 34) - // g(21) - // - // Once again, the whole thing takes only one network round trip. - - std::cout << "Defining functions... "; - std::cout.flush(); - - Calculator::Function::Client add = nullptr; - Calculator::Function::Client multiply = nullptr; - Calculator::Function::Client f = nullptr; - Calculator::Function::Client g = nullptr; - - { - // Get the "add" function from the server. - auto request = calculator.getOperatorRequest(); - request.setOp(Calculator::Operator::ADD); - add = request.send().getFunc(); - } - - { - // Get the "multiply" function from the server. - auto request = calculator.getOperatorRequest(); - request.setOp(Calculator::Operator::MULTIPLY); - multiply = request.send().getFunc(); - } - - { - // Define f. - auto request = calculator.defFunctionRequest(); - request.setParamCount(2); - - { - // Build the function body. - auto addCall = request.getBody().initCall(); - addCall.setFunction(add); - auto addParams = addCall.initParams(2); - addParams[1].setParameter(1); // y - - auto multiplyCall = addParams[0].initCall(); - multiplyCall.setFunction(multiply); - auto multiplyParams = multiplyCall.initParams(2); - multiplyParams[0].setParameter(0); // x - multiplyParams[1].setLiteral(100); - } - - f = request.send().getFunc(); - } - - { - // Define g. - auto request = calculator.defFunctionRequest(); - request.setParamCount(1); - - { - // Build the function body. - auto multiplyCall = request.getBody().initCall(); - multiplyCall.setFunction(multiply); - auto multiplyParams = multiplyCall.initParams(2); - multiplyParams[1].setLiteral(2); - - auto fCall = multiplyParams[0].initCall(); - fCall.setFunction(f); - auto fParams = fCall.initParams(2); - fParams[0].setParameter(0); - - auto addCall = fParams[1].initCall(); - addCall.setFunction(add); - auto addParams = addCall.initParams(2); - addParams[0].setParameter(0); - addParams[1].setLiteral(1); - } - - g = request.send().getFunc(); - } - - // OK, we've defined all our functions. Now create our eval requests. - - // f(12, 34) - auto fEvalRequest = calculator.evaluateRequest(); - auto fCall = fEvalRequest.initExpression().initCall(); - fCall.setFunction(f); - auto fParams = fCall.initParams(2); - fParams[0].setLiteral(12); - fParams[1].setLiteral(34); - auto fEvalPromise = fEvalRequest.send().getValue().readRequest().send(); - - // g(21) - auto gEvalRequest = calculator.evaluateRequest(); - auto gCall = gEvalRequest.initExpression().initCall(); - gCall.setFunction(g); - gCall.initParams(1)[0].setLiteral(21); - auto gEvalPromise = gEvalRequest.send().getValue().readRequest().send(); - - // Wait for the results. - KJ_ASSERT(fEvalPromise.wait(waitScope).getValue() == 1234); - KJ_ASSERT(gEvalPromise.wait(waitScope).getValue() == 4244); - - std::cout << "PASS" << std::endl; - } - - { - // Make a request that will call back to a function defined locally. - // - // Specifically, we will compute 2^(4 + 5). However, exponent is not - // defined by the Calculator server. So, we'll implement the Function - // interface locally and pass it to the server for it to use when - // evaluating the expression. - // - // This example requires two network round trips to complete, because the - // server calls back to the client once before finishing. In this - // particular case, this could potentially be optimized by using a tail - // call on the server side -- see CallContext::tailCall(). However, to - // keep the example simpler, we haven't implemented this optimization in - // the sample server. - - std::cout << "Using a callback... "; - std::cout.flush(); - - Calculator::Function::Client add = nullptr; - - { - // Get the "add" function from the server. - auto request = calculator.getOperatorRequest(); - request.setOp(Calculator::Operator::ADD); - add = request.send().getFunc(); - } - - // Build the eval request for 2^(4+5). - auto request = calculator.evaluateRequest(); - - auto powCall = request.getExpression().initCall(); - powCall.setFunction(kj::heap()); - auto powParams = powCall.initParams(2); - powParams[0].setLiteral(2); - - auto addCall = powParams[1].initCall(); - addCall.setFunction(add); - auto addParams = addCall.initParams(2); - addParams[0].setLiteral(4); - addParams[1].setLiteral(5); - - // Send the request and wait. - auto response = request.send().getValue().readRequest() - .send().wait(waitScope); - KJ_ASSERT(response.getValue() == 512); - - std::cout << "PASS" << std::endl; - } - - return 0; -} diff --git a/recipes/capnproto/all/test_package/calculator-server.c++ b/recipes/capnproto/all/test_package/calculator-server.c++ deleted file mode 100644 index c2593be3a9064..0000000000000 --- a/recipes/capnproto/all/test_package/calculator-server.c++ +++ /dev/null @@ -1,215 +0,0 @@ -// Copyright (c) 2013-2014 Sandstorm Development Group, Inc. and contributors -// Licensed under the MIT License: -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -#include "calculator.capnp.h" -#include -#include -#include -#include - -typedef unsigned int uint; - -kj::Promise readValue(Calculator::Value::Client value) { - // Helper function to asynchronously call read() on a Calculator::Value and - // return a promise for the result. (In the future, the generated code might - // include something like this automatically.) - - return value.readRequest().send() - .then([](capnp::Response result) { - return result.getValue(); - }); -} - -kj::Promise evaluateImpl( - Calculator::Expression::Reader expression, - capnp::List::Reader params = capnp::List::Reader()) { - // Implementation of CalculatorImpl::evaluate(), also shared by - // FunctionImpl::call(). In the latter case, `params` are the parameter - // values passed to the function; in the former case, `params` is just an - // empty list. - - switch (expression.which()) { - case Calculator::Expression::LITERAL: - return expression.getLiteral(); - - case Calculator::Expression::PREVIOUS_RESULT: - return readValue(expression.getPreviousResult()); - - case Calculator::Expression::PARAMETER: { - KJ_REQUIRE(expression.getParameter() < params.size(), - "Parameter index out-of-range."); - return params[expression.getParameter()]; - } - - case Calculator::Expression::CALL: { - auto call = expression.getCall(); - auto func = call.getFunction(); - - // Evaluate each parameter. - kj::Array> paramPromises = - KJ_MAP(param, call.getParams()) { - return evaluateImpl(param, params); - }; - - // Join the array of promises into a promise for an array. - kj::Promise> joinedParams = - kj::joinPromises(kj::mv(paramPromises)); - - // When the parameters are complete, call the function. - return joinedParams.then([KJ_CPCAP(func)](kj::Array&& paramValues) mutable { - auto request = func.callRequest(); - request.setParams(paramValues); - return request.send().then( - [](capnp::Response&& result) { - return result.getValue(); - }); - }); - } - - default: - // Throw an exception. - KJ_FAIL_REQUIRE("Unknown expression type."); - } -} - -class ValueImpl final: public Calculator::Value::Server { - // Simple implementation of the Calculator.Value Cap'n Proto interface. - -public: - ValueImpl(double value): value(value) {} - - kj::Promise read(ReadContext context) { - context.getResults().setValue(value); - return kj::READY_NOW; - } - -private: - double value; -}; - -class FunctionImpl final: public Calculator::Function::Server { - // Implementation of the Calculator.Function Cap'n Proto interface, where the - // function is defined by a Calculator.Expression. - -public: - FunctionImpl(uint paramCount, Calculator::Expression::Reader body) - : paramCount(paramCount) { - this->body.setRoot(body); - } - - kj::Promise call(CallContext context) { - auto params = context.getParams().getParams(); - KJ_REQUIRE(params.size() == paramCount, "Wrong number of parameters."); - - return evaluateImpl(body.getRoot(), params) - .then([KJ_CPCAP(context)](double value) mutable { - context.getResults().setValue(value); - }); - } - -private: - uint paramCount; - // The function's arity. - - capnp::MallocMessageBuilder body; - // Stores a permanent copy of the function body. -}; - -class OperatorImpl final: public Calculator::Function::Server { - // Implementation of the Calculator.Function Cap'n Proto interface, wrapping - // basic binary arithmetic operators. - -public: - OperatorImpl(Calculator::Operator op): op(op) {} - - kj::Promise call(CallContext context) { - auto params = context.getParams().getParams(); - KJ_REQUIRE(params.size() == 2, "Wrong number of parameters."); - - double result; - switch (op) { - case Calculator::Operator::ADD: result = params[0] + params[1]; break; - case Calculator::Operator::SUBTRACT:result = params[0] - params[1]; break; - case Calculator::Operator::MULTIPLY:result = params[0] * params[1]; break; - case Calculator::Operator::DIVIDE: result = params[0] / params[1]; break; - default: - KJ_FAIL_REQUIRE("Unknown operator."); - } - - context.getResults().setValue(result); - return kj::READY_NOW; - } - -private: - Calculator::Operator op; -}; - -class CalculatorImpl final: public Calculator::Server { - // Implementation of the Calculator Cap'n Proto interface. - -public: - kj::Promise evaluate(EvaluateContext context) override { - return evaluateImpl(context.getParams().getExpression()) - .then([KJ_CPCAP(context)](double value) mutable { - context.getResults().setValue(kj::heap(value)); - }); - } - - kj::Promise defFunction(DefFunctionContext context) override { - auto params = context.getParams(); - context.getResults().setFunc(kj::heap( - params.getParamCount(), params.getBody())); - return kj::READY_NOW; - } - - kj::Promise getOperator(GetOperatorContext context) override { - context.getResults().setFunc(kj::heap( - context.getParams().getOp())); - return kj::READY_NOW; - } -}; - -int main(int argc, const char* argv[]) { - if (argc != 2) { - std::cerr << "usage: " << argv[0] << " ADDRESS[:PORT]\n" - "Runs the server bound to the given address/port.\n" - "ADDRESS may be '*' to bind to all local addresses.\n" - ":PORT may be omitted to choose a port automatically." << std::endl; - return 1; - } - - // Set up a server. - capnp::EzRpcServer server(kj::heap(), argv[1]); - - // Write the port number to stdout, in case it was chosen automatically. - auto& waitScope = server.getWaitScope(); - uint port = server.getPort().wait(waitScope); - if (port == 0) { - // The address format "unix:/path/to/socket" opens a unix domain socket, - // in which case the port will be zero. - std::cout << "Listening on Unix socket..." << std::endl; - } else { - std::cout << "Listening on port " << port << "..." << std::endl; - } - - // Run forever, accepting connections and handling requests. - kj::NEVER_DONE.wait(waitScope); -} diff --git a/recipes/capnproto/all/test_package/calculator.capnp b/recipes/capnproto/all/test_package/calculator.capnp deleted file mode 100644 index adc8294e57578..0000000000000 --- a/recipes/capnproto/all/test_package/calculator.capnp +++ /dev/null @@ -1,118 +0,0 @@ -# Copyright (c) 2013-2014 Sandstorm Development Group, Inc. and contributors -# Licensed under the MIT License: -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. - -@0x85150b117366d14b; - -interface Calculator { - # A "simple" mathematical calculator, callable via RPC. - # - # But, to show off Cap'n Proto, we add some twists: - # - # - You can use the result from one call as the input to the next - # without a network round trip. To accomplish this, evaluate() - # returns a `Value` object wrapping the actual numeric value. - # This object may be used in a subsequent expression. With - # promise pipelining, the Value can actually be used before - # the evaluate() call that creates it returns! - # - # - You can define new functions, and then call them. This again - # shows off pipelining, but it also gives the client the - # opportunity to define a function on the client side and have - # the server call back to it. - # - # - The basic arithmetic operators are exposed as Functions, and - # you have to call getOperator() to obtain them from the server. - # This again demonstrates pipelining -- using getOperator() to - # get each operator and then using them in evaluate() still - # only takes one network round trip. - - evaluate @0 (expression :Expression) -> (value :Value); - # Evaluate the given expression and return the result. The - # result is returned wrapped in a Value interface so that you - # may pass it back to the server in a pipelined request. To - # actually get the numeric value, you must call read() on the - # Value -- but again, this can be pipelined so that it incurs - # no additional latency. - - struct Expression { - # A numeric expression. - - union { - literal @0 :Float64; - # A literal numeric value. - - previousResult @1 :Value; - # A value that was (or, will be) returned by a previous - # evaluate(). - - parameter @2 :UInt32; - # A parameter to the function (only valid in function bodies; - # see defFunction). - - call :group { - # Call a function on a list of parameters. - function @3 :Function; - params @4 :List(Expression); - } - } - } - - interface Value { - # Wraps a numeric value in an RPC object. This allows the value - # to be used in subsequent evaluate() requests without the client - # waiting for the evaluate() that returns the Value to finish. - - read @0 () -> (value :Float64); - # Read back the raw numeric value. - } - - defFunction @1 (paramCount :Int32, body :Expression) - -> (func :Function); - # Define a function that takes `paramCount` parameters and returns the - # evaluation of `body` after substituting these parameters. - - interface Function { - # An algebraic function. Can be called directly, or can be used inside - # an Expression. - # - # A client can create a Function that runs on the server side using - # `defFunction()` or `getOperator()`. Alternatively, a client can - # implement a Function on the client side and the server will call back - # to it. However, a function defined on the client side will require a - # network round trip whenever the server needs to call it, whereas - # functions defined on the server and then passed back to it are called - # locally. - - call @0 (params :List(Float64)) -> (value :Float64); - # Call the function on the given parameters. - } - - getOperator @2 (op :Operator) -> (func :Function); - # Get a Function representing an arithmetic operator, which can then be - # used in Expressions. - - enum Operator { - add @0; - subtract @1; - multiply @2; - divide @3; - } -} diff --git a/recipes/capnproto/all/test_package/conanfile.py b/recipes/capnproto/all/test_package/conanfile.py index d4d32590a51cc..85b7dcba030f5 100644 --- a/recipes/capnproto/all/test_package/conanfile.py +++ b/recipes/capnproto/all/test_package/conanfile.py @@ -14,11 +14,7 @@ def layout(self): cmake_layout(self) def requirements(self): - self.requires(self.tested_reference_str) - - def build_requirements(self): - if hasattr(self, "settings_build") and cross_building(self): - self.tool_requires(self.tested_reference_str) + self.requires(self.tested_reference_str, run=True) def generate(self): VirtualRunEnv(self).generate() @@ -34,5 +30,7 @@ def build(self): def test(self): if can_run(self): - bin_path = os.path.join(self.cpp.build.bindirs[0], "addressbook") - self.run(f"{bin_path} write", env="conanrun") + bin_path = os.path.join(self.cpp.build.bindir, "addressbook") + self.run(bin_path, env="conanrun") + + self.run("capnp id") diff --git a/recipes/capnproto/all/test_package/test_package.c++ b/recipes/capnproto/all/test_package/test_package.c++ new file mode 100644 index 0000000000000..8ed58079da0b0 --- /dev/null +++ b/recipes/capnproto/all/test_package/test_package.c++ @@ -0,0 +1,9 @@ +#include +#include + + +int main() { + capnp::MallocMessageBuilder message; + std::cout << sizeof(message) << std::endl; + return 0; +} diff --git a/recipes/capnproto/all/test_v1_package/CMakeLists.txt b/recipes/capnproto/all/test_v1_package/CMakeLists.txt deleted file mode 100644 index 0d20897301b68..0000000000000 --- a/recipes/capnproto/all/test_v1_package/CMakeLists.txt +++ /dev/null @@ -1,8 +0,0 @@ -cmake_minimum_required(VERSION 3.1) -project(test_package) - -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) - -add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package - ${CMAKE_CURRENT_BINARY_DIR}/test_package) diff --git a/recipes/capnproto/all/test_v1_package/conanfile.py b/recipes/capnproto/all/test_v1_package/conanfile.py deleted file mode 100644 index 9c7aa58ab8868..0000000000000 --- a/recipes/capnproto/all/test_v1_package/conanfile.py +++ /dev/null @@ -1,26 +0,0 @@ -from conans import ConanFile, CMake, tools -import os - - -class TestPackageConan(ConanFile): - settings = "os", "arch", "compiler", "build_type" - generators = "cmake", "cmake_find_package_multi" - test_type = "explicit" - - def requirements(self): - self.requires(self.tested_reference_str) - - def build_requirements(self): - if hasattr(self, "settings_build"): - self.build_requires(self.tested_reference_str) - - def build(self): - with tools.no_op() if hasattr(self, "settings_build") else tools.run_environment(self): - cmake = CMake(self) - cmake.configure() - cmake.build() - - def test(self): - if not tools.cross_building(self): - bin_path = os.path.join("bin", "addressbook") - self.run(f"{bin_path} write", run_environment=True) diff --git a/recipes/capnproto/config.yml b/recipes/capnproto/config.yml index 887e41e533af8..7439163d18050 100644 --- a/recipes/capnproto/config.yml +++ b/recipes/capnproto/config.yml @@ -1,4 +1,6 @@ versions: + "1.0.2": + folder: all "1.0.1": folder: all "1.0.0": diff --git a/recipes/cargs/all/conandata.yml b/recipes/cargs/all/conandata.yml index 01238c00f6a56..4947b6c17c0a0 100644 --- a/recipes/cargs/all/conandata.yml +++ b/recipes/cargs/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.2.0": + url: "https://github.com/likle/cargs/archive/v1.2.0.tar.gz" + sha256: "0b33379e3d3c8cb3e22f33d3e1a260adcd366970868bc9b7c47237f24188ff25" "1.1.0": url: "https://github.com/likle/cargs/archive/v1.1.0.tar.gz" sha256: "87e7da5b539f574d48529870cb0620ef5a244a5ee2eac73cc7559dedc04128ca" diff --git a/recipes/cargs/config.yml b/recipes/cargs/config.yml index 24b8d6fbb0acc..f86b56ea8cf6a 100644 --- a/recipes/cargs/config.yml +++ b/recipes/cargs/config.yml @@ -1,4 +1,6 @@ versions: + "1.2.0": + folder: all "1.1.0": folder: all "1.0.3": diff --git a/recipes/catch2/3.x.x/conandata.yml b/recipes/catch2/3.x.x/conandata.yml index 1b3f439405dee..21b5c183917cb 100644 --- a/recipes/catch2/3.x.x/conandata.yml +++ b/recipes/catch2/3.x.x/conandata.yml @@ -1,4 +1,13 @@ sources: + "3.7.1": + url: "https://github.com/catchorg/Catch2/archive/v3.7.1.tar.gz" + sha256: "c991b247a1a0d7bb9c39aa35faf0fe9e19764213f28ffba3109388e62ee0269c" + "3.7.0": + url: "https://github.com/catchorg/Catch2/archive/v3.7.0.tar.gz" + sha256: "5b10cd536fa3818112a82820ce0787bd9f2a906c618429e7c4dea639983c8e88" + "3.6.0": + url: "https://github.com/catchorg/Catch2/archive/v3.6.0.tar.gz" + sha256: "485932259a75c7c6b72d4b874242c489ea5155d17efa345eb8cc72159f49f356" "3.5.4": url: "https://github.com/catchorg/Catch2/archive/v3.5.4.tar.gz" sha256: "b7754b711242c167d8f60b890695347f90a1ebc95949a045385114165d606dbb" diff --git a/recipes/catch2/3.x.x/conanfile.py b/recipes/catch2/3.x.x/conanfile.py index 6f59c5ce8e188..5bc8657f4ad30 100644 --- a/recipes/catch2/3.x.x/conanfile.py +++ b/recipes/catch2/3.x.x/conanfile.py @@ -7,16 +7,16 @@ import os import textwrap -required_conan_version = ">=1.53.0" +required_conan_version = ">=1.54.0" class Catch2Conan(ConanFile): name = "catch2" description = "A modern, C++-native, header-only, framework for unit-tests, TDD and BDD" - topics = ("catch2", "unit-test", "tdd", "bdd") license = "BSL-1.0" - homepage = "https://github.com/catchorg/Catch2" url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/catchorg/Catch2" + topics = ("catch2", "unit-test", "tdd", "bdd") package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { @@ -35,6 +35,9 @@ class Catch2Conan(ConanFile): "console_width": "80", "no_posix_signals": False, } + # disallow cppstd compatibility, as it affects the ABI in this library + # see https://github.com/conan-io/conan-center-index/issues/19008 + extension_properties = {"compatibility_cppstd": False} @property def _min_cppstd(self): diff --git a/recipes/catch2/config.yml b/recipes/catch2/config.yml index d67eb0bdcc6a4..0c81c16ccdbcb 100644 --- a/recipes/catch2/config.yml +++ b/recipes/catch2/config.yml @@ -1,4 +1,10 @@ versions: + "3.7.1": + folder: 3.x.x + "3.7.0": + folder: 3.x.x + "3.6.0": + folder: 3.x.x "3.5.4": folder: 3.x.x "3.5.3": diff --git a/recipes/ccache/all/conandata.yml b/recipes/ccache/all/conandata.yml index 5c1cbd2adcc93..9dd38ae4846da 100644 --- a/recipes/ccache/all/conandata.yml +++ b/recipes/ccache/all/conandata.yml @@ -1,63 +1,13 @@ sources: + "4.10.2": + url: "https://github.com/ccache/ccache/releases/download/v4.10.2/ccache-4.10.2.tar.gz" + sha256: "108100960bb7e64573ea925af2ee7611701241abb36ce0aae3354528403a7d87" + "4.10": + url: "https://github.com/ccache/ccache/releases/download/v4.10/ccache-4.10.tar.gz" + sha256: "16972ba62c8499045edc3ae7d7b8a0b419a961567f5ff0f01bf5a44194204775" "4.9.1": url: "https://github.com/ccache/ccache/releases/download/v4.9.1/ccache-4.9.1.tar.xz" sha256: "4c03bc840699127d16c3f0e6112e3f40ce6a230d5873daa78c60a59c7ef59d25" - "4.9": - url: "https://github.com/ccache/ccache/releases/download/v4.9/ccache-4.9.tar.xz" - sha256: "1ebc72324e3ab52af0b562bf54189d108e85eef6478d6304a345a3c2dc4018e0" "4.8.3": url: "https://github.com/ccache/ccache/releases/download/v4.8.3/ccache-4.8.3.tar.xz" sha256: "e47374c810b248cfca3665ee1d86c7c763ffd68d9944bc422d9c1872611f2b11" - "4.8.2": - url: "https://github.com/ccache/ccache/releases/download/v4.8.2/ccache-4.8.2.tar.xz" - sha256: "3d3fb3f888a5b16c4fa7ee5214cca76348afd6130e8443de5f6f2424f2076a49" - "4.8.1": - url: "https://github.com/ccache/ccache/releases/download/v4.8.1/ccache-4.8.1.tar.xz" - sha256: "87959b6819530b3dcaeb39992f585b9fc2c7120302809741378097774919fb6f" - "4.8": - url: "https://github.com/ccache/ccache/releases/download/v4.8/ccache-4.8.tar.xz" - sha256: "b963ee3bf88d7266b8a0565e4ba685d5666357f0a7e364ed98adb0dc1191fcbb" - "4.7.4": - url: "https://github.com/ccache/ccache/releases/download/v4.7.4/ccache-4.7.4.tar.xz" - sha256: "df0c64d15d3efaf0b4f6837dd6b1467e40eeaaa807db25ce79c3a08a46a84e36" -patches: - "4.9.1": - - patch_file: "patches/4.9-cmake-msvc-runtime.patch" - patch_description: "fixup MSVC runtime" - patch_type: "conan" - "4.9": - - patch_file: "patches/4.9-cmake-msvc-runtime.patch" - patch_description: "fixup MSVC runtime" - patch_type: "conan" - "4.8.3": - - patch_file: "patches/4.8-cmake-msvc-runtime.patch" - patch_description: "fixup MSVC runtime" - patch_type: "conan" - "4.8.2": - - patch_file: "patches/4.8-cmake-msvc-runtime.patch" - patch_description: "fixup MSVC runtime" - patch_type: "conan" - "4.8.1": - - patch_file: "patches/4.8-cmake-msvc-runtime.patch" - patch_description: "fixup MSVC runtime" - patch_type: "conan" - - patch_file: "patches/4.7.4-use-intrinsics-if-msbuild.patch" - patch_description: "fix build issue when using Visual Studio generator" - patch_type: "backport" - patch_source: "https://github.com/ccache/ccache/commit/350787245e7e894c8a472b176545f59a10e9dadb" - "4.8": - - patch_file: "patches/4.8-cmake-msvc-runtime.patch" - patch_description: "fixup MSVC runtime" - patch_type: "conan" - - patch_file: "patches/4.7.4-use-intrinsics-if-msbuild.patch" - patch_description: "fix build issue when using Visual Studio generator" - patch_type: "backport" - patch_source: "https://github.com/ccache/ccache/commit/350787245e7e894c8a472b176545f59a10e9dadb" - "4.7.4": - - patch_file: "patches/4.7.4-cmake-msvc-runtime.patch" - patch_description: "fixup MSVC runtime" - patch_type: "conan" - - patch_file: "patches/4.7.4-use-intrinsics-if-msbuild.patch" - patch_description: "fix build issue when using Visual Studio generator" - patch_type: "backport" - patch_source: "https://github.com/ccache/ccache/commit/350787245e7e894c8a472b176545f59a10e9dadb" diff --git a/recipes/ccache/all/conanfile.py b/recipes/ccache/all/conanfile.py index 8234bde469ffe..8eb6bcbaa6c38 100644 --- a/recipes/ccache/all/conanfile.py +++ b/recipes/ccache/all/conanfile.py @@ -1,7 +1,7 @@ from conan import ConanFile from conan.tools.cmake import cmake_layout, CMake, CMakeToolchain, CMakeDeps from conan.errors import ConanInvalidConfiguration -from conan.tools.files import copy, get, apply_conandata_patches, export_conandata_patches +from conan.tools.files import copy, get from conan.tools.build import check_min_cppstd from conan.tools.scm import Version from conan.tools.microsoft import check_min_vs, is_msvc @@ -12,6 +12,7 @@ class CcacheConan(ConanFile): name = "ccache" + package_type = "application" description = ( "Ccache (or “ccacheâ€) is a compiler cache. It speeds up recompilation " "by caching previous compilations and detecting when the same " @@ -41,9 +42,6 @@ def _compilers_minimum_version(self): "apple-clang": "11", } - def export_sources(self): - export_conandata_patches(self) - def layout(self): cmake_layout(self, src_folder="src") @@ -52,6 +50,10 @@ def requirements(self): if self.options.redis_storage_backend: self.requires("hiredis/1.1.0") + if Version(self.version) >= "4.10": + self.requires("fmt/10.2.1") + self.requires("xxhash/[~0.8]") + def validate(self): if self.settings.compiler.cppstd: check_min_cppstd(self, self._min_cppstd) @@ -66,12 +68,15 @@ def validate(self): self.settings.compiler.libcxx == "libstdc++": raise ConanInvalidConfiguration(f"{self.ref} requires C++ filesystem library, that is not supported by Clang 11 + libstdc++.") + if self.settings.os == "Windows" and self.settings.arch == "armv8" and Version(self.version) < "4.10": + raise ConanInvalidConfiguration("ccache does not support ARMv8 on Windows before version 4.10") + def build_requirements(self): self.tool_requires("cmake/[>=3.15 <4]") def source(self): - get(self, **self.conan_data["sources"][self.version], - destination=self.source_folder, strip_root=True) + get(self, **self.conan_data["sources"][self.version], destination=self.source_folder, + strip_root=True) def generate(self): tc = CMakeToolchain(self) @@ -80,17 +85,26 @@ def generate(self): tc.variables["ZSTD_FROM_INTERNET"] = False tc.variables["ENABLE_DOCUMENTATION"] = False tc.variables["ENABLE_TESTING"] = False + tc.variables["STATIC_LINK"] = False # Don't link static runtimes and let Conan handle it tc.generate() deps = CMakeDeps(self) - deps.set_property("hiredis", "cmake_target_name", "HIREDIS::HIREDIS") - deps.set_property("hiredis", "cmake_find_mode", "module") - deps.set_property("zstd", "cmake_target_name", "ZSTD::ZSTD") + if Version(self.version) >= "4.10": + deps.set_property("fmt", "cmake_file_name", "Fmt") + deps.set_property("fmt", "cmake_find_mode", "module") + deps.set_property("fmt", "cmake_target_name", "dep_fmt") + deps.set_property("zstd", "cmake_file_name", "Zstd") + deps.set_property("zstd", "cmake_target_name", "dep_zstd") + deps.set_property("hiredis", "cmake_file_name", "Hiredis") + deps.set_property("hiredis", "cmake_target_name", "dep_hiredis") + else: + deps.set_property("hiredis", "cmake_target_name", "HIREDIS::HIREDIS") + deps.set_property("zstd", "cmake_target_name", "ZSTD::ZSTD") deps.set_property("zstd", "cmake_find_mode", "module") + deps.set_property("hiredis", "cmake_find_mode", "module") deps.generate() def build(self): - apply_conandata_patches(self) cmake = CMake(self) cmake.configure() cmake.build() @@ -101,7 +115,9 @@ def package(self): cmake.install() def package_info(self): + self.cpp_info.libdirs = [] + self.cpp_info.includedirs = [] + bin_path = os.path.join(self.package_folder, "bin") self.output.info("Appending PATH environment variable: {}".format(bin_path)) self.env_info.PATH.append(bin_path) - self.cpp_info.includedirs = [] diff --git a/recipes/ccache/all/patches/4.7.4-cmake-msvc-runtime.patch b/recipes/ccache/all/patches/4.7.4-cmake-msvc-runtime.patch deleted file mode 100644 index 0bc4c5ce8f995..0000000000000 --- a/recipes/ccache/all/patches/4.7.4-cmake-msvc-runtime.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- CMakeLists.txt -+++ CMakeLists.txt -@@ -97,7 +97,7 @@ - - # Link MSVC runtime statically. - if(MSVC) -- set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$:Debug>") -+ - # Link MINGW runtime statically. - elseif(WIN32) - if((CMAKE_CXX_COMPILER_ID STREQUAL GNU) OR (CMAKE_CXX_COMPILER_ID STREQUAL Clang)) diff --git a/recipes/ccache/all/patches/4.7.4-use-intrinsics-if-msbuild.patch b/recipes/ccache/all/patches/4.7.4-use-intrinsics-if-msbuild.patch deleted file mode 100644 index f55e169ebc167..0000000000000 --- a/recipes/ccache/all/patches/4.7.4-use-intrinsics-if-msbuild.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 350787245e7e894c8a472b176545f59a10e9dadb Mon Sep 17 00:00:00 2001 -From: Rafael Kitover -Date: Mon, 22 May 2023 22:13:19 +0000 -Subject: [PATCH] fix: Disable masm on msbuild for blake3 with VS - -Because of some bug with either msbuild or the cmake generator, the C -compiler flags are passed to the masm assembler making it fail. - -Use the C intrinsic versions for blake3 when msbuild is in use. - -Fix #1278 - -Signed-off-by: Rafael Kitover ---- - src/third_party/blake3/CMakeLists.txt | 6 +++++- - 1 file changed, 5 insertions(+), 1 deletion(-) - -diff --git a/src/third_party/blake3/CMakeLists.txt b/src/third_party/blake3/CMakeLists.txt -index a30342d5d3..1e30eb3cfe 100644 ---- a/src/third_party/blake3/CMakeLists.txt -+++ b/src/third_party/blake3/CMakeLists.txt -@@ -27,7 +27,11 @@ function(add_source_if_enabled feature msvc_flags others_flags intrinsic) - - # First check if it's possible to use the assembler variant for the feature. - string(TOUPPER "have_asm_${feature}" have_feature) -- if(NOT DEFINED "${have_feature}" AND CMAKE_SIZEOF_VOID_P EQUAL 8) -+ if(NOT DEFINED "${have_feature}" AND CMAKE_SIZEOF_VOID_P EQUAL 8 -+# Force intrinsic version for msbuild because of a bug in the cmake generator -+# or msbuild itself with masm flags. -+ AND NOT CMAKE_GENERATOR MATCHES "Visual Studio") -+ - if(NOT CMAKE_REQUIRED_QUIET) - message(STATUS "Performing Test ${have_feature}") - endif() diff --git a/recipes/ccache/all/patches/4.8-cmake-msvc-runtime.patch b/recipes/ccache/all/patches/4.8-cmake-msvc-runtime.patch deleted file mode 100644 index 0bc4c5ce8f995..0000000000000 --- a/recipes/ccache/all/patches/4.8-cmake-msvc-runtime.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- CMakeLists.txt -+++ CMakeLists.txt -@@ -97,7 +97,7 @@ - - # Link MSVC runtime statically. - if(MSVC) -- set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$:Debug>") -+ - # Link MINGW runtime statically. - elseif(WIN32) - if((CMAKE_CXX_COMPILER_ID STREQUAL GNU) OR (CMAKE_CXX_COMPILER_ID STREQUAL Clang)) diff --git a/recipes/ccache/all/patches/4.9-cmake-msvc-runtime.patch b/recipes/ccache/all/patches/4.9-cmake-msvc-runtime.patch deleted file mode 100644 index c0aa5be876cb8..0000000000000 --- a/recipes/ccache/all/patches/4.9-cmake-msvc-runtime.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- cmake/StaticLinkSupport.cmake -+++ cmake/StaticLinkSupport.cmake -@@ -18,7 +18,7 @@ - if(WIN32) - # Link MSVC runtime statically. - if(MSVC) -- set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$:Debug>") -+ - # Link MINGW runtime statically. - else() - if(CMAKE_CXX_COMPILER_ID MATCHES "^(GNU|Clang)\$") diff --git a/recipes/ccache/config.yml b/recipes/ccache/config.yml index c3b3ce18a0b2b..44eb509af69d9 100644 --- a/recipes/ccache/config.yml +++ b/recipes/ccache/config.yml @@ -1,15 +1,9 @@ versions: - "4.9.1": - folder: all - "4.9": - folder: all - "4.8.3": + "4.10.2": folder: all - "4.8.2": + "4.10": folder: all - "4.8.1": - folder: all - "4.8": + "4.9.1": folder: all - "4.7.4": + "4.8.3": folder: all diff --git a/recipes/cctag/all/conandata.yml b/recipes/cctag/all/conandata.yml index 13ba480ba9f39..85f3e81e772c2 100644 --- a/recipes/cctag/all/conandata.yml +++ b/recipes/cctag/all/conandata.yml @@ -1,9 +1,29 @@ sources: + "1.0.4": + url: "https://github.com/alicevision/CCTag/archive/refs/tags/v1.0.4.tar.gz" + sha256: "f4ced6138419f4ad09d62d4373738c172586c91068faff8bf08c2caa5e76d516" + "1.0.3": + url: "https://github.com/alicevision/CCTag/archive/refs/tags/v1.0.3.tar.gz" + sha256: "25396b03c4aa3c1be241a2a8518a29511cb4fff695caa5126203fbba8e8e444d" "1.0.1": url: "https://github.com/alicevision/CCTag/archive/refs/tags/v1.0.1.tar.gz" sha256: "ae8a819bc978eb13bb1061a204c214da835e56c9b7dc775237ed6b2191011dec" patches: + "1.0.3": + - patch_file: "patches/1.0.3-0001-honor-vc-runtime.patch" + patch_description: "Honor vc runtime" + patch_type: "conan" + - patch_file: "patches/1.0.3-0002-fix-boost-deprecated-includes.patch" + patch_description: "Fix deprecated Boost includes" + patch_type: "portability" "1.0.1": - - patch_file: "patches/0001-honor-vc-runtime.patch" + - patch_file: "patches/1.0.1-0001-honor-vc-runtime.patch" patch_description: "Honor vc runtime" patch_type: "conan" + - patch_file: "patches/1.0.3-0002-fix-boost-deprecated-includes.patch" + patch_description: "Fix deprecated Boost includes" + patch_type: "portability" + - patch_file: "patches/1.0.1-0002-fix-missing-define.patch" + patch_description: "Add missing _GNU_SOURCE define" + patch_type: "bugfix" + patch_source: "https://github.com/alicevision/CCTag/commit/b49d710ab6870a865c20c943a65bd6dca906a184" diff --git a/recipes/cctag/all/conanfile.py b/recipes/cctag/all/conanfile.py index 773c86527b19a..617a9b8ecd704 100644 --- a/recipes/cctag/all/conanfile.py +++ b/recipes/cctag/all/conanfile.py @@ -4,6 +4,7 @@ from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, replace_in_file, rmdir from conan.tools.microsoft import is_msvc_static_runtime +from conan.tools.scm import Version import os required_conan_version = ">=1.53.0" @@ -18,6 +19,7 @@ class CCTagConan(ConanFile): homepage = "https://github.com/alicevision/CCTag" url = "https://github.com/conan-io/conan-center-index" + package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], @@ -26,6 +28,7 @@ class CCTagConan(ConanFile): "visual_debug": [True, False], "no_cout": [True, False], "with_cuda": [True, False], + "cuda_cc_list": [None, "ANY"], } default_options = { "shared": False, @@ -34,6 +37,7 @@ class CCTagConan(ConanFile): "visual_debug": False, "no_cout": True, "with_cuda": False, + "cuda_cc_list": None, # e.g. "5.2;7.5;8.2", builds all up to 7.5 by default } def export_sources(self): @@ -47,14 +51,23 @@ def configure(self): if self.options.shared: self.options.rm_safe("fPIC") + def package_id(self): + if not self.info.options.with_cuda: + del self.info.options.cuda_cc_list + def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - self.requires("boost/1.80.0") - self.requires("eigen/3.4.0") - self.requires("onetbb/2020.3") - self.requires("opencv/4.5.5") + # boost/1.85.0 not compatible because of "error: 'numeric' is not a namespace-name" error + boost_version = "1.85.0" if Version(self.version) >= "1.0.4" else "1.84.0" + self.requires(f"boost/{boost_version}", transitive_headers=True, transitive_libs=True) + self.requires("eigen/3.4.0", transitive_headers=True) + if Version(self.version) >= "1.0.3": + self.requires("onetbb/2021.10.0") + else: + self.requires("onetbb/2020.3.3") + self.requires("opencv/4.9.0", transitive_headers=True, transitive_libs=True) @property def _required_boost_components(self): @@ -64,27 +77,22 @@ def _required_boost_components(self): ] def validate(self): - miss_boost_required_comp = \ - any(getattr(self.dependencies["boost"].options, - f"without_{boost_comp}", - True) for boost_comp in self._required_boost_components) + miss_boost_required_comp = any( + self.dependencies["boost"].options.get_safe(f"without_{boost_comp}", True) + for boost_comp in self._required_boost_components + ) if self.dependencies["boost"].options.header_only or miss_boost_required_comp: raise ConanInvalidConfiguration( f"{self.ref} requires non header-only boost with these components: " f"{', '.join(self._required_boost_components)}", ) - if self.settings.compiler == "Visual Studio" and not self.options.shared and \ - is_msvc_static_runtime(self) and self.dependencies["onetbb"].options.shared: + if is_msvc_static_runtime(self) and not self.options.shared and self.dependencies["onetbb"].options.shared: raise ConanInvalidConfiguration("this specific configuration is prevented due to internal c3i limitations") if self.settings.compiler.get_safe("cppstd"): check_min_cppstd(self, 14) - # FIXME: add cuda support - if self.options.with_cuda: - raise ConanInvalidConfiguration("CUDA not supported yet") - def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) @@ -93,16 +101,18 @@ def generate(self): tc.variables["CCTAG_SERIALIZE"] = self.options.serialize tc.variables["CCTAG_VISUAL_DEBUG"] = self.options.visual_debug tc.variables["CCTAG_NO_COUT"] = self.options.no_cout - tc.variables["CCTAG_WITH_CUDA"] = self.options.with_cuda tc.variables["CCTAG_BUILD_APPS"] = False - tc.variables["CCTAG_CUDA_CC_CURRENT_ONLY"] = False - tc.variables["CCTAG_NVCC_WARNINGS"] = False tc.variables["CCTAG_EIGEN_NO_ALIGN"] = True tc.variables["CCTAG_USE_POSITION_INDEPENDENT_CODE"] = self.options.get_safe("fPIC", True) tc.variables["CCTAG_ENABLE_SIMD_AVX2"] = False tc.variables["CCTAG_BUILD_TESTS"] = False tc.variables["CCTAG_BUILD_DOC"] = False - tc.variables["CCTAG_NO_THRUST_COPY_IF"] = False + + tc.variables["CCTAG_WITH_CUDA"] = self.options.with_cuda + tc.variables["CCTAG_CUDA_CC_CURRENT_ONLY"] = False + tc.variables["CCTAG_NVCC_WARNINGS"] = False + if self.options.cuda_cc_list: + tc.variables["CCTAG_CUDA_CC_LIST_INIT"] = self.options.cuda_cc_list tc.generate() deps = CMakeDeps(self) @@ -118,6 +128,12 @@ def _patch_sources(self): replace_in_file(self, os.path.join(self.source_folder, "src", "CMakeLists.txt"), "${OpenCV_LIBS}", "opencv_core opencv_videoio opencv_imgproc opencv_imgcodecs") + # From https://github.com/alicevision/CCTag/pull/210/files CCTAG_CUDA_CC_LIST_INIT0 variable doesn't exists anymore in favor of a chooseCudaCC() cmake function + if Version(self.version) < "1.0.4": + # Remove very old CUDA compute capabilities + replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), + "set(CCTAG_CUDA_CC_LIST_INIT0 3.5 3.7 5.0 5.2)", + "set(CCTAG_CUDA_CC_LIST_INIT0 5.0 5.2)") def build(self): self._patch_sources() @@ -139,17 +155,31 @@ def package_info(self): if self.settings.os in ["Linux", "FreeBSD"]: self.cpp_info.system_libs.extend(["dl", "pthread"]) self.cpp_info.requires = [ - "boost::atomic", "boost::chrono", "boost::date_time", "boost::exception", - "boost::filesystem", "boost::serialization", "boost::system", - "boost::thread", "boost::timer", "boost::math_c99", "eigen::eigen", - "onetbb::onetbb", "opencv::opencv_core", "opencv::opencv_videoio", - "opencv::opencv_imgproc", "opencv::opencv_imgcodecs", + "boost::atomic", + "boost::chrono", + "boost::date_time", + "boost::exception", + "boost::filesystem", + "boost::math_c99", + "boost::serialization", + "boost::system", + "boost::thread", + "boost::timer", + "eigen::eigen", + "onetbb::onetbb", + "opencv::opencv_core", + "opencv::opencv_imgcodecs", + "opencv::opencv_imgproc", + "opencv::opencv_videoio", ] if self.settings.os == "Windows": self.cpp_info.requires.append("boost::stacktrace_windbg") else: self.cpp_info.requires.append("boost::stacktrace_basic") + # CCTag links against shared CUDA runtime by default and does not use it in headers, + # so we don't need to explicitly link against it. + # TODO: to remove in conan v2 once cmake_find_package* generators removed self.cpp_info.names["cmake_find_package"] = "CCTag" self.cpp_info.names["cmake_find_package_multi"] = "CCTag" diff --git a/recipes/cctag/all/patches/0001-honor-vc-runtime.patch b/recipes/cctag/all/patches/1.0.1-0001-honor-vc-runtime.patch similarity index 100% rename from recipes/cctag/all/patches/0001-honor-vc-runtime.patch rename to recipes/cctag/all/patches/1.0.1-0001-honor-vc-runtime.patch diff --git a/recipes/cctag/all/patches/1.0.1-0002-fix-missing-define.patch b/recipes/cctag/all/patches/1.0.1-0002-fix-missing-define.patch new file mode 100644 index 0000000000000..26658b4f5bbf2 --- /dev/null +++ b/recipes/cctag/all/patches/1.0.1-0002-fix-missing-define.patch @@ -0,0 +1,29 @@ +From b49d710ab6870a865c20c943a65bd6dca906a184 Mon Sep 17 00:00:00 2001 +From: Simone Gasparini +Date: Fri, 7 Oct 2022 23:37:33 +0200 +Subject: [PATCH] [cctag] add osx fix _GNU_SOURCE + +as per +https://github.com/boostorg/stacktrace/issues/88 +--- + src/cctag/utils/Exceptions.hpp | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/src/cctag/utils/Exceptions.hpp b/src/cctag/utils/Exceptions.hpp +index 1e16b9b5..46067cff 100644 +--- a/src/cctag/utils/Exceptions.hpp ++++ b/src/cctag/utils/Exceptions.hpp +@@ -7,6 +7,13 @@ + */ + #ifndef _CCTAG_EXCEPTIONS_HPP_ + #define _CCTAG_EXCEPTIONS_HPP_ ++ ++// This fix is necessary on Apple and on Windows using cygwin to avoid the compilation error ++// #error "Boost.Stacktrace requires `_Unwind_Backtrace` function. ++// see https://github.com/boostorg/stacktrace/issues/88 ++#ifndef _GNU_SOURCE ++#define _GNU_SOURCE ++#endif + + #include + #include diff --git a/recipes/cctag/all/patches/1.0.3-0001-honor-vc-runtime.patch b/recipes/cctag/all/patches/1.0.3-0001-honor-vc-runtime.patch new file mode 100644 index 0000000000000..25d94454a5b93 --- /dev/null +++ b/recipes/cctag/all/patches/1.0.3-0001-honor-vc-runtime.patch @@ -0,0 +1,20 @@ +--- CMakeLists.txt ++++ CMakeLists.txt +@@ -41,7 +41,7 @@ + else() + message(STATUS "Building in ${CMAKE_BUILD_TYPE} configuration") + endif() +- ++if(0) + # ensure the proper linker flags when building the static version on MSVC + if(MSVC AND NOT BUILD_SHARED_LIBS) + foreach(config "DEBUG" "RELEASE" "MINSIZEREL" "RELWITHDEBINFO") +@@ -65,7 +65,7 @@ + endif() + list(APPEND CUDA_NVCC_FLAGS -Xcompiler ${CCTAG_MVSC_LINKER}) + endif() +- ++endif() + set(CCTAG_CXX_STANDARD 14) + set(CMAKE_CXX_STANDARD ${CCTAG_CXX_STANDARD}) + set(CMAKE_CXX_STANDARD_REQUIRED ON) diff --git a/recipes/cctag/all/patches/1.0.3-0002-fix-boost-deprecated-includes.patch b/recipes/cctag/all/patches/1.0.3-0002-fix-boost-deprecated-includes.patch new file mode 100644 index 0000000000000..503defa4a3e7e --- /dev/null +++ b/recipes/cctag/all/patches/1.0.3-0002-fix-boost-deprecated-includes.patch @@ -0,0 +1,16 @@ +Fixes "This header is deprecated. Use instead.", etc. deprecation warnings. +--- src/cctag/CCTagMarkersBank.hpp ++++ src/cctag/CCTagMarkersBank.hpp +@@ -9,9 +9,9 @@ + #define VISION_MARKER_CCTAG_MARKERS_BANK_HPP + + #include +-#include +-#include +-#include ++#include ++#include ++#include + #include + + #include diff --git a/recipes/cctag/config.yml b/recipes/cctag/config.yml index 715e55357a17b..20e7cbd11f28a 100644 --- a/recipes/cctag/config.yml +++ b/recipes/cctag/config.yml @@ -1,3 +1,7 @@ versions: + "1.0.4": + folder: all + "1.0.3": + folder: all "1.0.1": folder: all diff --git a/recipes/certify/all/conanfile.py b/recipes/certify/all/conanfile.py index 89408b2501d3b..e89aca37b04b6 100644 --- a/recipes/certify/all/conanfile.py +++ b/recipes/certify/all/conanfile.py @@ -38,7 +38,7 @@ def layout(self): basic_layout(self, src_folder="src") def requirements(self): - self.requires("boost/1.83.0") + self.requires("boost/[>=1.83.0 <2]") self.requires("openssl/[>=1.1 <4]") def package_id(self): @@ -84,8 +84,15 @@ def package(self): def package_info(self): self.cpp_info.set_property("cmake_file_name", "certify") self.cpp_info.set_property("cmake_target_name", "certify::core") - - self.cpp_info.components["_certify"].requires = ["boost::boost", "openssl::openssl"] + component_requirements = [ + "boost::headers", + "boost::filesystem", + "boost::date_time", + "openssl::openssl" + ] + + self.cpp_info.requires = component_requirements + self.cpp_info.components["_certify"].requires = component_requirements self.cpp_info.components["_certify"].names["cmake_find_package"] = "core" self.cpp_info.components["_certify"].names["cmake_find_package_multi"] = "core" diff --git a/recipes/cfitsio/all/conandata.yml b/recipes/cfitsio/all/conandata.yml index 6b0480fb20585..136d6931652c7 100644 --- a/recipes/cfitsio/all/conandata.yml +++ b/recipes/cfitsio/all/conandata.yml @@ -1,29 +1,29 @@ sources: + "4.4.0": + url: "https://heasarc.gsfc.nasa.gov/FTP/software/fitsio/c/cfitsio-4.4.0.tar.gz" + sha256: "95900cf95ae760839e7cb9678a7b2fad0858d6ac12234f934bd1cb6bfc246ba9" "4.3.1": url: "https://heasarc.gsfc.nasa.gov/FTP/software/fitsio/c/cfitsio-4.3.1.tar.gz" - sha256: "2332b965d327a15c103a7d31d6d1afaf775d00e9785dd25332ae76b9725351e4" + sha256: "47a7c8ee05687be1e1d8eeeb94fb88f060fbf3cd8a4df52ccb88d5eb0f5062be" "4.3.0": url: "https://heasarc.gsfc.nasa.gov/FTP/software/fitsio/c/cfitsio-4.3.0.tar.gz" - sha256: "734ab0198714fe43eab94a67d6987085bde5573e6babde4d05799a8d04ebb04c" + sha256: "fdadc01d09cf9f54253802c5ec87eb10de51ce4130411415ae88c30940621b8b" "4.2.0": url: "https://heasarc.gsfc.nasa.gov/FTP/software/fitsio/c/cfitsio-4.2.0.tar.gz" - sha256: "ef9881973ecb9fe55732a4c1bb5ca96e63b624728f6319556939e0fe25f495e8" + sha256: "eba53d1b3f6e345632bb09a7b752ec7ced3d63ec5153a848380f3880c5d61889" "4.1.0": url: "https://heasarc.gsfc.nasa.gov/FTP/software/fitsio/c/cfitsio-4.1.0.tar.gz" - sha256: "748994dd1c819b88567e3539ea1f0ec2dd39fc0ed2884c033afa3da66efb5f4e" + sha256: "b367c695d2831958e7166921c3b356d5dfa51b1ecee505b97416ba39d1b6c17a" "4.0.0": url: "https://heasarc.gsfc.nasa.gov/FTP/software/fitsio/c/cfitsio-4.0.0.tar.gz" - sha256: "88735b69bb017ee92823b9e7ee14efeae2e57fb6c00503ed3aa2820e850a7b5e" + sha256: "b2a8efba0b9f86d3e1bd619f662a476ec18112b4f27cc441cc680a4e3777425e" "3.490": url: "https://heasarc.gsfc.nasa.gov/FTP/software/fitsio/c/cfitsio-3.49.tar.gz" - sha256: "8cc4beddd0ff389fb81bde9c181e0e3c419c15ec8a66df201ff4619a93715558" - "3.480": - url: "https://heasarc.gsfc.nasa.gov/FTP/software/fitsio/c/cfitsio-3.48.tar.gz" - sha256: "fc369363616753fa4dbe9bf28fa7e49cc1b057081229d89b52087d85ef303314" - "3.470": - url: "https://heasarc.gsfc.nasa.gov/FTP/software/fitsio/c/cfitsio-3.47.tar.gz" - sha256: "985606e058403c073a68d95be74e9696f0ded9414520784457a1d4cba8cca7e2" + sha256: "5b65a20d5c53494ec8f638267fca4a629836b7ac8dd0ef0266834eab270ed4b3" patches: + "4.4.0": + - patch_file: "patches/windows-use-strtok_s.patch" + - patch_file: "patches/fix-cmake-4.2.0.patch" "4.3.1": - patch_file: "patches/windows-use-strtok_s.patch" - patch_file: "patches/fix-cmake-4.2.0.patch" @@ -42,9 +42,3 @@ patches: "3.490": - patch_file: "patches/windows-use-strtok_s.patch" - patch_file: "patches/fix-cmake-3.490.patch" - "3.480": - - patch_file: "patches/windows-use-strtok_s.patch" - - patch_file: "patches/fix-cmake-3.470.patch" - "3.470": - - patch_file: "patches/windows-use-strtok_s.patch" - - patch_file: "patches/fix-cmake-3.470.patch" diff --git a/recipes/cfitsio/all/conanfile.py b/recipes/cfitsio/all/conanfile.py index 782f21cb2a73b..e2f5688059f62 100644 --- a/recipes/cfitsio/all/conanfile.py +++ b/recipes/cfitsio/all/conanfile.py @@ -1,9 +1,10 @@ +import glob +import os + from conan import ConanFile from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rmdir from conan.tools.scm import Version -import glob -import os required_conan_version = ">=1.54.0" @@ -12,7 +13,7 @@ class CfitsioConan(ConanFile): name = "cfitsio" description = "C library for reading and writing data files in FITS " \ "(Flexible Image Transport System) data format" - license = "CFITSIO" + license = ("CFITSIO", "NASA-1.3") topics = ("fits", "image", "nasa", "astronomy", "astrophysics", "space") homepage = "https://heasarc.gsfc.nasa.gov/fitsio/" url = "https://github.com/conan-io/conan-center-index" @@ -104,7 +105,11 @@ def build(self): cmake.build() def package(self): - copy(self, "License.txt", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) + if Version(self.version) >= "4.4.0": + copy(self, "NASA*", src=os.path.join(self.source_folder, "licenses"), + dst=os.path.join(self.package_folder, "licenses")) + else: + copy(self, "License.txt", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) cmake = CMake(self) cmake.install() rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) diff --git a/recipes/cfitsio/all/patches/fix-cmake-3.470.patch b/recipes/cfitsio/all/patches/fix-cmake-3.470.patch deleted file mode 100644 index 46df9c1140c70..0000000000000 --- a/recipes/cfitsio/all/patches/fix-cmake-3.470.patch +++ /dev/null @@ -1,223 +0,0 @@ ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -3,8 +3,8 @@ - # Suppress warning about WIN32 no longer being defined on Cygwin: - SET(CMAKE_LEGACY_CYGWIN_WIN32 0) - -+CMAKE_MINIMUM_REQUIRED(VERSION 3.1) - PROJECT(CFITSIO) --CMAKE_MINIMUM_REQUIRED(VERSION 2.8.0) - - # Allow @rpath token in target install name on Macs. - # See "cmake --help-policy CMP0042" for more information. -@@ -12,12 +12,14 @@ IF(POLICY CMP0042) - CMAKE_POLICY(SET CMP0042 NEW) - ENDIF() - --INCLUDE (${CMAKE_ROOT}/Modules/CheckLibraryExists.cmake) --INCLUDE (${CMAKE_ROOT}/Modules/CheckFunctionExists.cmake) -+INCLUDE(CheckSymbolExists) -+INCLUDE(CheckCSourceCompiles) - - # Allow the developer to select if Dynamic or Static libraries are built - OPTION (BUILD_SHARED_LIBS "Build Shared Libraries" ON) - OPTION (USE_PTHREADS "Thread-safe build (using pthreads)" OFF) -+OPTION(CFITSIO_USE_SSE2 "Enable use of instructions in the SSE2 extended instruction set" OFF) -+OPTION(CFITSIO_USE_SSSE3 "Enable use of instructions in the SSSE3 extended instruction set" OFF) - - set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}") - set (LIB_DESTINATION "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}") -@@ -55,12 +57,19 @@ IF (BUILD_SHARED_LIBS) - ENDIF (BUILD_SHARED_LIBS) - - --FILE(GLOB H_FILES "*.h") -+SET(H_FILES fitsio.h fitsio2.h longnam.h) -+SET(LINK_LIBS "") - - IF (USE_PTHREADS) -- FIND_PACKAGE(pthreads REQUIRED) -- INCLUDE_DIRECTORIES(${PTHREADS_INCLUDE_DIR}) -- ADD_DEFINITIONS(-D_REENTRANT) -+ SET(CMAKE_THREAD_PREFER_PTHREAD TRUE) -+ SET(THREADS_PREFER_PTHREAD_FLAG TRUE) -+ FIND_PACKAGE(Threads REQUIRED) -+ IF(CMAKE_USE_PTHREADS_INIT) -+ LIST(APPEND LINK_LIBS "Threads::Threads") -+ ELSE() -+ find_package(pthreads4w REQUIRED CONFIG) -+ LIST(APPEND LINK_LIBS "pthreads4w::pthreads4w") -+ ENDIF() - ENDIF() - - # Math library (not available in MSVC or MINGW) -@@ -71,35 +80,36 @@ ELSE() - ENDIF() - - # Support for remote file drivers is not implemented for native Windows: --IF (NOT MSVC) -+IF (NOT WIN32) - # Find library needed for gethostbyname: -- CHECK_FUNCTION_EXISTS("gethostbyname" CMAKE_HAVE_GETHOSTBYNAME) -- IF(NOT CMAKE_HAVE_GETHOSTBYNAME) -- CHECK_LIBRARY_EXISTS("nsl" "gethostbyname" "" CMAKE_HAVE_GETHOSTBYNAME) -- ENDIF() -+ CHECK_SYMBOL_EXISTS(gethostbyname "netdb.h" CMAKE_HAVE_GETHOSTBYNAME) - - # Find library needed for connect: -- CHECK_FUNCTION_EXISTS("connect" CMAKE_HAVE_CONNECT) -- IF(NOT CMAKE_HAVE_CONNECT) -- CHECK_LIBRARY_EXISTS("socket" "connect" "" CMAKE_HAVE_CONNECT) -- ENDIF() -+ CHECK_SYMBOL_EXISTS(connect "sys/types.h;sys/socket.h" CMAKE_HAVE_CONNECT) - - # Define HAVE_NET_SERVICES if gethostbyname & connect were found: - IF (CMAKE_HAVE_GETHOSTBYNAME AND CMAKE_HAVE_CONNECT) - ADD_DEFINITIONS(-DHAVE_NET_SERVICES) -+ CHECK_SYMBOL_EXISTS(fmemopen "stdio.h" HAVE_FMEMOPEN) -+ IF(HAVE_FMEMOPEN) -+ ADD_DEFINITIONS(-DHAVE_FMEMOPEN) -+ ENDIF() - ENDIF () - - # Find curl library, for HTTPS support: -- FIND_PACKAGE(CURL) -- IF (CURL_FOUND) -- INCLUDE_DIRECTORIES(${CURL_INCLUDE_DIR}) -- ADD_DEFINITIONS(-DCFITSIO_HAVE_CURL) -+ OPTION(UseCurl "UseCurl" ON) -+ IF (UseCurl) -+ FIND_PACKAGE(CURL) -+ IF (CURL_FOUND) -+ LIST(APPEND LINK_LIBS "CURL::libcurl") -+ ADD_DEFINITIONS(-DCFITSIO_HAVE_CURL) -+ ENDIF() - ENDIF() - ENDIF() - - SET(SRC_FILES - buffers.c cfileio.c checksum.c -- drvrfile.c drvrmem.c drvrnet.c -+ drvrfile.c drvrmem.c drvrnet.c drvrsmem.c - editcol.c edithdu.c eval_f.c eval_l.c eval_y.c - f77_wrap1.c f77_wrap2.c f77_wrap3.c f77_wrap4.c - fits_hcompress.c fits_hdecompress.c fitscore.c -@@ -123,27 +133,99 @@ SET(SRC_FILES - - # Only include zlib source files if we are building a shared library. - # Users will need to link their executable with zlib independently. --IF (BUILD_SHARED_LIBS) -- set(SRC_FILES ${SRC_FILES} -- zlib/adler32.c zlib/crc32.c zlib/deflate.c zlib/infback.c -- zlib/inffast.c zlib/inflate.c zlib/inftrees.c zlib/trees.c -- zlib/uncompr.c zlib/zutil.c -- ) -+find_package(ZLIB REQUIRED) -+LIST(APPEND LINK_LIBS "ZLIB::ZLIB") -+ -+IF(CFITSIO_USE_SSE2) -+ IF("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR -+ "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" OR -+ "${CMAKE_CXX_COMPILER_ID}" STREQUAL "AppleClang") -+ ADD_COMPILE_OPTIONS(-msse2) -+ ENDIF() -+ IF(MSVC) -+ ADD_DEFINITIONS(-D__SSE2__=1) -+ ENDIF() -+ENDIF() -+ -+IF(CFITSIO_USE_SSSE3) -+ IF("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR -+ "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" OR -+ "${CMAKE_CXX_COMPILER_ID}" STREQUAL "AppleClang") -+ ADD_COMPILE_OPTIONS(-mssse3) -+ ENDIF() -+ IF(MSVC) -+ ADD_DEFINITIONS(-D__SSE2__=1 -D__SSSE3__=1) -+ ENDIF() -+ENDIF() -+ -+OPTION(CFITSIO_USE_BZIP2 "Enable bzip2 support" OFF) -+IF(CFITSIO_USE_BZIP2) -+ FIND_PACKAGE(BZip2 REQUIRED) -+ LIST(APPEND LINK_LIBS "BZip2::BZip2") -+ ADD_DEFINITIONS(-DHAVE_BZIP2=1) -+ENDIF() -+ -+# Test for the unix ftruncate function -+CHECK_SYMBOL_EXISTS(ftruncate "unistd.h" HAVE_FTRUNCATE) -+IF(HAVE_FTRUNCATE) -+ ADD_DEFINITIONS(-DHAVE_FTRUNCATE) -+ENDIF() -+ -+# Check is System V IPC is supported on this machine -+CHECK_C_SOURCE_COMPILES(" -+#include -+#include -+#include -+int main() { -+ shmat(0,0,0); -+ shmdt(0); -+ shmget(0, 0, 0); -+ semget(0, 0, 0); -+ return 0; -+}" HAVE_SHMEM_SERVICES) -+IF(HAVE_SHMEM_SERVICES) -+ ADD_DEFINITIONS(-DHAVE_SHMEM_SERVICES) -+ -+ # Some systems define flock_t, for others we have to define it ourselves -+ CHECK_C_SOURCE_COMPILES(" -+ #include -+ int main() { -+ flock_t filler; -+ return 0; -+ }" HAVE_FLOCK_T) -+ IF(HAVE_FLOCK_T) -+ ADD_DEFINITIONS(-DHAVE_FLOCK_T) -+ ENDIF() -+ -+ # Check union semun -+ CHECK_C_SOURCE_COMPILES(" -+ #include -+ #include -+ #include -+ int main() { -+ union semun filler; -+ return 0; -+ }" HAVE_UNION_SEMUN) -+ IF(HAVE_UNION_SEMUN) -+ ADD_DEFINITIONS(-DHAVE_UNION_SEMUN) -+ ENDIF() - ENDIF() - - ADD_LIBRARY(${LIB_NAME} ${LIB_TYPE} ${H_FILES} ${SRC_FILES}) --TARGET_LINK_LIBRARIES(${LIB_NAME} ${PTHREADS_LIBRARY} ${M_LIB} ${CURL_LIBRARIES}) -+TARGET_LINK_LIBRARIES(${LIB_NAME} ${LINK_LIBS} ${M_LIB}) -+if(CMAKE_C_COMPILER_ID STREQUAL "AppleClang" AND CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL "12") -+ TARGET_COMPILE_OPTIONS(${LIB_NAME} PRIVATE -Wno-error=implicit-function-declaration) -+endif() - - SET_TARGET_PROPERTIES(${LIB_NAME} PROPERTIES VERSION ${${PROJECT_NAME}_VERSION} SOVERSION ${${PROJECT_NAME}_MAJOR_VERSION}) --install(TARGETS ${LIB_NAME} DESTINATION ${LIB_DESTINATION}) - install(TARGETS ${LIB_NAME} - RUNTIME DESTINATION bin - LIBRARY DESTINATION lib - ARCHIVE DESTINATION lib) - install(FILES ${H_FILES} DESTINATION ${INCLUDE_INSTALL_DIR} COMPONENT Devel) - --# Only build test code and executables if building a shared library: --IF (BUILD_SHARED_LIBS) -+# Do not build test code and executables: -+IF (FALSE) - - ENABLE_TESTING() - -@@ -173,7 +255,7 @@ IF (BUILD_SHARED_LIBS) - set_target_properties(FPack Funpack PROPERTIES LINK_FLAGS "setargv.obj") - endif(MSVC) - --ENDIF(BUILD_SHARED_LIBS) -+ENDIF() - - configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cfitsio.pc.cmake ${CMAKE_CURRENT_BINARY_DIR}/cfitsio.pc @ONLY) - install(FILES ${CMAKE_CURRENT_BINARY_DIR}/cfitsio.pc DESTINATION lib/pkgconfig/) diff --git a/recipes/cfitsio/config.yml b/recipes/cfitsio/config.yml index 644678fbd04e4..bfb174dc329f7 100644 --- a/recipes/cfitsio/config.yml +++ b/recipes/cfitsio/config.yml @@ -1,4 +1,6 @@ versions: + "4.4.0": + folder: all "4.3.1": folder: all "4.3.0": @@ -11,7 +13,3 @@ versions: folder: all "3.490": folder: all - "3.480": - folder: all - "3.470": - folder: all diff --git a/recipes/cgal/all/conandata.yml b/recipes/cgal/all/conandata.yml index c9c061bf70265..df69f91fa95f3 100644 --- a/recipes/cgal/all/conandata.yml +++ b/recipes/cgal/all/conandata.yml @@ -14,12 +14,24 @@ sources: "5.5.3": sha256: 0a04f662693256328b05babfabb5e3a5b7db2f5a58d52e3c520df9d0828ddd73 url: https://github.com/CGAL/cgal/releases/download/v5.5.3/CGAL-5.5.3.tar.xz + "5.5.5": + sha256: c74aab989e0fefc98f1e76f96831f6a75a92ade4ea0de7501947dc42e3ec987c + url: https://github.com/CGAL/cgal/releases/download/v5.5.5/CGAL-5.5.5.tar.xz "5.6": sha256: dcab9b08a50a06a7cc2cc69a8a12200f8d8f391b9b8013ae476965c10b45161f url: https://github.com/CGAL/cgal/releases/download/v5.6/CGAL-5.6.tar.xz "5.6.1": sha256: cdb15e7ee31e0663589d3107a79988a37b7b1719df3d24f2058545d1bcdd5837 url: https://github.com/CGAL/cgal/releases/download/v5.6.1/CGAL-5.6.1.tar.xz + "5.6.2": + sha256: 458f60df8e8f1f2fdad93c8f24e1aa8f4b095cc61a14fac81b90680d7306a42e + url: https://github.com/CGAL/cgal/releases/download/v5.6.2/CGAL-5.6.2.tar.xz + "6.0": + sha256: ed53a1498569a22341b482e579c6a3caf9ecbfb6e013f5a90ce780138073b520 + url: https://github.com/CGAL/cgal/releases/download/v6.0/CGAL-6.0-library.tar.xz + "6.0.1": + sha256: c752737f91d1af71fa96038f0e37945ce82a5f1fffb6200172cfcdd77755a356 + url: https://github.com/CGAL/cgal/releases/download/v6.0.1/CGAL-6.0.1-library.tar.xz patches: "5.3.2": - patch_file: "patches/0001-fix-for-conan.patch" @@ -46,3 +58,8 @@ patches: patch_type: bugfix patch_source: https://github.com/CGAL/cgal/pull/7502 patch_description: Fix Eigen3 support in CGAL + "5.5.5": + - patch_file: "patches/0001-fix-for-conan.patch" + patch_type: bugfix + patch_source: https://github.com/CGAL/cgal/pull/7502 + patch_description: Fix Eigen3 support in CGAL diff --git a/recipes/cgal/all/conanfile.py b/recipes/cgal/all/conanfile.py index 59ac6cec34475..68460d558b139 100644 --- a/recipes/cgal/all/conanfile.py +++ b/recipes/cgal/all/conanfile.py @@ -22,17 +22,21 @@ class CgalConan(ConanFile): generators = "CMakeDeps" short_paths = True + @property + def _requires_cpp17(self): + return Version(self.version) >= "6.0" + @property def _min_cppstd(self): - return "14" + return "17" if self._requires_cpp17 else "14" @property def _minimum_compilers_version(self): return { "Visual Studio": "15", "msvc": "191", - "gcc": "5", - "clang": "5", + "gcc": "7" if self._requires_cpp17 else "5", + "clang": "7" if self._requires_cpp17 else "5", "apple-clang": "5.1", } @@ -92,82 +96,90 @@ def package(self): def _create_cmake_module_variables(self, module_file): ''' - CGAL requires C++14, and specific compilers flags to enable the possibility to set FPU rounding modes. + CGAL requires C++14 or C++17, and specific compilers flags to enable the possibility to set FPU rounding modes. This CMake module, from the upstream CGAL pull-request https://github.com/CGAL/cgal/pull/7512, takes care of all the known compilers CGAL has ever supported. ''' - content = textwrap.dedent('''\ -function(CGAL_setup_CGAL_flags target) - # CGAL now requires C++14. `decltype(auto)` is used as a marker of - # C++14. - target_compile_features(${target} INTERFACE cxx_decltype_auto) - - if(MSVC) - target_compile_options(${target} INTERFACE - "-D_SCL_SECURE_NO_DEPRECATE;-D_SCL_SECURE_NO_WARNINGS") - if(CMAKE_VERSION VERSION_LESS 3.11) - target_compile_options(${target} INTERFACE - /fp:strict - /fp:except- - /wd4503 # Suppress warnings C4503 about "decorated name length exceeded" - /bigobj # Use /bigobj by default - ) - else() - # The MSVC generator supports `$` since CMake 3.11. - target_compile_options(${target} INTERFACE - $<$:/fp:strict> - $<$:/fp:except-> - $<$:/wd4503> # Suppress warnings C4503 about "decorated name length exceeded" - $<$:/bigobj> # Use /bigobj by default - ) - endif() - elseif ("${CMAKE_CXX_COMPILER_ID}" MATCHES "AppleClang") - if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 11.0.3) - message(STATUS "Apple Clang version ${CMAKE_CXX_COMPILER_VERSION} compiler detected") - message(STATUS "Boost MP is turned off for all Apple Clang versions below 11.0.3!") - target_compile_options(${target} INTERFACE "-DCGAL_DO_NOT_USE_BOOST_MP") - endif() - elseif(CMAKE_CXX_COMPILER_ID MATCHES "Intel") - message( STATUS "Using Intel Compiler. Adding -fp-model strict" ) - if(WIN32) - target_compile_options(${target} INTERFACE "/fp:strict") - else() - target_compile_options(${target} INTERFACE "-fp-model" "strict") - endif() - elseif(CMAKE_CXX_COMPILER_ID MATCHES "SunPro") - message( STATUS "Using SunPro compiler, using STLPort 4." ) - target_compile_options(${target} INTERFACE - "-features=extensions;-library=stlport4;-D_GNU_SOURCE") - target_link_libraries(${target} INTERFACE "-library=stlport4") - elseif(CMAKE_CXX_COMPILER_ID MATCHES "GNU") - if ( RUNNING_CGAL_AUTO_TEST OR CGAL_TEST_SUITE ) - target_compile_options(${target} INTERFACE "-Wall") - endif() - if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 3) - message( STATUS "Using gcc version 4 or later. Adding -frounding-math" ) - if(CMAKE_VERSION VERSION_LESS 3.3) - target_compile_options(${target} INTERFACE "-frounding-math") - else() - target_compile_options(${target} INTERFACE "$<$:-frounding-math>") - endif() - endif() - if ( "${GCC_VERSION}" MATCHES "^4.2" ) - message( STATUS "Using gcc version 4.2. Adding -fno-strict-aliasing" ) - target_compile_options(${target} INTERFACE "-fno-strict-aliasing" ) - endif() - if ( "${CMAKE_SYSTEM_PROCESSOR}" MATCHES "alpha" ) - message( STATUS "Using gcc on alpha. Adding -mieee -mfp-rounding-mode=d" ) - target_compile_options(${target} INTERFACE "-mieee" "-mfp-rounding-mode=d" ) - endif() - endif() -endfunction() - -CGAL_setup_CGAL_flags(CGAL::CGAL) - -# CGAL use may rely on the presence of those two variables -set(CGAL_USE_GMP TRUE CACHE INTERNAL "CGAL library is configured to use GMP") -set(CGAL_USE_MPFR TRUE CACHE INTERNAL "CGAL library is configured to use MPFR") -''') + content = "" + if Version(self.version) < "6.0": + content = textwrap.dedent('''\ + function(CGAL_setup_CGAL_flags target) + # CGAL now requires C++14. `decltype(auto)` is used as a marker of + # C++14. + target_compile_features(${target} INTERFACE cxx_decltype_auto) + + if(MSVC) + target_compile_options(${target} INTERFACE + "-D_SCL_SECURE_NO_DEPRECATE;-D_SCL_SECURE_NO_WARNINGS") + if(CMAKE_VERSION VERSION_LESS 3.11) + target_compile_options(${target} INTERFACE + /fp:strict + /fp:except- + /wd4503 # Suppress warnings C4503 about "decorated name length exceeded" + /bigobj # Use /bigobj by default + ) + else() + # The MSVC generator supports `$` since CMake 3.11. + target_compile_options(${target} INTERFACE + $<$:/fp:strict> + $<$:/fp:except-> + $<$:/wd4503> # Suppress warnings C4503 about "decorated name length exceeded" + $<$:/bigobj> # Use /bigobj by default + ) + endif() + elseif ("${CMAKE_CXX_COMPILER_ID}" MATCHES "AppleClang") + if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 11.0.3) + message(STATUS "Apple Clang version ${CMAKE_CXX_COMPILER_VERSION} compiler detected") + message(STATUS "Boost MP is turned off for all Apple Clang versions below 11.0.3!") + target_compile_options(${target} INTERFACE "-DCGAL_DO_NOT_USE_BOOST_MP") + endif() + elseif(CMAKE_CXX_COMPILER_ID MATCHES "Intel") + message( STATUS "Using Intel Compiler. Adding -fp-model strict" ) + if(WIN32) + target_compile_options(${target} INTERFACE "/fp:strict") + else() + target_compile_options(${target} INTERFACE "-fp-model" "strict") + endif() + elseif(CMAKE_CXX_COMPILER_ID MATCHES "SunPro") + message( STATUS "Using SunPro compiler, using STLPort 4." ) + target_compile_options(${target} INTERFACE + "-features=extensions;-library=stlport4;-D_GNU_SOURCE") + target_link_libraries(${target} INTERFACE "-library=stlport4") + elseif(CMAKE_CXX_COMPILER_ID MATCHES "GNU") + if ( RUNNING_CGAL_AUTO_TEST OR CGAL_TEST_SUITE ) + target_compile_options(${target} INTERFACE "-Wall") + endif() + if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 3) + message( STATUS "Using gcc version 4 or later. Adding -frounding-math" ) + if(CMAKE_VERSION VERSION_LESS 3.3) + target_compile_options(${target} INTERFACE "-frounding-math") + else() + target_compile_options(${target} INTERFACE "$<$:-frounding-math>") + endif() + endif() + if ( "${GCC_VERSION}" MATCHES "^4.2" ) + message( STATUS "Using gcc version 4.2. Adding -fno-strict-aliasing" ) + target_compile_options(${target} INTERFACE "-fno-strict-aliasing" ) + endif() + if ( "${CMAKE_SYSTEM_PROCESSOR}" MATCHES "alpha" ) + message( STATUS "Using gcc on alpha. Adding -mieee -mfp-rounding-mode=d" ) + target_compile_options(${target} INTERFACE "-mieee" "-mfp-rounding-mode=d" ) + endif() + endif() + endfunction() + ''') + + else: + content = textwrap.dedent('''\ + include(${CMAKE_CURRENT_LIST_DIR}/CGAL_SetupCGALDependencies.cmake) + ''') + content += textwrap.dedent('''\ + CGAL_setup_CGAL_flags(CGAL::CGAL) + + # CGAL use may rely on the presence of those two variables + set(CGAL_USE_GMP TRUE CACHE INTERNAL "CGAL library is configured to use GMP") + set(CGAL_USE_MPFR TRUE CACHE INTERNAL "CGAL library is configured to use MPFR") + ''') save(self, module_file, content) @property diff --git a/recipes/cgal/config.yml b/recipes/cgal/config.yml index 65c6d1c183e2c..3222dda4bec5c 100644 --- a/recipes/cgal/config.yml +++ b/recipes/cgal/config.yml @@ -9,7 +9,15 @@ versions: folder: all "5.5.3": folder: all + "5.5.5": + folder: all "5.6": folder: all "5.6.1": folder: all + "5.6.2": + folder: all + "6.0": + folder: all + "6.0.1": + folder: all diff --git a/recipes/chipmunk2d/all/conandata.yml b/recipes/chipmunk2d/all/conandata.yml index 0fcc6c23d2ed4..41e39beaf8dc2 100644 --- a/recipes/chipmunk2d/all/conandata.yml +++ b/recipes/chipmunk2d/all/conandata.yml @@ -2,3 +2,10 @@ sources: "7.0.3": url: "https://chipmunk-physics.net/release/Chipmunk-7.x/Chipmunk-7.0.3.tgz" sha256: "048b0c9eff91c27bab8a54c65ad348cebd5a982ac56978e8f63667afbb63491a" + +patches: + "7.0.3": + - patch_file: "patches/0001-remove-sysctl-linux-win.patch" + patch_type: bugfix + patch_source: https://github.com/slembcke/Chipmunk2D/pull/175 + patch_description: "Needed to build with glib > 2.30" diff --git a/recipes/chipmunk2d/all/conanfile.py b/recipes/chipmunk2d/all/conanfile.py index 785d8d95d890d..53afb4be1c99c 100644 --- a/recipes/chipmunk2d/all/conanfile.py +++ b/recipes/chipmunk2d/all/conanfile.py @@ -1,6 +1,6 @@ from conan import ConanFile from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout -from conan.tools.files import copy, get, replace_in_file +from conan.tools.files import copy, get, replace_in_file, apply_conandata_patches, export_conandata_patches import os required_conan_version = ">=1.53.0" @@ -52,9 +52,13 @@ def generate(self): tc.variables["CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS"] = True tc.generate() + def export_sources(self): + export_conandata_patches(self) + def _patch_sources(self): # The finite-math-only optimization has no effect and can cause linking errors # when linked against glibc >= 2.31 + apply_conandata_patches(self) replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), "-ffast-math", "-ffast-math -fno-finite-math-only") diff --git a/recipes/chipmunk2d/all/patches/0001-remove-sysctl-linux-win.patch b/recipes/chipmunk2d/all/patches/0001-remove-sysctl-linux-win.patch new file mode 100644 index 0000000000000..8b123a7652b29 --- /dev/null +++ b/recipes/chipmunk2d/all/patches/0001-remove-sysctl-linux-win.patch @@ -0,0 +1,16 @@ +--- a/src/cpHastySpace.c ++++ b/src/cpHastySpace.c +@@ -7,8 +7,12 @@ + //TODO: Move all the thread stuff to another file + + //#include +-#ifndef _WIN32 ++ ++#ifdef __APPLE__ + #include ++#endif ++ ++#ifndef _WIN32 + #include + #else + #ifndef WIN32_LEAN_AND_MEAN diff --git a/recipes/cigi-ccl/all/conandata.yml b/recipes/cigi-ccl/all/conandata.yml new file mode 100644 index 0000000000000..f77d32f6993f8 --- /dev/null +++ b/recipes/cigi-ccl/all/conandata.yml @@ -0,0 +1,5 @@ +sources: + "4.0.6a": + url: + - "https://master.dl.sourceforge.net/project/cigi/CIGI%20Class%20Library%20%28CCL%29/CCL%20Version%204.0.6a/ccl_4_0%20rev6a.zip" + sha256: "a55099c0418c663e572109bd62ed2f7b411c51af7b404212988e36360e8a13cc" diff --git a/recipes/cigi-ccl/all/conanfile.py b/recipes/cigi-ccl/all/conanfile.py new file mode 100644 index 0000000000000..5237537049f2f --- /dev/null +++ b/recipes/cigi-ccl/all/conanfile.py @@ -0,0 +1,102 @@ +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout +from conan.tools.files import copy, get, replace_in_file, rmdir +from conan.tools.microsoft import is_msvc, is_msvc_static_runtime +from conan.tools.apple import is_apple_os +import os + +required_conan_version = ">=1.53.0" + +class CigiClConan(ConanFile): + name = "cigi-ccl" + description = "Industry standard communication with compliant image generators" + license = "LGPL-2.1-only" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://cigi.sourceforge.io/product_ccl.php" + topics = ("simulation", "interface engines", "data visualization") + package_type = "library" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + } + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + + def layout(self): + cmake_layout(self, src_folder="src") + + def validate(self): + if is_apple_os(self): + # CigiOutgoingMsg.cpp:196:38: error: use of undeclared identifier 'PTHREAD_MUTEX_RECURSIVE_NP' + raise ConanInvalidConfiguration(f"{self.settings.os} Conan recipe is not supported on Apple. Contributions are welcome.") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + + if is_msvc(self): + tc.variables["USE_MSVC_RUNTIME_LIBRARY_DLL"] = not is_msvc_static_runtime(self) + + tc.generate() + + def _patch_sources(self): + cmake_lists_fixes = { + # This old CMakeLists.txt had PROJECT() before CMAKE_MINIMUM_REQUIRED(); this order must be inverted + "CMAKE_MINIMUM_REQUIRED(VERSION 2.4.7)": "", + "PROJECT(ccl)": "CMAKE_MINIMUM_REQUIRED(VERSION 2.4.7)\nPROJECT(ccl)", + # Using backslash for path is being interpreted as invalid escape sequence in newer versions of CMake + "Header Files\\": "Header Files/", + "Source Files\\": "Source Files/", + # Incorrectly tries to install both the static and shared targets + "INSTALL(TARGETS cigicl-static cigicl-shared": f"INSTALL(TARGETS {'cigicl-shared' if self.options.shared else 'cigicl-static'}" + } + + for old, new in cmake_lists_fixes.items(): + replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), old, new) + + def build(self): + self._patch_sources() + cmake = CMake(self) + cmake.configure() + if self.options.shared: + cmake.build(target="cigicl-shared") + else: + cmake.build(target="cigicl-static") + + def package(self): + cmake = CMake(self) + cmake.install() + + copy(self, "license.html", self.source_folder, os.path.join(self.package_folder, "licenses")) + copy(self, "COPYING", self.source_folder, os.path.join(self.package_folder, "licenses")) + rmdir(self, os.path.join(self.package_folder, "share")) + rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) + + def package_info(self): + self.cpp_info.set_property("pkg_config_name", "cigicl") + build_type_suffix = "" + if self.settings.build_type == "Debug" and self.settings.os == "Windows": + build_type_suffix = "D" + + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.system_libs.extend(["pthread", "m"]) + + if self.options.shared: + self.cpp_info.libs = ["ccl_dll" + build_type_suffix] + self.cpp_info.defines = ["CCL_DLL"] + else: + self.cpp_info.libs = ["ccl_lib" + build_type_suffix] diff --git a/recipes/cigi-ccl/all/test_package/CMakeLists.txt b/recipes/cigi-ccl/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..9ff9e1c44f12c --- /dev/null +++ b/recipes/cigi-ccl/all/test_package/CMakeLists.txt @@ -0,0 +1,9 @@ +cmake_minimum_required(VERSION 3.15) + +project(test_package LANGUAGES CXX) + +find_package(cigi-ccl REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) + +target_link_libraries(${PROJECT_NAME} PRIVATE cigi-ccl::cigi-ccl) diff --git a/recipes/cigi-ccl/all/test_package/conanfile.py b/recipes/cigi-ccl/all/test_package/conanfile.py new file mode 100644 index 0000000000000..f5cf204295e19 --- /dev/null +++ b/recipes/cigi-ccl/all/test_package/conanfile.py @@ -0,0 +1,25 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake +import os + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/cigi-ccl/all/test_package/test_package.cpp b/recipes/cigi-ccl/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..9a4a0a228de16 --- /dev/null +++ b/recipes/cigi-ccl/all/test_package/test_package.cpp @@ -0,0 +1,7 @@ +#include + +int main(void) { + CigiOutgoingMsg message; + message.CreateBuffer(); + return 0; +} diff --git a/recipes/cigi-ccl/config.yml b/recipes/cigi-ccl/config.yml new file mode 100644 index 0000000000000..f73e93e2624ef --- /dev/null +++ b/recipes/cigi-ccl/config.yml @@ -0,0 +1,3 @@ +versions: + "4.0.6a": + folder: all diff --git a/recipes/civetweb/all/conanfile.py b/recipes/civetweb/all/conanfile.py index b393da542821b..d7ccad2b88226 100644 --- a/recipes/civetweb/all/conanfile.py +++ b/recipes/civetweb/all/conanfile.py @@ -22,6 +22,7 @@ class CivetwebConan(ConanFile): "fPIC": [True, False], "shared": [True, False], "ssl_dynamic_loading": [True, False], + "thread_stack_size": [None, "ANY"], "with_caching": [True, False], "with_cgi": [True, False], "with_cxx": [True, False], @@ -39,6 +40,7 @@ class CivetwebConan(ConanFile): "fPIC": True, "shared": False, "ssl_dynamic_loading": False, + "thread_stack_size": None, "with_caching": True, "with_cgi": True, "with_cxx": True, @@ -92,6 +94,8 @@ def requirements(self): def validate(self): if self.options.get_safe("ssl_dynamic_loading") and not self.dependencies["openssl"].options.shared: raise ConanInvalidConfiguration("ssl_dynamic_loading requires shared openssl") + if self.options.thread_stack_size and not str(self.options.thread_stack_size).isdigit(): + raise ConanInvalidConfiguration("-o='civetweb/*:thread_stack_size' should be a positive integer") def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) @@ -122,6 +126,8 @@ def generate(self): tc.variables["CIVETWEB_ENABLE_THIRD_PARTY_OUTPUT"] = self.options.with_third_party_output tc.variables["CIVETWEB_ENABLE_WEBSOCKETS"] = self.options.with_websockets tc.variables["CIVETWEB_SERVE_NO_FILES"] = not self.options.with_static_files + if self.options.thread_stack_size: + tc.variables["CIVETWEB_THREAD_STACK_SIZE"] = self.options.thread_stack_size if self._has_zlib_option: tc.variables["CIVETWEB_ENABLE_ZLIB"] = self.options.with_zlib diff --git a/recipes/cjson/all/conandata.yml b/recipes/cjson/all/conandata.yml index 98903aa382fd7..32c4ecff90851 100644 --- a/recipes/cjson/all/conandata.yml +++ b/recipes/cjson/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.7.18": + url: "https://github.com/DaveGamble/cJSON/archive/v1.7.18.tar.gz" + sha256: "3aa806844a03442c00769b83e99970be70fbef03735ff898f4811dd03b9f5ee5" "1.7.17": url: "https://github.com/DaveGamble/cJSON/archive/v1.7.17.tar.gz" sha256: "c91d1eeb7175c50d49f6ba2a25e69b46bd05cffb798382c19bfb202e467ec51c" diff --git a/recipes/cjson/all/conanfile.py b/recipes/cjson/all/conanfile.py index e715bfc8ad197..84820348d6401 100644 --- a/recipes/cjson/all/conanfile.py +++ b/recipes/cjson/all/conanfile.py @@ -13,12 +13,11 @@ class CjsonConan(ConanFile): name = "cjson" description = "Ultralightweight JSON parser in ANSI C." license = "MIT" - topics = ("json", "parser") - homepage = "https://github.com/DaveGamble/cJSON" url = "https://github.com/conan-io/conan-center-index" - - package_type = "library" + homepage = "https://github.com/DaveGamble/cJSON" + topics = ("json", "parser") settings = "os", "arch", "compiler", "build_type" + package_type = "library" options = { "shared": [True, False], "fPIC": [True, False], diff --git a/recipes/cjson/config.yml b/recipes/cjson/config.yml index 8dc9df22965bb..08843263806b5 100644 --- a/recipes/cjson/config.yml +++ b/recipes/cjson/config.yml @@ -1,4 +1,6 @@ versions: + "1.7.18": + folder: all "1.7.17": folder: all "1.7.16": diff --git a/recipes/cli/all/conandata.yml b/recipes/cli/all/conandata.yml index 10682c56d384f..ab550920bd481 100644 --- a/recipes/cli/all/conandata.yml +++ b/recipes/cli/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.2.0": + url: "https://github.com/daniele77/cli/archive/refs/tags/v2.2.0.tar.gz" + sha256: "67c6329471cd5a98b9ab29da0012f94f61497f0b60591bb0ab714d4c09c4f2b0" "2.1.0": url: "https://github.com/daniele77/cli/archive/refs/tags/v2.1.0.tar.gz" sha256: "dfc9fc7c72a6cdfdf852d89f151699b57460ff49775a8ff27d2a69477649acf9" diff --git a/recipes/cli/all/test_package/CMakeLists.txt b/recipes/cli/all/test_package/CMakeLists.txt index 532e9ff7fa4f7..db3334ac223dd 100644 --- a/recipes/cli/all/test_package/CMakeLists.txt +++ b/recipes/cli/all/test_package/CMakeLists.txt @@ -1,8 +1,8 @@ cmake_minimum_required(VERSION 3.15) -project(test_package CXX) +project(test_package LANGUAGES CXX) find_package(cli CONFIG REQUIRED) add_executable(${PROJECT_NAME} test_package.cpp) -target_link_libraries(${PROJECT_NAME} cli::cli) +target_link_libraries(${PROJECT_NAME} PRIVATE cli::cli) target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_14) diff --git a/recipes/cli/all/test_package/conanfile.py b/recipes/cli/all/test_package/conanfile.py index d55c28d73bebf..c5ef71ffe76fe 100644 --- a/recipes/cli/all/test_package/conanfile.py +++ b/recipes/cli/all/test_package/conanfile.py @@ -7,6 +7,7 @@ class cliTestConan(ConanFile): settings = "os", "compiler", "build_type", "arch" generators = "CMakeDeps" + test_type = "explicit" def requirements(self): self.requires(self.tested_reference_str) diff --git a/recipes/cli/config.yml b/recipes/cli/config.yml index dfff490f9a9b6..57df2fc911f74 100644 --- a/recipes/cli/config.yml +++ b/recipes/cli/config.yml @@ -1,3 +1,5 @@ versions: + "2.2.0": + folder: all "2.1.0": folder: all diff --git a/recipes/cli11/all/conandata.yml b/recipes/cli11/all/conandata.yml index f6711af51ec3a..0202c83c31a52 100644 --- a/recipes/cli11/all/conandata.yml +++ b/recipes/cli11/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.4.2": + url: "https://github.com/CLIUtils/CLI11/archive/v2.4.2.tar.gz" + sha256: "f2d893a65c3b1324c50d4e682c0cdc021dd0477ae2c048544f39eed6654b699a" "2.4.1": url: "https://github.com/CLIUtils/CLI11/archive/v2.4.1.tar.gz" sha256: "73b7ec52261ce8fe980a29df6b4ceb66243bb0b779451dbd3d014cfec9fdbb58" diff --git a/recipes/cli11/all/conanfile.py b/recipes/cli11/all/conanfile.py index e28dd119e7d21..227ff9075e44e 100644 --- a/recipes/cli11/all/conanfile.py +++ b/recipes/cli11/all/conanfile.py @@ -2,6 +2,7 @@ from conan.tools.files import get, copy, rmdir from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout from conan.tools.build import check_min_cppstd +from conan.tools.scm import Version import os required_conan_version = ">=1.52.0" @@ -12,20 +13,39 @@ class CLI11Conan(ConanFile): license = "BSD-3-Clause" url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/CLIUtils/CLI11" - topics = "cli-parser", "cpp11", "no-dependencies", "cli", "header-only" + topics = "cli-parser", "cpp11", "no-dependencies", "cli" package_type = "header-library" settings = "os", "arch", "compiler", "build_type" no_copy_source = True + options = { + "header_only": [True, False] + } + default_options = { + "header_only": True + } + @property def _min_cppstd(self): return "11" + @property + def _supports_compilation(self): + return Version(self.version) >= "2.3" + + def configure(self): + if not self._supports_compilation: + # TODO: Back to config_options after Conan 1 freeze + del self.options.header_only + elif not self.options.header_only: + self.package_type = "static-library" + def layout(self): cmake_layout(self, src_folder="src") def package_id(self): - self.info.clear() + if not self._supports_compilation or self.info.options.header_only: + self.info.clear() def validate(self): if self.settings.compiler.get_safe("cppstd"): @@ -36,6 +56,8 @@ def source(self): def generate(self): tc = CMakeToolchain(self) + if self._supports_compilation: + tc.variables["CLI11_PRECOMPILED"] = not self.options.header_only tc.variables["CLI11_BUILD_EXAMPLES"] = False tc.variables["CLI11_BUILD_TESTS"] = False tc.variables["CLI11_BUILD_DOCS"] = False @@ -59,6 +81,11 @@ def package_info(self): self.cpp_info.bindirs = [] self.cpp_info.libdirs = [] + if self._supports_compilation and not self.options.get_safe("header_only"): + self.cpp_info.libdirs = ["lib"] + self.cpp_info.libs = ["CLI11"] + self.cpp_info.defines = ["CLI11_COMPILE"] + self.cpp_info.set_property("cmake_file_name", "CLI11") self.cpp_info.set_property("cmake_target_name", "CLI11::CLI11") self.cpp_info.set_property("pkg_config_name", "CLI11") diff --git a/recipes/cli11/all/test_package/CMakeLists.txt b/recipes/cli11/all/test_package/CMakeLists.txt index 340e598340044..a5cc1000feeb3 100644 --- a/recipes/cli11/all/test_package/CMakeLists.txt +++ b/recipes/cli11/all/test_package/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.8) +cmake_minimum_required(VERSION 3.15) project(test_package LANGUAGES CXX) find_package(CLI11 REQUIRED CONFIG) diff --git a/recipes/cli11/config.yml b/recipes/cli11/config.yml index 29883272197c4..fc84730ec9afc 100644 --- a/recipes/cli11/config.yml +++ b/recipes/cli11/config.yml @@ -1,4 +1,6 @@ versions: + "2.4.2": + folder: all "2.4.1": folder: all "2.4.0": diff --git a/recipes/clipper2/all/conandata.yml b/recipes/clipper2/all/conandata.yml index 317fd4373a1de..5d1e76ef64605 100644 --- a/recipes/clipper2/all/conandata.yml +++ b/recipes/clipper2/all/conandata.yml @@ -1,7 +1,10 @@ sources: + "1.4.0": + url: "https://github.com/AngusJohnson/Clipper2/archive/refs/tags/Clipper2_1.4.0.tar.gz" + sha256: "b83f71bb6a338f4f82116089c5ae867dbc43a2d651b5441380970dd966edd959" "1.3.0": - url: "https://github.com/AngusJohnson/Clipper2/archive/refs/tags/Cliper2_1.3.0.tar.gz" - sha256: "f7e1a706f5f786ed1be8ae969ce15ca569ce36d8de1c3d3f3dacfb3ce0c493e8" + url: "https://github.com/AngusJohnson/Clipper2/archive/refs/tags/Clipper2_1.3.0.tar.gz" + sha256: "8e537ec320e140afaa8fba1f23120416693cc1d71b0f76ad801d24b88b5e0b3c" "1.2.4": url: "https://github.com/AngusJohnson/Clipper2/archive/refs/tags/Clipper2_1.2.4.tar.gz" sha256: "a013d391c25c5f665cdb5cbd75cdd842dcc28f6e1bd098454beb359f6f212f33" diff --git a/recipes/clipper2/all/conanfile.py b/recipes/clipper2/all/conanfile.py index fe88fd67b3e80..c01db389a4cf8 100644 --- a/recipes/clipper2/all/conanfile.py +++ b/recipes/clipper2/all/conanfile.py @@ -1,6 +1,6 @@ from conan import ConanFile from conan.errors import ConanInvalidConfiguration -from conan.tools.files import get, copy, rmdir, export_conandata_patches, apply_conandata_patches +from conan.tools.files import get, copy, rmdir, export_conandata_patches, apply_conandata_patches, replace_in_file from conan.tools.build import check_min_cppstd from conan.tools.scm import Version from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout @@ -21,11 +21,15 @@ class Clipper2Conan(ConanFile): "shared": [True, False], "fPIC": [True, False], "usingz": ["ON", "OFF", "ONLY"], + "with_max_precision": ["ANY"], + "with_hi_precision": [True, False], } default_options = { "shared": False, "fPIC": True, "usingz": "ON", + "with_max_precision": 8, + "with_hi_precision": False, } @property @@ -48,6 +52,10 @@ def export_sources(self): def config_options(self): if self.settings.os == "Windows": del self.options.fPIC + if Version(self.version) < "1.2.4": + del self.options.with_max_precision + if Version(self.version) < "1.4.0": + del self.options.with_hi_precision def configure(self): if self.options.shared: @@ -75,10 +83,18 @@ def generate(self): tc.variables["CLIPPER2_EXAMPLES"] = False tc.variables["CLIPPER2_TESTS"] = False tc.variables["CLIPPER2_USINGZ"] = self.options.usingz + if "with_hi_precision" in self.options: + tc.variables["CLIPPER2_HI_PRECISION"] = self.options.with_hi_precision + if "with_max_precision" in self.options: + tc.variables["CLIPPER2_MAX_PRECISION"] = self.options.with_max_precision tc.generate() + + def _patch_sources(self): + apply_conandata_patches(self) + replace_in_file(self, os.path.join(self.source_folder, "CPP", "CMakeLists.txt"), "-Werror", "") def build(self): - apply_conandata_patches(self) + self._patch_sources() cmake = CMake(self) cmake.configure(build_script_folder=os.path.join(self.source_folder, "CPP")) cmake.build() @@ -89,6 +105,7 @@ def package(self): cmake.install() rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) + rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) def package_info(self): if self.options.usingz != "ONLY": diff --git a/recipes/clipper2/config.yml b/recipes/clipper2/config.yml index 49b239cf22a6f..4c35529540bb1 100644 --- a/recipes/clipper2/config.yml +++ b/recipes/clipper2/config.yml @@ -1,4 +1,6 @@ versions: + "1.4.0": + folder: all "1.3.0": folder: all "1.2.4": diff --git a/recipes/clove-unit/all/conandata.yml b/recipes/clove-unit/all/conandata.yml index b80516fa1a975..132c2a02e4558 100644 --- a/recipes/clove-unit/all/conandata.yml +++ b/recipes/clove-unit/all/conandata.yml @@ -1,16 +1,25 @@ sources: + "2.4.6": + url: "https://github.com/fdefelici/clove-unit/archive/v2.4.6.tar.gz" + sha256: "ecdbd6c4b11bc1eb6e0e5022104f053cb5d1f1ef95e04499a6e29e21289e5063" + "2.4.5": + url: "https://github.com/fdefelici/clove-unit/archive/v2.4.5.tar.gz" + sha256: "e4db72612adf00d7c7c9512cb9990768f5f3e62a72039929b78ba17d5a6f4308" + "2.4.4": + url: "https://github.com/fdefelici/clove-unit/archive/v2.4.4.tar.gz" + sha256: "25e611e1d4286c73d9cce7bbc99f83e00629551602351fec1edcbb669243e047" "2.4.1": url: "https://github.com/fdefelici/clove-unit/archive/v2.4.1.tar.gz" - sha256: ede833e361b5b62052bd0976386307d1d962c7ab20a0e24eb6e970d409c726fe + sha256: "ede833e361b5b62052bd0976386307d1d962c7ab20a0e24eb6e970d409c726fe" "2.4.0": url: "https://github.com/fdefelici/clove-unit/archive/v2.4.0.tar.gz" - sha256: d5005854d7b3b6ed1b470c2df353fadd80a2ed5a80bb85efc074b9d55315e78d + sha256: "d5005854d7b3b6ed1b470c2df353fadd80a2ed5a80bb85efc074b9d55315e78d" "2.3.0": url: "https://github.com/fdefelici/clove-unit/archive/v2.3.0.tar.gz" - sha256: ca94d33643bbe1ff2205f7e6405f3e9c5a95d2f3a076a126814e64b46e3cce8e + sha256: "ca94d33643bbe1ff2205f7e6405f3e9c5a95d2f3a076a126814e64b46e3cce8e" "2.2.4": url: "https://github.com/fdefelici/clove-unit/archive/v2.2.4.tar.gz" - sha256: 0341f13b3e897952f1643eea2ca70cf014c4a086cf83375270980ac05f9d51aa + sha256: "0341f13b3e897952f1643eea2ca70cf014c4a086cf83375270980ac05f9d51aa" "2.2.3": url: "https://github.com/fdefelici/clove-unit/archive/v2.2.3.tar.gz" - sha256: 65f80d600ddec35f7ba70370f10e2df268d68c589e5cddbdcad815b6dbb61dfd + sha256: "65f80d600ddec35f7ba70370f10e2df268d68c589e5cddbdcad815b6dbb61dfd" diff --git a/recipes/clove-unit/all/conanfile.py b/recipes/clove-unit/all/conanfile.py index 630528ab512d9..3e530c191a833 100644 --- a/recipes/clove-unit/all/conanfile.py +++ b/recipes/clove-unit/all/conanfile.py @@ -8,13 +8,14 @@ class CloveUnitConan(ConanFile): name = "clove-unit" description = "Single-header Unit Testing framework for C (interoperable with C++) with test autodiscovery feature" - topics = ("unit-testing", "testing", "unit testing", "test") + license = "MIT" homepage = "https://github.com/fdefelici/clove-unit" url = "https://github.com/conan-io/conan-center-index" - license = "MIT" + topics = ("unit-testing", "testing", "unit testing", "test", "header-only") no_copy_source = True package_type = "header-library" settings = "os", "arch", "compiler", "build_type" + no_copy_source = True def layout(self): basic_layout(self, src_folder="src") diff --git a/recipes/clove-unit/config.yml b/recipes/clove-unit/config.yml index e5228fd78f381..e49f2ea78422d 100644 --- a/recipes/clove-unit/config.yml +++ b/recipes/clove-unit/config.yml @@ -1,4 +1,10 @@ versions: + "2.4.6": + folder: "all" + "2.4.5": + folder: "all" + "2.4.4": + folder: "all" "2.4.1": folder: "all" "2.4.0": diff --git a/recipes/cmake/3.x.x/conanfile.py b/recipes/cmake/3.x.x/conanfile.py index f6de583315097..042191e304bd0 100644 --- a/recipes/cmake/3.x.x/conanfile.py +++ b/recipes/cmake/3.x.x/conanfile.py @@ -37,8 +37,8 @@ def config_options(self): self.options.with_openssl = False def requirements(self): - if self.options.with_openssl: - self.requires("openssl/1.1.1t") + if self.options.get_safe("with_openssl", default=False): + self.requires("openssl/[>=1.1 <4]") def validate_build(self): if self.settings.os == "Windows" and self.options.bootstrap: diff --git a/recipes/cmake/binary/conandata.yml b/recipes/cmake/binary/conandata.yml index 25e592bef0ec8..76d561731c707 100644 --- a/recipes/cmake/binary/conandata.yml +++ b/recipes/cmake/binary/conandata.yml @@ -1,4 +1,194 @@ sources: + "3.31.0": + Linux: + armv8: + url: "https://cmake.org/files/v3.31/cmake-3.31.0-linux-aarch64.tar.gz" + sha256: "e0f74862734c2d14ef8ac5a71941691531db0bbebee0a9c20a8e96e8a97390f9" + x86_64: + url: "https://cmake.org/files/v3.31/cmake-3.31.0-linux-x86_64.tar.gz" + sha256: "0fcb338b4515044f9ac77543550ac92c314c58f6f95aafcac5cd36aa75db6924" + Macos: + universal: + url: "https://cmake.org/files/v3.31/cmake-3.31.0-macos10.10-universal.tar.gz" + sha256: "58863bf65412e0fcaacd7dae2fcf0b5f33d78e46d0b84b547c946c59f4d19960" + Windows: + armv8: + url: "https://cmake.org/files/v3.31/cmake-3.31.0-windows-arm64.zip" + sha256: "3bae17886ad47909aadd89e41932a109a8b6a708faef6f28de2d4554c7c08276" + x86_64: + url: "https://cmake.org/files/v3.31/cmake-3.31.0-windows-x86_64.zip" + sha256: "f4b499f71cf44115a1d711d4867da3c6bd2f3f4d7121c213ace979757640385c" + "3.30.5": + Linux: + armv8: + url: "https://cmake.org/files/v3.30/cmake-3.30.5-linux-aarch64.tar.gz" + sha256: "da7dead2c92c1747b40d506d7f7d68590f5bab175316d2e7af73e48a2e417e48" + x86_64: + url: "https://cmake.org/files/v3.30/cmake-3.30.5-linux-x86_64.tar.gz" + sha256: "f747d9b23e1a252a8beafb4ed2bc2ddf78cff7f04a8e4de19f4ff88e9b51dc9d" + Macos: + universal: + url: "https://cmake.org/files/v3.30/cmake-3.30.5-macos10.10-universal.tar.gz" + sha256: "db21c9d92e544b3a47820627fe89bde8191e6bfb49b9e43d726cec5a5ef96ca7" + Windows: + armv8: + url: "https://cmake.org/files/v3.30/cmake-3.30.5-windows-arm64.zip" + sha256: "b5fa431bd569b591717a9a0f77c0ab56b072ef8603f924401227c178ac7072d9" + x86_64: + url: "https://cmake.org/files/v3.30/cmake-3.30.5-windows-x86_64.zip" + sha256: "5ab6e1faf20256ee4f04886597e8b6c3b1bd1297b58a68a58511af013710004b" + "3.30.1": + Linux: + armv8: + url: "https://cmake.org/files/v3.30/cmake-3.30.1-linux-aarch64.tar.gz" + sha256: "ad234996f8750f11d7bd0d17b03f55c434816adf1f1671aab9e8bab21a43286a" + x86_64: + url: "https://cmake.org/files/v3.30/cmake-3.30.1-linux-x86_64.tar.gz" + sha256: "ac31f077ef3378641fa25a3cb980d21b2f083982d3149a8f2eb9154f2b53696b" + Macos: + universal: + url: "https://cmake.org/files/v3.30/cmake-3.30.1-macos10.10-universal.tar.gz" + sha256: "4c1beda2bb2ab830f22fdb29aa6cc844f9b0eb32cca0fb4f01b407688944d181" + Windows: + armv8: + url: "https://cmake.org/files/v3.30/cmake-3.30.1-windows-arm64.zip" + sha256: "02b433f70aa549449be2d53046d0179590bf3b6290d9fda3fbbb23f96a4f2802" + x86_64: + url: "https://cmake.org/files/v3.30/cmake-3.30.1-windows-x86_64.zip" + sha256: "cf7788ff9d92812da194847d4ec874fc576f34079987d0f20c96cd09e2a16220" + "3.30.0": + Linux: + armv8: + url: "https://cmake.org/files/v3.30/cmake-3.30.0-linux-aarch64.tar.gz" + sha256: "3db7f12dadc91be9b30f0e5a71038c51d7f5b7cc03e32625621a052e9996bef0" + x86_64: + url: "https://cmake.org/files/v3.30/cmake-3.30.0-linux-x86_64.tar.gz" + sha256: "09846a3858583f38189b59177586adf125a08c15f3cddcaf7d7d7081ac86969f" + Macos: + universal: + url: "https://cmake.org/files/v3.30/cmake-3.30.0-macos10.10-universal.tar.gz" + sha256: "54f237212362efa3f192508eeb25d98f2150779ed45c46a77fe356597c3d2749" + Windows: + armv8: + url: "https://cmake.org/files/v3.30/cmake-3.30.0-windows-arm64.zip" + sha256: "cb8fb65a8f523daa0ce6c531407ae10fcab8d0eefe18a6ef9fb718c54307d6e3" + x86_64: + url: "https://cmake.org/files/v3.30/cmake-3.30.0-windows-x86_64.zip" + sha256: "f8d2da0eaf3bab9cf065e97bd6d8e1819886f8671d3d4c7bb93cb774123fa448" + "3.29.7": + Linux: + armv8: + url: "https://cmake.org/files/v3.29/cmake-3.29.7-linux-aarch64.tar.gz" + sha256: "ee8cf1ceaef011578ec070c13471c4b26e87f065315155e11177063b0743da68" + x86_64: + url: "https://cmake.org/files/v3.29/cmake-3.29.7-linux-x86_64.tar.gz" + sha256: "fb0837495a3a1d044f5101d0a76d294c825ff85c10a32c42d7167604278344f7" + Macos: + universal: + url: "https://cmake.org/files/v3.29/cmake-3.29.7-macos10.10-universal.tar.gz" + sha256: "3a148e37bf57c419e40817d6208916a33eff8c1757b0947d9991eca902916559" + Windows: + armv8: + url: "https://cmake.org/files/v3.29/cmake-3.29.7-windows-arm64.zip" + sha256: "ae87f2ff173deeb3ae8891d31c8f92ebabab8a4c29a074c5c5d39b38dde706d2" + x86_64: + url: "https://cmake.org/files/v3.29/cmake-3.29.7-windows-x86_64.zip" + sha256: "3d9580b54faa0651f4cb0bccdff222bd123366b35a8b1051ee33a64915384ee4" + "3.29.6": + Linux: + armv8: + url: "https://cmake.org/files/v3.29/cmake-3.29.6-linux-aarch64.tar.gz" + sha256: "4d6b0a551db9da7a034a09372f716cf2094413d7fd8a787051854154b0b3b343" + x86_64: + url: "https://cmake.org/files/v3.29/cmake-3.29.6-linux-x86_64.tar.gz" + sha256: "28fef61e64840b784da6db35218fd3ae179ff8bf0be1c8a9d075d6185a0e4fdc" + Macos: + universal: + url: "https://cmake.org/files/v3.29/cmake-3.29.6-macos10.10-universal.tar.gz" + sha256: "a65f9e66c63bb79f3b6f00e4b67367b6f6c40030ee41cf06580818a74a84b3e9" + Windows: + armv8: + url: "https://cmake.org/files/v3.29/cmake-3.29.6-windows-arm64.zip" + sha256: "8f0df498d8b1a076fc9305dde5a06427262a0476e89d4c670a49147b0bc30761" + x86_64: + url: "https://cmake.org/files/v3.29/cmake-3.29.6-windows-x86_64.zip" + sha256: "5c648eac06c33477e510bae14ce1f969e9abb38992b71f245633b182fccb474d" + "3.29.5": + Linux: + armv8: + url: "https://cmake.org/files/v3.29/cmake-3.29.5-linux-aarch64.tar.gz" + sha256: "6eb655ee89c50611f2370c5a3293bd2fe1920b73dff50b71fb3357d56a9d28d8" + x86_64: + url: "https://cmake.org/files/v3.29/cmake-3.29.5-linux-x86_64.tar.gz" + sha256: "92629f95e15e7c2e88726c57a984ffdc5cf248e354f7ab791bc86d2ad513903e" + Macos: + universal: + url: "https://cmake.org/files/v3.29/cmake-3.29.5-macos10.10-universal.tar.gz" + sha256: "a110d173ab839854fc0b19b9f29f213c1112106e2858c1a1fe7973d4bb13a536" + Windows: + armv8: + url: "https://cmake.org/files/v3.29/cmake-3.29.5-windows-arm64.zip" + sha256: "9c67d16560125ebf1278ef1b3072914a60bff780522b28c0096f364f775a8e55" + x86_64: + url: "https://cmake.org/files/v3.29/cmake-3.29.5-windows-x86_64.zip" + sha256: "f85db8361cb7eb11ceb6b2f1ee42bec7234bb8d9e487ea78c00de64771768d92" + "3.29.4": + Linux: + armv8: + url: "https://cmake.org/files/v3.29/cmake-3.29.4-linux-aarch64.tar.gz" + sha256: "9210619e7907b14858178743d5b7ba70ce846d98a6a65bcdbd83c08b932ba6a5" + x86_64: + url: "https://cmake.org/files/v3.29/cmake-3.29.4-linux-x86_64.tar.gz" + sha256: "64e5473169dd43055fbf2c138cae6e5ec10f30a0606d24f12078e68466320cf4" + Macos: + universal: + url: "https://cmake.org/files/v3.29/cmake-3.29.4-macos10.10-universal.tar.gz" + sha256: "44a59c584122676463bf5bdd2c7dee2ac02944e065a71cc30c57541a20d3465c" + Windows: + armv8: + url: "https://cmake.org/files/v3.29/cmake-3.29.4-windows-arm64.zip" + sha256: "16ce291dd34189a60d7add96b4148adfdbb46b6b2478086cb43abe2e5ff34ad3" + x86_64: + url: "https://cmake.org/files/v3.29/cmake-3.29.4-windows-x86_64.zip" + sha256: "1c8bfbc5537553edccded62f8f03475a161280c1b64f54c887824c6eb4e773ff" + "3.29.3": + Linux: + armv8: + url: "https://cmake.org/files/v3.29/cmake-3.29.3-linux-aarch64.tar.gz" + sha256: "ae61d262b2771ba9cbdf1eeac288e64d6510d2f0417d2d92e27807d269ac90fa" + x86_64: + url: "https://cmake.org/files/v3.29/cmake-3.29.3-linux-x86_64.tar.gz" + sha256: "90b543a30220401db0e08347af067545be158ce89ffb09b7df1516cda8617329" + Macos: + universal: + url: "https://cmake.org/files/v3.29/cmake-3.29.3-macos10.10-universal.tar.gz" + sha256: "1a7ecdd1dc8baaede55d1011f60b5871ff908fa640f7e96ab5520f38ef97bba0" + Windows: + armv8: + url: "https://cmake.org/files/v3.29/cmake-3.29.3-windows-arm64.zip" + sha256: "8d7d65e46a45bdbf8b4416d29ef6ad9a80f0b26afb5d6afab358e34b1b30a556" + x86_64: + url: "https://cmake.org/files/v3.29/cmake-3.29.3-windows-x86_64.zip" + sha256: "6423ed300e6aa1b15c4aeae9a7399157f53fc84a2fb7242ca64c8dfd83e5f8a6" + "3.29.2": + Linux: + armv8: + url: "https://cmake.org/files/v3.29/cmake-3.29.2-linux-aarch64.tar.gz" + sha256: "ca883c6dc3ce9eebd833804f0f940ecbbff603520cfd169ee58916dbbc23c2b8" + x86_64: + url: "https://cmake.org/files/v3.29/cmake-3.29.2-linux-x86_64.tar.gz" + sha256: "0416c70cf88e8f92efcbfe292e181bc09ead7d70e29ab37b697522c01121eab5" + Macos: + universal: + url: "https://cmake.org/files/v3.29/cmake-3.29.2-macos10.10-universal.tar.gz" + sha256: "0b542389345b28d2f73122b72ec9b899947e643fd86cf8f42bae2718884d2ad3" + Windows: + armv8: + url: "https://cmake.org/files/v3.29/cmake-3.29.2-windows-arm64.zip" + sha256: "5b16a0db4966c04582c40131038de49d5b0161fcd950dc9e955753dfab858882" + x86_64: + url: "https://cmake.org/files/v3.29/cmake-3.29.2-windows-x86_64.zip" + sha256: "86b5de51f60a0e9d62be4d8ca76ea467d154083d356fcc9af1409606be341cd8" "3.29.0": Linux: armv8: @@ -18,6 +208,44 @@ sources: x86_64: url: "https://cmake.org/files/v3.29/cmake-3.29.0-windows-x86_64.zip" sha256: "9ab28eba1ab7911a0e57ab274f5990a283fffa1d22eb711792d5562e5869f9ef" + "3.28.6": + Linux: + armv8: + url: "https://cmake.org/files/v3.28/cmake-3.28.6-linux-aarch64.tar.gz" + sha256: "7909cc2128ce9442c63ce674a0bfb0e4f4ce04cef667d887e15ad5670d594ba7" + x86_64: + url: "https://cmake.org/files/v3.28/cmake-3.28.6-linux-x86_64.tar.gz" + sha256: "931e3c0d546ee03ca72bb147ccd9b49e3b6252f765f66bf21b9d165519940458" + Macos: + universal: + url: "https://cmake.org/files/v3.28/cmake-3.28.6-macos10.10-universal.tar.gz" + sha256: "cbda8e719b3239e304b339cdd90e946c09dac5ad2d57c93bf1b1d3914685d9a7" + Windows: + armv8: + url: "https://cmake.org/files/v3.28/cmake-3.28.6-windows-arm64.zip" + sha256: "63e4ebd2dadb5ad63faaf4ed38db40d3fec92d1b050d2a4e69011ea3ee699d29" + x86_64: + url: "https://cmake.org/files/v3.28/cmake-3.28.6-windows-x86_64.zip" + sha256: "a8f2e684ead94a64fd3517a38857a5b3f7f8d68d15c49ca1143d18797eaf9cac" + "3.28.5": + Linux: + armv8: + url: "https://cmake.org/files/v3.28/cmake-3.28.5-linux-aarch64.tar.gz" + sha256: "5b4a86b456058266bd4caa9c59187fab4b1ace823acdd9741d2d24fed5a4f50b" + x86_64: + url: "https://cmake.org/files/v3.28/cmake-3.28.5-linux-x86_64.tar.gz" + sha256: "c5460b8a0ecfea7c0ac99d78427e19409ea9133e29a604e1f8c0e6806a8f6934" + Macos: + universal: + url: "https://cmake.org/files/v3.28/cmake-3.28.5-macos10.10-universal.tar.gz" + sha256: "62956bf3c26b396cee20dddf2914d63d882cff4245e13c29c72f7841c03d56e4" + Windows: + armv8: + url: "https://cmake.org/files/v3.28/cmake-3.28.5-windows-arm64.zip" + sha256: "47056df28bc543c528f85f15c46180dbed750e5ebd0180f936a2e3ee22ddea56" + x86_64: + url: "https://cmake.org/files/v3.28/cmake-3.28.5-windows-x86_64.zip" + sha256: "0fbea146a782e4b82a799384a2109e46ce27f3ad70c30d3f8c9ef751e1e28040" "3.28.1": Linux: armv8: diff --git a/recipes/cmake/config.yml b/recipes/cmake/config.yml index 6f9c7e82ab831..2917de8e86dad 100644 --- a/recipes/cmake/config.yml +++ b/recipes/cmake/config.yml @@ -1,6 +1,30 @@ versions: + "3.31.0": + folder: "binary" + "3.30.5": + folder: "binary" + "3.30.1": + folder: "binary" + "3.30.0": + folder: "binary" + "3.29.7": + folder: "binary" + "3.29.6": + folder: "binary" + "3.29.5": + folder: "binary" + "3.29.4": + folder: "binary" + "3.29.3": + folder: "binary" + "3.29.2": + folder: "binary" "3.29.0": folder: "binary" + "3.28.6": + folder: "binary" + "3.28.5": + folder: "binary" "3.28.1": folder: "binary" "3.27.9": diff --git a/recipes/cnats/all/conandata.yml b/recipes/cnats/all/conandata.yml index 7a17667b0dc32..618c0a55a3965 100644 --- a/recipes/cnats/all/conandata.yml +++ b/recipes/cnats/all/conandata.yml @@ -2,3 +2,12 @@ sources: "3.8.0": url: "https://github.com/nats-io/nats.c/archive/refs/tags/v3.8.0.tar.gz" sha256: "465811380cdc6eab3304e40536d03f99977a69c0e56fcf566000c29dd075e4dd" + "3.8.2": + url: "https://github.com/nats-io/nats.c/archive/refs/tags/v3.8.2.tar.gz" + sha256: "083ee03cf5a413629d56272e88ad3229720c5006c286e8180c9e5b745c10f37d" + "3.8.3": + url: "https://github.com/nats-io/nats.c/archive/refs/tags/v3.8.3.tar.gz" + sha256: "fe7e9ce7636446cc3fe0f47f6a235c4783299e00d5e5c4a1f8689d20707871db" + "3.9.1": + url: "https://github.com/nats-io/nats.c/archive/refs/tags/v3.9.1.tar.gz" + sha256: "56836bb30a2da93eaa6df0dfa27e796e6be0933b5b3d4d83b5c76d3b80304290" diff --git a/recipes/cnats/config.yml b/recipes/cnats/config.yml index ca7b223bb16c2..a45c78cde476d 100644 --- a/recipes/cnats/config.yml +++ b/recipes/cnats/config.yml @@ -1,3 +1,9 @@ versions: "3.8.0": folder: all + "3.8.2": + folder: all + "3.8.3": + folder: all + "3.9.1": + folder: all diff --git a/recipes/commata/all/conandata.yml b/recipes/commata/all/conandata.yml index f27e5a5899c63..157169467da5a 100644 --- a/recipes/commata/all/conandata.yml +++ b/recipes/commata/all/conandata.yml @@ -1,4 +1,10 @@ sources: + "1.0.1": + url: "https://github.com/furfurylic/commata/archive/refs/tags/v1.0.1.tar.gz" + sha256: "b6e91ede0ec8b7c69ced1e243eba204717e05fcd9ae26163a54425ca800124ef" + "1.0.0": + url: "https://github.com/furfurylic/commata/archive/refs/tags/v1.0.0.tar.gz" + sha256: "ecf0a88f6a4616d10770522b4ef4838e4100511759eb640270f6b932e4b7df69" "0.2.9": url: "https://github.com/furfurylic/commata/archive/refs/tags/v0.2.9.tar.gz" sha256: "24c404e90e2f01a2f9e46e55c2f8121a3f146d1f2dfb819b8d7ab5cf13bd6a9f" diff --git a/recipes/commata/config.yml b/recipes/commata/config.yml index 142c2b3beaf0a..0cc9df6999a12 100644 --- a/recipes/commata/config.yml +++ b/recipes/commata/config.yml @@ -1,4 +1,8 @@ versions: + "1.0.1": + folder: all + "1.0.0": + folder: all "0.2.9": folder: all "0.2.8": diff --git a/recipes/compute_library/all/conandata.yml b/recipes/compute_library/all/conandata.yml new file mode 100644 index 0000000000000..3b952c4dbb5e0 --- /dev/null +++ b/recipes/compute_library/all/conandata.yml @@ -0,0 +1,7 @@ +sources: + "23.08": + url: "https://github.com/ARM-software/ComputeLibrary/archive/refs/tags/v23.08.tar.gz" + sha256: "62f514a555409d4401e5250b290cdf8cf1676e4eb775e5bd61ea6a740a8ce24f" + "23.02.1": + url: "https://github.com/ARM-software/ComputeLibrary/archive/refs/tags/v23.02.1.tar.gz" + sha256: "c3a443e26539f866969242e690cf0651ef629149741ee18732f954c734da6763" diff --git a/recipes/compute_library/all/conanfile.py b/recipes/compute_library/all/conanfile.py new file mode 100644 index 0000000000000..6becfaaa8f1bb --- /dev/null +++ b/recipes/compute_library/all/conanfile.py @@ -0,0 +1,149 @@ +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.files import get, copy, rm, chdir +from conan.tools.build import check_min_cppstd, cross_building, build_jobs +from conan.tools.scm import Version +from conan.tools.env import VirtualBuildEnv +from conan.tools.gnu import AutotoolsDeps, AutotoolsToolchain +from conan.tools.layout import basic_layout +import os + + +required_conan_version = ">=1.53.0" + + +class ComputeLibraryConan(ConanFile): + name = "compute_library" + description = "The Compute Library is a set of computer vision and machine learning functions optimized for both Arm CPUs and GPUs using SIMD technologies" + license = "MIT" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/ARM-software/ComputeLibrary" + topics = ("android", "linux", "machine-learning", "arm", "computer-vision", "neural-network") + package_type = "library" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "enable_openmp": [True, False], + "enable_opencl": [True, False], + "enable_neon": [True, False], + "enable_multi_isa": [True, False], + } + default_options = { + "shared": False, + "enable_openmp": False, + "enable_opencl": True, + "enable_neon": True, + "enable_multi_isa": False, + } + + @property + def _min_cppstd(self): + return 14 + + @property + def _compilers_minimum_version(self): + return { + "gcc": "6", + "clang": "5", + "apple-clang": "5.1", + } + + def config_options(self): + # INFO: Neon option is reserved to arm architecture + if "arm" not in str(self.settings.arch): + del self.options.enable_neon + # INFO: OpenMP option only works with g++, according to the documentation + if self.settings.compiler == "clang": + del self.options.enable_openmp + # INFO: OpenCL fails to build with MacOS + if self.settings.os == "Macos": + del self.options.enable_opencl + + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + + def layout(self): + basic_layout(self, src_folder="src") + + def build_requirements(self): + self.tool_requires("scons/4.3.0") + + def requirements(self): + if self.options.get_safe("enable_opencl"): + self.requires("opencl-headers/2023.04.17") + + def validate(self): + if self.settings.compiler.cppstd: + check_min_cppstd(self, self._min_cppstd) + minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) + if minimum_version and Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration(f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support.") + # INFO: https://github.com/ARM-software/ComputeLibrary#supported-systems + supported_os = ["Android", "Linux", "OpenBSD", "Macos", "Tizen", "Windows"] + if str(self.settings.os) not in supported_os: + raise ConanInvalidConfiguration(f"{self.ref} does not support {self.settings.os}. It is only supported on {supported_os}.") + if self.settings.os == "Windows": + if cross_building(self): + # INFO: https://arm-software.github.io/ComputeLibrary/latest/how_to_build.xhtml#S1_6_windows_host + raise ConanInvalidConfiguration(f"Using scons directly from the Windows command line is known to cause problems. Please, try native native build on Windows ARM or cross-build on Linux Ubuntu.") + if "arm" in str(self.settings.arch): + # INFO: https://arm-software.github.io/ComputeLibrary/latest/how_to_build.xhtml#S1_6_3_WoA + self.output.warn("Native builds on Windows are experimental and some features from the library interacting with the OS are missing.") + if "x86" in str(self.settings.arch): + raise ConanInvalidConfiguration(f"{self.ref} does not support native builds on Windows x86/x86_64. It is only supported on Windows ARM.") + if "arm" not in str(self.settings.arch) and "x86" not in str(self.settings.arch): + # INFO: https://github.com/ARM-software/ComputeLibrary#supported-architecturestechnologies + raise ConanInvalidConfiguration(f"{self.ref} does not support {self.settings.arch}. It is only supported on arm and x86.") + if "x86" in str(self.settings.arch) and self.settings.os != "Macos" and not self.options.get_safe("enable_opencl", False): + raise ConanInvalidConfiguration(f"{self.ref} can be built for x86_64 targets only with enable_neon=False and enable_opencl=True.") + if self.settings.os == "Linux" and self.settings.compiler == "clang": + # INFO: https://arm-software.github.io/ComputeLibrary/latest/how_to_build.xhtml#S1_2_linux + raise ConanInvalidConfiguration(f"{self.ref} does not support Linux with clang. It is only supported on Linux with gcc.") + if "armv8" not in str(self.settings.arch) and self.options.enable_multi_isa: + raise ConanInvalidConfiguration(f"{self.ref} does not support multi_isa option for {self.settings.arch}. It is only supported on armv8.") + if self.settings.arch == "armv8" and self.settings_build.arch == "x86_64" and self.settings.os == "Macos" and self.settings.compiler == "apple-clang": + raise ConanInvalidConfiguration(f"Mac Intel is not supported for armv8-a. Please, use Mac M1 as native build.") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = AutotoolsToolchain(self) + tc.generate() + tc = AutotoolsDeps(self) + tc.generate() + tc = VirtualBuildEnv(self) + tc.generate(scope="build") + + def build(self): + # INFO: Using scons to build the library we don't have control over shared/static and install step, it is done all together always + # INFO: https://arm-software.github.io/ComputeLibrary/latest/how_to_build.xhtml + yes_no = lambda v: "1" if v else "0" + debug = yes_no(self.settings.build_type == "Debug") + build_os = str(self.settings.os).lower() + arch = {"armv8": "armv8a", "x86": "x86_32", "armv7": "armv7a", "armv7hf": "armv7a-hf"}.get(str(self.settings.arch), str(self.settings.arch)) + neon = yes_no(self.options.get_safe("enable_neon")) + opencl = yes_no(self.options.get_safe("enable_opencl", False)) + openmp = yes_no(self.options.get_safe("enable_openmp")) + multi_isa = yes_no(self.options.enable_multi_isa) + build = "cross_compile" if cross_building(self) else "native" + with chdir(self, self.source_folder): + self.run(f"scons Werror=0 validation_tests=0 examples=0 gemm_tuner=0 multi_isa={multi_isa} openmp={openmp} debug={debug} neon={neon} opencl={opencl} os={build_os} arch={arch} build={build} build_dir={self.build_folder} install_dir={self.package_folder} -j{build_jobs(self)} toolchain_prefix=''", env="conanbuild") + + def package(self): + copy(self, pattern="LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) + # INFO: Artifacts are installed during build step, so we just need to remove what we don't want + rm(self, "*.bazel", self.package_folder, recursive=True) + rm(self, "*.cpp", self.package_folder, recursive=True) + if self.options.shared: + rm(self, "*.a", os.path.join(self.package_folder, "lib")) + else: + rm(self, "*.so*", os.path.join(self.package_folder, "lib")) + rm(self, "*.dylib*", os.path.join(self.package_folder, "lib")) + + def package_info(self): + suffix = "" if self.options.shared else "-static" + self.cpp_info.libs = [f"arm_compute{suffix}", f"arm_compute_core{suffix}", f"arm_compute_graph{suffix}"] + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.system_libs = ["m", "pthread"] diff --git a/recipes/compute_library/all/test_package/CMakeLists.txt b/recipes/compute_library/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..4c1184efde1e9 --- /dev/null +++ b/recipes/compute_library/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package CXX) + +find_package(compute_library REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE compute_library::compute_library) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_14) diff --git a/recipes/compute_library/all/test_package/conanfile.py b/recipes/compute_library/all/test_package/conanfile.py new file mode 100644 index 0000000000000..ef5d7042163ec --- /dev/null +++ b/recipes/compute_library/all/test_package/conanfile.py @@ -0,0 +1,26 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/compute_library/all/test_package/test_package.cpp b/recipes/compute_library/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..2457b9908b8ac --- /dev/null +++ b/recipes/compute_library/all/test_package/test_package.cpp @@ -0,0 +1,11 @@ +#include +#include +#include "arm_compute/core/Version.h" + + +int main(void) { + std::cout << "ComputeLibrary information:" << std::endl; + std::cout << arm_compute::build_information() << std::endl; + + return EXIT_SUCCESS; +} diff --git a/recipes/compute_library/config.yml b/recipes/compute_library/config.yml new file mode 100644 index 0000000000000..118236bce990b --- /dev/null +++ b/recipes/compute_library/config.yml @@ -0,0 +1,5 @@ +versions: + "23.08": + folder: all + "23.02.1": + folder: all diff --git a/recipes/cpp-channel/all/conandata.yml b/recipes/cpp-channel/all/conandata.yml index 8e45b89578701..ed231f8fb8014 100644 --- a/recipes/cpp-channel/all/conandata.yml +++ b/recipes/cpp-channel/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.8.3": + url: "https://github.com/andreiavrammsd/cpp-channel/archive/refs/tags/v0.8.3.tar.gz" + sha256: "49539a9e387797bd91d1713588f7c88beef98d69919bfb7b0712ed060527567a" "0.8.2": url: "https://github.com/andreiavrammsd/cpp-channel/archive/refs/tags/v0.8.2.tar.gz" sha256: "7666ec6ef275029593dc97bf35057761bc049298d71597a640da1e659c39a667" diff --git a/recipes/cpp-channel/config.yml b/recipes/cpp-channel/config.yml index bed1cdd9bb5b1..eda9ea75e51a5 100644 --- a/recipes/cpp-channel/config.yml +++ b/recipes/cpp-channel/config.yml @@ -1,3 +1,5 @@ versions: + "0.8.3": + folder: all "0.8.2": folder: all diff --git a/recipes/cpp-dump/all/conandata.yml b/recipes/cpp-dump/all/conandata.yml index 5f382aa287ad3..adaa64a423425 100644 --- a/recipes/cpp-dump/all/conandata.yml +++ b/recipes/cpp-dump/all/conandata.yml @@ -1,4 +1,10 @@ sources: + "0.7.0": + url: "https://github.com/philip82148/cpp-dump/archive/refs/tags/v0.7.0.tar.gz" + sha256: "b27a0854a405aa10619f341f66e26a6c39dca1ad41a26dd4fa6d86ad6752c4f8" + "0.6.0": + url: "https://github.com/philip82148/cpp-dump/archive/refs/tags/v0.6.0.tar.gz" + sha256: "22bc5fafa22ac7c1e99db8824fdabec4af6baabed0c8b7cc80a0205dfb550414" "0.5.0": url: "https://github.com/philip82148/cpp-dump/archive/refs/tags/v0.5.0.tar.gz" sha256: "31fa8b03c9ee820525137be28f37b36e2abe7fd91df7d67681cb894db2230fe6" diff --git a/recipes/cpp-dump/all/conanfile.py b/recipes/cpp-dump/all/conanfile.py index b9f479f3b52af..36c04e6dd12c9 100644 --- a/recipes/cpp-dump/all/conanfile.py +++ b/recipes/cpp-dump/all/conanfile.py @@ -55,18 +55,32 @@ def source(self): def package(self): copy(self, pattern="LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) - copy( - self, - pattern="dump.hpp", - dst=os.path.join(self.package_folder, "include"), - src=self.source_folder, - ) - copy( - self, - pattern="*.hpp", - dst=os.path.join(self.package_folder, "include", "hpp"), - src=os.path.join(self.source_folder, "hpp"), - ) + if Version(self.version) < "0.7.0": + copy( + self, + pattern="dump.hpp", + dst=os.path.join(self.package_folder, "include"), + src=self.source_folder, + ) + copy( + self, + pattern="*.hpp", + dst=os.path.join(self.package_folder, "include", "hpp"), + src=os.path.join(self.source_folder, "hpp"), + ) + else: + copy( + self, + pattern="*dump.hpp", + dst=os.path.join(self.package_folder, "include"), + src=self.source_folder, + ) + copy( + self, + pattern="*.hpp", + dst=os.path.join(self.package_folder, "include", "cpp-dump"), + src=os.path.join(self.source_folder, "cpp-dump"), + ) def package_info(self): self.cpp_info.bindirs = [] diff --git a/recipes/cpp-dump/config.yml b/recipes/cpp-dump/config.yml index ca7b2c3985d5e..d61439bae1bc3 100644 --- a/recipes/cpp-dump/config.yml +++ b/recipes/cpp-dump/config.yml @@ -1,3 +1,7 @@ versions: + "0.7.0": + folder: all + "0.6.0": + folder: all "0.5.0": folder: all diff --git a/recipes/cpp-httplib/all/conandata.yml b/recipes/cpp-httplib/all/conandata.yml index 55f4436e78089..6d1aa245d833b 100644 --- a/recipes/cpp-httplib/all/conandata.yml +++ b/recipes/cpp-httplib/all/conandata.yml @@ -1,37 +1,29 @@ sources: + "0.18.1": + url: "https://github.com/yhirose/cpp-httplib/archive/v0.18.1.tar.gz" + sha256: "405abd8170f2a446fc8612ac635d0db5947c0d2e156e32603403a4496255ff00" + "0.18.0": + url: "https://github.com/yhirose/cpp-httplib/archive/v0.18.0.tar.gz" + sha256: "6ed5894bbbc4a34a0f4c5e962672d0003d2ea099bbadacc66f6dee2b213ff394" + "0.17.3": + url: "https://github.com/yhirose/cpp-httplib/archive/v0.17.3.tar.gz" + sha256: "95bd6dba4241656c59d6f0854d408d14c220f7c71e673319ee27d30aee741aaa" + "0.17.1": + url: "https://github.com/yhirose/cpp-httplib/archive/v0.17.1.tar.gz" + sha256: "044c5a233da242e981d9543dd136a5945e0549c5641a0373934db88bbd192f41" + "0.16.3": + url: "https://github.com/yhirose/cpp-httplib/archive/v0.16.3.tar.gz" + sha256: "c1742fc7179aaae2a67ad9bba0740b7e9ffaf4f5e62feef53101ecdef1478716" + "0.16.0": + url: "https://github.com/yhirose/cpp-httplib/archive/v0.16.0.tar.gz" + sha256: "c125022eb85eaa12235518dc4638be93b62c3216d0f87b655af7b17b71b38851" "0.15.3": url: "https://github.com/yhirose/cpp-httplib/archive/v0.15.3.tar.gz" sha256: "2121bbf38871bb2aafb5f7f2b9b94705366170909f434428352187cb0216124e" - "0.15.2": - url: "https://github.com/yhirose/cpp-httplib/archive/v0.15.2.tar.gz" - sha256: "4afbcf4203249d2cbcb698e46e1f6fb61b479013a84844d6bb1c044e233cab6a" - "0.15.1": - url: "https://github.com/yhirose/cpp-httplib/archive/v0.15.1.tar.gz" - sha256: "8d6a4a40ee8fd3f553b7e895882e60e674bd910883fc1857587dbbabee3cdb91" "0.14.3": url: "https://github.com/yhirose/cpp-httplib/archive/v0.14.3.tar.gz" sha256: "dcf6486d9030937636d8a4f820ca9531808fd7edb283893dddbaa05f99357e63" - "0.14.2": - url: "https://github.com/yhirose/cpp-httplib/archive/v0.14.2.tar.gz" - sha256: "dbcf5590e8ed35c6745c2ad659a5ebec92f05187d1506eec24449d6db95e5084" + # keep 0.14.1 for enjincppsdk and microservice-essentials "0.14.1": url: "https://github.com/yhirose/cpp-httplib/archive/v0.14.1.tar.gz" sha256: "2d4fb5544da643e5d0a82585555d8b7502b4137eb321a4abbb075e21d2f00e96" - "0.14.0": - url: "https://github.com/yhirose/cpp-httplib/archive/v0.14.0.tar.gz" - sha256: "3a92248ef8cf2c32ad07f910b8e3052ff2427022b2adb871cf326fb620d2438e" - "0.13.3": - url: "https://github.com/yhirose/cpp-httplib/archive/v0.13.3.tar.gz" - sha256: "2a4503f9f2015f6878baef54cd94b01849cc3ed19dfe95f2c9775655bea8b73f" - "0.13.1": - url: "https://github.com/yhirose/cpp-httplib/archive/v0.13.1.tar.gz" - sha256: "9b837d290b61e3f0c4239da0b23bbf14c382922e2bf2a9bac21c1e3feabe1ff9" - "0.12.6": - url: "https://github.com/yhirose/cpp-httplib/archive/v0.12.6.tar.gz" - sha256: "24bc594a9efcc08a5a6f3928e848d046d411a88b07bcd6f7f3851227a1f0133e" - "0.11.4": - url: "https://github.com/yhirose/cpp-httplib/archive/v0.11.4.tar.gz" - sha256: "28f76b875a332fb80972c3212980c963f0a7d2e11a8fe94a8ed0d847b9a2256f" - "0.10.9": - url: "https://github.com/yhirose/cpp-httplib/archive/refs/tags/v0.10.9.tar.gz" - sha256: "95ac0740ef760829a079c01a44164fd74af3fdc0748a40fc6beefd0276fd2345" diff --git a/recipes/cpp-httplib/all/conanfile.py b/recipes/cpp-httplib/all/conanfile.py index 7ecbe0a2931e5..4e28d01766a72 100644 --- a/recipes/cpp-httplib/all/conanfile.py +++ b/recipes/cpp-httplib/all/conanfile.py @@ -11,8 +11,8 @@ class CpphttplibConan(ConanFile): name = "cpp-httplib" description = "A C++11 single-file header-only cross platform HTTP/HTTPS library." license = "MIT" - homepage = "https://github.com/yhirose/cpp-httplib" url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/yhirose/cpp-httplib" topics = ("http", "https", "header-only") package_type = "header-library" settings = "os", "arch", "compiler", "build_type" @@ -49,9 +49,6 @@ def layout(self): def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) - def build(self): - pass - def package(self): copy(self, "LICENSE", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) copy(self, "httplib.h", src=self.source_folder, dst=os.path.join(self.package_folder, "include", "httplib")) diff --git a/recipes/cpp-httplib/all/test_package/conanfile.py b/recipes/cpp-httplib/all/test_package/conanfile.py index d120a992c06a6..8a5bb47f50c4c 100644 --- a/recipes/cpp-httplib/all/test_package/conanfile.py +++ b/recipes/cpp-httplib/all/test_package/conanfile.py @@ -7,6 +7,7 @@ class TestPackageConan(ConanFile): settings = "os", "arch", "compiler", "build_type" generators = "CMakeToolchain", "CMakeDeps", "VirtualRunEnv" + test_type = "explicit" def requirements(self): self.requires(self.tested_reference_str) diff --git a/recipes/cpp-httplib/config.yml b/recipes/cpp-httplib/config.yml index 89c0fa2d0946b..edcd017dbed1b 100644 --- a/recipes/cpp-httplib/config.yml +++ b/recipes/cpp-httplib/config.yml @@ -1,25 +1,19 @@ versions: - "0.15.3": - folder: all - "0.15.2": + "0.18.1": folder: all - "0.15.1": + "0.18.0": folder: all - "0.14.3": + "0.17.3": folder: all - "0.14.2": - folder: all - "0.14.1": + "0.17.1": folder: all - "0.14.0": + "0.16.3": folder: all - "0.13.3": + "0.16.0": folder: all - "0.13.1": - folder: all - "0.12.6": + "0.15.3": folder: all - "0.11.4": + "0.14.3": folder: all - "0.10.9": + "0.14.1": folder: all diff --git a/recipes/cpp-peglib/1.x.x/conandata.yml b/recipes/cpp-peglib/1.x.x/conandata.yml index 7aa81fd5b52ff..8c4317d3da7ef 100644 --- a/recipes/cpp-peglib/1.x.x/conandata.yml +++ b/recipes/cpp-peglib/1.x.x/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.9.0": + url: "https://github.com/yhirose/cpp-peglib/archive/v1.9.0.tar.gz" + sha256: "6f4f0956ea2f44fd1c5882f8adc5782451ba9d227c467d214196390ddedb024c" "1.8.8": url: "https://github.com/yhirose/cpp-peglib/archive/v1.8.8.tar.gz" sha256: "3019d8084a146562fe2fd4c71e3226ac6e3994e8cee21cab27b3cd5a86bcef34" diff --git a/recipes/cpp-peglib/config.yml b/recipes/cpp-peglib/config.yml index 81349971ce40f..a8b6a2fd0565c 100644 --- a/recipes/cpp-peglib/config.yml +++ b/recipes/cpp-peglib/config.yml @@ -1,4 +1,6 @@ versions: + "1.9.0": + folder: "1.x.x" "1.8.8": folder: "1.x.x" "1.8.7": diff --git a/recipes/cpp-sort/all/conandata.yml b/recipes/cpp-sort/all/conandata.yml index 48e5289632674..c155d44a961c8 100644 --- a/recipes/cpp-sort/all/conandata.yml +++ b/recipes/cpp-sort/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.16.0": + url: "https://github.com/Morwenn/cpp-sort/archive/1.16.0.tar.gz" + sha256: "54eb65de5655ce58719d45616f29e4b9060135b9cc8b526bcfc9f5434975ea8c" "1.15.0": url: "https://github.com/Morwenn/cpp-sort/archive/1.15.0.tar.gz" sha256: "886e813a4b87c6361e9b50c0a66c73b3b812f0ce0b7039ff3991eddce77e0dc7" diff --git a/recipes/cpp-sort/config.yml b/recipes/cpp-sort/config.yml index acbaa54fefe9c..ce014d3a22c71 100644 --- a/recipes/cpp-sort/config.yml +++ b/recipes/cpp-sort/config.yml @@ -1,4 +1,6 @@ versions: + "1.16.0": + folder: all "1.15.0": folder: all "1.14.0": diff --git a/recipes/cpp-yyjson/all/conandata.yml b/recipes/cpp-yyjson/all/conandata.yml new file mode 100644 index 0000000000000..acb24326f9a42 --- /dev/null +++ b/recipes/cpp-yyjson/all/conandata.yml @@ -0,0 +1,7 @@ +sources: + "0.6.0": + url: "https://github.com/yosh-matsuda/cpp-yyjson/archive/refs/tags/v0.6.0.tar.gz" + sha256: "e146e5e2de023a83ffafba52320506bd25512e6ae9d13ee7836110f659253914" + "0.5.0": + url: "https://github.com/yosh-matsuda/cpp-yyjson/archive/refs/tags/v0.5.0.tar.gz" + sha256: "c1d44460c9ca3c21d5cfaea882ffaca83565c24984c5d17322e0b74a84ececfc" diff --git a/recipes/cpp-yyjson/all/conanfile.py b/recipes/cpp-yyjson/all/conanfile.py new file mode 100644 index 0000000000000..1e453082ca159 --- /dev/null +++ b/recipes/cpp-yyjson/all/conanfile.py @@ -0,0 +1,79 @@ +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.build import check_min_cppstd +from conan.tools.files import copy, get +from conan.tools.layout import basic_layout +from conan.tools.scm import Version +from conan.tools.microsoft import is_msvc +import os + +required_conan_version = ">=1.52.0" + +class CppYyjsonConan(ConanFile): + name = "cpp-yyjson" + description = "Ultra-fast and intuitive C++ JSON reader/writer with yyjson backend" + license = "MIT" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/yosh-matsuda/cpp-yyjson" + topics = ("json", "reader", "writer", "header-only") + package_type = "header-library" + settings = "os", "arch", "compiler", "build_type" + no_copy_source = True + + @property + def _min_cppstd(self): + return 20 + + @property + def _compilers_minimum_version(self): + return { + "gcc": "11", + "clang": "15", + "apple-clang": "14", + "Visual Studio": "17", + "msvc": "193", + } + + def layout(self): + basic_layout(self, src_folder="src") + + def requirements(self): + if Version(self.version) < "0.6.0": + self.requires("yyjson/0.9.0") + else: + self.requires("yyjson/0.10.0") + self.requires("fmt/10.2.1") + self.requires("nameof/0.10.4") + + def package_id(self): + self.info.clear() + + def validate(self): + if self.settings.compiler.get_safe("cppstd"): + check_min_cppstd(self, self._min_cppstd) + minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) + if minimum_version and Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration( + f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." + ) + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def package(self): + copy(self, "LICENSE", self.source_folder, os.path.join(self.package_folder, "licenses")) + copy( + self, + "*.hpp", + os.path.join(self.source_folder, "include"), + os.path.join(self.package_folder, "include"), + ) + + def package_info(self): + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] + if is_msvc(self): + self.cpp_info.cxxflags.append("/Zc:preprocessor") + + self.cpp_info.set_property("cmake_file_name", "cpp_yyjson") + self.cpp_info.set_property("cmake_target_name", "cpp_yyjson::cpp_yyjson") diff --git a/recipes/cpp-yyjson/all/test_package/CMakeLists.txt b/recipes/cpp-yyjson/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..f2fd7795754c4 --- /dev/null +++ b/recipes/cpp-yyjson/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) + +find_package(cpp_yyjson REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE cpp_yyjson::cpp_yyjson) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_20) diff --git a/recipes/cpp-yyjson/all/test_package/conanfile.py b/recipes/cpp-yyjson/all/test_package/conanfile.py new file mode 100644 index 0000000000000..3a91c9439218e --- /dev/null +++ b/recipes/cpp-yyjson/all/test_package/conanfile.py @@ -0,0 +1,26 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def layout(self): + cmake_layout(self) + + def requirements(self): + self.requires(self.tested_reference_str) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/cpp-yyjson/all/test_package/test_package.cpp b/recipes/cpp-yyjson/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..f4345c086ba90 --- /dev/null +++ b/recipes/cpp-yyjson/all/test_package/test_package.cpp @@ -0,0 +1,52 @@ +#include +#include +#include + +#include "cpp_yyjson.hpp" + +using namespace yyjson; + +auto json_str = R"( +{ + "id": 1, + "pi": 3.141592, + "name": "example", + "array": [0, 1, 2, 3, 4], + "currency": { + "USD": 129.66, + "EUR": 140.35, + "GBP": 158.72 + }, + "success": true +})"; + +int main() { + // Read JSON string and cast as an object class + auto obj = *read(json_str).as_object(); + + // Key access to the JSON object class + auto id = *obj["id"].as_int(); + auto pi = *obj["pi"].as_real(); + auto name = *obj["name"].as_string(); + auto success = *obj["success"].as_bool(); + + // JSON array/object classes adapt the range concept + auto list = *obj["array"].as_array(); + for (const auto& v : list) { + // `write` returns JSON read-only string + std::cout << v.write() << std::endl; + } + + // The range value type of object class is a key-value pair + auto dict = *obj["currency"].as_object(); + for (const auto& [k, v] : dict) { + std::cout << "{" << k << ": " << v.write() << "}" << std::endl; + } + + // JSON array/object to container conversion + auto numbers = cast>(list); + auto currency = cast>(dict); + + // Stringify read-only string + std::cout << obj.write() << std::endl; +} diff --git a/recipes/cpp-yyjson/config.yml b/recipes/cpp-yyjson/config.yml new file mode 100644 index 0000000000000..33d7618432d30 --- /dev/null +++ b/recipes/cpp-yyjson/config.yml @@ -0,0 +1,5 @@ +versions: + "0.6.0": + folder: all + "0.5.0": + folder: all diff --git a/recipes/cppcheck/all/conandata.yml b/recipes/cppcheck/all/conandata.yml index 0e4ce7f0c9324..bcd181448f979 100644 --- a/recipes/cppcheck/all/conandata.yml +++ b/recipes/cppcheck/all/conandata.yml @@ -1,10 +1,16 @@ sources: + "2.16.0": + url: "https://github.com/danmar/cppcheck/archive/2.16.0.tar.gz" + sha256: "f1a97c8cef5ee9d0abb57e9244549d4fe18d4ecac80cf82e250d1fc5f38b1501" + "2.15.0": + url: "https://github.com/danmar/cppcheck/archive/2.15.0.tar.gz" + sha256: "98bcc40ac8062635b492fb096d7815376a176ae26749d6c708083f4637f7c0bb" + "2.14.2": + url: "https://github.com/danmar/cppcheck/archive/2.14.2.tar.gz" + sha256: "9c3acea5f489336bd83a8ea33917a9a04a80c56d874bf270287e7de27acf2d00" "2.13.4": url: "https://github.com/danmar/cppcheck/archive/2.13.4.tar.gz" sha256: "d6ea064ebab76c6aa000795440479767d8d814dd29405918df4c1bbfcd6cb86c" - "2.13.3": - url: "https://github.com/danmar/cppcheck/archive/2.13.3.tar.gz" - sha256: "ac8c526d19496038c09bf4781bd804ab1f7aaadee4c3b699629830d24742dd81" "2.12.1": url: "https://github.com/danmar/cppcheck/archive/2.12.1.tar.gz" sha256: "2a3d4ba1179419612183ab3d6aed6d3b18be75e98cd6f138ea8e2020905dced2" diff --git a/recipes/cppcheck/all/conanfile.py b/recipes/cppcheck/all/conanfile.py index fa5b72926399e..5565cc030be41 100644 --- a/recipes/cppcheck/all/conanfile.py +++ b/recipes/cppcheck/all/conanfile.py @@ -9,26 +9,34 @@ class CppcheckConan(ConanFile): name = "cppcheck" + description = "Cppcheck is an analysis tool for C/C++ code." + license = "GPL-3.0-or-later" url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/danmar/cppcheck" topics = ("code quality", "static analyzer", "linter") - description = "Cppcheck is an analysis tool for C/C++ code." - license = "GPL-3.0-or-later" package_type = "application" settings = "os", "arch", "compiler", "build_type" - options = {"have_rules": [True, False]} - default_options = {"have_rules": True} - - def layout(self): - cmake_layout(self, src_folder="src") + options = { + "have_rules": [True, False], + } + default_options = { + "have_rules": True, + } def export_sources(self): export_conandata_patches(self) + def layout(self): + cmake_layout(self, src_folder="src") + def requirements(self): if self.options.get_safe("have_rules"): self.requires("pcre/8.45") + def package_id(self): + del self.info.settings.compiler + del self.info.settings.build_type + def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) @@ -57,17 +65,13 @@ def package(self): cmake = CMake(self) cmake.install() - def package_id(self): - del self.info.settings.compiler - del self.info.settings.build_type - def package_info(self): self.cpp_info.includedirs = [] self.cpp_info.libdirs = [] bin_folder = os.path.join(self.package_folder, "bin") - self.output.info(f"Append {bin_folder} to environment variable PATH") self.env_info.PATH.append(bin_folder) + cppcheck_htmlreport = os.path.join(bin_folder, "cppcheck-htmlreport") self.env_info.CPPCHECK_HTMLREPORT = cppcheck_htmlreport self.runenv_info.define_path("CPPCHECK_HTMLREPORT", cppcheck_htmlreport) diff --git a/recipes/cppcheck/config.yml b/recipes/cppcheck/config.yml index b1367265202bb..245176dc92cfa 100644 --- a/recipes/cppcheck/config.yml +++ b/recipes/cppcheck/config.yml @@ -1,7 +1,11 @@ versions: - "2.13.4": + "2.16.0": + folder: all + "2.15.0": folder: all - "2.13.3": + "2.14.2": + folder: all + "2.13.4": folder: all "2.12.1": folder: all diff --git a/recipes/cppfront/all/conandata.yml b/recipes/cppfront/all/conandata.yml index 4a9575e4249b6..41ca7a255f0d2 100644 --- a/recipes/cppfront/all/conandata.yml +++ b/recipes/cppfront/all/conandata.yml @@ -1,13 +1,4 @@ sources: - "cci.20231017": - url: "https://github.com/hsutter/cppfront/archive/789cd382ed4c2fb1a9e306e73b6876228d22207d.tar.gz" - sha256: "a004c27bbc732f7a60735cee45aa89f066b79266ccc2c881f4723afee2ad1d8d" - "cci.20230103": - url: "https://github.com/hsutter/cppfront/archive/808db2bd6ae92f869166827dfda66cfa42dde0ab.zip" - sha256: "479252c99d66db477c4cd98a6e1707a8929a70afdf000c75589841d944c539f4" - "cci.20221024": - url: "https://github.com/hsutter/cppfront/archive/b1754dbd53a496a9104b43ecde6064c9980246bd.zip" - sha256: "8668bddbd7fc06d4975c867521c005f898eca8f83f018e7c28b54dbcf9aa3ab9" - "cci.20220924": - url: "https://github.com/hsutter/cppfront/archive/98f6dd46957e100f813245241f183c8aedbcb36f.zip" - sha256: "db51c1ac634d45c6047c7eec5c29993ff215443edadf334370f53d09a11cc5b1" + "0.8.0": + url: "https://github.com/hsutter/cppfront/archive/refs/tags/v0.8.0.tar.gz" + sha256: "7fb573599960bc0a46a71ed103ff97adbf938d4a0df754dc952a44fdcacfc571" diff --git a/recipes/cppfront/all/conanfile.py b/recipes/cppfront/all/conanfile.py index 7f4f580a8ec02..63d0fe03c6f48 100644 --- a/recipes/cppfront/all/conanfile.py +++ b/recipes/cppfront/all/conanfile.py @@ -11,10 +11,11 @@ class CppfrontConan(ConanFile): name = "cppfront" description = "Cppfront is a experimental compiler from a potential C++ 'syntax 2' (Cpp2) to today's 'syntax 1' (Cpp1)" - topics = ("cpp2", "compiler") + license = "CC-BY-NC-ND-4.0" url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/hsutter/cppfront" - license = "CC-BY-NC-ND-4.0" + topics = ("cpp2", "compiler") + package_type = "application" settings = "os", "arch", "compiler", "build_type" @property @@ -25,10 +26,12 @@ def _min_cppstd(self): def _compilers_minimum_version(self): return { "gcc": "11", - "Visual Studio": "16.9", - "msvc": "192.9", + # cppfront requires constexpr source_location + "Visual Studio": "17", + "msvc": "193", "clang": "12", - "apple-clang": "13", + # cppfront requires which is available on apple-clang 14.3 or later.. + "apple-clang": "14.3", } def export_sources(self): diff --git a/recipes/cppfront/all/test_package/conanfile.py b/recipes/cppfront/all/test_package/conanfile.py index 5c77415f9d7dc..c71fdc5de19bd 100644 --- a/recipes/cppfront/all/test_package/conanfile.py +++ b/recipes/cppfront/all/test_package/conanfile.py @@ -6,19 +6,18 @@ class TestPackageConan(ConanFile): settings = "os", "arch", "compiler", "build_type" - generators = "VirtualBuildEnv" - test_type = "explicit" + generators = "VirtualRunEnv" def layout(self): basic_layout(self) - def build_requirements(self): - self.tool_requires(self.tested_reference_str) + def requirements(self): + self.requires(self.tested_reference_str) def build(self): copy(self, "pure2-hello.cpp2", src=self.recipe_folder, dst=self.build_folder) - self.run("cppfront {}".format(os.path.join(self.build_folder, "pure2-hello.cpp2"))) + self.run("cppfront {}".format(os.path.join(self.build_folder, "pure2-hello.cpp2")), env="conanrun") def test(self): - self.run("cppfront -h") + self.run("cppfront -h", env="conanrun") assert os.path.isfile(os.path.join(self.build_folder, "pure2-hello.cpp")) diff --git a/recipes/cppfront/config.yml b/recipes/cppfront/config.yml index 5474e123fd52d..675f954f2770e 100644 --- a/recipes/cppfront/config.yml +++ b/recipes/cppfront/config.yml @@ -1,9 +1,3 @@ versions: - "cci.20231017": - folder: all - "cci.20230103": - folder: all - "cci.20221024": - folder: all - "cci.20220924": + "0.8.0": folder: all diff --git a/recipes/cpprestsdk/all/conanfile.py b/recipes/cpprestsdk/all/conanfile.py index c75c41fcad7c4..c8ac42529d53c 100644 --- a/recipes/cpprestsdk/all/conanfile.py +++ b/recipes/cpprestsdk/all/conanfile.py @@ -112,7 +112,13 @@ def package_info(self): # cpprestsdk_boost_internal self.cpp_info.components["cpprestsdk_boost_internal"].set_property("cmake_target_name", "cpprestsdk::cpprestsdk_boost_internal") self.cpp_info.components["cpprestsdk_boost_internal"].includedirs = [] - self.cpp_info.components["cpprestsdk_boost_internal"].requires = ["boost::boost"] + ## List of Boost components cpprestsdk depends on: + ## see https://github.com/microsoft/cpprestsdk/blob/v2.10.19/Release/cmake/cpprest_find_boost.cmake#L77-L106 + self.cpp_info.components["cpprestsdk_boost_internal"].requires = ["boost::headers", "boost::system"] + if self.settings.os != "Windows": + self.cpp_info.components["cpprestsdk_boost_internal"].requires.extend(["boost::random", "boost::thread", "boost::filesystem", "boost::chrono", "boost::atomic"]) + if self.settings.os != "Android": + self.cpp_info.components["cpprestsdk_boost_internal"].requires.extend(["boost::date_time", "boost::regex"]) # cpprestsdk_openssl_internal self.cpp_info.components["cpprestsdk_openssl_internal"].set_property("cmake_target_name", "cpprestsdk::cpprestsdk_openssl_internal") self.cpp_info.components["cpprestsdk_openssl_internal"].includedirs = [] diff --git a/recipes/cpptrace/all/conandata.yml b/recipes/cpptrace/all/conandata.yml index 82140c1347a01..474a036c68f43 100644 --- a/recipes/cpptrace/all/conandata.yml +++ b/recipes/cpptrace/all/conandata.yml @@ -1,57 +1,35 @@ sources: - # Newer versions at the top - "0.5.2": - url: - - "https://github.com/jeremy-rifkin/cpptrace/archive/refs/tags/v0.5.2.tar.gz" - sha256: "d148998e175b9c69ffb4383ab321a0d27487392e4eee3f39441d35b6856c8f78" - "0.5.1": - url: - - "https://github.com/jeremy-rifkin/cpptrace/archive/refs/tags/v0.5.1.tar.gz" - sha256: "27b9f862ec6185f570ee59c07fdd12bebb55a986191518e896621317d2654f26" - "0.5.0": - url: - - "https://github.com/jeremy-rifkin/cpptrace/archive/refs/tags/v0.5.0.tar.gz" - sha256: "dc034503aed3009618312c42c40e1f80bf14d4148c9bc8b3ea02cf971459120e" - "0.4.1": - url: - - "https://github.com/jeremy-rifkin/cpptrace/archive/refs/tags/v0.4.1.tar.gz" - sha256: "8b6e2c813cf2db332c1aa0502c38afd01a1e00ece0ecc7fcd82fcae4b34e5161" - "0.4.0": - url: - - "https://github.com/jeremy-rifkin/cpptrace/archive/refs/tags/v0.4.0.tar.gz" - sha256: "eef368f5bed2d85c976ea90b325e4c9bfc1b9618cbbfa15bf088adc8fa98ff89" + "0.7.2": + url: "https://github.com/jeremy-rifkin/cpptrace/archive/refs/tags/v0.7.2.tar.gz" + sha256: "62835abfd91a840e4d212c850695b576523fe6f9036bc5c3e52183b6eb9905c5" + "0.7.1": + url: "https://github.com/jeremy-rifkin/cpptrace/archive/refs/tags/v0.7.1.tar.gz" + sha256: "63df54339feb0c68542232229777df057e1848fc8294528613971bbf42889e83" + "0.7.0": + url: "https://github.com/jeremy-rifkin/cpptrace/archive/refs/tags/v0.7.0.tar.gz" + sha256: "b5c1fbd162f32b8995d9b1fefb1b57fac8b1a0e790f897b81cdafe3625d12001" + "0.6.3": + url: "https://github.com/jeremy-rifkin/cpptrace/archive/refs/tags/v0.6.3.tar.gz" + sha256: "665bf76645ec7b9e6d785a934616f0138862c36cdb58b0d1c9dd18dd4c57395a" + "0.6.2": + url: "https://github.com/jeremy-rifkin/cpptrace/archive/refs/tags/v0.6.2.tar.gz" + sha256: "02a0540b5b1be0788565f48b065b456d3eab81ae2323a50e75ed36449a0143ed" + "0.6.1": + url: "https://github.com/jeremy-rifkin/cpptrace/archive/refs/tags/v0.6.1.tar.gz" + sha256: "4bb478eedbe4b2c0093ef7af4f64795304850e03312e658076b25ef8d6019c75" + # 0.6.0 is required by libassert v2 + "0.6.0": + url: "https://github.com/jeremy-rifkin/cpptrace/archive/refs/tags/v0.6.0.tar.gz" + sha256: "7c2996f03d15f61016bc81fe7fa5220b1cc42498333c5c0e699ad2f96b918b96" + # 0.3.1 is required by libassert v1 "0.3.1": - url: - - "https://github.com/jeremy-rifkin/cpptrace/archive/refs/tags/v0.3.1.tar.gz" + url: "https://github.com/jeremy-rifkin/cpptrace/archive/refs/tags/v0.3.1.tar.gz" sha256: "3c4c5b3406c2b598e5cd2a8cb97f9e8e1f54d6df087a0e62564e6fb68fed852d" - "0.3.0": - url: - - "https://github.com/jeremy-rifkin/cpptrace/archive/refs/tags/v0.3.0.tar.gz" - sha256: "1650d760ff0c0f9763de7e1e04285033f2b0189df87398ba8bf76e9937d5a4ee" + # 0.2.1 is required by libassert v1 "0.2.1": - url: - - "https://github.com/jeremy-rifkin/cpptrace/archive/refs/tags/v0.2.1.tar.gz" + url: "https://github.com/jeremy-rifkin/cpptrace/archive/refs/tags/v0.2.1.tar.gz" sha256: "3184f404c61b6b8ba6fe7c64fc40d1c3d6d87df59bcacf1845d846101bc22f9a" patches: - "0.5.2": - - patch_file: "patches/0.5.2/0001-msvc-bug.patch" - patch_type: "official" - patch_source: "https://github.com/jeremy-rifkin/cpptrace/commit/599d6abd6cc74e80e8429fc309247be5f7edd5d7" - patch_description: "Workaround bug for old msvc" - "0.4.0": - - patch_file: "patches/0.4.0/0001-libdwarf_path.patch" - patch_type: "conan" - patch_source: "https://github.com/jeremy-rifkin/cpptrace/commit/a1624238000c794243e20801dc2b35b2f847d492" - patch_description: "Use new libdwarf header placement" - - patch_file: "patches/0.4.0/0002-zstd.patch" - patch_type: "conan" - patch_source: "https://github.com/jeremy-rifkin/cpptrace/commit/b7d14bc952111df973268c76133bb8ad99afdeb0" - patch_description: "Zstd is handled by libdwarf" - "0.3.0": - - patch_file: "patches/0.3.0/0001-cpptrace_export.patch" - patch_type: "bugfix" - patch_source: "https://github.com/jeremy-rifkin/cpptrace/commit/b3b9d5fda6c7f53b069848e7e79454f3618ca356" - patch_description: "Fix an incorrect CPPTRACE_EXPORT annotation" "0.2.1": - patch_file: "patches/0.2.1/0001-to_uintptr.patch" patch_type: "bugfix" diff --git a/recipes/cpptrace/all/conanfile.py b/recipes/cpptrace/all/conanfile.py index f0aee2a68a632..8b802e49b1649 100644 --- a/recipes/cpptrace/all/conanfile.py +++ b/recipes/cpptrace/all/conanfile.py @@ -1,6 +1,6 @@ from conan import ConanFile from conan.tools.microsoft import check_min_vs, is_msvc_static_runtime, is_msvc -from conan.tools.files import get, copy, rm, rmdir +from conan.tools.files import get, copy, rmdir from conan.tools.build import check_min_cppstd from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout from conan.tools.files import apply_conandata_patches, export_conandata_patches @@ -21,10 +21,12 @@ class CpptraceConan(ConanFile): options = { "shared": [True, False], "fPIC": [True, False], + "unwind": ["default", "libunwind"], } default_options = { "shared": False, "fPIC": True, + "unwind": "default", } @property @@ -43,10 +45,12 @@ def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - if Version(self.version) >= Version("0.4.0"): + if Version(self.version) >= "0.4.0": self.requires("libdwarf/0.9.1") else: self.requires("libdwarf/0.8.0") + if self.options.unwind == "libunwind": + self.requires("libunwind/1.8.0", transitive_libs=True) def validate(self): if self.settings.compiler.cppstd: @@ -63,13 +67,16 @@ def generate(self): tc = CMakeToolchain(self) if is_msvc(self): tc.variables["USE_MSVC_RUNTIME_LIBRARY_DLL"] = not is_msvc_static_runtime(self) - if Version(self.version) >= Version("0.3.0"): + if Version(self.version) >= "0.3.0": tc.variables["CPPTRACE_USE_EXTERNAL_LIBDWARF"] = True tc.variables["CPPTRACE_CONAN"] = True else: if not self.options.shared: tc.variables["CPPTRACE_STATIC"] = True tc.variables["CPPTRACE_USE_SYSTEM_LIBDWARF"] = True + if self.options.unwind == "libunwind": + tc.variables["CPPTRACE_UNWIND_WITH_LIBUNWIND"] = True + tc.cache_variables["CPPTRACE_POSITION_INDEPENDENT_CODE"] = self.options.get_safe("fPIC", True) tc.generate() tc = CMakeDeps(self) tc.generate() @@ -88,12 +95,7 @@ def package(self): if self.settings.os == "Windows" and self.options.shared: copy(self, "*.dll", src=self.build_folder, dst=os.path.join(self.package_folder, "bin"), keep_path=False) - rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) - rmdir(self, os.path.join(self.package_folder, "share")) - rm(self, "*.la", os.path.join(self.package_folder, "lib")) - rm(self, "*.pdb", os.path.join(self.package_folder, "lib")) - rm(self, "*.pdb", os.path.join(self.package_folder, "bin")) def package_info(self): self.cpp_info.libs = ["cpptrace"] diff --git a/recipes/cpptrace/all/patches/0.3.0/0001-cpptrace_export.patch b/recipes/cpptrace/all/patches/0.3.0/0001-cpptrace_export.patch deleted file mode 100644 index d75b21cd35c7f..0000000000000 --- a/recipes/cpptrace/all/patches/0.3.0/0001-cpptrace_export.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/include/cpptrace/cpptrace.hpp b/include/cpptrace/cpptrace.hpp -index b35bed1..27b626b 100644 ---- a/include/cpptrace/cpptrace.hpp -+++ b/include/cpptrace/cpptrace.hpp -@@ -90,7 +90,7 @@ namespace cpptrace { - // This is used over std::optional because the library is C++11 and also std::optional is a bit heavy-duty for this - // use. - template::value, int>::type = 0> -- struct CPPTRACE_EXPORT nullable { -+ struct nullable { - T raw_value; - nullable& operator=(T value) { - raw_value = value; diff --git a/recipes/cpptrace/all/patches/0.4.0/0001-libdwarf_path.patch b/recipes/cpptrace/all/patches/0.4.0/0001-libdwarf_path.patch deleted file mode 100644 index 4561234caabeb..0000000000000 --- a/recipes/cpptrace/all/patches/0.4.0/0001-libdwarf_path.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index e077cf8..2f848dd 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -404,7 +404,6 @@ if(CPPTRACE_GET_SYMBOLS_WITH_LIBDWARF) - endif() - if(CPPTRACE_CONAN) - target_link_libraries(${target_name} PRIVATE libdwarf::libdwarf) -- target_compile_definitions(${target_name} PRIVATE CPPTRACE_USE_NESTED_LIBDWARF_HEADER_PATH) - elseif(CPPTRACE_VCPKG) - target_link_libraries(${target_name} PRIVATE libdwarf::dwarf) - elseif(CPPTRACE_USE_EXTERNAL_LIBDWARF) diff --git a/recipes/cpptrace/all/patches/0.4.0/0002-zstd.patch b/recipes/cpptrace/all/patches/0.4.0/0002-zstd.patch deleted file mode 100644 index 97ccd388d4128..0000000000000 --- a/recipes/cpptrace/all/patches/0.4.0/0002-zstd.patch +++ /dev/null @@ -1,72 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 2f848dd..8f3ec74 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -338,40 +338,39 @@ endif() - - if(CPPTRACE_GET_SYMBOLS_WITH_LIBDWARF) - target_compile_definitions(${target_name} PUBLIC CPPTRACE_GET_SYMBOLS_WITH_LIBDWARF) -- # First, dependencies: Zstd and zlib (currently relying on system zlib) -- if(CPPTRACE_USE_EXTERNAL_ZSTD) -- find_package(zstd) -- else() -- include(FetchContent) -- cmake_policy(SET CMP0074 NEW) -- FetchContent_Declare( -- zstd -- GIT_REPOSITORY https://github.com/facebook/zstd.git -- GIT_TAG 63779c798237346c2b245c546c40b72a5a5913fe # v1.5.5 -- GIT_SHALLOW 1 -- SOURCE_SUBDIR build/cmake -- ) -- # FetchContent_MakeAvailable(zstd) -- FetchContent_GetProperties(zstd) -- if(NOT zstd_POPULATED) -- FetchContent_Populate(zstd) -- set(ZSTD_BUILD_PROGRAMS OFF) -- set(ZSTD_BUILD_CONTRIB OFF) -- set(ZSTD_BUILD_TESTS OFF) -- set(ZSTD_BUILD_STATIC ON) -- set(ZSTD_BUILD_SHARED OFF) -- set(ZSTD_LEGACY_SUPPORT OFF) -- add_subdirectory("${zstd_SOURCE_DIR}/build/cmake" "${zstd_BINARY_DIR}") -- endif() -- endif() -- # Libdwarf itself - if(CPPTRACE_USE_EXTERNAL_LIBDWARF) - find_package(libdwarf REQUIRED) - else() -+ include(FetchContent) -+ # First, dependencies: Zstd and zlib (currently relying on system zlib) -+ if(CPPTRACE_USE_EXTERNAL_ZSTD) -+ find_package(zstd) -+ else() -+ cmake_policy(SET CMP0074 NEW) -+ FetchContent_Declare( -+ zstd -+ GIT_REPOSITORY https://github.com/facebook/zstd.git -+ GIT_TAG 63779c798237346c2b245c546c40b72a5a5913fe # v1.5.5 -+ GIT_SHALLOW 1 -+ SOURCE_SUBDIR build/cmake -+ ) -+ # FetchContent_MakeAvailable(zstd) -+ FetchContent_GetProperties(zstd) -+ if(NOT zstd_POPULATED) -+ FetchContent_Populate(zstd) -+ set(ZSTD_BUILD_PROGRAMS OFF) -+ set(ZSTD_BUILD_CONTRIB OFF) -+ set(ZSTD_BUILD_TESTS OFF) -+ set(ZSTD_BUILD_STATIC ON) -+ set(ZSTD_BUILD_SHARED OFF) -+ set(ZSTD_LEGACY_SUPPORT OFF) -+ add_subdirectory("${zstd_SOURCE_DIR}/build/cmake" "${zstd_BINARY_DIR}") -+ endif() -+ endif() -+ # Libdwarf itself - set(CMAKE_POLICY_DEFAULT_CMP0077 NEW) - # set(PIC_ALWAYS TRUE) - # set(BUILD_DWARFDUMP FALSE) -- include(FetchContent) - FetchContent_Declare( - libdwarf - # GIT_REPOSITORY https://github.com/davea42/libdwarf-code.git diff --git a/recipes/cpptrace/all/patches/0.5.2/0001-msvc-bug.patch b/recipes/cpptrace/all/patches/0.5.2/0001-msvc-bug.patch deleted file mode 100644 index b9a184ee0d627..0000000000000 --- a/recipes/cpptrace/all/patches/0.5.2/0001-msvc-bug.patch +++ /dev/null @@ -1,36 +0,0 @@ -diff --git a/src/utils/microfmt.hpp b/src/utils/microfmt.hpp -index ba47db7..0f750c3 100644 ---- a/src/utils/microfmt.hpp -+++ b/src/utils/microfmt.hpp -@@ -302,20 +302,27 @@ namespace microfmt { - } - } - -- template - #if defined(__cpp_lib_string_view) && __cpp_lib_string_view >= 201606L -+ template - std::string format(std::string_view fmt, Args&&... args) { -- #else -- std::string format(const std::string& fmt, Args&&... args) { -- #endif - return detail::format(fmt.begin(), fmt.end(), {detail::format_value(args)...}); - } - -+ inline std::string format(std::string_view fmt) { -+ return std::string(fmt); -+ } -+ #endif -+ - template - std::string format(const char* fmt, Args&&... args) { - return detail::format(fmt, fmt + std::strlen(fmt), {detail::format_value(args)...}); - } - -+ // working around an old msvc bug https://godbolt.org/z/88T8hrzzq mre: https://godbolt.org/z/drd8echbP -+ inline std::string format(const char* fmt) { -+ return std::string(fmt); -+ } -+ - template - void print(const S& fmt, Args&&... args) { - std::cout<= "1.11.0" and \ + ((self.settings.compiler == "gcc" and Version(self.settings.compiler.version) < "9") or \ + (self.settings.compiler == "clang" and self.settings.compiler.get_safe("libcxx") in ["libstdc++", "libstdc++11"])): + self.cpp_info.system_libs = ["stdc++fs"] diff --git a/recipes/cpr/all/patches/008-1.11.0-remove-warning-flags.patch b/recipes/cpr/all/patches/008-1.11.0-remove-warning-flags.patch new file mode 100644 index 0000000000000..4a2124c047e5a --- /dev/null +++ b/recipes/cpr/all/patches/008-1.11.0-remove-warning-flags.patch @@ -0,0 +1,27 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 70d3296..eb020b4 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -379,14 +379,14 @@ if(CPR_BUILD_TESTS) + restore_variable(DESTINATION CMAKE_CXX_CLANG_TIDY BACKUP CMAKE_CXX_CLANG_TIDY_BKP) + endif() + +-if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC") +-else() +- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wpedantic -Werror") +- if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang") +- # Disable C++98 compatibility support in clang: https://github.com/libcpr/cpr/issues/927 +- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-c++98-compat -Wno-c++98-compat-pedantic -Wno-nonportable-system-include-path -Wno-exit-time-destructors -Wno-undef -Wno-global-constructors -Wno-switch-enum -Wno-old-style-cast -Wno-covered-switch-default -Wno-undefined-func-template") +- endif() +-endif() ++# if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC") ++# else() ++# set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wpedantic -Werror") ++# if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang") ++# # Disable C++98 compatibility support in clang: https://github.com/libcpr/cpr/issues/927 ++# set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-c++98-compat -Wno-c++98-compat-pedantic -Wno-nonportable-system-include-path -Wno-exit-time-destructors -Wno-undef -Wno-global-constructors -Wno-switch-enum -Wno-old-style-cast -Wno-covered-switch-default -Wno-undefined-func-template") ++# endif() ++# endif() + + add_subdirectory(cpr) + add_subdirectory(include) diff --git a/recipes/cpr/config.yml b/recipes/cpr/config.yml index 48b580f3173d9..62dcfd2786e34 100644 --- a/recipes/cpr/config.yml +++ b/recipes/cpr/config.yml @@ -1,4 +1,6 @@ versions: + "1.11.0": + folder: all "1.10.5": folder: all "1.10.4": diff --git a/recipes/cpuinfo/all/conanfile.py b/recipes/cpuinfo/all/conanfile.py index 24edf5382c77c..58abd3608a84f 100644 --- a/recipes/cpuinfo/all/conanfile.py +++ b/recipes/cpuinfo/all/conanfile.py @@ -108,3 +108,6 @@ def package_info(self): self.cpp_info.components["cpuinfo"].requires = ["clog"] if self.settings.os in ["Linux", "FreeBSD"]: self.cpp_info.components["cpuinfo"].system_libs.append("pthread") + + if self.settings.os == "Android": + self.cpp_info.components["cpuinfo"].system_libs.append("log") diff --git a/recipes/cpython/all/conandata.yml b/recipes/cpython/all/conandata.yml index 97a5105587069..3959aff0dc825 100644 --- a/recipes/cpython/all/conandata.yml +++ b/recipes/cpython/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "3.12.7": + url: "https://www.python.org/ftp/python/3.12.7/Python-3.12.7.tgz" + sha256: "73ac8fe780227bf371add8373c3079f42a0dc62deff8d612cd15a618082ab623" "3.12.2": url: "https://www.python.org/ftp/python/3.12.2/Python-3.12.2.tgz" sha256: "a7c4f6a9dc423d8c328003254ab0c9338b83037bd787d680826a5bf84308116e" @@ -15,6 +18,19 @@ sources: url: "https://www.python.org/ftp/python/3.8.19/Python-3.8.19.tgz" sha256: "c7fa55a36e5c7a19ec37d8f90f60a2197548908c9ac8b31e7c0dbffdd470eeac" patches: + "3.12.7": + - patch_file: "patches/3.9/3.9.7-0002-_msi-vcxproj.patch" + patch_description: "Fix ARM/ARM64 mismatch in project file" + patch_type: "bugfix" + - patch_file: "patches/3.12/3.12.1-0001-_ctypes-ffi.patch" + patch_description: "Support shared libffi" + patch_type: "portability" + - patch_file: "patches/3.x-0001-relocatable-python-config.patch" + patch_description: "Allow package to be relocatable" + patch_type: "conan" + - patch_file: "patches/3.12/3.12.1-0002-remove-module-deps.patch" + patch_description: "Remove section of solution file forcing projects to be built that might not be used for this recipe" + patch_type: "conan" "3.12.2": - patch_file: "patches/3.9/3.9.7-0002-_msi-vcxproj.patch" patch_description: "Fix ARM/ARM64 mismatch in project file" @@ -28,7 +44,7 @@ patches: - patch_file: "patches/3.12/3.12.1-0002-remove-module-deps.patch" patch_description: "Remove section of solution file forcing projects to be built that might not be used for this recipe" patch_type: "conan" - "3.11.8": + "3.11.9": - patch_file: "patches/3.9/3.9.7-0002-_msi-vcxproj.patch" patch_description: "Fix ARM/ARM64 mismatch in project file" patch_type: "bugfix" diff --git a/recipes/cpython/all/conanfile.py b/recipes/cpython/all/conanfile.py index ee7d7fdc621f9..c98c3381c1c65 100644 --- a/recipes/cpython/all/conanfile.py +++ b/recipes/cpython/all/conanfile.py @@ -110,7 +110,7 @@ def requirements(self): self.requires("zlib/[>=1.2.11 <2]") if self._supports_modules: self.requires("openssl/[>=1.1 <4]") - self.requires("expat/2.6.0") + self.requires("expat/[>=2.6.2 <3]") self.requires("libffi/3.4.4") if Version(self.version) < "3.10" or is_apple_os(self): # FIXME: mpdecimal > 2.5.0 on MacOS causes the _decimal module to not be importable @@ -134,7 +134,7 @@ def requirements(self): # TODO: Add nis when available. raise ConanInvalidConfiguration("nis is not available on CCI (yet)") if self.options.get_safe("with_sqlite3"): - self.requires("sqlite3/3.45.0") + self.requires("sqlite3/3.45.2") if self.options.get_safe("with_tkinter"): self.requires("tk/8.6.10") if self.options.get_safe("with_curses", False): @@ -648,6 +648,72 @@ def _msvc_package_copy(self): lib_dir_path = os.path.join(self.package_folder, self._msvc_install_subprefix, "Lib").replace("\\", "/") self.run(f"{interpreter_path} -c \"import compileall; compileall.compile_dir('{lib_dir_path}')\"") + @property + def _exact_lib_name(self): + prefix = "" if self.settings.os == "Windows" else "lib" + if self.settings.os == "Windows": + extension = "lib" + elif not self.options.shared: + extension = "a" + elif is_apple_os(self): + extension = "dylib" + else: + extension = "so" + return f"{prefix}{self._lib_name}.{extension}" + + @property + def _cmake_module_path(self): + if is_msvc(self): + # On Windows, `lib` is for Python modules, `libs` is for compiled objects. + # Usually CMake modules are packaged with the latter. + return os.path.join(self._msvc_install_subprefix, "libs", "cmake") + else: + return os.path.join("lib", "cmake") + + def _write_cmake_findpython_wrapper_file(self): + template = textwrap.dedent(""" + if (DEFINED Python3_VERSION_STRING) + set(_CONAN_PYTHON_SUFFIX "3") + else() + set(_CONAN_PYTHON_SUFFIX "") + endif() + set(Python${_CONAN_PYTHON_SUFFIX}_EXECUTABLE @PYTHON_EXECUTABLE@) + set(Python${_CONAN_PYTHON_SUFFIX}_LIBRARY @PYTHON_LIBRARY@) + + # Fails if these are set beforehand + unset(Python${_CONAN_PYTHON_SUFFIX}_INCLUDE_DIRS) + unset(Python${_CONAN_PYTHON_SUFFIX}_INCLUDE_DIR) + + include(${CMAKE_ROOT}/Modules/FindPython${_CONAN_PYTHON_SUFFIX}.cmake) + + # Sanity check: The former comes from FindPython(3), the latter comes from the injected find module + if(NOT Python${_CONAN_PYTHON_SUFFIX}_VERSION STREQUAL Python${_CONAN_PYTHON_SUFFIX}_VERSION_STRING) + message(FATAL_ERROR "CMake detected wrong cpython version - this is likely a bug with the cpython Conan package") + endif() + + if (TARGET Python${_CONAN_PYTHON_SUFFIX}::Module) + set_target_properties(Python${_CONAN_PYTHON_SUFFIX}::Module PROPERTIES INTERFACE_LINK_LIBRARIES cpython::python) + endif() + if (TARGET Python${_CONAN_PYTHON_SUFFIX}::SABIModule) + set_target_properties(Python${_CONAN_PYTHON_SUFFIX}::SABIModule PROPERTIES INTERFACE_LINK_LIBRARIES cpython::python) + endif() + if (TARGET Python${_CONAN_PYTHON_SUFFIX}::Python) + set_target_properties(Python${_CONAN_PYTHON_SUFFIX}::Python PROPERTIES INTERFACE_LINK_LIBRARIES cpython::embed) + endif() + """) + + # In order for the package to be relocatable, these variables must be relative to the installed CMake file + if is_msvc(self): + python_exe = "${CMAKE_CURRENT_LIST_DIR}/../../" + self._cpython_interpreter_name + python_library = "${CMAKE_CURRENT_LIST_DIR}/../" + self._exact_lib_name + else: + python_exe = "${CMAKE_CURRENT_LIST_DIR}/../../bin/" + self._cpython_interpreter_name + python_library = "${CMAKE_CURRENT_LIST_DIR}/../" + self._exact_lib_name + + cmake_file = os.path.join(self.package_folder, self._cmake_module_path, "use_conan_python.cmake") + content = template.replace("@PYTHON_EXECUTABLE@", python_exe).replace("@PYTHON_LIBRARY@", python_library) + save(self, cmake_file, content) + def package(self): copy(self, "LICENSE", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) if is_msvc(self): @@ -695,6 +761,8 @@ def package(self): os.symlink(f"python{self._version_suffix}", self._cpython_symlink) fix_apple_shared_install_name(self) + self._write_cmake_findpython_wrapper_file() + @property def _cpython_symlink(self): symlink = os.path.join(self.package_folder, "bin", "python") @@ -733,16 +801,10 @@ def _lib_name(self): else: lib_ext = "" else: - lib_ext = self._abi_suffix + ( - ".dll.a" if self.options.shared and self.settings.os == "Windows" else "" - ) + lib_ext = self._abi_suffix return f"python{self._version_suffix}{lib_ext}" def package_info(self): - # FIXME: conan components Python::Interpreter component, need a target type - # self.cpp_info.names["cmake_find_package"] = "Python" - # self.cpp_info.names["cmake_find_package_multi"] = "Python" - py_version = Version(self.version) # python component: "Build a C extension for Python" if is_msvc(self): @@ -786,6 +848,13 @@ def package_info(self): ) self.cpp_info.components["embed"].requires = ["python"] + # Transparent integration with CMake's FindPython(3) + self.cpp_info.set_property("cmake_file_name", "Python3") + self.cpp_info.set_property("cmake_module_file_name", "Python") + self.cpp_info.set_property("cmake_find_mode", "both") + self.cpp_info.set_property("cmake_build_modules", [os.path.join(self._cmake_module_path, "use_conan_python.cmake")]) + self.cpp_info.builddirs = [self._cmake_module_path] + if self._supports_modules: # hidden components: the C extensions of python are built as dynamically loaded shared libraries. # C extensions or applications with an embedded Python should not need to link to them.. diff --git a/recipes/cpython/all/test_package/CMakeLists.txt b/recipes/cpython/all/test_package/CMakeLists.txt index 0d333d99af1e3..68886bdf4d074 100644 --- a/recipes/cpython/all/test_package/CMakeLists.txt +++ b/recipes/cpython/all/test_package/CMakeLists.txt @@ -1,95 +1,21 @@ cmake_minimum_required(VERSION 3.15) project(test_package C) -find_package(cpython REQUIRED CONFIG) +find_package(Python3 REQUIRED COMPONENTS Interpreter Development.Module Development.Embed) -# FIXME: We can't modify CMake's FindPython to link dependencies pulled by -# Conan, so here we just include them globally. This is mainly necessary for -# MacOS missing crypt.h, which is available at configure time (in the main recipe) -# but otherwise not at build time (in consumer packages). -link_libraries(cpython::python) - -set(PY_VERSION_MAJOR_MINOR "" CACHE STRING "MAJOR.MINOR version of python") -set(PY_VERSION "" CACHE STRING "Required version of python") -set(PY_VERSION_SUFFIX "" CACHE STRING "Suffix of python") - -set(Python_ADDITIONAL_VERSIONS ${PY_VERSION}${PY_VERSION_SUFFIX} ${PY_VERSION_MAJOR_MINOR}${PY_VERSION_SUFFIX} 3${PY_VERSION_SUFFIX} ${PY_VERSION} ${PY_VERSION_MAJOR_MINOR} 3) -message("Using Python_ADDITIONAL_VERSIONS: ${Python_ADDITIONAL_VERSIONS}") - -find_package(PythonInterp REQUIRED) -find_package(PythonLibs REQUIRED) - -string(FIND "${PYTHON_EXECUTABLE}" "${CONAN_CPYTHON_ROOT}" ROOT_SUBPOS) -if(ROOT_SUBPOS EQUAL -1) - message(FATAL_ERROR "found wrong python interpreter: ${PYTHON_EXECUTABLE}") -endif() - -message(STATUS "FindPythonInterp:") -message(STATUS "PYTHON_VERSION_STRING: ${PYTHON_VERSION_STRING}") -message(STATUS "PYTHON_VERSION_MINOR: ${PYTHON_VERSION_MINOR}") -message(STATUS "PYTHON_VERSION_PATCH: ${PYTHON_VERSION_PATCH}") -message(STATUS "=============================================") -message(STATUS "FindPythonLibs:") -message(STATUS "PYTHON_LIBRARIES: ${PYTHON_LIBRARIES}") -message(STATUS "PYTHON_INCLUDE_PATH: ${PYTHON_INCLUDE_PATH} (deprecated)") -message(STATUS "PYTHON_INCLUDE_DIRS: ${PYTHON_INCLUDE_DIRS}") -message(STATUS "PYTHON_DEBUG_LIBRARIES: ${PYTHON_DEBUG_LIBRARIES} (deprecated)") -message(STATUS "PYTHONLIBS_VERSION_STRING: ${PYTHONLIBS_VERSION_STRING}") - -if(NOT PYTHON_VERSION_STRING AND NOT PYTHONLIBS_VERSION_STRING) - message(FATAL_ERROR "Version of python interpreter and libraries not found") -endif() - -if(PYTHON_VERSION_STRING) - if(NOT PYTHON_VERSION_STRING VERSION_EQUAL "${PY_VERSION}") - message("PYTHON_VERSION_STRING does not match PY_VERSION") - message(FATAL_ERROR "CMake detected wrong cpython version") - endif() -endif() - -if(PYTHONLIBS_VERSION_STRING) - if(NOT PYTHONLIBS_VERSION_STRING STREQUAL "${PY_VERSION}") - message("PYTHONLIBS_VERSION_STRING does not match PY_VERSION") - message(FATAL_ERROR "CMake detected wrong cpython version") - endif() -endif() +message("Python3_EXECUTABLE: ${Python3_EXECUTABLE}") +message("Python3_INTERPRETER_ID: ${Python3_INTERPRETER_ID}") +message("Python3_VERSION: ${Python3_VERSION}") +message("Python3_INCLUDE_DIRS: ${Python3_INCLUDE_DIRS}") +message("Python3_LIBRARIES: ${Python3_LIBRARIES}") option(BUILD_MODULE "Build python module") - if(BUILD_MODULE) - add_library(spam MODULE "test_module.c") - target_include_directories(spam - PRIVATE - ${PYTHON_INCLUDE_DIRS} - ) - target_link_libraries(spam PRIVATE - ${PYTHON_LIBRARIES} - ) - set_property(TARGET spam PROPERTY PREFIX "") + python3_add_library(spam "test_module.c") if(MSVC) - set_target_properties(spam PROPERTIES - DEBUG_POSTFIX "_d" - SUFFIX ".pyd" - ) - endif() - - option(USE_FINDPYTHON_X "Use new-style FindPythonX module") - if(USE_FINDPYTHON_X AND NOT CMAKE_VERSION VERSION_LESS "3.16") - # Require CMake 3.16 because this version introduces Python3_FIND_ABI - find_package(Python3 REQUIRED COMPONENTS Interpreter Development) - message("Python3_EXECUTABLE: ${Python3_EXECUTABLE}") - message("Python3_INTERPRETER_ID: ${Python3_INTERPRETER_ID}") - message("Python3_VERSION: ${Python3_VERSION}") - message("Python3_INCLUDE_DIRS: ${Python3_INCLUDE_DIRS}") - message("Python3_LIBRARIES: ${Python3_LIBRARIES}") - if(NOT Python3_VERSION STREQUAL "${PY_VERSION}") - message("Python_ADDITIONAL_VERSIONS does not match PY_VERSION") - message(FATAL_ERROR "CMake detected wrong cpython version") - endif() - - python3_add_library(spam2 "test_module.c") + set_target_properties(spam PROPERTIES DEBUG_POSTFIX "_d") endif() endif() add_executable(${PROJECT_NAME} "test_package.c") -target_link_libraries(${PROJECT_NAME} PRIVATE cpython::embed) +target_link_libraries(${PROJECT_NAME} PRIVATE Python3::Python) diff --git a/recipes/cpython/all/test_package/conanfile.py b/recipes/cpython/all/test_package/conanfile.py index 14cdda464a3d6..6f20bfa199e7a 100644 --- a/recipes/cpython/all/test_package/conanfile.py +++ b/recipes/cpython/all/test_package/conanfile.py @@ -25,7 +25,7 @@ def build_requirements(self): # The interesting problem that arises here is if you have CMake installed # with your global pip, then it will fail to run in this test package. # To avoid that, just add a requirement on CMake. - self.tool_requires("cmake/[>=3.15 <4]") + self.tool_requires("cmake/[>=3.16 <4]") def layout(self): cmake_layout(self) @@ -59,30 +59,13 @@ def _test_setuptools(self): # https://github.com/python/cpython/pull/101039 return can_run(self) and self._supports_modules and self._py_version < "3.12" - @property - def _cmake_try_FindPythonX(self): - return not is_msvc(self) or self.settings.build_type != "Debug" - @property def _supports_modules(self): return not is_msvc(self) or self._cpython_option("shared") def generate(self): tc = CMakeToolchain(self) - version = self._py_version tc.cache_variables["BUILD_MODULE"] = self._supports_modules - tc.cache_variables["PY_VERSION_MAJOR_MINOR"] = f"{version.major}.{version.minor}" - tc.cache_variables["PY_VERSION"] = str(self._py_version) - tc.cache_variables["PY_VERSION_SUFFIX"] = "d" if self.settings.build_type == "Debug" else "" - tc.cache_variables["PYTHON_EXECUTABLE"] = self._python - tc.cache_variables["USE_FINDPYTHON_X"] = self._cmake_try_FindPythonX - tc.cache_variables["Python3_EXECUTABLE"] = self._python - tc.cache_variables["Python3_ROOT_DIR"] = self.dependencies["cpython"].package_folder - tc.cache_variables["Python3_USE_STATIC_LIBS"] = not self.dependencies["cpython"].options.shared - tc.cache_variables["Python3_FIND_FRAMEWORK"] = "NEVER" - tc.cache_variables["Python3_FIND_REGISTRY"] = "NEVER" - tc.cache_variables["Python3_FIND_IMPLEMENTATIONS"] = "CPython" - tc.cache_variables["Python3_FIND_STRATEGY"] = "LOCATION" tc.generate() deps = CMakeDeps(self) diff --git a/recipes/cpython/config.yml b/recipes/cpython/config.yml index 87dabe8bf898b..a2b9627fa470b 100644 --- a/recipes/cpython/config.yml +++ b/recipes/cpython/config.yml @@ -1,4 +1,6 @@ versions: + "3.12.7": + folder: "all" "3.12.2": folder: "all" "3.11.9": diff --git a/recipes/cr/all/conandata.yml b/recipes/cr/all/conandata.yml new file mode 100644 index 0000000000000..caacd3f558624 --- /dev/null +++ b/recipes/cr/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "cci.20221105": + url: "https://github.com/fungos/cr/archive/0e7fef63555cf73c70e4d9ae42f8a6e9cefb8e69.zip" + sha256: "43c076800b19cb9f994ee7e77020e79ea2a01257f221d2f6d80e656f2507069e" diff --git a/recipes/cr/all/conanfile.py b/recipes/cr/all/conanfile.py new file mode 100644 index 0000000000000..b6dc7c42f14b8 --- /dev/null +++ b/recipes/cr/all/conanfile.py @@ -0,0 +1,70 @@ +import os + +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.apple import is_apple_os +from conan.tools.build import check_min_cppstd +from conan.tools.files import copy, get +from conan.tools.layout import basic_layout +from conan.tools.scm import Version + +required_conan_version = ">=1.52.0" + + +class CrConan(ConanFile): + name = "cr" + description = "cr.h: A Simple C Hot Reload Header-only Library" + license = "MIT" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/fungos/cr" + topics = ("hot-reload", "hot-swapping", "live-coding", "gamedev", "header-only") + + package_type = "header-library" + settings = "os", "arch", "compiler", "build_type" + no_copy_source = True + + @property + def _min_cppstd(self): + return 17 + + @property + def _compilers_minimum_version(self): + return { + "gcc": "7", + "Visual Studio": "15", + "clang": "5", + "apple-clang": "10", + } + + def layout(self): + basic_layout(self, src_folder="src") + + def package_id(self): + self.info.clear() + + def validate(self): + if self.settings.compiler.cppstd: + check_min_cppstd(self, self._min_cppstd) + minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) + if minimum_version and Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration( + f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." + ) + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def package(self): + copy(self, "LICENSE", self.source_folder, os.path.join(self.package_folder, "licenses")) + copy(self, "cr.h", self.source_folder, os.path.join(self.package_folder, "include")) + + def package_info(self): + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] + + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.system_libs.extend(["pthread", "dl", "rt"]) + elif is_apple_os(self): + self.cpp_info.system_libs.append("dl") + elif self.settings.os == "Windows": + self.cpp_info.system_libs.append("dbghelp") diff --git a/recipes/cr/all/test_package/CMakeLists.txt b/recipes/cr/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..420798776cd30 --- /dev/null +++ b/recipes/cr/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) + +find_package(cr REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE cr::cr) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) diff --git a/recipes/cr/all/test_package/conanfile.py b/recipes/cr/all/test_package/conanfile.py new file mode 100644 index 0000000000000..ef5d7042163ec --- /dev/null +++ b/recipes/cr/all/test_package/conanfile.py @@ -0,0 +1,26 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/cr/all/test_package/test_package.cpp b/recipes/cr/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..3be840e09fd11 --- /dev/null +++ b/recipes/cr/all/test_package/test_package.cpp @@ -0,0 +1,11 @@ +#define CR_HOST +#include + +void dummy() { + cr_plugin ctx; + cr_plugin_open(ctx, "xyz.dll"); + cr_plugin_update(ctx); + cr_plugin_close(ctx); +} + +int main() {} diff --git a/recipes/cr/config.yml b/recipes/cr/config.yml new file mode 100644 index 0000000000000..35012be65fa98 --- /dev/null +++ b/recipes/cr/config.yml @@ -0,0 +1,3 @@ +versions: + "cci.20221105": + folder: all diff --git a/recipes/crashpad/all/conandata.yml b/recipes/crashpad/all/conandata.yml index 78196c9e613a3..309c5ff4f2de1 100644 --- a/recipes/crashpad/all/conandata.yml +++ b/recipes/crashpad/all/conandata.yml @@ -1,11 +1,4 @@ sources: - "cci.20210507": - crashpad: - url: "https://github.com/chromium/crashpad/archive/d9bc7cf06aef74e928f9afc3dee33b60121b9c73.tar.gz" - sha256: "49f4b10f1de9b6d33743eccecace6b0fc9d7fe92e5e550ba5e099e6db9a11f0f" - mini_chromium: - url: "https://github.com/chromium/mini_chromium/archive/ccb198907cecf072d8f5b2543d4d348e834a298a.tar.gz" - sha256: "f40a77a4580cd1cb9af71602917a0e85b62bf0f74641b6ed81dd9fb2f2012ea9" "cci.20220219": crashpad: url: "https://github.com/chromium/crashpad/archive/e9937cb36cd12f24d73a07c4b91168cf1885b5db.tar.gz" @@ -14,36 +7,13 @@ sources: url: "https://github.com/chromium/mini_chromium/archive/822fada4a9972e3e2f36a981da770539025beb0a.tar.gz" sha256: "2c3bf30d324fcb60eeef84dd6aaf7fb75b70e37bdb3716ab3ea10cda51c4b05c" patches: - "cci.20210507": - - patch_file: "patches/cci.20210507-0001-fix-openssl-link-order.patch" - base_path: "source_subfolder" - - patch_file: "patches/cci.20210507-0002-remove-fPIC-Werror-LTO.patch" - base_path: "source_subfolder" - - patch_file: "patches/cci.20210507-0003-compilers-from-env.patch" - base_path: "source_subfolder" - - patch_file: "patches/cci.20210507-0004-use-conan-linux-syscall-support-package.patch" - base_path: "source_subfolder" - - patch_file: "patches/cci.20210507-0005-allow-all-archs.patch" - base_path: "source_subfolder" - - patch_file: "patches/cci.20210507-0006-mini_chromium-win_helper-py3.patch" - base_path: "source_subfolder" - - patch_file: "patches/cci.20210507-0007-use-system-zlib.patch" - base_path: "source_subfolder" "cci.20220219": - patch_file: "patches/cci.20220219-0001-fix-openssl-link-order.patch" - base_path: "source_subfolder" - patch_file: "patches/cci.20220219-0002-remove-fPIC-Werror-LTO.patch" - base_path: "source_subfolder" - patch_file: "patches/cci.20220219-0003-compilers-from-env.patch" - base_path: "source_subfolder" - patch_file: "patches/cci.20220219-0004-use-conan-linux-syscall-support-package.patch" - base_path: "source_subfolder" - patch_file: "patches/cci.20220219-0005-allow-all-archs.patch" - base_path: "source_subfolder" - patch_file: "patches/cci.20220219-0006-mini_chromium-win_helper-py3.patch" - base_path: "source_subfolder" - # reused patch from cci.20210507 + # reused patch from cci.20210507 - patch_file: "patches/cci.20210507-0007-use-system-zlib.patch" - base_path: "source_subfolder" - patch_file: "patches/cci.20220219-0007-static-lib-tool_support.patch" - base_path: "source_subfolder" diff --git a/recipes/crashpad/all/conanfile.py b/recipes/crashpad/all/conanfile.py index 42d603abefb4c..7b7d6c74f963c 100644 --- a/recipes/crashpad/all/conanfile.py +++ b/recipes/crashpad/all/conanfile.py @@ -1,21 +1,30 @@ -from conans import AutoToolsBuildEnvironment, ConanFile, tools -from conans.errors import ConanInvalidConfiguration -from contextlib import contextmanager +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rename, replace_in_file, rm, save, chdir +from conan.tools.scm import Version +from conan.tools.build import check_min_cppstd +from conan.tools.apple import XCRun, is_apple_os +from conan.tools.env import Environment, VirtualBuildEnv, VirtualRunEnv +from conan.tools.microsoft import VCVars, is_msvc +from conan.tools.gnu import AutotoolsDeps, AutotoolsToolchain + + import os import textwrap -required_conan_version = ">=1.33.0" +required_conan_version = ">=1.64.0" class CrashpadConan(ConanFile): name = "crashpad" description = "Crashpad is a crash-reporting system." url = "https://github.com/conan-io/conan-center-index" - topics = ("conan", "crashpad", "crash", "error", "stacktrace", "collecting", "reporting") + topics = ("crashpad", "crash", "error", "stacktrace", "collecting", "reporting") license = "Apache-2.0" homepage = "https://chromium.googlesource.com/crashpad/crashpad/+/master/README.md" - provides = "crashpad", "mini_chromium" + provides = "mini_chromium" settings = "os", "arch", "compiler", "build_type" + package_type = "static-library" options = { "fPIC": [True, False], "http_transport": ["libcurl", "socket", None], @@ -26,17 +35,16 @@ class CrashpadConan(ConanFile): "http_transport": None, "with_tls": "openssl", } - exports_sources = "patches/*" - @property - def _source_subfolder(self): - return "source_subfolder" + def export_sources(self): + export_conandata_patches(self) def _minimum_compiler_cxx14(self): return { "apple-clang": 10, "gcc": 5, "clang": "3.9", + "msvc": "190", "Visual Studio": 14, }.get(str(self.settings.compiler)) @@ -49,46 +57,46 @@ def config_options(self): self.options.http_transport = "socket" def build_requirements(self): - self.build_requires("ninja/1.10.2") - self.build_requires("gn/cci.20210429") + self.tool_requires("ninja/1.10.2") + self.tool_requires("gn/cci.20210429") def requirements(self): # FIXME: use mini_chromium conan package instead of embedded package (if possible) - self.requires("zlib/1.2.12") + self.requires("zlib/[>=1.2.12 <2]") if self.settings.os in ("Linux", "FreeBSD"): self.requires("linux-syscall-support/cci.20200813") if self.options.http_transport != "socket": del self.options.with_tls if self.options.http_transport == "libcurl": - self.requires("libcurl/7.82.0") + self.requires("libcurl/[>=7.78 <9]") if self.options.get_safe("with_tls") == "openssl": - self.requires("openssl/1.1.1o") + self.requires("openssl/[>=1.1 <4]") def validate(self): - if self.settings.compiler == "Visual Studio": + if is_msvc(self): if self.options.http_transport in ("libcurl", "socket"): raise ConanInvalidConfiguration("http_transport={} is not valid when building with Visual Studio".format(self.options.http_transport)) if self.options.http_transport == "libcurl": - if not self.options["libcurl"].shared: + if not self.dependencies["libcurl"].options.shared: # FIXME: is this true? - self.output.warn("crashpad needs a shared libcurl library") + self.output.warning("crashpad needs a shared libcurl library") min_compiler_version = self._minimum_compiler_cxx14() if min_compiler_version: - if tools.Version(self.settings.compiler.version) < min_compiler_version: + if Version(self.settings.compiler.version) < min_compiler_version: raise ConanInvalidConfiguration("crashpad needs a c++14 capable compiler, version >= {}".format(min_compiler_version)) else: - self.output.warn("This recipe does not know about the current compiler and assumes it has sufficient c++14 supports.") + self.output.warning("This recipe does not know about the current compiler and assumes it has sufficient c++14 supports.") if self.settings.compiler.cppstd: - tools.check_min_cppstd(self, 14) + check_min_cppstd(self, 14) def source(self): - tools.get(**self.conan_data["sources"][self.version]["crashpad"], destination=self._source_subfolder, strip_root=True) - tools.get(**self.conan_data["sources"][self.version]["mini_chromium"], - destination=os.path.join(self._source_subfolder, "third_party", "mini_chromium", "mini_chromium"), strip_root=True) + get(self, **self.conan_data["sources"][self.version]["crashpad"], destination=self.source_folder, strip_root=True) + get(self, **self.conan_data["sources"][self.version]["mini_chromium"], + destination=os.path.join(self.source_folder, "third_party", "mini_chromium", "mini_chromium"), strip_root=True) @property def _gn_os(self): - if tools.is_apple_os(self.settings.os): + if is_apple_os(self): if self.settings.os == "Macos": return "mac" else: @@ -105,31 +113,18 @@ def _gn_arch(self): "x86": "x86", }.get(str(self.settings.arch), str(self.settings.arch)) - @contextmanager - def _build_context(self): - if self.settings.compiler == "Visual Studio": - with tools.vcvars(self.settings): - yield - else: - env_defaults = {} - if self.settings.compiler == "gcc": - env_defaults.update({ - "CC": "gcc", - "CXX": "g++", - "LD": "g++", - }) - elif self.settings.compiler in ("clang", "apple-clang"): - env_defaults.update({ - "CC": "clang", - "CXX": "clang++", - "LD": "clang++", - }) - env = {} - for key, value in env_defaults.items(): - if not tools.get_env(key): - env[key] = value - with tools.environment_append(env): - yield + def generate(self): + VCVars(self).generate() + env = Environment() + if self.settings.compiler == "gcc": + env.define("CC", "gcc") + env.define("CXX", "g++") + env.define("LD", "g++") + elif str(self.settings.compiler) in ("clang", "apple-clang"): + env.define("CC", "clang") + env.define("CXX", "clang++") + env.define("LD", "clang++") + env.vars(self).save_script("conanbuild_gn") @property def _http_transport_impl(self): @@ -138,40 +133,31 @@ def _http_transport_impl(self): else: return str(self.options.http_transport) - def _version_greater_equal_to_cci_20220219(self): - return self.version >= "cci.20220219" - - def _has_separate_util_net_lib(self): - return self._version_greater_equal_to_cci_20220219() - - def _needs_to_link_tool_support(self): - return self._version_greater_equal_to_cci_20220219() - def build(self): - for patch in self.conan_data.get("patches", {}).get(self.version, []): - tools.patch(**patch) + apply_conandata_patches(self) - if self.settings.compiler == "Visual Studio": - tools.replace_in_file(os.path.join(self._source_subfolder, "third_party", "zlib", "BUILD.gn"), + if is_msvc(self): + replace_in_file(self, os.path.join(self.source_folder, "third_party", "zlib", "BUILD.gn"), "libs = [ \"z\" ]", - "libs = [ {} ]".format(", ".join("\"{}.lib\"".format(l) for l in self.deps_cpp_info["zlib"].libs))) + "libs = [ \"zlib.lib\" ]") if self.settings.compiler == "gcc": - toolchain_path = os.path.join(self._source_subfolder, "third_party", "mini_chromium", "mini_chromium", "build", "config", "BUILD.gn") + toolchain_path = os.path.join(self.source_folder, "third_party", "mini_chromium", "mini_chromium", "build", "config", "BUILD.gn") # Remove gcc-incompatible compiler arguments for comp_arg in ("-Wheader-hygiene", "-Wnewline-eof", "-Wstring-conversion", "-Wexit-time-destructors", "-fobjc-call-cxx-cdtors", "-Wextra-semi", "-Wimplicit-fallthrough"): - tools.replace_in_file(toolchain_path, - "\"{}\"".format(comp_arg), "\"\"") + replace_in_file(self, toolchain_path, "\"{}\"".format(comp_arg), "\"\"") + + deps = AutotoolsDeps(self).vars() + tc = AutotoolsToolchain(self).vars() + def _get_flags(name): + return [f for f in filter(None, [tc.get(name), deps.get(name)])] - autotools = AutoToolsBuildEnvironment(self) - extra_cflags = autotools.flags + ["-D{}".format(d) for d in autotools.defines] + extra_cflags = _get_flags("CPPFLAGS") extra_cflags_c = [] - extra_cflags_cc = autotools.cxx_flags - extra_ldflags = autotools.link_flags + extra_cflags_cc = _get_flags("CXXFLAGS") + extra_ldflags = _get_flags("LDFLAGS") + _get_flags("LIBS") if self.options.get_safe("fPIC"): extra_cflags.append("-fPIC") - extra_cflags.extend("-I {}".format(inc) for inc in autotools.include_paths) - extra_ldflags.extend("-{}{}".format("LIBPATH:" if self.settings.compiler == "Visual Studio" else "L ", libdir) for libdir in autotools.library_paths) if self.settings.compiler == "clang": if self.settings.compiler.get_safe("libcxx"): stdlib = { @@ -190,47 +176,46 @@ def build(self): "extra_cflags_cc=\\\"{}\\\"".format(" ".join(extra_cflags_cc)), "extra_ldflags=\\\"{}\\\"".format(" ".join(extra_ldflags)), ] - with tools.chdir(self._source_subfolder): - with self._build_context(): - self.run("gn gen out/Default --args=\"{}\"".format(" ".join(gn_args)), run_environment=True) - targets = ["client", "minidump", "crashpad_handler", "snapshot"] - if self.settings.os == "Windows": - targets.append("crashpad_handler_com") - self.run("ninja -C out/Default {targets} -j{parallel}".format( - targets=" ".join(targets), - parallel=tools.cpu_count()), run_environment=True) + with chdir(self, self.source_folder): + self.run("gn gen out/Default --args=\"{}\"".format(" ".join(gn_args))) + targets = ["client", "minidump", "crashpad_handler", "snapshot"] + if self.settings.os == "Windows": + targets.append("crashpad_handler_com") + self.run("ninja -C out/Default {targets} -j{parallel}".format( + targets=" ".join(targets), + parallel=os.cpu_count())) def lib_filename(name): - prefix, suffix = ("", ".lib") if self.settings.compiler == "Visual Studio" else ("lib", ".a") + prefix, suffix = ("", ".lib") if is_msvc(self) else ("lib", ".a") return "{}{}{}".format(prefix, name, suffix) - tools.rename(os.path.join(self._source_subfolder, "out", "Default", "obj", "client", lib_filename("common")), - os.path.join(self._source_subfolder, "out", "Default", "obj", "client", lib_filename("client_common"))) - tools.rename(os.path.join(self._source_subfolder, "out", "Default", "obj", "handler", lib_filename("common")), - os.path.join(self._source_subfolder, "out", "Default", "obj", "handler", lib_filename("handler_common"))) + rename(self, os.path.join(self.source_folder, "out", "Default", "obj", "client", lib_filename("common")), + os.path.join(self.source_folder, "out", "Default", "obj", "client", lib_filename("client_common"))) + rename(self, os.path.join(self.source_folder, "out", "Default", "obj", "handler", lib_filename("common")), + os.path.join(self.source_folder, "out", "Default", "obj", "handler", lib_filename("handler_common"))) def package(self): - self.copy("LICENSE", src=self._source_subfolder, dst="licenses") + copy(self, "LICENSE", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) - self.copy("*.h", src=os.path.join(self._source_subfolder, "client"), dst=os.path.join("include", "client")) - self.copy("*.h", src=os.path.join(self._source_subfolder, "util"), dst=os.path.join("include", "util")) - self.copy("*.h", src=os.path.join(self._source_subfolder, "third_party", "mini_chromium", "mini_chromium", "base"), dst=os.path.join("include", "base")) - self.copy("*.h", src=os.path.join(self._source_subfolder, "third_party", "mini_chromium", "mini_chromium", "build"), dst=os.path.join("include", "build")) - self.copy("*.h", src=os.path.join(self._source_subfolder, "out", "Default", "gen", "build"), dst=os.path.join("include", "build")) + copy(self, "*.h", src=os.path.join(self.source_folder, "client"), dst=os.path.join(self.package_folder, "include", "client")) + copy(self, "*.h", src=os.path.join(self.source_folder, "util"), dst=os.path.join(self.package_folder, "include", "util")) + copy(self, "*.h", src=os.path.join(self.source_folder, "third_party", "mini_chromium", "mini_chromium", "base"), dst=os.path.join(self.package_folder, "include", "base")) + copy(self, "*.h", src=os.path.join(self.source_folder, "third_party", "mini_chromium", "mini_chromium", "build"), dst=os.path.join(self.package_folder, "include", "build")) + copy(self, "*.h", src=os.path.join(self.source_folder, "out", "Default", "gen", "build"), dst=os.path.join(self.package_folder, "include", "build")) - self.copy("*.a", src=os.path.join(self._source_subfolder, "out", "Default"), dst="lib", keep_path=False) + copy(self, "*.a", src=os.path.join(self.source_folder, "out", "Default"), dst=os.path.join(self.package_folder, "lib"), keep_path=False) - self.copy("*.lib", src=os.path.join(self._source_subfolder, "out", "Default"), dst="lib", keep_path=False) - self.copy("crashpad_handler", src=os.path.join(self._source_subfolder, "out", "Default"), dst="bin", keep_path=False) - self.copy("crashpad_handler.exe", src=os.path.join(self._source_subfolder, "out", "Default"), dst="bin", keep_path=False) - self.copy("crashpad_handler_com.com", src=os.path.join(self._source_subfolder, "out", "Default"), dst="bin", keep_path=False) + copy(self, "*.lib", src=os.path.join(self.source_folder, "out", "Default"), dst=os.path.join(self.package_folder, "lib"), keep_path=False) + copy(self, "crashpad_handler", src=os.path.join(self.source_folder, "out", "Default"), dst=os.path.join(self.package_folder, "bin"), keep_path=False) + copy(self, "crashpad_handler.exe", src=os.path.join(self.source_folder, "out", "Default"), dst=os.path.join(self.package_folder, "bin"), keep_path=False) + copy(self, "crashpad_handler_com.com", src=os.path.join(self.source_folder, "out", "Default"), dst=os.path.join(self.package_folder, "bin"), keep_path=False) if self.settings.os == "Windows": - tools.rename(os.path.join(self.package_folder, "bin", "crashpad_handler_com.com"), + rename(self, os.path.join(self.package_folder, "bin", "crashpad_handler_com.com"), os.path.join(self.package_folder, "bin", "crashpad_handler.com")) # Remove accidentally copied libraries. These are used by the executables, not by the libraries. - tools.remove_files_by_mask(os.path.join(self.package_folder, "lib"), "*getopt*") + rm(self, "*getopt*", os.path.join(self.package_folder, "lib"), recursive=True) - tools.save(os.path.join(self.package_folder, "lib", "cmake", "crashpad-cxx.cmake"), + save(self, os.path.join(self.package_folder, "lib", "cmake", "crashpad-cxx.cmake"), textwrap.dedent("""\ if(TARGET crashpad::mini_chromium_base) target_compile_features(crashpad::mini_chromium_base INTERFACE cxx_std_14) @@ -239,9 +224,9 @@ def package(self): def package_info(self): self.cpp_info.components["mini_chromium_base"].libs = ["base"] - self.cpp_info.components["mini_chromium_base"].build_modules = [os.path.join(self.package_folder, "lib", "cmake", "crashpad-cxx.cmake")] + self.cpp_info.set_property("cmake_build_modules", [os.path.join(self.package_folder, "lib", "cmake", "crashpad-cxx.cmake")]) self.cpp_info.components["mini_chromium_base"].builddirs = [os.path.join("lib", "cmake")] - if tools.is_apple_os(self.settings.os): + if is_apple_os(self): if self.settings.os == "Macos": self.cpp_info.components["mini_chromium_base"].frameworks = ["ApplicationServices", "CoreFoundation", "Foundation", "IOKit", "Security"] else: # iOS @@ -249,7 +234,7 @@ def package_info(self): self.cpp_info.components["util"].libs = ["util"] self.cpp_info.components["util"].requires = ["mini_chromium_base", "zlib::zlib"] - if tools.is_apple_os(self.settings.os): + if is_apple_os(self): self.cpp_info.components["util"].libs.append("mig_output") if self.settings.os in ("Linux", "FreeBSD"): self.cpp_info.components["util"].libs.append("compat") @@ -277,7 +262,7 @@ def package_info(self): self.cpp_info.components["snapshot"].libs = ["snapshot"] self.cpp_info.components["snapshot"].requires = ["context", "client_common", "mini_chromium_base", "util"] - if tools.is_apple_os(self.settings.os): + if is_apple_os(self): self.cpp_info.components["snapshot"].frameworks.extend(["OpenCL"]) self.cpp_info.components["format"].libs = ["format"] @@ -286,15 +271,11 @@ def package_info(self): self.cpp_info.components["minidump"].libs = ["minidump"] self.cpp_info.components["minidump"].requires = ["snapshot", "mini_chromium_base", "util"] - extra_handler_common_req = [] - if self._has_separate_util_net_lib(): - self.cpp_info.components["net"].libs = ["net"] - extra_handler_common_req = ["net"] + self.cpp_info.components["net"].libs = ["net"] + extra_handler_common_req = ["net"] - extra_handler_req = [] - if self._needs_to_link_tool_support(): - self.cpp_info.components["tool_support"].libs = ["tool_support"] - extra_handler_req = ["tool_support"] + self.cpp_info.components["tool_support"].libs = ["tool_support"] + extra_handler_req = ["tool_support"] self.cpp_info.components["handler_common"].libs = ["handler_common"] self.cpp_info.components["handler_common"].requires = ["client_common", "snapshot", "util"] + extra_handler_common_req @@ -303,5 +284,4 @@ def package_info(self): self.cpp_info.components["handler"].requires = ["client", "util", "handler_common", "minidump", "snapshot"] + extra_handler_req bin_path = os.path.join(self.package_folder, "bin") - self.output.info("Appending PATH environment variable: {}".format(bin_path)) self.env_info.PATH.append(bin_path) diff --git a/recipes/crashpad/all/patches/cci.20210507-0001-fix-openssl-link-order.patch b/recipes/crashpad/all/patches/cci.20210507-0001-fix-openssl-link-order.patch deleted file mode 100644 index fa25c29585519..0000000000000 --- a/recipes/crashpad/all/patches/cci.20210507-0001-fix-openssl-link-order.patch +++ /dev/null @@ -1,23 +0,0 @@ -Order of ssl and crypto is wrong (first ssl, then crypto) ---- util/BUILD.gn -+++ util/BUILD.gn -@@ -402,8 +402,8 @@ - deps += [ "//third_party/boringssl" ] - } else { - libs = [ -- "crypto", - "ssl", -+ "crypto", - ] - } - } -@@ -670,8 +670,8 @@ - deps += [ "//third_party/boringssl" ] - } else { - libs = [ -- "crypto", - "ssl", -+ "crypto", - ] - } - } diff --git a/recipes/crashpad/all/patches/cci.20210507-0002-remove-fPIC-Werror-LTO.patch b/recipes/crashpad/all/patches/cci.20210507-0002-remove-fPIC-Werror-LTO.patch deleted file mode 100644 index dbe02c56b50c4..0000000000000 --- a/recipes/crashpad/all/patches/cci.20210507-0002-remove-fPIC-Werror-LTO.patch +++ /dev/null @@ -1,70 +0,0 @@ ---- third_party/mini_chromium/mini_chromium/build/config/BUILD.gn -+++ third_party/mini_chromium/mini_chromium/build/config/BUILD.gn -@@ -103,7 +103,7 @@ - } - } else if (mini_chromium_is_win) { - cflags = [ -- "/GL", # LTCG. -+ # LTCG. - "/O2", - "/Ob2", # Both explicit and auto inlining. - "/Oy-", # Disable omitting frame pointers, must be after /O2. -@@ -113,9 +113,9 @@ - ldflags = [ - "/OPT:ICF", - "/OPT:REF", -- "/LTCG", -+ - ] -- arflags = [ "/LTCG" ] -+ arflags = [ ] - } - } - -@@ -128,7 +128,7 @@ - cflags = [ - "-Wall", - "-Wendif-labels", -- "-Werror", -+ - "-Wextra", - "-Wextra-semi", - "-Wheader-hygiene", -@@ -239,7 +239,7 @@ - "/D_UNICODE", - "/FS", - "/W4", -- "/WX", -+ - "/Zi", - "/bigobj", # Support larger number of sections in obj file. - "/wd4100", # Unreferenced formal parameter. -@@ -319,7 +319,7 @@ - - if ((mini_chromium_is_posix && !mini_chromium_is_mac && - !mini_chromium_is_ios) || mini_chromium_is_fuchsia) { -- cflags += [ "-fPIC" ] -+ - ldflags += [ - # This must follow Fuchsia’s fdio library above. - "-Wl,--as-needed", ---- third_party/mini_chromium/mini_chromium/build/common.gypi -+++ third_party/mini_chromium/mini_chromium/build/common.gypi -@@ -124,7 +124,7 @@ - - ['OS=="linux" or OS=="android"', { - 'cflags': [ -- '-fPIC', -+ - '-fno-exceptions', - '-fno-strict-aliasing', # See http://crbug.com/32204 - '-fstack-protector-all', # Implies -fstack-protector -@@ -148,7 +148,7 @@ - '_FILE_OFFSET_BITS=64', - ], - 'ldflags': [ -- '-fPIC', -+ - '-pthread', - '-Wl,--as-needed', - '-Wl,-z,noexecstack', diff --git a/recipes/crashpad/all/patches/cci.20210507-0003-compilers-from-env.patch b/recipes/crashpad/all/patches/cci.20210507-0003-compilers-from-env.patch deleted file mode 100644 index 3d2fca3db7ec9..0000000000000 --- a/recipes/crashpad/all/patches/cci.20210507-0003-compilers-from-env.patch +++ /dev/null @@ -1,14 +0,0 @@ -Allow compiling crashpad with gcc (fetch compiler from environment variables) ---- third_party/mini_chromium/mini_chromium/build/config/BUILD.gn -+++ third_party/mini_chromium/mini_chromium/build/config/BUILD.gn -@@ -393,8 +393,8 @@ - ar = rebase_path(clang_path, root_build_dir) + "/bin/llvm-ar" - ld = cxx - } else { -- cc = "clang" -- cxx = "clang++" -+ cc = getenv("CC") -+ cxx = getenv("CXX") - asm = cxx - ld = cxx - diff --git a/recipes/crashpad/all/patches/cci.20210507-0004-use-conan-linux-syscall-support-package.patch b/recipes/crashpad/all/patches/cci.20210507-0004-use-conan-linux-syscall-support-package.patch deleted file mode 100644 index 849ed17734c92..0000000000000 --- a/recipes/crashpad/all/patches/cci.20210507-0004-use-conan-linux-syscall-support-package.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- third_party/lss/lss.h -+++ third_party/lss/lss.h -@@ -16,9 +16,9 @@ - #define CRASHPAD_THIRD_PARTY_LSS_LSS_H_ - - #if defined(CRASHPAD_LSS_SOURCE_EXTERNAL) --#include "third_party/lss/linux_syscall_support.h" -+#include - #elif defined(CRASHPAD_LSS_SOURCE_EMBEDDED) --#include "third_party/lss/lss/linux_syscall_support.h" -+#include - #else - #error Unknown lss source - #endif diff --git a/recipes/crashpad/all/patches/cci.20210507-0005-allow-all-archs.patch b/recipes/crashpad/all/patches/cci.20210507-0005-allow-all-archs.patch deleted file mode 100644 index ae7425fb742f1..0000000000000 --- a/recipes/crashpad/all/patches/cci.20210507-0005-allow-all-archs.patch +++ /dev/null @@ -1,40 +0,0 @@ ---- third_party/mini_chromium/mini_chromium/build/config/BUILD.gn -+++ third_party/mini_chromium/mini_chromium/build/config/BUILD.gn -@@ -193,7 +193,7 @@ - "arm64", - ] - } else { -- assert(false, "Unsupported architecture") -+ print("Unknown architecture -> assume conan knows how to handle it") - } - } - -@@ -268,7 +268,7 @@ - "-m64", - ] - } else { -- assert(false, "Unsupported architecture") -+ print("Unknown architecture -> assume conan knows how to handle it") - } - - # This is currently required by the clang toolchain build that DEPS uses -@@ -302,7 +302,7 @@ - } else if (target_cpu == "x64") { - common_flags += [ "--target=x86_64-fuchsia" ] - } else { -- assert(false, "Unsupported architecture") -+ print("Unknown architecture -> assume conan knows how to handle it") - } - - # fdio is listed in ldflags instead of libs because it’s important for it to ---- util/BUILD.gn -+++ util/BUILD.gn -@@ -145,7 +145,7 @@ if (crashpad_is_mac || crashpad_is_ios) { - "arm64", - ] - } else { -- assert(false, "Unsupported architecture") -+ print("Unknown architecture -> assume conan knows how to handle it") - } - } - diff --git a/recipes/crashpad/all/patches/cci.20210507-0006-mini_chromium-win_helper-py3.patch b/recipes/crashpad/all/patches/cci.20210507-0006-mini_chromium-win_helper-py3.patch deleted file mode 100644 index be8423bbda8e1..0000000000000 --- a/recipes/crashpad/all/patches/cci.20210507-0006-mini_chromium-win_helper-py3.patch +++ /dev/null @@ -1,96 +0,0 @@ ---- third_party/mini_chromium/mini_chromium/build/win_helper.py -+++ third_party/mini_chromium/mini_chromium/build/win_helper.py -@@ -4,7 +4,10 @@ - # Use of this source code is governed by a BSD-style license that can be - # found in the LICENSE file. - --import _winreg -+try: -+ import _winreg -+except ImportError: -+ import winreg as _winreg - import os - import re - import subprocess -@@ -62,7 +65,7 @@ - CreateProcess() documentation for more details.""" - block = '' - nul = '\0' -- for key, value in envvar_dict.iteritems(): -+ for key, value in envvar_dict.items(): - block += key + '=' + value + nul - block += nul - return block -@@ -81,7 +84,7 @@ - archs = ('x86', 'amd64', 'arm64') - result = [] - for arch in archs: -- # Extract environment variables for subprocesses. -+ sys.stderr.write("install_dir {} script_path {}".format(install_dir, script_path)) - args = [os.path.join(install_dir, script_path)] - script_arch_name = arch - if script_path.endswith('SetEnv.cmd') and arch == 'amd64': -@@ -94,12 +97,12 @@ - variables, _ = popen.communicate() - if popen.returncode != 0: - raise Exception('"%s" failed with error %d' % (args, popen.returncode)) -- env = _ExtractImportantEnvironment(variables) -+ env = _ExtractImportantEnvironment(variables.decode()) - - env_block = _FormatAsEnvironmentBlock(env) - basename = 'environment.' + arch - with open(os.path.join(out_dir, basename), 'wb') as f: -- f.write(env_block) -+ f.write(env_block.encode()) - result.append(basename) - return result - -@@ -139,10 +142,10 @@ - link = subprocess.Popen(args, env=env, shell=True, stdout=subprocess.PIPE) - out, _ = link.communicate() - for line in out.splitlines(): -- if (not line.startswith(' Creating library ') and -- not line.startswith('Generating code') and -- not line.startswith('Finished generating code')): -- print line -+ if (not line.startswith(b' Creating library ') and -+ not line.startswith(b'Generating code') and -+ not line.startswith(b'Finished generating code')): -+ print(line) - return link.returncode - - def ExecAsmWrapper(self, arch, *args): -@@ -152,11 +155,11 @@ - stdout=subprocess.PIPE, stderr=subprocess.STDOUT) - out, _ = popen.communicate() - for line in out.splitlines(): -- if (not line.startswith('Copyright (C) Microsoft Corporation') and -- not line.startswith('Microsoft (R) Macro Assembler') and -- not line.startswith(' Assembling: ') and -+ if (not line.startswith(b'Copyright (C) Microsoft Corporation') and -+ not line.startswith(b'Microsoft (R) Macro Assembler') and -+ not line.startswith(b' Assembling: ') and - line): -- print line -+ print(line) - return popen.returncode - - def ExecGetVisualStudioData(self, outdir, toolchain_path): -@@ -178,7 +181,7 @@ - 'Microsoft Visual Studio', 'Installer', 'vswhere.exe') - if os.path.exists(vswhere_path): - installation_path = subprocess.check_output( -- [vswhere_path, '-latest', '-property', 'installationPath']).strip() -+ [vswhere_path, '-latest', '-property', 'installationPath']).strip().decode() - if installation_path: - return (installation_path, - os.path.join('VC', 'Auxiliary', 'Build', 'vcvarsall.bat')) -@@ -207,7 +210,7 @@ - x86_environment_file = "%s" - x64_environment_file = "%s" - arm64_environment_file = "%s"''' % (install_dir, x86_file, x64_file, arm64_file) -- print result -+ print(result) - return 0 - - def ExecStamp(self, path): diff --git a/recipes/crashpad/all/test_package/CMakeLists.txt b/recipes/crashpad/all/test_package/CMakeLists.txt index 6c1d84c7e3d82..371eb858142f4 100644 --- a/recipes/crashpad/all/test_package/CMakeLists.txt +++ b/recipes/crashpad/all/test_package/CMakeLists.txt @@ -1,9 +1,8 @@ -cmake_minimum_required(VERSION 3.1) -project(test_package) +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup() +find_package(crashpad REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) -target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS}) +target_link_libraries(${PROJECT_NAME} PRIVATE crashpad::crashpad) set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 17) diff --git a/recipes/crashpad/all/test_package/conanfile.py b/recipes/crashpad/all/test_package/conanfile.py index a0d87c14b0333..46a8950cd70ed 100644 --- a/recipes/crashpad/all/test_package/conanfile.py +++ b/recipes/crashpad/all/test_package/conanfile.py @@ -1,10 +1,24 @@ -from conans import ConanFile, CMake, tools +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake +from conan.tools.files import mkdir, save, load import os class TestPackageConan(ConanFile): - settings = "os", "compiler", "build_type", "arch" - generators = "cmake" + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) + + def generate(self): + save(self, os.path.join(self.generators_folder, "bindir"), + os.path.join(self.dependencies["crashpad"].package_folder, "bin")) def build(self): cmake = CMake(self) @@ -12,14 +26,14 @@ def build(self): cmake.build() def test(self): - if not tools.cross_building(self): + if can_run(self): test_env_dir = "test_env" - tools.mkdir(test_env_dir) - bin_path = os.path.join("bin", "test_package") - handler_exe = "crashpad_handler.exe" if self.settings.os == "Windows" else "crashpad_handler" - handler_bin_path = os.path.join(self.deps_cpp_info["crashpad"].rootpath, "bin", handler_exe) - self.run("%s %s/db %s" % (bin_path, test_env_dir, handler_bin_path), run_environment=True) + mkdir(self, test_env_dir) + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + bindir = load(self, os.path.join(self.generators_folder, "bindir")) + handler_exe = "crashpad_handler" + (".exe" if self.settings.os == "Windows" else "") + handler_bin_path = os.path.join(bindir, handler_exe) + self.run(f"{bin_path} {test_env_dir}/db {handler_bin_path}", env="conanrun") if self.settings.os == "Windows": - handler_exe = "crashpad_handler.com" - handler_bin_path = os.path.join(self.deps_cpp_info["crashpad"].rootpath, "bin", handler_exe) - self.run("%s %s/db %s" % (bin_path, test_env_dir, handler_bin_path), run_environment=True) + handler_bin_path = os.path.join(bindir, "crashpad_handler.com") + self.run(f"{bin_path} {test_env_dir}/db {handler_bin_path}", env="conanrun") diff --git a/recipes/crashpad/config.yml b/recipes/crashpad/config.yml index 104465b6c7315..63942e1b1104b 100644 --- a/recipes/crashpad/config.yml +++ b/recipes/crashpad/config.yml @@ -1,5 +1,3 @@ versions: - "cci.20210507": - folder: all "cci.20220219": folder: all diff --git a/recipes/croncpp/all/conandata.yml b/recipes/croncpp/all/conandata.yml index 7f25de8a50772..30cf4b9d03ad4 100644 --- a/recipes/croncpp/all/conandata.yml +++ b/recipes/croncpp/all/conandata.yml @@ -1,4 +1,4 @@ sources: - "cci.20220503": - url: "https://github.com/mariusbancila/croncpp/archive/5c28f410db1af9507ef8469c9796a7070e5e8e2e.tar.gz" - sha256: "cabc480c78ebf12b11bd9fcd705a7ecb1c85ac88a8c9debe8de67f30abd808a8" + "2023.03.30": + url: "https://github.com/mariusbancila/croncpp/archive/refs/tags/v2023.03.30.tar.gz" + sha256: "0731b7f900a670c009585eb5e9639722aeff6531dbbd5bfc9ce895459733837e" diff --git a/recipes/croncpp/all/conanfile.py b/recipes/croncpp/all/conanfile.py index ffab100ea6a29..7c51f39f65111 100644 --- a/recipes/croncpp/all/conanfile.py +++ b/recipes/croncpp/all/conanfile.py @@ -1,9 +1,8 @@ -import os - from conan import ConanFile from conan.tools.build import check_min_cppstd -from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout -from conan.tools.files import copy, get, rmdir +from conan.tools.files import copy, get +from conan.tools.layout import basic_layout +import os required_conan_version = ">=1.52.0" @@ -25,7 +24,7 @@ def _min_cppstd(self): return 11 def layout(self): - cmake_layout(self, src_folder="src") + basic_layout(self, src_folder="src") def package_id(self): self.info.clear() @@ -37,21 +36,18 @@ def validate(self): def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) - def generate(self): - tc = CMakeToolchain(self) - tc.generate() - - def build(self): - cmake = CMake(self) - cmake.configure() - cmake.build() - def package(self): - copy(self, "LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) - cmake = CMake(self) - cmake.install() - rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) + copy(self, "LICENSE", self.source_folder, os.path.join(self.package_folder, "licenses")) + copy( + self, + "*.h", + os.path.join(self.source_folder, "include"), + os.path.join(self.package_folder, "include"), + ) def package_info(self): self.cpp_info.bindirs = [] self.cpp_info.libdirs = [] + + self.cpp_info.set_property("cmake_file_name", "croncpp") + self.cpp_info.set_property("cmake_target_name","croncpp::croncpp") diff --git a/recipes/croncpp/config.yml b/recipes/croncpp/config.yml index 162ec03638ac6..858a21517c5cd 100644 --- a/recipes/croncpp/config.yml +++ b/recipes/croncpp/config.yml @@ -1,3 +1,3 @@ versions: - "cci.20220503": + "2023.03.30": folder: "all" diff --git a/recipes/crossdb/all/conandata.yml b/recipes/crossdb/all/conandata.yml new file mode 100644 index 0000000000000..1210ca3f69e78 --- /dev/null +++ b/recipes/crossdb/all/conandata.yml @@ -0,0 +1,7 @@ +sources: + "0.10.0": + url: "https://github.com/crossdb-org/crossdb/archive/refs/tags/0.10.0.tar.gz" + sha256: "8b4ed2063f508bc3353d6346a7d9bf78bb04fe05ddfe6e86f1f33cc44f71b2d4" + "0.9.0": + url: "https://github.com/crossdb-org/crossdb/archive/refs/tags/0.9.0.tar.gz" + sha256: "04defc43f0b5102cc6a341ba9e328302416982c04cc4c59bc16aef19cc1b020c" diff --git a/recipes/crossdb/all/conanfile.py b/recipes/crossdb/all/conanfile.py new file mode 100644 index 0000000000000..4af53a29f2db7 --- /dev/null +++ b/recipes/crossdb/all/conanfile.py @@ -0,0 +1,55 @@ +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout +from conan.tools.files import copy, get +from conan.tools.microsoft import is_msvc +from conan.tools.apple import fix_apple_shared_install_name +from conan.tools.scm import Version +import os + +required_conan_version = ">=1.53.0" + +class CrossDBConan(ConanFile): + name = "crossdb" + description = "Ultra High-performance Lightweight Embedded and Server OLTP RDBMS" + license = "MPL-2.0" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/crossdb-org/crossdb" + topics = ("database", "oltp", "embedded") + package_type = "shared-library" + settings = "os", "arch", "compiler", "build_type" + + def configure(self): + self.settings.rm_safe("compiler.cppstd") + self.settings.rm_safe("compiler.libcxx") + + def layout(self): + cmake_layout(self, src_folder="src") + + def validate(self): + if is_msvc(self): + raise ConanInvalidConfiguration(f"${self.ref} does not support MSVC") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + tc.generate() + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def package(self): + copy(self, "LICENSE", self.source_folder, os.path.join(self.package_folder, "licenses")) + cmake = CMake(self) + cmake.install() + fix_apple_shared_install_name(self) + + def package_info(self): + self.cpp_info.libs = ["crossdb"] + + if Version(self.version) >= "0.10.0" and self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.system_libs.append("pthread") diff --git a/recipes/crossdb/all/test_package/CMakeLists.txt b/recipes/crossdb/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..f725ff69c516e --- /dev/null +++ b/recipes/crossdb/all/test_package/CMakeLists.txt @@ -0,0 +1,7 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES C) + +find_package(crossdb REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.c) +target_link_libraries(${PROJECT_NAME} PRIVATE crossdb::crossdb) diff --git a/recipes/crossdb/all/test_package/conanfile.py b/recipes/crossdb/all/test_package/conanfile.py new file mode 100644 index 0000000000000..ef5d7042163ec --- /dev/null +++ b/recipes/crossdb/all/test_package/conanfile.py @@ -0,0 +1,26 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/crossdb/all/test_package/test_package.c b/recipes/crossdb/all/test_package/test_package.c new file mode 100644 index 0000000000000..37adfa21e3091 --- /dev/null +++ b/recipes/crossdb/all/test_package/test_package.c @@ -0,0 +1,9 @@ +#include +#include + +#include + +int main () { + printf("Cross DB Version: %s\n", xdb_version()); + return EXIT_SUCCESS; +} diff --git a/recipes/crossdb/config.yml b/recipes/crossdb/config.yml new file mode 100644 index 0000000000000..417151c4210d1 --- /dev/null +++ b/recipes/crossdb/config.yml @@ -0,0 +1,5 @@ +versions: + "0.10.0": + folder: all + "0.9.0": + folder: all diff --git a/recipes/crowcpp-crow/all/conandata.yml b/recipes/crowcpp-crow/all/conandata.yml index 7b927ae7b3902..91575e2322dc2 100644 --- a/recipes/crowcpp-crow/all/conandata.yml +++ b/recipes/crowcpp-crow/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.2.0": + url: "https://github.com/CrowCpp/crow/archive/refs/tags/v1.2.0.tar.gz" + sha256: "c80d0b23c6a20f8aa6fe776669dc8a9fb984046891d2f70bfc0539d16998164b" "1.1.0": url: "https://github.com/CrowCpp/crow/archive/refs/tags/v1.1.0.tar.gz" sha256: "f4281c3f25769dbc82437dd4199a8ba07b2a6e8a2f42e36a6fd805c493aae5ca" diff --git a/recipes/crowcpp-crow/all/conanfile.py b/recipes/crowcpp-crow/all/conanfile.py index d5a63018ad0dd..5e2434c0c17d3 100644 --- a/recipes/crowcpp-crow/all/conanfile.py +++ b/recipes/crowcpp-crow/all/conanfile.py @@ -14,6 +14,7 @@ class CrowConan(ConanFile): url = "https://github.com/conan-io/conan-center-index" homepage = "http://crowcpp.org/" topics = ("web", "microframework", "header-only") + package_type = "header-library" settings = "os", "compiler", "arch", "build_type" options = { "amalgamation": [True, False], @@ -116,6 +117,8 @@ def package_info(self): if self.settings.os in ("FreeBSD", "Linux"): self.cpp_info.system_libs = ["pthread"] + if self.settings.os == "Windows": + self.cpp_info.system_libs = ["wsock32", "ws2_32"] self.cpp_info.set_property("cmake_file_name", "Crow") self.cpp_info.set_property("cmake_target_name", "Crow::Crow") diff --git a/recipes/crowcpp-crow/config.yml b/recipes/crowcpp-crow/config.yml index 271396eff4652..f99accc1b08d5 100644 --- a/recipes/crowcpp-crow/config.yml +++ b/recipes/crowcpp-crow/config.yml @@ -1,4 +1,6 @@ versions: + "1.2.0": + folder: all "1.1.0": folder: all "1.0+5": diff --git a/recipes/crunch/all/test_package/conanfile.py b/recipes/crunch/all/test_package/conanfile.py index 7a2122729677a..539e617675db7 100644 --- a/recipes/crunch/all/test_package/conanfile.py +++ b/recipes/crunch/all/test_package/conanfile.py @@ -22,7 +22,5 @@ def build(self): def test(self): if can_run(self): - img_path = os.path.join(self.source_folder, "test.png") - self.run(f"crunch -file {img_path}", env="conanrun") bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") self.run(bin_path, env="conanrun") diff --git a/recipes/crunch/all/test_package/test.png b/recipes/crunch/all/test_package/test.png deleted file mode 100644 index 11640c7488fb1..0000000000000 Binary files a/recipes/crunch/all/test_package/test.png and /dev/null differ diff --git a/recipes/crunch/all/test_package/test_package.cpp b/recipes/crunch/all/test_package/test_package.cpp index 7caf2449af9a7..f6909dbc593f0 100644 --- a/recipes/crunch/all/test_package/test_package.cpp +++ b/recipes/crunch/all/test_package/test_package.cpp @@ -4,6 +4,6 @@ int main(int argc, const char* argv[]) { - crn_get_file_type_ext(crn_file_type::cCRNFileTypeCRN); + std::cout << "Test string: " << crn_get_format_string(crn_format::cCRNFmtDXT1) << std::endl; return 0; } diff --git a/recipes/crunch/all/test_v1_package/conanfile.py b/recipes/crunch/all/test_v1_package/conanfile.py index f8fa68e1e8d17..38f4483872d47 100644 --- a/recipes/crunch/all/test_v1_package/conanfile.py +++ b/recipes/crunch/all/test_v1_package/conanfile.py @@ -13,7 +13,5 @@ def build(self): def test(self): if not tools.cross_building(self): - img_path = os.path.join(self.source_folder, os.pardir, "test_package", "test.png") - self.run(f"crunch -file {img_path}", run_environment=True) bin_path = os.path.join("bin", "test_package") self.run(bin_path, run_environment=True) diff --git a/recipes/cryptopp/all/conandata.yml b/recipes/cryptopp/all/conandata.yml index 14741e08f860f..86f5bef002754 100644 --- a/recipes/cryptopp/all/conandata.yml +++ b/recipes/cryptopp/all/conandata.yml @@ -34,20 +34,6 @@ sources: cmake: url: "https://github.com/noloader/cryptopp-cmake/archive/CRYPTOPP_8_5_0.tar.gz" sha256: "10685209405e676993873fcf638ade5f8f99d7949afa6b2045289ce9cc6d90ac" - "8.4.0": - source: - url: "https://github.com/weidai11/cryptopp/archive/CRYPTOPP_8_4_0.tar.gz" - sha256: "6687dfc1e33b084aeab48c35a8550b239ee5f73a099a3b6a0918d70b8a89e654" - cmake: - url: "https://github.com/noloader/cryptopp-cmake/archive/CRYPTOPP_8_4_0.tar.gz" - sha256: "b850070141f6724fce640e4e2cfde433ec5b2d99d4386d29ba9255167bc4b4f0" - "8.2.0": - source: - url: "https://github.com/weidai11/cryptopp/archive/CRYPTOPP_8_2_0.tar.gz" - sha256: "e3bcd48a62739ad179ad8064b523346abb53767bcbefc01fe37303412292343e" - cmake: - url: "https://github.com/noloader/cryptopp-cmake/archive/CRYPTOPP_8_2_0.tar.gz" - sha256: "f41f6a32b1177c094c3ef97423916713c902d0ac26cbee30ec70b1e8ab0e6fba" patches: "8.9.0": - patch_file: "patches/8.9.0-0001-cve-2023-50980.patch" @@ -64,13 +50,4 @@ patches: "8.5.0": - patch_file: "patches/8.4.0-0001-relocatable-macos.patch" patch_description: "Relocatable shared lib on macOS" - patch_type: "conan" - "8.4.0": - - patch_file: "patches/8.4.0-0001-relocatable-macos.patch" - patch_description: "Relocatable shared lib on macOS" - patch_type: "conan" - "8.2.0": - - patch_file: "patches/8.2.0-0001-fix-cmake.patch" - - patch_file: "patches/8.2.0-0002-relocatable-macos.patch" - patch_description: "Relocatable shared lib on macOS" - patch_type: "conan" + patch_type: "conan" \ No newline at end of file diff --git a/recipes/cryptopp/all/conanfile.py b/recipes/cryptopp/all/conanfile.py index d61c97a23b4e4..039ed175e5ca4 100644 --- a/recipes/cryptopp/all/conanfile.py +++ b/recipes/cryptopp/all/conanfile.py @@ -1,5 +1,7 @@ from conan import ConanFile from conan.errors import ConanInvalidConfiguration +from conan.tools.apple import is_apple_os +from conan.tools.build import cross_building from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout from conan.tools.files import ( apply_conandata_patches, collect_libs, copy, export_conandata_patches, get, @@ -26,10 +28,12 @@ class CryptoPPConan(ConanFile): options = { "shared": [True, False], "fPIC": [True, False], + "use_openmp": [True, False], } default_options = { "shared": False, "fPIC": True, + "use_openmp": False, } def export_sources(self): @@ -46,6 +50,11 @@ def configure(self): def layout(self): cmake_layout(self, src_folder="src") + def validate_build(self): + if is_apple_os(self) and cross_building(self) and Version(self.version) <= "8.6.0": + # See https://github.com/abdes/cryptopp-cmake/pull/38 + raise ConanInvalidConfiguration("cryptopp 8.6.0 and lower do not support cross-building on Apple platforms") + def validate(self): if self.options.shared and Version(self.version) >= "8.7.0": raise ConanInvalidConfiguration("cryptopp 8.7.0 and higher do not support shared builds") @@ -97,6 +106,7 @@ def generate(self): tc.cache_variables["CRYPTOPP_USE_INTERMEDIATE_OBJECTS_TARGET"] = False if self.settings.os == "Android": tc.cache_variables["CRYPTOPP_NATIVE_ARCH"] = True + tc.cache_variables["CRYPTOPP_USE_OPENMP"] = self.options.use_openmp tc.cache_variables["CMAKE_DISABLE_FIND_PACKAGE_Git"] = True tc.generate() @@ -179,6 +189,12 @@ def package_info(self): elif self.settings.os == "Windows": self.cpp_info.components["libcryptopp"].system_libs = ["bcrypt", "ws2_32"] + if not self.options.shared and self.options.use_openmp: + if self.settings.compiler in ("gcc", "clang"): + openmp_flag = ["-fopenmp"] + self.cpp_info.components["libcryptopp"].sharedlinkflags = openmp_flag + self.cpp_info.components["libcryptopp"].exelinkflags = openmp_flag + # TODO: to remove in conan v2 once cmake_find_package* & pkg_config generators removed self.cpp_info.names["pkg_config"] = "libcryptopp" self.cpp_info.components["libcryptopp"].names["cmake_find_package"] = legacy_cmake_target diff --git a/recipes/cryptopp/all/test_package/test_package.cpp b/recipes/cryptopp/all/test_package/test_package.cpp index 2460e01097c84..da386a7df8d69 100644 --- a/recipes/cryptopp/all/test_package/test_package.cpp +++ b/recipes/cryptopp/all/test_package/test_package.cpp @@ -1,13 +1,8 @@ -#include "cryptopp/cryptlib.h" -#include "cryptopp/osrng.h" // AutoSeededRandomPool - -#include +#include +#include int main() { - printf("CryptoPP version: %d\n", CRYPTOPP_VERSION); - - CryptoPP::AutoSeededRandomPool rng; - printf("This is a random number from CryptoPP: %d\n", rng.GenerateByte()); - + std::cout << "CryptoPP LibraryVersion() = " << CryptoPP::LibraryVersion() << std::endl; + std::cout << "CryptoPP HeaderVersion() = " << CryptoPP::HeaderVersion() << std::endl; return 0; } diff --git a/recipes/cryptopp/config.yml b/recipes/cryptopp/config.yml index f7be670f19b31..d6ae70c1dd554 100644 --- a/recipes/cryptopp/config.yml +++ b/recipes/cryptopp/config.yml @@ -9,7 +9,3 @@ versions: folder: "all" "8.5.0": folder: "all" - "8.4.0": - folder: "all" - "8.2.0": - folder: "all" diff --git a/recipes/ctrack/all/conandata.yml b/recipes/ctrack/all/conandata.yml new file mode 100644 index 0000000000000..f43d2b2b61b59 --- /dev/null +++ b/recipes/ctrack/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "1.0.2": + url: "https://github.com/Compaile/ctrack/releases/download/v1.0.2/ctrack-main.zip" + sha256: "1a41a831c28977504b49b6966c46e65939271eca90fbe297e248a3e0bf05ac5a" diff --git a/recipes/ctrack/all/conanfile.py b/recipes/ctrack/all/conanfile.py new file mode 100644 index 0000000000000..439699d0f2442 --- /dev/null +++ b/recipes/ctrack/all/conanfile.py @@ -0,0 +1,68 @@ +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.build import check_min_cppstd +from conan.tools.files import copy, get +from conan.tools.layout import basic_layout +from conan.tools.scm import Version +import os + +required_conan_version = ">=1.52.0" + +class CtrackConan(ConanFile): + name = "ctrack" + description = "A lightweight, high-performance C++ benchmarking and tracking library for effortless function profiling in both development and production environments." + license = "MIT" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/Compaile/ctrack" + topics = ("benchmark", "tracking", "profiling", "header-only") + package_type = "header-library" + settings = "os", "arch", "compiler", "build_type" + no_copy_source = True + + @property + def _min_cppstd(self): + return 17 + + @property + def _compilers_minimum_version(self): + return { + "gcc": "8", + "clang": "7", + "apple-clang": "12", + "Visual Studio": "16", + "msvc": "192", + } + + def layout(self): + basic_layout(self, src_folder="src") + + def package_id(self): + self.info.clear() + + def validate(self): + if self.settings.compiler.get_safe("cppstd"): + check_min_cppstd(self, self._min_cppstd) + minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) + if minimum_version and Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration( + f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." + ) + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def package(self): + copy(self, "LICENSE", self.source_folder, os.path.join(self.package_folder, "licenses")) + copy( + self, + "*.hpp", + os.path.join(self.source_folder, "include"), + os.path.join(self.package_folder, "include"), + ) + + def package_info(self): + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] + + self.cpp_info.set_property("cmake_file_name", "ctrack") + self.cpp_info.set_property("cmake_target_name", "ctrack::ctrack") diff --git a/recipes/ctrack/all/test_package/CMakeLists.txt b/recipes/ctrack/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..c5cbaf058679d --- /dev/null +++ b/recipes/ctrack/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) + +find_package(ctrack REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE ctrack::ctrack) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) diff --git a/recipes/ctrack/all/test_package/conanfile.py b/recipes/ctrack/all/test_package/conanfile.py new file mode 100644 index 0000000000000..3a91c9439218e --- /dev/null +++ b/recipes/ctrack/all/test_package/conanfile.py @@ -0,0 +1,26 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def layout(self): + cmake_layout(self) + + def requirements(self): + self.requires(self.tested_reference_str) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/ctrack/all/test_package/test_package.cpp b/recipes/ctrack/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..a7b05d6ea6f7c --- /dev/null +++ b/recipes/ctrack/all/test_package/test_package.cpp @@ -0,0 +1,25 @@ +// In older gcc, header requires tbb library. +// adding following line to fix compilation error due to this +#define CTRACK_DISABLE_EXECUTION_POLICY +#include "ctrack.hpp" +#include + +void expensiveOperation() { + CTRACK; + // Simulating some work + for (int i = 0; i < 5; ++i) { + std::cout << i << " "; + } + std::cout << std::endl; +} + +int main() { + for (int i = 0; i < 2; ++i) { + expensiveOperation(); + } + + // Print results to console + ctrack::result_print(); + + return 0; +} diff --git a/recipes/ctrack/config.yml b/recipes/ctrack/config.yml new file mode 100644 index 0000000000000..8457ca9a4a8cd --- /dev/null +++ b/recipes/ctrack/config.yml @@ -0,0 +1,3 @@ +versions: + "1.0.2": + folder: all diff --git a/recipes/ctre/all/conandata.yml b/recipes/ctre/all/conandata.yml index c31706ca559c2..14d4398b08a9b 100644 --- a/recipes/ctre/all/conandata.yml +++ b/recipes/ctre/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "3.9.0": + url: "https://github.com/hanickadot/compile-time-regular-expressions/archive/v3.9.0.tar.gz" + sha256: "55778712968d4f3ad00e9d20fc4d2149d14d96b4ff3dab086613797cd2ccd2b2" "3.8.1": url: "https://github.com/hanickadot/compile-time-regular-expressions/archive/v3.8.1.tar.gz" sha256: "0ce8760d43b3b97b43364cd32ee663e5c8b8b4bfd58e7890042eff6ac52db605" diff --git a/recipes/ctre/config.yml b/recipes/ctre/config.yml index 02f3f62c0a451..218ac700f6381 100644 --- a/recipes/ctre/config.yml +++ b/recipes/ctre/config.yml @@ -1,4 +1,6 @@ versions: + "3.9.0": + folder: all "3.8.1": folder: all "3.8": diff --git a/recipes/ctrl-c/all/CMakeLists.txt b/recipes/ctrl-c/all/CMakeLists.txt new file mode 100644 index 0000000000000..405a4c3952405 --- /dev/null +++ b/recipes/ctrl-c/all/CMakeLists.txt @@ -0,0 +1,17 @@ +cmake_minimum_required(VERSION 3.15) +project(ctrl-c LANGUAGES CXX) + +add_library(ctrl-c ${CTRL_C_SRC_DIR}/src/ctrl-c.cpp) +set_target_properties(ctrl-c PROPERTIES + PUBLIC_HEADER ${CTRL_C_SRC_DIR}/src/ctrl-c.h +) +target_compile_features(ctrl-c PUBLIC cxx_std_11) + +include(GNUInstallDirs) +install( + TARGETS ctrl-c + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} +) diff --git a/recipes/ctrl-c/all/conandata.yml b/recipes/ctrl-c/all/conandata.yml new file mode 100644 index 0000000000000..e988e2cde6c0a --- /dev/null +++ b/recipes/ctrl-c/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "1.0.0": + url: "https://github.com/evgenykislov/ctrl-c/archive/refs/tags/v1.0.0.tar.gz" + sha256: "9f63ff2e02ac62a19e30208af746d5a2655ecf040773b6c7d1e27e85be45ee1a" diff --git a/recipes/ctrl-c/all/conanfile.py b/recipes/ctrl-c/all/conanfile.py new file mode 100644 index 0000000000000..6ef4188f79f42 --- /dev/null +++ b/recipes/ctrl-c/all/conanfile.py @@ -0,0 +1,75 @@ +from conan import ConanFile +from conan.tools.build import check_min_cppstd +from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout +from conan.tools.files import copy, get +from conan.tools.microsoft import is_msvc +import os + + +required_conan_version = ">=1.53.0" + + +class CtrlCConan(ConanFile): + name = "ctrl-c" + description = "Crossplatform code to handle Ctrl+C signal" + license = "MIT" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/evgenykislov/ctrl-c/" + topics = ("crossplatform", "signal", "sigint") + package_type = "library" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + } + exports_sources = ["CMakeLists.txt"] + + @property + def _min_cppstd(self): + return 11 + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def configure(self): + if is_msvc(self): + del self.options.shared + self.package_type = "static-library" + if self.options.get_safe("shared"): + self.options.rm_safe("fPIC") + + def layout(self): + cmake_layout(self, src_folder="src") + + def validate(self): + if self.settings.compiler.cppstd: + check_min_cppstd(self, self._min_cppstd) + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + tc.variables["CTRL_C_SRC_DIR"] = self.source_folder.replace("\\", "/") + tc.generate() + + def build(self): + cmake = CMake(self) + cmake.configure(build_script_folder=os.path.join(self.source_folder, os.pardir)) + cmake.build() + + def package(self): + copy(self, "LICENSE", self.source_folder, os.path.join(self.package_folder, "licenses")) + cmake = CMake(self) + cmake.install() + + def package_info(self): + self.cpp_info.libs = ["ctrl-c"] + + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.system_libs.append("m") diff --git a/recipes/ctrl-c/all/test_package/CMakeLists.txt b/recipes/ctrl-c/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..6e5e89641e866 --- /dev/null +++ b/recipes/ctrl-c/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) + +find_package(ctrl-c REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE ctrl-c::ctrl-c) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) diff --git a/recipes/ctrl-c/all/test_package/conanfile.py b/recipes/ctrl-c/all/test_package/conanfile.py new file mode 100644 index 0000000000000..ef5d7042163ec --- /dev/null +++ b/recipes/ctrl-c/all/test_package/conanfile.py @@ -0,0 +1,26 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/ctrl-c/all/test_package/test_package.cpp b/recipes/ctrl-c/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..a36109950fc83 --- /dev/null +++ b/recipes/ctrl-c/all/test_package/test_package.cpp @@ -0,0 +1,8 @@ +#include "ctrl-c.h" + +int main(void) { + auto id = CtrlCLibrary::SetCtrlCHandler([](CtrlCLibrary::CtrlSignal signal){ return true;}); + CtrlCLibrary::ResetCtrlCHandler(id); + + return 0; +} diff --git a/recipes/ctrl-c/config.yml b/recipes/ctrl-c/config.yml new file mode 100644 index 0000000000000..40341aa3db6cd --- /dev/null +++ b/recipes/ctrl-c/config.yml @@ -0,0 +1,3 @@ +versions: + "1.0.0": + folder: all diff --git a/recipes/cubicinterpolation/all/conanfile.py b/recipes/cubicinterpolation/all/conanfile.py index 2525795c99b74..bc39a02e7855c 100644 --- a/recipes/cubicinterpolation/all/conanfile.py +++ b/recipes/cubicinterpolation/all/conanfile.py @@ -42,8 +42,7 @@ def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - # TODO: update boost dependency as soon as we deprecate conan1.x (see discussion in #11207) - self.requires("boost/1.83.0") + self.requires("boost/1.85.0") self.requires("eigen/3.4.0") @property diff --git a/recipes/curlpp/all/conandata.yml b/recipes/curlpp/all/conandata.yml new file mode 100644 index 0000000000000..81a27c2d764c6 --- /dev/null +++ b/recipes/curlpp/all/conandata.yml @@ -0,0 +1,15 @@ +sources: + "0.8.1.cci.20240530": + url: "https://github.com/jpbarrette/curlpp/archive/8840ec806a75a6def9ed07845a620f6d170e5821.tar.gz" + sha256: "1260326d966ec75a50feccb5411268f9aeca667d97f8132973bdb0783ecceb3c" +patches: + "0.8.1.cci.20240530": + - patch_file: "patches/0001-disable-static-on-shared.patch" + patch_description: "disable building static library on shared=True" + patch_type: "conan" + - patch_file: "patches/0002-disable-cpp11.patch" + patch_description: "disable specifying C++11" + patch_type: "conan" + - patch_file: "patches/0003-replace-project-declaration.patch" + patch_description: "switch positions between project() and cmake_minimum_required()" + patch_type: "conan" diff --git a/recipes/curlpp/all/conanfile.py b/recipes/curlpp/all/conanfile.py new file mode 100644 index 0000000000000..706675da9ba61 --- /dev/null +++ b/recipes/curlpp/all/conanfile.py @@ -0,0 +1,90 @@ +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.build import check_min_cppstd +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rmdir, rm +from conan.tools.scm import Version +from conan.tools.microsoft import is_msvc +import os + +required_conan_version = ">=1.53.0" + +class CurlppConan(ConanFile): + name = "curlpp" + description = "C++ wrapper around libcURL" + license = "MIT" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/jpbarrette/curlpp" + topics = ("curl", "libcurl") + package_type = "library" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + } + + @property + def _min_cppstd(self): + return 11 + + def export_sources(self): + export_conandata_patches(self) + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + + def layout(self): + cmake_layout(self, src_folder="src") + + def requirements(self): + # As it's a wrapper, it includes curl symbols in its public headers + self.requires("libcurl/8.9.1", transitive_headers=True, transitive_libs=True) + + def validate(self): + if self.settings.compiler.get_safe("cppstd"): + check_min_cppstd(self, self._min_cppstd) + else: + if self.settings.compiler == "gcc" and Version(self.settings.compiler.version) < "6": + raise ConanInvalidConfiguration("${self.ref} requires C++11. Please set 'compiler.cppstd=11'.") + if self.settings.compiler == "apple-clang" and Version(self.settings.compiler.version) < "14": + raise ConanInvalidConfiguration("${self.ref} requires C++11. Please set 'compiler.cppstd=11'.") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + tc.variables["CURLPP_BUILD_SHARED_LIBS"] = self.options.shared + tc.generate() + deps = CMakeDeps(self) + deps.generate() + + def build(self): + apply_conandata_patches(self) + cmake = CMake(self) + cmake.configure() + cmake.build() + + def package(self): + copy(self, "LICENSE", os.path.join(self.source_folder, "doc"), os.path.join(self.package_folder, "licenses")) + cmake = CMake(self) + cmake.install() + + rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) + rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) + rm(self, "curlpp-config", os.path.join(self.package_folder, "bin")) + + def package_info(self): + self.cpp_info.libs = ["libcurlpp" if is_msvc(self) and not self.options.shared else "curlpp"] + + self.cpp_info.set_property("cmake_file_name", "curlpp") + self.cpp_info.set_property("cmake_target_name", "curlpp::curlpp") diff --git a/recipes/curlpp/all/patches/0001-disable-static-on-shared.patch b/recipes/curlpp/all/patches/0001-disable-static-on-shared.patch new file mode 100644 index 0000000000000..4660e359d71c2 --- /dev/null +++ b/recipes/curlpp/all/patches/0001-disable-static-on-shared.patch @@ -0,0 +1,34 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 4f550b5..ca97e64 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -108,7 +108,7 @@ if(CURLPP_BUILD_SHARED_LIBS) + target_include_directories(${PROJECT_NAME} PUBLIC $) + target_link_libraries(${PROJECT_NAME} PUBLIC CURL::libcurl ${CONAN_LIBS}) + set_target_properties(${PROJECT_NAME} PROPERTIES SOVERSION 1 VERSION 1.0.0) +-endif() ++else() + + add_library(${PROJECT_NAME}_static STATIC ${HeaderFileList} ${SourceFileList}) + add_library(${PROJECT_NAME}::${PROJECT_NAME}_static ALIAS ${PROJECT_NAME}_static) +@@ -126,16 +126,16 @@ SET_TARGET_PROPERTIES(${PROJECT_NAME}_static PROPERTIES OUTPUT_NAME ${PROJECT_NA + # so we add a "lib" prefix (which is default on other platforms anyway): + SET_TARGET_PROPERTIES(${PROJECT_NAME}_static PROPERTIES PREFIX "lib") +-target_link_libraries(${PROJECT_NAME}_static ${CURL_LIBRARIES} ${CONAN_LIBS}) +- ++target_link_libraries(${PROJECT_NAME}_static CURL::libcurl ${CONAN_LIBS}) ++endif() + # install headers + install(FILES "${PROJECT_SOURCE_DIR}/cmake/curlppConfig.cmake" DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/curlpp") + install(DIRECTORY include/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) + + if(CURLPP_BUILD_SHARED_LIBS) + install(TARGETS curlpp EXPORT curlppTargets INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) +-endif() ++else() + install(TARGETS curlpp_static EXPORT curlppTargets INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) +- ++endif() + install( + EXPORT curlppTargets + DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/curlpp" diff --git a/recipes/curlpp/all/patches/0002-disable-cpp11.patch b/recipes/curlpp/all/patches/0002-disable-cpp11.patch new file mode 100644 index 0000000000000..972db13b339f7 --- /dev/null +++ b/recipes/curlpp/all/patches/0002-disable-cpp11.patch @@ -0,0 +1,26 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index ca97e64..bdb257e 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -22,7 +22,7 @@ if(WIN32) + cmake_minimum_required(VERSION 3.4) + + # c++ 11 support from cmake 3.4 or newer +- set(CMAKE_CXX_STANDARD 11) # C++11... ++ # set(CMAKE_CXX_STANDARD 11) # C++11... + set(CMAKE_CXX_STANDARD_REQUIRED ON) #...is required... + set(CMAKE_CXX_EXTENSIONS OFF) #...without compiler extensions like gnu++11 + +@@ -43,10 +43,10 @@ if(WIN32) + # + # for non-windows platform we try to keep cmake 2.8 support + # since entreprise distribution tends to have 2.8 version. +- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") ++ # set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") + else() + # c++ 11 support from cmake 3.1 or newer +- set(CMAKE_CXX_STANDARD 11) # C++11... ++ # set(CMAKE_CXX_STANDARD 11) # C++11... + set(CMAKE_CXX_STANDARD_REQUIRED ON) #...is required... + set(CMAKE_CXX_EXTENSIONS OFF) #...without compiler extensions like gnu++11 + endif() diff --git a/recipes/curlpp/all/patches/0003-replace-project-declaration.patch b/recipes/curlpp/all/patches/0003-replace-project-declaration.patch new file mode 100644 index 0000000000000..d5aa092f726ef --- /dev/null +++ b/recipes/curlpp/all/patches/0003-replace-project-declaration.patch @@ -0,0 +1,19 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index bfba06b..7f4c6fd 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,6 +1,3 @@ +-project(curlpp) +- +- + # In response to CMake 3.0 generating warnings regarding policy CMP0042, + # the OSX RPATH settings have been updated per recommendations found + # in the CMake Wiki: +@@ -52,6 +49,7 @@ if(WIN32) + endif() + endif() + ++project(curlpp) + + # Conan.io integration + if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/conanbuildinfo.cmake) diff --git a/recipes/curlpp/all/test_package/CMakeLists.txt b/recipes/curlpp/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..b5fa1057f20ec --- /dev/null +++ b/recipes/curlpp/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) + +find_package(curlpp REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE curlpp::curlpp) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) diff --git a/recipes/curlpp/all/test_package/conanfile.py b/recipes/curlpp/all/test_package/conanfile.py new file mode 100644 index 0000000000000..ef5d7042163ec --- /dev/null +++ b/recipes/curlpp/all/test_package/conanfile.py @@ -0,0 +1,26 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/curlpp/all/test_package/test_package.cpp b/recipes/curlpp/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..a1ad47c5108eb --- /dev/null +++ b/recipes/curlpp/all/test_package/test_package.cpp @@ -0,0 +1,11 @@ + +#include +#include +#include + +using namespace curlpp::options; + +int main(int, char **) { + curlpp::Easy myRequest; + myRequest.setOpt("http://example.com"); +} diff --git a/recipes/curlpp/config.yml b/recipes/curlpp/config.yml new file mode 100644 index 0000000000000..1925bfdc53ee3 --- /dev/null +++ b/recipes/curlpp/config.yml @@ -0,0 +1,3 @@ +versions: + "0.8.1.cci.20240530": + folder: all diff --git a/recipes/cutlass/all/conandata.yml b/recipes/cutlass/all/conandata.yml new file mode 100644 index 0000000000000..523f2fccdef91 --- /dev/null +++ b/recipes/cutlass/all/conandata.yml @@ -0,0 +1,7 @@ +sources: + "3.5.1": + url: "https://github.com/NVIDIA/cutlass/archive/refs/tags/v3.5.1.tar.gz" + sha256: "20b7247cda2d257cbf8ba59ba3ca40a9211c4da61a9c9913e32b33a2c5883a36" + "3.5.0": + url: "https://github.com/NVIDIA/cutlass/archive/refs/tags/v3.5.0.tar.gz" + sha256: "ef6af8526e3ad04f9827f35ee57eec555d09447f70a0ad0cf684a2e426ccbcb6" diff --git a/recipes/cutlass/all/conanfile.py b/recipes/cutlass/all/conanfile.py new file mode 100644 index 0000000000000..b134b6034bae1 --- /dev/null +++ b/recipes/cutlass/all/conanfile.py @@ -0,0 +1,106 @@ +import os + +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.build import check_min_cppstd +from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout +from conan.tools.env import VirtualBuildEnv +from conan.tools.files import copy, get, rmdir, replace_in_file +from conan.tools.scm import Version + +required_conan_version = ">=1.52.0" + + +class CutlassConan(ConanFile): + name = "cutlass" + description = "CUTLASS: CUDA Templates for Linear Algebra Subroutines" + license = "BSD-3-Clause" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/NVIDIA/cutlass" + topics = ("linear-algebra", "gpu", "cuda", "deep-learning", "nvidia", "header-only") + + package_type = "header-library" + settings = "os", "arch", "compiler", "build_type" + short_paths = True + # TODO: add header_only=False option + + @property + def _min_cppstd(self): + return 17 + + @property + def _compilers_minimum_version(self): + return { + "gcc": "7", + "clang": "7", + "apple-clang": "7", + "msvc": "192", + "Visual Studio": "16", + } + + def layout(self): + cmake_layout(self, src_folder="src") + + def package_id(self): + self.info.clear() + + def validate(self): + if self.settings.compiler.get_safe("cppstd"): + check_min_cppstd(self, self._min_cppstd) + minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) + if minimum_version and Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration( + f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." + ) + + def build_requirements(self): + self.tool_requires("cmake/[>=3.19 <4]") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + # Install via CMake to ensure headers are configured correctly + tc = CMakeToolchain(self) + tc.cache_variables["CMAKE_SUPPRESS_REGENERATION"] = True + tc.cache_variables["CUTLASS_REVISION"]=f"v{self.version}" + tc.cache_variables["CUTLASS_NATIVE_CUDA"] = False + tc.cache_variables["CUTLASS_ENABLE_HEADERS_ONLY"] = True + tc.cache_variables["CUTLASS_ENABLE_TOOLS"] = False + tc.cache_variables["CUTLASS_ENABLE_LIBRARY"] = False + tc.cache_variables["CUTLASS_ENABLE_PROFILER"] = False + tc.cache_variables["CUTLASS_ENABLE_PERFORMANCE"] = False + tc.cache_variables["CUTLASS_ENABLE_TESTS"] = False + tc.cache_variables["CUTLASS_ENABLE_GTEST_UNIT_TESTS"] = False + tc.cache_variables["CUTLASS_ENABLE_CUBLAS"] = False + tc.cache_variables["CUTLASS_ENABLE_CUDNN"] = False + tc.generate() + VirtualBuildEnv(self).generate() + + def _patch_sources(self): + # Don't look for CUDA, we're only installing the headers + replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), "include(${CMAKE_CURRENT_SOURCE_DIR}/CUDA.cmake)", + """ + if(NOT CUTLASS_ENABLE_HEADERS_ONLY) + include(${CMAKE_CURRENT_SOURCE_DIR}/CUDA.cmake) + endif()""") + + def build(self): + self._patch_sources() + cmake = CMake(self) + cmake.configure() + cmake.build() + + def package(self): + copy(self, "LICENSE.txt", self.source_folder, os.path.join(self.package_folder, "licenses")) + cmake = CMake(self) + cmake.install() + rmdir(self, os.path.join(self.package_folder, "lib")) + rmdir(self, os.path.join(self.package_folder, "test")) + + + def package_info(self): + self.cpp_info.set_property("cmake_file_name", "NvidiaCutlass") + self.cpp_info.set_property("cmake_target_name", "nvidia::cutlass::cutlass") + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] diff --git a/recipes/cutlass/all/test_package/CMakeLists.txt b/recipes/cutlass/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..a4872b3ed37c7 --- /dev/null +++ b/recipes/cutlass/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) + +find_package(NvidiaCutlass REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE nvidia::cutlass::cutlass) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) diff --git a/recipes/cutlass/all/test_package/conanfile.py b/recipes/cutlass/all/test_package/conanfile.py new file mode 100644 index 0000000000000..3a91c9439218e --- /dev/null +++ b/recipes/cutlass/all/test_package/conanfile.py @@ -0,0 +1,26 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def layout(self): + cmake_layout(self) + + def requirements(self): + self.requires(self.tested_reference_str) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/cutlass/all/test_package/test_package.cpp b/recipes/cutlass/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..9e74847cbedd3 --- /dev/null +++ b/recipes/cutlass/all/test_package/test_package.cpp @@ -0,0 +1,10 @@ +#include + +#include + +int main() { + std::cout << "CUTLASS version: " << + cutlass::getVersionMajor() << "." << + cutlass::getVersionMinor() << "." << + cutlass::getVersionPatch() << std::endl; +} diff --git a/recipes/cutlass/config.yml b/recipes/cutlass/config.yml new file mode 100644 index 0000000000000..d6d6471b30fef --- /dev/null +++ b/recipes/cutlass/config.yml @@ -0,0 +1,5 @@ +versions: + "3.5.1": + folder: all + "3.5.0": + folder: all diff --git a/recipes/cxxgraph/all/conandata.yml b/recipes/cxxgraph/all/conandata.yml new file mode 100644 index 0000000000000..3b4bdb95b9d3a --- /dev/null +++ b/recipes/cxxgraph/all/conandata.yml @@ -0,0 +1,7 @@ +sources: + "4.1.0": + url: "https://github.com/ZigRazor/CXXGraph/archive/refs/tags/v4.1.0.tar.gz" + sha256: "1f6601abfcb692f35bfe14f2a34b2302f70213a257b0f7d541a110d6bd460040" + "3.1.0": + url: "https://github.com/ZigRazor/CXXGraph/archive/refs/tags/v3.1.0.tar.gz" + sha256: "54838d0d35a6f2685cf45e50e888146aef3c1a10fbbdddb939b3985c7953087a" diff --git a/recipes/cxxgraph/all/conanfile.py b/recipes/cxxgraph/all/conanfile.py new file mode 100644 index 0000000000000..9765a25c1f6eb --- /dev/null +++ b/recipes/cxxgraph/all/conanfile.py @@ -0,0 +1,87 @@ +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.build import check_min_cppstd +from conan.tools.files import copy, get +from conan.tools.layout import basic_layout +from conan.tools.scm import Version +from conan.tools.microsoft import is_msvc +import os + + +required_conan_version = ">=1.52.0" + + +class CxxgraphConan(ConanFile): + name = "cxxgraph" + description = "Header-Only C++ Library for Graph Representation and Algorithms" + license = "MPL-2.0" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/ZigRazor/CXXGraph/" + topics = ("graph", "partitioning-algorithms", "dijkstra-algorithm", "graph-theory-algorithms", "header-only") + package_type = "header-library" + settings = "os", "arch", "compiler", "build_type" + no_copy_source = True + + @property + def _min_cppstd(self): + return 17 + + @property + def _compilers_minimum_version(self): + return { + "gcc": "8", + "clang": "7", + "apple-clang": "12", + "Visual Studio": "17", + "msvc": "193", + } + + def configure(self): + if Version(self.version) < "4.0.0": + self.license = "AGPL-3.0-later" + + def layout(self): + basic_layout(self, src_folder="src") + + def package_id(self): + self.info.clear() + + def validate(self): + if self.settings.compiler.get_safe("cppstd"): + check_min_cppstd(self, self._min_cppstd) + minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) + if minimum_version and Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration( + f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." + ) + + # TODO: remove this check once the bug is fixed + # https://github.com/ZigRazor/CXXGraph/pull/416 + # https://github.com/ZigRazor/CXXGraph/pull/417 + if is_msvc(self): + raise ConanInvalidConfiguration(f"{self.ref} doesn't support Visual Studio due to fold expression bug") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def package(self): + copy(self, "LICENSE", self.source_folder, os.path.join(self.package_folder, "licenses")) + copy( + self, + "*.h", + os.path.join(self.source_folder, "include"), + os.path.join(self.package_folder, "include"), + ) + copy( + self, + "*.hpp", + os.path.join(self.source_folder, "include"), + os.path.join(self.package_folder, "include"), + ) + + def package_info(self): + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] + + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.system_libs.extend(["pthread"]) diff --git a/recipes/cxxgraph/all/test_package/CMakeLists.txt b/recipes/cxxgraph/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..833f2dae3436f --- /dev/null +++ b/recipes/cxxgraph/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) + +find_package(cxxgraph REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE cxxgraph::cxxgraph) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) diff --git a/recipes/cxxgraph/all/test_package/conanfile.py b/recipes/cxxgraph/all/test_package/conanfile.py new file mode 100644 index 0000000000000..3a91c9439218e --- /dev/null +++ b/recipes/cxxgraph/all/test_package/conanfile.py @@ -0,0 +1,26 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def layout(self): + cmake_layout(self) + + def requirements(self): + self.requires(self.tested_reference_str) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/cxxgraph/all/test_package/test_package.cpp b/recipes/cxxgraph/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..f651fa10d2f1e --- /dev/null +++ b/recipes/cxxgraph/all/test_package/test_package.cpp @@ -0,0 +1,34 @@ +#include + +#include "CXXGraph/CXXGraph.hpp" + +int main() { + CXXGraph::Node node0("0", 0); + CXXGraph::Node node1("1", 1); + CXXGraph::Node node2("2", 2); + CXXGraph::Node node3("3", 3); + + CXXGraph::UndirectedWeightedEdge edge1(1, node1, node2, 2.0); + CXXGraph::UndirectedWeightedEdge edge2(2, node2, node3, 2.0); + CXXGraph::UndirectedWeightedEdge edge3(3, node0, node1, 2.0); + CXXGraph::UndirectedWeightedEdge edge4(4, node0, node3, 1.0); + + CXXGraph::T_EdgeSet edgeSet; + edgeSet.insert(std::make_shared>(edge1)); + edgeSet.insert(std::make_shared>(edge2)); + edgeSet.insert(std::make_shared>(edge3)); + edgeSet.insert(std::make_shared>(edge4)); + + // Can print out the edges for debugging + std::cout << edge1 << "\n"; + std::cout << edge2 << "\n"; + std::cout << edge3 << "\n"; + std::cout << edge4 << "\n"; + + CXXGraph::Graph graph(edgeSet); + auto res = graph.dijkstra(node0, node2); + + std::cout << "Dijkstra Result: " << res.result << "\n"; + + return 0; +} diff --git a/recipes/cxxgraph/config.yml b/recipes/cxxgraph/config.yml new file mode 100644 index 0000000000000..e92b5abf9b97b --- /dev/null +++ b/recipes/cxxgraph/config.yml @@ -0,0 +1,5 @@ +versions: + "4.1.0": + folder: all + "3.1.0": + folder: all diff --git a/recipes/cyrus-sasl/all/conanfile.py b/recipes/cyrus-sasl/all/conanfile.py index e29d9fed196d8..78ec1f2f5f46a 100644 --- a/recipes/cyrus-sasl/all/conanfile.py +++ b/recipes/cyrus-sasl/all/conanfile.py @@ -41,6 +41,7 @@ class CyrusSaslConan(ConanFile): "with_postgresql": [True, False], "with_mysql": [True, False], "with_sqlite3": [True, False], + "with_saslauthd": [True, False], } default_options = { "shared": False, @@ -57,6 +58,7 @@ class CyrusSaslConan(ConanFile): "with_postgresql": False, "with_mysql": False, "with_sqlite3": False, + "with_saslauthd": True, } @property @@ -66,6 +68,9 @@ def _settings_build(self): def config_options(self): if self.settings.os == "Windows": del self.options.fPIC + # saslauthd doesn't compile on Windows + # https://www.cyrusimap.org/sasl/sasl/windows.html#install-windows + del self.options.with_saslauthd if is_msvc(self): # always required del self.options.with_openssl @@ -137,6 +142,7 @@ def _generate_autotools(self): "--with-mysql={}".format(rootpath_no(self.options.with_mysql, "libmysqlclient")), "--without-sqlite", "--with-sqlite3={}".format(rootpath_no(self.options.with_sqlite3, "sqlite3")), + "--with-saslauthd={}".format(yes_no(self.options.with_saslauthd)), ]) if self.options.with_gssapi: tc.configure_args.append("--with-gss_impl=mit") @@ -242,7 +248,9 @@ def package_info(self): self.cpp_info.libs = ["sasl2"] if self.settings.os in ["Linux", "FreeBSD"]: - self.cpp_info.system_libs = ["resolv", "crypt"] + self.cpp_info.system_libs = ["resolv"] + if self.options.with_saslauthd: + self.cpp_info.system_libs.append("crypt") elif is_msvc(self): self.cpp_info.system_libs = ["ws2_32"] diff --git a/recipes/dacap-clip/all/conandata.yml b/recipes/dacap-clip/all/conandata.yml index a548f37295671..4c3c17aeedcf5 100644 --- a/recipes/dacap-clip/all/conandata.yml +++ b/recipes/dacap-clip/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.9": + url: "https://github.com/dacap/clip/archive/refs/tags/v1.9.tar.gz" + sha256: "e8af414c720784a6005419afb087786c05602e998ec52b2efe9e3112b7535d30" "1.8": url: "https://github.com/dacap/clip/archive/refs/tags/v1.8.tar.gz" sha256: "a54d243451fb483590ffd9239a3c55f8d8e672d44df63dc2b81da01a229074bc" diff --git a/recipes/dacap-clip/config.yml b/recipes/dacap-clip/config.yml index 80ca8c43729e6..baafafbfe03c1 100644 --- a/recipes/dacap-clip/config.yml +++ b/recipes/dacap-clip/config.yml @@ -1,4 +1,6 @@ versions: + "1.9": + folder: "all" "1.8": folder: "all" "1.7": diff --git a/recipes/dataframe/all/conandata.yml b/recipes/dataframe/all/conandata.yml index 85f628c2e20ac..5505b9c55bd20 100644 --- a/recipes/dataframe/all/conandata.yml +++ b/recipes/dataframe/all/conandata.yml @@ -1,4 +1,13 @@ sources: + "3.3.0": + url: "https://github.com/hosseinmoein/DataFrame/archive/refs/tags/3.3.0.tar.gz" + sha256: "57a722592a29ee8fca902983411c78e7f4179c402a8b0b905f96916c9694672a" + "3.2.0": + url: "https://github.com/hosseinmoein/DataFrame/archive/refs/tags/3.2.0.tar.gz" + sha256: "44c513ef7956976738c2ca37384a220c5383e95fc363ad933541c6f3eef9d294" + "3.1.0": + url: "https://github.com/hosseinmoein/DataFrame/archive/refs/tags/3.1.0.tar.gz" + sha256: "09280a81f17d87d171062210c904c1acd94b1cdcf4c040eaa16cc9d224d526d4" "3.0.0": url: "https://github.com/hosseinmoein/DataFrame/archive/refs/tags/3.0.0.tar.gz" sha256: "9266fb85c518a251a5440e490c81615601791f2de2fad8755aa09f13a0c541f9" @@ -14,21 +23,6 @@ sources: "2.0.0": url: "https://github.com/hosseinmoein/DataFrame/archive/refs/tags/2.0.0.tar.gz" sha256: "df46ab60153f75ef0a1ab269e6b107ec34fdc467993c3984029d7deb5e0fab6c" - "1.22.0": - url: "https://github.com/hosseinmoein/DataFrame/archive/refs/tags/1.22.0.tar.gz" - sha256: "4b244241cd56893fccb22f7c874588f0d86b444912382ed6e9a4cf95e55ffda2" - "1.21.0": - url: "https://github.com/hosseinmoein/DataFrame/archive/refs/tags/1.21.0.tar.gz" - sha256: "a6b07eaaf628225a34e4402c1a6e311430e8431455669ac03691d92f44081172" - "1.20.0": - url: "https://github.com/hosseinmoein/DataFrame/archive/refs/tags/1.20.0.tar.gz" - sha256: "5c241c71823c6975251f49316e03724f06cd3a288892f5a76dd504fe08700b6d" - "1.19.0": - url: "https://github.com/hosseinmoein/DataFrame/archive/1.19.0.tar.gz" - sha256: "81382e9c68df7c52f69f645b1830fcd3634eedc07fa3d2024ee6c57cf2cdb7ff" - "1.18.0": - url: "https://github.com/hosseinmoein/DataFrame/archive/1.18.0.tar.gz" - sha256: "8cdb8b246263fbd8fcef07b6300f6aefb58b3a54cd67e5cbe5383bc948305844" patches: "2.0.0": - patch_file: "patches/2.0.0-0001-use-abs.patch" diff --git a/recipes/dataframe/all/conanfile.py b/recipes/dataframe/all/conanfile.py index f523ba86724db..6d7b9ebefe575 100644 --- a/recipes/dataframe/all/conanfile.py +++ b/recipes/dataframe/all/conanfile.py @@ -98,9 +98,6 @@ def layout(self): cmake_layout(self, src_folder="src") def validate(self): - if is_msvc(self) and self.options.shared and Version(self.version) < "1.20.0": - raise ConanInvalidConfiguration(f"{self.ref} doesn't support shared lib with Visual Studio") - if self.settings.compiler.get_safe("cppstd"): check_min_cppstd(self, self._min_cppstd) minimum_version = self._minimum_compilers_version.get(str(self.settings.compiler), False) @@ -122,33 +119,13 @@ def source(self): def generate(self): tc = CMakeToolchain(self) - if Version(self.version) >= "1.20.0": - tc.variables["HMDF_TESTING"] = False - tc.variables["HMDF_EXAMPLES"] = False - tc.variables["HMDF_BENCHMARKS"] = False - elif Version(self.version) >= "1.14.0": - tc.variables["ENABLE_TESTING"] = False + tc.variables["HMDF_TESTING"] = False + tc.variables["HMDF_EXAMPLES"] = False + tc.variables["HMDF_BENCHMARKS"] = False tc.generate() - def _patch_sources(self): - apply_conandata_patches(self) - # Don't pollute RPATH - if Version(self.version) < "1.20.0": - replace_in_file( - self, - os.path.join(self.source_folder, "CMakeLists.txt"), - textwrap.dedent("""\ - include(AddInstallRPATHSupport) - add_install_rpath_support(BIN_DIRS "${CMAKE_INSTALL_FULL_LIBDIR}" - LIB_DIRS "${CMAKE_INSTALL_FULL_BINDIR}" - INSTALL_NAME_DIR "${CMAKE_INSTALL_FULL_LIBDIR}" - USE_LINK_PATH) - """), - "", - ) - def build(self): - self._patch_sources() + apply_conandata_patches(self) cmake = CMake(self) cmake.configure() cmake.build() @@ -176,10 +153,7 @@ def package_info(self): self.cpp_info.system_libs.extend(["pthread", "rt", "m"]) if is_msvc(self): self.cpp_info.defines.append("_USE_MATH_DEFINES") - if Version(self.version) < "1.20.0" and not self.options.shared: - # weird but required in those versions of dataframe - self.cpp_info.defines.append("LIBRARY_EXPORTS") - if Version(self.version) >= "1.20.0" and self.options.shared: + if self.options.shared: self.cpp_info.defines.append("HMDF_SHARED") # TODO: to remove in conan v2 once cmake_find_package_* generators removed diff --git a/recipes/dataframe/all/test_package/CMakeLists.txt b/recipes/dataframe/all/test_package/CMakeLists.txt index f0af8e717acbf..74034b149b7c0 100644 --- a/recipes/dataframe/all/test_package/CMakeLists.txt +++ b/recipes/dataframe/all/test_package/CMakeLists.txt @@ -5,11 +5,10 @@ find_package(DataFrame REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) target_link_libraries(${PROJECT_NAME} PRIVATE DataFrame::DataFrame) -if (DataFrame_VERSION VERSION_GREATER_EQUAL "2.1.0") +if(DataFrame_VERSION VERSION_GREATER_EQUAL "2.3.0") + target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_23) +elseif(DataFrame_VERSION VERSION_GREATER_EQUAL "2.1.0") target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_20) else() target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) endif() -if (DataFrame_VERSION VERSION_GREATER_EQUAL "2.3.0") - target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_23) -endif() diff --git a/recipes/dataframe/config.yml b/recipes/dataframe/config.yml index 3f378327b126e..7ac485fbb17f1 100644 --- a/recipes/dataframe/config.yml +++ b/recipes/dataframe/config.yml @@ -1,21 +1,19 @@ versions: + "3.3.0": + folder: all + "3.2.0": + folder: all + "3.1.0": + folder: all "3.0.0": folder: all "2.3.0": folder: all + # last version for C++20 "2.2.0": folder: all "2.1.0": folder: all + # last version for C++17 "2.0.0": folder: all - "1.22.0": - folder: all - "1.21.0": - folder: all - "1.20.0": - folder: all - "1.19.0": - folder: all - "1.18.0": - folder: all diff --git a/recipes/date/all/conandata.yml b/recipes/date/all/conandata.yml index bed2d768a8963..94e4bf0b1e51f 100644 --- a/recipes/date/all/conandata.yml +++ b/recipes/date/all/conandata.yml @@ -1,4 +1,10 @@ sources: + "3.0.3": + url: "https://github.com/HowardHinnant/date/archive/refs/tags/v3.0.3.tar.gz" + sha256: "30de45a34a2605cca33a993a9ea54e8f140f23b1caf1acf3c2fd436c42c7d942" + "3.0.2": + url: "https://github.com/HowardHinnant/date/archive/refs/tags/v3.0.2.tar.gz" + sha256: "0449667ea85c5b411c28d08a53f1e420c73416caa5b693c249dac9763eb97b7c" "3.0.1": url: "https://github.com/HowardHinnant/date/archive/refs/tags/v3.0.1.tar.gz" sha256: "7a390f200f0ccd207e8cff6757e04817c1a0aec3e327b006b7eb451c57ee3538" diff --git a/recipes/date/all/conanfile.py b/recipes/date/all/conanfile.py index 315ca73f8ae1f..8db1625fd6096 100644 --- a/recipes/date/all/conanfile.py +++ b/recipes/date/all/conanfile.py @@ -73,9 +73,10 @@ def generate(self): tc.variables["USE_SYSTEM_TZ_DB"] = self.options.use_system_tz_db tc.variables["USE_TZ_DB_IN_DOT"] = self.options.use_tz_db_in_dot tc.variables["BUILD_TZ_LIB"] = not self.options.header_only - # workaround for clang 5 not having string_view - if Version(self.version) >= "3.0.0" and self.settings.compiler == "clang" \ - and Version(self.settings.compiler.version) <= "5.0": + # workaround for gcc 7 and clang 5 not having string_view + if Version(self.version) >= "3.0.0" and \ + ((self.settings.compiler == "gcc" and Version(self.settings.compiler.version) <= "7.0") or \ + (self.settings.compiler == "clang" and Version(self.settings.compiler.version) <= "5.0")): tc.cache_variables["DISABLE_STRING_VIEW"] = True tc.generate() @@ -91,20 +92,13 @@ def build(self): def package(self): copy(self, "LICENSE.txt", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) - if self.options.header_only: - src = os.path.join(self.source_folder, "include", "date") - dst = os.path.join(self.package_folder, "include", "date") - copy(self, "date.h", dst=dst, src=src) - copy(self, "tz.h", dst=dst, src=src) - copy(self, "ptz.h", dst=dst, src=src) - copy(self, "iso_week.h", dst=dst, src=src) - copy(self, "julian.h", dst=dst, src=src) - copy(self, "islamic.h", dst=dst, src=src) - else: + if not self.options.header_only: cmake = CMake(self) cmake.install() rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) rmdir(self, os.path.join(self.package_folder, "CMake")) + copy(self, "*.h", dst=os.path.join(self.package_folder, "include", "date"), + src=os.path.join(self.source_folder, "include", "date")) def package_info(self): self.cpp_info.set_property("cmake_file_name", "date") @@ -120,18 +114,13 @@ def package_info(self): lib_name = "{}tz".format("date-" if Version(self.version) >= "3.0.0" else "") self.cpp_info.components["date-tz"].libs = [lib_name] if self.settings.os in ["Linux", "FreeBSD"]: - self.cpp_info.components["date-tz"].system_libs.append("pthread") - self.cpp_info.components["date-tz"].system_libs.append("m") + self.cpp_info.components["date-tz"].system_libs.extend(["m", "pthread"]) if not self.options.use_system_tz_db: self.cpp_info.components["date-tz"].requires.append("libcurl::libcurl") - if self.options.use_system_tz_db and not self.settings.os == "Windows": - use_os_tzdb = 1 - else: - use_os_tzdb = 0 - - defines = ["USE_OS_TZDB={}".format(use_os_tzdb)] + use_os_tzdb = 1 if self.options.use_system_tz_db and not self.settings.os == "Windows" else 0 + defines = [f"USE_OS_TZDB={use_os_tzdb}"] if self.settings.os == "Windows" and self.options.shared: defines.append("DATE_USE_DLL=1") diff --git a/recipes/date/all/test_package/CMakeLists.txt b/recipes/date/all/test_package/CMakeLists.txt index 276e986aaf0a2..7a4b3fe1c9b08 100644 --- a/recipes/date/all/test_package/CMakeLists.txt +++ b/recipes/date/all/test_package/CMakeLists.txt @@ -1,7 +1,7 @@ -cmake_minimum_required(VERSION 3.8) +cmake_minimum_required(VERSION 3.15) project(test_package LANGUAGES CXX) -find_package(date REQUIRED CONFIG) +find_package(date REQUIRED) add_executable(${PROJECT_NAME} test_package.cpp) target_link_libraries(${PROJECT_NAME} PRIVATE date::date) diff --git a/recipes/date/all/test_package/test_package.cpp b/recipes/date/all/test_package/test_package.cpp index 8dcac9f656989..4ccf632e8e904 100644 --- a/recipes/date/all/test_package/test_package.cpp +++ b/recipes/date/all/test_package/test_package.cpp @@ -1,60 +1,16 @@ #include "date/date.h" #include "date/tz.h" - -#include -#include #include -#include - -class ZoneOffset { -public: - explicit ZoneOffset(std::chrono::minutes offset) - : _offset(offset) {} - - template - auto to_local(date::sys_time tp) const - -> date::local_time::type> { - using namespace date; - using namespace std::chrono; - using LT = local_time::type>; - return LT{(tp + _offset).time_since_epoch()}; - } - - template - auto to_sys(date::local_time tp) const - -> date::sys_time::type> { - using namespace date; - using namespace std::chrono; - using ST = sys_time::type>; - return ST{(tp - _offset).time_since_epoch()}; - } - -private: - std::chrono::minutes _offset; -}; int main() { - using namespace std::chrono; - using namespace date; - - auto date1 = 2015_y/March/22; - std::cout << date1 << '\n'; - auto date2 = March/22/2015; - std::cout << date2 << '\n'; - auto date3 = 22_d/March/2015; - std::cout << date3 << '\n'; - - ZoneOffset p3_45{hours{3} + minutes{45}}; - zoned_time zt{&p3_45, floor(system_clock::now())}; - std::cout << zt.get_sys_time() << " (sys time)\n"; - std::cout << zt.get_local_time() << " (local time)\n"; + const date::year_month_day conan_two(date::year(2023), date::month(2), date::day(22)); + std::cout << "Conan was released on: " << conan_two << std::endl; #ifndef DATE_HEADER_ONLY try { - auto tz = date::current_zone()->name(); - std::cout << "timezone: " << tz << std::endl; - } catch (const std::exception & e) { - std::cout << "exception caught " << e.what() << std::endl; + const date::time_zone* tz = date::current_zone(); + } + catch (const std::exception & e) { } #endif diff --git a/recipes/date/all/test_v1_package/conanfile.py b/recipes/date/all/test_v1_package/conanfile.py deleted file mode 100644 index 09dc5f4a353ed..0000000000000 --- a/recipes/date/all/test_v1_package/conanfile.py +++ /dev/null @@ -1,18 +0,0 @@ -from conans import ConanFile, CMake, tools -import os - - -class TestPackageConan(ConanFile): - settings = "os", "arch", "compiler", "build_type" - generators = "cmake", "cmake_find_package_multi" - - def build(self): - cmake = CMake(self) - cmake.definitions["DATE_HEADER_ONLY"] = self.options["date:header_only"] - cmake.configure() - cmake.build() - - def test(self): - if not tools.cross_building(self): - bin_path = os.path.join("bin", "test_package") - self.run(bin_path, run_environment=True) diff --git a/recipes/date/config.yml b/recipes/date/config.yml index f4831f05aaf9e..7fe264ed2099a 100644 --- a/recipes/date/config.yml +++ b/recipes/date/config.yml @@ -1,4 +1,8 @@ versions: + "3.0.3": + folder: all + "3.0.2": + folder: all "3.0.1": folder: all "3.0.0": diff --git a/recipes/dav1d/all/conandata.yml b/recipes/dav1d/all/conandata.yml index a478887dc4fcc..be4e7f8263cbc 100644 --- a/recipes/dav1d/all/conandata.yml +++ b/recipes/dav1d/all/conandata.yml @@ -1,19 +1,13 @@ sources: + "1.4.3": + url: "http://ftp.videolan.org/pub/videolan/dav1d/1.4.3/dav1d-1.4.3.tar.xz" + sha256: "42fe524bcc82ea3a830057178faace22923a79bad3d819a4962d8cfc54c36f19" + "1.4.1": + url: "http://ftp.videolan.org/pub/videolan/dav1d/1.4.1/dav1d-1.4.1.tar.xz" + sha256: "8d407dd5fe7986413c937b14e67f36aebd06e1fa5cfec679d10e548476f2d5f8" "1.3.0": url: "http://ftp.videolan.org/pub/videolan/dav1d/1.3.0/dav1d-1.3.0.tar.xz" sha256: "6d8be2741c505c47f8f1ced3c9cc427759243436553d01d1acce201f87b39e71" "1.2.1": url: "http://ftp.videolan.org/pub/videolan/dav1d/1.2.1/dav1d-1.2.1.tar.xz" sha256: "4e33eb61ec54c768a16da0cf8fa0928b4c4593f5f804a3c887d4a21c318340b2" - "1.1.0": - url: "http://ftp.videolan.org/pub/videolan/dav1d/1.1.0/dav1d-1.1.0.tar.xz" - sha256: "fb57aae7875f28c30fb3dbae4a3683d27e2f91dde09ce5c60c22cef9bc58dfd1" - "1.0.0": - url: "http://ftp.videolan.org/pub/videolan/dav1d/1.0.0/dav1d-1.0.0.tar.xz" - sha256: "51737db7e4897e599684f873a4725176dd3c779e639411d7c4fce134bb5ebb82" - "0.9.1": - url: "http://ftp.videolan.org/pub/videolan/dav1d/0.9.1/dav1d-0.9.1.tar.xz" - sha256: "a35d6468013eb14e8093ea463594f8b89aba1775a3005fc9ec6fa36b2d2c71d7" - "0.8.1": - url: "http://ftp.videolan.org/pub/videolan/dav1d/0.8.1/dav1d-0.8.1.tar.xz" - sha256: "a4b503063d411dd129f5eb43616675e613b36ac0aa1e449976d645c05add21ea" diff --git a/recipes/dav1d/all/conanfile.py b/recipes/dav1d/all/conanfile.py index 5882f930a7dbd..08d0c4d8be0f5 100644 --- a/recipes/dav1d/all/conanfile.py +++ b/recipes/dav1d/all/conanfile.py @@ -5,7 +5,6 @@ from conan.tools.layout import basic_layout from conan.tools.meson import Meson, MesonToolchain from conan.tools.microsoft import is_msvc -from conan.tools.scm import Version import os required_conan_version = ">=1.53.0" @@ -26,7 +25,7 @@ class Dav1dConan(ConanFile): "bit_depth": ["all", 8, 16], "with_tools": [True, False], "assembly": [True, False], - "with_avx512": [True, False], + "with_avx512": ["deprecated", True, False], } default_options = { "shared": False, @@ -34,7 +33,7 @@ class Dav1dConan(ConanFile): "bit_depth": "all", "with_tools": True, "assembly": True, - "with_avx512": False, + "with_avx512": "deprecated", } def config_options(self): @@ -43,24 +42,27 @@ def config_options(self): if is_msvc(self) and self.settings.build_type == "Debug": # debug builds with assembly often causes linker hangs or LNK1000 self.options.assembly = False - if Version(self.version) < "1.0.0": - del self.options.with_avx512 def configure(self): if self.options.shared: self.options.rm_safe("fPIC") self.settings.rm_safe("compiler.cppstd") self.settings.rm_safe("compiler.libcxx") - if not self.options.assembly: - self.options.rm_safe("with_avx512") def layout(self): basic_layout(self, src_folder="src") + def package_id(self): + del self.info.options.with_avx512 + + def validate(self): + if self.options.with_avx512 != "deprecated": + self.output.warning("The 'with_avx512' option is deprecated and has no effect") + def build_requirements(self): - self.tool_requires("meson/1.2.1") + self.tool_requires("meson/1.4.0") if self.options.assembly: - self.tool_requires("nasm/2.15.05") + self.tool_requires("nasm/2.16.01") def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) @@ -72,8 +74,6 @@ def generate(self): tc = MesonToolchain(self) tc.project_options["enable_tests"] = False tc.project_options["enable_asm"] = self.options.assembly - if Version(self.version) < "1.0.0": - tc.project_options["enable_avx512"] = self.options.get_safe("with_avx512", False) tc.project_options["enable_tools"] = self.options.with_tools if self.options.bit_depth == "all": tc.project_options["bitdepths"] = "8,16" diff --git a/recipes/dav1d/config.yml b/recipes/dav1d/config.yml index 21233fe470f83..d5bc79ec13e97 100644 --- a/recipes/dav1d/config.yml +++ b/recipes/dav1d/config.yml @@ -1,13 +1,9 @@ versions: - "1.3.0": - folder: "all" - "1.2.1": + "1.4.3": folder: "all" - "1.1.0": + "1.4.1": folder: "all" - "1.0.0": - folder: "all" - "0.9.1": + "1.3.0": folder: "all" - "0.8.1": + "1.2.1": folder: "all" diff --git a/recipes/daw_header_libraries/all/conandata.yml b/recipes/daw_header_libraries/all/conandata.yml index da4d268e47a7d..3b7e56824976b 100644 --- a/recipes/daw_header_libraries/all/conandata.yml +++ b/recipes/daw_header_libraries/all/conandata.yml @@ -1,4 +1,22 @@ sources: + "2.114.0": + url: "https://github.com/beached/header_libraries/archive/v2.114.0.tar.gz" + sha256: "c36229424bd68ee8936ad688127303aee69ecd5400a905df75138ed95cbfef53" + "2.110.0": + url: "https://github.com/beached/header_libraries/archive/v2.110.0.tar.gz" + sha256: "6515bb7a130656adff9f1f17d6be69dbd7c40dbcebbe418e9d0cf15bbc71bffc" + "2.107.0": + url: "https://github.com/beached/header_libraries/archive/v2.107.0.tar.gz" + sha256: "b84f7666d004da466d0035e9f475797395e90b6e8f23e000816b45aa13d4fc35" + "2.106.2": + url: "https://github.com/beached/header_libraries/archive/v2.106.2.tar.gz" + sha256: "33609d83aec5a6081efebf871627b7a8bddc2b7f0eb8d4ac14756d403d29d089" + "2.106.1": + url: "https://github.com/beached/header_libraries/archive/v2.106.1.tar.gz" + sha256: "393815fbf249ca1220a216899cae3d2672ca193f9db228a0b99925a9b0f90854" + "2.106.0": + url: "https://github.com/beached/header_libraries/archive/v2.106.0.tar.gz" + sha256: "7838ada09afa69e7a42d742991c4b24b32ba27681e7b4dadf7b1e45c168937b5" "2.101.0": url: "https://github.com/beached/header_libraries/archive/v2.101.0.tar.gz" sha256: "468b3a40b90295f1da8eb79ae5723909269c020e7e8bf3d93d3f4fac7c35195b" @@ -11,30 +29,3 @@ sources: "2.96.1": url: "https://github.com/beached/header_libraries/archive/v2.96.1.tar.gz" sha256: "2a9a5c33baa9e3adc1d82fa13a56522638af13cc39372a0c1c8f5c5d984f1464" - "2.95.0": - url: "https://github.com/beached/header_libraries/archive/v2.95.0.tar.gz" - sha256: "8799c06f0587b202fd6049d95e70b04675acbfdbf6e86ac3bbd061cbb9d42b54" - "2.93.1": - url: "https://github.com/beached/header_libraries/archive/v2.93.1.tar.gz" - sha256: "200690094237e4a2c37ac81c23c8c5138ba90ccdeeb2a1dda37690a9d32301ad" - "2.92.0": - url: "https://github.com/beached/header_libraries/archive/v2.92.0.tar.gz" - sha256: "96835f0ff4d3082a38b4ef4c14653c88e193cd26a08cd406fdbfadcfd654d136" - "2.88.0": - url: "https://github.com/beached/header_libraries/archive/v2.88.0.tar.gz" - sha256: "2a634763f3d34f206f6b352ac9609a89d501059afea0ba7c857bd55adc435890" - "2.85.1": - url: "https://github.com/beached/header_libraries/archive/v2.85.1.tar.gz" - sha256: "fb4880e254a481e3c750261fdb75a1696afc9ef4404e095a7f3ba0683bcd9930" - "2.79.0": - url: "https://github.com/beached/header_libraries/archive/v2.79.0.tar.gz" - sha256: "2dfa8fc9495499379cff39ed648c6bba156a87eb177fc91a860045a410aebb99" - "2.76.3": - url: "https://github.com/beached/header_libraries/archive/v2.76.3.tar.gz" - sha256: "2d66f9aec38fb9a42779e0283fa2fc5842e04d34f2bf655c72a9beb4bf5cc8c8" - "2.76.2": - url: "https://github.com/beached/header_libraries/archive/v2.76.2.tar.gz" - sha256: "bfa2da192360a66e400d03a52f8a7bf0fccd23de1f446a812a8890b11df2c592" - "2.74.2": - url: "https://github.com/beached/header_libraries/archive/v2.74.2.tar.gz" - sha256: "32871df3d314cc9b4e293a9a8c79968d1c963dfd3dd60965dbf704eb18acb218" diff --git a/recipes/daw_header_libraries/all/conanfile.py b/recipes/daw_header_libraries/all/conanfile.py index b6840ea09fa55..98257810d2c5a 100644 --- a/recipes/daw_header_libraries/all/conanfile.py +++ b/recipes/daw_header_libraries/all/conanfile.py @@ -16,7 +16,7 @@ class DawHeaderLibrariesConan(ConanFile): license = "BSL-1.0" url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/beached/header_libraries" - topics = ("algorithms", "helpers", "data-structures") + topics = ("algorithms", "helpers", "data-structures", "header-only") package_type = "header-library" settings = "os", "arch", "compiler", "build_type" no_copy_source = True @@ -44,7 +44,6 @@ def package_id(self): def validate(self): if self.settings.get_safe("compiler.cppstd"): check_min_cppstd(self, self._min_cppstd) - minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) if minimum_version and Version(self.settings.get_safe("compiler.version")) < minimum_version: raise ConanInvalidConfiguration( @@ -54,9 +53,6 @@ def validate(self): def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) - def build(self): - pass - def package(self): copy(self, pattern="LICENSE*", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) copy(self, pattern="*.h", dst=os.path.join(self.package_folder, "include"), src=os.path.join(self.source_folder, "include")) diff --git a/recipes/daw_header_libraries/all/test_package/CMakeLists.txt b/recipes/daw_header_libraries/all/test_package/CMakeLists.txt index 817fb2a992dc4..2474980662644 100644 --- a/recipes/daw_header_libraries/all/test_package/CMakeLists.txt +++ b/recipes/daw_header_libraries/all/test_package/CMakeLists.txt @@ -4,6 +4,10 @@ project(test_package LANGUAGES CXX) find_package(daw-header-libraries REQUIRED CONFIG) -add_executable(${PROJECT_NAME} test_package.cpp) +if(daw-header-libraries_VERSION VERSION_LESS "2.109.0") + add_executable(${PROJECT_NAME} test_package_old.cpp) +else() + add_executable(${PROJECT_NAME} test_package.cpp) +endif() target_link_libraries(${PROJECT_NAME} PRIVATE daw::daw-header-libraries) target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) diff --git a/recipes/daw_header_libraries/all/test_package/test_package.cpp b/recipes/daw_header_libraries/all/test_package/test_package.cpp index 7b47a51d28ef5..63fa16b601f2d 100644 --- a/recipes/daw_header_libraries/all/test_package/test_package.cpp +++ b/recipes/daw_header_libraries/all/test_package/test_package.cpp @@ -1,7 +1,7 @@ -#include "daw/daw_carray.h" +#include "daw/daw_bounded_array.h" int main() { - daw::carray t = { 1, 2, 3, 4, 5, 6 }; + daw::array t = { 1, 2, 3, 4, 5, 6 }; auto val = t[3]; diff --git a/recipes/daw_header_libraries/all/test_package/test_package_old.cpp b/recipes/daw_header_libraries/all/test_package/test_package_old.cpp new file mode 100644 index 0000000000000..7b47a51d28ef5 --- /dev/null +++ b/recipes/daw_header_libraries/all/test_package/test_package_old.cpp @@ -0,0 +1,9 @@ +#include "daw/daw_carray.h" + +int main() { + daw::carray t = { 1, 2, 3, 4, 5, 6 }; + + auto val = t[3]; + + return 0; +} diff --git a/recipes/daw_header_libraries/config.yml b/recipes/daw_header_libraries/config.yml index 209a906c305c7..4668f08dc2c02 100644 --- a/recipes/daw_header_libraries/config.yml +++ b/recipes/daw_header_libraries/config.yml @@ -1,27 +1,21 @@ versions: - "2.101.0": - folder: all - "2.98.5": + "2.114.0": folder: all - "2.97.0": - folder: all - "2.96.1": + "2.110.0": folder: all - "2.95.0": + "2.107.0": folder: all - "2.93.1": + "2.106.2": folder: all - "2.92.0": + "2.106.1": folder: all - "2.88.0": + "2.106.0": folder: all - "2.85.1": - folder: all - "2.79.0": + "2.101.0": folder: all - "2.76.3": + "2.98.5": folder: all - "2.76.2": + "2.97.0": folder: all - "2.74.2": + "2.96.1": folder: all diff --git a/recipes/daw_json_link/all/conandata.yml b/recipes/daw_json_link/all/conandata.yml index 3284b09ee8d98..4226c99f417b1 100644 --- a/recipes/daw_json_link/all/conandata.yml +++ b/recipes/daw_json_link/all/conandata.yml @@ -1,4 +1,13 @@ sources: + "3.29.2": + url: "https://github.com/beached/daw_json_link/archive/refs/tags/v3.29.2.tar.gz" + sha256: "a0450a2d724d83a600d48d503eb11094039a7a4b607fa59b1d7ce83483b1f8b4" + "3.28.3": + url: "https://github.com/beached/daw_json_link/archive/refs/tags/v3.28.3.tar.gz" + sha256: "c9973e8da74c4a6eb84fbd1f86f8048a697068af7dec6aee602e08e9f4df39db" + "3.24.1": + url: "https://github.com/beached/daw_json_link/archive/refs/tags/v3.24.1.tar.gz" + sha256: "439b4678377950f165e3d49d472c0676f0ef2fae3c5e6e7febddd5633f6e4f39" "3.23.2": url: "https://github.com/beached/daw_json_link/archive/refs/tags/v3.23.2.tar.gz" sha256: "fd1234a14c126c79076e0b6e6eceae42afd465c419dc7a7393c69c28aa7f53d4" @@ -23,15 +32,28 @@ sources: "3.15.0": url: "https://github.com/beached/daw_json_link/archive/refs/tags/v3.15.0.tar.gz" sha256: "6f72c69944e33f56823d941b09c8d17ece44b224e802ae0a3416c32f2bdbec40" - "3.14.1": - url: "https://github.com/beached/daw_json_link/archive/refs/tags/v3.14.1.tar.gz" - sha256: "a761c594dabd14b7484f5d286db31e9272f633d2ad0dab44cdae5ff3f06db6fb" - "3.14.0": - url: "https://github.com/beached/daw_json_link/archive/refs/tags/v3.14.tar.gz" - sha256: "07171e1b8f09f525116627015b6618990dc9cfb32357ba821512c0508730c9a4" - "3.12.0": - url: "https://github.com/beached/daw_json_link/archive/v3.12.0.tar.gz" - sha256: "b32097954caae14071893232fd85febbfda1deec34bb939f6aad76c077c6c5d5" - "3.11.1": - url: "https://github.com/beached/daw_json_link/archive/v3.11.1.tar.gz" - sha256: "d2b5cb221892c6b1ecd30fd2e45d168d6b378e97d134e75349703104c5882309" +# When updating this, ensure that the versions are consistent across the rest of the daw libraries +daw_headers_mapping: + "3.29.2": "2.110.0" + "3.28.3": "2.110.0" + "3.24.1": "2.110.0" + "3.23.2": "2.101.0" + "3.23.0": "2.97.0" + "3.20.1": "2.97.0" + "3.19.0": "2.97.0" + "3.17.2": "2.97.0" + "3.17.1": "2.97.0" + "3.16.0": "2.97.0" + "3.15.0": "2.97.0" +daw_utf_mapping: + "3.29.2": "2.2.5" + "3.28.3": "2.2.5" + "3.24.1": "2.2.5" + "3.23.2": "2.2.4" + "3.23.0": "2.2.3" + "3.20.1": "2.2.3" + "3.19.0": "2.2.3" + "3.17.2": "2.2.3" + "3.17.1": "2.2.3" + "3.16.0": "2.2.3" + "3.15.0": "2.2.3" diff --git a/recipes/daw_json_link/all/conanfile.py b/recipes/daw_json_link/all/conanfile.py index f75c692a8d93d..eeaf0710c5e7a 100644 --- a/recipes/daw_json_link/all/conanfile.py +++ b/recipes/daw_json_link/all/conanfile.py @@ -39,12 +39,10 @@ def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - if Version(self.version) < "3.23.2": - self.requires("daw_header_libraries/2.97.0") - self.requires("daw_utf_range/2.2.3") - else: - self.requires("daw_header_libraries/2.101.0") - self.requires("daw_utf_range/2.2.4") + corresponding_daw_header_version = self.conan_data["daw_headers_mapping"][self.version] + self.requires(f"daw_header_libraries/{corresponding_daw_header_version}") + corresponding_daw_utf_version = self.conan_data["daw_utf_mapping"][self.version] + self.requires(f"daw_utf_range/{corresponding_daw_utf_version}") def package_id(self): self.info.clear() diff --git a/recipes/daw_json_link/config.yml b/recipes/daw_json_link/config.yml index e102478003a7f..d7ebeba1581e3 100644 --- a/recipes/daw_json_link/config.yml +++ b/recipes/daw_json_link/config.yml @@ -1,4 +1,10 @@ versions: + "3.29.2": + folder: "all" + "3.28.3": + folder: "all" + "3.24.1": + folder: "all" "3.23.2": folder: "all" "3.23.0": @@ -15,11 +21,3 @@ versions: folder: "all" "3.15.0": folder: "all" - "3.14.1": - folder: "all" - "3.14.0": - folder: "all" - "3.12.0": - folder: "all" - "3.11.1": - folder: "all" diff --git a/recipes/daw_utf_range/all/conandata.yml b/recipes/daw_utf_range/all/conandata.yml index 274810345e204..ee9d8569fa27c 100644 --- a/recipes/daw_utf_range/all/conandata.yml +++ b/recipes/daw_utf_range/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.2.5": + url: "https://github.com/beached/utf_range/archive/v2.2.5.tar.gz" + sha256: "18cc142c319c817da86ed037813cd50a16ff1af8e041a22b8af11beaef30ca32" "2.2.4": url: "https://github.com/beached/utf_range/archive/v2.2.4.tar.gz" sha256: "e6df85d6da445c16507e738d70c6313df2a70e64b739a05d6437b06a5f83b8b1" @@ -11,3 +14,9 @@ sources: "2.2.0": url: "https://github.com/beached/utf_range/archive/v2.2.0.tar.gz" sha256: "00f60360736062403c8a7a94dd07c750366958f20d1864578faecf2e09d84265" +daw_headers_mapping: + "2.2.5": "2.110.0" + "2.2.4": "2.101.0" + "2.2.3": "2.97.0" + "2.2.2": "2.97.0" + "2.2.0": "2.97.0" diff --git a/recipes/daw_utf_range/all/conanfile.py b/recipes/daw_utf_range/all/conanfile.py index ad4fd8d98f0b6..bb05e8ba48169 100644 --- a/recipes/daw_utf_range/all/conanfile.py +++ b/recipes/daw_utf_range/all/conanfile.py @@ -38,10 +38,8 @@ def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - if Version(self.version) >= "2.2.4": - self.requires("daw_header_libraries/2.101.0") - else: - self.requires("daw_header_libraries/2.97.0") + corresponding_daw_header_version = self.conan_data["daw_headers_mapping"][self.version] + self.requires(f"daw_header_libraries/{corresponding_daw_header_version}") def package_id(self): self.info.clear() diff --git a/recipes/daw_utf_range/config.yml b/recipes/daw_utf_range/config.yml index 0856bcef8b94d..86bdc8b77e0d5 100644 --- a/recipes/daw_utf_range/config.yml +++ b/recipes/daw_utf_range/config.yml @@ -1,4 +1,6 @@ versions: + "2.2.5": + folder: "all" "2.2.4": folder: "all" "2.2.3": diff --git a/recipes/dbus/1.x.x/conanfile.py b/recipes/dbus/1.x.x/conanfile.py deleted file mode 100644 index 3f8c353bc153e..0000000000000 --- a/recipes/dbus/1.x.x/conanfile.py +++ /dev/null @@ -1,227 +0,0 @@ -from conan import ConanFile -from conan.errors import ConanInvalidConfiguration -from conan.tools.apple import fix_apple_shared_install_name, is_apple_os -from conan.tools.env import VirtualBuildEnv -from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rename, replace_in_file, rm, rmdir, save -from conan.tools.gnu import PkgConfigDeps -from conan.tools.layout import basic_layout -from conan.tools.meson import Meson, MesonToolchain -from conan.tools.scm import Version -import os -import textwrap - -required_conan_version = ">=1.64.0 <2 || >=2.2.0" - - -class DbusConan(ConanFile): - name = "dbus" - # license is AFL-2.1 OR GPL-2.0-or-later with several other compatible licenses for smaller sections of code - license = "(AFL-2.1 OR GPL-2.0-or-later) AND DocumentRef-COPYING" - url = "https://github.com/conan-io/conan-center-index" - homepage = "https://www.freedesktop.org/wiki/Software/dbus" - description = "D-Bus is a simple system for interprocess communication and coordination." - topics = "bus", "interprocess", "message" - package_type = "library" - settings = "os", "arch", "compiler", "build_type" - short_paths = True - options = { - "shared": [True, False], - "fPIC": [True, False], - "dbus_user": ["ANY"], - "message_bus": [True, False], - "system_socket": [None, "ANY"], - "system_pid_file": [None, "ANY"], - "with_x11": [True, False], - "with_glib": ["deprecated", True, False], - "with_systemd": [True, False], - "with_selinux": [True, False], - "session_socket_dir": ["ANY"], - } - default_options = { - "shared": False, - "fPIC": True, - "dbus_user": "messagebus", - "message_bus": False, - "system_socket": None, - "system_pid_file": None, - "with_x11": False, - "with_glib": "deprecated", - "with_systemd": False, - "with_selinux": False, - "session_socket_dir": "/tmp", - } - - @property - def _has_message_bus_option(self): - return Version(self.version) > "1.15.2" - - def export_sources(self): - export_conandata_patches(self) - - def config_options(self): - if self.settings.os not in ["Linux", "FreeBSD"]: - del self.options.with_systemd - del self.options.with_x11 - del self.options.with_selinux - if self.settings.os == "Windows": - del self.options.fPIC - if not self._has_message_bus_option: - self.options.rm_safe("message_bus") - - def configure(self): - self.settings.rm_safe("compiler.cppstd") - self.settings.rm_safe("compiler.libcxx") - if self.options.shared: - self.options.rm_safe("fPIC") - if not self.options.get_safe("message_bus"): - self.options.rm_safe("dbus_user") - - def layout(self): - basic_layout(self, src_folder="src") - - def requirements(self): - self.requires("expat/2.6.0") - if self.options.get_safe("with_systemd"): - self.requires("libsystemd/253.6") - if self.options.get_safe("with_selinux"): - self.requires("libselinux/3.5") - if self.options.get_safe("with_x11"): - # X11 is only linked into an executable and should not be propagated as a library dependency. - # It should still be provided in a VirtualRunEnv context, though, - # but Conan as of v2.2 does not yet provide a fine-grained enough control over this. - self.requires("xorg/system", visible=False) - - def package_id(self): - del self.info.options.with_glib - # The dbus_user option only effects the installation of dbus during the package method. - # Otherwise, it only appears in the system.conf file in the package. - self.info.options.rm_safe("dbus_user") - - def validate(self): - if self.settings.compiler == "gcc" and Version(self.settings.compiler.version) < 7: - raise ConanInvalidConfiguration(f"{self.ref} requires at least gcc 7.") - if self.options.with_glib != "deprecated": - raise ConanInvalidConfiguration("with_glib option is deprecated and should not be used - the option had no effect.") - - def build_requirements(self): - self.tool_requires("meson/1.4.0") - if not self.conf.get("tools.gnu:pkg_config",check_type=str): - self.tool_requires("pkgconf/2.1.0") - - def source(self): - get(self, **self.conan_data["sources"][self.version], strip_root=True) - - def generate(self): - env = VirtualBuildEnv(self) - env.generate() - tc = MesonToolchain(self) - tc.project_options["asserts"] = not is_apple_os(self) - tc.project_options["checks"] = False - tc.project_options["datadir"] = os.path.join("res", "share") - tc.project_options["localstatedir"] = os.path.join("res", "var") - tc.project_options["sysconfdir"] = os.path.join("res", "etc") - tc.project_options["doxygen_docs"] = "disabled" - tc.project_options["ducktype_docs"] = "disabled" - tc.project_options["qt_help"] = "disabled" - tc.project_options["modular_tests"] = "disabled" - tc.project_options["selinux"] = "enabled" if self.options.get_safe("with_selinux") else "disabled" - tc.project_options["session_socket_dir"] = str(self.options.get_safe("session_socket_dir", "")) - tc.project_options["systemd"] = "enabled" if self.options.get_safe("with_systemd") else "disabled" - if self.options.get_safe("with_systemd"): - tc.project_options["systemd_system_unitdir"] = "/res/lib/systemd/system" - tc.project_options["systemd_user_unitdir"] = "/res/usr/lib/systemd/system" - if self._has_message_bus_option: - tc.project_options["message_bus"] = bool(self.options.message_bus) - if self.options.get_safe("dbus_user"): - tc.project_options["dbus_user"] = str(self.options.dbus_user) - tc.project_options["system_pid_file"] = str(self.options.get_safe("system_pid_file", "")) - tc.project_options["system_socket"] = str(self.options.get_safe("system_socket", "")) - if is_apple_os(self): - tc.project_options["launchd_agent_dir"] = os.path.join("res", "LaunchAgents") - tc.project_options["x11_autolaunch"] = "enabled" if self.options.get_safe("with_x11") else "disabled" - tc.project_options["xml_docs"] = "disabled" - tc.generate() - deps = PkgConfigDeps(self) - deps.generate() - - def _patch_sources(self): - apply_conandata_patches(self) - replace_in_file(self, os.path.join(self.source_folder, "meson.build"), - "subdir('test')", "# subdir('test')") - - def build(self): - self._patch_sources() - meson = Meson(self) - meson.configure() - meson.build() - - def package(self): - copy(self, "COPYING", self.source_folder, os.path.join(self.package_folder, "licenses")) - copy(self, "*", os.path.join(self.source_folder, "LICENSES"), os.path.join(self.package_folder, "licenses")) - meson = Meson(self) - meson.install() - - rm(self, "*.pdb", os.path.join(self.package_folder, "bin")) - rmdir(self, os.path.join(self.package_folder, "res", "share", "doc")) - - rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) - rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) - fix_apple_shared_install_name(self) - if self.settings.os == "Windows" and not self.options.shared: - rename(self, os.path.join(self.package_folder, "lib", "libdbus-1.a"), os.path.join(self.package_folder, "lib", "dbus-1.lib")) - - # TODO: to remove in conan v2 once cmake_find_package_* generators removed - self._create_cmake_module_alias_targets( - os.path.join(self.package_folder, self._module_file_rel_path), - {"dbus-1": "dbus-1::dbus-1"} - ) - - def _create_cmake_module_alias_targets(self, module_file, targets): - content = "" - for alias, aliased in targets.items(): - content += textwrap.dedent(f"""\ - if(TARGET {aliased} AND NOT TARGET {alias}) - add_library({alias} INTERFACE IMPORTED) - set_property(TARGET {alias} PROPERTY INTERFACE_LINK_LIBRARIES {aliased}) - endif() - """) - save(self, module_file, content) - - @property - def _module_file_rel_path(self): - return os.path.join("lib", "cmake", f"conan-official-{self.name}-targets.cmake") - - def package_info(self): - self.cpp_info.set_property("cmake_file_name", "DBus1") - self.cpp_info.set_property("cmake_target_name", "dbus-1") - self.cpp_info.set_property("pkg_config_name", "dbus-1") - self.cpp_info.includedirs.extend([ - os.path.join("include", "dbus-1.0"), - os.path.join("lib", "dbus-1.0", "include"), - ]) - self.cpp_info.resdirs = ["res"] - self.cpp_info.libs = ["dbus-1"] - if self.settings.os == "Linux": - self.cpp_info.system_libs.append("rt") - if self.settings.os == "Windows": - self.cpp_info.system_libs.extend(["iphlpapi", "ws2_32"]) - else: - self.cpp_info.system_libs.append("pthread") - - if not self.options.shared: - self.cpp_info.defines.append("DBUS_STATIC_BUILD") - - self.cpp_info.requires.append("expat::expat") - if self.options.get_safe("with_systemd"): - self.cpp_info.requires.append("libsystemd::libsystemd") - if self.options.get_safe("with_selinux"): - self.cpp_info.requires.append("libselinux::selinux") - - # TODO: to remove in conan v2 once cmake_find_package_* & pkg_config generators removed - self.cpp_info.filenames["cmake_find_package"] = "DBus1" - self.cpp_info.filenames["cmake_find_package_multi"] = "DBus1" - self.cpp_info.names["cmake_find_package"] = "dbus-1" - self.cpp_info.names["cmake_find_package_multi"] = "dbus-1" - self.cpp_info.build_modules["cmake_find_package"] = [self._module_file_rel_path] - self.cpp_info.build_modules["cmake_find_package_multi"] = [self._module_file_rel_path] - self.cpp_info.names["pkg_config"] = "dbus-1" diff --git a/recipes/dbus/1.x.x/test_v1_package/CMakeLists.txt b/recipes/dbus/1.x.x/test_v1_package/CMakeLists.txt deleted file mode 100644 index 925ecbe19e448..0000000000000 --- a/recipes/dbus/1.x.x/test_v1_package/CMakeLists.txt +++ /dev/null @@ -1,8 +0,0 @@ -cmake_minimum_required(VERSION 3.1) -project(test_package) - -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) - -add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ - ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/dbus/1.x.x/conandata.yml b/recipes/dbus/all/conandata.yml similarity index 100% rename from recipes/dbus/1.x.x/conandata.yml rename to recipes/dbus/all/conandata.yml diff --git a/recipes/dbus/all/conanfile.py b/recipes/dbus/all/conanfile.py new file mode 100644 index 0000000000000..0d7c729968e28 --- /dev/null +++ b/recipes/dbus/all/conanfile.py @@ -0,0 +1,224 @@ +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.apple import fix_apple_shared_install_name, is_apple_os +from conan.tools.env import VirtualBuildEnv +from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rename, replace_in_file, rm, rmdir, save +from conan.tools.gnu import PkgConfigDeps +from conan.tools.layout import basic_layout +from conan.tools.meson import Meson, MesonToolchain +from conan.tools.scm import Version +import os +import textwrap + +required_conan_version = ">=1.64.0 <2 || >=2.2.0" + + +class DbusConan(ConanFile): + name = "dbus" + # license is AFL-2.1 OR GPL-2.0-or-later with several other compatible licenses for smaller sections of code + license = "(AFL-2.1 OR GPL-2.0-or-later) AND DocumentRef-COPYING" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://www.freedesktop.org/wiki/Software/dbus" + description = "D-Bus is a simple system for interprocess communication and coordination." + topics = "bus", "interprocess", "message" + package_type = "library" + settings = "os", "arch", "compiler", "build_type" + short_paths = True + options = { + "shared": [True, False], + "fPIC": [True, False], + "dbus_user": [None, "ANY"], + "message_bus": [True, False], + "system_socket": [None, "ANY"], + "system_pid_file": [None, "ANY"], + "with_x11": [True, False], + "with_systemd": [True, False], + "with_selinux": [True, False], + "session_socket_dir": [None, "ANY"], + } + default_options = { + "shared": False, + "fPIC": True, + "dbus_user": "messagebus", + "message_bus": False, + "system_socket": None, + "system_pid_file": None, + "with_x11": False, + "with_systemd": False, + "with_selinux": False, + "session_socket_dir": "/tmp", + } + + @property + def _has_message_bus_option(self): + return Version(self.version) > "1.15.2" + + def export_sources(self): + export_conandata_patches(self) + + def config_options(self): + if self.settings.os not in ["Linux", "FreeBSD"]: + del self.options.with_systemd + del self.options.with_x11 + del self.options.with_selinux + if self.settings.os == "Windows": + del self.options.fPIC + if not self._has_message_bus_option: + self.options.rm_safe("message_bus") + + def configure(self): + self.settings.rm_safe("compiler.cppstd") + self.settings.rm_safe("compiler.libcxx") + if self.options.shared: + self.options.rm_safe("fPIC") + if not self.options.get_safe("message_bus"): + self.options.rm_safe("dbus_user") + + def layout(self): + basic_layout(self, src_folder="src") + + def requirements(self): + self.requires("expat/[>=2.6.2 <3]") + if self.options.get_safe("with_systemd"): + self.requires("libsystemd/253.6") + if self.options.get_safe("with_selinux"): + self.requires("libselinux/3.5") + if self.options.get_safe("with_x11"): + # X11 is only linked into an executable and should not be propagated as a library dependency. + # It should still be provided in a VirtualRunEnv context, though, + # but Conan as of v2.2 does not yet provide a fine-grained enough control over this. + self.requires("xorg/system", visible=False) + + def package_id(self): + # The dbus_user option only effects the installation of dbus during the package method. + # Otherwise, it only appears in the system.conf file in the package. + self.info.options.rm_safe("dbus_user") + + def validate(self): + if self.settings.compiler == "gcc" and Version(self.settings.compiler.version) < 7: + raise ConanInvalidConfiguration(f"{self.ref} requires at least gcc 7.") + + def build_requirements(self): + self.tool_requires("meson/1.4.0") + if not self.conf.get("tools.gnu:pkg_config",check_type=str): + self.tool_requires("pkgconf/2.1.0") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + env = VirtualBuildEnv(self) + env.generate() + tc = MesonToolchain(self) + tc.project_options["asserts"] = not is_apple_os(self) + tc.project_options["checks"] = False + tc.project_options["datadir"] = os.path.join("res", "share") + tc.project_options["sysconfdir"] = os.path.join("res", "etc") + tc.project_options["doxygen_docs"] = "disabled" + tc.project_options["ducktype_docs"] = "disabled" + tc.project_options["qt_help"] = "disabled" + tc.project_options["modular_tests"] = "disabled" + tc.project_options["selinux"] = "enabled" if self.options.get_safe("with_selinux") else "disabled" + if self.options.session_socket_dir: + tc.project_options["session_socket_dir"] = str(self.options.session_socket_dir) + tc.project_options["systemd"] = "enabled" if self.options.get_safe("with_systemd") else "disabled" + if self.options.get_safe("with_systemd"): + tc.project_options["systemd_system_unitdir"] = "/res/lib/systemd/system" + tc.project_options["systemd_user_unitdir"] = "/res/usr/lib/systemd/system" + if self._has_message_bus_option: + tc.project_options["message_bus"] = bool(self.options.message_bus) + if self.options.get_safe("dbus_user"): + tc.project_options["dbus_user"] = str(self.options.dbus_user) + if self.options.system_pid_file: + tc.project_options["system_pid_file"] = str(self.options.system_pid_file) + if self.options.system_socket: + tc.project_options["system_socket"] = str(self.options.system_socket) + if is_apple_os(self): + tc.project_options["launchd_agent_dir"] = os.path.join("res", "LaunchAgents") + tc.project_options["x11_autolaunch"] = "enabled" if self.options.get_safe("with_x11") else "disabled" + tc.project_options["xml_docs"] = "disabled" + tc.generate() + deps = PkgConfigDeps(self) + deps.generate() + + def _patch_sources(self): + apply_conandata_patches(self) + replace_in_file(self, os.path.join(self.source_folder, "meson.build"), + "subdir('test')", "# subdir('test')") + + def build(self): + self._patch_sources() + meson = Meson(self) + meson.configure() + meson.build() + + def package(self): + copy(self, "COPYING", self.source_folder, os.path.join(self.package_folder, "licenses")) + copy(self, "*", os.path.join(self.source_folder, "LICENSES"), os.path.join(self.package_folder, "licenses")) + meson = Meson(self) + meson.install() + + rm(self, "*.pdb", os.path.join(self.package_folder, "bin")) + rmdir(self, os.path.join(self.package_folder, "res", "share", "doc")) + + rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) + rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) + fix_apple_shared_install_name(self) + if self.settings.os == "Windows" and not self.options.shared: + rename(self, os.path.join(self.package_folder, "lib", "libdbus-1.a"), os.path.join(self.package_folder, "lib", "dbus-1.lib")) + + # TODO: to remove in conan v2 once cmake_find_package_* generators removed + self._create_cmake_module_alias_targets( + os.path.join(self.package_folder, self._module_file_rel_path), + {"dbus-1": "dbus-1::dbus-1"} + ) + + def _create_cmake_module_alias_targets(self, module_file, targets): + content = "" + for alias, aliased in targets.items(): + content += textwrap.dedent(f"""\ + if(TARGET {aliased} AND NOT TARGET {alias}) + add_library({alias} INTERFACE IMPORTED) + set_property(TARGET {alias} PROPERTY INTERFACE_LINK_LIBRARIES {aliased}) + endif() + """) + save(self, module_file, content) + + @property + def _module_file_rel_path(self): + return os.path.join("lib", "cmake", f"conan-official-{self.name}-targets.cmake") + + def package_info(self): + self.cpp_info.set_property("cmake_file_name", "DBus1") + self.cpp_info.set_property("cmake_target_name", "dbus-1") + self.cpp_info.set_property("pkg_config_name", "dbus-1") + self.cpp_info.includedirs.extend([ + os.path.join("include", "dbus-1.0"), + os.path.join("lib", "dbus-1.0", "include"), + ]) + self.cpp_info.resdirs = ["res"] + self.cpp_info.libs = ["dbus-1"] + if self.settings.os == "Linux": + self.cpp_info.system_libs.append("rt") + if self.settings.os == "Windows": + self.cpp_info.system_libs.extend(["iphlpapi", "ws2_32"]) + else: + self.cpp_info.system_libs.append("pthread") + + if not self.options.shared: + self.cpp_info.defines.append("DBUS_STATIC_BUILD") + + self.cpp_info.requires.append("expat::expat") + if self.options.get_safe("with_systemd"): + self.cpp_info.requires.append("libsystemd::libsystemd") + if self.options.get_safe("with_selinux"): + self.cpp_info.requires.append("libselinux::selinux") + + # TODO: to remove in conan v2 once cmake_find_package_* & pkg_config generators removed + self.cpp_info.filenames["cmake_find_package"] = "DBus1" + self.cpp_info.filenames["cmake_find_package_multi"] = "DBus1" + self.cpp_info.names["cmake_find_package"] = "dbus-1" + self.cpp_info.names["cmake_find_package_multi"] = "dbus-1" + self.cpp_info.build_modules["cmake_find_package"] = [self._module_file_rel_path] + self.cpp_info.build_modules["cmake_find_package_multi"] = [self._module_file_rel_path] + self.cpp_info.names["pkg_config"] = "dbus-1" diff --git a/recipes/dbus/1.x.x/patches/0001-meson-Use-check_header-to-confirm-headers-work.patch b/recipes/dbus/all/patches/0001-meson-Use-check_header-to-confirm-headers-work.patch similarity index 100% rename from recipes/dbus/1.x.x/patches/0001-meson-Use-check_header-to-confirm-headers-work.patch rename to recipes/dbus/all/patches/0001-meson-Use-check_header-to-confirm-headers-work.patch diff --git a/recipes/dbus/1.x.x/patches/0003-meson-monotonic-clock-check.patch b/recipes/dbus/all/patches/0003-meson-monotonic-clock-check.patch similarity index 100% rename from recipes/dbus/1.x.x/patches/0003-meson-monotonic-clock-check.patch rename to recipes/dbus/all/patches/0003-meson-monotonic-clock-check.patch diff --git a/recipes/dbus/1.x.x/test_package/CMakeLists.txt b/recipes/dbus/all/test_package/CMakeLists.txt similarity index 100% rename from recipes/dbus/1.x.x/test_package/CMakeLists.txt rename to recipes/dbus/all/test_package/CMakeLists.txt diff --git a/recipes/dbus/1.x.x/test_package/conanfile.py b/recipes/dbus/all/test_package/conanfile.py similarity index 100% rename from recipes/dbus/1.x.x/test_package/conanfile.py rename to recipes/dbus/all/test_package/conanfile.py diff --git a/recipes/dbus/1.x.x/test_package/test_package.c b/recipes/dbus/all/test_package/test_package.c similarity index 100% rename from recipes/dbus/1.x.x/test_package/test_package.c rename to recipes/dbus/all/test_package/test_package.c diff --git a/recipes/date/all/test_v1_package/CMakeLists.txt b/recipes/dbus/all/test_v1_package/CMakeLists.txt similarity index 100% rename from recipes/date/all/test_v1_package/CMakeLists.txt rename to recipes/dbus/all/test_v1_package/CMakeLists.txt diff --git a/recipes/dbus/1.x.x/test_v1_package/conanfile.py b/recipes/dbus/all/test_v1_package/conanfile.py similarity index 100% rename from recipes/dbus/1.x.x/test_v1_package/conanfile.py rename to recipes/dbus/all/test_v1_package/conanfile.py diff --git a/recipes/dbus/config.yml b/recipes/dbus/config.yml index a6d5fb2e5d5f7..e3b8080de35a7 100644 --- a/recipes/dbus/config.yml +++ b/recipes/dbus/config.yml @@ -1,9 +1,9 @@ versions: "1.15.8": - folder: 1.x.x + folder: all "1.15.6": - folder: 1.x.x + folder: all "1.15.2": - folder: 1.x.x + folder: all "1.15.0": - folder: 1.x.x + folder: all diff --git a/recipes/dd-opentracing-cpp/all/CMakeLists.txt b/recipes/dd-opentracing-cpp/all/CMakeLists.txt deleted file mode 100644 index 4adab61a177bf..0000000000000 --- a/recipes/dd-opentracing-cpp/all/CMakeLists.txt +++ /dev/null @@ -1,11 +0,0 @@ -cmake_minimum_required(VERSION 3.1) -project(cmake_wrapper) - -include(conanbuildinfo.cmake) -conan_basic_setup() - -if(CONAN_COMPILER MATCHES "clang" AND CONAN_COMPILER_VERSION VERSION_LESS "4.0") - add_compile_options(-ftemplate-depth=1024) -endif() - -add_subdirectory(source_subfolder) diff --git a/recipes/dd-opentracing-cpp/all/conandata.yml b/recipes/dd-opentracing-cpp/all/conandata.yml index 5c4a8f88936e6..d9d5dcbf278c1 100644 --- a/recipes/dd-opentracing-cpp/all/conandata.yml +++ b/recipes/dd-opentracing-cpp/all/conandata.yml @@ -1,8 +1,12 @@ sources: + "1.3.7": + url: "https://github.com/DataDog/dd-opentracing-cpp/archive/refs/tags/v1.3.7.tar.gz" + sha256: "8d39c6b23f941a2d11571daaccc04e69539a3fcbcc50a631837560d5861a7b96" "1.3.0": - url: https://github.com/DataDog/dd-opentracing-cpp/archive/refs/tags/v1.3.0.tar.gz - sha256: 16aad0c0daed054d4bcdf68cf069956e8d3b0c60a33c2162ad655a17b33b65e4 + url: "https://github.com/DataDog/dd-opentracing-cpp/archive/refs/tags/v1.3.0.tar.gz" + sha256: "16aad0c0daed054d4bcdf68cf069956e8d3b0c60a33c2162ad655a17b33b65e4" patches: + "1.3.7": + - patch_file: "patches/1.3.7/0001-Find-packages-setup.patch" "1.3.0": - - base_path: "source_subfolder" - patch_file: "patches/0001-Find-packages-setup.patch" + - patch_file: "patches/1.3.0/0001-Find-packages-setup.patch" diff --git a/recipes/dd-opentracing-cpp/all/conanfile.py b/recipes/dd-opentracing-cpp/all/conanfile.py index 39cb79ab41f5f..953c532aa7291 100644 --- a/recipes/dd-opentracing-cpp/all/conanfile.py +++ b/recipes/dd-opentracing-cpp/all/conanfile.py @@ -1,17 +1,24 @@ -from conans import ConanFile, CMake, tools -from conans.errors import ConanInvalidConfiguration +import os -required_conan_version = ">=1.33.0" +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.build import check_min_cppstd +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get +from conan.tools.scm import Version + +required_conan_version = ">=1.53.0" class DatadogOpenTracingConan(ConanFile): name = "dd-opentracing-cpp" description = "Monitoring service for cloud-scale applications based on OpenTracing " license = "Apache-2.0" - topics = ("instrumentration", "monitoring", "security", "tracing") - homepage = "https://github.com/DataDog/dd-opentracing-cpp" url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/DataDog/dd-opentracing-cpp" + topics = ("instrumentation", "monitoring", "security", "tracing") + package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], @@ -22,30 +29,18 @@ class DatadogOpenTracingConan(ConanFile): "fPIC": True, } - generators = "cmake", "cmake_find_package" - _cmake = None - - @property - def _source_subfolder(self): - return "source_subfolder" - - @property - def _build_subfolder(self): - return "build_subfolder" - @property def _compilers_minimum_version(self): return { "gcc": "5", "Visual Studio": "15", + "msvc": "191", "clang": "3.4", "apple-clang": "7", } def export_sources(self): - self.copy("CMakeLists.txt") - for patch in self.conan_data.get("patches", {}).get(self.version, []): - self.copy(patch["patch_file"]) + export_conandata_patches(self) def config_options(self): if self.settings.os == "Windows": @@ -53,68 +48,59 @@ def config_options(self): def configure(self): if self.options.shared: - del self.options.fPIC + self.options.rm_safe("fPIC") + + def layout(self): + cmake_layout(self, src_folder="src") def requirements(self): - self.requires("opentracing-cpp/1.6.0") - self.requires("zlib/1.2.11") - self.requires("libcurl/7.80.0") - self.requires("msgpack/3.3.0") - self.requires("nlohmann_json/3.10.5") + self.requires("opentracing-cpp/1.6.0", transitive_headers=True, transitive_libs=True) + self.requires("zlib/[>=1.2.11 <2]") + self.requires("libcurl/[>=7.78 <9]") + self.requires("msgpack-cxx/6.1.0") + self.requires("nlohmann_json/3.11.2") + + @property + def _min_cppstd(self): + return 14 def validate(self): if self.settings.compiler.get_safe("cppstd"): - tools.check_min_cppstd(self, 14) + check_min_cppstd(self, self._min_cppstd) minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) if minimum_version: - if tools.Version(self.settings.compiler.version) < minimum_version: - raise ConanInvalidConfiguration("Datadog-opentracing requires C++14, which your compiler does not support.") - else: - self.output.warn("Datadog-opentracing requires C++14. Your compiler is unknown. Assuming it supports C++14.") + if Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration( + f"{self.ref} requires C++ {self._min_cppstd}, which your compiler does not support." + ) def source(self): - tools.get(**self.conan_data["sources"][self.version], strip_root=True, destination=self._source_subfolder) + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + tc.variables["BUILD_PLUGIN"] = False + tc.variables["BUILD_SHARED"] = self.options.shared + tc.variables["BUILD_STATIC"] = not self.options.shared + tc.variables["BUILD_TESTING"] = False + tc.generate() + tc = CMakeDeps(self) + tc.generate() def build(self): - for patch in self.conan_data.get("patches", {}).get(self.version, []): - tools.patch(**patch) - cmake = self._configure_cmake() + apply_conandata_patches(self) + cmake = CMake(self) + cmake.configure() cmake.build() - def _configure_cmake(self): - if self._cmake: - return self._cmake - self._cmake = CMake(self) - self._cmake.definitions["BUILD_PLUGIN"] = False - self._cmake.definitions["BUILD_SHARED"] = self.options.shared - self._cmake.definitions["BUILD_STATIC"] = not self.options.shared - self._cmake.definitions["BUILD_TESTING"] = False - self._cmake.configure(build_folder=self._build_subfolder) - return self._cmake - def package(self): - self.copy("LICENSE", dst="licenses", src=self._source_subfolder) - cmake = self._configure_cmake() + copy(self, "LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) + cmake = CMake(self) cmake.install() def package_info(self): - # TODO: back to global scope in conan v2 once cmake_find_package_* generators removed - self.cpp_info.components["dd_opentracing"].libs = ["dd_opentracing"] - self.cpp_info.components["dd_opentracing"].defines.append( - "DD_OPENTRACING_SHARED" if self.options.shared else "DD_OPENTRACING_STATIC" - ) + self.cpp_info.libs = ["dd_opentracing"] + self.cpp_info.defines.append("DD_OPENTRACING_SHARED" if self.options.shared else "DD_OPENTRACING_STATIC") if self.settings.os in ("Linux", "FreeBSD"): - self.cpp_info.components["dd_opentracing"].system_libs.append("pthread") - - # TODO: to remove in conan v2 once cmake_find_package_* generators removed. - # Do not support these names in CMakeDeps, it was a mistake, upstream doesn't export targets - self.cpp_info.names["cmake_find_package"] = "DataDogOpenTracing" - self.cpp_info.names["cmake_find_package_multi"] = "DataDogOpenTracing" - target_suffix = "" if self.options.shared else "-static" - self.cpp_info.components["dd_opentracing"].names["cmake_find_package"] = "dd_opentracing" + target_suffix - self.cpp_info.components["dd_opentracing"].names["cmake_find_package_multi"] = "dd_opentracing" + target_suffix - self.cpp_info.components["dd_opentracing"].requires = [ - "opentracing-cpp::opentracing-cpp", "zlib::zlib", "libcurl::libcurl", - "msgpack::msgpack", "nlohmann_json::nlohmann_json", - ] + self.cpp_info.system_libs.append("pthread") diff --git a/recipes/dd-opentracing-cpp/all/patches/0001-Find-packages-setup.patch b/recipes/dd-opentracing-cpp/all/patches/0001-Find-packages-setup.patch deleted file mode 100644 index 3308c5a043699..0000000000000 --- a/recipes/dd-opentracing-cpp/all/patches/0001-Find-packages-setup.patch +++ /dev/null @@ -1,65 +0,0 @@ ---- - CMakeLists.txt | 30 ++++++++++-------------------- - 1 file changed, 10 insertions(+), 20 deletions(-) - ---- CMakeLists.txt -+++ CMakeLists.txt -@@ -34,17 +34,12 @@ include_directories(include) - set(CMAKE_LIBRARY_PATH deps/lib) - - # Dependencies --find_path(OPENTRACING_INCLUDE_DIR NAMES opentracing/tracer.h) --find_library(OPENTRACING_LIB opentracing) -+find_package(OpenTracing REQUIRED) - find_package(ZLIB REQUIRED) --find_library(MSGPACK_LIB msgpack) --find_package(CURL) -+find_package(msgpack REQUIRED) -+find_package(CURL REQUIRED) - find_package(Threads REQUIRED) - --# Code Sanitizers --set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/3rd_party/sanitizers-cmake" ${CMAKE_MODULE_PATH}) --find_package(Sanitizers) -- - # Code - install(DIRECTORY include/datadog DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) - file(GLOB DD_OPENTRACING_SOURCES "src/*.cpp") -@@ -58,29 +53,24 @@ else() - endif() - - # Outputs --set(DATADOG_LINK_LIBRARIES ${OPENTRACING_LIB} ${CURL_LIBRARIES} ${ZLIB_LIBRARIES} Threads::Threads) -+set(DATADOG_LINK_LIBRARIES OpenTracing::OpenTracing CURL::CURL msgpack::msgpack ZLIB::ZLIB Threads::Threads) - - ## Shared lib - if(BUILD_SHARED) - add_library(dd_opentracing SHARED ${DD_OPENTRACING_SOURCES}) -- add_sanitizers(dd_opentracing) - target_link_libraries(dd_opentracing ${DATADOG_LINK_LIBRARIES}) - set_target_properties(dd_opentracing PROPERTIES SOVERSION ${SOVERSION}) -- target_compile_definitions(dd_opentracing PRIVATE DD_OPENTRACING_SHARED) -- install(TARGETS dd_opentracing -- LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} -- ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) -+ target_compile_definitions(dd_opentracing PUBLIC DD_OPENTRACING_SHARED) -+ install(TARGETS dd_opentracing) - endif() - - ## Static lib - if(BUILD_STATIC) - add_library(dd_opentracing-static STATIC ${DD_OPENTRACING_SOURCES}) -- add_sanitizers(dd_opentracing-static) -- set_target_properties(dd_opentracing-static PROPERTIES OUTPUT_NAME dd_opentracing POSITION_INDEPENDENT_CODE ON) -- target_compile_definitions(dd_opentracing PRIVATE DD_OPENTRACING_STATIC) -- install(TARGETS dd_opentracing-static -- LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} -- ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) -+ target_link_libraries(dd_opentracing-static ${DATADOG_LINK_LIBRARIES}) -+ set_target_properties(dd_opentracing-static PROPERTIES OUTPUT_NAME dd_opentracing) -+ target_compile_definitions(dd_opentracing-static PUBLIC DD_OPENTRACING_STATIC) -+ install(TARGETS dd_opentracing-static) - endif() - - ## Plugin - diff --git a/recipes/dd-opentracing-cpp/all/patches/1.3.0/0001-Find-packages-setup.patch b/recipes/dd-opentracing-cpp/all/patches/1.3.0/0001-Find-packages-setup.patch new file mode 100644 index 0000000000000..da57cbb9c9845 --- /dev/null +++ b/recipes/dd-opentracing-cpp/all/patches/1.3.0/0001-Find-packages-setup.patch @@ -0,0 +1,54 @@ +--- CMakeLists.txt ++++ CMakeLists.txt +@@ -34,16 +34,11 @@ + set(CMAKE_LIBRARY_PATH deps/lib) + + # Dependencies +-find_path(OPENTRACING_INCLUDE_DIR NAMES opentracing/tracer.h) +-find_library(OPENTRACING_LIB opentracing) ++find_package(OpenTracing REQUIRED CONFIG) + find_package(ZLIB REQUIRED) +-find_library(MSGPACK_LIB msgpack) +-find_package(CURL) ++find_package(msgpack REQUIRED CONFIG) ++find_package(CURL REQUIRED CONFIG) + find_package(Threads REQUIRED) +- +-# Code Sanitizers +-set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/3rd_party/sanitizers-cmake" ${CMAKE_MODULE_PATH}) +-find_package(Sanitizers) + + # Code + install(DIRECTORY include/datadog DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) +@@ -58,16 +53,16 @@ + endif() + + # Outputs +-set(DATADOG_LINK_LIBRARIES ${OPENTRACING_LIB} ${CURL_LIBRARIES} ${ZLIB_LIBRARIES} Threads::Threads) ++set(DATADOG_LINK_LIBRARIES OpenTracing::OpenTracing CURL::libcurl msgpack-cxx ZLIB::ZLIB Threads::Threads) + + ## Shared lib + if(BUILD_SHARED) + add_library(dd_opentracing SHARED ${DD_OPENTRACING_SOURCES}) +- add_sanitizers(dd_opentracing) + target_link_libraries(dd_opentracing ${DATADOG_LINK_LIBRARIES}) + set_target_properties(dd_opentracing PROPERTIES SOVERSION ${SOVERSION}) + target_compile_definitions(dd_opentracing PRIVATE DD_OPENTRACING_SHARED) + install(TARGETS dd_opentracing ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) + endif() +@@ -75,9 +70,9 @@ + ## Static lib + if(BUILD_STATIC) + add_library(dd_opentracing-static STATIC ${DD_OPENTRACING_SOURCES}) +- add_sanitizers(dd_opentracing-static) +- set_target_properties(dd_opentracing-static PROPERTIES OUTPUT_NAME dd_opentracing POSITION_INDEPENDENT_CODE ON) +- target_compile_definitions(dd_opentracing PRIVATE DD_OPENTRACING_STATIC) ++ target_link_libraries(dd_opentracing-static ${DATADOG_LINK_LIBRARIES}) ++ set_target_properties(dd_opentracing-static PROPERTIES OUTPUT_NAME dd_opentracing) ++ target_compile_definitions(dd_opentracing-static PUBLIC DD_OPENTRACING_STATIC) + install(TARGETS dd_opentracing-static + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) diff --git a/recipes/dd-opentracing-cpp/all/patches/1.3.7/0001-Find-packages-setup.patch b/recipes/dd-opentracing-cpp/all/patches/1.3.7/0001-Find-packages-setup.patch new file mode 100644 index 0000000000000..9c70c924a04a6 --- /dev/null +++ b/recipes/dd-opentracing-cpp/all/patches/1.3.7/0001-Find-packages-setup.patch @@ -0,0 +1,60 @@ +--- CMakeLists.txt ++++ CMakeLists.txt +@@ -35,15 +35,10 @@ + set(CMAKE_LIBRARY_PATH deps/lib) + + # Dependencies +-find_path(OPENTRACING_INCLUDE_DIR NAMES opentracing/tracer.h) +-find_library(OPENTRACING_LIB opentracing) +-find_library(MSGPACK_LIB msgpack) +-find_package(CURL) ++find_package(OpenTracing REQUIRED CONFIG) ++find_package(msgpack REQUIRED CONFIG) ++find_package(CURL REQUIRED CONFIG) + find_package(Threads REQUIRED) +- +-# Code Sanitizers +-set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/3rd_party/sanitizers-cmake" ${CMAKE_MODULE_PATH}) +-find_package(Sanitizers) + + # Code + install(DIRECTORY include/datadog DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) +@@ -64,12 +59,12 @@ + if(BUILD_COVERAGE) + set(COVERAGE_LIBRARIES gcov) + endif() +-set(DATADOG_LINK_LIBRARIES ${OPENTRACING_LIB} ${CURL_LIBRARIES} Threads::Threads ${COVERAGE_LIBRARIES}) ++set(DATADOG_LINK_LIBRARIES OpenTracing::OpenTracing CURL::libcurl ${msgpack_LIBRARIES} ZLIB::ZLIB Threads::Threads) ++include_directories(${msgpack_INCLUDE_DIRS}) + + ## Shared lib + if(BUILD_SHARED) + add_library(dd_opentracing SHARED ${DD_OPENTRACING_SOURCES}) +- add_sanitizers(dd_opentracing) + if(BUILD_COVERAGE) + target_link_options(dd_opentracing PRIVATE -fprofile-arcs -ftest-coverage) + endif() +@@ -77,6 +72,7 @@ + set_target_properties(dd_opentracing PROPERTIES SOVERSION ${SOVERSION}) + target_compile_definitions(dd_opentracing PUBLIC DD_OPENTRACING_SHARED) + install(TARGETS dd_opentracing ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) + endif() +@@ -84,13 +80,10 @@ + ## Static lib + if(BUILD_STATIC) + add_library(dd_opentracing-static STATIC ${DD_OPENTRACING_SOURCES}) +- add_sanitizers(dd_opentracing-static) + target_link_libraries(dd_opentracing-static ${DATADOG_LINK_LIBRARIES}) +- set_target_properties(dd_opentracing-static PROPERTIES OUTPUT_NAME dd_opentracing POSITION_INDEPENDENT_CODE ON) ++ set_target_properties(dd_opentracing-static PROPERTIES OUTPUT_NAME dd_opentracing) + target_compile_definitions(dd_opentracing-static PUBLIC DD_OPENTRACING_STATIC) +- install(TARGETS dd_opentracing-static +- LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} +- ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) ++ install(TARGETS dd_opentracing-static) + endif() + + ## Object lib diff --git a/recipes/dd-opentracing-cpp/all/test_package/CMakeLists.txt b/recipes/dd-opentracing-cpp/all/test_package/CMakeLists.txt index 61e5eac8d9ed0..f80f836e06bd4 100644 --- a/recipes/dd-opentracing-cpp/all/test_package/CMakeLists.txt +++ b/recipes/dd-opentracing-cpp/all/test_package/CMakeLists.txt @@ -1,9 +1,8 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.15) project(test_package CXX) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup() +find_package(dd-opentracing-cpp REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) -target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS}) +target_link_libraries(${PROJECT_NAME} PRIVATE dd-opentracing-cpp::dd-opentracing-cpp) set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 14) diff --git a/recipes/dd-opentracing-cpp/all/test_package/conanfile.py b/recipes/dd-opentracing-cpp/all/test_package/conanfile.py index 5c09494bc67c0..ef5d7042163ec 100644 --- a/recipes/dd-opentracing-cpp/all/test_package/conanfile.py +++ b/recipes/dd-opentracing-cpp/all/test_package/conanfile.py @@ -1,10 +1,19 @@ -from conans import ConanFile, CMake, tools +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake import os class TestPackageConan(ConanFile): settings = "os", "arch", "compiler", "build_type" - generators = "cmake" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) def build(self): cmake = CMake(self) @@ -12,6 +21,6 @@ def build(self): cmake.build() def test(self): - if not tools.cross_building(self): - bin_path = os.path.join("bin", "test_package") - self.run(bin_path, run_environment=True) + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/mathter/all/test_v1_package/CMakeLists.txt b/recipes/dd-opentracing-cpp/all/test_v1_package/CMakeLists.txt similarity index 100% rename from recipes/mathter/all/test_v1_package/CMakeLists.txt rename to recipes/dd-opentracing-cpp/all/test_v1_package/CMakeLists.txt diff --git a/recipes/byte-lite/all/test_v1_package/conanfile.py b/recipes/dd-opentracing-cpp/all/test_v1_package/conanfile.py similarity index 100% rename from recipes/byte-lite/all/test_v1_package/conanfile.py rename to recipes/dd-opentracing-cpp/all/test_v1_package/conanfile.py diff --git a/recipes/dd-opentracing-cpp/config.yml b/recipes/dd-opentracing-cpp/config.yml index 426a0e4c79e9b..670c8dce3f891 100644 --- a/recipes/dd-opentracing-cpp/config.yml +++ b/recipes/dd-opentracing-cpp/config.yml @@ -1,3 +1,5 @@ versions: + "1.3.7": + folder: all "1.3.0": folder: all diff --git a/recipes/debug_assert/all/conandata.yml b/recipes/debug_assert/all/conandata.yml index cfa7ab5250ed4..dc2038ed34a68 100644 --- a/recipes/debug_assert/all/conandata.yml +++ b/recipes/debug_assert/all/conandata.yml @@ -1,4 +1,7 @@ sources: - '1.3.3': - url: https://github.com/foonathan/debug_assert/archive/v1.3.3.zip - sha256: c0871c7bb8d7e0f36cfae9a5ba526ea0c0fcaa41203ffb4280de27cb030e7383 + "1.3.4": + url: "https://github.com/foonathan/debug_assert/archive/v1.3.4.zip" + sha256: "e29925b1b51e10b46e8c4f3d57a86db6a7ebc7cdec53fe30c1b0ca22ef845f43" + "1.3.3": + url: "https://github.com/foonathan/debug_assert/archive/v1.3.3.zip" + sha256: "c0871c7bb8d7e0f36cfae9a5ba526ea0c0fcaa41203ffb4280de27cb030e7383" diff --git a/recipes/debug_assert/config.yml b/recipes/debug_assert/config.yml index 416be34945c37..3b34bc0f54258 100644 --- a/recipes/debug_assert/config.yml +++ b/recipes/debug_assert/config.yml @@ -1,3 +1,5 @@ versions: - '1.3.3': + "1.3.4": + folder: all + "1.3.3": folder: all diff --git a/recipes/detools/all/test_package/old b/recipes/detools/all/test_package/old deleted file mode 100644 index 0368e11feda26..0000000000000 Binary files a/recipes/detools/all/test_package/old and /dev/null differ diff --git a/recipes/detools/all/test_package/patch b/recipes/detools/all/test_package/patch deleted file mode 100644 index 99321d7000aa0..0000000000000 Binary files a/recipes/detools/all/test_package/patch and /dev/null differ diff --git a/recipes/detools/all/test_package/test_package.c b/recipes/detools/all/test_package/test_package.c index 7567264b2867b..b2e3a040fb0d5 100644 --- a/recipes/detools/all/test_package/test_package.c +++ b/recipes/detools/all/test_package/test_package.c @@ -1,38 +1,7 @@ #include #include "detools.h" -/* Helper functions. */ -static int flash_read(void *arg_p, void *dst_p, uintptr_t src, size_t size) -{ - return (0); -} - -static int flash_write(void *arg_p, uintptr_t dst, void *src_p, size_t size) -{ - return (0); -} - -static int flash_erase(void *arg_p, uintptr_t addr, size_t size) -{ - return (0); -} - -static int step_set(void *arg_p, int step) -{ - return (0); -} - -static int step_get(void *arg_p, int *step_p) -{ - return (0); -} - -static int serial_read(uint8_t *buf_p, size_t size) -{ - return (0); -} - -static int verify_written_data(int to_size, uint32_t to_crc) +static int dummy_function() { return (0); } @@ -44,16 +13,15 @@ int main() int res; size_t patch_size = 512; - /* Initialize the in-place apply patch object. */ res = detools_apply_patch_in_place_init(&apply_patch, - flash_read, - flash_write, - flash_erase, - step_set, - step_get, + dummy_function, + dummy_function, + dummy_function, + dummy_function, + dummy_function, patch_size, NULL); - + printf("detools_apply_patch_in_place_init: %d\n", res); if (res != 0) { return (res); } diff --git a/recipes/dfp/all/conandata.yml b/recipes/dfp/all/conandata.yml index ef5dd3970cc87..753d76e24d813 100644 --- a/recipes/dfp/all/conandata.yml +++ b/recipes/dfp/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.0.3": + url: "https://github.com/epam/DFP/releases/download/1.0.3/native-sources.tar.gz" + sha256: "362e324687d6b8ca42490811331052c46cccb64a2cf078f3b6c8df92a374497c" "1.0.2": url: "https://github.com/epam/DFP/releases/download/1.0.2-cxx/native-sources.tar.gz" sha256: "f62acab311086c1207f7d58185232c7e86e11ed606596d9afcff49703c196058" diff --git a/recipes/dfp/config.yml b/recipes/dfp/config.yml index 8457ca9a4a8cd..f625d5d2b747f 100644 --- a/recipes/dfp/config.yml +++ b/recipes/dfp/config.yml @@ -1,3 +1,5 @@ versions: + "1.0.3": + folder: all "1.0.2": folder: all diff --git a/recipes/dice-template-library/all/conandata.yml b/recipes/dice-template-library/all/conandata.yml index f3c3a88f7edef..580b85f394958 100644 --- a/recipes/dice-template-library/all/conandata.yml +++ b/recipes/dice-template-library/all/conandata.yml @@ -1,4 +1,13 @@ sources: + "1.9.0": + url: "https://github.com/dice-group/dice-template-library/archive/refs/tags/v1.9.0.tar.gz" + sha256: "ca82a61bd445e0eaf69e68fc4a96d037c8b2ea36ff7762042dbb6f47a89f99e9" + "1.8.0": + url: "https://github.com/dice-group/dice-template-library/archive/refs/tags/v1.8.0.tar.gz" + sha256: "cb20717cb596b156b098146d043caa158618e055b8edbeb4d3245cd11e1c8276" + "1.6.0": + url: "https://github.com/dice-group/dice-template-library/archive/refs/tags/v1.6.0.tar.gz" + sha256: "4eb176930beb05dba183d4a48fd9e9716676fe92f0a98a8f527cb8791b0d64fd" "1.5.0": url: "https://github.com/dice-group/dice-template-library/archive/refs/tags/v1.5.0.tar.gz" sha256: "5ab4155097af5674dc9b34d1643db9ea8b30f78d15c1e547c58396ea31068ffd" diff --git a/recipes/dice-template-library/config.yml b/recipes/dice-template-library/config.yml index 4b83ac8cb2f11..37901e90b8f3b 100644 --- a/recipes/dice-template-library/config.yml +++ b/recipes/dice-template-library/config.yml @@ -1,4 +1,10 @@ versions: + "1.9.0": + folder: all + "1.8.0": + folder: all + "1.6.0": + folder: all "1.5.0": folder: all "1.3.0": diff --git a/recipes/diligent-core/all/CMakeLists.txt b/recipes/diligent-core/all/CMakeLists.txt deleted file mode 100644 index a00123a14d403..0000000000000 --- a/recipes/diligent-core/all/CMakeLists.txt +++ /dev/null @@ -1,22 +0,0 @@ -cmake_minimum_required(VERSION 3.2) -project(cmake_wrapper) - -find_package(SPIRV-Tools REQUIRED CONFIG) -find_package(spirv-cross REQUIRED CONFIG) -find_package(glslang REQUIRED CONFIG) -find_package(volk REQUIRED CONFIG) -find_package(xxHash REQUIRED CONFIG) - -add_library(glslang INTERFACE) -target_link_libraries(glslang INTERFACE glslang::glslang) -target_include_directories(glslang INTERFACE ${glslang_INCLUDE_DIR}/glslang) - -add_library(SPIRV ALIAS glslang::SPIRV) -add_library(SPIRV-Headers ALIAS SPIRV-Headers::SPIRV-Headers) - -add_library(SPIRV-Tools-opt ALIAS spirv-tools::spirv-tools) -add_library(spirv-tools-core ALIAS spirv-tools::spirv-tools) -add_library(SPIRV-Tools-static ALIAS spirv-tools::spirv-tools) - -add_subdirectory(source_subfolder) - diff --git a/recipes/diligent-core/all/conan_deps.cmake b/recipes/diligent-core/all/conan_deps.cmake new file mode 100644 index 0000000000000..22d5c713e1417 --- /dev/null +++ b/recipes/diligent-core/all/conan_deps.cmake @@ -0,0 +1,15 @@ +find_package(SPIRV-Tools REQUIRED CONFIG) +find_package(spirv-cross REQUIRED CONFIG) +find_package(volk REQUIRED CONFIG) +find_package(xxHash REQUIRED CONFIG) + +if (NOT ${DILIGENT_NO_GLSLANG}) + find_package(glslang REQUIRED CONFIG) + add_library(glslang INTERFACE) + target_link_libraries(glslang INTERFACE glslang::glslang) + target_include_directories(glslang INTERFACE ${glslang_INCLUDE_DIR}/glslang) + add_library(SPIRV ALIAS glslang::SPIRV) +endif() + +add_library(SPIRV-Headers ALIAS SPIRV-Headers::SPIRV-Headers) +add_library(spirv-tools-core ALIAS spirv-tools::spirv-tools) diff --git a/recipes/diligent-core/all/conandata.yml b/recipes/diligent-core/all/conandata.yml index a48d5fbd77dc8..1b7fc1ffdeef6 100644 --- a/recipes/diligent-core/all/conandata.yml +++ b/recipes/diligent-core/all/conandata.yml @@ -23,37 +23,21 @@ sources: patches: "api.252003": - patch_file: "patches/0023-252003-fix-warning-as-error.patch" - base_path: "source_subfolder" "2.5.2": - patch_file: "patches/0014-252-exclude-tests.patch" - base_path: "source_subfolder" - patch_file: "patches/0015-252-dont-install-3d-party-license.patch" - base_path: "source_subfolder" - patch_file: "patches/0016-252-fix-glslang-usage.patch" - base_path: "source_subfolder" - patch_file: "patches/0017-252-fix-glslang-include.patch" - base_path: "source_subfolder" - patch_file: "patches/0018-252-fix-warning-as-error.patch" - base_path: "source_subfolder" "2.5.1": - patch_file: "patches/0001-remove_warning_as_error.patch" - base_path: "source_subfolder" - patch_file: "patches/0002-use_conan_dependencies.patch" - base_path: "source_subfolder" - patch_file: "patches/0003-use_volk_from_conan.patch" - base_path: "source_subfolder" - patch_file: "patches/0005-spirv-cross-namespace-override.patch" - base_path: "source_subfolder" - patch_file: "patches/0006-install-linux-platform-header.diff" - base_path: "source_subfolder" "api.250014": - patch_file: "patches/0007-API250014-remove_warning_as_error.patch" - base_path: "source_subfolder" - patch_file: "patches/0009-API250014-use_conan_dependencies_in_third_party.patch" - base_path: "source_subfolder" - patch_file: "patches/0010-API250014-use_volk_from_conan.patch" - base_path: "source_subfolder" - patch_file: "patches/0013-API250014-use-vulkan-headers-in-archiver.patch" - base_path: "source_subfolder" - patch_file: "patches/0005-spirv-cross-namespace-override.patch" - base_path: "source_subfolder" diff --git a/recipes/diligent-core/all/conanfile.py b/recipes/diligent-core/all/conanfile.py index a02de86844027..5b7a0c26b76e5 100644 --- a/recipes/diligent-core/all/conanfile.py +++ b/recipes/diligent-core/all/conanfile.py @@ -3,7 +3,8 @@ from conan.errors import ConanInvalidConfiguration from conan.tools.build import cross_building, check_min_cppstd from conan.tools.scm import Version -from conan.tools.files import rm, get, rmdir, rename, collect_libs, patches, export_conandata_patches, copy, apply_conandata_patches +from conan.tools.files import rm, get, rmdir, rename, collect_libs, export_conandata_patches, copy, apply_conandata_patches, replace_in_file +from conan.tools.microsoft import visual from conan.tools.apple import is_apple_os import os @@ -34,6 +35,7 @@ class DiligentCoreConan(ConanFile): def _minimum_compilers_version(self): return { "Visual Studio": "16", + "msvc": "192", "gcc": "6", "clang": "3.4", "apple-clang": "5.1", @@ -48,29 +50,28 @@ def validate(self): check_min_cppstd(self, self._minimum_cpp_standard) min_version = self._minimum_compilers_version.get(str(self.settings.compiler)) if not min_version: - self.output.warn("{} recipe lacks information about the {} compiler support.".format( + self.output.warning("{} recipe lacks information about the {} compiler support.".format( self.name, self.settings.compiler)) else: if Version(self.settings.compiler.version) < min_version: raise ConanInvalidConfiguration("{} requires C++{} support. The current compiler {} {} does not support it.".format( self.name, self._minimum_cpp_standard, self.settings.compiler, self.settings.compiler.version)) - if self.settings.compiler == "Visual Studio" and "MT" in self.settings.compiler.runtime: + if visual.is_msvc_static_runtime(self): raise ConanInvalidConfiguration("Visual Studio build with MT runtime is not supported") def export_sources(self): - copy(self, "CMakeLists.txt", src=self.recipe_folder, dst=self.export_sources_folder, keep_path=False) + copy(self, "conan_deps.cmake", src=self.recipe_folder, dst=os.path.join(self.export_sources_folder, "src"), keep_path=False) export_conandata_patches(self) def source(self): - get(self, **self.conan_data["sources"][self.version], - destination=os.path.join(self.source_folder, "source_subfolder"), strip_root=True) + get(self, **self.conan_data["sources"][self.version], strip_root=True) def package_id(self): - if self.settings.compiler == "Visual Studio": - if "MD" in self.settings.compiler.runtime: - self.info.settings.compiler.runtime = "MD/MDd" - else: + if visual.is_msvc(self.info): + if visual.is_msvc_static_runtime(self.info): self.info.settings.compiler.runtime = "MT/MTd" + else: + self.info.settings.compiler.runtime = "MD/MDd" def generate(self): tc = CMakeToolchain(self) @@ -79,8 +80,7 @@ def generate(self): tc.variables["DILIGENT_BUILD_TESTS"] = False tc.variables["DILIGENT_NO_DXC"] = True tc.variables["DILIGENT_NO_GLSLANG"] = not self.options.with_glslang - tc.variables["SPIRV_CROSS_NAMESPACE_OVERRIDE"] = self.options["spirv-cross"].namespace - tc.variables["BUILD_SHARED_LIBS"] = False + tc.variables["SPIRV_CROSS_NAMESPACE_OVERRIDE"] = self.dependencies["spirv-cross"].options.namespace tc.variables["DILIGENT_CLANG_COMPILE_OPTIONS"] = "" tc.variables["DILIGENT_MSVC_COMPILE_OPTIONS"] = "" tc.variables["ENABLE_RTTI"] = True @@ -92,34 +92,37 @@ def generate(self): deps.generate() def layout(self): - cmake_layout(self) + cmake_layout(self, src_folder="src") def configure(self): if self.options.shared: - del self.options.fPIC + self.options.rm_safe("fPIC") def config_options(self): if self.settings.os == "Windows": - del self.options.fPIC + self.options.rm_safe("fPIC") def _patch_sources(self): - patches.apply_conandata_patches(self) + apply_conandata_patches(self) + replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), + "project(DiligentCore)", + "project(DiligentCore)\n\ninclude(conan_deps.cmake)") def build_requirements(self): - self.tool_requires("cmake/3.24.2") + self.tool_requires("cmake/[>=3.24 <4]") def requirements(self): self.requires("opengl/system") if self.settings.os == "Linux": - self.requires("wayland/1.21.0") + self.requires("wayland/1.22.0") self.requires("spirv-cross/1.3.224.0") self.requires("spirv-tools/1.3.224.0") if self.options.with_glslang: self.requires("glslang/1.3.224.0") - self.requires("vulkan-headers/1.3.224.1") + self.requires("vulkan-headers/1.3.224.0") self.requires("vulkan-validationlayers/1.3.224.1") - self.requires("volk/1.3.224.1") + self.requires("volk/1.3.224.0") self.requires("xxhash/0.8.1") if self.settings.os in ["Linux", "FreeBSD"]: @@ -144,21 +147,25 @@ def _diligent_platform(self): return "PLATFORM_TVOS" def build(self): - apply_conandata_patches(self) + self._patch_sources() cmake = CMake(self) - cmake.configure() + # By default, Diligent builds static and shared versions of every main library. We select the one we + # want based on options.shared in package(). To avoid building every intermediate library as SHARED, + # we have to disable BUILD_SHARED_LIBS. + # However, BUILD_SHARED_LIBS cannot be disabled normally (in the toolchain in configure()), because + # Conan outputs that override after the standard line that enables BUILD_SHARED_LIBS. Since the latter + # is a CACHE variable that cannot be overwritten with another set(), we have to specify it on the + # command-line, so it takes effect before the toolchain is parsed. + cmake.configure(variables={"BUILD_SHARED_LIBS": "OFF"}) cmake.build() def package(self): cmake = CMake(self) cmake.install() - rename(self, src=os.path.join(self.package_folder, "include", "source_subfolder"), - dst=os.path.join(self.package_folder, "include", "DiligentCore")) - rmdir(self, os.path.join(self.package_folder, "Licenses")) rmdir(self, os.path.join(self.package_folder, "lib")) rmdir(self, os.path.join(self.package_folder, "bin")) - copy(self, "License.txt", dst=os.path.join(self.package_folder, "licenses"), src=os.path.join(self.package_folder, self.source_folder, "source_subfolder")) + copy(self, "License.txt", dst=os.path.join(self.package_folder, "licenses"), src=os.path.join(self.package_folder, self.source_folder)) if self.options.shared: copy(self, pattern="*.dylib", dst=os.path.join(self.package_folder, "lib"), src=self.build_folder, keep_path=False) @@ -184,37 +191,37 @@ def package_info(self): self.cpp_info.libs = collect_libs(self) # included as discussed here https://github.com/conan-io/conan-center-index/pull/10732#issuecomment-1123596308 self.cpp_info.includedirs.append(os.path.join(self.package_folder, "include")) - self.cpp_info.includedirs.append(os.path.join(self.package_folder, "include", "DiligentCore", "Common")) - - self.cpp_info.includedirs.append(os.path.join("include", "DiligentCore")) - self.cpp_info.includedirs.append(os.path.join("include", "DiligentCore", "Common", "interface")) - self.cpp_info.includedirs.append(os.path.join("include", "DiligentCore", "Platforms", "interface")) - self.cpp_info.includedirs.append(os.path.join("include", "DiligentCore", "Graphics", "GraphicsEngine", "interface")) - self.cpp_info.includedirs.append(os.path.join("include", "DiligentCore", "Graphics", "GraphicsEngineVulkan", "interface")) - self.cpp_info.includedirs.append(os.path.join("include", "DiligentCore", "Graphics", "GraphicsEngineOpenGL", "interface")) - self.cpp_info.includedirs.append(os.path.join("include", "DiligentCore", "Graphics", "GraphicsAccessories", "interface")) - self.cpp_info.includedirs.append(os.path.join("include", "DiligentCore", "Graphics", "GraphicsTools", "interface")) - self.cpp_info.includedirs.append(os.path.join("include", "DiligentCore", "Graphics", "HLSL2GLSLConverterLib", "interface")) - archiver_path = os.path.join("include", "DiligentCore", "Graphics", "Archiver", "interface") + self.cpp_info.includedirs.append(os.path.join(self.package_folder, "include", "Common")) + + self.cpp_info.includedirs.append(os.path.join("include")) + self.cpp_info.includedirs.append(os.path.join("include", "Common", "interface")) + self.cpp_info.includedirs.append(os.path.join("include", "Platforms", "interface")) + self.cpp_info.includedirs.append(os.path.join("include", "Graphics", "GraphicsEngine", "interface")) + self.cpp_info.includedirs.append(os.path.join("include", "Graphics", "GraphicsEngineVulkan", "interface")) + self.cpp_info.includedirs.append(os.path.join("include", "Graphics", "GraphicsEngineOpenGL", "interface")) + self.cpp_info.includedirs.append(os.path.join("include", "Graphics", "GraphicsAccessories", "interface")) + self.cpp_info.includedirs.append(os.path.join("include", "Graphics", "GraphicsTools", "interface")) + self.cpp_info.includedirs.append(os.path.join("include", "Graphics", "HLSL2GLSLConverterLib", "interface")) + archiver_path = os.path.join("include", "Graphics", "Archiver", "interface") if os.path.isdir(archiver_path): self.cpp_info.includedirs.append(archiver_path) - self.cpp_info.includedirs.append(os.path.join("include", "DiligentCore", "Primitives", "interface")) - self.cpp_info.includedirs.append(os.path.join("include", "DiligentCore", "Platforms", "Basic", "interface")) + self.cpp_info.includedirs.append(os.path.join("include", "Primitives", "interface")) + self.cpp_info.includedirs.append(os.path.join("include", "Platforms", "Basic", "interface")) if self.settings.os == "Android": - self.cpp_info.includedirs.append(os.path.join("include", "DiligentCore", "Platforms", "Android", "interface")) + self.cpp_info.includedirs.append(os.path.join("include", "Platforms", "Android", "interface")) elif is_apple_os(self): - self.cpp_info.includedirs.append(os.path.join("include", "DiligentCore", "Platforms", "Apple", "interface")) + self.cpp_info.includedirs.append(os.path.join("include", "Platforms", "Apple", "interface")) elif self.settings.os == "Emscripten": - self.cpp_info.includedirs.append(os.path.join("include", "DiligentCore", "Platforms", "Emscripten", "interface")) + self.cpp_info.includedirs.append(os.path.join("include", "Platforms", "Emscripten", "interface")) elif self.settings.os == "Linux": - self.cpp_info.includedirs.append(os.path.join("include", "DiligentCore", "Platforms", "Linux", "interface")) + self.cpp_info.includedirs.append(os.path.join("include", "Platforms", "Linux", "interface")) elif self.settings.os == "Windows": - self.cpp_info.includedirs.append(os.path.join("include", "DiligentCore", "Platforms", "Win32", "interface")) - self.cpp_info.includedirs.append(os.path.join("include", "DiligentCore", "Graphics", "GraphicsEngineD3D11", "interface")) - self.cpp_info.includedirs.append(os.path.join("include", "DiligentCore", "Graphics", "GraphicsEngineD3D12", "interface")) + self.cpp_info.includedirs.append(os.path.join("include", "Platforms", "Win32", "interface")) + self.cpp_info.includedirs.append(os.path.join("include", "Graphics", "GraphicsEngineD3D11", "interface")) + self.cpp_info.includedirs.append(os.path.join("include", "Graphics", "GraphicsEngineD3D12", "interface")) - self.cpp_info.defines.append("SPIRV_CROSS_NAMESPACE_OVERRIDE={}".format(self.options["spirv-cross"].namespace)) + self.cpp_info.defines.append("SPIRV_CROSS_NAMESPACE_OVERRIDE={}".format(self.dependencies["spirv-cross"].options.namespace)) self.cpp_info.defines.append("{}=1".format(self._diligent_platform())) if self.settings.os in ["Macos", "Linux"]: diff --git a/recipes/diligent-core/all/test_package/CMakeLists.txt b/recipes/diligent-core/all/test_package/CMakeLists.txt index 927e85d16c3ed..1960d37cb752f 100644 --- a/recipes/diligent-core/all/test_package/CMakeLists.txt +++ b/recipes/diligent-core/all/test_package/CMakeLists.txt @@ -1,24 +1,17 @@ cmake_minimum_required(VERSION 3.1) project(test_package) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup() +find_package(diligent-core REQUIRED CONFIG) -if(WIN32) - set(FILE2STRING_PATH "${CONAN_BIN_DIRS_DILIGENT-CORE}/File2String.exe") -else() - set(FILE2STRING_PATH "${CONAN_BIN_DIRS_DILIGENT-CORE}/File2String") -endif() - -set(FILE "${CONAN_RES_DIRS_DILIGENT}/HLSLDefinitions.fxh") +set(FILE "${core_INCLUDE_DIR}/../res/HLSLDefinitions.fxh") set(CONVERTED_FILE "${PROJECT_BINARY_DIR}/HLSLDefinitions.h") add_custom_command(OUTPUT ${CONVERTED_FILE} - COMMAND ${FILE2STRING_PATH} ${FILE} ${CONVERTED_FILE} + COMMAND File2String ${FILE} ${CONVERTED_FILE} MAIN_DEPENDENCY ${FILE} # the primary input source file to the command COMMENT "Processing shader ${FILE}" VERBATIM) add_executable(${PROJECT_NAME} test_package.cpp) -target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS}) +target_link_libraries(${PROJECT_NAME} diligent-core::diligent-core) set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 17) diff --git a/recipes/diligent-core/all/test_package/conanfile.py b/recipes/diligent-core/all/test_package/conanfile.py index f2355b8294daf..fc51d8e4aee2d 100644 --- a/recipes/diligent-core/all/test_package/conanfile.py +++ b/recipes/diligent-core/all/test_package/conanfile.py @@ -1,10 +1,17 @@ -from conans import ConanFile, CMake, tools +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import CMake, cmake_layout import os -from conan.tools.build import cross_building class TestPackageConan(ConanFile): settings = "os", "compiler", "build_type", "arch" - generators = "cmake" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + + def layout(self): + cmake_layout(self) + + def requirements(self): + self.requires(self.tested_reference_str) def build(self): cmake = CMake(self) @@ -12,6 +19,6 @@ def build(self): cmake.build() def test(self): - if not cross_building(self): - bin_path = os.path.join("bin", "test_package") - self.run(bin_path, run_environment=True) + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/directx-headers/all/conandata.yml b/recipes/directx-headers/all/conandata.yml index 6289c24e10856..ad2d7265cac43 100644 --- a/recipes/directx-headers/all/conandata.yml +++ b/recipes/directx-headers/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.614.0": + url: "https://github.com/microsoft/DirectX-Headers/archive/refs/tags/v1.614.0.tar.gz" + sha256: "1cd54449799501a4ad129a4c7ccf0c026bbb699f937ba299d92de3aacd29c5be" "1.610.2": url: "https://github.com/microsoft/DirectX-Headers/archive/refs/tags/v1.610.2.tar.gz" sha256: "59492497e99bd3c23f8f8aa8a709f4d7b5bc5bd5057efa8c568bbad40015a8b2" diff --git a/recipes/directx-headers/config.yml b/recipes/directx-headers/config.yml index 15678ab870488..5129440c45004 100644 --- a/recipes/directx-headers/config.yml +++ b/recipes/directx-headers/config.yml @@ -1,3 +1,5 @@ versions: + "1.614.0": + folder: all "1.610.2": folder: all diff --git a/recipes/dispenso/all/conandata.yml b/recipes/dispenso/all/conandata.yml new file mode 100644 index 0000000000000..b025fdf2f9ff6 --- /dev/null +++ b/recipes/dispenso/all/conandata.yml @@ -0,0 +1,9 @@ +sources: + "1.3.0": + url: "https://github.com/facebookincubator/dispenso/archive/refs/tags/v1.3.0.tar.gz" + sha256: "824afe8d0d36bfd9bc9b1cbe9be89e7f3ed642a3612766d1c99d5f8dfc647c63" +patches: + "1.3.0": + - patch_file: "patches/1.3.0-001-unvendorize-concurrentqueue.patch" + patch_type: "conan" + patch_description: "Unvendorize concurrentqueue dependency" diff --git a/recipes/dispenso/all/conanfile.py b/recipes/dispenso/all/conanfile.py new file mode 100644 index 0000000000000..3c8d02f91bd44 --- /dev/null +++ b/recipes/dispenso/all/conanfile.py @@ -0,0 +1,118 @@ +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.build import check_min_cppstd +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.files import copy, get, export_conandata_patches, apply_conandata_patches, rm, rmdir +from conan.tools.scm import Version +import os + + +required_conan_version = ">=1.53.0" + + +class DispensoPackage(ConanFile): + name = "dispenso" + description = "Dispenso is a library for working with sets of tasks in parallel" + license = "MIT" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/facebookincubator/dispenso" + topics = ("tasks", "parallel", "threads") + package_type = "library" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + } + + @property + def _min_cppstd(self): + return 14 + + @property + def _compilers_minimum_version(self): + return { + "apple-clang": "10", + "clang": "7", + "gcc": "7", + "msvc": "191", + "Visual Studio": "15", + } + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + + def export_sources(self): + export_conandata_patches(self) + + def layout(self): + cmake_layout(self, src_folder="src") + + def requirements(self): + # Part of the public api in dispenso/thread_pool.h (and more), unvendorized + self.requires("concurrentqueue/1.0.4", transitive_headers=True) + + def validate(self): + if self.settings.compiler.cppstd: + check_min_cppstd(self, self._min_cppstd) + minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) + if minimum_version and Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration( + f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." + ) + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + tc.variables["DISPENSO_SHARED_LIB"] = self.options.shared + if self.settings.os == "Windows": + tc.preprocessor_definitions["NOMINMAX"] = 1 + tc.variables["CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS"] = 1 + if self.settings.get_safe("compiler.cppstd") is None: + # TODO: Remove once Conan 1 is deprecated, this is needed so apple-clang + # can compile, as it defaults to C++98 + tc.variables["CMAKE_CXX_STANDARD"] = self._min_cppstd + tc.generate() + tc = CMakeDeps(self) + tc.generate() + + def build(self): + apply_conandata_patches(self) + cmake = CMake(self) + cmake.configure() + cmake.build() + + def package(self): + copy(self, "LICENSE", self.source_folder, os.path.join(self.package_folder, "licenses")) + cmake = CMake(self) + cmake.install() + + rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) + rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) + rmdir(self, os.path.join(self.package_folder, "share")) + rm(self, "*.la", os.path.join(self.package_folder, "lib")) + rm(self, "*.pdb", os.path.join(self.package_folder, "lib")) + rm(self, "*.pdb", os.path.join(self.package_folder, "bin")) + + def package_info(self): + self.cpp_info.libs = ["dispenso"] + + self.cpp_info.set_property("cmake_file_name", "Dispenso") + self.cpp_info.set_property("cmake_target_name", "Dispenso::dispenso") + + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.system_libs.extend(["pthread", "m"]) + + if self.settings.os == "Windows": + self.cpp_info.system_libs.extend(["synchronization", "winmm"]) + self.cpp_info.defines.append("NOMINMAX") diff --git a/recipes/dispenso/all/patches/1.3.0-001-unvendorize-concurrentqueue.patch b/recipes/dispenso/all/patches/1.3.0-001-unvendorize-concurrentqueue.patch new file mode 100644 index 0000000000000..59c0de38973fc --- /dev/null +++ b/recipes/dispenso/all/patches/1.3.0-001-unvendorize-concurrentqueue.patch @@ -0,0 +1,36 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 7af1b8a..05c86a6 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -48,8 +48,6 @@ elseif (THREAD_SANITIZER) + add_link_options(-fsanitize=thread) + endif() + +-set(CMAKE_CXX_STANDARD 14 CACHE STRING "the C++ standard to use for this project") +- + ########################################################### + # Targets + add_subdirectory(dispenso) +diff --git a/dispenso/CMakeLists.txt b/dispenso/CMakeLists.txt +index 24a8c48..9231949 100644 +--- a/dispenso/CMakeLists.txt ++++ b/dispenso/CMakeLists.txt +@@ -33,16 +33,15 @@ endif() + target_include_directories(dispenso + PUBLIC + $ +- $ + $ + $ +- $ + ) + + set(CMAKE_THREAD_PREFER_PTHREAD TRUE) + set(THREADS_PREFER_PTHREAD_FLAG TRUE) + find_package(Threads REQUIRED) +-target_link_libraries(dispenso PUBLIC Threads::Threads) ++find_package(concurrentqueue REQUIRED) ++target_link_libraries(dispenso PUBLIC Threads::Threads concurrentqueue::concurrentqueue) + + check_cxx_source_compiles(" + #include diff --git a/recipes/dispenso/all/test_package/CMakeLists.txt b/recipes/dispenso/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..37b4a548d33a9 --- /dev/null +++ b/recipes/dispenso/all/test_package/CMakeLists.txt @@ -0,0 +1,9 @@ +cmake_minimum_required(VERSION 3.15) + +project(test_package LANGUAGES CXX) + +find_package(Dispenso REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE Dispenso::dispenso) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_14) diff --git a/recipes/dispenso/all/test_package/conanfile.py b/recipes/dispenso/all/test_package/conanfile.py new file mode 100644 index 0000000000000..ef5d7042163ec --- /dev/null +++ b/recipes/dispenso/all/test_package/conanfile.py @@ -0,0 +1,26 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/dispenso/all/test_package/test_package.cpp b/recipes/dispenso/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..cd298492d0fe8 --- /dev/null +++ b/recipes/dispenso/all/test_package/test_package.cpp @@ -0,0 +1,9 @@ +#include +#include "dispenso/parallel_for.h" + + +int main(void) { + dispenso::parallel_for(0, 5, [] (size_t j) { + std::cout << j << std::endl; + }); +} diff --git a/recipes/dispenso/config.yml b/recipes/dispenso/config.yml new file mode 100644 index 0000000000000..426a0e4c79e9b --- /dev/null +++ b/recipes/dispenso/config.yml @@ -0,0 +1,3 @@ +versions: + "1.3.0": + folder: all diff --git a/recipes/djvulibre/all/conandata.yml b/recipes/djvulibre/all/conandata.yml new file mode 100644 index 0000000000000..8f7d4ad051f7b --- /dev/null +++ b/recipes/djvulibre/all/conandata.yml @@ -0,0 +1,9 @@ +sources: + "3.5.28": + url: "http://downloads.sourceforge.net/djvu/djvulibre-3.5.28.tar.gz" + sha256: "fcd009ea7654fde5a83600eb80757bd3a76998e47d13c66b54c8db849f8f2edc" +patches: + "3.5.28": + - patch_file: "patches/remove-register-keyword.patch" + patch_type: "portability" + patch_description: "Remove deprecated 'register' keyword for C++17 compatibility" diff --git a/recipes/djvulibre/all/conanfile.py b/recipes/djvulibre/all/conanfile.py new file mode 100644 index 0000000000000..02736d758043d --- /dev/null +++ b/recipes/djvulibre/all/conanfile.py @@ -0,0 +1,187 @@ +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.apple import fix_apple_shared_install_name, is_apple_os +from conan.tools.build import cross_building, stdcpp_library +from conan.tools.env import Environment, VirtualBuildEnv, VirtualRunEnv +from conan.tools.files import copy, get, rm, rmdir, save, rename, export_conandata_patches, apply_conandata_patches +from conan.tools.gnu import Autotools, AutotoolsToolchain, AutotoolsDeps +from conan.tools.layout import basic_layout +from conan.tools.microsoft import is_msvc, unix_path, check_min_vs +import os + +required_conan_version = ">=1.54.0" + + +class DjVuLibreConan(ConanFile): + name = "djvulibre" + description = "Library and utilities to create, manipulate and view DjVu documents" + license = "GPL-2.0-or-later" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://djvu.sourceforge.net/" + topics = ("djvu", "file-format", "document-format") + + package_type = "library" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + "tools": [True, False], + "with_libjpeg": ["libjpeg", "libjpeg-turbo", "mozjpeg"], + } + default_options = { + "shared": False, + "fPIC": True, + "tools": False, + "with_libjpeg": "libjpeg", + } + + @property + def _settings_build(self): + return getattr(self, "settings_build", self.settings) + + def export_sources(self): + export_conandata_patches(self) + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + + def layout(self): + basic_layout(self, src_folder="src") + + def requirements(self): + self.requires("libiconv/1.17") + if self.options.with_libjpeg == "libjpeg": + self.requires("libjpeg/9e") + elif self.options.with_libjpeg == "libjpeg-turbo": + self.requires("libjpeg-turbo/3.0.2") + elif self.options.with_libjpeg == "mozjpeg": + self.requires("mozjpeg/4.1.5") + self.requires("libtiff/4.6.0") + + def validate(self): + if self.settings.os == "Windows" and not self.options.shared: + # __declspec(dllimport) or __declspec(dllexport) is always set for symbols + raise ConanInvalidConfiguration("Static linking is not supported on Windows") + + def build_requirements(self): + self.tool_requires("libtool/2.4.7") + if self._settings_build.os == "Windows": + self.win_bash = True + if not self.conf.get("tools.microsoft.bash:path", check_type=str): + self.tool_requires("msys2/cci.latest") + if is_msvc(self): + self.tool_requires("automake/1.16.5") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + VirtualBuildEnv(self).generate() + if not cross_building(self): + VirtualRunEnv(self).generate(scope="build") + + tc = AutotoolsToolchain(self) + jpeg = self.dependencies[self.options.with_libjpeg.value].cpp_info.aggregated_components() + tiff = self.dependencies["libtiff"].cpp_info.aggregated_components() + tc.configure_args.extend([ + f"JPEG_LIBS={' '.join(f'-l{l}' for l in jpeg.libs)}", + f"TIFF_LIBS={' '.join(f'-l{l}' for l in tiff.libs)}", + ]) + if is_msvc(self): + tc.extra_cxxflags.append("-EHsc") + if check_min_vs(self, "180", raise_invalid=False): + tc.extra_cflags.append("-FS") + tc.extra_cxxflags.append("-FS") + tc.extra_ldflags.append("-ladvapi32") + tc.generate() + + if is_msvc(self): + env = Environment() + automake_conf = self.dependencies.build["automake"].conf_info + compile_wrapper = unix_path(self, automake_conf.get("user.automake:compile-wrapper", check_type=str)) + ar_wrapper = unix_path(self, automake_conf.get("user.automake:lib-wrapper", check_type=str)) + env.define("CC", f"{compile_wrapper} cl -nologo") + env.define("CXX", f"{compile_wrapper} cl -nologo") + env.define("LD", "link -nologo") + env.define("AR", f"{ar_wrapper} lib") + env.define("NM", "dumpbin -symbols") + env.vars(self).save_script("conanbuild_msvc") + + if is_msvc(self): + # Custom AutotoolsDeps for cl-like compilers + # workaround for https://github.com/conan-io/conan/issues/12784 + includedirs = [] + defines = [] + libs = [] + libdirs = [] + linkflags = [] + cxxflags = [] + cflags = [] + for dependency in self.dependencies.values(): + deps_cpp_info = dependency.cpp_info.aggregated_components() + includedirs.extend(deps_cpp_info.includedirs) + defines.extend(deps_cpp_info.defines) + libs.extend(deps_cpp_info.libs + deps_cpp_info.system_libs) + libdirs.extend(deps_cpp_info.libdirs) + linkflags.extend(deps_cpp_info.sharedlinkflags + deps_cpp_info.exelinkflags) + cxxflags.extend(deps_cpp_info.cxxflags) + cflags.extend(deps_cpp_info.cflags) + + env = Environment() + env.append("CPPFLAGS", [f"-I{unix_path(self, p)}" for p in includedirs] + [f"-D{d}" for d in defines]) + env.append("_LINK_", [lib if lib.endswith(".lib") else f"{lib}.lib" for lib in libs]) + env.append("LDFLAGS", [f"-L{unix_path(self, p)}" for p in libdirs] + linkflags) + env.append("CXXFLAGS", cxxflags) + env.append("CFLAGS", cflags) + env.vars(self).save_script("conanautotoolsdeps_cl_workaround") + else: + deps = AutotoolsDeps(self) + deps.generate() + + def _patch_sources(self): + apply_conandata_patches(self) + if not self.options.tools: + save(self, os.path.join(self.source_folder, "tools", "Makefile.am"), "") + save(self, os.path.join(self.source_folder, "xmltools", "Makefile.am"), "") + + def build(self): + self._patch_sources() + autotools = Autotools(self) + autotools.autoreconf() + autotools.configure() + autotools.make() + + def package(self): + copy(self, "COPYING", self.source_folder, os.path.join(self.package_folder, "licenses")) + autotools = Autotools(self) + autotools.install() + rm(self, "*.la", os.path.join(self.package_folder, "lib")) + rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) + rmdir(self, os.path.join(self.package_folder, "share", "man")) + rmdir(self, os.path.join(self.package_folder, "share", "icons")) + rename(self, os.path.join(self.package_folder, "share"), os.path.join(self.package_folder, "res")) + fix_apple_shared_install_name(self) + if is_msvc(self) and self.options.shared: + rename(self, os.path.join(self.package_folder, "lib", "djvulibre.dll.lib"), + os.path.join(self.package_folder, "lib", "djvulibre.lib")) + + def package_info(self): + self.cpp_info.set_property("pkg_config_name", "ddjvuapi") + self.cpp_info.libs = ["djvulibre"] + self.cpp_info.resdirs = ["res"] + + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.system_libs.extend(["m", "pthread"]) + elif is_apple_os(self): + self.cpp_info.frameworks.extend(["CoreFoundation"]) + elif self.settings.os == "Windows": + self.cpp_info.system_libs.append("advapi32") + + # Implemented in C++ but exports a pure C API + if stdcpp_library(self): + self.cpp_info.system_libs.append(stdcpp_library(self)) diff --git a/recipes/djvulibre/all/patches/remove-register-keyword.patch b/recipes/djvulibre/all/patches/remove-register-keyword.patch new file mode 100644 index 0000000000000..d6a6af75193b6 --- /dev/null +++ b/recipes/djvulibre/all/patches/remove-register-keyword.patch @@ -0,0 +1,34 @@ +--- libdjvu/GBitmap.h ++++ libdjvu/GBitmap.h +@@ -620,7 +620,7 @@ + inline int + GBitmap::read_run(unsigned char *&data) + { +- register int z=*data++; ++ int z=*data++; + return (z>=RUNOVERFLOWVALUE)? + ((z&~RUNOVERFLOWVALUE)<<8)|(*data++):z; + } +@@ -628,7 +628,7 @@ + inline int + GBitmap::read_run(const unsigned char *&data) + { +- register int z=*data++; ++ int z=*data++; + return (z>=RUNOVERFLOWVALUE)? + ((z&~RUNOVERFLOWVALUE)<<8)|(*data++):z; + } +--- libdjvu/MMX.h ++++ libdjvu/MMX.h +@@ -172,9 +172,9 @@ + #define MMXir(op,imm,dst) \ + __asm { op dst,imm } + #define MMXar(op,addr,dst) \ +- { register __int64 var=*(__int64*)(addr); __asm { op dst,var } } ++ { __int64 var=*(__int64*)(addr); __asm { op dst,var } } + #define MMXra(op,src,addr) \ +- { register __int64 var; __asm { op [var],src }; *(__int64*)addr = var; } ++ { __int64 var; __asm { op [var],src }; *(__int64*)addr = var; } + // Probably not as efficient as GCC macros + #define MMX 1 + #endif diff --git a/recipes/djvulibre/all/test_package/CMakeLists.txt b/recipes/djvulibre/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..78eb45bda8ee3 --- /dev/null +++ b/recipes/djvulibre/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES C) + +find_package(djvulibre REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.c) +target_link_libraries(${PROJECT_NAME} PRIVATE djvulibre::djvulibre) +target_compile_features(${PROJECT_NAME} PRIVATE c_std_99) diff --git a/recipes/djvulibre/all/test_package/conanfile.py b/recipes/djvulibre/all/test_package/conanfile.py new file mode 100644 index 0000000000000..3a91c9439218e --- /dev/null +++ b/recipes/djvulibre/all/test_package/conanfile.py @@ -0,0 +1,26 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def layout(self): + cmake_layout(self) + + def requirements(self): + self.requires(self.tested_reference_str) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/djvulibre/all/test_package/test_package.c b/recipes/djvulibre/all/test_package/test_package.c new file mode 100644 index 0000000000000..9c8f3383716ca --- /dev/null +++ b/recipes/djvulibre/all/test_package/test_package.c @@ -0,0 +1,15 @@ +#include +#include + +int main() { + ddjvu_context_t* context = ddjvu_context_create("test_package"); + if (!context) { + printf("Failed to create djvu context\n"); + return 1; + } + printf("DjVu context initialized successfully.\n"); + int cache_size = ddjvu_cache_get_size(context); + printf("Cache size: %d\n", cache_size); + ddjvu_context_release(context); + return 0; +} diff --git a/recipes/djvulibre/config.yml b/recipes/djvulibre/config.yml new file mode 100644 index 0000000000000..9cb2b472d3ed1 --- /dev/null +++ b/recipes/djvulibre/config.yml @@ -0,0 +1,3 @@ +versions: + "3.5.28": + folder: all diff --git a/recipes/dlpack/all/conandata.yml b/recipes/dlpack/all/conandata.yml index 1ee4d67252887..f541482d88868 100644 --- a/recipes/dlpack/all/conandata.yml +++ b/recipes/dlpack/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.0": + url: "https://github.com/dmlc/dlpack/archive/v1.0.tar.gz" + sha256: "f8cfdcb634ff3cf0e3d9a3426e019e1c6469780a3b0020c9bc4ecc09cf9abcb1" "0.8": url: "https://github.com/dmlc/dlpack/archive/v0.8.tar.gz" sha256: "cf965c26a5430ba4cc53d61963f288edddcd77443aa4c85ce722aaf1e2f29513" diff --git a/recipes/dlpack/all/test_package/test_package.cpp b/recipes/dlpack/all/test_package/test_package.cpp index 6304024f2e652..9c286d918cb1b 100644 --- a/recipes/dlpack/all/test_package/test_package.cpp +++ b/recipes/dlpack/all/test_package/test_package.cpp @@ -4,7 +4,11 @@ int main() { -#if DLPACK_VERSION < 60 +#ifdef DLPACK_MAJOR_VERSION // Since 1.0 + int major = DLPACK_MAJOR_VERSION; + int minor = DLPACK_MINOR_VERSION; + int patch = 0; +#elif DLPACK_VERSION < 60 int major = (DLPACK_VERSION >> 6) & 7; int minor = (DLPACK_VERSION >> 3) & 7; int patch = DLPACK_VERSION & 7; diff --git a/recipes/dlpack/config.yml b/recipes/dlpack/config.yml index a1b8905afe4b1..001dc29f3eaea 100644 --- a/recipes/dlpack/config.yml +++ b/recipes/dlpack/config.yml @@ -1,4 +1,6 @@ versions: + "1.0": + folder: "all" "0.8": folder: "all" "0.6": diff --git a/recipes/dpp/all/conandata.yml b/recipes/dpp/all/conandata.yml new file mode 100644 index 0000000000000..72137f59232db --- /dev/null +++ b/recipes/dpp/all/conandata.yml @@ -0,0 +1,9 @@ +sources: + "10.0.35": + url: + - "https://github.com/brainboxdotcc/DPP/archive/refs/tags/v10.0.35.zip" + sha256: "ebe82b0c3c7678d31bc26ad7ab9aedfd66057a559c541750ede5d19a0ed0c245" + "10.0.34": + url: + - "https://github.com/brainboxdotcc/DPP/archive/refs/tags/v10.0.34.zip" + sha256: "944dcaa19638ff88feceae2f543662675eb8aceb59458ad369edc28819e05054" diff --git a/recipes/dpp/all/conanfile.py b/recipes/dpp/all/conanfile.py new file mode 100644 index 0000000000000..b33af815685ca --- /dev/null +++ b/recipes/dpp/all/conanfile.py @@ -0,0 +1,81 @@ +import os +from conan import ConanFile +from conan.tools.build import check_min_cppstd, cross_building +from conan.tools.cmake import CMakeToolchain, CMake, cmake_layout, CMakeDeps +from conan.tools.files import get, copy, rmdir +from conan.tools.scm import Version + +required_conan_version = ">=2" + +class DPPConan(ConanFile): + name = "dpp" + license = "Apache-2.0" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/brainboxdotcc/DPP" + description = "D++ is a lightweight and efficient library for Discord" + topics = ("discord") + package_type = "shared-library" + settings = "os", "compiler", "build_type", "arch" + + def validate(self): + check_min_cppstd(self, "17") + + def requirements(self): + self.requires("nlohmann_json/3.11.2", transitive_libs=True, transitive_headers=True) + self.requires("openssl/[>=1.1 <4]") + self.requires("zlib/[>=1.2.11 <2]") + self.requires("opus/1.4") + + def layout(self): + cmake_layout(self, src_folder="src") + + + def build_requirements(self): + self.tool_requires("cmake/[>=3.16 <4]") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + deps = CMakeDeps(self) + deps.generate() + tc = CMakeToolchain(self) + tc.cache_variables["DPP_NO_VCPKG"] = True + tc.cache_variables["DPP_USE_EXTERNAL_JSON"] = True + tc.cache_variables["CONAN_EXPORTED"] = True + tc.cache_variables["BUILD_VOICE_SUPPORT"] = True + tc.cache_variables["DPP_BUILD_TEST"] = False + tc.cache_variables["BUILD_SHARED_LIBS"] = True + if Version(self.version) <= "10.0.34": + # Workaround for Neon not compiling in old versions + tc.cache_variables["AVX_TYPE"] = "AVX0" + if self.settings.os == "Macos" and cross_building(self) and self.settings.arch == "x86_64": + tc.cache_variables["AVX1_EXITCODE"] = "0" + tc.cache_variables["AVX2_EXITCODE"] = "0" + tc.cache_variables["AVX512_EXITCODE"] = "-1" + tc.cache_variables["AVX1024_EXITCODE"] = "-1" + tc.generate() + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def package(self): + copy(self, "LICENSE", self.source_folder, os.path.join(self.package_folder, "licenses")) + cmake = CMake(self) + cmake.install() + rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) + rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) + + def package_info(self): + self.cpp_info.libs = ["dpp"] + self.cpp_info.set_property("cmake_file_name", "dpp") + self.cpp_info.set_property("cmake_target_name", "dpp::dpp") + # On windows only, the headers and libs go into dpp-10.0 subdirectories. + if self.settings.os == "Windows": + self.cpp_info.includedirs = ["include/dpp-10.0"] + self.cpp_info.libdirs = ["lib/dpp-10.0"] + elif self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.system_libs = ["pthread"] + self.cpp_info.defines = ["DPP_USE_EXTERNAL_JSON"] diff --git a/recipes/dpp/all/test_package/CMakeLists.txt b/recipes/dpp/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..6aad9088d01aa --- /dev/null +++ b/recipes/dpp/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) + +project(test_package LANGUAGES CXX) +find_package(dpp REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE dpp::dpp) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) diff --git a/recipes/dpp/all/test_package/conanfile.py b/recipes/dpp/all/test_package/conanfile.py new file mode 100644 index 0000000000000..ef5d7042163ec --- /dev/null +++ b/recipes/dpp/all/test_package/conanfile.py @@ -0,0 +1,26 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/dpp/all/test_package/test_package.cpp b/recipes/dpp/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..90606cfd59042 --- /dev/null +++ b/recipes/dpp/all/test_package/test_package.cpp @@ -0,0 +1,5 @@ +#include + +int main() { + dpp::cluster test_cluster(""); +} diff --git a/recipes/dpp/config.yml b/recipes/dpp/config.yml new file mode 100644 index 0000000000000..7b7ac472d8862 --- /dev/null +++ b/recipes/dpp/config.yml @@ -0,0 +1,5 @@ +versions: + "10.0.35": + folder: all + "10.0.34": + folder: all diff --git a/recipes/drogon/all/conandata.yml b/recipes/drogon/all/conandata.yml index 5ade6257a65f6..78bae5ec69798 100644 --- a/recipes/drogon/all/conandata.yml +++ b/recipes/drogon/all/conandata.yml @@ -1,4 +1,19 @@ sources: + "1.9.8": + url: "https://github.com/drogonframework/drogon/archive/v1.9.8.tar.gz" + sha256: "62332a4882cc7db1c7cf04391b65c91ddf6fcbb49af129fc37eb0130809e0449" + "1.9.7": + url: "https://github.com/drogonframework/drogon/archive/v1.9.7.tar.gz" + sha256: "e54c5d604769a496b951e5af52a0f85e60eba584fae426d204eb5b2f02cfbf59" + "1.9.6": + url: "https://github.com/drogonframework/drogon/archive/v1.9.6.tar.gz" + sha256: "a81d0ea0e87b0214aa56f7fa7bb851011efe606af67891a0945825104505a08a" + "1.9.5": + url: "https://github.com/drogonframework/drogon/archive/v1.9.5.tar.gz" + sha256: "ec17882835abeb0672db29cb36ab0c5523f144d5d8ff177861b8f5865803eaae" + "1.9.4": + url: "https://github.com/drogonframework/drogon/archive/v1.9.4.tar.gz" + sha256: "b23d9d01d36fb1221298fcdbedcf7fd3e1b8b8821bf6fb8ed073c8b0c290d11d" "1.9.3": url: "https://github.com/drogonframework/drogon/archive/v1.9.3.tar.gz" sha256: "fb4ef351b3e4c06ed850cfbbf50c571502decb1738fb7d62a9d7d70077c9fc23" @@ -14,79 +29,78 @@ sources: "1.8.7": url: "https://github.com/drogonframework/drogon/archive/v1.8.7.tar.gz" sha256: "d2d80d35becd69bf80d74bf09b69425193f1b7be3926bd44f3ac7b951e54465d" - "1.8.6": - url: "https://github.com/drogonframework/drogon/archive/v1.8.6.tar.gz" - sha256: "ff02979f28047e97e19e36d1f363b3052b8122975fa8a379305d746dfe5fb004" - "1.8.5": - url: "https://github.com/drogonframework/drogon/archive/v1.8.5.tar.gz" - sha256: "9469f99408c114bc1e89945a3a8dab4640ea6d8cb06e7d42f06c1dfda3f71d2a" - "1.8.4": - url: "https://github.com/drogonframework/drogon/archive/v1.8.4.tar.gz" - sha256: "6f2f59ead0f0c37b0aac4bc889cbaedf3c2540f3020e892596c72f0a4d887a18" patches: - "1.9.3": + "1.9.8": - patch_file: "patches/1.8.5-0001-remove-shared-libs.patch" patch_description: "remove shared libs option" patch_type: "conan" - - patch_file: "patches/1.9.2-0002-find-cci-packages.patch" + - patch_file: "patches/1.9.7-0002-find-cci-packages.patch" patch_description: "Fix jsoncpp cmake target name" patch_type: "conan" - "1.9.2": + "1.9.7": - patch_file: "patches/1.8.5-0001-remove-shared-libs.patch" patch_description: "remove shared libs option" patch_type: "conan" - - patch_file: "patches/1.9.2-0002-find-cci-packages.patch" + - patch_file: "patches/1.9.7-0002-find-cci-packages.patch" patch_description: "Fix jsoncpp cmake target name" patch_type: "conan" - "1.9.1": + - patch_file: "patches/1.9.7-0003-include-exception.patch" + patch_description: "include exception for exception_ptr" + patch_type: "portability" + patch_source: "https://github.com/drogonframework/drogon/pull/2159" + "1.9.6": - patch_file: "patches/1.8.5-0001-remove-shared-libs.patch" patch_description: "remove shared libs option" patch_type: "conan" - - patch_file: "patches/1.9.0-0002-find-cci-packages.patch" + - patch_file: "patches/1.9.6-0002-find-cci-packages.patch" patch_description: "Fix jsoncpp cmake target name" patch_type: "conan" - "1.9.0": + "1.9.5": - patch_file: "patches/1.8.5-0001-remove-shared-libs.patch" patch_description: "remove shared libs option" patch_type: "conan" - - patch_file: "patches/1.9.0-0002-find-cci-packages.patch" + - patch_file: "patches/1.9.2-0002-find-cci-packages.patch" patch_description: "Fix jsoncpp cmake target name" patch_type: "conan" - "1.8.7": + "1.9.4": - patch_file: "patches/1.8.5-0001-remove-shared-libs.patch" patch_description: "remove shared libs option" patch_type: "conan" - - patch_file: "patches/1.8.6-0002-find-cci-packages.patch" + - patch_file: "patches/1.9.2-0002-find-cci-packages.patch" patch_description: "Fix jsoncpp cmake target name" patch_type: "conan" - "1.8.6": + "1.9.3": - patch_file: "patches/1.8.5-0001-remove-shared-libs.patch" patch_description: "remove shared libs option" patch_type: "conan" - - patch_file: "patches/1.8.6-0002-find-cci-packages.patch" + - patch_file: "patches/1.9.2-0002-find-cci-packages.patch" + patch_description: "Fix jsoncpp cmake target name" + patch_type: "conan" + "1.9.2": + - patch_file: "patches/1.8.5-0001-remove-shared-libs.patch" + patch_description: "remove shared libs option" + patch_type: "conan" + - patch_file: "patches/1.9.2-0002-find-cci-packages.patch" patch_description: "Fix jsoncpp cmake target name" patch_type: "conan" - "1.8.5": + "1.9.1": - patch_file: "patches/1.8.5-0001-remove-shared-libs.patch" patch_description: "remove shared libs option" patch_type: "conan" - - patch_file: "patches/1.8.5-0002-find-cci-packages.patch" + - patch_file: "patches/1.9.0-0002-find-cci-packages.patch" patch_description: "Fix jsoncpp cmake target name" patch_type: "conan" - "1.8.4": - - patch_file: "patches/1.8.4-0001-remove-shared-libs.patch" + "1.9.0": + - patch_file: "patches/1.8.5-0001-remove-shared-libs.patch" patch_description: "remove shared libs option" patch_type: "conan" - - patch_file: "patches/1.8.4-0002-find-package-jsoncpp.patch" + - patch_file: "patches/1.9.0-0002-find-cci-packages.patch" patch_description: "Fix jsoncpp cmake target name" patch_type: "conan" - - patch_file: "patches/1.8.4-0003-find-package-sqlite.patch" - patch_description: "Fix sqlite cmake target name" + "1.8.7": + - patch_file: "patches/1.8.5-0001-remove-shared-libs.patch" + patch_description: "remove shared libs option" patch_type: "conan" - - patch_file: "patches/1.8.4-0004-find-package-yaml-cpp.patch" - patch_description: "Fix yaml-cpp cmake target name" + - patch_file: "patches/1.8.6-0002-find-cci-packages.patch" + patch_description: "Fix jsoncpp cmake target name" patch_type: "conan" - - patch_file: "patches/1.8.2-0004-support-gcc13.patch" - patch_description: "Fix compilation error on gcc13 with C++17" - patch_type: "portability" - patch_source: "https://github.com/drogonframework/drogon/pull/1563/" diff --git a/recipes/drogon/all/conanfile.py b/recipes/drogon/all/conanfile.py index 953a213b3cedc..88788705194dd 100644 --- a/recipes/drogon/all/conanfile.py +++ b/recipes/drogon/all/conanfile.py @@ -110,7 +110,10 @@ def validate(self): raise ConanInvalidConfiguration(f"{self.ref} requires boost on C++14") def requirements(self): - self.requires("trantor/1.5.16", transitive_headers=True, transitive_libs=True) + if Version(self.version) < "1.9.7": + self.requires("trantor/1.5.19", transitive_headers=True, transitive_libs=True) + else: + self.requires("trantor/1.5.21", transitive_headers=True, transitive_libs=True) self.requires("jsoncpp/1.9.5", transitive_headers=True, transitive_libs=True) self.requires("openssl/[>=1.1 <4]") self.requires("zlib/[>=1.2.11 <2]") diff --git a/recipes/drogon/all/patches/1.8.2-0004-support-gcc13.patch b/recipes/drogon/all/patches/1.8.2-0004-support-gcc13.patch deleted file mode 100644 index 477d23fb1fd63..0000000000000 --- a/recipes/drogon/all/patches/1.8.2-0004-support-gcc13.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/lib/inc/drogon/RateLimiter.h b/lib/inc/drogon/RateLimiter.h -index 3b8706b..dece795 100644 ---- a/lib/inc/drogon/RateLimiter.h -+++ b/lib/inc/drogon/RateLimiter.h -@@ -3,6 +3,7 @@ - #include - #include - #include -+#include - - namespace drogon - { diff --git a/recipes/drogon/all/patches/1.8.4-0001-remove-shared-libs.patch b/recipes/drogon/all/patches/1.8.4-0001-remove-shared-libs.patch deleted file mode 100644 index f51304849a04f..0000000000000 --- a/recipes/drogon/all/patches/1.8.4-0001-remove-shared-libs.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 4406362..c346e60 100755 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -16,7 +16,6 @@ option(BUILD_CTL "Build drogon_ctl" ${BUILD_PROGRAMS}) - option(BUILD_EXAMPLES "Build examples" ${BUILD_PROGRAMS}) - option(BUILD_ORM "Build orm" ON) - option(COZ_PROFILING "Use coz for profiling" OFF) --option(BUILD_SHARED_LIBS "Build drogon as a shared lib" OFF) - option(BUILD_DOC "Build Doxygen documentation" OFF) - option(BUILD_BROTLI "Build Brotli" ON) - option(BUILD_YAML_CONFIG "Build yaml config" ON) diff --git a/recipes/drogon/all/patches/1.8.4-0002-find-package-jsoncpp.patch b/recipes/drogon/all/patches/1.8.4-0002-find-package-jsoncpp.patch deleted file mode 100644 index 362fa96c66cc6..0000000000000 --- a/recipes/drogon/all/patches/1.8.4-0002-find-package-jsoncpp.patch +++ /dev/null @@ -1,17 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index c346e60..e561e5c 100755 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -206,9 +206,9 @@ else() - endif() - - # jsoncpp --find_package(Jsoncpp REQUIRED) --target_link_libraries(${PROJECT_NAME} PUBLIC Jsoncpp_lib) --list(APPEND INCLUDE_DIRS_FOR_DYNAMIC_VIEW ${JSONCPP_INCLUDE_DIRS}) -+find_package(jsoncpp REQUIRED) -+target_link_libraries(${PROJECT_NAME} PUBLIC jsoncpp_lib) -+list(APPEND INCLUDE_DIRS_FOR_DYNAMIC_VIEW ${jsoncpp_INCLUDE_DIRS}) - - # yamlcpp - if(BUILD_YAML_CONFIG) diff --git a/recipes/drogon/all/patches/1.8.4-0003-find-package-sqlite.patch b/recipes/drogon/all/patches/1.8.4-0003-find-package-sqlite.patch deleted file mode 100644 index 6f97d35a4d314..0000000000000 --- a/recipes/drogon/all/patches/1.8.4-0003-find-package-sqlite.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index e561e5c..993b21a 100755 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -437,7 +437,7 @@ if (BUILD_SQLITE) - find_package(SQLite3 QUIET) - find_package(unofficial-sqlite3 QUIET) - if (SQLite3_FOUND) -- target_link_libraries(${PROJECT_NAME} PRIVATE SQLite3_lib) -+ target_link_libraries(${PROJECT_NAME} PRIVATE SQLite::SQLite3) - set(DROGON_FOUND_SQLite3 TRUE) - elseif (unofficial-sqlite3_FOUND) - target_link_libraries(${PROJECT_NAME} PRIVATE unofficial::sqlite3::sqlite3) diff --git a/recipes/drogon/all/patches/1.8.4-0004-find-package-yaml-cpp.patch b/recipes/drogon/all/patches/1.8.4-0004-find-package-yaml-cpp.patch deleted file mode 100644 index a9fca7863aea7..0000000000000 --- a/recipes/drogon/all/patches/1.8.4-0004-find-package-yaml-cpp.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 44063629..c18c86db 100755 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -215,7 +215,7 @@ if(BUILD_YAML_CONFIG) - find_package(yaml-cpp QUIET) - if(yaml-cpp_FOUND) - message(STATUS "yaml-cpp found") -- target_link_libraries(${PROJECT_NAME} PUBLIC ${YAML_CPP_LIBRARIES}) -+ target_link_libraries(${PROJECT_NAME} PUBLIC yaml-cpp) - target_compile_definitions(${PROJECT_NAME} PUBLIC HAS_YAML_CPP) - else() - message(STATUS "yaml-cpp not used") diff --git a/recipes/drogon/all/patches/1.8.5-0002-find-cci-packages.patch b/recipes/drogon/all/patches/1.8.5-0002-find-cci-packages.patch deleted file mode 100644 index 8bf9e60842f93..0000000000000 --- a/recipes/drogon/all/patches/1.8.5-0002-find-cci-packages.patch +++ /dev/null @@ -1,71 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index e3e7fcf..d1032da 100755 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -198,9 +198,9 @@ else() - endif() - - # jsoncpp --find_package(Jsoncpp REQUIRED) --target_link_libraries(${PROJECT_NAME} PUBLIC Jsoncpp_lib) --list(APPEND INCLUDE_DIRS_FOR_DYNAMIC_VIEW ${JSONCPP_INCLUDE_DIRS}) -+find_package(jsoncpp REQUIRED) -+target_link_libraries(${PROJECT_NAME} PUBLIC jsoncpp_lib) -+list(APPEND INCLUDE_DIRS_FOR_DYNAMIC_VIEW ${jsoncpp_INCLUDE_DIRS}) - - # yamlcpp - if(BUILD_YAML_CONFIG) -@@ -212,7 +212,7 @@ if(BUILD_YAML_CONFIG) - message(STATUS "yaml-cpp not used") - else() - message(STATUS "yaml-cpp found ") -- target_link_libraries(${PROJECT_NAME} PUBLIC ${YAML_CPP_LINK_LIBRARY}) -+ target_link_libraries(${PROJECT_NAME} PUBLIC yaml-cpp) - target_compile_definitions(${PROJECT_NAME} PUBLIC HAS_YAML_CPP) - endif() - else() -@@ -442,7 +442,7 @@ if (BUILD_SQLITE) - find_package(SQLite3 QUIET) - find_package(unofficial-sqlite3 QUIET) - if (SQLite3_FOUND) -- target_link_libraries(${PROJECT_NAME} PRIVATE SQLite3_lib) -+ target_link_libraries(${PROJECT_NAME} PRIVATE SQLite::SQLite3) - set(DROGON_FOUND_SQLite3 TRUE) - elseif (unofficial-sqlite3_FOUND) - target_link_libraries(${PROJECT_NAME} PRIVATE unofficial::sqlite3::sqlite3) -@@ -465,10 +465,10 @@ if (BUILD_SQLITE) - endif (BUILD_SQLITE) - - if (BUILD_REDIS) -- find_package(Hiredis) -- if (Hiredis_FOUND) -+ find_package(hiredis) -+ if (hiredis_FOUND) - add_definitions(-DUSE_REDIS) -- target_link_libraries(${PROJECT_NAME} PRIVATE Hiredis_lib) -+ target_link_libraries(${PROJECT_NAME} PRIVATE hiredis::hiredis) - set(DROGON_SOURCES - ${DROGON_SOURCES} - nosql_lib/redis/src/RedisClientImpl.cc -@@ -488,10 +488,10 @@ if (BUILD_REDIS) - nosql_lib/redis/src/SubscribeContext.h - nosql_lib/redis/src/RedisSubscriberImpl.h) - -- endif (Hiredis_FOUND) -+ endif () - endif (BUILD_REDIS) - --if (NOT Hiredis_FOUND) -+if (NOT hiredis_FOUND) - set(DROGON_SOURCES - ${DROGON_SOURCES} - lib/src/RedisClientSkipped.cc -@@ -500,7 +500,7 @@ if (NOT Hiredis_FOUND) - set(private_headers - ${private_headers} - lib/src/RedisClientManager.h) --endif (NOT Hiredis_FOUND) -+endif () - - if (BUILD_TESTING) - add_subdirectory(nosql_lib/redis/tests) diff --git a/recipes/drogon/all/patches/1.9.6-0002-find-cci-packages.patch b/recipes/drogon/all/patches/1.9.6-0002-find-cci-packages.patch new file mode 100644 index 0000000000000..1e82fc39d8876 --- /dev/null +++ b/recipes/drogon/all/patches/1.9.6-0002-find-cci-packages.patch @@ -0,0 +1,71 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 11c96b2..441b2c2 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -180,9 +180,9 @@ endif() + + + # jsoncpp +-find_package(Jsoncpp REQUIRED) +-target_link_libraries(${PROJECT_NAME} PUBLIC Jsoncpp_lib) +-list(APPEND INCLUDE_DIRS_FOR_DYNAMIC_VIEW ${JSONCPP_INCLUDE_DIRS}) ++find_package(jsoncpp REQUIRED) ++target_link_libraries(${PROJECT_NAME} PUBLIC jsoncpp_lib) ++list(APPEND INCLUDE_DIRS_FOR_DYNAMIC_VIEW ${jsoncpp_INCLUDE_DIRS}) + + # yamlcpp + if(BUILD_YAML_CONFIG) +@@ -194,7 +194,7 @@ if(BUILD_YAML_CONFIG) + message(STATUS "yaml-cpp not used") + else() + message(STATUS "yaml-cpp found ") +- target_link_libraries(${PROJECT_NAME} PUBLIC ${YAML_CPP_LINK_LIBRARY}) ++ target_link_libraries(${PROJECT_NAME} PUBLIC yaml-cpp) + target_compile_definitions(${PROJECT_NAME} PUBLIC HAS_YAML_CPP) + endif() + else() +@@ -432,7 +432,7 @@ if (BUILD_SQLITE) + find_package(SQLite3 QUIET) + find_package(unofficial-sqlite3 QUIET) + if (SQLite3_FOUND) +- target_link_libraries(${PROJECT_NAME} PRIVATE SQLite3_lib) ++ target_link_libraries(${PROJECT_NAME} PRIVATE SQLite::SQLite3) + set(DROGON_FOUND_SQLite3 TRUE) + elseif (unofficial-sqlite3_FOUND) + target_link_libraries(${PROJECT_NAME} PRIVATE unofficial::sqlite3::sqlite3) +@@ -455,10 +455,10 @@ if (BUILD_SQLITE) + endif (BUILD_SQLITE) + + if (BUILD_REDIS) +- find_package(Hiredis) +- if (Hiredis_FOUND) ++ find_package(hiredis) ++ if (hiredis_FOUND) + add_definitions(-DUSE_REDIS) +- target_link_libraries(${PROJECT_NAME} PRIVATE Hiredis_lib) ++ target_link_libraries(${PROJECT_NAME} PRIVATE hiredis::hiredis) + set(DROGON_SOURCES + ${DROGON_SOURCES} + nosql_lib/redis/src/RedisClientImpl.cc +@@ -478,10 +478,10 @@ if (BUILD_REDIS) + nosql_lib/redis/src/SubscribeContext.h + nosql_lib/redis/src/RedisSubscriberImpl.h) + +- endif (Hiredis_FOUND) ++ endif () + endif (BUILD_REDIS) + +-if (NOT Hiredis_FOUND) ++if (NOT hiredis_FOUND) + set(DROGON_SOURCES + ${DROGON_SOURCES} + lib/src/RedisClientSkipped.cc +@@ -490,7 +490,7 @@ if (NOT Hiredis_FOUND) + set(private_headers + ${private_headers} + lib/src/RedisClientManager.h) +-endif (NOT Hiredis_FOUND) ++endif () + + if (BUILD_TESTING) + add_subdirectory(nosql_lib/redis/tests) diff --git a/recipes/drogon/all/patches/1.9.7-0002-find-cci-packages.patch b/recipes/drogon/all/patches/1.9.7-0002-find-cci-packages.patch new file mode 100644 index 0000000000000..10aaaaa8d1cad --- /dev/null +++ b/recipes/drogon/all/patches/1.9.7-0002-find-cci-packages.patch @@ -0,0 +1,71 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 91b9b9b..9a2773f 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -185,9 +185,9 @@ endif() + + + # jsoncpp +-find_package(Jsoncpp REQUIRED) +-target_link_libraries(${PROJECT_NAME} PUBLIC Jsoncpp_lib) +-list(APPEND INCLUDE_DIRS_FOR_DYNAMIC_VIEW ${JSONCPP_INCLUDE_DIRS}) ++find_package(jsoncpp REQUIRED) ++target_link_libraries(${PROJECT_NAME} PUBLIC jsoncpp_lib) ++list(APPEND INCLUDE_DIRS_FOR_DYNAMIC_VIEW ${jsoncpp_INCLUDE_DIRS}) + + # yamlcpp + if(BUILD_YAML_CONFIG) +@@ -199,7 +199,7 @@ if(BUILD_YAML_CONFIG) + message(STATUS "yaml-cpp not used") + else() + message(STATUS "yaml-cpp found ") +- target_link_libraries(${PROJECT_NAME} PUBLIC ${YAML_CPP_LINK_LIBRARY}) ++ target_link_libraries(${PROJECT_NAME} PUBLIC yaml-cpp) + target_compile_definitions(${PROJECT_NAME} PUBLIC HAS_YAML_CPP) + endif() + else() +@@ -437,7 +437,7 @@ if (BUILD_SQLITE) + find_package(SQLite3 QUIET) + find_package(unofficial-sqlite3 QUIET) + if (SQLite3_FOUND) +- target_link_libraries(${PROJECT_NAME} PRIVATE SQLite3_lib) ++ target_link_libraries(${PROJECT_NAME} PRIVATE SQLite::SQLite3) + set(DROGON_FOUND_SQLite3 TRUE) + elseif (unofficial-sqlite3_FOUND) + target_link_libraries(${PROJECT_NAME} PRIVATE unofficial::sqlite3::sqlite3) +@@ -460,10 +460,10 @@ if (BUILD_SQLITE) + endif (BUILD_SQLITE) + + if (BUILD_REDIS) +- find_package(Hiredis) +- if (Hiredis_FOUND) ++ find_package(hiredis) ++ if (hiredis_FOUND) + add_definitions(-DUSE_REDIS) +- target_link_libraries(${PROJECT_NAME} PRIVATE Hiredis_lib) ++ target_link_libraries(${PROJECT_NAME} PRIVATE hiredis::hiredis) + set(DROGON_SOURCES + ${DROGON_SOURCES} + nosql_lib/redis/src/RedisClientImpl.cc +@@ -483,10 +483,10 @@ if (BUILD_REDIS) + nosql_lib/redis/src/SubscribeContext.h + nosql_lib/redis/src/RedisSubscriberImpl.h) + +- endif (Hiredis_FOUND) ++ endif () + endif (BUILD_REDIS) + +-if (NOT Hiredis_FOUND) ++if (NOT hiredis_FOUND) + set(DROGON_SOURCES + ${DROGON_SOURCES} + lib/src/RedisClientSkipped.cc +@@ -495,7 +495,7 @@ if (NOT Hiredis_FOUND) + set(private_headers + ${private_headers} + lib/src/RedisClientManager.h) +-endif (NOT Hiredis_FOUND) ++endif () + + if (BUILD_TESTING) + add_subdirectory(nosql_lib/redis/tests) diff --git a/recipes/drogon/all/patches/1.9.7-0003-include-exception.patch b/recipes/drogon/all/patches/1.9.7-0003-include-exception.patch new file mode 100644 index 0000000000000..8c99b4baf0dcc --- /dev/null +++ b/recipes/drogon/all/patches/1.9.7-0003-include-exception.patch @@ -0,0 +1,13 @@ +diff --git a/lib/inc/drogon/RequestStream.h b/lib/inc/drogon/RequestStream.h +index 852f075..b72e39e 100644 +--- a/lib/inc/drogon/RequestStream.h ++++ b/lib/inc/drogon/RequestStream.h +@@ -16,7 +16,7 @@ + #include + #include + #include +- ++#include + namespace drogon + { + class HttpRequest; diff --git a/recipes/drogon/config.yml b/recipes/drogon/config.yml index e9c9e23f0ecf5..09b2c8efe8045 100644 --- a/recipes/drogon/config.yml +++ b/recipes/drogon/config.yml @@ -1,4 +1,14 @@ versions: + "1.9.8": + folder: "all" + "1.9.7": + folder: "all" + "1.9.6": + folder: "all" + "1.9.5": + folder: "all" + "1.9.4": + folder: "all" "1.9.3": folder: "all" "1.9.2": @@ -9,9 +19,3 @@ versions: folder: "all" "1.8.7": folder: "all" - "1.8.6": - folder: "all" - "1.8.5": - folder: "all" - "1.8.4": - folder: "all" diff --git a/recipes/dtl/all/conandata.yml b/recipes/dtl/all/conandata.yml index 7ae1dc4743d98..b14780dd20c90 100644 --- a/recipes/dtl/all/conandata.yml +++ b/recipes/dtl/all/conandata.yml @@ -1,10 +1,10 @@ sources: + "1.21": + url: "https://github.com/cubicdaiya/dtl/archive/v1.21.tar.gz" + sha256: "90ed2dbf4e6d687737fe25f118bbcb6aed778cecc3f2115d191a032bf8643dbd" "1.20": url: "https://github.com/cubicdaiya/dtl/archive/v1.20.tar.gz" sha256: "579f81bca88f4b9760a59d99c5a95bd8dd5dc2f20f33f1f9b5f64cb08979f54d" "1.19": url: "https://github.com/cubicdaiya/dtl/archive/v1.19.tar.gz" sha256: "f47b99dd11e5d771ad32a8dc960db4ab2fbe349fb0346fa0795f53c846a99c5d" - "cci.20210404": - url: "https://github.com/cubicdaiya/dtl/archive/0551c22f5ee3d30dbc4b0700bde5acdb6f1a9348.tar.gz" - sha256: "59c2e770454c935200179aa4457f72741aec2319072862950b2490d0758d4e43" diff --git a/recipes/dtl/all/conanfile.py b/recipes/dtl/all/conanfile.py index c53d228db8921..bc5ebc68cd927 100644 --- a/recipes/dtl/all/conanfile.py +++ b/recipes/dtl/all/conanfile.py @@ -1,9 +1,9 @@ import os from conan import ConanFile -from conan.tools.build import check_min_cppstd -from conan.tools.files import copy, get +from conan.tools.files import copy, get, replace_in_file from conan.tools.layout import basic_layout +from conan.tools.scm import Version required_conan_version = ">=1.52.0" @@ -28,6 +28,9 @@ def package_id(self): def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) + if Version(self.version) < "1.21": + # See https://github.com/cubicdaiya/dtl/pull/18 + replace_in_file(self, os.path.join(self.source_folder, "dtl", "Diff.hpp"), "void enableTrivial () const {", "void enableTrivial () {") def package(self): copy(self, "COPYING", diff --git a/recipes/dtl/config.yml b/recipes/dtl/config.yml index 66e68aaaf6fad..c7b2d5892fa8b 100644 --- a/recipes/dtl/config.yml +++ b/recipes/dtl/config.yml @@ -1,7 +1,7 @@ versions: + "1.21": + folder: "all" "1.20": folder: "all" "1.19": folder: "all" - "cci.20210404": - folder: "all" diff --git a/recipes/duckdb/all/conandata.yml b/recipes/duckdb/all/conandata.yml index 65a6c49289818..459430601e0ca 100644 --- a/recipes/duckdb/all/conandata.yml +++ b/recipes/duckdb/all/conandata.yml @@ -1,4 +1,22 @@ sources: + "1.1.3": + url: "https://github.com/duckdb/duckdb/archive/refs/tags/v1.1.2.tar.gz" + sha256: "a3319a64c390ed0454c869b2e4fc0af2413cd49f55cd0f1400aaed9069cdbc4c" + "1.1.2": + url: "https://github.com/duckdb/duckdb/archive/refs/tags/v1.1.2.tar.gz" + sha256: "a3319a64c390ed0454c869b2e4fc0af2413cd49f55cd0f1400aaed9069cdbc4c" + "1.1.1": + url: "https://github.com/duckdb/duckdb/archive/refs/tags/v1.1.1.tar.gz" + sha256: "a764cef80287ccfd8555884d8facbe962154e7c747043c0842cd07873b4d6752" + "1.1.0": + url: "https://github.com/duckdb/duckdb/archive/refs/tags/v1.1.0.tar.gz" + sha256: "d9be2c6d3a5ebe2b3d33044fb2cb535bb0bd972a27ae38c4de5e1b4caa4bf68d" + "1.0.0": + url: "https://github.com/duckdb/duckdb/archive/refs/tags/v1.0.0.tar.gz" + sha256: "04e472e646f5cadd0a3f877a143610674b0d2bcf9f4102203ac3c3d02f1c5f26" + "0.10.2": + url: "https://github.com/duckdb/duckdb/archive/refs/tags/v0.10.2.tar.gz" + sha256: "662a0ba5c35d678ab6870db8f65ffa1c72e6096ad525a35b41b275139684cea6" "0.10.1": url: "https://github.com/duckdb/duckdb/archive/refs/tags/v0.10.1.tar.gz" sha256: "83bd4944c070fd0bd287fbe62919fa887f35d7422ba0fa66e13d4ed098f3791a" @@ -8,69 +26,61 @@ sources: "0.9.0": url: "https://github.com/duckdb/duckdb/archive/refs/tags/v0.9.0.tar.gz" sha256: "3dbf3326a831bf0797591572440e81a3d6d668f8e33a25ce04efae19afc3a23d" - "0.8.1": - url: "https://github.com/duckdb/duckdb/archive/refs/tags/v0.8.1.tar.gz" - sha256: "a0674f7e320dc7ebcf51990d7fc1c0e7f7b2c335c08f5953702b5285e6c30694" - "0.8.0": - url: "https://github.com/duckdb/duckdb/archive/refs/tags/v0.8.0.tar.gz" - sha256: "df3b8e0b72bce38914f0fb1cd02235d8b616df9209beb14beb06bfbcaaf2e97f" - "0.7.1": - url: "https://github.com/duckdb/duckdb/archive/refs/tags/v0.7.1.tar.gz" - sha256: "67f840f861e5ffbe137d65a8543642d016f900b89dd035492d562ad11acf0e1e" - "0.6.1": - url: "https://github.com/duckdb/duckdb/archive/refs/tags/v0.6.1.tar.gz" - sha256: "ea9bba89ae3e461f3fc9f83911b2f3b6c386c23463bcf7b1ed6bb4cc13e822a4" - "0.6.0": - url: "https://github.com/duckdb/duckdb/archive/refs/tags/v0.6.0.tar.gz" - sha256: "700b09114f8b99892a9d19ba21ca962ae65d1ea8085622418a2fa50ff915b244" - "0.5.1": - url: "https://github.com/duckdb/duckdb/archive/refs/tags/v0.5.1.tar.gz" - sha256: "3dab7ba0d0f8d024d3c73fd3d4fb8834203c31d7b0ddb1e8539ee266e11b0e9b" patches: - "0.10.1": - - patch_file: "patches/0.10.1-0001-fix-cmake.patch" + "1.1.3": + - patch_file: "patches/1.1.1-0001-fix-cmake.patch" patch_description: "install static of shared library, add installation for odbc extention" patch_type: "portability" - - patch_file: "patches/0.10.1-0002-msvc-bicobj.patch" + - patch_file: "patches/1.1.1-0002-msvc-bicobj.patch" patch_description: "add /bigobj flag" patch_type: "portability" - "0.9.2": - - patch_file: "patches/0.9.2-0001-fix-cmake.patch" + "1.1.2": + - patch_file: "patches/1.1.1-0001-fix-cmake.patch" patch_description: "install static of shared library, add installation for odbc extention" patch_type: "portability" - "0.9.0": - - patch_file: "patches/0.9.0-0001-fix-cmake.patch" - patch_description: "install static of shared library, add installation for odbc extention" + - patch_file: "patches/1.1.1-0002-msvc-bicobj.patch" + patch_description: "add /bigobj flag" patch_type: "portability" - "0.8.1": - - patch_file: "patches/0.8.1-0001-fix-cmake.patch" + "1.1.1": + - patch_file: "patches/1.1.1-0001-fix-cmake.patch" patch_description: "install static of shared library, add installation for odbc extention" patch_type: "portability" - "0.8.0": - - patch_file: "patches/0.8.0-0001-fix-cmake.patch" + - patch_file: "patches/1.1.1-0002-msvc-bicobj.patch" + patch_description: "add /bigobj flag" + patch_type: "portability" + "1.1.0": + - patch_file: "patches/1.1.0-0001-fix-cmake.patch" patch_description: "install static of shared library, add installation for odbc extention" patch_type: "portability" - "0.7.1": - - patch_file: "patches/0.7.0-0001-fix-cmake.patch" + - patch_file: "patches/1.1.0-0002-msvc-bicobj.patch" + patch_description: "add /bigobj flag" + patch_type: "portability" + "1.0.0": + - patch_file: "patches/1.0.0-0001-fix-cmake.patch" patch_description: "install static of shared library, add installation for odbc extention" patch_type: "portability" - "0.6.1": - - patch_file: "patches/0.6.0-0001-fix-cmake.patch" + - patch_file: "patches/1.0.0-0002-msvc-bicobj.patch" + patch_description: "add /bigobj flag" + patch_type: "portability" + "0.10.2": + - patch_file: "patches/0.10.2-0001-fix-cmake.patch" patch_description: "install static of shared library, add installation for odbc extention" patch_type: "portability" - - patch_file: "patches/0.6.0-0002-include-stdlib.patch" - patch_description: "include stdlib for abort function" + - patch_file: "patches/0.10.1-0002-msvc-bicobj.patch" + patch_description: "add /bigobj flag" patch_type: "portability" - patch_source: "https://github.com/duckdb/duckdb/commit/50b0bd07a6c22d17c4453632fce3b3d3c872663e" - "0.6.0": - - patch_file: "patches/0.6.0-0001-fix-cmake.patch" + "0.10.1": + - patch_file: "patches/0.10.1-0001-fix-cmake.patch" patch_description: "install static of shared library, add installation for odbc extention" patch_type: "portability" - - patch_file: "patches/0.6.0-0002-include-stdlib.patch" - patch_description: "include stdlib for abort function" + - patch_file: "patches/0.10.1-0002-msvc-bicobj.patch" + patch_description: "add /bigobj flag" patch_type: "portability" - patch_source: "https://github.com/duckdb/duckdb/commit/50b0bd07a6c22d17c4453632fce3b3d3c872663e" - "0.5.1": - - patch_file: "patches/0.5.1-0001-fix-cmake.patch" + "0.9.2": + - patch_file: "patches/0.9.2-0001-fix-cmake.patch" + patch_description: "install static of shared library, add installation for odbc extention" + patch_type: "portability" + "0.9.0": + - patch_file: "patches/0.9.0-0001-fix-cmake.patch" patch_description: "install static of shared library, add installation for odbc extention" patch_type: "portability" diff --git a/recipes/duckdb/all/conanfile.py b/recipes/duckdb/all/conanfile.py index d1f59cd82e182..cce9c23deb6ff 100644 --- a/recipes/duckdb/all/conanfile.py +++ b/recipes/duckdb/all/conanfile.py @@ -25,7 +25,6 @@ class DuckdbConan(ConanFile): "fPIC": [True, False], "with_autocomplete": [True, False], "with_icu": [True, False], - "with_parquet": [True, False], "with_tpch": [True, False], "with_tpcds": [True, False], "with_fts": [True, False], @@ -46,7 +45,6 @@ class DuckdbConan(ConanFile): "fPIC": True, "with_autocomplete": False, "with_icu": False, - "with_parquet": False, "with_tpch": False, "with_tpcds": False, "with_fts": False, @@ -74,8 +72,8 @@ def export_sources(self): def config_options(self): if self.settings.os == "Windows": del self.options.fPIC - if Version(self.version) >= "0.9.0": - del self.options.with_parquet + if Version(self.version) >= "1.1.0": + del self.options.with_odbc def configure(self): if self.options.shared: @@ -86,7 +84,7 @@ def layout(self): def requirements(self): # FIXME: duckdb vendors a bunch of deps by modify the source code to have their own namespace - if self.options.with_odbc: + if self.options.get_safe("with_odbc"): self.requires("odbc/2.3.11") if self.options.with_httpfs: self.requires("openssl/[>=1.1 <4]") @@ -109,46 +107,34 @@ def generate(self): tc.variables["DUCKDB_PATCH_VERSION"] = Version(self.version).patch tc.variables["DUCKDB_DEV_ITERATION"] = 0 tc.variables["OVERRIDE_GIT_DESCRIBE"] = f"v{self.version}" - if "with_parquet" in self.options: - tc.variables["BUILD_PARQUET_EXTENSION"] = self.options.with_parquet - if Version(self.version) >= "0.9.0": - build_extensions = "" - if self.options.with_icu: - build_extensions += ";icu" - if self.options.with_autocomplete: - build_extensions += ";autocomplete" - if self.options.with_tpch: - build_extensions += ";tpch" - if self.options.with_tpcds: - build_extensions += ";tpcds" - if self.options.with_fts: - build_extensions += ";fts" - if self.options.with_visualizer: - build_extensions += ";visualizer" - if self.options.with_httpfs: - build_extensions += ";httpfs" - if self.options.with_json: - build_extensions += ";json" - if self.options.with_excel: - build_extensions += ";excel" - if self.options.with_inet: - build_extensions += ";inet" - if self.options.with_sqlsmith: - build_extensions += ";sqlsmith" - tc.variables["BUILD_EXTENSIONS"] = build_extensions - else: - tc.variables["BUILD_ICU_EXTENSION"] = self.options.with_icu - tc.variables["BUILD_TPCH_EXTENSION"] = self.options.with_tpch - tc.variables["BUILD_TPCDS_EXTENSION"] = self.options.with_tpcds - tc.variables["BUILD_FTS_EXTENSION"] = self.options.with_fts - tc.variables["BUILD_HTTPFS_EXTENSION"] = self.options.with_httpfs - tc.variables["BUILD_VISUALIZER_EXTENSION"] = self.options.with_visualizer - tc.variables["BUILD_JSON_EXTENSION"] = self.options.with_json - tc.variables["BUILD_EXCEL_EXTENSION"] = self.options.with_excel - tc.variables["BUILD_SQLSMITH_EXTENSION"] = self.options.with_sqlsmith - - tc.variables["BUILD_ODBC_DRIVER"] = self.options.with_odbc + build_extensions = "" + if self.options.with_icu: + build_extensions += ";icu" + if self.options.with_autocomplete: + build_extensions += ";autocomplete" + if self.options.with_tpch: + build_extensions += ";tpch" + if self.options.with_tpcds: + build_extensions += ";tpcds" + if self.options.with_fts: + build_extensions += ";fts" + if self.options.with_visualizer: + build_extensions += ";visualizer" + if self.options.with_httpfs: + build_extensions += ";httpfs" + if self.options.with_json: + build_extensions += ";json" + if self.options.with_excel: + build_extensions += ";excel" + if self.options.with_inet: + build_extensions += ";inet" + if self.options.with_sqlsmith: + build_extensions += ";sqlsmith" + tc.variables["BUILD_EXTENSIONS"] = build_extensions + + if "with_odbc" in self.options: + tc.variables["BUILD_ODBC_DRIVER"] = self.options.with_odbc tc.variables["FORCE_QUERY_LOG"] = self.options.with_query_log tc.variables["BUILD_SHELL"] = self.options.with_shell tc.variables["DISABLE_THREADS"] = not self.options.with_threads @@ -211,10 +197,11 @@ def package_info(self): "duckdb_fastpforlib", "duckdb_mbedtls", ] - if Version(self.version) >= "0.6.0": - self.cpp_info.libs.append("duckdb_fsst") + self.cpp_info.libs.append("duckdb_fsst") if Version(self.version) >= "0.10.0": self.cpp_info.libs.append("duckdb_skiplistlib") + if Version(self.version) >= "0.10.3": + self.cpp_info.libs.append("duckdb_yyjson") if self.options.with_autocomplete: self.cpp_info.libs.append("autocomplete_extension") @@ -232,7 +219,7 @@ def package_info(self): self.cpp_info.libs.append("visualizer_extension") if self.options.with_httpfs: self.cpp_info.libs.append("httpfs_extension") - if (Version(self.version) >= "0.6.0" and self.settings.os == "Linux" and + if (self.settings.os == "Linux" and (Version(self.version) < "0.10.1" or self.settings.arch == "x86_64")): self.cpp_info.libs.append("jemalloc_extension") if self.options.with_json: diff --git a/recipes/duckdb/all/patches/0.10.2-0001-fix-cmake.patch b/recipes/duckdb/all/patches/0.10.2-0001-fix-cmake.patch new file mode 100644 index 0000000000000..a64da2a33b94d --- /dev/null +++ b/recipes/duckdb/all/patches/0.10.2-0001-fix-cmake.patch @@ -0,0 +1,137 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 5f199d3..64c86c6 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -816,12 +816,12 @@ function(build_loadable_extension_directory NAME OUTPUT_DIRECTORY EXTENSION_VERS + COMMAND emcc $.lib -o $ -sSIDE_MODULE=1 -O3 + ) + endif() +- add_custom_command( +- TARGET ${TARGET_NAME} +- POST_BUILD +- COMMAND +- ${CMAKE_COMMAND} -DEXTENSION=$ -DPLATFORM_FILE=${DuckDB_BINARY_DIR}/duckdb_platform_out -DDUCKDB_VERSION="${DUCKDB_NORMALIZED_VERSION}" -DEXTENSION_VERSION="${EXTENSION_VERSION}" -DNULL_FILE=${CMAKE_CURRENT_FUNCTION_LIST_DIR}/scripts/null.txt -P ${CMAKE_CURRENT_FUNCTION_LIST_DIR}/scripts/append_metadata.cmake +- ) ++ # add_custom_command( ++ # TARGET ${TARGET_NAME} ++ # POST_BUILD ++ # COMMAND ++ # ${CMAKE_COMMAND} -DEXTENSION=$ -DPLATFORM_FILE=${DuckDB_BINARY_DIR}/duckdb_platform_out -DDUCKDB_VERSION="${DUCKDB_NORMALIZED_VERSION}" -DEXTENSION_VERSION="${EXTENSION_VERSION}" -DNULL_FILE=${CMAKE_CURRENT_FUNCTION_LIST_DIR}/scripts/null.txt -P ${CMAKE_CURRENT_FUNCTION_LIST_DIR}/scripts/append_metadata.cmake ++ # ) + add_dependencies(${TARGET_NAME} duckdb_platform) + if (NOT EXTENSION_CONFIG_BUILD AND NOT ${EXTENSION_TESTS_ONLY} AND NOT CLANG_TIDY) + add_dependencies(duckdb_local_extension_repo ${TARGET_NAME}) +@@ -842,7 +842,7 @@ function(build_static_extension NAME PARAMETERS) + set(FILES "${ARGV}") + list(REMOVE_AT FILES 0) + add_library(${NAME}_extension STATIC ${FILES}) +- target_link_libraries(${NAME}_extension duckdb_static) ++# target_link_libraries(${NAME}_extension duckdb_static) + endfunction() + + # Internal extension register function +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index d45ae7f..c13ca96 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -92,21 +92,21 @@ else() + duckdb_fastpforlib + duckdb_skiplistlib + duckdb_mbedtls) +- ++ if(BUILD_SHARED_LIBS) + add_library(duckdb SHARED ${ALL_OBJECT_FILES}) + target_link_libraries(duckdb ${DUCKDB_LINK_LIBS}) + link_threads(duckdb) + link_extension_libraries(duckdb) +- ++ endif() + add_library(duckdb_static STATIC ${ALL_OBJECT_FILES}) + target_link_libraries(duckdb_static ${DUCKDB_LINK_LIBS}) + link_threads(duckdb_static) + link_extension_libraries(duckdb_static) +- ++ if(BUILD_SHARED_LIBS) + target_include_directories( + duckdb PUBLIC $ + $) +- ++ endif() + target_include_directories( + duckdb_static PUBLIC $ + $) +@@ -121,10 +121,18 @@ else() + DESTINATION "${INSTALL_INCLUDE_DIR}") + + endif() +- ++if(BUILD_SHARED_LIBS) + install( +- TARGETS duckdb duckdb_static ++ TARGETS duckdb + EXPORT "${DUCKDB_EXPORT_SET}" + LIBRARY DESTINATION "${INSTALL_LIB_DIR}" + ARCHIVE DESTINATION "${INSTALL_LIB_DIR}" + RUNTIME DESTINATION "${INSTALL_BIN_DIR}") ++else() ++install( ++ TARGETS duckdb_static ++ EXPORT "${DUCKDB_EXPORT_SET}" ++ LIBRARY DESTINATION "${INSTALL_LIB_DIR}" ++ ARCHIVE DESTINATION "${INSTALL_LIB_DIR}" ++ RUNTIME DESTINATION "${INSTALL_BIN_DIR}") ++endif() +diff --git a/tools/odbc/CMakeLists.txt b/tools/odbc/CMakeLists.txt +index baf7823..4bef643 100644 +--- a/tools/odbc/CMakeLists.txt ++++ b/tools/odbc/CMakeLists.txt +@@ -38,6 +38,14 @@ add_library(duckdb_odbc SHARED ${ALL_OBJECT_FILES} duckdb_odbc.def) + set_target_properties(duckdb_odbc PROPERTIES DEFINE_SYMBOL "DUCKDB_ODBC_API") + target_link_libraries(duckdb_odbc ${LINK_LIB_LIST} duckdb_static) + ++install( ++ TARGETS duckdb_odbc ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} ++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} ++) ++ + if(NOT CLANG_TIDY) + add_subdirectory(test) + endif() +diff --git a/tools/sqlite3_api_wrapper/CMakeLists.txt b/tools/sqlite3_api_wrapper/CMakeLists.txt +index e29c33e..fb926b5 100644 +--- a/tools/sqlite3_api_wrapper/CMakeLists.txt ++++ b/tools/sqlite3_api_wrapper/CMakeLists.txt +@@ -26,20 +26,20 @@ if(NOT AMALGAMATION_BUILD) + endif() + link_threads(sqlite3_api_wrapper_static) + +-if(NOT WIN32 AND NOT ZOS) ++if(BUILD_SHARED_LIBS AND NOT WIN32 AND NOT ZOS) + add_library(sqlite3_api_wrapper SHARED ${SQLITE_API_WRAPPER_FILES}) + target_link_libraries(sqlite3_api_wrapper duckdb ${DUCKDB_EXTRA_LINK_FLAGS}) + link_threads(sqlite3_api_wrapper) + endif() + +-include_directories(../../third_party/catch) ++# include_directories(../../third_party/catch) + +-include_directories(test/include) +-add_subdirectory(test) ++# include_directories(test/include) ++# add_subdirectory(test) + +-add_executable(test_sqlite3_api_wrapper ${SQLITE_TEST_FILES}) +-if(WIN32 OR ZOS) +- target_link_libraries(test_sqlite3_api_wrapper sqlite3_api_wrapper_static) +-else() +- target_link_libraries(test_sqlite3_api_wrapper sqlite3_api_wrapper) +-endif() ++# add_executable(test_sqlite3_api_wrapper ${SQLITE_TEST_FILES}) ++# if(WIN32 OR ZOS) ++# target_link_libraries(test_sqlite3_api_wrapper sqlite3_api_wrapper_static) ++# else() ++# target_link_libraries(test_sqlite3_api_wrapper sqlite3_api_wrapper) ++# endif() diff --git a/recipes/duckdb/all/patches/0.5.1-0001-fix-cmake.patch b/recipes/duckdb/all/patches/0.5.1-0001-fix-cmake.patch deleted file mode 100644 index 4c586f0038760..0000000000000 --- a/recipes/duckdb/all/patches/0.5.1-0001-fix-cmake.patch +++ /dev/null @@ -1,82 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index cc43104..5b034d2 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -196,6 +196,8 @@ if(${CMAKE_SYSTEM_NAME} STREQUAL "SunOS") - set(SUN TRUE) - endif() - -+if(0) # conan patch -+ - execute_process( - COMMAND git log -1 --format=%h - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} -@@ -236,6 +238,10 @@ else() - set(DUCKDB_VERSION "v${DUCKDB_MAJOR_VERSION}.${DUCKDB_MINOR_VERSION}.${DUCKDB_PATCH_VERSION}-dev${DUCKDB_DEV_ITERATION}") - endif() - -+else() # conan patch -+set(DUCKDB_VERSION "v${DUCKDB_MAJOR_VERSION}.${DUCKDB_MINOR_VERSION}.${DUCKDB_PATCH_VERSION}-dev${DUCKDB_DEV_ITERATION}") -+endif() # conan patch -+ - option(AMALGAMATION_BUILD - "Build from the amalgamation files, rather than from the normal sources." - FALSE) -diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt -index 7e07a47..8027d90 100644 ---- a/src/CMakeLists.txt -+++ b/src/CMakeLists.txt -@@ -166,9 +166,18 @@ if(BUILD_PYTHON - endif() - endif() - --install( -- TARGETS duckdb duckdb_static -- EXPORT "${DUCKDB_EXPORT_SET}" -- LIBRARY DESTINATION "${INSTALL_LIB_DIR}" -- ARCHIVE DESTINATION "${INSTALL_LIB_DIR}" -- RUNTIME DESTINATION "${INSTALL_BIN_DIR}") -+if(BUILD_SHARED_LIBS) -+ install( -+ TARGETS duckdb -+ EXPORT "${DUCKDB_EXPORT_SET}" -+ LIBRARY DESTINATION "${INSTALL_LIB_DIR}" -+ ARCHIVE DESTINATION "${INSTALL_LIB_DIR}" -+ RUNTIME DESTINATION "${INSTALL_BIN_DIR}") -+else() -+ install( -+ TARGETS duckdb_static -+ EXPORT "${DUCKDB_EXPORT_SET}" -+ LIBRARY DESTINATION "${INSTALL_LIB_DIR}" -+ ARCHIVE DESTINATION "${INSTALL_LIB_DIR}" -+ RUNTIME DESTINATION "${INSTALL_BIN_DIR}") -+endif() -diff --git a/tools/odbc/CMakeLists.txt b/tools/odbc/CMakeLists.txt -index 9d116b9..b46e5bd 100644 ---- a/tools/odbc/CMakeLists.txt -+++ b/tools/odbc/CMakeLists.txt -@@ -53,3 +53,11 @@ add_library( - set_target_properties(duckdb_odbc PROPERTIES DEFINE_SYMBOL "DUCKDB_ODBC_API") - - target_link_libraries(duckdb_odbc ${LINK_LIB_LIST} duckdb_static) -+ -+install( -+ TARGETS duckdb_odbc -+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} -+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} -+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} -+ PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} -+) -diff --git a/tools/sqlite3_api_wrapper/CMakeLists.txt b/tools/sqlite3_api_wrapper/CMakeLists.txt -index cef9622..ca7e1f1 100644 ---- a/tools/sqlite3_api_wrapper/CMakeLists.txt -+++ b/tools/sqlite3_api_wrapper/CMakeLists.txt -@@ -14,7 +14,7 @@ add_library(sqlite3_api_wrapper_static STATIC sqlite3_api_wrapper.cpp - target_link_libraries(sqlite3_api_wrapper_static duckdb_static duckdb_utf8proc) - link_threads(sqlite3_api_wrapper_static) - --if(NOT WIN32) -+if(BUILD_SHARED_LIBS AND NOT WIN32) - add_library(sqlite3_api_wrapper SHARED sqlite3_api_wrapper.cpp - ${ALL_OBJECT_FILES}) - target_link_libraries(sqlite3_api_wrapper duckdb ${DUCKDB_EXTRA_LINK_FLAGS}) diff --git a/recipes/duckdb/all/patches/0.6.0-0001-fix-cmake.patch b/recipes/duckdb/all/patches/0.6.0-0001-fix-cmake.patch deleted file mode 100644 index d43649a21a753..0000000000000 --- a/recipes/duckdb/all/patches/0.6.0-0001-fix-cmake.patch +++ /dev/null @@ -1,58 +0,0 @@ -diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt -index b1bb843..4a4949c 100644 ---- a/src/CMakeLists.txt -+++ b/src/CMakeLists.txt -@@ -167,9 +167,18 @@ if(BUILD_PYTHON - endif() - endif() - --install( -- TARGETS duckdb duckdb_static -- EXPORT "${DUCKDB_EXPORT_SET}" -- LIBRARY DESTINATION "${INSTALL_LIB_DIR}" -- ARCHIVE DESTINATION "${INSTALL_LIB_DIR}" -- RUNTIME DESTINATION "${INSTALL_BIN_DIR}") -+if(BUILD_SHARED_LIBS) -+ install( -+ TARGETS duckdb -+ EXPORT "${DUCKDB_EXPORT_SET}" -+ LIBRARY DESTINATION "${INSTALL_LIB_DIR}" -+ ARCHIVE DESTINATION "${INSTALL_LIB_DIR}" -+ RUNTIME DESTINATION "${INSTALL_BIN_DIR}") -+else() -+ install( -+ TARGETS duckdb_static -+ EXPORT "${DUCKDB_EXPORT_SET}" -+ LIBRARY DESTINATION "${INSTALL_LIB_DIR}" -+ ARCHIVE DESTINATION "${INSTALL_LIB_DIR}" -+ RUNTIME DESTINATION "${INSTALL_BIN_DIR}") -+endif() -diff --git a/tools/odbc/CMakeLists.txt b/tools/odbc/CMakeLists.txt -index 9d116b9..b46e5bd 100644 ---- a/tools/odbc/CMakeLists.txt -+++ b/tools/odbc/CMakeLists.txt -@@ -53,3 +53,11 @@ add_library( - set_target_properties(duckdb_odbc PROPERTIES DEFINE_SYMBOL "DUCKDB_ODBC_API") - - target_link_libraries(duckdb_odbc ${LINK_LIB_LIST} duckdb_static) -+ -+install( -+ TARGETS duckdb_odbc -+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} -+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} -+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} -+ PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} -+) -diff --git a/tools/sqlite3_api_wrapper/CMakeLists.txt b/tools/sqlite3_api_wrapper/CMakeLists.txt -index e785d4f..922746f 100644 ---- a/tools/sqlite3_api_wrapper/CMakeLists.txt -+++ b/tools/sqlite3_api_wrapper/CMakeLists.txt -@@ -17,7 +17,7 @@ add_library(sqlite3_api_wrapper_static STATIC ${SQLITE_API_WRAPPER_FILES}) - target_link_libraries(sqlite3_api_wrapper_static duckdb_static duckdb_utf8proc) - link_threads(sqlite3_api_wrapper_static) - --if(NOT WIN32) -+if(BUILD_SHARED_LIBS AND NOT WIN32) - add_library(sqlite3_api_wrapper SHARED ${SQLITE_API_WRAPPER_FILES}) - target_link_libraries(sqlite3_api_wrapper duckdb ${DUCKDB_EXTRA_LINK_FLAGS}) - link_threads(sqlite3_api_wrapper) diff --git a/recipes/duckdb/all/patches/0.6.0-0002-include-stdlib.patch b/recipes/duckdb/all/patches/0.6.0-0002-include-stdlib.patch deleted file mode 100644 index e9e04e59a49cc..0000000000000 --- a/recipes/duckdb/all/patches/0.6.0-0002-include-stdlib.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/extension/jemalloc/jemalloc/include/jemalloc/internal/jemalloc_preamble.h b/extension/jemalloc/jemalloc/include/jemalloc/internal/jemalloc_preamble.h -index 47455cb..cfd73bc 100644 ---- a/extension/jemalloc/jemalloc/include/jemalloc/internal/jemalloc_preamble.h -+++ b/extension/jemalloc/jemalloc/include/jemalloc/internal/jemalloc_preamble.h -@@ -4,6 +4,7 @@ - #include - #include - #include -+#include - - #include "jemalloc/internal/jemalloc_internal_defs.h" - #include "jemalloc/internal/jemalloc_internal_decls.h" diff --git a/recipes/duckdb/all/patches/0.7.0-0001-fix-cmake.patch b/recipes/duckdb/all/patches/0.7.0-0001-fix-cmake.patch deleted file mode 100644 index 0ba6b7e472f9a..0000000000000 --- a/recipes/duckdb/all/patches/0.7.0-0001-fix-cmake.patch +++ /dev/null @@ -1,61 +0,0 @@ -diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt -index 99cd46c..3f3d039 100644 ---- a/src/CMakeLists.txt -+++ b/src/CMakeLists.txt -@@ -182,9 +182,18 @@ if(BUILD_PYTHON - endif() - endif() - --install( -- TARGETS duckdb duckdb_static -- EXPORT "${DUCKDB_EXPORT_SET}" -- LIBRARY DESTINATION "${INSTALL_LIB_DIR}" -- ARCHIVE DESTINATION "${INSTALL_LIB_DIR}" -- RUNTIME DESTINATION "${INSTALL_BIN_DIR}") -+if(BUILD_SHARED_LIBS) -+ install( -+ TARGETS duckdb -+ EXPORT "${DUCKDB_EXPORT_SET}" -+ LIBRARY DESTINATION "${INSTALL_LIB_DIR}" -+ ARCHIVE DESTINATION "${INSTALL_LIB_DIR}" -+ RUNTIME DESTINATION "${INSTALL_BIN_DIR}") -+else() -+ install( -+ TARGETS duckdb_static -+ EXPORT "${DUCKDB_EXPORT_SET}" -+ LIBRARY DESTINATION "${INSTALL_LIB_DIR}" -+ ARCHIVE DESTINATION "${INSTALL_LIB_DIR}" -+ RUNTIME DESTINATION "${INSTALL_BIN_DIR}") -+endif() -diff --git a/tools/odbc/CMakeLists.txt b/tools/odbc/CMakeLists.txt -index 8f13cfe..6755894 100644 ---- a/tools/odbc/CMakeLists.txt -+++ b/tools/odbc/CMakeLists.txt -@@ -53,6 +53,14 @@ add_library( - set_target_properties(duckdb_odbc PROPERTIES DEFINE_SYMBOL "DUCKDB_ODBC_API") - target_link_libraries(duckdb_odbc ${LINK_LIB_LIST} duckdb_static) - -+install( -+ TARGETS duckdb_odbc -+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} -+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} -+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} -+ PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} -+) -+ - if(NOT WIN32 AND NOT CLANG_TIDY) - add_subdirectory(test) - endif() -diff --git a/tools/sqlite3_api_wrapper/CMakeLists.txt b/tools/sqlite3_api_wrapper/CMakeLists.txt -index e785d4f..922746f 100644 ---- a/tools/sqlite3_api_wrapper/CMakeLists.txt -+++ b/tools/sqlite3_api_wrapper/CMakeLists.txt -@@ -17,7 +17,7 @@ add_library(sqlite3_api_wrapper_static STATIC ${SQLITE_API_WRAPPER_FILES}) - target_link_libraries(sqlite3_api_wrapper_static duckdb_static duckdb_utf8proc) - link_threads(sqlite3_api_wrapper_static) - --if(NOT WIN32) -+if(BUILD_SHARED_LIBS AND NOT WIN32) - add_library(sqlite3_api_wrapper SHARED ${SQLITE_API_WRAPPER_FILES}) - target_link_libraries(sqlite3_api_wrapper duckdb ${DUCKDB_EXTRA_LINK_FLAGS}) - link_threads(sqlite3_api_wrapper) diff --git a/recipes/duckdb/all/patches/0.8.0-0001-fix-cmake.patch b/recipes/duckdb/all/patches/0.8.0-0001-fix-cmake.patch deleted file mode 100644 index 6daffba956a1a..0000000000000 --- a/recipes/duckdb/all/patches/0.8.0-0001-fix-cmake.patch +++ /dev/null @@ -1,86 +0,0 @@ -diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt -index 0200c15..4a59ae6 100644 ---- a/src/CMakeLists.txt -+++ b/src/CMakeLists.txt -@@ -75,23 +75,27 @@ else() - duckdb_fastpforlib - duckdb_mbedtls) - -+ if(BUILD_SHARED_LIBS) - add_library(duckdb SHARED ${ALL_OBJECT_FILES}) - target_link_libraries(duckdb ${DUCKDB_LINK_LIBS}) - link_threads(duckdb) - link_extension_libraries(duckdb) -- -+ else() - add_library(duckdb_static STATIC ${ALL_OBJECT_FILES}) - target_link_libraries(duckdb_static ${DUCKDB_LINK_LIBS}) - link_threads(duckdb_static) - link_extension_libraries(duckdb_static) -+ endif() - -+ if(BUILD_SHARED_LIBS) - target_include_directories( - duckdb PUBLIC $ - $) -- -+ else() - target_include_directories( - duckdb_static PUBLIC $ - $) -+ endif() - - install( - DIRECTORY "${PROJECT_SOURCE_DIR}/src/include/duckdb" -@@ -104,9 +108,18 @@ else() - - endif() - -+if(BUILD_SHARED_LIBS) - install( -- TARGETS duckdb duckdb_static -+ TARGETS duckdb - EXPORT "${DUCKDB_EXPORT_SET}" - LIBRARY DESTINATION "${INSTALL_LIB_DIR}" - ARCHIVE DESTINATION "${INSTALL_LIB_DIR}" - RUNTIME DESTINATION "${INSTALL_BIN_DIR}") -+else() -+install( -+ TARGETS duckdb_static -+ EXPORT "${DUCKDB_EXPORT_SET}" -+ LIBRARY DESTINATION "${INSTALL_LIB_DIR}" -+ ARCHIVE DESTINATION "${INSTALL_LIB_DIR}" -+ RUNTIME DESTINATION "${INSTALL_BIN_DIR}") -+endif() -diff --git a/tools/odbc/CMakeLists.txt b/tools/odbc/CMakeLists.txt -index 8f13cfe..6755894 100644 ---- a/tools/odbc/CMakeLists.txt -+++ b/tools/odbc/CMakeLists.txt -@@ -53,6 +53,14 @@ add_library( - set_target_properties(duckdb_odbc PROPERTIES DEFINE_SYMBOL "DUCKDB_ODBC_API") - target_link_libraries(duckdb_odbc ${LINK_LIB_LIST} duckdb_static) - -+install( -+ TARGETS duckdb_odbc -+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} -+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} -+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} -+ PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} -+) -+ - if(NOT WIN32 AND NOT CLANG_TIDY) - add_subdirectory(test) - endif() -diff --git a/tools/sqlite3_api_wrapper/CMakeLists.txt b/tools/sqlite3_api_wrapper/CMakeLists.txt -index d46c676..93a1875 100644 ---- a/tools/sqlite3_api_wrapper/CMakeLists.txt -+++ b/tools/sqlite3_api_wrapper/CMakeLists.txt -@@ -19,7 +19,7 @@ if(NOT AMALGAMATION_BUILD) - endif() - link_threads(sqlite3_api_wrapper_static) - --if(NOT WIN32) -+if(BUILD_SHARED_LIBS AND NOT WIN32) - add_library(sqlite3_api_wrapper SHARED ${SQLITE_API_WRAPPER_FILES}) - target_link_libraries(sqlite3_api_wrapper duckdb ${DUCKDB_EXTRA_LINK_FLAGS}) - link_threads(sqlite3_api_wrapper) diff --git a/recipes/duckdb/all/patches/0.8.1-0001-fix-cmake.patch b/recipes/duckdb/all/patches/0.8.1-0001-fix-cmake.patch deleted file mode 100644 index 5cd9417ef53c9..0000000000000 --- a/recipes/duckdb/all/patches/0.8.1-0001-fix-cmake.patch +++ /dev/null @@ -1,87 +0,0 @@ -diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt -index 0200c15..008c20e 100644 ---- a/src/CMakeLists.txt -+++ b/src/CMakeLists.txt -@@ -75,24 +75,26 @@ else() - duckdb_fastpforlib - duckdb_mbedtls) - -+ if(BUILD_SHARED_LIBS) - add_library(duckdb SHARED ${ALL_OBJECT_FILES}) - target_link_libraries(duckdb ${DUCKDB_LINK_LIBS}) - link_threads(duckdb) - link_extension_libraries(duckdb) -- -+ else() - add_library(duckdb_static STATIC ${ALL_OBJECT_FILES}) - target_link_libraries(duckdb_static ${DUCKDB_LINK_LIBS}) - link_threads(duckdb_static) - link_extension_libraries(duckdb_static) -- -+ endif() -+ if(BUILD_SHARED_LIBS) - target_include_directories( - duckdb PUBLIC $ - $) -- -+ else() - target_include_directories( - duckdb_static PUBLIC $ - $) -- -+ endif() - install( - DIRECTORY "${PROJECT_SOURCE_DIR}/src/include/duckdb" - DESTINATION "${INSTALL_INCLUDE_DIR}" -@@ -104,9 +106,18 @@ else() - - endif() - -+if(BUILD_SHARED_LIBS) - install( -- TARGETS duckdb duckdb_static -+ TARGETS duckdb - EXPORT "${DUCKDB_EXPORT_SET}" - LIBRARY DESTINATION "${INSTALL_LIB_DIR}" - ARCHIVE DESTINATION "${INSTALL_LIB_DIR}" - RUNTIME DESTINATION "${INSTALL_BIN_DIR}") -+else() -+install( -+ TARGETS duckdb_static -+ EXPORT "${DUCKDB_EXPORT_SET}" -+ LIBRARY DESTINATION "${INSTALL_LIB_DIR}" -+ ARCHIVE DESTINATION "${INSTALL_LIB_DIR}" -+ RUNTIME DESTINATION "${INSTALL_BIN_DIR}") -+endif() -diff --git a/tools/odbc/CMakeLists.txt b/tools/odbc/CMakeLists.txt -index 8f13cfe..6755894 100644 ---- a/tools/odbc/CMakeLists.txt -+++ b/tools/odbc/CMakeLists.txt -@@ -53,6 +53,14 @@ add_library( - set_target_properties(duckdb_odbc PROPERTIES DEFINE_SYMBOL "DUCKDB_ODBC_API") - target_link_libraries(duckdb_odbc ${LINK_LIB_LIST} duckdb_static) - -+install( -+ TARGETS duckdb_odbc -+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} -+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} -+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} -+ PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} -+) -+ - if(NOT WIN32 AND NOT CLANG_TIDY) - add_subdirectory(test) - endif() -diff --git a/tools/sqlite3_api_wrapper/CMakeLists.txt b/tools/sqlite3_api_wrapper/CMakeLists.txt -index 84ac539..f5597a4 100644 ---- a/tools/sqlite3_api_wrapper/CMakeLists.txt -+++ b/tools/sqlite3_api_wrapper/CMakeLists.txt -@@ -26,7 +26,7 @@ if(NOT AMALGAMATION_BUILD) - endif() - link_threads(sqlite3_api_wrapper_static) - --if(NOT WIN32) -+if(BUILD_SHARED_LIBS AND NOT WIN32) - add_library(sqlite3_api_wrapper SHARED ${SQLITE_API_WRAPPER_FILES}) - target_link_libraries(sqlite3_api_wrapper duckdb ${DUCKDB_EXTRA_LINK_FLAGS}) - link_threads(sqlite3_api_wrapper) diff --git a/recipes/duckdb/all/patches/1.0.0-0001-fix-cmake.patch b/recipes/duckdb/all/patches/1.0.0-0001-fix-cmake.patch new file mode 100644 index 0000000000000..a557864ae780a --- /dev/null +++ b/recipes/duckdb/all/patches/1.0.0-0001-fix-cmake.patch @@ -0,0 +1,125 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index ec66b57..6321321 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -843,12 +843,12 @@ function(build_loadable_extension_directory NAME OUTPUT_DIRECTORY EXTENSION_VERS + COMMAND emcc $ -o $.wasm -O3 -sSIDE_MODULE=2 -sEXPORTED_FUNCTIONS="_${NAME}_init,_${NAME}_version" ${WASM_THREAD_FLAGS} ${TO_BE_LINKED} + ) + endif() +- add_custom_command( +- TARGET ${TARGET_NAME} +- POST_BUILD +- COMMAND +- ${CMAKE_COMMAND} -DEXTENSION=$${EXTENSION_POSTFIX} -DPLATFORM_FILE=${DuckDB_BINARY_DIR}/duckdb_platform_out -DDUCKDB_VERSION="${DUCKDB_NORMALIZED_VERSION}" -DEXTENSION_VERSION="${EXTENSION_VERSION}" -DNULL_FILE=${DUCKDB_MODULE_BASE_DIR}/scripts/null.txt -P ${DUCKDB_MODULE_BASE_DIR}/scripts/append_metadata.cmake +- ) ++ # add_custom_command( ++ # TARGET ${TARGET_NAME} ++ # POST_BUILD ++ # COMMAND ++ # ${CMAKE_COMMAND} -DEXTENSION=$${EXTENSION_POSTFIX} -DPLATFORM_FILE=${DuckDB_BINARY_DIR}/duckdb_platform_out -DDUCKDB_VERSION="${DUCKDB_NORMALIZED_VERSION}" -DEXTENSION_VERSION="${EXTENSION_VERSION}" -DNULL_FILE=${DUCKDB_MODULE_BASE_DIR}/scripts/null.txt -P ${DUCKDB_MODULE_BASE_DIR}/scripts/append_metadata.cmake ++ # ) + add_dependencies(${TARGET_NAME} duckdb_platform) + if (NOT EXTENSION_CONFIG_BUILD AND NOT ${EXTENSION_TESTS_ONLY} AND NOT CLANG_TIDY) + add_dependencies(duckdb_local_extension_repo ${TARGET_NAME}) +@@ -869,7 +869,7 @@ function(build_static_extension NAME PARAMETERS) + set(FILES "${ARGV}") + list(REMOVE_AT FILES 0) + add_library(${NAME}_extension STATIC ${FILES}) +- target_link_libraries(${NAME}_extension duckdb_static) ++# target_link_libraries(${NAME}_extension duckdb_static) + endfunction() + + # Internal extension register function +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 06c0c9a..ac1c4ad 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -93,21 +93,21 @@ else() + duckdb_skiplistlib + duckdb_mbedtls + duckdb_yyjson) +- ++ if(BUILD_SHARED_LIBS) + add_library(duckdb SHARED ${ALL_OBJECT_FILES}) + target_link_libraries(duckdb ${DUCKDB_LINK_LIBS}) + link_threads(duckdb) + link_extension_libraries(duckdb) +- ++ endif() + add_library(duckdb_static STATIC ${ALL_OBJECT_FILES}) + target_link_libraries(duckdb_static ${DUCKDB_LINK_LIBS}) + link_threads(duckdb_static) + link_extension_libraries(duckdb_static) +- ++ if(BUILD_SHARED_LIBS) + target_include_directories( + duckdb PUBLIC $ + $) +- ++ endif() + target_include_directories( + duckdb_static PUBLIC $ + $) +@@ -123,10 +123,18 @@ else() + DESTINATION "${INSTALL_INCLUDE_DIR}") + + endif() +- ++if(BUILD_SHARED_LIBS) + install( +- TARGETS duckdb duckdb_static ++ TARGETS duckdb + EXPORT "${DUCKDB_EXPORT_SET}" + LIBRARY DESTINATION "${INSTALL_LIB_DIR}" + ARCHIVE DESTINATION "${INSTALL_LIB_DIR}" + RUNTIME DESTINATION "${INSTALL_BIN_DIR}") ++else() ++install( ++ TARGETS duckdb_static ++ EXPORT "${DUCKDB_EXPORT_SET}" ++ LIBRARY DESTINATION "${INSTALL_LIB_DIR}" ++ ARCHIVE DESTINATION "${INSTALL_LIB_DIR}" ++ RUNTIME DESTINATION "${INSTALL_BIN_DIR}") ++endif() +diff --git a/tools/odbc/CMakeLists.txt b/tools/odbc/CMakeLists.txt +index baf7823..4447d26 100644 +--- a/tools/odbc/CMakeLists.txt ++++ b/tools/odbc/CMakeLists.txt +@@ -37,6 +37,13 @@ add_library(duckdb_odbc SHARED ${ALL_OBJECT_FILES} duckdb_odbc.def) + + set_target_properties(duckdb_odbc PROPERTIES DEFINE_SYMBOL "DUCKDB_ODBC_API") + target_link_libraries(duckdb_odbc ${LINK_LIB_LIST} duckdb_static) ++install( ++ TARGETS duckdb_odbc ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} ++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} ++) + + if(NOT CLANG_TIDY) + add_subdirectory(test) +diff --git a/tools/sqlite3_api_wrapper/CMakeLists.txt b/tools/sqlite3_api_wrapper/CMakeLists.txt +index e29c33e..9e387f9 100644 +--- a/tools/sqlite3_api_wrapper/CMakeLists.txt ++++ b/tools/sqlite3_api_wrapper/CMakeLists.txt +@@ -26,12 +26,12 @@ if(NOT AMALGAMATION_BUILD) + endif() + link_threads(sqlite3_api_wrapper_static) + +-if(NOT WIN32 AND NOT ZOS) ++if(BUILD_SHARED_LIBS AND NOT WIN32 AND NOT ZOS) + add_library(sqlite3_api_wrapper SHARED ${SQLITE_API_WRAPPER_FILES}) + target_link_libraries(sqlite3_api_wrapper duckdb ${DUCKDB_EXTRA_LINK_FLAGS}) + link_threads(sqlite3_api_wrapper) + endif() +- ++if(0) + include_directories(../../third_party/catch) + + include_directories(test/include) +@@ -43,3 +43,4 @@ if(WIN32 OR ZOS) + else() + target_link_libraries(test_sqlite3_api_wrapper sqlite3_api_wrapper) + endif() ++endif() diff --git a/recipes/duckdb/all/patches/1.0.0-0002-msvc-bicobj.patch b/recipes/duckdb/all/patches/1.0.0-0002-msvc-bicobj.patch new file mode 100644 index 0000000000000..ddefcf5673104 --- /dev/null +++ b/recipes/duckdb/all/patches/1.0.0-0002-msvc-bicobj.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 50d10e8..a06f30c 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -537,7 +537,7 @@ if(NOT MSVC) + endif() + else() + set(CMAKE_CXX_WINDOWS_FLAGS +- "/wd4244 /wd4267 /wd4200 /wd26451 /wd26495 /D_CRT_SECURE_NO_WARNINGS /utf-8") ++ "/wd4244 /wd4267 /wd4200 /wd26451 /wd26495 /D_CRT_SECURE_NO_WARNINGS /utf-8 /bigobj") + if(TREAT_WARNINGS_AS_ERRORS) + set(CMAKE_CXX_WINDOWS_FLAGS "${CMAKE_CXX_WINDOWS_FLAGS} /WX") + endif() diff --git a/recipes/duckdb/all/patches/1.1.0-0001-fix-cmake.patch b/recipes/duckdb/all/patches/1.1.0-0001-fix-cmake.patch new file mode 100644 index 0000000000000..988bca9f377f1 --- /dev/null +++ b/recipes/duckdb/all/patches/1.1.0-0001-fix-cmake.patch @@ -0,0 +1,110 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 7dc2bb7..89c0adc 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -896,12 +896,12 @@ function(build_loadable_extension_directory NAME ABI_TYPE OUTPUT_DIRECTORY EXTEN + set(FOOTER_VERSION_VALUE ${CAPI_VERSION}) + endif() + +- add_custom_command( +- TARGET ${TARGET_NAME} +- POST_BUILD +- COMMAND +- ${CMAKE_COMMAND} -DABI_TYPE=${ABI_TYPE} -DEXTENSION=$${EXTENSION_POSTFIX} -DPLATFORM_FILE=${DuckDB_BINARY_DIR}/duckdb_platform_out -DVERSION_FIELD="${FOOTER_VERSION_VALUE}" -DEXTENSION_VERSION="${EXTENSION_VERSION}" -DNULL_FILE=${DUCKDB_MODULE_BASE_DIR}/scripts/null.txt -P ${DUCKDB_MODULE_BASE_DIR}/scripts/append_metadata.cmake +- ) ++ # add_custom_command( ++ # TARGET ${TARGET_NAME} ++ # POST_BUILD ++ # COMMAND ++ # ${CMAKE_COMMAND} -DABI_TYPE=${ABI_TYPE} -DEXTENSION=$${EXTENSION_POSTFIX} -DPLATFORM_FILE=${DuckDB_BINARY_DIR}/duckdb_platform_out -DVERSION_FIELD="${FOOTER_VERSION_VALUE}" -DEXTENSION_VERSION="${EXTENSION_VERSION}" -DNULL_FILE=${DUCKDB_MODULE_BASE_DIR}/scripts/null.txt -P ${DUCKDB_MODULE_BASE_DIR}/scripts/append_metadata.cmake ++ # ) + add_dependencies(${TARGET_NAME} duckdb_platform) + if (NOT EXTENSION_CONFIG_BUILD AND NOT ${EXTENSION_TESTS_ONLY} AND NOT CLANG_TIDY) + add_dependencies(duckdb_local_extension_repo ${TARGET_NAME}) +@@ -931,7 +931,7 @@ function(build_static_extension NAME PARAMETERS) + set(FILES "${ARGV}") + list(REMOVE_AT FILES 0) + add_library(${NAME}_extension STATIC ${FILES}) +- target_link_libraries(${NAME}_extension duckdb_static) ++ # target_link_libraries(${NAME}_extension duckdb_static) + endfunction() + + # Internal extension register function +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 3e757a4..957f0e4 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -109,7 +109,7 @@ else() + duckdb_skiplistlib + duckdb_mbedtls + duckdb_yyjson) +- ++ if(BUILD_SHARED_LIBS) + add_library(duckdb SHARED ${ALL_OBJECT_FILES}) + + if(WIN32 AND NOT MINGW) +@@ -135,16 +135,16 @@ else() + target_link_libraries(duckdb ${DUCKDB_LINK_LIBS}) + link_threads(duckdb) + link_extension_libraries(duckdb) +- ++ endif() + add_library(duckdb_static STATIC ${ALL_OBJECT_FILES}) + target_link_libraries(duckdb_static ${DUCKDB_LINK_LIBS}) + link_threads(duckdb_static) + link_extension_libraries(duckdb_static) +- ++ if(BUILD_SHARED_LIBS) + target_include_directories( + duckdb PUBLIC $ + $) +- ++ endif() + target_include_directories( + duckdb_static PUBLIC $ + $) +@@ -160,10 +160,18 @@ else() + DESTINATION "${INSTALL_INCLUDE_DIR}") + + endif() +- ++if(BUILD_SHARED_LIBS) + install( +- TARGETS duckdb duckdb_static ++ TARGETS duckdb + EXPORT "${DUCKDB_EXPORT_SET}" + LIBRARY DESTINATION "${INSTALL_LIB_DIR}" + ARCHIVE DESTINATION "${INSTALL_LIB_DIR}" + RUNTIME DESTINATION "${INSTALL_BIN_DIR}") ++else() ++install( ++ TARGETS duckdb_static ++ EXPORT "${DUCKDB_EXPORT_SET}" ++ LIBRARY DESTINATION "${INSTALL_LIB_DIR}" ++ ARCHIVE DESTINATION "${INSTALL_LIB_DIR}" ++ RUNTIME DESTINATION "${INSTALL_BIN_DIR}") ++endif() +diff --git a/tools/sqlite3_api_wrapper/CMakeLists.txt b/tools/sqlite3_api_wrapper/CMakeLists.txt +index e29c33e..9e387f9 100644 +--- a/tools/sqlite3_api_wrapper/CMakeLists.txt ++++ b/tools/sqlite3_api_wrapper/CMakeLists.txt +@@ -26,12 +26,12 @@ if(NOT AMALGAMATION_BUILD) + endif() + link_threads(sqlite3_api_wrapper_static) + +-if(NOT WIN32 AND NOT ZOS) ++if(BUILD_SHARED_LIBS AND NOT WIN32 AND NOT ZOS) + add_library(sqlite3_api_wrapper SHARED ${SQLITE_API_WRAPPER_FILES}) + target_link_libraries(sqlite3_api_wrapper duckdb ${DUCKDB_EXTRA_LINK_FLAGS}) + link_threads(sqlite3_api_wrapper) + endif() +- ++if(0) + include_directories(../../third_party/catch) + + include_directories(test/include) +@@ -43,3 +43,4 @@ if(WIN32 OR ZOS) + else() + target_link_libraries(test_sqlite3_api_wrapper sqlite3_api_wrapper) + endif() ++endif() diff --git a/recipes/duckdb/all/patches/1.1.0-0002-msvc-bicobj.patch b/recipes/duckdb/all/patches/1.1.0-0002-msvc-bicobj.patch new file mode 100644 index 0000000000000..838678649e638 --- /dev/null +++ b/recipes/duckdb/all/patches/1.1.0-0002-msvc-bicobj.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 89c0adc..af5b786 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -574,7 +574,7 @@ if(NOT MSVC) + endif() + else() + set(CMAKE_CXX_WINDOWS_FLAGS +- "/wd4244 /wd4267 /wd4200 /wd26451 /wd26495 /D_CRT_SECURE_NO_WARNINGS /utf-8") ++ "/wd4244 /wd4267 /wd4200 /wd26451 /wd26495 /D_CRT_SECURE_NO_WARNINGS /utf-8 /bigobj") + if(TREAT_WARNINGS_AS_ERRORS) + set(CMAKE_CXX_WINDOWS_FLAGS "${CMAKE_CXX_WINDOWS_FLAGS} /WX") + endif() diff --git a/recipes/duckdb/all/patches/1.1.1-0001-fix-cmake.patch b/recipes/duckdb/all/patches/1.1.1-0001-fix-cmake.patch new file mode 100644 index 0000000000000..426c745da3cdf --- /dev/null +++ b/recipes/duckdb/all/patches/1.1.1-0001-fix-cmake.patch @@ -0,0 +1,110 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 5c2503e..f7ab0e8 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -892,12 +892,12 @@ function(build_loadable_extension_directory NAME ABI_TYPE OUTPUT_DIRECTORY EXTEN + set(FOOTER_VERSION_VALUE ${CAPI_VERSION}) + endif() + +- add_custom_command( +- TARGET ${TARGET_NAME} +- POST_BUILD +- COMMAND +- ${CMAKE_COMMAND} -DABI_TYPE=${ABI_TYPE} -DEXTENSION=$${EXTENSION_POSTFIX} -DPLATFORM_FILE=${DuckDB_BINARY_DIR}/duckdb_platform_out -DVERSION_FIELD="${FOOTER_VERSION_VALUE}" -DEXTENSION_VERSION="${EXTENSION_VERSION}" -DNULL_FILE=${DUCKDB_MODULE_BASE_DIR}/scripts/null.txt -P ${DUCKDB_MODULE_BASE_DIR}/scripts/append_metadata.cmake +- ) ++ # add_custom_command( ++ # TARGET ${TARGET_NAME} ++ # POST_BUILD ++ # COMMAND ++ # ${CMAKE_COMMAND} -DABI_TYPE=${ABI_TYPE} -DEXTENSION=$${EXTENSION_POSTFIX} -DPLATFORM_FILE=${DuckDB_BINARY_DIR}/duckdb_platform_out -DVERSION_FIELD="${FOOTER_VERSION_VALUE}" -DEXTENSION_VERSION="${EXTENSION_VERSION}" -DNULL_FILE=${DUCKDB_MODULE_BASE_DIR}/scripts/null.txt -P ${DUCKDB_MODULE_BASE_DIR}/scripts/append_metadata.cmake ++ # ) + add_dependencies(${TARGET_NAME} duckdb_platform) + if (NOT EXTENSION_CONFIG_BUILD AND NOT ${EXTENSION_TESTS_ONLY} AND NOT CLANG_TIDY) + add_dependencies(duckdb_local_extension_repo ${TARGET_NAME}) +@@ -927,7 +927,7 @@ function(build_static_extension NAME PARAMETERS) + set(FILES "${ARGV}") + list(REMOVE_AT FILES 0) + add_library(${NAME}_extension STATIC ${FILES}) +- target_link_libraries(${NAME}_extension duckdb_static) ++ # target_link_libraries(${NAME}_extension duckdb_static) + endfunction() + + # Internal extension register function +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 3e757a4..957f0e4 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -109,7 +109,7 @@ else() + duckdb_skiplistlib + duckdb_mbedtls + duckdb_yyjson) +- ++ if(BUILD_SHARED_LIBS) + add_library(duckdb SHARED ${ALL_OBJECT_FILES}) + + if(WIN32 AND NOT MINGW) +@@ -135,16 +135,16 @@ else() + target_link_libraries(duckdb ${DUCKDB_LINK_LIBS}) + link_threads(duckdb) + link_extension_libraries(duckdb) +- ++ endif() + add_library(duckdb_static STATIC ${ALL_OBJECT_FILES}) + target_link_libraries(duckdb_static ${DUCKDB_LINK_LIBS}) + link_threads(duckdb_static) + link_extension_libraries(duckdb_static) +- ++ if(BUILD_SHARED_LIBS) + target_include_directories( + duckdb PUBLIC $ + $) +- ++ endif() + target_include_directories( + duckdb_static PUBLIC $ + $) +@@ -160,10 +160,18 @@ else() + DESTINATION "${INSTALL_INCLUDE_DIR}") + + endif() +- ++if(BUILD_SHARED_LIBS) + install( +- TARGETS duckdb duckdb_static ++ TARGETS duckdb + EXPORT "${DUCKDB_EXPORT_SET}" + LIBRARY DESTINATION "${INSTALL_LIB_DIR}" + ARCHIVE DESTINATION "${INSTALL_LIB_DIR}" + RUNTIME DESTINATION "${INSTALL_BIN_DIR}") ++else() ++install( ++ TARGETS duckdb_static ++ EXPORT "${DUCKDB_EXPORT_SET}" ++ LIBRARY DESTINATION "${INSTALL_LIB_DIR}" ++ ARCHIVE DESTINATION "${INSTALL_LIB_DIR}" ++ RUNTIME DESTINATION "${INSTALL_BIN_DIR}") ++endif() +diff --git a/tools/sqlite3_api_wrapper/CMakeLists.txt b/tools/sqlite3_api_wrapper/CMakeLists.txt +index e29c33e..9e387f9 100644 +--- a/tools/sqlite3_api_wrapper/CMakeLists.txt ++++ b/tools/sqlite3_api_wrapper/CMakeLists.txt +@@ -26,12 +26,12 @@ if(NOT AMALGAMATION_BUILD) + endif() + link_threads(sqlite3_api_wrapper_static) + +-if(NOT WIN32 AND NOT ZOS) ++if(BUILD_SHARED_LIBS AND NOT WIN32 AND NOT ZOS) + add_library(sqlite3_api_wrapper SHARED ${SQLITE_API_WRAPPER_FILES}) + target_link_libraries(sqlite3_api_wrapper duckdb ${DUCKDB_EXTRA_LINK_FLAGS}) + link_threads(sqlite3_api_wrapper) + endif() +- ++if(0) + include_directories(../../third_party/catch) + + include_directories(test/include) +@@ -43,3 +43,4 @@ if(WIN32 OR ZOS) + else() + target_link_libraries(test_sqlite3_api_wrapper sqlite3_api_wrapper) + endif() ++endif() diff --git a/recipes/duckdb/all/patches/1.1.1-0002-msvc-bicobj.patch b/recipes/duckdb/all/patches/1.1.1-0002-msvc-bicobj.patch new file mode 100644 index 0000000000000..b8385d1df35d3 --- /dev/null +++ b/recipes/duckdb/all/patches/1.1.1-0002-msvc-bicobj.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index f7ab0e8..a00353d 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -570,7 +570,7 @@ if(NOT MSVC) + endif() + else() + set(CMAKE_CXX_WINDOWS_FLAGS +- "/wd4244 /wd4267 /wd4200 /wd26451 /wd26495 /D_CRT_SECURE_NO_WARNINGS /utf-8") ++ "/wd4244 /wd4267 /wd4200 /wd26451 /wd26495 /D_CRT_SECURE_NO_WARNINGS /utf-8 /bigobj") + if(TREAT_WARNINGS_AS_ERRORS) + set(CMAKE_CXX_WINDOWS_FLAGS "${CMAKE_CXX_WINDOWS_FLAGS} /WX") + endif() diff --git a/recipes/duckdb/all/test_v1_package/CMakeLists.txt b/recipes/duckdb/all/test_v1_package/CMakeLists.txt deleted file mode 100644 index 925ecbe19e448..0000000000000 --- a/recipes/duckdb/all/test_v1_package/CMakeLists.txt +++ /dev/null @@ -1,8 +0,0 @@ -cmake_minimum_required(VERSION 3.1) -project(test_package) - -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) - -add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ - ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/duckdb/all/test_v1_package/conanfile.py b/recipes/duckdb/all/test_v1_package/conanfile.py deleted file mode 100644 index 5a05af3c2dfd2..0000000000000 --- a/recipes/duckdb/all/test_v1_package/conanfile.py +++ /dev/null @@ -1,18 +0,0 @@ -from conans import ConanFile, CMake -from conan.tools.build import cross_building -import os - - -class TestPackageV1Conan(ConanFile): - settings = "os", "arch", "compiler", "build_type" - generators = "cmake", "cmake_find_package_multi" - - def build(self): - cmake = CMake(self) - cmake.configure() - cmake.build() - - def test(self): - if not cross_building(self): - bin_path = os.path.join("bin", "test_package") - self.run(bin_path, run_environment=True) diff --git a/recipes/duckdb/config.yml b/recipes/duckdb/config.yml index 60b78863eb1bb..e49709a230ba5 100644 --- a/recipes/duckdb/config.yml +++ b/recipes/duckdb/config.yml @@ -1,19 +1,19 @@ versions: - "0.10.1": + "1.1.3": folder: "all" - "0.9.2": + "1.1.2": folder: "all" - "0.9.0": + "1.1.1": folder: "all" - "0.8.1": + "1.1.0": folder: "all" - "0.8.0": + "1.0.0": folder: "all" - "0.7.1": + "0.10.2": folder: "all" - "0.6.1": + "0.10.1": folder: "all" - "0.6.0": + "0.9.2": folder: "all" - "0.5.1": + "0.9.0": folder: "all" diff --git a/recipes/efsw/all/conandata.yml b/recipes/efsw/all/conandata.yml new file mode 100644 index 0000000000000..5279bbef50ca2 --- /dev/null +++ b/recipes/efsw/all/conandata.yml @@ -0,0 +1,5 @@ +sources: + # Newer versions at the top + "1.4.0": + url: "https://github.com/SpartanJ/efsw/archive/refs/tags/1.4.0.tar.gz" + sha256: "9eed5fc8471767faa44134f5379d4de02825e3756007dafa482fd1656e42bc4a" diff --git a/recipes/efsw/all/conanfile.py b/recipes/efsw/all/conanfile.py new file mode 100644 index 0000000000000..05d9db6ba0105 --- /dev/null +++ b/recipes/efsw/all/conanfile.py @@ -0,0 +1,75 @@ +from conan import ConanFile +from conan.tools.build import check_min_cppstd +from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout +from conan.tools.files import copy, get, rm, rmdir, replace_in_file +from conan.tools.microsoft import is_msvc, is_msvc_static_runtime +import os + + +required_conan_version = ">=2.1" + + +class EfswConan(ConanFile): + name = "efsw" + description = "efsw is a C++ cross-platform file system watcher and notifier." + license = "MIT" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/SpartanJ/efsw" + topics = ("file system", "watch", "cross-platform") + package_type = "library" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + } + implements = ["auto_shared_fpic"] + + def validate(self): + check_min_cppstd(self, 11) + + def layout(self): + cmake_layout(self, src_folder="src") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + if is_msvc(self): + tc.variables["USE_MSVC_RUNTIME_LIBRARY_DLL"] = not is_msvc_static_runtime(self) + tc.variables["BUILD_TEST_APP"] = False + tc.variables["BUILD_STATIC_LIBS"] = False + tc.generate() + + def _patch_sources(self): + # INFO: Honor fPIC option. The upstream sets fPIC to ON always + replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), "set(CMAKE_POSITION_INDEPENDENT_CODE ON)", "") + + def build(self): + self._patch_sources() + cmake = CMake(self) + cmake.configure() + cmake.build() + + def package(self): + copy(self, "LICENSE", self.source_folder, os.path.join(self.package_folder, "licenses")) + cmake = CMake(self) + cmake.install() + + rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) + rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) + rmdir(self, os.path.join(self.package_folder, "share")) + rm(self, "*.pdb", os.path.join(self.package_folder, "lib")) + rm(self, "*.pdb", os.path.join(self.package_folder, "bin")) + + def package_info(self): + self.cpp_info.libs = ["efsw"] + + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.system_libs = ["m", "pthread"] + if self.settings.os == "Macos": + self.cpp_info.frameworks = ["Cocoa", "CoreFoundation", "CoreServices"] diff --git a/recipes/efsw/all/test_package/CMakeLists.txt b/recipes/efsw/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..060bcf241df10 --- /dev/null +++ b/recipes/efsw/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) + +project(test_package LANGUAGES CXX) # if the project uses c++ + +find_package(efsw REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE efsw::efsw) diff --git a/recipes/efsw/all/test_package/conanfile.py b/recipes/efsw/all/test_package/conanfile.py new file mode 100644 index 0000000000000..cef342207237c --- /dev/null +++ b/recipes/efsw/all/test_package/conanfile.py @@ -0,0 +1,25 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/efsw/all/test_package/test_package.cpp b/recipes/efsw/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..05eff3352085a --- /dev/null +++ b/recipes/efsw/all/test_package/test_package.cpp @@ -0,0 +1,13 @@ +#include +#include // EXIT_SUCCESS +#include "efsw/efsw.hpp" + +int main() { + efsw::FileWatcher* fileWatcher = new efsw::FileWatcher(); + + std::cout << "Follows symlinks?: " << fileWatcher->followSymlinks() << std::endl; + + delete fileWatcher; + + return EXIT_SUCCESS; +} diff --git a/recipes/efsw/config.yml b/recipes/efsw/config.yml new file mode 100644 index 0000000000000..c957e4bc2d3c7 --- /dev/null +++ b/recipes/efsw/config.yml @@ -0,0 +1,3 @@ +versions: + "1.4.0": + folder: all diff --git a/recipes/elfutils/all/conanfile.py b/recipes/elfutils/all/conanfile.py index 7d15bdd2937ed..df45185883fb0 100644 --- a/recipes/elfutils/all/conanfile.py +++ b/recipes/elfutils/all/conanfile.py @@ -82,7 +82,7 @@ def requirements(self): self.requires("libmicrohttpd/0.9.75") def build_requirements(self): - self.tool_requires("gettext/0.21") + self.tool_requires("gettext/0.22.5") self.tool_requires("automake/1.16.5") self.build_requires("m4/1.4.19") self.build_requires("flex/2.6.4") @@ -171,6 +171,7 @@ def package_info(self): # library components self.cpp_info.components["libelf"].libs = ["elf"] self.cpp_info.components["libelf"].requires = ["zlib::zlib"] + self.cpp_info.components["libelf"].set_property("pkg_config_name", "libelf") if self.options.with_bzlib: self.cpp_info.components["libelf"].requires.append("bzip2::bzip2") if self.options.with_lzma: @@ -182,6 +183,7 @@ def package_info(self): self.cpp_info.components["libdw"].libs = ["dw"] self.cpp_info.components["libdw"].requires = ["libelf"] + self.cpp_info.components["libdw"].set_property("pkg_config_name", "libdw") if self.settings.os in ["Linux", "FreeBSD"]: self.cpp_info.components["libdw"].system_libs.extend(["dl"]) @@ -192,6 +194,7 @@ def package_info(self): if self.options.get_safe("libdebuginfod"): self.cpp_info.components["libdebuginfod"].libs = ["debuginfod"] self.cpp_info.components["libdebuginfod"].requires = ["libcurl::curl"] + self.cpp_info.components["libdebuginfod"].set_property("pkg_config_name", "libdebuginfod") # utilities bin_path = os.path.join(self.package_folder, "bin") diff --git a/recipes/emhash/all/conandata.yml b/recipes/emhash/all/conandata.yml new file mode 100644 index 0000000000000..4034de3bcdd95 --- /dev/null +++ b/recipes/emhash/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "cci.20240601": + url: "https://github.com/ktprime/emhash/archive/3efa77ef32786a033b379071fe8af3dc705736ca.tar.gz" + sha256: "db6c524f3acb487f88221aff75a9198700478ece4ea2a9a25b013ef7375bc819" diff --git a/recipes/emhash/all/conanfile.py b/recipes/emhash/all/conanfile.py new file mode 100644 index 0000000000000..7618a4de1e403 --- /dev/null +++ b/recipes/emhash/all/conanfile.py @@ -0,0 +1,49 @@ +from conan import ConanFile +from conan.tools.build import check_min_cppstd +from conan.tools.files import get, copy +from conan.tools.layout import basic_layout +import os + +required_conan_version = ">=1.52.0" + +class EmhashConan(ConanFile): + name = "emhash" + description = "Fast and memory efficient c++ flat hash map/set" + license = "MIT" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/ktprime/emhash" + topics = ("flat", "map", "set", "hash", "header-only") + package_type = "header-library" + settings = "os", "arch", "compiler", "build_type" + no_copy_source = True + + @property + def _min_cppstd(self): + return 11 + + def layout(self): + basic_layout(self, src_folder="src") + + def package_id(self): + self.info.clear() + + def validate(self): + if self.settings.compiler.get_safe("cppstd"): + check_min_cppstd(self, self._min_cppstd) + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def package(self): + copy(self, pattern="LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) + copy( + self, + pattern="*.hpp", + dst=os.path.join(self.package_folder, "include"), + src=self.source_folder, + excludes=["bench", "test", "thirdparty",] + ) + + def package_info(self): + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] diff --git a/recipes/emhash/all/test_package/CMakeLists.txt b/recipes/emhash/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..123ccacccfde9 --- /dev/null +++ b/recipes/emhash/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) + +find_package(emhash REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE emhash::emhash) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) diff --git a/recipes/emhash/all/test_package/conanfile.py b/recipes/emhash/all/test_package/conanfile.py new file mode 100644 index 0000000000000..3a91c9439218e --- /dev/null +++ b/recipes/emhash/all/test_package/conanfile.py @@ -0,0 +1,26 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def layout(self): + cmake_layout(self) + + def requirements(self): + self.requires(self.tested_reference_str) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/emhash/all/test_package/test_package.cpp b/recipes/emhash/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..0fa8241e36634 --- /dev/null +++ b/recipes/emhash/all/test_package/test_package.cpp @@ -0,0 +1,48 @@ +#include +#include +#include +#include +#include + +#define EMH_EXT +#include "hash_table5.hpp" + +int main(void) { + // constructor + emhash5::HashMap m1(4); + m1.reserve(100); + for (int i = 1; i < 100; i++) + m1.emplace_unique(i, i); //key must be unique, performance is better than emplace, operator[]. + + auto no_value = m1.at(0); //no_value = 0; no exception throw!!!. only return zero for integer value. + + // list constructor + emhash5::HashMap m2 = { + {1, "foo"}, + {3, "bar"}, + {2, "baz"}, + }; + + auto* pvalue = m2.try_get(1); //return nullptr if key is not exist + if (m2.try_set(4, "for")) printf("set success"); + if (!m2.try_set(1, "new")) printf("set failed"); + std::string ovalue = m2.set_get(1, "new"); //ovalue = "foo" and m2[1] == "new" + + for(auto& p: m2) + std::cout << " " << p.first << " => " << p.second << '\n'; + + // copy constructor + emhash5::HashMap m3 = m2; + // move constructor + emhash5::HashMap m4 = std::move(m2); + + //insert. insert_unique. emplace + m2.insert_unique(4, "four"); + m2[4] = "four_again"; + m2.emplace(std::make_pair(4, "four")); + m2.insert({{6, "six"}, {5, "five"}}); + + // range constructor + std::vector, int>> v = { {0x12, 1}, {0x01,-1} }; + emhash5::HashMap, double> m5(v.begin(), v.end()); +} diff --git a/recipes/emhash/config.yml b/recipes/emhash/config.yml new file mode 100644 index 0000000000000..155d30b32fcf1 --- /dev/null +++ b/recipes/emhash/config.yml @@ -0,0 +1,3 @@ +versions: + "cci.20240601": + folder: all diff --git a/recipes/emio/all/conandata.yml b/recipes/emio/all/conandata.yml index a9c48f24eeb27..c3bda87372ad5 100644 --- a/recipes/emio/all/conandata.yml +++ b/recipes/emio/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.8.0": + url: "https://github.com/Viatorus/emio/archive/0.8.0.tar.gz" + sha256: "86436eeb16cac7c7c74a7c1af9fe7bbbc1aa18d3d96e7bba9791c15ebe9ebdc7" "0.7.0": url: "https://github.com/viatorus/emio/archive/0.7.0.tar.gz" sha256: "1ef5304964eee109c13477f2d84822ee474612475049a377b59e33a5fe05d7eb" diff --git a/recipes/emio/config.yml b/recipes/emio/config.yml index b957140535721..19b0eb079cdeb 100644 --- a/recipes/emio/config.yml +++ b/recipes/emio/config.yml @@ -1,4 +1,6 @@ versions: + "0.8.0": + folder: all "0.7.0": folder: all "0.6.1": diff --git a/recipes/enet/all/conandata.yml b/recipes/enet/all/conandata.yml index c03ba9c9c59fb..346f8469ae010 100644 --- a/recipes/enet/all/conandata.yml +++ b/recipes/enet/all/conandata.yml @@ -1,22 +1,17 @@ sources: + "1.3.18": + url: "https://github.com/lsalzman/enet/archive/refs/tags/v1.3.18.tar.gz" + sha256: "28603c895f9ed24a846478180ee72c7376b39b4bb1287b73877e5eae7d96b0dd" "1.3.17": url: "https://github.com/lsalzman/enet/archive/refs/tags/v1.3.17.tar.gz" sha256: "1e0b4bc0b7127a2d779dd7928f0b31830f5b3dcb7ec9588c5de70033e8d2434a" "1.3.16": url: "https://github.com/lsalzman/enet/archive/refs/tags/v1.3.16.tar.gz" sha256: "b3aa85b43e4309fec9441b4e6639c268e22962a578bd5e2307bb3a7b6fe73714" - "1.3.15": - url: "https://github.com/lsalzman/enet/archive/refs/tags/v1.3.15.tar.gz" - sha256: "e749887a19b5a4a0a16daae2d695fd7ed581ec517f3b15aedc3cdce2d999d471" - "1.3.14": - url: "https://github.com/lsalzman/enet/archive/refs/tags/v1.3.14.tar.gz" - sha256: "3660e12d32164b2d814a897f50caa4e68db6396c00ef22806db45c2308b439e6" patches: + "1.3.18": + - patch_file: "patches/fix-cmake-1.3.18.patch" "1.3.17": - patch_file: "patches/fix-cmake.patch" "1.3.16": - patch_file: "patches/fix-cmake.patch" - "1.3.15": - - patch_file: "patches/fix-cmake.patch" - "1.3.14": - - patch_file: "patches/fix-cmake.patch" diff --git a/recipes/enet/all/patches/fix-cmake-1.3.18.patch b/recipes/enet/all/patches/fix-cmake-1.3.18.patch new file mode 100644 index 0000000000000..6a6af96885d57 --- /dev/null +++ b/recipes/enet/all/patches/fix-cmake-1.3.18.patch @@ -0,0 +1,41 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index c6459b6..d7e68bd 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -84,19 +84,27 @@ set(SOURCE_FILES + source_group(include FILES ${INCLUDE_FILES}) + source_group(source FILES ${SOURCE_FILES}) + +-add_library(enet STATIC ++if(MSVC AND BUILD_SHARED_LIBS) ++ add_definitions(-DENET_DLL) ++ add_definitions(-DENET_BUILDING_LIB) ++endif() ++add_library(enet + ${INCLUDE_FILES} + ${SOURCE_FILES} + ) + +-if (MINGW) ++if (WIN32) + target_link_libraries(enet winmm ws2_32) + endif() + +-install(TARGETS enet +- RUNTIME DESTINATION bin +- ARCHIVE DESTINATION lib/static +- LIBRARY DESTINATION lib) +- +-install(DIRECTORY include/ +- DESTINATION include) ++include(GNUInstallDirs) ++install( ++ TARGETS enet ++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} ++) ++install( ++ DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/include/enet ++ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} ++) diff --git a/recipes/enet/config.yml b/recipes/enet/config.yml index 1e0720325112a..9574bb80165a0 100644 --- a/recipes/enet/config.yml +++ b/recipes/enet/config.yml @@ -1,9 +1,7 @@ versions: + "1.3.18": + folder: all "1.3.17": folder: all "1.3.16": folder: all - "1.3.15": - folder: all - "1.3.14": - folder: all diff --git a/recipes/entt/3.x.x/conandata.yml b/recipes/entt/3.x.x/conandata.yml index 47adab23698d5..bc82c187f9e2a 100644 --- a/recipes/entt/3.x.x/conandata.yml +++ b/recipes/entt/3.x.x/conandata.yml @@ -1,7 +1,10 @@ sources: - "3.13.0": - url: "https://github.com/skypjack/entt/archive/refs/tags/v3.13.0.tar.gz" - sha256: "dc0ab3ee136a1fe7f92df8898ff215dff1fe4d05d81b60144c7c0468446540a9" + "3.14.0": + url: "https://github.com/skypjack/entt/archive/refs/tags/v3.14.0.tar.gz" + sha256: "e31f6e95a30e2977a50449ef9a607a9ff40febe6f9da2a8144a183f8606f7719" + "3.13.2": + url: "https://github.com/skypjack/entt/archive/refs/tags/v3.13.2.tar.gz" + sha256: "cb556aa543d01177b62de41321759e02d96078948dda72705b3d7fe68af88489" "3.12.2": url: "https://github.com/skypjack/entt/archive/refs/tags/v3.12.2.tar.gz" sha256: "3F3E43988218DAECC0530CCAF45E960F7F7416E1FCF2C69799160C18B6A2FEE3" diff --git a/recipes/entt/config.yml b/recipes/entt/config.yml index 10a22d0efa93f..b6987050a29e9 100644 --- a/recipes/entt/config.yml +++ b/recipes/entt/config.yml @@ -1,5 +1,7 @@ versions: - "3.13.0": + "3.14.0": + folder: 3.x.x + "3.13.2": folder: 3.x.x "3.12.2": folder: 3.x.x diff --git a/recipes/enumbitmask/all/conandata.yml b/recipes/enumbitmask/all/conandata.yml new file mode 100644 index 0000000000000..cd53c7f619e50 --- /dev/null +++ b/recipes/enumbitmask/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "1.0": + url: "https://github.com/Reputeless/EnumBitmask/archive/refs/tags/v1.0.tar.gz" + sha256: "233efdefa4d0cfc8d8664ab7326db29835cc874b0af4926a7d93a184b250013d" diff --git a/recipes/enumbitmask/all/conanfile.py b/recipes/enumbitmask/all/conanfile.py new file mode 100644 index 0000000000000..e26040a23cf68 --- /dev/null +++ b/recipes/enumbitmask/all/conanfile.py @@ -0,0 +1,67 @@ +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.build import check_min_cppstd +from conan.tools.files import apply_conandata_patches, export_conandata_patches, get, copy +from conan.tools.layout import basic_layout +from conan.tools.scm import Version +import os + + +required_conan_version = ">=1.52.0" + + +class EnumBitmaskConan(ConanFile): + name = "enumbitmask" + description = "A C++ library to enable bitmask operators for an enum class type" + license = "CC0-1.0" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/Reputeless/EnumBitmask" + topics = ("enum", "bitmask", "header-only") + package_type = "header-library" + settings = "os", "arch", "compiler", "build_type" + no_copy_source = True + + @property + def _min_cppstd(self): + return 17 + + @property + def _compilers_minimum_version(self): + return { + "gcc": "8", + "clang": "7", + "apple-clang": "12", + "Visual Studio": "16", + "msvc": "192", + } + + def layout(self): + basic_layout(self, src_folder="src") + + def package_id(self): + self.info.clear() + + def validate(self): + if self.settings.compiler.get_safe("cppstd"): + check_min_cppstd(self, self._min_cppstd) + minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) + if minimum_version and Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration( + f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." + ) + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def package(self): + copy(self, pattern="LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) + copy( + self, + pattern="*.hpp", + dst=os.path.join(self.package_folder, "include"), + src=self.source_folder, + ) + + def package_info(self): + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] diff --git a/recipes/enumbitmask/all/test_package/CMakeLists.txt b/recipes/enumbitmask/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..7e634d8528a16 --- /dev/null +++ b/recipes/enumbitmask/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) + +find_package(enumbitmask REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE enumbitmask::enumbitmask) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) diff --git a/recipes/enumbitmask/all/test_package/conanfile.py b/recipes/enumbitmask/all/test_package/conanfile.py new file mode 100644 index 0000000000000..3a91c9439218e --- /dev/null +++ b/recipes/enumbitmask/all/test_package/conanfile.py @@ -0,0 +1,26 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def layout(self): + cmake_layout(self) + + def requirements(self): + self.requires(self.tested_reference_str) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/enumbitmask/all/test_package/test_package.cpp b/recipes/enumbitmask/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..80e777f36555c --- /dev/null +++ b/recipes/enumbitmask/all/test_package/test_package.cpp @@ -0,0 +1,20 @@ +#include + +#include "EnumBitmask.hpp" + +enum class OpenMode { + Append = 1, + Binary = 2, + Input = 4, + Output = 8, +}; +DEFINE_BITMASK_OPERATORS(OpenMode) + + +int main() { + constexpr auto mode = OpenMode::Binary | OpenMode::Input; + + constexpr auto flag = mode & OpenMode::Binary; + + return 0; +} diff --git a/recipes/enumbitmask/config.yml b/recipes/enumbitmask/config.yml new file mode 100644 index 0000000000000..edab1ee152d36 --- /dev/null +++ b/recipes/enumbitmask/config.yml @@ -0,0 +1,3 @@ +versions: + "1.0": + folder: all diff --git a/recipes/etl/all/conandata.yml b/recipes/etl/all/conandata.yml index 74e149bfbcab5..ad1ca82dd2b02 100644 --- a/recipes/etl/all/conandata.yml +++ b/recipes/etl/all/conandata.yml @@ -1,49 +1,28 @@ sources: + "20.39.4": + url: "https://github.com/ETLCPP/etl/archive/20.39.4.tar.gz" + sha256: "ce1222ed12fb39ae7a6160f8c33da61534d6b4c4d0d36be622910bbd545f5ee7" + "20.39.3": + url: "https://github.com/ETLCPP/etl/archive/20.39.3.tar.gz" + sha256: "1d596bc47d17959ced8b4586e0ae22348c903df6ab00f47ef900d854ef5e30c8" + "20.38.17": + url: "https://github.com/ETLCPP/etl/archive/20.38.17.tar.gz" + sha256: "5b490aca3faad3796a48bf0980e74f2a67953967fad3c051a6d4981051cb0b9a" + "20.38.16": + url: "https://github.com/ETLCPP/etl/archive/20.38.16.tar.gz" + sha256: "6d05e33d6e7eb2c8d4654c77dcd083adc70da29aba808f471ba7c6e2b8fcbf03" + "20.38.15": + url: "https://github.com/ETLCPP/etl/archive/20.38.15.tar.gz" + sha256: "c4f3108b35eb669ce4a6a217264ca133fe52cc8b5bce026a474ec81c0a2c4026" + "20.38.14": + url: "https://github.com/ETLCPP/etl/archive/20.38.14.tar.gz" + sha256: "d286191f0617e1c6c85e1ecb2175e84035918a7bf67d0bb347a8cb6fca3b2db4" + "20.38.13": + url: "https://github.com/ETLCPP/etl/archive/20.38.13.tar.gz" + sha256: "e606083e189a8fe6211c30c8c579b60c29658a531b5cafbb511daab1a2861a69" + "20.38.11": + url: "https://github.com/ETLCPP/etl/archive/20.38.11.tar.gz" + sha256: "c73b6b076ab59e02398a9f90a66198a9f8bf0cfa91af7be2eebefb3bb264ba83" "20.38.10": url: "https://github.com/ETLCPP/etl/archive/20.38.10.tar.gz" sha256: "562f9b5d9e6786350b09d87be9c5f030073e34d7bf0a975de3e91476ddd471a3" - "20.38.7": - url: "https://github.com/ETLCPP/etl/archive/20.38.7.tar.gz" - sha256: "65cfc033bacab452af05a36bd53b8cdc2bdfd1492b2adc5bb51d2f00e451491f" - "20.38.6": - url: "https://github.com/ETLCPP/etl/archive/20.38.6.tar.gz" - sha256: "95515f2229fe75393d18ee95548998a06e65a02acd5eedae5808dd34f8201462" - "20.38.4": - url: "https://github.com/ETLCPP/etl/archive/20.38.4.tar.gz" - sha256: "4074583bacac17e7944030f099d18a4ea3591d5d58b8d8b85c1b7f080a3e9610" - "20.38.3": - url: "https://github.com/ETLCPP/etl/archive/20.38.3.tar.gz" - sha256: "7d2f384dfa9a50c8e066b716524016d2b62e753b0b75fed09a2b7e2c260759d2" - "20.38.0": - url: "https://github.com/ETLCPP/etl/archive/20.38.0.tar.gz" - sha256: "7e29ce81a2a2d5826286502a2ad5bde1f4b591d2c9e0ef7ccc335e75445223cd" - "20.37.3": - url: "https://github.com/ETLCPP/etl/archive/20.37.3.tar.gz" - sha256: "fbdf60c770772cd96d1eb25bdf56e4f45f23bf4029e18ef1f2af1f2056b9ea41" - "20.37.2": - url: "https://github.com/ETLCPP/etl/archive/20.37.2.tar.gz" - sha256: "13bd5d9d1bfbc887e3182895ca0291df0008a1c5770ddd12ef6cd2215c2bc6af" - "20.37.1": - url: "https://github.com/ETLCPP/etl/archive/20.37.1.tar.gz" - sha256: "73c29678e478eca9243c1d0c98e727a2249a7973d1429a847c669bccc65dca88" - "20.37.0": - url: "https://github.com/ETLCPP/etl/archive/20.37.0.tar.gz" - sha256: "94ffb30dc38b9f40566ba7c4ef0c233bca23cfcb4e6c400fcf981729a46413eb" - "20.36.0": - url: "https://github.com/ETLCPP/etl/archive/20.36.0.tar.gz" - sha256: "bcab607d619008c7e3942ecc9cb429e17deb553c81bc5f1fd013fbc1e17f1344" - "20.35.14": - url: "https://github.com/ETLCPP/etl/archive/20.35.14.tar.gz" - sha256: "6af1baf039d38f405f932451615f9bcf227f5767b463f33e17fcbbbc02e4632e" - "20.35.11": - url: "https://github.com/ETLCPP/etl/archive/20.35.11.tar.gz" - sha256: "64a9eed9b9ac8a278349aac8e5888320fda0e090ba24373651767b7a8b8793fc" - "20.35.8": - url: "https://github.com/ETLCPP/etl/archive/20.35.8.tar.gz" - sha256: "7d0a6402b24fc91cf66328b95391a38c52d20f582f42497fb9b0a99d71ab8879" - "20.35.7": - url: "https://github.com/ETLCPP/etl/archive/20.35.7.tar.gz" - sha256: "20127e36c12a33142645dd5ec0a08d12b34ce9b33986847eeaa8c4201e025895" - "20.34.0": - url: "https://github.com/ETLCPP/etl/archive/20.34.0.tar.gz" - sha256: "56e25968f20167a161ee50c3eecda3daa91f696660ba59654c1afd22e502c465" diff --git a/recipes/etl/all/conanfile.py b/recipes/etl/all/conanfile.py index a1737588ee965..52ededc6ecbe6 100644 --- a/recipes/etl/all/conanfile.py +++ b/recipes/etl/all/conanfile.py @@ -1,20 +1,17 @@ from conan import ConanFile -from conan.tools.files import get, copy, save +from conan.tools.files import get, copy from conan.tools.layout import basic_layout import os -import textwrap - required_conan_version = ">=1.50.0" - class EmbeddedTemplateLibraryConan(ConanFile): name = "etl" description = "A C++ template library for embedded applications" license = "MIT" url = "https://github.com/conan-io/conan-center-index" homepage = "https://www.etlcpp.com/" - topics = ("cpp", "embedded", "template", "container", "utility", "framework", "messaging") + topics = ("cpp", "embedded", "template", "container", "utility", "framework", "messaging", "header-only") package_type = "header-library" settings = "os", "arch", "compiler", "build_type" no_copy_source = True @@ -28,36 +25,10 @@ def package_id(self): def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) - def build(self): - pass - def package(self): copy(self, "LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) copy(self, "*.h", dst=os.path.join(self.package_folder, "include"), src=os.path.join(self.source_folder, "include")) - # TODO: to remove in conan v2 once cmake_find_package* generators removed - self._create_cmake_module_alias_targets( - self, - os.path.join(self.package_folder, self._module_file_rel_path), - {"etl": "etl::etl"} - ) - - @staticmethod - def _create_cmake_module_alias_targets(conanfile, module_file, targets): - content = "" - for alias, aliased in targets.items(): - content += textwrap.dedent(f"""\ - if(TARGET {aliased} AND NOT TARGET {alias}) - add_library({alias} INTERFACE IMPORTED) - set_property(TARGET {alias} PROPERTY INTERFACE_LINK_LIBRARIES {aliased}) - endif() - """) - save(conanfile, module_file, content) - - @property - def _module_file_rel_path(self): - return os.path.join("lib", "cmake", f"conan-official-{self.name}-targets.cmake") - def package_info(self): self.cpp_info.set_property("cmake_file_name", "etl") self.cpp_info.set_property("cmake_target_name", "etl::etl") @@ -65,8 +36,3 @@ def package_info(self): self.cpp_info.bindirs = [] self.cpp_info.libdirs = [] - self.cpp_info.builddirs.append(os.path.join("lib", "cmake")) - - # TODO: to remove in conan v2 once cmake_find_package* generators removed - self.cpp_info.build_modules["cmake_find_package"] = [self._module_file_rel_path] - self.cpp_info.build_modules["cmake_find_package_multi"] = [self._module_file_rel_path] diff --git a/recipes/etl/all/test_package/CMakeLists.txt b/recipes/etl/all/test_package/CMakeLists.txt index abf67a0fae7ee..b93512c6b9e61 100644 --- a/recipes/etl/all/test_package/CMakeLists.txt +++ b/recipes/etl/all/test_package/CMakeLists.txt @@ -4,5 +4,5 @@ project(test_package LANGUAGES CXX) find_package(etl REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) -target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) target_link_libraries(${PROJECT_NAME} PRIVATE etl::etl) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) diff --git a/recipes/etl/all/test_v1_package/CMakeLists.txt b/recipes/etl/all/test_v1_package/CMakeLists.txt deleted file mode 100644 index 19dd51b438baa..0000000000000 --- a/recipes/etl/all/test_v1_package/CMakeLists.txt +++ /dev/null @@ -1,11 +0,0 @@ -cmake_minimum_required(VERSION 3.8) -project(test_package CXX) - -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) - -find_package(etl REQUIRED CONFIG) - -add_executable(${PROJECT_NAME} ../test_package/test_package.cpp) -target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) -target_link_libraries(${PROJECT_NAME} etl::etl) diff --git a/recipes/etl/all/test_v1_package/conanfile.py b/recipes/etl/all/test_v1_package/conanfile.py deleted file mode 100644 index 2490acfa82ff8..0000000000000 --- a/recipes/etl/all/test_v1_package/conanfile.py +++ /dev/null @@ -1,18 +0,0 @@ -from conans import ConanFile, CMake -from conan.tools.build import cross_building -import os - - -class TestPackageConan(ConanFile): - settings = "os", "arch", "compiler", "build_type" - generators = "cmake", "cmake_find_package_multi" - - def build(self): - cmake = CMake(self) - cmake.configure() - cmake.build() - - def test(self): - if not cross_building(self): - bin_path = os.path.join("bin", "test_package") - self.run(bin_path, run_environment=True) diff --git a/recipes/etl/config.yml b/recipes/etl/config.yml index 57618035ca09f..084ac6d8aaecd 100644 --- a/recipes/etl/config.yml +++ b/recipes/etl/config.yml @@ -1,33 +1,19 @@ versions: - "20.38.10": - folder: all - "20.38.7": - folder: all - "20.38.6": - folder: all - "20.38.4": - folder: all - "20.38.3": + "20.39.4": folder: all - "20.38.0": + "20.39.3": folder: all - "20.37.3": + "20.38.17": folder: all - "20.37.2": + "20.38.16": folder: all - "20.37.1": + "20.38.15": folder: all - "20.37.0": + "20.38.14": folder: all - "20.36.0": + "20.38.13": folder: all - "20.35.14": + "20.38.11": folder: all - "20.35.11": - folder: all - "20.35.8": - folder: all - "20.35.7": - folder: all - "20.34.0": + "20.38.10": folder: all diff --git a/recipes/eudev/all/conanfile.py b/recipes/eudev/all/conanfile.py index 85b6e2350551c..597e9d9b84092 100644 --- a/recipes/eudev/all/conanfile.py +++ b/recipes/eudev/all/conanfile.py @@ -56,7 +56,7 @@ def layout(self): def requirements(self): self.requires("acl/2.3.1") self.requires("libcap/2.69") - self.requires("libxslt/1.1.34") + self.requires("libxslt/1.1.42") self.requires("linux-headers-generic/6.5.9") if self.options.with_kmod: @@ -73,7 +73,7 @@ def validate(self): def build_requirements(self): self.tool_requires("gperf/3.1") if not self.conf.get("tools.gnu:pkg_config", check_type=str): - self.tool_requires("pkgconf/2.1.0") + self.tool_requires("pkgconf/2.2.0") def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) diff --git a/recipes/exiv2/all/conandata.yml b/recipes/exiv2/all/conandata.yml index 0b36cf903900d..49ba0667271df 100644 --- a/recipes/exiv2/all/conandata.yml +++ b/recipes/exiv2/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.28.3": + url: "https://github.com/Exiv2/exiv2/archive/refs/tags/v0.28.3.tar.gz" + sha256: "1315e17d454bf4da3cc0edb857b1d2c143670f3485b537d0f946d9ed31d87b70" "0.28.2": url: "https://github.com/Exiv2/exiv2/archive/refs/tags/v0.28.2.tar.gz" sha256: "543bead934135f20f438e0b6d8858c55c5fcb7ff80f5d1d55489965f1aad58b9" diff --git a/recipes/exiv2/all/conanfile.py b/recipes/exiv2/all/conanfile.py index e0f3dda5c9ab6..93bf130b53027 100644 --- a/recipes/exiv2/all/conanfile.py +++ b/recipes/exiv2/all/conanfile.py @@ -1,6 +1,6 @@ from conan import ConanFile, conan_version from conan.errors import ConanInvalidConfiguration -from conan.tools.build import check_min_cppstd +from conan.tools.build import check_min_cppstd, check_max_cppstd from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout, CMakeDeps from conan.tools.files import get, copy, rmdir, save, export_conandata_patches, apply_conandata_patches, replace_in_file from conan.tools.microsoft import is_msvc, is_msvc_static_runtime, check_min_vs @@ -17,9 +17,9 @@ class Exiv2Conan(ConanFile): description = "Exiv2 is a C++ library and a command-line utility " \ "to read, write, delete and modify Exif, IPTC, XMP and ICC image metadata." license = "GPL-2.0" - topics = ("image", "exif", "xmp") - homepage = "https://www.exiv2.org" url = "https://github.com/conan-io/conan-center-index" + homepage = "https://www.exiv2.org" + topics = ("image", "exif", "xmp") package_type = "library" settings = "os", "arch", "compiler", "build_type" @@ -76,7 +76,7 @@ def requirements(self): self.requires("libpng/[>=1.6 <2]") self.requires("zlib/[>=1.2.11 <2]") if self.options.with_xmp == "bundled": - self.requires("expat/2.5.0") + self.requires("expat/[>=2.6.2 <3]") if self.options.with_curl: self.requires("libcurl/[>=7.78.0 <9]") if self.options.get_safe("with_brotli"): @@ -88,8 +88,7 @@ def validate(self): if Version(self.version) >= "0.28.0": min_cppstd = 17 - if self.settings.compiler.cppstd: - check_min_cppstd(self, min_cppstd) + check_min_cppstd(self, min_cppstd) check_min_vs(self, 191) compilers_minimum_version = { @@ -97,16 +96,12 @@ def validate(self): "clang": "5", "apple-clang": "10", } - if not is_msvc(self): - minimum_version = compilers_minimum_version.get(str(self.settings.compiler), False) - if minimum_version and Version(self.info.settings.compiler.version) < minimum_version: - raise ConanInvalidConfiguration( - f"{self.ref} requires C++{min_cppstd}, which your compiler does not fully support." - ) - elif conan_version.major == 2: - # FIXME: linter complains, but function is there - # https://docs.conan.io/2.0/reference/tools/build.html?highlight=check_min_cppstd#conan-tools-build-check-max-cppstd - check_max_cppstd = getattr(sys.modules['conan.tools.build'], 'check_max_cppstd') + minimum_version = compilers_minimum_version.get(str(self.settings.compiler), False) + if minimum_version and Version(self.info.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration( + f"{self.ref} requires C++{min_cppstd}, which your compiler does not fully support." + ) + else: # https://github.com/Exiv2/exiv2/tree/v0.27.7#217-building-with-c11-and-other-compilers check_max_cppstd(self, 14) @@ -167,30 +162,6 @@ def package(self): rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) rmdir(self, os.path.join(self.package_folder, "share")) - # TODO: to remove in conan v2 once cmake_find_package_* generators removed - targets = {"exiv2lib": "exiv2::exiv2lib"} - if self.options.with_xmp == "bundled": - targets.update({"exiv2-xmp": "exiv2::exiv2-xmp"}) - self._create_cmake_module_alias_targets( - os.path.join(self.package_folder, self._module_file_rel_path), - targets - ) - - def _create_cmake_module_alias_targets(self, module_file, targets): - content = "" - for alias, aliased in targets.items(): - content += textwrap.dedent(f"""\ - if(TARGET {aliased} AND NOT TARGET {alias}) - add_library({alias} INTERFACE IMPORTED) - set_property(TARGET {alias} PROPERTY INTERFACE_LINK_LIBRARIES {aliased}) - endif() - """) - save(self, module_file, content) - - @property - def _module_file_rel_path(self): - return os.path.join("lib", "cmake", f"conan-official-{self.name}-targets.cmake") - def package_info(self): self.cpp_info.set_property("cmake_file_name", "exiv2") self.cpp_info.set_property("pkg_config_name", "exiv2") @@ -223,10 +194,3 @@ def package_info(self): self.cpp_info.components["exiv2lib"].requires.append("exiv2-xmp") else: self.cpp_info.components["exiv2lib"].requires.append("expat::expat") - - # TODO: to remove in conan v2 once cmake_find_package_* generators removed - self.cpp_info.components["exiv2lib"].build_modules["cmake_find_package"] = [self._module_file_rel_path] - self.cpp_info.components["exiv2lib"].build_modules["cmake_find_package_multi"] = [self._module_file_rel_path] - if self.options.with_xmp == "bundled" and Version(self.version) < "0.28.0": - self.cpp_info.components["exiv2-xmp"].build_modules["cmake_find_package"] = [self._module_file_rel_path] - self.cpp_info.components["exiv2-xmp"].build_modules["cmake_find_package_multi"] = [self._module_file_rel_path] diff --git a/recipes/exiv2/all/test_package/CMakeLists.txt b/recipes/exiv2/all/test_package/CMakeLists.txt index 69bbd22508c9b..47e4eda57e2b4 100644 --- a/recipes/exiv2/all/test_package/CMakeLists.txt +++ b/recipes/exiv2/all/test_package/CMakeLists.txt @@ -1,10 +1,10 @@ cmake_minimum_required(VERSION 3.1) -project(test_package CXX) +project(test_package LANGUAGES CXX) find_package(exiv2 REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) -target_link_libraries(${PROJECT_NAME} exiv2lib) +target_link_libraries(${PROJECT_NAME} PRIVATE exiv2lib) if(${exiv2_VERSION} VERSION_GREATER_EQUAL "0.28.0") target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) diff --git a/recipes/exiv2/all/test_v1_package/CMakeLists.txt b/recipes/exiv2/all/test_v1_package/CMakeLists.txt deleted file mode 100644 index 0d20897301b68..0000000000000 --- a/recipes/exiv2/all/test_v1_package/CMakeLists.txt +++ /dev/null @@ -1,8 +0,0 @@ -cmake_minimum_required(VERSION 3.1) -project(test_package) - -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) - -add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package - ${CMAKE_CURRENT_BINARY_DIR}/test_package) diff --git a/recipes/exiv2/all/test_v1_package/conanfile.py b/recipes/exiv2/all/test_v1_package/conanfile.py deleted file mode 100644 index b6a26067f365d..0000000000000 --- a/recipes/exiv2/all/test_v1_package/conanfile.py +++ /dev/null @@ -1,17 +0,0 @@ -import os - -from conans import ConanFile, CMake, tools - -class TestPackageConan(ConanFile): - settings = "os", "compiler", "build_type", "arch" - generators = "cmake", "cmake_find_package_multi" - - def build(self): - cmake = CMake(self) - cmake.configure() - cmake.build() - - def test(self): - if not tools.cross_building(self): - bin_path = os.path.join("bin", "test_package") - self.run(bin_path, run_environment=True) diff --git a/recipes/exiv2/config.yml b/recipes/exiv2/config.yml index f9244e625c48f..572fad2a57e09 100644 --- a/recipes/exiv2/config.yml +++ b/recipes/exiv2/config.yml @@ -1,4 +1,6 @@ versions: + "0.28.3": + folder: all "0.28.2": folder: all "0.28.1": diff --git a/recipes/expat/all/conandata.yml b/recipes/expat/all/conandata.yml index f010a588a6317..70605fb111359 100644 --- a/recipes/expat/all/conandata.yml +++ b/recipes/expat/all/conandata.yml @@ -1,4 +1,10 @@ sources: + "2.6.4": + url: "https://github.com/libexpat/libexpat/releases/download/R_2_6_4/expat-2.6.4.tar.xz" + sha256: "a695629dae047055b37d50a0ff4776d1d45d0a4c842cf4ccee158441f55ff7ee" + "2.6.3": + url: "https://github.com/libexpat/libexpat/releases/download/R_2_6_3/expat-2.6.3.tar.xz" + sha256: "274db254a6979bde5aad404763a704956940e465843f2a9bd9ed7af22e2c0efc" "2.6.2": url: "https://github.com/libexpat/libexpat/releases/download/R_2_6_2/expat-2.6.2.tar.xz" sha256: "ee14b4c5d8908b1bec37ad937607eab183d4d9806a08adee472c3c3121d27364" diff --git a/recipes/expat/config.yml b/recipes/expat/config.yml index ee86cf4cc73ee..3fbe2e2e68e1d 100644 --- a/recipes/expat/config.yml +++ b/recipes/expat/config.yml @@ -1,4 +1,8 @@ versions: + "2.6.4": + folder: all + "2.6.3": + folder: all "2.6.2": folder: all "2.6.0": diff --git a/recipes/expected-lite/all/conandata.yml b/recipes/expected-lite/all/conandata.yml index d3a6677071af2..bbd60fdda1306 100644 --- a/recipes/expected-lite/all/conandata.yml +++ b/recipes/expected-lite/all/conandata.yml @@ -1,4 +1,10 @@ sources: + "0.8.0": + url: "https://github.com/martinmoene/expected-lite/archive/v0.8.0.tar.gz" + sha256: "27649f30bd9d4fe7b193ab3eb6f78c64d0f585c24c085f340b4722b3d0b5e701" + "0.7.0": + url: "https://github.com/martinmoene/expected-lite/archive/v0.7.0.tar.gz" + sha256: "8e266cd304d405e02a6b4abf881ab7d8e203ca719c513711cf89a3b4e5d97918" "0.6.3": url: "https://github.com/martinmoene/expected-lite/archive/v0.6.3.tar.gz" sha256: "b2f90d5f03f6423ec67cc3c06fd0c4e813ec10c4313062b875b37d17593b57b4" diff --git a/recipes/expected-lite/all/conanfile.py b/recipes/expected-lite/all/conanfile.py index 591dbe00d1ead..d964e10b21ad2 100644 --- a/recipes/expected-lite/all/conanfile.py +++ b/recipes/expected-lite/all/conanfile.py @@ -9,11 +9,11 @@ class ExpectedLiteConan(ConanFile): name = "expected-lite" - url = "https://github.com/conan-io/conan-center-index" - homepage = "https://github.com/martinmoene/expected-lite" description = "expected lite - Expected objects in C++11 and later in a single-file header-only library" - topics = ("cpp11", "cpp14", "cpp17", "expected", "expected-implementations") license = "BSL-1.0" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/martinmoene/expected-lite" + topics = ("cpp11", "cpp14", "cpp17", "expected", "expected-implementations", "header-only") package_type = "header-library" settings = "os", "arch", "compiler", "build_type" no_copy_source = True diff --git a/recipes/expected-lite/all/test_package/conanfile.py b/recipes/expected-lite/all/test_package/conanfile.py index d120a992c06a6..8a5bb47f50c4c 100644 --- a/recipes/expected-lite/all/test_package/conanfile.py +++ b/recipes/expected-lite/all/test_package/conanfile.py @@ -7,6 +7,7 @@ class TestPackageConan(ConanFile): settings = "os", "arch", "compiler", "build_type" generators = "CMakeToolchain", "CMakeDeps", "VirtualRunEnv" + test_type = "explicit" def requirements(self): self.requires(self.tested_reference_str) diff --git a/recipes/expected-lite/config.yml b/recipes/expected-lite/config.yml index 9fcad808e37e7..1cfd509cacf71 100644 --- a/recipes/expected-lite/config.yml +++ b/recipes/expected-lite/config.yml @@ -1,4 +1,8 @@ versions: + "0.8.0": + folder: all + "0.7.0": + folder: all "0.6.3": folder: all "0.6.2": diff --git a/recipes/exprtk/all/test_package/test_package.cpp b/recipes/exprtk/all/test_package/test_package.cpp index 8ae4a2288e7ce..f668e5bbe9c03 100755 --- a/recipes/exprtk/all/test_package/test_package.cpp +++ b/recipes/exprtk/all/test_package/test_package.cpp @@ -1,78 +1,9 @@ -/* - ************************************************************** - * C++ Mathematical Expression Toolkit Library * - * * - * Exprtk Test Package * - * Author: Arash Partow (1999-2022) * - * URL: https://www.partow.net/programming/exprtk/index.html * - * * - * Copyright notice: * - * Free use of the Mathematical Expression Toolkit Library is * - * permitted under the guidelines and in accordance with the * - * most current version of the MIT License. * - * http://www.opensource.org/licenses/MIT * - * * - ************************************************************** -*/ - - -#include -#include - #include - - -template -void test_function() -{ - typedef exprtk::symbol_table symbol_table_t; - typedef exprtk::expression expression_t; - typedef exprtk::parser parser_t; - typedef exprtk::parser_error::type error_t; - - symbol_table_t symbol_table; - expression_t expression; - parser_t parser; - - T x = 1; - T y = 2; - - const std::string expression_string = "x * y + 3"; - - symbol_table.add_variable("x",x); - symbol_table.add_variable("y",y); - - expression.register_symbol_table(symbol_table); - - if (!parser.compile(expression_string,expression)) - { - printf("Error: %s\tExpression: %s\n", - parser.error().c_str(), - expression_string.c_str()); - - for (std::size_t i = 0; i < parser.error_count(); ++i) - { - const error_t error = parser.get_error(i); - - printf("Error: %02d Position: %02d " - "Type: [%s] " - "Message: %s " - "Expression: %s\n", - static_cast(i), - static_cast(error.token.position), - exprtk::parser_error::to_str(error.mode).c_str(), - error.diagnostic.c_str(), - expression_string.c_str()); - } - - return; - } - - expression.value(); -} +#include int main() { - test_function(); + std::cout << exprtk::information::library << std::endl; + std::cout << "Test package successful\n"; return 0; } diff --git a/recipes/exprtk/all/test_v1_package/CMakeLists.txt b/recipes/exprtk/all/test_v1_package/CMakeLists.txt deleted file mode 100644 index 9d54a092e0a67..0000000000000 --- a/recipes/exprtk/all/test_v1_package/CMakeLists.txt +++ /dev/null @@ -1,8 +0,0 @@ -cmake_minimum_required(VERSION 3.8) -project(test_package LANGUAGES CXX) - -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) - -add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ - ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/exprtk/all/test_v1_package/conanfile.py b/recipes/exprtk/all/test_v1_package/conanfile.py deleted file mode 100644 index 5a05af3c2dfd2..0000000000000 --- a/recipes/exprtk/all/test_v1_package/conanfile.py +++ /dev/null @@ -1,18 +0,0 @@ -from conans import ConanFile, CMake -from conan.tools.build import cross_building -import os - - -class TestPackageV1Conan(ConanFile): - settings = "os", "arch", "compiler", "build_type" - generators = "cmake", "cmake_find_package_multi" - - def build(self): - cmake = CMake(self) - cmake.configure() - cmake.build() - - def test(self): - if not cross_building(self): - bin_path = os.path.join("bin", "test_package") - self.run(bin_path, run_environment=True) diff --git a/recipes/extra-cmake-modules/all/conandata.yml b/recipes/extra-cmake-modules/all/conandata.yml index 1879a975409f5..f556f71e55d06 100644 --- a/recipes/extra-cmake-modules/all/conandata.yml +++ b/recipes/extra-cmake-modules/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "6.2.0": + url: "https://download.kde.org/stable/frameworks/6.2/extra-cmake-modules-6.2.0.tar.xz" + sha256: "6374bfa0dded8be265c702acd5de11eecd2851c625b93e1c87d8d0f5f1a8ebe1" "5.113.0": url: "https://download.kde.org/stable/frameworks/5.113/extra-cmake-modules-5.113.0.tar.xz" sha256: "265e5440eebeca07351a469e617a4bf35748927bd907b00ace9c018392bb3bc4" diff --git a/recipes/extra-cmake-modules/config.yml b/recipes/extra-cmake-modules/config.yml index 789c28809f9ae..101fb016a65c8 100644 --- a/recipes/extra-cmake-modules/config.yml +++ b/recipes/extra-cmake-modules/config.yml @@ -1,4 +1,6 @@ versions: + "6.2.0": + folder: "all" "5.113.0": folder: "all" "5.111.0": diff --git a/recipes/fakeit/all/conandata.yml b/recipes/fakeit/all/conandata.yml index 9b66729378da9..e412e4270b67e 100644 --- a/recipes/fakeit/all/conandata.yml +++ b/recipes/fakeit/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.4.1": + url: "https://github.com/eranpeer/FakeIt/archive/2.4.1.tar.gz" + sha256: "f5234a36d42363cb7ccd2cf99c8a754c832d9092035d984ad40aafa5371d0e95" "2.4.0": url: "https://github.com/eranpeer/FakeIt/archive/2.4.0.tar.gz" sha256: "eb79459ad6a97a5c985e3301b0d44538bdce2ba26115afe040f3874688edefb5" diff --git a/recipes/fakeit/config.yml b/recipes/fakeit/config.yml index 2d2179fc9b476..0755f94e23640 100644 --- a/recipes/fakeit/config.yml +++ b/recipes/fakeit/config.yml @@ -1,4 +1,6 @@ versions: + "2.4.1": + folder: all "2.4.0": folder: all "2.3.2": diff --git a/recipes/faker-cxx/all/conandata.yml b/recipes/faker-cxx/all/conandata.yml new file mode 100644 index 0000000000000..33704b20363da --- /dev/null +++ b/recipes/faker-cxx/all/conandata.yml @@ -0,0 +1,7 @@ +sources: + "3.0.0": + url: "https://github.com/cieslarmichal/faker-cxx/archive/refs/tags/v3.0.0.tar.gz" + sha256: "63d6846376593e05da690136cabe8e7bf42ddcdd4edad3ae9b48696f86d80468" + "2.0.0": + url: "https://github.com/cieslarmichal/faker-cxx/archive/refs/tags/v2.0.0.tar.gz" + sha256: "8a7f5441f4453af868444675878a2d9a74918c1595caa65d537d3ea327e46a49" diff --git a/recipes/faker-cxx/all/conanfile.py b/recipes/faker-cxx/all/conanfile.py new file mode 100644 index 0000000000000..326381b2e9f9c --- /dev/null +++ b/recipes/faker-cxx/all/conanfile.py @@ -0,0 +1,103 @@ +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.files import get, copy, rmdir +from conan.tools.build import check_min_cppstd +from conan.tools.scm import Version +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +import os + +required_conan_version = ">=1.53.0" + +class FakerCXXConan(ConanFile): + name = "faker-cxx" + description = "C++ Faker library based on faker-js/faker. " + license = "MIT" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/cieslarmichal/faker-cxx" + topics = ("faker", "fake",) + package_type = "library" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + "with_std_format": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + "with_std_format": False, + } + + @property + def _min_cppstd(self): + return 20 + + @property + def _compilers_minimum_version(self): + return { + "gcc": "12", + "clang": "16", + "apple-clang": "16", + "Visual Studio": "17", + "msvc": "193", + } + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + + def requirements(self): + if not self.options.with_std_format: + self.requires("fmt/10.2.1") + + def layout(self): + cmake_layout(self, src_folder="src") + + def validate(self): + if self.settings.compiler.cppstd: + check_min_cppstd(self, self._min_cppstd) + minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) + if minimum_version and Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration( + f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." + ) + if self.settings.os == "Windows" and self.options.shared: + # https://github.com/cieslarmichal/faker-cxx/issues/753 + raise ConanInvalidConfiguration(f"{self.ref} is not prepared to generated shared library on Windows.") + + def build_requirements(self): + self.tool_requires("cmake/[>=3.22 <4]") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + tc.variables["USE_SYSTEM_DEPENDENCIES"] = True + tc.variables["BUILD_TESTING"] = False + tc.variables["WARNINGS_AS_ERRORS"] = False + tc.variables["WITH_STD_FORMAT"] = self.options.with_std_format + tc.generate() + deps = CMakeDeps(self) + deps.generate() + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def package(self): + copy(self, pattern="LICENSE*", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) + cmake = CMake(self) + cmake.install() + rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) + + def package_info(self): + self.cpp_info.libs = ["faker-cxx"] + + self.cpp_info.set_property("cmake_file_name", "faker-cxx") + self.cpp_info.set_property("cmake_target_name", "faker-cxx::faker-cxx") diff --git a/recipes/faker-cxx/all/test_package/CMakeLists.txt b/recipes/faker-cxx/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..2485457ffc81e --- /dev/null +++ b/recipes/faker-cxx/all/test_package/CMakeLists.txt @@ -0,0 +1,11 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) + +find_package(faker-cxx REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE faker-cxx::faker-cxx) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_20) +if(faker-cxx_VERSION VERSION_LESS "3.0.0") + target_compile_definitions(${PROJECT_NAME} PRIVATE FAKER_CXX_2) +endif() diff --git a/recipes/faker-cxx/all/test_package/conanfile.py b/recipes/faker-cxx/all/test_package/conanfile.py new file mode 100644 index 0000000000000..ef5d7042163ec --- /dev/null +++ b/recipes/faker-cxx/all/test_package/conanfile.py @@ -0,0 +1,26 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/faker-cxx/all/test_package/test_package.cpp b/recipes/faker-cxx/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..7251d095e5300 --- /dev/null +++ b/recipes/faker-cxx/all/test_package/test_package.cpp @@ -0,0 +1,23 @@ +#include +#ifdef FAKER_CXX_2 + #include "faker-cxx/Internet.h" + #include "faker-cxx/String.h" + #include "faker-cxx/Date.h" +#else + #include "faker-cxx/internet.h" + #include "faker-cxx/string.h" + #include "faker-cxx/date.h" +#endif + +int main() +{ + const auto id = faker::string::uuid(); + const auto email = faker::internet::email(); + const auto password = faker::internet::password(); + const auto createdAt = faker::date::pastDate(5, faker::date::DateFormat::ISO); + const auto updatedAt = faker::date::recentDate(2, faker::date::DateFormat::ISO); + + std::cout << "id: " << id << ", email: " << email << ", password: " << password << ", createdAt: " << createdAt << ", updatedAt: " << updatedAt << "\n"; + + return 0; +} diff --git a/recipes/faker-cxx/config.yml b/recipes/faker-cxx/config.yml new file mode 100644 index 0000000000000..70df618778342 --- /dev/null +++ b/recipes/faker-cxx/config.yml @@ -0,0 +1,5 @@ +versions: + "3.0.0": + folder: all + "2.0.0": + folder: all diff --git a/recipes/fast-cdr/all/conandata.yml b/recipes/fast-cdr/all/conandata.yml index f1fb4fa51912e..a1647a8bd5d43 100644 --- a/recipes/fast-cdr/all/conandata.yml +++ b/recipes/fast-cdr/all/conandata.yml @@ -1,4 +1,10 @@ sources: + "2.2.5": + url: "https://github.com/eProsima/Fast-CDR/archive/v2.2.5.tar.gz" + sha256: "b01fd34135e9be5183bb69f31fa5b74c53ba6eca30a5b21de0120d21ece22a51" + "2.2.3": + url: "https://github.com/eProsima/Fast-CDR/archive/v2.2.3.tar.gz" + sha256: "2501ef0930727d3b3ac1819672a6df8631a58fbcf7f005947046c2de46e8da69" "2.2.0": url: "https://github.com/eProsima/Fast-CDR/archive/v2.2.0.tar.gz" sha256: "8a75ee3aed59f495e95208050920d2c2146df92f073809505a3bd29011c21f20" diff --git a/recipes/fast-cdr/config.yml b/recipes/fast-cdr/config.yml index c6c63a5158e6b..5e80a3438b5ca 100644 --- a/recipes/fast-cdr/config.yml +++ b/recipes/fast-cdr/config.yml @@ -1,4 +1,8 @@ versions: + "2.2.5": + folder: all + "2.2.3": + folder: all "2.2.0": folder: all "2.1.0": diff --git a/recipes/fast-dds/all/conandata.yml b/recipes/fast-dds/all/conandata.yml index 02a8d037bcc07..f53bf9511da8b 100644 --- a/recipes/fast-dds/all/conandata.yml +++ b/recipes/fast-dds/all/conandata.yml @@ -1,4 +1,10 @@ sources: + "2.14.3": + url: "https://github.com/eProsima/Fast-DDS/archive/refs/tags/v2.14.3.tar.gz" + sha256: "292e4170e4689d878eb5ddd38661134a704a1541402a4f564353190e4aadd23d" + "2.14.0": + url: "https://github.com/eProsima/Fast-DDS/archive/refs/tags/v2.14.0.tar.gz" + sha256: "a6f12bce6b77f265cab81abde5dc2e08133be9a55bc29e573c84571d44eddbc2" "2.13.3": url: "https://github.com/eProsima/Fast-DDS/archive/refs/tags/v2.13.3.tar.gz" sha256: "0f33596a8a48b5da4c43a964f2dc70127c6449defd5698944dddbdfb16d2b268" @@ -12,6 +18,17 @@ sources: url: "https://github.com/eProsima/Fast-DDS/archive/refs/tags/v2.3.4.tar.gz" sha256: "b1b2322de0ca55a16495666e3fbda8aca32b888bbfaecda29f2ffc4b072ef7ac" patches: + "2.14.3": + - patch_file: "patches/2.13.3-0001-fix-find-asio-and-tinyxml2.patch" + patch_type: "conan" + patch_description: "Fixup find asio and tinyxml2" + "2.14.0": + - patch_file: "patches/2.13.3-0001-fix-find-asio-and-tinyxml2.patch" + patch_type: "conan" + patch_description: "Fixup find asio and tinyxml2" + - patch_file: "patches/2.13.3-0002-add-gettid-macro-for-glibc-compat.patch" + patch_type: "conan" + patch_description: "Add gettid macro for glibc compat. See: eProsima/Fast-DDS#4565" "2.13.3": - patch_file: "patches/2.13.3-0001-fix-find-asio-and-tinyxml2.patch" patch_type: "conan" diff --git a/recipes/fast-dds/all/conanfile.py b/recipes/fast-dds/all/conanfile.py index 624cba722a1e1..bdeaac9382380 100644 --- a/recipes/fast-dds/all/conanfile.py +++ b/recipes/fast-dds/all/conanfile.py @@ -49,11 +49,18 @@ def _min_cppstd(self): @property def _compilers_minimum_version(self): - return { - "gcc": "10", - "clang": "3.9", - "apple-clang": "8", - } + if Version(self.version) < "2.11.0": + return { + "gcc": "8", + "clang": "12", + "apple-clang": "12", + } + else: + return { + "gcc": "9", + "clang": "15", + "apple-clang": "15", + } def export_sources(self): export_conandata_patches(self) @@ -83,6 +90,7 @@ def requirements(self): self.requires("openssl/[>=1.1 <4]") def validate(self): + # fast-dds requires C++11 if self.settings.compiler.cppstd: check_min_cppstd(self, self._min_cppstd) check_min_vs(self, "192") @@ -92,10 +100,11 @@ def validate(self): raise ConanInvalidConfiguration( f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." ) + if self.options.shared and is_msvc(self) and "MT" in msvc_runtime_flag(self): # This combination leads to an fast-dds error when linking # linking dynamic '*.dll' and static MT runtime - raise ConanInvalidConfiguration("Mixing a dll {} library with a static runtime is a bad idea".format(self.name)) + raise ConanInvalidConfiguration("Mixing a dll {} library with a static runtime is not supported".format(self.name)) def build_requirements(self): if Version(self.version) >= "2.7.0": diff --git a/recipes/fast-dds/config.yml b/recipes/fast-dds/config.yml index 7b157442d779f..101b2295a806a 100644 --- a/recipes/fast-dds/config.yml +++ b/recipes/fast-dds/config.yml @@ -1,4 +1,8 @@ versions: + "2.14.3": + folder: all + "2.14.0": + folder: all "2.13.3": folder: all "2.11.2": diff --git a/recipes/fast_double_parser/all/conandata.yml b/recipes/fast_double_parser/all/conandata.yml index e6359076757f6..b8e8bab6d1227 100644 --- a/recipes/fast_double_parser/all/conandata.yml +++ b/recipes/fast_double_parser/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.8.0": + url: "https://github.com/lemire/fast_double_parser/archive/v0.8.0.tar.gz" + sha256: "9ad74e059cc7c3e53a3057ca97a74c88ae2a6a7d36ce470193557cbd05ee8f92" "0.7.0": url: "https://github.com/lemire/fast_double_parser/archive/v0.7.0.tar.gz" sha256: "eb80a1d9c406bbe8cb22fffd3c007651f716abd03225009302d8aba8e9c4df77" diff --git a/recipes/fast_double_parser/all/conanfile.py b/recipes/fast_double_parser/all/conanfile.py index 872d82f578707..824ad38a512bb 100644 --- a/recipes/fast_double_parser/all/conanfile.py +++ b/recipes/fast_double_parser/all/conanfile.py @@ -10,12 +10,12 @@ class FastDoubleParserConan(ConanFile): name = "fast_double_parser" description = "Fast function to parse strings into double (binary64) floating-point values, enforces the RFC 7159 (JSON standard) grammar: 4x faster than strtod" - topics = ("numerical", "header-only") + license = ("Apache-2.0", "BSL-1.0") url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/lemire/fast_double_parser" - license = ("Apache-2.0", "BSL-1.0") + topics = ("numerical", "header-only") package_type = "header-library" - settings = "os", "compiler", "build_type", "arch" + settings = "os", "arch", "compiler", "build_type" no_copy_source = True def layout(self): diff --git a/recipes/fast_double_parser/all/test_package/CMakeLists.txt b/recipes/fast_double_parser/all/test_package/CMakeLists.txt index 00ff6376bfebe..0da8cca9a71e9 100644 --- a/recipes/fast_double_parser/all/test_package/CMakeLists.txt +++ b/recipes/fast_double_parser/all/test_package/CMakeLists.txt @@ -4,5 +4,5 @@ project(test_package LANGUAGES CXX) find_package(fast_double_parser REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) -target_link_libraries(${PROJECT_NAME} fast_double_parser::fast_double_parser) +target_link_libraries(${PROJECT_NAME} PRIVATE fast_double_parser::fast_double_parser) target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) diff --git a/recipes/fast_double_parser/config.yml b/recipes/fast_double_parser/config.yml index d61439bae1bc3..4dec0affe6753 100644 --- a/recipes/fast_double_parser/config.yml +++ b/recipes/fast_double_parser/config.yml @@ -1,4 +1,6 @@ versions: + "0.8.0": + folder: all "0.7.0": folder: all "0.6.0": diff --git a/recipes/fast_float/all/conandata.yml b/recipes/fast_float/all/conandata.yml index a35ee1375a199..a71f0d864046f 100644 --- a/recipes/fast_float/all/conandata.yml +++ b/recipes/fast_float/all/conandata.yml @@ -1,4 +1,13 @@ sources: + "6.1.5": + url: "https://github.com/fastfloat/fast_float/archive/v6.1.5.tar.gz" + sha256: "597126ff5edc3ee59d502c210ded229401a30dafecb96a513135e9719fcad55f" + "6.1.4": + url: "https://github.com/fastfloat/fast_float/archive/v6.1.4.tar.gz" + sha256: "12cb6d250824160ca16bcb9d51f0ca7693d0d10cb444f34f1093bc02acfce704" + "6.1.3": + url: "https://github.com/fastfloat/fast_float/archive/v6.1.3.tar.gz" + sha256: "7dd99cc2ff44e07dc2a42bed0c6b8c4a8ee4e3b1c330f77073b6cfdb48724c8e" "6.1.1": url: "https://github.com/fastfloat/fast_float/archive/v6.1.1.tar.gz" sha256: "10159a4a58ba95fe9389c3c97fe7de9a543622aa0dcc12dd9356d755e9a94cb4" diff --git a/recipes/fast_float/all/conanfile.py b/recipes/fast_float/all/conanfile.py index ec98c563d0552..70247daa50c98 100644 --- a/recipes/fast_float/all/conanfile.py +++ b/recipes/fast_float/all/conanfile.py @@ -11,9 +11,9 @@ class FastFloatConan(ConanFile): description = "Fast and exact implementation of the C++ from_chars " \ "functions for float and double types." license = ("Apache-2.0", "MIT", "BSL-1.0") - topics = ("conversion", "from_chars", "header-only") url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/fastfloat/fast_float" + topics = ("conversion", "from_chars", "header-only") package_type = "header-library" settings = "os", "arch", "compiler", "build_type" no_copy_source = True @@ -50,3 +50,5 @@ def package_info(self): self.cpp_info.components["fastfloat"].names["cmake_find_package"] = "fast_float" self.cpp_info.components["fastfloat"].names["cmake_find_package_multi"] = "fast_float" self.cpp_info.components["fastfloat"].set_property("cmake_target_name", "FastFloat::fast_float") + self.cpp_info.components["fastfloat"].bindirs = [] + self.cpp_info.components["fastfloat"].libdirs = [] diff --git a/recipes/fast_float/all/test_package/conanfile.py b/recipes/fast_float/all/test_package/conanfile.py index d120a992c06a6..8a5bb47f50c4c 100644 --- a/recipes/fast_float/all/test_package/conanfile.py +++ b/recipes/fast_float/all/test_package/conanfile.py @@ -7,6 +7,7 @@ class TestPackageConan(ConanFile): settings = "os", "arch", "compiler", "build_type" generators = "CMakeToolchain", "CMakeDeps", "VirtualRunEnv" + test_type = "explicit" def requirements(self): self.requires(self.tested_reference_str) diff --git a/recipes/fast_float/config.yml b/recipes/fast_float/config.yml index dbe55c83d4f49..58f7867f85a24 100644 --- a/recipes/fast_float/config.yml +++ b/recipes/fast_float/config.yml @@ -1,4 +1,10 @@ versions: + "6.1.5": + folder: all + "6.1.4": + folder: all + "6.1.3": + folder: all "6.1.1": folder: all "6.1.0": diff --git a/recipes/fast_io/all/conandata.yml b/recipes/fast_io/all/conandata.yml index a32bf70cd25f3..849d1ed038071 100644 --- a/recipes/fast_io/all/conandata.yml +++ b/recipes/fast_io/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "cci.20240729": + url: "https://github.com/cppfastio/fast_io/archive/44617e9368b64047fabd00cd98b037c1c2fc7fb2.tar.gz" + sha256: "077692f72f2a7e3fed44fa5b37613d058657738c2592addfcb6559cf1ae30716" "cci.20240219": url: "https://github.com/cppfastio/fast_io/archive/316afccde333721b059a761b25217084e84a9ca0.tar.gz" sha256: "9feab7802957c8069b2a112f97bfb885d503ff5d7f433197f47636f40a20188a" diff --git a/recipes/fast_io/config.yml b/recipes/fast_io/config.yml index 957c6f90fa002..7559ae4709057 100644 --- a/recipes/fast_io/config.yml +++ b/recipes/fast_io/config.yml @@ -1,3 +1,5 @@ versions: + "cci.20240729": + folder: all "cci.20240219": folder: all diff --git a/recipes/fcl/all/conanfile.py b/recipes/fcl/all/conanfile.py index 7e41afda3be3f..2fd6a5fe45165 100644 --- a/recipes/fcl/all/conanfile.py +++ b/recipes/fcl/all/conanfile.py @@ -47,10 +47,13 @@ def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - self.requires("eigen/3.4.0") - self.requires("libccd/2.1") + # Used in fcl/common/types.h public header + self.requires("eigen/3.4.0", transitive_headers=True) + # Used in fcl/narrowphase/detail/convexity_based_algorithm/support.h + self.requires("libccd/2.1", transitive_headers=True) if self.options.with_octomap: - self.requires("octomap/1.9.7") + # Used in fcl/geometry/octree/octree.h + self.requires("octomap/1.9.7", transitive_headers=True) def validate(self): if self.settings.compiler.get_safe("cppstd"): @@ -63,25 +66,25 @@ def source(self): def generate(self): tc = CMakeToolchain(self) - tc.variables["FCL_ENABLE_PROFILING"] = False - tc.variables["FCL_TREAT_WARNINGS_AS_ERRORS"] = False - tc.variables["FCL_HIDE_ALL_SYMBOLS"] = False - tc.variables["FCL_STATIC_LIBRARY"] = not self.options.shared - tc.variables["FCL_USE_X64_SSE"] = False # Let consumer decide to add relevant compile options, fcl doesn't have simd intrinsics - tc.variables["FCL_USE_HOST_NATIVE_ARCH"] = False - tc.variables["FCL_USE_SSE"] = False - tc.variables["FCL_COVERALLS"] = False - tc.variables["FCL_COVERALLS_UPLOAD"] = False - tc.variables["FCL_WITH_OCTOMAP"] = self.options.with_octomap + tc.cache_variables["FCL_ENABLE_PROFILING"] = False + tc.cache_variables["FCL_TREAT_WARNINGS_AS_ERRORS"] = False + tc.cache_variables["FCL_HIDE_ALL_SYMBOLS"] = False + tc.cache_variables["FCL_STATIC_LIBRARY"] = not self.options.shared + tc.cache_variables["FCL_USE_X64_SSE"] = False # Let consumer decide to add relevant compile options, fcl doesn't have simd intrinsics + tc.cache_variables["FCL_USE_HOST_NATIVE_ARCH"] = False + tc.cache_variables["FCL_USE_SSE"] = False + tc.cache_variables["FCL_COVERALLS"] = False + tc.cache_variables["FCL_COVERALLS_UPLOAD"] = False + tc.cache_variables["FCL_WITH_OCTOMAP"] = self.options.with_octomap if self.options.with_octomap: - octomap_version_str = self.dependencies["octomap"].ref.version - tc.variables["OCTOMAP_VERSION"] = octomap_version_str + octomap_version_str = str(self.dependencies["octomap"].ref.version) + tc.cache_variables["OCTOMAP_VERSION"] = octomap_version_str octomap_version = Version(octomap_version_str) - tc.variables["OCTOMAP_MAJOR_VERSION"] = octomap_version.major - tc.variables["OCTOMAP_MINOR_VERSION"] = octomap_version.minor - tc.variables["OCTOMAP_PATCH_VERSION"] = octomap_version.patch - tc.variables["BUILD_TESTING"] = False - tc.variables["FCL_NO_DEFAULT_RPATH"] = False + tc.cache_variables["OCTOMAP_MAJOR_VERSION"] = str(octomap_version.major) + tc.cache_variables["OCTOMAP_MINOR_VERSION"] = str(octomap_version.minor) + tc.cache_variables["OCTOMAP_PATCH_VERSION"] = str(octomap_version.patch) + tc.cache_variables["BUILD_TESTING"] = False + tc.cache_variables["FCL_NO_DEFAULT_RPATH"] = False tc.generate() cd = CMakeDeps(self) diff --git a/recipes/fcl/all/test_package/test_package.cpp b/recipes/fcl/all/test_package/test_package.cpp index 0f0651d6aa60c..7142e516a4b32 100644 --- a/recipes/fcl/all/test_package/test_package.cpp +++ b/recipes/fcl/all/test_package/test_package.cpp @@ -1,78 +1,15 @@ -/* -From test_broadphase_dynamic_AABB_tree.cpp test in FCL test directory -*/ - -#include "fcl/common/types.h" -#include "fcl/geometry/shape/sphere.h" -#include "fcl/broadphase/broadphase_dynamic_AABB_tree.h" +#include #include -#include +#include int main() { - auto sphere0 = std::make_shared(0.1); - auto sphere1 = std::make_shared(0.2); - fcl::CollisionObjectd object0(sphere0); - fcl::CollisionObjectd object1(sphere1); - const fcl::Vector3d position0(0.1, 0.2, 0.3); - const fcl::Vector3d position1(0.11, 0.21, 0.31); - - // We will use `objects` to check the order of the two collision objects in - // our callback function. - // - // We use std::vector that contains *pointers* to CollisionObjectd, - // instead of std::vector that contains CollisionObjectd's. - // Previously we used std::vector, and it failed the - // Eigen alignment assertion on Win32. We also tried, without success, the - // custom allocator: - // std::vector>, - // but some platforms failed to build. - std::vector objects = {&object0, &object1}; - std::vector positions = {&position0, &position1}; - - fcl::DynamicAABBTreeCollisionManager dynamic_tree; - for (int i = 0; i < static_cast(objects.size()); ++i) { - objects[i]->setTranslation(*positions[i]); - objects[i]->computeAABB(); - dynamic_tree.registerObject(objects[i]); - } - - // Pack the data for callback function. - struct CallBackData { - bool expect_object0_then_object1; - std::vector* objects; - } data; - data.expect_object0_then_object1 = false; - data.objects = &objects; - - // This callback function tests the order of the two collision objects from - // the dynamic tree against the `data`. We assume that the first two - // parameters are always objects[0] and objects[1] in two possible orders, - // so we can safely ignore the second parameter. We do not use the last - // double& parameter, which specifies the distance beyond which the - // pair of objects will be skipped. - auto distance_callback = [](fcl::CollisionObjectd* a, fcl::CollisionObjectd*, - void* callback_data, double&) -> bool { - // Unpack the data. - auto data = static_cast(callback_data); - const std::vector& objects = *(data->objects); - const bool object0_first = a == objects[0]; - // EXPECT_EQ(data->expect_object0_then_object1, object0_first); - // TODO(DamrongGuoy): Remove the statement below when we solve the - // repeatability problem as mentioned in: - // https://github.com/flexible-collision-library/fcl/issues/368 - // Expect to switch the order next time. - data->expect_object0_then_object1 = !data->expect_object0_then_object1; - // Return true to stop the tree traversal. - return true; - }; - // We repeat update() and distance() many times. Each time, in the - // callback function, we check the order of the two objects. - for (int count = 0; count < 8; ++count) { - dynamic_tree.update(); - dynamic_tree.distance(&data, distance_callback); - } - - return 0; + using namespace fcl; + std::shared_ptr> box_geometry_1(new Box()); + std::shared_ptr> box_geometry_2(new Box()); + CollisionObject box_object_1(box_geometry_1); + CollisionObject box_object_2(box_geometry_2); + DistanceRequest request; + DistanceResult result; + std::cout << "Distance: " << distance(&box_object_1, &box_object_2, request, result) << std::endl; } diff --git a/recipes/ffmpeg/all/conandata.yml b/recipes/ffmpeg/all/conandata.yml index b51138c1bc00b..0c31b9c82f58e 100644 --- a/recipes/ffmpeg/all/conandata.yml +++ b/recipes/ffmpeg/all/conandata.yml @@ -1,40 +1,25 @@ sources: + "7.0.1": + url: "https://ffmpeg.org//releases/ffmpeg-7.0.1.tar.bz2" + sha256: "5e77e84b6434d656106fafe3bceccc77176449014f3eba24d33db3fbd0939dc9" + "6.1.1": + url: "http://ffmpeg.org/releases/ffmpeg-6.1.1.tar.bz2" + sha256: "5e3133939a61ef64ac9b47ffd29a5ea6e337a4023ef0ad972094b4da844e3a20" "6.1": url: "http://ffmpeg.org/releases/ffmpeg-6.1.tar.bz2" sha256: "eb7da3de7dd3ce48a9946ab447a7346bd11a3a85e6efb8f2c2ce637e7f547611" "6.0.1": url: "http://ffmpeg.org/releases/ffmpeg-6.0.1.tar.bz2" sha256: "2c6e294569d1ba8e99cbf1acbe49e060a23454228a540a0f45d679d72ec69a06" - "6.0": - url: "https://ffmpeg.org/releases/ffmpeg-6.0.tar.bz2" - sha256: "47d062731c9f66a78380e35a19aac77cebceccd1c7cc309b9c82343ffc430c3d" "5.1.3": url: "https://ffmpeg.org/releases/ffmpeg-5.1.3.tar.bz2" sha256: "5d5bef6a11f0c500588f9870ec965a30acc0d54d8b1e535da6554a32902d236d" - "5.1": - url: "https://ffmpeg.org/releases/ffmpeg-5.1.tar.bz2" - sha256: "32b56fb01ce90d452958ae25e91c9564abf49ed5453c127bec23c63e530aa8fa" "5.0.3": url: "https://ffmpeg.org/releases/ffmpeg-5.0.3.tar.bz2" sha256: "664e8fa8ac4cc5dce03277f022798461998d9bb8d96b9e1859b24e74511229fd" - "5.0": - url: "https://ffmpeg.org/releases/ffmpeg-5.0.tar.bz2" - sha256: "c0130b8db2c763430fd1c6905288d61bc44ee0548ad5fcd2dfd650b88432bed9" "4.4.4": url: "https://ffmpeg.org/releases/ffmpeg-4.4.4.tar.bz2" sha256: "47b1fbf70a2c090d9c0fae5910da11c6406ca92408bb69d8c935cd46c622c7ce" - "4.4.3": - url: "https://ffmpeg.org/releases/ffmpeg-4.4.3.tar.bz2" - sha256: "33b8c2dbcd530fe1db5710415345609b4ca227bd0da1e3a9332dbb0f11fd273a" - "4.4": - url: "https://ffmpeg.org/releases/ffmpeg-4.4.tar.bz2" - sha256: "42093549751b582cf0f338a21a3664f52e0a9fbe0d238d3c992005e493607d0e" - "4.3.2": - url: "https://ffmpeg.org/releases/ffmpeg-4.3.2.tar.bz2" - sha256: "ab3a6d6a70358ba0a5f67f37f91f6656b7302b02e98e5b8c846c16763c99913a" - "4.2.1": - url: "https://ffmpeg.org/releases/ffmpeg-4.2.1.tar.bz2" - sha256: "682a9fa3f6864d7f0dbf224f86b129e337bc60286e0d00dffcd710998d521624" patches: "5.1.3": - patch_file: "patches/5.1-0001-fix-libsvtav1-compressed_ten_bit_format.patch" @@ -53,55 +38,25 @@ patches: patch_description: "Compatibility with vulkan >= 1.3.239" patch_type: "portability" patch_source: "https://git.ffmpeg.org/gitweb/ffmpeg.git/commit/eb0455d64690eed0068e5cb202f72ecdf899837c" - "5.1": - - patch_file: "patches/5.1-0001-fix-libsvtav1-compressed_ten_bit_format.patch" - patch_description: "Compatibility with libsvtav1 > 1.2.0" - patch_type: "portability" - patch_source: "https://git.ffmpeg.org/gitweb/ffmpeg.git/commit/031f1561cd286596cdb374da32f8aa816ce3b135" - - patch_file: "patches/5.1-0002-fix-libsvtav1-vbv_bufsize-1.patch" - patch_description: "Compatibility with libsvtav1 > 1.2.0" - patch_type: "portability" - patch_source: "https://git.ffmpeg.org/gitweb/ffmpeg.git/commit/1c6fd7d756afe0f8b7df14dbf7a95df275f8f5ee" - - patch_file: "patches/5.1-0003-fix-libsvtav1-vbv_bufsize-2.patch" - patch_description: "Compatibility with libsvtav1 > 1.2.0" - patch_type: "portability" - patch_source: "https://git.ffmpeg.org/gitweb/ffmpeg.git/commit/96748ac54f998ba6fe22802799c16b4eba8d4ccc" - - patch_file: "patches/5.0-0001-fix-hwcontext_vulkan.patch" - patch_description: "Compatibility with vulkan >= 1.3.239" + - patch_file: "patches/5.1-0004-fix-binutils.patch" + patch_description: "Compatibility with binutils >= 2.41" patch_type: "portability" - patch_source: "https://git.ffmpeg.org/gitweb/ffmpeg.git/commit/eb0455d64690eed0068e5cb202f72ecdf899837c" + patch_source: "https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/effadce6c756247ea8bae32dc13bb3e6f464f0eb" "5.0.3": - patch_file: "patches/5.0-0001-fix-hwcontext_vulkan.patch" patch_description: "Compatibility with vulkan >= 1.3.239" patch_type: "portability" patch_source: "https://git.ffmpeg.org/gitweb/ffmpeg.git/commit/eb0455d64690eed0068e5cb202f72ecdf899837c" - "5.0": - - patch_file: "patches/5.0-0001-fix-hwcontext_vulkan.patch" - patch_description: "Compatibility with vulkan >= 1.3.239" + - patch_file: "patches/5.1-0004-fix-binutils.patch" + patch_description: "Compatibility with binutils >= 2.41" patch_type: "portability" - patch_source: "https://git.ffmpeg.org/gitweb/ffmpeg.git/commit/eb0455d64690eed0068e5cb202f72ecdf899837c" + patch_source: "https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/effadce6c756247ea8bae32dc13bb3e6f464f0eb" "4.4.4": - patch_file: "patches/4.4-0001-fix-aom_codec_av1_dx_algo.patch" patch_description: "Compatibility with shared libaom" patch_type: "portability" patch_source: "https://git.ffmpeg.org/gitweb/ffmpeg.git/commit/d92fdc714496d43234733c315894abe0beeb3529" - "4.4.3": - - patch_file: "patches/4.4-0001-fix-aom_codec_av1_dx_algo.patch" - patch_description: "Compatibility with shared libaom" - patch_type: "portability" - patch_source: "https://git.ffmpeg.org/gitweb/ffmpeg.git/commit/d92fdc714496d43234733c315894abe0beeb3529" - "4.4": - - patch_file: "patches/4.4-0001-fix-aom_codec_av1_dx_algo.patch" - patch_description: "Compatibility with shared libaom" + - patch_file: "patches/5.1-0004-fix-binutils.patch" + patch_description: "Compatibility with binutils >= 2.41" patch_type: "portability" - patch_source: "https://git.ffmpeg.org/gitweb/ffmpeg.git/commit/d92fdc714496d43234733c315894abe0beeb3529" - "4.3.2": - - patch_file: "patches/4.2-0001-fix-aom_codec_av1_dx_algo.patch" - patch_description: "Compatibility with shared libaom" - patch_type: "portability" - patch_source: "https://git.ffmpeg.org/gitweb/ffmpeg.git/commit/d92fdc714496d43234733c315894abe0beeb3529" - "4.2.1": - - patch_file: "patches/4.2-0001-fix-aom_codec_av1_dx_algo.patch" - patch_description: "Compatibility with shared libaom" - patch_type: "portability" - patch_source: "https://git.ffmpeg.org/gitweb/ffmpeg.git/commit/d92fdc714496d43234733c315894abe0beeb3529" + patch_source: "https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/effadce6c756247ea8bae32dc13bb3e6f464f0eb" \ No newline at end of file diff --git a/recipes/ffmpeg/all/conanfile.py b/recipes/ffmpeg/all/conanfile.py index faccb5c3993a9..3867ed6aa0b52 100644 --- a/recipes/ffmpeg/all/conanfile.py +++ b/recipes/ffmpeg/all/conanfile.py @@ -1,11 +1,11 @@ -from conan import ConanFile +from conan import ConanFile, conan_version from conan.errors import ConanInvalidConfiguration from conan.tools.apple import is_apple_os from conan.tools.build import cross_building from conan.tools.env import Environment, VirtualBuildEnv, VirtualRunEnv from conan.tools.files import ( apply_conandata_patches, chdir, copy, export_conandata_patches, get, rename, - replace_in_file, rm, rmdir + replace_in_file, rm, rmdir, save, load ) from conan.tools.gnu import Autotools, AutotoolsDeps, AutotoolsToolchain, PkgConfigDeps from conan.tools.layout import basic_layout @@ -74,6 +74,10 @@ class FFMpegConan(ConanFile): "with_libsvtav1": [True, False], "with_libaom": [True, False], "with_libdav1d": [True, False], + "with_libdrm": [True, False], + "with_jni": [True, False], + "with_mediacodec": [True, False], + "with_xlib": [True, False], "disable_everything": [True, False], "disable_all_encoders": [True, False], "disable_encoders": [None, "ANY"], @@ -154,6 +158,10 @@ class FFMpegConan(ConanFile): "with_libsvtav1": True, "with_libaom": True, "with_libdav1d": True, + "with_libdrm": False, + "with_jni": False, + "with_mediacodec": False, + "with_xlib": True, "disable_everything": False, "disable_all_encoders": False, "disable_encoders": None, @@ -225,33 +233,29 @@ def _dependencies(self): "with_libsvtav1": ["avcodec"], "with_libaom": ["avcodec"], "with_libdav1d": ["avcodec"], + "with_mediacodec": ["with_jni"], + "with_xlib": ["avdevice"], } - @property - def _version_supports_vulkan(self): - return Version(self.version) >= "4.3.0" - @property def _version_supports_libsvtav1(self): return Version(self.version) >= "5.1.0" - @property - def _version_supports_libdav1d(self): - return Version(self.version) >= "4.3.0" - def export_sources(self): export_conandata_patches(self) def config_options(self): if self.settings.os == "Windows": del self.options.fPIC - if not self.settings.os in ["Linux", "FreeBSD"]: + if self.settings.os not in ["Linux", "FreeBSD"]: del self.options.with_vaapi del self.options.with_vdpau del self.options.with_vulkan del self.options.with_xcb del self.options.with_libalsa del self.options.with_pulse + del self.options.with_xlib + del self.options.with_libdrm if self.settings.os != "Macos": del self.options.with_appkit if self.settings.os not in ["Macos", "iOS", "tvOS"]: @@ -260,12 +264,13 @@ def config_options(self): del self.options.with_videotoolbox if not is_apple_os(self): del self.options.with_avfoundation - if not self._version_supports_vulkan: - self.options.rm_safe("with_vulkan") + if not self.settings.os == "Android": + del self.options.with_jni + del self.options.with_mediacodec if not self._version_supports_libsvtav1: self.options.rm_safe("with_libsvtav1") - if not self._version_supports_libdav1d: - self.options.rm_safe("with_libdav1d") + if self.settings.os == "Android": + del self.options.with_libfdk_aac def configure(self): if self.options.shared: @@ -288,9 +293,9 @@ def requirements(self): if self.options.with_freetype: self.requires("freetype/2.13.2") if self.options.with_openjpeg: - self.requires("openjpeg/2.5.0") + self.requires("openjpeg/2.5.2") if self.options.with_openh264: - self.requires("openh264/2.3.1") + self.requires("openh264/2.4.1") if self.options.with_vorbis: self.requires("vorbis/1.3.7") if self.options.with_opus: @@ -300,14 +305,14 @@ def requirements(self): if self.options.with_sdl: self.requires("sdl/2.28.5") if self.options.with_libx264: - self.requires("libx264/cci.20220602") + self.requires("libx264/cci.20240224") if self.options.with_libx265: self.requires("libx265/3.4") if self.options.with_libvpx: - self.requires("libvpx/1.13.1") + self.requires("libvpx/1.14.1") if self.options.with_libmp3lame: self.requires("libmp3lame/3.100") - if self.options.with_libfdk_aac: + if self.options.get_safe("with_libfdk_aac"): self.requires("libfdk_aac/2.0.3") if self.options.with_libwebp: self.requires("libwebp/1.3.2") @@ -315,7 +320,7 @@ def requirements(self): self.requires("openssl/[>=1.1 <4]") if self.options.get_safe("with_libalsa"): self.requires("libalsa/1.2.10") - if self.options.get_safe("with_xcb") or self.options.get_safe("with_vaapi"): + if self.options.get_safe("with_xcb") or self.options.get_safe("with_xlib"): self.requires("xorg/system") if self.options.get_safe("with_pulse"): self.requires("pulseaudio/14.2") @@ -323,14 +328,16 @@ def requirements(self): self.requires("vaapi/system") if self.options.get_safe("with_vdpau"): self.requires("vdpau/system") - if self._version_supports_vulkan and self.options.get_safe("with_vulkan"): + if self.options.get_safe("with_vulkan"): self.requires("vulkan-loader/1.3.243.0") if self.options.get_safe("with_libsvtav1"): - self.requires("libsvtav1/1.6.0") + self.requires("libsvtav1/2.1.0") if self.options.with_libaom: self.requires("libaom-av1/3.6.1") if self.options.get_safe("with_libdav1d"): - self.requires("dav1d/1.2.1") + self.requires("dav1d/1.4.3") + if self.options.get_safe("with_libdrm"): + self.requires("libdrm/2.4.119") def validate(self): if self.options.with_ssl == "securetransport" and not is_apple_os(self): @@ -347,9 +354,25 @@ def validate(self): raise ConanInvalidConfiguration("FFmpeg '{}' option requires '{}' option to be enabled".format( dependency, "' or '".join(features))) + if Version(self.version) >= "6.1" and conan_version.major == 1 and is_msvc(self) and self.options.shared: + # Linking fails with "Argument list too long" for some reason on Conan v1 + raise ConanInvalidConfiguration("MSVC shared build is not supported for Conan v1") + + if Version(self.version) == "7.0.1" and self.settings.build_type == "Debug": + # FIXME: FFMpeg fails to build in Debug mode with the following error: + # ld: libavcodec/libavcodec.a(vvcdsp_init.o): in function `ff_vvc_put_pixels2_8_sse4': + # src/libavcodec/x86/vvc/vvcdsp_init.c:69: undefined reference to `ff_h2656_put_pixels2_8_sse4' + # May be related https://github.com/ffvvc/FFmpeg/issues/234 + raise ConanInvalidConfiguration(f"{self.ref} Conan recipe does not support build_type=Debug. Contributions are welcome to fix this issue.") + def build_requirements(self): if self.settings.arch in ("x86", "x86_64"): - self.tool_requires("yasm/1.3.0") + if Version(self.version) >= "7.0": + # INFO: FFmpeg 7.0+ added avcodec vvc_mc.asm which fails to assemble with yasm 1.3.0 + # src/libavcodec/x86/vvc/vvc_mc.asm:55: error: operand 1: expression is not simple or relocatable + self.tool_requires("nasm/2.16.01") + else: + self.tool_requires("yasm/1.3.0") if not self.conf.get("tools.gnu:pkg_config", check_type=str): self.tool_requires("pkgconf/2.1.0") if self._settings_build.os == "Windows": @@ -397,11 +420,10 @@ def _patch_sources(self): "#define X264_API_IMPORTS 1", "") if self.options.with_ssl == "openssl": # https://trac.ffmpeg.org/ticket/5675 - openssl_libraries = " ".join( - [f"-l{lib}" for lib in self.dependencies["openssl"].cpp_info.aggregated_components().libs]) + openssl_libs = load(self, os.path.join(self.build_folder, "openssl_libs.list")) replace_in_file(self, os.path.join(self.source_folder, "configure"), "check_lib openssl openssl/ssl.h SSL_library_init -lssl -lcrypto -lws2_32 -lgdi32 ||", - f"check_lib openssl openssl/ssl.h OPENSSL_init_ssl {openssl_libraries} || ") + f"check_lib openssl openssl/ssl.h OPENSSL_init_ssl {openssl_libs} || ") replace_in_file(self, os.path.join(self.source_folder, "configure"), "echo libx264.lib", "echo x264.lib") @@ -485,40 +507,36 @@ def opt_append_disable_if_set(args, what, v): opt_enable_disable("libx265", self.options.with_libx265), opt_enable_disable("libvpx", self.options.with_libvpx), opt_enable_disable("libmp3lame", self.options.with_libmp3lame), - opt_enable_disable("libfdk-aac", self.options.with_libfdk_aac), + opt_enable_disable("libfdk-aac", self.options.get_safe("with_libfdk_aac")), opt_enable_disable("libwebp", self.options.with_libwebp), opt_enable_disable("libaom", self.options.with_libaom), opt_enable_disable("openssl", self.options.with_ssl == "openssl"), opt_enable_disable("alsa", self.options.get_safe("with_libalsa")), - opt_enable_disable( - "libpulse", self.options.get_safe("with_pulse")), + opt_enable_disable("libpulse", self.options.get_safe("with_pulse")), opt_enable_disable("vaapi", self.options.get_safe("with_vaapi")), + opt_enable_disable("libdrm", self.options.get_safe("with_libdrm")), opt_enable_disable("vdpau", self.options.get_safe("with_vdpau")), opt_enable_disable("libxcb", self.options.get_safe("with_xcb")), - opt_enable_disable( - "libxcb-shm", self.options.get_safe("with_xcb")), - opt_enable_disable( - "libxcb-shape", self.options.get_safe("with_xcb")), - opt_enable_disable( - "libxcb-xfixes", self.options.get_safe("with_xcb")), + opt_enable_disable("libxcb-shm", self.options.get_safe("with_xcb")), + opt_enable_disable("libxcb-shape", self.options.get_safe("with_xcb")), + opt_enable_disable("libxcb-xfixes", self.options.get_safe("with_xcb")), opt_enable_disable("appkit", self.options.get_safe("with_appkit")), - opt_enable_disable( - "avfoundation", self.options.get_safe("with_avfoundation")), - opt_enable_disable( - "coreimage", self.options.get_safe("with_coreimage")), - opt_enable_disable( - "audiotoolbox", self.options.get_safe("with_audiotoolbox")), - opt_enable_disable( - "videotoolbox", self.options.get_safe("with_videotoolbox")), - opt_enable_disable("securetransport", - self.options.with_ssl == "securetransport"), + opt_enable_disable("avfoundation", self.options.get_safe("with_avfoundation")), + opt_enable_disable("coreimage", self.options.get_safe("with_coreimage")), + opt_enable_disable("audiotoolbox", self.options.get_safe("with_audiotoolbox")), + opt_enable_disable("videotoolbox", self.options.get_safe("with_videotoolbox")), + opt_enable_disable("securetransport", self.options.with_ssl == "securetransport"), + opt_enable_disable("vulkan", self.options.get_safe("with_vulkan")), + opt_enable_disable("libdav1d", self.options.get_safe("with_libdav1d")), + opt_enable_disable("jni", self.options.get_safe("with_jni")), + opt_enable_disable("mediacodec", self.options.get_safe("with_mediacodec")), + opt_enable_disable("xlib", self.options.get_safe("with_xlib")), "--disable-cuda", # FIXME: CUDA support "--disable-cuvid", # FIXME: CUVID support # Licenses - opt_enable_disable("nonfree", self.options.with_libfdk_aac or (self.options.with_ssl and ( + opt_enable_disable("nonfree", self.options.get_safe("with_libfdk_aac") or (self.options.with_ssl and ( self.options.with_libx264 or self.options.with_libx265 or self.options.postproc))), - opt_enable_disable( - "gpl", self.options.with_libx264 or self.options.with_libx265 or self.options.postproc) + opt_enable_disable("gpl", self.options.with_libx264 or self.options.with_libx265 or self.options.postproc) ] # Individual Component Options @@ -581,12 +599,8 @@ def opt_append_disable_if_set(args, what, v): args.extend(self._split_and_format_options_string( "disable-filter", self.options.disable_filters)) - if self._version_supports_vulkan: - args.append(opt_enable_disable("vulkan", self.options.get_safe("with_vulkan"))) if self._version_supports_libsvtav1: args.append(opt_enable_disable("libsvtav1", self.options.get_safe("with_libsvtav1"))) - if self._version_supports_libsvtav1: - args.append(opt_enable_disable("libdav1d", self.options.get_safe("with_libdav1d"))) if is_apple_os(self): # relocatable shared libs args.append("--install-name-dir=@rpath") @@ -687,6 +701,10 @@ def opt_append_disable_if_set(args, what, v): deps = PkgConfigDeps(self) deps.generate() + if self.options.with_ssl == "openssl": + openssl_libs = " ".join([f"-l{lib}" for lib in self.dependencies["openssl"].cpp_info.aggregated_components().libs]) + save(self, os.path.join(self.build_folder, "openssl_libs.list"), openssl_libs) + def _split_and_format_options_string(self, flag_name, options_list): if not options_list: return [] @@ -760,265 +778,159 @@ def _set_component_version(self, component_name): def package_info(self): if self.options.with_programs: if self.options.with_sdl: - self.cpp_info.components["programs"].requires = [ - "sdl::libsdl2"] - + self.cpp_info.components["programs"].requires = ["sdl::libsdl2"] + + def _add_component(name, dependencies): + component = self.cpp_info.components[name] + component.set_property("pkg_config_name", f"lib{name}") + self._set_component_version(name) + component.libs = [name] + if name != "avutil": + component.requires = ["avutil"] + for dep in dependencies: + if self.options.get_safe(dep): + component.requires.append(dep) + if self.settings.os in ("FreeBSD", "Linux"): + component.system_libs.append("m") + return component + + avutil = _add_component("avutil", []) if self.options.avdevice: - self.cpp_info.components["avdevice"].set_property( - "pkg_config_name", "libavdevice") - self.cpp_info.components["avdevice"].libs = ["avdevice"] - self.cpp_info.components["avdevice"].requires = ["avutil"] - if self.options.avfilter: - self.cpp_info.components["avdevice"].requires.append( - "avfilter") - if self.options.swscale: - self.cpp_info.components["avdevice"].requires.append("swscale") - if self.options.avformat: - self.cpp_info.components["avdevice"].requires.append( - "avformat") - if self.options.avcodec: - self.cpp_info.components["avdevice"].requires.append("avcodec") - if self.options.swresample: - self.cpp_info.components["avdevice"].requires.append( - "swresample") - if self.options.postproc: - self.cpp_info.components["avdevice"].requires.append( - "postproc") - self._set_component_version("avdevice") - + avdevice = _add_component("avdevice", ["avfilter", "swscale", "avformat", "avcodec", "swresample", "postproc"]) if self.options.avfilter: - self.cpp_info.components["avfilter"].set_property( - "pkg_config_name", "libavfilter") - self.cpp_info.components["avfilter"].libs = ["avfilter"] - self.cpp_info.components["avfilter"].requires = ["avutil"] - if self.options.swscale: - self.cpp_info.components["avfilter"].requires.append("swscale") - if self.options.avformat: - self.cpp_info.components["avfilter"].requires.append( - "avformat") - if self.options.avcodec: - self.cpp_info.components["avfilter"].requires.append("avcodec") - if self.options.swresample: - self.cpp_info.components["avfilter"].requires.append( - "swresample") - if self.options.postproc: - self.cpp_info.components["avfilter"].requires.append( - "postproc") - self._set_component_version("avfilter") - + avfilter = _add_component("avfilter", ["swscale", "avformat", "avcodec", "swresample", "postproc"]) if self.options.avformat: - self.cpp_info.components["avformat"].set_property( - "pkg_config_name", "libavformat") - self.cpp_info.components["avformat"].libs = ["avformat"] - self.cpp_info.components["avformat"].requires = ["avutil"] - if self.options.avcodec: - self.cpp_info.components["avformat"].requires.append("avcodec") - if self.options.swresample: - self.cpp_info.components["avformat"].requires.append( - "swresample") - self._set_component_version("avformat") - + avformat = _add_component("avformat", ["avcodec", "swscale"]) if self.options.avcodec: - self.cpp_info.components["avcodec"].set_property( - "pkg_config_name", "libavcodec") - self.cpp_info.components["avcodec"].libs = ["avcodec"] - self.cpp_info.components["avcodec"].requires = ["avutil"] - if self.options.swresample: - self.cpp_info.components["avcodec"].requires.append( - "swresample") - self._set_component_version("avcodec") - + avcodec = _add_component("avcodec", ["swresample"]) if self.options.swscale: - self.cpp_info.components["swscale"].set_property( - "pkg_config_name", "libswscale") - self.cpp_info.components["swscale"].libs = ["swscale"] - self.cpp_info.components["swscale"].requires = ["avutil"] - self._set_component_version("swscale") - + _add_component("swscale", []) if self.options.swresample: - self.cpp_info.components["swresample"].set_property( - "pkg_config_name", "libswresample") - self.cpp_info.components["swresample"].libs = ["swresample"] - self.cpp_info.components["swresample"].requires = ["avutil"] - self._set_component_version("swresample") - + _add_component("swresample", []) if self.options.postproc: - self.cpp_info.components["postproc"].set_property( - "pkg_config_name", "libpostproc") - self.cpp_info.components["postproc"].libs = ["postproc"] - self.cpp_info.components["postproc"].requires = ["avutil"] - self._set_component_version("postproc") - - self.cpp_info.components["avutil"].set_property( - "pkg_config_name", "libavutil") - self.cpp_info.components["avutil"].libs = ["avutil"] - self._set_component_version("avutil") + _add_component("postproc", []) if self.settings.os in ("FreeBSD", "Linux"): - self.cpp_info.components["avutil"].system_libs = [ - "pthread", "m", "dl"] - if self.options.swresample: - self.cpp_info.components["swresample"].system_libs = ["m"] - if self.options.swscale: - self.cpp_info.components["swscale"].system_libs = ["m"] - if self.options.postproc: - self.cpp_info.components["postproc"].system_libs = ["m"] + avutil.system_libs.extend(["pthread", "dl"]) if self.options.get_safe("fPIC"): if self.settings.compiler in ("gcc", "clang"): # https://trac.ffmpeg.org/ticket/1713 # https://ffmpeg.org/platform.html#Advanced-linking-configuration # https://ffmpeg.org/pipermail/libav-user/2014-December/007719.html - self.cpp_info.components["avcodec"].exelinkflags.append( - "-Wl,-Bsymbolic") - self.cpp_info.components["avcodec"].sharedlinkflags.append( - "-Wl,-Bsymbolic") - if self.options.avformat: - self.cpp_info.components["avformat"].system_libs = ["m"] + avcodec.exelinkflags.append("-Wl,-Bsymbolic") + avcodec.sharedlinkflags.append("-Wl,-Bsymbolic") if self.options.avfilter: - self.cpp_info.components["avfilter"].system_libs = [ - "m", "pthread"] - if self.options.avdevice: - self.cpp_info.components["avdevice"].system_libs = ["m"] + avfilter.system_libs.append("pthread") elif self.settings.os == "Windows": if self.options.avcodec: - self.cpp_info.components["avcodec"].system_libs = ["mfplat", "mfuuid", "strmiids"] + avcodec.system_libs = ["mfplat", "mfuuid", "strmiids"] if self.options.avdevice: - self.cpp_info.components["avdevice"].system_libs = [ - "ole32", "psapi", "strmiids", "uuid", "oleaut32", "shlwapi", "gdi32", "vfw32"] - self.cpp_info.components["avutil"].system_libs = [ - "user32", "bcrypt"] - self.cpp_info.components["avformat"].system_libs = ["secur32"] + avdevice.system_libs = ["ole32", "psapi", "strmiids", "uuid", "oleaut32", "shlwapi", "gdi32", "vfw32"] + avutil.system_libs = ["user32", "bcrypt"] + avformat.system_libs = ["secur32"] elif is_apple_os(self): if self.options.avdevice: - self.cpp_info.components["avdevice"].frameworks = [ - "CoreFoundation", "Foundation", "CoreGraphics"] + avdevice.frameworks = ["CoreFoundation", "Foundation", "CoreGraphics"] if self.options.avfilter: - self.cpp_info.components["avfilter"].frameworks = [ - "CoreGraphics"] + avfilter.frameworks = ["CoreGraphics"] if self.options.avcodec: - self.cpp_info.components["avcodec"].frameworks = [ - "CoreFoundation", "CoreVideo", "CoreMedia"] + avcodec.frameworks = ["CoreFoundation", "CoreVideo", "CoreMedia"] if self.settings.os == "Macos": if self.options.avdevice: - self.cpp_info.components["avdevice"].frameworks.append( - "OpenGL") + avdevice.frameworks.append("OpenGL") if self.options.avfilter: - self.cpp_info.components["avfilter"].frameworks.append( - "OpenGL") + avfilter.frameworks.append("OpenGL") if self.options.avdevice: if self.options.get_safe("with_libalsa"): - self.cpp_info.components["avdevice"].requires.append( - "libalsa::libalsa") + avdevice.requires.append("libalsa::libalsa") if self.options.get_safe("with_xcb"): - self.cpp_info.components["avdevice"].requires.append( - "xorg::xcb") + avdevice.requires.extend(["xorg::xcb", "xorg::xcb-shm", "xorg::xcb-xfixes", "xorg::xcb-shape", "xorg::xv", "xorg::xext"]) + if self.options.get_safe("with_xlib"): + avdevice.requires.extend(["xorg::x11", "xorg::xext", "xorg::xv"]) if self.options.get_safe("with_pulse"): - self.cpp_info.components["avdevice"].requires.append( - "pulseaudio::pulseaudio") + avdevice.requires.append("pulseaudio::pulseaudio") if self.options.get_safe("with_appkit"): - self.cpp_info.components["avdevice"].frameworks.append( - "AppKit") + avdevice.frameworks.append("AppKit") if self.options.get_safe("with_avfoundation"): - self.cpp_info.components["avdevice"].frameworks.append( - "AVFoundation") + avdevice.frameworks.append("AVFoundation") if self.options.get_safe("with_audiotoolbox"): - self.cpp_info.components["avdevice"].frameworks.append( - "CoreAudio") + avdevice.frameworks.append("CoreAudio") + if self.settings.os == "Android" and not self.options.shared: + avdevice.system_libs.extend(["android", "camera2ndk", "mediandk"]) if self.options.avcodec: if self.options.with_zlib: - self.cpp_info.components["avcodec"].requires.append( - "zlib::zlib") + avcodec.requires.append("zlib::zlib") if self.options.with_lzma: - self.cpp_info.components["avcodec"].requires.append( - "xz_utils::xz_utils") + avcodec.requires.append("xz_utils::xz_utils") if self.options.with_libiconv: - self.cpp_info.components["avcodec"].requires.append( - "libiconv::libiconv") + avcodec.requires.append("libiconv::libiconv") if self.options.with_openjpeg: - self.cpp_info.components["avcodec"].requires.append( - "openjpeg::openjpeg") + avcodec.requires.append("openjpeg::openjpeg") if self.options.with_openh264: - self.cpp_info.components["avcodec"].requires.append( - "openh264::openh264") + avcodec.requires.append("openh264::openh264") if self.options.with_vorbis: - self.cpp_info.components["avcodec"].requires.append( - "vorbis::vorbis") + avcodec.requires.append("vorbis::vorbis") if self.options.with_opus: - self.cpp_info.components["avcodec"].requires.append( - "opus::opus") + avcodec.requires.append("opus::opus") if self.options.with_libx264: - self.cpp_info.components["avcodec"].requires.append( - "libx264::libx264") + avcodec.requires.append("libx264::libx264") if self.options.with_libx265: - self.cpp_info.components["avcodec"].requires.append( - "libx265::libx265") + avcodec.requires.append("libx265::libx265") if self.options.with_libvpx: - self.cpp_info.components["avcodec"].requires.append( - "libvpx::libvpx") + avcodec.requires.append("libvpx::libvpx") if self.options.with_libmp3lame: - self.cpp_info.components["avcodec"].requires.append( - "libmp3lame::libmp3lame") - if self.options.with_libfdk_aac: - self.cpp_info.components["avcodec"].requires.append( - "libfdk_aac::libfdk_aac") + avcodec.requires.append("libmp3lame::libmp3lame") + if self.options.get_safe("with_libfdk_aac"): + avcodec.requires.append("libfdk_aac::libfdk_aac") if self.options.with_libwebp: - self.cpp_info.components["avcodec"].requires.append( - "libwebp::libwebp") + avcodec.requires.append("libwebp::libwebp") if self.options.get_safe("with_audiotoolbox"): - self.cpp_info.components["avcodec"].frameworks.append( - "AudioToolbox") + avcodec.frameworks.append("AudioToolbox") if self.options.get_safe("with_videotoolbox"): - self.cpp_info.components["avcodec"].frameworks.append( - "VideoToolbox") + avcodec.frameworks.append("VideoToolbox") if self.options.get_safe("with_libsvtav1"): - self.cpp_info.components["avcodec"].requires.extend( - ["libsvtav1::decoder", "libsvtav1::encoder"]) + avcodec.requires.extend(["libsvtav1::decoder", "libsvtav1::encoder"]) if self.options.get_safe("with_libaom"): - self.cpp_info.components["avcodec"].requires.append( - "libaom-av1::libaom-av1") + avcodec.requires.append("libaom-av1::libaom-av1") if self.options.get_safe("with_libdav1d"): - self.cpp_info.components["avcodec"].requires.append( - "dav1d::dav1d") + avcodec.requires.append("dav1d::dav1d") if self.options.avformat: if self.options.with_bzip2: - self.cpp_info.components["avformat"].requires.append( - "bzip2::bzip2") + avformat.requires.append("bzip2::bzip2") if self.options.with_zeromq: - self.cpp_info.components["avformat"].requires.append( - "zeromq::libzmq") + avformat.requires.append("zeromq::libzmq") if self.options.with_ssl == "openssl": - self.cpp_info.components["avformat"].requires.append( - "openssl::ssl") + avformat.requires.append("openssl::ssl") elif self.options.with_ssl == "securetransport": - self.cpp_info.components["avformat"].frameworks.append( - "Security") + avformat.frameworks.append("Security") if self.options.avfilter: if self.options.with_freetype: - self.cpp_info.components["avfilter"].requires.append( - "freetype::freetype") + avfilter.requires.append("freetype::freetype") if self.options.with_zeromq: - self.cpp_info.components["avfilter"].requires.append( - "zeromq::libzmq") + avfilter.requires.append("zeromq::libzmq") if self.options.get_safe("with_appkit"): - self.cpp_info.components["avfilter"].frameworks.append( - "AppKit") + avfilter.frameworks.append("AppKit") if self.options.get_safe("with_coreimage"): - self.cpp_info.components["avfilter"].frameworks.append( - "CoreImage") + avfilter.frameworks.append("CoreImage") if Version(self.version) >= "5.0" and is_apple_os(self): - self.cpp_info.components["avfilter"].frameworks.append("Metal") + avfilter.frameworks.append("Metal") + if self.options.get_safe("with_libdrm"): + avutil.requires.append("libdrm::libdrm_libdrm") if self.options.get_safe("with_vaapi"): - self.cpp_info.components["avutil"].requires.extend( - ["vaapi::vaapi", "xorg::x11"]) + avutil.requires.append("vaapi::vaapi") + if self.options.get_safe("with_xcb"): + avutil.requires.append("xorg::x11") if self.options.get_safe("with_vdpau"): - self.cpp_info.components["avutil"].requires.append("vdpau::vdpau") + avutil.requires.append("vdpau::vdpau") + + if self.options.with_ssl == "openssl": + avutil.requires.append("openssl::ssl") - if self._version_supports_vulkan and self.options.get_safe("with_vulkan"): - self.cpp_info.components["avutil"].requires.append( - "vulkan-loader::vulkan-loader") + if self.options.get_safe("with_vulkan"): + avutil.requires.append("vulkan-loader::vulkan-loader") diff --git a/recipes/ffmpeg/all/patches/4.2-0001-fix-aom_codec_av1_dx_algo.patch b/recipes/ffmpeg/all/patches/4.2-0001-fix-aom_codec_av1_dx_algo.patch deleted file mode 100644 index 7ed8995ec2e47..0000000000000 --- a/recipes/ffmpeg/all/patches/4.2-0001-fix-aom_codec_av1_dx_algo.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/libavcodec/libaomdec.c -+++ b/libavcodec/libaomdec.c -@@ -216,7 +216,7 @@ static av_cold int aom_free(AVCodecContext *avctx) - - static av_cold int av1_init(AVCodecContext *avctx) - { -- return aom_init(avctx, &aom_codec_av1_dx_algo); -+ return aom_init(avctx, aom_codec_av1_dx()); - } - - AVCodec ff_libaom_av1_decoder = { diff --git a/recipes/ffmpeg/all/patches/5.1-0004-fix-binutils.patch b/recipes/ffmpeg/all/patches/5.1-0004-fix-binutils.patch new file mode 100644 index 0000000000000..53a596d0ee7d4 --- /dev/null +++ b/recipes/ffmpeg/all/patches/5.1-0004-fix-binutils.patch @@ -0,0 +1,73 @@ +From effadce6c756247ea8bae32dc13bb3e6f464f0eb Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?R=C3=A9mi=20Denis-Courmont?= +Date: Sun, 16 Jul 2023 18:18:02 +0300 +Subject: [PATCH] avcodec/x86/mathops: clip constants used with shift + instructions within inline assembly + +Fixes assembling with binutil as >= 2.41 + +Signed-off-by: James Almer +--- + libavcodec/x86/mathops.h | 26 +++++++++++++++++++++++--- + 1 file changed, 23 insertions(+), 3 deletions(-) + +diff --git a/libavcodec/x86/mathops.h b/libavcodec/x86/mathops.h +index 6298f5ed1983b..ca7e2dffc1076 100644 +--- a/libavcodec/x86/mathops.h ++++ b/libavcodec/x86/mathops.h +@@ -35,12 +35,20 @@ + static av_always_inline av_const int MULL(int a, int b, unsigned shift) + { + int rt, dummy; ++ if (__builtin_constant_p(shift)) + __asm__ ( + "imull %3 \n\t" + "shrdl %4, %%edx, %%eax \n\t" + :"=a"(rt), "=d"(dummy) +- :"a"(a), "rm"(b), "ci"((uint8_t)shift) ++ :"a"(a), "rm"(b), "i"(shift & 0x1F) + ); ++ else ++ __asm__ ( ++ "imull %3 \n\t" ++ "shrdl %4, %%edx, %%eax \n\t" ++ :"=a"(rt), "=d"(dummy) ++ :"a"(a), "rm"(b), "c"((uint8_t)shift) ++ ); + return rt; + } + +@@ -113,19 +121,31 @@ __asm__ volatile(\ + // avoid +32 for shift optimization (gcc should do that ...) + #define NEG_SSR32 NEG_SSR32 + static inline int32_t NEG_SSR32( int32_t a, int8_t s){ ++ if (__builtin_constant_p(s)) + __asm__ ("sarl %1, %0\n\t" + : "+r" (a) +- : "ic" ((uint8_t)(-s)) ++ : "i" (-s & 0x1F) + ); ++ else ++ __asm__ ("sarl %1, %0\n\t" ++ : "+r" (a) ++ : "c" ((uint8_t)(-s)) ++ ); + return a; + } + + #define NEG_USR32 NEG_USR32 + static inline uint32_t NEG_USR32(uint32_t a, int8_t s){ ++ if (__builtin_constant_p(s)) + __asm__ ("shrl %1, %0\n\t" + : "+r" (a) +- : "ic" ((uint8_t)(-s)) ++ : "i" (-s & 0x1F) + ); ++ else ++ __asm__ ("shrl %1, %0\n\t" ++ : "+r" (a) ++ : "c" ((uint8_t)(-s)) ++ ); + return a; + } + diff --git a/recipes/ffmpeg/config.yml b/recipes/ffmpeg/config.yml index 0ea4ae6cca888..024586b060fe7 100644 --- a/recipes/ffmpeg/config.yml +++ b/recipes/ffmpeg/config.yml @@ -1,25 +1,15 @@ versions: + "7.0.1": + folder: "all" + "6.1.1": + folder: "all" "6.1": folder: "all" "6.0.1": folder: "all" - "6.0": - folder: "all" "5.1.3": folder: "all" - "5.1": - folder: "all" "5.0.3": folder: "all" - "5.0": - folder: "all" "4.4.4": folder: "all" - "4.4.3": - folder: "all" - "4.4": - folder: "all" - "4.3.2": - folder: "all" - "4.2.1": - folder: "all" diff --git a/recipes/fftw/all/conanfile.py b/recipes/fftw/all/conanfile.py index a5537aff62517..48fcc3185c1a8 100644 --- a/recipes/fftw/all/conanfile.py +++ b/recipes/fftw/all/conanfile.py @@ -49,7 +49,6 @@ class FFTWConan(ConanFile): "combinedthreads": False, "simd": False, } - _current_precision = None def export_sources(self): export_conandata_patches(self) @@ -93,11 +92,6 @@ def generate(self): tc.variables["ENABLE_AVX2"] = self.options.simd == "avx2" tc.generate() - @property - def build_folder(self): - bf = super().build_folder - return os.path.join(bf, self._current_precision) if self._current_precision else bf - @property def _all_precisions(self): return [p for p in ALL if self.options.get_safe(f"precision_{p}")] @@ -107,29 +101,21 @@ def on_off(value): return "ON" if value else 'OFF' apply_conandata_patches(self) - for self._current_precision in self._all_precisions: + for current_precision in self._all_precisions: cmake = CMake(self) variables = { - "ENABLE_FLOAT": on_off(self._current_precision == SINGLE), - "ENABLE_LONG_DOUBLE": on_off(self._current_precision == LONGDOUBLE), - "ENABLE_QUAD_PRECISION": on_off(self._current_precision == QUAD) + "ENABLE_FLOAT": on_off(current_precision == SINGLE), + "ENABLE_LONG_DOUBLE": on_off(current_precision == LONGDOUBLE), + "ENABLE_QUAD_PRECISION": on_off(current_precision == QUAD) } cmake.configure(variables=variables) cmake.build() - - # Potentially avoid side effects due to build_folder property tweak. - self._current_precision = None + cmake.install() def package(self): copy(self, "COPYRIGHT", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) - for self._current_precision in self._all_precisions: - cmake = CMake(self) - cmake.install() - rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) - rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) - - # Potentially avoid side effects due to build_folder property tweak. - self._current_precision = None + rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) + rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) def package_info(self): cmake_config_name = cmake_namespace = "FFTW3" diff --git a/recipes/fire-hpp/all/conandata.yml b/recipes/fire-hpp/all/conandata.yml index 0ac5acb1e3d98..e30c0635694c3 100644 --- a/recipes/fire-hpp/all/conandata.yml +++ b/recipes/fire-hpp/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.0": + url: "https://github.com/kongaskristjan/fire-hpp/archive/v1.0.tar.gz" + sha256: "73086d72a785a57bac8833d4f92799e8e769fef1d2ca46399cfbdb82a5c22f84" "0.2": - sha256: 50ac76005e5d45590355a51e5e1b62aba65c56f2003335acce0370da13d77b28 - url: https://github.com/kongaskristjan/fire-hpp/archive/v0.2.tar.gz + url: "https://github.com/kongaskristjan/fire-hpp/archive/v0.2.tar.gz" + sha256: "50ac76005e5d45590355a51e5e1b62aba65c56f2003335acce0370da13d77b28" diff --git a/recipes/fire-hpp/all/test_package/CMakeLists.txt b/recipes/fire-hpp/all/test_package/CMakeLists.txt index 8068292a31341..fe3a31529853d 100644 --- a/recipes/fire-hpp/all/test_package/CMakeLists.txt +++ b/recipes/fire-hpp/all/test_package/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.15) -project(test_package CXX) +project(test_package LANGUAGES CXX) find_package(fire-hpp REQUIRED CONFIG) diff --git a/recipes/fire-hpp/config.yml b/recipes/fire-hpp/config.yml index 7e65100e62b2c..14d66964f38cc 100644 --- a/recipes/fire-hpp/config.yml +++ b/recipes/fire-hpp/config.yml @@ -1,3 +1,5 @@ versions: + "1.0": + folder: all "0.2": folder: all diff --git a/recipes/fixed_math/1.x.x/conandata.yml b/recipes/fixed_math/1.x.x/conandata.yml new file mode 100644 index 0000000000000..3e20dff4a8b77 --- /dev/null +++ b/recipes/fixed_math/1.x.x/conandata.yml @@ -0,0 +1,4 @@ +sources: + "1.0.2": + url: "https://github.com/arturbac/fixed_math/archive/refs/tags/v1.0.2.tar.gz" + sha256: "6c87217286e3b93ce5e1fff0bbbb08a9751d04f416cd76ddd5ddd37a8c6772cf" diff --git a/recipes/fixed_math/1.x.x/conanfile.py b/recipes/fixed_math/1.x.x/conanfile.py new file mode 100644 index 0000000000000..aed8cfa5c1d05 --- /dev/null +++ b/recipes/fixed_math/1.x.x/conanfile.py @@ -0,0 +1,143 @@ +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.build import check_min_cppstd +from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout +from conan.tools.files import copy, get, rmdir, replace_in_file +from conan.tools.scm import Version +from conan.tools.layout import basic_layout +from conan.tools.env import VirtualBuildEnv +from conan.tools.microsoft import is_msvc +import os + +required_conan_version = ">=1.53.0" + +class FixedMathConan(ConanFile): + name = "fixed_math" + description = "A High-Performance C++17 Library for Fixed-Point 48.16 Arithmetic" + license = "MIT" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/arturbac/fixed_math/" + topics = ("mathematics", "fixed-point") + package_type = "library" + settings = "os", "arch", "compiler", "build_type" + options = { + "header_only": [True, False], + "shared": [True, False], + "fPIC": [True, False], + } + default_options = { + "header_only": False, + "shared": False, + "fPIC": True, + } + + @property + def _min_cppstd(self): + return 17 + + @property + def _compilers_minimum_version(self): + return { + "gcc": "10", # fixed_math requires __has_builtin + "clang": "7", + "apple-clang": "12", + "Visual Studio": "16", + "msvc": "192", + } + + def config_options(self): + if self.settings.os == "Windows": + self.package_type = "static-library" + del self.options.fPIC + + def configure(self): + if self.settings.os == "Windows": + self.options.rm_safe("shared") + if self.options.header_only: + self.options.rm_safe("shared") + self.options.rm_safe("fPIC") + self.package_type = "header-library" + elif self.options.get_safe("shared"): + self.options.rm_safe("fPIC") + + def layout(self): + if self.options.header_only: + basic_layout(self, src_folder="src") + else: + cmake_layout(self, src_folder="src") + + def package_id(self): + if self.info.options.header_only: + self.info.clear() + + def validate(self): + if self.settings.compiler.cppstd: + check_min_cppstd(self, self._min_cppstd) + minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) + if minimum_version and Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration( + f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." + ) + + def build_requirements(self): + if not self.options.header_only: + self.tool_requires("cmake/[>=3.21 <4]") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + if self.options.header_only: + return + tc = CMakeToolchain(self) + if is_msvc(self): + tc.variables["CMAKE_CXX_FLAGS"] = "/Zc:__cplusplus" + tc.generate() + venv = VirtualBuildEnv(self) + venv.generate(scope="build") + + def build(self): + if not self.options.header_only: + # fix install path (https://github.com/arturbac/fixed_math/issues/8) + replace_in_file(self, os.path.join(self.source_folder, "fixed_lib", "CMakeLists.txt"), + "${CMAKE_INSTALL_INCLUDEDIR}/fixed_math", + "${CMAKE_INSTALL_INCLUDEDIR}/fixedmath") + cmake = CMake(self) + cmake.configure() + cmake.build() + + def package(self): + copy(self, "LICENCE", self.source_folder, os.path.join(self.package_folder, "licenses")) + if not self.options.header_only: + cmake = CMake(self) + cmake.install() + rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) + else: + # fix install path (https://github.com/arturbac/fixed_math/issues/8) + copy( + self, + "*.h", + os.path.join(self.source_folder, "fixed_lib", "include", "fixedmath"), + os.path.join(self.package_folder, "include", "fixedmath"), + ) + copy( + self, + "*.hpp", + os.path.join(self.source_folder, "fixed_lib", "include", "fixedmath"), + os.path.join(self.package_folder, "include", "fixedmath"), + ) + + def package_info(self): + if self.options.header_only: + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] + else: + self.cpp_info.libs = ["fixed_math"] + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.system_libs.append("m") + + self.cpp_info.set_property("cmake_file_name", "fixed_math") + self.cpp_info.set_property("cmake_target_name", "fixed_math::fixed_math") + + if is_msvc(self): + self.cpp_info.cxxflags.append("/Zc:__cplusplus") diff --git a/recipes/fixed_math/1.x.x/test_package/CMakeLists.txt b/recipes/fixed_math/1.x.x/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..d63966d4ccdd2 --- /dev/null +++ b/recipes/fixed_math/1.x.x/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) + +find_package(fixed_math REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE fixed_math::fixed_math) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) diff --git a/recipes/fixed_math/1.x.x/test_package/conanfile.py b/recipes/fixed_math/1.x.x/test_package/conanfile.py new file mode 100644 index 0000000000000..ef5d7042163ec --- /dev/null +++ b/recipes/fixed_math/1.x.x/test_package/conanfile.py @@ -0,0 +1,26 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/fixed_math/1.x.x/test_package/test_package.cpp b/recipes/fixed_math/1.x.x/test_package/test_package.cpp new file mode 100644 index 0000000000000..9337496e2cbd5 --- /dev/null +++ b/recipes/fixed_math/1.x.x/test_package/test_package.cpp @@ -0,0 +1,39 @@ +#include + +#include "fixedmath/fixed_math.hpp" +#include "fixedmath/iostream.h" + +using fixedmath::fixed_t; +using fixedmath::operator ""_fix; + +//fixed and all functionality is constexpr so You can declare constants see features [1] +inline constexpr fixed_t foo_constant{ fixedmath::tan( 15 * fixedmath::phi/180) }; + +constexpr fixed_t my_function( fixed_t value ) { + using namespace fixedmath; + return foo_constant + sin(value) / (1.41_fix - 2*cos(value) / 4); +} + +int main() { + // converting to/from fixed_t + // construction from other arithmetic types is explicit + fixed_t val { 3.14 }; + + //- there is no implicit assignment from other types + float some_float{val}; + fixed_t some_fixed{some_float}; + + some_fixed = fixed_t{some_float}; + + //- converting to other arithmetic types coud be done with static cast and is explicit + double some_double { static_cast(some_fixed) }; + + // for constant values postfix operator _fix may be used + some_fixed = some_float * 2.45_fix; //operation with float is promoted to fixed_t + some_double = 4.15 * some_fixed; //operation with double is promoted to double + + std::cout << some_fixed << '\n'; + std::cout << some_double << '\n'; + + return 0; +} diff --git a/recipes/fixed_math/all/conandata.yml b/recipes/fixed_math/all/conandata.yml new file mode 100644 index 0000000000000..a7ea4a2ff9968 --- /dev/null +++ b/recipes/fixed_math/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "2.0.0": + url: "https://github.com/arturbac/fixed_math/archive/refs/tags/v2.0.0.tar.gz" + sha256: "a02efd417592f9cb3d21fc39877aba76fe5c37b3e68b11769065202f71242f66" diff --git a/recipes/fixed_math/all/conanfile.py b/recipes/fixed_math/all/conanfile.py new file mode 100644 index 0000000000000..4684b16404cb7 --- /dev/null +++ b/recipes/fixed_math/all/conanfile.py @@ -0,0 +1,78 @@ +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.build import check_min_cppstd +from conan.tools.files import copy, get +from conan.tools.scm import Version +from conan.tools.layout import basic_layout +from conan.tools.microsoft import is_msvc +import os + +required_conan_version = ">=1.53.0" + +class FixedMathConan(ConanFile): + name = "fixed_math" + description = "A High-Performance C++17 Library for Fixed-Point 48.16 Arithmetic" + license = "MIT" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/arturbac/fixed_math/" + topics = ("mathematics", "fixed-point", "header-only") + package_type = "header-library" + settings = "os", "arch", "compiler", "build_type" + no_copy_source = True + + @property + def _min_cppstd(self): + return 23 + + @property + def _compilers_minimum_version(self): + return { + "Visual Studio": "17", + "msvc": "193", + "gcc": "12", + "clang": "15", + "apple-clang": "16", + } + + def layout(self): + basic_layout(self, src_folder="src") + + def package_id(self): + self.info.clear() + + def validate(self): + if self.settings.compiler.cppstd: + check_min_cppstd(self, self._min_cppstd) + minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) + if minimum_version and Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration( + f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." + ) + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def package(self): + copy(self, "LICENCE", self.source_folder, os.path.join(self.package_folder, "licenses")) + copy( + self, + "*.h", + os.path.join(self.source_folder, "fixed_lib", "include"), + os.path.join(self.package_folder, "include"), + ) + copy( + self, + "*.hpp", + os.path.join(self.source_folder, "fixed_lib", "include"), + os.path.join(self.package_folder, "include"), + ) + + def package_info(self): + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] + + self.cpp_info.set_property("cmake_file_name", "fixed_math") + self.cpp_info.set_property("cmake_target_name", "fixed_math::fixed_math") + + if is_msvc(self): + self.cpp_info.cxxflags.append("/Zc:__cplusplus") diff --git a/recipes/fixed_math/all/test_package/CMakeLists.txt b/recipes/fixed_math/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..2b820757c217b --- /dev/null +++ b/recipes/fixed_math/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.20) +project(test_package LANGUAGES CXX) + +find_package(fixed_math REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE fixed_math::fixed_math) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_23) diff --git a/recipes/fixed_math/all/test_package/conanfile.py b/recipes/fixed_math/all/test_package/conanfile.py new file mode 100644 index 0000000000000..ef5d7042163ec --- /dev/null +++ b/recipes/fixed_math/all/test_package/conanfile.py @@ -0,0 +1,26 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/fixed_math/all/test_package/test_package.cpp b/recipes/fixed_math/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..7fbb1e6d1d25b --- /dev/null +++ b/recipes/fixed_math/all/test_package/test_package.cpp @@ -0,0 +1,37 @@ +#include + +#include "fixedmath/fixed_math.hpp" +#include "fixedmath/iostream.h" + +using fixedmath::fixed_t; +using fixedmath::operator""_fix; + +// fixed and all functionality is constexpr so You can declare constants see features [1] +inline constexpr fixed_t foo_constant{fixedmath::fobj::tan(15 * fixedmath::phi / 180)}; + +constexpr fixed_t my_function(fixed_t value) { + using namespace fixedmath; + // You can use funcioons or function objects + return foo_constant + fobj::sin(value) / (1.41_fix - 2 * func::cos(value) / 4); +} + +int main() { + // converting to/from fixed_t + // construction from other arithmetic types is explicit + fixed_t val1{3.14}; + fixed_t val2{3u}; + + //- there is no implicit assignment from other types + float some_float{3.14f}; + fixed_t some_fixed; + some_fixed = fixed_t{some_float}; + + //- converting to other arithmetic types coud be done with static cast and is explicit + double some_double(some_fixed); + + // for constant values postfix operator _fix may be used + some_fixed = some_float * 2.45_fix; // operation with float is promoted to fixed_t + some_double = 4.15 * some_fixed; // operation with double is promoted to double + + std::cout << some_double << " " << my_function(some_fixed) << std::endl; +} diff --git a/recipes/fixed_math/config.yml b/recipes/fixed_math/config.yml new file mode 100644 index 0000000000000..3a4c749874ca0 --- /dev/null +++ b/recipes/fixed_math/config.yml @@ -0,0 +1,5 @@ +versions: + "2.0.0": + folder: all + "1.0.2": + folder: 1.x.x diff --git a/recipes/flac/all/conandata.yml b/recipes/flac/all/conandata.yml index e2b6d7651827c..da984a86264a9 100644 --- a/recipes/flac/all/conandata.yml +++ b/recipes/flac/all/conandata.yml @@ -9,6 +9,14 @@ sources: url: "https://github.com/xiph/flac/archive/1.3.3.tar.gz" sha256: "668cdeab898a7dd43cf84739f7e1f3ed6b35ece2ef9968a5c7079fe9adfe1689" patches: + "1.4.3": + - patch_file: "patches/1.4.2-002-ignore-dll_export-define.patch" + patch_description: "Ignore autotools-specific DLL_EXPORT define in export.h" + patch_type: "conan" + "1.4.2": + - patch_file: "patches/1.4.2-002-ignore-dll_export-define.patch" + patch_description: "Ignore autotools-specific DLL_EXPORT define in export.h" + patch_type: "conan" "1.3.3": - patch_file: "patches/fix-cmake-1.3.3.patch" patch_description: "Various adaptations in CMakeLists.txt files to improve compatibility with Conan." diff --git a/recipes/flac/all/conanfile.py b/recipes/flac/all/conanfile.py index e8bc14ed2a18c..2e622f2d8d125 100644 --- a/recipes/flac/all/conanfile.py +++ b/recipes/flac/all/conanfile.py @@ -56,6 +56,7 @@ def generate(self): tc.variables["BUILD_EXAMPLES"] = False tc.variables["BUILD_DOCS"] = False tc.variables["BUILD_TESTING"] = False + tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0077"] = "NEW" tc.generate() cd = CMakeDeps(self) cd.generate() @@ -105,7 +106,6 @@ def package_info(self): self.cpp_info.components["libflac"].system_libs += ["m"] bin_path = os.path.join(self.package_folder, "bin") - self.output.info("Appending PATH environment variable: {}".format(bin_path)) self.env_info.PATH.append(bin_path) # TODO: to remove in conan v2 diff --git a/recipes/flac/all/patches/1.4.2-002-ignore-dll_export-define.patch b/recipes/flac/all/patches/1.4.2-002-ignore-dll_export-define.patch new file mode 100644 index 0000000000000..0ce0853b69c7e --- /dev/null +++ b/recipes/flac/all/patches/1.4.2-002-ignore-dll_export-define.patch @@ -0,0 +1,22 @@ +--- include/FLAC/export.h ++++ include/FLAC/export.h +@@ -74,7 +74,7 @@ + */ + #if defined(_WIN32) + +-#if defined(FLAC__NO_DLL) && !(defined(DLL_EXPORT)) ++#if defined(FLAC__NO_DLL) + #define FLAC_API + #else + #ifdef FLAC_API_EXPORTS +--- include/FLAC++/export.h ++++ include/FLAC++/export.h +@@ -73,7 +73,7 @@ + * by libtool, must override FLAC__NO_DLL on building shared components + */ + #if defined(_WIN32) +-#if defined(FLAC__NO_DLL) && !(defined(DLL_EXPORT)) ++#if defined(FLAC__NO_DLL) + #define FLACPP_API + #else + #ifdef FLACPP_API_EXPORTS diff --git a/recipes/flatbuffers/all/conandata.yml b/recipes/flatbuffers/all/conandata.yml index f334b7432aac3..a652904b42613 100644 --- a/recipes/flatbuffers/all/conandata.yml +++ b/recipes/flatbuffers/all/conandata.yml @@ -14,9 +14,6 @@ sources: "23.1.21": url: "https://github.com/google/flatbuffers/archive/v23.1.21.tar.gz" sha256: "d84cb25686514348e615163b458ae0767001b24b42325f426fd56406fd384238" - "23.1.4": - url: "https://github.com/google/flatbuffers/archive/v23.1.4.tar.gz" - sha256: "801871ff3747838c0dd9730fc44ca9cc453ff42f9c8a0a2f1b33776d2ca5e4b9" "22.12.06": url: "https://github.com/google/flatbuffers/archive/v22.12.06.tar.gz" sha256: "209823306f2cbedab6ff70997e0d236fcfd1864ca9ad082cbfdb196e7386daed" @@ -29,15 +26,9 @@ sources: "22.9.29": url: "https://github.com/google/flatbuffers/archive/refs/tags/v22.9.29.tar.gz" sha256: "372df01795c670f6538055a7932fc7eb3e81b3653be4a216c081e9c3c26b1b6d" - "22.9.24": - url: "https://github.com/google/flatbuffers/archive/refs/tags/v22.9.24.tar.gz" - sha256: "40e0788873012def4d66a2fdbac15fbe012784473c01a703ccb5be33383556bf" "2.0.8": url: "https://github.com/google/flatbuffers/archive/refs/tags/v2.0.8.tar.gz" sha256: "f97965a727d26386afaefff950badef2db3ab6af9afe23ed6d94bfb65f95f37e" - "2.0.6": - url: "https://github.com/google/flatbuffers/archive/refs/tags/v2.0.6.tar.gz" - sha256: "e2dc24985a85b278dd06313481a9ca051d048f9474e0f199e372fea3ea4248c9" "2.0.5": url: "https://github.com/google/flatbuffers/archive/refs/tags/v2.0.5.tar.gz" sha256: "b01e97c988c429e164c5c7df9e87c80007ca87f593c0d73733ba536ddcbc8f98" @@ -45,10 +36,6 @@ sources: url: "https://github.com/google/flatbuffers/archive/v1.12.0.tar.gz" sha256: "62f2223fb9181d1d6338451375628975775f7522185266cd5296571ac152bc45" patches: - "2.0.6": - - patch_file: "patches/0004-no-flatc-execution-build-time.patch" - patch_description: "No flatc execution during build time" - patch_type: "conan" "2.0.5": - patch_file: "patches/0002-apple-no-universal-build.patch" patch_description: "Don't use universal2 architecture" @@ -56,3 +43,8 @@ patches: - patch_file: "patches/0003-no-flatc-execution-build-time.patch" patch_description: "No flatc execution during build time" patch_type: "conan" + "1.12.0": + - patch_file: "patches/0005-arm-cxx-compiler-build.patch" + patch_description: "IAR ARM C++ Compiler build bugfix" + patch_type: "backport" + patch_source: "https://github.com/google/flatbuffers/commit/82fac326c5981a85233b8ae7e0d7ec8fda432963" diff --git a/recipes/flatbuffers/all/conanfile.py b/recipes/flatbuffers/all/conanfile.py index 06610b4d9bfd6..4f6cbc9b40b2b 100644 --- a/recipes/flatbuffers/all/conanfile.py +++ b/recipes/flatbuffers/all/conanfile.py @@ -6,7 +6,7 @@ from conan.tools.scm import Version import os -required_conan_version = ">=1.53.0" +required_conan_version = ">=2.1" class FlatbuffersConan(ConanFile): @@ -18,6 +18,7 @@ class FlatbuffersConan(ConanFile): description = "Memory Efficient Serialization Library" settings = "os", "arch", "compiler", "build_type" + package_type = "library" options = { "shared": [True, False], "fPIC": [True, False], @@ -56,17 +57,17 @@ def package_id(self): self.info.clear() def validate(self): - if self.settings.compiler.get_safe("cppstd"): - check_min_cppstd(self, 11) + check_min_cppstd(self, 11) def build_requirements(self): # since 23.3.3 version, flatbuffers cmake scripts were refactored to use cmake 3.8 version # see https://github.com/google/flatbuffers/pull/7801 - if Version(self.version) >= "2.0.7" and Version(self.version) < "23.3.3": + if Version(self.version) >= "2.0.8" and Version(self.version) < "23.3.3": self.tool_requires("cmake/[>=3.16 <4]") def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) + self._patch_sources() def generate(self): tc = CMakeToolchain(self) @@ -92,9 +93,6 @@ def generate(self): # Fix iOS/tvOS/watchOS if is_apple_os(self): tc.variables["CMAKE_MACOSX_BUNDLE"] = False - # Inject at least C++11 standard (would be more elegant to rely on cxx_std_11 compile feature upstream) - if not valid_min_cppstd(self, 11): - tc.variables["CMAKE_CXX_STANDARD"] = 11 tc.generate() def _patch_sources(self): @@ -112,7 +110,6 @@ def _patch_sources(self): "RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}") def build(self): - self._patch_sources() cmake = CMake(self) cmake.configure() cmake.build() @@ -157,16 +154,5 @@ def package_info(self): ] self.cpp_info.set_property("cmake_build_modules", build_modules) - # TODO: to remove in conan v2 once cmake_find_package* generators removed - self.cpp_info.filenames["cmake_find_package"] = "flatbuffers" - self.cpp_info.filenames["cmake_find_package_multi"] = "flatbuffers" - self.cpp_info.names["cmake_find_package"] = "flatbuffers" - self.cpp_info.names["cmake_find_package_multi"] = "flatbuffers" - self.cpp_info.components["libflatbuffers"].names["cmake_find_package"] = cmake_target - self.cpp_info.components["libflatbuffers"].names["cmake_find_package_multi"] = cmake_target - self.cpp_info.components["libflatbuffers"].build_modules["cmake_find_package"] = build_modules - self.cpp_info.components["libflatbuffers"].build_modules["cmake_find_package_multi"] = build_modules - self.cpp_info.components["libflatbuffers"].set_property("cmake_file_name", f"flatbuffers::{cmake_target}") - self.cpp_info.components["libflatbuffers"].set_property("pkg_config_name", "flatbuffers") if self._has_flatc(): self.env_info.PATH.append(os.path.join(self.package_folder, "bin")) diff --git a/recipes/flatbuffers/all/patches/0005-arm-cxx-compiler-build.patch b/recipes/flatbuffers/all/patches/0005-arm-cxx-compiler-build.patch new file mode 100644 index 0000000000000..7ea43002f8643 --- /dev/null +++ b/recipes/flatbuffers/all/patches/0005-arm-cxx-compiler-build.patch @@ -0,0 +1,16 @@ +diff --git a/include/flatbuffers/flatbuffers.h b/include/flatbuffers/flatbuffers.h +index c4dc5bcd..0f3a7dfd 100644 +--- a/include/flatbuffers/flatbuffers.h ++++ b/include/flatbuffers/flatbuffers.h +@@ -1871,10 +1871,7 @@ class FlatBufferBuilder { + vector_downward &buf_; + + private: +- TableKeyComparator &operator=(const TableKeyComparator &other) { +- buf_ = other.buf_; +- return *this; +- } ++ FLATBUFFERS_DELETE_FUNC(TableKeyComparator &operator=(const TableKeyComparator &other)) + }; + /// @endcond + diff --git a/recipes/flatbuffers/all/test_v1_package/conanfile.py b/recipes/flatbuffers/all/test_v1_package/conanfile.py deleted file mode 100644 index 949b7060f8e9c..0000000000000 --- a/recipes/flatbuffers/all/test_v1_package/conanfile.py +++ /dev/null @@ -1,22 +0,0 @@ -from conans import ConanFile, CMake, tools -import os - - -class TestPackageConan(ConanFile): - settings = "os", "arch", "compiler", "build_type" - generators = "cmake", "cmake_find_package_multi" - test_type = "explicit" - - def requirements(self): - self.requires(self.tested_reference_str) - - def build(self): - cmake = CMake(self) - cmake.definitions["FLATBUFFERS_HEADER_ONLY"] = self.options["flatbuffers"].header_only - cmake.configure() - cmake.build() - - def test(self): - if not tools.cross_building(self): - self.run(os.path.join("bin", "test_package"), run_environment=True) - self.run(os.path.join("bin", "sample_binary"), run_environment=True) diff --git a/recipes/flatbuffers/config.yml b/recipes/flatbuffers/config.yml index 5bc4e9c3e21fd..4faf33c80023f 100644 --- a/recipes/flatbuffers/config.yml +++ b/recipes/flatbuffers/config.yml @@ -9,8 +9,6 @@ versions: folder: all "23.1.21": folder: all - "23.1.4": - folder: all "22.12.06": folder: all "22.11.23": @@ -19,12 +17,8 @@ versions: folder: all "22.9.29": folder: all - "22.9.24": - folder: all "2.0.8": folder: all - "2.0.6": - folder: all "2.0.5": folder: all "1.12.0": diff --git a/recipes/flatbush/all/conandata.yml b/recipes/flatbush/all/conandata.yml index f43d2fb04fed7..4382ecd215405 100644 --- a/recipes/flatbush/all/conandata.yml +++ b/recipes/flatbush/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.2.1": + url: "https://github.com/chusitoo/flatbush/archive/refs/tags/v1.2.1.zip" + sha256: "7f8226cb9a58cc75c99800a8fb213b1c2c5df81051ec559d5ff7b4ed0e8c097a" "1.2.0": url: "https://github.com/chusitoo/flatbush/archive/refs/tags/v1.2.0.zip" sha256: "d8d0471ad6aba1e4b1160abc38a0fe21a35e3ea1c2a9509ce9910072f7fc24bb" diff --git a/recipes/flatbush/config.yml b/recipes/flatbush/config.yml index 2424e32f70b3e..7b2fedacd7387 100644 --- a/recipes/flatbush/config.yml +++ b/recipes/flatbush/config.yml @@ -1,4 +1,6 @@ versions: + "1.2.1": + folder: "all" "1.2.0": folder: "all" "1.1.0": diff --git a/recipes/flecs/all/conandata.yml b/recipes/flecs/all/conandata.yml index aa41772cdfb91..5e77688b77f2b 100644 --- a/recipes/flecs/all/conandata.yml +++ b/recipes/flecs/all/conandata.yml @@ -1,4 +1,10 @@ sources: + "4.0.0": + url: "https://github.com/SanderMertens/flecs/archive/refs/tags/v4.0.0.tar.gz" + sha256: "6c9826c8602f797acd775269d143763adfb3d3a93031cc81bced2b6d267469d2" + "3.2.11": + url: "https://github.com/SanderMertens/flecs/archive/refs/tags/v3.2.11.tar.gz" + sha256: "8ebc5f6f3ec7bbba30b0afe9d22f157437925772857ea1c6e4201eb5d31b4fe5" "3.2.8": url: "https://github.com/SanderMertens/flecs/archive/refs/tags/v3.2.8.tar.gz" sha256: "b40453a77b66e220408c50b119da54b153c248cf6f7025575e3fd1a8ff79f748" diff --git a/recipes/flecs/all/conanfile.py b/recipes/flecs/all/conanfile.py index b4d76faa5ed41..772d3a2cb6618 100644 --- a/recipes/flecs/all/conanfile.py +++ b/recipes/flecs/all/conanfile.py @@ -17,6 +17,7 @@ class FlecsConan(ConanFile): homepage = "https://github.com/SanderMertens/flecs" url = "https://github.com/conan-io/conan-center-index" + package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], @@ -53,6 +54,7 @@ def generate(self): else: tc.variables["FLECS_STATIC"] = not self.options.shared tc.variables["FLECS_SHARED"] = self.options.shared + tc.variables["FLECS_TESTS"] = False tc.variables["FLECS_PIC"] = self.options.get_safe("fPIC", True) tc.generate() diff --git a/recipes/flecs/all/test_package/conanfile.py b/recipes/flecs/all/test_package/conanfile.py index 0a6bc68712d90..1a364276dd853 100644 --- a/recipes/flecs/all/test_package/conanfile.py +++ b/recipes/flecs/all/test_package/conanfile.py @@ -1,12 +1,12 @@ from conan import ConanFile from conan.tools.build import can_run -from conan.tools.cmake import CMake, cmake_layout +from conan.tools.cmake import CMake, cmake_layout, CMakeToolchain import os class TestPackageConan(ConanFile): settings = "os", "arch", "compiler", "build_type" - generators = "CMakeToolchain", "CMakeDeps", "VirtualRunEnv" + generators = "CMakeDeps", "VirtualRunEnv" test_type = "explicit" def layout(self): @@ -15,6 +15,12 @@ def layout(self): def requirements(self): self.requires(self.tested_reference_str) + def generate(self): + tc = CMakeToolchain(self) + if self.dependencies[self.tested_reference_str].ref.version < "4.0.0": + tc.preprocessor_definitions["LESS_VERSION_4"] = "1" + tc.generate() + def build(self): cmake = CMake(self) cmake.configure() diff --git a/recipes/flecs/all/test_package/test_package.c b/recipes/flecs/all/test_package/test_package.c index 6b277544863db..9a75f507a8f98 100644 --- a/recipes/flecs/all/test_package/test_package.c +++ b/recipes/flecs/all/test_package/test_package.c @@ -11,8 +11,11 @@ int main() { ecs_world_t *world = ecs_init(); ECS_COMPONENT(world, Position); - +#ifdef LESS_VERSION_4 ecs_entity_t e = ecs_new_id(world); +#else + ecs_entity_t e = ecs_new(world); +#endif ecs_set(world, e, Position, {10.0f, 20.0f}); const char *name = ecs_get_name(world, e); diff --git a/recipes/flecs/all/test_v1_package/CMakeLists.txt b/recipes/flecs/all/test_v1_package/CMakeLists.txt deleted file mode 100644 index 0d20897301b68..0000000000000 --- a/recipes/flecs/all/test_v1_package/CMakeLists.txt +++ /dev/null @@ -1,8 +0,0 @@ -cmake_minimum_required(VERSION 3.1) -project(test_package) - -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) - -add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package - ${CMAKE_CURRENT_BINARY_DIR}/test_package) diff --git a/recipes/flecs/config.yml b/recipes/flecs/config.yml index df52862429336..c8dc8eaef31be 100644 --- a/recipes/flecs/config.yml +++ b/recipes/flecs/config.yml @@ -1,4 +1,8 @@ versions: + "4.0.0": + folder: all + "3.2.11": + folder: all "3.2.8": folder: all "3.2.4": diff --git a/recipes/fltk/all/conanfile.py b/recipes/fltk/all/conanfile.py index bd7f4d5b1b6f2..57f2437f1fe63 100644 --- a/recipes/fltk/all/conanfile.py +++ b/recipes/fltk/all/conanfile.py @@ -4,6 +4,8 @@ from conan.tools.apple import is_apple_os from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout from conan.tools.files import apply_conandata_patches, collect_libs, copy, export_conandata_patches, get, rm, rmdir +from conan.tools.microsoft import msvc_runtime_flag +from conan.tools.scm import Version required_conan_version = ">=1.53.0" @@ -36,6 +38,14 @@ class FltkConan(ConanFile): "with_xft": False, } + @property + def _is_cl_like(self): + return self.settings.compiler.get_safe("runtime") is not None + + @property + def _is_cl_like_static_runtime(self): + return self._is_cl_like and "MT" in msvc_runtime_flag(self) + def export_sources(self): export_conandata_patches(self) @@ -96,6 +106,9 @@ def generate(self): tc.variables["OPTION_USE_SYSTEM_LIBJPEG"] = True tc.variables["OPTION_USE_SYSTEM_ZLIB"] = True tc.variables["OPTION_USE_SYSTEM_LIBPNG"] = True + if Version(self.version) >= "1.3.9": + if self._is_cl_like: + tc.variables["FLTK_MSVC_RUNTIME_DLL"] = not self._is_cl_like_static_runtime tc.generate() tc = CMakeDeps(self) diff --git a/recipes/flux/all/conandata.yml b/recipes/flux/all/conandata.yml index da78f9215ab45..0e08f22b473ce 100644 --- a/recipes/flux/all/conandata.yml +++ b/recipes/flux/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.4.0": + url: "https://github.com/tcbrindle/flux/archive/refs/tags/v0.4.0.zip" + sha256: "d17c656934688e085197eb6bd576a2e468d2b513c4f3be60121b8863c0830e13" "cci.20240115": url: "https://codeload.github.com/tcbrindle/flux/zip/e942a678ed3b46c7f7ffeebe47eed5c5bec005b2" sha256: "3832fb160417d14cfb3636c8edab04b2d0cd6c230b4d474a18bb1389fa1c3b8f" diff --git a/recipes/flux/config.yml b/recipes/flux/config.yml index 4edf0b751a05e..e1fec433b2cec 100644 --- a/recipes/flux/config.yml +++ b/recipes/flux/config.yml @@ -1,3 +1,5 @@ versions: + "0.4.0": + folder: all "cci.20240115": folder: all diff --git a/recipes/fmt/all/conandata.yml b/recipes/fmt/all/conandata.yml index 1c4bb54e9bf65..5ec660a369fa8 100644 --- a/recipes/fmt/all/conandata.yml +++ b/recipes/fmt/all/conandata.yml @@ -1,4 +1,13 @@ sources: + "11.0.2": + url: "https://github.com/fmtlib/fmt/releases/download/11.0.2/fmt-11.0.2.zip" + sha256: "40fc58bebcf38c759e11a7bd8fdc163507d2423ef5058bba7f26280c5b9c5465" + "11.0.1": + url: "https://github.com/fmtlib/fmt/releases/download/11.0.1/fmt-11.0.1.zip" + sha256: "62ca45531814109b5d6cef0cf2fd17db92c32a30dd23012976e768c685534814" + "11.0.0": + url: "https://github.com/fmtlib/fmt/releases/download/11.0.0/fmt-11.0.0.zip" + sha256: "583ce480ef07fad76ef86e1e2a639fc231c3daa86c4aa6bcba524ce908f30699" "10.2.1": url: "https://github.com/fmtlib/fmt/releases/download/10.2.1/fmt-10.2.1.zip" sha256: "312151a2d13c8327f5c9c586ac6cf7cddc1658e8f53edae0ec56509c8fa516c9" diff --git a/recipes/fmt/all/conanfile.py b/recipes/fmt/all/conanfile.py index fb9118c45657f..86da321d03862 100644 --- a/recipes/fmt/all/conanfile.py +++ b/recipes/fmt/all/conanfile.py @@ -6,17 +6,18 @@ from conan.tools.layout import basic_layout from conan.tools.build import check_min_cppstd from conan.tools.scm import Version +from conan.tools.microsoft import is_msvc required_conan_version = ">=1.53.0" class FmtConan(ConanFile): name = "fmt" - homepage = "https://github.com/fmtlib/fmt" description = "A safe and fast alternative to printf and IOStreams." - topics = ("format", "iostream", "printf") - url = "https://github.com/conan-io/conan-center-index" license = "MIT" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/fmtlib/fmt" + topics = ("format", "iostream", "printf") package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { @@ -25,6 +26,7 @@ class FmtConan(ConanFile): "fPIC": [True, False], "with_fmt_alias": [True, False], "with_os_api": [True, False], + "with_unicode": [True, False], } default_options = { "header_only": False, @@ -32,12 +34,17 @@ class FmtConan(ConanFile): "fPIC": True, "with_fmt_alias": False, "with_os_api": True, + "with_unicode": True, } @property def _has_with_os_api_option(self): return Version(self.version) >= "7.0.0" + @property + def _has_with_unicode_option(self): + return Version(self.version) >= "11.0.0" + def export_sources(self): export_conandata_patches(self) @@ -48,6 +55,8 @@ def config_options(self): del self.options.with_os_api elif str(self.settings.os) == "baremetal": self.options.with_os_api = False + if not self._has_with_unicode_option: + del self.options.with_unicode def configure(self): if self.options.header_only: @@ -85,6 +94,8 @@ def generate(self): tc.cache_variables["FMT_LIB_DIR"] = "lib" if self._has_with_os_api_option: tc.cache_variables["FMT_OS"] = bool(self.options.with_os_api) + if self._has_with_unicode_option: + tc.cache_variables["FMT_UNICODE"] = bool(self.options.with_unicode) tc.generate() def build(self): @@ -115,6 +126,9 @@ def package_info(self): self.cpp_info.set_property("cmake_target_name", f"fmt::{target}") self.cpp_info.set_property("pkg_config_name", "fmt") + if self.options.get_safe("with_unicode") and is_msvc(self): + self.cpp_info.components["_fmt"].cxxflags.append("/utf-8") + # TODO: back to global scope in conan v2 once cmake_find_package* generators removed if self.options.with_fmt_alias: self.cpp_info.components["_fmt"].defines.append("FMT_STRING_ALIAS=1") @@ -123,7 +137,6 @@ def package_info(self): self.cpp_info.components["_fmt"].defines.append("FMT_HEADER_ONLY=1") self.cpp_info.components["_fmt"].libdirs = [] self.cpp_info.components["_fmt"].bindirs = [] - else: postfix = "d" if self.settings.build_type == "Debug" else "" libname = "fmt" + postfix diff --git a/recipes/fmt/all/patches/fix-install-6.0.0.patch b/recipes/fmt/all/patches/fix-install-6.0.0.patch deleted file mode 100644 index c64f2ea628b1b..0000000000000 --- a/recipes/fmt/all/patches/fix-install-6.0.0.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -259,7 +259,9 @@ if (FMT_INSTALL) - - # Install the library and headers. - install(TARGETS ${INSTALL_TARGETS} EXPORT ${targets_export_name} -- DESTINATION ${FMT_LIB_DIR}) -+ LIBRARY DESTINATION ${FMT_LIB_DIR} -+ ARCHIVE DESTINATION ${FMT_LIB_DIR} -+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) - - install(FILES $ - DESTINATION ${FMT_LIB_DIR} OPTIONAL) diff --git a/recipes/fmt/all/patches/fix-mingw-msvc2015-export-assert-fail-6.1.0.patch b/recipes/fmt/all/patches/fix-mingw-msvc2015-export-assert-fail-6.1.0.patch deleted file mode 100644 index 4623c31cff962..0000000000000 --- a/recipes/fmt/all/patches/fix-mingw-msvc2015-export-assert-fail-6.1.0.patch +++ /dev/null @@ -1,23 +0,0 @@ ---- a/include/fmt/core.h -+++ b/include/fmt/core.h -@@ -167,9 +167,9 @@ - - #if !defined(FMT_HEADER_ONLY) && defined(_WIN32) - # ifdef FMT_EXPORT --# define FMT_API __pragma(warning(suppress : 4275)) __declspec(dllexport) -+# define FMT_API __declspec(dllexport) - # elif defined(FMT_SHARED) --# define FMT_API __pragma(warning(suppress : 4275)) __declspec(dllimport) -+# define FMT_API __declspec(dllimport) - # define FMT_EXTERN_TEMPLATE_API FMT_API - # endif - #endif -@@ -224,7 +224,7 @@ namespace internal { - // A workaround for gcc 4.8 to make void_t work in a SFINAE context. - template struct void_t_impl { using type = void; }; - --void assert_fail(const char* file, int line, const char* message); -+FMT_API void assert_fail(const char* file, int line, const char* message); - - #ifndef FMT_ASSERT - # ifdef NDEBUG diff --git a/recipes/fmt/all/test_package/test_package.cpp b/recipes/fmt/all/test_package/test_package.cpp index 736bcb6a40958..c8074af5f8eff 100644 --- a/recipes/fmt/all/test_package/test_package.cpp +++ b/recipes/fmt/all/test_package/test_package.cpp @@ -40,7 +40,6 @@ namespace fmt { int main() { const std::string thing("World"); fmt::print("PRINT: Hello {}!\n", thing); - fmt::printf("PRINTF: Hello, %s!\n", thing); const std::string formatted = fmt::format("{0}{1}{0}", "abra", "cad"); fmt::print("{}\n", formatted); diff --git a/recipes/fmt/config.yml b/recipes/fmt/config.yml index fdd60b40c6f86..22c106719d701 100644 --- a/recipes/fmt/config.yml +++ b/recipes/fmt/config.yml @@ -1,4 +1,10 @@ versions: + "11.0.2": + folder: all + "11.0.1": + folder: all + "11.0.0": + folder: all "10.2.1": folder: all "10.2.0": diff --git a/recipes/folly/all/CMakeLists.txt b/recipes/folly/all/CMakeLists.txt deleted file mode 100644 index 61f3d3b039e2b..0000000000000 --- a/recipes/folly/all/CMakeLists.txt +++ /dev/null @@ -1,7 +0,0 @@ -cmake_minimum_required(VERSION 3.1) -project(cmake_wrapper) - -include(conanbuildinfo.cmake) -conan_basic_setup(KEEP_RPATHS) - -add_subdirectory("source_subfolder") diff --git a/recipes/folly/all/conan_deps.cmake b/recipes/folly/all/conan_deps.cmake new file mode 100644 index 0000000000000..075e362b62636 --- /dev/null +++ b/recipes/folly/all/conan_deps.cmake @@ -0,0 +1,45 @@ +cmake_minimum_required(VERSION 3.17) +# Set the dependency flags expected by https://github.com/facebook/folly/blob/v2023.12.18.00/CMake/folly-deps.cmake + +macro(custom_find_package package_name variable_prefix) + find_package(${package_name} REQUIRED CONFIG ${ARGN}) + list(APPEND FROM FOUND VERSION VERSION_STRING INCLUDE_DIRS INCLUDE_DIR INCLUDE_DIR LIBRARIES LIBRARIES LIBRARIES DEFINITIONS) + list(APPEND TO FOUND VERSION VERSION_STRING INCLUDE_DIRS INCLUDE_DIR INCLUDE LIB LIBRARY LIBRARIES DEFINITIONS) + + foreach (from_substr to_substr IN ZIP_LISTS FROM TO) + set(src_var ${package_name}_${from_substr}) + set(dst_var ${variable_prefix}_${to_substr}) + if (NOT DEFINED ${src_var}) + continue() + endif() + if ((DEFINED ${dst_var}) AND ("${${dst_var}}" STREQUAL "${${src_var}}")) + # if they're equal, skip + continue() + endif() + message(DEBUG "custom_find_package definining ${dst_var} with ${src_var} contents: ${${src_var}}") + set(${dst_var} ${${src_var}}) + endforeach() +endmacro() + +custom_find_package(BZip2 BZIP2) +custom_find_package(DoubleConversion DOUBLE_CONVERSION REQUIRED) +custom_find_package(Gflags LIBGFLAGS) +custom_find_package(Glog GLOG) +custom_find_package(LZ4 LZ4) +custom_find_package(LibEvent LIBEVENT REQUIRED) +custom_find_package(LibLZMA LIBLZMA) +custom_find_package(Libsodium LIBSODIUM) +custom_find_package(OpenSSL OPENSSL REQUIRED) +custom_find_package(Snappy SNAPPY) +custom_find_package(ZLIB ZLIB) +custom_find_package(Zstd ZSTD) +custom_find_package(fmt FMT REQUIRED) + +if (NOT MSVC) + custom_find_package(LibDwarf LIBDWARF) +endif() +if (UNIX AND NOT APPLE) + custom_find_package(LibUring LIBURING) + custom_find_package(LibUnwind LIBUNWIND) + custom_find_package(Libiberty LIBIBERTY) +endif() \ No newline at end of file diff --git a/recipes/folly/all/conandata.yml b/recipes/folly/all/conandata.yml index 8fcc8945ab40d..a21030554ee04 100644 --- a/recipes/folly/all/conandata.yml +++ b/recipes/folly/all/conandata.yml @@ -1,56 +1,4 @@ sources: - "2019.10.21.00": - url: "https://github.com/facebook/folly/archive/v2019.10.21.00.tar.gz" - sha256: "6efcc2b2090691a9fe3d339c433d102d6399bbdc6dc4893080d59f15f648f393" - "2020.08.10.00": - url: "https://github.com/facebook/folly/archive/v2020.08.10.00.tar.gz" - sha256: "e81140d04a4e89e3f848e528466a9b3d3ae37d7eeb9e65467fca50d70918eef6" - "2022.01.31.00": - url: "https://github.com/facebook/folly/archive/v2022.01.31.00.tar.gz" - sha256: "d764b9a7832d967bb7cfea4bcda15d650315aa4d559fde1da2a52b015cd88b9c" -patches: - "2019.10.21.00": - - patch_file: "patches/0001-find-packages.patch" - base_path: "source_subfolder" - - patch_file: "patches/0002-compiler-flags.patch" - base_path: "source_subfolder" - - patch_file: "patches/0003-boost-shared-ptr.patch" - base_path: "source_subfolder" - - patch_file: "patches/0004-disable-posix-names.patch" - base_path: "source_subfolder" - - patch_file: "patches/0005-include-atomic.patch" - base_path: "source_subfolder" - - patch_file: "patches/0006-duplicate-hash.patch" - base_path: "source_subfolder" - - patch_file: "patches/0007-allow-builtins.patch" - base_path: "source_subfolder" - - patch_file: "patches/0013-include-bit.patch" - base_path: "source_subfolder" - - patch_file: "patches/0020-include-ssizet.patch" - base_path: "source_subfolder" - "2020.08.10.00": - - patch_file: "patches/0008-find-packages.patch" - base_path: "source_subfolder" - - patch_file: "patches/0009-ill-formed-atomic-copy.patch" - base_path: "source_subfolder" - - patch_file: "patches/0010-duplicate-hash.patch" - base_path: "source_subfolder" - - patch_file: "patches/0011-disable-logger-example.patch" - base_path: "source_subfolder" - - patch_file: "patches/0012-compiler-flags.patch" - base_path: "source_subfolder" - - patch_file: "patches/0014-find-librt.patch" - base_path: "source_subfolder" - - patch_file: "patches/0015-benchmark-format-macros.patch" - base_path: "source_subfolder" - "2022.01.31.00": - - patch_file: "patches/0016-find-packages.patch" - base_path: "source_subfolder" - - patch_file: "patches/0017-compiler-flags.patch" - base_path: "source_subfolder" - - patch_file: "patches/0018-find-glog.patch" - base_path: "source_subfolder" - - patch_file: "patches/0019-exclude-example.patch" - base_path: "source_subfolder" - - patch_file: "patches/0022-fix-windows-minmax.patch" - base_path: "source_subfolder" + "2024.08.12.00": + url: "https://github.com/facebook/folly/releases/download/v2024.08.12.00/folly-v2024.08.12.00.tar.gz" + sha256: "18d7be721721db547cb9c5dd5cc50df05cd88b0a8e683e3126ec6f9ce2c41c4d" diff --git a/recipes/folly/all/conanfile.py b/recipes/folly/all/conanfile.py index 06dc6965155a7..7b2eee5c31d02 100755 --- a/recipes/folly/all/conanfile.py +++ b/recipes/folly/all/conanfile.py @@ -1,14 +1,16 @@ -from conan.tools.microsoft import is_msvc, msvc_runtime_flag -from conan.tools.build import can_run -from conan.tools.scm import Version -from conan.tools import files from conan import ConanFile -from conans import CMake, tools from conan.errors import ConanInvalidConfiguration -import functools +from conan.tools.apple import is_apple_os +from conan.tools.build import check_min_cppstd, cross_building +from conan.tools.env import VirtualBuildEnv +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.files import get, copy, rmdir, replace_in_file, save, rm +from conan.tools.microsoft import is_msvc, is_msvc_static_runtime +from conan.tools.scm import Version import os -required_conan_version = ">=1.45.0" + +required_conan_version = ">=1.54.0" class FollyConan(ConanFile): @@ -19,278 +21,263 @@ class FollyConan(ConanFile): homepage = "https://github.com/facebook/folly" license = "Apache-2.0" + package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], "fPIC": [True, False], - "use_sse4_2" : [True, False], } default_options = { "shared": False, "fPIC": True, - "use_sse4_2" : False } - generators = "cmake", "cmake_find_package" - @property - def _source_subfolder(self): - return "source_subfolder" + def _min_cppstd(self): + return 17 @property - def _minimum_cpp_standard(self): - return 17 if Version(self.version) >= "2022.01.31.00" else 14 - - @property - def _minimum_compilers_version(self): + def _compilers_minimum_version(self): + # https://github.com/facebook/folly/blob/v2024.07.08.00/folly/Portability.h return { - "Visual Studio": "15", - "gcc": "5", - "clang": "6", - "apple-clang": "8", - } if self._minimum_cpp_standard == 14 else { - "gcc": "7", + "gcc": "10", + "clang": "10", + "apple-clang": "14", + "msvc": "192", "Visual Studio": "16", - "clang": "6", - "apple-clang": "10", } def export_sources(self): - self.copy("CMakeLists.txt") - for patch in self.conan_data.get("patches", {}).get(self.version, []): - self.copy(patch["patch_file"]) - + copy(self, "conan_deps.cmake", self.recipe_folder, os.path.join(self.export_sources_folder, "src")) def config_options(self): if self.settings.os == "Windows": del self.options.fPIC - if str(self.settings.arch) not in ['x86', 'x86_64']: - del self.options.use_sse4_2 - def configure(self): if self.options.shared: - del self.options.fPIC + self.options.rm_safe("fPIC") + if is_msvc(self): + # Folly does not support shared library on Windows: https://github.com/facebook/folly/issues/962 + self.package_type = "static-library" + del self.options.shared + + def layout(self): + cmake_layout(self, src_folder="src") def requirements(self): - self.requires("boost/1.78.0") + self.requires("boost/1.85.0", transitive_headers=True, transitive_libs=True) self.requires("bzip2/1.0.8") - self.requires("double-conversion/3.2.0") + self.requires("double-conversion/3.3.0", transitive_headers=True, transitive_libs=True) self.requires("gflags/2.2.2") - self.requires("glog/0.4.0") - self.requires("libevent/2.1.12") - self.requires("openssl/1.1.1q") - self.requires("lz4/1.9.3") - self.requires("snappy/1.1.9") - self.requires("zlib/1.2.12") - self.requires("zstd/1.5.2") + self.requires("glog/0.7.1", transitive_headers=True, transitive_libs=True) + self.requires("libevent/2.1.12", transitive_headers=True, transitive_libs=True) + self.requires("openssl/[>=1.1 <4]") + self.requires("lz4/1.10.0", transitive_libs=True) + self.requires("snappy/1.2.1") + self.requires("zlib/[>=1.2.11 <2]") + self.requires("zstd/1.5.5", transitive_libs=True) if not is_msvc(self): - self.requires("libdwarf/20191104") - self.requires("libsodium/1.0.18") - self.requires("xz_utils/5.2.5") - # FIXME: Causing compilation issues on clang: self.requires("jemalloc/5.2.1") - if self.settings.os == "Linux": + self.requires("libdwarf/0.9.1") + self.requires("libsodium/1.0.19") + self.requires("xz_utils/[>=5.4.5 <6]") + if self.settings.os in ["Linux", "FreeBSD"]: self.requires("libiberty/9.1.0") - self.requires("libunwind/1.5.0") - if Version(self.version) >= "2020.08.10.00": - self.requires("fmt/7.1.3") + self.requires("libunwind/1.8.0") + if self.settings.os == "Linux": + self.requires("liburing/2.6") + # INFO: Folly does not support fmt 11 on MSVC: https://github.com/facebook/folly/issues/2250 + self.requires("fmt/10.2.1", transitive_headers=True, transitive_libs=True) + + def build_requirements(self): + # INFO: Required due ZIP_LISTS CMake feature in conan_deps.cmake + self.tool_requires("cmake/[>=3.17 <4]") @property def _required_boost_components(self): return ["context", "filesystem", "program_options", "regex", "system", "thread"] + @property + def _required_boost_conan_components(self): + return [f"boost::{comp}" for comp in self._required_boost_components] + + @property + def _required_boost_cmake_targets(self): + return [f"Boost::{comp}" for comp in self._required_boost_components] + def validate(self): - if self.settings.compiler.get_safe("cppstd"): - tools.check_min_cppstd(self, self._minimum_cpp_standard) - min_version = self._minimum_compilers_version.get(str(self.settings.compiler)) - if not min_version: - self.output.warn("{} recipe lacks information about the {} compiler support.".format(self.name, self.settings.compiler)) - else: - if Version(self.settings.compiler.version) < min_version: - raise ConanInvalidConfiguration("{} requires C++{} support. The current compiler {} {} does not support it.".format( - self.name, self._minimum_cpp_standard, self.settings.compiler, self.settings.compiler.version)) - - if Version(self.version) < "2022.01.31.00" and self.settings.os != "Linux": - raise ConanInvalidConfiguration("Conan support for non-Linux platforms starts with Folly version 2022.01.31.00") - - if self.settings.os == "Macos" and self.settings.arch != "x86_64": - raise ConanInvalidConfiguration("Conan currently requires a 64bit target architecture for Folly on Macos") + if self.settings.compiler.cppstd: + check_min_cppstd(self, self._min_cppstd) + minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) + if minimum_version and Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration(f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support.") if self.settings.os == "Windows" and self.settings.arch != "x86_64": - raise ConanInvalidConfiguration("Folly requires a 64bit target architecture on Windows") - - if self.settings.os in ["Macos", "Windows"] and self.options.shared: - raise ConanInvalidConfiguration("Folly could not be built on {} as shared library".format(self.settings.os)) + raise ConanInvalidConfiguration(f"{self.ref} Folly requires a 64bit target architecture on Windows.") - if Version(self.version) == "2020.08.10.00" and self.settings.compiler == "clang" and self.options.shared: - raise ConanInvalidConfiguration("Folly could not be built by clang as a shared library") + if self.settings.compiler == "apple-clang" and Version(self.settings.compiler.version) < "14.0": + # https://github.com/facebook/folly/issues/2266 + raise ConanInvalidConfiguration(f"{self.ref} could not be built by apple-clang < 14.0. Use apple-clang >= 14.0") - if self.options["boost"].header_only: - raise ConanInvalidConfiguration("Folly could not be built with a header only Boost") + boost = self.dependencies["boost"] + if boost.options.header_only: + raise ConanInvalidConfiguration(f"{self.ref} could not be built with a header only Boost. Use -o 'boost/*:header_only=False'") - miss_boost_required_comp = any(getattr(self.options["boost"], "without_{}".format(boost_comp), True) for boost_comp in self._required_boost_components) + miss_boost_required_comp = any(getattr(boost.options, f"without_{boost_comp}", True) for boost_comp in self._required_boost_components) if miss_boost_required_comp: - raise ConanInvalidConfiguration("Folly requires these boost components: {}".format(", ".join(self._required_boost_components))) - - min_version = self._minimum_compilers_version.get(str(self.settings.compiler)) - if not min_version: - self.output.warn("{} recipe lacks information about the {} compiler support.".format(self.name, self.settings.compiler)) - else: - if Version(self.settings.compiler.version) < min_version: - raise ConanInvalidConfiguration("{} requires C++{} support. The current compiler {} {} does not support it.".format( - self.name, self._minimum_cpp_standard, self.settings.compiler, self.settings.compiler.version)) - - if self.options.get_safe("use_sse4_2") and str(self.settings.arch) not in ['x86', 'x86_64']: - raise ConanInvalidConfiguration(f"{self.ref} can use the option use_sse4_2 only on x86 and x86_64 archs.") - - # FIXME: Freeze max. CMake version at 3.16.2 to fix the Linux build - def build_requirements(self): - self.build_requires("cmake/3.16.9") + required_components = ", ".join(self._required_boost_components) + raise ConanInvalidConfiguration(f"{self.ref} requires these Boost components: {required_components}. Try with '-o boost/*:without_{required_components}=False'") def source(self): - files.get(self, **self.conan_data["sources"][self.version], destination=self._source_subfolder, strip_root=True) + get(self, **self.conan_data["sources"][self.version], strip_root=False) + + def _cppstd_flag_value(self, cppstd): + if is_msvc(self): + prefix = "c" + year = str(cppstd) + if year > "17": + year = "latest" + return f"{prefix}++{year}" + + def generate(self): + env = VirtualBuildEnv(self) + env.generate() + tc = CMakeToolchain(self) + tc.variables["CMAKE_PROJECT_folly_INCLUDE"] = "conan_deps.cmake" + # Folly fails to check Gflags: https://github.com/conan-io/conan/issues/12012 + tc.variables["CMAKE_TRY_COMPILE_CONFIGURATION"] = str(self.settings.build_type) + + if is_apple_os(self) and cross_building(self): + # INFO: Folly fails to configure Mac M1 -> Mac Intel: + # CMake Error: try_run() invoked in cross-compiling mode, please set the following cache variables appropriately: HAVE_VSNPRINTF_ERRORS_EXITCODE (advanced) + for var in ["FOLLY_HAVE_UNALIGNED_ACCESS", "FOLLY_HAVE_LINUX_VDSO", "FOLLY_HAVE_WCHAR_SUPPORT", "HAVE_VSNPRINTF_ERRORS"]: + tc.cache_variables[f"{var}_EXITCODE"] = 0 + + # Folly is not respecting this from the helper https://github.com/conan-io/conan-center-index/pull/15726/files#r1097068754 + tc.cache_variables["CMAKE_POSITION_INDEPENDENT_CODE"] = self.options.get_safe("fPIC", True) + # Relocatable shared lib on Macos + if is_apple_os(self): + tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0042"] = "NEW" + # Honor BUILD_SHARED_LIBS from conan_toolchain (see https://github.com/conan-io/conan/issues/11840) + tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0077"] = "NEW" + # Honor Boost_ROOT set by boost recipe + tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0074"] = "NEW" + + + # 2019.10.21.00 -> either MSVC_ flags or CXX_STD + if is_msvc(self): + cxx_std_value = self._cppstd_flag_value(self.settings.get_safe("compiler.cppstd", self._min_cppstd)) + tc.cache_variables["MSVC_LANGUAGE_VERSION"] = cxx_std_value + tc.cache_variables["MSVC_ENABLE_ALL_WARNINGS"] = False + tc.cache_variables["MSVC_USE_STATIC_RUNTIME"] = is_msvc_static_runtime(self) + tc.preprocessor_definitions["NOMINMAX"] = "" + + if not self.dependencies["boost"].options.header_only: + tc.cache_variables["BOOST_LINK_STATIC"] = not self.dependencies["boost"].options.shared + + tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0074"] = "NEW" # Honor Boost_ROOT set by boost recipe + tc.generate() + + deps = CMakeDeps(self) + deps.set_property("boost", "cmake_file_name", "Boost") + deps.set_property("bzip2", "cmake_file_name", "BZip2") + deps.set_property("double-conversion", "cmake_file_name", "DoubleConversion") + deps.set_property("fmt", "cmake_file_name", "fmt") + deps.set_property("gflags", "cmake_file_name", "Gflags") + deps.set_property("glog", "cmake_file_name", "Glog") + deps.set_property("libdwarf", "cmake_file_name", "LibDwarf") + deps.set_property("libevent", "cmake_file_name", "LibEvent") + deps.set_property("libiberty", "cmake_file_name", "Libiberty") + deps.set_property("libsodium", "cmake_file_name", "Libsodium") + deps.set_property("libunwind", "cmake_file_name", "LibUnwind") + deps.set_property("liburing", "cmake_file_name", "LibUring") + deps.set_property("lz4", "cmake_file_name", "LZ4") + deps.set_property("openssl", "cmake_file_name", "OpenSSL") + deps.set_property("snappy", "cmake_file_name", "Snappy") + deps.set_property("xz_utils", "cmake_file_name", "LibLZMA") + deps.set_property("zlib", "cmake_file_name", "ZLIB") + deps.set_property("zstd", "cmake_file_name", "Zstd") + deps.generate() + + def _patch_sources(self): + # Make sure will consume Conan dependencies + folly_deps = os.path.join(self.source_folder, "CMake", "folly-deps.cmake") + replace_in_file(self, folly_deps, " MODULE", " REQUIRED CONFIG") + replace_in_file(self, folly_deps, "${Boost_LIBRARIES}", f"{' '.join(self._required_boost_cmake_targets)}") + replace_in_file(self, folly_deps, "OpenSSL 1.1.1", "OpenSSL") + # Disable example + save(self, os.path.join(self.source_folder, "folly", "logging", "example", "CMakeLists.txt"), "") + # Disable custom find modules to use Conan CMakeDeps instead + rm(self, "Find*.cmake", os.path.join(self.source_folder, "CMake")) + rm(self, "Find*.cmake", os.path.join(self.source_folder, "build", "fbcode_builder", "CMake")) + # Skip generating .pc file to avoid Windows errors when trying to compile with pkg-config + replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), "gen_pkgconfig_vars(FOLLY_PKGCONFIG folly_deps)", "") - @functools.lru_cache(1) - def _configure_cmake(self): + def build(self): + self._patch_sources() cmake = CMake(self) - if can_run(self): - cmake.definitions["FOLLY_HAVE_UNALIGNED_ACCESS_EXITCODE"] = "0" - cmake.definitions["FOLLY_HAVE_UNALIGNED_ACCESS_EXITCODE__TRYRUN_OUTPUT"] = "" - cmake.definitions["FOLLY_HAVE_LINUX_VDSO_EXITCODE"] = "0" - cmake.definitions["FOLLY_HAVE_LINUX_VDSO_EXITCODE__TRYRUN_OUTPUT"] = "" - cmake.definitions["FOLLY_HAVE_WCHAR_SUPPORT_EXITCODE"] = "0" - cmake.definitions["FOLLY_HAVE_WCHAR_SUPPORT_EXITCODE__TRYRUN_OUTPUT"] = "" - cmake.definitions["HAVE_VSNPRINTF_ERRORS_EXITCODE"] = "0" - cmake.definitions["HAVE_VSNPRINTF_ERRORS_EXITCODE__TRYRUN_OUTPUT"] = "" - - if self.options.get_safe("use_sse4_2") and str(self.settings.arch) in ['x86', 'x86_64']: - # in folly, if simd >=sse4.2, we also needs -mfma flag to avoid compiling error. - if not is_msvc(self): - cmake.definitions["CMAKE_C_FLAGS"] = "-mfma" - cmake.definitions["CMAKE_CXX_FLAGS"] = "-mfma" - else: - cmake.definitions["CMAKE_C_FLAGS"] = "/arch:FMA" - cmake.definitions["CMAKE_CXX_FLAGS"] = "/arch:FMA" - - cmake.definitions["CMAKE_POSITION_INDEPENDENT_CODE"] = self.options.get_safe("fPIC", True) - - cxx_std_flag = tools.cppstd_flag(self.settings) - cxx_std_value = cxx_std_flag.split('=')[1] if cxx_std_flag else "c++{}".format(self._minimum_cpp_standard) - cmake.definitions["CXX_STD"] = cxx_std_value - if is_msvc: - cmake.definitions["MSVC_LANGUAGE_VERSION"] = cxx_std_value - cmake.definitions["MSVC_ENABLE_ALL_WARNINGS"] = False - cmake.definitions["MSVC_USE_STATIC_RUNTIME"] = "MT" in msvc_runtime_flag(self) cmake.configure() - return cmake - - - def build(self): - for patch in self.conan_data.get("patches", {}).get(self.version, []): - tools.patch(**patch) - cmake = self._configure_cmake() cmake.build() def package(self): - self.copy(pattern="LICENSE", dst="licenses", src=self._source_subfolder) - cmake = self._configure_cmake() + copy(self, pattern="LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) + cmake = CMake(self) cmake.install() - files.rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) - files.rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) + rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) + rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) def package_info(self): self.cpp_info.set_property("cmake_file_name", "folly") - self.cpp_info.set_property("cmake_target_name", "Folly::folly") + self.cpp_info.set_property("cmake_target_name", "folly::folly") self.cpp_info.set_property("pkg_config_name", "libfolly") - # TODO: back to global scope in conan v2 once cmake_find_package_* generators removed - if Version(self.version) == "2019.10.21.00": - self.cpp_info.components["libfolly"].libs = [ - "follybenchmark", - "folly_test_util", - "folly" - ] - elif Version(self.version) >= "2020.08.10.00": - if self.settings.os == "Linux": - self.cpp_info.components["libfolly"].libs = [ - "folly_exception_counter", - "folly_exception_tracer", - "folly_exception_tracer_base", - "folly_test_util", - "follybenchmark", - "folly" - ] - else: - self.cpp_info.components["libfolly"].libs = [ - "folly_test_util", - "follybenchmark", - "folly" - ] - - self.cpp_info.components["libfolly"].requires = [ - "boost::boost", - "bzip2::bzip2", + self.cpp_info.components["libfolly"].set_property("cmake_target_name", "Folly::folly") + self.cpp_info.components["libfolly"].set_property("pkg_config_name", "libfolly") + self.cpp_info.components["libfolly"].libs = ["folly"] + self.cpp_info.components["libfolly"].requires = ["fmt::fmt"] + self._required_boost_conan_components + [ "double-conversion::double-conversion", "gflags::gflags", "glog::glog", "libevent::libevent", "lz4::lz4", "openssl::openssl", + "bzip2::bzip2", "snappy::snappy", "zlib::zlib", "zstd::zstd", "libsodium::libsodium", - "xz_utils::xz_utils" + "xz_utils::xz_utils", ] if not is_msvc(self): self.cpp_info.components["libfolly"].requires.append("libdwarf::libdwarf") - if self.settings.os == "Linux": + if self.settings.os in ["Linux", "FreeBSD"]: self.cpp_info.components["libfolly"].requires.extend(["libiberty::libiberty", "libunwind::libunwind"]) + if self.settings.os == "Linux": + self.cpp_info.components["libfolly"].requires.append("liburing::liburing") self.cpp_info.components["libfolly"].system_libs.extend(["pthread", "dl", "rt"]) - - if Version(self.version) >= "2020.08.10.00": - self.cpp_info.components["libfolly"].requires.append("fmt::fmt") - if self.settings.os == "Linux": - self.cpp_info.components["libfolly"].defines.extend(["FOLLY_HAVE_ELF", "FOLLY_HAVE_DWARF"]) - + self.cpp_info.components["libfolly"].defines.extend(["FOLLY_HAVE_ELF", "FOLLY_HAVE_DWARF"]) elif self.settings.os == "Windows": self.cpp_info.components["libfolly"].system_libs.extend(["ws2_32", "iphlpapi", "crypt32"]) - if (self.settings.os == "Linux" and self.settings.compiler == "clang" and - self.settings.compiler.libcxx == "libstdc++") or \ - (self.settings.os == "Macos" and self.settings.compiler == "apple-clang" and - Version(self.settings.compiler.version.value) == "9.0" and self.settings.compiler.libcxx == "libc++"): + if self.settings.get_safe("compiler.libcxx") == "libstdc++" or \ + (self.settings.compiler == "apple-clang" and Version(self.settings.compiler.version.value) == "9.0" and \ + self.settings.get_safe("compiler.libcxx") == "libc++"): self.cpp_info.components["libfolly"].system_libs.append("atomic") - if self.settings.os == "Macos" and self.settings.compiler == "apple-clang" and Version(self.settings.compiler.version.value) >= "11.0": + if self.settings.compiler == "apple-clang" and Version(self.settings.compiler.version.value) >= "11.0": self.cpp_info.components["libfolly"].system_libs.append("c++abi") - if self.options.get_safe("use_sse4_2") and str(self.settings.arch) in ['x86', 'x86_64']: - self.cpp_info.components["libfolly"].defines = ["FOLLY_SSE=4", "FOLLY_SSE_MINOR=2"] - - # TODO: to remove in conan v2 once cmake_find_package_* & pkg_config generators removed - self.cpp_info.filenames["cmake_find_package"] = "folly" - self.cpp_info.filenames["cmake_find_package_multi"] = "folly" - self.cpp_info.names["cmake_find_package"] = "Folly" - self.cpp_info.names["cmake_find_package_multi"] = "Folly" - self.cpp_info.names["pkg_config"] = "libfolly" - self.cpp_info.components["libfolly"].names["cmake_find_package"] = "folly" - self.cpp_info.components["libfolly"].names["cmake_find_package_multi"] = "folly" - self.cpp_info.components["libfolly"].set_property("cmake_target_name", "Folly::folly") - self.cpp_info.components["libfolly"].set_property("pkg_config_name", "libfolly") - - if Version(self.version) >= "2019.10.21.00": - self.cpp_info.components["follybenchmark"].set_property("cmake_target_name", "Folly::follybenchmark") - self.cpp_info.components["follybenchmark"].set_property("pkg_config_name", "libfollybenchmark") - self.cpp_info.components["follybenchmark"].libs = ["follybenchmark"] - self.cpp_info.components["follybenchmark"].requires = ["libfolly"] + self.cpp_info.components["follybenchmark"].set_property("cmake_target_name", "Folly::follybenchmark") + self.cpp_info.components["follybenchmark"].set_property("pkg_config_name", "libfollybenchmark") + self.cpp_info.components["follybenchmark"].libs = ["follybenchmark"] + self.cpp_info.components["follybenchmark"].requires = ["libfolly"] - self.cpp_info.components["folly_test_util"].set_property("cmake_target_name", "Folly::folly_test_util") - self.cpp_info.components["folly_test_util"].set_property("pkg_config_name", "libfolly_test_util") - self.cpp_info.components["folly_test_util"].libs = ["folly_test_util"] - self.cpp_info.components["folly_test_util"].requires = ["libfolly"] + self.cpp_info.components["folly_test_util"].set_property("cmake_target_name", "Folly::folly_test_util") + self.cpp_info.components["folly_test_util"].set_property("pkg_config_name", "libfolly_test_util") + self.cpp_info.components["folly_test_util"].libs = ["folly_test_util"] + self.cpp_info.components["folly_test_util"].requires = ["libfolly"] - if Version(self.version) >= "2020.08.10.00" and self.settings.os == "Linux": + if self.settings.os in ["Linux", "FreeBSD"]: self.cpp_info.components["folly_exception_tracer_base"].set_property("cmake_target_name", "Folly::folly_exception_tracer_base") self.cpp_info.components["folly_exception_tracer_base"].set_property("pkg_config_name", "libfolly_exception_tracer_base") self.cpp_info.components["folly_exception_tracer_base"].libs = ["folly_exception_tracer_base"] @@ -305,3 +292,26 @@ def package_info(self): self.cpp_info.components["folly_exception_counter"].set_property("pkg_config_name", "libfolly_exception_counter") self.cpp_info.components["folly_exception_counter"].libs = ["folly_exception_counter"] self.cpp_info.components["folly_exception_counter"].requires = ["folly_exception_tracer"] + + # TODO: to remove in conan v2 once cmake_find_package_* & pkg_config generators removed + self.cpp_info.filenames["cmake_find_package"] = "folly" + self.cpp_info.filenames["cmake_find_package_multi"] = "folly" + self.cpp_info.names["cmake_find_package"] = "Folly" + self.cpp_info.names["cmake_find_package_multi"] = "Folly" + self.cpp_info.components["libfolly"].names["cmake_find_package"] = "folly" + self.cpp_info.components["libfolly"].names["cmake_find_package_multi"] = "folly" + + # TODO: to remove in conan v2 once cmake_find_package_* & pkg_config generators removed + self.cpp_info.components["follybenchmark"].names["cmake_find_package"] = "follybenchmark" + self.cpp_info.components["follybenchmark"].names["cmake_find_package_multi"] = "follybenchmark" + self.cpp_info.components["folly_test_util"].names["cmake_find_package"] = "folly_test_util" + self.cpp_info.components["folly_test_util"].names["cmake_find_package_multi"] = "folly_test_util" + + if self.settings.os in ["Linux", "FreeBSD"]: + # TODO: to remove in conan v2 once cmake_find_package_* & pkg_config generators removed + self.cpp_info.components["folly_exception_tracer_base"].names["cmake_find_package"] = "folly_exception_tracer_base" + self.cpp_info.components["folly_exception_tracer_base"].names["cmake_find_package_multi"] = "folly_exception_tracer_base" + self.cpp_info.components["folly_exception_tracer"].names["cmake_find_package"] = "folly_exception_tracer" + self.cpp_info.components["folly_exception_tracer"].names["cmake_find_package_multi"] = "folly_exception_tracer" + self.cpp_info.components["folly_exception_counter"].names["cmake_find_package"] = "folly_exception_counter" + self.cpp_info.components["folly_exception_counter"].names["cmake_find_package_multi"] = "folly_exception_counter" diff --git a/recipes/folly/all/patches/0001-find-packages.patch b/recipes/folly/all/patches/0001-find-packages.patch deleted file mode 100644 index 4cee77cd34c1c..0000000000000 --- a/recipes/folly/all/patches/0001-find-packages.patch +++ /dev/null @@ -1,93 +0,0 @@ -diff --git a/CMake/FindLibsodium.cmake b/CMake/FindLibsodium.cmake -index 18d4d0c..2b3cd2a 100644 ---- a/CMake/FindLibsodium.cmake -+++ b/CMake/FindLibsodium.cmake -@@ -15,7 +15,7 @@ - find_path(LIBSODIUM_INCLUDE_DIR NAMES sodium.h) - mark_as_advanced(LIBSODIUM_INCLUDE_DIR) - --find_library(LIBSODIUM_LIBRARY NAMES sodium) -+find_library(LIBSODIUM_LIBRARY NAMES sodium libsodium PATHS ${CONAN_LIBSODIUM_ROOT}) - mark_as_advanced(LIBSODIUM_LIBRARY) - - include(FindPackageHandleStandardArgs) -diff --git a/CMake/folly-deps.cmake b/CMake/folly-deps.cmake -index 048e1cd..da3ab8e 100644 ---- a/CMake/folly-deps.cmake -+++ b/CMake/folly-deps.cmake -@@ -36,19 +36,19 @@ find_package(DoubleConversion MODULE REQUIRED) - list(APPEND FOLLY_LINK_LIBRARIES ${DOUBLE_CONVERSION_LIBRARY}) - list(APPEND FOLLY_INCLUDE_DIRECTORIES ${DOUBLE_CONVERSION_INCLUDE_DIR}) - --find_package(Gflags MODULE) --set(FOLLY_HAVE_LIBGFLAGS ${LIBGFLAGS_FOUND}) --list(APPEND FOLLY_LINK_LIBRARIES ${LIBGFLAGS_LIBRARY}) --list(APPEND FOLLY_INCLUDE_DIRECTORIES ${LIBGFLAGS_INCLUDE_DIR}) --list(APPEND CMAKE_REQUIRED_LIBRARIES ${LIBGFLAGS_LIBRARY}) --list(APPEND CMAKE_REQUIRED_INCLUDES ${LIBGFLAGS_INCLUDE_DIR}) -- --find_package(Glog MODULE) -+find_package(gflags MODULE REQUIRED) -+set(FOLLY_HAVE_LIBGFLAGS ${GFLAGS_FOUND}) -+list(APPEND FOLLY_LINK_LIBRARIES ${CONAN_LIBS_GFLAGS}) -+list(APPEND FOLLY_INCLUDE_DIRECTORIES ${CONAN_INCLUDE_DIRS_GFLAGS}) -+list(APPEND CMAKE_REQUIRED_LIBRARIES ${gflags_LIBRARY}) -+list(APPEND CMAKE_REQUIRED_INCLUDES ${gflags_INCLUDE_DIR}) -+ -+find_package(glog MODULE) - set(FOLLY_HAVE_LIBGLOG ${GLOG_FOUND}) - list(APPEND FOLLY_LINK_LIBRARIES ${GLOG_LIBRARY}) - list(APPEND FOLLY_INCLUDE_DIRECTORIES ${GLOG_INCLUDE_DIR}) - --find_package(LibEvent MODULE REQUIRED) -+find_package(Libevent MODULE REQUIRED) - list(APPEND FOLLY_LINK_LIBRARIES ${LIBEVENT_LIB}) - list(APPEND FOLLY_INCLUDE_DIRECTORIES ${LIBEVENT_INCLUDE_DIR}) - -diff --git a/build/fbcode_builder/CMake/FindGflags.cmake b/build/fbcode_builder/CMake/FindGflags.cmake -index 246ceac..385605e 100644 ---- a/build/fbcode_builder/CMake/FindGflags.cmake -+++ b/build/fbcode_builder/CMake/FindGflags.cmake -@@ -48,8 +48,13 @@ if (gflags_FOUND) - else() - FIND_PATH(LIBGFLAGS_INCLUDE_DIR gflags/gflags.h) - -- FIND_LIBRARY(LIBGFLAGS_LIBRARY_DEBUG NAMES gflagsd gflags_staticd) -- FIND_LIBRARY(LIBGFLAGS_LIBRARY_RELEASE NAMES gflags gflags_static) -+ if(CMAKE_SYSTEM_NAME STREQUAL "Windows") -+ FIND_LIBRARY(LIBGFLAGS_LIBRARY_DEBUG NAMES gflagsd gflags_nothreads_staticd gflags_nothreads_static_debug PATHS ${CONAN_GFLAGS_ROOT}) -+ FIND_LIBRARY(LIBGFLAGS_LIBRARY_RELEASE NAMES gflags gflags_nothreads_static PATHS ${CONAN_GFLAGS_ROOT}) -+ else() -+ FIND_LIBRARY(LIBGFLAGS_LIBRARY_DEBUG NAMES gflags gflags_nothreads_debug PATHS ${CONAN_GFLAGS_ROOT}) -+ FIND_LIBRARY(LIBGFLAGS_LIBRARY_RELEASE NAMES gflags_nothreads gflags PATHS ${CONAN_GFLAGS_ROOT}) -+ endif() - - INCLUDE(SelectLibraryConfigurations) - SELECT_LIBRARY_CONFIGURATIONS(LIBGFLAGS) -diff --git a/build/fbcode_builder/CMake/FindGlog.cmake b/build/fbcode_builder/CMake/FindGlog.cmake -index a589b2e..15aef75 100644 ---- a/build/fbcode_builder/CMake/FindGlog.cmake -+++ b/build/fbcode_builder/CMake/FindGlog.cmake -@@ -8,8 +8,7 @@ - - include(FindPackageHandleStandardArgs) - --find_library(GLOG_LIBRARY glog -- PATHS ${GLOG_LIBRARYDIR}) -+find_library(GLOG_LIBRARY glog glogd PATHS ${CONAN_GLOG_ROOT}) - - find_path(GLOG_INCLUDE_DIR glog/logging.h - PATHS ${GLOG_INCLUDEDIR}) -diff --git a/build/fbcode_builder/CMake/FindLibEvent.cmake b/build/fbcode_builder/CMake/FindLibEvent.cmake -index dd11ebd..9ef0807 100644 ---- a/build/fbcode_builder/CMake/FindLibEvent.cmake -+++ b/build/fbcode_builder/CMake/FindLibEvent.cmake -@@ -50,7 +50,7 @@ if (TARGET event) - endif() - else() - find_path(LIBEVENT_INCLUDE_DIR event.h PATHS ${LibEvent_INCLUDE_PATHS}) -- find_library(LIBEVENT_LIB NAMES event PATHS ${LibEvent_LIB_PATHS}) -+ find_library(LIBEVENT_LIB NAMES event libevent PATHS ${CONAN_LIBEVENT_ROOT}) - - if (LIBEVENT_LIB AND LIBEVENT_INCLUDE_DIR) - set(LibEvent_FOUND TRUE) diff --git a/recipes/folly/all/patches/0002-compiler-flags.patch b/recipes/folly/all/patches/0002-compiler-flags.patch deleted file mode 100644 index b9213ff6d4895..0000000000000 --- a/recipes/folly/all/patches/0002-compiler-flags.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff --git a/CMake/FollyCompilerUnix.cmake b/CMake/FollyCompilerUnix.cmake -index 7fba75f..019d30f 100644 ---- a/CMake/FollyCompilerUnix.cmake -+++ b/CMake/FollyCompilerUnix.cmake -@@ -28,9 +28,9 @@ set( - ) - mark_as_advanced(CXX_STD) - --set(CMAKE_CXX_FLAGS_COMMON "-g -Wall -Wextra") -+set(CMAKE_CXX_FLAGS_COMMON "-Wall -Wextra") - set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} ${CMAKE_CXX_FLAGS_COMMON}") --set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} ${CMAKE_CXX_FLAGS_COMMON} -O3") -+set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} ${CMAKE_CXX_FLAGS_COMMON}") - - # Note that CMAKE_REQUIRED_FLAGS must be a string, not a list - set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -std=${CXX_STD}") -@@ -44,7 +44,6 @@ function(apply_folly_compile_options_to_target THETARGET) - ) - target_compile_options(${THETARGET} - PRIVATE -- -g - -std=${CXX_STD} - -finput-charset=UTF-8 - -fsigned-char diff --git a/recipes/folly/all/patches/0003-boost-shared-ptr.patch b/recipes/folly/all/patches/0003-boost-shared-ptr.patch deleted file mode 100644 index 7608d6b2e9e2b..0000000000000 --- a/recipes/folly/all/patches/0003-boost-shared-ptr.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff --git a/folly/portability/PThread.cpp b/folly/portability/PThread.cpp -index f8cd6d4..0908668 100644 ---- a/folly/portability/PThread.cpp -+++ b/folly/portability/PThread.cpp -@@ -18,7 +18,9 @@ - - #if !FOLLY_HAVE_PTHREAD && defined(_WIN32) - #include // @manual -- -+#include -+#include -+#include - #include - - #include -@@ -683,7 +685,7 @@ int pthread_setspecific(pthread_key_t key, const void* value) { - // function, which we don't want to do. - boost::detail::set_tss_data( - realKey, -- boost::shared_ptr(), -+ 0,0, - const_cast(value), - false); - return 0; diff --git a/recipes/folly/all/patches/0004-disable-posix-names.patch b/recipes/folly/all/patches/0004-disable-posix-names.patch deleted file mode 100644 index 9efd4e24140e1..0000000000000 --- a/recipes/folly/all/patches/0004-disable-posix-names.patch +++ /dev/null @@ -1,27 +0,0 @@ -diff --git a/folly/portability/Windows.h b/folly/portability/Windows.h -index f7990ca..b22fac5 100644 ---- a/folly/portability/Windows.h -+++ b/folly/portability/Windows.h -@@ -26,16 +26,12 @@ - // These have to be this way because we define our own versions - // of close(), because the normal Windows versions don't handle - // sockets at all. --#ifndef __STDC__ --/* nolint */ --#define __STDC__ 1 --#include // @manual nolint --#include // @manual nolint --#undef __STDC__ --#else --#include // @manual nolint --#include // @manual nolint --#endif -+#include -+#pragma push_macro("_CRT_INTERNAL_NONSTDC_NAMES") -+#define _CRT_INTERNAL_NONSTDC_NAMES 0 -+#include -+#include -+#pragma pop_macro("_CRT_INTERNAL_NONSTDC_NAMES") - - #if defined(min) || defined(max) - #error Windows.h needs to be included by this header, or else NOMINMAX needs \ diff --git a/recipes/folly/all/patches/0005-include-atomic.patch b/recipes/folly/all/patches/0005-include-atomic.patch deleted file mode 100644 index 0eb9382e49a9d..0000000000000 --- a/recipes/folly/all/patches/0005-include-atomic.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/folly/portability/PThread.cpp b/folly/portability/PThread.cpp -index 2891c4c..7c98975 100644 ---- a/folly/portability/PThread.cpp -+++ b/folly/portability/PThread.cpp -@@ -30,6 +30,7 @@ - #include - #include - #include -+#include - - #include - #include diff --git a/recipes/folly/all/patches/0006-duplicate-hash.patch b/recipes/folly/all/patches/0006-duplicate-hash.patch deleted file mode 100644 index f8905d003157e..0000000000000 --- a/recipes/folly/all/patches/0006-duplicate-hash.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/folly/hash/Hash.h b/folly/hash/Hash.h -index 33fa553..4266cf1 100644 ---- a/folly/hash/Hash.h -+++ b/folly/hash/Hash.h -@@ -730,7 +730,7 @@ struct TupleHasher<0, Ts...> { - - // Custom hash functions. - namespace std { --#if FOLLY_SUPPLY_MISSING_INT128_TRAITS -+#if 0 - template <> - struct hash<__int128> : folly::detail::integral_hasher<__int128> {}; - diff --git a/recipes/folly/all/patches/0007-allow-builtins.patch b/recipes/folly/all/patches/0007-allow-builtins.patch deleted file mode 100644 index de09722f02acc..0000000000000 --- a/recipes/folly/all/patches/0007-allow-builtins.patch +++ /dev/null @@ -1,128 +0,0 @@ -diff --git a/folly/portability/Builtins.h b/folly/portability/Builtins.h -index 971cb8819..e68de4456 100644 ---- a/folly/portability/Builtins.h -+++ b/folly/portability/Builtins.h -@@ -41,7 +41,6 @@ FOLLY_ALWAYS_INLINE void __builtin___clear_cache(char* begin, char* end) { - } - } - --#if !defined(_MSC_VER) || (_MSC_VER < 1923) - FOLLY_ALWAYS_INLINE int __builtin_clz(unsigned int x) { - unsigned long index; - return int(_BitScanReverse(&index, (unsigned long)x) ? 31 - index : 32); -@@ -93,7 +92,6 @@ FOLLY_ALWAYS_INLINE int __builtin_ctzll(unsigned long long x) { - return int(_BitScanForward64(&index, x) ? index : 64); - } - #endif --#endif // !defined(_MSC_VER) || (_MSC_VER < 1923) - - FOLLY_ALWAYS_INLINE int __builtin_ffs(int x) { - unsigned long index; -@@ -119,15 +117,12 @@ FOLLY_ALWAYS_INLINE int __builtin_popcount(unsigned int x) { - return int(__popcnt(x)); - } - --#if !defined(_MSC_VER) || (_MSC_VER < 1923) - FOLLY_ALWAYS_INLINE int __builtin_popcountl(unsigned long x) { - static_assert(sizeof(x) == 4, ""); - return int(__popcnt(x)); - } --#endif // !defined(_MSC_VER) || (_MSC_VER < 1923) - #endif - --#if !defined(_MSC_VER) || (_MSC_VER < 1923) - #if defined(_M_IX86) - FOLLY_ALWAYS_INLINE int __builtin_popcountll(unsigned long long x) { - return int(__popcnt((unsigned int)(x >> 32))) + -@@ -138,7 +133,6 @@ FOLLY_ALWAYS_INLINE int __builtin_popcountll(unsigned long long x) { - return int(__popcnt64(x)); - } - #endif --#endif // !defined(_MSC_VER) || (_MSC_VER < 1923) - - FOLLY_ALWAYS_INLINE void* __builtin_return_address(unsigned int frame) { - // I really hope frame is zero... --- - -diff --git a/folly/portability/Builtins.h b/folly/portability/Builtins.h -index e68de4456..30caf4003 100644 ---- a/folly/portability/Builtins.h -+++ b/folly/portability/Builtins.h -@@ -16,7 +16,7 @@ - - #pragma once - --#if defined(_WIN32) && !defined(__clang__) -+#if defined(_WIN32) && !defined(__MINGW32__) && !defined(__clang__) - #include - #include - #include --- -see https://github.com/facebook/folly/issues/1412 -diff --git a/folly/portability/Builtins.h b/folly/portability/Builtins.h -index 30caf4003..e8ef97266 100644 ---- a/folly/portability/Builtins.h -+++ b/folly/portability/Builtins.h -@@ -22,6 +22,14 @@ - #include - #include - -+// MSVC had added support for __builtin_clz etc. in 16.3 (1923) but it will be -+// removed in 16.8 (1928). -+#if (_MSC_VER >= 1923) && (_MSC_VER < 1928) -+#define FOLLY_DETAILFOLLY_DETAIL_MSC_BUILTIN_SUPPORT 1 -+#else -+#define FOLLY_DETAILFOLLY_DETAIL_MSC_BUILTIN_SUPPORT 0 -+#endif -+ - namespace folly { - namespace portability { - namespace detail { -@@ -41,6 +49,7 @@ FOLLY_ALWAYS_INLINE void __builtin___clear_cache(char* begin, char* end) { - } - } - -+#if !defined(_MSC_VER) || !defined(FOLLY_DETAIL_MSC_BUILTIN_SUPPORT) - FOLLY_ALWAYS_INLINE int __builtin_clz(unsigned int x) { - unsigned long index; - return int(_BitScanReverse(&index, (unsigned long)x) ? 31 - index : 32); -@@ -92,6 +101,7 @@ FOLLY_ALWAYS_INLINE int __builtin_ctzll(unsigned long long x) { - return int(_BitScanForward64(&index, x) ? index : 64); - } - #endif -+#endif // !defined(_MSC_VER) || !defined(FOLLY_DETAIL_MSC_BUILTIN_SUPPORT) - - FOLLY_ALWAYS_INLINE int __builtin_ffs(int x) { - unsigned long index; -@@ -117,12 +127,15 @@ FOLLY_ALWAYS_INLINE int __builtin_popcount(unsigned int x) { - return int(__popcnt(x)); - } - -+#if !defined(_MSC_VER) || !defined(FOLLY_DETAIL_MSC_BUILTIN_SUPPORT) - FOLLY_ALWAYS_INLINE int __builtin_popcountl(unsigned long x) { - static_assert(sizeof(x) == 4, ""); - return int(__popcnt(x)); - } -+#endif // !defined(_MSC_VER) || !defined(FOLLY_DETAIL_MSC_BUILTIN_SUPPORT) - #endif - -+#if !defined(_MSC_VER) || !defined(FOLLY_DETAIL_MSC_BUILTIN_SUPPORT) - #if defined(_M_IX86) - FOLLY_ALWAYS_INLINE int __builtin_popcountll(unsigned long long x) { - return int(__popcnt((unsigned int)(x >> 32))) + -@@ -133,6 +146,7 @@ FOLLY_ALWAYS_INLINE int __builtin_popcountll(unsigned long long x) { - return int(__popcnt64(x)); - } - #endif -+#endif // !defined(_MSC_VER) || !defined(FOLLY_DETAIL_MSC_BUILTIN_SUPPORT) - - FOLLY_ALWAYS_INLINE void* __builtin_return_address(unsigned int frame) { - // I really hope frame is zero... -@@ -141,3 +155,5 @@ FOLLY_ALWAYS_INLINE void* __builtin_return_address(unsigned int frame) { - return _ReturnAddress(); - } - #endif -+ -+#undef FOLLY_DETAIL_MSC_BUILTIN_SUPPORT --- - diff --git a/recipes/folly/all/patches/0008-find-packages.patch b/recipes/folly/all/patches/0008-find-packages.patch deleted file mode 100644 index 3329a68425e3b..0000000000000 --- a/recipes/folly/all/patches/0008-find-packages.patch +++ /dev/null @@ -1,73 +0,0 @@ -diff --git a/CMake/folly-deps.cmake b/CMake/folly-deps.cmake -index 3169b972d52..23dc6d509b1 100644 ---- a/CMake/folly-deps.cmake -+++ b/CMake/folly-deps.cmake -@@ -46,11 +46,11 @@ find_package(Boost 1.51.0 MODULE - list(APPEND FOLLY_LINK_LIBRARIES ${Boost_LIBRARIES}) - list(APPEND FOLLY_INCLUDE_DIRECTORIES ${Boost_INCLUDE_DIRS}) - --find_package(DoubleConversion MODULE REQUIRED) -+find_package(double-conversion MODULE REQUIRED) - list(APPEND FOLLY_LINK_LIBRARIES ${DOUBLE_CONVERSION_LIBRARY}) - list(APPEND FOLLY_INCLUDE_DIRECTORIES ${DOUBLE_CONVERSION_INCLUDE_DIR}) - --find_package(Gflags MODULE) -+find_package(gflags MODULE) - set(FOLLY_HAVE_LIBGFLAGS ${LIBGFLAGS_FOUND}) - if(LIBGFLAGS_FOUND) - list(APPEND FOLLY_LINK_LIBRARIES ${LIBGFLAGS_LIBRARY}) -@@ -59,12 +59,12 @@ if(LIBGFLAGS_FOUND) - list(APPEND CMAKE_REQUIRED_INCLUDES ${LIBGFLAGS_INCLUDE_DIR}) - endif() - --find_package(Glog MODULE) -+find_package(glog MODULE) - set(FOLLY_HAVE_LIBGLOG ${GLOG_FOUND}) - list(APPEND FOLLY_LINK_LIBRARIES ${GLOG_LIBRARY}) - list(APPEND FOLLY_INCLUDE_DIRECTORIES ${GLOG_INCLUDE_DIR}) - --find_package(LibEvent MODULE REQUIRED) -+find_package(Libevent MODULE REQUIRED) - list(APPEND FOLLY_LINK_LIBRARIES ${LIBEVENT_LIB}) - list(APPEND FOLLY_INCLUDE_DIRECTORIES ${LIBEVENT_INCLUDE_DIR}) - -@@ -96,14 +96,14 @@ if (LIBLZMA_FOUND) - list(APPEND FOLLY_LINK_LIBRARIES ${LIBLZMA_LIBRARIES}) - endif() - --find_package(LZ4 MODULE) -+find_package(lz4 MODULE) - set(FOLLY_HAVE_LIBLZ4 ${LZ4_FOUND}) - if (LZ4_FOUND) - list(APPEND FOLLY_INCLUDE_DIRECTORIES ${LZ4_INCLUDE_DIR}) - list(APPEND FOLLY_LINK_LIBRARIES ${LZ4_LIBRARY}) - endif() - --find_package(Zstd MODULE) -+find_package(zstd MODULE) - set(FOLLY_HAVE_LIBZSTD ${ZSTD_FOUND}) - if(ZSTD_FOUND) - list(APPEND FOLLY_INCLUDE_DIRECTORIES ${ZSTD_INCLUDE_DIR}) -@@ -117,11 +117,11 @@ if (SNAPPY_FOUND) - list(APPEND FOLLY_LINK_LIBRARIES ${SNAPPY_LIBRARY}) - endif() - --find_package(LibDwarf) -+find_package(libdwarf) - list(APPEND FOLLY_LINK_LIBRARIES ${LIBDWARF_LIBRARIES}) - list(APPEND FOLLY_INCLUDE_DIRECTORIES ${LIBDWARF_INCLUDE_DIRS}) - --find_package(Libiberty) -+find_package(libiberty) - list(APPEND FOLLY_LINK_LIBRARIES ${LIBIBERTY_LIBRARIES}) - list(APPEND FOLLY_INCLUDE_DIRECTORIES ${LIBIBERTY_INCLUDE_DIRS}) - -@@ -133,7 +133,7 @@ find_package(LibUring) - list(APPEND FOLLY_LINK_LIBRARIES ${LIBURING_LIBRARIES}) - list(APPEND FOLLY_INCLUDE_DIRECTORIES ${LIBURING_INCLUDE_DIRS}) - --find_package(Libsodium) -+find_package(libsodium) - list(APPEND FOLLY_LINK_LIBRARIES ${LIBSODIUM_LIBRARIES}) - list(APPEND FOLLY_INCLUDE_DIRECTORIES ${LIBSODIUM_INCLUDE_DIRS}) - diff --git a/recipes/folly/all/patches/0009-ill-formed-atomic-copy.patch b/recipes/folly/all/patches/0009-ill-formed-atomic-copy.patch deleted file mode 100644 index 58f95224f3873..0000000000000 --- a/recipes/folly/all/patches/0009-ill-formed-atomic-copy.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/folly/fibers/SemaphoreBase.cpp b/folly/fibers/SemaphoreBase.cpp -index 06e9ecc7111..77e2da75c18 100644 ---- a/folly/fibers/SemaphoreBase.cpp -+++ b/folly/fibers/SemaphoreBase.cpp -@@ -170,7 +170,7 @@ namespace { - class FutureWaiter final : public fibers::Baton::Waiter { - public: - explicit FutureWaiter(int64_t tokens) -- : semaphoreWaiter(SemaphoreBase::Waiter(tokens)) { -+ : semaphoreWaiter(tokens) { - semaphoreWaiter.baton.setWaiter(*this); - } - diff --git a/recipes/folly/all/patches/0010-duplicate-hash.patch b/recipes/folly/all/patches/0010-duplicate-hash.patch deleted file mode 100644 index 69268c6acf6f6..0000000000000 --- a/recipes/folly/all/patches/0010-duplicate-hash.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/folly/hash/Hash.h b/folly/hash/Hash.h -index a8a50e8e8dc..d7a3da8e61f 100644 ---- a/folly/hash/Hash.h -+++ b/folly/hash/Hash.h -@@ -733,7 +733,7 @@ struct TupleHasher<0, Ts...> { - - // Custom hash functions. - namespace std { --#if FOLLY_SUPPLY_MISSING_INT128_TRAITS -+#if 0 - template <> - struct hash<__int128> : folly::detail::integral_hasher<__int128> {}; - diff --git a/recipes/folly/all/patches/0011-disable-logger-example.patch b/recipes/folly/all/patches/0011-disable-logger-example.patch deleted file mode 100644 index fa20905367fb1..0000000000000 --- a/recipes/folly/all/patches/0011-disable-logger-example.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/folly/CMakeLists.txt b/folly/CMakeLists.txt -index 08de7daf20f..cdc1f03bf46 100644 ---- a/folly/CMakeLists.txt -+++ b/folly/CMakeLists.txt -@@ -27,7 +27,6 @@ install( - ) - - add_subdirectory(experimental/exception_tracer) --add_subdirectory(logging/example) - - if (PYTHON_EXTENSIONS) - # Create tree of symbolic links in structure required for successful diff --git a/recipes/folly/all/patches/0012-compiler-flags.patch b/recipes/folly/all/patches/0012-compiler-flags.patch deleted file mode 100644 index 358500a1800cd..0000000000000 --- a/recipes/folly/all/patches/0012-compiler-flags.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff --git a/CMake/FollyCompilerUnix.cmake b/CMake/FollyCompilerUnix.cmake -index 8dcaf141a3a..200fe8d3798 100644 ---- a/CMake/FollyCompilerUnix.cmake -+++ b/CMake/FollyCompilerUnix.cmake -@@ -28,9 +28,9 @@ set( - ) - mark_as_advanced(CXX_STD) - --set(CMAKE_CXX_FLAGS_COMMON "-g -Wall -Wextra") -+set(CMAKE_CXX_FLAGS_COMMON "-Wall -Wextra") - set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} ${CMAKE_CXX_FLAGS_COMMON}") --set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} ${CMAKE_CXX_FLAGS_COMMON} -O3") -+set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} ${CMAKE_CXX_FLAGS_COMMON}") - - # Note that CMAKE_REQUIRED_FLAGS must be a string, not a list - set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -std=${CXX_STD}") -@@ -43,7 +43,6 @@ function(apply_folly_compile_options_to_target THETARGET) - ) - target_compile_options(${THETARGET} - PRIVATE -- -g - -std=${CXX_STD} - -finput-charset=UTF-8 - -fsigned-char diff --git a/recipes/folly/all/patches/0013-include-bit.patch b/recipes/folly/all/patches/0013-include-bit.patch deleted file mode 100644 index 1a8ac249a146b..0000000000000 --- a/recipes/folly/all/patches/0013-include-bit.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- a/folly/lang/Bits.h -+++ b/folly/lang/Bits.h -@@ -64,6 +64,10 @@ - #include - #include - -+#if __has_include() && __cpp_lib_bit_cast -+#include -+#endif -+ - namespace folly { - - #if __cpp_lib_bit_cast diff --git a/recipes/folly/all/patches/0014-find-librt.patch b/recipes/folly/all/patches/0014-find-librt.patch deleted file mode 100644 index 90a1f0f7b9ada..0000000000000 --- a/recipes/folly/all/patches/0014-find-librt.patch +++ /dev/null @@ -1,18 +0,0 @@ -diff --git a/CMake/FollyConfigChecks.cmake b/CMake/FollyConfigChecks.cmake -index 6b8b308c7..908d72d51 100644 ---- a/CMake/FollyConfigChecks.cmake -+++ b/CMake/FollyConfigChecks.cmake -@@ -83,6 +83,13 @@ string(REGEX REPLACE - CMAKE_REQUIRED_FLAGS - "${CMAKE_REQUIRED_FLAGS}") - -+if (CMAKE_SYSTEM_NAME STREQUAL "Linux") -+ find_library(LIBRT rt) -+ if (LIBRT) -+ list(APPEND CMAKE_REQUIRED_LIBRARIES "rt") -+ endif() -+endif() -+ - check_symbol_exists(pthread_atfork pthread.h FOLLY_HAVE_PTHREAD_ATFORK) - - # Unfortunately check_symbol_exists() does not work for memrchr(): diff --git a/recipes/folly/all/patches/0015-benchmark-format-macros.patch b/recipes/folly/all/patches/0015-benchmark-format-macros.patch deleted file mode 100644 index 14f8b2088a1b3..0000000000000 --- a/recipes/folly/all/patches/0015-benchmark-format-macros.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff --git a/folly/Benchmark.cpp b/folly/Benchmark.cpp -index 389ee46a1..390b7674b 100644 ---- a/folly/Benchmark.cpp -+++ b/folly/Benchmark.cpp -@@ -16,6 +16,10 @@ - - // @author Andrei Alexandrescu (andrei.alexandrescu@fb.com) - -+#ifndef __STDC_FORMAT_MACROS -+#define __STDC_FORMAT_MACROS 1 -+#endif -+ - #include - - #include diff --git a/recipes/folly/all/patches/0016-find-packages.patch b/recipes/folly/all/patches/0016-find-packages.patch deleted file mode 100644 index c6cd14fad52c9..0000000000000 --- a/recipes/folly/all/patches/0016-find-packages.patch +++ /dev/null @@ -1,80 +0,0 @@ -diff --git a/CMake/folly-deps.cmake b/CMake/folly-deps.cmake -index 9c9d9ea60..e78611542 100644 ---- a/CMake/folly-deps.cmake -+++ b/CMake/folly-deps.cmake -@@ -48,25 +48,25 @@ find_package(Boost 1.51.0 MODULE - list(APPEND FOLLY_LINK_LIBRARIES ${Boost_LIBRARIES}) - list(APPEND FOLLY_INCLUDE_DIRECTORIES ${Boost_INCLUDE_DIRS}) - --find_package(DoubleConversion MODULE REQUIRED) -+find_package(double-conversion MODULE REQUIRED) - list(APPEND FOLLY_LINK_LIBRARIES ${DOUBLE_CONVERSION_LIBRARY}) - list(APPEND FOLLY_INCLUDE_DIRECTORIES ${DOUBLE_CONVERSION_INCLUDE_DIR}) - --find_package(Gflags MODULE) --set(FOLLY_HAVE_LIBGFLAGS ${LIBGFLAGS_FOUND}) --if(LIBGFLAGS_FOUND) -- list(APPEND FOLLY_LINK_LIBRARIES ${LIBGFLAGS_LIBRARY}) -- list(APPEND FOLLY_INCLUDE_DIRECTORIES ${LIBGFLAGS_INCLUDE_DIR}) -- set(FOLLY_LIBGFLAGS_LIBRARY ${LIBGFLAGS_LIBRARY}) -- set(FOLLY_LIBGFLAGS_INCLUDE ${LIBGFLAGS_INCLUDE_DIR}) -+find_package(gflags MODULE) -+set(FOLLY_HAVE_LIBGFLAGS ${gflags_FOUND}) -+if(gflags_FOUND) -+ list(APPEND FOLLY_LINK_LIBRARIES ${gflags_LIBRARIES}) -+ list(APPEND FOLLY_INCLUDE_DIRECTORIES ${gflags_INCLUDE_DIRS}) -+ set(FOLLY_LIBGFLAGS_LIBRARY ${gflags_LIBRARIES}) -+ set(FOLLY_LIBGFLAGS_INCLUDE ${gflags_INCLUDE_DIRS}) - endif() - --find_package(Glog MODULE) -+find_package(glog MODULE) - set(FOLLY_HAVE_LIBGLOG ${GLOG_FOUND}) - list(APPEND FOLLY_LINK_LIBRARIES ${GLOG_LIBRARY}) - list(APPEND FOLLY_INCLUDE_DIRECTORIES ${GLOG_INCLUDE_DIR}) - --find_package(LibEvent MODULE REQUIRED) -+find_package(Libevent MODULE REQUIRED) - list(APPEND FOLLY_LINK_LIBRARIES ${LIBEVENT_LIB}) - list(APPEND FOLLY_INCLUDE_DIRECTORIES ${LIBEVENT_INCLUDE_DIR}) - -@@ -104,14 +104,14 @@ if (LIBLZMA_FOUND) - list(APPEND FOLLY_LINK_LIBRARIES ${LIBLZMA_LIBRARIES}) - endif() - --find_package(LZ4 MODULE) -+find_package(lz4 MODULE) - set(FOLLY_HAVE_LIBLZ4 ${LZ4_FOUND}) - if (LZ4_FOUND) - list(APPEND FOLLY_INCLUDE_DIRECTORIES ${LZ4_INCLUDE_DIR}) - list(APPEND FOLLY_LINK_LIBRARIES ${LZ4_LIBRARY}) - endif() - --find_package(Zstd MODULE) -+find_package(zstd MODULE) - set(FOLLY_HAVE_LIBZSTD ${ZSTD_FOUND}) - if(ZSTD_FOUND) - list(APPEND FOLLY_INCLUDE_DIRECTORIES ${ZSTD_INCLUDE_DIR}) -@@ -125,11 +125,11 @@ if (SNAPPY_FOUND) - list(APPEND FOLLY_LINK_LIBRARIES ${SNAPPY_LIBRARY}) - endif() - --find_package(LibDwarf) -+find_package(libdwarf) - list(APPEND FOLLY_LINK_LIBRARIES ${LIBDWARF_LIBRARIES}) - list(APPEND FOLLY_INCLUDE_DIRECTORIES ${LIBDWARF_INCLUDE_DIRS}) - --find_package(Libiberty) -+find_package(libiberty) - list(APPEND FOLLY_LINK_LIBRARIES ${LIBIBERTY_LIBRARIES}) - list(APPEND FOLLY_INCLUDE_DIRECTORIES ${LIBIBERTY_INCLUDE_DIRS}) - -@@ -141,7 +141,7 @@ find_package(LibUring) - list(APPEND FOLLY_LINK_LIBRARIES ${LIBURING_LIBRARIES}) - list(APPEND FOLLY_INCLUDE_DIRECTORIES ${LIBURING_INCLUDE_DIRS}) - --find_package(Libsodium) -+find_package(libsodium) - list(APPEND FOLLY_LINK_LIBRARIES ${LIBSODIUM_LIBRARIES}) - list(APPEND FOLLY_INCLUDE_DIRECTORIES ${LIBSODIUM_INCLUDE_DIRS}) - diff --git a/recipes/folly/all/patches/0017-compiler-flags.patch b/recipes/folly/all/patches/0017-compiler-flags.patch deleted file mode 100644 index 1290e801ba4ba..0000000000000 --- a/recipes/folly/all/patches/0017-compiler-flags.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff --git a/CMake/FollyCompilerUnix.cmake b/CMake/FollyCompilerUnix.cmake -index 8dcaf14..200fe8d 100644 ---- a/CMake/FollyCompilerUnix.cmake -+++ b/CMake/FollyCompilerUnix.cmake -@@ -28,9 +28,9 @@ set( - ) - mark_as_advanced(CXX_STD) - --set(CMAKE_CXX_FLAGS_COMMON "-g -Wall -Wextra") -+set(CMAKE_CXX_FLAGS_COMMON "-Wall -Wextra") - set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} ${CMAKE_CXX_FLAGS_COMMON}") --set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} ${CMAKE_CXX_FLAGS_COMMON} -O3") -+set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} ${CMAKE_CXX_FLAGS_COMMON}") - - # Note that CMAKE_REQUIRED_FLAGS must be a string, not a list - set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -std=${CXX_STD}") -@@ -43,7 +43,6 @@ function(apply_folly_compile_options_to_target THETARGET) - ) - target_compile_options(${THETARGET} - PRIVATE -- -g - -std=${CXX_STD} - -finput-charset=UTF-8 - -fsigned-char diff --git a/recipes/folly/all/patches/0018-find-glog.patch b/recipes/folly/all/patches/0018-find-glog.patch deleted file mode 100644 index b2d17ad455a7b..0000000000000 --- a/recipes/folly/all/patches/0018-find-glog.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff --git a/build/fbcode_builder/CMake/FindGlog.cmake b/build/fbcode_builder/CMake/FindGlog.cmake -index 752647c..aa2fa1c 100644 ---- a/build/fbcode_builder/CMake/FindGlog.cmake -+++ b/build/fbcode_builder/CMake/FindGlog.cmake -@@ -10,9 +10,9 @@ include(FindPackageHandleStandardArgs) - include(SelectLibraryConfigurations) - - find_library(GLOG_LIBRARY_RELEASE glog -- PATHS ${GLOG_LIBRARYDIR}) -+ PATHS ${CONAN_GLOG_ROOT}) - find_library(GLOG_LIBRARY_DEBUG glogd -- PATHS ${GLOG_LIBRARYDIR}) -+ PATHS ${CONAN_GLOG_ROOT}) - - find_path(GLOG_INCLUDE_DIR glog/logging.h - PATHS ${GLOG_INCLUDEDIR}) diff --git a/recipes/folly/all/patches/0019-exclude-example.patch b/recipes/folly/all/patches/0019-exclude-example.patch deleted file mode 100644 index d2afb310ff8a0..0000000000000 --- a/recipes/folly/all/patches/0019-exclude-example.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/folly/CMakeLists.txt b/folly/CMakeLists.txt -index 883f27c..2d2086f 100644 ---- a/folly/CMakeLists.txt -+++ b/folly/CMakeLists.txt -@@ -28,7 +28,6 @@ install( - ) - - add_subdirectory(experimental/exception_tracer) --add_subdirectory(logging/example) - - if (PYTHON_EXTENSIONS) - # Create tree of symbolic links in structure required for successful diff --git a/recipes/folly/all/patches/0020-include-ssizet.patch b/recipes/folly/all/patches/0020-include-ssizet.patch deleted file mode 100644 index 0575fecd13e84..0000000000000 --- a/recipes/folly/all/patches/0020-include-ssizet.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/folly/executors/ExecutorWithPriority.h b/folly/executors/ExecutorWithPriority.h -index b95a6c4..18b8110 100644 ---- a/folly/executors/ExecutorWithPriority.h -+++ b/folly/executors/ExecutorWithPriority.h -@@ -18,6 +18,7 @@ - - #include - #include -+#include - - namespace folly { - diff --git a/recipes/folly/all/patches/0021-typedef-clockid.patch b/recipes/folly/all/patches/0021-typedef-clockid.patch deleted file mode 100644 index fb46c057d58ce..0000000000000 --- a/recipes/folly/all/patches/0021-typedef-clockid.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/folly/portability/Time.h b/folly/portability/Time.h -index 994a09e5d70..e4f0d101ca9 100644 ---- a/folly/portability/Time.h -+++ b/folly/portability/Time.h -@@ -49,7 +49,6 @@ - #define CLOCK_PROCESS_CPUTIME_ID 2 - #define CLOCK_THREAD_CPUTIME_ID 3 - --typedef uint8_t clockid_t; - extern "C" int clock_gettime(clockid_t clk_id, struct timespec* ts); - extern "C" int clock_getres(clockid_t clk_id, struct timespec* ts); - #endif diff --git a/recipes/folly/all/patches/0022-fix-windows-minmax.patch b/recipes/folly/all/patches/0022-fix-windows-minmax.patch deleted file mode 100644 index 1fc69a43a83e5..0000000000000 --- a/recipes/folly/all/patches/0022-fix-windows-minmax.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/CMake/FollyCompilerMSVC.cmake b/CMake/FollyCompilerMSVC.cmake -index ec2ce1a1d..16deda71c 100644 ---- a/CMake/FollyCompilerMSVC.cmake -+++ b/CMake/FollyCompilerMSVC.cmake -@@ -289,6 +289,7 @@ function(apply_folly_compile_options_to_target THETARGET) - # And the extra defines: - target_compile_definitions(${THETARGET} - PUBLIC -+ NOMINMAX - _CRT_NONSTDC_NO_WARNINGS # Don't deprecate posix names of functions. - _CRT_SECURE_NO_WARNINGS # Don't deprecate the non _s versions of various standard library functions, because safety is for chumps. - _SCL_SECURE_NO_WARNINGS # Don't deprecate the non _s versions of various standard library functions, because safety is for chumps. diff --git a/recipes/folly/all/test_package/CMakeLists.txt b/recipes/folly/all/test_package/CMakeLists.txt index 6a9df4ea0b752..82796f7de6547 100644 --- a/recipes/folly/all/test_package/CMakeLists.txt +++ b/recipes/folly/all/test_package/CMakeLists.txt @@ -4,13 +4,5 @@ project(test_package CXX) find_package(folly REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) -target_link_libraries(${PROJECT_NAME} - Folly::folly - Folly::follybenchmark) - - -if (${FOLLY_VERSION} VERSION_LESS "2021.07.20.00") - set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 14) -else() - set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 17) -endif() +target_link_libraries(${PROJECT_NAME} PRIVATE Folly::folly) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) diff --git a/recipes/folly/all/test_package/conanfile.py b/recipes/folly/all/test_package/conanfile.py index 63889d5258fa5..7aa104bd186ed 100644 --- a/recipes/folly/all/test_package/conanfile.py +++ b/recipes/folly/all/test_package/conanfile.py @@ -1,21 +1,19 @@ import os from conan import ConanFile -from conan.tools.cmake import CMake, CMakeToolchain +from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout from conan.tools.build import can_run -from conan.tools.cmake import cmake_layout -required_conan_version = ">=1.43.0" class TestPackageConan(ConanFile): settings = "os", "compiler", "build_type", "arch" generators = "CMakeDeps", "VirtualRunEnv" + test_type = "explicit" def requirements(self): self.requires(self.tested_reference_str) def generate(self): tc = CMakeToolchain(self) - tc.variables["FOLLY_VERSION"] = self.dependencies["folly"].ref.version tc.generate() def layout(self): @@ -28,4 +26,4 @@ def build(self): def test(self): if can_run(self): - self.run(os.path.join(self.cpp.build.bindirs[0], "test_package"), env="conanrun") + self.run(os.path.join(self.cpp.build.bindir, "test_package"), env="conanrun") diff --git a/recipes/folly/all/test_package/test_package.cpp b/recipes/folly/all/test_package/test_package.cpp index cc522b8b0280d..247e44f76e0fd 100644 --- a/recipes/folly/all/test_package/test_package.cpp +++ b/recipes/folly/all/test_package/test_package.cpp @@ -1,29 +1,12 @@ #include #include -#include + #include -#include -#include -#include -#include -#if FOLLY_HAVE_ELF -#include -#endif +#include -static void print_uri(const folly::fbstring& value) { - const folly::Uri uri(value); - std::cout << "The authority from " << value << " is " << uri.authority() << std::endl; -} int main() { - folly::ThreadedExecutor executor; - folly::Promise promise; - folly::Future future = promise.getSemiFuture().via(&executor); - folly::Future unit = std::move(future).thenValue(print_uri); - promise.setValue("https://github.com/bincrafters"); - std::move(unit).get(); -#if FOLLY_HAVE_ELF - folly::symbolizer::ElfFile elffile; -#endif + folly::fbstring address{"127.0.0.1"}; + folly::IPAddress::validate(address); return EXIT_SUCCESS; } diff --git a/recipes/folly/all/test_v1_package/CMakeLists.txt b/recipes/folly/all/test_v1_package/CMakeLists.txt index f8cc697ab67d2..c2866c350e271 100644 --- a/recipes/folly/all/test_v1_package/CMakeLists.txt +++ b/recipes/folly/all/test_v1_package/CMakeLists.txt @@ -4,14 +4,5 @@ project(test_package CXX) include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) conan_basic_setup(TARGETS) -find_package(folly CONFIG REQUIRED) - -add_executable(${PROJECT_NAME} test_package.cpp) -target_link_libraries(${PROJECT_NAME} Folly::folly) - - -if (${FOLLY_VERSION} VERSION_LESS "2021.07.20.00") - set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 14) -else() - set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 17) -endif() +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package + ${CMAKE_CURRENT_BINARY_DIR}/test_package) diff --git a/recipes/folly/all/test_v1_package/conanfile.py b/recipes/folly/all/test_v1_package/conanfile.py index 8b8cfae4c1882..49a3a66ea5bad 100644 --- a/recipes/folly/all/test_v1_package/conanfile.py +++ b/recipes/folly/all/test_v1_package/conanfile.py @@ -8,11 +8,10 @@ class TestPackageConan(ConanFile): def build(self): cmake = CMake(self) - cmake.definitions["FOLLY_VERSION"] = self.deps_cpp_info["folly"].version cmake.configure() cmake.build() def test(self): if not tools.cross_building(self): bin_path = os.path.join("bin", "test_package") - self.run(command=bin_path, run_environment=True) + self.run(bin_path, run_environment=True) diff --git a/recipes/folly/all/test_v1_package/test_package.cpp b/recipes/folly/all/test_v1_package/test_package.cpp deleted file mode 100644 index cc522b8b0280d..0000000000000 --- a/recipes/folly/all/test_v1_package/test_package.cpp +++ /dev/null @@ -1,29 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include -#include -#if FOLLY_HAVE_ELF -#include -#endif - -static void print_uri(const folly::fbstring& value) { - const folly::Uri uri(value); - std::cout << "The authority from " << value << " is " << uri.authority() << std::endl; -} - -int main() { - folly::ThreadedExecutor executor; - folly::Promise promise; - folly::Future future = promise.getSemiFuture().via(&executor); - folly::Future unit = std::move(future).thenValue(print_uri); - promise.setValue("https://github.com/bincrafters"); - std::move(unit).get(); -#if FOLLY_HAVE_ELF - folly::symbolizer::ElfFile elffile; -#endif - return EXIT_SUCCESS; -} diff --git a/recipes/folly/config.yml b/recipes/folly/config.yml index 6a14a274c3fe9..e799fbeee0433 100644 --- a/recipes/folly/config.yml +++ b/recipes/folly/config.yml @@ -1,7 +1,3 @@ versions: - "2019.10.21.00": - folder: all - "2020.08.10.00": - folder: all - "2022.01.31.00": - folder: all + "2024.08.12.00": + folder: all diff --git a/recipes/fontconfig/all/conandata.yml b/recipes/fontconfig/all/conandata.yml index d4f92f5455a44..6691cd7b19491 100644 --- a/recipes/fontconfig/all/conandata.yml +++ b/recipes/fontconfig/all/conandata.yml @@ -1,7 +1,16 @@ sources: - "2.13.92": - url: "https://www.freedesktop.org/software/fontconfig/release/fontconfig-2.13.92.tar.gz" - sha256: "3406a05b83a42231e3df68d02bc0a0cf47b3f2e8f11c8ede62267daf5f130016" - "2.13.91": - url: "https://www.freedesktop.org/software/fontconfig/release/fontconfig-2.13.91.tar.gz" - sha256: "19e5b1bc9d013a52063a44e1307629711f0bfef35b9aca16f9c793971e2eb1e5" + "2.15.0": + url: "https://www.freedesktop.org/software/fontconfig/release/fontconfig-2.15.0.tar.xz" + sha256: "63a0658d0e06e0fa886106452b58ef04f21f58202ea02a94c39de0d3335d7c0e" + "2.14.2": + url: "https://www.freedesktop.org/software/fontconfig/release/fontconfig-2.14.2.tar.xz" + sha256: "dba695b57bce15023d2ceedef82062c2b925e51f5d4cc4aef736cf13f60a468b" + "2.13.93": + url: "https://www.freedesktop.org/software/fontconfig/release/fontconfig-2.13.93.tar.gz" + sha256: "0f302a18ee52dde0793fe38b266bf269dfe6e0c0ae140e30d72c6cca5dc08db5" +patches: + "2.13.93": + - patch_file: "patches/0001-meson-win32.patch" + patch_type: "portability" + patch_source: "https://gitlab.freedesktop.org/fontconfig/fontconfig/-/commit/7bfbaecf819a8b1630dfc8f56126e31f985d5fb3" + patch_description: "Windows: Fix symlink privilege error detection" diff --git a/recipes/fontconfig/all/conanfile.py b/recipes/fontconfig/all/conanfile.py index 543e746cf6bf8..dd6e6f661f713 100644 --- a/recipes/fontconfig/all/conanfile.py +++ b/recipes/fontconfig/all/conanfile.py @@ -1,15 +1,17 @@ from conan import ConanFile -from conan.errors import ConanInvalidConfiguration from conan.tools.apple import fix_apple_shared_install_name -from conan.tools.build import cross_building -from conan.tools.env import VirtualBuildEnv, VirtualRunEnv -from conan.tools.files import copy, get, replace_in_file, rm, rmdir -from conan.tools.gnu import Autotools, AutotoolsDeps, AutotoolsToolchain, PkgConfigDeps +from conan.tools.env import VirtualBuildEnv +from conan.tools.files import ( + apply_conandata_patches, copy, export_conandata_patches, get, + rm, rmdir +) +from conan.tools.gnu import PkgConfigDeps from conan.tools.layout import basic_layout -from conan.tools.microsoft import is_msvc +from conan.tools.meson import Meson, MesonToolchain + import os -required_conan_version = ">=1.54.0" +required_conan_version = ">=1.64.0 <2 || >=2.2.0" class FontconfigConan(ConanFile): @@ -29,9 +31,8 @@ class FontconfigConan(ConanFile): "fPIC": True, } - @property - def _settings_build(self): - return getattr(self, "settings_build", self.settings) + def export_sources(self): + export_conandata_patches(self) def config_options(self): if self.settings.os == "Windows": @@ -40,30 +41,21 @@ def config_options(self): def configure(self): if self.options.shared: self.options.rm_safe("fPIC") - self.settings.rm_safe("compiler.cppstd") self.settings.rm_safe("compiler.libcxx") + self.settings.rm_safe("compiler.cppstd") def layout(self): basic_layout(self, src_folder="src") def requirements(self): self.requires("freetype/2.13.2") - self.requires("expat/2.6.0") - if self.settings.os == "Linux": - self.requires("util-linux-libuuid/2.39.2") - - def validate(self): - if is_msvc(self): - raise ConanInvalidConfiguration("fontconfig does not support Visual Studio for versions < 2.13.93.") + self.requires("expat/[>=2.6.2 <3]") def build_requirements(self): self.tool_requires("gperf/3.1") - if not self.conf.get("tools.gnu:pkg_config", check_type=str): - self.tool_requires("pkgconf/2.0.3") - if self._settings_build.os == "Windows": - self.win_bash = True - if not self.conf.get("tools.microsoft.bash:path", check_type=str): - self.tool_requires("msys2/cci.latest") + self.tool_requires("meson/1.4.0") + if not self.conf.get("tools.gnu:pkg_config", default=False, check_type=str): + self.tool_requires("pkgconf/2.1.0") def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) @@ -71,62 +63,40 @@ def source(self): def generate(self): env = VirtualBuildEnv(self) env.generate() - if not cross_building(self): - env = VirtualRunEnv(self) - env.generate(scope="build") - - tc = AutotoolsToolchain(self) - yes_no = lambda v: "yes" if v else "no" - tc.configure_args.extend([ - f"--enable-shared={yes_no(self.options.shared)}", - f"--enable-static={yes_no(not self.options.shared)}", - "--disable-docs", - "--disable-nls", - "--sysconfdir=${prefix}/bin/etc", - "--datadir=${prefix}/bin/share", - "--datarootdir=${prefix}/bin/share", - "--localstatedir=${prefix}/bin/var", - ]) - tc.generate() - deps = AutotoolsDeps(self) - deps.generate() deps = PkgConfigDeps(self) deps.generate() + tc = MesonToolchain(self) + tc.project_options.update({ + "doc": "disabled", + "nls": "disabled", + "tests": "disabled", + "tools": "disabled", + "sysconfdir": os.path.join("res", "etc"), + "datadir": os.path.join("res", "share"), + }) + tc.generate() + def _patch_files(self): - # fontconfig requires libtool version number, change it for the corresponding freetype one - replace_in_file( - self, os.path.join(self.generators_folder, "freetype2.pc"), - "Version: {}".format(self.dependencies["freetype"].ref.version), - "Version: {}".format(self.dependencies["freetype"].conf_info.get("user.freetype:libtool_version")), - ) - # disable fc-cache test to enable cross compilation but also builds with shared libraries on MacOS - replace_in_file(self, - os.path.join(self.source_folder, "Makefile.in"), - "@CROSS_COMPILING_TRUE@RUN_FC_CACHE_TEST = false", - "RUN_FC_CACHE_TEST=false" - ) + apply_conandata_patches(self) def build(self): self._patch_files() - autotools = Autotools(self) - autotools.configure() - replace_in_file(self, os.path.join(self.build_folder, "Makefile"), "po-conf test", "po-conf") - autotools.make() + meson = Meson(self) + meson.configure() + meson.build() def package(self): - copy(self, "COPYING", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) - autotools = Autotools(self) - autotools.install() - rm(self, "*.pdb", os.path.join(self.package_folder, "bin")) - rm(self, "*.conf", os.path.join(self.package_folder, "bin", "etc", "fonts", "conf.d")) + copy(self, "COPYING", self.source_folder, os.path.join(self.package_folder, "licenses")) + meson = Meson(self) + meson.install() + rm(self, "*.pdb", self.package_folder, recursive=True) + rm(self, "*.conf", os.path.join(self.package_folder, "res", "etc", "fonts", "conf.d")) rm(self, "*.def", os.path.join(self.package_folder, "lib")) - rm(self, "*.la", os.path.join(self.package_folder, "lib")) rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) - rmdir(self, os.path.join(self.package_folder, "etc")) - rmdir(self, os.path.join(self.package_folder, "share")) fix_apple_shared_install_name(self) + fix_msvc_libname(self) def package_info(self): self.cpp_info.set_property("cmake_find_mode", "both") @@ -137,14 +107,26 @@ def package_info(self): if self.settings.os in ("Linux", "FreeBSD"): self.cpp_info.system_libs.extend(["m", "pthread"]) - fontconfig_file = os.path.join(self.package_folder, "bin", "etc", "fonts", "fonts.conf") - self.runenv_info.prepend_path("FONTCONFIG_FILE", fontconfig_file) - - fontconfig_path = os.path.join(self.package_folder, "bin", "etc", "fonts") - self.runenv_info.prepend_path("FONTCONFIG_PATH", fontconfig_path) + fontconfig_path = os.path.join(self.package_folder, "res", "etc", "fonts") + self.runenv_info.append_path("FONTCONFIG_PATH", fontconfig_path) # TODO: to remove in conan v2 self.cpp_info.names["cmake_find_package"] = "Fontconfig" self.cpp_info.names["cmake_find_package_multi"] = "Fontconfig" - self.env_info.FONTCONFIG_FILE = fontconfig_file self.env_info.FONTCONFIG_PATH = fontconfig_path + +def fix_msvc_libname(conanfile, remove_lib_prefix=True): + """remove lib prefix & change extension to .lib in case of cl like compiler""" + if not conanfile.settings.get_safe("compiler.runtime"): + return + from conan.tools.files import rename + import glob + libdirs = getattr(conanfile.cpp.package, "libdirs") + for libdir in libdirs: + for ext in [".dll.a", ".dll.lib", ".a"]: + full_folder = os.path.join(conanfile.package_folder, libdir) + for filepath in glob.glob(os.path.join(full_folder, f"*{ext}")): + libname = os.path.basename(filepath)[0:-len(ext)] + if remove_lib_prefix and libname[0:3] == "lib": + libname = libname[3:] + rename(conanfile, filepath, os.path.join(os.path.dirname(filepath), f"{libname}.lib")) diff --git a/recipes/fontconfig/meson/patches/0001-meson-win32.patch b/recipes/fontconfig/all/patches/0001-meson-win32.patch similarity index 100% rename from recipes/fontconfig/meson/patches/0001-meson-win32.patch rename to recipes/fontconfig/all/patches/0001-meson-win32.patch diff --git a/recipes/fontconfig/all/test_package/conanfile.py b/recipes/fontconfig/all/test_package/conanfile.py index 98ab55852ad56..42aa9d19c7fbe 100644 --- a/recipes/fontconfig/all/test_package/conanfile.py +++ b/recipes/fontconfig/all/test_package/conanfile.py @@ -1,6 +1,6 @@ from conan import ConanFile -from conan.tools.build import can_run from conan.tools.cmake import CMake, cmake_layout +from conan.tools.build import can_run import os diff --git a/recipes/fontconfig/all/test_package/test_package.c b/recipes/fontconfig/all/test_package/test_package.c index 3d2556b9cca2e..7703ab64bbdec 100644 --- a/recipes/fontconfig/all/test_package/test_package.c +++ b/recipes/fontconfig/all/test_package/test_package.c @@ -1,6 +1,24 @@ #include +#include +#include int main() { - FcInit(); - return 0; + FcConfig* config = FcInitLoadConfigAndFonts(); + FcPattern* pat = FcNameParse((const FcChar8*)"Arial"); + FcConfigSubstitute(config, pat, FcMatchPattern); + FcDefaultSubstitute(pat); + char* fontFile; + FcResult result; + FcPattern* font = FcFontMatch(config, pat, &result); + if (font) { + FcChar8* file = NULL; + if (FcPatternGetString(font, FC_FILE, 0, &file) == FcResultMatch) { + fontFile = (char*)file; + printf("%s\n",fontFile); + } + } else { + printf("Ops! I can't find any font!\n"); + } + FcPatternDestroy(pat); + return EXIT_SUCCESS; } diff --git a/recipes/fontconfig/all/test_v1_package/CMakeLists.txt b/recipes/fontconfig/all/test_v1_package/CMakeLists.txt index 0d20897301b68..9e65290cb3f89 100644 --- a/recipes/fontconfig/all/test_v1_package/CMakeLists.txt +++ b/recipes/fontconfig/all/test_v1_package/CMakeLists.txt @@ -1,8 +1,9 @@ cmake_minimum_required(VERSION 3.1) -project(test_package) +project(test_package C) include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) conan_basic_setup(TARGETS) -add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package - ${CMAKE_CURRENT_BINARY_DIR}/test_package) +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/ +) diff --git a/recipes/fontconfig/config.yml b/recipes/fontconfig/config.yml index 41c4db45e111e..1d4c62bc9edab 100644 --- a/recipes/fontconfig/config.yml +++ b/recipes/fontconfig/config.yml @@ -1,11 +1,7 @@ versions: "2.15.0": - folder: meson + folder: all "2.14.2": - folder: meson - "2.13.93": - folder: meson - "2.13.92": folder: all - "2.13.91": + "2.13.93": folder: all diff --git a/recipes/fontconfig/meson/conandata.yml b/recipes/fontconfig/meson/conandata.yml deleted file mode 100644 index 6691cd7b19491..0000000000000 --- a/recipes/fontconfig/meson/conandata.yml +++ /dev/null @@ -1,16 +0,0 @@ -sources: - "2.15.0": - url: "https://www.freedesktop.org/software/fontconfig/release/fontconfig-2.15.0.tar.xz" - sha256: "63a0658d0e06e0fa886106452b58ef04f21f58202ea02a94c39de0d3335d7c0e" - "2.14.2": - url: "https://www.freedesktop.org/software/fontconfig/release/fontconfig-2.14.2.tar.xz" - sha256: "dba695b57bce15023d2ceedef82062c2b925e51f5d4cc4aef736cf13f60a468b" - "2.13.93": - url: "https://www.freedesktop.org/software/fontconfig/release/fontconfig-2.13.93.tar.gz" - sha256: "0f302a18ee52dde0793fe38b266bf269dfe6e0c0ae140e30d72c6cca5dc08db5" -patches: - "2.13.93": - - patch_file: "patches/0001-meson-win32.patch" - patch_type: "portability" - patch_source: "https://gitlab.freedesktop.org/fontconfig/fontconfig/-/commit/7bfbaecf819a8b1630dfc8f56126e31f985d5fb3" - patch_description: "Windows: Fix symlink privilege error detection" diff --git a/recipes/fontconfig/meson/conanfile.py b/recipes/fontconfig/meson/conanfile.py deleted file mode 100644 index 95e3579f0f549..0000000000000 --- a/recipes/fontconfig/meson/conanfile.py +++ /dev/null @@ -1,142 +0,0 @@ -from conan import ConanFile -from conan.tools.apple import fix_apple_shared_install_name -from conan.tools.env import VirtualBuildEnv -from conan.tools.files import ( - apply_conandata_patches, copy, export_conandata_patches, get, - replace_in_file, rm, rmdir -) -from conan.tools.gnu import PkgConfigDeps -from conan.tools.layout import basic_layout -from conan.tools.meson import Meson, MesonToolchain -from conan.tools.scm import Version - -import os - -required_conan_version = ">=1.53.0" - - -class FontconfigConan(ConanFile): - name = "fontconfig" - license = "MIT" - url = "https://github.com/conan-io/conan-center-index" - description = "Fontconfig is a library for configuring and customizing font access" - homepage = "https://gitlab.freedesktop.org/fontconfig/fontconfig" - topics = ("fonts", "freedesktop") - settings = "os", "arch", "compiler", "build_type" - options = { - "shared": [True, False], - "fPIC": [True, False], - } - default_options = { - "shared": False, - "fPIC": True, - } - - def export_sources(self): - export_conandata_patches(self) - - def config_options(self): - if self.settings.os == "Windows": - del self.options.fPIC - - def configure(self): - if self.options.shared: - self.options.rm_safe("fPIC") - self.settings.rm_safe("compiler.libcxx") - self.settings.rm_safe("compiler.cppstd") - - def layout(self): - basic_layout(self, src_folder="src") - - def requirements(self): - self.requires("freetype/2.13.2") - self.requires("expat/2.6.0") - if self.settings.os == "Linux": - self.requires("util-linux-libuuid/2.39.2") - - def build_requirements(self): - self.tool_requires("gperf/3.1") - self.tool_requires("meson/1.2.3") - if not self.conf.get("tools.gnu:pkg_config", default=False, check_type=str): - self.tool_requires("pkgconf/2.0.3") - - def source(self): - get(self, **self.conan_data["sources"][self.version], strip_root=True) - - def generate(self): - env = VirtualBuildEnv(self) - env.generate() - - deps = PkgConfigDeps(self) - deps.generate() - - tc = MesonToolchain(self) - tc.project_options.update({ - "doc": "disabled", - "nls": "disabled", - "tests": "disabled", - "tools": "disabled" - }) - tc.generate() - - def _patch_files(self): - apply_conandata_patches(self) - replace_in_file(self, os.path.join(self.source_folder, "meson.build"), - "freetype_req = '>= 21.0.15'", - f"freetype_req = '{Version(self.dependencies['freetype'].ref.version)}'") - - def build(self): - self._patch_files() - meson = Meson(self) - meson.configure() - meson.build() - - def package(self): - copy(self, "COPYING", self.source_folder, os.path.join(self.package_folder, "licenses")) - meson = Meson(self) - meson.install() - rm(self, "*.pdb", self.package_folder, recursive=True) - rm(self, "*.conf", os.path.join(self.package_folder, "bin", "etc", "fonts", "conf.d")) - rm(self, "*.def", os.path.join(self.package_folder, "lib")) - rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) - rmdir(self, os.path.join(self.package_folder, "etc")) - rmdir(self, os.path.join(self.package_folder, "share")) - fix_apple_shared_install_name(self) - fix_msvc_libname(self) - - def package_info(self): - self.cpp_info.set_property("cmake_find_mode", "both") - self.cpp_info.set_property("cmake_file_name", "Fontconfig") - self.cpp_info.set_property("cmake_target_name", "Fontconfig::Fontconfig") - self.cpp_info.set_property("pkg_config_name", "fontconfig") - self.cpp_info.libs = ["fontconfig"] - if self.settings.os in ("Linux", "FreeBSD"): - self.cpp_info.system_libs.extend(["m", "pthread"]) - - fontconfig_file = os.path.join(self.package_folder, "bin", "etc", "fonts", "fonts.conf") - self.runenv_info.prepend_path("FONTCONFIG_FILE", fontconfig_file) - - fontconfig_path = os.path.join(self.package_folder, "bin", "etc", "fonts") - self.runenv_info.prepend_path("FONTCONFIG_PATH", fontconfig_path) - - # TODO: to remove in conan v2 - self.cpp_info.names["cmake_find_package"] = "Fontconfig" - self.cpp_info.names["cmake_find_package_multi"] = "Fontconfig" - self.env_info.FONTCONFIG_FILE = fontconfig_file - self.env_info.FONTCONFIG_PATH = fontconfig_path - -def fix_msvc_libname(conanfile, remove_lib_prefix=True): - """remove lib prefix & change extension to .lib in case of cl like compiler""" - if not conanfile.settings.get_safe("compiler.runtime"): - return - from conan.tools.files import rename - import glob - libdirs = getattr(conanfile.cpp.package, "libdirs") - for libdir in libdirs: - for ext in [".dll.a", ".dll.lib", ".a"]: - full_folder = os.path.join(conanfile.package_folder, libdir) - for filepath in glob.glob(os.path.join(full_folder, f"*{ext}")): - libname = os.path.basename(filepath)[0:-len(ext)] - if remove_lib_prefix and libname[0:3] == "lib": - libname = libname[3:] - rename(conanfile, filepath, os.path.join(os.path.dirname(filepath), f"{libname}.lib")) diff --git a/recipes/fontconfig/meson/test_package/CMakeLists.txt b/recipes/fontconfig/meson/test_package/CMakeLists.txt deleted file mode 100644 index 5def13d67bcff..0000000000000 --- a/recipes/fontconfig/meson/test_package/CMakeLists.txt +++ /dev/null @@ -1,8 +0,0 @@ -cmake_minimum_required(VERSION 3.14) -project(test_package LANGUAGES C) - -find_package(Fontconfig REQUIRED) - -add_executable(${PROJECT_NAME} test_package.c) -target_link_libraries(${PROJECT_NAME} PRIVATE Fontconfig::Fontconfig) -target_compile_features(${PROJECT_NAME} PRIVATE c_std_99) diff --git a/recipes/fontconfig/meson/test_package/conanfile.py b/recipes/fontconfig/meson/test_package/conanfile.py deleted file mode 100644 index 42aa9d19c7fbe..0000000000000 --- a/recipes/fontconfig/meson/test_package/conanfile.py +++ /dev/null @@ -1,26 +0,0 @@ -from conan import ConanFile -from conan.tools.cmake import CMake, cmake_layout -from conan.tools.build import can_run -import os - - -class TestPackageConan(ConanFile): - settings = "os", "arch", "compiler", "build_type" - generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" - test_type = "explicit" - - def layout(self): - cmake_layout(self) - - def requirements(self): - self.requires(self.tested_reference_str) - - def build(self): - cmake = CMake(self) - cmake.configure() - cmake.build() - - def test(self): - if can_run(self): - bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") - self.run(bin_path, env="conanrun") diff --git a/recipes/fontconfig/meson/test_package/test_package.c b/recipes/fontconfig/meson/test_package/test_package.c deleted file mode 100644 index 7703ab64bbdec..0000000000000 --- a/recipes/fontconfig/meson/test_package/test_package.c +++ /dev/null @@ -1,24 +0,0 @@ -#include -#include -#include - -int main() { - FcConfig* config = FcInitLoadConfigAndFonts(); - FcPattern* pat = FcNameParse((const FcChar8*)"Arial"); - FcConfigSubstitute(config, pat, FcMatchPattern); - FcDefaultSubstitute(pat); - char* fontFile; - FcResult result; - FcPattern* font = FcFontMatch(config, pat, &result); - if (font) { - FcChar8* file = NULL; - if (FcPatternGetString(font, FC_FILE, 0, &file) == FcResultMatch) { - fontFile = (char*)file; - printf("%s\n",fontFile); - } - } else { - printf("Ops! I can't find any font!\n"); - } - FcPatternDestroy(pat); - return EXIT_SUCCESS; -} diff --git a/recipes/fontconfig/meson/test_v1_package/CMakeLists.txt b/recipes/fontconfig/meson/test_v1_package/CMakeLists.txt deleted file mode 100644 index 9e65290cb3f89..0000000000000 --- a/recipes/fontconfig/meson/test_v1_package/CMakeLists.txt +++ /dev/null @@ -1,9 +0,0 @@ -cmake_minimum_required(VERSION 3.1) -project(test_package C) - -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) - -add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ - ${CMAKE_CURRENT_BINARY_DIR}/test_package/ -) diff --git a/recipes/fontconfig/meson/test_v1_package/conanfile.py b/recipes/fontconfig/meson/test_v1_package/conanfile.py deleted file mode 100644 index 19e6a0c06e3d8..0000000000000 --- a/recipes/fontconfig/meson/test_v1_package/conanfile.py +++ /dev/null @@ -1,17 +0,0 @@ -from conans import ConanFile, CMake, tools -import os - - -class TestPackageConan(ConanFile): - settings = "os", "arch", "compiler", "build_type" - generators = "cmake", "cmake_find_package" - - def build(self): - cmake = CMake(self) - cmake.configure() - cmake.build() - - def test(self): - if not tools.cross_building(self): - bin_path = os.path.join("bin", "test_package") - self.run(bin_path, run_environment=True) diff --git a/recipes/foxglove-schemas-protobuf/all/conanfile.py b/recipes/foxglove-schemas-protobuf/all/conanfile.py index 5a5291f2d6ec4..c4e016879327e 100644 --- a/recipes/foxglove-schemas-protobuf/all/conanfile.py +++ b/recipes/foxglove-schemas-protobuf/all/conanfile.py @@ -8,7 +8,7 @@ import os -required_conan_version = ">=1.53.0" +required_conan_version = ">=1.60.0" class FoxgloveSchemasProtobufConan(ConanFile): @@ -64,11 +64,11 @@ def validate(self): if self.settings.os == "Windows" and self.options.shared: raise ConanInvalidConfiguration("Windows shared builds are not supported yet.") - def build_requirements(self): - self.tool_requires("protobuf/3.21.9") - def requirements(self): - self.requires("protobuf/3.21.9", transitive_headers=True, transitive_libs=True) + self.requires("protobuf/3.21.12", transitive_headers=True, transitive_libs=True) + + def build_requirements(self): + self.tool_requires("protobuf/") def layout(self): cmake_layout(self, src_folder="src") diff --git a/recipes/foxglove-websocket/all/conandata.yml b/recipes/foxglove-websocket/all/conandata.yml index 697b11f6c928c..1a4d0efe6e5f6 100644 --- a/recipes/foxglove-websocket/all/conandata.yml +++ b/recipes/foxglove-websocket/all/conandata.yml @@ -1,4 +1,10 @@ sources: + 1.3.1: + url: https://github.com/foxglove/ws-protocol/archive/refs/tags/releases/cpp/v1.3.1.tar.gz + sha256: 48bae8599603da893e559b952e7fec1392aeb55cc6d59288feac6e6428e61bef + 1.3.0: + url: https://github.com/foxglove/ws-protocol/archive/refs/tags/releases/cpp/v1.3.0.tar.gz + sha256: 5c1d4cda60a89bf635ef0150e8cd2f4da569f92beb8ac8555795ed7fd47f2a21 1.2.0: url: https://github.com/foxglove/ws-protocol/archive/refs/tags/releases/cpp/v1.2.0.tar.gz sha256: 0471d3932500ed6acd87a99cd76e048366c82f2527c1631afcee4f8ab71c4ab7 diff --git a/recipes/foxglove-websocket/config.yml b/recipes/foxglove-websocket/config.yml index 6f923ecb4a132..5aacc0f786340 100644 --- a/recipes/foxglove-websocket/config.yml +++ b/recipes/foxglove-websocket/config.yml @@ -1,4 +1,8 @@ versions: + 1.3.1: + folder: all + 1.3.0: + folder: all 1.2.0: folder: all 1.1.0: diff --git a/recipes/freeglut/all/conanfile.py b/recipes/freeglut/all/conanfile.py index 9b7f21448c416..dc8ac66bf9e42 100644 --- a/recipes/freeglut/all/conanfile.py +++ b/recipes/freeglut/all/conanfile.py @@ -85,8 +85,6 @@ def configure(self): self.options["libglvnd"].gles2 = True if self._requires_libglvnd_glx: self.options["libglvnd"].glx = True - if self.options.get_safe("with_wayland"): - self.options["xkbcommon"].with_wayland = True def layout(self): cmake_layout(self, src_folder="src") @@ -126,8 +124,6 @@ def validate(self): raise ConanInvalidConfiguration(f"{self.ref} requires the gles2 option of libglvnd to be enabled when the gles option is enabled") if self._requires_libglvnd_glx and not self.dependencies["libglvnd"].options.glx: raise ConanInvalidConfiguration(f"{self.ref} requires the glx option of libglvnd to be enabled when the gles option is disabled") - if self.options.get_safe("with_wayland") and not self.dependencies["xkbcommon"].options.with_wayland: - raise ConanInvalidConfiguration(f"{self.ref} requires the with_wayland option of xkbcommon to be enabled when the with_wayland option is enabled") def source(self): diff --git a/recipes/freeglut/all/test_package/conanfile.py b/recipes/freeglut/all/test_package/conanfile.py index 6e146f0e38642..0a6bc68712d90 100644 --- a/recipes/freeglut/all/test_package/conanfile.py +++ b/recipes/freeglut/all/test_package/conanfile.py @@ -14,7 +14,6 @@ def layout(self): def requirements(self): self.requires(self.tested_reference_str) - self.requires("opengl/system") def build(self): cmake = CMake(self) diff --git a/recipes/freeglut/all/test_package_module/conanfile.py b/recipes/freeglut/all/test_package_module/conanfile.py index 6e146f0e38642..0a6bc68712d90 100644 --- a/recipes/freeglut/all/test_package_module/conanfile.py +++ b/recipes/freeglut/all/test_package_module/conanfile.py @@ -14,7 +14,6 @@ def layout(self): def requirements(self): self.requires(self.tested_reference_str) - self.requires("opengl/system") def build(self): cmake = CMake(self) diff --git a/recipes/freeimage/all/test_package/conanfile.py b/recipes/freeimage/all/test_package/conanfile.py index 9f97d7f9f47a9..0a6bc68712d90 100644 --- a/recipes/freeimage/all/test_package/conanfile.py +++ b/recipes/freeimage/all/test_package/conanfile.py @@ -23,5 +23,4 @@ def build(self): def test(self): if can_run(self): bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") - bees = os.path.join(self.source_folder, "test.png") - self.run(f"{bin_path} {bees}", env="conanrun") + self.run(bin_path, env="conanrun") diff --git a/recipes/freeimage/all/test_package/test.png b/recipes/freeimage/all/test_package/test.png deleted file mode 100644 index 11640c7488fb1..0000000000000 Binary files a/recipes/freeimage/all/test_package/test.png and /dev/null differ diff --git a/recipes/freeimage/all/test_package/test_package.cpp b/recipes/freeimage/all/test_package/test_package.cpp index 0adc1a0375b01..b2164b2ffb68d 100644 --- a/recipes/freeimage/all/test_package/test_package.cpp +++ b/recipes/freeimage/all/test_package/test_package.cpp @@ -11,39 +11,14 @@ void FreeImageErrorHandler(FREE_IMAGE_FORMAT fif, const char* message) std::cerr << "FreeImage error: " << message << std::endl; } -int main(int argc, char** argv ) -{ - if (argc < 2) { - std::cerr << "Need at least one argument" << std::endl; - return 1; - } +int main(int argc, char** argv ) { #if NEED_INIT FreeImage_Initialise(); #endif FreeImage_SetOutputMessage(FreeImageErrorHandler); - - std::cout << "FreeImage " << FreeImage_GetVersion() << ", with:" << std::endl; - - for (int i = 0; i < FreeImage_GetFIFCount(); ++i) - { - std::cout << "\t- " << FreeImage_GetFIFExtensionList((FREE_IMAGE_FORMAT)i) << std::endl; - } - - const char * image_file = argv[1]; - FREE_IMAGE_FORMAT fif = FIF_UNKNOWN; - fif = FreeImage_GetFileType(image_file, 0); - if (fif == FIF_UNKNOWN) { - fif = FreeImage_GetFIFFromFilename(image_file); - } - if ((fif != FIF_UNKNOWN) && FreeImage_FIFSupportsReading(fif)) { - FIBITMAP* dib = FreeImage_Load(fif, image_file, 0); - if (dib) - { - FreeImage_Unload(dib); - } - } + std::cout << "FreeImage " << FreeImage_GetVersion() << std::endl; #if NEED_INIT FreeImage_DeInitialise(); diff --git a/recipes/freeimage/all/test_v1_package/conanfile.py b/recipes/freeimage/all/test_v1_package/conanfile.py index 6895afd01c85c..38f4483872d47 100644 --- a/recipes/freeimage/all/test_v1_package/conanfile.py +++ b/recipes/freeimage/all/test_v1_package/conanfile.py @@ -14,5 +14,4 @@ def build(self): def test(self): if not tools.cross_building(self): bin_path = os.path.join("bin", "test_package") - bees = os.path.join(self.source_folder, os.pardir, "test_package", "test.png") - self.run(f"{bin_path} {bees}", run_environment=True) + self.run(bin_path, run_environment=True) diff --git a/recipes/freetype/all/conandata.yml b/recipes/freetype/all/conandata.yml index 8e6b6b6c5bfe8..ffe78e299e4fb 100644 --- a/recipes/freetype/all/conandata.yml +++ b/recipes/freetype/all/conandata.yml @@ -1,14 +1,4 @@ sources: - "2.13.2": - url: - - "https://download.savannah.gnu.org/releases/freetype/freetype-2.13.2.tar.xz" - - "https://sourceforge.net/projects/freetype/files/freetype2/2.13.2/freetype-2.13.2.tar.xz" - sha256: "12991c4e55c506dd7f9b765933e62fd2be2e06d421505d7950a132e4f1bb484d" - "2.13.0": - url: - - "https://download.savannah.gnu.org/releases/freetype/freetype-2.13.0.tar.xz" - - "https://sourceforge.net/projects/freetype/files/freetype2/2.13.0/freetype-2.13.0.tar.xz" - sha256: "5ee23abd047636c24b2d43c6625dcafc66661d1aca64dec9e0d05df29592624c" "2.12.1": url: - "https://download.savannah.gnu.org/releases/freetype/freetype-2.12.1.tar.xz" @@ -24,8 +14,3 @@ sources: - "https://download.savannah.gnu.org/releases/freetype/freetype-2.10.4.tar.xz" - "https://sourceforge.net/projects/freetype/files/freetype2/2.10.4/freetype-2.10.4.tar.xz" sha256: "86a854d8905b19698bbc8f23b860bc104246ce4854dcea8e3b0fb21284f75784" -patches: - "2.13.0": - - patch_file: "patches/2.13.0-0001-fix-fallthrough.patch" - patch_description: "Fix FALL_THROUGH macro for clang 10 & 11" - patch_type: "portability" diff --git a/recipes/freetype/all/conanfile.py b/recipes/freetype/all/conanfile.py index 5543e9e0a5962..30f77de96b06e 100644 --- a/recipes/freetype/all/conanfile.py +++ b/recipes/freetype/all/conanfile.py @@ -40,18 +40,12 @@ class FreetypeConan(ConanFile): "subpixel": False, } - @property - def _has_with_brotli_option(self): - return Version(self.version) >= "2.10.2" - def export_sources(self): export_conandata_patches(self) def config_options(self): if self.settings.os == "Windows": del self.options.fPIC - if not self._has_with_brotli_option: - del self.options.with_brotli def configure(self): if self.options.shared: @@ -69,7 +63,7 @@ def requirements(self): self.requires("zlib/[>=1.2.10 <2]") if self.options.with_bzip2: self.requires("bzip2/1.0.8") - if self.options.get_safe("with_brotli"): + if self.options.with_brotli: self.requires("brotli/1.1.0") def source(self): @@ -90,17 +84,15 @@ def generate(self): # TODO: Harfbuzz can be added as an option as soon as it is available. tc.variables["FT_REQUIRE_HARFBUZZ"] = False tc.variables["FT_DISABLE_HARFBUZZ"] = True - if self._has_with_brotli_option: - tc.variables["FT_REQUIRE_BROTLI"] = self.options.with_brotli - tc.variables["FT_DISABLE_BROTLI"] = not self.options.with_brotli + tc.variables["FT_REQUIRE_BROTLI"] = self.options.with_brotli + tc.variables["FT_DISABLE_BROTLI"] = not self.options.with_brotli else: tc.variables["FT_WITH_ZLIB"] = self.options.with_zlib tc.variables["FT_WITH_PNG"] = self.options.with_png tc.variables["FT_WITH_BZIP2"] = self.options.with_bzip2 # TODO: Harfbuzz can be added as an option as soon as it is available. tc.variables["FT_WITH_HARFBUZZ"] = False - if self._has_with_brotli_option: - tc.variables["FT_WITH_BROTLI"] = self.options.with_brotli + tc.variables["FT_WITH_BROTLI"] = self.options.with_brotli # Generate a relocatable shared lib on Macos tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0042"] = "NEW" tc.generate() @@ -109,9 +101,8 @@ def _patch_sources(self): apply_conandata_patches(self) # Do not accidentally enable dependencies we have disabled cmakelists = os.path.join(self.source_folder, "CMakeLists.txt") - find_harfbuzz = "find_package(HarfBuzz {})".format("1.3.0" if Version(self.version) < "2.10.2" else "${HARFBUZZ_MIN_VERSION}") if_harfbuzz_found = "if ({})".format("HARFBUZZ_FOUND" if Version(self.version) < "2.11.0" else "HarfBuzz_FOUND") - replace_in_file(self, cmakelists, find_harfbuzz, "") + replace_in_file(self, cmakelists, "find_package(HarfBuzz ${HARFBUZZ_MIN_VERSION})", "") replace_in_file(self, cmakelists, if_harfbuzz_found, "if(0)") if not self.options.with_png: replace_in_file(self, cmakelists, "find_package(PNG)", "") @@ -122,16 +113,15 @@ def _patch_sources(self): if not self.options.with_bzip2: replace_in_file(self, cmakelists, "find_package(BZip2)", "") replace_in_file(self, cmakelists, "if (BZIP2_FOUND)", "if(0)") - if self._has_with_brotli_option: - # the custom FindBrotliDec of upstream is too fragile - replace_in_file(self, cmakelists, - "find_package(BrotliDec REQUIRED)", - "find_package(Brotli REQUIRED)\n" - "set(BROTLIDEC_FOUND 1)\n" - "set(BROTLIDEC_LIBRARIES \"brotli::brotli\")") - if not self.options.with_brotli: - replace_in_file(self, cmakelists, "find_package(BrotliDec)", "") - replace_in_file(self, cmakelists, "if (BROTLIDEC_FOUND)", "if(0)") + # the custom FindBrotliDec of upstream is too fragile + replace_in_file(self, cmakelists, + "find_package(BrotliDec REQUIRED)", + "find_package(Brotli REQUIRED)\n" + "set(BROTLIDEC_FOUND 1)\n" + "set(BROTLIDEC_LIBRARIES \"brotli::brotli\")") + if not self.options.with_brotli: + replace_in_file(self, cmakelists, "find_package(BrotliDec)", "") + replace_in_file(self, cmakelists, "if (BROTLIDEC_FOUND)", "if(0)") config_h = os.path.join(self.source_folder, "include", "freetype", "config", "ftoption.h") if self.options.subpixel: @@ -254,10 +244,10 @@ def package_info(self): libtool_version = load(self, self._libtool_version_txt).strip() self.conf_info.define("user.freetype:libtool_version", libtool_version) - # FIXME: need to do override the pkg_config version (pkg_config_custom_content does not work) - # self.cpp_info.version["pkg_config"] = pkg_config_version + self.cpp_info.set_property("system_package_version", libtool_version) # TODO: to remove in conan v2 once cmake_find_package* & pkg_config generators removed + self.cpp_info.set_property("component_version", libtool_version) self.cpp_info.filenames["cmake_find_package"] = "Freetype" self.cpp_info.filenames["cmake_find_package_multi"] = "freetype" self.cpp_info.names["cmake_find_package"] = "Freetype" diff --git a/recipes/freetype/all/patches/2.13.0-0001-fix-fallthrough.patch b/recipes/freetype/all/patches/2.13.0-0001-fix-fallthrough.patch deleted file mode 100644 index 0386998dea7bb..0000000000000 --- a/recipes/freetype/all/patches/2.13.0-0001-fix-fallthrough.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- a/include/freetype/internal/compiler-macros.h -+++ b/include/freetype/internal/compiler-macros.h -@@ -42,8 +42,8 @@ FT_BEGIN_HEADER - ( defined( __cplusplus ) && __cplusplus > 201402L ) - # define FALL_THROUGH [[__fallthrough__]] - # elif ( defined( __GNUC__ ) && __GNUC__ >= 7 ) || \ -- ( defined( __clang__ ) && __clang_major__ >= 10 ) --# define FALL_THROUGH __attribute__(( __fallthrough__ )) -+ ( defined( __clang__ ) && __clang_major__ >= 12 ) -+# define FALL_THROUGH __attribute__((fallthrough)) - # else - # define FALL_THROUGH ( (void)0 ) - # endif diff --git a/recipes/freetype/all/test_package/OpenSans-Bold.ttf b/recipes/freetype/all/test_package/OpenSans-Bold.ttf index fd79d43bea029..1588c2ced3a6c 100644 Binary files a/recipes/freetype/all/test_package/OpenSans-Bold.ttf and b/recipes/freetype/all/test_package/OpenSans-Bold.ttf differ diff --git a/recipes/freetype/all/test_package/conanfile.py b/recipes/freetype/all/test_package/conanfile.py index 5da019d033eb1..7c01d32f07d5a 100644 --- a/recipes/freetype/all/test_package/conanfile.py +++ b/recipes/freetype/all/test_package/conanfile.py @@ -8,6 +8,7 @@ class TestPackageConan(ConanFile): settings = "os", "compiler", "build_type", "arch" generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" test_type = "explicit" + license = "OFL-1.1-no-RFN" def layout(self): cmake_layout(self) diff --git a/recipes/freetype/all/test_package_module/conanfile.py b/recipes/freetype/all/test_package_module/conanfile.py index e789c017730b3..c01bc5d128062 100644 --- a/recipes/freetype/all/test_package_module/conanfile.py +++ b/recipes/freetype/all/test_package_module/conanfile.py @@ -8,6 +8,7 @@ class TestPackageConan(ConanFile): settings = "os", "arch", "compiler", "build_type" generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" test_type = "explicit" + license = "OFL-1.1-no-RFN" def layout(self): cmake_layout(self) diff --git a/recipes/freetype/all/test_v1_package/conanfile.py b/recipes/freetype/all/test_v1_package/conanfile.py index da2d908b1d4a7..fba25cb7ecbbc 100644 --- a/recipes/freetype/all/test_v1_package/conanfile.py +++ b/recipes/freetype/all/test_v1_package/conanfile.py @@ -5,6 +5,7 @@ class TestPackageConan(ConanFile): settings = "os", "arch", "compiler", "build_type" generators = "cmake", "cmake_find_package_multi" + license = "OFL-1.1-no-RFN" def build(self): cmake = CMake(self) diff --git a/recipes/freetype/all/test_v1_package_module/conanfile.py b/recipes/freetype/all/test_v1_package_module/conanfile.py index 7834358365541..1ddffa6741246 100644 --- a/recipes/freetype/all/test_v1_package_module/conanfile.py +++ b/recipes/freetype/all/test_v1_package_module/conanfile.py @@ -5,6 +5,7 @@ class TestPackageConan(ConanFile): settings = "os", "arch", "compiler", "build_type" generators = "cmake", "cmake_find_package" + license = "OFL-1.1-no-RFN" def build(self): cmake = CMake(self) diff --git a/recipes/freetype/config.yml b/recipes/freetype/config.yml index a1ef7bebb603a..d5b191e4495ca 100644 --- a/recipes/freetype/config.yml +++ b/recipes/freetype/config.yml @@ -1,8 +1,10 @@ versions: + "2.13.3": + folder: meson "2.13.2": - folder: all + folder: meson "2.13.0": - folder: all + folder: meson "2.12.1": folder: all "2.11.1": diff --git a/recipes/freetype/meson/conandata.yml b/recipes/freetype/meson/conandata.yml new file mode 100644 index 0000000000000..361e211d1b780 --- /dev/null +++ b/recipes/freetype/meson/conandata.yml @@ -0,0 +1,40 @@ +sources: + "2.13.3": + url: + - "https://download.savannah.gnu.org/releases/freetype/freetype-2.13.3.tar.xz" + - "https://sourceforge.net/projects/freetype/files/freetype2/2.13.3/freetype-2.13.3.tar.xz" + sha256: "0550350666d427c74daeb85d5ac7bb353acba5f76956395995311a9c6f063289" + "2.13.2": + url: + - "https://download.savannah.gnu.org/releases/freetype/freetype-2.13.2.tar.xz" + - "https://sourceforge.net/projects/freetype/files/freetype2/2.13.2/freetype-2.13.2.tar.xz" + sha256: "12991c4e55c506dd7f9b765933e62fd2be2e06d421505d7950a132e4f1bb484d" + "2.13.0": + url: + - "https://download.savannah.gnu.org/releases/freetype/freetype-2.13.0.tar.xz" + - "https://sourceforge.net/projects/freetype/files/freetype2/2.13.0/freetype-2.13.0.tar.xz" + sha256: "5ee23abd047636c24b2d43c6625dcafc66661d1aca64dec9e0d05df29592624c" +patches: + "2.13.3": + - patch_file: "patches/2.13.3-0002-meson-Fix-static-windows.patch" + patch_description: "meson: define DLL_EXPORT for shared library only" + patch_source: "https://gitlab.freedesktop.org/freetype/freetype/-/merge_requests/341" + patch_type: "portability" + "2.13.2": + - patch_file: "patches/2.13.0-0001-meson-Use-the-standard-dependency-mechanism-to-find-.patch" + patch_description: "meson: Use the standard dependency mechanism to find bzip2" + patch_source: "https://gitlab.freedesktop.org/freetype/freetype/-/merge_requests/318" + patch_type: "portability" + - patch_file: "patches/2.13.0-0002-meson-Fix-static-windows.patch" + patch_description: "meson: define DLL_EXPORT for shared library only" + patch_source: "https://gitlab.freedesktop.org/freetype/freetype/-/merge_requests/341" + patch_type: "portability" + "2.13.0": + - patch_file: "patches/2.13.0-0001-meson-Use-the-standard-dependency-mechanism-to-find-.patch" + patch_description: "meson: Use the standard dependency mechanism to find bzip2" + patch_source: "https://gitlab.freedesktop.org/freetype/freetype/-/merge_requests/318" + patch_type: "portability" + - patch_file: "patches/2.13.0-0002-meson-Fix-static-windows.patch" + patch_description: "meson: define DLL_EXPORT for shared library only" + patch_source: "https://gitlab.freedesktop.org/freetype/freetype/-/merge_requests/341" + patch_type: "portability" diff --git a/recipes/freetype/meson/conanfile.py b/recipes/freetype/meson/conanfile.py new file mode 100644 index 0000000000000..c48b965407536 --- /dev/null +++ b/recipes/freetype/meson/conanfile.py @@ -0,0 +1,258 @@ +from conan import ConanFile +from conan.tools.apple import fix_apple_shared_install_name +from conan.tools.files import ( + apply_conandata_patches, copy, export_conandata_patches, load, + get, rename, replace_in_file, rm, rmdir, save +) +from conan.tools.env import VirtualBuildEnv +from conan.tools.gnu import PkgConfigDeps +from conan.tools.layout import basic_layout +from conan.tools.meson import Meson, MesonToolchain +from conan.tools.scm import Version +import os +import re +import shutil +import textwrap + +required_conan_version = ">=1.53.0" + + +class FreetypeConan(ConanFile): + name = "freetype" + description = "FreeType is a freely available software library to render fonts." + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://www.freetype.org" + license = "FTL" + topics = ("freetype", "fonts") + package_type = "library" + short_paths = True + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + "with_png": [True, False], + "with_zlib": [True, False], + "with_bzip2": [True, False], + "with_brotli": [True, False], + "subpixel": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + "with_png": True, + "with_zlib": True, + "with_bzip2": True, + "with_brotli": True, + "subpixel": False, + } + + def export_sources(self): + export_conandata_patches(self) + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + self.settings.rm_safe("compiler.cppstd") + self.settings.rm_safe("compiler.libcxx") + + def layout(self): + basic_layout(self, src_folder="src") + + def requirements(self): + if self.options.with_png: + self.requires("libpng/[>=1.6 <2]") + if self.options.with_zlib: + self.requires("zlib/[>=1.2.10 <2]") + if self.options.with_bzip2: + self.requires("bzip2/1.0.8") + if self.options.get_safe("with_brotli"): + self.requires("brotli/1.1.0") + + def build_requirements(self): + self.tool_requires("meson/1.3.2") + if not self.conf.get("tools.gnu:pkg_config", default=False, check_type=str): + self.tool_requires("pkgconf/2.1.0") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + virtual_build_env = VirtualBuildEnv(self) + virtual_build_env.generate() + deps = PkgConfigDeps(self) + deps.generate() + + def feature(option): + return "enabled" if option else "disabled" + + tc = MesonToolchain(self) + tc.project_options["brotli"] = feature(self.options.with_brotli) + tc.project_options["bzip2"] = feature(self.options.with_bzip2) + # Harfbuzz support introduces a circular dependency between Harfbuzz and Freetype. + # They both have options to require each other. + tc.project_options["harfbuzz"] = "disabled" + tc.project_options["png"] = feature(self.options.with_png) + tc.project_options["tests"] = "disabled" + tc.project_options["zlib"] = "system" if self.options.with_zlib else "disabled" + tc.generate() + + def _patch_sources(self): + apply_conandata_patches(self) + config_h = os.path.join(self.source_folder, "include", "freetype", "config", "ftoption.h") + if self.options.subpixel: + replace_in_file(self, config_h, "/* #define FT_CONFIG_OPTION_SUBPIXEL_RENDERING */", "#define FT_CONFIG_OPTION_SUBPIXEL_RENDERING") + + def build(self): + self._patch_sources() + meson = Meson(self) + meson.configure() + meson.build() + + def _make_freetype_config(self, version): + freetype_config_in = os.path.join(self.source_folder, "builds", "unix", "freetype-config.in") + if not os.path.isdir(os.path.join(self.package_folder, "bin")): + os.makedirs(os.path.join(self.package_folder, "bin")) + freetype_config = os.path.join(self.package_folder, "bin", "freetype-config") + rename(self, freetype_config_in, freetype_config) + staticlibs = "-lm -lfreetype" if self.settings.os == "Linux" else "-lfreetype" + replace_in_file(self, freetype_config, r"%PKG_CONFIG%", r"/bin/false") # never use pkg-config + replace_in_file(self, freetype_config, r"%prefix%", r"$conan_prefix") + replace_in_file(self, freetype_config, r"%exec_prefix%", r"$conan_exec_prefix") + replace_in_file(self, freetype_config, r"%includedir%", r"$conan_includedir") + replace_in_file(self, freetype_config, r"%libdir%", r"$conan_libdir") + replace_in_file(self, freetype_config, r"%ft_version%", r"$conan_ftversion") + replace_in_file(self, freetype_config, r"%LIBSSTATIC_CONFIG%", r"$conan_staticlibs") + replace_in_file(self, freetype_config, r"export LC_ALL", textwrap.dedent("""\ + export LC_ALL + BINDIR=$(dirname $0) + conan_prefix=$(dirname $BINDIR) + conan_exec_prefix=${{conan_prefix}}/bin + conan_includedir=${{conan_prefix}}/include + conan_libdir=${{conan_prefix}}/lib + conan_ftversion={version} + conan_staticlibs="{staticlibs}" + """).format(version=version, staticlibs=staticlibs)) + + def _extract_libtool_version(self): + conf_raw = load(self, os.path.join(self.source_folder, "builds", "unix", "configure.raw")) + return re.search(r"^version_info='([0-9:]+)'", conf_raw, flags=re.M).group(1).replace(":", ".") + + @property + def _libtool_version_txt(self): + return os.path.join(self.package_folder, "res", "freetype-libtool-version.txt") + + def package(self): + meson = Meson(self) + meson.install() + + # As a workaround to support versions of CMake before 3.29, rename the libfreetype.a static library to freetype.lib on Windows. + if self.settings.os == "Windows" and not self.options.shared: + rename(self, os.path.join(self.package_folder, "lib", "libfreetype.a"), os.path.join(self.package_folder, "lib", "freetype.lib")) + + ver = Version(self.version) + if self.settings.os == "Windows" and self.options.shared and ver >= "2.13.0" and ver < "2.14.0": + # Duplicate DLL name for backwards compatibility with earlier recipe revisions + # See https://github.com/conan-io/conan-center-index/issues/23768 + suffix = "d" if self.settings.build_type == "Debug" else "" + src = os.path.join(self.package_folder, "bin", "freetype-6.dll") + dst = os.path.join(self.package_folder, "bin", f"freetype{suffix}.dll") + shutil.copyfile(src, dst) + + libtool_version = self._extract_libtool_version() + + save(self, self._libtool_version_txt, libtool_version) + self._make_freetype_config(libtool_version) + + doc_folder = os.path.join(self.source_folder, "docs") + license_folder = os.path.join(self.package_folder, "licenses") + copy(self, "FTL.TXT", doc_folder, license_folder) + copy(self, "GPLv2.TXT", doc_folder, license_folder) + copy(self, "LICENSE.TXT", doc_folder, license_folder) + + rm(self, "*.pdb", os.path.join(self.package_folder, "bin")) + + rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) + rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) + rmdir(self, os.path.join(self.package_folder, "share")) + self._create_cmake_module_variables( + os.path.join(self.package_folder, self._module_vars_rel_path) + ) + self._create_cmake_module_alias_targets( + os.path.join(self.package_folder, self._module_target_rel_path), + {"freetype": "Freetype::Freetype"} + ) + + fix_apple_shared_install_name(self) + + def _create_cmake_module_variables(self, module_file): + content = textwrap.dedent(f"""\ + set(FREETYPE_FOUND TRUE) + if(DEFINED Freetype_INCLUDE_DIRS) + set(FREETYPE_INCLUDE_DIRS ${{Freetype_INCLUDE_DIRS}}) + endif() + if(DEFINED Freetype_LIBRARIES) + set(FREETYPE_LIBRARIES ${{Freetype_LIBRARIES}}) + endif() + set(FREETYPE_VERSION_STRING "{self.version}") + """) + save(self, module_file, content) + + def _create_cmake_module_alias_targets(self, module_file, targets): + content = "" + for alias, aliased in targets.items(): + content += textwrap.dedent("""\ + if(TARGET {aliased} AND NOT TARGET {alias}) + add_library({alias} INTERFACE IMPORTED) + set_property(TARGET {alias} PROPERTY INTERFACE_LINK_LIBRARIES {aliased}) + endif() + """.format(alias=alias, aliased=aliased)) + save(self, module_file, content) + + @property + def _module_vars_rel_path(self): + return os.path.join("lib", "cmake", f"conan-official-{self.name}-variables.cmake") + + @property + def _module_target_rel_path(self): + return os.path.join("lib", "cmake", f"conan-official-{self.name}-targets.cmake") + + @staticmethod + def _chmod_plus_x(filename): + if os.name == "posix" and (os.stat(filename).st_mode & 0o111) != 0o111: + os.chmod(filename, os.stat(filename).st_mode | 0o111) + + def package_info(self): + self.cpp_info.set_property("cmake_find_mode", "both") + self.cpp_info.set_property("cmake_module_file_name", "Freetype") + self.cpp_info.set_property("cmake_file_name", "freetype") + self.cpp_info.set_property("cmake_target_name", "Freetype::Freetype") + self.cpp_info.set_property("cmake_target_aliases", ["freetype"]) # other possible target name in upstream config file + self.cpp_info.set_property("cmake_build_modules", [self._module_vars_rel_path]) + self.cpp_info.set_property("pkg_config_name", "freetype2") + self.cpp_info.libs = ["freetype"] + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.system_libs.append("m") + self.cpp_info.includedirs.append(os.path.join("include", "freetype2")) + + libtool_version = load(self, self._libtool_version_txt).strip() + self.conf_info.define("user.freetype:libtool_version", libtool_version) + self.cpp_info.set_property("system_package_version", libtool_version) + + # TODO: to remove in conan v2 once cmake_find_package* & pkg_config generators removed + self.cpp_info.set_property("component_version", libtool_version) + self.cpp_info.filenames["cmake_find_package"] = "Freetype" + self.cpp_info.filenames["cmake_find_package_multi"] = "freetype" + self.cpp_info.names["cmake_find_package"] = "Freetype" + self.cpp_info.names["cmake_find_package_multi"] = "Freetype" + self.cpp_info.build_modules["cmake_find_package"] = [self._module_vars_rel_path] + self.cpp_info.build_modules["cmake_find_package_multi"] = [self._module_target_rel_path] + self.cpp_info.names["pkg_config"] = "freetype2" + freetype_config = os.path.join(self.package_folder, "bin", "freetype-config") + self.env_info.PATH.append(os.path.join(self.package_folder, "bin")) + self.env_info.FT2_CONFIG = freetype_config + self._chmod_plus_x(freetype_config) + self.user_info.LIBTOOL_VERSION = libtool_version diff --git a/recipes/freetype/meson/patches/2.13.0-0001-meson-Use-the-standard-dependency-mechanism-to-find-.patch b/recipes/freetype/meson/patches/2.13.0-0001-meson-Use-the-standard-dependency-mechanism-to-find-.patch new file mode 100644 index 0000000000000..c38db5d6a0d6c --- /dev/null +++ b/recipes/freetype/meson/patches/2.13.0-0001-meson-Use-the-standard-dependency-mechanism-to-find-.patch @@ -0,0 +1,31 @@ +From 2598fa002859d2af1c846363ff64e72d2ebde16a Mon Sep 17 00:00:00 2001 +From: Jordan Williams +Date: Mon, 4 Mar 2024 12:14:51 -0600 +Subject: [PATCH] meson: Use the standard dependency mechanism to find bzip2 + +This follows standard conventions in Meson by using the pkg-config file. +This change allows Conan to switch to the Meson build system. +--- + meson.build | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/meson.build b/meson.build +index f81de3e2f..c5cb8ea52 100644 +--- a/meson.build ++++ b/meson.build +@@ -316,8 +316,10 @@ else + endif + + # BZip2 support +-bzip2_dep = cc.find_library('bz2', +- required: get_option('bzip2')) ++bzip2_dep = dependency('bzip2', required: false) ++if not bzip2_dep.found() ++ bzip2_dep = cc.find_library('bz2', has_headers: ['bzlib.h'], required: get_option('bzip2')) ++endif + + if bzip2_dep.found() + ftoption_command += ['--enable=FT_CONFIG_OPTION_USE_BZIP2'] +-- +2.44.0 + diff --git a/recipes/freetype/meson/patches/2.13.0-0002-meson-Fix-static-windows.patch b/recipes/freetype/meson/patches/2.13.0-0002-meson-Fix-static-windows.patch new file mode 100644 index 0000000000000..7faf662f6ebdf --- /dev/null +++ b/recipes/freetype/meson/patches/2.13.0-0002-meson-Fix-static-windows.patch @@ -0,0 +1,12 @@ +--- a/meson.build ++++ b/meson.build +@@ -368,7 +368,8 @@ ftoption_h = custom_target('ftoption.h', + ft2_sources += ftoption_h + ft2_defines += ['-DFT_CONFIG_OPTIONS_H='] + +-if host_machine.system() == 'windows' ++if host_machine.system() == 'windows' and \ ++ get_option('default_library') == 'shared' + ft2_defines += ['-DDLL_EXPORT=1'] + endif + diff --git a/recipes/freetype/meson/patches/2.13.3-0002-meson-Fix-static-windows.patch b/recipes/freetype/meson/patches/2.13.3-0002-meson-Fix-static-windows.patch new file mode 100644 index 0000000000000..e001a8bdca37c --- /dev/null +++ b/recipes/freetype/meson/patches/2.13.3-0002-meson-Fix-static-windows.patch @@ -0,0 +1,12 @@ +--- a/meson.build ++++ b/meson.build +@@ -373,7 +373,8 @@ ftoption_h = custom_target('ftoption.h', + ft2_sources += ftoption_h + ft2_defines += ['-DFT_CONFIG_OPTIONS_H='] + +-if host_machine.system() == 'windows' ++if host_machine.system() == 'windows' and \ ++ get_option('default_library') == 'shared' + ft2_defines += ['-DDLL_EXPORT=1'] + endif + diff --git a/recipes/freetype/meson/test_package/CMakeLists.txt b/recipes/freetype/meson/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..daf57e167b0ad --- /dev/null +++ b/recipes/freetype/meson/test_package/CMakeLists.txt @@ -0,0 +1,7 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES C) + +find_package(freetype REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.c) +target_link_libraries(${PROJECT_NAME} PRIVATE freetype) diff --git a/recipes/freetype/meson/test_package/OpenSans-Bold.ttf b/recipes/freetype/meson/test_package/OpenSans-Bold.ttf new file mode 100644 index 0000000000000..1588c2ced3a6c Binary files /dev/null and b/recipes/freetype/meson/test_package/OpenSans-Bold.ttf differ diff --git a/recipes/freetype/meson/test_package/conanfile.py b/recipes/freetype/meson/test_package/conanfile.py new file mode 100644 index 0000000000000..c762b4d9a11e2 --- /dev/null +++ b/recipes/freetype/meson/test_package/conanfile.py @@ -0,0 +1,29 @@ +from conan import ConanFile +from conan.tools.cmake import CMake, cmake_layout +from conan.tools.build import can_run +import os + + +class TestPackageConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + license = "OFL-1.1-no-RFN" + short_paths = True + + def layout(self): + cmake_layout(self) + + def requirements(self): + self.requires(self.tested_reference_str) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") + font_path = os.path.join(self.source_folder, "OpenSans-Bold.ttf") + self.run(f"{bin_path} {font_path}", env="conanrun") diff --git a/recipes/freetype/meson/test_package/test_package.c b/recipes/freetype/meson/test_package/test_package.c new file mode 100644 index 0000000000000..332eeaeae1c39 --- /dev/null +++ b/recipes/freetype/meson/test_package/test_package.c @@ -0,0 +1,142 @@ +/* example1.c */ +/* */ +/* This small program shows how to print a rotated string with the */ +/* FreeType 2 library. */ + +#include "ft2build.h" +#include FT_FREETYPE_H + +#include +#include +#include +#include + + + +#define WIDTH 640 +#define HEIGHT 480 + + +/* origin is the upper left corner */ +unsigned char image[HEIGHT][WIDTH]; + + +/* Replace this function with something useful. */ + +void +draw_bitmap( FT_Bitmap* bitmap, + FT_Int x, + FT_Int y) +{ + FT_Int i, j, p, q; + FT_Int x_max = x + bitmap->width; + FT_Int y_max = y + bitmap->rows; + + + /* for simplicity, we assume that `bitmap->pixel_mode' */ + /* is `FT_PIXEL_MODE_GRAY' (i.e., not a bitmap font) */ + + for ( i = x, p = 0; i < x_max; i++, p++ ) + { + for ( j = y, q = 0; j < y_max; j++, q++ ) + { + if ( i < 0 || j < 0 || + i >= WIDTH || j >= HEIGHT ) + continue; + + image[j][i] |= bitmap->buffer[q * bitmap->width + p]; + } + } +} + + +int +main( int argc, + char** argv ) +{ + FT_Library library; + FT_Face face; + + FT_GlyphSlot slot; + FT_Matrix matrix; /* transformation matrix */ + FT_Vector pen; /* untransformed origin */ + FT_Error error; + + char* filename; + char* text; + + double angle; + int target_height; + size_t n, num_chars; + + if (argc < 2) { + fprintf(stderr, "Usage: %s FONT\n", argv[0]); + return EXIT_FAILURE; + } + + filename = argv[1]; + text = "conan-center-index"; + num_chars = strlen( text ); + angle = ( 25.0 / 360 ) * 3.14159 * 2; /* use 25 degrees */ + target_height = HEIGHT; + + error = FT_Init_FreeType( &library ); /* initialize library */ + if (error) { + exit(EXIT_FAILURE); + } + + error = FT_New_Face( library, filename, 0, &face );/* create face object */ + if (error) { + exit(EXIT_FAILURE); + } + + /* use 50pt at 100dpi */ + error = FT_Set_Char_Size( face, 50 * 64, 0, 100, 0 ); + if (error) { + exit(EXIT_FAILURE); + } + + /* cmap selection omitted; */ + /* for simplicity we assume that the font contains a Unicode cmap */ + + slot = face->glyph; + + /* set up matrix */ + matrix.xx = (FT_Fixed)( cos( angle ) * 0x10000L ); + matrix.xy = (FT_Fixed)(-sin( angle ) * 0x10000L ); + matrix.yx = (FT_Fixed)( sin( angle ) * 0x10000L ); + matrix.yy = (FT_Fixed)( cos( angle ) * 0x10000L ); + + /* the pen position in 26.6 cartesian space coordinates; */ + /* start at (300,200) relative to the upper left corner */ + pen.x = 300 * 64; + pen.y = ( target_height - 200 ) * 64; + + for ( n = 0; n < num_chars; n++ ) + { + /* set transformation */ + FT_Set_Transform( face, &matrix, &pen ); + + /* load glyph image into the slot (erase previous one) */ + error = FT_Load_Char( face, text[n], FT_LOAD_RENDER); + if (error) { + exit(EXIT_FAILURE); + } + + /* now, draw to our target surface (convert position) */ + draw_bitmap( &slot->bitmap, + slot->bitmap_left, + target_height - slot->bitmap_top ); + + /* increment pen position */ + pen.x += slot->advance.x; + pen.y += slot->advance.y; + } + + FT_Done_Face ( face ); + FT_Done_FreeType( library ); + + return EXIT_SUCCESS; +} + +/* EOF */ diff --git a/recipes/freetype/meson/test_package_module/CMakeLists.txt b/recipes/freetype/meson/test_package_module/CMakeLists.txt new file mode 100644 index 0000000000000..a6125556234ed --- /dev/null +++ b/recipes/freetype/meson/test_package_module/CMakeLists.txt @@ -0,0 +1,23 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES C) + +find_package(Freetype REQUIRED MODULE) + +# Test whether variables from https://cmake.org/cmake/help/latest/module/FindFreetype.html +# are properly defined in conan generators +set(_custom_vars + FREETYPE_FOUND + FREETYPE_INCLUDE_DIRS + FREETYPE_LIBRARIES + FREETYPE_VERSION_STRING +) +foreach(_custom_var ${_custom_vars}) + if(DEFINED ${_custom_var}) + message(STATUS "${_custom_var}: ${${_custom_var}}") + else() + message(FATAL_ERROR "${_custom_var} not defined") + endif() +endforeach() + +add_executable(${PROJECT_NAME} ../test_package/test_package.c) +target_link_libraries(${PROJECT_NAME} PRIVATE Freetype::Freetype) diff --git a/recipes/freetype/meson/test_package_module/conanfile.py b/recipes/freetype/meson/test_package_module/conanfile.py new file mode 100644 index 0000000000000..ac4c13a76a824 --- /dev/null +++ b/recipes/freetype/meson/test_package_module/conanfile.py @@ -0,0 +1,29 @@ +from conan import ConanFile +from conan.tools.cmake import CMake, cmake_layout +from conan.tools.build import can_run +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + license = "OFL-1.1-no-RFN" + short_paths = True + + def layout(self): + cmake_layout(self) + + def requirements(self): + self.requires(self.tested_reference_str) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") + font_path = os.path.join(self.source_folder, os.pardir, "test_package", "OpenSans-Bold.ttf") + self.run(f"{bin_path} {font_path}", env="conanrun") diff --git a/recipes/freetype/meson/test_v1_package/CMakeLists.txt b/recipes/freetype/meson/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..b21cc49efde95 --- /dev/null +++ b/recipes/freetype/meson/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package + ${CMAKE_CURRENT_BINARY_DIR}/test_package) diff --git a/recipes/freetype/meson/test_v1_package/conanfile.py b/recipes/freetype/meson/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..fba25cb7ecbbc --- /dev/null +++ b/recipes/freetype/meson/test_v1_package/conanfile.py @@ -0,0 +1,19 @@ +from conans import ConanFile, CMake, tools +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "cmake", "cmake_find_package_multi" + license = "OFL-1.1-no-RFN" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if not tools.cross_building(self): + bin_path = os.path.join("bin", "test_package") + font_path = os.path.join(self.source_folder, os.pardir, "test_package", "OpenSans-Bold.ttf") + self.run(f"{bin_path} {font_path}", run_environment=True) diff --git a/recipes/freetype/meson/test_v1_package_module/CMakeLists.txt b/recipes/freetype/meson/test_v1_package_module/CMakeLists.txt new file mode 100644 index 0000000000000..8d5fc09fe6811 --- /dev/null +++ b/recipes/freetype/meson/test_v1_package_module/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package_module + ${CMAKE_CURRENT_BINARY_DIR}/test_package_module) diff --git a/recipes/freetype/meson/test_v1_package_module/conanfile.py b/recipes/freetype/meson/test_v1_package_module/conanfile.py new file mode 100644 index 0000000000000..1ddffa6741246 --- /dev/null +++ b/recipes/freetype/meson/test_v1_package_module/conanfile.py @@ -0,0 +1,19 @@ +from conans import ConanFile, CMake, tools +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "cmake", "cmake_find_package" + license = "OFL-1.1-no-RFN" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if not tools.cross_building(self): + bin_path = os.path.join("bin", "test_package") + font_path = os.path.join(self.source_folder, os.pardir, "test_package", "OpenSans-Bold.ttf") + self.run(f"{bin_path} {font_path}", run_environment=True) diff --git a/recipes/freexl/all/conanfile.py b/recipes/freexl/all/conanfile.py index 6f97355b38f7c..7cbab97fd7d07 100644 --- a/recipes/freexl/all/conanfile.py +++ b/recipes/freexl/all/conanfile.py @@ -54,7 +54,7 @@ def layout(self): def requirements(self): self.requires("libiconv/1.17") if Version(self.version) >= "2.0.0": - self.requires("expat/2.5.0") + self.requires("expat/[>=2.6.2 <3]") self.requires("minizip/1.2.13") def build_requirements(self): diff --git a/recipes/freexl/all/test_package/conanfile.py b/recipes/freexl/all/test_package/conanfile.py index fa2bdcf79755e..0a6bc68712d90 100644 --- a/recipes/freexl/all/test_package/conanfile.py +++ b/recipes/freexl/all/test_package/conanfile.py @@ -23,5 +23,4 @@ def build(self): def test(self): if can_run(self): bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") - xls_path = os.path.join(self.source_folder, "simple2003_21.xls") - self.run(f"{bin_path} {xls_path}", env="conanrun") + self.run(bin_path, env="conanrun") diff --git a/recipes/freexl/all/test_package/simple2003_21.xls b/recipes/freexl/all/test_package/simple2003_21.xls deleted file mode 100644 index 20e5d1313430a..0000000000000 Binary files a/recipes/freexl/all/test_package/simple2003_21.xls and /dev/null differ diff --git a/recipes/freexl/all/test_package/test_package.c b/recipes/freexl/all/test_package/test_package.c index 8c12ee6b6e6ed..17c8e6a9e25c3 100644 --- a/recipes/freexl/all/test_package/test_package.c +++ b/recipes/freexl/all/test_package/test_package.c @@ -1,317 +1,11 @@ -#include - -#include #include -#include - -int main(int argc, char **argv) { - if (argc < 2) { - fprintf(stderr, "Need at least one argument\n"); - return -1; - } - - const void *handle; - int ret; - unsigned int info; - const char *worksheet_name; - unsigned short active_idx; - unsigned int num_rows; - unsigned short num_columns; - FreeXL_CellValue cell_value; - - ret = freexl_open(argv[1], &handle); - if (ret != FREEXL_OK) { - fprintf(stderr, "OPEN ERROR: %d\n", ret); - return -1; - } - - ret = freexl_get_info(handle, FREEXL_CFBF_VERSION, &info); - if (ret != FREEXL_OK) { - fprintf(stderr, "GET_INFO ERROR for CFBF version: %d\n", ret); - return -3; - } - if (info != FREEXL_UNKNOWN) { - fprintf(stderr, "Unexpected CFBF_VERSION: %d\n", info); - return -4; - } - - ret = freexl_get_info(handle, FREEXL_CFBF_SECTOR_SIZE, &info); - if (ret != FREEXL_OK) { - fprintf(stderr, "GET_INFO ERROR for sector size: %d\n", ret); - return -5; - } - if (info != FREEXL_UNKNOWN) { - fprintf(stderr, "Unexpected CFBF_SECTOR_SIZE: %d\n", info); - return -6; - } - - ret = freexl_get_info(handle, FREEXL_CFBF_FAT_COUNT, &info); - if (ret != FREEXL_OK) { - fprintf(stderr, "GET_INFO ERROR for fat count: %d\n", ret); - return -7; - } - if (info != 0) { - fprintf(stderr, "Unexpected CFBF_FAT_COUNT: %d\n", info); - return -8; - } - - ret = freexl_get_info(handle, FREEXL_BIFF_VERSION, &info); - if (ret != FREEXL_OK) { - fprintf(stderr, "GET_INFO ERROR for BIFF version: %d\n", ret); - return -9; - } - if (info != FREEXL_BIFF_VER_2) { - fprintf(stderr, "Unexpected BIFF version: %d\n", info); - return -10; - } - - ret = freexl_get_info(handle, FREEXL_BIFF_MAX_RECSIZE, &info); - if (ret != FREEXL_OK) { - fprintf(stderr, "GET_INFO ERROR for BIFF record size: %d\n", ret); - return -11; - } - if (info != FREEXL_UNKNOWN) { - fprintf(stderr, "Unexpected BIFF max record size: %d\n", info); - return -12; - } - - ret = freexl_get_info(handle, FREEXL_BIFF_DATEMODE, &info); - if (ret != FREEXL_OK) { - fprintf(stderr, "GET_INFO ERROR for BIFF date mode: %d\n", ret); - return -13; - } - if (info != FREEXL_BIFF_DATEMODE_1900) { - fprintf(stderr, "Unexpected BIFF date mode: %d\n", info); - return -14; - } - - ret = freexl_get_info(handle, FREEXL_BIFF_PASSWORD, &info); - if (ret != FREEXL_OK) { - fprintf(stderr, "GET_INFO ERROR for BIFF password mode: %d\n", ret); - return -15; - } - if (info != FREEXL_BIFF_PLAIN) { - fprintf(stderr, "Unexpected BIFF password mode: %d\n", info); - return -16; - } - - ret = freexl_get_info(handle, FREEXL_BIFF_CODEPAGE, &info); - if (ret != FREEXL_OK) { - fprintf(stderr, "GET_INFO ERROR for BIFF codepage: %d\n", ret); - return -17; - } - if (info != FREEXL_BIFF_CP1252) { - fprintf(stderr, "Unexpected BIFF codepage: %d\n", info); - return -18; - } - - ret = freexl_get_info(handle, FREEXL_BIFF_SHEET_COUNT, &info); - if (ret != FREEXL_OK) { - fprintf(stderr, "GET_INFO ERROR for BIFF worksheet count: %d\n", ret); - return -19; - } - if (info != 1) { - fprintf(stderr, "Unexpected BIFF worksheet count: %d\n", info); - return -20; - } - - ret = freexl_get_info(handle, FREEXL_BIFF_FORMAT_COUNT, &info); - if (ret != FREEXL_OK) { - fprintf(stderr, "GET_INFO ERROR for BIFF format count: %d\n", ret); - return -21; - } - if (info != 10) { - fprintf(stderr, "Unexpected BIFF format count: %d\n", info); - return -22; - } - - ret = freexl_get_info(handle, FREEXL_BIFF_XF_COUNT, &info); - if (ret != FREEXL_OK) { - fprintf(stderr, "GET_INFO ERROR for BIFF extended format count: %d\n", ret); - return -23; - } - if (info != 6) { - fprintf(stderr, "Unexpected BIFF extended format count: %d\n", info); - return -24; - } - - /* We only have one worksheet, zero index */ - ret = freexl_get_worksheet_name(handle, 0, &worksheet_name); - if (ret != FREEXL_OK) { - fprintf(stderr, "Error getting worksheet name: %d\n", ret); - return -25; - } - if (strcmp(worksheet_name, "Worksheet") != 0) { - fprintf(stderr, "Unexpected worksheet name: %s\n", worksheet_name); - return -26; - } - - ret = freexl_select_active_worksheet(handle, 0); - if (ret != FREEXL_OK) { - fprintf(stderr, "Error setting active worksheet: %d\n", ret); - return -27; - } - - ret = freexl_get_active_worksheet(handle, &active_idx); - if (ret != FREEXL_OK) { - fprintf(stderr, "Error getting active worksheet: %d\n", ret); - return -28; - } - if (active_idx != 0) { - fprintf(stderr, "Unexpected active sheet: %d\n", info); - return -29; - } - - ret = freexl_worksheet_dimensions(handle, &num_rows, &num_columns); - if (ret != FREEXL_OK) { - fprintf(stderr, "Error getting worksheet dimensions: %d\n", ret); - return -30; - } - if ((num_rows != 4) || (num_columns != 6)) { - fprintf(stderr, "Unexpected active sheet dimensions: %u x %u\n", - num_rows, num_columns); - return -31; - } - - ret = freexl_get_cell_value(handle, 0, 0, &cell_value); - if (ret != FREEXL_OK) { - fprintf(stderr, "Error getting cell value (0,0): %d\n", ret); - return -32; - } - if (cell_value.type != FREEXL_CELL_TEXT) { - fprintf(stderr, "Unexpected cell (0,0) type: %u\n", cell_value.type); - return -33; - } - if (strcmp(cell_value.value.text_value, "Column 1") != 0) { - fprintf(stderr, "Unexpected cell (0,0) value: %s\n", cell_value.value.text_value); - return -34; - } - - ret = freexl_get_cell_value(handle, 3, 0, &cell_value); - if (ret != FREEXL_OK) { - fprintf(stderr, "Error getting cell value (3,0): %d\n", ret); - return -35; - } - if (cell_value.type != FREEXL_CELL_DOUBLE) { - fprintf(stderr, "Unexpected cell (3,0) type: %u\n", cell_value.type); - return -36; - } - if (cell_value.value.double_value != 3.14) { - fprintf(stderr, "Unexpected cell (3,0) value: %g\n", cell_value.value.double_value); - return -37; - } - - ret = freexl_get_cell_value(handle, 3, 1, &cell_value); - if (ret != FREEXL_OK) { - fprintf(stderr, "Error getting cell value (3,1): %d\n", ret); - return -38; - } - if (cell_value.type != FREEXL_CELL_DOUBLE) { - fprintf(stderr, "Unexpected cell (3,1) type: %u\n", cell_value.type); - return -39; - } - if (cell_value.value.double_value != -56.3089) { - fprintf(stderr, "Unexpected cell (3,1) value: %g\n", cell_value.value.double_value); - return -40; - } - - ret = freexl_get_cell_value(handle, 3, 2, &cell_value); - if (ret != FREEXL_OK) { - fprintf(stderr, "Error getting cell value (3,2): %d\n", ret); - return -41; - } - if (cell_value.type != FREEXL_CELL_DOUBLE) { - fprintf(stderr, "Unexpected cell (3,2) type: %u\n", cell_value.type); - return -42; - } - if (cell_value.value.double_value != 0.67) { - fprintf(stderr, "Unexpected cell (3,2) value: %g\n", cell_value.value.double_value); - return -43; - } - - ret = freexl_get_cell_value(handle, 3, 3, &cell_value); - if (ret != FREEXL_OK) { - fprintf(stderr, "Error getting cell value (3,3): %d\n", ret); - return -44; - } - if (cell_value.type != FREEXL_CELL_DATE) { - fprintf(stderr, "Unexpected cell (3,3) type: %u\n", cell_value.type); - return -45; - } - if (strcmp(cell_value.value.text_value, "1967-10-01") != 0) { - fprintf(stderr, "Unexpected cell (3,3) value: %s\n", cell_value.value.text_value); - return -46; - } - - ret = freexl_get_cell_value(handle, 3, 4, &cell_value); - if (ret != FREEXL_OK) { - fprintf(stderr, "Error getting cell value (3,4): %d\n", ret); - return -47; - } - if (cell_value.type != FREEXL_CELL_INT) { - fprintf(stderr, "Unexpected cell (3,4) type: %u\n", cell_value.type); - return -48; - } - if (cell_value.value.int_value != 4) { - fprintf(stderr, "Unexpected cell (3,4) value: %d\n", cell_value.value.int_value); - return -49; - } - - ret = freexl_get_cell_value(handle, 3, 5, &cell_value); - if (ret != FREEXL_OK) { - fprintf(stderr, "Error getting cell value (3,5): %d\n", ret); - return -50; - } - if (cell_value.type != FREEXL_CELL_INT) { - fprintf(stderr, "Unexpected cell (3,5) type: %u\n", cell_value.type); - return -51; - } - if (cell_value.value.int_value != 237) { - fprintf(stderr, "Unexpected cell (3,5) value: %d\n", cell_value.value.int_value); - return -52; - } - - ret = freexl_get_cell_value(handle, 1, 5, &cell_value); - if (ret != FREEXL_OK) { - fprintf(stderr, "Error getting cell value (1,5): %d\n", ret); - return -53; - } - if (cell_value.type != FREEXL_CELL_TIME) { - fprintf(stderr, "Unexpected cell (1,5) type: %u\n", cell_value.type); - return -54; - } - if (strcmp(cell_value.value.text_value, "23:34:04") != 0) { - fprintf(stderr, "Unexpected cell (1,5) value: %s\n", cell_value.value.text_value); - return -55; - } +#include "freexl.h" - /* error cases */ - ret = freexl_get_cell_value(handle, 7, 3, &cell_value); - if (ret != FREEXL_ILLEGAL_CELL_ROW_COL) { - fprintf(stderr, "Unexpected result for (7,3): %d\n", ret); - return -56; - } - ret = freexl_get_cell_value(handle, 2, 99, &cell_value); - if (ret != FREEXL_ILLEGAL_CELL_ROW_COL) { - fprintf(stderr, "Unexpected result for (2,99): %d\n", ret); - return -57; - } - ret = freexl_get_cell_value(handle, 4, 2, &cell_value); - if (ret != FREEXL_ILLEGAL_CELL_ROW_COL) { - fprintf(stderr, "Unexpected result for (4,2): %d\n", ret); - return -58; - } - ret = freexl_get_cell_value(handle, 3, 6, &cell_value); - if (ret != FREEXL_ILLEGAL_CELL_ROW_COL) { - fprintf(stderr, "Unexpected result for (3,6): %d\n", ret); - return -59; - } - ret = freexl_close(handle); - if (ret != FREEXL_OK) { - fprintf(stderr, "CLOSE ERROR: %d\n", ret); - return -2; - } +int main() { + const void *handle; + int ret; + ret = freexl_open("", &handle); + freexl_close(handle); - return 0; } diff --git a/recipes/freexl/all/test_v1_package/conanfile.py b/recipes/freexl/all/test_v1_package/conanfile.py index 305903625c5ac..38f4483872d47 100644 --- a/recipes/freexl/all/test_v1_package/conanfile.py +++ b/recipes/freexl/all/test_v1_package/conanfile.py @@ -14,5 +14,4 @@ def build(self): def test(self): if not tools.cross_building(self): bin_path = os.path.join("bin", "test_package") - xls_path = os.path.join(self.source_folder, os.pardir, "test_package", "simple2003_21.xls") - self.run(f"{bin_path} {xls_path}", run_environment=True) + self.run(bin_path, run_environment=True) diff --git a/recipes/frozen/all/conandata.yml b/recipes/frozen/all/conandata.yml index 4d9b977925cb2..cf0083d308f87 100644 --- a/recipes/frozen/all/conandata.yml +++ b/recipes/frozen/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.2.0": + url: "https://github.com/serge-sans-paille/frozen/archive/1.2.0.tar.gz" + sha256: "ed8339c017d7c5fe019ac2c642477f435278f0dc643c1d69d3f3b1e95915e823" "1.1.1": url: "https://github.com/serge-sans-paille/frozen/archive/1.1.1.tar.gz" sha256: "f7c7075750e8fceeac081e9ef01944f221b36d9725beac8681cbd2838d26be45" diff --git a/recipes/frozen/config.yml b/recipes/frozen/config.yml index 9234b604d8ed1..188555eba6e58 100644 --- a/recipes/frozen/config.yml +++ b/recipes/frozen/config.yml @@ -1,4 +1,6 @@ versions: + "1.2.0": + folder: all "1.1.1": folder: all "1.0.1": diff --git a/recipes/frugally-deep/all/conandata.yml b/recipes/frugally-deep/all/conandata.yml index e666368bd2a72..8e2ab1f676fe6 100644 --- a/recipes/frugally-deep/all/conandata.yml +++ b/recipes/frugally-deep/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.16.0": + url: "https://github.com/Dobiasd/frugally-deep/archive/v0.16.0.tar.gz" + sha256: "5ffe8dddb43a645094b2ca1d48e4ee78e685fbef3c89f08cea8425a39dad9865" "0.15.31": url: "https://github.com/Dobiasd/frugally-deep/archive/v0.15.31.tar.gz" sha256: "49bf5e30ad2d33e464433afbc8b6fe8536fc959474004a1ce2ac03d7c54bc8ba" @@ -8,24 +11,3 @@ sources: "0.15.29": url: "https://github.com/Dobiasd/frugally-deep/archive/v0.15.29.tar.gz" sha256: "032cd525d4a7b9b3ebe28fd5e3984ac3e569da496f65d52c81030aabd9d0c52e" - "0.15.25-p0": - url: "https://github.com/Dobiasd/frugally-deep/archive/v0.15.25-p0.tar.gz" - sha256: "d1204bc13ace603e97696aa7a1331d6af819c3a9b4952b4fd1e3d72dd8f524c3" - "0.15.24-p0": - url: "https://github.com/Dobiasd/frugally-deep/archive/v0.15.24-p0.tar.gz" - sha256: "118b0219a3f17c6d5a3535874acb145ee2079fd309e1fb83884facc684810baf" - "0.15.19-p0": - url: "https://github.com/Dobiasd/frugally-deep/archive/v0.15.19-p0.tar.gz" - sha256: "acaba428ae19ef8d57a53b3767373cd96770c190dd57909e52d2759be89ac942" - "0.15.18-p0": - url: "https://github.com/Dobiasd/frugally-deep/archive/v0.15.18-p0.tar.gz" - sha256: "b721bd7b2fa842a1a10f00008e079c057fab7a5cfc4c394d64238ee59ad7e189" - "0.15.16-p0": - url: "https://github.com/Dobiasd/frugally-deep/archive/v0.15.16-p0.tar.gz" - sha256: "778b8cf0da847239a2ad21c611331b231831c6c175154c68ca30dd87489336a5" - "0.15.13-p0": - url: "https://github.com/Dobiasd/frugally-deep/archive/v0.15.13-p0.tar.gz" - sha256: "ca18c7b8dc0df3a36dba3c2578df35592e61ff51e5bbaa1c1ed3e6c529e14075" - "0.15.1-p0": - url: "https://github.com/Dobiasd/frugally-deep/archive/v0.15.1-p0.tar.gz" - sha256: "ab15cb540a8ddeffa56cd8235bfdf709f5d6b3b2543d9ec83658c5d9bad02f18" diff --git a/recipes/frugally-deep/all/conanfile.py b/recipes/frugally-deep/all/conanfile.py index 5fb9992a315dc..f2070b97639e6 100644 --- a/recipes/frugally-deep/all/conanfile.py +++ b/recipes/frugally-deep/all/conanfile.py @@ -39,7 +39,7 @@ def layout(self): def requirements(self): self.requires("eigen/3.4.0") - self.requires("functionalplus/0.2.23") + self.requires("functionalplus/0.2.24") self.requires("nlohmann_json/3.11.3") def package_id(self): diff --git a/recipes/frugally-deep/config.yml b/recipes/frugally-deep/config.yml index ef73eeeb31a1b..4b946ca53d49d 100644 --- a/recipes/frugally-deep/config.yml +++ b/recipes/frugally-deep/config.yml @@ -1,21 +1,9 @@ versions: + "0.16.0": + folder: all "0.15.31": folder: all "0.15.30": folder: all "0.15.29": folder: all - "0.15.25-p0": - folder: all - "0.15.24-p0": - folder: all - "0.15.19-p0": - folder: all - "0.15.18-p0": - folder: all - "0.15.16-p0": - folder: all - "0.15.13-p0": - folder: all - "0.15.1-p0": - folder: all diff --git a/recipes/functionalplus/all/conandata.yml b/recipes/functionalplus/all/conandata.yml index a99f4612ba4db..ce67a8c16c149 100644 --- a/recipes/functionalplus/all/conandata.yml +++ b/recipes/functionalplus/all/conandata.yml @@ -1,28 +1,13 @@ sources: + "0.2.25": + url: "https://github.com/Dobiasd/FunctionalPlus/archive/v0.2.25.tar.gz" + sha256: "9b5e24bbc92f43b977dc83efbc173bcf07dbe07f8718fc2670093655b56fcee3" + "0.2.24": + url: "https://github.com/Dobiasd/FunctionalPlus/archive/v0.2.24.tar.gz" + sha256: "446c63ac3f2045e7587f694501882a3d7c7b962b70bcc08deacf5777bdaaff8c" "0.2.23": url: "https://github.com/Dobiasd/FunctionalPlus/archive/v0.2.23.tar.gz" sha256: "5c2d28d2ba7d0cdeab9e31bbf2e7f8a9d6f2ff6111a54bfc11d1b05422096f19" "0.2.22": url: "https://github.com/Dobiasd/FunctionalPlus/archive/v0.2.22.tar.gz" sha256: "79378668dff6ffa8abc1abde2c2fe37dc6fe1ac040c55d5ee7886924fa6a1376" - "0.2.20-p0": - url: "https://github.com/Dobiasd/FunctionalPlus/archive/v0.2.20-p0.tar.gz" - sha256: "6a8e56bd7976b7d5a6a31001f36bc199c2997f1144994fa0b48a1a5b8497abbc" - "0.2.18-p0": - url: "https://github.com/Dobiasd/FunctionalPlus/archive/v0.2.18-p0.tar.gz" - sha256: "ffc63fc86f89a205accafa85c35790eda307adf5f1d6d51bb7ceb5c5e21e013b" - "0.2.17-p0": - url: "https://github.com/Dobiasd/FunctionalPlus/archive/v0.2.17-p0.tar.gz" - sha256: "c41514b24a81ad47a8f98b3ef3a3bd3fe8109085f7965e9678386b08721e3620" - "0.2.16": - url: "https://github.com/Dobiasd/FunctionalPlus/archive/v0.2.16-p0.tar.gz" - sha256: "6026e64260afbd6941aaf19559d6e5dc51cbb3e045ef8d8e158d96bcd8651ed6" - "0.2.15": - url: "https://github.com/Dobiasd/FunctionalPlus/archive/v0.2.15-p0.tar.gz" - sha256: "4c76104ec8f6da5e66ed768380bdf128e0ba01725056c40a3c1b850cf4b441ad" - "0.2.14-p0": - url: "https://github.com/Dobiasd/FunctionalPlus/archive/refs/tags/v0.2.14-p0.tar.gz" - sha256: "68a0e715aa18d2fe558fede06d65ec125959895efe4d0ef21b102037c9864ba1" - "0.2.13-p0": - url: "https://github.com/Dobiasd/FunctionalPlus/archive/v0.2.13-p0.tar.gz" - sha256: "62f61ce6500859f0d77306b1644b5c6992287688de38e170b17b8a66b2448b54" diff --git a/recipes/functionalplus/config.yml b/recipes/functionalplus/config.yml index ebd7ef7a33637..1aa00fc767fdd 100644 --- a/recipes/functionalplus/config.yml +++ b/recipes/functionalplus/config.yml @@ -1,19 +1,9 @@ versions: - "0.2.23": - folder: all - "0.2.22": - folder: all - "0.2.20-p0": - folder: all - "0.2.18-p0": + "0.2.25": folder: all - "0.2.17-p0": + "0.2.24": folder: all - "0.2.16": - folder: all - "0.2.15": - folder: all - "0.2.14-p0": + "0.2.23": folder: all - "0.2.13-p0": + "0.2.22": folder: all diff --git a/recipes/gaia-ecs/all/conandata.yml b/recipes/gaia-ecs/all/conandata.yml new file mode 100644 index 0000000000000..0f7a267f7719c --- /dev/null +++ b/recipes/gaia-ecs/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "0.8.6": + url: "https://github.com/richardbiely/gaia-ecs/archive/refs/tags/v0.8.6.tar.gz" + sha256: "9CAC0AC6F2FB19DFFF07D097F5DC0A97FF1CA4AEC3405219CB2D2A03601AB03F" diff --git a/recipes/gaia-ecs/all/conanfile.py b/recipes/gaia-ecs/all/conanfile.py new file mode 100644 index 0000000000000..ad8069272b4bb --- /dev/null +++ b/recipes/gaia-ecs/all/conanfile.py @@ -0,0 +1,74 @@ +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.scm import Version +from conan.tools.build import check_min_cppstd +from conan.tools.files import copy, get +from conan.tools.layout import basic_layout +import os + +required_conan_version = ">=1.52.0" + + +class GaiaConan(ConanFile): + name = "gaia-ecs" + description = "A simple and powerful entity component system (ECS) written in C++17 " + topics = ("gamedev", "performance", "entity", "ecs") + homepage = "https://github.com/richardbiely/gaia-ecs" + url = "https://github.com/conan-io/conan-center-index" + license = "MIT" + package_type = "header-library" + settings = "os", "arch", "compiler", "build_type" + + @property + def _min_cppstd(self): + return "17" + + @property + def _compilers_minimum_version(self): + return { + "Visual Studio": "16", + "msvc": "192", + "gcc": "10", + "clang": "7.0", + "apple-clang": "10.0", + "intel-cc": "2021.2" + } + + def layout(self): + basic_layout(self, src_folder="src") + + def package_id(self): + self.info.clear() + + def validate(self): + if self.settings.compiler.get_safe("cppstd"): + check_min_cppstd(self, self._min_cppstd) + + minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) + if minimum_version and Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration( + f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." + ) + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def build(self): + pass + + def package(self): + copy(self, "LICENSE", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) + copy(self, "*", src=os.path.join(self.source_folder, "include"), dst=os.path.join(self.package_folder, "include")) + + def package_info(self): + if self.settings.os in ["FreeBSD", "Linux"]: + self.cpp_info.system_libs = ["pthread"] + + self.cpp_info.set_property("cmake_file_name", "gaia") + self.cpp_info.set_property("cmake_target_name", "gaia::gaia") + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] + + # TODO: remove when v1 support drops + self.cpp_info.names["cmake_find_package"] = "gaia" + self.cpp_info.names["cmake_find_package_multi"] = "gaia" diff --git a/recipes/gaia-ecs/all/test_package/CMakeLists.txt b/recipes/gaia-ecs/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..d9ccb13290576 --- /dev/null +++ b/recipes/gaia-ecs/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.8) +project(test_package LANGUAGES CXX) + +find_package(gaia REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE gaia::gaia) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) diff --git a/recipes/gaia-ecs/all/test_package/conanfile.py b/recipes/gaia-ecs/all/test_package/conanfile.py new file mode 100644 index 0000000000000..0a6bc68712d90 --- /dev/null +++ b/recipes/gaia-ecs/all/test_package/conanfile.py @@ -0,0 +1,26 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import CMake, cmake_layout +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeToolchain", "CMakeDeps", "VirtualRunEnv" + test_type = "explicit" + + def layout(self): + cmake_layout(self) + + def requirements(self): + self.requires(self.tested_reference_str) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/gaia-ecs/all/test_package/test_package.cpp b/recipes/gaia-ecs/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..105e808a6373e --- /dev/null +++ b/recipes/gaia-ecs/all/test_package/test_package.cpp @@ -0,0 +1,9 @@ +#include + +int main() +{ + gaia::ecs::World w; + gaia::ecs::Entity e = w.add(); + (void) w.valid(e); + return 0; +} diff --git a/recipes/gaia-ecs/config.yml b/recipes/gaia-ecs/config.yml new file mode 100644 index 0000000000000..5169c9c9c27e4 --- /dev/null +++ b/recipes/gaia-ecs/config.yml @@ -0,0 +1,3 @@ +versions: + "0.8.6": + folder: all diff --git a/recipes/games101-cgl/all/conandata.yml b/recipes/games101-cgl/all/conandata.yml new file mode 100644 index 0000000000000..73b714f87c14e --- /dev/null +++ b/recipes/games101-cgl/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "0.1.0": + url: "https://github.com/endingly/games101-cgl/archive/refs/tags/v0.1.0.zip" + sha256: dc17b76ed4f2d9222c17a75ab22e07f156f077d0a243f35539b4439cc0cb9ae9 diff --git a/recipes/games101-cgl/all/conanfile.py b/recipes/games101-cgl/all/conanfile.py new file mode 100644 index 0000000000000..370dac2201804 --- /dev/null +++ b/recipes/games101-cgl/all/conanfile.py @@ -0,0 +1,91 @@ +from conan import ConanFile +from conan.tools.files import get, copy, rmdir, rm +from conan.tools.build import check_min_cppstd +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +import os + +required_conan_version = ">=1.55.0" + +class Games101CglConan(ConanFile): + name = "games101-cgl" + description = "The package is for Games101's homework8 subproject" + license = "MIT" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/endingly/games101-cgl" + topics = ("games101", "graphics") + package_type = "library" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + } + + @property + def _min_cppstd(self): + return 11 + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + + def layout(self): + cmake_layout(self, src_folder="src") + + def requirements(self): + self.requires("freetype/2.13.2") + self.requires("glew/2.2.0", transitive_headers=True) + self.requires("glfw/3.4", transitive_headers=True) + + def validate(self): + if self.settings.compiler.cppstd: + check_min_cppstd(self, self._min_cppstd) + + def build_requirements(self): + self.tool_requires("cmake/[>=3.25 <4.0.0]") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + toolchain = CMakeToolchain(self) + toolchain.generate() + deps = CMakeDeps(self) + deps.generate() + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def package(self): + copy(self, pattern="LICENSE*", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) + cmake = CMake(self) + cmake.install() + + rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) + rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) + rmdir(self, os.path.join(self.package_folder, "share")) + rm(self, "*.la", os.path.join(self.package_folder, "lib")) + rm(self, "*.pdb", os.path.join(self.package_folder, "lib")) + rm(self, "*.pdb", os.path.join(self.package_folder, "bin")) + + def package_info(self): + suffix = "d" if self.settings.build_type == "Debug" else "" + self.cpp_info.libs = ["CGL" + suffix] + + self.cpp_info.set_property("cmake_file_name", "games101-cgl") + self.cpp_info.set_property("cmake_target_name", "games101-cgl::games101-cgl") + + # TODO: to remove in conan v2 once cmake_find_package* generators removed + self.cpp_info.filenames["cmake_find_package"] = "games101-cgl" + self.cpp_info.filenames["cmake_find_package_multi"] = "games101-cgl" + self.cpp_info.names["cmake_find_package"] = "games101-cgl" + self.cpp_info.names["cmake_find_package_multi"] = "games101-cgl" diff --git a/recipes/games101-cgl/all/test_package/CMakeLists.txt b/recipes/games101-cgl/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..fbd0be167add6 --- /dev/null +++ b/recipes/games101-cgl/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.8) +project(test_package LANGUAGES CXX) + +find_package(games101-cgl REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE games101-cgl::games101-cgl) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) diff --git a/recipes/objectbox/all/test_package/conanfile.py b/recipes/games101-cgl/all/test_package/conanfile.py similarity index 100% rename from recipes/objectbox/all/test_package/conanfile.py rename to recipes/games101-cgl/all/test_package/conanfile.py diff --git a/recipes/games101-cgl/all/test_package/test_package.cpp b/recipes/games101-cgl/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..94b4226d74ca7 --- /dev/null +++ b/recipes/games101-cgl/all/test_package/test_package.cpp @@ -0,0 +1,8 @@ +#include + +#include + +int main() { + CGL::Vector2D vector{5, 4}; + std::cout << vector << '\n'; +} diff --git a/recipes/flatbuffers/all/test_v1_package/CMakeLists.txt b/recipes/games101-cgl/all/test_v1_package/CMakeLists.txt similarity index 100% rename from recipes/flatbuffers/all/test_v1_package/CMakeLists.txt rename to recipes/games101-cgl/all/test_v1_package/CMakeLists.txt diff --git a/recipes/objectbox/all/test_v1_package/conanfile.py b/recipes/games101-cgl/all/test_v1_package/conanfile.py similarity index 100% rename from recipes/objectbox/all/test_v1_package/conanfile.py rename to recipes/games101-cgl/all/test_v1_package/conanfile.py diff --git a/recipes/games101-cgl/config.yml b/recipes/games101-cgl/config.yml new file mode 100644 index 0000000000000..6c11a439d0bc2 --- /dev/null +++ b/recipes/games101-cgl/config.yml @@ -0,0 +1,3 @@ +versions: + "0.1.0": + folder: all diff --git a/recipes/gcc/all/conanfile.py b/recipes/gcc/all/conanfile.py index 103152cf95e82..da18e51121b44 100644 --- a/recipes/gcc/all/conanfile.py +++ b/recipes/gcc/all/conanfile.py @@ -29,20 +29,23 @@ def configure(self): if self.settings.compiler in ["clang", "apple-clang"]: # Can't remove this from cxxflags with autotools - so get rid of it del self.settings.compiler.libcxx + + # https://github.com/gcc-mirror/gcc/blob/6b5248d15c6d10325c6cbb92a0e0a9eb04e3f122/libcody/configure#L2505C11-L2505C25 + del self.settings.compiler.cppstd def build_requirements(self): if self.settings.os == "Linux": # binutils recipe is broken for Macos, and Windows uses tools # distributed with msys/mingw - self.tool_requires("binutils/2.38") + self.tool_requires("binutils/2.42") self.tool_requires("flex/2.6.4") def requirements(self): self.requires("mpc/1.2.0") - self.requires("mpfr/4.1.0") - self.requires("gmp/6.2.1") - self.requires("zlib/1.2.13") - self.requires("isl/0.24") + self.requires("mpfr/4.2.0") + self.requires("gmp/6.3.0") + self.requires("zlib/[>=1.2.13 <2]") + self.requires("isl/0.26") def package_id(self): del self.info.settings.compiler diff --git a/recipes/gcem/all/conandata.yml b/recipes/gcem/all/conandata.yml index 5aa429fe457fd..08aecb09abbd3 100644 --- a/recipes/gcem/all/conandata.yml +++ b/recipes/gcem/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.18.0": + url: "https://github.com/kthohr/gcem/archive/v1.18.0.tar.gz" + sha256: "8e71a9f5b62956da6c409dda44b483f98c4a98ae72184f3aa4659ae5b3462e61" "1.17.0": url: "https://github.com/kthohr/gcem/archive/v1.17.0.tar.gz" sha256: "74cc499e2db247c32f1ce82fc22022d22e0f0a110ecd19281269289a9e78a6f8" diff --git a/recipes/gcem/config.yml b/recipes/gcem/config.yml index f63fe5ab6f014..93586d1055a3b 100644 --- a/recipes/gcem/config.yml +++ b/recipes/gcem/config.yml @@ -1,4 +1,6 @@ versions: + "1.18.0": + folder: all "1.17.0": folder: all "1.16.0": diff --git a/recipes/gdal/config.yml b/recipes/gdal/config.yml index a7240af75cc2e..60275f391db83 100644 --- a/recipes/gdal/config.yml +++ b/recipes/gdal/config.yml @@ -9,5 +9,3 @@ versions: folder: "pre_3.5.0" "3.4.1": folder: "pre_3.5.0" - "3.3.3": - folder: "pre_3.5.0" diff --git a/recipes/gdal/pre_3.5.0/conandata.yml b/recipes/gdal/pre_3.5.0/conandata.yml index 49983edc62730..16129b5ac3029 100644 --- a/recipes/gdal/pre_3.5.0/conandata.yml +++ b/recipes/gdal/pre_3.5.0/conandata.yml @@ -5,9 +5,6 @@ sources: "3.4.1": url: "https://github.com/OSGeo/gdal/releases/download/v3.4.1/gdal-3.4.1.tar.gz" sha256: "e360387bc25ec24940f46afbeada48002d72c74aaf9eccf2a40e8d74e711a2e4" - "3.3.3": - url: "https://github.com/OSGeo/gdal/releases/download/v3.3.3/gdal-3.3.3.tar.gz" - sha256: "28925ea4717b02185ee208bfc121a94fa0bc1dfe9cb862fd3868c2a0394d605a" patches: "3.4.3": - patch_file: "patches/3.4.x/fix-autotools-3.4.3.patch" @@ -21,9 +18,3 @@ patches: - patch_file: "patches/3.4.x/fix-include-jsonc-3.4.1.patch" - patch_file: "patches/3.4.x/fix-include-xerces.patch" - patch_file: "patches/3.4.x/fix-include-podofo.patch" - "3.3.3": - - patch_file: "patches/3.3.x/fix-autotools-3.3.3.patch" - - patch_file: "patches/3.3.x/fix-nmake.patch" - - patch_file: "patches/3.3.x/fix-include-jsonc.patch" - - patch_file: "patches/3.3.x/fix-include-xerces.patch" - - patch_file: "patches/3.3.x/fix-include-podofo.patch" diff --git a/recipes/gdal/pre_3.5.0/conanfile.py b/recipes/gdal/pre_3.5.0/conanfile.py index 65bbd7d92d812..0270a1825c5cf 100644 --- a/recipes/gdal/pre_3.5.0/conanfile.py +++ b/recipes/gdal/pre_3.5.0/conanfile.py @@ -165,37 +165,6 @@ class GdalConan(ConanFile): def _settings_build(self): return getattr(self, "settings_build", self.settings) - @property - def _has_with_exr_option(self): - return Version(self.version) >= "3.1.0" - - @property - def _has_with_libdeflate_option(self): - return Version(self.version) >= "3.2.0" - - @property - def _has_with_heif_option(self): - return Version(self.version) >= "3.2.0" - - @property - def _has_with_blosc_option(self): - return Version(self.version) >= "3.4.0" - - @property - def _has_with_lz4_option(self): - return Version(self.version) >= "3.4.0" - - @property - def _has_with_brunsli_option(self): - return Version(self.version) >= "3.4.0" - - @property - def _has_with_pcre2_option(self): - return Version(self.version) >= "3.4.1" - - @property - def _has_reentrant_qhull_support(self): - return Version(self.version) >= "3.4.1" def export_sources(self): export_conandata_patches(self) @@ -203,22 +172,6 @@ def export_sources(self): def config_options(self): if self.settings.os == "Windows": del self.options.fPIC - # if Version(self.version) < "3.0.0": - # del self.options.with_tiledb - if not self._has_with_exr_option: - del self.options.with_exr - if not self._has_with_libdeflate_option: - del self.options.with_libdeflate - if not self._has_with_heif_option: - del self.options.with_heif - if not self._has_with_blosc_option: - del self.options.with_blosc - if not self._has_with_lz4_option: - del self.options.with_lz4 - if not self._has_with_brunsli_option: - del self.options.with_brunsli - if not self._has_with_pcre2_option: - del self.options.with_pcre2 def configure(self): if self.options.shared: @@ -239,7 +192,7 @@ def configure(self): self.options.rm_safe("with_png") # and it's not trivial to fix if self.options.with_qhull: - self.options["qhull"].reentrant = self._has_reentrant_qhull_support + self.options["qhull"].reentrant = True def layout(self): basic_layout(self, src_folder="src") @@ -249,24 +202,23 @@ def requirements(self): self.requires("json-c/0.17") self.requires("libgeotiff/1.7.1") # self.requires("libopencad/0.0.2") # TODO: use conan recipe when available instead of internal one - self.requires("libtiff/4.5.1") - self.requires("proj/9.2.1") - if Version(self.version) >= "3.1.0": - self.requires("flatbuffers/2.0.5") + self.requires("libtiff/4.6.0") + self.requires("proj/9.3.1") + self.requires("flatbuffers/2.0.5") if self.options.get_safe("with_zlib", True): - self.requires("zlib/1.2.13") - if self.options.get_safe("with_libdeflate"): - self.requires("libdeflate/1.18") + self.requires("zlib/[>=1.2.11 <2]") + if self.options.with_libdeflate: + self.requires("libdeflate/1.19") if self.options.with_libiconv: self.requires("libiconv/1.17") if self.options.get_safe("with_zstd"): self.requires("zstd/1.5.5") - if self.options.get_safe("with_blosc"): + if self.options.with_blosc: self.requires("c-blosc/1.21.3") - if self.options.get_safe("with_lz4"): + if self.options.with_lz4: self.requires("lz4/1.9.4") if self.options.with_pg: - self.requires("libpq/14.5") + self.requires("libpq/15.4") # if self.options.with_libgrass: # self.requires("libgrass/x.x.x") if self.options.with_cfitsio: @@ -274,7 +226,7 @@ def requirements(self): # if self.options.with_pcraster: # self.requires("pcraster-rasterformat/1.3.2") if self.options.get_safe("with_png", True): - self.requires("libpng/1.6.40") + self.requires("libpng/[>=1.6 <2]") if self.options.with_dds: self.requires("crunch/cci.20190615") if self.options.with_gta: @@ -318,7 +270,7 @@ def requirements(self): if self.options.with_xerces: self.requires("xerces-c/3.2.4") if self.options.with_expat: - self.requires("expat/2.5.0") + self.requires("expat/[>=2.6.2 <3]") if self.options.with_libkml: self.requires("libkml/1.3.0") if self.options.with_odbc and self.settings.os != "Windows": @@ -326,13 +278,13 @@ def requirements(self): # if self.options.with_dods_root: # self.requires("libdap/3.20.6") if self.options.with_curl: - self.requires("libcurl/8.2.1") + self.requires("libcurl/[>=8.2 <9]") if self.options.with_xml2: self.requires("libxml2/2.10.3") # if self.options.with_spatialite: # self.requires("libspatialite/4.3.0a") if self.options.get_safe("with_sqlite3"): - self.requires("sqlite3/3.42.0") + self.requires("sqlite3/3.44.2") # if self.options.with_rasterlite2: # self.requires("rasterlite2/x.x.x") if self.options.get_safe("with_pcre"): @@ -367,12 +319,12 @@ def requirements(self): if self.options.with_cryptopp: self.requires("cryptopp/8.7.0") if self.options.with_crypto: - self.requires("openssl/1.1.1u") + self.requires("openssl/[>=1.1 <4]") # if not self.options.without_lerc: # self.requires("lerc/2.1") # TODO: use conan recipe (not possible yet because lerc API is broken for GDAL) - if self.options.get_safe("with_exr"): + if self.options.with_exr: self.requires("openexr/3.1.9") - if self.options.get_safe("with_heif"): + if self.options.with_heif: self.requires("libheif/1.13.0") def validate(self): @@ -383,15 +335,13 @@ def validate(self): raise ConanInvalidConfiguration("Enable either pcre or pcre2, not both") if self.options.get_safe("with_pcre2") and not self.dependencies["pcre2"].options.build_pcre2_8: raise ConanInvalidConfiguration("gdal:with_pcre2=True requires pcre2:build_pcre2_8=True") - if self.options.get_safe("with_brunsli"): + if self.options.with_brunsli: raise ConanInvalidConfiguration("brunsli not available in conan-center yet") - if self.options.get_safe("with_libdeflate") and not self.options.get_safe("with_zlib", True): + if self.options.with_libdeflate and not self.options.get_safe("with_zlib", True): raise ConanInvalidConfiguration("gdal:with_libdeflate=True requires gdal:with_zlib=True") if self.options.with_qhull: - if self._has_reentrant_qhull_support and not self.dependencies["qhull"].options.reentrant: + if not self.dependencies["qhull"].options.reentrant: raise ConanInvalidConfiguration(f"{self.ref} depends on reentrant qhull.") - elif not self._has_reentrant_qhull_support and self.dependencies["qhull"].options.reentrant: - raise ConanInvalidConfiguration(f"{self.ref} depends on non-reentrant qhull.") if hasattr(self, "settings_build") and cross_building(self): if self.options.shared: raise ConanInvalidConfiguration(f"{self.ref} can't cross-build shared lib") @@ -405,14 +355,14 @@ def validate(self): if mongocxx_version < "3.0.0": # TODO: handle mongo-cxx-driver v2 raise ConanInvalidConfiguration(f"{self.ref} with mongo-cxx-driver < 3.0.0 not yet supported in this recipe.") - elif mongocxx_version < "3.4.0": + if mongocxx_version < "3.4.0": raise ConanInvalidConfiguration(f"{self.ref} with mongo-cxx-driver v3 requires 3.4.0 at least.") def build_requirements(self): if not is_msvc(self): self.tool_requires("libtool/2.4.7") if not self.conf.get("tools.gnu:pkg_config", check_type=str): - self.tool_requires("pkgconf/1.9.3") + self.tool_requires("pkgconf/2.1.0") if self._settings_build.os == "Windows": self.win_bash = True if not self.conf.get("tools.microsoft.bash:path", check_type=str): @@ -433,9 +383,8 @@ def _patch_sources(self): os.path.join("frmts", "zlib"), # os.path.join("ogr", "ogrsf_frmts", "cad", "libopencad"), # TODO: uncomment when libopencad available os.path.join("ogr", "ogrsf_frmts", "geojson", "libjson"), + os.path.join("ogr", "ogrsf_frmts", "flatgeobuf", "flatbuffers"), ] - if Version(self.version) >= "3.1.0": - embedded_libs.append(os.path.join("ogr", "ogrsf_frmts", "flatgeobuf", "flatbuffers")) for lib_subdir in embedded_libs: rmdir(self, os.path.join(self.source_folder, lib_subdir)) @@ -467,12 +416,8 @@ def _patch_sources(self): replace_in_file(self, gnumakefile_apps, "default: gdal-config-inst gdal-config $(BIN_LIST)", "default: gdal-config-inst gdal-config") - if Version(self.version) < "3.4.0": - clean_pattern = "$(RM) *.o $(BIN_LIST) core gdal-config gdal-config-inst" - else: - clean_pattern = "$(RM) *.o $(BIN_LIST) $(NON_DEFAULT_LIST) core gdal-config gdal-config-inst" replace_in_file(self, gnumakefile_apps, - clean_pattern, + "$(RM) *.o $(BIN_LIST) $(NON_DEFAULT_LIST) core gdal-config gdal-config-inst", "$(RM) *.o core gdal-config gdal-config-inst") replace_in_file(self, gnumakefile_apps, "for f in $(BIN_LIST) ; do $(INSTALL) $$f $(DESTDIR)$(INST_BIN) ; done", @@ -599,8 +544,7 @@ def _nmake_args(self): ]) if self.dependencies["netcdf"].options.netcdf4 and self.dependencies["netcdf"].options.with_hdf5: args.append("NETCDF_HAS_NC4=YES") - if Version(self.version) >= "3.3.0" and \ - os.path.isfile(os.path.join(rootpath("netcdf"), "include", "netcdf_mem.h")): + if os.path.isfile(os.path.join(rootpath("netcdf"), "include", "netcdf_mem.h")): args.append("NETCDF_HAS_NETCDF_MEM=YES") if self.options.with_curl: args.append("CURL_INC=\"-I{}\"".format(include_paths("libcurl"))) @@ -611,7 +555,7 @@ def _nmake_args(self): if self.options.get_safe("with_zlib", True): args.append("ZLIB_EXTERNAL_LIB=1") args.append("ZLIB_INC=\"-I{}\"".format(include_paths("zlib"))) - if self.options.get_safe("with_libdeflate"): + if self.options.with_libdeflate: args.append("LIBDEFLATE_CFLAGS=\"-I{}\"".format(include_paths("libdeflate"))) if self.options.with_poppler: poppler_version = version("poppler") @@ -624,9 +568,9 @@ def _nmake_args(self): args.append("PODOFO_ENABLED=YES") if self.options.get_safe("with_zstd"): args.append("ZSTD_CFLAGS=\"-I{}\"".format(include_paths("zstd"))) - if self.options.get_safe("with_blosc"): + if self.options.with_blosc: args.append("BLOSC_CFLAGS=\"-I{}\"".format(include_paths("c-blosc"))) - if self.options.get_safe("with_lz4"): + if self.options.with_lz4: args.append("LZ4_CFLAGS=\"-I{}\"".format(include_paths("lz4"))) if self.options.with_webp: args.append("WEBP_ENABLED=YES") @@ -648,7 +592,7 @@ def _nmake_args(self): args.append("OPENSSL_INC=\"-I{}\"".format(include_paths("openssl"))) if self.options.without_lerc: args.append("HAVE_LERC=0") - if self.options.get_safe("with_brunsli"): + if self.options.with_brunsli: args.extend([ "BRUNSLI_DIR=\"{}\"".format(rootpath("brunsli")), "BRUNSLI_INC=\"{}\"".format(include_paths("brunsli")), @@ -661,9 +605,9 @@ def _nmake_args(self): args.append("CHARLS_FLAGS=-DCHARLS_2") if self.options.with_dds: args.append("CRUNCH_INC=\"-I{}\"".format(include_paths("crunch"))) - if self.options.get_safe("with_exr"): + if self.options.with_exr: args.append("EXR_INC=\"-I{}\"".format(include_paths("openexr"))) - if self.options.get_safe("with_heif"): + if self.options.with_heif: args.append("HEIF_INC=\"-I{}\"".format(include_paths("libheif"))) return args @@ -729,22 +673,16 @@ def generate(self): # Depencencies: tc.configure_args.append("--with-proj=yes") # always required ! tc.configure_args.append("--with-libz={}".format(yes_no(self.options.with_zlib))) - if self._has_with_libdeflate_option: - tc.configure_args.append("--with-libdeflate={}".format(yes_no(self.options.with_libdeflate))) + tc.configure_args.append("--with-libdeflate={}".format(yes_no(self.options.with_libdeflate))) tc.configure_args.append("--with-libiconv-prefix={}".format(rootpath_no(self.options.with_libiconv, "libiconv"))) tc.configure_args.append("--with-liblzma=no") # always disabled: liblzma is an optional transitive dependency of gdal (through libtiff). tc.configure_args.append("--with-zstd={}".format(yes_no(self.options.get_safe("with_zstd")))) # Optional direct dependency of gdal only if lerc lib enabled - if self._has_with_blosc_option: - tc.configure_args.append("--with-blosc={}".format(yes_no(self.options.with_blosc))) - if self._has_with_lz4_option: - tc.configure_args.append("--with-lz4={}".format(yes_no(self.options.with_lz4))) + tc.configure_args.append("--with-blosc={}".format(yes_no(self.options.with_blosc))) + tc.configure_args.append("--with-lz4={}".format(yes_no(self.options.with_lz4))) # Drivers: if not (self.options.with_zlib and self.options.with_png and bool(self.options.with_jpeg)): # MRF raster driver always depends on zlib, libpng and libjpeg: https://github.com/OSGeo/gdal/issues/2581 - if Version(self.version) < "3.0.0": - tc.configure_args.append("--without-mrf") - else: - tc.configure_args.append("--disable-driver-mrf") + tc.configure_args.append("--disable-driver-mrf") tc.configure_args.append("--with-pg={}".format(yes_no(self.options.with_pg))) tc.configure_args.extend(["--without-grass", "--without-libgrass"]) # TODO: to implement when libgrass lib available tc.configure_args.append("--with-cfitsio={}".format(rootpath_no(self.options.with_cfitsio, "cfitsio"))) @@ -800,15 +738,10 @@ def generate(self): tc.configure_args.append("--without-spatialite") # TODO: to implement when libspatialite lib available tc.configure_args.append("--with-sqlite3={}".format(yes_no(self.options.get_safe("with_sqlite3")))) tc.configure_args.append("--without-rasterlite2") # TODO: to implement when rasterlite2 lib available - if self._has_with_pcre2_option: - tc.configure_args.append("--with-pcre2={}".format(yes_no(self.options.get_safe("with_pcre2")))) + tc.configure_args.append("--with-pcre2={}".format(yes_no(self.options.get_safe("with_pcre2")))) tc.configure_args.append("--with-pcre={}".format(yes_no(self.options.get_safe("with_pcre")))) tc.configure_args.append("--without-teigha") # commercial library tc.configure_args.append("--without-idb") # commercial library - if Version(self.version) < "3.2.0": - tc.configure_args.append("--without-sde") # commercial library - if Version(self.version) < "3.3.0": - tc.configure_args.append("--without-epsilon") tc.configure_args.append("--with-webp={}".format(rootpath_no(self.options.with_webp, "libwebp"))) tc.configure_args.append("--with-geos={}".format(yes_no(self.options.with_geos))) tc.configure_args.append("--without-sfcgal") # TODO: to implement when sfcgal lib available @@ -834,27 +767,19 @@ def generate(self): tc.configure_args.append("--without-python") tc.configure_args.append("--without-java") tc.configure_args.append("--without-hdfs") - if Version(self.version) >= "3.0.0": - tc.configure_args.append("--without-tiledb") # TODO: to implement when tiledb lib available + tc.configure_args.append("--without-tiledb") # TODO: to implement when tiledb lib available tc.configure_args.append("--without-mdb") tc.configure_args.append("--without-rasdaman") # TODO: to implement when rasdaman lib available - if self._has_with_brunsli_option: - tc.configure_args.append("--with-brunsli={}".format(yes_no(self.options.with_brunsli))) - if Version(self.version) >= "3.1.0": - tc.configure_args.append("--without-rdb") # commercial library + tc.configure_args.append("--with-brunsli={}".format(yes_no(self.options.with_brunsli))) + tc.configure_args.append("--without-rdb") # commercial library tc.configure_args.append("--without-armadillo") # TODO: to implement when armadillo lib available tc.configure_args.append("--with-cryptopp={}".format(rootpath_no(self.options.with_cryptopp, "cryptopp"))) tc.configure_args.append("--with-crypto={}".format(yes_no(self.options.with_crypto))) - if Version(self.version) >= "3.3.0": - tc.configure_args.append("--with-lerc={}".format(internal_no(not self.options.without_lerc))) - else: - tc.configure_args.append("--with-lerc={}".format(yes_no(not self.options.without_lerc))) + tc.configure_args.append("--with-lerc={}".format(internal_no(not self.options.without_lerc))) if self.options.with_null: tc.configure_args.append("--with-null") - if self._has_with_exr_option: - tc.configure_args.append("--with-exr={}".format(yes_no(self.options.with_exr))) - if self._has_with_heif_option: - tc.configure_args.append("--with-heif={}".format(yes_no(self.options.with_heif))) + tc.configure_args.append("--with-exr={}".format(yes_no(self.options.with_exr))) + tc.configure_args.append("--with-heif={}".format(yes_no(self.options.with_heif))) tc.generate() AutotoolsDeps(self).generate() @@ -910,7 +835,7 @@ def package_info(self): self.cpp_info.system_libs.append("pthread") elif self.settings.os == "Windows": self.cpp_info.system_libs.extend(["psapi", "ws2_32"]) - if Version(self.version) >= "3.2.0" and is_msvc(self): + if is_msvc(self): self.cpp_info.system_libs.append("wbemuuid") if self.options.with_odbc and not self.options.shared: self.cpp_info.system_libs.extend(["odbc32", "odbccp32"]) diff --git a/recipes/gdal/pre_3.5.0/patches/3.3.x/fix-autotools-3.3.3.patch b/recipes/gdal/pre_3.5.0/patches/3.3.x/fix-autotools-3.3.3.patch deleted file mode 100644 index a5746b4d1e05f..0000000000000 --- a/recipes/gdal/pre_3.5.0/patches/3.3.x/fix-autotools-3.3.3.patch +++ /dev/null @@ -1,302 +0,0 @@ ---- a/GDALmake.opt.in -+++ b/GDALmake.opt.in -@@ -600,7 +600,7 @@ endif - - ifeq ($(HAVE_LIBTOOL), yes) - --CONFIG_LIBS = $(GDAL_ROOT)/$(LIBGDAL) -+CONFIG_LIBS = $(GDAL_ROOT)/$(LIBGDAL) $(LIBS) - ifeq ($(MACOSX_FRAMEWORK),yes) - CONFIG_LIBS_INS = -L$(INST_LIB)/unix/lib -lgdal - else ---- a/configure.ac -+++ b/configure.ac -@@ -1175,6 +1175,10 @@ AC_ARG_WITH(libdeflate, - [enable libdeflate usage (optional for faster Deflate support (still requires zlib) (ARG=yes/no/prefix), enabled by default)]),,) - - if test "$with_libdeflate" != "no" ; then -+# AC_CHECK_LIB tests not robust enough (don't handle static libdeflate on windows) -+if test "$with_libdeflate" = "yes" ; then -+ LIBDEFLATE_SETTING=yes -+else - - if test "$with_libdeflate" != "" -a "$with_libdeflate" != "yes"; then - AC_CHECK_LIB(deflate, libdeflate_zlib_decompress, [libdeflate_lib=yes], [libdeflate_lib=no],-L$with_libdeflate/lib) -@@ -1204,13 +1208,13 @@ if test "$with_libdeflate" != "no" ; then - fi - - fi -+fi - - if test "$LIBDEFLATE_SETTING" = "yes" ; then - if test "$with_libdeflate" != "" -a "$with_libdeflate" != "yes"; then - EXTRA_INCLUDES="-I$with_libdeflate/include $EXTRA_INCLUDES" - LIBS="-L$with_libdeflate/lib -ldeflate $LIBS" -- else -- LIBS="-ldeflate $LIBS" -+ # Too fragile: libdeflate static lib name on windows is libdeflatestatic - fi - fi - -@@ -1378,7 +1382,7 @@ else - AC_MSG_RESULT([using libtiff from ${with_libtiff}.]) - - dnl Check for the BigTIFF enabled library (libtiff >= 4.0) -- AC_CHECK_LIB(tiff,TIFFScanlineSize64,HAVE_BIGTIFF=yes,HAVE_BIGTIFF=no,) -+ AC_CHECK_LIB(tiff,TIFFScanlineSize64,HAVE_BIGTIFF=yes,HAVE_BIGTIFF=no,$LIBS) - - fi - -@@ -1402,23 +1406,11 @@ AC_ARG_WITH(curl, - dnl Clear some cache variables - unset ac_cv_path_LIBCURL - --if test "`basename xx/$with_curl`" = "curl-config" ; then -- LIBCURL_CONFIG="$with_curl" --elif test "$with_curl" = "no" ; then -- LIBCURL_CONFIG=no -+PKG_PROG_PKG_CONFIG([0.21]) -+if test "$with_curl" = "yes" ; then -+ PKG_CHECK_MODULES([CURL], [libcurl], [CURL_SETTING=yes], [AC_MSG_ERROR([libcurl not found...])]) - else -- AC_PATH_PROG(LIBCURL_CONFIG, curl-config, no) --fi -- --if test "$LIBCURL_CONFIG" != "no" ; then -- -- CURL_VERNUM=`$LIBCURL_CONFIG --vernum` -- CURL_VER=`$LIBCURL_CONFIG --version | awk '{print $2}'` -- -- AC_MSG_RESULT([ found libcurl version $CURL_VER]) -- -- AC_CHECK_LIB(curl,curl_global_init,CURL_SETTING=yes,CURL_SETTING=no,`$LIBCURL_CONFIG --libs`) -- -+ CURL_SETTING=no - fi - - AC_SUBST(CURL_SETTING,$CURL_SETTING) -@@ -1430,8 +1422,11 @@ dnl Check for SQLite - dnl Proj depends on it so it must appear before. - dnl --------------------------------------------------------------------------- - --SQLITE3_REQ_VERSION="3.0.0" --AX_LIB_SQLITE3($SQLITE3_REQ_VERSION) -+HAVE_SQLITE3=no -+AC_ARG_WITH(sqlite3, AS_HELP_STRING([--with-sqlite3[=ARG]], [use SQLite 3 library (ARG=yes or no)]),,) -+if test x"$with_sqlite3" = x"yes" ; then -+ PKG_CHECK_MODULES([SQLITE3], [sqlite3 >= 3.0.0], [HAVE_SQLITE3=yes], [AC_MSG_ERROR([sqlite3 not found...])]) -+fi - - if test "$HAVE_SQLITE3" = "yes"; then - LIBS="$SQLITE3_LDFLAGS $LIBS" -@@ -1462,11 +1457,7 @@ if test "x$with_proj" = "xno" ; then - else - - if test "x$with_proj" = "xyes" -o "x$with_proj" = "x"; then -- ORIG_LIBS="$LIBS" -- LIBS="-lproj $with_proj_extra_lib_for_test $ORIG_LIBS" -- AC_LANG_PUSH([C++]) -- AC_CHECK_LIB(proj,proj_create_from_wkt,PROJ_FOUND=yes,PROJ_FOUND=no,) -- AC_LANG_POP([C++]) -+ PROJ_FOUND=yes - if test "$PROJ_FOUND" = "no"; then - AC_LANG_PUSH([C++]) - AC_CHECK_LIB(proj,internal_proj_create_from_wkt,PROJ_FOUND=yes,PROJ_FOUND=no,) -@@ -1889,8 +1880,8 @@ fi - - if test "$CURL_SETTING" = "yes" ; then - -- CURL_INC=`$LIBCURL_CONFIG --cflags` -- CURL_LIB=`$LIBCURL_CONFIG --libs` -+ CURL_INC="$CURL_CFLAGS" -+ CURL_LIB="$CURL_LIBS" - m4_foreach_w([frmt],CURL_FORMATS,[ - driver_enabled=m4_join([_],[$INTERNAL_FORMAT],frmt,[ENABLED]) - if test "x$driver_enabled" = "xyes"; then -@@ -2222,7 +2213,6 @@ else - - DDS_SETTING=yes - CRUNCHDIR="$with_dds" -- LIBS="-L$with_dds/lib/ -lcrunch $LIBS" - echo "using libcrunch from $with_dds." - - fi -@@ -2373,7 +2363,6 @@ else - - dnl We now require libgeotiff 1.5.0 - dnl first check if $with_geotiff/lib has the library: -- AC_CHECK_LIB(geotiff,GTIFAttachPROJContext,GEOTIFF_SETTING=external,GEOTIFF_SETTING=not_found,-L$with_geotiff/lib) - - if test $GEOTIFF_SETTING = "external" ; then - LIBS="-L$with_geotiff/lib -lgeotiff $LIBS" -@@ -2875,6 +2864,10 @@ if test x"$with_hdf4" = x"no" ; then - - echo "hdf4 support disabled." - -+elif test x"$with_hdf4" = x"yes" ; then -+ PKG_CHECK_MODULES([HDF4], [hdf], [HAVE_HDF4=yes], [AC_MSG_ERROR([hdf4 not found...])]) -+ PKG_CHECK_MODULES([HDF4], [hdf >= 4.2.5], [HDF4_HAS_MAXOPENFILES=yes], [HDF4_HAS_MAXOPENFILES=no]) -+ HDF4_INCLUDE="$HDF4_CFLAGS" - else - - if test x"$with_hdf4" = x"yes" -o x"$with_hdf4" = x"" ; then -@@ -3005,7 +2998,6 @@ elif test "$with_hdf5" = "yes" -o "$with_hdf5" = "" ; then - # Test that the package found is for the right architecture - saved_LIBS="$LIBS" - LIBS="$HDF5_LIBS" -- AC_CHECK_LIB(hdf5,H5Fopen, [HAVE_HDF5=yes], [HAVE_HDF5=no]) - LIBS="$saved_LIBS" - - if test "$HAVE_HDF5" = "yes"; then -@@ -3074,21 +3066,21 @@ KEA_CONFIG=no - - AC_ARG_WITH(kea,[ --with-kea[=ARG] Include kealib (ARG=path to kea-config) [[default=yes]]],,) - -+AC_MSG_CHECKING([for kea]) - if test "$with_kea" = "yes" -o "x$with_kea" = "x" ; then -- AC_PATH_PROG(KEA_CONFIG, kea-config, no) -+ HAVE_KEA=yes -+ AC_MSG_RESULT([yes]) - else -- KEA_CONFIG=$with_kea -+ HAVE_KEA=no -+ AC_MSG_RESULT([no]) - fi - --AC_MSG_CHECKING([for kea]) - - if test "$KEA_CONFIG" = "no" ; then - -- HAVE_KEA=no - KEA_LIB= - KEA_INC= - -- AC_MSG_RESULT([no]) - - else - if test -d $KEA_CONFIG ; then -@@ -3940,18 +3932,15 @@ MYSQL_CONFIG=no - AC_ARG_WITH(mysql,[ --with-mysql[=ARG] Include MySQL (ARG=path to mysql_config) [[default=no]]],,) - - if test "$with_mysql" = "yes" ; then -- AC_PATH_PROG(MYSQL_CONFIG, mysql_config, no) -+ HAVE_MYSQL=yes - else -- if test "x$with_mysql" != "x" ; then -- MYSQL_CONFIG=$with_mysql -- fi -+ HAVE_MYSQL=no - fi - - AC_MSG_CHECKING([for MySQL]) - - if test "$MYSQL_CONFIG" = "no" ; then - -- HAVE_MYSQL=no - MYSQL_LIB= - MYSQL_INC= - -@@ -4045,8 +4034,11 @@ dnl Check for Expat configuration. - dnl --------------------------------------------------------------------------- - - dnl Expat 1.95.0 released in 2000-09-28 --EXPAT_REQ_VERSION="1.95.0" --AX_LIB_EXPAT($EXPAT_REQ_VERSION) -+# AX_LIB_EXPAT is too fragile, it doesn't properly handle debug expat on Windows -+HAVE_EXPAT=no -+AC_ARG_WITH([expat], AS_HELP_STRING([--with-expat[=ARG]], [use Expat library (ARG=yes or no)]),,) -+if test x"$with_expat" = x"yes" ; then -+PKG_CHECK_MODULES([EXPAT], [expat >= 1.95.0], [HAVE_EXPAT=yes], [AC_MSG_ERROR([expat not found...])]) - - if test "$HAVE_EXPAT" = "yes"; then - LIBS="$EXPAT_LDFLAGS $LIBS" -@@ -4059,6 +4051,7 @@ m4_foreach_w([frmt],EXPAT_DRIVERS,[ - fi - ]) - -+fi - fi - - AC_SUBST([HAVE_EXPAT], $HAVE_EXPAT) -@@ -4305,7 +4298,6 @@ if test "x$with_xml2" = "xyes" -o "x$with_xml2" = "x" ; then - if test "${HAVE_LIBXML2}" = "yes"; then - SAVED_LIBS="${LIBS}" - LIBS="${LIBXML2_LIBS}" -- AC_CHECK_LIB(xml2,xmlParseDoc,HAVE_LIBXML2=yes,HAVE_LIBXML2=no) - LIBS="${SAVED_LIBS}" - fi - -@@ -4550,13 +4542,18 @@ dnl --------------------------------------------------------------------------- - dnl Check if geos library is available. - dnl --------------------------------------------------------------------------- - --GEOS_INIT(3.1.0) -+AC_ARG_WITH(geos, AS_HELP_STRING([--with-geos[=ARG]], [Include GEOS support (ARG=yes or no)]),,) -+HAVE_GEOS=no -+if test x"$with_geos" = x"no" ; then -+ AC_MSG_RESULT([GEOS support disabled]) -+else -+ PKG_CHECK_MODULES([GEOS], [geos >= 3.1.0], [HAVE_GEOS=yes], [AC_MSG_ERROR([geos not found...])]) - if test "${HAVE_GEOS}" = "yes" ; then - AC_MSG_NOTICE([Using C API from GEOS $GEOS_VERSION]) -- STRIP_SYSTEM_LIBRARY_PATHS("${GEOS_LIBS}") -- GEOS_LIBS="$STRIPPED_LIBRARY_NAME" - LIBS="${GEOS_LIBS} ${LIBS}" - fi -+fi -+AC_SUBST(HAVE_GEOS, $HAVE_GEOS) - - dnl --------------------------------------------------------------------------- - dnl Check if SFCGAL library is available. -@@ -4588,20 +4585,18 @@ elif test "$with_qhull" = "yes" -o "$with_qhull" = "" ; then - # qhull/qhull.h - AC_CHECK_HEADERS([qhull/libqhull.h]) - if test "$ac_cv_header_qhull_libqhull_h" = "yes"; then -- AC_CHECK_LIB(qhull,qh_new_qhull,QHULL_SETTING=yes,QHULL_SETTING=no,) -+ QHULL_SETTING=yes - if test "$QHULL_SETTING" = "yes"; then - QHULL_SETTING=external - QHULL_INCLUDE_SUBDIR_IS_LIBQHULL=0 -- LIBS="-lqhull $LIBS" - fi - fi - AC_CHECK_HEADERS([libqhull/libqhull.h]) - if test "$ac_cv_header_libqhull_libqhull_h" = "yes"; then -- AC_CHECK_LIB(qhull,qh_new_qhull,QHULL_SETTING=yes,QHULL_SETTING=no,) -+ QHULL_SETTING=yes - if test "$QHULL_SETTING" = "yes"; then - QHULL_SETTING=external - QHULL_INCLUDE_SUBDIR_IS_LIBQHULL=1 -- LIBS="-lqhull $LIBS" - fi - fi - -@@ -4688,7 +4683,9 @@ AC_MSG_CHECKING([for FreeXL support]) - HAVE_FREEXL=no - FREEXL_INCLUDE= - --if test "$with_freexl" = "" -o "$with_freexl" = "yes" ; then -+if test "$with_freexl" = "yes"; then -+ PKG_CHECK_MODULES([FREEXL], [freexl >= 1.0.0], [HAVE_FREEXL=yes], [AC_MSG_ERROR([freexl not found...])]) -+elif test "$with_freexl" = ""; then - AC_CHECK_HEADERS(freexl.h) - AC_CHECK_LIB(freexl,freexl_open,FREEXL_LIBS="-lfreexl",FREEXL_LIBS=missing) - -@@ -4794,8 +4791,7 @@ if test "$with_libjson_c" = "external" -o "$with_libjson_c" = "" -o "$with_libjs - elif test "$with_libjson_c" = "internal" ; then - LIBJSONC_SETTING=internal - elif test "$with_libjson_c" != "no"; then -- LIBS="-L$with_libjson_c/lib $LIBS" -- AC_CHECK_LIB(json-c,json_object_set_serializer,LIBJSONC_SETTING=external,LIBJSONC_SETTING=internal,-L$with_libjson_c/lib) -+ LIBJSONC_SETTING=external - else - AC_MSG_ERROR([libjson-c (internal or external) is required]) - fi -@@ -5953,7 +5949,6 @@ else - # Test that the package found is for the right architecture - saved_LIBS="$LIBS" - LIBS="$EXR_LIBS" -- AC_CHECK_LIB(IlmImf,ImfTiledInputReadTile, [HAVE_EXR=yes], [HAVE_EXR=no]) - LIBS="$saved_LIBS" - - if test "$HAVE_EXR" = "yes"; then diff --git a/recipes/gdal/pre_3.5.0/patches/3.3.x/fix-include-jsonc.patch b/recipes/gdal/pre_3.5.0/patches/3.3.x/fix-include-jsonc.patch deleted file mode 100644 index e88043df4189f..0000000000000 --- a/recipes/gdal/pre_3.5.0/patches/3.3.x/fix-include-jsonc.patch +++ /dev/null @@ -1,104 +0,0 @@ ---- a/gcore/gdal_rat.cpp -+++ b/gcore/gdal_rat.cpp -@@ -50,7 +50,7 @@ - #pragma clang diagnostic ignored "-Wunknown-pragmas" - #pragma clang diagnostic ignored "-Wdocumentation" - #endif --#include "json.h" -+#include - #ifdef __clang__ - #pragma clang diagnostic pop - #endif ---- a/ogr/ogrsf_frmts/geojson/ogresrijsonreader.cpp -+++ b/ogr/ogrsf_frmts/geojson/ogresrijsonreader.cpp -@@ -37,7 +37,7 @@ - - #include "cpl_conv.h" - #include "cpl_error.h" --#include "json.h" -+#include - // #include "json_object.h" - // #include "json_tokener.h" - #include "ogr_api.h" ---- a/ogr/ogrsf_frmts/geojson/ogrgeojsondatasource.cpp -+++ b/ogr/ogrsf_frmts/geojson/ogrgeojsondatasource.cpp -@@ -41,7 +41,7 @@ - #include "cpl_string.h" - #include "cpl_vsi.h" - #include "cpl_vsi_error.h" --#include "json.h" -+#include - // #include "json_object.h" - #include "gdal_utils.h" - #include "gdal.h" ---- a/ogr/ogrsf_frmts/geojson/ogrgeojsonlayer.cpp -+++ b/ogr/ogrsf_frmts/geojson/ogrgeojsonlayer.cpp -@@ -37,7 +37,7 @@ - # endif - #endif // !DEBUG_VERBOSE - --#include -+#include - - #if !DEBUG_JSON - # ifdef __clang ---- a/ogr/ogrsf_frmts/geojson/ogrgeojsonreader.cpp -+++ b/ogr/ogrsf_frmts/geojson/ogrgeojsonreader.cpp -@@ -32,7 +32,7 @@ - #include "ogrgeojsonreader.h" - #include "ogrgeojsonutils.h" - #include "ogr_geojson.h" --#include // JSON-C -+#include - - #if (!defined(JSON_C_VERSION_NUM)) || (JSON_C_VERSION_NUM < JSON_C_VER_013) - #include // just for sizeof(struct json_object) ---- a/ogr/ogrsf_frmts/geojson/ogrgeojsonutils.cpp -+++ b/ogr/ogrsf_frmts/geojson/ogrgeojsonutils.cpp -@@ -32,7 +32,7 @@ - #include - #include - #include --#include // JSON-C -+#include - - #include - #include ---- a/ogr/ogrsf_frmts/geojson/ogrgeojsonwriter.cpp -+++ b/ogr/ogrsf_frmts/geojson/ogrgeojsonwriter.cpp -@@ -33,13 +33,13 @@ - #include "ogrgeojsonutils.h" - #include "ogr_geojson.h" - #include "ogrgeojsonreader.h" --#include // JSON-C -+#include - - #if (!defined(JSON_C_VERSION_NUM)) || (JSON_C_VERSION_NUM < JSON_C_VER_013) - #include - #endif - --#include -+#include - #include - #include - ---- a/ogr/ogrsf_frmts/geojson/ogrtopojsonreader.cpp -+++ b/ogr/ogrsf_frmts/geojson/ogrtopojsonreader.cpp -@@ -30,5 +30,5 @@ - #include "ogrgeojsonutils.h" - #include "ogr_geojson.h" --#include // JSON-C -+#include - #include - ---- a/port/cpl_json_header.h -+++ b/port/cpl_json_header.h -@@ -33,7 +33,7 @@ - #pragma GCC system_header - #endif - --#include -+#include - - #undef json_object_object_foreachC - #define json_object_object_foreachC(obj,iter) \ diff --git a/recipes/gdal/pre_3.5.0/patches/3.3.x/fix-include-podofo.patch b/recipes/gdal/pre_3.5.0/patches/3.3.x/fix-include-podofo.patch deleted file mode 100644 index aa86489f0296b..0000000000000 --- a/recipes/gdal/pre_3.5.0/patches/3.3.x/fix-include-podofo.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/frmts/pdf/pdfsdk_headers.h -+++ b/frmts/pdf/pdfsdk_headers.h -@@ -103,7 +103,7 @@ typedef unsigned char Guchar; - #undef GetObject - #endif - --#include "podofo.h" -+#include - #endif // HAVE_PODOFO - - #ifdef HAVE_PDFIUM diff --git a/recipes/gdal/pre_3.5.0/patches/3.3.x/fix-include-xerces.patch b/recipes/gdal/pre_3.5.0/patches/3.3.x/fix-include-xerces.patch deleted file mode 100644 index 8b08760381794..0000000000000 --- a/recipes/gdal/pre_3.5.0/patches/3.3.x/fix-include-xerces.patch +++ /dev/null @@ -1,63 +0,0 @@ ---- a/ogr/ogr_xerces_headers.h -+++ b/ogr/ogr_xerces_headers.h -@@ -33,9 +33,9 @@ - #pragma GCC system_header - #endif - --#include --#include --#include -+#include -+#include -+#include - - #ifdef XERCES_CPP_NAMESPACE_USE - XERCES_CPP_NAMESPACE_USE ---- a/ogr/ogrsf_frmts/gml/xercesc_headers.h -+++ b/ogr/ogrsf_frmts/gml/xercesc_headers.h -@@ -33,13 +33,13 @@ - #pragma GCC system_header - #endif - --#include --#include --#include --#include --#include --#include --#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include - - #ifdef XERCES_CPP_NAMESPACE_USE - XERCES_CPP_NAMESPACE_USE ---- a/ogr/ogrsf_frmts/ili/xercesc_headers.h -+++ b/ogr/ogrsf_frmts/ili/xercesc_headers.h -@@ -33,14 +33,14 @@ - #pragma GCC system_header - #endif - --#include --#include --#include --#include --#include --#include --#include --#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include - - #ifdef XERCES_CPP_NAMESPACE_USE - XERCES_CPP_NAMESPACE_USE diff --git a/recipes/gdal/pre_3.5.0/patches/3.3.x/fix-nmake.patch b/recipes/gdal/pre_3.5.0/patches/3.3.x/fix-nmake.patch deleted file mode 100644 index 4c0ef454c2aac..0000000000000 --- a/recipes/gdal/pre_3.5.0/patches/3.3.x/fix-nmake.patch +++ /dev/null @@ -1,179 +0,0 @@ ---- a/alg/makefile.vc -+++ b/alg/makefile.vc -@@ -14,7 +14,7 @@ EXTRAFLAGS = -I../frmts/vrt -I../ogr/ogrsf_frmts $(GEOS_CFLAGS) $(PROJ_FLAGS) $( - EXTRAFLAGS = $(EXTRAFLAGS) -DINTERNAL_QHULL - !ELSE - !IF "$(QHULL_SETTING)" == "EXTERNAL" --EXTRAFLAGS = $(EXTRAFLAGS) -DEXTERNAL_QHULL $(QHULL_INC) -+EXTRAFLAGS = $(EXTRAFLAGS) -DEXTERNAL_QHULL -DQHULL_INCLUDE_SUBDIR_IS_LIBQHULL=1 $(QHULL_INC) - !ENDIF - !ENDIF - !ENDIF ---- a/apps/makefile.vc -+++ b/apps/makefile.vc -@@ -8,6 +8,9 @@ EXTRAFLAGS = -I..\frmts\vrt -I..\ogr\ogrsf_frmts\geojson\libjson -I..\ogr\ogrsf_ - !INCLUDE ..\nmake.opt - - LIBS = $(GDALLIB) -+!IF "$(DLLBUILD)" != "1" -+LIBS = $(LIBS) $(EXTERNAL_LIBS) -+!ENDIF - - !IFDEF INCLUDE_OGR_FRMTS - OGR_PROGRAMS = gdal_contour.exe gdaltindex.exe gdal_rasterize.exe \ ---- a/frmts/gif/makefile.vc -+++ b/frmts/gif/makefile.vc -@@ -10,14 +10,8 @@ EXTRAFLAGS = -Igiflib - - default: $(OBJ) - xcopy /D /Y *.obj ..\o -- cd giflib -- $(MAKE) /f makefile.vc -- cd .. - - clean: - -del *.obj -- cd giflib -- $(MAKE) /f makefile.vc clean -- cd .. - - ---- a/frmts/jpeg/makefile.vc -+++ b/frmts/jpeg/makefile.vc -@@ -29,12 +29,16 @@ default: $(EXTRA_DEP) $(OBJ) - - clean: - -del *.obj -+!IFNDEF JPEG_EXTERNAL_LIB - cd libjpeg - $(MAKE) /f makefile.vc clean - cd .. -+!ENDIF -+!IFDEF JPEG12_SUPPORTED - cd libjpeg12 - $(MAKE) /f makefile.vc clean - cd .. -+!ENDIF - - libjpeg12src: - cd libjpeg12 ---- a/frmts/kea/makefile.vc -+++ b/frmts/kea/makefile.vc -@@ -1,7 +1,7 @@ - - OBJ = keaband.obj keacopy.obj keadataset.obj keadriver.obj keamaskband.obj keaoverview.obj kearat.obj - --EXTRAFLAGS = $(KEA_CFLAGS) -DH5_BUILT_AS_DYNAMIC_LIB -+EXTRAFLAGS = $(KEA_CFLAGS) - - GDAL_ROOT = ..\.. - ---- a/frmts/makefile.vc -+++ b/frmts/makefile.vc -@@ -3,11 +3,11 @@ GDAL_ROOT = .. - - EXTRAFLAGS = -DFRMT_ceos -DFRMT_aigrid -DFRMT_elas -DFRMT_hfa -DFRMT_gtiff\ - -DFRMT_sdts -DFRMT_raw -DFRMT_gxf -DFRMT_ceos2 -DFRMT_png \ -- -DFRMT_dted -DFRMT_mem -DFRMT_jdem -DFRMT_gif -DFRMT_esric \ -+ -DFRMT_dted -DFRMT_mem -DFRMT_jdem -DFRMT_esric \ - -DFRMT_envisat -DFRMT_aaigrid -DFRMT_usgsdem -DFRMT_l1b \ - -DFRMT_fit -DFRMT_vrt -DFRMT_xpm -DFRMT_bmp -DFRMT_rmf \ -- -DFRMT_nitf -DFRMT_pcidsk -DFRMT_airsar -DFRMT_rs2 \ -- -DFRMT_ilwis -DFRMT_msgn -DFRMT_rik -DFRMT_pcraster \ -+ -DFRMT_nitf -DFRMT_airsar -DFRMT_rs2 \ -+ -DFRMT_ilwis -DFRMT_msgn -DFRMT_rik \ - -DFRMT_leveller -DFRMT_sgi -DFRMT_srtmhgt -DFRMT_idrisi \ - -DFRMT_jaxapalsar -DFRMT_ers -DFRMT_ingr -DFRMT_dimap \ - -DFRMT_gff -DFRMT_terragen -DFRMT_gsg -DFRMT_cosar -DFRMT_pds \ -@@ -32,6 +32,22 @@ PLUGINDIRLIST = $(PLUGINFLAGS:-DFRMT_=) - EXTRAFLAGS = $(EXTRAFLAGS) -DFRMT_postgisraster - !ENDIF - -+!IFDEF GIF_SETTING -+EXTRAFLAGS = $(EXTRAFLAGS) -DFRMT_gif -+!ENDIF -+ -+!IFDEF PCIDSK_SETTING -+EXTRAFLAGS = $(EXTRAFLAGS) -DFRMT_pcidsk -+!ENDIF -+ -+!IFDEF PCRASTER_SETTING -+EXTRAFLAGS = $(EXTRAFLAGS) -DFRMT_pcraster -+!ENDIF -+ -+!IFDEF EXR_INC -+EXTRAFLAGS = $(EXTRAFLAGS) -DFRMT_exr -+!ENDIF -+ - !IFDEF JPEG_SUPPORTED - EXTRAFLAGS = -DFRMT_jpeg $(EXTRAFLAGS) - !ENDIF ---- a/frmts/pcidsk/makefile.vc -+++ b/frmts/pcidsk/makefile.vc -@@ -14,7 +14,11 @@ OBJ = pcidskdataset2.obj ogrpcidsklayer.obj vsi_pcidsk_io.obj gdal_edb.obj - !ENDIF - - !IF "$(PCIDSK_SETTING)" == "INTERNAL" -+!IFDEF JPEG_SUPPORTED - PCIDSKFLAGS = -Isdk -DPCIDSK_INTERNAL -DHAVE_LIBJPEG -+!ELSE -+PCIDSKFLAGS = -Isdk -DPCIDSK_INTERNAL -+!ENDIF - - OBJ = pcidskdataset2.obj ogrpcidsklayer.obj vsi_pcidsk_io.obj gdal_edb.obj \ - sdk\blockdir\asciitiledir.obj \ -@@ -70,11 +74,13 @@ OBJ = pcidskdataset2.obj ogrpcidsklayer.obj vsi_pcidsk_io.obj gdal_edb.obj \ - - !ENDIF - -+!IFDEF JPEG_SUPPORTED - !IFDEF JPEG_EXTERNAL_LIB - JPEGFLAGS = -I$(JPEGDIR) - !ELSE - JPEGFLAGS = -I..\jpeg\libjpeg - !ENDIF -+!ENDIF - - .cpp.obj: - $(CC) $(CFLAGS) $(PCIDSKFLAGS) $(JPEGFLAGS) /c $*.cpp /Fo$*.obj ---- a/makefile.vc -+++ b/makefile.vc -@@ -84,7 +84,7 @@ staticlib: $(LIB_DEPENDS) - call <=2.6.2 <3]") + self.requires("openjpeg/2.5.2") if self.options.with_zlibng: - self.requires("zlib-ng/2.1.6") + self.requires("zlib-ng/2.2.0") else: self.requires("zlib/[>=1.2.11 <2]") if self.settings.os != "Windows": - self.requires("util-linux-libuuid/2.39") + self.requires("util-linux-libuuid/2.39.2") if Version(self.version) >= Version("3.0.20"): self.requires("libiconv/1.17") if self.options.with_json: diff --git a/recipes/gdcm/all/patches/0006-3.0.24-json.patch b/recipes/gdcm/all/patches/0006-3.0.24-json.patch new file mode 100644 index 0000000000000..6aa3414ba7c29 --- /dev/null +++ b/recipes/gdcm/all/patches/0006-3.0.24-json.patch @@ -0,0 +1,13 @@ +--- a/Source/Common/CMakeLists.txt ++++ b/Source/Common/CMakeLists.txt +@@ -52,9 +52,7 @@ unset(CMAKE_REQUIRED_LIBRARIES) + CHECK_SYMBOL_EXISTS(gettimeofday "sys/time.h" GDCM_HAVE_GETTIMEOFDAY) + # json-c API changed: + if(GDCM_USE_SYSTEM_JSON) +- set(CMAKE_REQUIRED_INCLUDES ${JSON_INCLUDE_DIRS}) +- set(CMAKE_REQUIRED_LIBRARIES ${JSON_LIBRARIES}) +- CHECK_SYMBOL_EXISTS(json_object_object_get_ex "json.h" GDCM_HAVE_JSON_OBJECT_OBJECT_GET_EX) ++ set(GDCM_HAVE_JSON_OBJECT_OBJECT_GET_EX ON CACHE INTERNAL "") + endif() + + include(CheckCXXSourceCompiles) diff --git a/recipes/gdcm/all/test_package/DCMTK_JPEGExt_12Bits.dcm b/recipes/gdcm/all/test_package/DCMTK_JPEGExt_12Bits.dcm deleted file mode 100644 index a38d4be8214fc..0000000000000 Binary files a/recipes/gdcm/all/test_package/DCMTK_JPEGExt_12Bits.dcm and /dev/null differ diff --git a/recipes/gdcm/all/test_package/conanfile.py b/recipes/gdcm/all/test_package/conanfile.py index 68791e0d3201c..09886ae651d09 100644 --- a/recipes/gdcm/all/test_package/conanfile.py +++ b/recipes/gdcm/all/test_package/conanfile.py @@ -4,6 +4,7 @@ from conan.tools.files import mkdir import os + class TestPackageConan(ConanFile): settings = "os", "arch", "compiler", "build_type" generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" @@ -23,8 +24,4 @@ def build(self): def test(self): if can_run(self): bin_path = os.path.join(self.cpp.build.bindir, "test_package") - input_file = os.path.join(self.source_folder, "DCMTK_JPEGExt_12Bits.dcm") - test_dir = "test_dir" - mkdir(self, test_dir) - output_file = os.path.join(test_dir, "output.dcm") - self.run(f"\"{bin_path}\" \"{input_file}\" \"{output_file}\"", env="conanrun") + self.run(bin_path, env="conanrun") diff --git a/recipes/gdcm/all/test_package/test_package.cpp b/recipes/gdcm/all/test_package/test_package.cpp index 38a0b1316570a..3e8750a344529 100644 --- a/recipes/gdcm/all/test_package/test_package.cpp +++ b/recipes/gdcm/all/test_package/test_package.cpp @@ -1,104 +1,8 @@ -/*========================================================================= - - Program: GDCM (Grassroots DICOM). A DICOM library - - Copyright (c) 2006-2011 Mathieu Malaterre - All rights reserved. - See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. - - This software is distributed WITHOUT ANY WARRANTY; without even - the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - PURPOSE. See the above copyright notice for more information. - -=========================================================================*/ -/* - * This example is ... guess what this is for :) - */ - #include "gdcmReader.h" -#include "gdcmUIDGenerator.h" -#include "gdcmWriter.h" -#include "gdcmAttribute.h" - -#include - -#ifdef GDCM_USE_SYSTEM_OPENSSL -#include "gdcmCryptoFactory.h" -void test_openssl_link() -{ - (void)gdcm::CryptoFactory::GetFactoryInstance(gdcm::CryptoFactory::OPENSSL); -} -#endif - -#ifdef GDCM_USE_SYSTEM_JSON -#include "gdcmJSON.h" -void test_json_link() -{ - gdcm::JSON json; - json.PrettyPrintOn(); -} -#endif -bool test_uid() +int main() { - gdcm::UIDGenerator uid; - uid.SetRoot( "1.2.3.4.0.0.1" ); - const char *s = uid.Generate(); - return gdcm::UIDGenerator::IsValid(s); -} - -int main(int argc, char* argv[]) -{ - if (argc < 3) - { - std::cerr << argv[0] << " input.dcm output.dcm" << std::endl; - return 1; - } - const char* filename = argv[1]; - const char* outfilename = argv[2]; - - // Instanciate the reader: gdcm::Reader reader; - reader.SetFileName(filename); - if (!reader.Read()) - { - std::cerr << "Could not read: " << filename << std::endl; - return 1; - } - - // If we reach here, we know for sure only 1 thing: - // It is a valid DICOM file (potentially an old ACR-NEMA 1.0/2.0 file) - // (Maybe, it's NOT a Dicom image -could be a DICOMDIR, a RTSTRUCT, etc-) - - // The output of gdcm::Reader is a gdcm::File - gdcm::File& file = reader.GetFile(); - - // the dataset is the the set of element we are interested in: - gdcm::DataSet& ds = file.GetDataSet(); - - // Contruct a static(*) type for Image Comments : - gdcm::Attribute<0x0020, 0x4000> imagecomments; - imagecomments.SetValue("Hello, World !"); - - // Now replace the Image Comments from the dataset with our: - ds.Replace(imagecomments.GetAsDataElement()); - - // Write the modified DataSet back to disk - gdcm::Writer writer; - writer.CheckFileMetaInformationOff(); // Do not attempt to reconstruct the file meta to preserve the file - // as close to the original as possible. - writer.SetFileName(outfilename); - writer.SetFile(file); - if (!writer.Write()) - { - std::cerr << "Could not write: " << outfilename << std::endl; - return 1; - } - std::cout << "GDCM test: success\n"; + reader.SetFileName("myFileName"); return 0; } - -/* - * (*) static type, means that extra DICOM information VR & VM are computed at compilation time. - * The compiler is deducing those values from the template arguments of the class. - */ diff --git a/recipes/gdcm/all/test_v1_package/conanfile.py b/recipes/gdcm/all/test_v1_package/conanfile.py index a38d3dbb55dca..097d728c9571f 100644 --- a/recipes/gdcm/all/test_v1_package/conanfile.py +++ b/recipes/gdcm/all/test_v1_package/conanfile.py @@ -16,8 +16,4 @@ def build(self): def test(self): if not cross_building(self): bin_path = os.path.join("bin", "test_package") - input_file = os.path.join(self.source_folder, os.pardir, "test_package", "DCMTK_JPEGExt_12Bits.dcm") - test_dir = "test_dir" - mkdir(self, test_dir) - output_file = os.path.join(test_dir, "output.dcm") - self.run([bin_path, input_file, output_file], run_environment=True) + self.run(bin_path, run_environment=True) diff --git a/recipes/gdcm/config.yml b/recipes/gdcm/config.yml index 2cf37e22fa2ab..3820bf3dda38c 100644 --- a/recipes/gdcm/config.yml +++ b/recipes/gdcm/config.yml @@ -1,4 +1,6 @@ versions: + "3.0.24": + folder: "all" "3.0.23": folder: "all" "3.0.22": diff --git a/recipes/gdk-pixbuf/all/conanfile.py b/recipes/gdk-pixbuf/all/conanfile.py index cbbd71f4d5295..edcf9d96b7ad2 100644 --- a/recipes/gdk-pixbuf/all/conanfile.py +++ b/recipes/gdk-pixbuf/all/conanfile.py @@ -63,17 +63,17 @@ def layout(self): basic_layout(self, src_folder="src") def requirements(self): - self.requires("glib/2.78.1", transitive_headers=True, transitive_libs=True) + self.requires("glib/2.78.3", transitive_headers=True, transitive_libs=True) if self.options.with_libpng: - self.requires("libpng/1.6.40") + self.requires("libpng/[>=1.6 <2]") if self.options.with_libtiff: self.requires("libtiff/4.6.0") if self.options.with_libjpeg == "libjpeg-turbo": - self.requires("libjpeg-turbo/3.0.1") + self.requires("libjpeg-turbo/3.0.2") elif self.options.with_libjpeg == "libjpeg": self.requires("libjpeg/9e") elif self.options.with_libjpeg == "mozjpeg": - self.requires("mozjpeg/4.1.3") + self.requires("mozjpeg/4.1.5") def validate(self): if self.options.shared and not self.dependencies["glib"].options.shared: @@ -86,12 +86,12 @@ def validate(self): ) def build_requirements(self): - self.tool_requires("meson/1.2.3") + self.tool_requires("meson/[>=1.2.3 <2]") # FIXME: unify libgettext and gettext?? # INFO: gettext provides msgfmt, which is required to build the .mo files - self.tool_requires("gettext/0.21") + self.tool_requires("gettext/0.22.5") if not self.conf.get("tools.gnu:pkg_config", check_type=str): - self.tool_requires("pkgconf/2.0.3") + self.tool_requires("pkgconf/[>=2.2 <3]") self.tool_requires("glib/") if self.options.with_introspection: self.tool_requires("gobject-introspection/1.72.0") @@ -123,8 +123,6 @@ def generate(self): "man": "false", "installed_tests": "false" }) - if Version(self.version) < "2.42.0": - tc.project_options["gir"] = "false" if Version(self.version) >= "2.42.8": tc.project_options.update({ diff --git a/recipes/gegles-spdlog_setup/all/conanfile.py b/recipes/gegles-spdlog_setup/all/conanfile.py index 0d3d8a4382c9e..5724281400475 100644 --- a/recipes/gegles-spdlog_setup/all/conanfile.py +++ b/recipes/gegles-spdlog_setup/all/conanfile.py @@ -39,7 +39,7 @@ def layout(self): def requirements(self): self.requires("cpptoml/0.1.1") - self.requires("spdlog/1.13.0") + self.requires("spdlog/1.14.1") self.requires("fmt/10.2.1") def package_id(self): diff --git a/recipes/genie/all/conandata.yml b/recipes/genie/all/conandata.yml index 1b0883fe01d12..dcbfe49e2dc2e 100644 --- a/recipes/genie/all/conandata.yml +++ b/recipes/genie/all/conandata.yml @@ -11,3 +11,6 @@ sources: "1170": url: "https://github.com/bkaradzic/GENie/archive/22cc907a4351db46c55f73e6aa901f1b2f0c52ad.zip" sha256: "C7691E50F8FB6F2346D0D3CEED14A26F9DE7AEE658CE30B61770F8BE87C1FE00" + "1181": + url: "https://github.com/bkaradzic/GENie/archive/dde7e5ba4286c90117ba8261c810a904cc305326.zip" + sha256: "8C445842E6B2C3B364BEAE527B241F640DBB08A311D9B077E80642B76A38D0DD" \ No newline at end of file diff --git a/recipes/genie/config.yml b/recipes/genie/config.yml index f8c262eda3d07..47e75e6eafb62 100644 --- a/recipes/genie/config.yml +++ b/recipes/genie/config.yml @@ -7,3 +7,5 @@ versions: folder: "all" "1170": folder: "all" + "1181": + folder: "all" \ No newline at end of file diff --git a/recipes/geographiclib/all/conandata.yml b/recipes/geographiclib/all/conandata.yml index 1f35984a98249..6f7b35b699b25 100644 --- a/recipes/geographiclib/all/conandata.yml +++ b/recipes/geographiclib/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.4": + url: "https://github.com/geographiclib/geographiclib/archive/refs/tags/v2.4.tar.gz" + sha256: "aa7edc6d86fcc297be6e6d6d53ddb6e622a46ef36fe9317335cac91bf471b5a9" "2.3": url: "https://github.com/geographiclib/geographiclib/archive/refs/tags/v2.3.tar.gz" sha256: "18131077061ef8be14064f073f6dba2897a138519733803af807f861a01976c1" diff --git a/recipes/geographiclib/all/conanfile.py b/recipes/geographiclib/all/conanfile.py index 0fb1787e60859..62fa23933a44e 100644 --- a/recipes/geographiclib/all/conanfile.py +++ b/recipes/geographiclib/all/conanfile.py @@ -2,11 +2,13 @@ from conan.errors import ConanInvalidConfiguration from conan.tools.build import check_min_cppstd from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout +from conan.tools.env import VirtualBuildEnv from conan.tools.files import ( - apply_conandata_patches, collect_libs, copy, export_conandata_patches, get, - replace_in_file, rm, rmdir + apply_conandata_patches, copy, export_conandata_patches, get, + replace_in_file, rm, rmdir, collect_libs ) from conan.tools.scm import Version +from conan.tools.microsoft import is_msvc import os required_conan_version = ">=1.53.0" @@ -34,6 +36,35 @@ class GeographiclibConan(ConanFile): "tools": True, } + @property + def _min_cppstd(self): + if Version(self.version) >= "2.4": + return 14 + if Version(self.version) >= "1.51": + return 11 + return None + + @property + def _compilers_minimum_version(self): + if self._min_cppstd == 11: + # Minimum compiler version having C++11 math functions + return { + "apple-clang": "3.3", + "gcc": "4.9", + "clang": "6", + "Visual Studio": "14", # guess + "msvc": "190", + } + elif self._min_cppstd == 14: + return { + "gcc": "7", + "clang": "6", + "Visual Studio": "16", + "msvc": "192", + "apple-clang": "14", + } + return {} + def export_sources(self): export_conandata_patches(self) @@ -48,36 +79,28 @@ def configure(self): def layout(self): cmake_layout(self, src_folder="src") - @property - def _compilers_minimum_version(self): - # Minimum compiler version having C++11 math functions - return { - "apple-clang": "3.3", - "gcc": "4.9", - "clang": "6", - "Visual Studio": "14", # guess - "msvc": "190", - } - def validate(self): - if Version(self.version) >= "1.51": - if self.settings.compiler.get_safe("cppstd"): - check_min_cppstd(self, 11) + if self.settings.compiler.get_safe("cppstd") and self._min_cppstd: + check_min_cppstd(self, self._min_cppstd) - def loose_lt_semver(v1, v2): - return all(int(p1) < int(p2) for p1, p2 in zip(str(v1).split("."), str(v2).split("."))) + def loose_lt_semver(v1, v2): + return all(int(p1) < int(p2) for p1, p2 in zip(str(v1).split("."), str(v2).split("."))) - minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) - if minimum_version and loose_lt_semver(str(self.settings.compiler.version), minimum_version): - raise ConanInvalidConfiguration( - f"{self.ref} requires C++11 math functions, which your compiler does not support." - ) + minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) + if minimum_version and loose_lt_semver(str(self.settings.compiler.version), minimum_version): + raise ConanInvalidConfiguration( + f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." + ) if self.options.precision not in ["float", "double"]: # FIXME: add support for extended, quadruple and variable precisions # (may require external libs: boost multiprecision for quadruple, mpfr for variable) raise ConanInvalidConfiguration("extended, quadruple and variable precisions not yet supported in this recipe") + def build_requirements(self): + if Version(self.version) >= "2.4": + self.tool_requires("cmake/[>=3.16 <4]") + def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) @@ -97,6 +120,8 @@ def generate(self): tc.variables["GEOGRAPHICLIB_PRECISION"] = self._cmake_option_precision tc.generate() + VirtualBuildEnv(self).generate() + def _patch_sources(self): apply_conandata_patches(self) cmakelists = os.path.join(self.source_folder, "CMakeLists.txt") @@ -105,11 +130,6 @@ def _patch_sources(self): replace_in_file(self, cmakelists, "add_subdirectory (js)", "") # Don't install system libs replace_in_file(self, cmakelists, "include (InstallRequiredSystemLibraries)", "") - # Don't build tools if asked - if not self.options.tools: - replace_in_file(self, cmakelists, "add_subdirectory (tools)", "") - replace_in_file(self, os.path.join(self.source_folder, "cmake", "CMakeLists.txt"), - "${TOOLS}", "") # Disable -Werror replace_in_file(self, cmakelists, "-Werror", "") replace_in_file(self, cmakelists, "/WX", "") @@ -132,13 +152,24 @@ def package(self): ]: rmdir(self, os.path.join(os.path.join(self.package_folder, folder))) rm(self, "*.pdb", os.path.join(self.package_folder, "bin")) + if not self.options.tools: + rmdir(self, os.path.join(self.package_folder, "sbin")) + bin_files = [it for it in os.listdir(os.path.join(self.package_folder, "bin")) if not it.endswith(".dll")] + for it in bin_files: + rm(self, it, os.path.join(self.package_folder, "bin")) def package_info(self): self.cpp_info.set_property("cmake_file_name", "geographiclib") self.cpp_info.set_property("cmake_target_name", "GeographicLib::GeographicLib") self.cpp_info.set_property("pkg_config_name", "geographiclib") + # Geographic library name is GeographicLib since version 2.x (was Geographic before) + # It uses a debug postfix _d on Windows or when using multi-configuration generators (like Ninja Multi-Config) + # It's hard to track when using multi-configuration generators, so collect_libs is used + # Plus, it adds -i postfix on Windows when using shared libraries self.cpp_info.libs = collect_libs(self) self.cpp_info.defines.append("GEOGRAPHICLIB_SHARED_LIB={}".format("1" if self.options.shared else "0")) + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.system_libs = ["m"] # TODO: to remove in conan v2 once cmake_find_package_* generators removed self.cpp_info.filenames["cmake_find_package"] = "geographiclib" diff --git a/recipes/geographiclib/config.yml b/recipes/geographiclib/config.yml index 23b0bc998f804..2557b05844a79 100644 --- a/recipes/geographiclib/config.yml +++ b/recipes/geographiclib/config.yml @@ -1,4 +1,6 @@ versions: + "2.4": + folder: all "2.3": folder: all "1.52": diff --git a/recipes/geos/all/conandata.yml b/recipes/geos/all/conandata.yml index cce81a5d0af84..1c16e5baab94b 100644 --- a/recipes/geos/all/conandata.yml +++ b/recipes/geos/all/conandata.yml @@ -1,4 +1,10 @@ sources: + "3.13.0": + url: "https://github.com/libgeos/geos/releases/download/3.13.0/geos-3.13.0.tar.bz2" + sha256: "47ec83ff334d672b9e4426695f15da6e6368244214971fabf386ff8ef6df39e4" + "3.12.2": + url: "https://github.com/libgeos/geos/releases/download/3.12.2/geos-3.12.2.tar.bz2" + sha256: "34c7770bf0090ee88488af98767d08e779f124fa33437e0aabec8abd4609fec6" "3.12.0": url: "https://github.com/libgeos/geos/releases/download/3.12.0/geos-3.12.0.tar.bz2" sha256: "d96db96011259178a35555a0f6d6e75a739e52a495a6b2aa5efb3d75390fbc39" @@ -17,9 +23,3 @@ sources: "3.10.2": url: "https://download.osgeo.org/geos/geos-3.10.2.tar.bz2" sha256: "50bbc599ac386b4c2b3962dcc411f0040a61f204aaef4eba7225ecdd0cf45715" -patches: - "3.12.0": - - patch_file: "patches/3.12.0-0001-fix-cmake.patch" - patch_description: "Fix CMake on Windows with Visual Studio" - patch_type: "official" - patch_source: "https://github.com/libgeos/geos/pull/945" diff --git a/recipes/geos/all/conanfile.py b/recipes/geos/all/conanfile.py index 5bfc63783c7e5..1eefc045b2934 100644 --- a/recipes/geos/all/conanfile.py +++ b/recipes/geos/all/conanfile.py @@ -2,7 +2,7 @@ from conan.errors import ConanInvalidConfiguration from conan.tools.build import check_min_cppstd, stdcpp_library from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout -from conan.tools.files import copy, get, rmdir, export_conandata_patches, apply_conandata_patches +from conan.tools.files import copy, get, rmdir, replace_in_file from conan.tools.scm import Version import os @@ -11,11 +11,11 @@ class GeosConan(ConanFile): name = "geos" - description = "C++11 library for performing operations on two-dimensional vector geometries" + description = "GEOS is a C++ library for performing operations on two-dimensional vector geometries." license = "LGPL-2.1" - topics = ("osgeo", "geometry", "topology", "geospatial") - homepage = "https://trac.osgeo.org/geos" url = "https://github.com/conan-io/conan-center-index" + homepage = "https://libgeos.org/" + topics = ("osgeo", "geometry", "topology", "geospatial") package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { @@ -51,9 +51,6 @@ def _compilers_minimum_version(self): def _has_inline_option(self): return Version(self.version) < "3.11.0" - def export_sources(self): - export_conandata_patches(self) - def config_options(self): if self.settings.os == "Windows": del self.options.fPIC @@ -96,8 +93,15 @@ def generate(self): tc.variables["BUILD_GEOSOP"] = self.options.utils tc.generate() + def _patch_sources(self): + # Avoid setting CMAKE_BUILD_TYPE default when multi-config generators are used. + # https://github.com/libgeos/geos/pull/945 + if Version(self.version) <= "3.12.1": + replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), + "set(CMAKE_BUILD_TYPE ${DEFAULT_BUILD_TYPE})", "") + def build(self): - apply_conandata_patches(self) + self._patch_sources() cmake = CMake(self) cmake.configure() cmake.build() diff --git a/recipes/geos/all/patches/3.12.0-0001-fix-cmake.patch b/recipes/geos/all/patches/3.12.0-0001-fix-cmake.patch deleted file mode 100644 index d0abdd50a8211..0000000000000 --- a/recipes/geos/all/patches/3.12.0-0001-fix-cmake.patch +++ /dev/null @@ -1,31 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 7a2906c..cdab138 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -114,8 +114,12 @@ endif() - - # Make sure we know our build type - if(NOT CMAKE_BUILD_TYPE) -- set(CMAKE_BUILD_TYPE ${DEFAULT_BUILD_TYPE}) -- message(STATUS "GEOS: Using default build type: ${CMAKE_BUILD_TYPE}") -+ get_property(_is_multi_config_generator GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) -+ if (NOT _is_multi_config_generator) -+ set(CMAKE_BUILD_TYPE ${DEFAULT_BUILD_TYPE}) -+ message(STATUS "GEOS: Using default build type: ${CMAKE_BUILD_TYPE}") -+ endif() -+ unset(_is_multi_config_generator) - else() - message(STATUS "GEOS: Build type: ${CMAKE_BUILD_TYPE}") - endif() -@@ -186,6 +190,11 @@ set(CMAKE_CXX_FLAGS_ASAN "${CMAKE_CXX_FLAGS_DEBUG} -fsanitize=address -fno-omit- - set(CMAKE_EXE_LINKER_FLAGS_ASAN "${CMAKE_EXE_LINKER_FLAGS_DEBUG} -fsanitize=address") - set(CMAKE_SHARED_LINKER_FLAGS_ASAN "${CMAKE_SHARED_LINKER_FLAGS_DEBUG} -fsanitize=address") - -+get_property(_cmake_build_type_is_cache CACHE CMAKE_BUILD_TYPE PROPERTY TYPE) -+if (_cmake_build_type_is_cache) -+ set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release" "MinSizeRel" "RelWithDebInfo" "ASAN") -+endif() -+unset(_cmake_build_type_is_cache) - set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release" "MinSizeRel" "RelWithDebInfo" "ASAN") - - #----------------------------------------------------------------------------- diff --git a/recipes/geos/config.yml b/recipes/geos/config.yml index bbc8ab7daf85c..b2d68bf99ca6a 100644 --- a/recipes/geos/config.yml +++ b/recipes/geos/config.yml @@ -1,4 +1,8 @@ versions: + "3.13.0": + folder: all + "3.12.2": + folder: all "3.12.0": folder: all "3.11.2": diff --git a/recipes/getdns/all/CMakeLists.txt b/recipes/getdns/all/CMakeLists.txt deleted file mode 100644 index f96c6dd4ed727..0000000000000 --- a/recipes/getdns/all/CMakeLists.txt +++ /dev/null @@ -1,11 +0,0 @@ -cmake_minimum_required(VERSION 3.1) -project(cmake_wrapper) - -include(conanbuildinfo.cmake) -conan_basic_setup() - -if(WIN32) - set(CMAKE_REQUIRED_LIBRARIES ws2_32) -endif() - -add_subdirectory(source_subfolder) diff --git a/recipes/getdns/all/conan_deps.cmake b/recipes/getdns/all/conan_deps.cmake new file mode 100644 index 0000000000000..0925ccf84a265 --- /dev/null +++ b/recipes/getdns/all/conan_deps.cmake @@ -0,0 +1,29 @@ +cmake_minimum_required(VERSION 3.15) +project(cmake_wrapper) + +# Wrapper for find_package() that sets variables in the format expected by the project +macro(custom_find_package name) + find_package(${name} REQUIRED CONFIG + # Allow only Conan packages + NO_DEFAULT_PATH + PATHS ${CMAKE_PREFIX_PATH} + ) + string(TOUPPER ${name} name_upper) + set(${name_upper}_FOUND TRUE) + set(${name_upper}_INCLUDE_DIR ${${name}_INCLUDE_DIR}) + set(${name_upper}_LIBRARIES ${${name}_LIBRARIES}) +endmacro() + +custom_find_package(OpenSSL) +if(BUILD_LIBEV) + custom_find_package(Libev) +endif() +if(BUILD_LIBEVENT2) + custom_find_package(Libevent2) +endif() +if(BUILD_LIBUV) + custom_find_package(Libuv) +endif() +if(USE_LIBIDN2) + custom_find_package(Libidn2) +endif() diff --git a/recipes/getdns/all/conandata.yml b/recipes/getdns/all/conandata.yml index 63656d1d51254..a97e641f541f4 100644 --- a/recipes/getdns/all/conandata.yml +++ b/recipes/getdns/all/conandata.yml @@ -1,14 +1,11 @@ sources: - "1.6.0": - url: "https://getdnsapi.net/dist/getdns-1.6.0.tar.gz" - sha256: "40e5737471a3902ba8304b0fd63aa7c95802f66ebbc6eae53c487c8e8a380f4a" + "1.7.3": + url: "https://getdnsapi.net/dist/getdns-1.7.3.tar.gz" + sha256: "f1404ca250f02e37a118aa00cf0ec2cbe11896e060c6d369c6761baea7d55a2c" patches: - "1.6.0": - - patch_file: "patches/1.6.0-0001-install-runtimes.patch" - base_path: "source_subfolder" + "1.7.3": - patch_file: "patches/1.6.0-0002-fix-exports-extension-libraries.patch" - base_path: "source_subfolder" - - patch_file: "patches/1.6.0-0003-let-find-modules-use-pkgconfig.patch" - base_path: "source_subfolder" - - patch_file: "patches/1.6.0-0004-dont-install-symlinked-license.patch" - base_path: "source_subfolder" + - patch_file: "patches/1.7.3-fix-windows-build.patch" + patch_description: "Fix Windows build" + patch_source: "https://github.com/getdnsapi/getdns/pull/538" + patch_type: "portability" diff --git a/recipes/getdns/all/conanfile.py b/recipes/getdns/all/conanfile.py index a1d7aed1728a6..33e5e1ab9e6c1 100644 --- a/recipes/getdns/all/conanfile.py +++ b/recipes/getdns/all/conanfile.py @@ -1,24 +1,28 @@ -from conans import CMake, ConanFile, tools -from conans.errors import ConanInvalidConfiguration -import glob import os +from conan import ConanFile +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.env import VirtualBuildEnv +from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rmdir, rm +from conan.tools.microsoft import is_msvc + +required_conan_version = ">=1.53.0" + class GetDnsConan(ConanFile): name = "getdns" description = "A modern asynchronous DNS API" - topics = "conan", "getdns", "asynchronous", "event" license = "BSD-3-Clause" - homepage = "https://getdnsapi.net/" url = "https://github.com/conan-io/conan-center-index" + homepage = "https://getdnsapi.net/" + topics = ("dns", "asynchronous", "event") + + package_type = "library" settings = "os", "arch", "compiler", "build_type" - exports_sources = "CMakeLists.txt", "patches/**" options = { "shared": [True, False], "fPIC": [True, False], - "tls": [False, "gnutls"], - "stub_only": ["auto", True, False], - "with_libev": ["auto", True, False], + "with_libev": [True, False], "with_libevent": [True, False], "with_libuv": [True, False], "with_libidn2": [True, False], @@ -26,36 +30,15 @@ class GetDnsConan(ConanFile): default_options = { "shared": False, "fPIC": True, - "stub_only": "auto", - "tls": False, - "with_libev": "auto", + "with_libev": True, "with_libevent": True, "with_libuv": True, - "with_libidn2": True, + "with_libidn2": True } - generators = "cmake", "pkg_config", "cmake_find_package" - - _cmake = None - - @property - def _with_libev(self): - if self.options.with_libev == "auto": - return self.settings.os != "Windows" - else: - return self.options.with_libev - - @property - def _stub_only(self): - if self.options.stub_only == "auto": - # FIXME: uncomment the next line when libunbound is available - # return self.settings.os == "Windows" - return True - else: - return self.options.stub_only - - @property - def _source_subfolder(self): - return "source_subfolder" + + def export_sources(self): + export_conandata_patches(self) + copy(self, "conan_deps.cmake", src=self.recipe_folder, dst=os.path.join(self.export_sources_folder, "src")) def config_options(self): if self.settings.os == "Windows": @@ -63,108 +46,119 @@ def config_options(self): def configure(self): if self.options.shared: - del self.options.fPIC - del self.settings.compiler.libcxx - del self.settings.compiler.cppstd + self.options.rm_safe("fPIC") + self.settings.rm_safe("compiler.libcxx") + self.settings.rm_safe("compiler.cppstd") + + def layout(self): + cmake_layout(self, src_folder="src") def requirements(self): - self.requires("openssl/1.1.1j") - if self._with_libev: + self.requires("openssl/[>=1.1 <4]") + if self.options.with_libev: self.requires("libev/4.33") if self.options.with_libevent: self.requires("libevent/2.1.12") if self.options.with_libuv: - self.requires("libuv/1.41.0") + self.requires("libuv/1.48.0") if self.options.with_libidn2: self.requires("libidn2/2.3.0") - if self.options.tls == "gnutls": - self.requires("nettle/3.6") - # FIXME: missing gnutls recipe - raise ConanInvalidConfiguration("gnutls is not (yet) available on cci") - if not self._stub_only: - # FIXME: missing libunbound recipe - raise ConanInvalidConfiguration("libunbound is not (yet) available on cci") def build_requirements(self): - self.build_requires("pkgconf/1.7.3") + self.tool_requires("cmake/[>=3.20 <4]") def source(self): - tools.get(**self.conan_data["sources"][self.version]) - os.rename("getdns-{}".format(self.version), self._source_subfolder) - - def _configure_cmake(self): - if self._cmake: - return self._cmake - self._cmake = CMake(self) - self._cmake.definitions["OPENSSL_USE_STATIC_LIBS"] = not self.options["openssl"].shared - self._cmake.definitions["ENABLE_SHARED"] = self.options.shared - self._cmake.definitions["ENABLE_STATIC"] = not self.options.shared - self._cmake.definitions["ENABLE_STUB_ONLY"] = self._stub_only - self._cmake.definitions["BUILD_LIBEV"] = self._with_libev - self._cmake.definitions["BUILD_LIBEVENT2"] = self.options.with_libevent - self._cmake.definitions["BUILD_LIBUV"] = self.options.with_libuv - self._cmake.definitions["USE_LIBIDN2"] = self.options.with_libidn2 - self._cmake.definitions["USE_GNUTLS"] = self.options.tls == "gnutls" - self._cmake.definitions["BUILD_TESTING"] = False - - self._cmake.configure() - return self._cmake + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + VirtualBuildEnv(self).generate() + + tc = CMakeToolchain(self) + tc.variables["CMAKE_PROJECT_getdns_INCLUDE"] = "conan_deps.cmake" + tc.variables["OPENSSL_USE_STATIC_LIBS"] = not self.dependencies["openssl"].options.shared + tc.variables["ENABLE_SHARED"] = self.options.shared + tc.variables["ENABLE_STATIC"] = not self.options.shared + # INFO: Disabling stub-only requires libunbound + tc.variables["ENABLE_STUB_ONLY"] = True + tc.variables["BUILD_LIBEV"] = self.options.with_libev + tc.variables["BUILD_LIBEVENT2"] = self.options.with_libevent + tc.variables["BUILD_LIBUV"] = self.options.with_libuv + tc.variables["USE_LIBIDN2"] = self.options.with_libidn2 + # INFO: GnuTLS requires libdane support and is not supported by MSVC + tc.variables["USE_GNUTLS"] = False + # Force use of internal strptime when cross-compiling + tc.variables["FORCE_COMPAT_STRPTIME"] = True + tc.variables["BUILD_TESTING"] = False + # To fix OpenSSL try_compile() checks + # https://github.com/conan-io/conan/issues/12180 + tc.variables["CMAKE_TRY_COMPILE_CONFIGURATION"] = str(self.settings.build_type) + if self.settings.compiler in ["clang", "apple-clang"]: + # INFO: https://github.com/getdnsapi/getdns/issues/544 + # TODO: Change to extra_clfags when CCI only uses Conan 2.x + tc.blocks["cmake_flags_init"].template += '\nstring(APPEND CMAKE_C_FLAGS_INIT " -Wno-incompatible-function-pointer-types")' + if self.options.with_libidn2 and is_msvc(self): + # INFO: getdns_static.lib(convert.c.obj): error LNK2019: unresolved external symbol __imp_idn2_lookup_u8 + tc.preprocessor_definitions.update({it: 1 for it in self.dependencies["libidn2"].cpp_info.defines}) + tc.generate() + + deps = CMakeDeps(self) + deps.set_property("libev", "cmake_file_name", "Libev") + deps.set_property("libev", "cmake_target_name", "Libev::Libev") + deps.set_property("libevent", "cmake_file_name", "Libevent2") + deps.set_property("libevent::core", "cmake_target_name", "Libevent2::Libevent_core") + deps.set_property("libidn2", "cmake_file_name", "Libidn2") + deps.set_property("libidn2", "cmake_target_name", "Libidn2::Libidn2") + deps.set_property("libuv", "cmake_file_name", "Libuv") + deps.set_property("libuv", "cmake_target_name", "Libuv::Libuv") + deps.generate() + + def _patch_sources(self): + apply_conandata_patches(self) + rm(self, "Find*.cmake", os.path.join(self.source_folder, "cmake", "modules")) def build(self): - for patch in self.conan_data.get("patches", {}).get(self.version, []): - tools.patch(**patch) - # Use FindOpenSSL.cmake to let check_function_exists succeed - # Remove other cmake modules as they use FindPkgConfig - for fn in glob.glob("Find*cmake"): - if "OpenSSL" not in fn: - os.unlink(fn) - cmake = self._configure_cmake() + self._patch_sources() + cmake = CMake(self) + cmake.configure() cmake.build() def package(self): - self.copy("COPYING", src=self._source_subfolder, dst="licenses") - cmake = self._configure_cmake() + copy(self, "LICENSE", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) + cmake = CMake(self) cmake.install() - tools.rmdir(os.path.join(self.package_folder, "lib", "cmake")) - tools.rmdir(os.path.join(self.package_folder, "lib", "pkgconfig")) - tools.rmdir(os.path.join(self.package_folder, "share")) - - def package_id(self): - self.info.options.stub_only = self._stub_only - self.info.options.with_libev = self._with_libev + rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) + rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) + rmdir(self, os.path.join(self.package_folder, "share")) def package_info(self): libsuffix = "" - if self.settings.compiler == "Visual Studio" and not self.options.shared: + if is_msvc(self) and not self.options.shared: libsuffix = "_static" - self.cpp_info.components["libgetdns"].libs = ["getdns" + libsuffix] self.cpp_info.components["libgetdns"].includedirs.append(os.path.join("include", "getdns")) - self.cpp_info.components["libgetdns"].names["pkg_config"]= "getdns" + self.cpp_info.components["libgetdns"].set_property("pkg_config_name", "getdns") self.cpp_info.components["libgetdns"].requires = ["openssl::openssl"] if self.options.with_libidn2: self.cpp_info.components["libgetdns"].requires.append("libidn2::libidn2") - if self.options.with_libidn2: - self.cpp_info.components["libgetdns"].requires.append("libidn2::libidn2") - if self.options.tls == "gnutls": - self.cpp_info.components["libgetdns"].requires.extend(["nettle::nettle", "gnutls::gnutls"]) + if self.settings.os == "Windows": + self.cpp_info.components["libgetdns"].system_libs.extend(["ws2_32", "crypt32", "gdi32", "iphlpapi", "psapi", "userenv"]) if self.options.with_libevent: - self.cpp_info.components["dns_ex_event"].libs = ["getdns_ex_event" + libsuffix] - self.cpp_info.components["dns_ex_event"].requires= ["libgetdns", "libevent::libevent"] - self.cpp_info.components["dns_ex_event"].names["pkg_config"]= "getdns_ext_event" + self.cpp_info.components["dns_ext_event"].libs = ["getdns_ext_event" + libsuffix] + self.cpp_info.components["dns_ext_event"].requires = ["libgetdns", "libevent::libevent"] + self.cpp_info.components["dns_ext_event"].set_property("pkg_config_name", "getdns_ext_event") - if self._with_libev: - self.cpp_info.components["dns_ex_ev"].libs = ["getdns_ex_ev" + libsuffix] - self.cpp_info.components["dns_ex_ev"].requires = ["libgetdns", "libev::libev"] - self.cpp_info.components["dns_ex_ev"].names["pkg_config"]= "getdns_ext_ev" + if self.options.with_libev: + self.cpp_info.components["dns_ext_ev"].libs = ["getdns_ext_ev" + libsuffix] + self.cpp_info.components["dns_ext_ev"].requires = ["libgetdns", "libev::libev"] + self.cpp_info.components["dns_ext_ev"].set_property("pkg_config_name", "getdns_ext_ev") if self.options.with_libuv: - self.cpp_info.components["dns_ex_uv"].libs = ["getdns_ex_uv" + libsuffix] - self.cpp_info.components["dns_ex_uv"].requires = ["libgetdns", "libuv::libuv"] - self.cpp_info.components["dns_ex_uv"].names["pkg_config"]= "getdns_ext_uv" + self.cpp_info.components["dns_ext_uv"].libs = ["getdns_ext_uv" + libsuffix] + self.cpp_info.components["dns_ext_uv"].requires = ["libgetdns", "libuv::libuv"] + self.cpp_info.components["dns_ext_uv"].set_property("pkg_config_name", "getdns_ext_uv") + # TODO: Remove after dropping support for Conan 1.x in ConanCenterIndex bin_path = os.path.join(self.package_folder, "bin") - self.output.info("Appending PATH environment variable: {}".format(bin_path)) self.env_info.PATH.append(bin_path) diff --git a/recipes/getdns/all/patches/1.6.0-0001-install-runtimes.patch b/recipes/getdns/all/patches/1.6.0-0001-install-runtimes.patch deleted file mode 100644 index de23061cc40af..0000000000000 --- a/recipes/getdns/all/patches/1.6.0-0001-install-runtimes.patch +++ /dev/null @@ -1,33 +0,0 @@ -Based on https://github.com/getdnsapi/getdns/pull/477 - ---- CMakeLists.txt -+++ CMakeLists.txt -@@ -1055,22 +1055,22 @@ - endif () - endif () - if (ENABLE_SHARED) -- install(TARGETS getdns_shared LIBRARY DESTINATION lib ARCHIVE DESTINATION lib) -+ install(TARGETS getdns_shared LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) - if (USE_LIBEV) -- install(TARGETS getdns_ex_ev_shared LIBRARY DESTINATION lib ARCHIVE DESTINATION lib) -+ install(TARGETS getdns_ex_ev_shared LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) - endif () - if (USE_LIBEVENT2) -- install(TARGETS getdns_ex_event_shared LIBRARY DESTINATION lib ARCHIVE DESTINATION lib) -+ install(TARGETS getdns_ex_event_shared LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) - endif () - if (USE_LIBUV) -- install(TARGETS getdns_ex_uv_shared LIBRARY DESTINATION lib ARCHIVE DESTINATION lib) -+ install(TARGETS getdns_ex_uv_shared LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) - endif () - endif () - if (BUILD_GETDNS_QUERY) -- install(TARGETS getdns_query RUNTIME DESTINATION bin) -+ install(TARGETS getdns_query RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) - endif () - if (BUILD_GETDNS_SERVER_MON) -- install(TARGETS getdns_server_mon RUNTIME DESTINATION bin) -+ install(TARGETS getdns_server_mon RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) - endif () - - install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/getdns DESTINATION include) diff --git a/recipes/getdns/all/patches/1.6.0-0003-let-find-modules-use-pkgconfig.patch b/recipes/getdns/all/patches/1.6.0-0003-let-find-modules-use-pkgconfig.patch deleted file mode 100644 index 9e446cae01b2a..0000000000000 --- a/recipes/getdns/all/patches/1.6.0-0003-let-find-modules-use-pkgconfig.patch +++ /dev/null @@ -1,641 +0,0 @@ ---- CMakeLists.txt -+++ CMakeLists.txt -@@ -659,9 +659,9 @@ - target_include_directories(getdns_objects PRIVATE src/ssl_dane) - set(USE_DANESSL 1) - endif () --if (Libidn_FOUND) -- target_include_directories(getdns_objects PRIVATE ${LIBIDN_INCLUDE_DIR}) --endif () -+#if (Libidn_FOUND) -+# target_include_directories(getdns_objects PRIVATE ${LIBIDN_INCLUDE_DIR}) -+#endif () - if (Libidn2_FOUND) - target_include_directories(getdns_objects PRIVATE ${LIBIDN2_INCLUDE_DIR}) - endif () -@@ -695,9 +695,9 @@ - if (Libunbound_FOUND) - target_link_libraries(getdns PUBLIC Libunbound::Libunbound) - endif () -- if (Libidn_FOUND) -- target_link_libraries(getdns PUBLIC Libidn::Libidn) -- endif () -+# if (Libidn_FOUND) -+# target_link_libraries(getdns PUBLIC Libidn::Libidn) -+# endif () - if (Libidn2_FOUND) - target_link_libraries(getdns PUBLIC Libidn2::Libidn2) - endif () ---- cmake/modules/FindGnuTLS.cmake -+++ cmake/modules/FindGnuTLS.cmake -@@ -30,51 +30,65 @@ - - #]=======================================================================] - --find_path(GNUTLS_INCLUDE_DIR gnutls/gnutls.h -- HINTS -- "${GNUTLS_DIR}" -- "${GNUTLS_DIR}/include" --) -- --find_library(GNUTLS_LIBRARY NAMES gnutls libgnutls -- HINTS -- "${GNUTLS_DIR}" -- "${GNUTLS_DIR}/lib" --) -- --find_library(GNUTLS_DANE_LIBRARY NAMES gnutls-dane libgnutls-dane -- HINTS -- "${GNUTLS_DIR}" -- "${GNUTLS_DIR}/lib" --) -- --set(GNUTLS_LIBRARIES "") -- --if (GNUTLS_INCLUDE_DIR AND GNUTLS_LIBRARY AND GNUTLS_DANE_LIBRARY) -- if (NOT TARGET GnuTLS::GnuTLS) -- add_library(GnuTLS::GnuTLS UNKNOWN IMPORTED) -- set_target_properties(GnuTLS::GnuTLS PROPERTIES -- INTERFACE_INCLUDE_DIRECTORIES "${GNUTLS_INCLUDE_DIR}" -- IMPORTED_LINK_INTERFACE_LANGUAGES "C" -- IMPORTED_LOCATION "${GNUTLS_LIBRARY}" -- ) -- endif () -- if (NOT TARGET GnuTLS::Dane) -- add_library(GnuTLS::Dane UNKNOWN IMPORTED) -- set_target_properties(GnuTLS::Dane PROPERTIES -- INTERFACE_INCLUDE_DIRECTORIES "${GNUTLS_INCLUDE_DIR}" -- IMPORTED_LINK_INTERFACE_LANGUAGES "C" -- IMPORTED_LOCATION "${GNUTLS_DANE_LIBRARY}" -- ) -- endif () -- -- if (NOT GNUTLS_VERSION AND GNUTLS_INCLUDE_DIR) -- file(STRINGS "${GNUTLS_INCLUDE_DIR}/gnutls/gnutls.h" GNUTLS_VER_H REGEX "^#define GNUTLS_VERSION_(MAJOR|MINOR|PATCH) ") -- string(REGEX REPLACE "^.*_MAJOR ([0-9]+).*_MINOR ([0-9]+).*_PATCH ([0-9]+).*$" "\\1.\\2.\\3c" GNUTLS_VERSION "${GNUTLS_VER_H}") -- endif () -+include(FindPkgConfig) -+if(PKG_CONFIG_FOUND) -+ pkg_check_modules(PkgGnuTLS IMPORTED_TARGET GLOBAL QUIET gnutls) -+ pkg_check_modules(PkgGnuTLSDane IMPORTED_TARGET GLOBAL QUIET gnutls-dane) - endif() - --list(APPEND GNUTLS_LIBRARIES "${GNUTLS_LIBRARY}" "${GNUTLS_DANE_LIBRARY}") -+if(PkgGnuTLS_FOUND AND PkgGnuTLSDane_FOUND) -+ set(GNUTLS_INCLUDE_DIR ${PkgGnuTLS_INCLUDE_DIRS} $PkgGnuTLSDane_INCLUDE_DIRS}) -+ set(NETTLE_LIBRARIES ${PkgGnuTLS_LIBRARIES} ${PkgGnuTLSDane_LIBRARIES}) -+ set(NETTLE_VERSION ${PkgGnuTLS_VERSION}) -+ add_library(GnuTLS::GnuTLS ALIAS PkgConfig::PkgGnuTLS) -+ add_library(GnuTLS::Dane ALIAS PkgConfig::PkgGnuTLSDane) -+else() -+ find_path(GNUTLS_INCLUDE_DIR gnutls/gnutls.h -+ HINTS -+ "${GNUTLS_DIR}" -+ "${GNUTLS_DIR}/include" -+ ) -+ -+ find_library(GNUTLS_LIBRARY NAMES gnutls libgnutls -+ HINTS -+ "${GNUTLS_DIR}" -+ "${GNUTLS_DIR}/lib" -+ ) -+ -+ find_library(GNUTLS_DANE_LIBRARY NAMES gnutls-dane libgnutls-dane -+ HINTS -+ "${GNUTLS_DIR}" -+ "${GNUTLS_DIR}/lib" -+ ) -+ -+ set(GNUTLS_LIBRARIES "") -+ -+ if (GNUTLS_INCLUDE_DIR AND GNUTLS_LIBRARY AND GNUTLS_DANE_LIBRARY) -+ if (NOT TARGET GnuTLS::GnuTLS) -+ add_library(GnuTLS::GnuTLS UNKNOWN IMPORTED) -+ set_target_properties(GnuTLS::GnuTLS PROPERTIES -+ INTERFACE_INCLUDE_DIRECTORIES "${GNUTLS_INCLUDE_DIR}" -+ IMPORTED_LINK_INTERFACE_LANGUAGES "C" -+ IMPORTED_LOCATION "${GNUTLS_LIBRARY}" -+ ) -+ endif () -+ if (NOT TARGET GnuTLS::Dane) -+ add_library(GnuTLS::Dane UNKNOWN IMPORTED) -+ set_target_properties(GnuTLS::Dane PROPERTIES -+ INTERFACE_INCLUDE_DIRECTORIES "${GNUTLS_INCLUDE_DIR}" -+ IMPORTED_LINK_INTERFACE_LANGUAGES "C" -+ IMPORTED_LOCATION "${GNUTLS_DANE_LIBRARY}" -+ ) -+ endif () -+ -+ if (NOT GNUTLS_VERSION AND GNUTLS_INCLUDE_DIR) -+ file(STRINGS "${GNUTLS_INCLUDE_DIR}/gnutls/gnutls.h" GNUTLS_VER_H REGEX "^#define GNUTLS_VERSION_(MAJOR|MINOR|PATCH) ") -+ string(REGEX REPLACE "^.*_MAJOR ([0-9]+).*_MINOR ([0-9]+).*_PATCH ([0-9]+).*$" "\\1.\\2.\\3c" GNUTLS_VERSION "${GNUTLS_VER_H}") -+ endif () -+ endif() -+ -+ list(APPEND GNUTLS_LIBRARIES "${GNUTLS_LIBRARY}" "${GNUTLS_DANE_LIBRARY}") -+endif() - - include(FindPackageHandleStandardArgs) - find_package_handle_standard_args(GnuTLS ---- cmake/modules/FindLibevent2.cmake -+++ cmake/modules/FindLibevent2.cmake -@@ -28,37 +28,49 @@ - - #]=======================================================================] - --find_path(LIBEVENT2_INCLUDE_DIR event2/event.h -- HINTS -- "${LIBEVENT2_DIR}" -- "${LIBEVENT2_DIR}/include" --) -- --find_library(LIBEVENT2_LIBRARY NAMES event_core libevent_core -- HINTS -- "${LIBEVENT2_DIR}" -- "${LIBEVENT2_DIR}/lib" --) -- --set(LIBEVENT2_LIBRARIES "") -- --if (LIBEVENT2_INCLUDE_DIR AND LIBEVENT2_LIBRARY) -- if (NOT TARGET Libevent2::Libevent_core) -- add_library(Libevent2::Libevent_core UNKNOWN IMPORTED) -- set_target_properties(Libevent2::Libevent_core PROPERTIES -- INTERFACE_INCLUDE_DIRECTORIES "${LIBEVENT2_INCLUDE_DIR}" -- IMPORTED_LINK_INTERFACE_LANGUAGES "C" -- IMPORTED_LOCATION "${LIBEVENT2_LIBRARY}" -- ) -- endif () -- -- if (NOT LIBEVENT2_VERSION AND LIBEVENT2_INCLUDE_DIR AND EXISTS "${LIBEVENT2_INCLUDE_DIR}/event2/event.h") -- file(STRINGS "${LIBEVENT2_INCLUDE_DIR}/event2/event-config.h" LIBEVENT2_H REGEX "^#define _?EVENT_+VERSION ") -- string(REGEX REPLACE "^.*EVENT_+VERSION \"([^\"]+)\".*$" "\\1" LIBEVENT2_VERSION "${LIBEVENT2_H}") -- endif () -+include(FindPkgConfig) -+if(PKG_CONFIG_FOUND) -+ pkg_check_modules(PkgLibevent IMPORTED_TARGET GLOBAL QUIET libevent>=2) - endif() - --list(APPEND LIBEVENT2_LIBRARIES "${LIBEVENT2_LIBRARY}") -+if(PkgLibevent_FOUND) -+ set(LIBEVENT2_INCLUDE_DIR ${PkgLibevent_INCLUDE_DIRS}) -+ set(LIBEVENT2_LIBRARIES ${PkgLibevent_LIBRARIES}) -+ set(LIBEVENT2_VERSION ${PkgLibevent_VERSION}) -+ add_library(Libevent2::Libevent_core ALIAS PkgConfig::PkgLibevent) -+else() -+ find_path(LIBEVENT2_INCLUDE_DIR event2/event.h -+ HINTS -+ "${LIBEVENT2_DIR}" -+ "${LIBEVENT2_DIR}/include" -+ ) -+ -+ find_library(LIBEVENT2_LIBRARY NAMES event_core libevent_core -+ HINTS -+ "${LIBEVENT2_DIR}" -+ "${LIBEVENT2_DIR}/lib" -+ ) -+ -+ set(LIBEVENT2_LIBRARIES "") -+ -+ if (LIBEVENT2_INCLUDE_DIR AND LIBEVENT2_LIBRARY) -+ if (NOT TARGET Libevent2::Libevent_core) -+ add_library(Libevent2::Libevent_core UNKNOWN IMPORTED) -+ set_target_properties(Libevent2::Libevent_core PROPERTIES -+ INTERFACE_INCLUDE_DIRECTORIES "${LIBEVENT2_INCLUDE_DIR}" -+ IMPORTED_LINK_INTERFACE_LANGUAGES "C" -+ IMPORTED_LOCATION "${LIBEVENT2_LIBRARY}" -+ ) -+ endif () -+ -+ if (NOT LIBEVENT2_VERSION AND LIBEVENT2_INCLUDE_DIR AND EXISTS "${LIBEVENT2_INCLUDE_DIR}/event2/event.h") -+ file(STRINGS "${LIBEVENT2_INCLUDE_DIR}/event2/event-config.h" LIBEVENT2_H REGEX "^#define _?EVENT_+VERSION ") -+ string(REGEX REPLACE "^.*EVENT_+VERSION \"([^\"]+)\".*$" "\\1" LIBEVENT2_VERSION "${LIBEVENT2_H}") -+ endif () -+ endif() -+ -+ list(APPEND LIBEVENT2_LIBRARIES "${LIBEVENT2_LIBRARY}") -+endif() - - include(FindPackageHandleStandardArgs) - find_package_handle_standard_args(Libevent2 ---- cmake/modules/FindLibidn2.cmake -+++ cmake/modules/FindLibidn2.cmake -@@ -28,37 +28,49 @@ - - #]=======================================================================] - --find_path(LIBIDN2_INCLUDE_DIR idn2.h -- HINTS -- "${LIBIDN2_DIR}" -- "${LIBIDN2_DIR}/include" --) -- --find_library(LIBIDN2_LIBRARY NAMES idn2 libidn2 -- HINTS -- "${LIBIDN2_DIR}" -- "${LIBIDN2_DIR}/lib" --) -- --set(LIBIDN2_LIBRARIES "") -- --if (LIBIDN2_INCLUDE_DIR AND LIBIDN2_LIBRARY) -- if (NOT TARGET Libidn2::Libidn2) -- add_library(Libidn2::Libidn2 UNKNOWN IMPORTED) -- set_target_properties(Libidn2::Libidn2 PROPERTIES -- INTERFACE_INCLUDE_DIRECTORIES "${LIBIDN2_INCLUDE_DIR}" -- IMPORTED_LINK_INTERFACE_LANGUAGES "C" -- IMPORTED_LOCATION "${LIBIDN2_LIBRARY}" -+include(FindPkgConfig) -+if(PKG_CONFIG_FOUND) -+ pkg_check_modules(PkgLibIdn2 IMPORTED_TARGET GLOBAL libidn2) -+endif() -+ -+if(PkgLibIdn2_FOUND) -+ set(LIBIDN2_INCLUDE_DIR ${PkgLibIdn2_INCLUDE_DIRS}) -+ set(LIBIDN2_LIBRARIES ${PkgLibIdn2_LIBRARIES}) -+ set(LIBIDN2_VERSION ${PkgLibIdn2_VERSION}) -+ add_library(Libidn2::Libidn2 ALIAS PkgConfig::PkgLibIdn2) -+else() -+ find_path(LIBIDN2_INCLUDE_DIR idn2.h -+ HINTS -+ "${LIBIDN2_DIR}" -+ "${LIBIDN2_DIR}/include" -+ ) -+ -+ find_library(LIBIDN2_LIBRARY NAMES idn2 libidn2 -+ HINTS -+ "${LIBIDN2_DIR}" -+ "${LIBIDN2_DIR}/lib" -+ ) -+ -+ set(LIBIDN2_LIBRARIES "") -+ -+ if (LIBIDN2_INCLUDE_DIR AND LIBIDN2_LIBRARY) -+ if (NOT TARGET Libidn2::Libidn2) -+ add_library(Libidn2::Libidn2 UNKNOWN IMPORTED) -+ set_target_properties(Libidn2::Libidn2 PROPERTIES -+ INTERFACE_INCLUDE_DIRECTORIES "${LIBIDN2_INCLUDE_DIR}" -+ IMPORTED_LINK_INTERFACE_LANGUAGES "C" -+ IMPORTED_LOCATION "${LIBIDN2_LIBRARY}" - ) -- endif () -+ endif () - -- if (NOT LIBIDN2_VERSION AND LIBIDN2_INCLUDE_DIR AND EXISTS "${LIBIDN2_INCLUDE_DIR}/unbound.h") -- file(STRINGS "${LIBIDN2_INCLUDE_DIR}/idn2.h" LIBIDN2_H REGEX "^#define IDN2_VERSION ") -- string(REGEX REPLACE "^.*IDN2_VERSION \"([0-9.]+)\".*$" "\\1" LIBIDN2_VERSION "${LIBIDN2_H}") -- endif () --endif() -+ if (NOT LIBIDN2_VERSION AND LIBIDN2_INCLUDE_DIR AND EXISTS "${LIBIDN2_INCLUDE_DIR}/unbound.h") -+ file(STRINGS "${LIBIDN2_INCLUDE_DIR}/idn2.h" LIBIDN2_H REGEX "^#define IDN2_VERSION ") -+ string(REGEX REPLACE "^.*IDN2_VERSION \"([0-9.]+)\".*$" "\\1" LIBIDN2_VERSION "${LIBIDN2_H}") -+ endif () - --list(APPEND LIBIDN2_LIBRARIES "${LIBIDN2_LIBRARY}") -+ list(APPEND LIBIDN2_LIBRARIES "${LIBIDN2_LIBRARY}") -+ endif() -+endif() - - include(FindPackageHandleStandardArgs) - find_package_handle_standard_args(Libidn2 ---- cmake/modules/FindLibunbound.cmake -+++ cmake/modules/FindLibunbound.cmake -@@ -28,58 +28,70 @@ - - #]=======================================================================] - --find_path(LIBUNBOUND_INCLUDE_DIR unbound.h -- HINTS -- "${LIBUNBOUND_DIR}" -- "${LIBUNBOUND_DIR}/include" --) -- --find_library(LIBUNBOUND_LIBRARY NAMES unbound -- HINTS -- "${LIBUNBOUND_DIR}" -- "${LIBUNBOUND_DIR}/lib" --) -- --set(LIBUNBOUND_LIBRARIES "") -- --if (UNIX) -- find_package(Threads REQUIRED) -- find_package(OpenSSL REQUIRED) -- -- list(APPEND LIBUNBOUND_LIBRARIES "${CMAKE_THREAD_LIBS_INIT}") -- list(APPEND LIBUNBOUND_LIBRARIES "${OPENSSL_LIBRARIES}") -+include(FindPkgConfig) -+if(PKG_CONFIG_FOUND) -+ pkg_check_modules(PkgLibunbound IMPORTED_TARGET GLOBAL QUIET libunbound) - endif() - --if (LIBUNBOUND_INCLUDE_DIR AND LIBUNBOUND_LIBRARY) -- if (NOT TARGET Libunbound::Libunbound) -- add_library(Libunbound::Libunbound UNKNOWN IMPORTED) -- set_target_properties(Libunbound::Libunbound PROPERTIES -- INTERFACE_INCLUDE_DIRECTORIES "${LIBUNBOUND_INCLUDE_DIR}" -- IMPORTED_LINK_INTERFACE_LANGUAGES "C" -- IMPORTED_LOCATION "${LIBUNBOUND_LIBRARY}" -- ) -- -- if(UNIX AND TARGET Threads::Threads) -- set_property(TARGET Libunbound::Libunbound APPEND PROPERTY -- INTERFACE_LINK_LIBRARIES Threads::Threads) -- endif () -- if(UNIX AND TARGET OpenSSL::SSL) -- set_property(TARGET Libunbound::Libunbound APPEND PROPERTY -- INTERFACE_LINK_LIBRARIES OpenSSL::SSL) -+if(PkgLibunbound_FOUND) -+ set(LIBUNBOUND_INCLUDE_DIR ${PkgLibunbound_INCLUDE_DIRS}) -+ set(LIBUNBOUND_LIBRARIES ${PkgLibunbound_LIBRARIES}) -+ set(LIBUNBOUND_VERSION ${PkgLibunbound_VERSION}) -+ add_library(Libunbound::Libunbound ALIAS PkgConfig::PkgLibunbound) -+else() -+ find_path(LIBUNBOUND_INCLUDE_DIR unbound.h -+ HINTS -+ "${LIBUNBOUND_DIR}" -+ "${LIBUNBOUND_DIR}/include" -+ ) -+ -+ find_library(LIBUNBOUND_LIBRARY NAMES unbound -+ HINTS -+ "${LIBUNBOUND_DIR}" -+ "${LIBUNBOUND_DIR}/lib" -+ ) -+ -+ set(LIBUNBOUND_LIBRARIES "") -+ -+ if (UNIX) -+ find_package(Threads REQUIRED) -+ find_package(OpenSSL REQUIRED) -+ -+ list(APPEND LIBUNBOUND_LIBRARIES "${CMAKE_THREAD_LIBS_INIT}") -+ list(APPEND LIBUNBOUND_LIBRARIES "${OPENSSL_LIBRARIES}") -+ endif() -+ -+ if (LIBUNBOUND_INCLUDE_DIR AND LIBUNBOUND_LIBRARY) -+ if (NOT TARGET Libunbound::Libunbound) -+ add_library(Libunbound::Libunbound UNKNOWN IMPORTED) -+ set_target_properties(Libunbound::Libunbound PROPERTIES -+ INTERFACE_INCLUDE_DIRECTORIES "${LIBUNBOUND_INCLUDE_DIR}" -+ IMPORTED_LINK_INTERFACE_LANGUAGES "C" -+ IMPORTED_LOCATION "${LIBUNBOUND_LIBRARY}" -+ ) -+ -+ if(UNIX AND TARGET Threads::Threads) -+ set_property(TARGET Libunbound::Libunbound APPEND PROPERTY -+ INTERFACE_LINK_LIBRARIES Threads::Threads) -+ endif () -+ if(UNIX AND TARGET OpenSSL::SSL) -+ set_property(TARGET Libunbound::Libunbound APPEND PROPERTY -+ INTERFACE_LINK_LIBRARIES OpenSSL::SSL) -+ endif () -+ if(UNIX AND TARGET OpenSSL::Crypto) -+ set_property(TARGET Libunbound::Libunbound APPEND PROPERTY -+ INTERFACE_LINK_LIBRARIES OpenSSL::Crypto) -+ endif () - endif () -- if(UNIX AND TARGET OpenSSL::Crypto) -- set_property(TARGET Libunbound::Libunbound APPEND PROPERTY -- INTERFACE_LINK_LIBRARIES OpenSSL::Crypto) -+ -+ if (NOT LIBUNBOUND_VERSION AND LIBUNBOUND_INCLUDE_DIR AND EXISTS "${LIBUNBOUND_INCLUDE_DIR}/unbound.h") -+ file(STRINGS "${LIBUNBOUND_INCLUDE_DIR}/unbound.h" LIBUNBOUND_H REGEX "^#define UNBOUND_VERSION_M[A-Z]+") -+ string(REGEX REPLACE "^.*MAJOR ([0-9]+).*MINOR ([0-9]+).*MICRO ([0-9]+).*$" "\\1.\\2.\\3" LIBUNBOUND_VERSION "${LIBUNBOUND_H}") - endif () -- endif () -- -- if (NOT LIBUNBOUND_VERSION AND LIBUNBOUND_INCLUDE_DIR AND EXISTS "${LIBUNBOUND_INCLUDE_DIR}/unbound.h") -- file(STRINGS "${LIBUNBOUND_INCLUDE_DIR}/unbound.h" LIBUNBOUND_H REGEX "^#define UNBOUND_VERSION_M[A-Z]+") -- string(REGEX REPLACE "^.*MAJOR ([0-9]+).*MINOR ([0-9]+).*MICRO ([0-9]+).*$" "\\1.\\2.\\3" LIBUNBOUND_VERSION "${LIBUNBOUND_H}") -- endif () --endif() -- --list(APPEND LIBUNBOUND_LIBRARIES "${LIBUNBOUND_LIBRARY}") -+ endif() -+ -+ list(APPEND LIBUNBOUND_LIBRARIES "${LIBUNBOUND_LIBRARY}") -+endif - - include(FindPackageHandleStandardArgs) - find_package_handle_standard_args(Libunbound ---- cmake/modules/FindLibuv.cmake -+++ cmake/modules/FindLibuv.cmake -@@ -28,42 +28,54 @@ - - #]=======================================================================] - --find_path(LIBUV_INCLUDE_DIR uv.h -- HINTS -- "${LIBUV_DIR}" -- "${LIBUV_DIR}/include" --) -- --find_library(LIBUV_LIBRARY NAMES uv libuv -- HINTS -- "${LIBUV_DIR}" -- "${LIBUV_DIR}/lib" --) -- --set(LIBUV_LIBRARIES "") -- --if (LIBUV_INCLUDE_DIR AND LIBUV_LIBRARY) -- if (NOT TARGET Libuv::Libuv) -- add_library(Libuv::Libuv UNKNOWN IMPORTED) -- set_target_properties(Libuv::Libuv PROPERTIES -- INTERFACE_INCLUDE_DIRECTORIES "${LIBUV_INCLUDE_DIR}" -- IMPORTED_LINK_INTERFACE_LANGUAGES "C" -- IMPORTED_LOCATION "${LIBUV_LIBRARY}" -- ) -- endif () -+include(FindPkgConfig) -+if(PKG_CONFIG_FOUND) -+ pkg_check_modules(PkgLibuv IMPORTED_TARGET GLOBAL QUIET libuv) -+endif() - -- if (NOT LIBUV_VERSION AND LIBUV_INCLUDE_DIR) -- if (EXISTS "${LIBUV_INCLUDE_DIR}/uv-version.h") -- file(STRINGS "${LIBUV_INCLUDE_DIR}/uv-version.h" LIBUV_VER_H REGEX "^#define UV_VERSION_(MAJOR|MINOR|PATCH) ") -- elseif (EXISTS "${LIBUV_INCLUDE_DIR}/uv/version.h") -- file(STRINGS "${LIBUV_INCLUDE_DIR}/uv/version.h" LIBUV_VER_H REGEX "^#define UV_VERSION_(MAJOR|MINOR|PATCH) ") -+if(PkgLibuv_FOUND) -+ set(LIBUV_INCLUDE_DIR ${PkgLibuv_INCLUDE_DIRS}) -+ set(LIBUV_LIBRARIES ${PkgLibuv_LIBRARIES}) -+ set(LIBUV_VERSION ${PkgLibuv_VERSION}) -+ add_library(Libuv::Libuv ALIAS PkgConfig::PkgLibuv) -+else() -+ find_path(LIBUV_INCLUDE_DIR uv.h -+ HINTS -+ "${LIBUV_DIR}" -+ "${LIBUV_DIR}/include" -+ ) -+ -+ find_library(LIBUV_LIBRARY NAMES uv libuv -+ HINTS -+ "${LIBUV_DIR}" -+ "${LIBUV_DIR}/lib" -+ ) -+ -+ set(LIBUV_LIBRARIES "") -+ -+ if (LIBUV_INCLUDE_DIR AND LIBUV_LIBRARY) -+ if (NOT TARGET Libuv::Libuv) -+ add_library(Libuv::Libuv UNKNOWN IMPORTED) -+ set_target_properties(Libuv::Libuv PROPERTIES -+ INTERFACE_INCLUDE_DIRECTORIES "${LIBUV_INCLUDE_DIR}" -+ IMPORTED_LINK_INTERFACE_LANGUAGES "C" -+ IMPORTED_LOCATION "${LIBUV_LIBRARY}" -+ ) - endif () -- string(REGEX REPLACE "^.*_MAJOR ([0-9]+).*_MINOR ([0-9]+).*_PATCH ([0-9]+).*$" "\\1.\\2.\\3" LIBUV_VERSION "${LIBUV_VER_H}") -- endif () -+ -+ if (NOT LIBUV_VERSION AND LIBUV_INCLUDE_DIR) -+ if (EXISTS "${LIBUV_INCLUDE_DIR}/uv-version.h") -+ file(STRINGS "${LIBUV_INCLUDE_DIR}/uv-version.h" LIBUV_VER_H REGEX "^#define UV_VERSION_(MAJOR|MINOR|PATCH) ") -+ elseif (EXISTS "${LIBUV_INCLUDE_DIR}/uv/version.h") -+ file(STRINGS "${LIBUV_INCLUDE_DIR}/uv/version.h" LIBUV_VER_H REGEX "^#define UV_VERSION_(MAJOR|MINOR|PATCH) ") -+ endif () -+ string(REGEX REPLACE "^.*_MAJOR ([0-9]+).*_MINOR ([0-9]+).*_PATCH ([0-9]+).*$" "\\1.\\2.\\3" LIBUV_VERSION "${LIBUV_VER_H}") -+ endif () -+ endif() -+ -+ list(APPEND LIBUV_LIBRARIES "${LIBUV_LIBRARY}") - endif() - --list(APPEND LIBUV_LIBRARIES "${LIBUV_LIBRARY}") -- - include(FindPackageHandleStandardArgs) - find_package_handle_standard_args(Libuv - REQUIRED_VARS LIBUV_LIBRARIES LIBUV_INCLUDE_DIR ---- cmake/modules/FindNettle.cmake -+++ cmake/modules/FindNettle.cmake -@@ -30,62 +30,76 @@ - - #]=======================================================================] - --find_path(NETTLE_INCLUDE_DIR nettle/version.h -- HINTS -- "${NETTLE_DIR}" -- "${NETTLE_DIR}/include" --) -- --find_library(NETTLE_LIBRARY NAMES nettle libnettle -- HINTS -- "${NETTLE_DIR}" -- "${NETTLE_DIR}/lib" --) -- --find_library(HOGWEED_LIBRARY NAMES hogweed libhogweed -- HINTS -- "${NETTLE_DIR}" -- "${NETTLE_DIR}/lib" --) -- --set(NETTLE_LIBRARIES "") -- --# May need gmp library on Unix. --if (UNIX) -- find_library(NETTLE_GMP_LIBRARY gmp) -- -- if (NETTLE_GMP_LIBRARY) -- list(APPEND NETTLE_LIBRARIES "${NETTLE_GMP_LIBRARY}") -- endif () --endif () -- --if (NETTLE_INCLUDE_DIR AND NETTLE_LIBRARY AND HOGWEED_LIBRARY) -- if (NOT TARGET Nettle::Nettle) -- add_library(Nettle::Nettle UNKNOWN IMPORTED) -- set_target_properties(Nettle::Nettle PROPERTIES -- INTERFACE_INCLUDE_DIRECTORIES "${NETTLE_INCLUDE_DIR}" -- INTERFACE_LINK_LIBRARIES "${NETTLE_LIBRARIES}" -- IMPORTED_LINK_INTERFACE_LANGUAGES "C" -- IMPORTED_LOCATION "${NETTLE_LIBRARY}" -- ) -- endif () -- if (NOT TARGET Nettle::Hogweed) -- add_library(Nettle::Hogweed UNKNOWN IMPORTED) -- set_target_properties(Nettle::Hogweed PROPERTIES -- INTERFACE_INCLUDE_DIRECTORIES "${NETTLE_INCLUDE_DIR}" -- IMPORTED_LINK_INTERFACE_LANGUAGES "C" -- IMPORTED_LOCATION "${HOGWEED_LIBRARY}" -- ) -- endif () -+include(FindPkgConfig) -+if(PKG_CONFIG_FOUND) -+ pkg_check_modules(PkgNettle IMPORTED_TARGET GLOBAL nettle) -+ pkg_check_modules(PkgHogweed IMPORTED_TARGET GLOBAL QUIET hogweed) -+endif() - -- if (NOT NETTLE_VERSION AND NETTLE_INCLUDE_DIR) -- file(STRINGS "${NETTLE_INCLUDE_DIR}/nettle/version.h" NETTLE_VER_H REGEX "^#define NETTLE_VERSION_(MAJOR|MINOR) ") -- string(REGEX REPLACE "^.*_MAJOR ([0-9]+).*_MINOR ([0-9]+).*$" "\\1.\\2" NETTLE_VERSION "${NETTLE_VER_H}") -+if(PkgNettle_FOUND AND PkHogweed_FOUND) -+ set(NETTLE_INCLUDE_DIR ${PkgNettle_INCLUDE_DIRS} ${PkgHogweed_INCLUDE_DIRS}) -+ set(NETTLE_LIBRARIES ${PkgNettle_LIBRARIES} ${PkgHogweed_LIBRARIES}) -+ set(NETTLE_VERSION ${PkgNettle_VERSION}) -+ add_library(Nettle::Nettle ALIAS PkgConfig::PkgNettle) -+ add_library(Nettle::Hogweed ALIAS PkgConfig::PkgHogweed) -+else() -+ find_path(NETTLE_INCLUDE_DIR nettle/version.h -+ HINTS -+ "${NETTLE_DIR}" -+ "${NETTLE_DIR}/include" -+ ) -+ -+ find_library(NETTLE_LIBRARY NAMES nettle libnettle -+ HINTS -+ "${NETTLE_DIR}" -+ "${NETTLE_DIR}/lib" -+ ) -+ -+ find_library(HOGWEED_LIBRARY NAMES hogweed libhogweed -+ HINTS -+ "${NETTLE_DIR}" -+ "${NETTLE_DIR}/lib" -+ ) -+ -+ set(NETTLE_LIBRARIES "") -+ -+ # May need gmp library on Unix. -+ if (UNIX) -+ find_library(NETTLE_GMP_LIBRARY gmp) -+ -+ if (NETTLE_GMP_LIBRARY) -+ list(APPEND NETTLE_LIBRARIES "${NETTLE_GMP_LIBRARY}") -+ endif () - endif () -+ -+ if (NETTLE_INCLUDE_DIR AND NETTLE_LIBRARY AND HOGWEED_LIBRARY) -+ if (NOT TARGET Nettle::Nettle) -+ add_library(Nettle::Nettle UNKNOWN IMPORTED) -+ set_target_properties(Nettle::Nettle PROPERTIES -+ INTERFACE_INCLUDE_DIRECTORIES "${NETTLE_INCLUDE_DIR}" -+ INTERFACE_LINK_LIBRARIES "${NETTLE_LIBRARIES}" -+ IMPORTED_LINK_INTERFACE_LANGUAGES "C" -+ IMPORTED_LOCATION "${NETTLE_LIBRARY}" -+ ) -+ endif () -+ if (NOT TARGET Nettle::Hogweed) -+ add_library(Nettle::Hogweed UNKNOWN IMPORTED) -+ set_target_properties(Nettle::Hogweed PROPERTIES -+ INTERFACE_INCLUDE_DIRECTORIES "${NETTLE_INCLUDE_DIR}" -+ IMPORTED_LINK_INTERFACE_LANGUAGES "C" -+ IMPORTED_LOCATION "${HOGWEED_LIBRARY}" -+ ) -+ endif () -+ -+ if (NOT NETTLE_VERSION AND NETTLE_INCLUDE_DIR) -+ file(STRINGS "${NETTLE_INCLUDE_DIR}/nettle/version.h" NETTLE_VER_H REGEX "^#define NETTLE_VERSION_(MAJOR|MINOR) ") -+ string(REGEX REPLACE "^.*_MAJOR ([0-9]+).*_MINOR ([0-9]+).*$" "\\1.\\2" NETTLE_VERSION "${NETTLE_VER_H}") -+ endif () -+ endif() -+ -+ list(APPEND NETTLE_LIBRARIES "${NETTLE_LIBRARY}" "${HOGWEED_LIBRARY}") - endif() - --list(APPEND NETTLE_LIBRARIES "${NETTLE_LIBRARY}" "${HOGWEED_LIBRARY}") -- - include(FindPackageHandleStandardArgs) - find_package_handle_standard_args(Nettle - REQUIRED_VARS NETTLE_LIBRARIES NETTLE_INCLUDE_DIR diff --git a/recipes/getdns/all/patches/1.6.0-0004-dont-install-symlinked-license.patch b/recipes/getdns/all/patches/1.6.0-0004-dont-install-symlinked-license.patch deleted file mode 100644 index fadb8d2d20e5f..0000000000000 --- a/recipes/getdns/all/patches/1.6.0-0004-dont-install-symlinked-license.patch +++ /dev/null @@ -1,16 +0,0 @@ -Avoids weird issue on c3i Windows builders: - - CMake Error at source_subfolder/cmake_install.cmake:104 (file): - file INSTALL cannot read symlink - "C:/J/w/cci_PR-2903@2/.conan/data/getdns/1.6.0/_/_/build/dd6d0e14f162a68e24ee52fee674d130eac57dea/source_subfolder/COPYING" - to duplicate at - "C:/J/w/cci_PR-2903@2/.conan/data/getdns/1.6.0/_/_/package/dd6d0e14f162a68e24ee52fee674d130eac57dea/share/doc/getdns/COPYING": - File exists. - Call Stack (most recent call first): - - ---- CMakeLists.txt -+++ CMakeLists.txt -@@ -1080,1 +1080,1 @@ --install(FILES AUTHORS ChangeLog COPYING LICENSE NEWS README.md DESTINATION ${docdir}) -+install(FILES AUTHORS ChangeLog NEWS README.md DESTINATION ${docdir}) diff --git a/recipes/getdns/all/patches/1.7.3-fix-windows-build.patch b/recipes/getdns/all/patches/1.7.3-fix-windows-build.patch new file mode 100644 index 0000000000000..dc0f91e105f96 --- /dev/null +++ b/recipes/getdns/all/patches/1.7.3-fix-windows-build.patch @@ -0,0 +1,121 @@ +From bfd53d3cc3afbf199fa27f74bf4b35c1ad955c2e Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Rados=C5=82aw=20Szkodzi=C5=84ski?= +Date: Tue, 3 Jan 2023 14:14:07 +0100 +Subject: [PATCH] Fix Windows build + +Fixes all found instances of missing APIs and headers on Windows. +--- + src/anchor.c | 12 ++++++++++++ + src/compat/mkstemp.c | 6 +++--- + src/gldns/parse.c | 2 +- + src/gldns/parseutil.c | 2 ++ + src/stub.c | 5 +++++ + 5 files changed, 23 insertions(+), 4 deletions(-) + +diff --git a/src/anchor.c b/src/anchor.c +index f50c4a3d1..fc357b649 100644 +--- a/src/anchor.c ++++ b/src/anchor.c +@@ -551,7 +551,11 @@ static void tas_rinse(getdns_context *context, tas_connection *a) + GETDNS_CLEAR_EVENT(a->loop, &a->event); + a->event.ev = NULL; + if (a->fd >= 0) ++#ifdef USE_WINSOCK ++ closesocket(a->fd); ++#else + close(a->fd); ++#endif + a->fd = -1; + if (a->xml.data) + GETDNS_FREE(context->mf, a->xml.data); +@@ -662,7 +666,11 @@ static void tas_reconnect_cb(void *userarg) + , "Waiting for second document timeout. Reconnecting...\n"); + + GETDNS_CLEAR_EVENT(a->loop, &a->event); ++#ifdef USE_WINSOCK ++ closesocket(a->fd); ++#else + close(a->fd); ++#endif + a->fd = -1; + if (a->state == TAS_READ_PS7_HDR) { + a->state = TAS_RETRY; +@@ -778,7 +786,11 @@ static void tas_read_cb(void *userarg) + if (n == 0) { + DEBUG_ANCHOR("Connection closed\n"); + GETDNS_CLEAR_EVENT(a->loop, &a->event); ++#ifdef USE_WINSOCK ++ closesocket(a->fd); ++#else + close(a->fd); ++#endif + a->fd = -1; + if (a->state == TAS_READ_PS7_HDR) { + a->state = TAS_RETRY; +diff --git a/src/compat/mkstemp.c b/src/compat/mkstemp.c +index 49d3e919a..86d1dfd67 100644 +--- a/src/compat/mkstemp.c ++++ b/src/compat/mkstemp.c +@@ -30,14 +30,14 @@ + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +-#include +-#include + #include ++#include + #include ++#include + + int mkstemp(char *template) + { + if (_mktemp_s(template, strlen(template) + 1) != 0) + return -1; +- return open(template, _O_CREAT | _O_EXCL | _O_RDWR, _S_IWRITE | _S_IREAD); ++ return _open(template, _O_CREAT | _O_EXCL | _O_RDWR, _S_IWRITE | _S_IREAD); + } +diff --git a/src/gldns/parse.c b/src/gldns/parse.c +index 367fa80f3..c107c0df9 100644 +--- a/src/gldns/parse.c ++++ b/src/gldns/parse.c +@@ -13,7 +13,7 @@ + #include "gldns/gbuffer.h" + + #include +-#include ++#include + + gldns_lookup_table gldns_directive_types[] = { + { GLDNS_DIR_TTL, "$TTL" }, +diff --git a/src/gldns/parseutil.c b/src/gldns/parseutil.c +index 293496a90..1e4367898 100644 +--- a/src/gldns/parseutil.c ++++ b/src/gldns/parseutil.c +@@ -14,7 +14,9 @@ + + #include "config.h" + #include "gldns/parseutil.h" ++#ifdef HAVE_SYS_TIME_H + #include ++#endif + #include + #include + +diff --git a/src/stub.c b/src/stub.c +index ee3193126..ab393885d 100644 +--- a/src/stub.c ++++ b/src/stub.c +@@ -903,8 +903,13 @@ stub_tcp_write(int fd, getdns_tcp_state *tcp, getdns_network_req *netreq) + just fall back to a 'normal' write. */ + if (written == -1 + && _getdns_socketerror() == _getdns_EISCONN) ++#ifdef USE_WINSOCK ++ written = send(fd, (const char *)(netreq->query - 2) ++ , pkt_len + 2, 0); ++#else + written = write(fd, netreq->query - 2 + , pkt_len + 2); ++#endif + } else + written = send(fd, (const char *)(netreq->query - 2) + , pkt_len + 2, 0); diff --git a/recipes/getdns/all/test_package/CMakeLists.txt b/recipes/getdns/all/test_package/CMakeLists.txt index 3a403dc404b41..e78d760c7b17a 100644 --- a/recipes/getdns/all/test_package/CMakeLists.txt +++ b/recipes/getdns/all/test_package/CMakeLists.txt @@ -1,8 +1,7 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.15) project(test_package C) -include("${CMAKE_BINARY_DIR}/conanbuildinfo.cmake") -conan_basic_setup() +find_package(getdns REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.c) -target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS}) +target_link_libraries(${PROJECT_NAME} PRIVATE getdns::getdns) diff --git a/recipes/getdns/all/test_package/conanfile.py b/recipes/getdns/all/test_package/conanfile.py index bd7165a553cf4..ef5d7042163ec 100644 --- a/recipes/getdns/all/test_package/conanfile.py +++ b/recipes/getdns/all/test_package/conanfile.py @@ -1,10 +1,19 @@ -from conans import ConanFile, CMake, tools +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake import os class TestPackageConan(ConanFile): - settings = "os", "compiler", "build_type", "arch" - generators = "cmake" + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) def build(self): cmake = CMake(self) @@ -12,6 +21,6 @@ def build(self): cmake.build() def test(self): - if not tools.cross_building(self.settings): - bin_path = os.path.join("bin", "test_package") - self.run(bin_path, run_environment=True) + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/getdns/all/test_package/test_package.c b/recipes/getdns/all/test_package/test_package.c index c55c14f559026..b60140d92b44b 100644 --- a/recipes/getdns/all/test_package/test_package.c +++ b/recipes/getdns/all/test_package/test_package.c @@ -1,26 +1,10 @@ #include "getdns.h" -#include #include -#define CHECK(V) if ((V) != GETDNS_RETURN_GOOD) { \ - fprintf(stderr, "Fail: " #V "!\n"); \ - return 1; \ -} - -int main() -{ - getdns_context *context; - CHECK(getdns_context_create(&context, 1)); - getdns_dict *info = getdns_context_get_api_information(context); - if (info == NULL) { - fprintf(stderr, "Could not get api information\n"); - return 1; - } - char *txt = getdns_pretty_print_dict(info); - printf("%s\n", txt); - free(txt); - getdns_dict_destroy(info); +int main() { + getdns_context *context = NULL; + getdns_context_create(&context, 0); getdns_context_destroy(context); - return 0; + return EXIT_SUCCESS; } diff --git a/recipes/getdns/all/test_v1_package/CMakeLists.txt b/recipes/getdns/all/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..91630d79f4abb --- /dev/null +++ b/recipes/getdns/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/getdns/all/test_v1_package/conanfile.py b/recipes/getdns/all/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..7e2dfe859bb27 --- /dev/null +++ b/recipes/getdns/all/test_v1_package/conanfile.py @@ -0,0 +1,17 @@ +from conans import ConanFile, CMake, tools +import os + + +class TestPackageConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake", "cmake_find_package_multi" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if not tools.cross_building(self.settings): + bin_path = os.path.join("bin", "test_package") + self.run(bin_path, run_environment=True) diff --git a/recipes/getdns/config.yml b/recipes/getdns/config.yml index 10acb3ad5b1e8..e14fae48c780f 100644 --- a/recipes/getdns/config.yml +++ b/recipes/getdns/config.yml @@ -1,3 +1,3 @@ versions: - "1.6.0": + "1.7.3": folder: "all" diff --git a/recipes/gettext/all/conandata.yml b/recipes/gettext/all/conandata.yml index 71a50d966129d..cc749fa1165fe 100644 --- a/recipes/gettext/all/conandata.yml +++ b/recipes/gettext/all/conandata.yml @@ -24,6 +24,9 @@ patches: patch_description: "apply the __atribute_noreturn__ to print_and_abort" patch_source: "https://github.com/coreutils/gnulib/commit/0cc39712803ade7b2d4b89c36b143dad72404063" patch_type: "conan" + - patch_file: "patches/0.21-include-stdlib_h.patch" + patch_description: "include stdlib.h for newer gcc" + patch_type: "portability" "0.20.1": - patch_file: "patches/0.20.1-0001-fix-build-errors-with-MSVC.patch" - patch_file: "patches/0.20.1-0003-Reported-by-Gabor-Z.-Papp-gzp-papp.hu.patch" diff --git a/recipes/gettext/all/conanfile.py b/recipes/gettext/all/conanfile.py index 90ff82b6775b1..03a7b60fc24c2 100644 --- a/recipes/gettext/all/conanfile.py +++ b/recipes/gettext/all/conanfile.py @@ -91,6 +91,13 @@ def generate(self): 'ac_cv_func_memset=yes' ]) + # Skip checking for the 'n' printf format directly + # in msvc, as it is known to not be available due to security concerns. + # Skipping it avoids a GUI prompt during ./configure for a debug build + # See https://github.com/conan-io/conan-center-index/issues/23698] + if self.settings.build_type == "Debug": + tc.configure_args.extend(['gl_cv_func_printf_directive_n=no']) + # The flag above `--with-libiconv-prefix` fails to correctly detect libiconv on windows+msvc # so it needs an extra nudge. We could use `AutotoolsDeps` but it's currently affected by the # following outstanding issue: https://github.com/conan-io/conan/issues/12784 diff --git a/recipes/gettext/all/patches/0.21-include-stdlib_h.patch b/recipes/gettext/all/patches/0.21-include-stdlib_h.patch new file mode 100644 index 0000000000000..721436bc3f295 --- /dev/null +++ b/recipes/gettext/all/patches/0.21-include-stdlib_h.patch @@ -0,0 +1,12 @@ +diff --git a/gettext-tools/src/locating-rule.c b/gettext-tools/src/locating-rule.c +index 15faee1..66ec48a 100644 +--- a/gettext-tools/src/locating-rule.c ++++ b/gettext-tools/src/locating-rule.c +@@ -47,6 +47,7 @@ + #include + #include + #include "xalloc.h" ++#include + + #define _(str) gettext (str) + diff --git a/recipes/ginkgo/all/conandata.yml b/recipes/ginkgo/all/conandata.yml index 8927c006e472b..471710d33e7c9 100644 --- a/recipes/ginkgo/all/conandata.yml +++ b/recipes/ginkgo/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.8.0": + url: "https://github.com/ginkgo-project/ginkgo/archive/v1.8.0.tar.gz" + sha256: "421efaed1be2ef11d230b79fc68bcf7e264a2c57ae52aff6dec7bd90f8d4ae30" "1.7.0": url: "https://github.com/ginkgo-project/ginkgo/archive/v1.7.0.tar.gz" sha256: "f4b362bcb046bc53fbe2e578662b939222d0c44b96449101829e73ecce02bcb3" diff --git a/recipes/ginkgo/all/conanfile.py b/recipes/ginkgo/all/conanfile.py index 89bbd2a608d1e..9eb411b3e5186 100644 --- a/recipes/ginkgo/all/conanfile.py +++ b/recipes/ginkgo/all/conanfile.py @@ -2,7 +2,13 @@ from conan.errors import ConanInvalidConfiguration from conan.tools.build import check_min_cppstd from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout -from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rmdir +from conan.tools.files import ( + apply_conandata_patches, + copy, + export_conandata_patches, + get, + rmdir, +) from conan.tools.microsoft import is_msvc, is_msvc_static_runtime from conan.tools.scm import Version import os @@ -43,7 +49,7 @@ def _min_cppstd(self): def _minimum_compilers_version(self): return { "Visual Studio": "16", - "msvc": "192", + "msvc": "193", "gcc": "5.4", "clang": "3.9", "apple-clang": "10.0", @@ -126,7 +132,12 @@ def build(self): cmake.build() def package(self): - copy(self, "LICENSE", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) + copy( + self, + "LICENSE", + src=self.source_folder, + dst=os.path.join(self.package_folder, "licenses"), + ) cmake = CMake(self) cmake.install() rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) @@ -139,56 +150,85 @@ def package_info(self): debug_suffix = "d" if self.settings.build_type == "Debug" else "" has_dpcpp_device = Version(self.version) >= "1.4.0" + # Shared MSVC builds ues a separate library for part of Ginkgo since 1.8.0 + has_config_library = Version(self.version) >= "1.8.0" and self.options.shared and self.settings.os == "Windows" - self.cpp_info.components["ginkgo_core"].set_property("cmake_target_name", "Ginkgo::ginkgo") - self.cpp_info.components["ginkgo_core"].set_property("pkg_config_name", "ginkgo") - self.cpp_info.components["ginkgo_core"].libs = [ - "ginkgo" + debug_suffix] + self.cpp_info.components["ginkgo_core"].set_property( + "cmake_target_name", "Ginkgo::ginkgo" + ) + self.cpp_info.components["ginkgo_core"].set_property( + "pkg_config_name", "ginkgo" + ) + self.cpp_info.components["ginkgo_core"].libs = ["ginkgo" + debug_suffix] self.cpp_info.components["ginkgo_core"].requires = [ - "ginkgo_omp", "ginkgo_cuda", "ginkgo_reference", "ginkgo_hip" + "ginkgo_omp", + "ginkgo_cuda", + "ginkgo_reference", + "ginkgo_hip", ] - self.cpp_info.components["ginkgo_cuda"].set_property("cmake_target_name", "Ginkgo::ginkgo_cuda") - self.cpp_info.components["ginkgo_cuda"].libs = [ - "ginkgo_cuda" + debug_suffix] + self.cpp_info.components["ginkgo_cuda"].set_property( + "cmake_target_name", "Ginkgo::ginkgo_cuda" + ) + self.cpp_info.components["ginkgo_cuda"].libs = ["ginkgo_cuda" + debug_suffix] self.cpp_info.components["ginkgo_cuda"].requires = ["ginkgo_hip"] - self.cpp_info.components["ginkgo_omp"].set_property("cmake_target_name", "Ginkgo::ginkgo_omp") - self.cpp_info.components["ginkgo_omp"].libs = [ - "ginkgo_omp" + debug_suffix] - self.cpp_info.components["ginkgo_omp"].requires = [ - "ginkgo_cuda", "ginkgo_hip"] + self.cpp_info.components["ginkgo_omp"].set_property( + "cmake_target_name", "Ginkgo::ginkgo_omp" + ) + self.cpp_info.components["ginkgo_omp"].libs = ["ginkgo_omp" + debug_suffix] + self.cpp_info.components["ginkgo_omp"].requires = ["ginkgo_cuda", "ginkgo_hip"] - self.cpp_info.components["ginkgo_hip"].set_property("cmake_target_name", "Ginkgo::ginkgo_hip") - self.cpp_info.components["ginkgo_hip"].libs = [ - "ginkgo_hip" + debug_suffix] + self.cpp_info.components["ginkgo_hip"].set_property( + "cmake_target_name", "Ginkgo::ginkgo_hip" + ) + self.cpp_info.components["ginkgo_hip"].libs = ["ginkgo_hip" + debug_suffix] - self.cpp_info.components["ginkgo_reference"].set_property("cmake_target_name", "Ginkgo::ginkgo_reference") + self.cpp_info.components["ginkgo_reference"].set_property( + "cmake_target_name", "Ginkgo::ginkgo_reference" + ) self.cpp_info.components["ginkgo_reference"].libs = [ - "ginkgo_reference" + debug_suffix] + "ginkgo_reference" + debug_suffix + ] - if has_dpcpp_device: # Always add these components + if has_dpcpp_device: # Always add these components # See https://github.com/conan-io/conan-center-index/pull/7044#discussion_r698181588 self.cpp_info.components["ginkgo_core"].requires += ["ginkgo_dpcpp"] self.cpp_info.components["ginkgo_core"].requires += ["ginkgo_device"] - self.cpp_info.components["ginkgo_dpcpp"].set_property("cmake_target_name", "Ginkgo::ginkgo_dpcpp") + self.cpp_info.components["ginkgo_dpcpp"].set_property( + "cmake_target_name", "Ginkgo::ginkgo_dpcpp" + ) self.cpp_info.components["ginkgo_dpcpp"].libs = [ - "ginkgo_dpcpp" + debug_suffix] + "ginkgo_dpcpp" + debug_suffix + ] - self.cpp_info.components["ginkgo_device"].set_property("cmake_target_name", "Ginkgo::ginkgo_device") + self.cpp_info.components["ginkgo_device"].set_property( + "cmake_target_name", "Ginkgo::ginkgo_device" + ) self.cpp_info.components["ginkgo_device"].libs = [ - "ginkgo_device" + debug_suffix] + "ginkgo_device" + debug_suffix + ] self.cpp_info.components["ginkgo_omp"].requires += [ - "ginkgo_dpcpp", "ginkgo_device"] + "ginkgo_dpcpp", + "ginkgo_device", + ] self.cpp_info.components["ginkgo_reference"].requires += ["ginkgo_device"] self.cpp_info.components["ginkgo_hip"].requires += ["ginkgo_device"] self.cpp_info.components["ginkgo_cuda"].requires += ["ginkgo_device"] self.cpp_info.components["ginkgo_dpcpp"].requires += ["ginkgo_device"] + + if has_config_library: + self.cpp_info.components["ginkgo_core"].requires += ["ginkgo_config"] + + self.cpp_info.components["ginkgo_config"].set_property("cmake_target_name", "Ginkgo::ginkgo_core") + self.cpp_info.components["ginkgo_config"].libs = ["ginkgo_core" + debug_suffix] # TODO: to remove in conan v2 once cmake_find_package* generators removed self.cpp_info.names["cmake_find_package"] = "Ginkgo" self.cpp_info.names["cmake_find_package_multi"] = "Ginkgo" self.cpp_info.components["ginkgo_core"].names["cmake_find_package"] = "ginkgo" - self.cpp_info.components["ginkgo_core"].names["cmake_find_package_multi"] = "ginkgo" + self.cpp_info.components["ginkgo_core"].names[ + "cmake_find_package_multi" + ] = "ginkgo" diff --git a/recipes/ginkgo/config.yml b/recipes/ginkgo/config.yml index 4283c517286f9..ae16141456580 100644 --- a/recipes/ginkgo/config.yml +++ b/recipes/ginkgo/config.yml @@ -1,4 +1,6 @@ versions: + "1.8.0": + folder: all "1.7.0": folder: all "1.4.0": diff --git a/recipes/glaze/all/conandata.yml b/recipes/glaze/all/conandata.yml index 3e64f60544255..1893cded5a8bb 100644 --- a/recipes/glaze/all/conandata.yml +++ b/recipes/glaze/all/conandata.yml @@ -1,47 +1,34 @@ sources: - "2.4.0": - url: "https://github.com/stephenberry/glaze/archive/v2.4.0.tar.gz" - sha256: "be8cfb94c0b4b13c0a1fc846e2c112614d2dda02a49977fcdeea544876b3625b" - "2.3.2": - url: "https://github.com/stephenberry/glaze/archive/v2.3.2.tar.gz" - sha256: "360c1eab71afb69d59cc0f0e180d6b214653950340ac267a464a18c81dac585a" - "2.3.1": - url: "https://github.com/stephenberry/glaze/archive/v2.3.1.tar.gz" - sha256: "941bf3f8cea5b6a024895d37dceaaaa82071a9178af63e9935a1d9fd80caa451" - "2.3.0": - url: "https://github.com/stephenberry/glaze/archive/v2.3.0.tar.gz" - sha256: "9963761337941f4709458155a045ce4ab5dc5edf5e60dca8cc290200fce8330e" - "2.2.1": - url: "https://github.com/stephenberry/glaze/archive/v2.2.1.tar.gz" - sha256: "ef0eb30a038c623ca100696e773ba1c9888719ed02c46e9fabf6238ee07026bb" - "2.1.9": - url: "https://github.com/stephenberry/glaze/archive/v2.1.9.tar.gz" - sha256: "678126f068e3c21c2b3d2e1ae914c72296b68610a004cf542ea050946ab06416" - "2.1.7": - url: "https://github.com/stephenberry/glaze/archive/v2.1.7.tar.gz" - sha256: "e110bfc6494ca3a0616beaec214e61a53d4e0bd1489d8f1a45ca6f87594a3502" - # Keep 2.1.6 for now as 2.1.7 had some breaking changes - "2.1.6": - url: "https://github.com/stephenberry/glaze/archive/v2.1.6.tar.gz" - sha256: "5ae31b1a48a5b54b84e115a12195341bfbe39f03f92bb3bcad074f984380f72d" - "2.1.4": - url: "https://github.com/stephenberry/glaze/archive/v2.1.4.tar.gz" - sha256: "cbaba4dfbaaf342c8be8e6834cb79933b080ac89f3aa1470bc7a83197d9ebc1a" - "2.1.0": - url: "https://github.com/stephenberry/glaze/archive/v2.1.0.tar.gz" - sha256: "b3bb4d886f17d266f37a6eec2c42b2e57e287918b20511297c4eb6b9960f0f8f" - "2.0.9": - url: "https://github.com/stephenberry/glaze/archive/v2.0.9.tar.gz" - sha256: "c1ffede3db5c74d2c46a3abe576985dc729c95df1b48ab575079427b55488bbd" - "2.0.7": - url: "https://github.com/stephenberry/glaze/archive/v2.0.7.tar.gz" - sha256: "1bf981e72733fb5a02a91c9642d91fa39e4a1ebe42f81e8fc6a016c11ed762cb" - "2.0.6": - url: "https://github.com/stephenberry/glaze/archive/v2.0.6.tar.gz" - sha256: "aa5d4921382e9781998ebbf6d36964556daa3367a2aef5ca814122502b450abc" - "1.9.9": - url: "https://github.com/stephenberry/glaze/archive/v1.9.9.tar.gz" - sha256: "7e2605046742a89ec455887a5a0d6b3188ed5c14ea309c5eb9814848c26bedca" - "1.8.5": - url: "https://github.com/stephenberry/glaze/archive/v1.8.5.tar.gz" - sha256: "5d876eed5689f1947ea4eafd9f13a4e0b527611a6b1857c79a5d598a856287b4" + "3.6.1": + url: "https://github.com/stephenberry/glaze/archive/v3.6.1.tar.gz" + sha256: "70324ad952adee32d6bbf95a0983f0c1623ce61bd237aa28c8337af2d8bb9ed5" + # keep 3.4.3 for breaking change: API(naming) change + "3.4.3": + url: "https://github.com/stephenberry/glaze/archive/v3.4.3.tar.gz" + sha256: "2af1ecc9fbdcb8182d5633979a12b950f6728dd0d76f02affa1e11b1a3369314" + "3.4.1": + url: "https://github.com/stephenberry/glaze/archive/v3.4.1.tar.gz" + sha256: "73a38c4d7731714581061a918b33ad57cf38404abc68d9a58dbe57d56fe26a79" + "3.3.4": + url: "https://github.com/stephenberry/glaze/archive/v3.3.4.tar.gz" + sha256: "7fe31c14e7ede69d937aa8f126894fef11ebf3156f25cb95446d3d6d38e9da9c" + "3.3.2": + url: "https://github.com/stephenberry/glaze/archive/v3.3.2.tar.gz" + sha256: "e492d3f662c3c096ce7abac86780af6c84f74c4f19b29223ad92fccc054aafad" + "3.3.1": + url: "https://github.com/stephenberry/glaze/archive/v3.3.1.tar.gz" + sha256: "edb16f7b75bf9a7c86a704c006a9859474e1d49467f8ddeabdc8c3a3d5a982a2" + "3.1.9": + url: "https://github.com/stephenberry/glaze/archive/v3.1.9.tar.gz" + sha256: "adfce5acc9d3d88525c006a525e8f21d2a4bb628b5f7022720625f052d88a73d" + "3.1.7": + url: "https://github.com/stephenberry/glaze/archive/v3.1.7.tar.gz" + sha256: "388483bb3dfa1fe25c1dfec24f0afd1651e0303833cfa1b7f51020a2569e992a" + # keep 2.9.5 for c++20 compilers + "2.9.5": + url: "https://github.com/stephenberry/glaze/archive/v2.9.5.tar.gz" + sha256: "67fda0fb0cc701451c261bb1e0c94d63bafaaba13390527521e02a034eff085e" + # keep 2.8.4 for breaking change: pure reflection support for C style arrays + "2.8.4": + url: "https://github.com/stephenberry/glaze/archive/v2.8.4.tar.gz" + sha256: "6ca8e63783f0a1dbe69f50c0bc289134301ecf930ada83489b9715cdd2a49252" diff --git a/recipes/glaze/all/conanfile.py b/recipes/glaze/all/conanfile.py index b7b6a8eb1447b..e353497cda64e 100644 --- a/recipes/glaze/all/conanfile.py +++ b/recipes/glaze/all/conanfile.py @@ -4,6 +4,7 @@ from conan.tools.build import check_min_cppstd from conan.tools.scm import Version from conan.tools.layout import basic_layout +from conan.tools.microsoft import is_msvc import os required_conan_version = ">=1.51.1" @@ -21,21 +22,26 @@ class GlazeConan(ConanFile): @property def _min_cppstd(self): - return 20 + return "20" if Version(self.version) < "3.0.0" else "23" @property def _compilers_minimum_version(self): - versions = { - "Visual Studio": "17", - "msvc": "193", - "gcc": "10", - # glaze >= 2.1.6 uses std::bit_cast which is supported by clang >= 14 - "clang": "12" if Version(self.version) < "2.1.6" else "14", - "apple-clang": "13.1", - } - if Version(self.version) >= "1.9.0": - versions["gcc"] = "11" - return versions + return { + "20": { + "Visual Studio": "17", + "msvc": "193", + "gcc": "11" if Version(self.version) < "2.6.3" else "12", + "clang": "14", + "apple-clang": "13.1", + }, + "23": { + "Visual Studio": "17", + "msvc": "193", + "gcc": "12", + "clang": "15", + "apple-clang": "14", + }, + }.get(self._min_cppstd, {}) def layout(self): basic_layout(self, src_folder="src") @@ -44,12 +50,6 @@ def package_id(self): self.info.clear() def validate(self): - if Version(self.version) >= "2.1.4" and \ - self.settings.compiler == "gcc" and Version(self.settings.compiler.version) < "11.3": - raise ConanInvalidConfiguration( - f"{self.ref} doesn't support 11.0<=gcc<11.3 due to gcc bug. Please use gcc>=11.3 and set compiler.version.(ex. compiler.version=11.3)", - ) - if self.settings.compiler.get_safe("cppstd"): check_min_cppstd(self, self._min_cppstd) minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) @@ -73,3 +73,5 @@ def package(self): def package_info(self): self.cpp_info.bindirs = [] self.cpp_info.libdirs = [] + if is_msvc(self): + self.cpp_info.cxxflags.append("/Zc:preprocessor") diff --git a/recipes/glaze/all/test_package/CMakeLists.txt b/recipes/glaze/all/test_package/CMakeLists.txt index 4811c5114c3c2..fc973c8b2b019 100644 --- a/recipes/glaze/all/test_package/CMakeLists.txt +++ b/recipes/glaze/all/test_package/CMakeLists.txt @@ -1,8 +1,12 @@ -cmake_minimum_required(VERSION 3.12) +cmake_minimum_required(VERSION 3.20) project(test_package LANGUAGES CXX) find_package(glaze REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) target_link_libraries(${PROJECT_NAME} PRIVATE glaze::glaze) -target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_20) +if(glaze_VERSION VERSION_GREATER_EQUAL "3.0.0") + target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_23) +else() + target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_20) +endif() diff --git a/recipes/glaze/all/test_package/conanfile.py b/recipes/glaze/all/test_package/conanfile.py index a9fb96656f203..9fd1075c52a6b 100644 --- a/recipes/glaze/all/test_package/conanfile.py +++ b/recipes/glaze/all/test_package/conanfile.py @@ -15,6 +15,9 @@ def requirements(self): def layout(self): cmake_layout(self) + def build_requirements(self): + self.tool_requires("cmake/[>=3.20 <4]") + def build(self): cmake = CMake(self) cmake.configure() diff --git a/recipes/glaze/config.yml b/recipes/glaze/config.yml index bd5802e146152..5f6482f919b84 100644 --- a/recipes/glaze/config.yml +++ b/recipes/glaze/config.yml @@ -1,31 +1,21 @@ versions: - "2.4.0": + "3.6.1": folder: all - "2.3.2": + "3.4.3": folder: all - "2.3.1": + "3.4.1": folder: all - "2.3.0": + "3.3.4": folder: all - "2.2.1": + "3.3.2": folder: all - "2.1.9": + "3.3.1": folder: all - "2.1.7": + "3.1.9": folder: all - "2.1.6": + "3.1.7": folder: all - "2.1.4": + "2.9.5": folder: all - "2.1.0": - folder: all - "2.0.9": - folder: all - "2.0.7": - folder: all - "2.0.6": - folder: all - "1.9.9": - folder: all - "1.8.5": + "2.8.4": folder: all diff --git a/recipes/glfw/all/conanfile.py b/recipes/glfw/all/conanfile.py index 90b0cfaeecdac..697fe1ae7b2fe 100644 --- a/recipes/glfw/all/conanfile.py +++ b/recipes/glfw/all/conanfile.py @@ -123,10 +123,8 @@ def generate(self): else: # Manually generate pkgconfig file of wayland-protocols since # PkgConfigDeps.build_context_activated can't work with legacy 1 profile - # We must use legacy conan v1 deps_cpp_info because self.dependencies doesn't - # contain build requirements when using 1 profile. - wp_prefix = self.deps_cpp_info["wayland-protocols"].rootpath - wp_version = self.deps_cpp_info["wayland-protocols"].version + wp_prefix = self.dependencies.build["wayland-protocols"].package_folder + wp_version = self.dependencies.build["wayland-protocols"].ref.version wp_pkg_content = textwrap.dedent(f"""\ prefix={wp_prefix} datarootdir=${{prefix}}/res @@ -217,6 +215,29 @@ def package_info(self): "CoreServices", "Foundation", "IOKit", ]) + self.cpp_info.requires = ["opengl::opengl"] + if self.options.vulkan_static: + self.cpp_info.requires.append("vulkan-loader::vulkan-loader") + if self.settings.os in ["Linux", "FreeBSD"]: + if self.options.get_safe("with_x11", True): + # https://github.com/glfw/glfw/blob/3.4/src/CMakeLists.txt#L181-L218 + # https://github.com/glfw/glfw/blob/3.3.2/CMakeLists.txt#L196-L233 + self.cpp_info.requires.extend([ + "xorg::x11", # Also includes Xkb and Xshape + "xorg::xrandr", + "xorg::xinerama", + "xorg::xcursor", + "xorg::xi", + ]) + if self.options.get_safe("with_wayland"): + # https://github.com/glfw/glfw/blob/3.4/src/CMakeLists.txt#L163-L167 + self.cpp_info.requires.extend([ + "wayland::wayland-client", + "wayland::wayland-cursor", + "wayland::wayland-egl", + "xkbcommon::xkbcommon" + ]) + # backward support of cmake_find_package, cmake_find_package_multi & pkg_config generators self.cpp_info.filenames["cmake_find_package"] = "glfw3" self.cpp_info.filenames["cmake_find_package_multi"] = "glfw3" diff --git a/recipes/gli/all/conanfile.py b/recipes/gli/all/conanfile.py index 0cb3644185589..95708d6bbe9df 100644 --- a/recipes/gli/all/conanfile.py +++ b/recipes/gli/all/conanfile.py @@ -38,7 +38,7 @@ def layout(self): basic_layout(self, src_folder="src") def requirements(self): - self.requires("glm/cci.20230113") + self.requires("glm/1.0.1") def package_id(self): self.info.clear() diff --git a/recipes/glib/all/conandata.yml b/recipes/glib/all/conandata.yml index 826e4f114106f..9723a1277a5c1 100644 --- a/recipes/glib/all/conandata.yml +++ b/recipes/glib/all/conandata.yml @@ -1,39 +1,33 @@ sources: + "2.81.0": + url: "https://download.gnome.org/sources/glib/2.81/glib-2.81.0.tar.xz" + sha256: "1665188ed9cc941c0a189dc6295e6859872523d1bfc84a5a84732a7ae87b02e4" "2.78.3": url: "https://download.gnome.org/sources/glib/2.78/glib-2.78.3.tar.xz" sha256: "609801dd373796e515972bf95fc0b2daa44545481ee2f465c4f204d224b2bc21" - "2.78.1": - url: "https://download.gnome.org/sources/glib/2.78/glib-2.78.1.tar.xz" - sha256: "915bc3d0f8507d650ead3832e2f8fb670fce59aac4d7754a7dab6f1e6fed78b2" - "2.78.0": - url: "https://download.gnome.org/sources/glib/2.78/glib-2.78.0.tar.xz" - sha256: "44eaab8b720877ce303c5540b657b126f12dc94972d9880b52959f43fb537b30" "2.77.3": url: "https://download.gnome.org/sources/glib/2.77/glib-2.77.3.tar.xz" sha256: "1753f963bb680b28a83d6e2095f63d0d4b94244675bcd2603850b2ebc1ac6a61" - "2.77.2": - url: "https://download.gnome.org/sources/glib/2.77/glib-2.77.2.tar.xz" - sha256: "16279739e4d30ec47be3e82909f5aeaaa41a8206bae3bead10a23fb2deff02a6" - "2.77.1": - url: "https://download.gnome.org/sources/glib/2.77/glib-2.77.1.tar.xz" - sha256: "dce8d0c9e916d8c81a64436bd4ee4d6515a52dd3d157c994e1cdb9b3d6300a03" - "2.77.0": - url: "https://download.gnome.org/sources/glib/2.77/glib-2.77.0.tar.xz" - sha256: "1897fd8ad4ebb523c32fabe7508c3b0b039c089661ae1e7917df0956a320ac4d" "2.76.3": url: "https://download.gnome.org/sources/glib/2.76/glib-2.76.3.tar.xz" sha256: "c0be444e403d7c3184d1f394f89f0b644710b5e9331b54fa4e8b5037813ad32a" - "2.75.3": - url: "https://download.gnome.org/sources/glib/2.75/glib-2.75.3.tar.xz" - sha256: "7c517d0aff456c35a039bce8a8df7a08ce95a8285b09d1849f8865f633f7f871" patches: + "2.81.0": + - patch_file: "patches/dont-use-python-packaging-2.81.0.patch" + patch_type: bugfix + patch_description: replace package.version.Version by internal code + patch_source: https://gitlab.gnome.org/GNOME/glib/-/merge_requests/3352 + "2.78.3": + - patch_file: "patches/remove-distutils-2.77.0.patch" + patch_type: bugfix + patch_description: remove distutils + patch_source: https://gitlab.gnome.org/GNOME/glib/-/merge_requests/4133 "2.76.3": - patch_file: "patches/libintl-discovery.patch" patch_type: bugfix patch_description: fix libintl discovery patch_source: https://gitlab.gnome.org/GNOME/glib/-/merge_requests/3352 - "2.75.3": - - patch_file: "patches/libintl-discovery-2.75.3.patch" + - patch_file: "patches/remove-distutils.patch" patch_type: bugfix - patch_description: fix libintl discovery - patch_source: https://gitlab.gnome.org/GNOME/glib/-/merge_requests/3352 + patch_description: remove distutils + patch_source: https://gitlab.gnome.org/GNOME/glib/-/merge_requests/4133 diff --git a/recipes/glib/all/conanfile.py b/recipes/glib/all/conanfile.py index 6ccdcc81fb42a..491dcc7587018 100644 --- a/recipes/glib/all/conanfile.py +++ b/recipes/glib/all/conanfile.py @@ -54,6 +54,9 @@ def config_options(self): if is_msvc(self): del self.options.with_elf + if self.settings.os == "Neutrino": + del self.options.with_elf + def configure(self): if self.options.shared: self.options.rm_safe("fPIC") @@ -72,7 +75,7 @@ def requirements(self): if self.options.get_safe("with_mount"): self.requires("libmount/2.39") if self.options.get_safe("with_selinux"): - self.requires("libselinux/3.5") + self.requires("libselinux/3.6") if self.settings.os != "Linux": # for Linux, gettext is provided by libc self.requires("libgettext/0.22", transitive_headers=True, transitive_libs=True) @@ -81,7 +84,7 @@ def requirements(self): self.requires("libiconv/1.17") def build_requirements(self): - self.tool_requires("meson/1.2.2") + self.tool_requires("meson/[>=1.2.3 <2]") if not self.conf.get("tools.gnu:pkg_config", check_type=str): self.tool_requires("pkgconf/2.0.3") @@ -97,10 +100,16 @@ def generate(self): tc.project_options["selinux"] = "enabled" if self.options.get_safe("with_selinux") else "disabled" tc.project_options["libmount"] = "enabled" if self.options.get_safe("with_mount") else "disabled" - if self.settings.os == "FreeBSD": + if self.settings.os == "FreeBSD" or self.settings.os == "Neutrino": tc.project_options["xattr"] = "false" tc.project_options["tests"] = "false" tc.project_options["libelf"] = "enabled" if self.options.get_safe("with_elf") else "disabled" + + if self.settings.os == "Neutrino": + tc.cross_build["host"]["system"] = "qnx" + tc.c_link_args.append("-lm") + tc.c_link_args.append("-lsocket") + tc.generate() def _patch_sources(self): @@ -110,7 +119,7 @@ def _patch_sources(self): "subdir('fuzzing')", "#subdir('fuzzing')", ) # https://gitlab.gnome.org/GNOME/glib/-/issues/2152 - if self.settings.os != "Linux": + if self.settings.os != "Linux" and self.settings.os != "Neutrino": # allow to find gettext replace_in_file(self, os.path.join(self.source_folder, "meson.build"), @@ -197,6 +206,15 @@ def package_info(self): self.cpp_info.components["gthread-2.0"].system_libs.append("pthread") self.cpp_info.components["gio-2.0"].system_libs.append("dl") + if self.settings.os == "Neutrino": + self.cpp_info.components["gmodule-export-2.0"].sharedlinkflags.append("-Wl,--export-dynamic") + self.cpp_info.components["gmodule-2.0"].sharedlinkflags.append("-Wl,--export-dynamic") + self.cpp_info.components["glib-2.0"].system_libs.append("m") + self.cpp_info.components["glib-2.0"].system_libs.append("socket") + self.cpp_info.components["gmodule-no-export-2.0"].system_libs.append("c") + self.cpp_info.components["gio-2.0"].system_libs.append("c") + self.cpp_info.components["gio-2.0"].system_libs.append("socket") + if self.settings.os == "Windows": self.cpp_info.components["glib-2.0"].system_libs += ["ws2_32", "ole32", "shell32", "user32", "advapi32"] self.cpp_info.components["gio-2.0"].system_libs.extend(["iphlpapi", "dnsapi", "shlwapi"]) diff --git a/recipes/glib/all/patches/dont-use-python-packaging-2.81.0.patch b/recipes/glib/all/patches/dont-use-python-packaging-2.81.0.patch new file mode 100644 index 0000000000000..a97c9a79ae133 --- /dev/null +++ b/recipes/glib/all/patches/dont-use-python-packaging-2.81.0.patch @@ -0,0 +1,148 @@ +diff --git a/gio/gdbus-2.0/codegen/gdbus-codegen.in b/gio/gdbus-2.0/codegen/gdbus-codegen.in +index 9c409e6..1913b6d 100755 +--- a/gio/gdbus-2.0/codegen/gdbus-codegen.in ++++ b/gio/gdbus-2.0/codegen/gdbus-codegen.in +@@ -1,4 +1,4 @@ +-#!@PYTHON@ ++#!/usr/bin/env @PYTHON@ + + # GDBus - GLib D-Bus Library + # +diff --git a/gio/gdbus-2.0/codegen/meson.build b/gio/gdbus-2.0/codegen/meson.build +index 67ea9f2..2ee1fc8 100644 +--- a/gio/gdbus-2.0/codegen/meson.build ++++ b/gio/gdbus-2.0/codegen/meson.build +@@ -31,7 +31,7 @@ gdbus_codegen_conf = configuration_data() + gdbus_codegen_conf.set('VERSION', glib_version) + gdbus_codegen_conf.set('MAJOR_VERSION', major_version) + gdbus_codegen_conf.set('MINOR_VERSION', minor_version) +-gdbus_codegen_conf.set('PYTHON', python.full_path()) ++gdbus_codegen_conf.set('PYTHON', python_name) + gdbus_codegen_conf.set('DATADIR', glib_datadir) + + # Install gdbus-codegen executable +diff --git a/gio/gdbus-2.0/codegen/utils.py b/gio/gdbus-2.0/codegen/utils.py +index 6399945..86024d7 100644 +--- a/gio/gdbus-2.0/codegen/utils.py ++++ b/gio/gdbus-2.0/codegen/utils.py +@@ -21,10 +21,9 @@ + # + # Author: David Zeuthen + +-import packaging.version + import os + import sys +- ++import re + + # pylint: disable=too-few-public-methods + class Color: +@@ -161,11 +160,35 @@ def lookup_brief_docs(annotations): + def version_cmp_key(key): + # If the 'since' version is 'UNRELEASED', compare higher than anything else + # If it is empty put a 0 in its place as this will +- # allow LooseVersion to work and will always compare lower. ++ # allow _parse_version() to work and will always compare lower. + if key[0] == "UNRELEASED": + v = "9999" + elif key[0]: + v = str(key[0]) + else: + v = "0" +- return (packaging.version.Version(v), key[1]) ++ return (_parse_version(v), key[1]) ++ ++ ++def _parse_version(version): ++ """ ++ Parse a version string into a list of integers and strings. ++ ++ This function takes a version string and breaks it down into its component parts. ++ It separates numeric and non-numeric segments, converting numeric segments to integers. ++ ++ Args: ++ version (str): The version string to parse. ++ ++ Returns: ++ list: A list where each element is either an integer (for numeric parts) ++ or a string (for non-numeric parts). ++ ++ Example: ++ >>> parseversion("1.2.3a") ++ [1, 2, 3, 'a'] ++ >>> parseversion("2.0.0-rc1") ++ [2, 0, 0, 'rc1'] ++ """ ++ blocks = re.findall(r"(\d+|\w+)", version) ++ return [int(b) if b.isdigit() else b for b in blocks] +diff --git a/glib/gtester-report.in b/glib/gtester-report.in +index 0745d53..b8291d2 100644 +--- a/glib/gtester-report.in ++++ b/glib/gtester-report.in +@@ -1,4 +1,4 @@ +-#!@PYTHON@ ++#! /usr/bin/env @PYTHON@ + # GLib Testing Framework Utility -*- Mode: python; -*- + # Copyright (C) 2007 Imendio AB + # Authors: Tim Janik +diff --git a/glib/meson.build b/glib/meson.build +index b2dd569..5c29bb7 100644 +--- a/glib/meson.build ++++ b/glib/meson.build +@@ -502,7 +502,7 @@ endif + + report_conf = configuration_data() + report_conf.set('GLIB_VERSION', glib_version) +-report_conf.set('PYTHON', python.full_path()) ++report_conf.set('PYTHON', python_name) + configure_file( + input: 'gtester-report.in', + output: 'gtester-report', +diff --git a/gobject/glib-genmarshal.in b/gobject/glib-genmarshal.in +index 0578b74..aa5af43 100755 +--- a/gobject/glib-genmarshal.in ++++ b/gobject/glib-genmarshal.in +@@ -1,4 +1,4 @@ +-#!@PYTHON@ ++#!/usr/bin/env @PYTHON@ + + # pylint: disable=too-many-lines, missing-docstring, invalid-name + +diff --git a/gobject/glib-mkenums.in b/gobject/glib-mkenums.in +index 7e794e9..e10b910 100755 +--- a/gobject/glib-mkenums.in ++++ b/gobject/glib-mkenums.in +@@ -1,4 +1,4 @@ +-#!@PYTHON@ ++#!/usr/bin/env @PYTHON@ + + # If the code below looks horrible and unpythonic, do not panic. + # +diff --git a/gobject/meson.build b/gobject/meson.build +index 78b732b..2129aaf 100644 +--- a/gobject/meson.build ++++ b/gobject/meson.build +@@ -87,7 +87,7 @@ python_tools = [ + + python_tools_conf = configuration_data() + python_tools_conf.set('VERSION', glib_version) +-python_tools_conf.set('PYTHON', python.full_path()) ++python_tools_conf.set('PYTHON', python_name) + + foreach tool: python_tools + tool_bin = configure_file( +diff --git a/meson.build b/meson.build +index bcc2887..6cca73d 100644 +--- a/meson.build ++++ b/meson.build +@@ -2457,7 +2457,9 @@ endif + + glib_conf.set('HAVE_PROC_SELF_CMDLINE', have_proc_self_cmdline) + +-python = import('python').find_installation(modules: ['packaging']) ++python = import('python').find_installation() ++# used for '#!/usr/bin/env ' ++python_name = 'python3' + + python_version = python.language_version() + python_version_req = '>=3.7' diff --git a/recipes/glib/all/patches/libintl-discovery-2.75.3.patch b/recipes/glib/all/patches/libintl-discovery-2.75.3.patch deleted file mode 100644 index 0df94096d0615..0000000000000 --- a/recipes/glib/all/patches/libintl-discovery-2.75.3.patch +++ /dev/null @@ -1,49 +0,0 @@ -From 32249a22fc39319651e7c23442d37ec837f05764 Mon Sep 17 00:00:00 2001 -From: Nirbheek Chauhan -Date: Thu, 8 Sep 2022 02:36:33 +0530 -Subject: [PATCH] meson: Fix detection of a system-provided proxy-libintl - -proxy-libintl defines ngettext() as a define in the header that points -to the actual symbol in the library which is g_libintl_ngettext(). -Same with bind_textdomain_codeset(). ---- - meson.build | 7 ++++--- - 1 file changed, 4 insertions(+), 3 deletions(-) - -diff --git a/meson.build b/meson.build -index 0cbc9689f5..de0bee5a39 100644 ---- a/meson.build -+++ b/meson.build -@@ -2088,6 +2088,7 @@ libz_dep = dependency('zlib') - # FIXME: glib-gettext.m4 has much more checks to detect broken/uncompatible - # implementations. This could be extended if issues are found in some platforms. - libintl_deps = [] -+libintl_prefix = '#include ' - libintl = dependency('intl', required: false, allow_fallback: false) - if libintl.found() - # libintl supports different threading APIs, which may not -@@ -2099,11 +2100,11 @@ if libintl.found() - # - # Meson's builtin dependency lookup as of 0.60.0 doesn't check for - # pthread, so we do this manually here. -- if cc.has_function('ngettext', dependencies : libintl) -+ if cc.has_function('ngettext', dependencies : libintl, prefix: libintl_prefix) - libintl_deps += [libintl] - else - libintl_pthread = cc.find_library('pthread', required : false) -- if libintl_pthread.found() and cc.has_function('ngettext', dependencies : [libintl, libintl_pthread]) -+ if libintl_pthread.found() and cc.has_function('ngettext', dependencies : [libintl, libintl_pthread], prefix: libintl_prefix) - libintl_deps += [libintl, libintl_pthread] - else - libintl = disabler() -@@ -2112,7 +2113,7 @@ if libintl.found() - endif - - if libintl.found() -- have_bind_textdomain_codeset = cc.has_function('bind_textdomain_codeset', dependencies: libintl_deps) -+ have_bind_textdomain_codeset = cc.has_function('bind_textdomain_codeset', dependencies: libintl_deps, prefix: libintl_prefix) - else - libintl = dependency('intl', allow_fallback: true) - assert(libintl.type_name() == 'internal') --- -GitLab diff --git a/recipes/glib/all/patches/remove-distutils-2.77.0.patch b/recipes/glib/all/patches/remove-distutils-2.77.0.patch new file mode 100644 index 0000000000000..ba054b959ca4f --- /dev/null +++ b/recipes/glib/all/patches/remove-distutils-2.77.0.patch @@ -0,0 +1,51 @@ +diff --git a/gio/gdbus-2.0/codegen/utils.py b/gio/gdbus-2.0/codegen/utils.py +index 0204610..f8d758c 100644 +--- a/gio/gdbus-2.0/codegen/utils.py ++++ b/gio/gdbus-2.0/codegen/utils.py +@@ -19,7 +19,7 @@ + # + # Author: David Zeuthen + +-import distutils.version ++import re + import os + import sys + +@@ -159,11 +159,35 @@ def lookup_brief_docs(annotations): + def version_cmp_key(key): + # If the 'since' version is 'UNRELEASED', compare higher than anything else + # If it is empty put a 0 in its place as this will +- # allow LooseVersion to work and will always compare lower. ++ # allow _parse_version() to work and will always compare lower. + if key[0] == "UNRELEASED": + v = "9999" + elif key[0]: + v = str(key[0]) + else: + v = "0" +- return (distutils.version.LooseVersion(v), key[1]) ++ return (_parse_version(v), key[1]) ++ ++ ++def _parse_version(version): ++ """ ++ Parse a version string into a list of integers and strings. ++ ++ This function takes a version string and breaks it down into its component parts. ++ It separates numeric and non-numeric segments, converting numeric segments to integers. ++ ++ Args: ++ version (str): The version string to parse. ++ ++ Returns: ++ list: A list where each element is either an integer (for numeric parts) ++ or a string (for non-numeric parts). ++ ++ Example: ++ >>> parseversion("1.2.3a") ++ [1, 2, 3, 'a'] ++ >>> parseversion("2.0.0-rc1") ++ [2, 0, 0, 'rc1'] ++ """ ++ blocks = re.findall(r"(\d+|\w+)", version) ++ return [int(b) if b.isdigit() else b for b in blocks] diff --git a/recipes/glib/all/patches/remove-distutils.patch b/recipes/glib/all/patches/remove-distutils.patch new file mode 100644 index 0000000000000..3096261030b0d --- /dev/null +++ b/recipes/glib/all/patches/remove-distutils.patch @@ -0,0 +1,51 @@ +diff --git a/gio/gdbus-2.0/codegen/utils.py b/gio/gdbus-2.0/codegen/utils.py +index 95559d3..2b7a176 100644 +--- a/gio/gdbus-2.0/codegen/utils.py ++++ b/gio/gdbus-2.0/codegen/utils.py +@@ -19,7 +19,7 @@ + # + # Author: David Zeuthen + +-import distutils.version ++import re + import os + import sys + +@@ -155,11 +155,35 @@ def lookup_brief_docs(annotations): + def version_cmp_key(key): + # If the 'since' version is 'UNRELEASED', compare higher than anything else + # If it is empty put a 0 in its place as this will +- # allow LooseVersion to work and will always compare lower. ++ # allow _parse_version() to work and will always compare lower. + if key[0] == "UNRELEASED": + v = "9999" + elif key[0]: + v = str(key[0]) + else: + v = "0" +- return (distutils.version.LooseVersion(v), key[1]) ++ return (_parse_version(v), key[1]) ++ ++ ++def _parse_version(version): ++ """ ++ Parse a version string into a list of integers and strings. ++ ++ This function takes a version string and breaks it down into its component parts. ++ It separates numeric and non-numeric segments, converting numeric segments to integers. ++ ++ Args: ++ version (str): The version string to parse. ++ ++ Returns: ++ list: A list where each element is either an integer (for numeric parts) ++ or a string (for non-numeric parts). ++ ++ Example: ++ >>> parseversion("1.2.3a") ++ [1, 2, 3, 'a'] ++ >>> parseversion("2.0.0-rc1") ++ [2, 0, 0, 'rc1'] ++ """ ++ blocks = re.findall(r"(\d+|\w+)", version) ++ return [int(b) if b.isdigit() else b for b in blocks] diff --git a/recipes/glib/all/test_package/CMakeLists.txt b/recipes/glib/all/test_package/CMakeLists.txt index 44f2423e0f831..c2e2b58b04658 100644 --- a/recipes/glib/all/test_package/CMakeLists.txt +++ b/recipes/glib/all/test_package/CMakeLists.txt @@ -1,17 +1,7 @@ -cmake_minimum_required(VERSION 3.6) +cmake_minimum_required(VERSION 3.15) project(test_package LANGUAGES C) -add_executable(${PROJECT_NAME} test_package.c) +find_package(glib CONFIG REQUIRED) -if (CMAKE_SYSTEM_NAME STREQUAL "Windows") - find_package(glib CONFIG REQUIRED) - target_link_libraries(${PROJECT_NAME} PRIVATE glib::glib-2.0 glib::gio-2.0 glib::gmodule-2.0 glib::gobject-2.0 glib::gthread-2.0) -else() - find_package(PkgConfig REQUIRED) - pkg_check_modules(glib-2.0 REQUIRED IMPORTED_TARGET glib-2.0) - pkg_check_modules(gio-2.0 REQUIRED IMPORTED_TARGET gio-2.0) - pkg_check_modules(gmodule-2.0 REQUIRED IMPORTED_TARGET gmodule-2.0) - pkg_check_modules(gobject-2.0 REQUIRED IMPORTED_TARGET gobject-2.0) - pkg_check_modules(gthread-2.0 REQUIRED IMPORTED_TARGET gthread-2.0) - target_link_libraries(${PROJECT_NAME} PRIVATE PkgConfig::glib-2.0 PkgConfig::gio-2.0 PkgConfig::gmodule-2.0 PkgConfig::gobject-2.0 PkgConfig::gthread-2.0) -endif() +add_executable(${PROJECT_NAME} test_package.c) +target_link_libraries(${PROJECT_NAME} PRIVATE glib::glib-2.0 glib::gio-2.0 glib::gmodule-2.0 glib::gobject-2.0 glib::gthread-2.0) diff --git a/recipes/glib/all/test_package/conanfile.py b/recipes/glib/all/test_package/conanfile.py index 168cdc2e86991..686967e0621b8 100644 --- a/recipes/glib/all/test_package/conanfile.py +++ b/recipes/glib/all/test_package/conanfile.py @@ -1,47 +1,19 @@ from conan import ConanFile from conan.tools.build import can_run -from conan.tools.cmake import cmake_layout, CMake, CMakeDeps, CMakeToolchain -from conan.tools.env import Environment, VirtualBuildEnv, VirtualRunEnv -from conan.tools.gnu import PkgConfig, PkgConfigDeps +from conan.tools.cmake import cmake_layout, CMake import os class TestPackageConan(ConanFile): settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualBuildEnv", "VirtualRunEnv" test_type = "explicit" def layout(self): cmake_layout(self) def requirements(self): - self.requires(self.tested_reference_str) - - def build_requirements(self): - if self.settings.os != "Windows" and not self.conf.get("tools.gnu:pkg_config", default=False, check_type=str): - self.tool_requires("pkgconf/2.0.3") - - def generate(self): - tc = CMakeToolchain(self) - tc.generate() - virtual_run_env = VirtualRunEnv(self) - virtual_run_env.generate() - - if self.settings.os == "Macos": - env = Environment() - # Avoid conflicts with system libiconv - # see: https://github.com/conan-io/conan-center-index/pull/17610#issuecomment-1552921286 - env.define_path("DYLD_FALLBACK_LIBRARY_PATH", "$DYLD_LIBRARY_PATH") - env.define_path("DYLD_LIBRARY_PATH", "") - env.vars(self, scope="run").save_script("conanrun_macos_runtimepath") - - if self.settings.os == "Windows": - deps = CMakeDeps(self) - deps.generate() - else: - virtual_build_env = VirtualBuildEnv(self) - virtual_build_env.generate() - pkg_config_deps = PkgConfigDeps(self) - pkg_config_deps.generate() + self.requires(self.tested_reference_str, run=True) def build(self): cmake = CMake(self) @@ -52,8 +24,5 @@ def test(self): if can_run(self): bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") self.run(bin_path, env="conanrun") - if self.settings.os != "Windows": - pkg_config = PkgConfig(self, "gio-2.0", pkg_config_path=self.generators_folder) - gdbus_codegen = pkg_config.variables["gdbus_codegen"] - self.run(f"{gdbus_codegen} -h", env="conanrun") + self.run("gdbus-codegen -h", env="conanrun") diff --git a/recipes/glib/all/test_v1_package/CMakeLists.txt b/recipes/glib/all/test_v1_package/CMakeLists.txt index 0d20897301b68..b21cc49efde95 100644 --- a/recipes/glib/all/test_v1_package/CMakeLists.txt +++ b/recipes/glib/all/test_v1_package/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.15) project(test_package) include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) diff --git a/recipes/glib/all/test_v1_package/conanfile.py b/recipes/glib/all/test_v1_package/conanfile.py index 3247118701674..18cf513b30696 100644 --- a/recipes/glib/all/test_v1_package/conanfile.py +++ b/recipes/glib/all/test_v1_package/conanfile.py @@ -4,24 +4,16 @@ class TestPackageConan(ConanFile): settings = "os", "arch", "compiler", "build_type" - generators = "cmake", "cmake_find_package_multi", "pkg_config" - - def build_requirements(self): - if self.settings.os != "Windows": - self.tool_requires("pkgconf/2.0.3") + generators = "cmake", "cmake_find_package_multi" def build(self): - if self.settings.os != "Windows": - with tools.environment_append({'PKG_CONFIG_PATH': "."}): - pkg_config = tools.PkgConfig("gio-2.0") - self.run(f"{pkg_config.variables['gdbus_codegen']} -h", run_environment=True) - - with tools.environment_append({'PKG_CONFIG_PATH': "."}): - cmake = CMake(self) - cmake.configure() - cmake.build() + cmake = CMake(self) + cmake.configure() + cmake.build() def test(self): if not tools.cross_building(self): bin_path = os.path.join("bin", "test_package") self.run(bin_path, run_environment=True) + if self.settings.os != "Windows": + self.run("gdbus-codegen -h", env="conanrun") diff --git a/recipes/glib/config.yml b/recipes/glib/config.yml index f0bd1289c0ca6..178cce999a640 100644 --- a/recipes/glib/config.yml +++ b/recipes/glib/config.yml @@ -1,19 +1,9 @@ versions: - "2.78.3": - folder: all - "2.78.1": + "2.81.0": folder: all - "2.78.0": + "2.78.3": folder: all "2.77.3": folder: all - "2.77.2": - folder: all - "2.77.1": - folder: all - "2.77.0": - folder: all "2.76.3": folder: all - "2.75.3": - folder: all diff --git a/recipes/glibmm/all/conandata.yml b/recipes/glibmm/all/conandata.yml index 171a01a50da60..830679f3678f2 100644 --- a/recipes/glibmm/all/conandata.yml +++ b/recipes/glibmm/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.78.1": + url: "https://download.gnome.org/sources/glibmm/2.78/glibmm-2.78.1.tar.xz" + sha256: "f473f2975d26c3409e112ed11ed36406fb3843fa975df575c22d4cb843085f61" "2.75.0": url: "https://download.gnome.org/sources/glibmm/2.75/glibmm-2.75.0.tar.xz" sha256: "60bb12e66488aa8ce41f0eb2f3612f89f5ddc887e3e4d45498524bf60b266b3d" @@ -8,26 +11,3 @@ sources: "2.66.4": url: "https://download.gnome.org/sources/glibmm/2.66/glibmm-2.66.4.tar.xz" sha256: "199ace5682d81b15a1d565480b4a950682f2db6402c8aa5dd7217d71edff81d5" - -patches: - "2.75.0": - - patch_file: "patches/enable_static_libs_2_75_0.patch" - patch_type: portability - patch_description: enable static library build for msvc - - patch_file: "patches/fix_initialization_order_fiasco_2_75_0.patch" - patch_type: bugfix - patch_description: fix initialization order for static library - "2.72.1": - - patch_file: "patches/enable_static_libs_2_72_1.patch" - patch_type: portability - patch_description: enable static library build for msvc - - patch_file: "patches/fix_initialization_order_fiasco_2_72_1.patch" - patch_type: bugfix - patch_description: fix initialization order for static library - "2.66.4": - - patch_file: "patches/enable_static_libs_2_66_4.patch" - patch_type: portability - patch_description: enable static library build for msvc - - patch_file: "patches/fix_initialization_order_fiasco_2_66_4.patch" - patch_type: bugfix - patch_description: fix initialization order for static library diff --git a/recipes/glibmm/all/conanfile.py b/recipes/glibmm/all/conanfile.py index a6d3f4c904bd4..d36d4666df42d 100644 --- a/recipes/glibmm/all/conanfile.py +++ b/recipes/glibmm/all/conanfile.py @@ -1,22 +1,13 @@ -import os import glob +import os import shutil -from conan import ConanFile, conan_version +from conan import ConanFile from conan.errors import ConanInvalidConfiguration from conan.tools.apple import fix_apple_shared_install_name from conan.tools.build import check_min_cppstd from conan.tools.env import VirtualBuildEnv -from conan.tools.files import ( - apply_conandata_patches, - copy, - export_conandata_patches, - get, - replace_in_file, - rename, - rm, - rmdir -) +from conan.tools.files import copy, get, replace_in_file, rm, rmdir from conan.tools.gnu import PkgConfigDeps from conan.tools.layout import basic_layout from conan.tools.meson import Meson, MesonToolchain @@ -33,16 +24,8 @@ class GlibmmConan(ConanFile): url = "https://github.com/conan-io/conan-center-index" description = "glibmm is a C++ API for parts of glib that are useful for C++." topics = ("giomm",) - package_type = "library" + package_type = "shared-library" settings = "os", "arch", "compiler", "build_type" - options = { - "shared": [True, False], - "fPIC": [True, False], - } - default_options = { - "shared": False, - "fPIC": True, - } short_paths = True @property @@ -57,25 +40,14 @@ def _glibmm_lib(self): def _giomm_lib(self): return f"giomm-{self._abi_version}" - def export_sources(self): - export_conandata_patches(self) - - def config_options(self): - if self.settings.os == "Windows": - del self.options.fPIC - def configure(self): - if self.options.shared: - self.options.rm_safe("fPIC") - if self.options.shared: - wildcard = "" if Version(conan_version) < "2.0.0" else "/*" - self.options[f"glib{wildcard}"].shared = True + self.options["glib"].shared = True def layout(self): basic_layout(self, src_folder="src") def requirements(self): - self.requires("glib/2.78.0", transitive_headers=True) + self.requires("glib/2.78.3", transitive_headers=True) if self._abi_version == "2.68": self.requires("libsigcpp/3.0.7", transitive_headers=True) else: @@ -83,12 +55,12 @@ def requirements(self): def validate(self): if self.settings.compiler.get_safe("cppstd"): - if self._abi_version == "2.68": + if Version(self._abi_version) >= "2.68": check_min_cppstd(self, 17) else: check_min_cppstd(self, 11) - if self.options.shared and not self.dependencies["glib"].options.shared: + if not self.dependencies["glib"].options.shared: raise ConanInvalidConfiguration( "Linking a shared library against static glib can cause unexpected behaviour." ) @@ -97,9 +69,9 @@ def validate(self): raise ConanInvalidConfiguration("Linking shared glib with the MSVC static runtime is not supported") def build_requirements(self): - self.tool_requires("meson/1.2.2") + self.tool_requires("meson/1.3.2") if not self.conf.get("tools.gnu:pkg_config", check_type=str): - self.tool_requires("pkgconf/2.0.3") + self.tool_requires("pkgconf/2.1.0") def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) @@ -120,22 +92,9 @@ def generate(self): tc.generate() def _patch_sources(self): - apply_conandata_patches(self) meson_build = os.path.join(self.source_folder, "meson.build") replace_in_file(self, meson_build, "subdir('tests')", "") if is_msvc(self): - # GLiBMM_GEN_EXTRA_DEFS_STATIC is not defined anywhere and is not - # used anywhere except here - # when building a static build !defined(GLiBMM_GEN_EXTRA_DEFS_STATIC) - # evaluates to 0 - if not self.options.shared: - replace_in_file(self, - os.path.join(self.source_folder, "tools", - "extra_defs_gen", "generate_extra_defs.h"), - "#if defined (_MSC_VER) && !defined (GLIBMM_GEN_EXTRA_DEFS_STATIC)", - "#if 0", - ) - # when using cpp_std=c++NM the /permissive- flag is added which # attempts enforcing standard conformant c++ code # the problem is that older versions of Windows SDK is not standard @@ -150,15 +109,6 @@ def build(self): meson.build() def package(self): - def rename_msvc_static_libs(): - lib_folder = os.path.join(self.package_folder, "lib") - rename(self, os.path.join(lib_folder, f"libglibmm-{self._abi_version}.a"), - os.path.join(lib_folder, f"{self._glibmm_lib}.lib")) - rename(self, os.path.join(lib_folder, f"libgiomm-{self._abi_version}.a"), - os.path.join(lib_folder, f"{self._giomm_lib}.lib")) - rename(self, os.path.join(lib_folder, f"libglibmm_generate_extra_defs-{self._abi_version}.a"), - os.path.join(lib_folder, f"glibmm_generate_extra_defs-{self._abi_version}.lib")) - meson = Meson(self) meson.install() @@ -166,8 +116,6 @@ def rename_msvc_static_libs(): if is_msvc(self): rm(self, "*.pdb", os.path.join(self.package_folder, "bin")) - if not self.options.shared: - rename_msvc_static_libs() for directory in [self._glibmm_lib, self._giomm_lib]: directory_path = os.path.join(self.package_folder, "lib", directory, "include", "*.h") diff --git a/recipes/glibmm/all/patches/enable_static_libs_2_66_4.patch b/recipes/glibmm/all/patches/enable_static_libs_2_66_4.patch deleted file mode 100644 index c94b5200949f7..0000000000000 --- a/recipes/glibmm/all/patches/enable_static_libs_2_66_4.patch +++ /dev/null @@ -1,32 +0,0 @@ -diff --git a/glib/glibmmconfig.h.meson b/glib/glibmmconfig.h.meson -index e50dcccf..19e64a46 100644 ---- a/glib/glibmmconfig.h.meson -+++ b/glib/glibmmconfig.h.meson -@@ -47,7 +47,9 @@ - # if defined(_MSC_VER) - # define GLIBMM_MSC 1 - # define GLIBMM_WIN32 1 --# define GLIBMM_DLL 1 -+# ifndef GLIBMM_STATIC_LIB -+# define GLIBMM_DLL 1 -+# endif - # elif defined(__CYGWIN__) - # define GLIBMM_CONFIGURE 1 - # elif defined(__MINGW32__) -diff --git a/glib/meson.build b/glib/meson.build -index 4feee0fd..9382645a 100644 ---- a/glib/meson.build -+++ b/glib/meson.build -@@ -36,12 +36,6 @@ pkg_conf_data.set('MSVC_TOOLSET_VER', msvc14x_toolset_ver) - - library_build_type = get_option('default_library') - --if cpp_compiler.get_argument_syntax() == 'msvc' -- if library_build_type == 'static' or library_build_type == 'both' -- error('Static builds are not supported by MSVC-style builds') -- endif --endif -- - if library_build_type == 'static' - pkg_conf_data.set('GLIBMM_STATIC_LIB', 1) - pkg_conf_data.set('GIOMM_STATIC_LIB', 1) diff --git a/recipes/glibmm/all/patches/enable_static_libs_2_72_1.patch b/recipes/glibmm/all/patches/enable_static_libs_2_72_1.patch deleted file mode 100644 index b9ec412d84d2e..0000000000000 --- a/recipes/glibmm/all/patches/enable_static_libs_2_72_1.patch +++ /dev/null @@ -1,32 +0,0 @@ -diff --git a/glib/glibmmconfig.h.meson b/glib/glibmmconfig.h.meson -index ef4753d..58b343c 100644 ---- a/glib/glibmmconfig.h.meson -+++ b/glib/glibmmconfig.h.meson -@@ -27,7 +27,9 @@ - # if defined(_MSC_VER) - # define GLIBMM_MSC 1 - # define GLIBMM_WIN32 1 --# define GLIBMM_DLL 1 -+# ifndef GLIBMM_STATIC_LIB -+# define GLIBMM_DLL 1 -+# endif - # elif defined(__CYGWIN__) - # define GLIBMM_CONFIGURE 1 - # elif defined(__MINGW32__) -diff --git a/glib/meson.build b/glib/meson.build -index 0c20a91..6b8baa0 100644 ---- a/glib/meson.build -+++ b/glib/meson.build -@@ -36,12 +36,6 @@ pkg_conf_data.set('MSVC_TOOLSET_VER', msvc14x_toolset_ver) - - library_build_type = get_option('default_library') - --if cpp_compiler.get_argument_syntax() == 'msvc' -- if library_build_type == 'static' or library_build_type == 'both' -- error('Static builds are not supported by MSVC-style builds') -- endif --endif -- - if library_build_type == 'static' - pkg_conf_data.set('GLIBMM_STATIC_LIB', 1) - pkg_conf_data.set('GIOMM_STATIC_LIB', 1) diff --git a/recipes/glibmm/all/patches/enable_static_libs_2_75_0.patch b/recipes/glibmm/all/patches/enable_static_libs_2_75_0.patch deleted file mode 100644 index f24c64bb5bd54..0000000000000 --- a/recipes/glibmm/all/patches/enable_static_libs_2_75_0.patch +++ /dev/null @@ -1,32 +0,0 @@ -diff --git a/glib/glibmmconfig.h.meson b/glib/glibmmconfig.h.meson -index ef4753d7..b926720b 100644 ---- a/glib/glibmmconfig.h.meson -+++ b/glib/glibmmconfig.h.meson -@@ -27,7 +27,9 @@ - # if defined(_MSC_VER) - # define GLIBMM_MSC 1 - # define GLIBMM_WIN32 1 --# define GLIBMM_DLL 1 -+# ifndef GLIBMM_STATIC_LIB -+# define GLIBMM_DLL 1 -+# endif - # elif defined(__CYGWIN__) - # define GLIBMM_CONFIGURE 1 - # elif defined(__MINGW32__) -diff --git a/glib/meson.build b/glib/meson.build -index d16621e9..3eb8bc47 100644 ---- a/glib/meson.build -+++ b/glib/meson.build -@@ -37,12 +37,6 @@ pkg_conf_data.set('MSVC_TOOLSET_VER', msvc14x_toolset_ver) - - library_build_type = get_option('default_library') - --if cpp_compiler.get_argument_syntax() == 'msvc' -- if library_build_type == 'static' or library_build_type == 'both' -- error('Static builds are not supported by MSVC-style builds') -- endif --endif -- - if library_build_type == 'static' - pkg_conf_data.set('GLIBMM_STATIC_LIB', 1) - pkg_conf_data.set('GIOMM_STATIC_LIB', 1) diff --git a/recipes/glibmm/all/patches/fix_initialization_order_fiasco_2_66_4.patch b/recipes/glibmm/all/patches/fix_initialization_order_fiasco_2_66_4.patch deleted file mode 100644 index 3cf9f867ed1f0..0000000000000 --- a/recipes/glibmm/all/patches/fix_initialization_order_fiasco_2_66_4.patch +++ /dev/null @@ -1,163 +0,0 @@ -Author: Hesham -Date: Fri May 6 20:02:25 2022 +0000 - - Fix initialization order fiasco - - By default global static initialization with shared libraries begins down - the linking chain upwards, so that the deepest dependency initializes first - This is not guaranteed with static libraries, which might cause glibmm to - initialize before glib. This fix uses lazy initialization for static vars - in glibmm that depend on glib. - -diff --git a/glib/glibmm/class.cc b/glib/glibmm/class.cc -index 057abed..e51d01b 100644 ---- a/glib/glibmm/class.cc -+++ b/glib/glibmm/class.cc -@@ -170,7 +170,11 @@ Class::clone_custom_type( - } - - // Initialize the static quark to store/get custom type properties. -+#if GLIB_STATIC_COMPILATION -+GQuark Class::iface_properties_quark = 0; -+#else - GQuark Class::iface_properties_quark = g_quark_from_string("gtkmm_CustomObject_iface_properties"); -+#endif - - // static - void -diff --git a/glib/glibmm/init.cc b/glib/glibmm/init.cc -index ab96892..267a6c0 100644 ---- a/glib/glibmm/init.cc -+++ b/glib/glibmm/init.cc -@@ -14,15 +14,25 @@ - * License along with this library. If not, see . - */ - -+#include - #include - #include - -+#if GLIB_STATIC_COMPILATION -+#include -+#endif -+ - namespace Glib - { - - void - init() - { -+#if GLIB_STATIC_COMPILATION -+ Glib::Class::iface_properties_quark = -+ g_quark_from_string("gtkmm_CustomObject_iface_properties"); -+#endif -+ - // Also calls Glib::wrap_register_init() and Glib::wrap_init(). - Glib::Error::register_init(); - } -diff --git a/glib/glibmm/property.cc b/glib/glibmm/property.cc -index a2624e5..d9f1095 100644 ---- a/glib/glibmm/property.cc -+++ b/glib/glibmm/property.cc -@@ -89,8 +89,10 @@ struct custom_properties_type - }; - - // The quark used for storing/getting the custom properties of custom types. --static const GQuark custom_properties_quark = -- g_quark_from_string("gtkmm_CustomObject_custom_properties"); -+static const GQuark& custom_properties_quark() { -+ static const GQuark custom_properties_quark_ = g_quark_from_string("gtkmm_CustomObject_custom_properties"); -+ return custom_properties_quark_; -+} - - // Delete the custom properties data when an object of a custom type is finalized. - void destroy_notify_obj_custom_props(void* data) -@@ -111,12 +113,12 @@ custom_properties_type* - get_obj_custom_props(GObject* obj) - { - auto obj_custom_props = -- static_cast(g_object_get_qdata(obj, custom_properties_quark)); -+ static_cast(g_object_get_qdata(obj, custom_properties_quark())); - if (!obj_custom_props) - { - obj_custom_props = new custom_properties_type(); - g_object_set_qdata_full( -- obj, custom_properties_quark, obj_custom_props, destroy_notify_obj_custom_props); -+ obj, custom_properties_quark(), obj_custom_props, destroy_notify_obj_custom_props); - } - return obj_custom_props; - } -diff --git a/untracked/gio/giomm/application.cc b/untracked/gio/giomm/application.cc -index 43ae9df..0d12c9d 100644 ---- a/untracked/gio/giomm/application.cc -+++ b/untracked/gio/giomm/application.cc -@@ -51,8 +51,13 @@ struct ExtraApplicationData - } - }; - --GQuark quark_extra_application_data = -- g_quark_from_string("glibmm__Gio::Application::quark_extra_application_data"); -+static GQuark& -+quark_extra_application_data() -+{ -+ static GQuark quark_extra_application_data_ = -+ g_quark_from_string("glibmm__Gio::Application::quark_extra_application_data"); -+ return quark_extra_application_data_; -+} - - void - Application_delete_extra_application_data(gpointer data) -@@ -465,11 +470,11 @@ Application::add_main_option_entry_private(GOptionArg arg, const Glib::ustring& - gchar* arg_desc = arg_description.empty() ? nullptr : g_strdup(arg_description.c_str()); - - ExtraApplicationData* extra_application_data = -- static_cast(g_object_get_qdata(gobject_, quark_extra_application_data)); -+ static_cast(g_object_get_qdata(gobject_, quark_extra_application_data())); - if (!extra_application_data) - { - extra_application_data = new ExtraApplicationData(); -- g_object_set_qdata_full(gobject_, quark_extra_application_data, extra_application_data, -+ g_object_set_qdata_full(gobject_, quark_extra_application_data(), extra_application_data, - Application_delete_extra_application_data); - } - -@@ -1546,5 +1551,3 @@ void Gio::Application::run_mainloop_vfunc() - - - } // namespace Gio -- -- -diff --git a/untracked/glib/glibmm/binding.cc b/untracked/glib/glibmm/binding.cc -index d0d4f47..0528893 100644 ---- a/untracked/glib/glibmm/binding.cc -+++ b/untracked/glib/glibmm/binding.cc -@@ -29,7 +29,10 @@ - namespace - { - // TODO: When we can break ABI, replace this GQuark by a new data member in Glib::Binding. --GQuark quark_manage = g_quark_from_string("glibmm__Glib::Binding::manage"); -+GQuark& quark_manage() { -+ static GQuark quark_manage_ = g_quark_from_string("glibmm__Glib::Binding::manage"); -+ return quark_manage_; -+} - - struct BindingTransformSlots - { -@@ -150,7 +153,7 @@ Binding::unbind() - void - Binding::unreference() const - { -- if (!g_object_get_qdata(gobject_, quark_manage)) -+ if (!g_object_get_qdata(gobject_, quark_manage())) - { - GBinding* const binding = const_cast(gobj()); - -@@ -168,7 +171,7 @@ void - Binding::set_manage() - { - // Any pointer can be set, just not nullptr. -- g_object_set_qdata(gobject_, quark_manage, this); -+ g_object_set_qdata(gobject_, quark_manage(), this); - } - - const Glib::RefPtr& diff --git a/recipes/glibmm/all/patches/fix_initialization_order_fiasco_2_72_1.patch b/recipes/glibmm/all/patches/fix_initialization_order_fiasco_2_72_1.patch deleted file mode 100644 index e2f8e705abbe0..0000000000000 --- a/recipes/glibmm/all/patches/fix_initialization_order_fiasco_2_72_1.patch +++ /dev/null @@ -1,95 +0,0 @@ -Author: Hesham -Date: Fri May 6 19:37:32 2022 +0000 - - Fix initialization order fiasco - - By default global static initialization with shared libraries begins down - the linking chain upwards, so that the deepest dependency initializes first - This is not guaranteed with static libraries, which might cause glibmm to - initialize before glib. This fix uses lazy initialization for static vars - in glibmm that depend on glib. - -diff --git a/glib/glibmm/class.cc b/glib/glibmm/class.cc -index 36c3c4b..f735129 100644 ---- a/glib/glibmm/class.cc -+++ b/glib/glibmm/class.cc -@@ -157,7 +157,11 @@ Class::clone_custom_type( - } - - // Initialize the static quark to store/get custom type properties. -+#if GLIB_STATIC_COMPILATION -+GQuark Class::iface_properties_quark = 0; -+#else - GQuark Class::iface_properties_quark = g_quark_from_string("gtkmm_CustomObject_iface_properties"); -+#endif - - // static - void -diff --git a/glib/glibmm/init.cc b/glib/glibmm/init.cc -index 0b34447..6b70a4c 100644 ---- a/glib/glibmm/init.cc -+++ b/glib/glibmm/init.cc -@@ -14,12 +14,17 @@ - * License along with this library. If not, see . - */ - -+#include - #include - #include - #include - #include - #include - -+#if GLIB_STATIC_COMPILATION -+#include -+#endif -+ - namespace - { - bool init_to_users_preferred_locale = true; -@@ -45,6 +50,11 @@ void init() - if (is_initialized) - return; - -+#if GLIB_STATIC_COMPILATION -+ Glib::Class::iface_properties_quark = -+ g_quark_from_string("gtkmm_CustomObject_iface_properties"); -+#endif -+ - if (init_to_users_preferred_locale) - { - try -diff --git a/glib/glibmm/property.cc b/glib/glibmm/property.cc -index 56dad84..630b35b 100644 ---- a/glib/glibmm/property.cc -+++ b/glib/glibmm/property.cc -@@ -89,8 +89,12 @@ struct custom_properties_type - }; - - // The quark used for storing/getting the custom properties of custom types. --static const GQuark custom_properties_quark = -- g_quark_from_string("gtkmm_CustomObject_custom_properties"); -+static const GQuark& -+custom_properties_quark() -+{ -+ static GQuark custom_properties_quark_ = g_quark_from_string("gtkmm_CustomObject_custom_properties"); -+ return custom_properties_quark_; -+} - - // Delete the custom properties data when an object of a custom type is finalized. - void destroy_notify_obj_custom_props(void* data) -@@ -111,12 +115,12 @@ custom_properties_type* - get_obj_custom_props(GObject* obj) - { - auto obj_custom_props = -- static_cast(g_object_get_qdata(obj, custom_properties_quark)); -+ static_cast(g_object_get_qdata(obj, custom_properties_quark())); - if (!obj_custom_props) - { - obj_custom_props = new custom_properties_type(); - g_object_set_qdata_full( -- obj, custom_properties_quark, obj_custom_props, destroy_notify_obj_custom_props); -+ obj, custom_properties_quark(), obj_custom_props, destroy_notify_obj_custom_props); - } - return obj_custom_props; - } diff --git a/recipes/glibmm/all/patches/fix_initialization_order_fiasco_2_75_0.patch b/recipes/glibmm/all/patches/fix_initialization_order_fiasco_2_75_0.patch deleted file mode 100644 index 6a24ae04d3038..0000000000000 --- a/recipes/glibmm/all/patches/fix_initialization_order_fiasco_2_75_0.patch +++ /dev/null @@ -1,84 +0,0 @@ -diff --git a/glib/glibmm/class.cc b/glib/glibmm/class.cc -index 31f92c61..f5befb2d 100644 ---- a/glib/glibmm/class.cc -+++ b/glib/glibmm/class.cc -@@ -166,7 +166,11 @@ Class::clone_custom_type( - } - - // Initialize the static quark to store/get custom type properties. -+#if GLIB_STATIC_COMPILATION -+GQuark Class::iface_properties_quark = 0; -+#else - GQuark Class::iface_properties_quark = g_quark_from_string("gtkmm_CustomObject_iface_properties"); -+#endif - - // static - void -diff --git a/glib/glibmm/init.cc b/glib/glibmm/init.cc -index 0b34447d..6b70a4c2 100644 ---- a/glib/glibmm/init.cc -+++ b/glib/glibmm/init.cc -@@ -14,12 +14,17 @@ - * License along with this library. If not, see . - */ - -+#include - #include - #include - #include - #include - #include - -+#if GLIB_STATIC_COMPILATION -+#include -+#endif -+ - namespace - { - bool init_to_users_preferred_locale = true; -@@ -45,6 +50,11 @@ void init() - if (is_initialized) - return; - -+#if GLIB_STATIC_COMPILATION -+ Glib::Class::iface_properties_quark = -+ g_quark_from_string("gtkmm_CustomObject_iface_properties"); -+#endif -+ - if (init_to_users_preferred_locale) - { - try -diff --git a/glib/glibmm/property.cc b/glib/glibmm/property.cc -index 56dad849..630b35b1 100644 ---- a/glib/glibmm/property.cc -+++ b/glib/glibmm/property.cc -@@ -89,8 +89,12 @@ struct custom_properties_type - }; - - // The quark used for storing/getting the custom properties of custom types. --static const GQuark custom_properties_quark = -- g_quark_from_string("gtkmm_CustomObject_custom_properties"); -+static const GQuark& -+custom_properties_quark() -+{ -+ static GQuark custom_properties_quark_ = g_quark_from_string("gtkmm_CustomObject_custom_properties"); -+ return custom_properties_quark_; -+} - - // Delete the custom properties data when an object of a custom type is finalized. - void destroy_notify_obj_custom_props(void* data) -@@ -111,12 +115,12 @@ custom_properties_type* - get_obj_custom_props(GObject* obj) - { - auto obj_custom_props = -- static_cast(g_object_get_qdata(obj, custom_properties_quark)); -+ static_cast(g_object_get_qdata(obj, custom_properties_quark())); - if (!obj_custom_props) - { - obj_custom_props = new custom_properties_type(); - g_object_set_qdata_full( -- obj, custom_properties_quark, obj_custom_props, destroy_notify_obj_custom_props); -+ obj, custom_properties_quark(), obj_custom_props, destroy_notify_obj_custom_props); - } - return obj_custom_props; - } diff --git a/recipes/glibmm/config.yml b/recipes/glibmm/config.yml index 6aaa4e9d859bb..c3ca69bc81afd 100644 --- a/recipes/glibmm/config.yml +++ b/recipes/glibmm/config.yml @@ -1,4 +1,6 @@ versions: + "2.78.1": + folder: "all" "2.75.0": folder: "all" "2.72.1": diff --git a/recipes/glm/all/conandata.yml b/recipes/glm/all/conandata.yml index ea5c8f567b661..f0837f7018575 100644 --- a/recipes/glm/all/conandata.yml +++ b/recipes/glm/all/conandata.yml @@ -1,22 +1,7 @@ sources: - "cci.20230113": - url: "https://github.com/g-truc/glm/archive/efec5db081e3aad807d0731e172ac597f6a39447.zip" - sha256: "e7a1abc208278cc3f0dba59c5170d83863b3375f98136d588b8beb74825e503c" - "cci.20220420": - url: "https://github.com/g-truc/glm/archive/cc98465e3508535ba8c7f6208df934c156a018dc.zip" - sha256: "06d48e336857777d2d1f7da9ccd59e4b9d79720dbd70886d48837d19cda997bb" + "1.0.1": + url: "https://github.com/g-truc/glm/releases/download/1.0.1/glm-1.0.1-light.zip" + sha256: "9A995DE4DA09723BD33EF194E6B79818950E5A8F2E154792F02E4615277CFB8D" "0.9.9.8": url: "https://github.com/g-truc/glm/releases/download/0.9.9.8/glm-0.9.9.8.zip" sha256: "37e2a3d62ea3322e43593c34bae29f57e3e251ea89f4067506c94043769ade4c" - "0.9.9.7": - url: "https://github.com/g-truc/glm/releases/download/0.9.9.7/glm-0.9.9.7.zip" - sha256: "6b79c3d06d9745d1cce3f38c0c15666596f9aefff25ddb74df3af0a02f011ee1" - "0.9.9.6": - url: "https://github.com/g-truc/glm/releases/download/0.9.9.6/glm-0.9.9.6.zip" - sha256: "9db7339c3b8766184419cfe7942d668fecabe9013ccfec8136b39e11718817d0" - "0.9.9.5": - url: "https://github.com/g-truc/glm/releases/download/0.9.9.5/glm-0.9.9.5.zip" - sha256: "4fe34860ce69156f63eea6c3d84c91cadfc330353cf275ff394aef4e163cafee" - "0.9.5.4": - url: "https://github.com/g-truc/glm/releases/download/0.9.5.4/glm-0.9.5.4.zip" - sha256: "c25002f109104bb8eb37a7e74c745cbc0a713ec5d9a857050c7878edb5ee246c" diff --git a/recipes/glm/all/conanfile.py b/recipes/glm/all/conanfile.py index 468e10f82d8df..71d8ed1fa37de 100644 --- a/recipes/glm/all/conanfile.py +++ b/recipes/glm/all/conanfile.py @@ -1,5 +1,5 @@ from conan import ConanFile -from conan.tools.files import copy, get, load, save +from conan.tools.files import copy, get from conan.tools.layout import basic_layout from conan.tools.scm import Version import os @@ -25,33 +25,20 @@ def package_id(self): self.info.clear() def source(self): - get(self, **self.conan_data["sources"][self.version], strip_root=True) + get(self, **self.conan_data["sources"][self.version], strip_root=self.version < Version("1.0.0")) def build(self): pass def package(self): - glm_version = self.version if self.version.startswith("cci") else Version(self._get_semver()) - if glm_version == "0.9.8" or (glm_version == "0.9.9" and self._get_tweak_number() < 6): - save(self, os.path.join(self.package_folder, "licenses", "copying.txt"), self._get_license()) - else: + if self.version < Version("1.0.0"): copy(self, "copying.txt", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) - for headers in ("*.hpp", "*.inl", "*.h"): + else: + copy(self, "copying.txt", src=os.path.join(self.source_folder, "glm"), dst=os.path.join(self.package_folder, "licenses")) + for headers in ("*.hpp", "*.inl", "*.h", "*.cppm"): copy(self, headers, src=os.path.join(self.source_folder, "glm"), dst=os.path.join(self.package_folder, "include", "glm")) - def _get_semver(self): - return self.version.rsplit(".", 1)[0] - - def _get_tweak_number(self): - return int(self.version.rsplit(".", 1)[-1]) - - def _get_license(self): - manual = load(self, os.path.join(self.source_folder, "manual.md")) - begin = manual.find("### The Happy Bunny License (Modified MIT License)") - end = manual.find("\n![](./doc/manual/frontpage2.png)", begin) - return manual[begin:end] - def package_info(self): self.cpp_info.set_property("cmake_file_name", "glm") self.cpp_info.set_property("cmake_target_name", "glm::glm") diff --git a/recipes/glm/config.yml b/recipes/glm/config.yml index ee1899a79d2af..c716b00aceaa5 100644 --- a/recipes/glm/config.yml +++ b/recipes/glm/config.yml @@ -1,15 +1,5 @@ versions: - "cci.20230113": - folder: all - "cci.20220420": + "1.0.1": folder: all "0.9.9.8": folder: all - "0.9.9.7": - folder: all - "0.9.9.6": - folder: all - "0.9.9.5": - folder: all - "0.9.5.4": - folder: all diff --git a/recipes/glog/all/conandata.yml b/recipes/glog/all/conandata.yml index caa4c720569cf..620508ce97a33 100644 --- a/recipes/glog/all/conandata.yml +++ b/recipes/glog/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.7.1": + url: "https://github.com/google/glog/archive/refs/tags/v0.7.1.tar.gz" + sha256: "00e4a87e87b7e7612f519a41e491f16623b12423620006f59f5688bfd8d13b08" "0.7.0": url: "https://github.com/google/glog/archive/refs/tags/v0.7.0.tar.gz" sha256: "375106b5976231b92e66879c1a92ce062923b9ae573c42b56ba28b112ee4cc11" diff --git a/recipes/glog/config.yml b/recipes/glog/config.yml index a0804c43130f1..3e17acecd35c8 100644 --- a/recipes/glog/config.yml +++ b/recipes/glog/config.yml @@ -1,4 +1,6 @@ versions: + "0.7.1": + folder: all "0.7.0": folder: all "0.6.0": diff --git a/recipes/glslang/all/conandata.yml b/recipes/glslang/all/conandata.yml index c41da7c94f094..091cef7cb2d40 100644 --- a/recipes/glslang/all/conandata.yml +++ b/recipes/glslang/all/conandata.yml @@ -1,55 +1,20 @@ +# Add only the SDK release versions from https://github.com/KhronosGroup/glslang/tags for consistency sources: + "1.3.268.0": + url: "https://github.com/KhronosGroup/glslang/archive/refs/tags/vulkan-sdk-1.3.268.0.tar.gz" + sha256: "8cfb4824f185bc246cd41cceedbfcdf14abd3d2fa861512baf81df8a263b9283" + "1.3.261.1": + url: "https://github.com/KhronosGroup/glslang/archive/refs/tags/sdk-1.3.261.1.tar.gz" + sha256: "eb1f9c2ff0a1409151d7749fb37bc1988dc1fd908444c1e4f43d4190c90befcd" + "1.3.243.0": + url: "https://github.com/KhronosGroup/glslang/archive/refs/tags/sdk-1.3.243.0.tar.gz" + sha256: "18b8f296874ac19d034bfb9060238c87b6d67a39af0dfd305d3252762c265f9f" "1.3.239.0": url: "https://github.com/KhronosGroup/glslang/archive/refs/tags/sdk-1.3.239.0.tar.gz" sha256: "8b040328c18399b7bbf5bef84fac3d7b7376b39ec6833b7e19b7961bf7a72017" "1.3.236.0": url: "https://github.com/KhronosGroup/glslang/archive/refs/tags/sdk-1.3.236.0.tar.gz" sha256: "fb6f323a36efcd98766bb72f598008f73c4c92bce69c79fc98ad2b3cdca0c263" - "1.3.231.1": - url: "https://github.com/KhronosGroup/glslang/archive/refs/tags/sdk-1.3.231.1.tar.gz" - sha256: "df3857f01c1aa9ee1927d2feaaa431406d243958e07791e9aed4cb5ab22a5f2b" - "1.3.224.0": - url: "https://github.com/KhronosGroup/glslang/archive/refs/tags/sdk-1.3.224.0.tar.gz" - sha256: "c43c6aa149fa1165e01b375b4d95cbc23b4fc72bd9972a89c55dd1eaa8a360ca" - "1.3.216.0": - url: "https://github.com/KhronosGroup/glslang/archive/refs/tags/sdk-1.3.216.0.tar.gz" - sha256: "3f80a926390faedd33e6ed17ec68340abace83913b285174e2dee87156577be5" - "1.3.211.0": - url: "https://github.com/KhronosGroup/glslang/archive/refs/tags/sdk-1.3.211.0.tar.gz" - sha256: "4335eec84b87d64130e860dad5d6dc1f722277d4e0ff5027153e2743628cb221" - "1.3.204.0": - url: "https://github.com/KhronosGroup/glslang/archive/refs/tags/sdk-1.3.204.0.tar.gz" - sha256: "c6bec993194377944fb8d6d585a90e1288994660782d709e30fa1d91810d6820" - "11.7.0": - url: "https://github.com/KhronosGroup/glslang/archive/refs/tags/11.7.0.tar.gz" - sha256: "b6c83864c3606678d11675114fa5f358c519fe1dad9a781802bcc87fb8fa32d5" - "11.6.0": - url: "https://github.com/KhronosGroup/glslang/archive/refs/tags/11.6.0.tar.gz" - sha256: "99ecd3a0c2c2219293d76723846f762a9f3e7dd0dc2a4f346d0fc3a05a0ce000" - "11.5.0": - url: "https://github.com/KhronosGroup/glslang/archive/11.5.0.tar.gz" - sha256: "fd0b5e3bda591bb08bd3049655a99a0a55f0de4059b9c8f7b397e4b19cf5d51f" - "8.13.3559": - url: "https://github.com/KhronosGroup/glslang/archive/8.13.3559.tar.gz" - sha256: "c58fdcf7e00943ba10f9ae565b2725ec9d5be7dab7c8e82cac72fcaa83c652ca" -patches: - "1.3.239.0": - - patch_file: "patches/1.3.236.0-0001-no-force-glslang-pic.patch" - "1.3.236.0": - - patch_file: "patches/1.3.236.0-0001-no-force-glslang-pic.patch" - "1.3.231.1": - - patch_file: "patches/0001-no-force-glslang-pic.patch" - "1.3.224.0": - - patch_file: "patches/0001-no-force-glslang-pic.patch" - "1.3.216.0": - - patch_file: "patches/0001-no-force-glslang-pic.patch" - "1.3.211.0": - - patch_file: "patches/0001-no-force-glslang-pic.patch" - "1.3.204.0": - - patch_file: "patches/0001-no-force-glslang-pic.patch" - "11.7.0": - - patch_file: "patches/0001-no-force-glslang-pic.patch" - "11.6.0": - - patch_file: "patches/0001-no-force-glslang-pic.patch" - "11.5.0": - - patch_file: "patches/0001-no-force-glslang-pic.patch" + "1.2.198.0": + url: "https://github.com/KhronosGroup/glslang/archive/refs/tags/sdk-1.2.198.0.tar.gz" + sha256: "b2a0541caf01de4fc411cbb32c805a3bd0f6578432e532c5fa6336d187a4a1b1" diff --git a/recipes/glslang/all/conanfile.py b/recipes/glslang/all/conanfile.py index 7d393607fb969..2302eb69e2d87 100644 --- a/recipes/glslang/all/conanfile.py +++ b/recipes/glslang/all/conanfile.py @@ -1,11 +1,13 @@ +import os +import re + from conan import ConanFile -from conan.errors import ConanInvalidConfiguration -from conan.tools.apple import is_apple_os +from conan.errors import ConanInvalidConfiguration, ConanException from conan.tools.build import check_min_cppstd from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout -from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, replace_in_file, rmdir +from conan.tools.env import VirtualBuildEnv +from conan.tools.files import copy, get, rmdir from conan.tools.scm import Version -import os required_conan_version = ">=1.54.0" @@ -14,7 +16,7 @@ class GlslangConan(ConanFile): name = "glslang" description = "Khronos-reference front end for GLSL/ESSL, partial front " \ "end for HLSL, and a SPIR-V generator." - license = ["BSD-3-Clause", "NVIDIA"] + license = "DocumentRef-LICENSE.txt:LicenseRef-glslang" topics = ("glsl", "hlsl", "spirv", "spir-v", "validation", "translation") homepage = "https://github.com/KhronosGroup/glslang" url = "https://github.com/conan-io/conan-center-index" @@ -42,7 +44,6 @@ class GlslangConan(ConanFile): def export_sources(self): copy(self, "CMakeLists.txt", self.recipe_folder, self.export_sources_folder) - export_conandata_patches(self) def config_options(self): if self.settings.os == "Windows": @@ -55,30 +56,18 @@ def configure(self): def layout(self): cmake_layout(self, src_folder="src") - @property - def _get_compatible_spirv_tools_version(self): - return { - "11.7.0": "2021.4", - "11.6.0": "2021.3", - "11.5.0": "2021.2", - "8.13.3559": "2020.5", - }.get(str(self.version), self.version) - def requirements(self): if self.options.enable_optimizer: - self.requires(f"spirv-tools/{self._get_compatible_spirv_tools_version}") + self.requires(f"spirv-tools/{self.version}") def validate(self): if self.settings.compiler.get_safe("cppstd"): check_min_cppstd(self, 11) # see https://github.com/KhronosGroup/glslang/issues/2283 - glslang_version = Version(self.version) - if (self.options.shared and - (self.settings.os == "Windows" or \ - (glslang_version >= "7.0.0" and glslang_version < "11.0.0" and is_apple_os(self))) - ): - raise ConanInvalidConfiguration(f"{self.ref} shared library build is broken on {self.settings.os}") + if self.options.shared: + if self.settings.os == "Windows": + raise ConanInvalidConfiguration(f"{self.ref} shared library build is broken on {self.settings.os}") if self.options.enable_optimizer and self.dependencies["spirv-tools"].options.shared: raise ConanInvalidConfiguration( @@ -86,70 +75,56 @@ def validate(self): "because SPIRV-Tools-opt is not built if shared" ) + def build_requirements(self): + if Version(self.version) >= "1.3.261": + self.tool_requires("cmake/[>=3.17.2 <4]") + def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) def generate(self): + venv = VirtualBuildEnv(self) + venv.generate() + tc = CMakeToolchain(self) tc.variables["BUILD_EXTERNAL"] = False tc.variables["SKIP_GLSLANG_INSTALL"] = False tc.variables["ENABLE_SPVREMAPPER"] = self.options.spv_remapper tc.variables["ENABLE_GLSLANG_BINARIES"] = self.options.build_executables - glslang_version = Version(self.version) - if glslang_version < "7.0.0" or glslang_version >= "8.13.3743": - tc.variables["ENABLE_GLSLANG_JS"] = False - tc.variables["ENABLE_GLSLANG_WEBMIN"] = False - tc.variables["ENABLE_GLSLANG_WEBMIN_DEVEL"] = False - else: - tc.variables["ENABLE_GLSLANG_WEB"] = False - tc.variables["ENABLE_GLSLANG_WEB_DEVEL"] = False + tc.variables["ENABLE_GLSLANG_JS"] = False + tc.variables["ENABLE_GLSLANG_WEBMIN"] = False + tc.variables["ENABLE_GLSLANG_WEBMIN_DEVEL"] = False tc.variables["ENABLE_EMSCRIPTEN_SINGLE_FILE"] = False tc.variables["ENABLE_EMSCRIPTEN_ENVIRONMENT_NODE"] = False tc.variables["ENABLE_HLSL"] = self.options.hlsl - if glslang_version < "7.0.0" or glslang_version >= "8.13.3743": - tc.variables["ENABLE_RTTI"] = True + tc.variables["ENABLE_RTTI"] = True tc.variables["ENABLE_OPT"] = self.options.enable_optimizer if self.options.enable_optimizer: tc.variables["spirv-tools_SOURCE_DIR"] = self.dependencies["spirv-tools"].package_folder.replace("\\", "/") tc.variables["ENABLE_PCH"] = False tc.variables["ENABLE_CTEST"] = False tc.variables["USE_CCACHE"] = False - if (glslang_version < "7.0.0" or glslang_version >= "11.6.0") and self.settings.os == "Windows": - tc.variables["OVERRIDE_MSVCCRT"] = False - if is_apple_os(self): - tc.variables["CMAKE_MACOSX_BUNDLE"] = False - if glslang_version < "1.3.231" or glslang_version >= "7.0.0": - # Generate a relocatable shared lib on Macos - tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0042"] = "NEW" + tc.variables["OVERRIDE_MSVCCRT"] = False + tc.variables["CMAKE_MACOSX_BUNDLE"] = False + # Generate a relocatable shared lib on Macos + tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0042"] = "NEW" + # glslang builds intermediate static libs, but Conan does not set -fPIC for shared builds + tc.variables["CMAKE_POSITION_INDEPENDENT_CODE"] = self.options.get_safe("fPIC", True) tc.generate() deps = CMakeDeps(self) deps.generate() def _patch_sources(self): - apply_conandata_patches(self) - # Do not force PIC if static (but keep it if shared, because OGLCompiler, OSDependent, - # GenericCodeGen and MachineIndependent are still static and linked to glslang shared) - if not self.options.shared: - cmake_files_to_fix = [ - {"target": "OGLCompiler", "relpath": os.path.join("OGLCompilersDLL", "CMakeLists.txt")}, - {"target": "SPIRV" , "relpath": os.path.join("SPIRV", "CMakeLists.txt")}, - {"target": "SPVRemapper", "relpath": os.path.join("SPIRV", "CMakeLists.txt")}, - {"target": "OSDependent", "relpath": os.path.join("glslang", "OSDependent", "Unix","CMakeLists.txt")}, - {"target": "OSDependent", "relpath": os.path.join("glslang", "OSDependent", "Windows","CMakeLists.txt")}, - {"target": "HLSL" , "relpath": os.path.join("hlsl", "CMakeLists.txt")}, - ] - glslang_version = Version(self.version) - if glslang_version >= "7.0.0" and glslang_version < "11.0.0": - cmake_files_to_fix.append({"target": "glslang", "relpath": os.path.join("glslang", "CMakeLists.txt")}) - else: - cmake_files_to_fix.append({"target": "glslang-default-resource-limits", "relpath": os.path.join("StandAlone" , "CMakeLists.txt")}) - cmake_files_to_fix.append({"target": "MachineIndependent", "relpath": os.path.join("glslang", "CMakeLists.txt")}) - cmake_files_to_fix.append({"target": "GenericCodeGen", "relpath": os.path.join("glslang", "CMakeLists.txt")}) - for cmake_file in cmake_files_to_fix: - replace_in_file(self, os.path.join(self.source_folder, cmake_file["relpath"]), - "set_property(TARGET {} PROPERTY POSITION_INDEPENDENT_CODE ON)".format(cmake_file["target"]), - "") + for cmake_file in sorted(self.source_path.rglob("CMakeLists.txt")): + content = cmake_file.read_text(encoding="utf8") + if "POSITION_INDEPENDENT_CODE ON" in content: + content = re.sub(r"set_property\(TARGET \S+ PROPERTY POSITION_INDEPENDENT_CODE ON\)\n", "", content) + content = content.replace("POSITION_INDEPENDENT_CODE ON", "") + cmake_file.write_text(content, encoding="utf8") + self.output.info(f"Patched fPIC handling in {cmake_file.relative_to(self.source_path)}") + if "POSITION_INDEPENDENT_CODE" in content: + raise ConanException(f"POSITION_INDEPENDENT_CODE found in {cmake_file}, please update the recipe") def build(self): self._patch_sources() @@ -158,7 +133,7 @@ def build(self): cmake.build() def package(self): - copy(self, "LICENSE.txt", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) + copy(self, "LICENSE.txt", self.source_folder, os.path.join(self.package_folder, "licenses")) cmake = CMake(self) cmake.install() rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) @@ -166,22 +141,21 @@ def package(self): def package_info(self): self.cpp_info.set_property("cmake_file_name", "glslang") - self.cpp_info.set_property("cmake_target_name", "glslang::glslang-do-not-use") # because glslang-core target is glslang::glslang + self.cpp_info.set_property("cmake_target_name", "glslang::_glslang-do-not-use") # because glslang-core target is glslang::glslang lib_suffix = "d" if self.settings.os == "Windows" and self.settings.build_type == "Debug" else "" - glslang_version = Version(self.version) - has_machineindependent = (glslang_version < "7.0.0" or glslang_version >= "11.0.0") and not self.options.shared - has_genericcodegen = (glslang_version < "7.0.0" or glslang_version >= "11.0.0") and not self.options.shared - has_osdependent = glslang_version < "1.3.231" or glslang_version >= "7.0.0" or not self.options.shared - has_oglcompiler = glslang_version < "1.3.231" or glslang_version >= "7.0.0" or not self.options.shared + has_machineindependent = not self.options.shared + has_genericcodegen = not self.options.shared + has_osdependent = not self.options.shared + has_oglcompiler = not self.options.shared # glslang self.cpp_info.components["glslang-core"].set_property("cmake_target_name", "glslang::glslang") self.cpp_info.components["glslang-core"].names["cmake_find_package"] = "glslang" self.cpp_info.components["glslang-core"].names["cmake_find_package_multi"] = "glslang" self.cpp_info.components["glslang-core"].libs = [f"glslang{lib_suffix}"] - if (glslang_version < "7.0.0" or glslang_version >= "11.0.0") and self.options.shared: + if self.options.shared: self.cpp_info.components["glslang-core"].defines.append("GLSLANG_IS_SHARED_LIBRARY") if self.settings.os in ["Linux", "FreeBSD"]: self.cpp_info.components["glslang-core"].system_libs.extend(["m", "pthread"]) @@ -259,3 +233,9 @@ def package_info(self): if self.options.build_executables: self.env_info.PATH.append(os.path.join(self.package_folder, "bin")) + + if Version(self.version) >= "1.3.243": + self.cpp_info.components["glslang-default-resource-limits"].set_property("cmake_target_name", "glslang::glslang-default-resource-limits") + self.cpp_info.components["glslang-default-resource-limits"].names["cmake_find_package"] = "glslang-default-resource-limits" + self.cpp_info.components["glslang-default-resource-limits"].names["cmake_find_package_multi"] = "glslang-default-resource-limits" + self.cpp_info.components["glslang-default-resource-limits"].libs = [f"glslang-default-resource-limits{lib_suffix}"] diff --git a/recipes/glslang/all/patches/0001-no-force-glslang-pic.patch b/recipes/glslang/all/patches/0001-no-force-glslang-pic.patch deleted file mode 100644 index 00e2266d3a9ae..0000000000000 --- a/recipes/glslang/all/patches/0001-no-force-glslang-pic.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- a/glslang/CMakeLists.txt -+++ b/glslang/CMakeLists.txt -@@ -167,7 +167,6 @@ - add_library(glslang ${LIB_TYPE} ${BISON_GLSLParser_OUTPUT_SOURCE} ${GLSLANG_SOURCES} ${GLSLANG_HEADERS}) - set_target_properties(glslang PROPERTIES - FOLDER glslang -- POSITION_INDEPENDENT_CODE ON - VERSION "${GLSLANG_VERSION}" - SOVERSION "${GLSLANG_VERSION_MAJOR}") - target_link_libraries(glslang PRIVATE OGLCompiler OSDependent MachineIndependent) diff --git a/recipes/glslang/all/patches/1.3.236.0-0001-no-force-glslang-pic.patch b/recipes/glslang/all/patches/1.3.236.0-0001-no-force-glslang-pic.patch deleted file mode 100644 index 10a3ace245afd..0000000000000 --- a/recipes/glslang/all/patches/1.3.236.0-0001-no-force-glslang-pic.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- a/glslang/CMakeLists.txt -+++ b/glslang/CMakeLists.txt -@@ -169,7 +169,6 @@ set(GLSLANG_HEADERS - add_library(glslang ${LIB_TYPE} ${BISON_GLSLParser_OUTPUT_SOURCE} ${GLSLANG_SOURCES} ${GLSLANG_HEADERS}) - set_target_properties(glslang PROPERTIES - FOLDER glslang -- POSITION_INDEPENDENT_CODE ON - VERSION "${GLSLANG_VERSION}" - SOVERSION "${GLSLANG_VERSION_MAJOR}") - target_link_libraries(glslang PRIVATE OGLCompiler OSDependent MachineIndependent) diff --git a/recipes/glslang/config.yml b/recipes/glslang/config.yml index 99298a61152e6..87519b61c9623 100644 --- a/recipes/glslang/config.yml +++ b/recipes/glslang/config.yml @@ -1,23 +1,13 @@ versions: - "1.3.239.0": - folder: all - "1.3.236.0": - folder: all - "1.3.231.1": - folder: all - "1.3.224.0": + "1.3.268.0": folder: all - "1.3.216.0": + "1.3.261.1": folder: all - "1.3.211.0": + "1.3.243.0": folder: all - "1.3.204.0": - folder: all - "11.7.0": - folder: all - "11.6.0": + "1.3.239.0": folder: all - "11.5.0": + "1.3.236.0": folder: all - "8.13.3559": + "1.2.198.0": folder: all diff --git a/recipes/glu/all/conanfile.py b/recipes/glu/all/conanfile.py index 77dcc692f82dd..17787ed1bf0f7 100644 --- a/recipes/glu/all/conanfile.py +++ b/recipes/glu/all/conanfile.py @@ -29,6 +29,9 @@ def package_id(self): self.info.clear() def system_requirements(self): + if self.settings.os not in ["Linux", "FreeBSD", "SunOS"]: + return + dnf = package_manager.Dnf(self) dnf.install(["mesa-libGLU-devel"], update=True, check=True) @@ -47,6 +50,9 @@ def system_requirements(self): pkg = package_manager.Pkg(self) pkg.install(["libGLU"], update=True, check=True) + pkg_util = package_manager.PkgUtil(self) + pkg_util.install(["mesalibs"], update=True, check=True) + def package_info(self): self.cpp_info.bindirs = [] self.cpp_info.includedirs = [] @@ -54,6 +60,6 @@ def package_info(self): if self.settings.os == "Windows": self.cpp_info.system_libs = ["glu32"] - elif self.settings.os in ["Linux", "FreeBSD"]: + elif self.settings.os in ["Linux", "FreeBSD", "SunOS"]: pkg_config = PkgConfig(self, 'glu') pkg_config.fill_cpp_info(self.cpp_info, is_system=self.settings.os != "FreeBSD") diff --git a/recipes/gmp/all/test_package/CMakeLists.txt b/recipes/gmp/all/test_package/CMakeLists.txt index ba2fbfaf5b1f9..264e5af18d86e 100644 --- a/recipes/gmp/all/test_package/CMakeLists.txt +++ b/recipes/gmp/all/test_package/CMakeLists.txt @@ -1,24 +1,13 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.15) project(test_package LANGUAGES C) -enable_testing() - find_package(gmp REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.c) target_link_libraries(${PROJECT_NAME} PRIVATE gmp::libgmp) -add_test(NAME ${PROJECT_NAME}_test COMMAND ${PROJECT_NAME}) - -if(TEST_PIC) - set(CMAKE_POSITION_INDEPENDENT_CODE ON) - add_executable(${PROJECT_NAME}_pic test_package.c) - target_link_libraries(${PROJECT_NAME}_pic PRIVATE gmp::libgmp) - add_test(NAME ${PROJECT_NAME}_pic_test COMMAND ${PROJECT_NAME}_pic) -endif() if(ENABLE_CXX) enable_language(CXX) add_executable(${PROJECT_NAME}_cpp test_package.cpp) target_link_libraries(${PROJECT_NAME}_cpp PRIVATE gmp::gmpxx) - add_test(NAME ${PROJECT_NAME}_cpp_test COMMAND ${PROJECT_NAME}_cpp) endif() diff --git a/recipes/gmp/all/test_package/conanfile.py b/recipes/gmp/all/test_package/conanfile.py index 408e5ddb1389c..9f0e5d3db8fa5 100644 --- a/recipes/gmp/all/test_package/conanfile.py +++ b/recipes/gmp/all/test_package/conanfile.py @@ -1,7 +1,7 @@ from conan import ConanFile from conan.tools.build import can_run from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout -from conan.tools.files import chdir +import os class TestPackageConan(ConanFile): @@ -18,7 +18,6 @@ def requirements(self): def generate(self): tc = CMakeToolchain(self) tc.variables["ENABLE_CXX"] = self.dependencies["gmp"].options.enable_cxx - tc.variables["TEST_PIC"] = "fPIC" in self.dependencies["gmp"].options and self.dependencies["gmp"].options.fPIC tc.generate() def build(self): @@ -27,7 +26,8 @@ def build(self): cmake.build() def test(self): - if not can_run(self): - return - with chdir(self, self.folders.build_folder): - self.run(f"ctest --output-on-failure -C {self.settings.build_type}", env="conanrun") + if can_run(self): + bin_path = self.cpp.build.bindirs[0] + self.run(os.path.join(bin_path, "test_package"), env="conanrun") + if self.dependencies['gmp'].options.enable_cxx: + self.run(os.path.join(bin_path, "test_package_cpp"), env="conanrun") diff --git a/recipes/gmp/all/test_package/test_package.c b/recipes/gmp/all/test_package/test_package.c index 855fb40978336..14783504f48a1 100644 --- a/recipes/gmp/all/test_package/test_package.c +++ b/recipes/gmp/all/test_package/test_package.c @@ -1,25 +1,9 @@ #include -#include -#include - int main (void) { - mpz_t a,b,c; - mpz_init_set_str(a, "1234", 10); - mpz_init_set_str(b, "4321", 10); - mpz_init(c); - - mpz_add(c, a, b); - - char *a_str = mpz_get_str(NULL, 10, a); - char *b_str = mpz_get_str(NULL, 10, b); - char *c_str = mpz_get_str(NULL, 10, c); - - printf("%s + %s = %s\n", a_str, b_str, c_str); - - free(a_str); - free(b_str); - free(c_str); + mpz_t a; + mpz_init(a); + mpz_clear(a); - return EXIT_SUCCESS; + return 0; } diff --git a/recipes/gmp/all/test_v1_package/CMakeLists.txt b/recipes/gmp/all/test_v1_package/CMakeLists.txt deleted file mode 100644 index 81f52f58013af..0000000000000 --- a/recipes/gmp/all/test_v1_package/CMakeLists.txt +++ /dev/null @@ -1,24 +0,0 @@ -cmake_minimum_required(VERSION 3.1) -project(test_package LANGUAGES C) - -if(ENABLE_CXX) - enable_language(CXX) -endif() - -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup() - -find_package(gmp REQUIRED CONFIG) - -add_executable(${PROJECT_NAME} ../test_package/test_package.c) -target_link_libraries(${PROJECT_NAME} PRIVATE gmp::GMP) - -if(TEST_PIC) - add_library(${PROJECT_NAME}_shared SHARED ../test_package/test_package.c) - target_link_libraries(${PROJECT_NAME}_shared PRIVATE gmp::GMP) -endif() - -if(ENABLE_CXX) - add_executable(${PROJECT_NAME}_cpp ../test_package/test_package.cpp) - target_link_libraries(${PROJECT_NAME}_cpp PRIVATE gmp::GMPXX) -endif() diff --git a/recipes/gmp/all/test_v1_package/conanfile.py b/recipes/gmp/all/test_v1_package/conanfile.py deleted file mode 100644 index 716c611a38e8a..0000000000000 --- a/recipes/gmp/all/test_v1_package/conanfile.py +++ /dev/null @@ -1,22 +0,0 @@ -from conans import ConanFile, CMake, tools -import os - - -class TestPackageConan(ConanFile): - settings = "os", "arch", "compiler", "build_type" - generators = "cmake", "cmake_find_package_multi" - - def build(self): - cmake = CMake(self) - cmake.definitions["ENABLE_CXX"] = self.options["gmp"].enable_cxx - cmake.definitions["TEST_PIC"] = "fPIC" in self.options["gmp"] and self.options["gmp"].fPIC - cmake.configure() - cmake.build() - - def test(self): - if not tools.cross_building(self): - bin_path = os.path.join("bin", "test_package") - self.run(bin_path, run_environment=True) - if self.options["gmp"].enable_cxx: - bin_path = os.path.join("bin", "test_package_cpp") - self.run(bin_path, run_environment=True) diff --git a/recipes/gn/all/conandata.yml b/recipes/gn/all/conandata.yml index 171741d9a625a..7bda923d38021 100644 --- a/recipes/gn/all/conandata.yml +++ b/recipes/gn/all/conandata.yml @@ -1,3 +1,5 @@ sources: + "cci.20240611": + url: "https://gn.googlesource.com/gn/+archive/b2afae122eeb6ce09c52d63f67dc53fc517dbdc8.tar.gz" "cci.20210429": url: "https://gn.googlesource.com/gn/+archive/6771ce569fb4803dad7a427aa2e2c23e960b917e.tar.gz" diff --git a/recipes/gn/all/conanfile.py b/recipes/gn/all/conanfile.py index 14fc7169fc53f..4d70a7b853851 100644 --- a/recipes/gn/all/conanfile.py +++ b/recipes/gn/all/conanfile.py @@ -1,128 +1,163 @@ -from conans import ConanFile, tools -from conans.errors import ConanInvalidConfiguration -from contextlib import contextmanager -import conan.tools.files as tools_files -import conan.tools.scm as tools_scm import os +import shutil import sys import textwrap import time -required_conan_version = ">=1.46.0" +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.apple import is_apple_os, XCRun +from conan.tools.build import check_min_cppstd +from conan.tools.env import VirtualBuildEnv, Environment +from conan.tools.files import chdir, copy, get, load, save, replace_in_file +from conan.tools.layout import basic_layout +from conan.tools.microsoft import is_msvc, VCVars +from conan.tools.scm import Version + +required_conan_version = ">=1.47.0" class GnConan(ConanFile): name = "gn" description = "GN is a meta-build system that generates build files for Ninja." - url = "https://github.com/conan-io/conan-center-index" - topics = ("gn", "build", "system", "ninja") license = "BSD-3-Clause" + url = "https://github.com/conan-io/conan-center-index" homepage = "https://gn.googlesource.com/" + topics = ("build system", "ninja") + + package_type = "application" settings = "os", "arch", "compiler", "build_type" + def layout(self): + basic_layout(self, src_folder="src") + + def package_id(self): + del self.info.settings.compiler + @property - def _source_subfolder(self): - return "source_subfolder" + def _min_cppstd(self): + if self.version == "cci.20210429": + return 17 + else: + return 20 @property - def _minimum_compiler_version_supporting_cxx17(self): - return { - "Visual Studio": 15, - "gcc": 7, - "clang": 4, - "apple-clang": 10, - }.get(str(self.settings.compiler)) - - def validate(self): - if self.settings.compiler.cppstd: - tools.check_min_cppstd(self, 17) + def _minimum_compiler_version(self): + if self._min_cppstd == 17: + return { + "Visual Studio": 15, + "msvc": 191, + "gcc": 7, + "clang": 4, + "apple-clang": 10, + }.get(str(self.settings.compiler)) else: - if self._minimum_compiler_version_supporting_cxx17: - if tools_scm.Version(self.settings.compiler.version) < self._minimum_compiler_version_supporting_cxx17: - raise ConanInvalidConfiguration("gn requires a compiler supporting c++17") - else: - self.output.warn("gn recipe does not recognize the compiler. gn requires a compiler supporting c++17. Assuming it does.") + return { + "gcc": "11", + "clang": "12", + "apple-clang": "15", + "msvc": "192", + "Visual Studio": "16", + } - def package_id(self): - del self.info.settings.compiler + def validate_build(self): + if self.settings.compiler.cppstd: + check_min_cppstd(self, self._min_cppstd) + if self._minimum_compiler_version and Version(self.settings.compiler.version) < self._minimum_compiler_version: + raise ConanInvalidConfiguration(f"gn requires a compiler supporting C++{self._min_cppstd}") - def source(self): - tools_files.get(self, **self.conan_data["sources"][self.version], destination=self._source_subfolder) def build_requirements(self): # FIXME: add cpython build requirements for `build/gen.py`. - self.build_requires("ninja/1.10.2") + self.tool_requires("ninja/1.11.1") - @contextmanager - def _build_context(self): - if self.settings.compiler == "Visual Studio": - with tools.vcvars(self.settings): - yield - else: - compiler_defaults = {} - if self.settings.compiler == "gcc": - compiler_defaults = { - "CC": "gcc", - "CXX": "g++", - "AR": "ar", - "LD": "g++", - } - elif self.settings.compiler == "clang": - compiler_defaults = { - "CC": "clang", - "CXX": "clang++", - "AR": "ar", - "LD": "clang++", - } - env = {} - for k in ("CC", "CXX", "AR", "LD"): - v = tools.get_env(k, compiler_defaults.get(k, None)) - if v: - env[k] = v - with tools.environment_append(env): - yield - - @staticmethod - def _to_gn_platform(os_, compiler): - if tools.is_apple_os(os_): + def source(self): + get(self, **self.conan_data["sources"][self.version]) + + @property + def _gn_platform(self): + if is_apple_os(self): return "darwin" - if compiler == "Visual Studio": + if is_msvc(self): return "msvc" # Assume gn knows about the os - return str(os_).lower() + return str(self.settings.os).lower() + + @property + def _cxx(self): + compilers_by_conf = self.conf.get("tools.build:compiler_executables", default={}, check_type=dict) + cxx = compilers_by_conf.get("cpp") or VirtualBuildEnv(self).vars().get("CXX") + if cxx: + return cxx + if self.settings.compiler == "apple-clang": + return XCRun(self).cxx + compiler_version = self.settings.compiler.version + major = Version(compiler_version).major + if self.settings.compiler == "gcc": + return shutil.which(f"g++-{compiler_version}") or shutil.which(f"g++-{major}") or shutil.which("g++") or "" + if self.settings.compiler == "clang": + return shutil.which(f"clang++-{compiler_version}") or shutil.which(f"clang++-{major}") or shutil.which("clang++") or "" + return "" + + def generate(self): + env = VirtualBuildEnv(self) + env.generate() + + # Make sure CXX env var is set, otherwise gn defaults it to clang++ + # https://gn.googlesource.com/gn/+/refs/heads/main/build/gen.py#386 + env = Environment() + env.define("CXX", self._cxx) + env.vars(self).save_script("conanbuild_gn") + + if is_msvc(self): + vcvars = VCVars(self) + vcvars.generate() + + configure_args = [ + "--no-last-commit-position", + f"--host={self._gn_platform}", + ] + if self.settings.build_type in ["Debug", "RelWithDebInfo"]: + configure_args.append("-d") + save(self, os.path.join(self.source_folder, "configure_args"), " ".join(configure_args)) def build(self): - with tools.chdir(self._source_subfolder): - with self._build_context(): - # Generate dummy header to be able to run `build/ben.py` with `--no-last-commit-position`. This allows running the script without the tree having to be a git checkout. - tools.save(os.path.join("src", "gn", "last_commit_position.h"), - textwrap.dedent("""\ - #pragma once - #define LAST_COMMIT_POSITION "1" - #define LAST_COMMIT_POSITION_NUM 1 - """)) - conf_args = [ - "--no-last-commit-position", - "--host={}".format(self._to_gn_platform(self.settings.os, self.settings.compiler)), - ] - if self.settings.build_type == "Debug": - conf_args.append("-d") - self.run("{} build/gen.py {}".format(sys.executable, " ".join(conf_args)), run_environment=True) - # Try sleeping one second to avoid time skew of the generated ninja.build file (and having to re-run build/gen.py) - time.sleep(1) - build_args = [ - "-C", "out", - "-j{}".format(tools.cpu_count()), - ] - self.run("ninja {}".format(" ".join(build_args)), run_environment=True) + with chdir(self, self.source_folder): + # Generate dummy header to be able to run `build/gen.py` with `--no-last-commit-position`. + # This allows running the script without the tree having to be a git checkout. + save(self, os.path.join(self.source_folder, "src", "gn", "last_commit_position.h"), + textwrap.dedent("""\ + #pragma once + #define LAST_COMMIT_POSITION "1" + #define LAST_COMMIT_POSITION_NUM 1 + """), + ) + + # Disable GenerateLastCommitPosition() + replace_in_file(self, os.path.join(self.source_folder, "build/gen.py"), + "def GenerateLastCommitPosition(host, header):", + "def GenerateLastCommitPosition(host, header):\n return") + + self.run(f"{sys.executable} build/gen.py " + load(self, "configure_args")) + self.run(f"ninja -C out -j{os.cpu_count()} -v") def package(self): - self.copy("LICENSE", src=self._source_subfolder, dst="licenses") - self.copy("gn", src=os.path.join(self._source_subfolder, "out"), dst="bin") - self.copy("gn.exe", src=os.path.join(self._source_subfolder, "out"), dst="bin") + copy(self, "LICENSE", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) + if self.settings.os == "Windows": + copy(self, "gn.exe", + src=os.path.join(self.source_folder, "out"), + dst=os.path.join(self.package_folder, "bin")) + else: + copy(self, "gn", + src=os.path.join(self.source_folder, "out"), + dst=os.path.join(self.package_folder, "bin")) def package_info(self): + self.cpp_info.includedirs = [] + self.cpp_info.frameworkdirs = [] + self.cpp_info.libdirs = [] + self.cpp_info.resdirs = [] + bin_path = os.path.join(self.package_folder, "bin") - self.output.info("Appending PATH environment variable: {}".format(bin_path)) + self.output.info(f"Appending PATH environment variable: {bin_path}") self.env_info.PATH.append(bin_path) - self.cpp_info.includedirs = [] diff --git a/recipes/gn/all/test_package/conanfile.py b/recipes/gn/all/test_package/conanfile.py index 6afe525facbbe..4a3175e52589e 100644 --- a/recipes/gn/all/test_package/conanfile.py +++ b/recipes/gn/all/test_package/conanfile.py @@ -1,46 +1,28 @@ -from conans import ConanFile, CMake, tools -from contextlib import contextmanager import os +from conan import ConanFile +from conan.tools.apple import is_apple_os +from conan.tools.build import can_run, cross_building +from conan.tools.env import VirtualRunEnv, VirtualBuildEnv +from conan.tools.layout import basic_layout +from conan.tools.microsoft import unix_path + class TestPackageConan(ConanFile): - settings = "os", "compiler", "build_type", "arch" + settings = "os", "arch", "compiler", "build_type" + generators = "VCVars" + test_type = "explicit" def build_requirements(self): - self.build_requires("ninja/1.10.2") + self.tool_requires(self.tested_reference_str) + self.tool_requires("ninja/1.11.1") - @contextmanager - def _build_context(self): - if self.settings.compiler == "Visual Studio": - with tools.vcvars(self.settings): - yield - else: - compiler_defaults = {} - if self.settings.compiler == "gcc": - compiler_defaults = { - "CC": "gcc", - "CXX": "g++", - "AR": "ar", - "LD": "g++", - } - elif self.settings.compiler in ("apple-clang", "clang"): - compiler_defaults = { - "CC": "clang", - "CXX": "clang++", - "AR": "ar", - "LD": "clang++", - } - env = {} - for k in ("CC", "CXX", "AR", "LD"): - v = tools.get_env(k, compiler_defaults.get(k, None)) - if v: - env[k] = v - with tools.environment_append(env): - yield + def layout(self): + basic_layout(self) @property def _target_os(self): - if tools.is_apple_os(self.settings.os): + if is_apple_os(self): return "mac" # Assume gn knows about the os return { @@ -53,17 +35,22 @@ def _target_cpu(self): "x86_64": "x64", }.get(str(self.settings.arch), str(self.settings.arch)) + def generate(self): + VirtualBuildEnv(self).generate() + VirtualRunEnv(self).generate(scope="run") + VirtualRunEnv(self).generate(scope="build") + def build(self): - if not tools.cross_building(self.settings): - with tools.chdir(self.source_folder): - gn_args = [ - os.path.relpath(os.path.join(self.build_folder, "bin"), os.getcwd()).replace("\\", "/"), - "--args=\"target_os=\\\"{os_}\\\" target_cpu=\\\"{cpu}\\\"\"".format(os_=self._target_os, cpu=self._target_cpu), - ] - self.run("gn gen {}".format(" ".join(gn_args)), run_environment=True) - with self._build_context(): - self.run("ninja -v -j{} -C bin".format(tools.cpu_count()), run_environment=True) + if not cross_building(self): + rel_bindir = unix_path(self, os.path.relpath(os.path.join(self.cpp.build.bindir), os.getcwd())) + gn_args = [ + rel_bindir, + f'--args="target_os=\\"{self._target_os}\\" target_cpu=\\"{self._target_cpu}\\""', + ] + self.run("gn gen " + " ".join(gn_args)) + self.run(f"ninja -v -j{os.cpu_count()} -C {rel_bindir}") def test(self): - if not tools.cross_building(self.settings): - self.run(os.path.join("bin", "test_package"), run_environment=True) + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/gn/all/test_package/test_package.cpp b/recipes/gn/all/test_package/test_package.cpp index 576931dcb63ac..7a70c493ae50a 100644 --- a/recipes/gn/all/test_package/test_package.cpp +++ b/recipes/gn/all/test_package/test_package.cpp @@ -3,7 +3,7 @@ #include -int main(int argc, char* argv[]) { +int main() { std::cout << get_test_shared_text() << "\n"; std::cout << get_test_static_text() << "\n"; return 0; diff --git a/recipes/gn/config.yml b/recipes/gn/config.yml index 7831e6ed51225..864345cea83ba 100644 --- a/recipes/gn/config.yml +++ b/recipes/gn/config.yml @@ -1,3 +1,5 @@ versions: + "cci.20240611": + folder: all "cci.20210429": folder: all diff --git a/recipes/gnutls/all/conandata.yml b/recipes/gnutls/all/conandata.yml index bdde34580468c..92c4817c69f19 100644 --- a/recipes/gnutls/all/conandata.yml +++ b/recipes/gnutls/all/conandata.yml @@ -1,4 +1,10 @@ sources: + "3.8.7": + url: + - "https://www.gnupg.org/ftp/gcrypt/gnutls/v3.8/gnutls-3.8.7.tar.xz" + - "http://www.ring.gr.jp/pub/net/gnupg/gnutls/v3.8/gnutls-3.8.7.tar.xz" + - "https://www.mirrorservice.org/sites/ftp.gnupg.org/gcrypt/gnutls/v3.8/gnutls-3.8.7.tar.xz" + sha256: "fe302f2b6ad5a564bcb3678eb61616413ed5277aaf8e7bf7cdb9a95a18d9f477" "3.8.2": url: - "https://www.gnupg.org/ftp/gcrypt/gnutls/v3.8/gnutls-3.8.2.tar.xz" @@ -12,8 +18,17 @@ sources: - "https://www.mirrorservice.org/sites/ftp.gnupg.org/gcrypt/gnutls/v3.7/gnutls-3.7.8.tar.xz" sha256: "c58ad39af0670efe6a8aee5e3a8b2331a1200418b64b7c51977fb396d4617114" patches: + "3.8.2": + - patch_file: "patches/3.8.2-0001-ossstaues-argument-fix.patch" + patch_description: "specify osstatus_error takes in an OSStatus as its first argument" + patch_type: "backport" + patch_source: "https://gitlab.com/gnutls/gnutls/-/commit/925b7072ac1a242b0968f889585e61993f9ca449.patch" "3.7.8": - - patch_description: "Fix Mac OS build when linking to libtasn1" + - patch_file: "patches/3.7.8-0001-fix-isdigit.patch" + patch_description: "Fix Mac OS build when linking to libtasn1" patch_type: "portability" patch_source: "https://github.com/xbmc/inputstream.ffmpegdirect/blob/Matrix/depends/common/gnutls/03-undo-libtasn1-cisdigit.patch" - patch_file: "patches/0001-fix-isdigit.patch" + - patch_file: "patches/3.7.8-0002-ossstaues-argument-fix.patch" + patch_description: "specify osstatus_error takes in an OSStatus as its first argument (reapplied from 3.8.2)" + patch_type: "backport" + patch_source: "https://gitlab.com/gnutls/gnutls/-/commit/925b7072ac1a242b0968f889585e61993f9ca449.patch" diff --git a/recipes/gnutls/all/patches/0001-fix-isdigit.patch b/recipes/gnutls/all/patches/3.7.8-0001-fix-isdigit.patch similarity index 100% rename from recipes/gnutls/all/patches/0001-fix-isdigit.patch rename to recipes/gnutls/all/patches/3.7.8-0001-fix-isdigit.patch diff --git a/recipes/gnutls/all/patches/3.7.8-0002-ossstaues-argument-fix.patch b/recipes/gnutls/all/patches/3.7.8-0002-ossstaues-argument-fix.patch new file mode 100644 index 0000000000000..e91a76a05b55a --- /dev/null +++ b/recipes/gnutls/all/patches/3.7.8-0002-ossstaues-argument-fix.patch @@ -0,0 +1,13 @@ +diff --git a/lib/system/certs.c b/lib/system/certs.c +index 611c645..b1eb414 100644 +--- a/lib/system/certs.c ++++ b/lib/system/certs.c +@@ -278,7 +278,7 @@ int add_system_trust(gnutls_x509_trust_list_t list, unsigned int tl_flags, + } + #elif defined(__APPLE__) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070 + static +-int osstatus_error(status) ++int osstatus_error(OSStatus status) + { + CFStringRef err_str = SecCopyErrorMessageString(status, NULL); + _gnutls_debug_log("Error loading system root certificates: %s\n", diff --git a/recipes/gnutls/all/patches/3.8.2-0001-ossstaues-argument-fix.patch b/recipes/gnutls/all/patches/3.8.2-0001-ossstaues-argument-fix.patch new file mode 100644 index 0000000000000..efe2c3114f52e --- /dev/null +++ b/recipes/gnutls/all/patches/3.8.2-0001-ossstaues-argument-fix.patch @@ -0,0 +1,26 @@ +From 925b7072ac1a242b0968f889585e61993f9ca449 Mon Sep 17 00:00:00 2001 +From: Mark Harfouche +Date: Mon, 27 Nov 2023 12:20:23 +0000 +Subject: [PATCH] specify osstatus_error takes in an OSStatus as its first + argument + +Signed-off-by: Mark Harfouche +--- + lib/system/certs.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/lib/system/certs.c b/lib/system/certs.c +index 9619ed18c1..779d928609 100644 +--- a/lib/system/certs.c ++++ b/lib/system/certs.c +@@ -289,7 +289,7 @@ static int add_system_trust(gnutls_x509_trust_list_t list, + return r; + } + #elif defined(__APPLE__) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070 +-static int osstatus_error(status) ++static int osstatus_error(OSStatus status) + { + CFStringRef err_str = SecCopyErrorMessageString(status, NULL); + _gnutls_debug_log("Error loading system root certificates: %s\n", +-- +GitLab diff --git a/recipes/gnutls/config.yml b/recipes/gnutls/config.yml index 4a62e6bbb26e7..70ce87bedbde5 100644 --- a/recipes/gnutls/config.yml +++ b/recipes/gnutls/config.yml @@ -1,4 +1,6 @@ versions: + "3.8.7": + folder: "all" "3.8.2": folder: "all" "3.7.8": diff --git a/recipes/gobject-introspection/all/conandata.yml b/recipes/gobject-introspection/all/conandata.yml index 47eccc41d1faf..4203b61eacd08 100644 --- a/recipes/gobject-introspection/all/conandata.yml +++ b/recipes/gobject-introspection/all/conandata.yml @@ -1,19 +1,7 @@ sources: + "1.78.1": + url: "https://download.gnome.org/sources/gobject-introspection/1.78/gobject-introspection-1.78.1.tar.xz" + sha256: "bd7babd99af7258e76819e45ba4a6bc399608fe762d83fde3cac033c50841bb4" "1.72.0": - sha256: "02fe8e590861d88f83060dd39cda5ccaa60b2da1d21d0f95499301b186beaabc" url: "https://download.gnome.org/sources/gobject-introspection/1.72/gobject-introspection-1.72.0.tar.xz" - "1.70.0": - url: "https://download.gnome.org/sources/gobject-introspection/1.70/gobject-introspection-1.70.0.tar.xz" - sha256: "902b4906e3102d17aa2fcb6dad1c19971c70f2a82a159ddc4a94df73a3cafc4a" - "1.69.0": - url: "https://download.gnome.org/sources/gobject-introspection/1.69/gobject-introspection-1.69.0.tar.xz" - sha256: "c668cbe4a3aad7539e2cf669ab576ce7fbadac6890472f4095ca215dbbebee99" - "1.68.0": - url: "https://download.gnome.org/sources/gobject-introspection/1.68/gobject-introspection-1.68.0.tar.xz" - sha256: "d229242481a201b84a0c66716de1752bca41db4133672cfcfb37c93eb6e54a27" - "1.67.1": - url: "https://download.gnome.org/sources/gobject-introspection/1.67/gobject-introspection-1.67.1.tar.xz" - sha256: "9635184d668794609f9fe661c5bde11c106385d26c3babe291c24e3655987e47" - "1.66.1": - url: "https://download.gnome.org/sources/gobject-introspection/1.66/gobject-introspection-1.66.1.tar.xz" - sha256: "dd44a55ee5f426ea22b6b89624708f9e8d53f5cc94e5485c15c87cb30e06161d" + sha256: "02fe8e590861d88f83060dd39cda5ccaa60b2da1d21d0f95499301b186beaabc" diff --git a/recipes/gobject-introspection/all/conanfile.py b/recipes/gobject-introspection/all/conanfile.py index 4e30ffbb5f86f..74c5c3b60e338 100644 --- a/recipes/gobject-introspection/all/conanfile.py +++ b/recipes/gobject-introspection/all/conanfile.py @@ -1,129 +1,188 @@ -from conans import ConanFile, tools, Meson, VisualStudioBuildEnvironment -from conans.errors import ConanInvalidConfiguration import os -import shutil -import glob -required_conan_version = ">=1.36.0" +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.build import cross_building +from conan.tools.env import VirtualBuildEnv, VirtualRunEnv +from conan.tools.files import copy, get, replace_in_file, rm, rmdir +from conan.tools.gnu import PkgConfigDeps +from conan.tools.layout import basic_layout +from conan.tools.meson import MesonToolchain, Meson +from conan.tools.env import Environment +from conan.tools.apple import fix_apple_shared_install_name +from conan.tools.scm import Version +from conan import conan_version + +required_conan_version = ">=1.60.0 <2.0 || >=2.0.5" + class GobjectIntrospectionConan(ConanFile): name = "gobject-introspection" - description = "GObject introspection is a middleware layer between C libraries (using GObject) and language bindings" - topics = ("conan", "gobject-instrospection") + description = ("GObject introspection is a middleware layer between " + "C libraries (using GObject) and language bindings") + license = "LGPL-2.1-or-later" url = "https://github.com/conan-io/conan-center-index" homepage = "https://gitlab.gnome.org/GNOME/gobject-introspection" - license = "LGPL-2.1" - settings = "os", "arch", "compiler", "build_type" - options = {"shared": [True, False], "fPIC": [True, False]} - default_options = {"shared": False, "fPIC": True} - _source_subfolder = "source_subfolder" - _build_subfolder = "build_subfolder" - generators = "pkg_config" + topics = ("gobject-instrospection",) - @property - def _is_msvc(self): - return self.settings.compiler == "Visual Studio" - - def configure(self): - if self.options.shared: - del self.options.fPIC - del self.settings.compiler.libcxx - del self.settings.compiler.cppstd + package_type = "shared-library" + settings = "os", "arch", "compiler", "build_type" + options = { + "fPIC": [True, False], + "build_introspection_data": [True, False], + } + default_options = { + "fPIC": True, + "build_introspection_data": True, + } + short_paths = True def config_options(self): if self.settings.os == "Windows": del self.options.fPIC - if self.settings.os == "Windows": - raise ConanInvalidConfiguration("%s recipe does not support windows. Contributions are welcome!" % self.name) + if self.settings.os in ["Windows", "Macos"] or cross_building(self): + # FIXME: tools/g-ir-scanner fails to load glib + self.options.build_introspection_data = False + + def configure(self): + self.settings.rm_safe("compiler.libcxx") + self.settings.rm_safe("compiler.cppstd") + if self.options.get_safe("build_introspection_data"): + # INFO: g-ir-scanner looks for dynamic glib and gobject libraries when running + self.options["glib"].shared = True + + def layout(self): + basic_layout(self, src_folder="src") + + def requirements(self): + # https://gitlab.gnome.org/GNOME/gobject-introspection/-/blob/1.76.1/meson.build?ref_type=tags#L127-131 + self.requires("glib/2.78.3", transitive_headers=True, transitive_libs=True) + # ffi.h is exposed by public header gobject-introspection-1.0/girffi.h + self.requires("libffi/3.4.4", transitive_headers=True) + + def validate(self): + if self.settings.os == "Windows" and self.settings.build_type == "Debug": + # fatal error LNK1104: cannot open file 'python37_d.lib' + raise ConanInvalidConfiguration( + f"{self.ref} debug build on Windows is disabled due to debug version of Python libs likely not being available. Contributions to fix this are welcome.") + if self.options.build_introspection_data and not self.dependencies["glib"].options.shared: + # FIXME: tools/g-ir-scanner fails to load glib + # tools/g-ir-scanner --output=gir/GLib-2.0.gir ... + # ERROR: can't resolve libraries to shared libraries: glib-2.0, gobject-2.0 + raise ConanInvalidConfiguration(f"{self.ref} requires shared glib to be built as shared. Use -o 'glib/*:shared=True'.") + if self.options.build_introspection_data and self.settings.os in ["Windows", "Macos"]: + # FIXME: tools/g-ir-scanner', '--output=gir/GLib-2.0.gir' ... ERROR: can't resolve libraries to shared libraries: glib-2.0, gobject-2.0 + # FIXME: g-ir-scanner fails to find libgnuintl + # giscanner/_giscanner.cpython-37m-darwin.so, 0x0002): Library not loaded: /lib/libgnuintl.8.dylib + raise ConanInvalidConfiguration(f"{self.ref} fails to run g-ir-scanner due glib loaded as shared. Use -o 'glib/*:shared=False'. Contributions to fix this are welcome.") + if self.options.build_introspection_data and cross_building(self): + raise ConanInvalidConfiguration(f"{self.ref} build_introspection_data is not supported when cross-building. Use '&:build_introspection_data=False'.") def build_requirements(self): - if tools.Version(self.version) >= "1.71.0": - self.build_requires("meson/0.62.2") - else: - # https://gitlab.gnome.org/GNOME/gobject-introspection/-/issues/414 - self.build_requires("meson/0.59.3") - self.build_requires("pkgconf/1.7.4") + self.tool_requires("meson/[>=1.2.3 <2]") + if not self.conf.get("tools.gnu:pkg_config", default=False, check_type=str): + self.tool_requires("pkgconf/[>=2.2 <3]") if self.settings.os == "Windows": - self.build_requires("winflexbison/2.5.24") + self.tool_requires("winflexbison/2.5.25") else: - self.build_requires("flex/2.6.4") - self.build_requires("bison/3.7.6") - - def requirements(self): - self.requires("glib/2.73.0") + self.tool_requires("flex/2.6.4") + self.tool_requires("bison/3.8.2") + self.tool_requires("glib/") def source(self): - tools.get(**self.conan_data["sources"][self.version], strip_root=True, destination=self._source_subfolder) - - def _configure_meson(self): - meson = Meson(self) - defs = dict() - defs["build_introspection_data"] = self.options["glib"].shared - defs["datadir"] = os.path.join(self.package_folder, "res") - - meson.configure( - source_folder=self._source_subfolder, - args=["--wrap-mode=nofallback"], - build_folder=self._build_subfolder, - defs=defs, - ) - return meson + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + env = VirtualBuildEnv(self) + env.generate() + if not cross_building(self): + env = VirtualRunEnv(self) + env.generate(scope="build") + tc = MesonToolchain(self) + if cross_building(self): + tc.project_options["gi_cross_use_prebuilt_gi"] = "false" + tc.project_options["build_introspection_data"] = self.options.build_introspection_data + tc.project_options["datadir"] = "res" + tc.generate() + deps = PkgConfigDeps(self) + deps.generate() + # INFO: g-ir-scanner uses PKG_CONFIG_PATH directly instead of pkg-config Meson module + env = Environment() + env.define_path("PKG_CONFIG_PATH", self.generators_folder) + envvars = env.vars(self) + envvars.save_script("pkg_config_env") + + def _patch_sources(self): + # Disable tests + replace_in_file(self, os.path.join(self.source_folder, "meson.build"), + "subdir('tests')", + "#subdir('tests')") + # Look for data files in res/ instead of share/ + replace_in_file(self, os.path.join(self.source_folder, "tools", "g-ir-tool-template.in"), + "os.path.join(filedir, '..', 'share')", + "os.path.join(filedir, '..', 'res')") + if Version(conan_version) < "2": + # INFO: Conan 1.x generates PkgConfigDeps with libdir1 and includedir1 variables only for glib due its modules + replace_in_file(self, os.path.join(self.source_folder, "gir", "meson.build"), + "glib_dep.get_variable(pkgconfig: 'libdir')", + "glib_dep.get_variable(pkgconfig: 'libdir1')") + replace_in_file(self, os.path.join(self.source_folder, "gir", "meson.build"), + "join_paths(glib_dep.get_variable(pkgconfig: 'includedir'), 'glib-2.0')", + "join_paths(glib_dep.get_variable(pkgconfig: 'includedir1'), 'glib-2.0')") + # gir/meson.build expects the gio-unix-2.0 includedir to be passed as a build flag. + # Patch this for glib from Conan. + replace_in_file(self, os.path.join(self.source_folder, "gir", "meson.build"), + "join_paths(giounix_dep.get_variable(pkgconfig: 'includedir'), 'gio-unix-2.0')", + "giounix_dep.get_variable(pkgconfig: 'includedir1')") + else: + # gir/meson.build expects the gio-unix-2.0 includedir to be passed as a build flag. + # Patch this for glib from Conan. + replace_in_file(self, os.path.join(self.source_folder, "gir", "meson.build"), + "join_paths(giounix_dep.get_variable(pkgconfig: 'includedir'), 'gio-unix-2.0')", + "giounix_dep.get_variable(pkgconfig: 'includedir')") def build(self): - tools.replace_in_file( - os.path.join(self._source_subfolder, "meson.build"), - "subdir('tests')", - "#subdir('tests')", - ) - tools.replace_in_file( - os.path.join(self._source_subfolder, "meson.build"), - "if meson.version().version_compare('>=0.54.0')", - "if false", - ) - - with tools.environment_append( - VisualStudioBuildEnvironment(self).vars - if self._is_msvc - else {"PKG_CONFIG_PATH": self.build_folder} - ): - meson = self._configure_meson() - meson.build() + self._patch_sources() + meson = Meson(self) + meson.configure() + meson.build() def package(self): - self.copy(pattern="COPYING", dst="licenses", src=self._source_subfolder) - with tools.environment_append( - VisualStudioBuildEnvironment(self).vars - ) if self._is_msvc else tools.no_op(): - meson = self._configure_meson() - meson.install() - tools.rmdir(os.path.join(self.package_folder, "lib", "pkgconfig")) - tools.rmdir(os.path.join(self.package_folder, "share")) - for pdb_file in glob.glob(os.path.join(self.package_folder, "bin", "*.pdb")): - os.unlink(pdb_file) + copy(self, "COPYING", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) + meson = Meson(self) + meson.install() + rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) + rmdir(self, os.path.join(self.package_folder, "share")) + rm(self, "*.pdb", self.package_folder, recursive=True) + fix_apple_shared_install_name(self) def package_info(self): - self.cpp_info.names["pkg_config"] = "gobject-introspection-1.0" + self.cpp_info.set_property("pkg_config_name", "gobject-introspection-1.0") self.cpp_info.libs = ["girepository-1.0"] - self.cpp_info.includedirs.append( - os.path.join("include", "gobject-introspection-1.0") - ) - - bin_path = os.path.join(self.package_folder, "bin") - self.output.info("Appending PATH env var with: {}".format(bin_path)) - self.env_info.PATH.append(bin_path) + self.cpp_info.includedirs.append(os.path.join("include", "gobject-introspection-1.0")) exe_ext = ".exe" if self.settings.os == "Windows" else "" pkgconfig_variables = { - 'datadir': '${prefix}/res', - 'bindir': '${prefix}/bin', - 'g_ir_scanner': '${bindir}/g-ir-scanner', - 'g_ir_compiler': '${bindir}/g-ir-compiler%s' % exe_ext, - 'g_ir_generate': '${bindir}/g-ir-generate%s' % exe_ext, - 'gidatadir': '${datadir}/gobject-introspection-1.0', - 'girdir': '${datadir}/gir-1.0', - 'typelibdir': '${libdir}/girepository-1.0', + "datadir": "${prefix}/res", + "bindir": "${prefix}/bin", + "libdir": "${prefix}/lib", + "g_ir_scanner": "${bindir}/g-ir-scanner", + "g_ir_compiler": "${bindir}/g-ir-compiler%s" % exe_ext, + "g_ir_generate": "${bindir}/g-ir-generate%s" % exe_ext, + "gidatadir": "${datadir}/gobject-introspection-1.0", + "girdir": "${datadir}/gir-1.0", + "typelibdir": "${libdir}/girepository-1.0", } self.cpp_info.set_property( "pkg_config_custom_content", - "\n".join("%s=%s" % (key, value) for key,value in pkgconfig_variables.items())) + "\n".join(f"{key}={value}" for key, value in pkgconfig_variables.items()), + ) + self.buildenv_info.define_path("GI_GIR_PATH", os.path.join(self.package_folder, "res", "gir-1.0")) + self.buildenv_info.define_path("GI_TYPELIB_PATH", os.path.join(self.package_folder, "lib", "girepository-1.0")) + + # TODO: remove in conan v2 + bin_path = os.path.join(self.package_folder, "bin") + self.env_info.PATH.append(bin_path) + self.env_info.GI_GIR_PATH = os.path.join(self.package_folder, "res", "gir-1.0") + self.env_info.GI_TYPELIB_PATH = os.path.join(self.package_folder, "lib", "girepository-1.0") diff --git a/recipes/gobject-introspection/all/test_package/CMakeLists.txt b/recipes/gobject-introspection/all/test_package/CMakeLists.txt index 7b9b613cbb24a..228388b92ebea 100644 --- a/recipes/gobject-introspection/all/test_package/CMakeLists.txt +++ b/recipes/gobject-introspection/all/test_package/CMakeLists.txt @@ -1,8 +1,12 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.15) project(test_package C) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup() +find_package(gobject-introspection REQUIRED CONFIG) -add_executable(${PROJECT_NAME} test_package.c) -target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS}) +add_executable(test_basic test_basic.c) +target_link_libraries(test_basic PRIVATE gobject-introspection::gobject-introspection) + +if(GLIB_INTROSPECTION_DATA_AVAILABLE) + add_executable(test_girepository test_girepository.c) + target_link_libraries(test_girepository PRIVATE gobject-introspection::gobject-introspection) +endif() diff --git a/recipes/gobject-introspection/all/test_package/conanfile.py b/recipes/gobject-introspection/all/test_package/conanfile.py index 32d4b65e5f11e..ec823a4f6e977 100644 --- a/recipes/gobject-introspection/all/test_package/conanfile.py +++ b/recipes/gobject-introspection/all/test_package/conanfile.py @@ -1,26 +1,57 @@ -from conans import ConanFile, CMake, tools import os +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake, CMakeToolchain +from conan.tools.files import save, load +from conan.tools.apple import is_apple_os + class TestPackageConan(ConanFile): - settings = "os", "compiler", "build_type", "arch" - generators = "cmake", "cmake_find_package", "pkg_config" + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "VirtualRunEnv" + test_type = "explicit" - def build(self): - if self.settings.os != 'Windows': - with tools.environment_append({'PKG_CONFIG_PATH': "."}): - pkg_config = tools.PkgConfig("gobject-introspection-1.0") - for tool in ["g_ir_compiler", "g_ir_generate", "g_ir_scanner"]: - self.run('%s --version' % pkg_config.variables[tool], run_environment=True) - self.run('g-ir-annotation-tool --version', run_environment=True) - self.run('g-ir-inspect -h', run_environment=True) + def requirements(self): + self.requires(self.tested_reference_str, run=True) + + def layout(self): + cmake_layout(self) + def generate(self): + introspection_data = self.dependencies["glib"].options.shared and not is_apple_os(self) + tc = CMakeToolchain(self) + tc.variables["GLIB_INTROSPECTION_DATA_AVAILABLE"] = introspection_data + tc.generate() + save(self, os.path.join(self.build_folder, "gobject_introspection_data"), str(introspection_data)) + save(self, os.path.join(self.build_folder, "gobject_introspection_bin"), + self.dependencies["gobject-introspection"].cpp_info.bindirs[0]) + + def build(self): cmake = CMake(self) cmake.configure() cmake.build() def test(self): - if not tools.cross_building(self): - bin_path = os.path.join("bin", "test_package") - self.run(bin_path, run_environment=True) + if can_run(self): + if self.settings.os != "Windows": + gobject_introspection_bin = load(self, os.path.join(self.build_folder, "gobject_introspection_bin")) + gobject_introspection_data = load(self, os.path.join(self.build_folder, "gobject_introspection_data")) == "True" + for tool in ["g-ir-compiler", "g-ir-generate", "g-ir-scanner", "g-ir-annotation-tool"]: + if not gobject_introspection_data and tool in ["g-ir-scanner", "g-ir-annotation-tool"]: + continue + tool_path = os.path.join(gobject_introspection_bin, tool) + if os.path.exists(tool_path): + self.run(f"{tool_path} --version", env="conanrun") + else: + raise Exception(f"Tool {tool} not found in {gobject_introspection_bin}") + tool_path = os.path.join(gobject_introspection_bin, "g-ir-inspect") + if os.path.exists(tool_path): + self.run(f"{tool_path} -h", env="conanrun") + + bin_path = os.path.join(self.cpp.build.bindir, "test_basic") + self.run(bin_path, env="conanrun") + bin_path = os.path.join(self.cpp.build.bindir, "test_girepository") + if os.path.exists(bin_path): + self.run(bin_path, env="conanrun") diff --git a/recipes/gobject-introspection/all/test_package/test_basic.c b/recipes/gobject-introspection/all/test_package/test_basic.c new file mode 100644 index 0000000000000..44d8cd552ebdd --- /dev/null +++ b/recipes/gobject-introspection/all/test_package/test_basic.c @@ -0,0 +1,12 @@ +#include +#include + +#include "girepository.h" + +int main(void) { + printf("gobject introspection version %d.%d.%d\n", + gi_get_major_version(), + gi_get_minor_version(), + gi_get_micro_version()); + return EXIT_SUCCESS; +} diff --git a/recipes/gobject-introspection/all/test_package/test_girepository.c b/recipes/gobject-introspection/all/test_package/test_girepository.c new file mode 100644 index 0000000000000..d6994f8155c80 --- /dev/null +++ b/recipes/gobject-introspection/all/test_package/test_girepository.c @@ -0,0 +1,7 @@ +#include +#include "girepository.h" + +int main() { + GIRepository* repository = g_irepository_get_default(); + return EXIT_SUCCESS; +} diff --git a/recipes/gobject-introspection/all/test_package/test_package.c b/recipes/gobject-introspection/all/test_package/test_package.c deleted file mode 100644 index c1b18cd52e49e..0000000000000 --- a/recipes/gobject-introspection/all/test_package/test_package.c +++ /dev/null @@ -1,12 +0,0 @@ -#include - -#include "girepository.h" - -int main(int argc, char **argv) -{ - printf("gobject introspection version %d.%d.%d\n", - gi_get_major_version(), - gi_get_minor_version(), - gi_get_micro_version()); - return 0; -} diff --git a/recipes/gobject-introspection/all/test_v1_package/CMakeLists.txt b/recipes/gobject-introspection/all/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..91630d79f4abb --- /dev/null +++ b/recipes/gobject-introspection/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/gobject-introspection/all/test_v1_package/conanfile.py b/recipes/gobject-introspection/all/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..52695b0ce44eb --- /dev/null +++ b/recipes/gobject-introspection/all/test_v1_package/conanfile.py @@ -0,0 +1,17 @@ +from conans import ConanFile, CMake, tools +import os + + +class TestPackageConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake", "cmake_find_package_multi" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if not tools.cross_building(self): + bin_path = os.path.join("bin", "test_basic") + self.run(bin_path, run_environment=True) diff --git a/recipes/gobject-introspection/config.yml b/recipes/gobject-introspection/config.yml index 06afabf3f5bc4..42a826aff4ed3 100644 --- a/recipes/gobject-introspection/config.yml +++ b/recipes/gobject-introspection/config.yml @@ -1,13 +1,5 @@ versions: - "1.72.0": - folder: all - "1.70.0": - folder: all - "1.69.0": + "1.78.1": folder: all - "1.68.0": - folder: all - "1.67.1": - folder: all - "1.66.1": + "1.72.0": folder: all diff --git a/recipes/google-cloud-cpp/2.x/components_2_12_0.py b/recipes/google-cloud-cpp/2.x/components_2_12_0.py deleted file mode 100644 index 943f3345fcb41..0000000000000 --- a/recipes/google-cloud-cpp/2.x/components_2_12_0.py +++ /dev/null @@ -1,411 +0,0 @@ -# Automatically generated by /usr/local/google/home/coryan/cci-develop/recipes/google-cloud-cpp/2.x/extract_dependencies.py DO NOT EDIT -DEPENDENCIES = { - "accessapproval_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf'], - "accesscontextmanager_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_iam_policy_protos', 'iam_v1_options_protos', 'iam_v1_policy_protos', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_expr_protos'], - "advisorynotifications_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf'], - "aiplatform_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_httpbody_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_interval_protos', 'type_money_protos'], - "alloydb_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_dayofweek_protos', 'type_timeofday_protos'], - "apigateway_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], - "apigeeconnect_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf', 'rpc_status_protos'], - "apikeys_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], - "appengine_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'logging_type_type_protos', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], - "artifactregistry_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_iam_policy_protos', 'iam_v1_options_protos', 'iam_v1_policy_protos', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_expr_protos'], - "asset_protos": ['accesscontextmanager_protos', 'api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_iam_policy_protos', 'iam_v1_options_protos', 'iam_v1_policy_protos', 'longrunning_operations_protos', 'osconfig_protos', 'protobuf::libprotobuf', 'rpc_code_protos', 'rpc_status_protos', 'type_date_protos', 'type_datetime_protos', 'type_dayofweek_protos', 'type_expr_protos', 'type_timeofday_protos'], - "assuredworkloads_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], - "automl_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], - "baremetalsolution_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], - "batch_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], - "beyondcorp_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], - "cloud_bigquery_protos": ['api_annotations_protos', 'api_client_protos', 'api_distribution_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_label_protos', 'api_launch_stage_protos', 'api_metric_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_iam_policy_protos', 'iam_v1_options_protos', 'iam_v1_policy_protos', 'protobuf::libprotobuf', 'rpc_error_details_protos', 'rpc_status_protos', 'type_expr_protos'], - "bigtable_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'api_routing_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_iam_policy_protos', 'iam_v1_options_protos', 'iam_v1_policy_protos', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_expr_protos'], - "billing_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_iam_policy_protos', 'iam_v1_options_protos', 'iam_v1_policy_protos', 'protobuf::libprotobuf', 'type_date_protos', 'type_expr_protos', 'type_money_protos'], - "binaryauthorization_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grafeas_protos', 'grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf', 'rpc_status_protos'], - "certificatemanager_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], - "channel_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_date_protos', 'type_datetime_protos', 'type_decimal_protos', 'type_money_protos', 'type_postal_address_protos'], - "cloudbuild_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_httpbody_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], - "cloud_common_common_protos": ['api_field_behavior_protos', 'grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf'], - "composer_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_date_protos'], - "confidentialcomputing_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf'], - "connectors_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], - "contactcenterinsights_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], - "container_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf', 'rpc_code_protos', 'rpc_status_protos'], - "containeranalysis_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grafeas_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_iam_policy_protos', 'iam_v1_options_protos', 'iam_v1_policy_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_expr_protos'], - "contentwarehouse_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'documentai_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_policy_protos', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_color_protos', 'type_date_protos', 'type_datetime_protos', 'type_expr_protos', 'type_interval_protos', 'type_money_protos', 'type_postal_address_protos'], - "datacatalog_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_iam_policy_protos', 'iam_v1_options_protos', 'iam_v1_policy_protos', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_expr_protos'], - "datamigration_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_iam_policy_protos', 'iam_v1_options_protos', 'iam_v1_policy_protos', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_expr_protos'], - "dataplex_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_iam_policy_protos', 'iam_v1_options_protos', 'iam_v1_policy_protos', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_expr_protos'], - "dataproc_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], - "datastream_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], - "deploy_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_date_protos'], - "cloud_dialogflow_v2_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_latlng_protos'], - "dialogflow_cx_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_latlng_protos'], - "dlp_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_date_protos', 'type_dayofweek_protos', 'type_timeofday_protos'], - "documentai_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_color_protos', 'type_date_protos', 'type_datetime_protos', 'type_money_protos', 'type_postal_address_protos'], - "domains_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_money_protos', 'type_postal_address_protos'], - "edgecontainer_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], - "essentialcontacts_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf'], - "eventarc_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_code_protos', 'rpc_status_protos'], - "filestore_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'cloud_common_common_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], - "functions_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_iam_policy_protos', 'iam_v1_options_protos', 'iam_v1_policy_protos', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_expr_protos'], - "gameservices_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], - "gkebackup_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], - "gkehub_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], - "gkemulticloud_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], - "grafeas_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf', 'rpc_status_protos'], - "iam_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_iam_policy_protos', 'iam_v1_options_protos', 'iam_v1_policy_protos', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_expr_protos'], - "iap_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_iam_policy_protos', 'iam_v1_options_protos', 'iam_v1_policy_protos', 'protobuf::libprotobuf', 'type_expr_protos'], - "ids_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], - "iot_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_iam_policy_protos', 'iam_v1_options_protos', 'iam_v1_policy_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_expr_protos'], - "kms_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf'], - "language_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf'], - "logging_protos": ['api_annotations_protos', 'api_client_protos', 'api_distribution_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_label_protos', 'api_launch_stage_protos', 'api_metric_protos', 'api_monitored_resource_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'logging_type_type_protos', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], - "logging_type_type_protos": ['grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf'], - "managedidentities_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], - "memcache_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_dayofweek_protos', 'type_timeofday_protos'], - "monitoring_protos": ['api_annotations_protos', 'api_client_protos', 'api_distribution_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_label_protos', 'api_launch_stage_protos', 'api_metric_protos', 'api_monitored_resource_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_calendar_period_protos'], - "networkconnectivity_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], - "networkmanagement_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], - "networkservices_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], - "notebooks_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], - "optimization_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_latlng_protos'], - "orgpolicy_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf', 'type_expr_protos'], - "osconfig_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_date_protos', 'type_datetime_protos', 'type_dayofweek_protos', 'type_timeofday_protos'], - "oslogin_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf'], - "policytroubleshooter_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_policy_protos', 'protobuf::libprotobuf', 'type_expr_protos'], - "privateca_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_expr_protos'], - "profiler_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf'], - "pubsub_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf'], - "recaptchaenterprise_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf'], - "recommender_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf', 'type_money_protos'], - "redis_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_dayofweek_protos', 'type_timeofday_protos'], - "resourcemanager_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_iam_policy_protos', 'iam_v1_options_protos', 'iam_v1_policy_protos', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_expr_protos'], - "resourcesettings_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf'], - "retail_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_httpbody_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_date_protos'], - "run_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'api_routing_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_iam_policy_protos', 'iam_v1_options_protos', 'iam_v1_policy_protos', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_expr_protos'], - "scheduler_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf', 'rpc_status_protos'], - "secretmanager_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_iam_policy_protos', 'iam_v1_options_protos', 'iam_v1_policy_protos', 'protobuf::libprotobuf', 'type_expr_protos'], - "securitycenter_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_iam_policy_protos', 'iam_v1_options_protos', 'iam_v1_policy_protos', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_expr_protos'], - "servicecontrol_protos": ['api_annotations_protos', 'api_client_protos', 'api_distribution_protos', 'api_http_protos', 'api_launch_stage_protos', 'grpc::_grpc', 'grpc::grpc++', 'logging_type_type_protos', 'protobuf::libprotobuf', 'rpc_context_attribute_context_protos', 'rpc_status_protos'], - "servicedirectory_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_iam_policy_protos', 'iam_v1_options_protos', 'iam_v1_policy_protos', 'protobuf::libprotobuf', 'type_expr_protos'], - "servicemanagement_protos": ['api_annotations_protos', 'api_auth_protos', 'api_backend_protos', 'api_billing_protos', 'api_client_protos', 'api_config_change_protos', 'api_context_protos', 'api_control_protos', 'api_documentation_protos', 'api_endpoint_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_label_protos', 'api_launch_stage_protos', 'api_log_protos', 'api_logging_protos', 'api_metric_protos', 'api_monitored_resource_protos', 'api_monitoring_protos', 'api_quota_protos', 'api_resource_protos', 'api_service_protos', 'api_source_info_protos', 'api_system_parameter_protos', 'api_usage_protos', 'api_visibility_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], - "serviceusage_protos": ['api_annotations_protos', 'api_auth_protos', 'api_client_protos', 'api_documentation_protos', 'api_endpoint_protos', 'api_http_protos', 'api_label_protos', 'api_launch_stage_protos', 'api_monitored_resource_protos', 'api_monitoring_protos', 'api_quota_protos', 'api_usage_protos', 'api_visibility_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], - "shell_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], - "spanner_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_iam_policy_protos', 'iam_v1_options_protos', 'iam_v1_policy_protos', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_expr_protos'], - "cloud_speech_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], - "storage_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'api_routing_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_iam_policy_protos', 'iam_v1_options_protos', 'iam_v1_policy_protos', 'protobuf::libprotobuf', 'type_date_protos', 'type_expr_protos'], - "storageinsights_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_date_protos', 'type_datetime_protos'], - "storagetransfer_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_code_protos', 'rpc_status_protos', 'type_date_protos', 'type_timeofday_protos'], - "support_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], - "talent_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_latlng_protos', 'type_money_protos', 'type_postal_address_protos', 'type_timeofday_protos'], - "tasks_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_iam_policy_protos', 'iam_v1_options_protos', 'iam_v1_policy_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_expr_protos'], - "cloud_texttospeech_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], - "timeseriesinsights_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf', 'rpc_status_protos'], - "tpu_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], - "devtools_cloudtrace_v2_trace_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf', 'rpc_status_protos'], - "translate_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], - "video_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_datetime_protos'], - "videointelligence_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], - "vision_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_color_protos', 'type_latlng_protos'], - "vmmigration_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_error_details_protos', 'rpc_status_protos'], - "vmwareengine_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], - "vpcaccess_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], - "webrisk_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], - "websecurityscanner_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf'], - "workflows_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], - "workstations_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], - "api_annotations_protos": ['api_http_protos'], - "api_auth_protos": ['api_annotations_protos'], - "api_billing_protos": ['api_annotations_protos', 'api_metric_protos'], - "api_client_protos": ['api_launch_stage_protos'], - "api_distribution_protos": ['api_annotations_protos'], - "api_endpoint_protos": ['api_annotations_protos'], - "api_log_protos": ['api_label_protos'], - "api_logging_protos": ['api_annotations_protos', 'api_label_protos'], - "api_metric_protos": ['api_label_protos', 'api_launch_stage_protos'], - "api_monitored_resource_protos": ['api_label_protos', 'api_launch_stage_protos'], - "api_monitoring_protos": ['api_annotations_protos'], - "api_quota_protos": ['api_annotations_protos'], - "api_service_protos": ['api_annotations_protos', 'api_auth_protos', 'api_backend_protos', 'api_billing_protos', 'api_client_protos', 'api_context_protos', 'api_control_protos', 'api_documentation_protos', 'api_endpoint_protos', 'api_http_protos', 'api_label_protos', 'api_log_protos', 'api_logging_protos', 'api_metric_protos', 'api_monitored_resource_protos', 'api_monitoring_protos', 'api_quota_protos', 'api_resource_protos', 'api_source_info_protos', 'api_system_parameter_protos', 'api_usage_protos'], - "api_usage_protos": ['api_annotations_protos', 'api_visibility_protos'], - "devtools_cloudtrace_v2_tracing_protos": ['api_client_protos', 'api_field_behavior_protos', 'devtools_cloudtrace_v2_trace_protos', 'devtools_cloudtrace_v2_trace_protos', 'rpc_status_protos'], -} - -PROTO_COMPONENTS = { - "accessapproval_protos", - "accesscontextmanager_protos", - "advisorynotifications_protos", - "aiplatform_protos", - "alloydb_protos", - "api_annotations_protos", - "api_auth_protos", - "api_backend_protos", - "api_billing_protos", - "api_client_protos", - "api_config_change_protos", - "api_context_protos", - "api_control_protos", - "api_distribution_protos", - "api_documentation_protos", - "api_endpoint_protos", - "api_field_behavior_protos", - "api_http_protos", - "api_httpbody_protos", - "api_label_protos", - "api_launch_stage_protos", - "api_log_protos", - "api_logging_protos", - "api_metric_protos", - "api_monitored_resource_protos", - "api_monitoring_protos", - "api_quota_protos", - "api_resource_protos", - "api_routing_protos", - "api_service_protos", - "api_source_info_protos", - "api_system_parameter_protos", - "api_usage_protos", - "api_visibility_protos", - "apigateway_protos", - "apigeeconnect_protos", - "apikeys_protos", - "appengine_protos", - "artifactregistry_protos", - "asset_protos", - "assuredworkloads_protos", - "automl_protos", - "baremetalsolution_protos", - "batch_protos", - "beyondcorp_protos", - "bigtable_protos", - "billing_protos", - "binaryauthorization_protos", - "certificatemanager_protos", - "channel_protos", - "cloud_bigquery_protos", - "cloud_common_common_protos", - "cloud_dialogflow_v2_protos", - "cloud_speech_protos", - "cloud_texttospeech_protos", - "cloudbuild_protos", - "composer_protos", - "confidentialcomputing_protos", - "connectors_protos", - "contactcenterinsights_protos", - "container_protos", - "containeranalysis_protos", - "contentwarehouse_protos", - "datacatalog_protos", - "datamigration_protos", - "dataplex_protos", - "dataproc_protos", - "datastream_protos", - "deploy_protos", - "devtools_cloudtrace_v2_trace_protos", - "devtools_cloudtrace_v2_tracing_protos", - "devtools_source_v1_source_context_protos", - "dialogflow_cx_protos", - "dlp_protos", - "documentai_protos", - "domains_protos", - "edgecontainer_protos", - "essentialcontacts_protos", - "eventarc_protos", - "filestore_protos", - "functions_protos", - "gameservices_protos", - "gkebackup_protos", - "gkehub_protos", - "gkemulticloud_protos", - "grafeas_protos", - "iam_protos", - "iam_v1_iam_policy_protos", - "iam_v1_options_protos", - "iam_v1_policy_protos", - "iap_protos", - "ids_protos", - "iot_protos", - "kms_protos", - "language_protos", - "logging_protos", - "logging_type_type_protos", - "longrunning_operations_protos", - "managedidentities_protos", - "memcache_protos", - "monitoring_protos", - "networkconnectivity_protos", - "networkmanagement_protos", - "networkservices_protos", - "notebooks_protos", - "optimization_protos", - "orgpolicy_protos", - "osconfig_protos", - "oslogin_protos", - "policytroubleshooter_protos", - "privateca_protos", - "profiler_protos", - "pubsub_protos", - "recaptchaenterprise_protos", - "recommender_protos", - "redis_protos", - "resourcemanager_protos", - "resourcesettings_protos", - "retail_protos", - "rpc_code_protos", - "rpc_context_attribute_context_protos", - "rpc_error_details_protos", - "rpc_status_protos", - "run_protos", - "scheduler_protos", - "secretmanager_protos", - "securitycenter_protos", - "servicecontrol_protos", - "servicedirectory_protos", - "servicemanagement_protos", - "serviceusage_protos", - "shell_protos", - "spanner_protos", - "storage_protos", - "storageinsights_protos", - "storagetransfer_protos", - "support_protos", - "talent_protos", - "tasks_protos", - "timeseriesinsights_protos", - "tpu_protos", - "translate_protos", - "type_calendar_period_protos", - "type_color_protos", - "type_date_protos", - "type_datetime_protos", - "type_dayofweek_protos", - "type_decimal_protos", - "type_expr_protos", - "type_interval_protos", - "type_latlng_protos", - "type_money_protos", - "type_postal_address_protos", - "type_timeofday_protos", - "video_protos", - "videointelligence_protos", - "vision_protos", - "vmmigration_protos", - "vmwareengine_protos", - "vpcaccess_protos", - "webrisk_protos", - "websecurityscanner_protos", - "workflows_protos", - "workstations_protos" -} - -COMPONENTS = { - "accessapproval", - "accesscontextmanager", - "advisorynotifications", - "aiplatform", - "alloydb", - "apigateway", - "apigeeconnect", - "apikeys", - "appengine", - "artifactregistry", - "asset", - "assuredworkloads", - "automl", - "baremetalsolution", - "batch", - "beyondcorp", - "bigquery", - "bigtable", - "billing", - "binaryauthorization", - "certificatemanager", - "channel", - "cloudbuild", - "composer", - "confidentialcomputing", - "connectors", - "contactcenterinsights", - "container", - "containeranalysis", - "contentwarehouse", - "datacatalog", - "datamigration", - "dataplex", - "dataproc", - "datastream", - "deploy", - "dialogflow_cx", - "dialogflow_es", - "dlp", - "documentai", - "domains", - "edgecontainer", - "essentialcontacts", - "eventarc", - "filestore", - "functions", - "gameservices", - "gkebackup", - "gkehub", - "gkemulticloud", - "iam", - "iap", - "ids", - "iot", - "kms", - "language", - "logging", - "managedidentities", - "memcache", - "monitoring", - "networkconnectivity", - "networkmanagement", - "networkservices", - "notebooks", - "optimization", - "orgpolicy", - "osconfig", - "oslogin", - "policytroubleshooter", - "privateca", - "profiler", - "pubsub", - "recaptchaenterprise", - "recommender", - "redis", - "resourcemanager", - "resourcesettings", - "retail", - "run", - "scheduler", - "secretmanager", - "securitycenter", - "servicecontrol", - "servicedirectory", - "servicemanagement", - "serviceusage", - "shell", - "spanner", - "speech", - "storage", - "storageinsights", - "storagetransfer", - "support", - "talent", - "tasks", - "texttospeech", - "timeseriesinsights", - "tpu", - "trace", - "translate", - "video", - "videointelligence", - "vision", - "vmmigration", - "vmwareengine", - "vpcaccess", - "webrisk", - "websecurityscanner", - "workflows", - "workstations" -} diff --git a/recipes/google-cloud-cpp/2.x/components_2_28_0.py b/recipes/google-cloud-cpp/2.x/components_2_28_0.py new file mode 100644 index 0000000000000..dafa862192730 --- /dev/null +++ b/recipes/google-cloud-cpp/2.x/components_2_28_0.py @@ -0,0 +1,573 @@ +# Automatically generated by /usr/local/google/home/dbolduc/code/git/conan-center-index/recipes/google-cloud-cpp/2.x/extract_dependencies.py DO NOT EDIT +DEPENDENCIES = { + "accessapproval_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf'], + "accesscontextmanager_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_iam_policy_protos', 'iam_v1_options_protos', 'iam_v1_policy_protos', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_expr_protos'], + "advisorynotifications_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf'], + "aiplatform_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_httpbody_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_date_protos', 'type_interval_protos', 'type_money_protos'], + "alloydb_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_dayofweek_protos', 'type_timeofday_protos'], + "apigateway_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], + "apigeeconnect_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf', 'rpc_status_protos'], + "apikeys_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], + "appengine_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'logging_type_protos', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], + "apphub_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_field_info_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], + "artifactregistry_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_iam_policy_protos', 'iam_v1_options_protos', 'iam_v1_policy_protos', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_expr_protos'], + "asset_protos": ['accesscontextmanager_protos', 'api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_iam_policy_protos', 'iam_v1_options_protos', 'iam_v1_policy_protos', 'longrunning_operations_protos', 'osconfig_protos', 'protobuf::libprotobuf', 'rpc_code_protos', 'rpc_status_protos', 'type_date_protos', 'type_datetime_protos', 'type_dayofweek_protos', 'type_expr_protos', 'type_timeofday_protos'], + "assuredworkloads_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], + "automl_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], + "backupdr_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], + "baremetalsolution_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], + "batch_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_field_info_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], + "beyondcorp_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], + "bigquery_protos": ['api_annotations_protos', 'api_client_protos', 'api_distribution_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_label_protos', 'api_launch_stage_protos', 'api_metric_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_iam_policy_protos', 'iam_v1_options_protos', 'iam_v1_policy_protos', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_error_details_protos', 'rpc_status_protos', 'type_expr_protos'], + "bigtable_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'api_routing_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_iam_policy_protos', 'iam_v1_options_protos', 'iam_v1_policy_protos', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_date_protos', 'type_expr_protos'], + "billing_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_iam_policy_protos', 'iam_v1_options_protos', 'iam_v1_policy_protos', 'protobuf::libprotobuf', 'type_date_protos', 'type_expr_protos', 'type_money_protos'], + "binaryauthorization_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grafeas_protos', 'grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf', 'rpc_status_protos'], + "certificatemanager_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], + "channel_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_date_protos', 'type_datetime_protos', 'type_decimal_protos', 'type_money_protos', 'type_postal_address_protos'], + "cloudbuild_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_httpbody_protos', 'api_launch_stage_protos', 'api_resource_protos', 'api_routing_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], + "cloudcontrolspartner_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf', 'type_interval_protos'], + "cloudquotas_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf'], + "commerce_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], + "cloud_common_common_protos": ['api_field_behavior_protos', 'grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf'], + "composer_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_date_protos'], + "confidentialcomputing_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf', 'rpc_status_protos'], + "config_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_field_info_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], + "connectors_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], + "contactcenterinsights_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], + "container_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf', 'rpc_code_protos', 'rpc_status_protos'], + "containeranalysis_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grafeas_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_iam_policy_protos', 'iam_v1_options_protos', 'iam_v1_policy_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_expr_protos'], + "contentwarehouse_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'documentai_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_policy_protos', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_color_protos', 'type_date_protos', 'type_datetime_protos', 'type_expr_protos', 'type_interval_protos', 'type_money_protos', 'type_postal_address_protos'], + "datacatalog_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_iam_policy_protos', 'iam_v1_options_protos', 'iam_v1_policy_protos', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_expr_protos'], + "datafusion_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], + "datamigration_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_iam_policy_protos', 'iam_v1_options_protos', 'iam_v1_policy_protos', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_expr_protos'], + "dataplex_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_iam_policy_protos', 'iam_v1_options_protos', 'iam_v1_policy_protos', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_expr_protos'], + "dataproc_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_interval_protos'], + "datastore_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_routing_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_latlng_protos'], + "datastream_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], + "deploy_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_date_protos'], + "developerconnect_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_field_info_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], + "dialogflow_cx_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_latlng_protos'], + "dialogflow_es_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_latlng_protos'], + "discoveryengine_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_httpbody_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_date_protos'], + "dlp_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_date_protos', 'type_dayofweek_protos', 'type_timeofday_protos'], + "documentai_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_color_protos', 'type_date_protos', 'type_datetime_protos', 'type_money_protos', 'type_postal_address_protos'], + "domains_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_money_protos', 'type_postal_address_protos'], + "edgecontainer_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], + "edgenetwork_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], + "essentialcontacts_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf'], + "eventarc_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_code_protos', 'rpc_status_protos'], + "filestore_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'cloud_common_common_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], + "functions_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_iam_policy_protos', 'iam_v1_options_protos', 'iam_v1_policy_protos', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_expr_protos'], + "gkebackup_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_date_protos', 'type_dayofweek_protos', 'type_timeofday_protos'], + "gkehub_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], + "gkemulticloud_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_date_protos'], + "grafeas_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf', 'rpc_status_protos'], + "iam_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_iam_policy_protos', 'iam_v1_options_protos', 'iam_v1_policy_protos', 'protobuf::libprotobuf', 'type_expr_protos'], + "iam_v2_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_expr_protos'], + "iap_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_iam_policy_protos', 'iam_v1_options_protos', 'iam_v1_policy_protos', 'protobuf::libprotobuf', 'type_expr_protos'], + "ids_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], + "kms_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], + "language_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf'], + "logging_protos": ['api_annotations_protos', 'api_client_protos', 'api_distribution_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_label_protos', 'api_launch_stage_protos', 'api_metric_protos', 'api_monitored_resource_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'logging_type_protos', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], + "logging_type_protos": ['grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf'], + "managedidentities_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], + "managedkafka_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_field_info_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], + "memcache_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_dayofweek_protos', 'type_timeofday_protos'], + "metastore_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_dayofweek_protos'], + "migrationcenter_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_date_protos', 'type_money_protos'], + "monitoring_protos": ['api_annotations_protos', 'api_client_protos', 'api_distribution_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_label_protos', 'api_launch_stage_protos', 'api_metric_protos', 'api_monitored_resource_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_calendar_period_protos', 'type_interval_protos'], + "netapp_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], + "networkconnectivity_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], + "networkmanagement_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_field_info_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], + "networksecurity_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], + "networkservices_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_field_info_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], + "notebooks_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], + "optimization_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_latlng_protos'], + "orgpolicy_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf', 'type_expr_protos'], + "osconfig_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_date_protos', 'type_datetime_protos', 'type_dayofweek_protos', 'type_timeofday_protos'], + "oslogin_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf'], + "policysimulator_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_policy_protos', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_date_protos', 'type_expr_protos'], + "policytroubleshooter_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_policy_protos', 'iam_v2_protos', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_expr_protos'], + "privateca_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_expr_protos'], + "privilegedaccessmanager_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], + "profiler_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf'], + "publicca_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf'], + "pubsub_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf'], + "rapidmigrationassessment_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], + "recaptchaenterprise_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_field_info_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf', 'rpc_status_protos'], + "recommender_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf', 'type_money_protos'], + "redis_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_dayofweek_protos', 'type_timeofday_protos'], + "resourcemanager_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_iam_policy_protos', 'iam_v1_options_protos', 'iam_v1_policy_protos', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_expr_protos'], + "resourcesettings_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf'], + "retail_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_httpbody_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_date_protos'], + "run_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'api_routing_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_iam_policy_protos', 'iam_v1_options_protos', 'iam_v1_policy_protos', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_expr_protos'], + "scheduler_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf', 'rpc_status_protos'], + "secretmanager_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_iam_policy_protos', 'iam_v1_options_protos', 'iam_v1_policy_protos', 'protobuf::libprotobuf', 'type_expr_protos'], + "securesourcemanager_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_iam_policy_protos', 'iam_v1_options_protos', 'iam_v1_policy_protos', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_expr_protos'], + "securitycenter_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'api_routing_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_iam_policy_protos', 'iam_v1_options_protos', 'iam_v1_policy_protos', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_expr_protos'], + "securitycentermanagement_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_policy_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_expr_protos'], + "servicecontrol_protos": ['api_annotations_protos', 'api_client_protos', 'api_distribution_protos', 'api_http_protos', 'api_launch_stage_protos', 'grpc::_grpc', 'grpc::grpc++', 'logging_type_protos', 'protobuf::libprotobuf', 'rpc_context_attribute_context_protos', 'rpc_status_protos'], + "servicedirectory_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_iam_policy_protos', 'iam_v1_options_protos', 'iam_v1_policy_protos', 'protobuf::libprotobuf', 'type_expr_protos'], + "servicehealth_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf'], + "servicemanagement_protos": ['api_annotations_protos', 'api_auth_protos', 'api_backend_protos', 'api_billing_protos', 'api_client_protos', 'api_config_change_protos', 'api_context_protos', 'api_control_protos', 'api_documentation_protos', 'api_endpoint_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_label_protos', 'api_launch_stage_protos', 'api_log_protos', 'api_logging_protos', 'api_metric_protos', 'api_monitored_resource_protos', 'api_monitoring_protos', 'api_policy_protos', 'api_quota_protos', 'api_resource_protos', 'api_service_protos', 'api_source_info_protos', 'api_system_parameter_protos', 'api_usage_protos', 'api_visibility_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], + "serviceusage_protos": ['api_annotations_protos', 'api_auth_protos', 'api_client_protos', 'api_documentation_protos', 'api_endpoint_protos', 'api_http_protos', 'api_label_protos', 'api_launch_stage_protos', 'api_monitored_resource_protos', 'api_monitoring_protos', 'api_quota_protos', 'api_resource_protos', 'api_usage_protos', 'api_visibility_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], + "shell_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], + "spanner_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_iam_policy_protos', 'iam_v1_options_protos', 'iam_v1_policy_protos', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_expr_protos'], + "speech_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_field_info_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], + "sql_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], + "storage_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'api_routing_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_iam_policy_protos', 'iam_v1_options_protos', 'iam_v1_policy_protos', 'protobuf::libprotobuf', 'type_date_protos', 'type_expr_protos'], + "storagecontrol_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_field_info_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'api_routing_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], + "storageinsights_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_date_protos', 'type_datetime_protos'], + "storagetransfer_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_code_protos', 'rpc_status_protos', 'type_date_protos', 'type_timeofday_protos'], + "support_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], + "talent_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_latlng_protos', 'type_money_protos', 'type_postal_address_protos', 'type_timeofday_protos'], + "tasks_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_iam_policy_protos', 'iam_v1_options_protos', 'iam_v1_policy_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_expr_protos'], + "telcoautomation_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], + "texttospeech_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], + "timeseriesinsights_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf', 'rpc_status_protos'], + "tpu_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], + "trace_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf', 'rpc_status_protos'], + "translate_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_policy_protos', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_expr_protos'], + "video_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_field_info_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_datetime_protos'], + "videointelligence_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], + "vision_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_color_protos', 'type_latlng_protos'], + "vmmigration_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_error_details_protos', 'rpc_status_protos'], + "vmwareengine_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_field_info_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], + "vpcaccess_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], + "webrisk_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], + "websecurityscanner_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf'], + "workflows_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], + "workstations_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], + "api_annotations_protos": ['api_http_protos'], + "api_auth_protos": ['api_annotations_protos'], + "api_billing_protos": ['api_annotations_protos', 'api_metric_protos'], + "api_client_protos": ['api_launch_stage_protos'], + "api_distribution_protos": ['api_annotations_protos'], + "api_endpoint_protos": ['api_annotations_protos'], + "api_log_protos": ['api_label_protos'], + "api_logging_protos": ['api_annotations_protos', 'api_label_protos'], + "api_metric_protos": ['api_label_protos', 'api_launch_stage_protos'], + "api_monitored_resource_protos": ['api_label_protos', 'api_launch_stage_protos'], + "api_monitoring_protos": ['api_annotations_protos'], + "api_quota_protos": ['api_annotations_protos'], + "api_service_protos": ['api_annotations_protos', 'api_auth_protos', 'api_backend_protos', 'api_billing_protos', 'api_client_protos', 'api_context_protos', 'api_control_protos', 'api_documentation_protos', 'api_endpoint_protos', 'api_http_protos', 'api_label_protos', 'api_log_protos', 'api_logging_protos', 'api_metric_protos', 'api_monitored_resource_protos', 'api_monitoring_protos', 'api_quota_protos', 'api_resource_protos', 'api_source_info_protos', 'api_system_parameter_protos', 'api_usage_protos'], + "api_usage_protos": ['api_annotations_protos', 'api_visibility_protos'], + "iam_credentials_v1_common_protos": ['api_field_behavior_protos', 'api_resource_protos'], + "iam_credentials_v1_iamcredentials_protos": ['api_annotations_protos', 'api_client_protos', 'iam_credentials_v1_common_protos'], + "iam_v1_iam_policy_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_resource_protos', 'iam_v1_options_protos', 'iam_v1_policy_protos'], + "iam_v1_options_protos": ['api_annotations_protos'], + "iam_v1_policy_protos": ['api_annotations_protos', 'type_expr_protos'], + "cloud_extended_operations_protos": ["protobuf::libprotobuf"], + "compute_protos": ["cloud_extended_operations_protos", "protobuf::libprotobuf"], +} + +PROTO_COMPONENTS = { + "accessapproval_protos", + "accesscontextmanager_protos", + "advisorynotifications_protos", + "aiplatform_protos", + "alloydb_protos", + "api_annotations_protos", + "api_auth_protos", + "api_backend_protos", + "api_billing_protos", + "api_client_protos", + "api_config_change_protos", + "api_context_protos", + "api_control_protos", + "api_distribution_protos", + "api_documentation_protos", + "api_endpoint_protos", + "api_field_behavior_protos", + "api_field_info_protos", + "api_http_protos", + "api_httpbody_protos", + "api_label_protos", + "api_launch_stage_protos", + "api_log_protos", + "api_logging_protos", + "api_metric_protos", + "api_monitored_resource_protos", + "api_monitoring_protos", + "api_policy_protos", + "api_quota_protos", + "api_resource_protos", + "api_routing_protos", + "api_service_protos", + "api_source_info_protos", + "api_system_parameter_protos", + "api_usage_protos", + "api_visibility_protos", + "apigateway_protos", + "apigeeconnect_protos", + "apikeys_protos", + "appengine_protos", + "apphub_protos", + "artifactregistry_protos", + "asset_protos", + "assuredworkloads_protos", + "automl_protos", + "backupdr_protos", + "baremetalsolution_protos", + "batch_protos", + "beyondcorp_protos", + "bigquery_protos", + "bigtable_protos", + "billing_protos", + "binaryauthorization_protos", + "certificatemanager_protos", + "channel_protos", + "cloud_common_common_protos", + "cloud_extended_operations_protos", + "cloudbuild_protos", + "cloudcontrolspartner_protos", + "cloudquotas_protos", + "commerce_protos", + "composer_protos", + "compute_protos", + "confidentialcomputing_protos", + "config_protos", + "connectors_protos", + "contactcenterinsights_protos", + "container_protos", + "containeranalysis_protos", + "contentwarehouse_protos", + "datacatalog_protos", + "datafusion_protos", + "datamigration_protos", + "dataplex_protos", + "dataproc_protos", + "datastore_protos", + "datastream_protos", + "deploy_protos", + "developerconnect_protos", + "dialogflow_cx_protos", + "dialogflow_es_protos", + "discoveryengine_protos", + "dlp_protos", + "documentai_protos", + "domains_protos", + "edgecontainer_protos", + "edgenetwork_protos", + "essentialcontacts_protos", + "eventarc_protos", + "filestore_protos", + "functions_protos", + "gkebackup_protos", + "gkehub_protos", + "gkemulticloud_protos", + "grafeas_protos", + "iam_credentials_v1_common_protos", + "iam_credentials_v1_iamcredentials_protos", + "iam_protos", + "iam_v1_iam_policy_protos", + "iam_v1_options_protos", + "iam_v1_policy_protos", + "iam_v2_protos", + "iap_protos", + "ids_protos", + "kms_protos", + "language_protos", + "logging_protos", + "logging_type_protos", + "longrunning_operations_protos", + "managedidentities_protos", + "managedkafka_protos", + "memcache_protos", + "metastore_protos", + "migrationcenter_protos", + "monitoring_protos", + "netapp_protos", + "networkconnectivity_protos", + "networkmanagement_protos", + "networksecurity_protos", + "networkservices_protos", + "notebooks_protos", + "optimization_protos", + "orgpolicy_protos", + "osconfig_protos", + "oslogin_protos", + "policysimulator_protos", + "policytroubleshooter_protos", + "privateca_protos", + "privilegedaccessmanager_protos", + "profiler_protos", + "publicca_protos", + "pubsub_protos", + "rapidmigrationassessment_protos", + "recaptchaenterprise_protos", + "recommender_protos", + "redis_protos", + "resourcemanager_protos", + "resourcesettings_protos", + "retail_protos", + "rpc_code_protos", + "rpc_context_attribute_context_protos", + "rpc_error_details_protos", + "rpc_status_protos", + "run_protos", + "scheduler_protos", + "secretmanager_protos", + "securesourcemanager_protos", + "securitycenter_protos", + "securitycentermanagement_protos", + "servicecontrol_protos", + "servicedirectory_protos", + "servicehealth_protos", + "servicemanagement_protos", + "serviceusage_protos", + "shell_protos", + "spanner_protos", + "speech_protos", + "sql_protos", + "storage_protos", + "storagecontrol_protos", + "storageinsights_protos", + "storagetransfer_protos", + "support_protos", + "talent_protos", + "tasks_protos", + "telcoautomation_protos", + "texttospeech_protos", + "timeseriesinsights_protos", + "tpu_protos", + "trace_protos", + "translate_protos", + "type_calendar_period_protos", + "type_color_protos", + "type_date_protos", + "type_datetime_protos", + "type_dayofweek_protos", + "type_decimal_protos", + "type_expr_protos", + "type_interval_protos", + "type_latlng_protos", + "type_money_protos", + "type_postal_address_protos", + "type_timeofday_protos", + "video_protos", + "videointelligence_protos", + "vision_protos", + "vmmigration_protos", + "vmwareengine_protos", + "vpcaccess_protos", + "webrisk_protos", + "websecurityscanner_protos", + "workflows_protos", + "workstations_protos" +} + +COMPONENTS = { + "accessapproval", + "accesscontextmanager", + "advisorynotifications", + "aiplatform", + "alloydb", + "apigateway", + "apigeeconnect", + "apikeys", + "appengine", + "apphub", + "artifactregistry", + "asset", + "assuredworkloads", + "automl", + "backupdr", + "baremetalsolution", + "batch", + "beyondcorp", + "bigquery", + "bigtable", + "billing", + "binaryauthorization", + "certificatemanager", + "channel", + "cloudbuild", + "cloudcontrolspartner", + "cloudquotas", + "commerce", + "composer", + "compute_accelerator_types", + "compute_addresses", + "compute_autoscalers", + "compute_backend_buckets", + "compute_backend_services", + "compute_disk_types", + "compute_disks", + "compute_external_vpn_gateways", + "compute_firewall_policies", + "compute_firewalls", + "compute_forwarding_rules", + "compute_global_addresses", + "compute_global_forwarding_rules", + "compute_global_network_endpoint_groups", + "compute_global_operations", + "compute_global_organization_operations", + "compute_global_public_delegated_prefixes", + "compute_health_checks", + "compute_http_health_checks", + "compute_https_health_checks", + "compute_image_family_views", + "compute_images", + "compute_instance_group_managers", + "compute_instance_groups", + "compute_instance_templates", + "compute_instances", + "compute_interconnect_attachments", + "compute_interconnect_locations", + "compute_interconnects", + "compute_license_codes", + "compute_licenses", + "compute_machine_images", + "compute_machine_types", + "compute_network_attachments", + "compute_network_edge_security_services", + "compute_network_endpoint_groups", + "compute_network_firewall_policies", + "compute_networks", + "compute_node_groups", + "compute_node_templates", + "compute_node_types", + "compute_packet_mirrorings", + "compute_projects", + "compute_public_advertised_prefixes", + "compute_public_delegated_prefixes", + "compute_region_autoscalers", + "compute_region_backend_services", + "compute_region_commitments", + "compute_region_disk_types", + "compute_region_disks", + "compute_region_health_check_services", + "compute_region_health_checks", + "compute_region_instance_group_managers", + "compute_region_instance_groups", + "compute_region_instance_templates", + "compute_region_instances", + "compute_region_network_endpoint_groups", + "compute_region_network_firewall_policies", + "compute_region_notification_endpoints", + "compute_region_operations", + "compute_region_security_policies", + "compute_region_ssl_certificates", + "compute_ssl_policies", + "compute_subnetworks", + "compute_target_grpc_proxies", + "compute_target_http_proxies", + "compute_target_https_proxies", + "compute_target_instances", + "compute_target_pools", + "compute_target_ssl_proxies", + "compute_target_tcp_proxies", + "compute_target_vpn_gateways", + "compute_url_maps", + "compute_vpn_gateways", + "compute_vpn_tunnels", + "compute_zone_operations", + "compute_zones", + "confidentialcomputing", + "config", + "connectors", + "contactcenterinsights", + "container", + "containeranalysis", + "contentwarehouse", + "datacatalog", + "datafusion", + "datamigration", + "dataplex", + "dataproc", + "datastore", + "datastream", + "deploy", + "developerconnect", + "dialogflow_cx", + "dialogflow_es", + "discoveryengine", + "dlp", + "documentai", + "domains", + "edgecontainer", + "edgenetwork", + "essentialcontacts", + "eventarc", + "filestore", + "functions", + "gkebackup", + "gkehub", + "gkemulticloud", + "iam", + "iap", + "ids", + "kms", + "language", + "logging", + "managedidentities", + "managedkafka", + "memcache", + "metastore", + "migrationcenter", + "monitoring", + "netapp", + "networkconnectivity", + "networkmanagement", + "networksecurity", + "networkservices", + "notebooks", + "oauth2", + "optimization", + "orgpolicy", + "osconfig", + "oslogin", + "policysimulator", + "policytroubleshooter", + "privateca", + "privilegedaccessmanager", + "profiler", + "publicca", + "pubsub", + "rapidmigrationassessment", + "recaptchaenterprise", + "recommender", + "redis", + "resourcemanager", + "resourcesettings", + "retail", + "run", + "scheduler", + "secretmanager", + "securesourcemanager", + "securitycenter", + "securitycentermanagement", + "servicecontrol", + "servicedirectory", + "servicehealth", + "servicemanagement", + "serviceusage", + "shell", + "spanner", + "speech", + "sql", + "storage", + "storagecontrol", + "storageinsights", + "storagetransfer", + "support", + "talent", + "tasks", + "telcoautomation", + "texttospeech", + "timeseriesinsights", + "tpu", + "trace", + "translate", + "video", + "videointelligence", + "vision", + "vmmigration", + "vmwareengine", + "vpcaccess", + "webrisk", + "websecurityscanner", + "workflows", + "workstations" +} diff --git a/recipes/google-cloud-cpp/2.x/conandata.yml b/recipes/google-cloud-cpp/2.x/conandata.yml index 79eb43c2b932d..65a9e8f5f8351 100644 --- a/recipes/google-cloud-cpp/2.x/conandata.yml +++ b/recipes/google-cloud-cpp/2.x/conandata.yml @@ -1,18 +1,14 @@ sources: - "2.12.0": - url: "https://github.com/googleapis/google-cloud-cpp/archive/refs/tags/v2.12.0.tar.gz" - sha256: "8cda870803925c62de8716a765e03eb9d34249977e5cdb7d0d20367e997a55e2" "2.15.1": url: "https://github.com/googleapis/google-cloud-cpp/archive/refs/tags/v2.15.1.tar.gz" sha256: "47a5c6beff48625fa1b65b1ddc575247def80c88d29062c66d463172280d3959" "2.19.0": url: "https://github.com/googleapis/google-cloud-cpp/archive/refs/tags/v2.19.0.tar.gz" sha256: "63f009092afd900cb812050bcecf607e37d762ac911e0bcbf4af9a432da91890" + "2.28.0": + url: "https://github.com/googleapis/google-cloud-cpp/archive/refs/tags/v2.28.0.tar.gz" + sha256: "1d51910cb4419f6100d8b9df6bccd33477d09f50e378f12b06dae0f137ed7bc6" patches: - "2.12.0": - - patch_file: "patches/2.12.0/001-use-conan-msvc-runtime.patch" - patch_description: "Let Conan select the MSVC runtime" - patch_type: conan "2.15.1": - patch_file: "patches/2.15.1/001-use-conan-msvc-runtime.patch" patch_description: "Let Conan select the MSVC runtime" @@ -24,3 +20,7 @@ patches: - patch_file: "patches/2.19.0/002-add-find-package-threads.patch" patch_description: "Missing find_package() in CMake files" patch_type: conan + "2.28.0": + - patch_file: "patches/2.28.0/001-add-find-package-threads.patch" + patch_description: "Missing find_package() in CMake files" + patch_type: conan diff --git a/recipes/google-cloud-cpp/2.x/conanfile.py b/recipes/google-cloud-cpp/2.x/conanfile.py index 31ff84a094f69..bf23faefd5366 100644 --- a/recipes/google-cloud-cpp/2.x/conanfile.py +++ b/recipes/google-cloud-cpp/2.x/conanfile.py @@ -3,7 +3,7 @@ from conan import ConanFile from conan.tools.build import check_min_cppstd, cross_building from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout -from conan.tools.env import VirtualRunEnv +from conan.tools.env import VirtualBuildEnv, VirtualRunEnv from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, replace_in_file, rmdir from conan.tools.microsoft import check_min_vs, is_msvc from conan.tools.scm import Version @@ -19,9 +19,9 @@ # script will be used to generate a new file with the component dependency # information. The expectation is that maintaining this script will be easier # than writing long lists of dependencies by hand. -import components_2_12_0 import components_2_15_1 import components_2_19_0 +import components_2_28_0 required_conan_version = ">=1.56.0" @@ -45,33 +45,37 @@ class GoogleCloudCppConan(ConanFile): settings = "os", "arch", "compiler", "build_type" options = {"shared": [True, False], "fPIC": [True, False]} default_options = {"shared": False, "fPIC": True} - exports = ["components_2_12_0.py", - "components_2_15_1.py", + exports = ["components_2_15_1.py", "components_2_19_0.py", + "components_2_28_0.py", ] short_paths = True _GA_COMPONENTS = { - '2.12.0': components_2_12_0.COMPONENTS, '2.15.1': components_2_15_1.COMPONENTS, '2.19.0': components_2_19_0.COMPONENTS, + '2.28.0': components_2_28_0.COMPONENTS, } _PROTO_COMPONENTS = { - '2.12.0': components_2_12_0.PROTO_COMPONENTS, '2.15.1': components_2_15_1.PROTO_COMPONENTS, '2.19.0': components_2_19_0.PROTO_COMPONENTS, + '2.28.0': components_2_28_0.PROTO_COMPONENTS, } _PROTO_COMPONENT_DEPENDENCIES = { - "2.12.0": components_2_12_0.DEPENDENCIES, "2.15.1": components_2_15_1.DEPENDENCIES, "2.19.0": components_2_19_0.DEPENDENCIES, + "2.28.0": components_2_28_0.DEPENDENCIES, } # Some components require custom dependency definitions. _REQUIRES_CUSTOM_DEPENDENCIES = { "bigquery", "bigtable", "iam", "oauth2", "pubsub", "spanner", "storage", } + @property + def _is_legacy_one_profile(self): + return not hasattr(self, "settings_build") + def export_sources(self): export_conandata_patches(self) @@ -146,7 +150,7 @@ def source(self): def requirements(self): # These must remain pinned in conan index. self.requires("protobuf/3.21.12", transitive_headers=True) - self.requires("abseil/20230125.3", transitive_headers=True) + self.requires("abseil/[>=20230125.3 <=20230802.1]", transitive_headers=True) self.requires("grpc/1.54.3", transitive_headers=True) self.requires("nlohmann_json/3.11.3") self.requires("crc32c/1.1.2") @@ -157,16 +161,20 @@ def requirements(self): def build_requirements(self): # For the `grpc-cpp-plugin` executable, and indirectly `protoc` - self.tool_requires("grpc/") + if not self._is_legacy_one_profile: + self.tool_requires("grpc/") def generate(self): tc = CMakeToolchain(self) tc.variables["BUILD_TESTING"] = False + tc.variables["GOOGLE_CLOUD_CPP_WITH_MOCKS"] = False tc.variables["GOOGLE_CLOUD_CPP_ENABLE_MACOS_OPENSSL_CHECK"] = False tc.variables["GOOGLE_CLOUD_CPP_ENABLE_WERROR"] = False tc.variables["GOOGLE_CLOUD_CPP_ENABLE"] = ",".join(self._components()) tc.generate() - VirtualRunEnv(self).generate(scope="build") + VirtualBuildEnv(self).generate() + if self._is_legacy_one_profile: + VirtualRunEnv(self).generate(scope="build") deps = CMakeDeps(self) deps.generate() @@ -179,14 +187,9 @@ def _patch_sources(self): # https://developer.apple.com/library/archive/documentation/Security/Conceptual/System_Integrity_Protection_Guide/RuntimeProtections/RuntimeProtections.html settings_build = getattr(self, "settings_build", self.settings) if settings_build.os == "Macos": - if Version(self.version) < '2.12.0': - replace_in_file(self, os.path.join(self.source_folder, "cmake/CompileProtos.cmake"), - "$", - '${CMAKE_COMMAND} -E env "DYLD_LIBRARY_PATH=$ENV{DYLD_LIBRARY_PATH}" $') - else: - replace_in_file(self, os.path.join(self.source_folder, "cmake/CompileProtos.cmake"), - "${Protobuf_PROTOC_EXECUTABLE} ARGS", - '${CMAKE_COMMAND} -E env "DYLD_LIBRARY_PATH=$ENV{DYLD_LIBRARY_PATH}" ${Protobuf_PROTOC_EXECUTABLE} ARGS') + replace_in_file(self, os.path.join(self.source_folder, "cmake/CompileProtos.cmake"), + "${Protobuf_PROTOC_EXECUTABLE} ARGS", + '${CMAKE_COMMAND} -E env "DYLD_LIBRARY_PATH=$ENV{DYLD_LIBRARY_PATH}" ${Protobuf_PROTOC_EXECUTABLE} ARGS') def build(self): self._patch_sources() @@ -207,9 +210,6 @@ def _generate_proto_requires(self, component): 'asset', 'channel', 'storagetransfer', - # TODO - certificatemanager crashes the gRPC code generator. Add it back - # after gRPC >= 1.53.x - 'certificatemanager', } def _components(self): @@ -221,6 +221,8 @@ def _components(self): if self.settings.os == "Android": result.remove('accesscontextmanager') result.remove('talent') + if self.settings.os == "Windows" and Version(self.version) >= '2.28.0': + result.remove('securitycenter') return result def _proto_components(self): @@ -232,11 +234,14 @@ def _proto_components(self): if self.settings.os == "Android": result.remove('accesscontextmanager_protos') result.remove('talent_protos') - if Version(self.version) >= '2.15.1': - # This was converted to an interface library starting on 2.15.1 + if Version(self.version) <= '2.19.0': + # Handling of these proto libraries was simplified in the 2.28.0 + # `conanfile.py`. We prefer not to regenerate the old + # `components_*.py` files, so we manually skip the protos in here. result.remove('logging_type_type_protos') - # These were removed (as they are not used) starting on 2.15.1 result.remove('devtools_source_v1_source_context_protos') + if self.settings.os == "Windows" and Version(self.version) >= '2.28.0': + result.remove('securitycenter_protos') return result def package(self): @@ -286,21 +291,13 @@ def package_info(self): # A small number of gRPC-generated stubs are used directly in the common components # shared by all gRPC-based libraries. These must be defined without reference to `grpc_utils`. - if Version(self.version) >= '2.15.1': - GRPC_UTILS_REQUIRED_PROTOS = { - "iam_credentials_v1_iamcredentials_protos", - "iam_v1_policy_protos", - "longrunning_operations_protos", - "rpc_error_details_protos", - "rpc_status_protos", - } - else: - GRPC_UTILS_REQUIRED_PROTOS = { - "iam_protos", - "longrunning_operations_protos", - "rpc_error_details_protos", - "rpc_status_protos", - } + GRPC_UTILS_REQUIRED_PROTOS = { + "iam_credentials_v1_iamcredentials_protos", + "iam_v1_policy_protos", + "longrunning_operations_protos", + "rpc_error_details_protos", + "rpc_status_protos", + } for component in GRPC_UTILS_REQUIRED_PROTOS: self._add_proto_component(component) @@ -309,48 +306,31 @@ def package_info(self): self.cpp_info.components["grpc_utils"].names["pkg_config"] = "google_cloud_cpp_grpc_utils" for component in self._proto_components(): - if Version(self.version) >= '2.15.1' and component == 'storage_protos': - # Starting with v2.15.1 the `storage_protos` are compiled only - # when needed. They are not used in Conan because they are only - # needed for an experimental library, supporting an allow-listed - # service. + if component == 'storage_protos': + # The `storage_protos` are compiled only when needed. They are + # not used in Conan because they are only needed for an + # experimental library, supporting an allow-listed service. continue if component not in GRPC_UTILS_REQUIRED_PROTOS: self._add_proto_component(component) # Interface libraries for backwards compatibility - if Version(self.version) < '2.15.1': - self.cpp_info.components["dialogflow_es_protos"].requires = ["cloud_dialogflow_v2_protos"] - self.cpp_info.components["logging_type_protos"].requires = ["logging_type_type_protos"] - self.cpp_info.components["speech_protos"].requires = ["cloud_speech_protos"] - self.cpp_info.components["texttospeech_protos"].requires = ["cloud_texttospeech_protos"] - self.cpp_info.components["trace_protos"].requires = [ - "devtools_cloudtrace_v2_trace_protos", - "devtools_cloudtrace_v2_tracing_protos", - ] - self._add_grpc_component("bigquery", "cloud_bigquery_protos") - else: - self.cpp_info.components["cloud_bigquery_protos"].requires = ["bigquery_protos"] - self.cpp_info.components["cloud_dialogflow_v2_protos"].requires = ["dialogflow_es_protos"] - self.cpp_info.components["cloud_speech_protos"].requires = ["speech_protos"] - self.cpp_info.components["cloud_texttospeech_protos"].requires = ["texttospeech_protos"] - self.cpp_info.components["devtools_cloudtrace_v2_trace_protos"].requires = ["trace_protos"] - self.cpp_info.components["devtools_cloudtrace_v2_tracing_protos"].requires = ["trace_protos"] - self.cpp_info.components["logging_type_type_protos"].requires = ["logging_type_protos"] + self.cpp_info.components["cloud_bigquery_protos"].requires = ["bigquery_protos"] + self.cpp_info.components["cloud_dialogflow_v2_protos"].requires = ["dialogflow_es_protos"] + self.cpp_info.components["cloud_speech_protos"].requires = ["speech_protos"] + self.cpp_info.components["cloud_texttospeech_protos"].requires = ["texttospeech_protos"] + self.cpp_info.components["devtools_cloudtrace_v2_trace_protos"].requires = ["trace_protos"] + self.cpp_info.components["devtools_cloudtrace_v2_tracing_protos"].requires = ["trace_protos"] + self.cpp_info.components["logging_type_type_protos"].requires = ["logging_type_protos"] for component in self._components(): protos=f"{component}_protos" - # bigquery proto library predates the adoption of more consistent naming - if component == 'bigquery' and Version(self.version) < '2.15.1': - self._add_proto_component("cloud_bigquery_protos") - self._add_grpc_component(component, "cloud_bigquery_protos") - continue - if component == 'dialogflow_es' and Version(self.version) < '2.15.1': - self._add_proto_component("cloud_dialogflow_v2_protos") - self._add_grpc_component(component, "cloud_dialogflow_v2_protos") - continue # `compute` components do not depend on gRPC if component.startswith("compute_"): + # Individual compute proto libraries were replaced with a single + # `compute_protos` library. + if Version(self.version) >= '2.28.0': + protos = "compute_protos" self._add_compute_component(component, protos) continue # `storage` is the only component that does not depend on a matching `*_protos` library diff --git a/recipes/google-cloud-cpp/2.x/extract_dependencies.py b/recipes/google-cloud-cpp/2.x/extract_dependencies.py index 95720c57e7748..0235b7b50d130 100755 --- a/recipes/google-cloud-cpp/2.x/extract_dependencies.py +++ b/recipes/google-cloud-cpp/2.x/extract_dependencies.py @@ -25,6 +25,8 @@ # Used in _generate_proto_requires(): the *.deps files are generated from # Bazel and contain a few targets that do not exit (nor do they need to # exist) in CMake. +# +# This list maps onto google_cloud_cpp_load_protodeps()'s `targets_to_omit`. _PROTO_DEPS_REMOVED_TARGETS = { "cloud_kms_v1_kms_protos", "cloud_orgpolicy_v1_orgpolicy_protos", @@ -35,13 +37,15 @@ # Used in _generate_proto_requires(): the *.deps files are generated from # Bazel and contain a few targets that have incorrect names for CMake. +# +# This list maps onto google_cloud_cpp_load_protodeps()'s `targets_substitutions`. _PROTO_DEPS_REPLACED_TARGETS = { "grafeas_v1_grafeas_protos": "grafeas_protos", + "iam_v2_policy_protos": "iam_v2_protos", + "logging_type_type_protos": "logging_type_protos", "identity_accesscontextmanager_v1_accesscontextmanager_protos": "accesscontextmanager_protos", "cloud_osconfig_v1_osconfig_protos": "osconfig_protos", - "devtools_source_v1_source_protos": "devtools_source_v1_source_context_protos", "cloud_documentai_v1_documentai_protos": "documentai_protos", - "iam_v2_policy_protos": "iam_v2_protos", } # A few *.deps files use ad-hoc naming. @@ -77,7 +81,6 @@ "api_endpoint_protos", "api_launch_stage_protos", "api_documentation_protos", - "devtools_source_v1_source_context_protos", "type_color_protos", "api_distribution_protos", "api_config_change_protos", @@ -114,7 +117,7 @@ "pubsublite", } -# `google-cloud-cpp` managems these dependencies using CMake code. +# `google-cloud-cpp` manages these dependencies using CMake code. _HARD_CODED_DEPENDENCIES = { "api_annotations_protos": ["api_http_protos"], "api_auth_protos": ["api_annotations_protos"], @@ -264,15 +267,10 @@ def main(): proto_components.add(component) proto_components.update(deps) print(f' "{component}": {sorted(deps)},') - print(f' "compute_internal_protos": ["protobuf::libprotobuf"],') print(f' "cloud_extended_operations_protos": ["protobuf::libprotobuf"],') - proto_components.add("compute_internal_protos") + print(f' "compute_protos": ["cloud_extended_operations_protos", "protobuf::libprotobuf"],') proto_components.add("cloud_extended_operations_protos") - for component in sorted(components): - if not component.startswith("compute_"): - continue - proto_components.add(component + "_protos") - print(f' "{component}_protos": ["compute_internal_protos", "cloud_extended_operations_protos", "protobuf::libprotobuf"],') + proto_components.add("compute_protos") print("}") proto_components = proto_components - _PROTO_DEPS_COMMON_REQUIRES names = ['"%s"' % c for c in proto_components] diff --git a/recipes/google-cloud-cpp/2.x/patches/2.12.0/001-use-conan-msvc-runtime.patch b/recipes/google-cloud-cpp/2.x/patches/2.12.0/001-use-conan-msvc-runtime.patch deleted file mode 100644 index bfefce3078428..0000000000000 --- a/recipes/google-cloud-cpp/2.x/patches/2.12.0/001-use-conan-msvc-runtime.patch +++ /dev/null @@ -1,53 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index faab325a..657abd4c 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -53,7 +53,6 @@ elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC") - endif () - - list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake) --include(SelectMSVCRuntime) - - option(GOOGLE_CLOUD_CPP_ENABLE_MACOS_OPENSSL_CHECK - "If enabled, check that the user has defined OPENSSL_ROOT_DIR on macOS" -diff --git a/cmake/GoogleCloudCppCommon.cmake b/cmake/GoogleCloudCppCommon.cmake -index b487a1bc..880c98fe 100644 ---- a/cmake/GoogleCloudCppCommon.cmake -+++ b/cmake/GoogleCloudCppCommon.cmake -@@ -17,9 +17,6 @@ - # Get the destination directories based on the GNU recommendations. - include(GNUInstallDirs) - --# Pick the right MSVC runtime libraries. --include(SelectMSVCRuntime) -- - # Enable Werror - include(EnableWerror) - -diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt -index 0cb7a9ae..d9016a0b 100644 ---- a/examples/CMakeLists.txt -+++ b/examples/CMakeLists.txt -@@ -14,9 +14,6 @@ - # limitations under the License. - # ~~~ - --# Pick the right MSVC runtime libraries. --include(SelectMSVCRuntime) -- - add_executable(gcs2cbt gcs2cbt.cc) - target_link_libraries(gcs2cbt google-cloud-cpp::bigtable - google-cloud-cpp::storage google-cloud-cpp::grpc_utils) -diff --git a/external/googleapis/CMakeLists.txt b/external/googleapis/CMakeLists.txt -index 03535ff8..2b05c214 100644 ---- a/external/googleapis/CMakeLists.txt -+++ b/external/googleapis/CMakeLists.txt -@@ -157,8 +157,6 @@ if (PROTO_INCLUDE_DIR) - list(INSERT PROTOBUF_IMPORT_DIRS 0 "${PROTO_INCLUDE_DIR}") - endif () - --include(SelectMSVCRuntime) -- - google_cloud_cpp_add_protos_property() - - function (external_googleapis_short_name var proto) diff --git a/recipes/google-cloud-cpp/2.x/patches/2.28.0/001-add-find-package-threads.patch b/recipes/google-cloud-cpp/2.x/patches/2.28.0/001-add-find-package-threads.patch new file mode 100644 index 0000000000000..00d1143424d10 --- /dev/null +++ b/recipes/google-cloud-cpp/2.x/patches/2.28.0/001-add-find-package-threads.patch @@ -0,0 +1,12 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 96297b4a..f274a111 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -218,6 +218,7 @@ add_custom_target(google-cloud-cpp-protos) + add_custom_target(doxygen-docs) + add_custom_target(all-docfx) + ++find_package(Threads REQUIRED) + find_package(absl CONFIG REQUIRED) + if (GOOGLE_CLOUD_CPP_ENABLE_GRPC) + find_package(gRPC REQUIRED QUIET) diff --git a/recipes/google-cloud-cpp/2.x/test_package/conanfile.py b/recipes/google-cloud-cpp/2.x/test_package/conanfile.py index 4544391b62f56..a1ab26b6de654 100644 --- a/recipes/google-cloud-cpp/2.x/test_package/conanfile.py +++ b/recipes/google-cloud-cpp/2.x/test_package/conanfile.py @@ -3,7 +3,7 @@ from conan import ConanFile from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout from conan.tools.build import can_run -from conan.tools.env import VirtualRunEnv +from conan.tools.env import VirtualBuildEnv, VirtualRunEnv from conan.tools.scm import Version @@ -14,6 +14,10 @@ class TestPackageConan(ConanFile): def requirements(self): self.requires(self.tested_reference_str) + @property + def _is_legacy_one_profile(self): + return not hasattr(self, "settings_build") + def layout(self): cmake_layout(self) @@ -30,9 +34,12 @@ def generate(self): tc = CMakeToolchain(self) tc.variables["WITH_COMPUTE"] = self._supports_compute() tc.generate() + if self._is_legacy_one_profile: + VirtualRunEnv(self).generate(scope="build") + else: + VirtualBuildEnv(self).generate() # Environment so that the compiled test executable can load shared libraries - runenv = VirtualRunEnv(self) - runenv.generate(scope="run") + VirtualRunEnv(self).generate(scope="run") deps = CMakeDeps(self) deps.generate() diff --git a/recipes/google-cloud-cpp/config.yml b/recipes/google-cloud-cpp/config.yml index bb19be722c391..5960fb5919b52 100644 --- a/recipes/google-cloud-cpp/config.yml +++ b/recipes/google-cloud-cpp/config.yml @@ -9,9 +9,9 @@ versions: folder: "all" "1.40.1": folder: "all" - "2.12.0": - folder: "2.x" "2.15.1": folder: "2.x" "2.19.0": folder: "2.x" + "2.28.0": + folder: "2.x" diff --git a/recipes/gperftools/all/conandata.yml b/recipes/gperftools/all/conandata.yml index 16ebb90c2322f..fe3e23057591f 100644 --- a/recipes/gperftools/all/conandata.yml +++ b/recipes/gperftools/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.16": + url: "https://github.com/gperftools/gperftools/releases/download/gperftools-2.16/gperftools-2.16.tar.gz" + sha256: "f12624af5c5987f2cc830ee534f754c3c5961eec08004c26a8b80de015cf056f" "2.15": url: "https://github.com/gperftools/gperftools/releases/download/gperftools-2.15/gperftools-2.15.tar.gz" sha256: "c69fef855628c81ef56f12e3c58f2b7ce1f326c0a1fe783e5cae0b88cbbe9a80" diff --git a/recipes/gperftools/all/conanfile.py b/recipes/gperftools/all/conanfile.py index 7f78bb711b730..9b3639725e4ab 100644 --- a/recipes/gperftools/all/conanfile.py +++ b/recipes/gperftools/all/conanfile.py @@ -59,7 +59,19 @@ class GperftoolsConan(ConanFile): @property def _min_cppstd(self): - return 11 + return "11" if Version(self.version) < "2.16" else "17" + + @property + def _compilers_minimum_version(self): + return { + "17": { + "gcc": "8", + "clang": "7", + "apple-clang": "12", + "Visual Studio": "16", + "msvc": "192", + }, + }.get(self._min_cppstd, {}) def config_options(self): if self.settings.os == "Windows": @@ -93,6 +105,11 @@ def layout(self): def validate(self): if self.settings.compiler.get_safe("cppstd"): check_min_cppstd(self, self._min_cppstd) + minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) + if minimum_version and Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration( + f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." + ) if Version(self.version) >= "2.11.0" and self.settings.compiler == "gcc" and Version(self.settings.compiler.version) < "7": raise ConanInvalidConfiguration(f"{self.ref} does not support gcc < 7.") diff --git a/recipes/gperftools/config.yml b/recipes/gperftools/config.yml index 09354ab2fb826..11bc45e75f53f 100644 --- a/recipes/gperftools/config.yml +++ b/recipes/gperftools/config.yml @@ -1,4 +1,6 @@ versions: + "2.16": + folder: all "2.15": folder: all "2.14.0": diff --git a/recipes/greg7mdp-gtl/all/conandata.yml b/recipes/greg7mdp-gtl/all/conandata.yml index c22694a6e750c..b401f2186d351 100644 --- a/recipes/greg7mdp-gtl/all/conandata.yml +++ b/recipes/greg7mdp-gtl/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.2.0": + url: "https://github.com/greg7mdp/gtl/archive/refs/tags/v1.2.0.tar.gz" + sha256: "1547ab78f62725c380f50972f7a49ffd3671ded17a3cb34305da5c953c6ba8e7" "1.1.8": url: "https://github.com/greg7mdp/gtl/archive/v1.1.8.tar.gz" sha256: "6bda4c07bd966a88740ee07e3df23863a93d7b5365e0eea7f13cde9eda961b86" diff --git a/recipes/greg7mdp-gtl/config.yml b/recipes/greg7mdp-gtl/config.yml index cd16082304dc7..ae3262a541e37 100644 --- a/recipes/greg7mdp-gtl/config.yml +++ b/recipes/greg7mdp-gtl/config.yml @@ -1,4 +1,6 @@ versions: + "1.2.0": + folder: all "1.1.8": folder: all "1.1.5": diff --git a/recipes/grpc/all/conandata.yml b/recipes/grpc/all/conandata.yml index 02c1ca609ebd2..bffed171ed04e 100644 --- a/recipes/grpc/all/conandata.yml +++ b/recipes/grpc/all/conandata.yml @@ -1,4 +1,10 @@ sources: + "1.67.1": + url: "https://github.com/grpc/grpc/archive/v1.67.1.tar.gz" + sha256: "d74f8e99a433982a12d7899f6773e285c9824e1d9a173ea1d1fb26c9bd089299" + "1.65.0": + url: "https://github.com/grpc/grpc/archive/v1.65.0.tar.gz" + sha256: "ebc3acfde70cfae3f4f04b8dbb72259540cb1dc427be362569fbc2607dabfe39" "1.54.3": url: "https://github.com/grpc/grpc/archive/v1.54.3.tar.gz" sha256: "17e4e1b100657b88027721220cbfb694d86c4b807e9257eaf2fb2d273b41b1b1" @@ -8,15 +14,12 @@ sources: "1.50.0": url: "https://github.com/grpc/grpc/archive/v1.50.0.tar.gz" sha256: "76900ab068da86378395a8e125b5cc43dfae671e09ff6462ddfef18676e2165a" - "1.48.4": - url: "https://github.com/grpc/grpc/archive/v1.48.4.tar.gz" - sha256: "0c3faa83e39d4f1ab55fe1476362b9ac3b81632a46dce7fd4d50271bce816b53" patches: + "1.54.3": + - patch_file: "patches/v1.50.x/002-CMake-Add-gRPC_USE_SYSTEMD-option-34384.patch" + patch_type: "backport" + patch_source: "https://github.com/grpc/grpc/commit/5c3400e8dc08d0810e3301d7e8cd8a718c82eeed" "1.50.1": - patch_file: "patches/v1.50.x/001-disable-cppstd-override.patch" "1.50.0": - patch_file: "patches/v1.50.x/001-disable-cppstd-override.patch" - "1.48.4": - - patch_file: "patches/v1.48.x/001-disable-cppstd-override.patch" - patch_description: "disable cpp std override" - patch_type: "portability" diff --git a/recipes/grpc/all/conanfile.py b/recipes/grpc/all/conanfile.py index 1d39ab202a3b0..0369581dce144 100644 --- a/recipes/grpc/all/conanfile.py +++ b/recipes/grpc/all/conanfile.py @@ -1,4 +1,5 @@ import os +import yaml from conan import ConanFile from conan.errors import ConanInvalidConfiguration @@ -15,13 +16,13 @@ class GrpcConan(ConanFile): name = "grpc" - package_type = "library" description = "Google's RPC (remote procedure call) library and framework." license = "Apache-2.0" url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/grpc/grpc" topics = ("rpc",) + package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { @@ -36,7 +37,9 @@ class GrpcConan(ConanFile): "php_plugin": [True, False], "python_plugin": [True, False], "ruby_plugin": [True, False], - "secure": [True, False] + "otel_plugin": [True, False], + "secure": [True, False], + "with_libsystemd": [True, False] } default_options = { "shared": False, @@ -50,10 +53,13 @@ class GrpcConan(ConanFile): "php_plugin": True, "python_plugin": True, "ruby_plugin": True, + "otel_plugin": False, "secure": False, + "with_libsystemd": True } short_paths = True + _target_info = None @property def _grpc_plugin_template(self): @@ -67,6 +73,13 @@ def _cxxstd_required(self): def _is_legacy_one_profile(self): return not hasattr(self, "settings_build") + @property + def _supports_libsystemd(self): + return self.settings.os in ["Linux", "FreeBSD"] and Version(self.version) >= "1.52" + + def export(self): + copy(self, f"target_info/grpc_{self.version}.yml", src=self.recipe_folder, dst=self.export_folder) + def export_sources(self): copy(self, "conan_cmake_project_include.cmake", self.recipe_folder, os.path.join(self.export_sources_folder, "src")) copy(self, f"cmake/{self._grpc_plugin_template}", self.recipe_folder, os.path.join(self.export_sources_folder, "src")) @@ -75,6 +88,10 @@ def export_sources(self): def config_options(self): if self.settings.os == "Windows": del self.options.fPIC + if not self._supports_libsystemd: + del self.options.with_libsystemd + if Version(self.version) < "1.65.0": + del self.options.otel_plugin def configure(self): if self.options.shared: @@ -88,21 +105,26 @@ def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - # abseil is public. See https://github.com/conan-io/conan-center-index/pull/17284#issuecomment-1526082638 - if Version(self.version) < "1.47": - if is_msvc(self): - self.requires("abseil/20211102.0", transitive_headers=True, transitive_libs=True) - else: - self.requires("abseil/20220623.1", transitive_headers=True, transitive_libs=True) + # abseil requires: + # transitive_headers=True because grpc headers include abseil headers + # transitive_libs=True because generated code (grpc_cpp_plugin) require symbols from abseil + if Version(self.version) >= "1.62.0": + self.requires("protobuf/5.27.0", transitive_headers=True) + self.requires("abseil/[>=20240116.1 <20240117.0]", transitive_headers=True, transitive_libs=True) else: - self.requires("abseil/20230125.3", transitive_headers=True, transitive_libs=True) - self.requires("c-ares/1.19.1") + self.requires("abseil/[>=20230125.3 <=20230802.1]", transitive_headers=True, transitive_libs=True) + self.requires("protobuf/3.21.12", transitive_headers=True) + self.requires("c-ares/[>=1.19.1 <2]") self.requires("openssl/[>=1.1 <4]") - self.requires("protobuf/3.21.12", transitive_headers=True, transitive_libs=True) self.requires("re2/20230301") self.requires("zlib/[>=1.2.11 <2]") - if self.settings.os in ["Linux", "FreeBSD"] and Version(self.version) >= "1.52": - self.requires("libsystemd/255") + if self.options.get_safe("with_libsystemd"): + if Version(self.version) >= "1.67.0": + self.requires("libsystemd/255.10") + else: + self.requires("libsystemd/255") + if self.options.get_safe("otel_plugin"): + self.requires("opentelemetry-cpp/1.14.2") def package_id(self): del self.info.options.secure @@ -165,6 +187,7 @@ def generate(self): tc.cache_variables["gRPC_SSL_PROVIDER"] = "package" tc.cache_variables["gRPC_PROTOBUF_PROVIDER"] = "package" tc.cache_variables["gRPC_ABSL_PROVIDER"] = "package" + tc.cache_variables["gRPC_OPENTELEMETRY_PROVIDER"] = "package" tc.cache_variables["gRPC_BUILD_GRPC_CPP_PLUGIN"] = self.options.cpp_plugin tc.cache_variables["gRPC_BUILD_GRPC_CSHARP_PLUGIN"] = self.options.csharp_plugin @@ -173,6 +196,7 @@ def generate(self): tc.cache_variables["gRPC_BUILD_GRPC_PHP_PLUGIN"] = self.options.php_plugin tc.cache_variables["gRPC_BUILD_GRPC_PYTHON_PLUGIN"] = self.options.python_plugin tc.cache_variables["gRPC_BUILD_GRPC_RUBY_PLUGIN"] = self.options.ruby_plugin + tc.cache_variables["gRPC_BUILD_GRPCPP_OTEL_PLUGIN"] = self.options.get_safe("otel_plugin", False) # Consumed targets (abseil) via interface target_compiler_feature can propagate newer standards if not valid_min_cppstd(self, self._cxxstd_required): @@ -182,8 +206,11 @@ def generate(self): # workaround for: install TARGETS given no BUNDLE DESTINATION for MACOSX_BUNDLE executable tc.cache_variables["CMAKE_MACOSX_BUNDLE"] = False - if is_msvc(self) and Version(self.version) >= "1.48": - tc.cache_variables["CMAKE_SYSTEM_VERSION"] = "10.0.18362.0" + if self._supports_libsystemd: + tc.cache_variables["gRPC_USE_SYSTEMD"] = self.options.with_libsystemd + + if Version(self.version) >= "1.62.0": + tc.cache_variables["gRPC_DOWNLOAD_ARCHIVES"] = False tc.generate() @@ -199,17 +226,42 @@ def _patch_sources(self): # - using `make` as the cmake generator # Make will run commands via `/bin/sh` which will strip all env vars that start with `DYLD*` # This workaround wraps the protoc command to be invoked by CMake with a modified environment + cmakelists = os.path.join(self.source_folder, "CMakeLists.txt") settings_build = getattr(self, "settings_build", self.settings) if settings_build.os == "Macos": - replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), + replace_in_file(self, cmakelists, "COMMAND ${_gRPC_PROTOBUF_PROTOC_EXECUTABLE}", 'COMMAND ${CMAKE_COMMAND} -E env "DYLD_LIBRARY_PATH=$ENV{DYLD_LIBRARY_PATH}" ${_gRPC_PROTOBUF_PROTOC_EXECUTABLE}') + elif not cross_building(self) and settings_build.os == "Linux": + # we are not cross-building, but protobuf or abseil may be shared + # so we need to set LD_LIBRARY_PATH to find them + # Note: if protobuf used RPATH instead of RUNPATH this is not needed + replace_in_file(self, cmakelists, + "COMMAND ${_gRPC_PROTOBUF_PROTOC_EXECUTABLE}", + 'COMMAND ${CMAKE_COMMAND} -E env "LD_LIBRARY_PATH=$:$ENV{LD_LIBRARY_PATH}" ${_gRPC_PROTOBUF_PROTOC_EXECUTABLE}') + if self.settings.os == "Macos" and Version(self.version) >= "1.64": + # See https://github.com/grpc/grpc/issues/36654#issuecomment-2228569158 + replace_in_file(self, cmakelists, "target_compile_features(upb_textformat_lib PUBLIC cxx_std_14)", + """target_compile_features(upb_textformat_lib PUBLIC cxx_std_14) + target_link_options(upb_textformat_lib PRIVATE -Wl,-undefined,dynamic_lookup) + target_link_options(upb_json_lib PRIVATE -Wl,-undefined,dynamic_lookup) + """) + def build(self): self._patch_sources() cmake = CMake(self) cmake.configure() cmake.build() + @property + def target_info(self): + if self._target_info: + return self._target_info + target_info_file = os.path.join(self.recipe_folder, "target_info", f"grpc_{self.version}.yml") + with open(target_info_file) as f: + self._target_info = yaml.safe_load(f) + return self._target_info + def package(self): copy(self, "LICENSE", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) cmake = CMake(self) @@ -219,46 +271,14 @@ def package(self): rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) # Create one custom module file per executable in order to emulate - # CMake executables imported targets of grpc - for plugin_option, values in self._grpc_plugins.items(): - if self.options.get_safe(plugin_option): - target = values["target"] - executable = values["executable"] + # CMake executables imported targets of grpc plugins. + for plugin_info in self.target_info["grpc_plugins"]: + target = plugin_info["target"] + executable = plugin_info["executable"] + option_name = executable.replace("grpc_", "") + if self.options.get_safe(option_name): self._create_executable_module_file(target, executable) - @property - def _grpc_plugins(self): - return { - "cpp_plugin": { - "target": "gRPC::grpc_cpp_plugin", - "executable": "grpc_cpp_plugin", - }, - "csharp_plugin": { - "target": "gRPC::grpc_csharp_plugin", - "executable": "grpc_csharp_plugin", - }, - "node_plugin": { - "target": "gRPC::grpc_node_plugin", - "executable": "grpc_node_plugin", - }, - "objective_c_plugin": { - "target": "gRPC::grpc_objective_c_plugin", - "executable": "grpc_objective_c_plugin", - }, - "php_plugin": { - "target": "gRPC::grpc_php_plugin", - "executable": "grpc_php_plugin", - }, - "python_plugin": { - "target": "gRPC::grpc_python_plugin", - "executable": "grpc_python_plugin", - }, - "ruby_plugin": { - "target": "gRPC::grpc_ruby_plugin", - "executable": "grpc_ruby_plugin", - }, - } - def _create_executable_module_file(self, target, executable): module_abs_path = os.path.join(self.package_folder, self._module_path) @@ -288,7 +308,7 @@ def _module_path(self): def _grpc_components(self): def libsystemd(): - return ["libsystemd::libsystemd"] if self.settings.os in ["Linux", "FreeBSD"] and Version(self.version) >= "1.52" else [] + return ["libsystemd::libsystemd"] if self._supports_libsystemd and self.options.with_libsystemd else [] def libm(): return ["m"] if self.settings.os in ["Linux", "FreeBSD"] else [] @@ -305,96 +325,19 @@ def ws2_32(): def wsock32(): return ["wsock32"] if self.settings.os == "Windows" else [] - def corefoundation(): - return ["CoreFoundation"] if is_apple_os(self) else [] - - components = { - "address_sorting": { - "lib": "address_sorting", - "system_libs": libm() + pthread() + crypt32() + ws2_32() + wsock32(), - }, - "gpr": { - "lib": "gpr", - "requires": [ - "upb", "abseil::absl_base", "abseil::absl_memory", - "abseil::absl_status", "abseil::absl_str_format", - "abseil::absl_strings", "abseil::absl_synchronization", - "abseil::absl_time", "abseil::absl_optional", - "abseil::absl_flags" - ] + libsystemd(), - "system_libs": libm() + pthread() + crypt32() + ws2_32() + wsock32(), - }, - "_grpc": { - "lib": "grpc", - "requires": [ - "address_sorting", "gpr", "upb", "abseil::absl_bind_front", - "abseil::absl_flat_hash_map", "abseil::absl_inlined_vector", - "abseil::absl_statusor", "abseil::absl_random_random", - "c-ares::cares", "openssl::crypto", - "openssl::ssl", "re2::re2", "zlib::zlib", - ], - "system_libs": libm() + pthread() + crypt32() + ws2_32() + wsock32(), - "frameworks": corefoundation(), - }, - "grpc++": { - "lib": "grpc++", - "requires": ["_grpc", "protobuf::libprotobuf"], - "system_libs": libm() + pthread() + crypt32() + ws2_32() + wsock32(), - }, - "grpc++_alts": { - "lib": "grpc++_alts", - "requires": ["grpc++", "protobuf::libprotobuf"], - "system_libs": libm() + pthread() + crypt32() + ws2_32() + wsock32(), - }, - "grpc++_error_details": { - "lib": "grpc++_error_details", - "requires": ["grpc++", "protobuf::libprotobuf"], - "system_libs": libm() + pthread() + crypt32() + ws2_32() + wsock32(), - }, - "upb": { - "lib": "upb", - "system_libs": libm() + pthread() + crypt32() + ws2_32() + wsock32(), - }, - "grpc_plugin_support": { - "lib": "grpc_plugin_support", - "requires": ["protobuf::libprotoc", "protobuf::libprotobuf"], + targets = self.target_info['grpc_targets'] + components = {} + for target in targets: + if self.options.secure and target['name'] in ["grpc_unsecure", "grpc++_unsecure"]: + continue + if not self.options.codegen and target['name'] in ["grpc++_reflection", "grpcpp_channelz"]: + continue + components[target['name']] = { + "lib": target['lib'], + "requires": target.get('requires', []) + libsystemd(), "system_libs": libm() + pthread() + crypt32() + ws2_32() + wsock32(), - }, - } - - if not self.options.secure: - components.update({ - "grpc_unsecure": { - "lib": "grpc_unsecure", - "requires": [ - "address_sorting", "gpr", "upb", "abseil::absl_flat_hash_map", - "abseil::absl_inlined_vector", "abseil::absl_statusor", - "c-ares::cares", "re2::re2", "zlib::zlib", - "abseil::absl_random_random", - ], - "system_libs": libm() + pthread() + crypt32() + ws2_32() + wsock32(), - "frameworks": corefoundation(), - }, - "grpc++_unsecure": { - "lib": "grpc++_unsecure", - "requires": ["grpc_unsecure", "protobuf::libprotobuf"], - "system_libs": libm() + pthread() + crypt32() + ws2_32() + wsock32(), - }, - }) - - if self.options.codegen: - components.update({ - "grpc++_reflection": { - "lib": "grpc++_reflection", - "requires": ["grpc++", "protobuf::libprotobuf"], - "system_libs": libm() + pthread() + crypt32() + ws2_32() + wsock32(), - }, - "grpcpp_channelz": { - "lib": "grpcpp_channelz", - "requires": ["grpc++", "protobuf::libprotobuf"], - "system_libs": libm() + pthread() + crypt32() + ws2_32() + wsock32(), - }, - }) + "frameworks": target.get('frameworks', []), + } return components @@ -422,9 +365,11 @@ def package_info(self): # Executable imported targets are added through custom CMake module files, # since conan generators don't know how to emulate these kind of targets. grpc_modules = [] - for plugin_option, values in self._grpc_plugins.items(): - if self.options.get_safe(plugin_option): - grpc_module_filename = "{}.cmake".format(values["executable"]) + for plugin_info in self.target_info["grpc_plugins"]: + executable = plugin_info["executable"] + option_name = executable.replace("grpc_", "") + if self.options.get_safe(option_name): + grpc_module_filename = "{}.cmake".format(executable) grpc_modules.append(os.path.join(self._module_path, grpc_module_filename)) self.cpp_info.set_property("cmake_build_modules", grpc_modules) @@ -435,5 +380,4 @@ def package_info(self): if grpc_modules: self.cpp_info.components["grpc_execs"].build_modules["cmake_find_package"] = grpc_modules self.cpp_info.components["grpc_execs"].build_modules["cmake_find_package_multi"] = grpc_modules - if any(self.options.get_safe(plugin_option) for plugin_option in self._grpc_plugins.keys()): self.env_info.PATH.append(os.path.join(self.package_folder, "bin")) diff --git a/recipes/grpc/all/patches/v1.48.x/001-disable-cppstd-override.patch b/recipes/grpc/all/patches/v1.48.x/001-disable-cppstd-override.patch deleted file mode 100644 index dee7836ac518b..0000000000000 --- a/recipes/grpc/all/patches/v1.48.x/001-disable-cppstd-override.patch +++ /dev/null @@ -1,39 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 1ecaea8eb7..0788b88177 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -226,21 +226,6 @@ if (NOT DEFINED CMAKE_C_STANDARD) - set(CMAKE_C_STANDARD 11) - endif() - --# Add c++14 flags --if (NOT DEFINED CMAKE_CXX_STANDARD) -- set(CMAKE_CXX_STANDARD 14) --else() -- if (CMAKE_CXX_STANDARD LESS 14) -- message(FATAL_ERROR "CMAKE_CXX_STANDARD is less than 14, please specify at least SET(CMAKE_CXX_STANDARD 14)") -- endif() --endif() --if (NOT DEFINED CMAKE_CXX_STANDARD_REQUIRED) -- set(CMAKE_CXX_STANDARD_REQUIRED ON) --endif() --if (NOT DEFINED CMAKE_CXX_EXTENSIONS) -- set(CMAKE_CXX_EXTENSIONS OFF) --endif() -- - if (NOT DEFINED CMAKE_POSITION_INDEPENDENT_CODE) - set(CMAKE_POSITION_INDEPENDENT_CODE TRUE) - endif() -diff --git a/src/core/ext/xds/xds_http_fault_filter.cc b/src/core/ext/xds/xds_http_fault_filter.cc -index 2a10d2fd27..0900fedf61 100644 ---- a/src/core/ext/xds/xds_http_fault_filter.cc -+++ b/src/core/ext/xds/xds_http_fault_filter.cc -@@ -109,7 +109,7 @@ absl::StatusOr ParseHttpFaultIntoJson( - int abort_http_status_code = - envoy_extensions_filters_http_fault_v3_FaultAbort_http_status( - fault_abort); -- if (abort_http_status_code != 0 and abort_http_status_code != 200) { -+ if (abort_http_status_code != 0 && abort_http_status_code != 200) { - abort_grpc_status_code = - grpc_http2_status_to_grpc_status(abort_http_status_code); - } diff --git a/recipes/grpc/all/patches/v1.50.x/002-CMake-Add-gRPC_USE_SYSTEMD-option-34384.patch b/recipes/grpc/all/patches/v1.50.x/002-CMake-Add-gRPC_USE_SYSTEMD-option-34384.patch new file mode 100644 index 0000000000000..a0b7846cd9ddb --- /dev/null +++ b/recipes/grpc/all/patches/v1.50.x/002-CMake-Add-gRPC_USE_SYSTEMD-option-34384.patch @@ -0,0 +1,57 @@ +From 64d855b0ddd944369e96b24210a1ce59e704a779 Mon Sep 17 00:00:00 2001 +From: Kirill +Date: Tue, 2 Apr 2024 13:17:47 -0700 +Subject: [PATCH] [CMake] Add gRPC_USE_SYSTEMD option (#34384) + +Issue https://github.com/grpc/grpc/issues/34304 + +Allows to disable systemd support, +as well as linking with libsystemd, +when it is not required. + +The option has three possible values: +AUTO - Default, Will try to find libsystemd. If found, systemd support will be enabled. +ON - Enable systemd support. Build will fail if libsystemd is not found. +OFF - Disable systemd support. + +Closes #34384 + +COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/34384 from kirpichik:cmake-use-systemd-option 96f5f4bd68251ca62ccc45a2d44a68a8203531ac +PiperOrigin-RevId: 621274356 +--- + cmake/systemd.cmake | 21 ++++++++++++++++----- + 1 file changed, 16 insertions(+), 5 deletions(-) + +diff --git a/cmake/systemd.cmake b/cmake/systemd.cmake +index a34210177e..559c8d24b6 100644 +--- a/cmake/systemd.cmake ++++ b/cmake/systemd.cmake +@@ -12,9 +12,20 @@ + # See the License for the specific language governing permissions and + # limitations under the License. + +-find_package(systemd) +-if(TARGET systemd) +- set(_gRPC_SYSTEMD_LIBRARIES systemd ${SYSTEMD_LINK_LIBRARIES}) +- add_definitions(-DHAVE_LIBSYSTEMD) ++set(gRPC_USE_SYSTEMD "AUTO" CACHE STRING "Build with libsystemd support if available. Can be ON, OFF or AUTO") ++ ++if (NOT gRPC_USE_SYSTEMD STREQUAL "OFF") ++ if (gRPC_USE_SYSTEMD STREQUAL "ON") ++ find_package(systemd REQUIRED) ++ elseif (gRPC_USE_SYSTEMD STREQUAL "AUTO") ++ find_package(systemd) ++ else() ++ message(FATAL_ERROR "Unknown value for gRPC_USE_SYSTEMD = ${gRPC_USE_SYSTEMD}") ++ endif() ++ ++ if(TARGET systemd) ++ set(_gRPC_SYSTEMD_LIBRARIES systemd ${SYSTEMD_LINK_LIBRARIES}) ++ add_definitions(-DHAVE_LIBSYSTEMD) ++ endif() ++ set(_gRPC_FIND_SYSTEMD "if(NOT systemd_FOUND)\n find_package(systemd)\nendif()") + endif() +-set(_gRPC_FIND_SYSTEMD "if(NOT systemd_FOUND)\n find_package(systemd)\nendif()") +-- +2.43.0 + diff --git a/recipes/grpc/all/target_info/grpc_1.50.0.yml b/recipes/grpc/all/target_info/grpc_1.50.0.yml new file mode 100644 index 0000000000000..693b7c8e2a330 --- /dev/null +++ b/recipes/grpc/all/target_info/grpc_1.50.0.yml @@ -0,0 +1,120 @@ +grpc_version: 1.50.0 +grpc_targets: + - name: "address_sorting" + lib: "address_sorting" + - name: "gpr" + lib: "gpr" + requires: + - abseil::absl_base + - abseil::absl_core_headers + - abseil::absl_memory + - abseil::absl_random_random + - abseil::absl_status + - abseil::absl_cord + - abseil::absl_str_format + - abseil::absl_strings + - abseil::absl_synchronization + - abseil::absl_time + - abseil::absl_optional + - abseil::absl_variant + - name: "_grpc" + lib: "grpc" + requires: + - zlib::zlib + - c-ares::cares + - address_sorting + - re2::re2 + - upb + - abseil::absl_flat_hash_map + - abseil::absl_flat_hash_set + - abseil::absl_inlined_vector + - abseil::absl_any_invocable + - abseil::absl_bind_front + - abseil::absl_function_ref + - abseil::absl_hash + - abseil::absl_type_traits + - abseil::absl_statusor + - abseil::absl_span + - abseil::absl_utility + - gpr + - openssl::ssl + - openssl::crypto + - address_sorting + - upb + frameworks: ['CoreFoundation'] + - name: "grpc_unsecure" + lib: "grpc_unsecure" + requires: + - zlib::zlib + - c-ares::cares + - address_sorting + - re2::re2 + - upb + - abseil::absl_flat_hash_map + - abseil::absl_flat_hash_set + - abseil::absl_inlined_vector + - abseil::absl_any_invocable + - abseil::absl_bind_front + - abseil::absl_function_ref + - abseil::absl_hash + - abseil::absl_type_traits + - abseil::absl_statusor + - abseil::absl_span + - abseil::absl_utility + - gpr + - address_sorting + - upb + frameworks: ['CoreFoundation'] + - name: "grpc++" + lib: "grpc++" + requires: + - protobuf::libprotobuf + - abseil::absl_cleanup + - _grpc + - name: "grpc++_alts" + lib: "grpc++_alts" + requires: + - protobuf::libprotobuf + - grpc++ + - name: "grpc++_error_details" + lib: "grpc++_error_details" + requires: + - protobuf::libprotobuf + - grpc++ + - name: "grpc++_reflection" + lib: "grpc++_reflection" + requires: + - protobuf::libprotobuf + - grpc++ + - name: "grpc++_unsecure" + lib: "grpc++_unsecure" + requires: + - protobuf::libprotobuf + - grpc_unsecure + - name: "grpc_plugin_support" + lib: "grpc_plugin_support" + requires: + - protobuf::libprotoc + - protobuf::libprotobuf + - name: "grpcpp_channelz" + lib: "grpcpp_channelz" + requires: + - protobuf::libprotobuf + - grpc++ + - name: "upb" + lib: "upb" +grpc_plugins: + - target: "gRPC::grpc_cpp_plugin" + executable: "grpc_cpp_plugin" + - target: "gRPC::grpc_csharp_plugin" + executable: "grpc_csharp_plugin" + - target: "gRPC::grpc_node_plugin" + executable: "grpc_node_plugin" + - target: "gRPC::grpc_objective_c_plugin" + executable: "grpc_objective_c_plugin" + - target: "gRPC::grpc_php_plugin" + executable: "grpc_php_plugin" + - target: "gRPC::grpc_python_plugin" + executable: "grpc_python_plugin" + - target: "gRPC::grpc_ruby_plugin" + executable: "grpc_ruby_plugin" diff --git a/recipes/grpc/all/target_info/grpc_1.50.1.yml b/recipes/grpc/all/target_info/grpc_1.50.1.yml new file mode 100644 index 0000000000000..3bf059795e135 --- /dev/null +++ b/recipes/grpc/all/target_info/grpc_1.50.1.yml @@ -0,0 +1,120 @@ +grpc_version: 1.50.1 +grpc_targets: + - name: "address_sorting" + lib: "address_sorting" + - name: "gpr" + lib: "gpr" + requires: + - abseil::absl_base + - abseil::absl_core_headers + - abseil::absl_memory + - abseil::absl_random_random + - abseil::absl_status + - abseil::absl_cord + - abseil::absl_str_format + - abseil::absl_strings + - abseil::absl_synchronization + - abseil::absl_time + - abseil::absl_optional + - abseil::absl_variant + - name: "_grpc" + lib: "grpc" + requires: + - zlib::zlib + - c-ares::cares + - address_sorting + - re2::re2 + - upb + - abseil::absl_flat_hash_map + - abseil::absl_flat_hash_set + - abseil::absl_inlined_vector + - abseil::absl_any_invocable + - abseil::absl_bind_front + - abseil::absl_function_ref + - abseil::absl_hash + - abseil::absl_type_traits + - abseil::absl_statusor + - abseil::absl_span + - abseil::absl_utility + - gpr + - openssl::ssl + - openssl::crypto + - address_sorting + - upb + frameworks: ['CoreFoundation'] + - name: "grpc_unsecure" + lib: "grpc_unsecure" + requires: + - zlib::zlib + - c-ares::cares + - address_sorting + - re2::re2 + - upb + - abseil::absl_flat_hash_map + - abseil::absl_flat_hash_set + - abseil::absl_inlined_vector + - abseil::absl_any_invocable + - abseil::absl_bind_front + - abseil::absl_function_ref + - abseil::absl_hash + - abseil::absl_type_traits + - abseil::absl_statusor + - abseil::absl_span + - abseil::absl_utility + - gpr + - address_sorting + - upb + frameworks: ['CoreFoundation'] + - name: "grpc++" + lib: "grpc++" + requires: + - protobuf::libprotobuf + - abseil::absl_cleanup + - _grpc + - name: "grpc++_alts" + lib: "grpc++_alts" + requires: + - protobuf::libprotobuf + - grpc++ + - name: "grpc++_error_details" + lib: "grpc++_error_details" + requires: + - protobuf::libprotobuf + - grpc++ + - name: "grpc++_reflection" + lib: "grpc++_reflection" + requires: + - protobuf::libprotobuf + - grpc++ + - name: "grpc++_unsecure" + lib: "grpc++_unsecure" + requires: + - protobuf::libprotobuf + - grpc_unsecure + - name: "grpc_plugin_support" + lib: "grpc_plugin_support" + requires: + - protobuf::libprotoc + - protobuf::libprotobuf + - name: "grpcpp_channelz" + lib: "grpcpp_channelz" + requires: + - protobuf::libprotobuf + - grpc++ + - name: "upb" + lib: "upb" +grpc_plugins: + - target: "gRPC::grpc_cpp_plugin" + executable: "grpc_cpp_plugin" + - target: "gRPC::grpc_csharp_plugin" + executable: "grpc_csharp_plugin" + - target: "gRPC::grpc_node_plugin" + executable: "grpc_node_plugin" + - target: "gRPC::grpc_objective_c_plugin" + executable: "grpc_objective_c_plugin" + - target: "gRPC::grpc_php_plugin" + executable: "grpc_php_plugin" + - target: "gRPC::grpc_python_plugin" + executable: "grpc_python_plugin" + - target: "gRPC::grpc_ruby_plugin" + executable: "grpc_ruby_plugin" diff --git a/recipes/grpc/all/target_info/grpc_1.54.3.yml b/recipes/grpc/all/target_info/grpc_1.54.3.yml new file mode 100644 index 0000000000000..a97cd9a17b217 --- /dev/null +++ b/recipes/grpc/all/target_info/grpc_1.54.3.yml @@ -0,0 +1,152 @@ +grpc_version: 1.54.3 +grpc_targets: + - name: "address_sorting" + lib: "address_sorting" + requires: + - zlib::zlib + - name: "gpr" + lib: "gpr" + requires: + - zlib::zlib + - abseil::absl_base + - abseil::absl_core_headers + - abseil::absl_flags + - abseil::absl_flags_marshalling + - abseil::absl_any_invocable + - abseil::absl_memory + - abseil::absl_random_random + - abseil::absl_status + - abseil::absl_cord + - abseil::absl_str_format + - abseil::absl_strings + - abseil::absl_synchronization + - abseil::absl_time + - abseil::absl_optional + - abseil::absl_variant + - name: "_grpc" + lib: "grpc" + requires: + - zlib::zlib + - c-ares::cares + - address_sorting + - re2::re2 + - upb + - abseil::absl_cleanup + - abseil::absl_flat_hash_map + - abseil::absl_flat_hash_set + - abseil::absl_inlined_vector + - abseil::absl_bind_front + - abseil::absl_function_ref + - abseil::absl_hash + - abseil::absl_type_traits + - abseil::absl_statusor + - abseil::absl_span + - abseil::absl_utility + - gpr + - openssl::ssl + - openssl::crypto + - address_sorting + - upb + frameworks: ['CoreFoundation'] + - name: "grpc_unsecure" + lib: "grpc_unsecure" + requires: + - zlib::zlib + - c-ares::cares + - address_sorting + - re2::re2 + - upb + - abseil::absl_cleanup + - abseil::absl_flat_hash_map + - abseil::absl_flat_hash_set + - abseil::absl_inlined_vector + - abseil::absl_bind_front + - abseil::absl_function_ref + - abseil::absl_hash + - abseil::absl_type_traits + - abseil::absl_statusor + - abseil::absl_span + - abseil::absl_utility + - gpr + - address_sorting + - upb + frameworks: ['CoreFoundation'] + - name: "grpc++" + lib: "grpc++" + requires: + - protobuf::libprotobuf + - zlib::zlib + - _grpc + - name: "grpc++_alts" + lib: "grpc++_alts" + requires: + - protobuf::libprotobuf + - zlib::zlib + - grpc++ + - name: "grpc++_error_details" + lib: "grpc++_error_details" + requires: + - protobuf::libprotobuf + - zlib::zlib + - grpc++ + - name: "grpc++_reflection" + lib: "grpc++_reflection" + requires: + - protobuf::libprotobuf + - zlib::zlib + - grpc++ + - name: "grpc++_unsecure" + lib: "grpc++_unsecure" + requires: + - protobuf::libprotobuf + - zlib::zlib + - grpc_unsecure + - name: "grpc_authorization_provider" + lib: "grpc_authorization_provider" + requires: + - protobuf::libprotobuf + - zlib::zlib + - re2::re2 + - abseil::absl_cleanup + - abseil::absl_flat_hash_map + - abseil::absl_flat_hash_set + - abseil::absl_inlined_vector + - abseil::absl_function_ref + - abseil::absl_hash + - abseil::absl_type_traits + - abseil::absl_statusor + - abseil::absl_span + - abseil::absl_utility + - gpr + - upb + - name: "grpc_plugin_support" + lib: "grpc_plugin_support" + requires: + - protobuf::libprotoc + - protobuf::libprotobuf + - zlib::zlib + - name: "grpcpp_channelz" + lib: "grpcpp_channelz" + requires: + - protobuf::libprotobuf + - zlib::zlib + - grpc++ + - name: "upb" + lib: "upb" + requires: + - zlib::zlib +grpc_plugins: + - target: "gRPC::grpc_cpp_plugin" + executable: "grpc_cpp_plugin" + - target: "gRPC::grpc_csharp_plugin" + executable: "grpc_csharp_plugin" + - target: "gRPC::grpc_node_plugin" + executable: "grpc_node_plugin" + - target: "gRPC::grpc_objective_c_plugin" + executable: "grpc_objective_c_plugin" + - target: "gRPC::grpc_php_plugin" + executable: "grpc_php_plugin" + - target: "gRPC::grpc_python_plugin" + executable: "grpc_python_plugin" + - target: "gRPC::grpc_ruby_plugin" + executable: "grpc_ruby_plugin" diff --git a/recipes/grpc/all/target_info/grpc_1.65.0.yml b/recipes/grpc/all/target_info/grpc_1.65.0.yml new file mode 100644 index 0000000000000..14d6c7bc379f9 --- /dev/null +++ b/recipes/grpc/all/target_info/grpc_1.65.0.yml @@ -0,0 +1,176 @@ +grpc_version: 1.65.0 +grpc_targets: + - name: "address_sorting" + lib: "address_sorting" + - name: "gpr" + lib: "gpr" + requires: + - abseil::absl_base + - abseil::absl_core_headers + - abseil::absl_log_severity + - abseil::absl_flags + - abseil::absl_flags_marshalling + - abseil::absl_any_invocable + - abseil::absl_check + - abseil::absl_log_globals + - abseil::absl_log + - abseil::absl_memory + - abseil::absl_random_random + - abseil::absl_status + - abseil::absl_cord + - abseil::absl_str_format + - abseil::absl_strings + - abseil::absl_synchronization + - abseil::absl_time + - abseil::absl_optional + - abseil::absl_variant + - name: "_grpc" + lib: "grpc" + requires: + - upb_json_lib + - upb_textformat_lib + - re2::re2 + - zlib::zlib + - abseil::absl_algorithm_container + - abseil::absl_config + - abseil::absl_no_destructor + - abseil::absl_cleanup + - abseil::absl_flat_hash_map + - abseil::absl_flat_hash_set + - abseil::absl_inlined_vector + - abseil::absl_bind_front + - abseil::absl_function_ref + - abseil::absl_hash + - abseil::absl_type_traits + - abseil::absl_random_bit_gen_ref + - abseil::absl_random_distributions + - abseil::absl_statusor + - abseil::absl_span + - abseil::absl_utility + - c-ares::cares + - gpr + - openssl::ssl + - openssl::crypto + - address_sorting + frameworks: ['CoreFoundation'] + - name: "grpc_unsecure" + lib: "grpc_unsecure" + requires: + - utf8_range_lib + - upb_message_lib + - zlib::zlib + - abseil::absl_algorithm_container + - abseil::absl_config + - abseil::absl_no_destructor + - abseil::absl_cleanup + - abseil::absl_flat_hash_map + - abseil::absl_flat_hash_set + - abseil::absl_inlined_vector + - abseil::absl_bind_front + - abseil::absl_function_ref + - abseil::absl_hash + - abseil::absl_type_traits + - abseil::absl_random_bit_gen_ref + - abseil::absl_random_distributions + - abseil::absl_statusor + - abseil::absl_span + - abseil::absl_utility + - c-ares::cares + - gpr + - address_sorting + frameworks: ['CoreFoundation'] + - name: "upb_base_lib" + lib: "upb_base_lib" + - name: "upb_json_lib" + lib: "upb_json_lib" + requires: + - utf8_range_lib + - upb_message_lib + - name: "upb_mem_lib" + lib: "upb_mem_lib" + - name: "upb_message_lib" + lib: "upb_message_lib" + requires: + - upb_base_lib + - upb_mem_lib + - name: "upb_textformat_lib" + lib: "upb_textformat_lib" + requires: + - utf8_range_lib + - upb_message_lib + - name: "utf8_range_lib" + lib: "utf8_range_lib" + - name: "grpc++" + lib: "grpc++" + requires: + - abseil::absl_absl_check + - abseil::absl_absl_log + - _grpc + - protobuf::libprotobuf + - name: "grpc++_alts" + lib: "grpc++_alts" + requires: + - grpc++ + - name: "grpc++_error_details" + lib: "grpc++_error_details" + requires: + - grpc++ + - name: "grpc++_reflection" + lib: "grpc++_reflection" + requires: + - grpc++ + - name: "grpc++_unsecure" + lib: "grpc++_unsecure" + requires: + - abseil::absl_absl_check + - abseil::absl_absl_log + - grpc_unsecure + - protobuf::libprotobuf + - name: "grpc_authorization_provider" + lib: "grpc_authorization_provider" + requires: + - utf8_range_lib + - upb_message_lib + - re2::re2 + - zlib::zlib + - abseil::absl_config + - abseil::absl_no_destructor + - abseil::absl_cleanup + - abseil::absl_flat_hash_map + - abseil::absl_flat_hash_set + - abseil::absl_inlined_vector + - abseil::absl_function_ref + - abseil::absl_hash + - abseil::absl_type_traits + - abseil::absl_statusor + - abseil::absl_span + - abseil::absl_utility + - c-ares::cares + - gpr + - address_sorting + - name: "grpc_plugin_support" + lib: "grpc_plugin_support" + requires: + - protobuf::libprotobuf + - protobuf::libprotoc + - name: "grpcpp_channelz" + lib: "grpcpp_channelz" + requires: + - grpc++ +grpc_plugins: + - target: "gRPC::grpc_cpp_plugin" + executable: "grpc_cpp_plugin" + - target: "gRPC::grpc_csharp_plugin" + executable: "grpc_csharp_plugin" + - target: "gRPC::grpc_node_plugin" + executable: "grpc_node_plugin" + - target: "gRPC::grpc_objective_c_plugin" + executable: "grpc_objective_c_plugin" + - target: "gRPC::grpc_php_plugin" + executable: "grpc_php_plugin" + - target: "gRPC::grpc_python_plugin" + executable: "grpc_python_plugin" + - target: "gRPC::grpc_ruby_plugin" + executable: "grpc_ruby_plugin" + - target: "gRPC::grpc_otel_plugin" + executable: "grpc_otel_plugin" diff --git a/recipes/grpc/all/target_info/grpc_1.67.1.yml b/recipes/grpc/all/target_info/grpc_1.67.1.yml new file mode 100644 index 0000000000000..9d25e03682db2 --- /dev/null +++ b/recipes/grpc/all/target_info/grpc_1.67.1.yml @@ -0,0 +1,187 @@ +grpc_version: 1.67.0 +grpc_targets: + - name: "address_sorting" + lib: "address_sorting" + - name: "gpr" + lib: "gpr" + requires: + - abseil::absl_base + - abseil::absl_core_headers + - abseil::absl_log_severity + - abseil::absl_flags + - abseil::absl_flags_marshalling + - abseil::absl_any_invocable + - abseil::absl_check + - abseil::absl_log_globals + - abseil::absl_log + - abseil::absl_memory + - abseil::absl_random_random + - abseil::absl_status + - abseil::absl_cord + - abseil::absl_str_format + - abseil::absl_strings + - abseil::absl_synchronization + - abseil::absl_time + - abseil::absl_optional + - abseil::absl_variant + - name: "_grpc" + lib: "grpc" + requires: + - upb_json_lib + - upb_textformat_lib + - re2::re2 + - zlib::zlib + - abseil::absl_algorithm_container + - abseil::absl_config + - abseil::absl_no_destructor + - abseil::absl_cleanup + - abseil::absl_flat_hash_map + - abseil::absl_flat_hash_set + - abseil::absl_inlined_vector + - abseil::absl_bind_front + - abseil::absl_function_ref + - abseil::absl_hash + - abseil::absl_type_traits + - abseil::absl_random_bit_gen_ref + - abseil::absl_random_distributions + - abseil::absl_statusor + - abseil::absl_span + - abseil::absl_utility + - c-ares::cares + - gpr + - openssl::ssl + - openssl::crypto + - address_sorting + frameworks: ['CoreFoundation'] + - name: "grpc_unsecure" + lib: "grpc_unsecure" + requires: + - upb_mini_descriptor_lib + - upb_wire_lib + - zlib::zlib + - abseil::absl_algorithm_container + - abseil::absl_config + - abseil::absl_no_destructor + - abseil::absl_cleanup + - abseil::absl_flat_hash_map + - abseil::absl_flat_hash_set + - abseil::absl_inlined_vector + - abseil::absl_bind_front + - abseil::absl_function_ref + - abseil::absl_hash + - abseil::absl_type_traits + - abseil::absl_random_bit_gen_ref + - abseil::absl_random_distributions + - abseil::absl_statusor + - abseil::absl_span + - abseil::absl_utility + - c-ares::cares + - gpr + - address_sorting + frameworks: ['CoreFoundation'] + - name: "upb_base_lib" + lib: "upb_base_lib" + - name: "upb_mini_descriptor_lib" + lib: "upb_mini_descriptor_lib" + requires: + - upb_base_lib + - upb_mem_lib + - name: "upb_wire_lib" + lib: "upb_wire_lib" + requires: + - utf8_range_lib + - upb_message_lib + - name: "upb_json_lib" + lib: "upb_json_lib" + requires: + - upb_mini_descriptor_lib + - upb_wire_lib + - name: "upb_mem_lib" + lib: "upb_mem_lib" + - name: "upb_message_lib" + lib: "upb_message_lib" + requires: + - upb_base_lib + - upb_mem_lib + - name: "upb_textformat_lib" + lib: "upb_textformat_lib" + requires: + - upb_mini_descriptor_lib + - upb_wire_lib + - name: "utf8_range_lib" + lib: "utf8_range_lib" + - name: "grpc++" + lib: "grpc++" + requires: + - abseil::absl_absl_check + - abseil::absl_absl_log + - _grpc + - protobuf::libprotobuf + - name: "grpc++_alts" + lib: "grpc++_alts" + requires: + - grpc++ + - name: "grpc++_error_details" + lib: "grpc++_error_details" + requires: + - grpc++ + - name: "grpc++_reflection" + lib: "grpc++_reflection" + requires: + - grpc++ + - name: "grpc++_unsecure" + lib: "grpc++_unsecure" + requires: + - abseil::absl_absl_check + - abseil::absl_absl_log + - grpc_unsecure + - protobuf::libprotobuf + - name: "grpc_authorization_provider" + lib: "grpc_authorization_provider" + requires: + - upb_mini_descriptor_lib + - upb_wire_lib + - upb_message_lib + - re2::re2 + - zlib::zlib + - abseil::absl_config + - abseil::absl_no_destructor + - abseil::absl_cleanup + - abseil::absl_flat_hash_map + - abseil::absl_flat_hash_set + - abseil::absl_inlined_vector + - abseil::absl_function_ref + - abseil::absl_hash + - abseil::absl_type_traits + - abseil::absl_statusor + - abseil::absl_span + - abseil::absl_utility + - c-ares::cares + - gpr + - address_sorting + - name: "grpc_plugin_support" + lib: "grpc_plugin_support" + requires: + - protobuf::libprotobuf + - protobuf::libprotoc + - name: "grpcpp_channelz" + lib: "grpcpp_channelz" + requires: + - grpc++ +grpc_plugins: + - target: "gRPC::grpc_cpp_plugin" + executable: "grpc_cpp_plugin" + - target: "gRPC::grpc_csharp_plugin" + executable: "grpc_csharp_plugin" + - target: "gRPC::grpc_node_plugin" + executable: "grpc_node_plugin" + - target: "gRPC::grpc_objective_c_plugin" + executable: "grpc_objective_c_plugin" + - target: "gRPC::grpc_php_plugin" + executable: "grpc_php_plugin" + - target: "gRPC::grpc_python_plugin" + executable: "grpc_python_plugin" + - target: "gRPC::grpc_ruby_plugin" + executable: "grpc_ruby_plugin" + - target: "gRPC::grpc_otel_plugin" + executable: "grpc_otel_plugin" diff --git a/recipes/grpc/all/test_package/CMakeLists.txt b/recipes/grpc/all/test_package/CMakeLists.txt index 15a54da82cf76..9bdf7d4baad66 100644 --- a/recipes/grpc/all/test_package/CMakeLists.txt +++ b/recipes/grpc/all/test_package/CMakeLists.txt @@ -2,29 +2,22 @@ cmake_minimum_required(VERSION 3.15) project(test_package LANGUAGES CXX) -find_package(protobuf CONFIG REQUIRED) find_package(gRPC CONFIG REQUIRED) -message("DYLD_LIBRARY_PATH from CMake: $ENV{DYLD_LIBRARY_PATH}") -add_executable(${PROJECT_NAME} test_package.cpp helloworld.proto) +add_executable(${PROJECT_NAME} test_package.cpp) target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_14) # grpc 1.47.0 requires c++14 target_link_libraries(${PROJECT_NAME} PRIVATE - protobuf::libprotobuf $,gRPC::grpc++_unsecure,gRPC::grpc++> ) -target_include_directories(${PROJECT_NAME} PRIVATE ${CMAKE_CURRENT_BINARY_DIR}) -if(TEST_ACTUAL_SERVER) - target_compile_definitions(${PROJECT_NAME} PRIVATE -DTEST_ACTUAL_SERVER) -endif() -protobuf_generate( - TARGET ${PROJECT_NAME} - LANGUAGE cpp -) -protobuf_generate( - TARGET ${PROJECT_NAME} - LANGUAGE grpc - GENERATE_EXTENSIONS .grpc.pb.h .grpc.pb.cc - PLUGIN protoc-gen-grpc=$ -) + +if(CHECK_GRPC_CPP_PLUGIN) + if(NOT GRPC_CPP_PLUGIN_PROGRAM) + message(FATAL_ERROR "grpc_cpp_plugin not found") + endif() + + if(NOT TARGET gRPC::grpc_cpp_plugin) + message(FATAL_ERROR "grpc_cpp_plugin target not defined, but expected") + endif() +endif() \ No newline at end of file diff --git a/recipes/grpc/all/test_package/conanfile.py b/recipes/grpc/all/test_package/conanfile.py index cb18d0a94bddb..3e5ae9905391e 100644 --- a/recipes/grpc/all/test_package/conanfile.py +++ b/recipes/grpc/all/test_package/conanfile.py @@ -1,57 +1,25 @@ from conan import ConanFile from conan.tools.build import can_run -from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout -from conan.tools.env import VirtualBuildEnv, VirtualRunEnv -from conan.tools.microsoft import is_msvc +from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout import os class TestPackageConan(ConanFile): settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "VirtualRunEnv" test_type = "explicit" - @property - def _is_legacy_one_profile(self): - return not hasattr(self, "settings_build") - def layout(self): cmake_layout(self) def requirements(self): self.requires(self.tested_reference_str) - self.requires("protobuf/3.21.12") - - def build_requirements(self): - if not self._is_legacy_one_profile: - # For the grpc-cpp-plugin executable at build time - self.tool_requires(self.tested_reference_str) - self.tool_requires("protobuf/") def generate(self): - # Set up environment so that we can run protoc & grpc-cpp-plugin at build time - if self._is_legacy_one_profile: - VirtualRunEnv(self).generate(scope="build") - else: - VirtualBuildEnv(self).generate() - - # Environment so that the compiled test executable can load shared libraries - runenv = VirtualRunEnv(self) - runenv.generate() - tc = CMakeToolchain(self) - tc.cache_variables["TEST_ACTUAL_SERVER"] = not (is_msvc(self) - and str(self.settings.compiler.version) in ("15", "191") - and self.settings.build_type == "Release") - - # Additional logic to override the make program on MacOS if /usr/bin/make is found by CMake - # which otherwise prevents the propagation of DYLD_LIBRARY_PATH as set by the VirtualBuildEnv - project_include = os.path.join(self.source_folder, "macos_make_override.cmake") - tc.cache_variables["CMAKE_PROJECT_test_package_INCLUDE"] = project_include + tc.cache_variables["CHECK_GRPC_CPP_PLUGIN"] = self.dependencies[self.tested_reference_str].options.cpp_plugin tc.generate() - deps = CMakeDeps(self) - deps.generate() - def build(self): cmake = CMake(self) cmake.configure() diff --git a/recipes/grpc/all/test_package/helloworld.proto b/recipes/grpc/all/test_package/helloworld.proto deleted file mode 100644 index be878ce25fffc..0000000000000 --- a/recipes/grpc/all/test_package/helloworld.proto +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright 2015 gRPC authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -option java_multiple_files = true; -option java_package = "io.grpc.examples.helloworld"; -option java_outer_classname = "HelloWorldProto"; -option objc_class_prefix = "HLW"; - -package helloworld; - -// The greeting service definition. -service Greeter { - // Sends a greeting - rpc SayHello (HelloRequest) returns (HelloReply) {} -} - -// The request message containing the user's name. -message HelloRequest { - string name = 1; -} - -// The response message containing the greetings -message HelloReply { - string message = 1; -} diff --git a/recipes/grpc/all/test_package/macos_make_override.cmake b/recipes/grpc/all/test_package/macos_make_override.cmake deleted file mode 100644 index e7078c1b51419..0000000000000 --- a/recipes/grpc/all/test_package/macos_make_override.cmake +++ /dev/null @@ -1,13 +0,0 @@ -if (CMAKE_GENERATOR MATCHES "Unix Makefiles" AND CMAKE_HOST_APPLE AND CMAKE_MAKE_PROGRAM MATCHES "/usr/bin/make") - execute_process( - COMMAND xcrun --find make - OUTPUT_VARIABLE xcode_make OUTPUT_STRIP_TRAILING_WHITESPACE - ERROR_VARIABLE xcrun_error) - if(xcode_make) - #Override the value of `CMAKE_MAKE_PROGRAM` - set_property(CACHE CMAKE_MAKE_PROGRAM PROPERTY VALUE "${xcode_make}") - else() - message(WARNING "Using /usr/bin/make may prevent execution of Conan tool_requires that require DYLD_LIBRARY_PATH" - " to be set at build time.") - endif() -endif() diff --git a/recipes/grpc/all/test_package/test_package.cpp b/recipes/grpc/all/test_package/test_package.cpp index 18a37cf90692e..53d020094793e 100644 --- a/recipes/grpc/all/test_package/test_package.cpp +++ b/recipes/grpc/all/test_package/test_package.cpp @@ -1,122 +1,9 @@ -/* - * - * Copyright 2015 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - #include -#include -#include #include -#include - #include -#include "helloworld.grpc.pb.h" - -using grpc::Channel; -using grpc::ClientContext; -using grpc::Server; -using grpc::ServerBuilder; -using grpc::ServerContext; -using grpc::Status; -using helloworld::HelloRequest; -using helloworld::HelloReply; -using helloworld::Greeter; - -class GreeterClient { - public: - GreeterClient(std::shared_ptr channel) - : stub_(Greeter::NewStub(channel)) {} - - // Assembles the client's payload, sends it and presents the response back - // from the server. - std::string SayHello(const std::string& user) { - // Data we are sending to the server. - HelloRequest request; - request.set_name(user); - - // Container for the data we expect from the server. - HelloReply reply; - - // Context for the client. It could be used to convey extra information to - // the server and/or tweak certain RPC behaviors. - ClientContext context; - // The actual RPC. - Status status = stub_->SayHello(&context, request, &reply); - - // Act upon its status. - if (status.ok()) { - return reply.message(); - } else { - std::cout << status.error_code() << ": " << status.error_message() - << std::endl; - return "RPC failed"; - } - } - - private: - std::unique_ptr stub_; -}; - -// Logic and data behind the server's behavior. -class GreeterServiceImpl final : public Greeter::Service { - Status SayHello(ServerContext* context, const HelloRequest* request, - HelloReply* reply) override { - std::string prefix("Hello "); - reply->set_message(prefix + request->name()); - return Status::OK; - } -}; int main(int argc, char** argv) { - std::string server_address("127.0.0.1:0"); - GreeterServiceImpl service; - - ServerBuilder builder; - int selected_port = 0; - // Listen on the given address without any authentication mechanism. - builder.AddListeningPort(server_address, grpc::InsecureServerCredentials(), &selected_port); - // Register "service" as the instance through which we'll communicate with - // clients. In this case it corresponds to an *synchronous* service. - builder.RegisterService(&service); - - // Finally assemble the server. -#ifdef TEST_ACTUAL_SERVER - std::unique_ptr server(builder.BuildAndStart()); - std::thread serverThread([&](){ - std::cout << "Server listening on 127.0.0.1:" << selected_port << std::endl; - server->Wait(); - std::cout << "Server closed" << std::endl; - }); -#endif - - // Instantiate the client. It requires a channel, out of which the actual RPCs - // are created. This channel models a connection to an endpoint (in this case, - // localhost at the selected port). We indicate that the channel isn't - // authenticated (use of InsecureChannelCredentials()). - std::ostringstream addr; - addr << "localhost:" << selected_port; - GreeterClient greeter(grpc::CreateChannel(addr.str(), grpc::InsecureChannelCredentials())); - std::string user("world"); - std::string reply = greeter.SayHello(user); - std::cout << "Greeter received: " << reply << std::endl; - -#ifdef TEST_ACTUAL_SERVER - server->Shutdown(); - serverThread.join(); -#endif + std::cout << "gPRC version: " << grpc::Version() << "\n"; return 0; } diff --git a/recipes/grpc/all/test_v1_package/CMakeLists.txt b/recipes/grpc/all/test_v1_package/CMakeLists.txt deleted file mode 100644 index f16bc97992e86..0000000000000 --- a/recipes/grpc/all/test_v1_package/CMakeLists.txt +++ /dev/null @@ -1,8 +0,0 @@ -cmake_minimum_required(VERSION 3.8) -project(test_v1_package LANGUAGES CXX) - -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) - -add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ - ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/grpc/all/test_v1_package/conanfile.py b/recipes/grpc/all/test_v1_package/conanfile.py deleted file mode 100644 index 5fbf37e412127..0000000000000 --- a/recipes/grpc/all/test_v1_package/conanfile.py +++ /dev/null @@ -1,55 +0,0 @@ -from conans import ConanFile, CMake, tools -import contextlib -import os - - -class TestPackageConan(ConanFile): - settings = "os", "arch", "compiler", "build_type" - generators = "cmake", "cmake_find_package_multi" - - def build_requirements(self): - if hasattr(self, "settings_build"): - self.build_requires(str(self.requires["grpc"])) - - @contextlib.contextmanager - def _buildenv(self): - # TODO: conan v2: replace by VirtualBuildEnv and always add grpc to build requirements - if tools.cross_building(self): - yield - else: - with tools.run_environment(self): - yield - - @property - def macos_grpc_shared(self): - # Due to SIP limitations on newer macOS, `DYLD_LIBRARY_PATH`, which is set - # by `tools.run_environment`, will not be propagated properly, see - # https://stackoverflow.com/questions/35568122/why-isnt-dyld-library-path-being-propagated-here - return self.settings.os == "Macos" and self.options["grpc"].shared - - def build(self): - # TODO: always build in conan v2 - # this is a limitation of conan v1: - # at build time we want to inject PATH/LD_LIBRARY/DYLD_LIBRARY_PATH - # of build requirements so that gprc_cpp_plugin can find its - # shared dependencies (in build context as well) - # should be fixed by using: CMakeToolchain + VirtualBuildEnv - if (tools.cross_building(self) and self.options["grpc"].shared) or self.macos_grpc_shared: - self.output.warning("Skipping build of test_package due to limitation propagating " - "runtime environment when invoking protoc and grpc_cpp_plugin. " - "For a working example, please see the newer Conan 2.0 compatible " - "test package.") - return - with self._buildenv(): - cmake = CMake(self) - # FIXME: This combination of settings randomly fails in CI - cmake.definitions["TEST_ACTUAL_SERVER"] = not (self.settings.compiler == "Visual Studio" - and self.settings.compiler.version == "15" - and self.settings.build_type == "Release") - cmake.configure() - cmake.build() - - def test(self): - if not tools.cross_building(self) and not self.macos_grpc_shared: - bin_path = os.path.join("bin", "test_package") - self.run(bin_path, run_environment=True) diff --git a/recipes/grpc/config.yml b/recipes/grpc/config.yml index 0e75e172635d2..cbfb6a6cea659 100644 --- a/recipes/grpc/config.yml +++ b/recipes/grpc/config.yml @@ -1,9 +1,11 @@ versions: + "1.67.1": + folder: "all" + "1.65.0": + folder: "all" "1.54.3": folder: "all" "1.50.1": folder: "all" "1.50.0": folder: "all" - "1.48.4": - folder: "all" diff --git a/recipes/gsl-lite/all/conandata.yml b/recipes/gsl-lite/all/conandata.yml index 48441a1526519..219a6dbb026e5 100644 --- a/recipes/gsl-lite/all/conandata.yml +++ b/recipes/gsl-lite/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.42.0": + url: "https://github.com/gsl-lite/gsl-lite/archive/v0.42.0.tar.gz" + sha256: "54a1b6f9db72eab5d8dcaf06b36d32d4f5da3471d91dac71aba19fe15291a773" "0.41.0": url: "https://github.com/gsl-lite/gsl-lite/archive/v0.41.0.tar.gz" sha256: "4682d8a60260321b92555760be3b9caab60e2a71f95eddbdfb91e557ee93302a" diff --git a/recipes/gsl-lite/all/conanfile.py b/recipes/gsl-lite/all/conanfile.py index 498e3972927b9..7d9514bf2f40f 100644 --- a/recipes/gsl-lite/all/conanfile.py +++ b/recipes/gsl-lite/all/conanfile.py @@ -8,12 +8,12 @@ class GslLiteConan(ConanFile): name = "gsl-lite" + description = "A single-file header-only version of ISO C++ " \ + "Guideline Support Library (GSL) for C++98, C++11 and later" license = "MIT" url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/martinmoene/gsl-lite" - topics = ("GSL",) - description = "A single-file header-only version of ISO C++ " \ - "Guideline Support Library (GSL) for C++98, C++11 and later" + topics = ("GSL", "header-only") package_type = "header-library" settings = "os", "arch", "compiler", "build_type" # There are three configuration options for this GSL implementation's behavior diff --git a/recipes/gsl-lite/config.yml b/recipes/gsl-lite/config.yml index 587567b5e7b67..928876dabb2a2 100644 --- a/recipes/gsl-lite/config.yml +++ b/recipes/gsl-lite/config.yml @@ -1,4 +1,6 @@ versions: + "0.42.0": + folder: all "0.41.0": folder: all "0.40.0": diff --git a/recipes/gsoap/all/conandata.yml b/recipes/gsoap/all/conandata.yml index cc91f201aaee4..a182b51ca54e4 100644 --- a/recipes/gsoap/all/conandata.yml +++ b/recipes/gsoap/all/conandata.yml @@ -1,11 +1,22 @@ +# The sources for this project get deleted from time to time. +# We use the backup sources from Conan Center as mirrors to let users compile in the future +# When adding new versions, directly add the URL following previous versions schema +# https://c3i.jfrog.io/artifactory/conan-center-backup-sources/ + sha256 of the sources +# The file will be automatically uploaded after the first successful compilation of the new version +# And will be usable as a mirror from then on. +# At some point the Conan client might come pre-configured with this backup remote by default, but don't delete the links then +# some users might still rely on the old revisions/not have it set to point to our CCI backup remote sources: + "2.8.134": + url: + - "https://sourceforge.net/projects/gsoap2/files/gsoap_2.8.134.zip/download" + - "https://c3i.jfrog.io/artifactory/conan-center-backup-sources/63478e555c0ccde0164f055ff605b02805db0abc6712a04bcb14cb617b047218" + sha256: "63478e555c0ccde0164f055ff605b02805db0abc6712a04bcb14cb617b047218" "2.8.132": url: - - "https://downloads.sourceforge.net/project/gsoap2/gsoap_2.8.132.zip" - - "https://c3i.jfrog.io/artifactory/cci-sources-backup/sources/gsoap/gsoap_2.8.132.zip" + - "https://c3i.jfrog.io/artifactory/conan-center-backup-sources/d6eb5d0d2c31532746f4dc9fa1ce95d4553414e918059eac23cf081d88c2aeee" sha256: "d6eb5d0d2c31532746f4dc9fa1ce95d4553414e918059eac23cf081d88c2aeee" "2.8.129": url: - - "https://downloads.sourceforge.net/project/gsoap2/gsoap_2.8.129.zip" - - "https://c3i.jfrog.io/artifactory/cci-sources-backup/sources/gsoap/gsoap_2.8.129.zip" + - "https://c3i.jfrog.io/artifactory/conan-center-backup-sources/16cb8852ea791a6aec8f0213d619c15eecc8171e0c888f3b0e0c66d3ef78e20a" sha256: "16cb8852ea791a6aec8f0213d619c15eecc8171e0c888f3b0e0c66d3ef78e20a" diff --git a/recipes/gsoap/all/test_package/conanfile.py b/recipes/gsoap/all/test_package/conanfile.py index 60209e04ba8a6..72383b4f0375e 100644 --- a/recipes/gsoap/all/test_package/conanfile.py +++ b/recipes/gsoap/all/test_package/conanfile.py @@ -7,36 +7,28 @@ class TestPackageConan(ConanFile): settings = "os", "arch", "compiler", "build_type" - generators = "CMakeDeps", "CMakeToolchain" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" test_type = "explicit" def layout(self): cmake_layout(self) def requirements(self): - self.requires(self.tested_reference_str, run=can_run(self)) - - def build_requirements(self): - if not can_run(self): - self.tool_requires(self.tested_reference_str) - - def generate(self): - VirtualRunEnv(self).generate() - if can_run(self): - VirtualRunEnv(self).generate(scope="build") - else: - VirtualBuildEnv(self).generate() + self.requires(self.tested_reference_str, run=True) def build(self): + if not can_run(self): + self.output.warning("Skipping build: the package was cross-built") + return calc_wsdl = os.path.join(self.source_folder, "calc.wsdl") self.output.info(f"Generating code from WSDL '{calc_wsdl}'") - self.run(f"wsdl2h -o calc.h {calc_wsdl}") + self.run(f"wsdl2h -o calc.h {calc_wsdl}", env="conanrun") if conan_version.major < "2": # conan v1 limitation: self.dependencies is not defined in build() method of test package import_dir = os.path.join(self.deps_cpp_info["gsoap"].rootpath, "bin", "import") else: import_dir = os.path.join(self.dependencies["gsoap"].package_folder, "bin", "import") - self.run(f"soapcpp2 -j -CL -I{import_dir} calc.h") + self.run(f"soapcpp2 -j -CL -I{import_dir} calc.h", env="conanrun") cmake = CMake(self) cmake.configure() diff --git a/recipes/gsoap/all/test_package/test_package.cpp b/recipes/gsoap/all/test_package/test_package.cpp index bf5391ec2d579..a2173524bd23c 100644 --- a/recipes/gsoap/all/test_package/test_package.cpp +++ b/recipes/gsoap/all/test_package/test_package.cpp @@ -6,15 +6,7 @@ int main() { calcProxy calc; - double sum; - if (calc.add(1.23, 4.56, sum) == SOAP_OK) - { - std::cout << "Sum = " << sum << std::endl; - } - else - { - std::cout << "Cannot sum" << std::endl; - calc.soap_stream_fault(std::cerr); - } calc.destroy(); // same as: soap_destroy(calc.soap); soap_end(calc.soap); + std::cout << "gSoap Test package successful\n"; + return 0; } diff --git a/recipes/gsoap/config.yml b/recipes/gsoap/config.yml index 9a5640854a072..89600de4b1c5d 100644 --- a/recipes/gsoap/config.yml +++ b/recipes/gsoap/config.yml @@ -1,4 +1,6 @@ versions: + "2.8.134": + folder: all "2.8.132": folder: all "2.8.129": diff --git a/recipes/gstreamer/all/conandata.yml b/recipes/gstreamer/all/conandata.yml index b40d98596b59c..e9f1bbcb66bfb 100644 --- a/recipes/gstreamer/all/conandata.yml +++ b/recipes/gstreamer/all/conandata.yml @@ -1,10 +1,10 @@ sources: + "1.24.7": + url: "https://gstreamer.freedesktop.org/src/gstreamer/gstreamer-1.24.7.tar.xz" + sha256: "c0e75b124c52bb7a0c3dcdb734b2ad260ea7286a8745cf2ea629d4c849e6a958" "1.22.6": url: "https://gstreamer.freedesktop.org/src/gstreamer/gstreamer-1.22.6.tar.xz" sha256: "f500e6cfddff55908f937711fc26a0840de28a1e9ec49621c0b6f1adbd8f818e" - "1.22.3": - url: "https://gstreamer.freedesktop.org/src/gstreamer/gstreamer-1.22.3.tar.xz" - sha256: "9ffeab95053f9f6995eb3b3da225e88f21c129cd60da002d3f795db70d6d5974" "1.20.6": url: "https://gstreamer.freedesktop.org/src/gstreamer/gstreamer-1.20.6.tar.xz" sha256: "0545b030960680f71a95f9d39c95daae54b4d317d335e8f239d81138773c9b90" @@ -17,12 +17,6 @@ sources: "1.18.4": url: "https://gitlab.freedesktop.org/gstreamer/gstreamer/-/archive/1.18.4/gstreamer-1.18.4.tar.gz" sha256: "f0956c2056281f5909d030945a9896810e55084f29b6bcfc401b53e91ddf1c7f" - "1.18.3": - url: "https://gitlab.freedesktop.org/gstreamer/gstreamer/-/archive/1.18.3/gstreamer-1.18.3.tar.gz" - sha256: "d7e3917b5d3d9c3bd9bb70b7500314a5725377cff39bcd818df13c1fda0f60ba" - "1.18.0": - sha256: "f072da67b6dad9b4aecf2cb594aaaa66f86c22af9ba80503b90f957d47015ef8" - url: "https://gitlab.freedesktop.org/gstreamer/gstreamer/-/archive/1.18.0/gstreamer-1.18.0.tar.bz2" "1.16.2": - sha256: "dac037ab84d557f5d4e6e66e833f6bf8cf4f84671a311e0b2df99f9b30a9d693" url: "https://gitlab.freedesktop.org/gstreamer/gstreamer/-/archive/1.16.2/gstreamer-1.16.2.tar.bz2" + sha256: "dac037ab84d557f5d4e6e66e833f6bf8cf4f84671a311e0b2df99f9b30a9d693" diff --git a/recipes/gstreamer/all/conanfile.py b/recipes/gstreamer/all/conanfile.py index 5f3d9d604b6b9..71de230e0d57a 100644 --- a/recipes/gstreamer/all/conanfile.py +++ b/recipes/gstreamer/all/conanfile.py @@ -7,6 +7,7 @@ from conan.tools.layout import basic_layout from conan.tools.meson import Meson, MesonToolchain from conan.tools.microsoft import is_msvc, check_min_vs +from conan.tools.scm import Version import glob import os @@ -63,13 +64,13 @@ def validate(self): raise ConanInvalidConfiguration("shared GStreamer cannot link to static GLib") def build_requirements(self): - self.tool_requires("meson/1.3.0") + self.tool_requires("meson/[>=1.2.3 <2]") # There used to be an issue with glib being shared by default but its dependencies being static # No longer the case, but see: https://github.com/conan-io/conan-center-index/pull/13400#issuecomment-1551565573 for context if not self._is_legacy_one_profile: self.tool_requires("glib/") if not self.conf.get("tools.gnu:pkg_config", check_type=str): - self.tool_requires("pkgconf/2.1.0") + self.tool_requires("pkgconf/[>=2.2 <3]") if self.options.with_introspection: self.tool_requires("gobject-introspection/1.72.0") if self._settings_build.os == 'Windows': @@ -151,7 +152,7 @@ def package_info(self): self.cpp_info.components["gstreamer-1.0"].libs = ["gstreamer-1.0"] self.cpp_info.components["gstreamer-1.0"].includedirs = [os.path.join("include", "gstreamer-1.0")] if self.settings.os == "Linux": - self.cpp_info.components["gstreamer-1.0"].system_libs = ["m"] + self.cpp_info.components["gstreamer-1.0"].system_libs = ["m", "dl", "nsl"] self.cpp_info.components["gstreamer-1.0"].set_property("pkg_config_custom_content", pkgconfig_custom_content) self.cpp_info.components["gstreamer-base-1.0"].set_property("pkg_config_name", "gstreamer-base-1.0") @@ -173,6 +174,8 @@ def package_info(self): self.cpp_info.components["gstreamer-net-1.0"].set_property("pkg_config_name", "gstreamer-net-1.0") self.cpp_info.components["gstreamer-net-1.0"].names["pkg_config"] = "gstreamer-net-1.0" self.cpp_info.components["gstreamer-net-1.0"].requires = ["gstreamer-1.0", "glib::gio-2.0"] + if Version(self.version) >= "1.21.1" and self.settings.os != "Windows": + self.cpp_info.components["gstreamer-net-1.0"].requires.append("glib::gio-unix-2.0") self.cpp_info.components["gstreamer-net-1.0"].libs = ["gstnet-1.0"] self.cpp_info.components["gstreamer-net-1.0"].includedirs = [os.path.join("include", "gstreamer-1.0")] self.cpp_info.components["gstreamer-net-1.0"].set_property("pkg_config_custom_content", pkgconfig_custom_content) @@ -186,7 +189,7 @@ def package_info(self): self.cpp_info.components["gstreamer-check-1.0"].system_libs = ["rt", "m"] self.cpp_info.components["gstreamer-check-1.0"].set_property("pkg_config_custom_content", pkgconfig_custom_content) - # gstcoreelements and gstcoretracers are plugins which should be loaded dynamicaly, and not linked to directly + # gstcoreelements and gstcoretracers are plugins which should be loaded dynamically, and not linked to directly if not self.options.shared: self.cpp_info.components["gstcoreelements"].set_property("pkg_config_name", "gstcoreelements") self.cpp_info.components["gstcoreelements"].names["pkg_config"] = "gstcoreelements" diff --git a/recipes/gstreamer/config.yml b/recipes/gstreamer/config.yml index a3f838574c2f1..99cca4b40e56f 100644 --- a/recipes/gstreamer/config.yml +++ b/recipes/gstreamer/config.yml @@ -1,7 +1,7 @@ versions: - "1.22.6": + "1.24.7": folder: all - "1.22.3": + "1.22.6": folder: all "1.20.6": folder: all @@ -11,9 +11,5 @@ versions: folder: all "1.18.4": folder: all - "1.18.3": - folder: all - "1.18.0": - folder: all "1.16.2": folder: all diff --git a/recipes/gtest/all/conandata.yml b/recipes/gtest/all/conandata.yml index b22247dc8573d..7b9115d9da952 100644 --- a/recipes/gtest/all/conandata.yml +++ b/recipes/gtest/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.15.0": + url: "https://github.com/google/googletest/releases/download/v1.15.0/googletest-1.15.0.tar.gz" + sha256: "7315acb6bf10e99f332c8a43f00d5fbb1ee6ca48c52f6b936991b216c586aaad" "1.14.0": url: "https://github.com/google/googletest/archive/refs/tags/v1.14.0.tar.gz" sha256: "8ad598c73ad796e0d8280b082cebd82a630d73e73cd3c70057938a6501bba5d7" diff --git a/recipes/gtest/all/conanfile.py b/recipes/gtest/all/conanfile.py index 556a1401b077b..9b88c6888f25b 100644 --- a/recipes/gtest/all/conanfile.py +++ b/recipes/gtest/all/conanfile.py @@ -37,6 +37,10 @@ class GTestConan(ConanFile): "debug_postfix": "d", "disable_pthreads": False, } + # disallow cppstd compatibility, as it affects the ABI in this library + # see https://github.com/conan-io/conan-center-index/issues/23854 + # Requires Conan >=1.53.0 <2 || >=2.1.0 to work + extension_properties = {"compatibility_cppstd": False} @property def _min_cppstd(self): @@ -158,7 +162,8 @@ def package_info(self): self.cpp_info.components["libgtest"].libs = [f"gtest{self._postfix}"] if self.settings.os in ["Linux", "FreeBSD"]: self.cpp_info.components["libgtest"].system_libs.append("m") - self.cpp_info.components["libgtest"].system_libs.append("pthread") + if not self.options.disable_pthreads: + self.cpp_info.components["libgtest"].system_libs.append("pthread") if self.settings.os == "Neutrino" and self.settings.os.version == "7.1": self.cpp_info.components["libgtest"].system_libs.append("regex") if self.options.shared: diff --git a/recipes/gtest/config.yml b/recipes/gtest/config.yml index fa66f2eb7d4d7..e0f7e6d533d7f 100644 --- a/recipes/gtest/config.yml +++ b/recipes/gtest/config.yml @@ -1,4 +1,6 @@ versions: + "1.15.0": + folder: all "1.14.0": folder: all "1.13.0": diff --git a/recipes/gtlab-logging/all/conandata.yml b/recipes/gtlab-logging/all/conandata.yml new file mode 100644 index 0000000000000..a3c93f35dda32 --- /dev/null +++ b/recipes/gtlab-logging/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "4.4.1": + sha256: "3f905b36de130e32a3b2230b78fee8dfc2747775a6171c7a81d3d02843093e72" + url: "https://github.com/dlr-gtlab/gt-logging/archive/refs/tags/4-4-1.tar.gz" diff --git a/recipes/gtlab-logging/all/conanfile.py b/recipes/gtlab-logging/all/conanfile.py new file mode 100644 index 0000000000000..4faba2a85c630 --- /dev/null +++ b/recipes/gtlab-logging/all/conanfile.py @@ -0,0 +1,110 @@ +from conan.tools.cmake import CMake, CMakeToolchain, CMakeDeps, cmake_layout +from conan.tools import files +from conan.tools.build import check_min_cppstd +from conan.errors import ConanInvalidConfiguration +from conan import ConanFile +import os + +required_conan_version = ">=1.59.0" + +class GTLabLoggingConan(ConanFile): + name = "gtlab-logging" + license = "BSD-3-Clause" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/dlr-gtlab/gt-logging" + topics = ("logging", "qt") + description = "Simple logging interface with qt support" + + settings = "os", "arch", "compiler", "build_type" + package_type = "library" + + options = { + "shared": [True, False], + "fPIC": [True, False], + "with_qt": [True, False] + } + default_options = { + "shared": False, + "fPIC": True, + "with_qt": False + } + + def requirements(self): + if self.options.with_qt: + self.requires("qt/[>=5.15 <7]", transitive_headers=True) + + + @property + def _min_cppstd(self): + return "14" + + @property + def _minimum_compilers_version(self): + return { + "14": { + "Visual Studio": "15", + "msvc": "191", + "gcc": "7.3.1", + "clang": "6", + "apple-clang": "14", + }, + }.get(self._min_cppstd, {}) + + def validate(self): + if self.settings.get_safe("compiler.cppstd"): + check_min_cppstd(self, self._min_cppstd) + + def loose_lt_semver(v1, v2): + return all(int(p1) < int(p2) for p1, p2 in zip(str(v1).split("."), str(v2).split("."))) + + compiler = self.settings.compiler + min_version = self._minimum_compilers_version.get(str(compiler)) + if min_version and loose_lt_semver(str(compiler.version), min_version): + raise ConanInvalidConfiguration( + f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." + ) + + def generate(self): + CMakeToolchain(self).generate() + CMakeDeps(self).generate() + + def layout(self): + cmake_layout(self, src_folder="src") + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + + def source(self): + files.get(self, **self.conan_data["sources"][self.version], + strip_root=True, destination=self.source_folder) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + + def package(self): + cmake = CMake(self) + cmake.install() + + files.rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) + files.copy(self, os.path.join("LICENSES", "BSD-3-Clause.txt"), dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) + + def package_info(self): + self.cpp_info.libs = ["GTlabLogging"] if self.settings.build_type != "Debug" else ["GTlabLogging-d"] + + self.cpp_info.includedirs.append(os.path.join("include", "logging")) + + self.cpp_info.libdirs = [os.path.join("lib", "logging")] + + self.cpp_info.set_property("cmake_file_name", "GTlabLogging") + self.cpp_info.set_property("cmake_target_name", "GTlab::Logging") + + if self.options.with_qt: + self.cpp_info.defines = ['GT_LOG_USE_QT_BINDINGS'] diff --git a/recipes/gtlab-logging/all/test_package/CMakeLists.txt b/recipes/gtlab-logging/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..78edd9030ca73 --- /dev/null +++ b/recipes/gtlab-logging/all/test_package/CMakeLists.txt @@ -0,0 +1,7 @@ +cmake_minimum_required(VERSION 3.12) +project(PackageTest CXX) + +find_package(GTlabLogging REQUIRED) + +add_executable(example example.cpp) +target_link_libraries(example GTlab::Logging) diff --git a/recipes/gtlab-logging/all/test_package/conanfile.py b/recipes/gtlab-logging/all/test_package/conanfile.py new file mode 100644 index 0000000000000..1f279ef73c18b --- /dev/null +++ b/recipes/gtlab-logging/all/test_package/conanfile.py @@ -0,0 +1,26 @@ +from conan import ConanFile +from conan.tools.cmake import CMake, cmake_layout +from conan.tools.build import can_run +import os + + +class GTlabLoggingTestConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + + def layout(self): + cmake_layout(self) + + def requirements(self): + self.requires(self.tested_reference_str) + + def build(self): + cmake = CMake(self) + + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindirs[0], "example") + self.run(bin_path, env="conanrun") diff --git a/recipes/gtlab-logging/all/test_package/example.cpp b/recipes/gtlab-logging/all/test_package/example.cpp new file mode 100644 index 0000000000000..831dda5df891b --- /dev/null +++ b/recipes/gtlab-logging/all/test_package/example.cpp @@ -0,0 +1,6 @@ +#include + +int main() { + gtError() << "Hello World"; + return 0; +} diff --git a/recipes/gtlab-logging/config.yml b/recipes/gtlab-logging/config.yml new file mode 100644 index 0000000000000..e4bb798c7e054 --- /dev/null +++ b/recipes/gtlab-logging/config.yml @@ -0,0 +1,3 @@ +versions: + "4.4.1": + folder: all diff --git a/recipes/harfbuzz/all/conanfile.py b/recipes/harfbuzz/all/conanfile.py index a0f1c1c55554a..873c8a5081e27 100644 --- a/recipes/harfbuzz/all/conanfile.py +++ b/recipes/harfbuzz/all/conanfile.py @@ -84,7 +84,7 @@ def requirements(self): if self.options.with_icu: self.requires("icu/74.1") if self.options.with_glib: - self.requires("glib/2.78.1") + self.requires("glib/2.78.3") def validate(self): if self.options.shared and self.options.with_glib and not self.dependencies["glib"].options.shared: @@ -100,7 +100,7 @@ def validate(self): ) def build_requirements(self): - self.tool_requires("meson/1.3.2") + self.tool_requires("meson/1.4.0") if not self.conf.get("tools.gnu:pkg_config", check_type=str): self.tool_requires("pkgconf/2.1.0") if self.options.with_glib: diff --git a/recipes/harfbuzz/all/test_package/conanfile.py b/recipes/harfbuzz/all/test_package/conanfile.py index e9a060aba448d..ca918824970c4 100644 --- a/recipes/harfbuzz/all/test_package/conanfile.py +++ b/recipes/harfbuzz/all/test_package/conanfile.py @@ -23,6 +23,5 @@ def build(self): def test(self): if can_run(self): - font = os.path.join(self.source_folder, "example.ttf") bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") - self.run(f"{bin_path} {font}", env="conanrun") + self.run(bin_path, env="conanrun") diff --git a/recipes/harfbuzz/all/test_package/example.ttf b/recipes/harfbuzz/all/test_package/example.ttf deleted file mode 100644 index 1849f5cc07efa..0000000000000 Binary files a/recipes/harfbuzz/all/test_package/example.ttf and /dev/null differ diff --git a/recipes/harfbuzz/all/test_package/test_package.c b/recipes/harfbuzz/all/test_package/test_package.c index 5f2ac9a8454e4..0bd42e5ab1456 100644 --- a/recipes/harfbuzz/all/test_package/test_package.c +++ b/recipes/harfbuzz/all/test_package/test_package.c @@ -1,141 +1,9 @@ -/* - * Copyright © 2011 Google, Inc. - * - * This is part of HarfBuzz, a text shaping library. - * - * Permission is hereby granted, without written agreement and without - * license or royalty fees, to use, copy, modify, and distribute this - * software and its documentation for any purpose, provided that the - * above copyright notice and the following two paragraphs appear in - * all copies of this software. - * - * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR - * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES - * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN - * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH - * DAMAGE. - * - * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, - * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS - * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO - * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. - * - * Google Author(s): Behdad Esfahbod - */ - -#include #include -#include - -#include "harfbuzz/hb.h" -#include "harfbuzz/hb-ot.h" - -#define FONT_SIZE 36 -#define MARGIN (FONT_SIZE * .5) - -/* Use native open type implementation to load font - https://github.com/harfbuzz/harfbuzz/issues/255 */ -hb_font_t* -get_font_ot(const char *filename, int size) -{ - size_t result = 0; - FILE* file = fopen(filename, "rb"); - fseek(file, 0, SEEK_END); - unsigned int length = ftell(file); - fseek(file, 0, SEEK_SET); - - char* data = (char*) malloc(length); - result = fread(data, length, 1, file); - if (result != 1) - { - fputs ("Reading error", stderr); - exit (3); - } - fclose(file); - - hb_blob_t* blob = hb_blob_create(data, length, HB_MEMORY_MODE_WRITABLE, (void*)data, NULL); - hb_face_t* face = hb_face_create(blob, 0); - hb_font_t* font = hb_font_create(face); - - hb_ot_font_set_funcs(font); - hb_font_set_scale(font, size, size); - - return font; -} - -int -main(int argc, char **argv) -{ - if (argc < 2) { - fprintf(stderr, "Usage: %s FONT\n", argv[0]); - return 1; - } - const char *fontfile = argv[1]; - const char *text = "conan-center-index"; - - /* Create hb-ft font. */ - hb_font_t *hb_font; - hb_font = get_font_ot (fontfile, FONT_SIZE*64); - - /* Create hb-buffer and populate. */ - hb_buffer_t *hb_buffer; - hb_buffer = hb_buffer_create (); - hb_buffer_add_utf8 (hb_buffer, text, -1, 0, -1); - hb_buffer_guess_segment_properties (hb_buffer); - - /* Shape it! */ - hb_shape (hb_font, hb_buffer, NULL, 0); - - /* Get glyph information and positions out of the buffer. */ - unsigned int len = hb_buffer_get_length (hb_buffer); - hb_glyph_info_t *info = hb_buffer_get_glyph_infos (hb_buffer, NULL); - hb_glyph_position_t *pos = hb_buffer_get_glyph_positions (hb_buffer, NULL); - - /* Print them out as is. */ - printf ("Raw buffer contents:\n"); - for (unsigned int i = 0; i < len; i++) - { - hb_codepoint_t gid = info[i].codepoint; - unsigned int cluster = info[i].cluster; - double x_advance = pos[i].x_advance / 64.; - double y_advance = pos[i].y_advance / 64.; - double x_offset = pos[i].x_offset / 64.; - double y_offset = pos[i].y_offset / 64.; - - char glyphname[32]; - hb_font_get_glyph_name (hb_font, gid, glyphname, sizeof (glyphname)); - - printf ("glyph='%s' cluster=%d advance=(%g,%g) offset=(%g,%g)\n", - glyphname, cluster, x_advance, y_advance, x_offset, y_offset); - } - - printf ("Converted to absolute positions:\n"); - /* And converted to absolute positions. */ - { - double current_x = 0; - double current_y = 0; - for (unsigned int i = 0; i < len; i++) - { - hb_codepoint_t gid = info[i].codepoint; - unsigned int cluster = info[i].cluster; - double x_position = current_x + pos[i].x_offset / 64.; - double y_position = current_y + pos[i].y_offset / 64.; - - - char glyphname[32]; - hb_font_get_glyph_name (hb_font, gid, glyphname, sizeof (glyphname)); - - printf ("glyph='%s' cluster=%d position=(%g,%g)\n", - glyphname, cluster, x_position, y_position); - - current_x += pos[i].x_advance / 64.; - current_y += pos[i].y_advance / 64.; - } - } - - hb_buffer_destroy (hb_buffer); - hb_font_destroy (hb_font); +#include +#include - return 0; +int main() { + const char *version = hb_version_string(); + printf("harfbuzz version: %s\n", version); + return 0; } diff --git a/recipes/harfbuzz/all/test_v1_package/conanfile.py b/recipes/harfbuzz/all/test_v1_package/conanfile.py index a4aa2f28304a1..994065a757445 100644 --- a/recipes/harfbuzz/all/test_v1_package/conanfile.py +++ b/recipes/harfbuzz/all/test_v1_package/conanfile.py @@ -13,7 +13,6 @@ def build(self): def test(self): if not tools.cross_building(self): - font = os.path.join(self.source_folder, "..", "test_package", "example.ttf") bin_path = os.path.join("bin", "test_package") - self.run(f"{bin_path} {font}", run_environment=True) + self.run(bin_path, run_environment=True) diff --git a/recipes/hdf5/all/conandata.yml b/recipes/hdf5/all/conandata.yml index c5d710eb6a95b..b3a2eb941b898 100644 --- a/recipes/hdf5/all/conandata.yml +++ b/recipes/hdf5/all/conandata.yml @@ -1,4 +1,10 @@ sources: + "1.14.5": + url: "https://github.com/HDFGroup/hdf5/archive/refs/tags/hdf5_1.14.5.tar.gz" + sha256: "c83996dc79080a34e7b5244a1d5ea076abfd642ec12d7c25388e2fdd81d26350" + "1.14.4.3": + url: "https://github.com/HDFGroup/hdf5/archive/refs/tags/hdf5_1.14.4.3.tar.gz" + sha256: "690c1db7ba0fed4ffac61709236675ffd99d95d191e8920ee79c58d7e7ea3361" "1.14.3": url: "https://github.com/HDFGroup/hdf5/archive/hdf5-1_14_3/hdf5-1_14_3.tar.gz" sha256: "df5ee33c74d5efb59738075ef96f4201588e1f1eeb233f047ac7fd1072dee1f6" diff --git a/recipes/hdf5/all/conanfile.py b/recipes/hdf5/all/conanfile.py index 2f176fad53d61..6ef1845be3cb4 100644 --- a/recipes/hdf5/all/conanfile.py +++ b/recipes/hdf5/all/conanfile.py @@ -4,7 +4,7 @@ from conan import ConanFile from conan.errors import ConanInvalidConfiguration -from conan.tools.build import can_run, check_min_cppstd, valid_min_cppstd +from conan.tools.build import cross_building, check_min_cppstd, valid_min_cppstd from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, replace_in_file, rm, rmdir, save from conan.tools.scm import Version @@ -17,7 +17,7 @@ class Hdf5Conan(ConanFile): description = "HDF5 is a data model, library, and file format for storing and managing data." license = "BSD-3-Clause" topics = "hdf", "data" - homepage = "https://portal.hdfgroup.org/display/HDF5/HDF5" + homepage = "https://www.hdfgroup.org/solutions/hdf5/" url = "https://github.com/conan-io/conan-center-index" package_type = "library" settings = "os", "arch", "compiler", "build_type" @@ -28,6 +28,7 @@ class Hdf5Conan(ConanFile): "hl": [True, False], "threadsafe": [True, False], "with_zlib": [True, False], + "with_zlibng": [True, False], "szip_support": [None, "with_libaec", "with_szip"], "szip_encoding": [True, False], "parallel": [True, False], @@ -40,6 +41,7 @@ class Hdf5Conan(ConanFile): "hl": True, "threadsafe": False, "with_zlib": True, + "with_zlibng": False, "szip_support": None, "szip_encoding": False, "parallel": False, @@ -77,6 +79,8 @@ def layout(self): def requirements(self): if self.options.with_zlib: self.requires("zlib/[>=1.2.11 <2]") + if self.options.with_zlibng: + self.requires("zlib-ng/2.2.2") if self.options.szip_support == "with_libaec": self.requires("libaec/1.0.6") elif self.options.szip_support == "with_szip": @@ -85,9 +89,6 @@ def requirements(self): self.requires("openmpi/4.1.0") def validate(self): - if not can_run(self): - # While building it runs some executables like H5detect - raise ConanInvalidConfiguration("Current recipe doesn't support cross-building (yet)") if self.options.parallel and not self.options.enable_unsupported: if self.options.enable_cxx: raise ConanInvalidConfiguration("Parallel and C++ options are mutually exclusive, forcefully allow with enable_unsupported=True") @@ -97,9 +98,18 @@ def validate(self): self.options.szip_encoding and \ not self.dependencies["szip"].options.enable_encoding: raise ConanInvalidConfiguration("encoding must be enabled in szip dependency (szip:enable_encoding=True)") + if self.options.with_zlib and self.options.get_safe("with_zlibng"): + raise ConanInvalidConfiguration("with_zlib and with_zlibng cannot be enabled at the same time") + if self.options.get_safe("with_zlibng") and Version(self.version) < "1.14.5": + raise ConanInvalidConfiguration("with_zlibng=True is incompatible with versions prior to v1.14.5") if self.settings.get_safe("compiler.cppstd"): check_min_cppstd(self, self._min_cppstd) + def validate_build(self): + if cross_building(self) and Version(self.version) < "1.14.4.3": + # While building it runs some executables like H5detect + raise ConanInvalidConfiguration("Current recipe doesn't support cross-building (yet)") + def build_requirements(self): if Version(self.version) >= "1.14.0": self.tool_requires("cmake/[>=3.18 <4]") @@ -148,6 +158,7 @@ def generate(self): tc.variables["HDF5_ENABLE_Z_LIB_SUPPORT"] = self.options.with_zlib tc.variables["HDF5_ENABLE_SZIP_SUPPORT"] = bool(self.options.szip_support) tc.variables["HDF5_ENABLE_SZIP_ENCODING"] = self.options.get_safe("szip_encoding", False) + tc.variables["HDF5_USE_ZLIB_NG"] = self.options.get_safe("with_zlibng", False) tc.variables["HDF5_PACKAGE_EXTLIBS"] = False tc.variables["HDF5_ENABLE_THREADSAFE"] = self.options.get_safe("threadsafe", False) tc.variables["HDF5_ENABLE_DEBUG_APIS"] = False # Option? diff --git a/recipes/hdf5/config.yml b/recipes/hdf5/config.yml index 78000beb7c226..ecd8ab4173bf5 100644 --- a/recipes/hdf5/config.yml +++ b/recipes/hdf5/config.yml @@ -1,4 +1,8 @@ versions: + "1.14.5": + folder: all + "1.14.4.3": + folder: all "1.14.3": folder: all "1.14.2": diff --git a/recipes/hello-conan/all/CMakeLists.txt b/recipes/hello-conan/all/CMakeLists.txt new file mode 100644 index 0000000000000..4be7c999bbce3 --- /dev/null +++ b/recipes/hello-conan/all/CMakeLists.txt @@ -0,0 +1,9 @@ +cmake_minimum_required(VERSION 3.15) + +project(hello-conan LANGUAGES CXX) + +add_library(hello-conan src/hello-conan.cpp) + +target_include_directories(hello-conan PUBLIC include) +set_target_properties(hello-conan PROPERTIES PUBLIC_HEADER "include/hello-conan.h") +install(TARGETS hello-conan) diff --git a/recipes/hello-conan/all/conanfile.py b/recipes/hello-conan/all/conanfile.py new file mode 100644 index 0000000000000..5ce78afb9e98a --- /dev/null +++ b/recipes/hello-conan/all/conanfile.py @@ -0,0 +1,53 @@ +from conan import ConanFile +from conan.tools.cmake import CMakeToolchain, CMake, cmake_layout, CMakeDeps +from conan.tools.files import save + +from pathlib import Path + +required_conan_version = ">=2.8.0" + +class hello_conanRecipe(ConanFile): + name = "hello-conan" + package_type = "library" + + # Optional metadata !_!!!! + license = "MIT" + url = "https://github.com/conan-io/conan-center-index" + description = "Dummy recipe for internal testing" + topics = ("conan-testing", "dummy") + + # Binary configuration + settings = "os", "compiler", "build_type", "arch" + options = {"shared": [True, False], "fPIC": [True, False]} + default_options = {"shared": False, "fPIC": True} + + # Sources are located in the same place as this recipe, copy them to the recipe + exports_sources = "CMakeLists.txt", "src/*", "include/*" + + implements = ["auto_shared_fpic"] + + def layout(self): + cmake_layout(self) + + def generate(self): + deps = CMakeDeps(self) + deps.generate() + tc = CMakeToolchain(self) + tc.generate() + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def package(self): + cmake = CMake(self) + cmake.install() + + # save a dummy .la file to trigger hook warning + la_file = Path(self.package_folder) / "lib" / "hello-conan-foobar.la" + save(self, la_file.as_posix(), "foobar") + + def package_info(self): + self.cpp_info.libs = ["hello-conan"] + diff --git a/recipes/hello-conan/all/include/hello-conan.h b/recipes/hello-conan/all/include/hello-conan.h new file mode 100644 index 0000000000000..a7ad36e5ace0c --- /dev/null +++ b/recipes/hello-conan/all/include/hello-conan.h @@ -0,0 +1,14 @@ +#pragma once + +#include +#include + + +#ifdef _WIN32 + #define HELLO_CONAN_EXPORT __declspec(dllexport) +#else + #define HELLO_CONAN_EXPORT +#endif + +HELLO_CONAN_EXPORT void hello_conan(); +HELLO_CONAN_EXPORT void hello_conan_print_vector(const std::vector &strings); diff --git a/recipes/hello-conan/all/src/hello-conan.cpp b/recipes/hello-conan/all/src/hello-conan.cpp new file mode 100644 index 0000000000000..e4ac284e8c482 --- /dev/null +++ b/recipes/hello-conan/all/src/hello-conan.cpp @@ -0,0 +1,120 @@ +#include +#include "hello-conan.h" + + + +void hello_conan(){ + + + #ifdef NDEBUG + std::cout << "hello-conan: Hello World Release!\n"; + #else + std::cout << "hello-conan: Hello World Debug!\n"; + #endif + + // ARCHITECTURES + #ifdef _M_X64 + std::cout << " hello-conan: _M_X64 defined\n"; + #endif + + #ifdef _M_IX86 + std::cout << " hello-conan: _M_IX86 defined\n"; + #endif + + #ifdef _M_ARM64 + std::cout << " hello-conan: _M_ARM64 defined\n"; + #endif + + #if __i386__ + std::cout << " hello-conan: __i386__ defined\n"; + #endif + + #if __x86_64__ + std::cout << " hello-conan: __x86_64__ defined\n"; + #endif + + #if __aarch64__ + std::cout << " hello-conan: __aarch64__ defined\n"; + #endif + + // Libstdc++ + #if defined _GLIBCXX_USE_CXX11_ABI + std::cout << " hello-conan: _GLIBCXX_USE_CXX11_ABI "<< _GLIBCXX_USE_CXX11_ABI << "\n"; + #endif + + // MSVC runtime + #if defined(_DEBUG) + #if defined(_MT) && defined(_DLL) + std::cout << " hello-conan: MSVC runtime: MultiThreadedDebugDLL\n"; + #elif defined(_MT) + std::cout << " hello-conan: MSVC runtime: MultiThreadedDebug\n"; + #endif + #else + #if defined(_MT) && defined(_DLL) + std::cout << " hello-conan: MSVC runtime: MultiThreadedDLL\n"; + #elif defined(_MT) + std::cout << " hello-conan: MSVC runtime: MultiThreaded\n"; + #endif + #endif + + // COMPILER VERSIONS + #if _MSC_VER + std::cout << " hello-conan: _MSC_VER" << _MSC_VER<< "\n"; + #endif + + #if _MSVC_LANG + std::cout << " hello-conan: _MSVC_LANG" << _MSVC_LANG<< "\n"; + #endif + + #if __cplusplus + std::cout << " hello-conan: __cplusplus" << __cplusplus<< "\n"; + #endif + + #if __INTEL_COMPILER + std::cout << " hello-conan: __INTEL_COMPILER" << __INTEL_COMPILER<< "\n"; + #endif + + #if __GNUC__ + std::cout << " hello-conan: __GNUC__" << __GNUC__<< "\n"; + #endif + + #if __GNUC_MINOR__ + std::cout << " hello-conan: __GNUC_MINOR__" << __GNUC_MINOR__<< "\n"; + #endif + + #if __clang_major__ + std::cout << " hello-conan: __clang_major__" << __clang_major__<< "\n"; + #endif + + #if __clang_minor__ + std::cout << " hello-conan: __clang_minor__" << __clang_minor__<< "\n"; + #endif + + #if __apple_build_version__ + std::cout << " hello-conan: __apple_build_version__" << __apple_build_version__<< "\n"; + #endif + + // SUBSYSTEMS + + #if __MSYS__ + std::cout << " hello-conan: __MSYS__" << __MSYS__<< "\n"; + #endif + + #if __MINGW32__ + std::cout << " hello-conan: __MINGW32__" << __MINGW32__<< "\n"; + #endif + + #if __MINGW64__ + std::cout << " hello-conan: __MINGW64__" << __MINGW64__<< "\n"; + #endif + + #if __CYGWIN__ + std::cout << " hello-conan: __CYGWIN__" << __CYGWIN__<< "\n"; + #endif +} + +void hello_conan_print_vector(const std::vector &strings) { + for(std::vector::const_iterator it = strings.begin(); it != strings.end(); ++it) { + std::cout << "hello_conan " << *it << std::endl; + } +} diff --git a/recipes/hello-conan/all/test_package/CMakeLists.txt b/recipes/hello-conan/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..5a6e6596a4333 --- /dev/null +++ b/recipes/hello-conan/all/test_package/CMakeLists.txt @@ -0,0 +1,7 @@ +cmake_minimum_required(VERSION 3.15) +project(PackageTest CXX) + +find_package(hello-conan CONFIG REQUIRED) + +add_executable(example src/example.cpp) +target_link_libraries(example hello-conan::hello-conan) diff --git a/recipes/hello-conan/all/test_package/conanfile.py b/recipes/hello-conan/all/test_package/conanfile.py new file mode 100644 index 0000000000000..953f2c57d31ae --- /dev/null +++ b/recipes/hello-conan/all/test_package/conanfile.py @@ -0,0 +1,26 @@ +import os + +from conan import ConanFile +from conan.tools.cmake import CMake, cmake_layout +from conan.tools.build import can_run + + +class hello_conanTestConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "CMakeDeps", "CMakeToolchain" + + def requirements(self): + self.requires(self.tested_reference_str) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def layout(self): + cmake_layout(self) + + def test(self): + if can_run(self): + cmd = os.path.join(self.cpp.build.bindir, "example") + self.run(cmd, env="conanrun") diff --git a/recipes/hello-conan/all/test_package/src/example.cpp b/recipes/hello-conan/all/test_package/src/example.cpp new file mode 100644 index 0000000000000..92b072f19e866 --- /dev/null +++ b/recipes/hello-conan/all/test_package/src/example.cpp @@ -0,0 +1,12 @@ +#include "hello-conan.h" +#include +#include + +int main() { + hello_conan(); + + std::vector vec; + vec.push_back("test_package"); + + hello_conan_print_vector(vec); +} diff --git a/recipes/hello-conan/config.yml b/recipes/hello-conan/config.yml new file mode 100644 index 0000000000000..87dc2c7cd104e --- /dev/null +++ b/recipes/hello-conan/config.yml @@ -0,0 +1,3 @@ +versions: + "0.0.1.cci.20241029": + folder: all \ No newline at end of file diff --git a/recipes/hictk/all/conandata.yml b/recipes/hictk/all/conandata.yml index 8f7bc333d7e7a..2ad5e6a4a9214 100644 --- a/recipes/hictk/all/conandata.yml +++ b/recipes/hictk/all/conandata.yml @@ -1,7 +1,10 @@ sources: - "0.0.11": - url: "https://github.com/paulsengroup/hictk/archive/refs/tags/v0.0.11.tar.gz" - sha256: "a06b674de2301918188d1c890a95aaa4d6164377ebaa44cc07efb77fd9eb654c" + "1.0.0": + url: "https://github.com/paulsengroup/hictk/archive/refs/tags/v1.0.0.tar.gz" + sha256: "e337f52658a257eb6265e211dd3cef6b73db40bdc5b5a6433b47ce4faa6006fb" + "0.0.12": + url: "https://github.com/paulsengroup/hictk/archive/refs/tags/v0.0.12.tar.gz" + sha256: "03e8f7c0076ea6209fdfee1580658e871895f6a59b895407c4a25512b9558fb7" "0.0.10": url: "https://github.com/paulsengroup/hictk/archive/refs/tags/v0.0.10.tar.gz" sha256: "0b2d60af73578b292317e5ab513f24965176f9852ceda29e8d02007a434588c3" diff --git a/recipes/hictk/all/conanfile.py b/recipes/hictk/all/conanfile.py index 5e466db516caa..d125eb77e94dc 100644 --- a/recipes/hictk/all/conanfile.py +++ b/recipes/hictk/all/conanfile.py @@ -19,8 +19,14 @@ class HictkConan(ConanFile): topics = "hictk", "bioinformatics", "hic" package_type = "header-library" settings = "os", "arch", "compiler", "build_type" - options = {"with_eigen": [True, False]} - default_options = {"with_eigen": True} + options = { + "with_arrow": [True, False], + "with_eigen": [True, False] + } + default_options = { + "with_arrow": False, + "with_eigen": True + } @property def _min_cppstd(self): @@ -39,26 +45,32 @@ def _compilers_minimum_version(self): def layout(self): cmake_layout(self, src_folder="src") + def config_options(self): + if Version(self.version) < "1.0.0": + del self.options.with_arrow + def requirements(self): - self.requires("bshoshany-thread-pool/4.0.1", transitive_headers=True) - self.requires("fast_float/6.1.1", transitive_headers=True) + if self.options.get_safe("with_arrow"): + self.requires("arrow/16.1.0") + self.requires("bshoshany-thread-pool/4.1.0") + self.requires("fast_float/6.1.1") if self.options.with_eigen: - self.requires("eigen/3.4.0", transitive_headers=True) - self.requires("fmt/10.2.1", transitive_headers=True) - self.requires("hdf5/1.14.3", transitive_headers=True) - self.requires("highfive/2.9.0", transitive_headers=True) - self.requires("libdeflate/1.19", transitive_headers=True) - self.requires("parallel-hashmap/1.3.11", transitive_headers=True) # Note: v1.3.11 is more recent than v1.37 - self.requires("span-lite/0.11.0", transitive_headers=True) - self.requires("spdlog/1.13.0", transitive_headers=True) - self.requires("zstd/1.5.5", transitive_headers=True) + self.requires("eigen/3.4.0") + self.requires("fmt/10.2.1") + self.requires("hdf5/1.14.3") + self.requires("highfive/2.9.0") + self.requires("libdeflate/1.20") + self.requires("parallel-hashmap/1.3.12") # Note: v1.3.12 is more recent than v1.37 + self.requires("span-lite/0.11.0") + self.requires("spdlog/1.14.1") + self.requires("zstd/[>=1.5 <1.6]") if Version(self.version) == "0.0.3": - self.requires("xxhash/0.8.2", transitive_headers=True) + self.requires("xxhash/0.8.2") if Version(self.version) > "0.0.7": - self.requires("readerwriterqueue/1.0.6", transitive_headers=True) - self.requires("concurrentqueue/1.0.4", transitive_headers=True) + self.requires("readerwriterqueue/1.0.6") + self.requires("concurrentqueue/1.0.4") def package_id(self): self.info.clear() @@ -67,14 +79,8 @@ def validate(self): if self.settings.get_safe("compiler.cppstd"): check_min_cppstd(self, self._min_cppstd) - def loose_lt_semver(v1, v2): - lv1 = [int(v) for v in v1.split(".")] - lv2 = [int(v) for v in v2.split(".")] - min_length = min(len(lv1), len(lv2)) - return lv1[:min_length] < lv2[:min_length] - minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler)) - if minimum_version and loose_lt_semver(str(self.settings.compiler.version), minimum_version): + if minimum_version and Version(self.settings.compiler.version) < minimum_version: raise ConanInvalidConfiguration( f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." ) @@ -92,6 +98,7 @@ def generate(self): tc.variables["HICTK_BUILD_TOOLS"] = "OFF" tc.variables["HICTK_ENABLE_GIT_VERSION_TRACKING"] = "OFF" tc.variables["HICTK_ENABLE_TESTING"] = "OFF" + tc.variables["HICTK_WITH_ARROW"] = self.options.get_safe("with_arrow", False) tc.variables["HICTK_WITH_EIGEN"] = self.options.with_eigen tc.generate() @@ -122,5 +129,7 @@ def package_info(self): self.cpp_info.set_property("cmake_file_name", "hictk") self.cpp_info.set_property("cmake_target_name", "hictk::libhictk") + if self.options.get_safe("with_arrow"): + self.cpp_info.defines.append("HICTK_WITH_ARROW") if self.options.with_eigen: self.cpp_info.defines.append("HICTK_WITH_EIGEN") diff --git a/recipes/hictk/all/test_package/test_package.cpp b/recipes/hictk/all/test_package/test_package.cpp index bbe13ab6a3219..30467b8f8512b 100644 --- a/recipes/hictk/all/test_package/test_package.cpp +++ b/recipes/hictk/all/test_package/test_package.cpp @@ -1,8 +1,13 @@ -#include -#include "hictk/fmt.hpp" -#include "hictk/cooler/utils.hpp" +#include + +#include "hictk/file.hpp" int main(int argc, char** argv) { - fmt::print("{}\n", hictk::cooler::utils::is_cooler(argv[0])); + try { + const hictk::File f(argv[0], 10); // This is expected to throw + return 1; + } catch (const std::exception& e) { + return 0; + } } diff --git a/recipes/hictk/config.yml b/recipes/hictk/config.yml index 3ff8e282beaa5..0ded733d49966 100644 --- a/recipes/hictk/config.yml +++ b/recipes/hictk/config.yml @@ -1,5 +1,7 @@ versions: - "0.0.11": + "1.0.0": + folder: all + "0.0.12": folder: all "0.0.10": folder: all diff --git a/recipes/highfive/all/conandata.yml b/recipes/highfive/all/conandata.yml index 890473cb50a68..b506775776cce 100644 --- a/recipes/highfive/all/conandata.yml +++ b/recipes/highfive/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.10.0": + url: "https://github.com/BlueBrain/HighFive/archive/refs/tags/v2.10.0.tar.gz" + sha256: "c29e8e1520e7298fabb26545f804e35bb3af257005c1c2df62e39986458d7c38" "2.9.0": url: "https://github.com/BlueBrain/HighFive/archive/refs/tags/v2.9.0.tar.gz" sha256: "6301def8ceb9f4d7a595988612db288b448a3c0546f6c83417dab38c64994d7e" diff --git a/recipes/highfive/all/conanfile.py b/recipes/highfive/all/conanfile.py index 75a077fc6305a..b502330e87c37 100644 --- a/recipes/highfive/all/conanfile.py +++ b/recipes/highfive/all/conanfile.py @@ -12,10 +12,10 @@ class HighFiveConan(ConanFile): name = "highfive" description = "HighFive is a modern header-only C++11 friendly interface for libhdf5." - license = "Boost Software License 1.0" - topics = ("hdf5", "hdf", "data") - homepage = "https://github.com/BlueBrain/HighFive" + license = "BSL-1.0" url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/BlueBrain/HighFive" + topics = ("hdf5", "hdf", "data", "header-only") package_type = "header-library" settings = "os", "arch", "compiler", "build_type" options = { diff --git a/recipes/highfive/config.yml b/recipes/highfive/config.yml index 4915edd8e2890..e2719579f8a54 100644 --- a/recipes/highfive/config.yml +++ b/recipes/highfive/config.yml @@ -1,4 +1,6 @@ versions: + "2.10.0": + folder: all "2.9.0": folder: all "2.8.0": diff --git a/recipes/highs/all/conandata.yml b/recipes/highs/all/conandata.yml index 412ffae12f185..96869f3b27dba 100644 --- a/recipes/highs/all/conandata.yml +++ b/recipes/highs/all/conandata.yml @@ -1,4 +1,10 @@ sources: + "1.8.0": + url: "https://github.com/ERGO-Code/HiGHS/archive/refs/tags/v1.8.0.tar.gz" + sha256: "e184e63101cf19688a02102f58447acc7c021d77eef0d3475ceaceb61f035539" + "1.7.2": + url: "https://github.com/ERGO-Code/HiGHS/archive/refs/tags/v1.7.2.tar.gz" + sha256: "5ff96c14ae19592d3568e9ae107624cbaf3409d328fb1a586359f0adf9b34bf7" "1.7.0": url: "https://github.com/ERGO-Code/HiGHS/archive/refs/tags/v1.7.0.tar.gz" sha256: "D10175AD66E7F113AC5DC00C9D6650A620663A6884FBF2942D6EB7A3D854604F" diff --git a/recipes/highs/all/test_package/CMakeLists.txt b/recipes/highs/all/test_package/CMakeLists.txt index d953c847e1679..ef56bb8244acc 100644 --- a/recipes/highs/all/test_package/CMakeLists.txt +++ b/recipes/highs/all/test_package/CMakeLists.txt @@ -1,7 +1,7 @@ cmake_minimum_required(VERSION 3.8) -project(test_package CXX) -set(CMAKE_CXX_STANDARD 11) +project(test_package LANGUAGES CXX) find_package(highs REQUIRED CONFIG) add_executable(${PROJECT_NAME} main.cpp) target_link_libraries(${PROJECT_NAME} PRIVATE highs::highs) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) diff --git a/recipes/highs/config.yml b/recipes/highs/config.yml index 2fc1c9523304b..0fd3fafecde27 100644 --- a/recipes/highs/config.yml +++ b/recipes/highs/config.yml @@ -1,4 +1,8 @@ versions: + "1.8.0": + folder: all + "1.7.2": + folder: all "1.7.0": folder: all "1.6.0": diff --git a/recipes/highway/all/conandata.yml b/recipes/highway/all/conandata.yml index 959f287f753da..0d5218b55b50f 100644 --- a/recipes/highway/all/conandata.yml +++ b/recipes/highway/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.2.0": + url: "https://github.com/google/highway/archive/1.2.0.tar.gz" + sha256: "7e0be78b8318e8bdbf6fa545d2ecb4c90f947df03f7aadc42c1967f019e63343" "1.1.0": url: "https://github.com/google/highway/archive/1.1.0.tar.gz" sha256: "354a8b4539b588e70b98ec70844273e3f2741302c4c377bcc4e81b3d1866f7c9" @@ -32,3 +35,9 @@ sources: "0.12.2": url: "https://github.com/google/highway/archive/0.12.2.tar.gz" sha256: "e1d47ce510429fdcf31f41697ca74fb0dcd59d933196e531a86d51751a56f4cc" +patches: + "1.2.0": + - patch_file: "patches/1.2.0-0001-fix-dllexport.patch" + patch_description: "fix incorrect DLLEXPORT" + patch_type: "backport" + patch_source: "https://github.com/google/highway/pull/2229" diff --git a/recipes/highway/all/patches/1.2.0-0001-fix-dllexport.patch b/recipes/highway/all/patches/1.2.0-0001-fix-dllexport.patch new file mode 100644 index 0000000000000..30ecee4740bdb --- /dev/null +++ b/recipes/highway/all/patches/1.2.0-0001-fix-dllexport.patch @@ -0,0 +1,91 @@ +diff --git a/hwy/contrib/thread_pool/topology.cc b/hwy/contrib/thread_pool/topology.cc +index 3d24f4f..17f3563 100644 +--- a/hwy/contrib/thread_pool/topology.cc ++++ b/hwy/contrib/thread_pool/topology.cc +@@ -64,7 +64,7 @@ + + namespace hwy { + +-HWY_DLLEXPORT bool HaveThreadingSupport() { ++HWY_CONTRIB_DLLEXPORT bool HaveThreadingSupport() { + #if HWY_ARCH_WASM + return emscripten_has_threading_support() != 0; + #else +@@ -72,7 +72,7 @@ HWY_DLLEXPORT bool HaveThreadingSupport() { + #endif + } + +-HWY_DLLEXPORT size_t TotalLogicalProcessors() { ++HWY_CONTRIB_DLLEXPORT size_t TotalLogicalProcessors() { + size_t lp = 0; + #if HWY_ARCH_WASM + const int num_cores = emscripten_num_logical_cores(); +@@ -111,7 +111,7 @@ HWY_DLLEXPORT size_t TotalLogicalProcessors() { + #include + #endif + +-HWY_DLLEXPORT bool GetThreadAffinity(LogicalProcessorSet& lps) { ++HWY_CONTRIB_DLLEXPORT bool GetThreadAffinity(LogicalProcessorSet& lps) { + #if HWY_OS_WIN + // Only support the first 64 because WINE does not support processor groups. + const HANDLE hThread = GetCurrentThread(); +@@ -173,7 +173,7 @@ HWY_DLLEXPORT bool GetThreadAffinity(LogicalProcessorSet& lps) { + #endif + } + +-HWY_DLLEXPORT bool SetThreadAffinity(const LogicalProcessorSet& lps) { ++HWY_CONTRIB_DLLEXPORT bool SetThreadAffinity(const LogicalProcessorSet& lps) { + #if HWY_OS_WIN + const HANDLE hThread = GetCurrentThread(); + const DWORD_PTR prev = SetThreadAffinityMask(hThread, lps.Get64()); +@@ -385,7 +385,7 @@ std::vector DetectPackages(std::vector& lps) { + } // namespace + #endif // HWY_OS_LINUX + +-HWY_DLLEXPORT Topology::Topology() { ++HWY_CONTRIB_DLLEXPORT Topology::Topology() { + #if HWY_OS_LINUX + lps.resize(TotalLogicalProcessors()); + const std::vector& per_package = DetectPackages(lps); +diff --git a/hwy/contrib/thread_pool/topology.h b/hwy/contrib/thread_pool/topology.h +index 95b0835..f80fc47 100644 +--- a/hwy/contrib/thread_pool/topology.h ++++ b/hwy/contrib/thread_pool/topology.h +@@ -28,7 +28,7 @@ + namespace hwy { + + // Returns false if std::thread should not be used. +-HWY_DLLEXPORT bool HaveThreadingSupport(); ++HWY_CONTRIB_DLLEXPORT bool HaveThreadingSupport(); + + // Upper bound on logical processors, including hyperthreads. + static constexpr size_t kMaxLogicalProcessors = 1024; // matches glibc +@@ -38,12 +38,12 @@ using LogicalProcessorSet = BitSet4096; + + // Returns false, or sets `lps` to all logical processors which are online and + // available to the current thread. +-HWY_DLLEXPORT bool GetThreadAffinity(LogicalProcessorSet& lps); ++HWY_CONTRIB_DLLEXPORT bool GetThreadAffinity(LogicalProcessorSet& lps); + + // Ensures the current thread can only run on the logical processors in `lps`. + // Returns false if not supported (in particular on Apple), or if the + // intersection between `lps` and `GetThreadAffinity` is the empty set. +-HWY_DLLEXPORT bool SetThreadAffinity(const LogicalProcessorSet& lps); ++HWY_CONTRIB_DLLEXPORT bool SetThreadAffinity(const LogicalProcessorSet& lps); + + // Returns false, or ensures the current thread will only run on `lp`, which + // must not exceed `TotalLogicalProcessors`. Note that this merely calls +@@ -58,11 +58,11 @@ static inline bool PinThreadToLogicalProcessor(size_t lp) { + // provided by the hardware clamped to `kMaxLogicalProcessors`. + // These processors are not necessarily all usable; you can determine which are + // via GetThreadAffinity(). +-HWY_DLLEXPORT size_t TotalLogicalProcessors(); ++HWY_CONTRIB_DLLEXPORT size_t TotalLogicalProcessors(); + + struct Topology { + // Caller must check packages.empty(); if so, do not use any fields. +- HWY_DLLEXPORT Topology(); ++ HWY_CONTRIB_DLLEXPORT Topology(); + + // Clique of cores with lower latency to each other. On Apple M1 these are + // four cores sharing an L2. On Zen4 these 'CCX' are up to eight cores sharing diff --git a/recipes/highway/config.yml b/recipes/highway/config.yml index 1af21a7852ddb..a5864ae8e0682 100644 --- a/recipes/highway/config.yml +++ b/recipes/highway/config.yml @@ -1,4 +1,6 @@ versions: + "1.2.0": + folder: all "1.1.0": folder: all "1.0.7": diff --git a/recipes/hiredis/0.x.x/conandata.yml b/recipes/hiredis/0.x.x/conandata.yml deleted file mode 100644 index 0b74d88eff05f..0000000000000 --- a/recipes/hiredis/0.x.x/conandata.yml +++ /dev/null @@ -1,8 +0,0 @@ -sources: - "0.14.1": - url: "https://github.com/redis/hiredis/archive/v0.14.1.tar.gz" - sha256: "2663b2aed9fd430507e30fc5e63274ee40cdd1a296026e22eafd7d99b01c8913" -patches: - "0.14.1": - - patch_file: "patches/0001-fix-makefile.patch" - base_path: "source_subfolder" diff --git a/recipes/hiredis/0.x.x/conanfile.py b/recipes/hiredis/0.x.x/conanfile.py deleted file mode 100644 index f94cea21a0db9..0000000000000 --- a/recipes/hiredis/0.x.x/conanfile.py +++ /dev/null @@ -1,78 +0,0 @@ -from conans import AutoToolsBuildEnvironment, ConanFile, tools -from conans.errors import ConanInvalidConfiguration -import os - -required_conan_version = ">=1.36.0" - - -class HiredisConan(ConanFile): - name = "hiredis" - description = "Hiredis is a minimalistic C client library for the Redis database." - license = "BSD-3-Clause" - topics = ("hiredis", "redis", "client", "database") - homepage = "https://github.com/redis/hiredis" - url = "https://github.com/conan-io/conan-center-index" - - settings = "os", "arch", "compiler", "build_type" - options = { - "shared": [True, False], - "fPIC": [True, False], - } - default_options = { - "shared": False, - "fPIC": True, - } - - @property - def _source_subfolder(self): - return "source_subfolder" - - def export_sources(self): - for patch in self.conan_data.get("patches", {}).get(self.version, []): - self.copy(patch["patch_file"]) - - def configure(self): - if self.options.shared: - del self.options.fPIC - del self.settings.compiler.cppstd - del self.settings.compiler.libcxx - - def validate(self): - if self.settings.os == "Windows": - raise ConanInvalidConfiguration("hiredis {} is not supported on Windows.".format(self.version)) - - def source(self): - tools.get(**self.conan_data["sources"][self.version], - destination=self._source_subfolder, strip_root=True) - - def _patch_sources(self): - for patch in self.conan_data.get("patches", {}).get(self.version, []): - tools.patch(**patch) - # Do not force PIC if static - if not self.options.shared: - makefile = os.path.join(self._source_subfolder, "Makefile") - tools.replace_in_file(makefile, "-fPIC ", "") - - def build(self): - self._patch_sources() - with tools.chdir(self._source_subfolder): - autoTools = AutoToolsBuildEnvironment(self, win_bash=tools.os_info.is_windows) - autoTools.make() - - def package(self): - self.copy("COPYING", dst="licenses", src=self._source_subfolder) - with tools.chdir(self._source_subfolder): - autoTools = AutoToolsBuildEnvironment(self, win_bash=tools.os_info.is_windows) - autoTools.install(vars={ - "DESTDIR": tools.unix_path(self.package_folder), - "PREFIX": "", - }) - tools.remove_files_by_mask( - os.path.join(self.package_folder, "lib"), - "*.a" if self.options.shared else "*.[so|dylib]*", - ) - tools.rmdir(os.path.join(self.package_folder, "lib", "pkgconfig")) - - def package_info(self): - self.cpp_info.set_property("pkg_config_name", "hiredis") - self.cpp_info.libs = ["hiredis"] diff --git a/recipes/hiredis/0.x.x/patches/0001-fix-makefile.patch b/recipes/hiredis/0.x.x/patches/0001-fix-makefile.patch deleted file mode 100644 index 52271f0ac9947..0000000000000 --- a/recipes/hiredis/0.x.x/patches/0001-fix-makefile.patch +++ /dev/null @@ -1,42 +0,0 @@ ---- a/Makefile_old -+++ b/Makefile -@@ -38,10 +38,8 @@ export REDIS_TEST_CONFIG - # Fallback to gcc when $CC is not in $PATH. - CC:=$(shell sh -c 'type $${CC%% *} >/dev/null 2>/dev/null && echo $(CC) || echo gcc') - CXX:=$(shell sh -c 'type $${CXX%% *} >/dev/null 2>/dev/null && echo $(CXX) || echo g++') --OPTIMIZATION?=-O3 - WARNINGS=-Wall -W -Wstrict-prototypes -Wwrite-strings --DEBUG_FLAGS?= -g -ggdb --REAL_CFLAGS=$(OPTIMIZATION) -fPIC $(CFLAGS) $(WARNINGS) $(DEBUG_FLAGS) -+REAL_CFLAGS=-fPIC $(CFLAGS) $(WARNINGS) - REAL_LDFLAGS=$(LDFLAGS) - - DYLIBSUFFIX=so -@@ -49,7 +47,7 @@ STLIBSUFFIX=a - DYLIB_MINOR_NAME=$(LIBNAME).$(DYLIBSUFFIX).$(HIREDIS_SONAME) - DYLIB_MAJOR_NAME=$(LIBNAME).$(DYLIBSUFFIX).$(HIREDIS_MAJOR) - DYLIBNAME=$(LIBNAME).$(DYLIBSUFFIX) --DYLIB_MAKE_CMD=$(CC) -shared -Wl,-soname,$(DYLIB_MINOR_NAME) -o $(DYLIBNAME) $(LDFLAGS) -+DYLIB_MAKE_CMD=$(CC) -shared -Wl,-soname,$(DYLIB_MINOR_NAME) -o $(DYLIBNAME) $(CFLAGS) $(LDFLAGS) - STLIBNAME=$(LIBNAME).$(STLIBSUFFIX) - STLIB_MAKE_CMD=ar rcs $(STLIBNAME) - -@@ -57,15 +55,15 @@ STLIB_MAKE_CMD=ar rcs $(STLIBNAME) - uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo not') - ifeq ($(uname_S),SunOS) - REAL_LDFLAGS+= -ldl -lnsl -lsocket -- DYLIB_MAKE_CMD=$(CC) -G -o $(DYLIBNAME) -h $(DYLIB_MINOR_NAME) $(LDFLAGS) -+ DYLIB_MAKE_CMD=$(CC) -G -o $(DYLIBNAME) -h $(DYLIB_MINOR_NAME) $(CFLAGS) $(LDFLAGS) - endif - ifeq ($(uname_S),Darwin) - DYLIBSUFFIX=dylib - DYLIB_MINOR_NAME=$(LIBNAME).$(HIREDIS_SONAME).$(DYLIBSUFFIX) -- DYLIB_MAKE_CMD=$(CC) -dynamiclib -Wl,-install_name,$(PREFIX)/$(LIBRARY_PATH)/$(DYLIB_MINOR_NAME) -o $(DYLIBNAME) $(LDFLAGS) -+ DYLIB_MAKE_CMD=$(CC) -dynamiclib -Wl,-install_name,$(PREFIX)/$(LIBRARY_PATH)/$(DYLIB_MINOR_NAME) -o $(DYLIBNAME) $(CFLAGS) $(LDFLAGS) - endif - --all: $(DYLIBNAME) $(STLIBNAME) hiredis-test $(PKGCONFNAME) -+all: $(DYLIBNAME) $(STLIBNAME) $(PKGCONFNAME) - - # Deps (use make dep to generate this) - alloc.o: alloc.c fmacros.h alloc.h diff --git a/recipes/hiredis/0.x.x/test_package/CMakeLists.txt b/recipes/hiredis/0.x.x/test_package/CMakeLists.txt deleted file mode 100644 index 7b9b613cbb24a..0000000000000 --- a/recipes/hiredis/0.x.x/test_package/CMakeLists.txt +++ /dev/null @@ -1,8 +0,0 @@ -cmake_minimum_required(VERSION 3.1) -project(test_package C) - -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup() - -add_executable(${PROJECT_NAME} test_package.c) -target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS}) diff --git a/recipes/hiredis/0.x.x/test_package/conanfile.py b/recipes/hiredis/0.x.x/test_package/conanfile.py deleted file mode 100644 index 5c09494bc67c0..0000000000000 --- a/recipes/hiredis/0.x.x/test_package/conanfile.py +++ /dev/null @@ -1,17 +0,0 @@ -from conans import ConanFile, CMake, tools -import os - - -class TestPackageConan(ConanFile): - settings = "os", "arch", "compiler", "build_type" - generators = "cmake" - - def build(self): - cmake = CMake(self) - cmake.configure() - cmake.build() - - def test(self): - if not tools.cross_building(self): - bin_path = os.path.join("bin", "test_package") - self.run(bin_path, run_environment=True) diff --git a/recipes/hiredis/0.x.x/test_package/test_package.c b/recipes/hiredis/0.x.x/test_package/test_package.c deleted file mode 100644 index 6df475bd4539a..0000000000000 --- a/recipes/hiredis/0.x.x/test_package/test_package.c +++ /dev/null @@ -1,21 +0,0 @@ -#include - -#include -#include - -int main() -{ - printf("hiredis version: %i.%i.%i\n", HIREDIS_MAJOR, HIREDIS_MINOR, HIREDIS_PATCH); - - const char *hostname = "127.0.0.1"; - int port = 6379; - - redisContext *c = redisConnect(hostname, port); - if (c == NULL) - { - printf("Error: Can't allocate redis context\n"); - return EXIT_FAILURE; - } - - return EXIT_SUCCESS; -} diff --git a/recipes/hiredis/config.yml b/recipes/hiredis/config.yml index 44921f335f1c8..977ca3a028023 100644 --- a/recipes/hiredis/config.yml +++ b/recipes/hiredis/config.yml @@ -7,5 +7,3 @@ versions: folder: all "1.0.0": folder: all - "0.14.1": - folder: "0.x.x" diff --git a/recipes/hwdata/all/conandata.yml b/recipes/hwdata/all/conandata.yml index b5373423e2800..4dd2a08c35c6b 100644 --- a/recipes/hwdata/all/conandata.yml +++ b/recipes/hwdata/all/conandata.yml @@ -1,4 +1,10 @@ sources: + "0.385": + url: "https://github.com/vcrhonek/hwdata/archive/v0.385.tar.gz" + sha256: "577219d44d9686e8177f6291adbff7bacdd785ad4e8a8d0c4b2a14dbf850d6ac" + "0.382": + url: "https://github.com/vcrhonek/hwdata/archive/v0.382.tar.gz" + sha256: "5e25457b562a5227eb77eac21d5e4344bd1183c7d62b41e7d3e780ae33e053c1" "0.378": url: "https://github.com/vcrhonek/hwdata/archive/v0.378.tar.gz" sha256: "098ea8db12a50290f4b23f7f521edf9c5bab25935d2740de17e4a487110b40c8" diff --git a/recipes/hwdata/config.yml b/recipes/hwdata/config.yml index edc1993064ac3..329f229df7ce9 100644 --- a/recipes/hwdata/config.yml +++ b/recipes/hwdata/config.yml @@ -1,4 +1,8 @@ versions: + "0.385": + folder: all + "0.382": + folder: all "0.378": folder: all "0.376": diff --git a/recipes/hwloc/all/conandata.yml b/recipes/hwloc/all/conandata.yml index c3a77f045e4ad..98b2b2bec0fbe 100644 --- a/recipes/hwloc/all/conandata.yml +++ b/recipes/hwloc/all/conandata.yml @@ -1,19 +1,10 @@ sources: + "2.11.1": + url: "https://download.open-mpi.org/release/hwloc/v2.11/hwloc-2.11.1.tar.bz2" + sha256: "04cdfbffad225ce15f66184f0f4141327dabf288d10a8b84d13f517acb7870c6" + "2.10.0": + url: "https://download.open-mpi.org/release/hwloc/v2.10/hwloc-2.10.0.tar.bz2" + sha256: "0305dd60c9de2fbe6519fe2a4e8fdc6d3db8de574a0ca7812b92e80c05ae1392" "2.9.3": - sha256: "5985db3a30bbe51234c2cd26ebe4ae9b4c3352ab788b1a464c40c0483bf4de59" - url: https://download.open-mpi.org/release/hwloc/v2.9/hwloc-2.9.3.tar.gz - "2.9.2": - sha256: "ffb554d5735e0e0a19d1fd4b2b86e771d3b58b2d97f257eedacae67ade5054b3" - url: https://download.open-mpi.org/release/hwloc/v2.9/hwloc-2.9.2.tar.gz - "2.9.1": - sha256: "a440e2299f7451dc10a57ddbfa3f116c2a6c4be1bb97c663edd3b9c7b3b3b4cf" - url: https://download.open-mpi.org/release/hwloc/v2.9/hwloc-2.9.1.tar.gz - "2.9.0": - sha256: "9d7d3450e0a5fea4cb80ca07dc8db939abb7ab62e2a7bb27f9376447658738ec" - url: https://download.open-mpi.org/release/hwloc/v2.9/hwloc-2.9.0.tar.gz - "2.8.0": - sha256: "20b2bd4df436827d8e50f7afeafb6f967259f2fb374ce7330244f8d0ed2dde6f" - url: https://download.open-mpi.org/release/hwloc/v2.8/hwloc-2.8.0.tar.gz - "2.7.2": - sha256: "407d2712b1c9026787461ddb62044fa9b5c6007755ca37652b360d837a75344f" - url: https://download.open-mpi.org/release/hwloc/v2.7/hwloc-2.7.2.tar.gz + url: "https://download.open-mpi.org/release/hwloc/v2.9/hwloc-2.9.3.tar.bz2" + sha256: "5c4062ce556f6d3451fc177ffb8673a2120f81df6835dea6a21a90fbdfff0dec" diff --git a/recipes/hwloc/all/conanfile.py b/recipes/hwloc/all/conanfile.py index 231701d41f587..ff20e76545dae 100644 --- a/recipes/hwloc/all/conanfile.py +++ b/recipes/hwloc/all/conanfile.py @@ -32,7 +32,7 @@ def configure(self): def requirements(self): if self.options.with_libxml2: - self.requires("libxml2/2.12.3") + self.requires("libxml2/[>=2.12.5 <3]") def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) diff --git a/recipes/hwloc/config.yml b/recipes/hwloc/config.yml index d1ef77599f89a..c94edb0b5eb63 100644 --- a/recipes/hwloc/config.yml +++ b/recipes/hwloc/config.yml @@ -1,13 +1,7 @@ versions: - "2.9.3": - folder: all - "2.9.2": - folder: all - "2.9.1": + "2.11.1": folder: all - "2.9.0": + "2.10.0": folder: all - "2.8.0": - folder: all - "2.7.2": + "2.9.3": folder: all diff --git a/recipes/iceoryx/all/conandata.yml b/recipes/iceoryx/all/conandata.yml index 478d85f83e606..22e1451348b38 100644 --- a/recipes/iceoryx/all/conandata.yml +++ b/recipes/iceoryx/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.0.6": + url: "https://github.com/eclipse-iceoryx/iceoryx/archive/v2.0.6.tar.gz" + sha256: "a2add8ffee0c3357ef985cc46c7de79ccb754ea2bed02c61f2ff805ab2c869f1" "2.0.5": url: "https://github.com/eclipse-iceoryx/iceoryx/archive/v2.0.5.tar.gz" sha256: "bf6de70e3edee71223f993a29bff5e61af95ce4871104929d8bd1729f544bafb" diff --git a/recipes/iceoryx/all/conanfile.py b/recipes/iceoryx/all/conanfile.py index 30d23ca370fb4..3144cdb2e4a59 100644 --- a/recipes/iceoryx/all/conanfile.py +++ b/recipes/iceoryx/all/conanfile.py @@ -5,7 +5,7 @@ from conan.errors import ConanInvalidConfiguration from conan.tools.build import check_min_cppstd, stdcpp_library from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout -from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, mkdir, rename, replace_in_file, rmdir, save +from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, mkdir, rename, replace_in_file, rmdir, save, rm from conan.tools.microsoft import is_msvc, check_min_vs from conan.tools.scm import Version @@ -146,6 +146,7 @@ def package(self): copy(self, "LICENSE", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) rmdir(self, os.path.join(self.package_folder, "share")) rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) + rm(self, ".clang-tidy", os.path.join(self.package_folder, "include"), recursive=True) if self.options.toml_config: mkdir(self, os.path.join(self.package_folder, "res")) rename(self, os.path.join(self.package_folder, "etc", "roudi_config_example.toml"), diff --git a/recipes/iceoryx/config.yml b/recipes/iceoryx/config.yml index 8a33c3c252222..4a60749deb79c 100644 --- a/recipes/iceoryx/config.yml +++ b/recipes/iceoryx/config.yml @@ -1,4 +1,6 @@ versions: + "2.0.6": + folder: all "2.0.5": folder: all "2.0.3": diff --git a/recipes/iconfontcppheaders/all/conandata.yml b/recipes/iconfontcppheaders/all/conandata.yml index 499df05a59976..81e9b251ba0f8 100644 --- a/recipes/iconfontcppheaders/all/conandata.yml +++ b/recipes/iconfontcppheaders/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "cci.20240620": + sha256: 363613c9ea6b4d4b290527bc1fcd626b09accd985a40f14442e86d1df16ec487 + url: https://github.com/juliettef/IconFontCppHeaders/archive/62d27fa93d8f1f881dac18f13881dd97af66fa74/main.zip "cci.20240128": sha256: de946a4471dca969426b2e7863d79136a91f2e4e4cc7a766df31bbb8412571f9 url: https://github.com/juliettef/IconFontCppHeaders/archive/8886c5657bac22b8fee34354871e3ade2a596433/main.zip diff --git a/recipes/iconfontcppheaders/all/conanfile.py b/recipes/iconfontcppheaders/all/conanfile.py index 5541ed9fd754d..278c4d54b8232 100644 --- a/recipes/iconfontcppheaders/all/conanfile.py +++ b/recipes/iconfontcppheaders/all/conanfile.py @@ -9,7 +9,7 @@ class FireHppConan(ConanFile): name = "iconfontcppheaders" - description = "Headers for icon fonts Font Awesome, Fork Awesome, Google Material Design, Pictogrammers Material Design icons, Kenney game icons, Fontaudio, Codicons and Lucide." + description = "Headers for icon fonts Font Awesome, Fork Awesome, Google Material Design Icons, Google Material Design Symbols, Pictogrammers Material Design icons, Kenney game icons, Fontaudio, Codicons and Lucide." license = "Zlib" url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/juliettef/IconFontCppHeaders" diff --git a/recipes/iconfontcppheaders/config.yml b/recipes/iconfontcppheaders/config.yml index c603b02a80db4..163b17b48651e 100644 --- a/recipes/iconfontcppheaders/config.yml +++ b/recipes/iconfontcppheaders/config.yml @@ -1,4 +1,6 @@ versions: + "cci.20240620": + folder: all "cci.20240128": folder: all "cci.20231102": diff --git a/recipes/icu/all/conandata.yml b/recipes/icu/all/conandata.yml index 49d66d9be1d5a..32facbe5d4811 100644 --- a/recipes/icu/all/conandata.yml +++ b/recipes/icu/all/conandata.yml @@ -1,4 +1,10 @@ sources: + "76.1": + url: "https://github.com/unicode-org/icu/releases/download/release-76-1/icu4c-76_1-src.tgz" + sha256: "dfacb46bfe4747410472ce3e1144bf28a102feeaa4e3875bac9b4c6cf30f4f3e" + "75.1": + url: "https://github.com/unicode-org/icu/releases/download/release-75-1/icu4c-75_1-src.tgz" + sha256: "cb968df3e4d2e87e8b11c49a5d01c787bd13b9545280fc6642f826527618caef" "74.2": url: "https://github.com/unicode-org/icu/releases/download/release-74-2/icu4c-74_2-src.tgz" sha256: "68db082212a96d6f53e35d60f47d38b962e9f9d207a74cfac78029ae8ff5e08c" @@ -11,42 +17,33 @@ sources: "73.1": url: "https://github.com/unicode-org/icu/releases/download/release-73-1/icu4c-73_1-src.tgz" sha256: "a457431de164b4aa7eca00ed134d00dfbf88a77c6986a10ae7774fc076bb8c45" - "72.1": - url: "https://github.com/unicode-org/icu/releases/download/release-72-1/icu4c-72_1-src.tgz" - sha256: "a2d2d38217092a7ed56635e34467f92f976b370e20182ad325edea6681a71d68" - "71.1": - url: "https://github.com/unicode-org/icu/releases/download/release-71-1/icu4c-71_1-src.tgz" - sha256: "67a7e6e51f61faf1306b6935333e13b2c48abd8da6d2f46ce6adca24b1e21ebf" - "70.1": - url: "https://github.com/unicode-org/icu/releases/download/release-70-1/icu4c-70_1-src.tgz" - sha256: "8d205428c17bf13bb535300669ed28b338a157b1c01ae66d31d0d3e2d47c3fd5" - "69.1": - url: "https://github.com/unicode-org/icu/releases/download/release-69-1/icu4c-69_1-src.tgz" - sha256: "4cba7b7acd1d3c42c44bb0c14be6637098c7faf2b330ce876bc5f3b915d09745" - "68.2": - url: "https://github.com/unicode-org/icu/releases/download/release-68-2/icu4c-68_2-src.tgz" - sha256: "c79193dee3907a2199b8296a93b52c5cb74332c26f3d167269487680d479d625" patches: + "76.1": + - patch_file: "patches/0001-76.1-fix-mingw.patch" + patch_description: "support mingw" + patch_type: "portability" + + "75.1": + - patch_file: "patches/0001-69.1-fix-mingw.patch" + patch_description: "support mingw" + patch_type: "portability" "74.2": - patch_file: "patches/0001-69.1-fix-mingw.patch" + patch_description: "support mingw" + patch_type: "portability" + - patch_file: "patches/0002-74.2-fix-emscripten.patch" + patch_description: "Add config file for wasm-emscripten platform" + patch_type: "portability" + patch_source: "https://gerrit.libreoffice.org/c/core/+/111130/9/external/icu/icu4c-emscripten-cross.patch.1" "74.1": - patch_file: "patches/0001-69.1-fix-mingw.patch" + patch_description: "support mingw" + patch_type: "portability" "73.2": - patch_file: "patches/0001-69.1-fix-mingw.patch" + patch_description: "support mingw" + patch_type: "portability" "73.1": - patch_file: "patches/0001-69.1-fix-mingw.patch" - "72.1": - - patch_file: "patches/0001-69.1-fix-mingw.patch" - "71.1": - - patch_file: "patches/0001-69.1-fix-mingw.patch" - - patch_file: "patches/0001-71.1-fix-undef-strict-ansi.patch" - - patch_file: "patches/0001-71.1-fix-emscripten.patch" - patch_description: "Add config file for wasm-emscripten platform" + patch_description: "support mingw" patch_type: "portability" - patch_source: "https://gerrit.libreoffice.org/c/core/+/111130/9/external/icu/icu4c-emscripten-cross.patch.1" - "70.1": - - patch_file: "patches/0001-69.1-fix-mingw.patch" - "69.1": - - patch_file: "patches/0001-69.1-fix-mingw.patch" - "68.2": - - patch_file: "patches/0001-67.1-fix-mingw.patch" diff --git a/recipes/icu/all/conanfile.py b/recipes/icu/all/conanfile.py index 9e343976b416b..75b503c2c0e07 100644 --- a/recipes/icu/all/conanfile.py +++ b/recipes/icu/all/conanfile.py @@ -6,7 +6,7 @@ from conan import ConanFile from conan.errors import ConanInvalidConfiguration from conan.tools.apple import is_apple_os -from conan.tools.build import cross_building, stdcpp_library +from conan.tools.build import cross_building, stdcpp_library, check_min_cppstd from conan.tools.env import Environment, VirtualBuildEnv from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, mkdir, rename, replace_in_file, rm, rmdir, save from conan.tools.gnu import Autotools, AutotoolsToolchain @@ -46,6 +46,20 @@ class ICUConan(ConanFile): "with_extras": False, } + @property + def _min_cppstd(self): + return 17 + + @property + def _compilers_minimum_version(self): + return { + "gcc": "8", + "clang": "7", + "apple-clang": "12", + "Visual Studio": "16", + "msvc": "192", + } + @property def _settings_build(self): return getattr(self, "settings_build", self.settings) @@ -69,11 +83,21 @@ def config_options(self): def configure(self): if self.options.shared: self.options.rm_safe("fPIC") + if Version(self.version) >= "74.1": + self.license = "Unicode-3.0" def validate(self): if self.options.dat_package_file: if not os.path.exists(str(self.options.dat_package_file)): raise ConanInvalidConfiguration("Non-existent dat_package_file specified") + if Version(self.version) >= "75.1": + if self.settings.compiler.cppstd: + check_min_cppstd(self, self._min_cppstd) + minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) + if minimum_version and Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration( + f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." + ) def layout(self): basic_layout(self, src_folder="src") @@ -110,6 +134,8 @@ def generate(self): if check_min_vs(self, "180", raise_invalid=False): tc.extra_cflags.append("-FS") tc.extra_cxxflags.append("-FS") + if Version(self.version) >= "75.1" and not self.settings.compiler.cppstd and is_msvc(self): + tc.extra_cxxflags.append(f"-std:c++{self._min_cppstd}") if not self.options.shared: tc.extra_defines.append("U_STATIC_IMPLEMENTATION") if is_apple_os(self): diff --git a/recipes/icu/all/patches/0001-67.1-fix-mingw.patch b/recipes/icu/all/patches/0001-67.1-fix-mingw.patch deleted file mode 100644 index 93f5bd7f9ab8a..0000000000000 --- a/recipes/icu/all/patches/0001-67.1-fix-mingw.patch +++ /dev/null @@ -1,37 +0,0 @@ ---- source/config/mh-mingw64 -+++ source/config/mh-mingw64 -@@ -94,7 +94,7 @@ - # This is also for backwards compatibility. - DATA_STUBNAME = dt - I18N_STUBNAME = in --LIBICU = $(STATIC_PREFIX_WHEN_USED)$(ICUPREFIX) -+#LIBICU = $(STATIC_PREFIX_WHEN_USED)$(ICUPREFIX) - - #SH### copied from Makefile.inc - #SH## for icu-config to test with -@@ -102,10 +102,10 @@ - #SH#ICULIBS_COMMON_LIB_NAME_A="${LIBICU}${COMMON_STUBNAME}${ICULIBSUFFIX}.${A}" - - #SH#ICULIBS_DATA="-l$(ICUPREFIX)$(DATA_STUBNAME)$(ICULIBSUFFIX)$(ICULIBSUFFIX_VERSION)" --ICULIBS_DT="-l$(ICUPREFIX)$(DATA_STUBNAME)$(ICULIBSUFFIX)$(ICULIBSUFFIX_VERSION)" --ICULIBS_I18N="-l$(ICUPREFIX)$(I18N_STUBNAME)$(ICULIBSUFFIX)$(ICULIBSUFFIX_VERSION)" --ICULIBS_IO="-l$(ICUPREFIX)$(IO_STUBNAME)$(ICULIBSUFFIX)$(ICULIBSUFFIX_VERSION)" --ICULIBS_UC="-l$(ICUPREFIX)$(COMMON_STUBNAME)$(ICULIBSUFFIX)$(ICULIBSUFFIX_VERSION)" -+#ICULIBS_DT="-l$(ICUPREFIX)$(DATA_STUBNAME)$(ICULIBSUFFIX)$(ICULIBSUFFIX_VERSION)" -+#ICULIBS_I18N="-l$(ICUPREFIX)$(I18N_STUBNAME)$(ICULIBSUFFIX)$(ICULIBSUFFIX_VERSION)" -+#ICULIBS_IO="-l$(ICUPREFIX)$(IO_STUBNAME)$(ICULIBSUFFIX)$(ICULIBSUFFIX_VERSION)" -+#ICULIBS_UC="-l$(ICUPREFIX)$(COMMON_STUBNAME)$(ICULIBSUFFIX)$(ICULIBSUFFIX_VERSION)" - #SH# - #SH## ICULIBS is the set of libraries your application should link - #SH## with usually. Many applications will want to add ${ICULIBS_I18N} as well. ---- source/data/Makefile.in -+++ source/data/Makefile.in -@@ -207,7 +207,7 @@ - ifneq ($(ICUDATA_SOURCE_IS_NATIVE_TARGET),YES) - # For MinGW, do we want the DLL to go in the bin location? - ifeq ($(MINGW_MOVEDLLSTOBINDIR),YES) -- $(PKGDATA_INVOKE) $(PKGDATA) -m $(PKGDATA_MODE) $(PKGDATA_VERSIONING) -e $(ICUDATA_ENTRY_POINT) -T $(OUTTMPDIR) -s $(BUILDDIR) -p $(ICUDATA_NAME) $(PKGDATA_LIBNAME) $(PKGDATA_LIST) -I $(DESTDIR)$(bindir) -+ $(PKGDATA_INVOKE) $(PKGDATA) -m $(PKGDATA_MODE) $(PKGDATA_VERSIONING) -e $(ICUDATA_ENTRY_POINT) -T $(OUTTMPDIR) -s $(BUILDDIR) -p $(ICUDATA_NAME) $(PKGDATA_LIBNAME) $(PKGDATA_LIST) -I $(ICUPKGDATA_INSTALL_DIR) - else - $(PKGDATA_INVOKE) $(PKGDATA) -m $(PKGDATA_MODE) $(PKGDATA_VERSIONING) -e $(ICUDATA_ENTRY_POINT) -T $(OUTTMPDIR) -s $(BUILDDIR) -p $(ICUDATA_NAME) $(PKGDATA_LIBNAME) $(PKGDATA_LIST) -I $(ICUPKGDATA_INSTALL_DIR) - endif diff --git a/recipes/icu/all/patches/0001-71.1-fix-emscripten.patch b/recipes/icu/all/patches/0001-71.1-fix-emscripten.patch deleted file mode 100644 index 5693ab70111d5..0000000000000 --- a/recipes/icu/all/patches/0001-71.1-fix-emscripten.patch +++ /dev/null @@ -1,117 +0,0 @@ -diff --git a/source/acinclude.m4 b/source/acinclude.m4 -index 507f41f..2980ef1 100644 ---- a/source/acinclude.m4 -+++ b/source/acinclude.m4 -@@ -84,6 +84,7 @@ x86_64-*-cygwin) - *-dec-osf*) icu_cv_host_frag=mh-alpha-osf ;; - *-*-nto*) icu_cv_host_frag=mh-qnx ;; - *-ncr-*) icu_cv_host_frag=mh-mpras ;; -+wasm*-*-emscripten*) icu_cv_host_frag=mh-emscripten ;; - *) icu_cv_host_frag=mh-unknown ;; - esac - ] -diff --git a/source/config/mh-emscripten b/source/config/mh-emscripten -new file mode 100644 -index 0000000..ee2b90b ---- /dev/null -+++ b/source/config/mh-emscripten -@@ -0,0 +1,86 @@ -+## Emscripten-specific setup -+## Copyright (c) 1999-2013, International Business Machines Corporation and -+## others. All Rights Reserved. -+## Commands to generate dependency files -+GEN_DEPS.c= $(CC) -E -MM $(DEFS) $(CPPFLAGS) -+GEN_DEPS.cc= $(CXX) -E -MM $(DEFS) $(CPPFLAGS) $(CXXFLAGS) -+ -+## Flags for position independent code -+SHAREDLIBCFLAGS = -fPIC -+SHAREDLIBCXXFLAGS = -fPIC -+SHAREDLIBCPPFLAGS = -DPIC -+ -+## Additional flags when building libraries and with threads -+THREADSCPPFLAGS = -D_REENTRANT -+LIBCPPFLAGS = -+ -+## Compiler switch to embed a runtime search path -+LD_RPATH= -Wl,-zorigin,-rpath,'$$'ORIGIN -+LD_RPATH_PRE = -Wl,-rpath, -+ -+## Force RPATH=$ORIGIN to locate own dependencies w/o need for LD_LIBRARY_PATH: -+ENABLE_RPATH=YES -+RPATHLDFLAGS=${LD_RPATH_PRE}'$$ORIGIN' -+ -+## These are the library specific LDFLAGS -+#LDFLAGSICUDT=-nodefaultlibs -nostdlib -+# Debian change: linking icudata as data only causes too many problems. -+LDFLAGSICUDT= -+ -+## Compiler switch to embed a library name -+# The initial tab in the next line is to prevent icu-config from reading it. -+ LD_SONAME = -Wl,-soname -Wl,$(notdir $(MIDDLE_SO_TARGET)) -+#SH# # We can't depend on MIDDLE_SO_TARGET being set. -+#SH# LD_SONAME= -+ -+## Shared library options -+LD_SOOPTIONS= -Wl,-Bsymbolic-functions -+ -+## Shared object suffix -+SO = so -+## Non-shared intermediate object suffix -+STATIC_O = o -+ -+## Compilation rules -+# WASM needs -pthread for atomics support -+%.$(STATIC_O): $(srcdir)/%.c -+ $(call SILENT_COMPILE,$(strip $(COMPILE.c) $(STATICCPPFLAGS) $(STATICCFLAGS)) -pthread -o $@ $<) -+ -+%.$(STATIC_O): $(srcdir)/%.cpp -+ $(call SILENT_COMPILE,$(strip $(COMPILE.cc) $(STATICCPPFLAGS) $(STATICCXXFLAGS)) -pthread -o $@ $<) -+ -+ -+## Dependency rules -+%.d: $(srcdir)/%.c -+ $(call ICU_MSG,(deps)) $< -+ @$(SHELL) -ec '$(GEN_DEPS.c) $< \ -+ | sed '\''s%\($*\)\.o[ :]*%\1.o $@ : %g'\'' > $@; \ -+ [ -s $@ ] || rm -f $@' -+ -+%.d: $(srcdir)/%.cpp -+ $(call ICU_MSG,(deps)) $< -+ @$(SHELL) -ec '$(GEN_DEPS.cc) $< \ -+ | sed '\''s%\($*\)\.o[ :]*%\1.o $@ : %g'\'' > $@; \ -+ [ -s $@ ] || rm -f $@' -+ -+## Versioned libraries rules -+ -+%.$(SO).$(SO_TARGET_VERSION_MAJOR): %.$(SO).$(SO_TARGET_VERSION) -+ $(RM) $@ && ln -s ${ header unless __STRICT_ANSI__ is defined. --// __GNUC__ is set by both gcc and clang. --#undef __STRICT_ANSI__ --#endif -- - #include "locmap.h" - #include "unicode/ustdio.h" - diff --git a/recipes/icu/all/patches/0001-76.1-fix-mingw.patch b/recipes/icu/all/patches/0001-76.1-fix-mingw.patch new file mode 100644 index 0000000000000..f7169b0989fbc --- /dev/null +++ b/recipes/icu/all/patches/0001-76.1-fix-mingw.patch @@ -0,0 +1,47 @@ +diff --git a/source/config/mh-mingw64 b/source/config/mh-mingw64 +index fb64c56..ff8922c 100644 +--- a/source/config/mh-mingw64 ++++ b/source/config/mh-mingw64 +@@ -94,7 +94,7 @@ LIBPREFIX= + # This is also for backwards compatibility. + DATA_STUBNAME = dt + I18N_STUBNAME = in +-LIBICU = $(STATIC_PREFIX_WHEN_USED)$(ICUPREFIX) ++#LIBICU = $(STATIC_PREFIX_WHEN_USED)$(ICUPREFIX) + + #SH### copied from Makefile.inc + #SH## for icu-config to test with +@@ -102,13 +102,13 @@ LIBICU = $(STATIC_PREFIX_WHEN_USED)$(ICUPREFIX) + #SH#ICULIBS_COMMON_LIB_NAME_A="${LIBICU}${COMMON_STUBNAME}${ICULIBSUFFIX}.${A}" + + #SH#ICULIBS_DATA="-l$(ICUPREFIX)$(DATA_STUBNAME)$(ICULIBSUFFIX)" +-ICULIBS_DT="-l$(ICUPREFIX)$(DATA_STUBNAME)$(ICULIBSUFFIX)" +-ICULIBS_I18N="-l$(ICUPREFIX)$(I18N_STUBNAME)$(ICULIBSUFFIX)" +-ICULIBS_LX="-l$(STATIC_PREFIX_WHEN_USED)$(ICUPREFIX)$(LAYOUTEX_STUBNAME)$(ICULIBSUFFIX)" +-ICULIBS_IO="-l$(ICUPREFIX)$(IO_STUBNAME)$(ICULIBSUFFIX)" +-ICULIBS_UC="-l$(ICUPREFIX)$(COMMON_STUBNAME)$(ICULIBSUFFIX)" +-ICULIBS_CTESTFW="-l$(STATIC_PREFIX_WHEN_USED)$(ICUPREFIX)$(CTESTFW_STUBNAME)$(ICULIBSUFFIX)" +-ICULIBS_TOOLUTIL="-l$(ICUPREFIX)tu$(ICULIBSUFFIX)" ++#ICULIBS_DT="-l$(ICUPREFIX)$(DATA_STUBNAME)$(ICULIBSUFFIX)" ++#ICULIBS_I18N="-l$(ICUPREFIX)$(I18N_STUBNAME)$(ICULIBSUFFIX)" ++#ICULIBS_LX="-l$(STATIC_PREFIX_WHEN_USED)$(ICUPREFIX)$(LAYOUTEX_STUBNAME)$(ICULIBSUFFIX)" ++#ICULIBS_IO="-l$(ICUPREFIX)$(IO_STUBNAME)$(ICULIBSUFFIX)" ++#ICULIBS_UC="-l$(ICUPREFIX)$(COMMON_STUBNAME)$(ICULIBSUFFIX)" ++#ICULIBS_CTESTFW="-l$(STATIC_PREFIX_WHEN_USED)$(ICUPREFIX)$(CTESTFW_STUBNAME)$(ICULIBSUFFIX)" ++#ICULIBS_TOOLUTIL="-l$(ICUPREFIX)tu$(ICULIBSUFFIX)" + #SH# + #SH## ICULIBS is the set of libraries your application should link + #SH## with usually. Many applications will want to add ${ICULIBS_I18N} as well. +diff --git a/source/data/Makefile.in b/source/data/Makefile.in +index 266ad7a..8e3be4f 100644 +--- a/source/data/Makefile.in ++++ b/source/data/Makefile.in +@@ -193,7 +193,7 @@ endif + ifneq ($(ICUDATA_SOURCE_IS_NATIVE_TARGET),YES) + # For MinGW, do we want the DLL to go in the bin location? + ifeq ($(MINGW_MOVEDLLSTOBINDIR),YES) +- $(PKGDATA_INVOKE) $(PKGDATA) -m $(PKGDATA_MODE) $(PKGDATA_VERSIONING) -e $(ICUDATA_ENTRY_POINT) -T $(OUTTMPDIR) -s $(BUILDDIR) -p $(ICUDATA_NAME) $(PKGDATA_LIBNAME) $(PKGDATA_LIST) -I $(DESTDIR)$(bindir) ++ $(PKGDATA_INVOKE) $(PKGDATA) -m $(PKGDATA_MODE) $(PKGDATA_VERSIONING) -e $(ICUDATA_ENTRY_POINT) -T $(OUTTMPDIR) -s $(BUILDDIR) -p $(ICUDATA_NAME) $(PKGDATA_LIBNAME) $(PKGDATA_LIST) -I $(ICUPKGDATA_INSTALL_DIR) + else + $(PKGDATA_INVOKE) $(PKGDATA) -m $(PKGDATA_MODE) $(PKGDATA_VERSIONING) -e $(ICUDATA_ENTRY_POINT) -T $(OUTTMPDIR) -s $(BUILDDIR) -p $(ICUDATA_NAME) $(PKGDATA_LIBNAME) $(PKGDATA_LIST) -I $(ICUPKGDATA_INSTALL_DIR) + endif diff --git a/recipes/icu/all/patches/0002-74.2-fix-emscripten.patch b/recipes/icu/all/patches/0002-74.2-fix-emscripten.patch new file mode 100644 index 0000000000000..9c7748fc3e0f1 --- /dev/null +++ b/recipes/icu/all/patches/0002-74.2-fix-emscripten.patch @@ -0,0 +1,109 @@ +--- a/source/acinclude.m4 ++++ b/source/acinclude.m4 +@@ -85,6 +85,7 @@ powerpc*-apple-darwin*) icu_cv_host_frag=mh-darwin-ppc ;; + *-dec-osf*) icu_cv_host_frag=mh-alpha-osf ;; + *-*-nto*) icu_cv_host_frag=mh-qnx ;; + *-ncr-*) icu_cv_host_frag=mh-mpras ;; ++wasm*-*-emscripten*) icu_cv_host_frag=mh-emscripten ;; + *) icu_cv_host_frag=mh-unknown ;; + esac + ] +--- /dev/null ++++ b/source/config/mh-emscripten +@@ -0,0 +1,86 @@ ++## Emscripten-specific setup ++## Copyright (c) 1999-2013, International Business Machines Corporation and ++## others. All Rights Reserved. ++## Commands to generate dependency files ++GEN_DEPS.c= $(CC) -E -MM $(DEFS) $(CPPFLAGS) ++GEN_DEPS.cc= $(CXX) -E -MM $(DEFS) $(CPPFLAGS) $(CXXFLAGS) ++ ++## Flags for position independent code ++SHAREDLIBCFLAGS = -fPIC ++SHAREDLIBCXXFLAGS = -fPIC ++SHAREDLIBCPPFLAGS = -DPIC ++ ++## Additional flags when building libraries and with threads ++THREADSCPPFLAGS = -D_REENTRANT ++LIBCPPFLAGS = ++ ++## Compiler switch to embed a runtime search path ++LD_RPATH= -Wl,-zorigin,-rpath,'$$'ORIGIN ++LD_RPATH_PRE = -Wl,-rpath, ++ ++## Force RPATH=$ORIGIN to locate own dependencies w/o need for LD_LIBRARY_PATH: ++ENABLE_RPATH=YES ++RPATHLDFLAGS=${LD_RPATH_PRE}'$$ORIGIN' ++ ++## These are the library specific LDFLAGS ++#LDFLAGSICUDT=-nodefaultlibs -nostdlib ++# Debian change: linking icudata as data only causes too many problems. ++LDFLAGSICUDT= ++ ++## Compiler switch to embed a library name ++# The initial tab in the next line is to prevent icu-config from reading it. ++ LD_SONAME = -Wl,-soname -Wl,$(notdir $(MIDDLE_SO_TARGET)) ++#SH# # We can't depend on MIDDLE_SO_TARGET being set. ++#SH# LD_SONAME= ++ ++## Shared library options ++LD_SOOPTIONS= -Wl,-Bsymbolic-functions ++ ++## Shared object suffix ++SO = so ++## Non-shared intermediate object suffix ++STATIC_O = o ++ ++## Compilation rules ++# WASM needs -pthread for atomics support ++%.$(STATIC_O): $(srcdir)/%.c ++ $(call SILENT_COMPILE,$(strip $(COMPILE.c) $(STATICCPPFLAGS) $(STATICCFLAGS)) -pthread -o $@ $<) ++ ++%.$(STATIC_O): $(srcdir)/%.cpp ++ $(call SILENT_COMPILE,$(strip $(COMPILE.cc) $(STATICCPPFLAGS) $(STATICCXXFLAGS)) -pthread -o $@ $<) ++ ++ ++## Dependency rules ++%.d: $(srcdir)/%.c ++ $(call ICU_MSG,(deps)) $< ++ @$(SHELL) -ec '$(GEN_DEPS.c) $< \ ++ | sed '\''s%\($*\)\.o[ :]*%\1.o $@ : %g'\'' > $@; \ ++ [ -s $@ ] || rm -f $@' ++ ++%.d: $(srcdir)/%.cpp ++ $(call ICU_MSG,(deps)) $< ++ @$(SHELL) -ec '$(GEN_DEPS.cc) $< \ ++ | sed '\''s%\($*\)\.o[ :]*%\1.o $@ : %g'\'' > $@; \ ++ [ -s $@ ] || rm -f $@' ++ ++## Versioned libraries rules ++ ++%.$(SO).$(SO_TARGET_VERSION_MAJOR): %.$(SO).$(SO_TARGET_VERSION) ++ $(RM) $@ && ln -s ${ #include #include @@ -7,20 +8,26 @@ struct person { int64_t age; }; -REFLECTION(person, name, age); +#if __cplusplus < 202002L +YLT_REFL(person, name, age); +#endif } // namespace client struct MyStruct { uint64_t a; }; -REFLECTION(MyStruct, a); +#if __cplusplus < 202002L +YLT_REFL(MyStruct, a); +#endif struct student { int id; std::string name; int age; }; -REFLECTION(student, id, name, age); +#if __cplusplus < 202002L +YLT_REFL(student, id, name, age); +#endif void test() { MyStruct p = {5566777755311}; diff --git a/recipes/iguana/all/test_package/test_package_1_0_5.cpp b/recipes/iguana/all/test_package/test_package_1_0_5.cpp new file mode 100644 index 0000000000000..f97e8fb335c14 --- /dev/null +++ b/recipes/iguana/all/test_package/test_package_1_0_5.cpp @@ -0,0 +1,81 @@ +#include +#include + +namespace client { +struct person { + std::string name; + int64_t age; +}; + +REFLECTION(person, name, age); +} // namespace client + +struct MyStruct { + uint64_t a; +}; +REFLECTION(MyStruct, a); + +struct student { + int id; + std::string name; + int age; +}; +REFLECTION(student, id, name, age); + +void test() { + MyStruct p = {5566777755311}; + iguana::string_stream ss; + iguana::to_json(p, ss); + + MyStruct p2; + iguana::from_json(p2, ss); + std::cout << p2.a << std::endl; +} + +void test_v() { + client::person p1 = {"tom", 20}; + client::person p2 = {"jack", 19}; + client::person p3 = {"mike", 21}; + + std::vector v{p1, p2, p3}; + iguana::string_stream ss; + iguana::to_json(v, ss); + std::cout << ss << std::endl; + + std::vector v1; + iguana::from_json(v1, ss); +} + +void test_disorder() { + student s{1, "tom", 20}; + iguana::string_stream ss; + iguana::to_json(s, ss); + std::cout << ss << std::endl; + + student s1{}; + std::string str = "{\"name\":\"tom\",\"id\":1,\"age\":20}"; + iguana::from_json(s1, str.data(), str.length()); + std::string str1 = "{\"name\":\"tom\",\"age\":20,\"id\":1}"; + iguana::from_json(s1, str1.data(), str1.length()); + + std::string str2 = "{ \"id\":1,\"name\" : \"madoka\",\"age\" : 27 }"; + iguana::from_json(s1, str2.data(), str2.length()); +} + +int main(void) { + test_disorder(); + test_v(); + test(); + client::person p = {"zombie chow", -311}; + iguana::string_stream ss; + iguana::to_json(p, ss); + + std::cout << ss << std::endl; + client::person p2; + + iguana::from_json(p2, ss.data(), ss.length()); + + std::cout << p2.name << " - " << p2.age << std::endl; + + return 0; +} diff --git a/recipes/iguana/config.yml b/recipes/iguana/config.yml index 372dd1cb646bd..c64afb84e8dad 100644 --- a/recipes/iguana/config.yml +++ b/recipes/iguana/config.yml @@ -1,3 +1,9 @@ versions: + "1.0.6": + folder: all + "1.0.5": + folder: all + "1.0.4": + folder: all "1.0.3": folder: all diff --git a/recipes/imagemagick/all/conanfile.py b/recipes/imagemagick/all/conanfile.py index 4e944b9046b3f..49e0388b61d25 100644 --- a/recipes/imagemagick/all/conanfile.py +++ b/recipes/imagemagick/all/conanfile.py @@ -108,7 +108,7 @@ def requirements(self): if self.options.with_lzma: self.requires("xz_utils/5.2.5") if self.options.with_lcms: - self.requires("lcms/2.11") + self.requires("lcms/2.16") if self.options.with_openexr: self.requires("openexr/2.5.7") if self.options.with_heic: diff --git a/recipes/imagl/all/conandata.yml b/recipes/imagl/all/conandata.yml index 338c8a935d27e..83cf32f1dbe98 100644 --- a/recipes/imagl/all/conandata.yml +++ b/recipes/imagl/all/conandata.yml @@ -16,15 +16,27 @@ patches: - patch_file: "patches/0001-no-unmanaged-conan-0.1.x.patch" patch_description: "No unmanaged conan: update CMakeLists.txt remove call to conan" patch_type: conan + - patch_file: "patches/0002-use-findpackage-0.1.x.patch" + patch_description: "Use find_package: update CMakeLists.txt to use modern find_package compatible with conan 2.0" + patch_type: conan "0.1.1": - patch_file: "patches/0001-no-unmanaged-conan-0.1.x.patch" patch_description: "No unmanaged conan: update CMakeLists.txt remove call to conan" patch_type: conan + - patch_file: "patches/0002-use-findpackage-0.1.x.patch" + patch_description: "Use find_package: update CMakeLists.txt to use modern find_package compatible with conan 2.0" + patch_type: conan "0.1.2": - patch_file: "patches/0001-no-unmanaged-conan-0.1.x.patch" patch_description: "No unmanaged conan: update CMakeLists.txt remove call to conan" patch_type: conan + - patch_file: "patches/0002-use-findpackage-0.1.x.patch" + patch_description: "Use find_package: update CMakeLists.txt to use modern find_package compatible with conan 2.0" + patch_type: conan "0.2.1": - patch_file: "patches/0001-no-unmanaged-conan-0.2.1.patch" patch_description: "No unmanaged conan: update CMakeLists.txt remove call to conan" patch_type: conan + - patch_file: "patches/0002-use-findpackage-0.2.1.patch" + patch_description: "Use find_package: update CMakeLists.txt to use modern find_package compatible with conan 2.0" + patch_type: conan diff --git a/recipes/imagl/all/patches/0002-use-findpackage-0.1.x.patch b/recipes/imagl/all/patches/0002-use-findpackage-0.1.x.patch new file mode 100644 index 0000000000000..8be7d6463c6b8 --- /dev/null +++ b/recipes/imagl/all/patches/0002-use-findpackage-0.1.x.patch @@ -0,0 +1,15 @@ +--- a/imaGL/CMakeLists.txt ++++ b/imaGL/CMakeLists.txt +@@ -12,9 +12,10 @@ set_property(TARGET libImaGL PROPERTY OUTPUT_NAME imaGL) + set_property(TARGET libImaGL PROPERTY PUBLIC_HEADER "${CMAKE_CURRENT_SOURCE_DIR}/public/imaGL/imaGL.h") + target_include_directories(libImaGL INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}/public") + +-if(TARGET CONAN_PKG::libpng) ++find_package(PNG) ++if(PNG_FOUND) + add_compile_definitions(_HAS_PNG) +- target_link_libraries (libImaGL CONAN_PKG::libpng) ++ target_link_libraries (libImaGL PNG::PNG) + endif() + + file(GLOB_RECURSE ImaGL_SRC "*.h" "*.cpp") diff --git a/recipes/imagl/all/patches/0002-use-findpackage-0.2.1.patch b/recipes/imagl/all/patches/0002-use-findpackage-0.2.1.patch new file mode 100644 index 0000000000000..0053f809e4461 --- /dev/null +++ b/recipes/imagl/all/patches/0002-use-findpackage-0.2.1.patch @@ -0,0 +1,23 @@ +--- a/imaGL/CMakeLists.txt ++++ b/imaGL/CMakeLists.txt +@@ -12,14 +12,16 @@ set_property(TARGET libImaGL PROPERTY OUTPUT_NAME imaGL) + set_property(TARGET libImaGL PROPERTY PUBLIC_HEADER "${CMAKE_CURRENT_SOURCE_DIR}/public/imaGL/imaGL.h") + target_include_directories(libImaGL INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}/public") + +-if(TARGET CONAN_PKG::libpng) ++find_package(PNG) ++if(PNG_FOUND) + add_compile_definitions(_HAS_PNG) +- target_link_libraries (libImaGL CONAN_PKG::libpng) ++ target_link_libraries (libImaGL PNG::PNG) + endif() + +-if(TARGET CONAN_PKG::libjpeg) ++find_package(JPEG) ++if(JPEG_FOUND) + add_compile_definitions(_HAS_JPEG) +- target_link_libraries (libImaGL CONAN_PKG::libjpeg) ++ target_link_libraries (libImaGL JPEG::JPEG) + endif() + + file(GLOB_RECURSE ImaGL_SRC "*.h" "*.cpp") diff --git a/recipes/imath/all/conandata.yml b/recipes/imath/all/conandata.yml index 3f20468a0db96..afe9fa4328195 100644 --- a/recipes/imath/all/conandata.yml +++ b/recipes/imath/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "3.1.12": + url: "https://github.com/AcademySoftwareFoundation/Imath/archive/v3.1.12.tar.gz" + sha256: "8a1bc258f3149b5729c2f4f8ffd337c0e57f09096e4ba9784329f40c4a9035da" "3.1.11": url: "https://github.com/AcademySoftwareFoundation/Imath/archive/v3.1.11.tar.gz" sha256: "9057849585e49b8b85abe7cc1e76e22963b01bfdc3b6d83eac90c499cd760063" diff --git a/recipes/imath/config.yml b/recipes/imath/config.yml index 61b9f04e8a57f..299f457f6ad28 100644 --- a/recipes/imath/config.yml +++ b/recipes/imath/config.yml @@ -1,4 +1,6 @@ versions: + "3.1.12": + folder: all "3.1.11": folder: all "3.1.10": diff --git a/recipes/imgui/all/conandata.yml b/recipes/imgui/all/conandata.yml index bc951cc1d225c..60726e912afc5 100644 --- a/recipes/imgui/all/conandata.yml +++ b/recipes/imgui/all/conandata.yml @@ -1,73 +1,64 @@ sources: + "1.91.4": + url: "https://github.com/ocornut/imgui/archive/v1.91.4.tar.gz" + sha256: "a455c28d987c78ddf56aab98ce0ff0fda791a23a2ec88ade46dd106b837f0923" + "1.91.4-docking": + url: "https://github.com/ocornut/imgui/archive/v1.91.4-docking.tar.gz" + sha256: "7405bdaf304b77d6d03e6d17d1f31ca3586fa0c65a466fa1dd71b6ca6a222023" + "1.91.3": + url: "https://github.com/ocornut/imgui/archive/v1.91.3.tar.gz" + sha256: "29949d7b300c30565fbcd66398100235b63aa373acfee0b76853a7aeacd1be28" + "1.91.3-docking": + url: "https://github.com/ocornut/imgui/archive/v1.91.3-docking.tar.gz" + sha256: "d462ccd0ca10cb412f8946c09ebd4cd0f62ca5def544dec5b3ce293c59f089fb" + "1.91.2": + url: "https://github.com/ocornut/imgui/archive/v1.91.2.tar.gz" + sha256: "a3c4fd857a0a48f6edad3e25de68fa1e96d2437f1665039714d1de9ad579b8d0" + "1.91.2-docking": + url: "https://github.com/ocornut/imgui/archive/v1.91.2-docking.tar.gz" + sha256: "bd6e9e6dc0451060152cea2a610256969c77a360659f4bd3836d6d4c9267229b" + "1.91.0": + url: "https://github.com/ocornut/imgui/archive/v1.91.0.tar.gz" + sha256: "6e62c87252e6b3725ba478a1c04dc604aa0aaeec78fedcf4011f1e52548f4cc9" + "1.91.0-docking": + url: "https://github.com/ocornut/imgui/archive/v1.91.0-docking.tar.gz" + sha256: "b08a569eedcf2bf25e763e034754fdbe37dfcb035072310781c92fa6e6504bf7" + "1.90.9": + url: "https://github.com/ocornut/imgui/archive/v1.90.9.tar.gz" + sha256: "04943919721e874ac75a2f45e6eb6c0224395034667bf508923388afda5a50bf" + "1.90.9-docking": + url: "https://github.com/ocornut/imgui/archive/v1.90.9-docking.tar.gz" + sha256: "48e7e4e4f154ad98d0946126a84e2375f849f6a67792129a805817dd60a34330" + "1.90.8": + url: "https://github.com/ocornut/imgui/archive/v1.90.8.tar.gz" + sha256: "f606b4fb406aa0f8dad36d4a9dd3d6f0fd39f5f0693e7468abc02d545fb505ae" + "1.90.8-docking": + url: "https://github.com/ocornut/imgui/archive/v1.90.8-docking.tar.gz" + sha256: "51845ed8b8e81490288c3c8165173d47e9bcf92f7d999aea800635f95587b9e7" + "1.90.7": + url: "https://github.com/ocornut/imgui/archive/v1.90.7.tar.gz" + sha256: "872574217643d4ad7e9e6df420bb8d9e0d468fb90641c2bf50fd61745e05de99" + "1.90.7-docking": + url: "https://github.com/ocornut/imgui/archive/v1.90.7-docking.tar.gz" + sha256: "582a9061a508b82b0ff6504aa17af6bb449bca9edf0a0f0f33bf729252cd3194" + "1.90.6": + url: "https://github.com/ocornut/imgui/archive/v1.90.6.tar.gz" + sha256: "70b4b05ac0938e82b4d5b8d59480d3e2ca63ca570dfb88c55023831f387237ad" + "1.90.6-docking": + url: "https://github.com/ocornut/imgui/archive/v1.90.6-docking.tar.gz" + sha256: "fc7f81d009ef718917aee0ac3ea1c74c8a5cfc8016049ad153b4d91d302b8aef" "1.90.5": url: "https://github.com/ocornut/imgui/archive/v1.90.5.tar.gz" sha256: "e94b48dba7311c85ba8e3e6fe7c734d76a0eed21b2b42c5180fd5706d1562241" "1.90.5-docking": url: "https://github.com/ocornut/imgui/archive/v1.90.5-docking.tar.gz" sha256: "8a5e1e594d6c8552e46e4c1ba8dd9deb51262067f04937904babc04384533ccc" - "1.90.4": - url: "https://github.com/ocornut/imgui/archive/v1.90.4.tar.gz" - sha256: "5d9dc738af74efa357f2a9fc39fe4a28d29ef1dfc725dd2977ccf3f3194e996e" - "1.90.4-docking": - url: "https://github.com/ocornut/imgui/archive/v1.90.4-docking.tar.gz" - sha256: "91ac3c6fd83cc3bea38745af57665b13464ba235dc11373d0898ae6fe35a8a65" - "1.90.3": - url: "https://github.com/ocornut/imgui/archive/v1.90.3.tar.gz" - sha256: "40b302d01092c9393373b372fe07ea33ac69e9491893ebab3bf952b2c1f5fd23" - "1.90.3-docking": - url: "https://github.com/ocornut/imgui/archive/v1.90.3-docking.tar.gz" - sha256: "ebd1da0f76a95a7a690f8a0dfa119e1c6da4eee40383e582fb75374792be0891" - "1.90.2": - url: "https://github.com/ocornut/imgui/archive/v1.90.2.tar.gz" - sha256: "452d1c11e5c4b4dfcca272915644a65f1c076498e8318b141ca75cd30470dd68" - "1.90.2-docking": - url: "https://github.com/ocornut/imgui/archive/v1.90.2-docking.tar.gz" - sha256: "69f1cd78d49ec9cc847b7082d641434ea731f0be41c6930bea08a46a0794ac17" - "1.90.1": - url: "https://github.com/ocornut/imgui/archive/v1.90.1.tar.gz" - sha256: "21dcc985bb2ae8fe48047c86135dbc438d6980a8f2e08babbda5be820592f282" - "1.90.1-docking": - url: "https://github.com/ocornut/imgui/archive/v1.90.1-docking.tar.gz" - sha256: "6804c3d8dc6d83b892d3c5491d8164840079d9a795fb7c4cef2eaa1b04c86a0c" - "1.90": - url: "https://github.com/ocornut/imgui/archive/v1.90.tar.gz" - sha256: "170986e6a4b83d165bfc1d33c2c5a5bc2d67e5b97176287485c51a2299249296" - "1.90-docking": - url: "https://github.com/ocornut/imgui/archive/v1.90-docking.tar.gz" - sha256: "d4b7fd185443111a3a892d4625c85ab9666c6c9cb5484e3a447de6af419f8d2f" "1.89.9": url: "https://github.com/ocornut/imgui/archive/v1.89.9.tar.gz" sha256: "1acc27a778b71d859878121a3f7b287cd81c29d720893d2b2bf74455bf9d52d6" "1.89.9-docking": url: "https://github.com/ocornut/imgui/archive/v1.89.9-docking.tar.gz" sha256: "2481489ce9091239b3cab8a330d0409ffdd9ee607ad1f3fe3a0b0b751c27a8eb" - "1.89.8": - url: "https://github.com/ocornut/imgui/archive/v1.89.8.tar.gz" - sha256: "6680ccc32430009a8204291b1268b2367d964bd6d1b08a4e0358a017eb8e8c9e" - "1.89.8-docking": - url: "https://github.com/ocornut/imgui/archive/v1.89.8-docking.tar.gz" - sha256: "d48c4856e42a8fa3e6df3efae7eae86012fa65d9dceb03d1a2080a2386063635" - "1.89.7": - url: "https://github.com/ocornut/imgui/archive/v1.89.7.tar.gz" - sha256: "115ee9e242af98a884302ac0f6ca3b2b26b1f10c660205f5e7ad9f1d1c96d269" - "1.89.7-docking": - url: "https://github.com/ocornut/imgui/archive/v1.89.7-docking.tar.gz" - sha256: "28216ec07e87f075b63486d8d5212e4d89542b69bd10a482f1b4b7dc6f1613a0" - "1.89.5": - url: "https://github.com/ocornut/imgui/archive/v1.89.5.tar.gz" - sha256: "eab371005c86dd029523a0c4ba757840787163740d45c1f4e5a110eb21820546" - "1.89.4": - url: "https://github.com/ocornut/imgui/archive/v1.89.4.tar.gz" - sha256: "69f1e83adcab3fdd27b522f5075f407361b0d3875e3522b13d33bc2ae2c7d48c" - "1.89.3": - url: "https://github.com/ocornut/imgui/archive/v1.89.3.tar.gz" - sha256: "3b665fadd5580b7ef494d5d8bb1c12b2ec53ee723034caf43332956381f5d631" - "1.89.2": - url: "https://github.com/ocornut/imgui/archive/v1.89.2.tar.gz" - sha256: "e110beffda505e6954feb7b13541d35a7c12a176b9723290c853684713df6a67" - "1.89.1": - url: "https://github.com/ocornut/imgui/archive/v1.89.1.tar.gz" - sha256: "6d02a0079514d869e4b5f8f590f9060259385fcddd93a07ef21298b6a9610cbd" "1.88": url: "https://github.com/ocornut/imgui/archive/v1.88.tar.gz" sha256: "9f14c788aee15b777051e48f868c5d4d959bd679fc5050e3d2a29de80d8fd32e" @@ -80,16 +71,3 @@ sources: "1.85": url: "https://github.com/ocornut/imgui/archive/v1.85.tar.gz" sha256: "7ed49d1f4573004fa725a70642aaddd3e06bb57fcfe1c1a49ac6574a3e895a77" - - # These versions belong to the docking branch in ImGUI repository. This branch is declared stable and production ready, and - # it is synced with `master` regularly. These versions are taken from that branch using the commit where `master` was synced - # after a regular release - "cci.20230105+1.89.2.docking": - url: "https://github.com/ocornut/imgui/archive/d822c65317ba881798bed8fce9ffba267d27dada.zip" - sha256: "0d2c09ae4c450d4c74f62e66667809752c9d11438354fc331ed9da5d5e850071" - "cci.20220621+1.88.docking": - url: "https://github.com/ocornut/imgui/archive/9cd9c2eff99877a3f10a7f9c2a3a5b9c15ea36c6.tar.gz" - sha256: "61fb1ce5d48089bce1b4f92e9320fd234b2ce960f35f965b313c4842b3c8e440" - "cci.20220207+1.87.docking": - url: "https://github.com/ocornut/imgui/archive/1ee252772ae9c0a971d06257bb5c89f628fa696a.tar.gz" - sha256: "c50e263660e1deb6e85b10a0382bf8a6fc861645e44b7012bd32da5460829ae0" diff --git a/recipes/imgui/config.yml b/recipes/imgui/config.yml index a1dfb0d79179a..f13dd4816765d 100644 --- a/recipes/imgui/config.yml +++ b/recipes/imgui/config.yml @@ -1,49 +1,43 @@ versions: - "1.90.5": - folder: all - "1.90.5-docking": - folder: all - "1.90.4": + "1.91.4": folder: all - "1.90.4-docking": + "1.91.4-docking": folder: all - "1.90.3": + "1.91.3": folder: all - "1.90.3-docking": + "1.91.3-docking": folder: all - "1.90.2": + "1.91.2": folder: all - "1.90.2-docking": + "1.91.2-docking": folder: all - "1.90.1": + "1.91.0": folder: all - "1.90.1-docking": + "1.91.0-docking": folder: all - "1.90": + "1.90.9": folder: all - "1.90-docking": + "1.90.9-docking": folder: all - "1.89.9": - folder: all - "1.89.9-docking": + "1.90.8": folder: all - "1.89.8": + "1.90.8-docking": folder: all - "1.89.8-docking": + "1.90.7": folder: all - "1.89.7": + "1.90.7-docking": folder: all - "1.89.7-docking": + "1.90.6": folder: all - "1.89.5": + "1.90.6-docking": folder: all - "1.89.4": + "1.90.5": folder: all - "1.89.3": + "1.90.5-docking": folder: all - "1.89.2": + "1.89.9": folder: all - "1.89.1": + "1.89.9-docking": folder: all "1.88": folder: all @@ -54,12 +48,3 @@ versions: "1.85": folder: all - # These versions belong to the docking branch in ImGUI repository. This branch is declared stable and production ready, and - # it is synced with `master` regularly. These versions are taken from that branch using the commit where `master` was synced - # after a regular release - "cci.20230105+1.89.2.docking": - folder: all - "cci.20220621+1.88.docking": - folder: all - "cci.20220207+1.87.docking": - folder: all diff --git a/recipes/imguizmo/all/conandata.yml b/recipes/imguizmo/all/conandata.yml index 11e9cb824cab9..ae95ecdea6a27 100644 --- a/recipes/imguizmo/all/conandata.yml +++ b/recipes/imguizmo/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "cci.20231114": + url: "https://github.com/CedricGuillemet/ImGuizmo/archive/ba662b119d64f9ab700bb2cd7b2781f9044f5565.zip" + sha256: "5a63baebb5bce96d83e5e3d6daa4598844ba8d5d0e3cb1ee385fcc54cf996115" "1.83": url: "https://github.com/CedricGuillemet/ImGuizmo/archive/refs/tags/1.83.tar.gz" sha256: "e6d05c5ebde802df7f6c342a06bc675bd2aa1c754d2d96755399a182187098a8" diff --git a/recipes/imguizmo/all/conanfile.py b/recipes/imguizmo/all/conanfile.py index 6591de3a6b559..64f8cb9f6dab2 100644 --- a/recipes/imguizmo/all/conanfile.py +++ b/recipes/imguizmo/all/conanfile.py @@ -42,8 +42,7 @@ def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - # 1.89 is the newest imgui version compatible with imguizmo - self.requires("imgui/1.90.4", transitive_headers=True) + self.requires("imgui/1.90.5", transitive_headers=True) def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) @@ -56,7 +55,7 @@ def generate(self): tc.generate() def build(self): - if Version(self.dependencies["imgui"].ref.version) >= "1.89.4": + if self.version == "1.83" and Version(self.dependencies["imgui"].ref.version) >= "1.89.4": # Related to a breaking change: https://github.com/ocornut/imgui/blob/master/docs/CHANGELOG.txt#L912 # Redirection: ImDrawList::AddBezierCurve() -> use ImDrawList::AddBezierCubic() replace_in_file(self, os.path.join(self.source_folder, "GraphEditor.cpp"), diff --git a/recipes/imguizmo/config.yml b/recipes/imguizmo/config.yml index cc1b28a70b3ee..a2886d669a4e7 100644 --- a/recipes/imguizmo/config.yml +++ b/recipes/imguizmo/config.yml @@ -1,3 +1,5 @@ versions: + "cci.20231114": + folder: "all" "1.83": folder: "all" diff --git a/recipes/implot/all/CMakeLists.txt b/recipes/implot/all/CMakeLists.txt index 8f2c9651b41e6..317f2805b1b38 100644 --- a/recipes/implot/all/CMakeLists.txt +++ b/recipes/implot/all/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.4) +cmake_minimum_required(VERSION 3.15) project(implot LANGUAGES CXX) file(GLOB HEADER_FILES ${IMPLOT_SRC_DIR}/*.h) @@ -6,6 +6,9 @@ file(GLOB HEADER_FILES ${IMPLOT_SRC_DIR}/*.h) add_library(${PROJECT_NAME} ${IMPLOT_SRC_DIR}/implot.cpp ${IMPLOT_SRC_DIR}/implot_items.cpp + # implot_demo.cpp is included so that user can use it to display the main documentation of implot. + # Note that these functions are not declared by the public headers. + # https://github.com/conan-io/conan-center-index/pull/20374 ${IMPLOT_SRC_DIR}/implot_demo.cpp ) target_include_directories(${PROJECT_NAME} PRIVATE ${IMPLOT_SRC_DIR}) @@ -14,7 +17,6 @@ find_package(imgui CONFIG REQUIRED) target_link_libraries(${PROJECT_NAME} PUBLIC imgui::imgui) -target_compile_definitions(${PROJECT_NAME} PRIVATE IMGUI_DEFINE_MATH_OPERATORS) target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) set_target_properties(${PROJECT_NAME} PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS ON) diff --git a/recipes/implot/all/conanfile.py b/recipes/implot/all/conanfile.py index 0f83131c24116..ce5a386b006bb 100644 --- a/recipes/implot/all/conanfile.py +++ b/recipes/implot/all/conanfile.py @@ -1,7 +1,7 @@ from conan import ConanFile from conan.errors import ConanInvalidConfiguration from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout -from conan.tools.files import get, copy +from conan.tools.files import get, copy, replace_in_file from conan.tools.scm import Version from conan.tools.microsoft import is_msvc import os @@ -31,17 +31,15 @@ def export_sources(self): def config_options(self): if self.settings.os == "Windows": - del self.options.fPIC # rm_safe not needed + del self.options.fPIC def configure(self): if self.options.shared: self.options.rm_safe("fPIC") def requirements(self): - if Version(self.version) >= "0.15": - self.requires("imgui/1.90", transitive_headers=True) - elif Version(self.version) >= "0.14": - self.requires("imgui/1.89.4", transitive_headers=True) + if Version(self.version) >= "0.14": + self.requires("imgui/1.90.5", transitive_headers=True) elif Version(self.version) >= "0.13": # imgui 1.89 renamed ImGuiKeyModFlags_* to ImGuiModFlags_* self.requires("imgui/1.88", transitive_headers=True) @@ -61,11 +59,22 @@ def source(self): def generate(self): tc = CMakeToolchain(self) tc.variables["IMPLOT_SRC_DIR"] = self.source_folder.replace("\\", "/") + if Version(self.version) < "0.16": + # Set in code since v0.16 https://github.com/epezent/implot/commit/33c5a965f55f80057f197257d1d1cdb06523e963 + tc.preprocessor_definitions["IMGUI_DEFINE_MATH_OPERATORS"] = "" tc.generate() deps = CMakeDeps(self) deps.generate() + def _patch_sources(self): + if Version(self.version) == "0.14" and Version(self.dependencies["imgui"].ref.version) >= "1.89.7": + # https://github.com/ocornut/imgui/commit/51f564eea6333bae9242f40c983a3e29d119a9c2 + replace_in_file(self, os.path.join(self.source_folder, "implot.cpp"), + "ImGuiButtonFlags_AllowItemOverlap", + "ImGuiButtonFlags_AllowOverlap") + def build(self): + self._patch_sources() cmake = CMake(self) cmake.configure(build_script_folder=os.path.join(self.source_folder, os.pardir)) cmake.build() diff --git a/recipes/inipp/all/conandata.yml b/recipes/inipp/all/conandata.yml new file mode 100644 index 0000000000000..64126a2c14163 --- /dev/null +++ b/recipes/inipp/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "1.0.12": + url: "https://github.com/mcmtroffaes/inipp/archive/refs/tags/1.0.12.tar.gz" + sha256: "e37833ab689c7b38de09b1923635b131f80db42e9b22f37d88ae4d74a7cd3e78" diff --git a/recipes/inipp/all/conanfile.py b/recipes/inipp/all/conanfile.py new file mode 100644 index 0000000000000..8d2aa4480c81c --- /dev/null +++ b/recipes/inipp/all/conanfile.py @@ -0,0 +1,69 @@ +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.build import check_min_cppstd +from conan.tools.files import copy, get +from conan.tools.layout import basic_layout +from conan.tools.scm import Version +import os + +required_conan_version = ">=1.52.0" + +class InippConan(ConanFile): + name = "inipp" + description = "Simple C++ ini parser." + license = "MIT" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/mcmtroffaes/inipp" + topics = ("ini", "header-only") + package_type = "header-library" + settings = "os", "arch", "compiler", "build_type" + no_copy_source = True + + @property + def _min_cppstd(self): + # inipp requires `deduced return type` which is provided in C++14 + return 14 + + @property + def _compilers_minimum_version(self): + return { + "apple-clang": "10", + "clang": "7", + "gcc": "7", + "msvc": "191", + "Visual Studio": "15", + } + + def layout(self): + basic_layout(self, src_folder="src") + + def package_id(self): + self.info.clear() + + def validate(self): + if self.settings.compiler.cppstd: + check_min_cppstd(self, self._min_cppstd) + minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) + if minimum_version and Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration( + f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." + ) + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def package(self): + copy(self, "LICENSE.txt", self.source_folder, os.path.join(self.package_folder, "licenses")) + copy( + self, + "*.h", + os.path.join(self.source_folder, "inipp"), + os.path.join(self.package_folder, "include"), + ) + + def package_info(self): + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] + + self.cpp_info.set_property("cmake_file_name", "inipp") + self.cpp_info.set_property("cmake_target_name", "inipp::inipp") diff --git a/recipes/inipp/all/test_package/CMakeLists.txt b/recipes/inipp/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..8b6037a46e4cd --- /dev/null +++ b/recipes/inipp/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) + +find_package(inipp REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE inipp::inipp) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_14) diff --git a/recipes/inipp/all/test_package/conanfile.py b/recipes/inipp/all/test_package/conanfile.py new file mode 100644 index 0000000000000..3a91c9439218e --- /dev/null +++ b/recipes/inipp/all/test_package/conanfile.py @@ -0,0 +1,26 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def layout(self): + cmake_layout(self) + + def requirements(self): + self.requires(self.tested_reference_str) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/inipp/all/test_package/test_package.cpp b/recipes/inipp/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..cb8defcfdd28d --- /dev/null +++ b/recipes/inipp/all/test_package/test_package.cpp @@ -0,0 +1,13 @@ +#include +#include "inipp.h" + +int main() { + inipp::Ini ini; + ini.generate(std::cout); + + ini.default_section(ini.sections["DEFAULT"]); + ini.interpolate(); + ini.generate(std::cout); + + return 0; +} diff --git a/recipes/inipp/config.yml b/recipes/inipp/config.yml new file mode 100644 index 0000000000000..81d603cb239b7 --- /dev/null +++ b/recipes/inipp/config.yml @@ -0,0 +1,3 @@ +versions: + "1.0.12": + folder: all diff --git a/recipes/intx/all/conandata.yml b/recipes/intx/all/conandata.yml index 82ca4023ed3e5..5e7cb7a5f366d 100644 --- a/recipes/intx/all/conandata.yml +++ b/recipes/intx/all/conandata.yml @@ -1,4 +1,10 @@ sources: + "0.12.0": + url: "https://github.com/chfast/intx/archive/v0.12.0.tar.gz" + sha256: "d68ff5dde9a2f340c73be67888f3f72bb18a2ad30aa16cd663ec3bc611afc9b4" + "0.11.0": + url: "https://github.com/chfast/intx/archive/v0.11.0.tar.gz" + sha256: "bff2a78e3a9a3b9bbabf50500feae65bc0ec50a2364f4a83768277d6eba7a844" "0.10.1": url: "https://github.com/chfast/intx/archive/v0.10.1.tar.gz" sha256: "4663073458b5e0564e92058e5aa1a7ce88634fc72827191856b17bd7335de29b" diff --git a/recipes/intx/all/conanfile.py b/recipes/intx/all/conanfile.py index fcbc0174dcfbb..813526a90e8a3 100644 --- a/recipes/intx/all/conanfile.py +++ b/recipes/intx/all/conanfile.py @@ -17,14 +17,12 @@ class IntxConan(ConanFile): topics = ("evm", "biginteger", "arbitrary-precision", "header-only") package_type = "header-library" settings = "os", "arch", "compiler", "build_type" + no_copy_source = True @property def _min_cppstd(self): return 20 - def layout(self): - basic_layout(self, src_folder="src") - @property def _compilers_minimum_version(self): return { @@ -35,13 +33,15 @@ def _compilers_minimum_version(self): "apple-clang": "14.1", } + def layout(self): + basic_layout(self, src_folder="src") + def package_id(self): self.info.clear() def validate(self): - if self.settings.get_safe("compiler.cppstd"): + if self.settings.compiler.get_safe("cppstd"): check_min_cppstd(self, self._min_cppstd) - minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) if minimum_version and Version(self.settings.compiler.version) < minimum_version: raise ConanInvalidConfiguration( @@ -63,3 +63,6 @@ def package(self): def package_info(self): self.cpp_info.bindirs = [] self.cpp_info.libdirs = [] + + self.cpp_info.set_property("cmake_file_name", "intx") + self.cpp_info.set_property("cmake_target_name", "intx::intx") diff --git a/recipes/intx/config.yml b/recipes/intx/config.yml index 36cf695df0df6..85ca9aa067b7a 100644 --- a/recipes/intx/config.yml +++ b/recipes/intx/config.yml @@ -1,3 +1,7 @@ versions: + "0.12.0": + folder: all + "0.11.0": + folder: all "0.10.1": folder: all diff --git a/recipes/iowow/all/conandata.yml b/recipes/iowow/all/conandata.yml index 3dc81fcb10588..047330d4f8fd9 100644 --- a/recipes/iowow/all/conandata.yml +++ b/recipes/iowow/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.4.18": + url: "https://github.com/Softmotions/iowow/archive/refs/tags/v1.4.18.tar.gz" + sha256: "ef4ee56dd77ce326fff25b6f41e7d78303322cca3f11cf5683ce9abfda34faf9" "1.4.17": url: "https://github.com/Softmotions/iowow/archive/refs/tags/v1.4.17.tar.gz" sha256: "13a851026dbc1f31583fba96986e86e94a7554f9e7d38aa12a9ea5dbebdf328b" @@ -6,6 +9,10 @@ sources: url: "https://github.com/Softmotions/iowow/archive/refs/tags/v1.4.16.tar.gz" sha256: "6e3b92b6c342ef6ef4a2731ca2d43368749d66ca876b24b773587364cff01003" patches: + "1.4.18": + - patch_file: "patches/1.4.18-0002-fix-uint64_t-format.patch" + patch_description: "fix uint64_t printf format" + patch_type: "portability" "1.4.17": - patch_file: "patches/1.4.16-0002-fix-uint64_t-format.patch" patch_description: "fix uint64_t printf format" diff --git a/recipes/iowow/all/patches/1.4.18-0002-fix-uint64_t-format.patch b/recipes/iowow/all/patches/1.4.18-0002-fix-uint64_t-format.patch new file mode 100644 index 0000000000000..3253bb3ff1bdd --- /dev/null +++ b/recipes/iowow/all/patches/1.4.18-0002-fix-uint64_t-format.patch @@ -0,0 +1,13 @@ +diff --git a/src/fs/iwfsmfile.c b/src/fs/iwfsmfile.c +index 2d1452a..121e989 100644 +--- a/src/fs/iwfsmfile.c ++++ b/src/fs/iwfsmfile.c +@@ -1339,7 +1339,7 @@ static iwrc _fsm_read_meta_lr(struct fsm *fsm) { + fsm->bmlen = llv; + if (llv & (64 - 1)) { + rc = IWFS_ERROR_INVALID_FILEMETA; +- iwlog_ecode_error(rc, "Free-space bitmap length is not 64bit aligned: %" PRIuMAX "", fsm->bmlen); ++ iwlog_ecode_error(rc, "Free-space bitmap length is not 64bit aligned: %" PRIx64 "", fsm->bmlen); + } + rp += sizeof(llv); + diff --git a/recipes/iowow/config.yml b/recipes/iowow/config.yml index 764e66b7855a6..c30ae14aca332 100644 --- a/recipes/iowow/config.yml +++ b/recipes/iowow/config.yml @@ -1,4 +1,6 @@ versions: + "1.4.18": + folder: all "1.4.17": folder: all "1.4.16": diff --git a/recipes/ipaddress/all/conandata.yml b/recipes/ipaddress/all/conandata.yml new file mode 100644 index 0000000000000..a3ae373c62221 --- /dev/null +++ b/recipes/ipaddress/all/conandata.yml @@ -0,0 +1,7 @@ +sources: + "1.1.0": + url: "https://github.com/VladimirShaleev/ipaddress/archive/v1.1.0.tar.gz" + sha256: "e5084d83ebd712210882eb6dac14ed1b9b71584dede523b35c6181e0a06375f1" + "1.0.1": + url: "https://github.com/VladimirShaleev/ipaddress/archive/v1.0.1.tar.gz" + sha256: "49c16294f06fe95ffc66cae828dc08d116efb4a1ede3dddd21dcc182a2eceb03" diff --git a/recipes/ipaddress/all/conanfile.py b/recipes/ipaddress/all/conanfile.py new file mode 100644 index 0000000000000..1bdda098db7d5 --- /dev/null +++ b/recipes/ipaddress/all/conanfile.py @@ -0,0 +1,89 @@ +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.build import check_min_cppstd +from conan.tools.files import copy, get +from conan.tools.layout import basic_layout +from conan.tools.scm import Version +import os + + +required_conan_version = ">=1.52.0" + + +class IpAddressConan(ConanFile): + name = "ipaddress" + description = "A library for working and manipulating IPv4/IPv6 addresses and networks" + license = "MIT" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/VladimirShaleev/ipaddress" + topics = ("ipv4", "ipv6", "ipaddress", "ip", "network", "header-only") + package_type = "header-library" + settings = "os", "arch", "compiler", "build_type" + no_copy_source = True + + options = { + "exceptions": [True, False], + "overload_std": [True, False], + "ipv6_scope": [True, False], + "ipv6_scope_max_length": ["ANY"], + } + default_options = { + "exceptions": True, + "overload_std": True, + "ipv6_scope": True, + "ipv6_scope_max_length": 16, + } + + @property + def _min_cppstd(self): + return 11 + + @property + def _compilers_minimum_version(self): + return { + "apple-clang": "13.0", + "clang": "6.0", + "gcc": "7.5", + "msvc": "192", + "Visual Studio": "16", + } + + def layout(self): + basic_layout(self, src_folder="src") + + def package_id(self): + self.info.clear() + + def validate(self): + if self.settings.compiler.get_safe("cppstd"): + check_min_cppstd(self, self._min_cppstd) + minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) + if minimum_version and Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration( + f"{self.ref} doesn't support {self.settings.compiler} < {minimum_version}" + ) + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def package(self): + copy(self, "LICENSE", self.source_folder, os.path.join(self.package_folder, "licenses")) + copy( + self, + "*.hpp", + os.path.join(self.source_folder, "include"), + os.path.join(self.package_folder, "include") + ) + + def package_info(self): + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] + + if not self.options.exceptions: + self.cpp_info.defines.append("IPADDRESS_NO_EXCEPTIONS") + if not self.options.overload_std: + self.cpp_info.defines.append("IPADDRESS_NO_OVERLOAD_STD") + if not self.options.ipv6_scope: + self.cpp_info.defines.append("IPADDRESS_NO_IPV6_SCOPE") + else: + self.cpp_info.defines.append(f"IPADDRESS_IPV6_SCOPE_MAX_LENGTH={int(self.options.ipv6_scope_max_length)}") diff --git a/recipes/ipaddress/all/test_package/CMakeLists.txt b/recipes/ipaddress/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..f9368cb4ca108 --- /dev/null +++ b/recipes/ipaddress/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) + +find_package(ipaddress CONFIG REQUIRED) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} ipaddress::ipaddress) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) diff --git a/recipes/ipaddress/all/test_package/conanfile.py b/recipes/ipaddress/all/test_package/conanfile.py new file mode 100644 index 0000000000000..3a91c9439218e --- /dev/null +++ b/recipes/ipaddress/all/test_package/conanfile.py @@ -0,0 +1,26 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def layout(self): + cmake_layout(self) + + def requirements(self): + self.requires(self.tested_reference_str) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/ipaddress/all/test_package/test_package.cpp b/recipes/ipaddress/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..1e0a4a4597eaf --- /dev/null +++ b/recipes/ipaddress/all/test_package/test_package.cpp @@ -0,0 +1,11 @@ +#include +#include +#include "ipaddress/ipaddress.hpp" + + +int main(void) { + auto ip = ipaddress::ipv6_address::parse("fec0::1ff:fe23:4567:890a%eth2"); + std::cout << "Parsing ipv6: " << ip << std::endl; + + return EXIT_SUCCESS; +} diff --git a/recipes/ipaddress/config.yml b/recipes/ipaddress/config.yml new file mode 100644 index 0000000000000..20ec1c9e2bdee --- /dev/null +++ b/recipes/ipaddress/config.yml @@ -0,0 +1,5 @@ +versions: + "1.1.0": + folder: all + "1.0.1": + folder: all diff --git a/recipes/iphreeqc/all/conandata.yml b/recipes/iphreeqc/all/conandata.yml new file mode 100644 index 0000000000000..a249b379218dd --- /dev/null +++ b/recipes/iphreeqc/all/conandata.yml @@ -0,0 +1,9 @@ +sources: + "3.8.1": + url: "https://github.com/usgs-coupled/iphreeqc/releases/download/v3.8.1/iphreeqc-3.8.1-16963.tar.gz" + sha256: "15c47959a25e6c8b5d0c47214ea0c3f3626257dacc24a89d0f9c9635186c375c" +patches: + "3.8.1": + - patch_file: "patches/3.8.1-0001-dont-build-examples-doc-database.patch" + patch_description: "Don't build examples, doc and database" + patch_type: "conan" diff --git a/recipes/iphreeqc/all/conanfile.py b/recipes/iphreeqc/all/conanfile.py new file mode 100644 index 0000000000000..84c2b765e8d90 --- /dev/null +++ b/recipes/iphreeqc/all/conanfile.py @@ -0,0 +1,101 @@ +from conan import ConanFile +from conan.tools.build import stdcpp_library +from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout +from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rmdir +from conan.tools.microsoft import msvc_runtime_flag +import os + +required_conan_version = ">=1.54.0" + + +class IphreeqcConan(ConanFile): + name = "iphreeqc" + description = ( + "Library implementing the geochemical model PHREEQC. It is capable of " + "simulating a wide range of equilibrium reactions between water and " + "minerals, ion exchangers, surface complexes, solid solutions, and gases." + ) + license = "FSFUL" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://www.usgs.gov/software/phreeqc-version-3" + topics = ("geochemistry", "modeling") + package_type = "library" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + } + + @property + def _is_cl_like(self): + return self.settings.compiler.get_safe("runtime") is not None + + @property + def _is_cl_like_static_runtime(self): + return self._is_cl_like and "MT" in msvc_runtime_flag(self) + + def export_sources(self): + export_conandata_patches(self) + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + + def layout(self): + cmake_layout(self, src_folder="src") + + def build_requirements(self): + self.tool_requires("cmake/[>=3.20 <4]") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + if self._is_cl_like: + tc.variables["IPHREEQC_STATIC_RUNTIME"] = self._is_cl_like_static_runtime + tc.variables["IPHREEQC_ENABLE_MODULE"] = False + tc.variables["IPHREEQC_FORTRAN_TESTING"] = False + tc.variables["BUILD_CLR_LIBS"] = False + tc.generate() + + def build(self): + apply_conandata_patches(self) + cmake = CMake(self) + cmake.configure() + cmake.build() + + def package(self): + copy(self, "INSTALL", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) + cmake = CMake(self) + cmake.install() + rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) + rmdir(self, os.path.join(self.package_folder, "src")) + rmdir(self, os.path.join(self.package_folder, "share")) + + def package_info(self): + self.cpp_info.set_property("cmake_file_name", "IPhreeqc") + self.cpp_info.set_property("cmake_target_name", "IPhreeqc::IPhreeqc") + postfix = "" + if self.settings.build_type == "Debug": + postfix += "d" + elif self.settings.build_type == "MinSizeRel": + postfix += "msr" + elif self.settings.build_type == "RelWithDebInfo": + postfix += "rwd" + self.cpp_info.libs = [f"IPhreeqc{postfix}"] + self.cpp_info.defines.append("IPHREEQC_NO_FORTRAN_MODULE") + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.system_libs.append("m") + if not self.options.shared: + libcxx = stdcpp_library(self) + if libcxx: + self.cpp_info.system_libs.append(libcxx) diff --git a/recipes/iphreeqc/all/patches/3.8.1-0001-dont-build-examples-doc-database.patch b/recipes/iphreeqc/all/patches/3.8.1-0001-dont-build-examples-doc-database.patch new file mode 100644 index 0000000000000..3704fa470a6a6 --- /dev/null +++ b/recipes/iphreeqc/all/patches/3.8.1-0001-dont-build-examples-doc-database.patch @@ -0,0 +1,11 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -400,7 +400,7 @@ endif() + + include (CTest) + +-if (STANDALONE_BUILD) ++if (0) + + add_subdirectory(database) + add_subdirectory(doc) diff --git a/recipes/iphreeqc/all/test_package/CMakeLists.txt b/recipes/iphreeqc/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..13618cfaf693e --- /dev/null +++ b/recipes/iphreeqc/all/test_package/CMakeLists.txt @@ -0,0 +1,7 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES C) + +find_package(IPhreeqc REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.c) +target_link_libraries(${PROJECT_NAME} PRIVATE IPhreeqc::IPhreeqc) diff --git a/recipes/iphreeqc/all/test_package/conanfile.py b/recipes/iphreeqc/all/test_package/conanfile.py new file mode 100644 index 0000000000000..0a6bc68712d90 --- /dev/null +++ b/recipes/iphreeqc/all/test_package/conanfile.py @@ -0,0 +1,26 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import CMake, cmake_layout +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeToolchain", "CMakeDeps", "VirtualRunEnv" + test_type = "explicit" + + def layout(self): + cmake_layout(self) + + def requirements(self): + self.requires(self.tested_reference_str) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/iphreeqc/all/test_package/test_package.c b/recipes/iphreeqc/all/test_package/test_package.c new file mode 100644 index 0000000000000..f29ed23c37243 --- /dev/null +++ b/recipes/iphreeqc/all/test_package/test_package.c @@ -0,0 +1,8 @@ +#include + +int main() +{ + int id = CreateIPhreeqc(); + DestroyIPhreeqc(id); + return 0; +} diff --git a/recipes/iphreeqc/config.yml b/recipes/iphreeqc/config.yml new file mode 100644 index 0000000000000..f3cf585c380d6 --- /dev/null +++ b/recipes/iphreeqc/config.yml @@ -0,0 +1,3 @@ +versions: + "3.8.1": + folder: all diff --git a/recipes/isa-l/all/conanfile.py b/recipes/isa-l/all/conanfile.py index 09af37c4cc900..de6e6376e8a4f 100644 --- a/recipes/isa-l/all/conanfile.py +++ b/recipes/isa-l/all/conanfile.py @@ -2,8 +2,9 @@ from conan import ConanFile from conan.errors import ConanInvalidConfiguration +from conan.tools.apple import fix_apple_shared_install_name from conan.tools.env import VirtualBuildEnv -from conan.tools.files import chdir, collect_libs, copy, get, replace_in_file +from conan.tools.files import chdir, copy, get, replace_in_file from conan.tools.gnu import Autotools, AutotoolsToolchain from conan.tools.layout import basic_layout from conan.tools.microsoft import is_msvc, NMakeToolchain @@ -29,6 +30,10 @@ class LibisalConan(ConanFile): "fPIC": True, } + @property + def _settings_build(self): + return getattr(self, "settings_build", self.settings) + def config_options(self): if self.settings.os == "Windows": del self.options.fPIC @@ -45,13 +50,17 @@ def layout(self): def validate(self): if self.settings.arch not in ["x86", "x86_64"]: raise ConanInvalidConfiguration(f"{self.settings.arch} architecture is not supported") - if self.version == "2.30.0" and self.settings.arch == "armv8": + if self.version == "2.30.0" and self._settings_build.arch == "armv8": raise ConanInvalidConfiguration(f"Version {self.version} does not support armv8") def build_requirements(self): self.tool_requires("nasm/2.15.05") - if self.settings.os != "Windows": + if not is_msvc(self): self.tool_requires("libtool/2.4.7") + if self._settings_build.os == "Windows": + self.win_bash = True + if not self.conf.get("tools.microsoft.bash:path", check_type=str): + self.tool_requires("msys2/cci.latest") def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) @@ -102,6 +111,12 @@ def package(self): dst=os.path.join(self.package_folder, "lib"), src=self.source_folder, keep_path=False) + fix_apple_shared_install_name(self) def package_info(self): - self.cpp_info.libs = collect_libs(self) + self.cpp_info.set_property("pkg_config_name", "libisal") + if is_msvc(self): + suffix = "" if self.options.shared else "_static" + self.cpp_info.libs = [f"isa-l{suffix}"] + else: + self.cpp_info.libs = ["isal"] diff --git a/recipes/isl/all/conanfile.py b/recipes/isl/all/conanfile.py index bd3795141c531..892a970bf8f60 100644 --- a/recipes/isl/all/conanfile.py +++ b/recipes/isl/all/conanfile.py @@ -6,6 +6,7 @@ from conan.tools.gnu import Autotools, AutotoolsToolchain from conan.tools.layout import basic_layout from conan.tools.microsoft import is_msvc, msvc_runtime_flag, check_min_vs, unix_path, is_msvc_static_runtime +from conan.tools.scm import Version import os required_conan_version = ">=1.58.0" @@ -50,7 +51,7 @@ def configure(self): def validate(self): if self.settings.os == "Windows" and self.options.shared: raise ConanInvalidConfiguration("Cannot build shared isl library on Windows (due to libtool refusing to link to static/import libraries)") - if is_apple_os(self) and cross_building(self): + if Version(self.version) < "0.25" and is_apple_os(self) and cross_building(self): raise ConanInvalidConfiguration("Cross-building with Apple Clang is not supported yet") if msvc_runtime_flag(self) == "MDd" and not check_min_vs(self, 192, raise_invalid=False): # isl fails to link with this version of visual studio and MDd runtime: diff --git a/recipes/itk/all/conandata.yml b/recipes/itk/all/conandata.yml index 9e7f86e6f5246..74a479bc9586a 100644 --- a/recipes/itk/all/conandata.yml +++ b/recipes/itk/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "5.3.0": + url: "https://github.com/InsightSoftwareConsortium/ITK/releases/download/v5.3.0/InsightToolkit-5.3.0.tar.gz" + sha256: "57a4471133dc8f76bde3d6eb45285c440bd40d113428884a1487472b7b71e383" "5.1.2": url: "https://github.com/InsightSoftwareConsortium/ITK/releases/download/v5.1.2/InsightToolkit-5.1.2.tar.gz" sha256: "f1e5a78e11125348f68f655c6b89b617c3a8b2c09f710081f621054811a70c98" @@ -6,6 +9,10 @@ sources: url: "https://github.com/InsightSoftwareConsortium/ITK/releases/download/v5.1.0/InsightToolkit-5.1.0.tar.gz" sha256: "121020a1611508cec8123eb5226215598cec07be627d843a2e6b6da891e61d13" patches: + "5.3.0": + - patch_file: "patches/0002-find-conan-packages.patch" + patch_description: "inject thirdparties from conan" + patch_type: "conan" "5.1.2": - patch_file: "patches/0001-find-conan-packages.patch" patch_description: "inject thirdparties from conan" diff --git a/recipes/itk/all/conanfile.py b/recipes/itk/all/conanfile.py index c9a9ded1e49f4..0ab11f37d60c6 100644 --- a/recipes/itk/all/conanfile.py +++ b/recipes/itk/all/conanfile.py @@ -1,6 +1,7 @@ from conan import ConanFile from conan.tools.build import check_min_cppstd from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.env import VirtualBuildEnv from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, replace_in_file, rmdir, save from conan.tools.microsoft import check_min_vs, is_msvc from conan.tools.scm import Version @@ -69,17 +70,21 @@ def requirements(self): #self.requires("dcmtk/3.6.7") self.requires("double-conversion/3.3.0") self.requires("eigen/3.4.0") - self.requires("expat/2.5.0") + self.requires("expat/[>=2.6.2 <3]") self.requires("fftw/3.3.10") - self.requires("gdcm/3.0.21") - self.requires("hdf5/1.14.1") + self.requires("gdcm/3.0.23") + self.requires("hdf5/1.14.3") self.requires("libjpeg/9e") - self.requires("libpng/1.6.40") - self.requires("libtiff/4.5.1") - self.requires("openjpeg/2.5.0") + self.requires("libpng/[>=1.6 <2]") + self.requires("libtiff/4.6.0") + self.requires("openjpeg/2.5.2") self.requires("onetbb/2021.9.0") self.requires("zlib/[>=1.2.11 <2]") + def build_requirements(self): + if Version(self.version) >= "5.3.0": + self.tool_requires("cmake/[>=3.16.3 <4]") + def validate(self): if self.options.shared and not self.dependencies["hdf5"].options.shared: raise ConanInvalidConfiguration("When building a shared itk, hdf5 needs to be shared too (or not linked to by the consumer).\n" @@ -93,6 +98,9 @@ def validate(self): raise ConanInvalidConfiguration( f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." ) + if Version(self.version) < "5.2" and self.settings.os == "Macos": + raise ConanInvalidConfiguration(f"{self.ref} fails to compile in {self.settings.os}, fixed in 5.2.0") + def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) @@ -104,6 +112,9 @@ def generate(self): tc.variables["BUILD_EXAMPLES"] = False tc.variables["BUILD_TESTING"] = False tc.variables["BUILD_DOCUMENTATION"] = False + tc.variables["DO_NOT_BUILD_ITK_TEST_DRIVER"] = True + tc.variables["DO_NOT_INSTALL_ITK_TEST_DRIVER"] = True + tc.variables["DISABLE_MODULE_TESTS"] = True tc.variables["ITK_SKIP_PATH_LENGTH_CHECKS"] = True tc.variables["ITK_USE_SYSTEM_LIBRARIES"] = True @@ -235,6 +246,9 @@ def generate(self): tc = CMakeDeps(self) tc.generate() + venv = VirtualBuildEnv(self) + venv.generate() + def _patch_sources(self): apply_conandata_patches(self) #The CMake policy CMP0091 must be NEW, but is '' @@ -258,6 +272,10 @@ def _itk_subdir(self): def _cmake_module_dir(self): return os.path.join("lib", "cmake", self._itk_subdir) + @property + def _module_variables_file_rel_path(self): + return os.path.join(self._cmake_module_dir, f"conan-official-{self.name}-variables.cmake") + @property def _module_file_rel_path(self): return os.path.join(self._cmake_module_dir, f"conan-official-{self.name}-targets.cmake") @@ -452,6 +470,10 @@ def libdl(): "ITKVideoCore": {"requires": ["ITKCommon"]}, } + def _create_cmake_module_variables(self): + content = 'set(ITK_CMAKE_DIR "${CMAKE_CURRENT_LIST_DIR}")' + save(self, os.path.join(self.package_folder, self._module_variables_file_rel_path), content) + def _create_cmake_module_alias_targets(self): targets = {target:f"ITK::{target}" for target in self._itk_components.keys()} content = "" @@ -464,6 +486,14 @@ def _create_cmake_module_alias_targets(self): """) save(self, os.path.join(self.package_folder, self._module_file_rel_path), content) + @property + def _itk_modules_files(self): + cmake_files = [] + if Version(self.version) >= "5.3": + cmake_files.extend(["ITKFactoryRegistration.cmake", "ITKInitializeCXXStandard.cmake"]) + cmake_files.append("UseITK.cmake") + return cmake_files + def package(self): copy(self, pattern="LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) cmake = CMake(self) @@ -472,18 +502,23 @@ def package(self): rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) rmdir(self, os.path.join(self.package_folder, "share")) rmdir(self, os.path.join(self.package_folder, self._cmake_module_dir, "Modules")) - # Do not remove UseITK.cmake and *.h.in files + + # Do not remove UseITK.cmake, ITKFactoryRegistration.cmake, ITKInitializeCXXStandard.cmake and *.h.in files for cmake_file in glob.glob(os.path.join(self.package_folder, self._cmake_module_dir, "*.cmake")): - if os.path.basename(cmake_file) != "UseITK.cmake": + file_name = os.path.basename(cmake_file) + if file_name not in self._itk_modules_files: os.remove(cmake_file) + + self._create_cmake_module_variables() self._create_cmake_module_alias_targets() def package_info(self): - self.cpp_info.set_property("cmake_file_name", "ITK") - self.cpp_info.set_property("cmake_build_modules", [os.path.join(self._cmake_module_dir, "UseITK.cmake")]) - itk_version = Version(self.version) lib_suffix = f"-{itk_version.major}.{itk_version.minor}" + build_modules = [self._module_variables_file_rel_path] + build_modules.extend([os.path.join(self._cmake_module_dir, f) for f in self._itk_modules_files]) + self.cpp_info.set_property("cmake_file_name", "ITK") + self.cpp_info.set_property("cmake_build_modules", build_modules) for name, values in self._itk_components.items(): is_header_only = values.get("header_only", False) @@ -501,8 +536,9 @@ def package_info(self): # TODO: to remove in conan v2 once cmake_find_package* generators removed for generator in ["cmake_find_package", "cmake_find_package_multi"]: self.cpp_info.components[name].names[generator] = name - self.cpp_info.components[name].build_modules[generator].append(self._module_file_rel_path) - self.cpp_info.components[name].build_modules[generator].append(os.path.join(self._cmake_module_dir, "UseITK.cmake")) + self.cpp_info.components[name].build_modules[generator].extend([self._module_file_rel_path, self._module_variables_file_rel_path]) + self.cpp_info.components[name].build_modules[generator].extend( + [os.path.join(self._cmake_module_dir, f) for f in self._itk_modules_files]) # TODO: to remove in conan v2 once cmake_find_package* generators removed for generator in ["cmake_find_package", "cmake_find_package_multi"]: diff --git a/recipes/itk/all/patches/0002-find-conan-packages.patch b/recipes/itk/all/patches/0002-find-conan-packages.patch new file mode 100644 index 0000000000000..34b81a5788250 --- /dev/null +++ b/recipes/itk/all/patches/0002-find-conan-packages.patch @@ -0,0 +1,189 @@ +--- Modules/ThirdParty/Eigen3/itk-module-init.cmake ++++ Modules/ThirdParty/Eigen3/itk-module-init.cmake +@@ -1,3 +1,3 @@ + if(ITK_USE_SYSTEM_EIGEN) +- find_package(Eigen3 REQUIRED CONFIG) ++ find_package(Eigen3 REQUIRED) + endif() +--- Modules/ThirdParty/DCMTK/itk-module-init.cmake ++++ Modules/ThirdParty/DCMTK/itk-module-init.cmake +@@ -24,7 +24,7 @@ + if(ITK_USE_SYSTEM_DCMTK) + # Use local FindDCMTK.cmake. + list(INSERT CMAKE_MODULE_PATH 0 "${CMAKE_CURRENT_LIST_DIR}/CMake") +- find_package(DCMTK REQUIRED NO_MODULE) ++ find_package(DCMTK REQUIRED) + else(ITK_USE_SYSTEM_DCMTK) + # Copied and mofified from DCMTK/CMake/3rdparty.cmake + if(NOT DEFINED DCMTK_USE_ICU) +--- Modules/ThirdParty/Eigen3/CMakeLists.txt ++++ Modules/ThirdParty/Eigen3/CMakeLists.txt +@@ -52,9 +52,9 @@ + + if(ITK_USE_SYSTEM_EIGEN) + set(_Eigen3_SYSTEM_OR_INTERNAL "Eigen3") +- find_package(${_Eigen3_SYSTEM_OR_INTERNAL} ${_Eigen3_min_version} REQUIRED CONFIG) +- set(Eigen3_DIR_INSTALL ${Eigen3_DIR}) +- set(Eigen3_DIR_BUILD ${Eigen3_DIR}) ++ find_package(${_Eigen3_SYSTEM_OR_INTERNAL} ${_Eigen3_min_version} REQUIRED) ++ set(Eigen3_DIR_INSTALL ${Eigen3_INCLUDE_DIR}) ++ set(Eigen3_DIR_BUILD ${Eigen3_INCLUDE_DIR}) + else() + set(_Eigen3_SYSTEM_OR_INTERNAL "ITKInternalEigen3") + find_package(${_Eigen3_SYSTEM_OR_INTERNAL} ${_Eigen3_min_version} REQUIRED CONFIG) +@@ -66,7 +66,7 @@ + # Eigen3 is header only, but there are compile definitions that we want to provide + # to enforce use of MPL only code, and to disable warnings. + # We only need to add the location of the header itk_eigen.h used internally. +-get_target_property(Eigen_INCLUDE_DIRS ${_eigen_itk_target} INTERFACE_INCLUDE_DIRECTORIES) ++set(Eigen_INCLUDE_DIRS ${Eigen3_INCLUDE_DIRS}) + set(ITKEigen3_INCLUDE_DIRS + ${Eigen_INCLUDE_DIRS} + ${ITKEigen3_BINARY_DIR}/src # For the generated itk_eigen.h +@@ -75,14 +75,10 @@ + # When this module is loaded by an app, load Eigen too. + # Load ITKInternalEigen3 or Eigen3 depending on ITK_USE_SYSTEM_EIGEN + set(ITKEigen3_EXPORT_CODE_INSTALL " +-set(ITK_USE_SYSTEM_EIGEN \"${ITK_USE_SYSTEM_EIGEN}\") +-set(${_Eigen3_SYSTEM_OR_INTERNAL}_DIR \"${Eigen3_DIR_INSTALL}\") +-find_package(${_Eigen3_SYSTEM_OR_INTERNAL} ${_Eigen3_min_version} REQUIRED CONFIG) ++find_package(${_Eigen3_SYSTEM_OR_INTERNAL} ${_Eigen3_min_version} REQUIRED) + ") + set(ITKEigen3_EXPORT_CODE_BUILD " +-set(ITK_USE_SYSTEM_EIGEN \"${ITK_USE_SYSTEM_EIGEN}\") +-set(${_Eigen3_SYSTEM_OR_INTERNAL}_DIR \"${Eigen3_DIR_BUILD}\") +-find_package(${_Eigen3_SYSTEM_OR_INTERNAL} ${_Eigen3_min_version} REQUIRED CONFIG) ++find_package(${_Eigen3_SYSTEM_OR_INTERNAL} ${_Eigen3_min_version} REQUIRED) + ") + + # Eigen3 targets are not installed if ITK_USE_SYSTEM_EIGEN==True +--- Modules/ThirdParty/Eigen3/src/itk_eigen.h.in ++++ Modules/ThirdParty/Eigen3/src/itk_eigen.h.in +@@ -43,10 +43,10 @@ + set(Eigen3_DIR ${ITKInternalEigen3_DIR}) + endif() + message(STATUS "From ITK: Eigen3_DIR: ${Eigen3_DIR}") +-find_package(Eigen3 REQUIRED CONFIG) ++find_package(Eigen3 REQUIRED) + add_executable(main main.cpp) + target_link_libraries(main PUBLIC ${ITK_LIBRARIES}) + target_link_libraries(main PUBLIC Eigen3::Eigen) + \endcode + * + * Then, the user can use Eigen3 as usual: +--- Modules/ThirdParty/JPEG/CMakeLists.txt ++++ Modules/ThirdParty/JPEG/CMakeLists.txt +@@ -6,13 +6,13 @@ + + if(ITK_USE_SYSTEM_JPEG) + find_package(JPEG REQUIRED) + set(ITKJPEG_INCLUDE_DIRS + ${ITKJPEG_BINARY_DIR}/src + ) + set(ITKJPEG_SYSTEM_INCLUDE_DIRS + ${JPEG_INCLUDE_DIR} + ) +- set(ITKJPEG_LIBRARIES "${JPEG_LIBRARIES}") ++ set(ITKJPEG_LIBRARIES JPEG::JPEG) + set(ITKJPEG_NO_SRC 1) + else() + set(ITKJPEG_INCLUDE_DIRS +--- Modules/ThirdParty/DoubleConversion/CMakeLists.txt ++++ Modules/ThirdParty/DoubleConversion/CMakeLists.txt +@@ -8,8 +8,8 @@ + + if(ITK_USE_SYSTEM_DOUBLECONVERSION) + find_package(double-conversion 3.1.6 REQUIRED) +- get_target_property(ITKDoubleConversion_INCLUDE_DIRS double-conversion::double-conversion INTERFACE_INCLUDE_DIRECTORIES) +- get_target_property(ITKDoubleConversion_LIBRARIES double-conversion::double-conversion LOCATION) ++ set(ITKDoubleConversion_INCLUDE_DIRS ${double-conversion_INCLUDE_DIRS}) ++ set(ITKDoubleConversion_LIBRARIES ${double-conversion_LIBRARIES}) + else() + set(ITKDoubleConversion_INCLUDE_DIRS + ${ITKDoubleConversion_SOURCE_DIR}/src +--- Modules/ThirdParty/Expat/CMakeLists.txt ++++ Modules/ThirdParty/Expat/CMakeLists.txt +@@ -6,9 +6,9 @@ + + if(ITK_USE_SYSTEM_EXPAT) + find_package(EXPAT REQUIRED) +- set(ITKExpat_INCLUDE_DIRS ${ITKExpat_BINARY_DIR}/src ) +- set(ITKExpat_SYSTEM_INCLUDE_DIRS "${EXPAT_INCLUDE_DIR}") +- set(ITKExpat_LIBRARIES "${EXPAT_LIBRARY}") ++ set(ITKExpat_INCLUDE_DIRS ${EXPAT_INCLUDE_DIRECTORIES}) ++ set(ITKExpat_SYSTEM_INCLUDE_DIRS ${EXPAT_INCLUDE_DIRECTORIES}) ++ set(ITKExpat_LIBRARIES EXPAT::EXPAT) + set(ITKExpat_NO_SRC 1) + else() + set(ITKExpat_INCLUDE_DIRS +--- Modules/ThirdParty/HDF5/CMakeLists.txt ++++ Modules/ThirdParty/HDF5/CMakeLists.txt +@@ -19,25 +19,9 @@ if(CMAKE_LINKER MATCHES "link.exe$") + endif() + + if(ITK_USE_SYSTEM_HDF5) +- +- if(HDF5_DIR) +- set(_HDF5_DIR_CODE "set(HDF5_DIR \"${HDF5_DIR}\")") +- endif() +- if(HDF5_NO_MODULE) +- set(_HDF5_NO_MODULE_ARG "NO_MODULE") +- endif() +- +- # When ITK's config is loaded, load HDF5 too. +- set(ITKHDF5_EXPORT_CODE_INSTALL " +-${_HDF5_DIR_CODE} +-find_package(HDF5 ${_HDF5_NO_MODULE_ARG} REQUIRED COMPONENTS CXX C HL) +-") +- set(ITKHDF5_EXPORT_CODE_BUILD " +-if(NOT ITK_BINARY_DIR) +- ${_HDF5_DIR_CODE} +- find_package(HDF5 ${_HDF5_NO_MODULE_ARG} REQUIRED COMPONENTS CXX C HL) +-endif() +-") ++ find_package(HDF5 REQUIRED) ++ set(HDF5_C_SHARED_LIBRARY HDF5::HDF5) ++ set(HDF5_C_STATIC_LIBRARY HDF5::HDF5) + + if(BUILD_SHARED_LIBS) + if (TARGET hdf5-shared) +--- Modules/ThirdParty/OpenJPEG/src/CMakeLists.txt ++++ Modules/ThirdParty/OpenJPEG/src/CMakeLists.txt +@@ -4,5 +4,8 @@ + set(ITK3P_INSTALL_RUNTIME_DIR "${ITKOpenJPEG_INSTALL_RUNTIME_DIR}") + set(ITK3P_INSTALL_LIBRARY_DIR "${ITKOpenJPEG_INSTALL_LIBRARY_DIR}") + set(ITK3P_INSTALL_ARCHIVE_DIR "${ITKOpenJPEG_INSTALL_ARCHIVE_DIR}") +-add_subdirectory(openjpeg) +-itk_module_target(itkopenjpeg NO_INSTALL) ++find_package(OpenJPEG REQUIRED) ++add_library(itkopenjpeg INTERFACE) ++set_property(TARGET itkopenjpeg PROPERTY INTERFACE_LINK_LIBRARIES openjp2) ++#target_compile_definitions(itkopenjpeg INTERFACE) ++install(TARGETS itkopenjpeg EXPORT ${ITK3P_INSTALL_EXPORT_NAME}) +--- Modules/ThirdParty/TBB/CMakeLists.txt ++++ Modules/ThirdParty/TBB/CMakeLists.txt +@@ -8,14 +8,14 @@ set(ITKTBB_NO_SRC 1) + # When this module is loaded by an app, load TBB too. + set(ITKTBB_EXPORT_CODE_INSTALL " + set(TBB_DIR \"${TBB_DIR}\") +-find_package(TBB REQUIRED CONFIG) ++find_package(TBB REQUIRED) + ") + + # When this module is configured by an app, configure TBB too. + set(ITKTBB_EXPORT_CODE_BUILD " + if(NOT ITK_BINARY_DIR) + set(TBB_DIR \"${TBB_DIR}\") +- find_package(TBB REQUIRED CONFIG) ++ find_package(TBB REQUIRED) + endif() + ") + +diff --git a/Modules/ThirdParty/TBB/itk-module-init.cmake b/Modules/ThirdParty/TBB/itk-module-init.cmake +index 1b7ee20a..0859ef33 100644 +--- a/Modules/ThirdParty/TBB/itk-module-init.cmake ++++ b/Modules/ThirdParty/TBB/itk-module-init.cmake +@@ -1,2 +1,2 @@ +-find_package(TBB REQUIRED CONFIG) # must have TBBConfig.cmake, provided since version tbb2017_20170604oss ++find_package(TBB REQUIRED) + get_target_property(TBB_INCLUDE_DIRS TBB::tbb INTERFACE_INCLUDE_DIRECTORIES) diff --git a/recipes/itk/config.yml b/recipes/itk/config.yml index 989b5ee90fe13..f362c6f4b0b84 100644 --- a/recipes/itk/config.yml +++ b/recipes/itk/config.yml @@ -1,4 +1,6 @@ versions: + "5.3.0": + folder: "all" "5.1.2": folder: "all" "5.1.0": diff --git a/recipes/itlib/all/conandata.yml b/recipes/itlib/all/conandata.yml index 4f1d604b9b789..19923cd832b58 100644 --- a/recipes/itlib/all/conandata.yml +++ b/recipes/itlib/all/conandata.yml @@ -1,4 +1,16 @@ sources: + "1.11.4": + url: "https://github.com/iboB/itlib/archive/v1.11.4.tar.gz" + sha256: "09b155afcb9766fe36d0156294f6656956189235612eb7711903ebc22079c37e" + "1.11.3": + url: "https://github.com/iboB/itlib/archive/v1.11.3.tar.gz" + sha256: "38999b3c4c2425ac3700529457fb2683d6fa5853752747c3afb97b2e688255b8" + "1.11.2": + url: "https://github.com/iboB/itlib/archive/v1.11.2.tar.gz" + sha256: "bbf734f6084af77a1e886e54e4efadab491ada242f5858afa561353db6a0a03f" + "1.11.1": + url: "https://github.com/iboB/itlib/archive/v1.11.1.tar.gz" + sha256: "2c60e02660ea63dfb7a39237e29b30a066670cef228d22e8d0908e1fff2fa7f1" "1.10.3": url: "https://github.com/iboB/itlib/archive/v1.10.3.tar.gz" sha256: "e533c44354d48b2251ca57f1502778033b38170d9d6aba6bb2bbad90f2bf9d27" @@ -8,21 +20,3 @@ sources: "1.9.2": url: "https://github.com/iboB/itlib/archive/v1.9.2.tar.gz" sha256: "70627c57edff91dfae219e101c0672560f65567272e889f461069c8ea506bef1" - "1.9.1": - url: "https://github.com/iboB/itlib/archive/v1.9.1.tar.gz" - sha256: "3d87b841d85dc30fac2a5157955d685c37fd32a5ecff2e9df330b147fdc3da39" - "1.9.0": - url: "https://github.com/iboB/itlib/archive/v1.9.0.tar.gz" - sha256: "62b8c01f208a39c22462cde285dd84c60a8141cfbbc94f5fc1d991685a724228" - "1.8.3": - url: "https://github.com/iboB/itlib/archive/v1.8.3.tar.gz" - sha256: "2323e2abf5827651097c563a19d8f82c7fd222a8740ff3421681da967b59277e" - "1.8.2": - url: "https://github.com/iboB/itlib/archive/v1.8.2.tar.gz" - sha256: "2b4d206ed0de31a4e6042fada0aa7cee54c95220d98666381f0402046e95304f" - "1.8.1": - url: "https://github.com/iboB/itlib/archive/v1.8.1.tar.gz" - sha256: "7a8619073d0bbd5a5cea0ee9bb1b3b749348cbab1d12e4e0c234215f26388aef" - "1.8.0": - url: "https://github.com/iboB/itlib/archive/v1.8.0.tar.gz" - sha256: "70b6493b0cc3a720ffd48e98e3f009e8d94003380800bf07e61f167e813a9add" diff --git a/recipes/itlib/all/conanfile.py b/recipes/itlib/all/conanfile.py index e92c4b5b3a2f4..b96a180998454 100644 --- a/recipes/itlib/all/conanfile.py +++ b/recipes/itlib/all/conanfile.py @@ -13,7 +13,7 @@ class ItlibConan(ConanFile): license = "MIT" url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/iboB/itlib" - topics = ("template", "flatmatp", "static-vector") + topics = ("template", "flatmatp", "static-vector", "header-only") package_type = "header-library" settings = "os", "arch", "compiler", "build_type" no_copy_source = True diff --git a/recipes/itlib/config.yml b/recipes/itlib/config.yml index 09616d2e081cf..5e6bf450f30f7 100644 --- a/recipes/itlib/config.yml +++ b/recipes/itlib/config.yml @@ -1,19 +1,15 @@ versions: - "1.10.3": - folder: all - "1.10.0": - folder: all - "1.9.2": + "1.11.4": folder: all - "1.9.1": + "1.11.3": folder: all - "1.9.0": + "1.11.2": folder: all - "1.8.3": + "1.11.1": folder: all - "1.8.2": + "1.10.3": folder: all - "1.8.1": + "1.10.0": folder: all - "1.8.0": + "1.9.2": folder: all diff --git a/recipes/ixwebsocket/all/conandata.yml b/recipes/ixwebsocket/all/conandata.yml index f9b0b0853afce..7ab18405e8412 100644 --- a/recipes/ixwebsocket/all/conandata.yml +++ b/recipes/ixwebsocket/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "11.4.5": + url: "https://github.com/machinezone/IXWebSocket/archive/refs/tags/v11.4.5.tar.gz" + sha256: "c5fc225edec32bf7d583e55347ef2c9c4940d005c13ef5e848354a85602f5fd6" "11.4.3": url: "https://github.com/machinezone/IXWebSocket/archive/refs/tags/v11.4.3.tar.gz" sha256: "aa2d02c9c71339943cc61eb4efeb2ffc3a5a0011128a67027b9251b7d8a6e0ac" diff --git a/recipes/ixwebsocket/all/conanfile.py b/recipes/ixwebsocket/all/conanfile.py index 839ba03a95e16..1c2ba7acf0e06 100644 --- a/recipes/ixwebsocket/all/conanfile.py +++ b/recipes/ixwebsocket/all/conanfile.py @@ -135,6 +135,7 @@ def package(self): cmake = CMake(self) cmake.install() rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) + rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) def package_info(self): self.cpp_info.set_property("cmake_file_name", "ixwebsocket") diff --git a/recipes/ixwebsocket/config.yml b/recipes/ixwebsocket/config.yml index c72c054440963..876784ab3f633 100644 --- a/recipes/ixwebsocket/config.yml +++ b/recipes/ixwebsocket/config.yml @@ -1,4 +1,6 @@ versions: + "11.4.5": + folder: all "11.4.3": folder: all "11.2.4": diff --git a/recipes/jasper/all/conandata.yml b/recipes/jasper/all/conandata.yml index 0996a2f915ff8..a0a3b5ff5c970 100644 --- a/recipes/jasper/all/conandata.yml +++ b/recipes/jasper/all/conandata.yml @@ -1,39 +1,26 @@ sources: + "4.2.4": + url: "https://github.com/jasper-software/jasper/releases/download/version-4.2.4/jasper-4.2.4.tar.gz" + sha256: "6a597613d8d84c500b5b83bf0eec06cd3707c23d19957f70354ac2394c9914e7" "4.2.0": url: "https://github.com/jasper-software/jasper/releases/download/version-4.2.0/jasper-4.2.0.tar.gz" sha256: "69f0b08a0cc281a06eaf7feed510736854bbff9af89ab1d01b77382ad57ec957" "4.1.2": url: "https://github.com/jasper-software/jasper/releases/download/version-4.1.2/jasper-4.1.2.tar.gz" sha256: "22392e439b87c79aaf8689ec79a286a7147e811c4bee34edf3d0b239798d672b" - "4.1.1": - url: "https://github.com/jasper-software/jasper/releases/download/version-4.1.1/jasper-4.1.1.tar.gz" - sha256: "03ba86823f8798f3f60a5a34e36f3eff9e9cbd76175643a33d4aac7c0390240a" - "4.1.0": - url: "https://github.com/jasper-software/jasper/releases/download/version-4.1.0/jasper-4.1.0.tar.gz" - sha256: "ffe1543d87f7ffc5039d2415afd48c314a7cc0b0c750b4982cd881d6ed4b5743" "4.0.0": url: "https://github.com/jasper-software/jasper/releases/download/version-4.0.0/jasper-4.0.0.tar.gz" sha256: "39514e1b53a5333fcff817e19565371f016ea536c36fd2d13a9c4d8da8f0be0c" - "3.0.6": - url: "https://github.com/jasper-software/jasper/releases/download/version-3.0.6/jasper-3.0.6.tar.gz" - sha256: "169be004d91f6940c649a4f854ada2755d4f35f62b0555ce9e1219c778cffc09" - "2.0.33": - url: "https://github.com/jasper-software/jasper/releases/download/version-2.0.33/jasper-2.0.33.tar.gz" - sha256: "28d28290cc2eaf70c8756d391ed8bcc8ab809a895b9a67ea6e89da23a611801a" patches: - "4.2.0": + "4.2.4": - patch_file: "patches/4.2.0-0003-deterministic-libname.patch" patch_description: "No generator dependent libname" patch_type: "conan" - "4.1.2": - - patch_file: "patches/4.1.1-0001-skip-rpath.patch" - patch_description: "Do not enforce rpath configuration" - patch_source: "https://github.com/jasper-software/jasper/pull/347" - patch_type: "conan" - - patch_file: "patches/4.1.1-0003-deterministic-libname.patch" + "4.2.0": + - patch_file: "patches/4.2.0-0003-deterministic-libname.patch" patch_description: "No generator dependent libname" patch_type: "conan" - "4.1.1": + "4.1.2": - patch_file: "patches/4.1.1-0001-skip-rpath.patch" patch_description: "Do not enforce rpath configuration" patch_source: "https://github.com/jasper-software/jasper/pull/347" @@ -41,14 +28,6 @@ patches: - patch_file: "patches/4.1.1-0003-deterministic-libname.patch" patch_description: "No generator dependent libname" patch_type: "conan" - "4.1.0": - - patch_file: "patches/4.1.0-0001-skip-rpath.patch" - patch_description: "Do not enforce rpath configuration" - patch_source: "https://github.com/jasper-software/jasper/pull/347" - patch_type: "conan" - - patch_file: "patches/4.1.0-0003-deterministic-libname.patch" - patch_description: "No generator dependent libname" - patch_type: "conan" "4.0.0": - patch_file: "patches/4.0.0-0001-skip-rpath.patch" patch_description: "Do not enforce rpath configuration" @@ -57,16 +36,3 @@ patches: - patch_file: "patches/4.0.0-0003-deterministic-libname.patch" patch_description: "No generator dependent libname" patch_type: "conan" - "3.0.6": - - patch_file: "patches/3.0.6-0001-skip-rpath.patch" - patch_description: "Do not enforce rpath configuration" - patch_source: "https://github.com/jasper-software/jasper/pull/347" - patch_type: "conan" - - patch_file: "patches/3.0.6-0003-deterministic-libname.patch" - patch_description: "No generator dependent libname" - patch_type: "conan" - "2.0.33": - - patch_file: "patches/2.0.33-0001-skip-rpath.patch" - patch_description: "Do not enforce rpath configuration" - patch_source: "https://github.com/jasper-software/jasper/pull/347" - patch_type: "conan" diff --git a/recipes/jasper/all/conanfile.py b/recipes/jasper/all/conanfile.py index 29bbcb6c115d7..25cff6caab8e5 100644 --- a/recipes/jasper/all/conanfile.py +++ b/recipes/jasper/all/conanfile.py @@ -65,8 +65,7 @@ def generate(self): VirtualBuildEnv(self).generate() tc = CMakeToolchain(self) - if Version(self.version) >= "4.0.0": - tc.variables["JAS_ENABLE_PIC"] = self.options.get_safe("fPIC", True) + tc.variables["JAS_ENABLE_PIC"] = self.options.get_safe("fPIC", True) tc.variables["JAS_ENABLE_DOC"] = False tc.variables["JAS_ENABLE_LATEX"] = False tc.variables["JAS_ENABLE_PROGRAMS"] = False @@ -74,8 +73,7 @@ def generate(self): tc.variables["JAS_LIBJPEG_REQUIRED"] = "REQUIRED" tc.variables["JAS_ENABLE_LIBJPEG"] = bool(self.options.with_libjpeg) tc.variables["JAS_HAVE_JPEGLIB_H"] = True - if Version(self.version) >= "3.0.0": - tc.variables["JAS_ENABLE_LIBHEIF"] = False + tc.variables["JAS_ENABLE_LIBHEIF"] = False tc.variables["JAS_ENABLE_OPENGL"] = False if cross_building(self): tc.cache_variables["JAS_CROSSCOMPILING"] = True diff --git a/recipes/jasper/all/patches/2.0.33-0001-skip-rpath.patch b/recipes/jasper/all/patches/2.0.33-0001-skip-rpath.patch deleted file mode 100644 index eb9d47cbbb014..0000000000000 --- a/recipes/jasper/all/patches/2.0.33-0001-skip-rpath.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 230d88c..79081c2 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -298,19 +298,15 @@ if (JAS_ENABLE_SHARED) - # (but later on when installing) - set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE) - -- set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib") - - # add the automatically determined parts of the RPATH - # which point to directories outside the build tree to the install RPATH -- set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) - - # The RPATH to be used when installing, but only if it's not a - # system directory - list(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES - "${CMAKE_INSTALL_PREFIX}/lib" isSystemDir) - if("${isSystemDir}" STREQUAL "-1") -- set(CMAKE_INSTALL_RPATH -- "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}") - endif("${isSystemDir}" STREQUAL "-1") - - endif() diff --git a/recipes/jasper/all/patches/3.0.6-0001-skip-rpath.patch b/recipes/jasper/all/patches/3.0.6-0001-skip-rpath.patch deleted file mode 100644 index 959d169bd49ad..0000000000000 --- a/recipes/jasper/all/patches/3.0.6-0001-skip-rpath.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 5cf594c..a0d253d 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -740,19 +740,15 @@ if(JAS_ENABLE_SHARED) - # (but later on when installing) - set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE) - -- set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib") - - # add the automatically determined parts of the RPATH - # which point to directories outside the build tree to the install RPATH -- set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) - - # The RPATH to be used when installing, but only if it's not a - # system directory - list(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES - "${CMAKE_INSTALL_PREFIX}/lib" isSystemDir) - if(isSystemDir EQUAL -1) -- set(CMAKE_INSTALL_RPATH -- "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}") - endif() - endif() - diff --git a/recipes/jasper/all/patches/3.0.6-0003-deterministic-libname.patch b/recipes/jasper/all/patches/3.0.6-0003-deterministic-libname.patch deleted file mode 100644 index 567ff16e021a4..0000000000000 --- a/recipes/jasper/all/patches/3.0.6-0003-deterministic-libname.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -254,7 +254,7 @@ endif() - # If a multiconfiguration generator is used, ensure that various output - # files are not placed in subdirectories (such as Debug and Release) - # as this will cause the CTest test suite to fail. --if(JAS_MULTICONFIGURATION_GENERATOR) -+if(0) - if(CMAKE_CONFIGURATION_TYPES) - set(CMAKE_DEBUG_POSTFIX d) - endif() diff --git a/recipes/jasper/all/patches/4.1.0-0001-skip-rpath.patch b/recipes/jasper/all/patches/4.1.0-0001-skip-rpath.patch deleted file mode 100644 index 9ebb0ac66b98c..0000000000000 --- a/recipes/jasper/all/patches/4.1.0-0001-skip-rpath.patch +++ /dev/null @@ -1,28 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index ba6f117..6b79a94 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -804,19 +804,19 @@ if(JAS_ENABLE_SHARED) - # (but later on when installing) - set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE) - -- set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib") -+# set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib") - - # add the automatically determined parts of the RPATH - # which point to directories outside the build tree to the install RPATH -- set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) -+# set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) - - # The RPATH to be used when installing, but only if it's not a - # system directory - list(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES - "${CMAKE_INSTALL_PREFIX}/lib" isSystemDir) - if(isSystemDir EQUAL -1) -- set(CMAKE_INSTALL_RPATH -- "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}") -+# set(CMAKE_INSTALL_RPATH -+# "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}") - endif() - endif() - diff --git a/recipes/jasper/all/patches/4.1.0-0003-deterministic-libname.patch b/recipes/jasper/all/patches/4.1.0-0003-deterministic-libname.patch deleted file mode 100644 index 0603e4f665033..0000000000000 --- a/recipes/jasper/all/patches/4.1.0-0003-deterministic-libname.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 86eb065..9c2da51 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -274,7 +274,7 @@ endif() - # If a multiconfiguration generator is used, ensure that various output - # files are not placed in subdirectories (such as Debug and Release) - # as this will cause the CTest test suite to fail. --if(JAS_MULTICONFIGURATION_GENERATOR) -+if(0) - set(CMAKE_RUNTIME_OUTPUT_DIRECTORY .) - set(CMAKE_LIBRARY_OUTPUT_DIRECTORY .) - set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY .) diff --git a/recipes/jasper/config.yml b/recipes/jasper/config.yml index 2539649ff499b..7d70ab2a393a0 100644 --- a/recipes/jasper/config.yml +++ b/recipes/jasper/config.yml @@ -1,15 +1,9 @@ versions: + "4.2.4": + folder: all "4.2.0": folder: all "4.1.2": folder: all - "4.1.1": - folder: all - "4.1.0": - folder: all "4.0.0": folder: all - "3.0.6": - folder: all - "2.0.33": - folder: all diff --git a/recipes/jemalloc/all/conanfile.py b/recipes/jemalloc/all/conanfile.py index 7273a9fcaa3fb..6c77bdecc8679 100644 --- a/recipes/jemalloc/all/conanfile.py +++ b/recipes/jemalloc/all/conanfile.py @@ -18,7 +18,8 @@ class JemallocConan(ConanFile): url = "https://github.com/conan-io/conan-center-index" license = "BSD-2-Clause" homepage = "https://jemalloc.net/" - topics = ("conan", "jemalloc", "malloc", "free") + topics = ("jemalloc", "malloc", "free") + package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], @@ -119,10 +120,7 @@ def validate(self): if self.options.enable_cxx and self.settings.compiler.get_safe("libcxx") == "libc++" and \ Version(self.settings.compiler.version) < "10": raise ConanInvalidConfiguration("Clang 9 or earlier with libc++ is not supported due to the missing mutex implementation.") - # 3. Verify the build type - if self.settings.build_type not in ("Release", "Debug", None): - raise ConanInvalidConfiguration("Only Release and Debug builds are supported.") - # 4: Apple Silicon specific checks + # 3: Apple Silicon specific checks if self.settings.os == "Macos" and self.settings.arch == "armv8": if Version(self.version) < "5.3.0": raise ConanInvalidConfiguration("Support for Apple Silicon is only available as of 5.3.0.") diff --git a/recipes/jinja2cpp/all/conandata.yml b/recipes/jinja2cpp/all/conandata.yml index 01898ea7a626a..ef96ec4edd10e 100644 --- a/recipes/jinja2cpp/all/conandata.yml +++ b/recipes/jinja2cpp/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.3.2": + url: "https://github.com/jinja2cpp/Jinja2Cpp/archive/1.3.2.tar.gz" + sha256: "227afb9d16eb1a47c3f3ca10c2f589dd2791c5d8b4767c73e26a0b8997e4c03e" "1.2.1": url: "https://github.com/jinja2cpp/Jinja2Cpp/archive/1.2.1.tar.gz" sha256: "2e61516fd4fd77452c8dd7a6f958ad47c42990df9b7bdc62cf2deb8aa7819b6c" @@ -6,6 +9,10 @@ sources: url: "https://github.com/jinja2cpp/Jinja2Cpp/archive/1.1.0.tar.gz" sha256: "3d321a144f3774702d3a6252e3a6370cdaff9c96d8761d850bb79cdb45b372c5" patches: + "1.3.2": + - patch_file: "patches/fix-cmake-1.3.2.patch" + patch_description: "use cci package, fix compilation error on MSVC" + patch_type: "conan" "1.2.1": - patch_file: "patches/fix-cmake-1.2.1.patch" patch_description: "use cci package, fix compilation error on MSVC" diff --git a/recipes/jinja2cpp/all/conanfile.py b/recipes/jinja2cpp/all/conanfile.py index c95085d906413..a4f69271c3eb5 100644 --- a/recipes/jinja2cpp/all/conanfile.py +++ b/recipes/jinja2cpp/all/conanfile.py @@ -21,10 +21,12 @@ class Jinja2cppConan(ConanFile): options = { "shared": [True, False], "fPIC": [True, False], + "with_regex": ["std", "boost"], } default_options = { "shared": False, "fPIC": True, + "with_regex": "boost", } @property @@ -47,6 +49,8 @@ def export_sources(self): def config_options(self): if self.settings.os == "Windows": del self.options.fPIC + if Version(self.version) < "1.3.2": + del self.options.with_regex def configure(self): if self.options.shared: @@ -76,12 +80,20 @@ def validate(self): raise ConanInvalidConfiguration( f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." ) + if Version(self.version) >= "1.3.1" and self.dependencies["boost"].options.without_json: + raise ConanInvalidConfiguration(f"{self.ref} require Boost::json.") + + def build_requirements(self): + if Version(self.version) >= "1.3.1": + self.tool_requires("cmake/[>=3.23 <4]") def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) def generate(self): tc = CMakeToolchain(self) + if Version(self.version) >= "1.3.2": + tc.cache_variables["JINJA2CPP_USE_REGEX"] = self.options.with_regex tc.variables["JINJA2CPP_BUILD_TESTS"] = False tc.variables["JINJA2CPP_STRICT_WARNINGS"] = False tc.variables["JINJA2CPP_BUILD_SHARED"] = self.options.shared @@ -95,6 +107,7 @@ def generate(self): tc.variables["JINJA2CPP_MSVC_RUNTIME_TYPE"] = runtime tc.generate() deps = CMakeDeps(self) + deps.set_property("expected-lite", "cmake_target_name", "expected-lite::expected-lite") deps.generate() def _patch_sources(self): diff --git a/recipes/jinja2cpp/all/patches/fix-cmake-1.3.2.patch b/recipes/jinja2cpp/all/patches/fix-cmake-1.3.2.patch new file mode 100644 index 0000000000000..0484b48da6ca2 --- /dev/null +++ b/recipes/jinja2cpp/all/patches/fix-cmake-1.3.2.patch @@ -0,0 +1,47 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 4aabcff..9016742 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -312,7 +312,7 @@ if(JINJA2CPP_INSTALL) + InstallTargets + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} +- ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}/static ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + FILE_SET HEADERS + ) + +@@ -353,4 +353,4 @@ if(JINJA2CPP_INSTALL) + DESTINATION + ${JINJA2CPP_INSTALL_CONFIG_DIR} + ) +-endif() +\ No newline at end of file ++endif() +diff --git a/thirdparty/CMakeLists.txt b/thirdparty/CMakeLists.txt +index 57c8f8e..499f3c7 100644 +--- a/thirdparty/CMakeLists.txt ++++ b/thirdparty/CMakeLists.txt +@@ -70,8 +70,8 @@ endif() + + if (NOT DEFINED JINJA2_PRIVATE_LIBS_INT) + set(JINJA2CPP_PRIVATE_LIBS ${JINJA2CPP_PRIVATE_LIBS} +- Boost::variant Boost::filesystem Boost::algorithm Boost::lexical_cast Boost::json +- Boost::regex Boost::numeric_conversion fmt RapidJson) ++ Boost::headers Boost::filesystem Boost::json ++ Boost::regex fmt RapidJson) + else () + set (JINJA2CPP_PRIVATE_LIBS ${JINJA2_PRIVATE_LIBS_INT}) + endif () +diff --git a/thirdparty/thirdparty-conan-build.cmake b/thirdparty/thirdparty-conan-build.cmake +index e1bc3a4..fd30743 100644 +--- a/thirdparty/thirdparty-conan-build.cmake ++++ b/thirdparty/thirdparty-conan-build.cmake +@@ -10,6 +10,6 @@ find_package(Boost COMPONENTS algorithm filesystem numeric_conversion json optio + find_package(fmt REQUIRED) + find_package(RapidJSON REQUIRED) + +-set(JINJA2_PRIVATE_LIBS_INT Boost::headers Boost::filesystem Boost::numeric_conversion) ++set(JINJA2_PRIVATE_LIBS_INT Boost::headers Boost::filesystem) + set(JINJA2_PUBLIC_LIBS_INT Boost::json fmt::fmt rapidjson Boost::regex + nlohmann_json::nlohmann_json nonstd::expected-lite nonstd::variant-lite nonstd::optional-lite nonstd::string-view-lite) diff --git a/recipes/jinja2cpp/config.yml b/recipes/jinja2cpp/config.yml index 97294286ce46b..6f563b16b51e2 100644 --- a/recipes/jinja2cpp/config.yml +++ b/recipes/jinja2cpp/config.yml @@ -1,4 +1,6 @@ versions: + "1.3.2": + folder: all "1.2.1": folder: all "1.1.0": diff --git a/recipes/jnk0le_ringbuffer/all/conandata.yml b/recipes/jnk0le_ringbuffer/all/conandata.yml new file mode 100644 index 0000000000000..e3e3019c5ae04 --- /dev/null +++ b/recipes/jnk0le_ringbuffer/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "cci.20240422": + url: "https://github.com/jnk0le/Ring-Buffer/archive/160190e0c985e0181e728a0b9f321f25ac549f20.tar.gz" + sha256: "9984f0f9c9bc453c3e835a9954e0b1914472e3657086accd5d1345a7c7c28e88" diff --git a/recipes/jnk0le_ringbuffer/all/conanfile.py b/recipes/jnk0le_ringbuffer/all/conanfile.py new file mode 100644 index 0000000000000..473c00193624d --- /dev/null +++ b/recipes/jnk0le_ringbuffer/all/conanfile.py @@ -0,0 +1,48 @@ +from conan import ConanFile +from conan.tools.build import check_min_cppstd +from conan.tools.files import get, copy +from conan.tools.layout import basic_layout +import os + +required_conan_version = ">=1.52.0" + +class RingBufferConan(ConanFile): + name = "jnk0le_ringbuffer" + description = "simple C++11 ring buffer implementation, allocated and evaluated at compile time" + license = "MIT" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/jnk0le/Ring-Buffer" + topics = ("ring buffer", "compile time", "data-structures", "header-only") + package_type = "header-library" + settings = "os", "arch", "compiler", "build_type" + no_copy_source = True + + @property + def _min_cppstd(self): + return 11 + + def layout(self): + basic_layout(self, src_folder="src") + + def package_id(self): + self.info.clear() + + def validate(self): + if self.settings.compiler.get_safe("cppstd"): + check_min_cppstd(self, self._min_cppstd) + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def package(self): + copy(self, pattern="LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) + copy( + self, + pattern="*.hpp", + dst=os.path.join(self.package_folder, "include"), + src=self.source_folder + ) + + def package_info(self): + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] diff --git a/recipes/jnk0le_ringbuffer/all/test_package/CMakeLists.txt b/recipes/jnk0le_ringbuffer/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..75a4d646f54c0 --- /dev/null +++ b/recipes/jnk0le_ringbuffer/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) + +find_package(jnk0le_ringbuffer CONFIG REQUIRED) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE jnk0le_ringbuffer::jnk0le_ringbuffer) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) diff --git a/recipes/jnk0le_ringbuffer/all/test_package/conanfile.py b/recipes/jnk0le_ringbuffer/all/test_package/conanfile.py new file mode 100644 index 0000000000000..3a91c9439218e --- /dev/null +++ b/recipes/jnk0le_ringbuffer/all/test_package/conanfile.py @@ -0,0 +1,26 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def layout(self): + cmake_layout(self) + + def requirements(self): + self.requires(self.tested_reference_str) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/jnk0le_ringbuffer/all/test_package/test_package.cpp b/recipes/jnk0le_ringbuffer/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..63ad1c8b9609b --- /dev/null +++ b/recipes/jnk0le_ringbuffer/all/test_package/test_package.cpp @@ -0,0 +1,14 @@ +#include + +int main() { + // older gcc(4.9, 5.3) has a bug for alignas(0) + // https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69089 + jnk0le::Ringbuffer message; + + message.insert("Hello world"); + + const char* tmp = nullptr; + message.remove(tmp); + + return 0; +} diff --git a/recipes/jnk0le_ringbuffer/config.yml b/recipes/jnk0le_ringbuffer/config.yml new file mode 100644 index 0000000000000..2dbea38f25622 --- /dev/null +++ b/recipes/jnk0le_ringbuffer/config.yml @@ -0,0 +1,3 @@ +versions: + "cci.20240422": + folder: all diff --git a/recipes/jpeg-compressor/all/test_package/conanfile.py b/recipes/jpeg-compressor/all/test_package/conanfile.py index ea70607af0172..0a6bc68712d90 100644 --- a/recipes/jpeg-compressor/all/test_package/conanfile.py +++ b/recipes/jpeg-compressor/all/test_package/conanfile.py @@ -23,5 +23,4 @@ def build(self): def test(self): if can_run(self): bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") - img_path = os.path.join(self.source_folder, "testimg.jpg") - self.run(f"{bin_path} {img_path}", env="conanrun") + self.run(bin_path, env="conanrun") diff --git a/recipes/jpeg-compressor/all/test_package/test_package.cpp b/recipes/jpeg-compressor/all/test_package/test_package.cpp index ef3f49c1a1fba..956e76e45a8b0 100644 --- a/recipes/jpeg-compressor/all/test_package/test_package.cpp +++ b/recipes/jpeg-compressor/all/test_package/test_package.cpp @@ -5,29 +5,21 @@ int main(int argc, const char* argv[]) { - if (argc < 2) { - std::cerr << "Need at least one argument" << std::endl; - return 1; - } - - const char* pSrc_filename = argv[1]; + const char* pSrc_filename = "non-real-file.jpg"; const int req_comps = 4; int width = 0, height = 0, actual_comps = 0; uint8_t* pImage_data = jpgd::decompress_jpeg_image_from_file(pSrc_filename, &width, &height, &actual_comps, req_comps); if (!pImage_data) { - std::cerr << "Failed loading file " << pSrc_filename << std::endl; - return EXIT_FAILURE; + std::cerr << "Test jpgd function" << std::endl;// Always displayed } int buf_size = width * height * 3; - if (buf_size < 1024) buf_size = 1024; void* pBuf = malloc(buf_size); if (!jpge::compress_image_to_jpeg_file_in_memory(pBuf, buf_size, width, height, req_comps, pImage_data)) { - std::cerr << "Failed creating JPEG data" << std::endl; - return EXIT_FAILURE; + std::cerr << "Test jpge function" << std::endl;// Always displayed } free(pBuf); diff --git a/recipes/jpeg-compressor/all/test_package/testimg.jpg b/recipes/jpeg-compressor/all/test_package/testimg.jpg deleted file mode 100644 index a026e486f57de..0000000000000 Binary files a/recipes/jpeg-compressor/all/test_package/testimg.jpg and /dev/null differ diff --git a/recipes/jpeg-compressor/all/test_v1_package/conanfile.py b/recipes/jpeg-compressor/all/test_v1_package/conanfile.py index ff285a92f9ca9..38f4483872d47 100644 --- a/recipes/jpeg-compressor/all/test_v1_package/conanfile.py +++ b/recipes/jpeg-compressor/all/test_v1_package/conanfile.py @@ -14,5 +14,4 @@ def build(self): def test(self): if not tools.cross_building(self): bin_path = os.path.join("bin", "test_package") - img_path = os.path.join(self.source_folder, os.pardir, "test_package", "testimg.jpg") - self.run(f"{bin_path} {img_path}", run_environment=True) + self.run(bin_path, run_environment=True) diff --git a/recipes/jsbsim/all/conanfile.py b/recipes/jsbsim/all/conanfile.py index 3d180281b5649..048e4a19a18e0 100644 --- a/recipes/jsbsim/all/conanfile.py +++ b/recipes/jsbsim/all/conanfile.py @@ -48,7 +48,7 @@ def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - self.requires("expat/2.5.0") + self.requires("expat/[>=2.6.2 <3]") def validate(self): if self.settings.compiler.get_safe("cppstd"): diff --git a/recipes/json-c/all/conandata.yml b/recipes/json-c/all/conandata.yml index a27364e09b956..71904777ad4e0 100644 --- a/recipes/json-c/all/conandata.yml +++ b/recipes/json-c/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.18": + url: "https://github.com/json-c/json-c/archive/json-c-0.18-20240915.tar.gz" + sha256: "3112c1f25d39eca661fe3fc663431e130cc6e2f900c081738317fba49d29e298" "0.17": url: "https://github.com/json-c/json-c/archive/json-c-0.17-20230812.tar.gz" sha256: "024d302a3aadcbf9f78735320a6d5aedf8b77876c8ac8bbb95081ca55054c7eb" diff --git a/recipes/json-c/all/conanfile.py b/recipes/json-c/all/conanfile.py index 222938814d365..20358585918dc 100644 --- a/recipes/json-c/all/conanfile.py +++ b/recipes/json-c/all/conanfile.py @@ -1,6 +1,6 @@ from conan import ConanFile from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout -from conan.tools.files import collect_libs, copy, get, rmdir +from conan.tools.files import copy, get, rmdir from conan.tools.scm import Version import os @@ -9,13 +9,13 @@ class JSONCConan(ConanFile): name = "json-c" - package_type = "library" - description = "JSON-C - A JSON implementation in C" - topics = ("json", "encoding", "decoding", "manipulation") + description = "A JSON implementation in C" + license = "MIT" url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/json-c/json-c" - license = "MIT" + topics = ("json", "encoding", "decoding", "manipulation") + package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], @@ -64,8 +64,12 @@ def package(self): rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) def package_info(self): + self.cpp_info.libs = ["json-c"] + self.cpp_info.set_property("cmake_file_name", "json-c") self.cpp_info.set_property("cmake_target_name", "json-c::json-c") self.cpp_info.set_property("pkg_config_name", "json-c") - self.cpp_info.libs = collect_libs(self) - self.cpp_info.includedirs = ["include", "include/json-c"] + self.cpp_info.includedirs = ["include", os.path.join("include", "json-c")] + + if Version(self.version) >= "0.17" and self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.system_libs.extend(["m",]) diff --git a/recipes/json-c/config.yml b/recipes/json-c/config.yml index 301a8d09f5b3a..0a8630e20d06f 100644 --- a/recipes/json-c/config.yml +++ b/recipes/json-c/config.yml @@ -1,4 +1,6 @@ versions: + "0.18": + folder: all "0.17": folder: all "0.16": diff --git a/recipes/json_dto/all/conandata.yml b/recipes/json_dto/all/conandata.yml index fd921713e43f5..504fe8367f255 100644 --- a/recipes/json_dto/all/conandata.yml +++ b/recipes/json_dto/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.3.4": + url: "https://github.com/Stiffstream/json_dto/archive/refs/tags/v.0.3.4.tar.gz" + sha256: "1b9595dbd86fa90edf621b72f5f4dac43170339250e9e650ede5269ff6fa3f2e" "0.3.3": url: "https://github.com/Stiffstream/json_dto/archive/refs/tags/v.0.3.3.tar.gz" sha256: "c52857c074f4e204426a52160e2699694c45bb93e9297ca535e2d5fdf54ae187" diff --git a/recipes/json_dto/all/conanfile.py b/recipes/json_dto/all/conanfile.py index df618397bce1c..ce69026f02b64 100644 --- a/recipes/json_dto/all/conanfile.py +++ b/recipes/json_dto/all/conanfile.py @@ -12,13 +12,13 @@ class JsonDtoConan(ConanFile): name = "json_dto" + description = "A small header-only helper for converting data between json representation and c++ structs" license = "BSD-3-Clause" - homepage = "https://github.com/Stiffstream/json_dto" url = "https://github.com/conan-io/conan-center-index" - description = "A small header-only helper for converting data between json representation and c++ structs" - topics = ("json", "dto", "serialization") + homepage = "https://github.com/Stiffstream/json_dto" + topics = ("json", "dto", "serialization", "header-only") package_type = "header-library" - settings = "os", "compiler", "build_type", "arch" + settings = "os", "arch", "compiler", "build_type" no_copy_source = True @property diff --git a/recipes/json_dto/config.yml b/recipes/json_dto/config.yml index 9421431ffbd78..78d5c217becaf 100644 --- a/recipes/json_dto/config.yml +++ b/recipes/json_dto/config.yml @@ -1,4 +1,6 @@ versions: + "0.3.4": + folder: all "0.3.3": folder: all "0.3.2": diff --git a/recipes/jsoncons/all/conandata.yml b/recipes/jsoncons/all/conandata.yml index 7d2ea6ccc163d..fa96f6778d1c7 100644 --- a/recipes/jsoncons/all/conandata.yml +++ b/recipes/jsoncons/all/conandata.yml @@ -1,4 +1,19 @@ sources: + "0.178.0": + url: "https://github.com/danielaparker/jsoncons/archive/refs/tags/v0.178.0.tar.gz" + sha256: "c531b4288bb08c9c2b36fba53f568bc800e93656830bcffc18a87a3af1f46290" + "0.177.0": + url: "https://github.com/danielaparker/jsoncons/archive/refs/tags/v0.177.0.tar.gz" + sha256: "a381d58489f143a3a515484f4ad6e32ae4d977033e1a455fecf8cdc4e2c9a49e" + "0.176.0": + url: "https://github.com/danielaparker/jsoncons/archive/refs/tags/v0.176.0.tar.gz" + sha256: "2eb50b5cbe204265fef96c052511ed6e3b8808935c6e2c8d28e0aba7b08fda33" + "0.175.0": + url: "https://github.com/danielaparker/jsoncons/archive/refs/tags/v0.175.0.tar.gz" + sha256: "7f8a04cfd25a73d2ba2283be8eb98a39780df1e90600d8c75ddf19d52bd2c2c9" + "0.174.0": + url: "https://github.com/danielaparker/jsoncons/archive/refs/tags/v0.174.0.tar.gz" + sha256: "60507721a26c752c71fbb228568f7944ea3fd287e9b179a9128ca32d7ddbb386" "0.173.4": url: "https://github.com/danielaparker/jsoncons/archive/refs/tags/v0.173.4.tar.gz" sha256: "3e3525325c88b33f15af2e1f3cf7a1893a49e47aa787a2df723a098b3a4b20b1" diff --git a/recipes/jsoncons/config.yml b/recipes/jsoncons/config.yml index 89bdd7665089f..bfd0d8f2ead05 100644 --- a/recipes/jsoncons/config.yml +++ b/recipes/jsoncons/config.yml @@ -1,4 +1,14 @@ versions: + "0.178.0": + folder: "all" + "0.177.0": + folder: "all" + "0.176.0": + folder: "all" + "0.175.0": + folder: "all" + "0.174.0": + folder: "all" "0.173.4": folder: "all" "0.173.3": diff --git a/recipes/jsoncpp/all/conandata.yml b/recipes/jsoncpp/all/conandata.yml index b5b4f5372dd99..8973aaac6a3fe 100644 --- a/recipes/jsoncpp/all/conandata.yml +++ b/recipes/jsoncpp/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.9.6": + url: https://github.com/open-source-parsers/jsoncpp/archive/1.9.6.tar.gz + sha256: f93b6dd7ce796b13d02c108bc9f79812245a82e577581c4c9aabe57075c90ea2 "1.9.5": url: https://github.com/open-source-parsers/jsoncpp/archive/1.9.5.tar.gz sha256: f409856e5920c18d0c2fb85276e24ee607d2a09b5e7d5f0a371368903c275da2 diff --git a/recipes/jsoncpp/all/conanfile.py b/recipes/jsoncpp/all/conanfile.py index 1354ccb9d1943..dc347bac0be0d 100644 --- a/recipes/jsoncpp/all/conanfile.py +++ b/recipes/jsoncpp/all/conanfile.py @@ -11,12 +11,12 @@ class JsoncppConan(ConanFile): name = "jsoncpp" + description = "A C++ library for interacting with JSON." license = "MIT" - homepage = "https://github.com/open-source-parsers/jsoncpp" url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/open-source-parsers/jsoncpp" topics = ("json", "parser", "config") - description = "A C++ library for interacting with JSON." - + package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], diff --git a/recipes/jsoncpp/config.yml b/recipes/jsoncpp/config.yml index e11b41080c02a..f4837dd548b8a 100644 --- a/recipes/jsoncpp/config.yml +++ b/recipes/jsoncpp/config.yml @@ -1,4 +1,6 @@ versions: + "1.9.6": + folder: all "1.9.5": folder: all "1.9.4": diff --git a/recipes/jsonifier/all/conandata.yml b/recipes/jsonifier/all/conandata.yml new file mode 100644 index 0000000000000..d326552c7b2a5 --- /dev/null +++ b/recipes/jsonifier/all/conandata.yml @@ -0,0 +1,10 @@ +sources: + "0.9.97": + url: "https://github.com/RealTimeChris/Jsonifier/archive/refs/tags/v0.9.97.tar.gz" + sha256: "68828c982a994862b02bcee562ee4e6d7cc461013ac3d4dcb98c0f1581049924" + "0.9.96": + url: "https://github.com/RealTimeChris/Jsonifier/archive/refs/tags/v0.9.96.tar.gz" + sha256: "9f2658282f53680be0121091adacc8f82b2de5b95c31bc6eadb98802c0aa59f0" + "0.9.95": + url: "https://github.com/RealTimeChris/Jsonifier/archive/refs/tags/v0.9.95.tar.gz" + sha256: "4db5fd2c4ae77bbd13e4f80fcc255edb39835cb5cf00d33468cb957af04d933b" diff --git a/recipes/jsonifier/all/conanfile.py b/recipes/jsonifier/all/conanfile.py new file mode 100644 index 0000000000000..5dcf12ea3c5b0 --- /dev/null +++ b/recipes/jsonifier/all/conanfile.py @@ -0,0 +1,72 @@ +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.files import get, copy, rmdir +from conan.tools.build import check_min_cppstd +from conan.tools.scm import Version +from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout +import os + + +required_conan_version = ">=1.53.0" + +class JsonifierConan(ConanFile): + name = "jsonifier" + description = "A few classes for parsing and serializing objects from/into JSON - very rapidly." + license = "MIT" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/RealTimeChris/Jsonifier" + topics = ("serialization", "json", "simd", "parswer", "header-only") + package_type = "header-library" + settings = "os", "arch", "compiler", "build_type" + no_copy_source = True + + @property + def _min_cppstd(self): + return 20 + + @property + def _compilers_minimum_version(self): + return { + "gcc": "12", + "clang": "17", + "apple-clang": "14", + "Visual Studio": "17", + "msvc": "193", + } + + def layout(self): + cmake_layout(self, src_folder="src") + + def package_id(self): + self.info.clear() + + def validate(self): + if self.settings.compiler.get_safe("cppstd"): + check_min_cppstd(self, self._min_cppstd) + minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) + if minimum_version and Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration( + f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." + ) + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + tc.generate() + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def package(self): + copy(self, pattern="License.md", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) + cmake = CMake(self) + cmake.install() + rmdir(self, os.path.join(self.package_folder, "share")) + + def package_info(self): + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] diff --git a/recipes/jsonifier/all/test_package/CMakeLists.txt b/recipes/jsonifier/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..386a7df4b60c0 --- /dev/null +++ b/recipes/jsonifier/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) + +project(test_package LANGUAGES CXX) +find_package(jsonifier REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE jsonifier::jsonifier) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_20) diff --git a/recipes/jsonifier/all/test_package/conanfile.py b/recipes/jsonifier/all/test_package/conanfile.py new file mode 100644 index 0000000000000..ef5d7042163ec --- /dev/null +++ b/recipes/jsonifier/all/test_package/conanfile.py @@ -0,0 +1,26 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/jsonifier/all/test_package/test_package.cpp b/recipes/jsonifier/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..21035cf3ed4c1 --- /dev/null +++ b/recipes/jsonifier/all/test_package/test_package.cpp @@ -0,0 +1,25 @@ +#include +#include + +#include "jsonifier/Index.hpp" + +struct MyObject { + std::string name; + int age; +}; + +template<> struct jsonifier::core { + using value_type = MyObject; + static constexpr auto parseValue = createValue("name", &value_type::name, "age", &value_type::age); +}; + +int main() { + MyObject obj("John", 30); + jsonifier::jsonifier_core jsonifier{}; + std::string jsonBuffer{}; + jsonifier.serializeJson(obj, jsonBuffer); + + std::cout << jsonBuffer << std::endl; + + return 0; +} diff --git a/recipes/jsonifier/config.yml b/recipes/jsonifier/config.yml new file mode 100644 index 0000000000000..f8a1d2a6df61b --- /dev/null +++ b/recipes/jsonifier/config.yml @@ -0,0 +1,7 @@ +versions: + "0.9.97": + folder: all + "0.9.96": + folder: all + "0.9.95": + folder: all diff --git a/recipes/jwt-cpp/all/conanfile.py b/recipes/jwt-cpp/all/conanfile.py index 1e09b3d6625c7..9a7ee532d7797 100644 --- a/recipes/jwt-cpp/all/conanfile.py +++ b/recipes/jwt-cpp/all/conanfile.py @@ -16,9 +16,12 @@ class JwtCppConan(ConanFile): package_type = "header-library" settings = "os", "arch", "compiler", "build_type" + options = { "with_picojson": [True, False] } + default_options = { "with_picojson" : False } + @property - def _supports_generic_json(self): - return Version(self.version) >= "0.5.0" + def _with_picojson(self): + return Version(self.version) < "0.5.0" or self.options.with_picojson def export_sources(self): export_conandata_patches(self) @@ -28,7 +31,7 @@ def layout(self): def requirements(self): self.requires("openssl/[>=1.1 <4]") - if not self._supports_generic_json: + if self._with_picojson: self.requires("picojson/1.3.0") def package_id(self): @@ -48,9 +51,11 @@ def package(self): def package_info(self): self.cpp_info.bindirs = [] self.cpp_info.libdirs = [] - + self.cpp_info.requires = ["openssl::openssl"] + if self._with_picojson: + self.cpp_info.requires.append("picojson::picojson") + else: + self.cpp_info.defines.append("JWT_DISABLE_PICOJSON") self.cpp_info.set_property("cmake_file_name", "jwt-cpp") self.cpp_info.set_property("cmake_target_name", "jwt-cpp::jwt-cpp") - if self._supports_generic_json: - self.cpp_info.defines.append("JWT_DISABLE_PICOJSON") diff --git a/recipes/jxrlib/all/test_package/conanfile.py b/recipes/jxrlib/all/test_package/conanfile.py index b8d2e695e4b3a..0a6bc68712d90 100644 --- a/recipes/jxrlib/all/test_package/conanfile.py +++ b/recipes/jxrlib/all/test_package/conanfile.py @@ -23,5 +23,4 @@ def build(self): def test(self): if can_run(self): bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") - img_path = os.path.join(self.source_folder, "test.jxr") - self.run(f"{bin_path} {img_path}", env="conanrun") + self.run(bin_path, env="conanrun") diff --git a/recipes/jxrlib/all/test_package/test.jxr b/recipes/jxrlib/all/test_package/test.jxr deleted file mode 100644 index 4f66a2e27671a..0000000000000 Binary files a/recipes/jxrlib/all/test_package/test.jxr and /dev/null differ diff --git a/recipes/jxrlib/all/test_package/test_package.c b/recipes/jxrlib/all/test_package/test_package.c index 122b6c2fd1cc3..03492cea6383f 100644 --- a/recipes/jxrlib/all/test_package/test_package.c +++ b/recipes/jxrlib/all/test_package/test_package.c @@ -4,28 +4,14 @@ int main(int argc, char* argv[]) { - if (argc < 2) { - fprintf(stderr, "Need at least one argument\n"); - return 1; - } - - const char *jxr_path = argv[1]; - - { - ERR err = WMP_errSuccess; - - PKCodecFactory* pCodecFactory = NULL; - PKImageDecode* pDecoder = NULL; - - Call(PKCreateCodecFactory(&pCodecFactory, WMP_SDK_VERSION)); - Call(pCodecFactory->CreateDecoderFromFile(jxr_path, &pDecoder)); + ERR err = WMP_errSuccess; + PKCodecFactory* pCodecFactory = NULL; - PKPixelFormatGUID pix_frmt; - Call(pDecoder->GetPixelFormat(pDecoder, &pix_frmt)); + Call(PKCreateCodecFactory(&pCodecFactory, WMP_SDK_VERSION)); Cleanup: - if(pDecoder) pDecoder->Release(&pDecoder); - if(pCodecFactory) pCodecFactory->Release(&pCodecFactory); + if(pCodecFactory) { + pCodecFactory->Release(&pCodecFactory); } return 0; diff --git a/recipes/jxrlib/all/test_v1_package/conanfile.py b/recipes/jxrlib/all/test_v1_package/conanfile.py index ffd0b1c74921b..38f4483872d47 100644 --- a/recipes/jxrlib/all/test_v1_package/conanfile.py +++ b/recipes/jxrlib/all/test_v1_package/conanfile.py @@ -14,5 +14,4 @@ def build(self): def test(self): if not tools.cross_building(self): bin_path = os.path.join("bin", "test_package") - img_path = os.path.join(self.source_folder, os.pardir, "test_package", "test.jxr") - self.run(f"{bin_path} {img_path}", run_environment=True) + self.run(bin_path, run_environment=True) diff --git a/recipes/kangaru/all/conandata.yml b/recipes/kangaru/all/conandata.yml index 5c977f020a27d..996d16a86895e 100644 --- a/recipes/kangaru/all/conandata.yml +++ b/recipes/kangaru/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "4.3.2": + url: "https://github.com/gracicot/kangaru/archive/v4.3.2.tar.gz" + sha256: "ed2dec53087fe4c5fbfc7f7ffcb0e963b3e0a7f27699338c4bc5a116193113b8" "4.3.1": url: "https://github.com/gracicot/kangaru/archive/v4.3.1.tar.gz" sha256: "3896ea2a13cc1c220b4d83bf598e27e77004170b4a212af8f14264f8a6fb0e45" @@ -11,3 +14,6 @@ sources: patches: "4.2.4": - patch_file: "patches/fix-cmake.patch" + patch_description: "use CURRENT macros for portability" + patch_type: "portability" + patch_source: "https://github.com/gracicot/kangaru/commit/3908d927c43c1a9c99daaef6eca12d55dd0dcc79" diff --git a/recipes/kangaru/all/conanfile.py b/recipes/kangaru/all/conanfile.py index b9d9319294b90..3e901d2203121 100644 --- a/recipes/kangaru/all/conanfile.py +++ b/recipes/kangaru/all/conanfile.py @@ -12,9 +12,9 @@ class KangaruConan(ConanFile): name = "kangaru" description = "A dependency injection container for C++11, C++14 and later" license = "MIT" - topics = ("DI", "IoC", "inversion of control") - homepage = "https://github.com/gracicot/kangaru/wiki" url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/gracicot/kangaru/wiki" + topics = ("DI", "IoC", "inversion of control", "header-only") package_type = "header-library" settings = "os", "arch", "compiler", "build_type" diff --git a/recipes/kangaru/config.yml b/recipes/kangaru/config.yml index a57d047923a8a..572d8f5785b54 100644 --- a/recipes/kangaru/config.yml +++ b/recipes/kangaru/config.yml @@ -1,4 +1,6 @@ versions: + "4.3.2": + folder: all "4.3.1": folder: all "4.3.0": diff --git a/recipes/kcov/all/CMakeLists.txt b/recipes/kcov/all/CMakeLists.txt deleted file mode 100644 index a69305eb3971f..0000000000000 --- a/recipes/kcov/all/CMakeLists.txt +++ /dev/null @@ -1,7 +0,0 @@ -cmake_minimum_required(VERSION 2.8.12) -project(cmake_wrapper) - -include(conanbuildinfo.cmake) -conan_basic_setup() - -add_subdirectory(source_subfolder) diff --git a/recipes/kcov/all/conan_deps.cmake b/recipes/kcov/all/conan_deps.cmake new file mode 100644 index 0000000000000..47c0823a35eb3 --- /dev/null +++ b/recipes/kcov/all/conan_deps.cmake @@ -0,0 +1,34 @@ +# Wrapper for find_package() that also adds upper-case variables and allows only Conan packages +macro(custom_find_package name) + find_package(${name} ${ARGN} CONFIG + # Allow only Conan packages + NO_DEFAULT_PATH + PATHS ${CMAKE_PREFIX_PATH} + ) + string(TOUPPER ${name} name_upper) + set(${name_upper}_FOUND TRUE) + set(${name_upper}_VERSION_STRING ${${name}_VERSION_STRING}) + set(${name_upper}_INCLUDE_DIRS ${${name}_INCLUDE_DIRS}) + set(${name_upper}_INCLUDE_DIR ${${name}_INCLUDE_DIR}) + set(${name_upper}_LIBRARIES ${${name}_LIBRARIES}) + set(${name_upper}_DEFINITIONS ${${name}_DEFINITIONS}) + unset(name_upper) +endmacro() + +custom_find_package(Bfd) +custom_find_package(ZLIB REQUIRED) +custom_find_package(CURL REQUIRED) + +if(APPLE) + custom_find_package(Dwarfutils REQUIRED) + set(dwarfutils_FOUND TRUE) +else() + custom_find_package(ElfUtils REQUIRED) + set(Elfutils_FOUND TRUE) + # ElfUtils also provides LibElf + set(LibElf_FOUND TRUE) + set(LIBELF_FOUND TRUE) + set(LIBELF_INCLUDE_DIRS ${ElfUtils_INCLUDE_DIRS}) + set(LIBELF_LIBRARIES ${ElfUtils_LIBRARIES}) + set(LIBELF_DEFINITIONS ${ElfUtils_DEFINITIONS}) +endif() diff --git a/recipes/kcov/all/conandata.yml b/recipes/kcov/all/conandata.yml index b98fb5f6098f5..972457056a28e 100644 --- a/recipes/kcov/all/conandata.yml +++ b/recipes/kcov/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "42": + url: "https://github.com/SimonKagstrom/kcov/archive/refs/tags/v42.tar.gz" + sha256: "2c47d75397af248bc387f60cdd79180763e1f88f3dd71c94bb52478f8e74a1f8" "40": url: "https://github.com/SimonKagstrom/kcov/archive/refs/tags/v40.tar.gz" sha256: "6b1c11b066d57426d61375a31c3816f1fcd2610b447050c86d9920e22d5200b3" @@ -6,9 +9,14 @@ sources: url: "https://github.com/SimonKagstrom/kcov/archive/38.tar.gz" sha256: "b37af60d81a9b1e3b140f9473bdcb7975af12040feb24cc666f9bb2bb0be68b4" patches: - "40": [] + "42": + - patch_file: "patches/0003-fix-missing-include.patch" + patch_description: "Add a missing includes on macOS" + patch_type: "backport" + patch_source: "https://github.com/SimonKagstrom/kcov/commit/4efe5e4a4ac4e7b6d99fc869d826aa74ff716ebf" + - patch_file: "patches/0004-fix-libdwarf-prefix.patch" + patch_description: "Adjust libdwarf include to match CCI includedirs" + patch_type: "conan" "38": - patch_file: "patches/0001-fix-SOLIB-path.patch" - base_path: "source_subfolder" - patch_file: "patches/0002-fix-missing-libssl-dependency.patch" - base_path: "source_subfolder" diff --git a/recipes/kcov/all/conanfile.py b/recipes/kcov/all/conanfile.py index 563b33b2f010e..ccb250afff541 100644 --- a/recipes/kcov/all/conanfile.py +++ b/recipes/kcov/all/conanfile.py @@ -1,63 +1,98 @@ import os + from conan import ConanFile -from conans import CMake, tools -from conans.errors import ConanInvalidConfiguration +from conan.errors import ConanInvalidConfiguration +from conan.tools.apple import is_apple_os +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rmdir, rm +from conan.tools.scm import Version + +required_conan_version = ">=1.53.0" + class KcovConan(ConanFile): name = "kcov" + description = ( + "Code coverage tool for compiled programs, Python and Bash which uses " + "debugging information to collect and report data without special compilation options" + ) license = "GPL-2.0" - url = "https://github.com/conan-io/conan-center-index/" + url = "https://github.com/conan-io/conan-center-index" homepage = "http://simonkagstrom.github.io/kcov/index.html" - description = "Code coverage tool for compiled programs, Python and Bash\ - which uses debugging information to collect and report data without\ - special compilation options" topics = ("coverage", "linux", "debug") - settings = "os", "compiler", "build_type", "arch" - exports_sources = "CMakeLists.txt", "patches/**" - requires = ["zlib/1.2.12", - "libiberty/9.1.0", - "libcurl/7.83.1", - "elfutils/0.180"] - generators = "cmake" - _cmake = None - _source_subfolder = "source_subfolder" - _build_subfolder = "build_subfolder" - - def configure(self): + + package_type = "application" + settings = "os", "arch", "compiler", "build_type" + + def export_sources(self): + export_conandata_patches(self) + copy(self, "conan_deps.cmake", self.recipe_folder, os.path.join(self.export_sources_folder, "src")) + + def layout(self): + cmake_layout(self, src_folder="src") + + def requirements(self): + self.requires("zlib/[>=1.2.11 <2]") + self.requires("libcurl/[>=7.78 <9]") + self.requires("openssl/[>=1.1 <4]") + if is_apple_os(self): + self.requires("libdwarf/0.8.0") + else: + self.requires("elfutils/0.190") + + def package_id(self): + del self.info.settings.compiler + del self.info.settings.build_type + + def validate(self): if self.settings.os == "Windows": - raise ConanInvalidConfiguration( - "kcov can not be built on windows.") + raise ConanInvalidConfiguration("kcov can not be built on windows.") + if is_apple_os(self): + if Version(self.version) < 42: + # MachO support was added in v42 + raise ConanInvalidConfiguration(f"{self.ref} does not support {self.settings.os}.") + if self.settings.arch == "armv8": + # https://github.com/SimonKagstrom/kcov/blob/v42/cmake/TargetArch.cmake + raise ConanInvalidConfiguration(f"{self.ref} does not support {self.settings.arch}.") def source(self): - tools.get(**self.conan_data["sources"][self.version]) - extracted_dir = self.name + "-" + self.version - os.rename(extracted_dir, self._source_subfolder) + get(self, **self.conan_data["sources"][self.version], strip_root=True) - def _patch_sources(self): - for patch in self.conan_data["patches"][self.version]: - tools.patch(**patch) + def generate(self): + tc = CMakeToolchain(self) + tc.variables["CMAKE_PROJECT_kcov_INCLUDE"] = "conan_deps.cmake" + tc.generate() + deps = CMakeDeps(self) + # Match Find*.cmake module names used by the project + deps.set_property("libbfd", "cmake_file_name", "Bfd") + deps.set_property("libdwarf", "cmake_file_name", "Dwarfutils") + deps.set_property("elfutils", "cmake_file_name", "ElfUtils") + deps.set_property("libcrpcut", "cmake_file_name", "LibCRPCUT") + deps.generate() - def _configure_cmake(self): - if self._cmake is not None: - return self._cmake - self._cmake = CMake(self) - self._cmake.configure(build_folder=self._build_subfolder) - return self._cmake + def _patch_sources(self): + apply_conandata_patches(self) + # Disable project Find*.cmake modules just in case + rm(self, "Find*.cmake", os.path.join(self.source_folder, "cmake")) def build(self): self._patch_sources() - cmake = self._configure_cmake() + cmake = CMake(self) + cmake.configure() cmake.build() def package(self): - cmake = self._configure_cmake() + copy(self, "COPYING*", self.source_folder, os.path.join(self.package_folder, "licenses")) + cmake = CMake(self) cmake.install() - tools.rmdir(os.path.join(self.package_folder, "share")) - self.copy("COPYING*", dst="licenses", src=self._source_subfolder) + rmdir(self, os.path.join(self.package_folder, "share")) def package_info(self): + self.cpp_info.includedirs = [] + self.cpp_info.frameworkdirs = [] + self.cpp_info.libdirs = [] + self.cpp_info.resdirs = [] + + # TODO: to remove in conan v2 bindir = os.path.join(self.package_folder, "bin") - self.output.info("Appending PATH environment variable: {}" - .format(bindir)) self.env_info.PATH.append(bindir) - self.cpp_info.includedirs = [] diff --git a/recipes/kcov/all/patches/0003-fix-missing-include.patch b/recipes/kcov/all/patches/0003-fix-missing-include.patch new file mode 100644 index 0000000000000..49167148ac3b4 --- /dev/null +++ b/recipes/kcov/all/patches/0003-fix-missing-include.patch @@ -0,0 +1,20 @@ +Use updated includes from master to fix a missing and +https://github.com/SimonKagstrom/kcov/blob/1d036f7799f95fed025c5fa0665c19df38632ab4/src/engines/mach-engine.cc + +--- src/engines/mach-engine.cc ++++ src/engines/mach-engine.cc +@@ -26,7 +26,14 @@ + #include + #include + #include ++#include ++// clang-format off ++// sys/ptrace.h needs sys/types.h, so make sure clang-format doesn't change the order ++#include + #include ++// clang-format on ++#include ++#include + #include + #include + #include diff --git a/recipes/kcov/all/patches/0004-fix-libdwarf-prefix.patch b/recipes/kcov/all/patches/0004-fix-libdwarf-prefix.patch new file mode 100644 index 0000000000000..3c5509fce924d --- /dev/null +++ b/recipes/kcov/all/patches/0004-fix-libdwarf-prefix.patch @@ -0,0 +1,18 @@ +FIXME: update libdwarf instead + +--- src/parsers/macho-parser.cc ++++ src/parsers/macho-parser.cc +@@ -6,11 +6,11 @@ + */ + #include + #include +-#include ++#include + #include + #include + #include +-#include ++#include + #include + #include + #include diff --git a/recipes/kcov/all/test_package/conanfile.py b/recipes/kcov/all/test_package/conanfile.py index ea5ad0c50ed3e..9808e9680a682 100644 --- a/recipes/kcov/all/test_package/conanfile.py +++ b/recipes/kcov/all/test_package/conanfile.py @@ -1,9 +1,19 @@ -from conans import ConanFile, tools +from conan import ConanFile +from conan.tools.cmake import cmake_layout +from conan.tools.build import can_run -class KcovTestConan(ConanFile): - settings = "os", "compiler", "build_type", "arch" +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) def test(self): - if not tools.cross_building(self.settings): - self.run("kcov --version", run_environment=True) + if can_run(self): + self.run("kcov --version", env="conanrun") diff --git a/recipes/kcov/all/test_v1_package/conanfile.py b/recipes/kcov/all/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..ea5ad0c50ed3e --- /dev/null +++ b/recipes/kcov/all/test_v1_package/conanfile.py @@ -0,0 +1,9 @@ +from conans import ConanFile, tools + + +class KcovTestConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + + def test(self): + if not tools.cross_building(self.settings): + self.run("kcov --version", run_environment=True) diff --git a/recipes/kcov/config.yml b/recipes/kcov/config.yml index b36ca0e497b00..97b2691d28e3b 100644 --- a/recipes/kcov/config.yml +++ b/recipes/kcov/config.yml @@ -1,4 +1,6 @@ versions: + "42": + folder: all "40": folder: all "38": diff --git a/recipes/kdbindings/all/conandata.yml b/recipes/kdbindings/all/conandata.yml index fa9ce176c1b03..ee5ec1ceee917 100644 --- a/recipes/kdbindings/all/conandata.yml +++ b/recipes/kdbindings/all/conandata.yml @@ -1,4 +1,10 @@ sources: + "1.1.0": + url: "https://github.com/KDAB/KDBindings/archive/refs/tags/v1.1.0.tar.gz" + sha256: "0ee07cb3e2ec4f5688b4b2971c42e5a4f4a41c7bf4aa130e6b118bea4b6340ab" + "1.0.5": + url: "https://github.com/KDAB/KDBindings/archive/refs/tags/v1.0.5.tar.gz" + sha256: "4d001419809a719f8c966e9bc73f457180325655deca0a11c07c47ee112447a3" "1.0.3": url: "https://github.com/KDAB/KDBindings/archive/refs/tags/v1.0.3.tar.gz" sha256: "da8de679d12bf123df6a3c63a482a862d4122a2f3d3567c9b3b2fc2c4f574393" diff --git a/recipes/kdbindings/all/conanfile.py b/recipes/kdbindings/all/conanfile.py index 9f1cf776a90f2..101357d6a2525 100644 --- a/recipes/kdbindings/all/conanfile.py +++ b/recipes/kdbindings/all/conanfile.py @@ -2,46 +2,52 @@ from conan.errors import ConanInvalidConfiguration from conan.tools.build import check_min_cppstd from conan.tools.files import get, copy +from conan.tools.layout import basic_layout from conan.tools.scm import Version import os class KDBindingsConan(ConanFile): name = "kdbindings" license = "MIT" - topics = ("c++17", "reactive", "kdab", "header-only") description = "Reactive programming & data binding in C++" - homepage = "https://github.com/KDAB/KDBindings" url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/KDAB/KDBindings" + topics = ("c++17", "reactive", "kdab", "header-only") package_type = "header-library" settings = "os", "arch", "compiler", "build_type" no_copy_source = True - def package_id(self): - self.info.clear() - - def source(self): - get(self, **self.conan_data["sources"][self.version], strip_root=True, destination=self.source_folder) + @property + def _min_cppstd(self): + return 17 @property def _compilers_minimum_version(self): return { "gcc": "9", - "Visual Studio": "15.7", "clang": "7", "apple-clang": "11", + "Visual Studio": "15.7", + "msvc": "191", } + def layout(self): + # src_folder must use the same source folder name than the project + basic_layout(self, src_folder="src") + + def package_id(self): + self.info.clear() + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + def validate(self): if self.settings.compiler.get_safe("cppstd"): - check_min_cppstd(self, 17) - + check_min_cppstd(self, self._min_cppstd) minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) if minimum_version and Version(self.settings.compiler.version) < minimum_version: raise ConanInvalidConfiguration(f"{self.ref} requires C++17, which your compiler does not support.") - def build(self): - pass - def package(self): copy(self, "*.h", os.path.join(self.source_folder, "src","kdbindings"), os.path.join(self.package_folder, "include", "kdbindings")) copy(self, "LICENSES/*", dst=os.path.join(self.package_folder,"licenses"), src=self.source_folder) diff --git a/recipes/kdbindings/config.yml b/recipes/kdbindings/config.yml index 372dd1cb646bd..39a3c40066d56 100644 --- a/recipes/kdbindings/config.yml +++ b/recipes/kdbindings/config.yml @@ -1,3 +1,7 @@ versions: + "1.1.0": + folder: all + "1.0.5": + folder: all "1.0.3": folder: all diff --git a/recipes/kealib/all/CMakeLists.txt b/recipes/kealib/all/CMakeLists.txt deleted file mode 100644 index fd2f93f3b4298..0000000000000 --- a/recipes/kealib/all/CMakeLists.txt +++ /dev/null @@ -1,7 +0,0 @@ -cmake_minimum_required(VERSION 3.5) -project(cmake_wrapper) - -include(conanbuildinfo.cmake) -conan_basic_setup() - -add_subdirectory("source_subfolder") diff --git a/recipes/kealib/all/conandata.yml b/recipes/kealib/all/conandata.yml index f812df3cfab60..d999ff7ca194b 100644 --- a/recipes/kealib/all/conandata.yml +++ b/recipes/kealib/all/conandata.yml @@ -1,14 +1,10 @@ sources: + "1.5.2": + url: "https://github.com/ubarsc/kealib/archive/refs/tags/kealib-1.5.2.tar.gz" + sha256: "f16a51007ab7612aa598de6ee2cac0aa4421040894777c8e57cb4a50ea552ab1" + "1.4.15": + url: "https://github.com/ubarsc/kealib/archive/kealib-1.4.15.tar.gz" + sha256: "fc7bd049663985e9528acd894724f0c730c84a3408d5bff3c0c0f01d7c6cd172" "1.4.14": url: "https://github.com/ubarsc/kealib/archive/kealib-1.4.14.tar.gz" sha256: "b3f73104acebe5304ecce5c19c1560def66fd5c448ce251e9486494baeb141bc" - "1.4.13": - url: "https://github.com/ubarsc/kealib/archive/kealib-1.4.13.tar.gz" - sha256: "2a254eb557a4ec20638a5134ed549a16b7f64977f37de3cf3853a206c8d82199" -patches: - "1.4.14": - - patch_file: "patches/fix-cmake-1.4.14.patch" - base_path: "source_subfolder" - "1.4.13": - - patch_file: "patches/fix-export-symbols-and-cmake.patch" - base_path: "source_subfolder" diff --git a/recipes/kealib/all/conanfile.py b/recipes/kealib/all/conanfile.py index 292c817544c7d..fb6eebf5cc31b 100644 --- a/recipes/kealib/all/conanfile.py +++ b/recipes/kealib/all/conanfile.py @@ -1,32 +1,38 @@ -from conans import ConanFile, CMake, tools -from conans.errors import ConanInvalidConfiguration import os -required_conan_version = ">=1.32.0" +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.build import check_min_cppstd, valid_min_cppstd +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.files import copy, get, rmdir +from conan.tools.microsoft import is_msvc +from conan.tools.scm import Version + +required_conan_version = ">=1.53.0" class KealibConan(ConanFile): name = "kealib" description = "C++ library providing complete access to the KEA image format." license = "MIT" - topics = ("conan", "kealib", "image", "raster") - homepage = "https://github.com/ubarsc/kealib" url = "https://github.com/conan-io/conan-center-index" - exports_sources = ["CMakeLists.txt", "patches/**"] - generators = "cmake" - settings = "os", "arch", "compiler", "build_type" - options = {"shared": [True, False], "fPIC": [True, False]} - default_options = {"shared": False, "fPIC": True} - - _cmake = None + homepage = "https://github.com/ubarsc/kealib" + topics = ("image", "raster") - @property - def _source_subfolder(self): - return "source_subfolder" + package_type = "library" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + } @property - def _build_subfolder(self): - return "build_subfolder" + def _min_cppstd(self): + return 11 def config_options(self): if self.settings.os == "Windows": @@ -34,41 +40,62 @@ def config_options(self): def configure(self): if self.options.shared: - del self.options.fPIC + self.options.rm_safe("fPIC") self.options["hdf5"].enable_cxx = True self.options["hdf5"].hl = True + def layout(self): + cmake_layout(self, src_folder="src") + def requirements(self): - self.requires("hdf5/1.12.0") + self.requires("hdf5/1.14.3", transitive_headers=True, transitive_libs=True) def validate(self): - if not (self.options["hdf5"].enable_cxx and self.options["hdf5"].hl): - raise ConanInvalidConfiguration("kealib requires hdf5 with cxx and hl enabled.") + if self.settings.compiler.cppstd: + check_min_cppstd(self, self._min_cppstd) + hdf5_opts = self.dependencies["hdf5"].options + if not (hdf5_opts.enable_cxx and hdf5_opts.hl): + raise ConanInvalidConfiguration(f"{self.ref} requires dependencies options -o 'hdf5/*:enable_cxx=True' -o 'hdf5/*:hl=True'") def source(self): - tools.get(**self.conan_data["sources"][self.version]) - os.rename("{0}-{0}-{1}".format(self.name, self.version), self._source_subfolder) - - def _configure_cmake(self): - if self._cmake: - return self._cmake - self._cmake = CMake(self) - self._cmake.definitions["HDF5_USE_STATIC_LIBRARIES"] = not self.options["hdf5"].shared - self._cmake.definitions["HDF5_PREFER_PARALLEL"] = False # TODO: rely on self.options["hdf5"].parallel when implemented in hdf5 recipe - self._cmake.definitions["LIBKEA_WITH_GDAL"] = False - self._cmake.configure(build_folder=self._build_subfolder) - return self._cmake + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + tc.variables["HDF5_USE_STATIC_LIBRARIES"] = not self.dependencies["hdf5"].options.shared + tc.variables["HDF5_PREFER_PARALLEL"] = self.dependencies["hdf5"].options.parallel + tc.variables["HDF5_THREADSAFE"] = self.dependencies["hdf5"].options.get_safe("threadsafe", False) + tc.variables["LIBKEA_WITH_GDAL"] = False + # INFO: kealib uses C++11 but does not configure in cmake: https://github.com/ubarsc/kealib/pull/48 + if not valid_min_cppstd(self, self._min_cppstd): + tc.variables["CMAKE_CXX_STANDARD"] = self._min_cppstd + tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0077"] = "NEW" + tc.generate() + + tc = CMakeDeps(self) + tc.generate() def build(self): - for patch in self.conan_data.get("patches", {}).get(self.version, []): - tools.patch(**patch) - cmake = self._configure_cmake() + cmake = CMake(self) + cmake.configure() cmake.build() def package(self): - self.copy("LICENSE.txt", dst="licenses", src=self._source_subfolder) - cmake = self._configure_cmake() + copy(self, "LICENSE.txt", + dst=os.path.join(self.package_folder, "licenses"), + src=self.source_folder) + cmake = CMake(self) cmake.install() + rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) def package_info(self): - self.cpp_info.libs = tools.collect_libs(self) + if is_msvc(self): + if not self.options.shared and Version(self.version) <= "1.4.14": + self.cpp_info.libs = ["liblibkea"] + else: + self.cpp_info.libs = ["libkea"] + else: + self.cpp_info.libs = ["kea"] + + if self.settings.os == "Windows": + self.cpp_info.system_libs.append("shlwapi") diff --git a/recipes/kealib/all/patches/fix-cmake-1.4.14.patch b/recipes/kealib/all/patches/fix-cmake-1.4.14.patch deleted file mode 100644 index 40e8ed0c1a606..0000000000000 --- a/recipes/kealib/all/patches/fix-cmake-1.4.14.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- a/src/CMakeLists.txt -+++ b/src/CMakeLists.txt -@@ -30,7 +30,7 @@ source_group("include_kea" FILES ${LIBKEA_H}) - ############################################################################### - # Build, link and install library - add_library(${LIBKEA_LIB_NAME} ${LIBKEA_CPP} ${LIBKEA_H} ) --target_link_libraries(${LIBKEA_LIB_NAME} ${HDF5_LIBRARIES} ${HDF5_HL_LIBRARIES}) -+target_link_libraries(${LIBKEA_LIB_NAME} ${CONAN_LIBS}) - - include(GenerateExportHeader) - generate_export_header(${LIBKEA_LIB_NAME} -@@ -63,8 +63,6 @@ target_link_libraries(Kealib INTERFACE "${LIBKEA_LIB_NAME}") - ############################################################################### - # Testing - # exe needs to be in 'src' otherwise it doesn't work --add_executable (test1 ${PROJECT_SOURCE_DIR}/src/tests/test1.cpp) --target_link_libraries (test1 ${LIBKEA_LIB_NAME}) - ############################################################################### - - ############################################################################### diff --git a/recipes/kealib/all/patches/fix-export-symbols-and-cmake.patch b/recipes/kealib/all/patches/fix-export-symbols-and-cmake.patch deleted file mode 100644 index 0107ba1879496..0000000000000 --- a/recipes/kealib/all/patches/fix-export-symbols-and-cmake.patch +++ /dev/null @@ -1,219 +0,0 @@ ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -52,14 +52,7 @@ set (LIBKEA_PACKAGE_BUGREPORT "petebunting@mac.com") - set (LIBKEA_PACKAGE "LibKEA") - set (LIBKEA_COPYRIGHT_YEAR 2013) - --if(MSVC) -- # set Name of C++ library -- # this forces it to be libkea on Windows with VC -- set(LIBKEA_LIB_NAME libkea) --else() -- # set Name of C++ library -- set(LIBKEA_LIB_NAME kea) --endif() -+set(LIBKEA_LIB_NAME kea) - - include(CMakeDependentOption) - # CMake global option valiable -@@ -195,11 +188,11 @@ endif(MSVC) - - ############################################################################### - # Setup configure file --configure_file ( "${PROJECT_HEADER_DIR}/kea-config.h.in" "${CMAKE_BINARY_DIR}/${PROJECT_HEADER_DIR}/libkea/kea-config.h" ) -+configure_file ( "${PROJECT_HEADER_DIR}/kea-config.h.in" "${CMAKE_CURRENT_BINARY_DIR}/include/libkea/kea-config.h" ) - if(MSVC) -- configure_file ( "${PROJECT_TOOLS_DIR}/kea-config.bat.in" "${CMAKE_BINARY_DIR}/${PROJECT_BINARY_DIR}/kea-config.bat" ) -+ configure_file ( "${PROJECT_TOOLS_DIR}/kea-config.bat.in" "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_BINARY_DIR}/kea-config.bat" ) - else() -- configure_file ( "${PROJECT_TOOLS_DIR}/kea-config.in" "${CMAKE_BINARY_DIR}/${PROJECT_BINARY_DIR}/kea-config" ) -+ configure_file ( "${PROJECT_TOOLS_DIR}/kea-config.in" "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_BINARY_DIR}/kea-config" ) - endif(MSVC) - ############################################################################### - -@@ -213,7 +206,7 @@ endif(MSVC) - # Build library - - include_directories ("${PROJECT_HEADER_DIR}") --include_directories ("${CMAKE_BINARY_DIR}/${PROJECT_HEADER_DIR}") -+include_directories ("${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_HEADER_DIR}") - include_directories(${HDF5_INCLUDE_DIRS}) - add_subdirectory ("${PROJECT_SOURCE_DIR}") - if (LIBKEA_WITH_GDAL) -@@ -234,7 +227,7 @@ if(MSVC) - else() - install (FILES "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_BINARY_DIR}/kea-config" DESTINATION bin PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) - endif(MSVC) --install (FILES "${CMAKE_BINARY_DIR}/${PROJECT_HEADER_DIR}/libkea/kea-config.h" DESTINATION include/libkea) -+install (FILES "${CMAKE_CURRENT_BINARY_DIR}/include/libkea/kea-config.h" DESTINATION include/libkea) - ############################################################################### - - ############################################################################### ---- a/include/libkea/KEAAttributeTable.h -+++ b/include/libkea/KEAAttributeTable.h -@@ -98,7 +98,7 @@ namespace kealib{ - void *p; - } VarLenFieldHDF; - -- class DllExport KEAAttributeTable -+ class KEA_EXPORT KEAAttributeTable - { - public: - KEAAttributeTable(KEAATTType keaAttType); ---- a/include/libkea/KEAAttributeTableFile.h -+++ b/include/libkea/KEAAttributeTableFile.h -@@ -43,7 +43,7 @@ - - namespace kealib{ - -- class DllExport KEAAttributeTableFile : public KEAAttributeTable -+ class KEA_EXPORT KEAAttributeTableFile : public KEAAttributeTable - { - public: - KEAAttributeTableFile(H5::H5File *keaImgIn, const std::string &bandPathBaseIn, size_t numRowsIn, size_t chunkSizeIn, unsigned int deflateIn=KEA_DEFLATE); ---- a/include/libkea/KEAAttributeTableInMem.h -+++ b/include/libkea/KEAAttributeTableInMem.h -@@ -43,7 +43,7 @@ - - namespace kealib{ - -- class DllExport KEAAttributeTableInMem : public KEAAttributeTable -+ class KEA_EXPORT KEAAttributeTableInMem : public KEAAttributeTable - { - public: - KEAAttributeTableInMem(); ---- a/include/libkea/KEACommon.h -+++ b/include/libkea/KEACommon.h -@@ -38,15 +38,7 @@ - - #include "H5Cpp.h" - --// mark all exported classes/functions with DllExport to have --// them exported by Visual Studio --#ifndef DllExport -- #ifdef _MSC_VER -- #define DllExport __declspec( dllexport ) -- #else -- #define DllExport -- #endif --#endif -+#include "libkea/kea_export.h" - - // MSVC 2008 uses different names.... - #ifdef _MSC_VER ---- a/include/libkea/KEAException.h -+++ b/include/libkea/KEAException.h -@@ -37,7 +37,7 @@ - - namespace kealib - { -- class DllExport KEAException : public std::exception -+ class KEA_EXPORT KEAException : public std::exception - { - public: - KEAException() : exception() {msgs = "A KEAException has been created.";}; -@@ -49,7 +49,7 @@ namespace kealib - std::string msgs; - }; - -- class DllExport KEAIOException : public KEAException -+ class KEA_EXPORT KEAIOException : public KEAException - { - public: - KEAIOException() : KEAException("KEAIOException has been created."){}; -@@ -58,7 +58,7 @@ namespace kealib - ~KEAIOException() throw() {}; - }; - -- class DllExport KEAATTException : public KEAException -+ class KEA_EXPORT KEAATTException : public KEAException - { - public: - KEAATTException() : KEAException("KEAATTException has been created."){}; ---- a/include/libkea/KEAImageIO.h -+++ b/include/libkea/KEAImageIO.h -@@ -45,7 +45,7 @@ - - namespace kealib{ - -- class DllExport KEAImageIO -+ class KEA_EXPORT KEAImageIO - { - public: - KEAImageIO(); -@@ -171,7 +171,7 @@ namespace kealib{ - } - - // returns the current KEA version as a double --extern "C" DllExport double get_kealibversion(); -+extern "C" KEA_EXPORT double get_kealibversion(); - - #endif - ---- a/src/CMakeLists.txt -+++ b/src/CMakeLists.txt -@@ -30,34 +30,37 @@ source_group("include_kea" FILES ${LIBKEA_H}) - ############################################################################### - # Build, link and install library - add_library(${LIBKEA_LIB_NAME} ${LIBKEA_CPP} ${LIBKEA_H} ) --target_link_libraries(${LIBKEA_LIB_NAME} ${HDF5_LIBRARIES} ${HDF5_HL_LIBRARIES}) -+target_link_libraries(${LIBKEA_LIB_NAME} ${CONAN_LIBS}) - --if(BUILD_SHARED_LIBS) -- SET_TARGET_PROPERTIES(${LIBKEA_LIB_NAME} -- PROPERTIES -- SOVERSION ${LIBKEA_VERSION_MAJOR}.${LIBKEA_VERSION_MINOR} -- VERSION ${LIBKEA_VERSION} -- CLEAN_DIRECT_OUTPUT 1) --else() -- SET_TARGET_PROPERTIES(${LIBKEA_LIB_NAME} -- PROPERTIES -- OUTPUT_NAME "${LIBKEA_LIB_NAME}" -- PREFIX "lib" -- VERSION ${LIBKEA_VERSION} -- CLEAN_DIRECT_OUTPUT 1) -+include(GenerateExportHeader) -+generate_export_header(${LIBKEA_LIB_NAME} -+ EXPORT_MACRO_NAME KEA_EXPORT -+ EXPORT_FILE_NAME ${CMAKE_CURRENT_BINARY_DIR}/include/libkea/kea_export.h -+) -+target_include_directories(${LIBKEA_LIB_NAME} PUBLIC -+ $ -+ $ -+ $ -+) -+set_target_properties(${LIBKEA_LIB_NAME} -+ PROPERTIES -+ CXX_VISIBILITY_PRESET hidden -+ VISIBILITY_INLINES_HIDDEN 1 -+ PREFIX "lib" -+ IMPORT_PREFIX "lib" -+ SOVERSION ${LIBKEA_VERSION_MAJOR}.${LIBKEA_VERSION_MINOR} -+ VERSION ${LIBKEA_VERSION} -+) -+if(MSVC AND NOT BUILD_SHARED_LIBS) -+ set_target_properties(${LIBKEA_LIB_NAME} PROPERTIES OUTPUT_NAME "libkea") - endif() - add_library(Kealib INTERFACE) - target_link_libraries(Kealib INTERFACE "${LIBKEA_LIB_NAME}") --target_include_directories(Kealib INTERFACE -- $ -- $) - ############################################################################### - - ############################################################################### - # Testing - # exe needs to be in 'src' otherwise it doesn't work --add_executable (test1 ${CMAKE_SOURCE_DIR}/src/tests/test1.cpp) --target_link_libraries (test1 ${LIBKEA_LIB_NAME}) - - ############################################################################### - # Set target properties -@@ -76,5 +79,6 @@ install (TARGETS ${LIBKEA_LIB_NAME} - RUNTIME DESTINATION bin - LIBRARY DESTINATION lib - ARCHIVE DESTINATION lib) --install (FILES ${LIBKEA_H} DESTINATION include/libkea) -+install (FILES ${LIBKEA_H} ${CMAKE_CURRENT_BINARY_DIR}/include/libkea/kea_export.h -+ DESTINATION include/libkea) - ############################################################################### diff --git a/recipes/kealib/all/test_package/CMakeLists.txt b/recipes/kealib/all/test_package/CMakeLists.txt index 196188113685c..0d6f2bcf3918c 100644 --- a/recipes/kealib/all/test_package/CMakeLists.txt +++ b/recipes/kealib/all/test_package/CMakeLists.txt @@ -1,8 +1,8 @@ -cmake_minimum_required(VERSION 3.1) -project(test_package) +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup() +find_package(kealib REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) -target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS}) +target_link_libraries(${PROJECT_NAME} PRIVATE kealib::kealib) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) diff --git a/recipes/kealib/all/test_package/conanfile.py b/recipes/kealib/all/test_package/conanfile.py index ea57a464900be..ef5d7042163ec 100644 --- a/recipes/kealib/all/test_package/conanfile.py +++ b/recipes/kealib/all/test_package/conanfile.py @@ -1,10 +1,19 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake import os -from conans import ConanFile, CMake, tools class TestPackageConan(ConanFile): - settings = "os", "compiler", "build_type", "arch" - generators = "cmake" + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) def build(self): cmake = CMake(self) @@ -12,6 +21,6 @@ def build(self): cmake.build() def test(self): - if not tools.cross_building(self.settings): - bin_path = os.path.join("bin", "test_package") - self.run(bin_path, run_environment=True) + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/kealib/all/test_package/test_package.cpp b/recipes/kealib/all/test_package/test_package.cpp index ed6447aec5e35..4a9b2a79bfb1a 100644 --- a/recipes/kealib/all/test_package/test_package.cpp +++ b/recipes/kealib/all/test_package/test_package.cpp @@ -7,23 +7,23 @@ * * This file is part of LibKEA. * - * Permission is hereby granted, free of charge, to any person - * obtaining a copy of this software and associated documentation - * files (the "Software"), to deal in the Software without restriction, - * including without limitation the rights to use, copy, modify, - * merge, publish, distribute, sublicense, and/or sell copies of the - * Software, and to permit persons to whom the Software is furnished + * Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without restriction, + * including without limitation the rights to use, copy, modify, + * merge, publish, distribute, sublicense, and/or sell copies of the + * Software, and to permit persons to whom the Software is furnished * to do so, subject to the following conditions: * - * The above copyright notice and this permission notice shall be + * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES - * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF - * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR + * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF + * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * */ @@ -42,7 +42,7 @@ int main() try { kealib::KEAImageIO io; - H5::H5File *h5file = kealib::KEAImageIO::createKEAImage("bob.kea", + H5::H5File *h5file = kealib::KEAImageIO::createKEAImage("bob.kea", kealib::kea_8uint, IMG_XSIZE, IMG_YSIZE, 1); io.openKEAImageHeader(h5file); @@ -52,7 +52,7 @@ int main() { pData[i] = rand() % 255; } - io.writeImageBlock2Band(1, pData, 0, 0, IMG_XSIZE, IMG_YSIZE, + io.writeImageBlock2Band(1, pData, 0, 0, IMG_XSIZE, IMG_YSIZE, IMG_XSIZE, IMG_YSIZE, kealib::kea_8uint); free(pData); diff --git a/recipes/kealib/all/test_v1_package/CMakeLists.txt b/recipes/kealib/all/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..91630d79f4abb --- /dev/null +++ b/recipes/kealib/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/kealib/all/test_v1_package/conanfile.py b/recipes/kealib/all/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..84ee68733e516 --- /dev/null +++ b/recipes/kealib/all/test_v1_package/conanfile.py @@ -0,0 +1,17 @@ +import os + +from conans import ConanFile, CMake, tools + +class TestPackageConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake", "cmake_find_package_multi" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if not tools.cross_building(self.settings): + bin_path = os.path.join("bin", "test_package") + self.run(bin_path, run_environment=True) diff --git a/recipes/kealib/config.yml b/recipes/kealib/config.yml index 46b5f6a142b86..d8de052a2b5a1 100644 --- a/recipes/kealib/config.yml +++ b/recipes/kealib/config.yml @@ -1,5 +1,7 @@ versions: - "1.4.14": + "1.5.2": + folder: all + "1.4.15": folder: all - "1.4.13": + "1.4.14": folder: all diff --git a/recipes/keychain/all/conandata.yml b/recipes/keychain/all/conandata.yml index 1c93eb4e4837d..f10687c09e1bc 100644 --- a/recipes/keychain/all/conandata.yml +++ b/recipes/keychain/all/conandata.yml @@ -1,10 +1,10 @@ sources: - "1.2.0": - url: "https://github.com/hrantzsch/keychain/archive/v1.2.0.tar.gz" - sha256: "82cc66a7fa12af43f3e2efeb378bacb0a514056617e369430f252da2392acaae" - "1.2.1": - url: "https://github.com/hrantzsch/keychain/archive/v1.2.1.tar.gz" - sha256: "725cc30da0451403713dee648edd06686fdc31b5041e75e3350e6056c78de076" "1.3.0": url: "https://github.com/hrantzsch/keychain/archive/refs/tags/v1.3.0.tar.gz" sha256: "0e2eb3c6ca2c62253f7d28a478d0cb3eeb4b9656b33d2946e1a294361f72809c" + "1.2.1": + url: "https://github.com/hrantzsch/keychain/archive/v1.2.1.tar.gz" + sha256: "725cc30da0451403713dee648edd06686fdc31b5041e75e3350e6056c78de076" + "1.2.0": + url: "https://github.com/hrantzsch/keychain/archive/v1.2.0.tar.gz" + sha256: "82cc66a7fa12af43f3e2efeb378bacb0a514056617e369430f252da2392acaae" diff --git a/recipes/keychain/all/conanfile.py b/recipes/keychain/all/conanfile.py index 64b3ee8743d71..5a1130d8d16d6 100644 --- a/recipes/keychain/all/conanfile.py +++ b/recipes/keychain/all/conanfile.py @@ -1,53 +1,59 @@ +import os + from conan import ConanFile from conan.tools.build import check_min_cppstd from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout from conan.tools.files import collect_libs, copy, get, replace_in_file from conan.tools.gnu import PkgConfigDeps -import os - class KeychainConan(ConanFile): name = "keychain" + description = ( + "A cross-platform wrapper for the operating system's credential storage" + ) + license = "MIT" + url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/hrantzsch/keychain" - description = "A cross-platform wrapper for the operating system's credential storage" topics = ("keychain", "security", "credentials", "password", "cpp11") - url = "https://github.com/conan-io/conan-center-index" - license = "MIT" package_type = "library" settings = "os", "arch", "compiler", "build_type" - options = {'shared': [False, True], 'fPIC': [False, True]} + options = {"shared": [False, True], "fPIC": [False, True]} default_options = {"shared": False, "fPIC": True} def config_options(self): - if self.settings.os == 'Windows': + if self.settings.os == "Windows": del self.options.fPIC def configure(self): if self.options.shared: self.options.rm_safe("fPIC") - def validate(self): - if self.settings.get_safe("compiler.cppstd"): - check_min_cppstd(self, 11) + def layout(self): + cmake_layout(self, src_folder="src") def requirements(self): if self.settings.os == "Linux": self.requires("libsecret/0.20.5") - self.requires("glib/2.78.1") + self.requires("glib/2.78.3") + + def validate(self): + if self.settings.compiler.get_safe("cppstd"): + check_min_cppstd(self, 11) def build_requirements(self): if self.settings.os == "Linux": self.tool_requires("pkgconf/2.0.3") - def layout(self): - cmake_layout(self, src_folder="src") - def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) # Ensure .dll is installed on Windows - replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), - "TARGETS ${PROJECT_NAME}", "TARGETS ${PROJECT_NAME} RUNTIME DESTINATION bin") + replace_in_file( + self, + os.path.join(self.source_folder, "CMakeLists.txt"), + "TARGETS ${PROJECT_NAME}", + "TARGETS ${PROJECT_NAME} RUNTIME DESTINATION bin", + ) def generate(self): tc = CMakeToolchain(self) @@ -64,14 +70,21 @@ def build(self): cmake.build() def package(self): - copy(self, pattern="LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) + copy( + self, + pattern="LICENSE", + dst=os.path.join(self.package_folder, "licenses"), + src=self.source_folder, + ) cmake = CMake(self) cmake.install() def package_info(self): self.cpp_info.libs = collect_libs(self) - if self.settings.os == 'Macos': - self.cpp_info.frameworks = ['Security', 'CoreFoundation'] + if self.settings.os == "Macos": + self.cpp_info.frameworks = ["Security", "CoreFoundation"] if self.settings.os == "Windows": - self.cpp_info.system_libs = ['crypt32'] + self.cpp_info.system_libs = ["crypt32"] + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.system_libs = ["m"] diff --git a/recipes/keychain/config.yml b/recipes/keychain/config.yml index fd230ff5e48d0..21c776e737e77 100644 --- a/recipes/keychain/config.yml +++ b/recipes/keychain/config.yml @@ -1,7 +1,7 @@ versions: - "1.2.0": + "1.3.0": folder: all "1.2.1": folder: all - "1.3.0": + "1.2.0": folder: all diff --git a/recipes/kplot/all/CMakeLists.txt b/recipes/kplot/all/CMakeLists.txt index 632b160c48691..d9ac5598dcf53 100644 --- a/recipes/kplot/all/CMakeLists.txt +++ b/recipes/kplot/all/CMakeLists.txt @@ -1,49 +1,45 @@ -cmake_minimum_required(VERSION 3.8) +cmake_minimum_required(VERSION 3.15) project(kplot LANGUAGES C) find_package(cairo REQUIRED CONFIG) set(kplot_src - ${KPLOT_SRC_DIR}/colours.c - ${KPLOT_SRC_DIR}/array.c - ${KPLOT_SRC_DIR}/border.c - ${KPLOT_SRC_DIR}/bucket.c - ${KPLOT_SRC_DIR}/buffer.c - ${KPLOT_SRC_DIR}/draw.c - ${KPLOT_SRC_DIR}/grid.c - ${KPLOT_SRC_DIR}/hist.c - ${KPLOT_SRC_DIR}/label.c - ${KPLOT_SRC_DIR}/kdata.c - ${KPLOT_SRC_DIR}/kplot.c - ${KPLOT_SRC_DIR}/margin.c - ${KPLOT_SRC_DIR}/mean.c - ${KPLOT_SRC_DIR}/plotctx.c - ${KPLOT_SRC_DIR}/reallocarray.c - ${KPLOT_SRC_DIR}/stddev.c - ${KPLOT_SRC_DIR}/tic.c - ${KPLOT_SRC_DIR}/vector.c + colours.c + array.c + border.c + bucket.c + buffer.c + draw.c + grid.c + hist.c + label.c + kdata.c + kplot.c + margin.c + mean.c + plotctx.c + reallocarray.c + stddev.c + tic.c + vector.c ) set(kplot_inc - ${KPLOT_SRC_DIR}/compat.h - ${KPLOT_SRC_DIR}/extern.h - ${KPLOT_SRC_DIR}/kplot.h + compat.h + extern.h + kplot.h ) -include_directories(KPLOT_SRC_DIR) - -try_run(HAVE_reallocarray COMPIE_reallocarray ${CMAKE_BINARY_DIR} ${KPLOT_SRC_DIR}/test-reallocarray.c) - -file(READ "${KPLOT_SRC_DIR}/compat.pre.h" COMPAT_CONTENTS) -file(WRITE "${KPLOT_SRC_DIR}/compat.h" "${COMPAT_CONTENTS}") -if (${COMPIE_reallocarray} AND NOT ${HAVE_reallocarray}) - file(APPEND "${KPLOT_SRC_DIR}/compat.h" "#define HAVE_REALLOCARRAY") +try_run(HAVE_reallocarray COMPIE_reallocarray ${CMAKE_BINARY_DIR} "${CMAKE_SOURCE_DIR}/test-reallocarray.c") +file(READ compat.pre.h COMPAT_CONTENTS) +file(WRITE compat.h "${COMPAT_CONTENTS}") +if (COMPIE_reallocarray AND NOT HAVE_reallocarray) + file(APPEND compat.h "#define HAVE_REALLOCARRAY") endif() -file(READ "${KPLOT_SRC_DIR}/compat.post.h" COMPAT_CONTENTS) -file(APPEND "${KPLOT_SRC_DIR}/compat.h" "${COMPAT_CONTENTS}") +file(READ compat.post.h COMPAT_CONTENTS) +file(APPEND compat.h "${COMPAT_CONTENTS}") add_library(kplot ${kplot_src}) - target_compile_features(kplot PRIVATE c_std_99) set_target_properties(kplot PROPERTIES PUBLIC_HEADER "${kplot_inc}" @@ -54,7 +50,6 @@ target_compile_features(kplot PRIVATE c_std_99) target_link_libraries(kplot PRIVATE cairo::cairo) include(GNUInstallDirs) - install( TARGETS kplot RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} diff --git a/recipes/kplot/all/conanfile.py b/recipes/kplot/all/conanfile.py index 47e24a0f5cdf8..e7de72e829781 100644 --- a/recipes/kplot/all/conanfile.py +++ b/recipes/kplot/all/conanfile.py @@ -12,9 +12,10 @@ class KplotConan(ConanFile): description = "open source Cairo plotting library" license = "ISC" url = "https://github.com/conan-io/conan-center-index" - homepage = "https://github.com/kristapsdz/kplot/" - topics = ("plot", "cairo", "chart") # no "conan" and project name in topics - settings = "os", "arch", "compiler", "build_type" # even for header only + homepage = "https://github.com/kristapsdz/kplot" + topics = ("plot", "cairo", "chart") + package_type = "library" + settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], "fPIC": [True, False], @@ -25,7 +26,7 @@ class KplotConan(ConanFile): } def export_sources(self): - copy(self, "CMakeLists.txt", src=self.recipe_folder, dst=self.export_sources_folder) + copy(self, "CMakeLists.txt", self.recipe_folder, os.path.join(self.export_sources_folder, "src")) def config_options(self): if self.settings.os == "Windows": @@ -34,7 +35,6 @@ def config_options(self): def configure(self): if self.options.shared: self.options.rm_safe("fPIC") - # for plain C projects only self.settings.rm_safe("compiler.libcxx") self.settings.rm_safe("compiler.cppstd") @@ -46,26 +46,24 @@ def validate(self): raise ConanInvalidConfiguration(f"{self.ref} can not be built on Visual Studio and msvc.") def requirements(self): - self.requires("cairo/1.17.4") + self.requires("cairo/1.17.4", transitive_headers=True) def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) def generate(self): tc = CMakeToolchain(self) - tc.variables["KPLOT_SRC_DIR"] = self.source_folder.replace("\\", "/") tc.generate() - deps = CMakeDeps(self) deps.generate() def build(self): cmake = CMake(self) - cmake.configure(build_script_folder=os.path.join(self.source_folder, os.pardir)) + cmake.configure() cmake.build() def package(self): - copy(self, pattern="LICENSE.md", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) + copy(self, "LICENSE.md", self.source_folder, os.path.join(self.package_folder, "licenses")) cmake = CMake(self) cmake.install() diff --git a/recipes/kplot/all/test_package/test_package.c b/recipes/kplot/all/test_package/test_package.c index 2bc672875372a..1823d8d11f41d 100644 --- a/recipes/kplot/all/test_package/test_package.c +++ b/recipes/kplot/all/test_package/test_package.c @@ -1,14 +1,11 @@ -#include +// Both are required by kplot.h +#include #include -#include "cairo.h" -#include "kplot.h" +#include int main() { struct kpair points1[50]; struct kdata* d1 = kdata_array_alloc(points1, 50); - kdata_destroy(d1); - - return 0; } diff --git a/recipes/krb5/all/conandata.yml b/recipes/krb5/all/conandata.yml new file mode 100644 index 0000000000000..f074e932120e0 --- /dev/null +++ b/recipes/krb5/all/conandata.yml @@ -0,0 +1,16 @@ +sources: + "1.21.2": + url: "https://kerberos.org/dist/krb5/1.21/krb5-1.21.2.tar.gz" + sha256: "9560941a9d843c0243a71b17a7ac6fe31c7cebb5bce3983db79e52ae7e850491" +patches: + "1.21.2": + - patch_file: "patches/0001-no-tests.patch" + patch_type: "conan" + patch_description: "Disable building tests" + - patch_file: "patches/0002-disable_ksu_root.patch" + patch_description: "No ksu install as root user" + patch_type: "conan" + - patch_file: "patches/0003-find-openssl-module.patch" + patch_description: "Use OpenSSL .pc module to find libraries" + patch_source: "https://github.com/krb5/krb5/pull/1351" + patch_type: "portability" diff --git a/recipes/krb5/all/conanfile.py b/recipes/krb5/all/conanfile.py new file mode 100644 index 0000000000000..45d89ebc279af --- /dev/null +++ b/recipes/krb5/all/conanfile.py @@ -0,0 +1,169 @@ +from conan import ConanFile +from conan.tools.build import cross_building +from conan.tools.env import VirtualBuildEnv, VirtualRunEnv +from conan.errors import ConanInvalidConfiguration +from conan.tools.files import copy, get, rmdir, export_conandata_patches, apply_conandata_patches, chdir +from conan.tools.gnu import Autotools, AutotoolsToolchain, AutotoolsDeps, PkgConfigDeps +from conan.tools.layout import basic_layout +from conan.tools.microsoft import is_msvc +import os + +required_conan_version = ">=1.54.0" + +class Krb5Conan(ConanFile): + name = "krb5" + description = "Kerberos is a network authentication protocol. It is designed to provide strong authentication " \ + "for client/server applications by using secret-key cryptography." + homepage = "https://web.mit.edu/kerberos" + topics = ("kerberos", "network", "authentication", "protocol", "client", "server", "cryptography") + license = "LicenseRef-NOTICE" + url = "https://github.com/conan-io/conan-center-index" + package_type = "shared-library" + options = { + "use_thread": [True, False], + "use_dns_realms": [True, False], + "with_tls": [False, "openssl"], + } + default_options = { + "use_thread": True, + "use_dns_realms": False, + "with_tls": "openssl" + } + options_description = { + "use_thread": "Enable thread support", + "use_dns_realms": "Enable DNS for realms", + "with_tls": "Enable TLS support with OpenSSL", + } + settings = "os", "arch", "compiler", "build_type" + + def export_sources(self): + export_conandata_patches(self) + + def configure(self): + self.settings.rm_safe("compiler.libcxx") + self.settings.rm_safe("compiler.cppstd") + + def layout(self): + basic_layout(self, src_folder="src") + + def validate(self): + if is_msvc(self): + raise ConanInvalidConfiguration(f"{self.ref} Conan recipe is not prepared for Windows yet. Contributions are welcome!") + if self.settings.os == "Macos": + raise ConanInvalidConfiguration(f"{self.ref} Conan recipe is not prepared for Macos yet. Contributions are welcome!") + if self.options.with_tls == "openssl" and not self.dependencies["openssl"].options.shared: + # k5tls does not respect linkage order, it passes krb5 and krb5support before openssl to the linker, which causes linking errors + # gcc -shared -fPIC -Wl,-h,k5tls.so.0 -Wl,--no-undefined -o k5tls.so openssl.so notls.so -L../../../lib -lkrb5 -lkrb5support ... + # /usr/bin/ld: /.../lib/libssl.a(libssl-lib-ssl_cert_comp.o): in function `OSSL_COMP_CERT_from_uncompressed_data': + # ssl_cert_comp.c:(.text+0x3d1): undefined reference to `COMP_CTX_free' + raise ConanInvalidConfiguration(f"{self.ref} building with static OpenSSL generates linking errors. Please use '-o openssl/*:shared=True'") + + def source(self): + get(self, **self.conan_data["sources"][self.version], + destination=self.source_folder, strip_root=True) + + def generate(self): + env = VirtualBuildEnv(self) + env.generate() + + if not cross_building(self): + env = VirtualRunEnv(self) + env.generate(scope="build") + + tc = AutotoolsToolchain(self) + yes_no = lambda v: "yes" if v else "no" + tls_impl = {"openssl": "openssl",}.get(str(self.options.get_safe('with_tls'))) + tc.configure_args.extend([ + f"--enable-thread-support={yes_no(self.options.get_safe('use_thread'))}", + f"--enable-dns-for-realm={yes_no(self.options.use_dns_realms)}", + f"--enable-pkinit={yes_no(self.options.get_safe('with_tls'))}", + f"--with-crypto-impl={(tls_impl or 'builtin')}", + f"--with-spake-openssl={yes_no(self.options.get_safe('with_tls') == 'openssl')}", + f"--with-tls-impl={(tls_impl or 'no')}", + "--disable-nls", + "--disable-rpath", + "--without-libedit", + "--without-readline", + "--with-system-verto", + "--enable-dns-for-realm", + f"--with-keyutils={self.package_folder}", + f"--with-tcl={(self.dependencies['tcl'].package_folder if self.options.get_safe('with_tcl') else 'no')}", + ]) + tc.generate() + + pkg = AutotoolsDeps(self) + pkg.generate() + pkg = PkgConfigDeps(self) + pkg.generate() + + def requirements(self): + self.requires("libverto/0.3.2") + if self.options.get_safe("with_tls") == "openssl": + self.requires("openssl/[>=1.1 <4]") + if self.options.get_safe("with_tcl"): + self.requires("tcl/8.6.11") + + def build_requirements(self): + if not self.conf.get("tools.gnu:pkg_config", check_type=str): + self.tool_requires("pkgconf/1.9.3") + self.build_requires("automake/1.16.5") + self.build_requires("bison/3.8.2") + + def build(self): + apply_conandata_patches(self) + with chdir(self, os.path.join(self.source_folder, "src")): + self.run("autoreconf -vif") + autotools = Autotools(self) + autotools.configure(build_script_folder=os.path.join(self.source_folder, "src")) + autotools.make() + + def package(self): + copy(self, "NOTICE", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) + autotools = Autotools(self) + autotools.install() + rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) + rmdir(self, os.path.join(self.package_folder, "share")) + rmdir(self, os.path.join(self.package_folder, "var")) + + def package_info(self): + self.cpp_info.components["mit-krb5"].libs = ["krb5", "k5crypto", "com_err"] + if self.options.get_safe('with_tls') == "openssl": + self.cpp_info.components["mit-krb5"].requires = ["openssl::crypto"] + self.cpp_info.components["mit-krb5"].names["pkg_config"] = "mit-krb5" + if self.settings.os == "Linux": + self.cpp_info.components["mit-krb5"].system_libs = ["resolv"] + + self.cpp_info.components["libkrb5"].libs = [] + self.cpp_info.components["libkrb5"].requires = ["mit-krb5"] + self.cpp_info.components["libkrb5"].names["pkg_config"] = "krb5" + + self.cpp_info.components["mit-krb5-gssapi"].libs = ["gssapi_krb5"] + self.cpp_info.components["mit-krb5-gssapi"].requires = ["mit-krb5"] + self.cpp_info.components["mit-krb5-gssapi"].names["pkg_config"] = "mit-krb5-gssapi" + + self.cpp_info.components["krb5-gssapi"].libs = [] + self.cpp_info.components["krb5-gssapi"].requires = ["mit-krb5-gssapi"] + self.cpp_info.components["krb5-gssapi"].names["pkg_config"] = "krb5-gssapi" + + self.cpp_info.components["gssrpc"].libs = ["gssrpc"] + self.cpp_info.components["gssrpc"].requires = ["mit-krb5-gssapi"] + self.cpp_info.components["gssrpc"].names["pkg_config"] = "gssrpc" + + self.cpp_info.components["kadm-client"].libs = ["kadm5clnt_mit"] + self.cpp_info.components["kadm-client"].requires = ["mit-krb5-gssapi", "gssrpc"] + self.cpp_info.components["kadm-client"].names["pkg_config"] = "kadm-client" + + self.cpp_info.components["kdb"].libs = ["kdb5"] + self.cpp_info.components["kdb"].requires = ["mit-krb5-gssapi", "mit-krb5", "gssrpc"] + self.cpp_info.components["kdb"].names["pkg_config"] = "kdb-client" + + self.cpp_info.components["kadm-server"].libs = ["kadm5srv_mit"] + self.cpp_info.components["kadm-server"].requires = ["kdb", "mit-krb5-gssapi"] + self.cpp_info.components["kadm-server"].names["pkg_config"] = "kadm-server" + + self.cpp_info.components["krad"].libs = ["krad"] + self.cpp_info.components["krad"].requires = ["libkrb5", "libverto::libverto"] + + krb5_config = os.path.join(self.package_folder, "bin", "krb5-config").replace("\\", "/") + self.output.info("Appending KRB5_CONFIG environment variable: {}".format(krb5_config)) + self.runenv_info.define_path("KRB5_CONFIG", krb5_config) diff --git a/recipes/krb5/all/patches/0001-no-tests.patch b/recipes/krb5/all/patches/0001-no-tests.patch new file mode 100644 index 0000000000000..6277a45dd0a98 --- /dev/null +++ b/recipes/krb5/all/patches/0001-no-tests.patch @@ -0,0 +1,13 @@ +diff --git a/src/Makefile.in b/src/Makefile.in +index 8f14e9bf2..dfb6843c9 100644 +--- a/src/Makefile.in ++++ b/src/Makefile.in +@@ -30,7 +30,7 @@ SUBDIRS=util include lib \ + plugins/preauth/spake \ + plugins/preauth/test \ + plugins/tls/k5tls \ +- kdc kadmin kprop clients appl tests \ ++ kdc kadmin kprop clients appl \ + config-files build-tools man doc @po@ + WINSUBDIRS=include util lib ccapi windows clients appl plugins\preauth\spake + BUILDTOP=$(REL). diff --git a/recipes/krb5/all/patches/0002-disable_ksu_root.patch b/recipes/krb5/all/patches/0002-disable_ksu_root.patch new file mode 100644 index 0000000000000..1c0aa45316310 --- /dev/null +++ b/recipes/krb5/all/patches/0002-disable_ksu_root.patch @@ -0,0 +1,13 @@ +diff --git a/src/config/pre.in b/src/config/pre.in +index 3752174..98dbe0f 100644 +--- a/src/config/pre.in ++++ b/src/config/pre.in +@@ -184,7 +184,7 @@ INSTALL_PROGRAM=@INSTALL_PROGRAM@ $(INSTALL_STRIP) + INSTALL_SCRIPT=@INSTALL_PROGRAM@ + INSTALL_DATA=@INSTALL_DATA@ + INSTALL_SHLIB=@INSTALL_SHLIB@ +-INSTALL_SETUID=$(INSTALL) $(INSTALL_STRIP) -m 4755 -o root ++INSTALL_SETUID=$(INSTALL) $(INSTALL_STRIP) -m 755 + ## This is needed because autoconf will sometimes define @exec_prefix@ to be + ## ${prefix}. + prefix=@prefix@ diff --git a/recipes/krb5/all/patches/0003-find-openssl-module.patch b/recipes/krb5/all/patches/0003-find-openssl-module.patch new file mode 100644 index 0000000000000..6c1d8cf5ff6fb --- /dev/null +++ b/recipes/krb5/all/patches/0003-find-openssl-module.patch @@ -0,0 +1,20 @@ +diff --git a/src/configure.ac b/src/configure.ac +index 77be7a2..577da79 100644 +--- a/src/configure.ac ++++ b/src/configure.ac +@@ -295,13 +295,10 @@ AC_ARG_WITH([tls-impl], + [TLS_IMPL=$withval], [TLS_IMPL=auto]) + case "$TLS_IMPL" in + openssl|auto) +- AC_CHECK_LIB(ssl,SSL_CTX_new,[have_lib_ssl=true],[have_lib_ssl=false], +- -lcrypto) +- AC_MSG_CHECKING([for OpenSSL]) ++ PKG_CHECK_MODULES([OPENSSL], [openssl >= 1.1.0], [have_lib_ssl=true], [have_lib_ssl=false]) + if test x$have_lib_ssl = xtrue ; then + AC_DEFINE(TLS_IMPL_OPENSSL,1,[Define if TLS implementation is OpenSSL]) +- AC_MSG_RESULT([yes]) +- TLS_IMPL_LIBS="-lssl -lcrypto" ++ TLS_IMPL_LIBS=$OPENSSL_LIBS + TLS_IMPL=openssl + AC_MSG_NOTICE([TLS module will use OpenSSL]) + else diff --git a/recipes/krb5/all/test_package/CMakeLists.txt b/recipes/krb5/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..8bf1b7258ab16 --- /dev/null +++ b/recipes/krb5/all/test_package/CMakeLists.txt @@ -0,0 +1,7 @@ +cmake_minimum_required(VERSION 3.1) +project(test_package C) + +find_package(krb5 REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.c) +target_link_libraries(${PROJECT_NAME} PRIVATE krb5::krb5) diff --git a/recipes/krb5/all/test_package/conanfile.py b/recipes/krb5/all/test_package/conanfile.py new file mode 100644 index 0000000000000..23c0291e76c1f --- /dev/null +++ b/recipes/krb5/all/test_package/conanfile.py @@ -0,0 +1,27 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import CMake, cmake_layout +import os + + +class TestPackageConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "CMakeToolchain", "CMakeDeps", "VirtualRunEnv" + test_type = "explicit" + + def layout(self): + cmake_layout(self) + + def requirements(self): + self.requires(self.tested_reference_str) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") + self.run(bin_path, env="conanrun") + diff --git a/recipes/krb5/all/test_package/test_package.c b/recipes/krb5/all/test_package/test_package.c new file mode 100644 index 0000000000000..1e241814c8386 --- /dev/null +++ b/recipes/krb5/all/test_package/test_package.c @@ -0,0 +1,16 @@ +#include "krb5.h" + +#include + +int +main(int argc, char **argv) +{ + krb5_context context; + int ret = krb5_init_context(&context); + if (ret != 0) { + fprintf(stderr, "krb5_init_context failed\n"); + return 1; + } + krb5_free_context(context); + return 0; +} diff --git a/recipes/krb5/config.yml b/recipes/krb5/config.yml new file mode 100644 index 0000000000000..5522f8acd1f0a --- /dev/null +++ b/recipes/krb5/config.yml @@ -0,0 +1,3 @@ +versions: + "1.21.2": + folder: "all" diff --git a/recipes/ktx/all/conandata.yml b/recipes/ktx/all/conandata.yml index bc8cca1018446..a63666c9c170a 100644 --- a/recipes/ktx/all/conandata.yml +++ b/recipes/ktx/all/conandata.yml @@ -1,10 +1,16 @@ sources: + "4.3.2": + url: "https://github.com/KhronosGroup/KTX-Software/archive/refs/tags/v4.3.2.tar.gz" + sha256: "74a114f465442832152e955a2094274b446c7b2427c77b1964c85c173a52ea1f" "4.0.0": url: "https://github.com/KhronosGroup/KTX-Software/archive/refs/tags/v4.0.0.tar.gz" sha256: "6091f5064d0cfd54c6155bb6c0d2ba7287f312d109010e9b702839ac78529fd3" patches: + "4.3.2": + - patch_file: "patches/4.3.2/0001-objutil-cxx-std.patch" + - patch_file: "patches/4.3.2/0004-unvendor-dependencies.patch" "4.0.0": - - patch_file: "patches/0001-objutil-cxx-std.patch" - - patch_file: "patches/0002-lodepng-no-export-symbols.patch" - - patch_file: "patches/0003-clamp-include-algorithm.patch" - - patch_file: "patches/0004-unvendor-dependencies.patch" + - patch_file: "patches/4.0.0/0001-objutil-cxx-std.patch" + - patch_file: "patches/4.0.0/0002-lodepng-no-export-symbols.patch" + - patch_file: "patches/4.0.0/0003-clamp-include-algorithm.patch" + - patch_file: "patches/4.0.0/0004-unvendor-dependencies.patch" diff --git a/recipes/ktx/all/conanfile.py b/recipes/ktx/all/conanfile.py index 5d9cc3ea68050..a7aab249baf8d 100644 --- a/recipes/ktx/all/conanfile.py +++ b/recipes/ktx/all/conanfile.py @@ -1,7 +1,9 @@ from conan import ConanFile +from conan.errors import ConanInvalidConfiguration from conan.tools.build import check_min_cppstd, stdcpp_library from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout -from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rmdir +from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rmdir, replace_in_file, save +from conan.tools.scm import Version import os required_conan_version = ">=1.53.0" @@ -29,6 +31,25 @@ class KtxConan(ConanFile): "tools": True, } + @property + def _min_cppstd(self): + if Version(self.version) < "4.3.2": + return 11 + return 17 + + @property + def _compilers_minimum_version(self): + if self._min_cppstd == 17: + return { + "gcc": "8", + "clang": "7", + "apple-clang": "10", + "msvc": "191", + "Visual Studio": "15", + } + return {} + + @property def _has_sse_support(self): return self.settings.arch in ["x86", "x86_64"] @@ -53,15 +74,30 @@ def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - self.requires("lodepng/cci.20230410") + if Version(self.version) < "4.2.0": + # Newer versions use modified lodepng + # https://github.com/KhronosGroup/KTX-Software/blob/v4.2.1/tools/imageio/png.imageio/lodepng.h#L26-L32 + self.requires("lodepng/cci.20230410") self.requires("zstd/1.5.5") def validate(self): if self.settings.compiler.get_safe("cppstd"): - check_min_cppstd(self, 11) + check_min_cppstd(self, self._min_cppstd) + minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) + if minimum_version and Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration( + f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." + ) + if Version(self.version) >= "4.2" and self.settings.compiler == "gcc" and Version(self.settings.compiler.version) < 6: + # astcenc_vecmathlib_sse_4.h:809:41: error: the last argument must be a 4-bit immediate + raise ConanInvalidConfiguration("GCC v6+ is required") def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) + # Avoid copying of 300 MB of test assets and third-party binaries + rmdir(self, os.path.join(self.source_folder, "tests")) + rmdir(self, os.path.join(self.source_folder, "other_lib")) + save(self, os.path.join(self.source_folder, "tests", "CMakeLists.txt"), "") def generate(self): tc = CMakeToolchain(self) @@ -73,6 +109,7 @@ def generate(self): tc.variables["BASISU_SUPPORT_SSE"] = self.options.get_safe("sse", False) tc.generate() deps = CMakeDeps(self) + deps.set_property("zstd", "cmake_target_name", "zstd::libzstd") deps.generate() def _patch_sources(self): @@ -80,11 +117,16 @@ def _patch_sources(self): # Unvendor several libs (we rely on patch files to link those libs) # It's worth noting that vendored jpeg-compressor can't be replaced by CCI equivalent basisu_dir = os.path.join(self.source_folder, "lib", "basisu") - ## lodepng (the patch file 0002-lodepng-no-export-symbols is important, in order to not try to export lodepng symbols) - os.remove(os.path.join(basisu_dir, "encoder", "lodepng.cpp")) - os.remove(os.path.join(basisu_dir, "encoder", "lodepng.h")) + if Version(self.version) < "4.1.0": + ## lodepng (the patch file 0002-lodepng-no-export-symbols is important, in order to not try to export lodepng symbols) + os.remove(os.path.join(basisu_dir, "encoder", "lodepng.cpp")) + os.remove(os.path.join(basisu_dir, "encoder", "lodepng.h")) ## zstd rmdir(self, os.path.join(basisu_dir, "zstd")) + # disable -Werror + if Version(self.version) >= "4.3.2": + replace_in_file(self, os.path.join(self.source_folder, "lib", "astc-encoder", "Source", "cmake_core.cmake"), + "-Werror", "") def build(self): self._patch_sources() @@ -125,6 +167,8 @@ def package_info(self): self.cpp_info.components["libktx"].names["cmake_find_package"] = "ktx" self.cpp_info.components["libktx"].names["cmake_find_package_multi"] = "ktx" self.cpp_info.components["libktx"].set_property("cmake_target_name", "KTX::ktx") - self.cpp_info.components["libktx"].requires = ["lodepng::lodepng", "zstd::zstd"] + self.cpp_info.components["libktx"].requires = ["zstd::zstd"] + if Version(self.version) < "4.2.0": + self.cpp_info.components["libktx"].requires.append("lodepng::lodepng") if self.options.tools: self.env_info.PATH.append(os.path.join(self.package_folder, "bin")) diff --git a/recipes/ktx/all/patches/0004-unvendor-dependencies.patch b/recipes/ktx/all/patches/0004-unvendor-dependencies.patch deleted file mode 100644 index d09e2d811a873..0000000000000 --- a/recipes/ktx/all/patches/0004-unvendor-dependencies.patch +++ /dev/null @@ -1,48 +0,0 @@ ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -121,7 +121,6 @@ set(KTX_MAIN_SRC - lib/basisu/transcoder/basisu_transcoder.cpp - lib/basisu/transcoder/basisu_transcoder.h - lib/basisu/transcoder/basisu.h -- lib/basisu/zstd/zstd.c - lib/checkheader.c - lib/dfdutils/createdfd.c - lib/dfdutils/colourspaces.c -@@ -415,11 +414,13 @@ PRIVATE - lib/basisu/encoder/cppspmd_type_aliases.h - lib/basisu/encoder/jpgd.cpp - lib/basisu/encoder/jpgd.h -- lib/basisu/encoder/lodepng.cpp -- lib/basisu/encoder/lodepng.h - lib/writer1.c - lib/writer2.c - ) -+find_package(lodepng REQUIRED CONFIG) -+find_package(zstd REQUIRED CONFIG) -+target_link_libraries(ktx PRIVATE lodepng::lodepng $,zstd::libzstd_shared,zstd::libzstd_static>) -+target_link_libraries(ktx_read PRIVATE $,zstd::libzstd_shared,zstd::libzstd_static>) - target_include_directories( - ktx - PRIVATE ---- a/tools/toktx/CMakeLists.txt -+++ b/tools/toktx/CMakeLists.txt -@@ -28,6 +28,8 @@ PRIVATE - target_link_libraries( - toktx - ktx -+ lodepng::lodepng -+ $,zstd::libzstd_shared,zstd::libzstd_static> - ) - - target_compile_definitions( ---- a/tools/toktx/pngimage.cc -+++ b/tools/toktx/pngimage.cc -@@ -21,7 +21,7 @@ - #include - - #include "image.hpp" --#include "encoder/lodepng.h" -+#include - #include - #include "dfd.h" - diff --git a/recipes/ktx/all/patches/0001-objutil-cxx-std.patch b/recipes/ktx/all/patches/4.0.0/0001-objutil-cxx-std.patch similarity index 100% rename from recipes/ktx/all/patches/0001-objutil-cxx-std.patch rename to recipes/ktx/all/patches/4.0.0/0001-objutil-cxx-std.patch diff --git a/recipes/ktx/all/patches/0002-lodepng-no-export-symbols.patch b/recipes/ktx/all/patches/4.0.0/0002-lodepng-no-export-symbols.patch similarity index 100% rename from recipes/ktx/all/patches/0002-lodepng-no-export-symbols.patch rename to recipes/ktx/all/patches/4.0.0/0002-lodepng-no-export-symbols.patch diff --git a/recipes/ktx/all/patches/0003-clamp-include-algorithm.patch b/recipes/ktx/all/patches/4.0.0/0003-clamp-include-algorithm.patch similarity index 100% rename from recipes/ktx/all/patches/0003-clamp-include-algorithm.patch rename to recipes/ktx/all/patches/4.0.0/0003-clamp-include-algorithm.patch diff --git a/recipes/ktx/all/patches/4.0.0/0004-unvendor-dependencies.patch b/recipes/ktx/all/patches/4.0.0/0004-unvendor-dependencies.patch new file mode 100644 index 0000000000000..076b9eecaa908 --- /dev/null +++ b/recipes/ktx/all/patches/4.0.0/0004-unvendor-dependencies.patch @@ -0,0 +1,48 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -121,7 +121,6 @@ set(KTX_MAIN_SRC + lib/basisu/transcoder/basisu_transcoder.cpp + lib/basisu/transcoder/basisu_transcoder.h + lib/basisu/transcoder/basisu.h +- lib/basisu/zstd/zstd.c + lib/checkheader.c + lib/dfdutils/createdfd.c + lib/dfdutils/colourspaces.c +@@ -415,11 +414,13 @@ PRIVATE + lib/basisu/encoder/cppspmd_type_aliases.h + lib/basisu/encoder/jpgd.cpp + lib/basisu/encoder/jpgd.h +- lib/basisu/encoder/lodepng.cpp +- lib/basisu/encoder/lodepng.h + lib/writer1.c + lib/writer2.c + ) ++find_package(lodepng REQUIRED CONFIG) ++find_package(zstd REQUIRED CONFIG) ++target_link_libraries(ktx PRIVATE lodepng::lodepng zstd::libzstd) ++target_link_libraries(ktx_read PRIVATE zstd::libzstd) + target_include_directories( + ktx + PRIVATE +--- a/tools/toktx/CMakeLists.txt ++++ b/tools/toktx/CMakeLists.txt +@@ -28,6 +28,8 @@ PRIVATE + target_link_libraries( + toktx + ktx ++ lodepng::lodepng ++ zstd::libzstd + ) + + target_compile_definitions( +--- a/tools/toktx/pngimage.cc ++++ b/tools/toktx/pngimage.cc +@@ -21,7 +21,7 @@ + #include + + #include "image.hpp" +-#include "encoder/lodepng.h" ++#include + #include + #include "dfd.h" + diff --git a/recipes/ktx/all/patches/4.3.2/0001-objutil-cxx-std.patch b/recipes/ktx/all/patches/4.3.2/0001-objutil-cxx-std.patch new file mode 100644 index 0000000000000..fee67e7e70f54 --- /dev/null +++ b/recipes/ktx/all/patches/4.3.2/0001-objutil-cxx-std.patch @@ -0,0 +1,10 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -972,6 +972,6 @@ + PUBLIC + utils + ) +- ++target_compile_features(objUtil PUBLIC cxx_std_11) + # In C++ apps that use statically linked Libraries all compilatiom units must + # be compiled with matching symbol visibility settings to avoid warnings from diff --git a/recipes/ktx/all/patches/4.3.2/0004-unvendor-dependencies.patch b/recipes/ktx/all/patches/4.3.2/0004-unvendor-dependencies.patch new file mode 100644 index 0000000000000..5fb6ef588fa4e --- /dev/null +++ b/recipes/ktx/all/patches/4.3.2/0004-unvendor-dependencies.patch @@ -0,0 +1,21 @@ +--- CMakeLists.txt ++++ CMakeLists.txt +@@ -355,7 +355,6 @@ + lib/basisu/transcoder/basisu_transcoder.cpp + lib/basisu/transcoder/basisu_transcoder.h + lib/basisu/transcoder/basisu.h +- lib/basisu/zstd/zstd.c + lib/checkheader.c + lib/dfdutils/createdfd.c + lib/dfdutils/colourspaces.c +@@ -765,6 +764,10 @@ + BASISD_SUPPORT_KTX2=0 + ) + ++find_package(zstd REQUIRED CONFIG) ++target_link_libraries(ktx PUBLIC zstd::libzstd) ++target_link_libraries(ktx_read PUBLIC zstd::libzstd) ++ + # Turn off these warnings until Rich fixes the occurences. + # It it not clear to me if generator expressions can be used here + # hence the long-winded way. diff --git a/recipes/ktx/all/test_package/conanfile.py b/recipes/ktx/all/test_package/conanfile.py index 5ec8993308c18..98ab55852ad56 100644 --- a/recipes/ktx/all/test_package/conanfile.py +++ b/recipes/ktx/all/test_package/conanfile.py @@ -23,5 +23,4 @@ def build(self): def test(self): if can_run(self): bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") - ktx_path = os.path.join(self.source_folder, "etc1.ktx") - self.run(f"{bin_path} {ktx_path}", env="conanrun") + self.run(bin_path, env="conanrun") diff --git a/recipes/ktx/all/test_package/etc1.ktx b/recipes/ktx/all/test_package/etc1.ktx deleted file mode 100644 index ff6f8186fd1db..0000000000000 Binary files a/recipes/ktx/all/test_package/etc1.ktx and /dev/null differ diff --git a/recipes/ktx/all/test_package/test_package.c b/recipes/ktx/all/test_package/test_package.c index f877690cdb0d6..ebd19452339ab 100644 --- a/recipes/ktx/all/test_package/test_package.c +++ b/recipes/ktx/all/test_package/test_package.c @@ -4,16 +4,12 @@ int main(int argc, char **argv) { - if (argc < 2) { - fprintf(stderr, "Need at least one argument\n"); - return 1; - } - ktxTexture* texture; KTX_error_code result; - result = ktxTexture_CreateFromNamedFile(argv[1], + result = ktxTexture_CreateFromNamedFile("fake-file.ktx", KTX_TEXTURE_CREATE_LOAD_IMAGE_DATA_BIT, &texture); + printf("Test: %s\n", ktxErrorString(result)); return 0; } diff --git a/recipes/ktx/all/test_v1_package/conanfile.py b/recipes/ktx/all/test_v1_package/conanfile.py index d6484909910f3..38f4483872d47 100644 --- a/recipes/ktx/all/test_v1_package/conanfile.py +++ b/recipes/ktx/all/test_v1_package/conanfile.py @@ -14,5 +14,4 @@ def build(self): def test(self): if not tools.cross_building(self): bin_path = os.path.join("bin", "test_package") - ktx_path = os.path.join(self.source_folder, os.pardir, "test_package", "etc1.ktx") - self.run(f"{bin_path} {ktx_path}", run_environment=True) + self.run(bin_path, run_environment=True) diff --git a/recipes/ktx/config.yml b/recipes/ktx/config.yml index d2be8f453d7c0..6d8c546915dba 100644 --- a/recipes/ktx/config.yml +++ b/recipes/ktx/config.yml @@ -1,3 +1,5 @@ versions: + "4.3.2": + folder: all "4.0.0": folder: all diff --git a/recipes/kuliya/all/conandata.yml b/recipes/kuliya/all/conandata.yml new file mode 100644 index 0000000000000..06675980fd094 --- /dev/null +++ b/recipes/kuliya/all/conandata.yml @@ -0,0 +1,10 @@ +sources: + "1.0.0": + release: + url: "https://github.com/dzcode-io/kuliya/releases/download/c-v1.0.0/c-release.tar.gz" + sha256: "a0e064d29358e40245dc8b7b35160a6b15e10059e4bd42d9dc4f0af76d031e5f" + # Old versions don't have the license embed in the release tar, download it separatedly for now + # from the commit of the upstream tag + license: + url: "https://raw.githubusercontent.com/dzcode-io/kuliya/c-v1.0.0/LICENSE" + sha256: "70884fb7eff4f91c8d776f8cf7bd93cce0c93213f57153956189b488cfd911be" diff --git a/recipes/kuliya/all/conanfile.py b/recipes/kuliya/all/conanfile.py new file mode 100644 index 0000000000000..ad769bd5235f6 --- /dev/null +++ b/recipes/kuliya/all/conanfile.py @@ -0,0 +1,40 @@ +from conan import ConanFile +from conan.tools.files import copy, get, download +from conan.tools.layout import basic_layout +import os + +required_conan_version = ">=1.50.0" + + +class JsmnConan(ConanFile): + name = "kuliya" + description = "Algeria's college hierarchy dataset as a C library." + license = "MIT" + topics = ("dataset", "api", "dz", "header-only") + homepage = "https://github.com/dzcode-io/kuliya" + url = "https://github.com/conan-io/conan-center-index" + package_type = "header-library" + settings = "os", "arch", "compiler", "build_type" + no_copy_source = True + + def layout(self): + basic_layout(self, src_folder="src") + + def package_id(self): + self.info.clear() + + def source(self): + get(self, **self.conan_data["sources"][self.version]["release"], strip_root=True) + download(self, **self.conan_data["sources"][self.version]["license"], filename="LICENSE") + + def build(self): + pass + + def package(self): + copy(self, "LICENSE", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) + copy(self, "kuliya.h", src=self.source_folder, dst=os.path.join(self.package_folder, "include")) + copy(self, "data.h", src=self.source_folder, dst=os.path.join(self.package_folder, "include")) + + def package_info(self): + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] diff --git a/recipes/kuliya/all/test_package/CMakeLists.txt b/recipes/kuliya/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..6ca62a693d64a --- /dev/null +++ b/recipes/kuliya/all/test_package/CMakeLists.txt @@ -0,0 +1,7 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES C) + +find_package(kuliya REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.c) +target_link_libraries(${PROJECT_NAME} PRIVATE kuliya::kuliya) diff --git a/recipes/kuliya/all/test_package/conanfile.py b/recipes/kuliya/all/test_package/conanfile.py new file mode 100644 index 0000000000000..0a6bc68712d90 --- /dev/null +++ b/recipes/kuliya/all/test_package/conanfile.py @@ -0,0 +1,26 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import CMake, cmake_layout +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeToolchain", "CMakeDeps", "VirtualRunEnv" + test_type = "explicit" + + def layout(self): + cmake_layout(self) + + def requirements(self): + self.requires(self.tested_reference_str) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/kuliya/all/test_package/test_package.c b/recipes/kuliya/all/test_package/test_package.c new file mode 100644 index 0000000000000..5e3b275cf2747 --- /dev/null +++ b/recipes/kuliya/all/test_package/test_package.c @@ -0,0 +1,13 @@ +#undef NDEBUG + +#include +#include +#include + +int main() +{ + kuliya_init(); + kuliya_schema *res = get_node_by_path("umkb/fst"); + assert(strcmp(res->name.en, "Faculty of Science and Technology") == 0); + kuliya_deinit(); +} diff --git a/recipes/kuliya/config.yml b/recipes/kuliya/config.yml new file mode 100644 index 0000000000000..40341aa3db6cd --- /dev/null +++ b/recipes/kuliya/config.yml @@ -0,0 +1,3 @@ +versions: + "1.0.0": + folder: all diff --git a/recipes/laslib/all/test_package/CMakeLists.txt b/recipes/laslib/all/test_package/CMakeLists.txt index befc74c6fea6a..37bb2bb665c3c 100644 --- a/recipes/laslib/all/test_package/CMakeLists.txt +++ b/recipes/laslib/all/test_package/CMakeLists.txt @@ -5,11 +5,5 @@ find_package(laslib REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) -add_custom_command( - TARGET ${PROJECT_NAME} POST_BUILD - COMMAND ${CMAKE_COMMAND} -E copy - ${CMAKE_CURRENT_SOURCE_DIR}/test.laz - ${CMAKE_BINARY_DIR}/test.laz) - target_link_libraries(${PROJECT_NAME} PRIVATE laslib::laslib) target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) diff --git a/recipes/laslib/all/test_package/test.laz b/recipes/laslib/all/test_package/test.laz deleted file mode 100644 index 0fc46a30c39b6..0000000000000 Binary files a/recipes/laslib/all/test_package/test.laz and /dev/null differ diff --git a/recipes/laslib/all/test_package/test_package.cpp b/recipes/laslib/all/test_package/test_package.cpp index d25d430326ff1..39f06f0b590d3 100644 --- a/recipes/laslib/all/test_package/test_package.cpp +++ b/recipes/laslib/all/test_package/test_package.cpp @@ -4,10 +4,9 @@ int main(void) { LASreadOpener readOpener; - readOpener.set_file_name("test.laz"); - LASreader* lasreader = readOpener.open(); + readOpener.set_file_name("test_package.cpp"); - std::cout << "test.laz number of points : " << lasreader->header.number_of_point_records << std::endl; + std::cout << "Test: " << readOpener.active() << std::endl; return EXIT_SUCCESS; } diff --git a/recipes/laszip/all/conandata.yml b/recipes/laszip/all/conandata.yml index ec975a7f08b7b..8adc75c9b51ce 100644 --- a/recipes/laszip/all/conandata.yml +++ b/recipes/laszip/all/conandata.yml @@ -2,7 +2,16 @@ sources: "3.4.3": url: "https://github.com/LASzip/LASzip/releases/download/3.4.3/laszip-src-3.4.3.tar.bz2" sha256: "5775eb0b97de1b77514d47534cc65c6cfb5bebdd8aed0e47a23af8e75b7ea887" + "3.4.4": + url: "https://github.com/LASzip/LASzip/archive/refs/tags/3.4.4.tar.gz" + sha256: "6d034bf3a400f81317a5dbad59d1b7ce82d971e887ca22d15813b914f0a5c281" patches: "3.4.3": - patch_file: "patches/0001-no-build-laszip-api.patch" - patch_file: "patches/0002-no-rpath-and-relocatable-macos.patch" + "3.4.4": + - patch_file: "patches/0001-3.4.4-no-build-laszip-api.patch" + - patch_file: "patches/0002-3.4.4-no-rpath-and-relocatable-macos.patch" + - patch_file: "patches/0003-3.4.4-remove-cppstd-hardcode.patch" + patch_type: "conan" + patch_description: "Let Conan set the cppstd, instead of forcing it (In this version it's incorreclty set to C++17 instead of the supported C++14)" diff --git a/recipes/laszip/all/conanfile.py b/recipes/laszip/all/conanfile.py index a88e4d8aa5712..30e72169c7cd5 100644 --- a/recipes/laszip/all/conanfile.py +++ b/recipes/laszip/all/conanfile.py @@ -1,5 +1,5 @@ from conan import ConanFile -from conan.tools.build import stdcpp_library +from conan.tools.build import stdcpp_library, check_min_cppstd from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get from conan.tools.scm import Version @@ -27,6 +27,10 @@ class LaszipConan(ConanFile): "fPIC": True, } + @property + def _min_cppstd(self): + return 14 + def export_sources(self): export_conandata_patches(self) @@ -35,8 +39,14 @@ def config_options(self): del self.options.fPIC def configure(self): + if Version(self.version) >= "3.4.4": + self.license = "Apache-2.0" if self.options.shared: self.options.rm_safe("fPIC") + + def validate(self): + if self.settings.compiler.get_safe("cppstd"): + check_min_cppstd(self, self._min_cppstd) def layout(self): cmake_layout(self, src_folder="src") diff --git a/recipes/laszip/all/patches/0001-3.4.4-no-build-laszip-api.patch b/recipes/laszip/all/patches/0001-3.4.4-no-build-laszip-api.patch new file mode 100644 index 0000000000000..8e99797f7ecb7 --- /dev/null +++ b/recipes/laszip/all/patches/0001-3.4.4-no-build-laszip-api.patch @@ -0,0 +1,8 @@ +--- a/dll/CMakeLists.txt ++++ b/dll/CMakeLists.txt +@@ -2,5 +2,4 @@ set(LASZIP_API_SOURCES + laszip_api.c + ) + +-LASZIP_ADD_LIBRARY(${LASZIP_API_LIB_NAME} ${LASZIP_API_SOURCES}) + LASZIP_ADD_INCLUDES("laszip" "${CMAKE_CURRENT_SOURCE_DIR}/laszip_api.h" ${LASZIP_API_VERSION_H}) diff --git a/recipes/laszip/all/patches/0002-3.4.4-no-rpath-and-relocatable-macos.patch b/recipes/laszip/all/patches/0002-3.4.4-no-rpath-and-relocatable-macos.patch new file mode 100644 index 0000000000000..5aa1f83f0fd18 --- /dev/null +++ b/recipes/laszip/all/patches/0002-3.4.4-no-rpath-and-relocatable-macos.patch @@ -0,0 +1,29 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -81,15 +81,11 @@ file(MAKE_DIRECTORY "${LASZIP_OUTPUT_BIN_DIR}") + # per http://www.cmake.org/Wiki/CMake_RPATH_handling + SET(CMAKE_SKIP_BUILD_RPATH FALSE) + SET(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE) +-SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) + IF (APPLE) + SET(MACOSX_RPATH ON) + endif() + LIST(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES + "${CMAKE_INSTALL_PREFIX}/${LASZIP_LIB_INSTALL_DIR}" isSystemDir) +-IF("${isSystemDir}" STREQUAL "-1") +- SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${LASZIP_LIB_INSTALL_DIR}") +-ENDIF("${isSystemDir}" STREQUAL "-1") + + # wipe lib/ drectory on clean. It will have plugins that could be out of date + # in the next build +--- a/cmake/macros.cmake ++++ b/cmake/macros.cmake +@@ -71,8 +71,6 @@ macro(LASZIP_ADD_LIBRARY _name) + LIBRARY DESTINATION ${LASZIP_LIB_INSTALL_DIR} + ARCHIVE DESTINATION ${LASZIP_LIB_INSTALL_DIR}) + if (APPLE) +- set_target_properties(${_name} PROPERTIES INSTALL_NAME_DIR +- "@executable_path/../lib") + endif() + endmacro(LASZIP_ADD_LIBRARY) + diff --git a/recipes/laszip/all/patches/0003-3.4.4-remove-cppstd-hardcode.patch b/recipes/laszip/all/patches/0003-3.4.4-remove-cppstd-hardcode.patch new file mode 100644 index 0000000000000..1dbe071adbbce --- /dev/null +++ b/recipes/laszip/all/patches/0003-3.4.4-remove-cppstd-hardcode.patch @@ -0,0 +1,12 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 4b0a02b..a9cc6b5 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,7 +1,6 @@ + cmake_minimum_required(VERSION 3.10) + + project(LASZIP CXX C) +-set(CMAKE_CXX_STANDARD 17) + string(TOLOWER ${PROJECT_NAME} PROJECT_NAME_LOWER) + + set(ROOT_DIR "${PROJECT_SOURCE_DIR}") diff --git a/recipes/laszip/config.yml b/recipes/laszip/config.yml index 0d0a2f21c9983..a2d2267e94e46 100644 --- a/recipes/laszip/config.yml +++ b/recipes/laszip/config.yml @@ -1,3 +1,5 @@ versions: + "3.4.4": + folder: all "3.4.3": folder: all diff --git a/recipes/lely-core/all/conandata.yml b/recipes/lely-core/all/conandata.yml index 365fdf916f614..a02c4e51288f2 100644 --- a/recipes/lely-core/all/conandata.yml +++ b/recipes/lely-core/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.3.4": + url: "https://gitlab.com/lely_industries/lely-core/-/archive/v2.3.4/lely-core-v2.3.4.tar.gz" + sha256: "6f31b4fd7ea6aafb1a62b9d956a12a900386564859099e97af1c6bd1d10bdaf2" "2.3.3": url: "https://gitlab.com/lely_industries/lely-core/-/archive/v2.3.3/lely-core-v2.3.3.tar.gz" sha256: "6d0810f9e835543f0aeb5f86dcdc7a24578041f5d0a714bf5a14db2cb24ce373" diff --git a/recipes/lely-core/all/conanfile.py b/recipes/lely-core/all/conanfile.py index 9ed8f191a0a19..7e88aacc94143 100644 --- a/recipes/lely-core/all/conanfile.py +++ b/recipes/lely-core/all/conanfile.py @@ -12,13 +12,18 @@ class LelyConan(ConanFile): name = "lely-core" + description = ( + "The Lely core libraries are a collection of C and C++ libraries and tools, " + "providing high-performance I/O and sensor/actuator control for robotics and IoT applications. " + "The libraries are cross-platform and have few dependencies. " + "They can be even be used on bare-metal microcontrollers with as little as 32 kB RAM." + ) license = "Apache-2.0" - homepage = "https://gitlab.com/lely_industries/lely-core/" url = "https://github.com/conan-io/conan-center-index" - description = "The Lely core libraries are a collection of C and C++ libraries and tools, providing high-performance I/O and sensor/actuator control for robotics and IoT applications. The libraries are cross-platform and have few dependencies. They can be even be used on bare-metal microcontrollers with as little as 32 kB RAM." + homepage = "https://gitlab.com/lely_industries/lely-core/" topics = ("canopen",) package_type = "library" - settings = "os", "compiler", "build_type", "arch" + settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], "fPIC": [True, False], diff --git a/recipes/lely-core/all/test_package/CMakeLists.txt b/recipes/lely-core/all/test_package/CMakeLists.txt index c8be0aec2f07e..f6bd04d2f5aad 100644 --- a/recipes/lely-core/all/test_package/CMakeLists.txt +++ b/recipes/lely-core/all/test_package/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.2) -project(test_package) +project(test_package LANGUAGES CXX) find_package(lely-core REQUIRED) diff --git a/recipes/lely-core/config.yml b/recipes/lely-core/config.yml index 5ca4acfdc4f7b..e8d99700ff1a0 100644 --- a/recipes/lely-core/config.yml +++ b/recipes/lely-core/config.yml @@ -1,4 +1,6 @@ versions: + "2.3.4": + folder: all "2.3.3": folder: all "2.3.2": diff --git a/recipes/leopard/all/conandata.yml b/recipes/leopard/all/conandata.yml new file mode 100644 index 0000000000000..293257cff4fed --- /dev/null +++ b/recipes/leopard/all/conandata.yml @@ -0,0 +1,7 @@ +sources: + "2.1.0": + url: "https://github.com/hosseinmoein/Leopard/archive/refs/tags/2.1.0.tar.gz" + sha256: "26b57fdea4cd94ddbc34a478e978632637cde2fc263bdf2d6bdfd3e9ddd0b1d5" + "2.0.0": + url: "https://github.com/hosseinmoein/Leopard/archive/refs/tags/2.0.0.tar.gz" + sha256: "c24ac5d2555c4496f26662925061a52ae1b2265ae9fc91b0cce19d1647d62699" diff --git a/recipes/leopard/all/conanfile.py b/recipes/leopard/all/conanfile.py new file mode 100644 index 0000000000000..f2a3c9d555477 --- /dev/null +++ b/recipes/leopard/all/conanfile.py @@ -0,0 +1,80 @@ +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.build import check_min_cppstd +from conan.tools.files import get, copy +from conan.tools.layout import basic_layout +from conan.tools.scm import Version +import os + + +required_conan_version = ">=1.52.0" + + +class LeopardConan(ConanFile): + name = "leopard" + description = "C++ light-weight Thread Pool library" + license = "BSD-3-Clause" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/hosseinmoein/Leopard" + topics = ("async", "concurrency", "multithreading", "threadpool", "header-only") + package_type = "header-library" + settings = "os", "arch", "compiler", "build_type" + no_copy_source = True + + @property + def _min_cppstd(self): + return 20 + + @property + def _compilers_minimum_version(self): + return { + "gcc": "11", + "clang": "12", + "apple-clang": "14", + "Visual Studio": "16", + "msvc": "192", + } + + def layout(self): + basic_layout(self, src_folder="src") + + def package_id(self): + self.info.clear() + + def validate(self): + if self.settings.compiler.get_safe("cppstd"): + check_min_cppstd(self, self._min_cppstd) + minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) + if minimum_version and Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration( + f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." + ) + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def package(self): + copy(self, pattern="License", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) + copy( + self, + pattern="*.h", + dst=os.path.join(self.package_folder, "include"), + src=os.path.join(self.source_folder, "include"), + ) + copy( + self, + pattern="*.tcc", + dst=os.path.join(self.package_folder, "include"), + src=os.path.join(self.source_folder, "include"), + ) + + def package_info(self): + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] + + self.cpp_info.set_property("cmake_file_name", "ThreadPool") + self.cpp_info.set_property("cmake_target_name", "ThreadPool::ThreadPool") + self.cpp_info.set_property("pkg_config_name", "ThreadPool") + + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.system_libs.extend(["pthread", "dl", "m"]) diff --git a/recipes/leopard/all/test_package/CMakeLists.txt b/recipes/leopard/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..ea0b1b09a817d --- /dev/null +++ b/recipes/leopard/all/test_package/CMakeLists.txt @@ -0,0 +1,12 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) + +find_package(ThreadPool REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE ThreadPool::ThreadPool) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_20) + +if(ThreadPool_VERSION VERSION_LESS 2.1.0) + target_compile_definitions(${PROJECT_NAME} PRIVATE "THREADPOOL_LESS_2_1_0") +endif() diff --git a/recipes/leopard/all/test_package/conanfile.py b/recipes/leopard/all/test_package/conanfile.py new file mode 100644 index 0000000000000..3a91c9439218e --- /dev/null +++ b/recipes/leopard/all/test_package/conanfile.py @@ -0,0 +1,26 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def layout(self): + cmake_layout(self) + + def requirements(self): + self.requires(self.tested_reference_str) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/leopard/all/test_package/test_package.cpp b/recipes/leopard/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..abf2d43498e45 --- /dev/null +++ b/recipes/leopard/all/test_package/test_package.cpp @@ -0,0 +1,69 @@ +#ifdef THREADPOOL_LESS_2_1_0 +#include +#else +#include +#endif + +#include +#include +#include +#include +#include +#include +#include +#include + +using namespace hmthrp; + +// ---------------------------------------------------------------------------- + +static constexpr std::size_t THREAD_COUNT = 5; + +// ---------------------------------------------------------------------------- + +static void parallel_accumulate() { + + std::cout << "Running parallel_accumulate() ..." << std::endl; + + constexpr std::size_t n { 10003 }; + constexpr std::size_t the_sum { (n * (n + 1)) / 2 }; + std::vector vec (n); + + std::iota(vec.begin(), vec.end(), 1); + + constexpr std::size_t block_size { n / THREAD_COUNT }; + std::vector> futs; + auto block_start = vec.begin(); + ThreadPool thr_pool { THREAD_COUNT }; + + futs.reserve(THREAD_COUNT - 1); + for (std::size_t i = 0; i < (THREAD_COUNT - 1); ++i) { + const auto block_end { block_start + block_size }; + + futs.push_back( + thr_pool.dispatch( + false, + std::accumulate, + block_start, block_end, 0)); + block_start = block_end; + } + + // Last result + // + std::size_t result { std::accumulate(block_start, vec.end(), 0UL) }; + + for (std::size_t i = 0; i < futs.size(); ++i) + result += futs[i].get(); + + assert(result == the_sum); + return; +} + +// ---------------------------------------------------------------------------- + +int main (int, char *[]) { + + parallel_accumulate(); + + return (EXIT_SUCCESS); +} diff --git a/recipes/leopard/config.yml b/recipes/leopard/config.yml new file mode 100644 index 0000000000000..2d136f3fe768d --- /dev/null +++ b/recipes/leopard/config.yml @@ -0,0 +1,5 @@ +versions: + "2.1.0": + folder: all + "2.0.0": + folder: all diff --git a/recipes/leptonica/all/conandata.yml b/recipes/leptonica/all/conandata.yml index 49782e81d8fcd..0a2cd20eab0b4 100644 --- a/recipes/leptonica/all/conandata.yml +++ b/recipes/leptonica/all/conandata.yml @@ -1,28 +1,13 @@ sources: + "1.85.0": + url: "https://github.com/DanBloomberg/leptonica/archive/1.85.0.tar.gz" + sha256: "c01376bce0379d4ea4bc2ec5d5cbddaa49e2f06f88242619ab8c059e21adf233" "1.83.1": url: "https://github.com/DanBloomberg/leptonica/archive/1.83.1.tar.gz" sha256: "4289d0a4224b614010072253531c0455a33a4d7c7a0017fe7825ed382290c0da" - "1.83.0": - url: "https://github.com/DanBloomberg/leptonica/archive/1.83.0.tar.gz" - sha256: "14cf531c2219a1414e8e3c51a3caa5cf021a52e782c4a6561bf64d0ef2119282" "1.82.0": url: "https://github.com/DanBloomberg/leptonica/archive/1.82.0.tar.gz" sha256: "40fa9ac1e815b91e0fa73f0737e60c9eec433a95fa123f95f2573dd3127dd669" "1.81.0": url: "https://github.com/DanBloomberg/leptonica/archive/1.81.0.tar.gz" sha256: "70ebc04ff8b9684205bd1d01843c635a8521255b74813bf7cce9a33368f7952c" - "1.80.0": - url: "https://github.com/DanBloomberg/leptonica/archive/1.80.0.tar.gz" - sha256: "3952b974ec057d24267aae48c54bca68ead8275604bf084a73a4b953ff79196e" - "1.79.0": - url: "https://github.com/DanBloomberg/leptonica/archive/1.79.0.tar.gz" - sha256: "bf9716f91a4844c2682a07ef21eaf68b6f1077af1f63f27c438394fd66218e17" - "1.78.0": - url: "https://github.com/DanBloomberg/leptonica/archive/1.78.0.tar.gz" - sha256: "f8ac4d93cc76b524c2c81d27850bfc342e68b91368aa7a1f7d69e34ce13adbb4" -patches: - "1.78.0": - - patch_file: "patches/fix-find-modules-variables.patch" - patch_description: "CMake: robust handling of dependencies" - patch_type: "portability" - patch_source: "https://github.com/DanBloomberg/leptonica/pull/456" diff --git a/recipes/leptonica/all/conanfile.py b/recipes/leptonica/all/conanfile.py index 6bcb75d8840d6..f19aa2e7c182f 100644 --- a/recipes/leptonica/all/conanfile.py +++ b/recipes/leptonica/all/conanfile.py @@ -72,15 +72,15 @@ def requirements(self): if self.options.with_jpeg == "libjpeg": self.requires("libjpeg/9e") elif self.options.with_jpeg == "libjpeg-turbo": - self.requires("libjpeg-turbo/3.0.1") + self.requires("libjpeg-turbo/3.0.2") elif self.options.with_jpeg == "mozjpeg": self.requires("mozjpeg/4.1.5") if self.options.with_png: - self.requires("libpng/1.6.40") + self.requires("libpng/[>=1.6 <2]") if self.options.with_tiff: self.requires("libtiff/4.6.0") if self.options.with_openjpeg: - self.requires("openjpeg/2.5.0") + self.requires("openjpeg/2.5.2") if self.options.with_webp: self.requires("libwebp/1.3.2") @@ -94,11 +94,17 @@ def source(self): def generate(self): tc = CMakeToolchain(self) - if Version(self.version) < "1.79.0": - tc.variables["STATIC"] = not self.options.shared tc.variables["BUILD_PROG"] = False tc.variables["SW_BUILD"] = False - if Version(self.version) >= "1.83.0": + if Version(self.version) >= "1.85.0": + tc.variables["ENABLE_ZLIB"] = self.options.with_zlib + tc.variables["ENABLE_PNG"] = self.options.with_png + tc.variables["ENABLE_GIF"] = self.options.with_gif + tc.variables["ENABLE_JPEG"] = self.options.with_jpeg + tc.variables["ENABLE_TIFF"] = self.options.with_tiff + tc.variables["ENABLE_WEBP"] = self.options.with_webp + tc.variables["ENABLE_OPENJPEG"] = self.options.with_openjpeg + elif Version(self.version) >= "1.83.0": tc.variables["LIBWEBP_SUPPORT"] = self.options.with_webp tc.variables["OPENJPEG_SUPPORT"] = self.options.with_openjpeg tc.generate() @@ -128,69 +134,56 @@ def _patch_sources(self): replace_in_file(self, cmakelists_src, "${GIF_LIBRARIES}", "GIF::GIF") if not self.options.with_gif: replace_in_file(self, cmakelists_src, "if (GIF_LIBRARIES)", "if(0)") - if Version(self.version) >= "1.83.0": - replace_in_file(self, cmake_configure, "if(GIF_FOUND)", "if(0)") - else: - replace_in_file(self, cmake_configure, "if (GIF_FOUND)", "if(0)") + replace_in_file(self, cmake_configure, "if (GIF_FOUND)", "if(0)") ## libjpeg replace_in_file(self, cmakelists_src, "${JPEG_LIBRARIES}", "JPEG::JPEG") if not self.options.with_jpeg: replace_in_file(self, cmakelists_src, "if (JPEG_LIBRARIES)", "if(0)") - if Version(self.version) >= "1.83.0": - replace_in_file(self, cmake_configure, "if(JPEG_FOUND)", "if(0)") - else: - replace_in_file(self, cmake_configure, "if (JPEG_FOUND)", "if(0)") + replace_in_file(self, cmake_configure, "if (JPEG_FOUND)", "if(0)") ## libpng replace_in_file(self, cmakelists_src, "${PNG_LIBRARIES}", "PNG::PNG") if not self.options.with_png: replace_in_file(self, cmakelists_src, "if (PNG_LIBRARIES)", "if(0)") - if Version(self.version) >= "1.83.0": - replace_in_file(self, cmake_configure, "if(PNG_FOUND)", "if(0)") - else: - replace_in_file(self, cmake_configure, "if (PNG_FOUND)", "if(0)") + replace_in_file(self, cmake_configure, "if (PNG_FOUND)", "if(0)") ## libtiff replace_in_file(self, cmakelists_src, "${TIFF_LIBRARIES}", "TIFF::TIFF") if not self.options.with_tiff: replace_in_file(self, cmakelists_src, "if (TIFF_LIBRARIES)", "if(0)") - if Version(self.version) >= "1.83.0": - replace_in_file(self, cmake_configure, "if(TIFF_FOUND)", "if(0)") - else: - replace_in_file(self, cmake_configure, "if (TIFF_FOUND)", "if(0)") + replace_in_file(self, cmake_configure, "if (TIFF_FOUND)", "if(0)") ## We have to be more aggressive with dependencies found with pkgconfig ## Injection of libdirs is ensured by conan_basic_setup() ## openjpeg - replace_in_file(self, cmakelists_src, "${JP2K_LIBRARIES}", "openjp2") + if Version(self.version) < "1.85.0": + replace_in_file(self, cmakelists_src, "${JP2K_LIBRARIES}", "openjp2") if Version(self.version) < "1.83.0": # pkgconfig is prefered to CMake. Disable pkgconfig so only CMake is used - if Version(self.version) <= "1.78.0": - replace_in_file(self, cmakelists, "pkg_check_modules(JP2K libopenjp2)", "") - else: - replace_in_file(self, cmakelists, "pkg_check_modules(JP2K libopenjp2>=2.0 QUIET)", "") + replace_in_file(self, cmakelists, "pkg_check_modules(JP2K libopenjp2>=2.0 QUIET)", "") # versions below 1.83.0 do not have an option toggle replace_in_file(self, cmakelists, "if(NOT JP2K)", "if(0)") if not self.options.with_openjpeg: replace_in_file(self, cmakelists_src, "if (JP2K_FOUND)", "if(0)") replace_in_file(self, cmake_configure, "if (JP2K_FOUND)", "if(0)") - else: + elif Version(self.version) < "1.85.0": replace_in_file(self, cmakelists, "set(JP2K_INCLUDE_DIRS ${OPENJPEG_INCLUDE_DIRS})", "set(JP2K_INCLUDE_DIRS ${OpenJPEG_INCLUDE_DIRS})") if not self.options.with_openjpeg: - replace_in_file(self, cmake_configure, "if(JP2K_FOUND)", "if(0)") + replace_in_file(self, cmake_configure, "if (JP2K_FOUND)", "if(0)") ## libwebp if Version(self.version) < "1.83.0": # versions below 1.83.0 do not have an option toggle replace_in_file(self, cmakelists, "if(NOT WEBP)", "if(0)") - if Version(self.version) >= "1.79.0": - replace_in_file(self, cmakelists, "if(NOT WEBPMUX)", "if(0)") + replace_in_file(self, cmakelists, "if(NOT WEBPMUX)", "if(0)") if not self.options.with_webp: replace_in_file(self, cmakelists_src, "if (WEBP_FOUND)", "if(0)") replace_in_file(self, cmake_configure, "if (WEBP_FOUND)", "if(0)") - replace_in_file(self, cmakelists_src, - "if (WEBP_FOUND)", - "if (WEBP_FOUND)\n" - "target_link_directories(leptonica PRIVATE ${WEBP_LIBRARY_DIRS} ${WEBPMUX_LIBRARY_DIRS})\n" - "target_compile_definitions(leptonica PRIVATE ${WEBP_CFLAGS_OTHER} ${WEBPMUX_CFLAGS_OTHER})") - replace_in_file(self, cmakelists_src, "${WEBP_LIBRARIES}", "${WEBP_LIBRARIES} ${WEBPMUX_LIBRARIES}") + if Version(self.version) < "1.85.0": + if Version(self.version) >= "1.83.0" and self.options.with_webp: + replace_in_file(self, cmakelists_src, + "if (WEBP_FOUND)", + "if (WEBP_FOUND)\n" + "target_link_directories(leptonica PRIVATE ${WEBP_LIBRARY_DIRS} ${WEBPMUX_LIBRARY_DIRS})\n" + "target_compile_definitions(leptonica PRIVATE ${WEBP_CFLAGS_OTHER} ${WEBPMUX_CFLAGS_OTHER})") + replace_in_file(self, cmakelists_src, "${WEBP_LIBRARIES}", "${WEBP_LIBRARIES} ${WEBPMUX_LIBRARIES}") # Remove detection of fmemopen() on macOS < 10.13 # CheckFunctionExists will find it in the link library. diff --git a/recipes/leptonica/all/patches/fix-find-modules-variables.patch b/recipes/leptonica/all/patches/fix-find-modules-variables.patch deleted file mode 100644 index 3dc86df7e707e..0000000000000 --- a/recipes/leptonica/all/patches/fix-find-modules-variables.patch +++ /dev/null @@ -1,48 +0,0 @@ -see https://github.com/DanBloomberg/leptonica/pull/456 - ---- a/src/CMakeLists.txt -+++ b/src/CMakeLists.txt -@@ -31,33 +31,33 @@ if (NOT STATIC) - target_compile_definitions (leptonica PRIVATE -DLIBLEPT_EXPORTS) - endif() - --if (GIF_LIBRARY) -+if (GIF_LIBRARIES) - target_include_directories (leptonica PUBLIC ${GIF_INCLUDE_DIR}) -- target_link_libraries (leptonica ${GIF_LIBRARY}) -+ target_link_libraries (leptonica ${GIF_LIBRARIES}) - endif() --if (JPEG_LIBRARY) -+if (JPEG_LIBRARIES) - target_include_directories (leptonica PUBLIC ${JPEG_INCLUDE_DIR}) -- target_link_libraries (leptonica ${JPEG_LIBRARY}) -+ target_link_libraries (leptonica ${JPEG_LIBRARIES}) - endif() - if (JP2K_FOUND) - target_include_directories (leptonica PUBLIC ${JP2K_INCLUDE_DIRS}) - target_link_libraries (leptonica ${JP2K_LIBRARIES}) - endif() --if (PNG_LIBRARY) -+if (PNG_LIBRARIES) - target_include_directories (leptonica PUBLIC ${PNG_INCLUDE_DIRS}) -- target_link_libraries (leptonica ${PNG_LIBRARY}) -+ target_link_libraries (leptonica ${PNG_LIBRARIES}) - endif() --if (TIFF_LIBRARY) -+if (TIFF_LIBRARIES) - target_include_directories (leptonica PUBLIC ${TIFF_INCLUDE_DIR}) -- target_link_libraries (leptonica ${TIFF_LIBRARY}) -+ target_link_libraries (leptonica ${TIFF_LIBRARIES}) - endif() - if (WEBP_FOUND) - target_include_directories (leptonica PUBLIC ${WEBP_INCLUDE_DIRS}) - target_link_libraries (leptonica ${WEBP_LIBRARIES}) - endif() --if (ZLIB_LIBRARY) -+if (ZLIB_LIBRARIES) - target_include_directories (leptonica PUBLIC ${ZLIB_INCLUDE_DIR}) -- target_link_libraries (leptonica ${ZLIB_LIBRARY}) -+ target_link_libraries (leptonica ${ZLIB_LIBRARIES}) - endif() - - if (UNIX) diff --git a/recipes/leptonica/config.yml b/recipes/leptonica/config.yml index 7de53a77a3916..73dd82999a627 100644 --- a/recipes/leptonica/config.yml +++ b/recipes/leptonica/config.yml @@ -1,15 +1,9 @@ versions: - "1.83.1": + "1.85.0": folder: all - "1.83.0": + "1.83.1": folder: all "1.82.0": folder: all "1.81.0": folder: all - "1.80.0": - folder: all - "1.79.0": - folder: all - "1.78.0": - folder: all diff --git a/recipes/lerc/all/conandata.yml b/recipes/lerc/all/conandata.yml index 73b69372cf8f4..d53c3de3dfbc3 100644 --- a/recipes/lerc/all/conandata.yml +++ b/recipes/lerc/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "4.0.4": + url: "https://github.com/Esri/lerc/archive/js_v4.0.4.tar.gz" + sha256: "1dc090218387ab8ca615eefd844207be64454e37868b396f3e965ed0dcf83947" "4.0.1": url: "https://github.com/Esri/lerc/archive/js_v4.0.1.tar.gz" sha256: "d771f45b90dd033187d5fad2b99159d0a98d46878d88d3236147c3df297dd544" @@ -12,6 +15,14 @@ sources: url: "https://github.com/Esri/lerc/archive/v2.1.tar.gz" sha256: "7c48de40cd5f09319de4b39c417ff4eec4ad4b6aa5d6144f6ffa9b10d18ec94e" patches: + "4.0.4": + - patch_file: "patches/4.0.0-include-algorithm.patch" + patch_description: "include algorithm header for std::min/max" + patch_type: "portability" + - patch_file: "patches/4.0.4-add-missing-climits-include.patch" + patch_description: "add missing #include " + patch_type: "bugfix" + patch_source: "https://github.com/Esri/lerc/commit/1fc73694263f53cf029c8cac2e632170880f56d4" "4.0.1": - patch_file: "patches/4.0.0-include-algorithm.patch" patch_description: "include algorithm header for std::min/max" diff --git a/recipes/lerc/all/conanfile.py b/recipes/lerc/all/conanfile.py index c64435c5746f7..02e1f24f77f3f 100644 --- a/recipes/lerc/all/conanfile.py +++ b/recipes/lerc/all/conanfile.py @@ -1,5 +1,5 @@ from conan import ConanFile -from conan.tools.build import check_min_cppstd +from conan.tools.build import check_min_cppstd, stdcpp_library from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout from conan.tools.files import export_conandata_patches, apply_conandata_patches, copy, get, rmdir from conan.tools.scm import Version @@ -73,6 +73,8 @@ def package_info(self): self.cpp_info.libs = ["LercLib" if Version(self.version) < "4.0.0" else "Lerc"] if self.settings.os in ["Linux", "FreeBSD"]: self.cpp_info.system_libs.append("m") + if not self.options.shared and stdcpp_library(self): + self.cpp_info.system_libs.append(stdcpp_library(self)) if Version(self.version) >= "3.0": self.cpp_info.set_property("pkg_config_name", "Lerc") diff --git a/recipes/lerc/all/patches/4.0.4-add-missing-climits-include.patch b/recipes/lerc/all/patches/4.0.4-add-missing-climits-include.patch new file mode 100644 index 0000000000000..e65c9a909930e --- /dev/null +++ b/recipes/lerc/all/patches/4.0.4-add-missing-climits-include.patch @@ -0,0 +1,21 @@ +From 1fc73694263f53cf029c8cac2e632170880f56d4 Mon Sep 17 00:00:00 2001 +From: Thomas Maurer +Date: Wed, 8 Nov 2023 12:54:35 -0800 +Subject: [PATCH] add missing include + +--- + src/LercLib/fpl_Compression.cpp | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/LercLib/fpl_Compression.cpp b/src/LercLib/fpl_Compression.cpp +index bea9483..22773dd 100644 +--- a/src/LercLib/fpl_Compression.cpp ++++ b/src/LercLib/fpl_Compression.cpp +@@ -27,6 +27,7 @@ Original coding 2021 Yuriy Yakimenko + #include + #include + #include ++#include + + USING_NAMESPACE_LERC + diff --git a/recipes/lerc/all/test_package/CMakeLists.txt b/recipes/lerc/all/test_package/CMakeLists.txt index 50d07b3052d3e..e4ae3c108dbd4 100644 --- a/recipes/lerc/all/test_package/CMakeLists.txt +++ b/recipes/lerc/all/test_package/CMakeLists.txt @@ -1,12 +1,11 @@ cmake_minimum_required(VERSION 3.8) -project(test_package LANGUAGES CXX) +project(test_package LANGUAGES C CXX) find_package(lerc REQUIRED CONFIG) -add_executable(test_package test_package.cpp) -target_link_libraries(test_package PRIVATE lerc::lerc) -target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) +add_executable(${PROJECT_NAME}_cxx test_package.cpp) +target_link_libraries(${PROJECT_NAME}_cxx PRIVATE lerc::lerc) +target_compile_features(${PROJECT_NAME}_cxx PRIVATE cxx_std_11) -if(lerc_VERSION VERSION_GREATER_EQUAL "3.0") - target_compile_definitions(${PROJECT_NAME} PRIVATE -DLERC_VER3_LATER) -endif() +add_executable(${PROJECT_NAME}_c test_package.c) +target_link_libraries(${PROJECT_NAME}_c PRIVATE lerc::lerc) diff --git a/recipes/lerc/all/test_package/conanfile.py b/recipes/lerc/all/test_package/conanfile.py index 0a6bc68712d90..f5c4345946223 100644 --- a/recipes/lerc/all/test_package/conanfile.py +++ b/recipes/lerc/all/test_package/conanfile.py @@ -22,5 +22,7 @@ def build(self): def test(self): if can_run(self): - bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") + bin_path = os.path.join(self.cpp.build.bindir, "test_package_cxx") + self.run(bin_path, env="conanrun") + bin_path = os.path.join(self.cpp.build.bindir, "test_package_c") self.run(bin_path, env="conanrun") diff --git a/recipes/lerc/all/test_package/test_package.c b/recipes/lerc/all/test_package/test_package.c new file mode 100644 index 0000000000000..193917ddd512b --- /dev/null +++ b/recipes/lerc/all/test_package/test_package.c @@ -0,0 +1,11 @@ +#include + +#include + +int main() { + const uint32_t numBytesBlob = 275714; + uint8_t pLercBlob[1000000]; + uint32_t infoArr[10]; + double dataRangeArr[3]; + lerc_getBlobInfo(&pLercBlob[0], numBytesBlob, infoArr, dataRangeArr, 10, 3); +} diff --git a/recipes/lerc/all/test_package/test_package.cpp b/recipes/lerc/all/test_package/test_package.cpp index c399abcf8d219..98eb0ea449f54 100644 --- a/recipes/lerc/all/test_package/test_package.cpp +++ b/recipes/lerc/all/test_package/test_package.cpp @@ -1,140 +1,12 @@ #include -#include -#include -#include -#include +#include #include -typedef unsigned char Byte; // convenience -typedef unsigned int uint32; - -enum lerc_DataType { dt_char = 0, dt_uchar, dt_short, dt_ushort, dt_int, dt_uint, dt_float, dt_double }; - -void BlobInfo_Print(const uint32* infoArr) -{ - const uint32* ia = infoArr; - printf("version = %d, dataType = %d, nDim = %d, nCols = %d, nRows = %d, nBands = %d, nValidPixels = %d, blobSize = %d\n", - ia[0], ia[1], ia[2], ia[3], ia[4], ia[5], ia[6], ia[7]); -} - -bool BlobInfo_Equal(const uint32* infoArr, uint32 nDim, uint32 nCols, uint32 nRows, uint32 nBands, uint32 dataType) -{ - const uint32* ia = infoArr; - return ia[1] == dataType && ia[2] == nDim && ia[3] == nCols && ia[4] == nRows && ia[5] == nBands; -} - -// Sample 1: float image, 1 band, with some pixels set to invalid / void, maxZError = 0.1 -void sample1() { - const int h = 512; - const int w = 512; - - std::vector zImg(w * h); - std::vector maskByteImg(w * h); - for (int k = 0, i = 0; i < h; ++i) { - for (int j = 0; j < w; ++j, ++k) { - zImg[k] = std::sqrt(static_cast(i * i + j * j)); // smooth surface - zImg[k] += std::rand() % 20; // add some small amplitude noise - - if (j % 100 == 0 || i % 100 == 0) // set some void points - maskByteImg[k] = 0; - else - maskByteImg[k] = 1; - } - } - - - // compress into byte arr - - double maxZErrorWanted = 0.1; - double eps = 0.0001; // safety margin (optional), to account for finite floating point accuracy - double maxZError = maxZErrorWanted - eps; - - uint32 numBytesNeeded = 0; - uint32 numBytesWritten = 0; - - lerc_status hr = lerc_computeCompressedSize(reinterpret_cast(&zImg[0]), // raw image data, row by row, band by band - static_cast(dt_float), 1, w, h, 1, -#ifdef LERC_VER3_LATER - 1, -#endif - maskByteImg.data(), // can give nullptr if all pixels are valid - maxZError, // max coding error per pixel, or precision - &numBytesNeeded); // size of outgoing Lerc blob - - if (hr) - std::cout << "lerc_computeCompressedSize(...) failed" << std::endl; - - uint32 numBytesBlob = numBytesNeeded; - std::vector pLercBlob(numBytesBlob); - - hr = lerc_encode(reinterpret_cast(&zImg[0]), // raw image data, row by row, band by band - static_cast(dt_float), 1, w, h, 1, -#ifdef LERC_VER3_LATER - 1, -#endif - maskByteImg.data(), // can give nullptr if all pixels are valid - maxZError, // max coding error per pixel, or precision - &pLercBlob[0], // buffer to write to, function will fail if buffer too small - numBytesBlob, // buffer size - &numBytesWritten); // num bytes written to buffer - - if (hr) - std::cout << "lerc_encode(...) failed" << std::endl; - - double ratio = w * h * (0.125 + sizeof(float)) / numBytesBlob; - std::cout << "sample 1 compression ratio = " << ratio << std::endl; - - - // decompress - - uint32 infoArr[10]; - double dataRangeArr[3]; - hr = lerc_getBlobInfo(&pLercBlob[0], numBytesBlob, infoArr, dataRangeArr, 10, 3); - if (hr) - std::cout << "lerc_getBlobInfo(...) failed" << std::endl; - - BlobInfo_Print(infoArr); - - if (!BlobInfo_Equal(infoArr, 1, w, h, 1, static_cast(dt_float))) - std::cout << "got wrong lerc info" << std::endl; - - // new empty data storage - std::vector zImg3(w * h); - - std::vector maskByteImg3(w * h); - -#ifdef LERC_VER3_LATER - hr = lerc_decode(&pLercBlob[0], numBytesBlob, 1, maskByteImg3.data(), 1, w, h, 1, static_cast(dt_float), reinterpret_cast(&zImg3[0])); -#else - hr = lerc_decode(&pLercBlob[0], numBytesBlob, &maskByteImg3[0], 1, w, h, 1, static_cast(dt_float), reinterpret_cast(&zImg3[0])); -#endif - if (hr) - std::cout << "lerc_decode(...) failed" << std::endl; - - // compare to orig - - double maxDelta = 0; - for (int k = 0, i = 0; i < h; i++) - { - for (int j = 0; j < w; j++, k++) - { - if (maskByteImg3[k] != maskByteImg[k]) - std::cout << "Error in main: decoded valid bytes differ from encoded valid bytes" << std::endl; - - if (maskByteImg3[k]) - { - double delta = std::fabs(zImg3[k] - zImg[k]); - if (delta > maxDelta) - maxDelta = delta; - } - } - } - - std::cout << "max z error per pixel = " << maxDelta << std::endl; -} - int main() { - sample1(); - return 0; + uint32_t numBytesBlob = 275714; + std::vector pLercBlob(numBytesBlob); + uint32_t infoArr[10]; + double dataRangeArr[3]; + lerc_getBlobInfo(&pLercBlob[0], numBytesBlob, infoArr, dataRangeArr, 10, 3); } diff --git a/recipes/lerc/all/test_v1_package/conanfile.py b/recipes/lerc/all/test_v1_package/conanfile.py index 38f4483872d47..b7e21a6312c34 100644 --- a/recipes/lerc/all/test_v1_package/conanfile.py +++ b/recipes/lerc/all/test_v1_package/conanfile.py @@ -1,3 +1,4 @@ +from conan.tools.microsoft import is_msvc from conans import ConanFile, CMake, tools import os @@ -13,5 +14,9 @@ def build(self): def test(self): if not tools.cross_building(self): - bin_path = os.path.join("bin", "test_package") + bin_path = os.path.join("bin", "test_package_cxx") self.run(bin_path, run_environment=True) + if not is_msvc(self): + # lerc_computeCompressedSize() fails with a stack overflow on MSVC for some reason + bin_path = os.path.join("bin", "test_package_c") + self.run(bin_path, run_environment=True) diff --git a/recipes/lerc/config.yml b/recipes/lerc/config.yml index a09a8d0001ec6..471b2c25702d4 100644 --- a/recipes/lerc/config.yml +++ b/recipes/lerc/config.yml @@ -1,4 +1,6 @@ versions: + "4.0.4": + folder: all "4.0.1": folder: all "4.0.0": diff --git a/recipes/lest/all/conandata.yml b/recipes/lest/all/conandata.yml index 0c06b134376db..e910aac388249 100644 --- a/recipes/lest/all/conandata.yml +++ b/recipes/lest/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.35.2": + url: "https://github.com/martinmoene/lest/archive/v1.35.2.tar.gz" + sha256: "570031345d703587c4984b1fa918e611693735beeb37a6d889d234599b73c670" "1.35.1": url: "https://github.com/martinmoene/lest/archive/v1.35.1.tar.gz" sha256: "ca715833563f983c81d86623c2d1911d7a2aa04ce00459b0f3794a8e441265e0" diff --git a/recipes/lest/all/test_package/CMakeLists.txt b/recipes/lest/all/test_package/CMakeLists.txt index 5d9ebbc9ca6a1..7c83263783aaf 100644 --- a/recipes/lest/all/test_package/CMakeLists.txt +++ b/recipes/lest/all/test_package/CMakeLists.txt @@ -5,4 +5,3 @@ find_package(lest REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) target_link_libraries(${PROJECT_NAME} PRIVATE lest::lest) -set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 11) diff --git a/recipes/lest/all/test_package/test_package.cpp b/recipes/lest/all/test_package/test_package.cpp index 7b3f62f3908f8..e161263ae0bc7 100644 --- a/recipes/lest/all/test_package/test_package.cpp +++ b/recipes/lest/all/test_package/test_package.cpp @@ -1,14 +1,16 @@ -#include "lest/lest.hpp" +#include "lest/lest_cpp03.hpp" +#define CASE( name ) lest_CASE( specification, name ) -const lest::test specification[] = +using namespace lest; + +test_specification specification; + +CASE( "Comment converted to bool indicates absence or presence of comment" ) { - CASE( "Empty string has length zero (succeed)" ) - { - EXPECT( 0 == std::string( ).length() ); - EXPECT( 0 == std::string("").length() ); - }, -}; + EXPECT( false == bool( comment( "") ) ); + EXPECT( true == bool( comment("x") ) ); +} int main( int argc, char * argv[] ) { diff --git a/recipes/lest/config.yml b/recipes/lest/config.yml index 1e86bc3f93bdf..d5f65df0bf534 100644 --- a/recipes/lest/config.yml +++ b/recipes/lest/config.yml @@ -1,3 +1,5 @@ versions: + "1.35.2": + folder: all "1.35.1": folder: all diff --git a/recipes/level-zero/all/conandata.yml b/recipes/level-zero/all/conandata.yml new file mode 100644 index 0000000000000..239ec80fcfb55 --- /dev/null +++ b/recipes/level-zero/all/conandata.yml @@ -0,0 +1,9 @@ +sources: + "1.17.39": + url: "https://github.com/oneapi-src/level-zero/archive/refs/tags/v1.17.39.tar.gz" + sha256: "70473c7262eee80dbe7c17974684ba9d3e34efc15ecba919b85e3cea7b1e180e" +patches: + "1.17.39": + - patch_file: "patches/1.17.39/001-patch-remove-qspectre.patch" + patch_description: "Removed /Qspectre" + patch_type: "portability" \ No newline at end of file diff --git a/recipes/level-zero/all/conanfile.py b/recipes/level-zero/all/conanfile.py new file mode 100644 index 0000000000000..191466efdba72 --- /dev/null +++ b/recipes/level-zero/all/conanfile.py @@ -0,0 +1,74 @@ +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.apple import is_apple_os +from conan.tools.cmake import CMakeToolchain, CMake, cmake_layout, CMakeDeps +from conan.tools.files import get, apply_conandata_patches, copy, export_conandata_patches, rmdir, replace_in_file +from conan.tools.build import check_min_cppstd +import os + + +class LevelZeroConan(ConanFile): + name = "level-zero" + license = "MIT" + homepage = "https://github.com/oneapi-src/level-zero" + url = "https://github.com/conan-io/conan-center-index" + description = "OneAPI Level Zero Specification Headers and Loader" + topics = ("api-headers", "loader", "level-zero", "oneapi") + package_type = "shared-library" + + # Binary configuration + settings = "os", "arch", "compiler", "build_type" + + def requirements(self): + self.requires("spdlog/1.14.1") + + def source(self): + version_data = self.conan_data["sources"][self.version] + get(self, **version_data, strip_root=True) + apply_conandata_patches(self) + replace_in_file(self, os.path.join(self.source_folder, "source", "loader","ze_loader.cpp"), + "#ifdef __linux__", "#if defined(__linux__) || defined(__APPLE__)") + + def export_sources(self): + export_conandata_patches(self) + + def layout(self): + cmake_layout(self, src_folder="src") + + def generate(self): + deps = CMakeDeps(self) + deps.generate() + + toolchain = CMakeToolchain(self) + toolchain.generate() + + def validate(self): + if is_apple_os(self): + self.output.warning("Level Zero is not known to support Apple platforms") + if self.settings.os == "Windows" and self.settings.get_safe("subsystem") == "uwp": + raise ConanInvalidConfiguration(f"{self.ref} does not support UWP on Windows.") + + min_cpp_std = "14" + check_min_cppstd(self, min_cpp_std) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def package(self): + cmake = CMake(self) + cmake.install() + copy(self, "LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) + rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) + + def package_info(self): + self.cpp_info.components["ze-loader"].libs = ["ze_loader"] + self.cpp_info.components["ze-loader"].includedirs = ["include", "include/level_zero"] + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.components["ze-loader"].system_libs = ["pthread"] + elif self.settings.os == "Windows": + self.cpp_info.components["ze-loader"].system_libs = ["cfgmgr32"] + self.cpp_info.components["ze-loader"].set_property("pkg_config_name", "libze_loader") + self.cpp_info.components["level-zero"].requires = ["ze-loader"] + self.cpp_info.components["level-zero"].set_property("pkg_config_name", "level-zero") diff --git a/recipes/level-zero/all/patches/1.17.39/001-patch-remove-qspectre.patch b/recipes/level-zero/all/patches/1.17.39/001-patch-remove-qspectre.patch new file mode 100644 index 0000000000000..997ca7a844e96 --- /dev/null +++ b/recipes/level-zero/all/patches/1.17.39/001-patch-remove-qspectre.patch @@ -0,0 +1,17 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index ac2ab9f..5282757 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -132,12 +132,6 @@ if(MSVC) + set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /DYNAMICBASE") + set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /guard:cf") + # enable Spectre Mitigation, not supported by clang-cl +- if((NOT CMAKE_CXX_COMPILER_ID STREQUAL Clang) AND (NOT CMAKE_CXX_COMPILER_ID STREQUAL IntelLLVM)) +- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Qspectre") +- endif() +- if((NOT CMAKE_C_COMPILER_ID STREQUAL Clang) AND NOT (CMAKE_C_COMPILER_ID STREQUAL IntelLLVM)) +- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /Qspectre") +- endif() + endif() + + #CXX compiler support diff --git a/recipes/level-zero/all/test_package/CMakeLists.txt b/recipes/level-zero/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..6b92e033f045a --- /dev/null +++ b/recipes/level-zero/all/test_package/CMakeLists.txt @@ -0,0 +1,9 @@ +cmake_minimum_required(VERSION 3.2.0) +project(test_package LANGUAGES CXX) + +find_package(level-zero CONFIG REQUIRED) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE level-zero::level-zero) + +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) \ No newline at end of file diff --git a/recipes/level-zero/all/test_package/conanfile.py b/recipes/level-zero/all/test_package/conanfile.py new file mode 100644 index 0000000000000..0ac491f64a94f --- /dev/null +++ b/recipes/level-zero/all/test_package/conanfile.py @@ -0,0 +1,26 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/level-zero/all/test_package/test_package.cpp b/recipes/level-zero/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..50cc7683ea557 --- /dev/null +++ b/recipes/level-zero/all/test_package/test_package.cpp @@ -0,0 +1,6 @@ +#include "ze_api.h" + +int main() { + zeInit(0); + return 0; +} diff --git a/recipes/level-zero/config.yml b/recipes/level-zero/config.yml new file mode 100644 index 0000000000000..6cac94c96d3b8 --- /dev/null +++ b/recipes/level-zero/config.yml @@ -0,0 +1,3 @@ +versions: + "1.17.39": + folder: "all" diff --git a/recipes/libaec/all/conandata.yml b/recipes/libaec/all/conandata.yml index f02aae783d14c..02f7c64ddfad5 100644 --- a/recipes/libaec/all/conandata.yml +++ b/recipes/libaec/all/conandata.yml @@ -1,22 +1,7 @@ sources: + "1.1.2": + url: "https://gitlab.dkrz.de/k202009/libaec/-/archive/v1.1.2/libaec-v1.1.2.tar.bz2" + sha256: "bdad8c7923537c3695327aa85afdcd714fb3d30a5f956a27ba2971ef98c043ac" "1.0.6": - url: "https://gitlab.dkrz.de/k202009/libaec/uploads/45b10e42123edd26ab7b3ad92bcf7be2/libaec-1.0.6.tar.gz" - sha256: "032961877231113bb094ef224085e6d66fd670f85a3e17f53d0f131abf24f2fd" - "1.0.4": - url: "https://gitlab.dkrz.de/k202009/libaec/uploads/ea0b7d197a950b0c110da8dfdecbb71f/libaec-1.0.4.tar.gz" - sha256: "f2b1b232083bd8beaf8a54a024225de3dd72a673a9bcdf8c3ba96c39483f4309" -patches: - "1.0.4": - - patch_file: "patches/1.0.4-0001-Fix-static-library-builds.patch" - patch_type: "conan" - patch_description: "Fix static library builds" - - patch_file: "patches/1.0.4-0002-fix-install-ios.patch" - patch_type: "conan" - patch_description: "Fix install iOS" - "1.0.6": - - patch_file: "patches/1.0.6-0001-fix-library-builds.patch" - patch_type: "conan" - patch_description: "Fix library builds" - - patch_file: "patches/1.0.6-0002-fix-cmake-build-with-ninja.patch" - patch_type: "conan" - patch_description: "Ninja needs 'aec' binary to be put in a separate folder to an imaginary 'aec' object output" + url: "https://gitlab.dkrz.de/k202009/libaec/-/archive/v1.0.6/libaec-v1.0.6.tar.bz2" + sha256: "31fb65b31e835e1a0f3b682d64920957b6e4407ee5bbf42ca49549438795a288" diff --git a/recipes/libaec/all/conanfile.py b/recipes/libaec/all/conanfile.py index e624f9f76f9b5..82b06f8697908 100644 --- a/recipes/libaec/all/conanfile.py +++ b/recipes/libaec/all/conanfile.py @@ -1,12 +1,12 @@ from conan import ConanFile from conan.errors import ConanInvalidConfiguration -from conan.tools.microsoft import is_msvc -from conan.tools.files import apply_conandata_patches, export_conandata_patches, get, copy, rm, rmdir, replace_in_file -from conan.tools.scm import Version from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout +from conan.tools.files import get, copy, rm, rmdir, replace_in_file +from conan.tools.microsoft import is_msvc, check_min_vs +from conan.tools.scm import Version import os -required_conan_version = ">=1.52.0" +required_conan_version = ">=1.53.0" class LibaecConan(ConanFile): @@ -16,6 +16,8 @@ class LibaecConan(ConanFile): homepage = "https://gitlab.dkrz.de/k202009/libaec" description = "Adaptive Entropy Coding library" topics = "dsp", "encoding", "decoding" + + package_type = "library" settings = "os", "compiler", "build_type", "arch" options = { "shared": [True, False], @@ -27,7 +29,7 @@ class LibaecConan(ConanFile): } def export_sources(self): - export_conandata_patches(self) + copy(self, "set_runtime_output_dir.cmake", self.recipe_folder, os.path.join(self.export_sources_folder, "src")) def config_options(self): if self.settings.os == "Windows": @@ -35,72 +37,74 @@ def config_options(self): def configure(self): if self.options.shared: - try: - del self.options.fPIC - except Exception: - pass - try: - del self.settings.compiler.libcxx - except Exception: - pass - try: - del self.settings.compiler.cppstd - except Exception: - pass + self.options.rm_safe("fPIC") + self.settings.rm_safe("compiler.cppstd") + self.settings.rm_safe("compiler.libcxx") def layout(self): cmake_layout(self, src_folder="src") def validate(self): - if Version(self.version) >= "1.0.6" and is_msvc(self): - # libaec/1.0.6 uses "restrict" keyword which seems to be supported since Visual Studio 16. - if Version(self.settings.compiler.version) < "16": - raise ConanInvalidConfiguration("{} does not support Visual Studio {}".format(self.name, self.settings.compiler.version)) - # In libaec/1.0.6, fail to build aec_client command with debug and shared settings in Visual Studio. - # Temporary, this recipe doesn't support these settings. - if self.options.shared and self.settings.build_type == "Debug": - raise ConanInvalidConfiguration("{} does not support debug and shared build in Visual Studio(currently)".format(self.name)) + # libaec/1.0.6 uses "restrict" keyword which seems to be supported since Visual Studio 16. + check_min_vs(self, 192) + # libaec/1.0.6 fails to build aec_client command with debug and shared settings in Visual Studio. + # Temporary, this recipe doesn't support these settings. + if is_msvc(self) and self.options.shared and self.settings.build_type == "Debug": + raise ConanInvalidConfiguration(f"{self.name} does not support debug and shared build in Visual Studio (currently)") def source(self): - get(self, **self.conan_data["sources"][self.version], destination=self.source_folder, strip_root=True) + get(self, **self.conan_data["sources"][self.version], strip_root=True) def generate(self): tc = CMakeToolchain(self) - # Honor BUILD_SHARED_LIBS from conan_toolchain (see https://github.com/conan-io/conan/issues/11840) - tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0077"] = "NEW" + tc.cache_variables["CMAKE_PROJECT_libaec_INCLUDE"] = "set_runtime_output_dir.cmake" + tc.cache_variables["CMAKE_POSITION_INDEPENDENT_CODE"] = self.options.get_safe("fPIC", True) + tc.cache_variables["BUILD_SHARED_LIBS"] = self.options.shared tc.generate() + def _patch_sources(self): + cmakelists = os.path.join(self.source_folder, "CMakeLists.txt") + replace_in_file(self, cmakelists, "set(CMAKE_C_STANDARD 99)", "set(CMAKE_C_STANDARD 11)") + replace_in_file(self, cmakelists, "set(CMAKE_POSITION_INDEPENDENT_CODE ON)", "") + targets = "aec_shared sz_shared" if self.options.shared else "aec_static sz_static" + aec_client = " aec_client" if Version(self.version) < "1.1" else "" + replace_in_file(self, os.path.join(self.source_folder, "src", "CMakeLists.txt"), + f"install(TARGETS aec_static aec_shared sz_static sz_shared{aec_client})", + f"install(TARGETS {targets}{aec_client} ARCHIVE DESTINATION lib LIBRARY DESTINATION lib RUNTIME DESTINATION bin)") + def build(self): - apply_conandata_patches(self) - if Version(self.version) < "1.0.6": - replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), - "add_subdirectory(tests)", "") + self._patch_sources() cmake = CMake(self) cmake.configure() cmake.build() def package(self): - if Version(self.version) < "1.0.6": - copy(self, pattern="Copyright.txt", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) - else: - copy(self, pattern="LICENSE.txt", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) + copy(self, "LICENSE.txt", self.source_folder, os.path.join(self.package_folder, "licenses")) cmake = CMake(self) cmake.install() + copy(self, "*.h", os.path.join(self.source_folder, "include"), os.path.join(self.package_folder, "include")) + copy(self, "libaec.h", os.path.join(self.build_folder, "include"), os.path.join(self.package_folder, "include")) rmdir(self, os.path.join(self.package_folder, "share")) rmdir(self, os.path.join(self.package_folder, "cmake")) rm(self, "*.pdb", os.path.join(self.package_folder, "bin")) def package_info(self): + self.cpp_info.set_property("cmake_file_name", "libaec") + + # CMake targets are based on + # https://gitlab.dkrz.de/k202009/libaec/-/blob/master/cmake/libaec-config.cmake.in + self.cpp_info.components["aec"].set_property("cmake_target_name", "libaec::aec") aec_name = "aec" - if self.settings.os == "Windows" and Version(self.version) >= "1.0.6" and not self.options.shared: - aec_name = "aec_static" + if self.settings.os == "Windows" and not self.options.shared: + aec_name = "aec-static" + self.cpp_info.components["aec"].libs = [aec_name] + + self.cpp_info.components["sz"].set_property("cmake_target_name", "libaec::sz") szip_name = "sz" if self.settings.os == "Windows": - if Version(self.version) >= "1.0.6": - szip_name = "szip" if self.options.shared else "szip_static" - elif self.options.shared: - szip_name = "szip" - self.cpp_info.libs = [szip_name, aec_name] + szip_name = "szip" if self.options.shared else "szip-static" + self.cpp_info.components["sz"].libs = [szip_name] + + # TODO: Legacy, to be removed on Conan 2.0 bin_path = os.path.join(self.package_folder, "bin") - self.output.info("Appending PATH environment variable: {}".format(bin_path)) self.env_info.PATH.append(bin_path) diff --git a/recipes/libaec/all/patches/1.0.4-0001-Fix-static-library-builds.patch b/recipes/libaec/all/patches/1.0.4-0001-Fix-static-library-builds.patch deleted file mode 100644 index ba756f64d8e76..0000000000000 --- a/recipes/libaec/all/patches/1.0.4-0001-Fix-static-library-builds.patch +++ /dev/null @@ -1,135 +0,0 @@ -From 6df13969e6967dbed660271011e872c9c366037a Mon Sep 17 00:00:00 2001 -From: Brennan Ashton -Date: Tue, 28 Jan 2020 03:59:02 -0800 -Subject: [PATCH] Fix static library builds - -Signed-off-by: Brennan Ashton ---- - CMakeLists.txt | 3 --- - src/CMakeLists.txt | 10 +++++++++- - src/libaec.h | 28 ++++++++++------------------ - src/szlib.h | 6 +++--- - 4 files changed, 22 insertions(+), 25 deletions(-) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index d71d26c..4f38618 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -43,9 +43,6 @@ option(BUILD_SHARED_LIBS "Build Shared Libraries" ON) - if(BUILD_SHARED_LIBS) - set (LIB_TYPE SHARED) - else(BUILD_SHARED_LIBS) -- if(WIN32) -- message(WARNING "You will have to modify libaec.h for static libs.") -- endif(WIN32) - set(LIB_TYPE STATIC) - endif(BUILD_SHARED_LIBS) - -diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt -index ed6053e..93a78f2 100644 ---- a/src/CMakeLists.txt -+++ b/src/CMakeLists.txt -@@ -1,5 +1,13 @@ -+include (GenerateExportHeader) - add_library(aec ${LIB_TYPE} ${libaec_SRCS}) - set_target_properties(aec PROPERTIES VERSION 0.0.10 SOVERSION 0) -+generate_export_header(aec -+ BASE_NAME libaec -+ EXPORT_MACRO_NAME libaec_EXPORT -+ EXPORT_FILE_NAME ${PROJECT_BINARY_DIR}/libaec_Export.h -+ STATIC_DEFINE libaec_BUILT_AS_STATIC -+) -+ - add_library(sz ${LIB_TYPE} sz_compat.c) - set_target_properties(sz PROPERTIES VERSION 2.0.1 SOVERSION 2) - -@@ -41,7 +49,7 @@ else(WIN32) - DESTINATION ${CMAKE_INSTALL_FULL_MANDIR}/man1 COMPONENT doc) - endif(WIN32) - --install(FILES libaec.h szlib.h -+install(FILES libaec.h szlib.h ${PROJECT_BINARY_DIR}/libaec_Export.h - DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} - COMPONENT headers) - install(TARGETS aec_client -diff --git a/src/libaec.h b/src/libaec.h -index bb43be9..44505e4 100644 ---- a/src/libaec.h -+++ b/src/libaec.h -@@ -52,20 +52,12 @@ - - #include - -+#include "libaec_Export.h" -+ - #ifdef __cplusplus - extern "C"{ - #endif - --#if BUILDING_LIBAEC && HAVE_VISIBILITY --# define LIBAEC_DLL_EXPORTED __attribute__((__visibility__("default"))) --#elif BUILDING_LIBAEC && defined _MSC_VER --# define LIBAEC_DLL_EXPORTED __declspec(dllexport) --#elif defined _MSC_VER --# define LIBAEC_DLL_EXPORTED __declspec(dllimport) --#else --# define LIBAEC_DLL_EXPORTED --#endif -- - struct internal_state; - - struct aec_stream { -@@ -155,19 +147,19 @@ struct aec_stream { - /*********************************************/ - /* Streaming encoding and decoding functions */ - /*********************************************/ --LIBAEC_DLL_EXPORTED int aec_encode_init(struct aec_stream *strm); --LIBAEC_DLL_EXPORTED int aec_encode(struct aec_stream *strm, int flush); --LIBAEC_DLL_EXPORTED int aec_encode_end(struct aec_stream *strm); -+libaec_EXPORT int aec_encode_init(struct aec_stream *strm); -+libaec_EXPORT int aec_encode(struct aec_stream *strm, int flush); -+libaec_EXPORT int aec_encode_end(struct aec_stream *strm); - --LIBAEC_DLL_EXPORTED int aec_decode_init(struct aec_stream *strm); --LIBAEC_DLL_EXPORTED int aec_decode(struct aec_stream *strm, int flush); --LIBAEC_DLL_EXPORTED int aec_decode_end(struct aec_stream *strm); -+libaec_EXPORT int aec_decode_init(struct aec_stream *strm); -+libaec_EXPORT int aec_decode(struct aec_stream *strm, int flush); -+libaec_EXPORT int aec_decode_end(struct aec_stream *strm); - - /***************************************************************/ - /* Utility functions for encoding or decoding a memory buffer. */ - /***************************************************************/ --LIBAEC_DLL_EXPORTED int aec_buffer_encode(struct aec_stream *strm); --LIBAEC_DLL_EXPORTED int aec_buffer_decode(struct aec_stream *strm); -+libaec_EXPORT int aec_buffer_encode(struct aec_stream *strm); -+libaec_EXPORT int aec_buffer_decode(struct aec_stream *strm); - - #ifdef __cplusplus - } -diff --git a/src/szlib.h b/src/szlib.h -index 1eaa577..18b6a3c 100644 ---- a/src/szlib.h -+++ b/src/szlib.h -@@ -80,15 +80,15 @@ typedef struct SZ_com_t_s - int pixels_per_scanline; - } SZ_com_t; - --LIBAEC_DLL_EXPORTED int SZ_BufftoBuffCompress( -+libaec_EXPORT int SZ_BufftoBuffCompress( - void *dest, size_t *destLen, - const void *source, size_t sourceLen, - SZ_com_t *param); --LIBAEC_DLL_EXPORTED int SZ_BufftoBuffDecompress( -+libaec_EXPORT int SZ_BufftoBuffDecompress( - void *dest, size_t *destLen, - const void *source, size_t sourceLen, - SZ_com_t *param); - --LIBAEC_DLL_EXPORTED int SZ_encoder_enabled(void); -+libaec_EXPORT int SZ_encoder_enabled(void); - - #endif /* SZLIB_H */ --- -2.24.1 - diff --git a/recipes/libaec/all/patches/1.0.4-0002-fix-install-ios.patch b/recipes/libaec/all/patches/1.0.4-0002-fix-install-ios.patch deleted file mode 100644 index 7d7d56d1f60b6..0000000000000 --- a/recipes/libaec/all/patches/1.0.4-0002-fix-install-ios.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- a/src/CMakeLists.txt -+++ b/src/CMakeLists.txt -@@ -53,7 +53,6 @@ install(FILES libaec.h szlib.h ${PROJECT_BINARY_DIR}/libaec_Export.h - DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} - COMPONENT headers) - install(TARGETS aec_client -- RUNTIME - DESTINATION ${CMAKE_INSTALL_BINDIR} - COMPONENT applications) - diff --git a/recipes/libaec/all/patches/1.0.6-0001-fix-library-builds.patch b/recipes/libaec/all/patches/1.0.6-0001-fix-library-builds.patch deleted file mode 100644 index 500c20a889d8c..0000000000000 --- a/recipes/libaec/all/patches/1.0.6-0001-fix-library-builds.patch +++ /dev/null @@ -1,113 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 6f75ead..c974cce 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -4,7 +4,7 @@ project(libaec LANGUAGES C VERSION 1.0.6) - # Automatically export symbols for Windows DLLs - set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS TRUE) - --set(CMAKE_C_STANDARD 99) -+set(CMAKE_C_STANDARD 11) - set(CMAKE_C_VISIBILITY_PRESET hidden) - set(CMAKE_POSITION_INDEPENDENT_CODE ON) - include(CTest) -diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt -index a26f9b7..3cd8f72 100644 ---- a/src/CMakeLists.txt -+++ b/src/CMakeLists.txt -@@ -10,12 +10,17 @@ target_include_directories(aec - "$" - "$") - --# Create both static and shared aec library. -+if (NOT BUILD_SHARED_LIBS) -+ -+# Create aec library. - add_library(aec_static STATIC "$") - target_link_libraries(aec_static PUBLIC aec) - set_target_properties(aec_static - PROPERTIES -- OUTPUT_NAME $,aec_static,aec>) -+ OUTPUT_NAME $,aec_static,aec> -+ PUBLIC_HEADER ../include/libaec.h) -+ -+else() - - add_library(aec_shared SHARED "$") - target_link_libraries(aec_shared PUBLIC aec) -@@ -26,17 +31,24 @@ set_target_properties(aec_shared - OUTPUT_NAME aec - PUBLIC_HEADER ../include/libaec.h) - -+endif() -+ - # Wrapper for compatibility with szip - add_library(sz OBJECT sz_compat.c) - target_link_libraries(sz PUBLIC aec) - --# Create both static and shared szip library. -+# Create szip library. -+if (NOT BUILD_SHARED_LIBS) -+ - add_library(sz_static STATIC "$" "$") - set_target_properties(sz_static - PROPERTIES -- OUTPUT_NAME $,szip_static,sz>) -+ OUTPUT_NAME $,szip_static,sz> -+ PUBLIC_HEADER ../include/szlib.h) - target_link_libraries(sz_static PUBLIC sz) - -+else() -+ - add_library(sz_shared SHARED "$" "$") - target_link_libraries(sz_shared PUBLIC sz) - set_target_properties(sz_shared -@@ -46,11 +58,16 @@ set_target_properties(sz_shared - OUTPUT_NAME $,szip,sz> - PUBLIC_HEADER ../include/szlib.h) - -+endif() -+ - # Simple client for testing and benchmarking. - # Can also be used stand-alone - add_executable(aec_client aec.c) - set_target_properties(aec_client PROPERTIES OUTPUT_NAME aec) - target_link_libraries(aec_client PUBLIC aec) -+if (MSVC) -+ target_compile_options(aec_client PUBLIC /FS /Z7) -+endif() - - include(GNUInstallDirs) - if(UNIX) -@@ -61,23 +78,14 @@ if(UNIX) - PROPERTIES - COMPILE_DEFINITIONS - "HAVE_VISIBILITY=$;BUILDING_LIBAEC") -- -- # The shell scripts for benchmarking are supported on unix only -- add_executable(utime EXCLUDE_FROM_ALL utime.c) -- target_include_directories(utime PRIVATE "${CMAKE_CURRENT_BINARY_DIR}/..") -- add_custom_target(bench -- COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/benc.sh -- ${CMAKE_CURRENT_SOURCE_DIR}/../data/typical.rz -- COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/bdec.sh -- DEPENDS aec_client utime) - endif() - --if(UNIX OR MINGW) -- # Install manpage -- install( -- FILES aec.1 -- DESTINATION ${CMAKE_INSTALL_FULL_MANDIR}/man1 -- COMPONENT doc) --endif() -+if (NOT BUILD_SHARED_LIBS) - --install(TARGETS aec_static aec_shared sz_static sz_shared aec_client) -+install(TARGETS aec_static sz_static aec_client) -+ -+else() -+ -+install(TARGETS aec_shared sz_shared aec_client) -+ -+endif() diff --git a/recipes/libaec/all/patches/1.0.6-0002-fix-cmake-build-with-ninja.patch b/recipes/libaec/all/patches/1.0.6-0002-fix-cmake-build-with-ninja.patch deleted file mode 100644 index b3782f6654ad3..0000000000000 --- a/recipes/libaec/all/patches/1.0.6-0002-fix-cmake-build-with-ninja.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/CMakeLists.txt 2021-09-17 19:28:01.000000000 +0800 -+++ b/CMakeLists.txt 2022-11-04 07:43:58.413439439 +0800 -@@ -12,6 +12,8 @@ - include(TestBigEndian) - test_big_endian(WORDS_BIGENDIAN) - -+set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin) -+ - # Check for __builtin_clzll for faster decoding - include(CheckCSourceCompiles) - check_c_source_compiles( diff --git a/recipes/libaec/all/set_runtime_output_dir.cmake b/recipes/libaec/all/set_runtime_output_dir.cmake new file mode 100644 index 0000000000000..d154a1133b327 --- /dev/null +++ b/recipes/libaec/all/set_runtime_output_dir.cmake @@ -0,0 +1,2 @@ +# Ninja needs 'aec' binary to be put in a separate folder to an imaginary 'aec' object output +set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin) diff --git a/recipes/libaec/all/test_package/CMakeLists.txt b/recipes/libaec/all/test_package/CMakeLists.txt index f87e0b5ca8eb9..957285057e22b 100644 --- a/recipes/libaec/all/test_package/CMakeLists.txt +++ b/recipes/libaec/all/test_package/CMakeLists.txt @@ -1,7 +1,8 @@ -cmake_minimum_required(VERSION 3.1.3) +cmake_minimum_required(VERSION 3.15) project(test_package C) find_package(libaec CONFIG REQUIRED) add_executable(${PROJECT_NAME} test_package.c) -target_link_libraries(${PROJECT_NAME} libaec::libaec) +target_link_libraries(${PROJECT_NAME} libaec::aec) +target_compile_features(${PROJECT_NAME} PRIVATE c_std_11) diff --git a/recipes/libaec/all/test_package/conanfile.py b/recipes/libaec/all/test_package/conanfile.py index 75526b1d02b79..0c7c612cdc73e 100644 --- a/recipes/libaec/all/test_package/conanfile.py +++ b/recipes/libaec/all/test_package/conanfile.py @@ -1,8 +1,8 @@ +import os + from conan import ConanFile from conan.tools.build import can_run -from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout -from conan.tools.scm import Version -import os +from conan.tools.cmake import CMake, cmake_layout class TestPackageConan(ConanFile): @@ -16,12 +16,6 @@ def requirements(self): def layout(self): cmake_layout(self) - def generate(self): - tc = CMakeToolchain(self) - if Version(self.dependencies["libaec"].ref.version) >= "1.0.6": - tc.variables["CMAKE_C_STANDARD"] = "11" - tc.generate() - def build(self): cmake = CMake(self) cmake.configure() @@ -29,5 +23,5 @@ def build(self): def test(self): if can_run(self): - bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") + bin_path = os.path.join(self.cpp.build.bindir, "test_package") self.run(bin_path, env="conanrun") diff --git a/recipes/libaec/config.yml b/recipes/libaec/config.yml index a41a7cbb0ffc2..e52184bafc974 100644 --- a/recipes/libaec/config.yml +++ b/recipes/libaec/config.yml @@ -1,5 +1,5 @@ versions: - "1.0.6": + "1.1.2": folder: all - "1.0.4": + "1.0.6": folder: all diff --git a/recipes/libalsa/all/conandata.yml b/recipes/libalsa/all/conandata.yml index c612ddb389783..3c307f42aa636 100644 --- a/recipes/libalsa/all/conandata.yml +++ b/recipes/libalsa/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.2.12": + url: "https://github.com/alsa-project/alsa-lib/archive/v1.2.12.tar.gz" + sha256: "f067dbba9376e5bbbb417b77751d2a9f2f277c54fb3a2b5c023cc2c7dfb4e3c1" "1.2.10": url: "https://github.com/alsa-project/alsa-lib/archive/v1.2.10.tar.gz" sha256: "f55749847fd98274501f4691a2d847e89280c07d40a43cdac43d6443f69fc939" diff --git a/recipes/libalsa/all/conanfile.py b/recipes/libalsa/all/conanfile.py index 8c3046d892f5a..eff1547ac38a9 100644 --- a/recipes/libalsa/all/conanfile.py +++ b/recipes/libalsa/all/conanfile.py @@ -12,12 +12,12 @@ class LibalsaConan(ConanFile): name = "libalsa" + description = "Library of ALSA: The Advanced Linux Sound Architecture, that provides audio " \ + "and MIDI functionality to the Linux operating system" license = "LGPL-2.1-or-later" url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/alsa-project/alsa-lib" topics = ("alsa", "sound", "audio", "midi") - description = "Library of ALSA: The Advanced Linux Sound Architecture, that provides audio " \ - "and MIDI functionality to the Linux operating system" package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { diff --git a/recipes/libalsa/config.yml b/recipes/libalsa/config.yml index ce651c2f0d63a..a734abbf480ed 100644 --- a/recipes/libalsa/config.yml +++ b/recipes/libalsa/config.yml @@ -1,4 +1,6 @@ versions: + "1.2.12": + folder: all "1.2.10": folder: all "1.2.7.2": diff --git a/recipes/libaom-av1/all/conandata.yml b/recipes/libaom-av1/all/conandata.yml index bb3a5a205cc9f..a094fca193ea9 100644 --- a/recipes/libaom-av1/all/conandata.yml +++ b/recipes/libaom-av1/all/conandata.yml @@ -1,34 +1,25 @@ sources: + "3.8.0": + url: "https://storage.googleapis.com/aom-releases/libaom-3.8.0.tar.gz" + sha256: "a768d3e54c7f00cd38b01208d1ae52d671be410cfc387ff7881ea71c855f3600" "3.6.1": url: "https://storage.googleapis.com/aom-releases/libaom-3.6.1.tar.gz" sha256: "42b862f58b3d00bd3902d2dc469526574f5b012e5b178e6a9652845a113d6887" - "3.6.0": - url: "https://storage.googleapis.com/aom-releases/libaom-3.6.0.tar.gz" - sha256: "a4a6c0fab685da743b796662a928fcdf7ae60594edc306efb73e78a17ea6cde6" "3.5.0": url: "https://storage.googleapis.com/aom-releases/libaom-3.5.0.tar.gz" sha256: "d37dbee372e2430a7efde813984ae6d78bdf1fc4080ebe32457c9115408b0738" "3.4.0": url: "https://storage.googleapis.com/aom-releases/libaom-3.4.0.tar.gz" sha256: "bd754b58c3fa69f3ffd29da77de591bd9c26970e3b18537951336d6c0252e354" - "3.3.0": - url: "https://storage.googleapis.com/aom-releases/libaom-3.3.0.tar.gz" - sha256: "1dafde32bc2237bf0570294661ae61db30e818840f77dc4e90d1ebf5a6286664" - "3.1.2": - url: "https://storage.googleapis.com/aom-releases/libaom-3.1.2.tar.gz" - sha256: "a295eb3779657fad7d34217091ee4c6257d02580a82012231afef72792330075" - "3.1.1": - url: "https://storage.googleapis.com/aom-releases/libaom-3.1.1.tar.gz" - sha256: "7cd5e8e469268c37241df93fe61557ea0dc46980ca21b37e786e92a3d0729276" "2.0.1": url: "https://storage.googleapis.com/aom-releases/libaom-2.0.1.tar.gz" sha256: "a0cff299621e2ef885aba219c498fa39a7d9a7ddf47585a118fd66c64ad1b312" patches: - "3.6.1": - - patch_file: "patches/0001-3.4.0-fix-install.patch" + "3.8.0": + - patch_file: "patches/0001-3.8.0-fix-install.patch" patch_type: conan patch_description: Install just aom library without aom_static. - "3.6.0": + "3.6.1": - patch_file: "patches/0001-3.4.0-fix-install.patch" patch_type: conan patch_description: Install just aom library without aom_static. @@ -40,18 +31,6 @@ patches: - patch_file: "patches/0001-3.4.0-fix-install.patch" patch_type: conan patch_description: Install just aom library without aom_static. - "3.3.0": - - patch_file: "patches/0001-3.3.0-fix-install.patch" - patch_type: conan - patch_description: Install just aom library without aom_static. - "3.1.2": - - patch_file: "patches/0001-3.1.1-fix-install.patch" - patch_type: conan - patch_description: Install just aom library without aom_static. - "3.1.1": - - patch_file: "patches/0001-3.1.1-fix-install.patch" - patch_type: conan - patch_description: Install just aom library without aom_static. "2.0.1": - patch_file: "patches/0001-2.0.1-fix-install.patch" patch_type: conan diff --git a/recipes/libaom-av1/all/conanfile.py b/recipes/libaom-av1/all/conanfile.py index 714ea1c7238dd..26d670c71d8c3 100644 --- a/recipes/libaom-av1/all/conanfile.py +++ b/recipes/libaom-av1/all/conanfile.py @@ -52,7 +52,7 @@ def build_requirements(self): if self.options.get_safe("assembly", False): self.tool_requires("nasm/2.15.05") if self._settings_build.os == "Windows": - self.tool_requires("strawberryperl/5.30.0.1") + self.tool_requires("strawberryperl/5.32.1.1") def layout(self): cmake_layout(self, src_folder="src") @@ -94,6 +94,9 @@ def package(self): def package_info(self): self.cpp_info.set_property("pkg_config_name", "aom") - self.cpp_info.libs = ["aom"] + lib = "aom" + if Version(self.version) >= "3.8.0" and self.settings.os == "Windows" and self.options.shared: + lib = "aom_dll" + self.cpp_info.libs = [lib] if self.settings.os in ("FreeBSD", "Linux"): self.cpp_info.system_libs = ["pthread", "m"] diff --git a/recipes/libaom-av1/all/patches/0001-3.1.1-fix-install.patch b/recipes/libaom-av1/all/patches/0001-3.1.1-fix-install.patch deleted file mode 100644 index af10132d05fe7..0000000000000 --- a/recipes/libaom-av1/all/patches/0001-3.1.1-fix-install.patch +++ /dev/null @@ -1,34 +0,0 @@ ---- a/build/cmake/aom_install.cmake -+++ b/build/cmake/aom_install.cmake -@@ -26,7 +26,7 @@ endif() - # Note: aom.pc generation uses GNUInstallDirs: - # https://cmake.org/cmake/help/latest/module/GNUInstallDirs.html - macro(setup_aom_install_targets) -- if(NOT (MSVC OR XCODE)) -+ if(1) - include("GNUInstallDirs") - set(AOM_PKG_CONFIG_FILE "${AOM_CONFIG_DIR}/aom.pc") - -@@ -76,7 +76,8 @@ macro(setup_aom_install_targets) - endif() - - if(BUILD_SHARED_LIBS) -- set(AOM_INSTALL_LIBS aom aom_static) -+ set_target_properties(aom_static PROPERTIES OUTPUT_NAME aom_static) -+ set(AOM_INSTALL_LIBS aom) - else() - set(AOM_INSTALL_LIBS aom) - endif() -@@ -88,8 +89,10 @@ macro(setup_aom_install_targets) - install( - FILES "${AOM_PKG_CONFIG_FILE}" - DESTINATION "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/pkgconfig") -- install(TARGETS ${AOM_INSTALL_LIBS} DESTINATION -- "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}") -+ install(TARGETS ${AOM_INSTALL_LIBS} -+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} -+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} -+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) - - if(ENABLE_EXAMPLES) - install(TARGETS ${AOM_INSTALL_BINS} DESTINATION diff --git a/recipes/libaom-av1/all/patches/0001-3.3.0-fix-install.patch b/recipes/libaom-av1/all/patches/0001-3.3.0-fix-install.patch deleted file mode 100644 index 0dc76d16fc7f5..0000000000000 --- a/recipes/libaom-av1/all/patches/0001-3.3.0-fix-install.patch +++ /dev/null @@ -1,21 +0,0 @@ ---- a/build/cmake/aom_install.cmake -+++ b/build/cmake/aom_install.cmake -@@ -27,7 +27,7 @@ endif() - # Note: aom.pc generation uses GNUInstallDirs: - # https://cmake.org/cmake/help/latest/module/GNUInstallDirs.html - macro(setup_aom_install_targets) -- if(NOT XCODE) -+ if(1) - include("GNUInstallDirs") - set(AOM_PKG_CONFIG_FILE "${AOM_CONFIG_DIR}/aom.pc") - -@@ -77,7 +77,8 @@ macro(setup_aom_install_targets) - endif() - - if(BUILD_SHARED_LIBS) -- set(AOM_INSTALL_LIBS aom aom_static) -+ set_target_properties(aom_static PROPERTIES OUTPUT_NAME aom_static) -+ set(AOM_INSTALL_LIBS aom) - else() - set(AOM_INSTALL_LIBS aom) - endif() diff --git a/recipes/libaom-av1/all/patches/0001-3.8.0-fix-install.patch b/recipes/libaom-av1/all/patches/0001-3.8.0-fix-install.patch new file mode 100644 index 0000000000000..1bb2cbdc3adb3 --- /dev/null +++ b/recipes/libaom-av1/all/patches/0001-3.8.0-fix-install.patch @@ -0,0 +1,21 @@ +--- build/cmake/aom_install.cmake ++++ build/cmake/aom_install.cmake +@@ -27,7 +27,7 @@ + # Note: aom.pc generation uses GNUInstallDirs: + # https://cmake.org/cmake/help/latest/module/GNUInstallDirs.html + macro(setup_aom_install_targets) +- if(NOT XCODE) ++ if(1) + include("GNUInstallDirs") + set(AOM_PKG_CONFIG_FILE "${AOM_CONFIG_DIR}/aom.pc") + +@@ -79,7 +79,8 @@ + endif() + + if(BUILD_SHARED_LIBS) +- set(AOM_INSTALL_LIBS aom aom_static) ++ set_target_properties(aom_static PROPERTIES OUTPUT_NAME aom_static) ++ set(AOM_INSTALL_LIBS aom) + else() + set(AOM_INSTALL_LIBS aom) + endif() diff --git a/recipes/libaom-av1/config.yml b/recipes/libaom-av1/config.yml index 2ac5e2242b2d4..45dfabb3e4ed1 100644 --- a/recipes/libaom-av1/config.yml +++ b/recipes/libaom-av1/config.yml @@ -1,17 +1,11 @@ versions: - "3.6.1": + "3.8.0": folder: all - "3.6.0": + "3.6.1": folder: all "3.5.0": folder: all "3.4.0": folder: all - "3.3.0": - folder: all - "3.1.2": - folder: all - "3.1.1": - folder: all "2.0.1": folder: all diff --git a/recipes/libarchive/all/conandata.yml b/recipes/libarchive/all/conandata.yml index 77a39a634029a..67adbd7936a29 100644 --- a/recipes/libarchive/all/conandata.yml +++ b/recipes/libarchive/all/conandata.yml @@ -1,139 +1,54 @@ sources: + "3.7.6": + url: "https://github.com/libarchive/libarchive/releases/download/v3.7.6/libarchive-3.7.6.tar.xz" + sha256: "0a2efdcb185da2eb1e7cd8421434cb9a6119f72417a13335cca378d476fd3ba0" + "3.7.4": + url: "https://github.com/libarchive/libarchive/releases/download/v3.7.4/libarchive-3.7.4.tar.xz" + sha256: "f887755c434a736a609cbd28d87ddbfbe9d6a3bb5b703c22c02f6af80a802735" "3.7.3": url: "https://github.com/libarchive/libarchive/releases/download/v3.7.3/libarchive-3.7.3.tar.xz" sha256: "63e7a7174638fc7d6b79b4c8b0ad954e0f4f45abe7239c1ecb200232aa9a43d2" "3.7.2": url: "https://github.com/libarchive/libarchive/releases/download/v3.7.2/libarchive-3.7.2.tar.xz" sha256: "04357661e6717b6941682cde02ad741ae4819c67a260593dfb2431861b251acb" - "3.7.1": - url: "https://github.com/libarchive/libarchive/releases/download/v3.7.1/libarchive-3.7.1.tar.xz" - sha256: "b17403ce670ff18d8e06fea05a9ea9accf70678c88f1b9392a2e29b51127895f" - "3.6.2": - url: "https://github.com/libarchive/libarchive/releases/download/v3.6.2/libarchive-3.6.2.tar.xz" - sha256: "9e2c1b80d5fbe59b61308fdfab6c79b5021d7ff4ff2489fb12daf0a96a83551d" - "3.6.1": - url: "https://github.com/libarchive/libarchive/releases/download/v3.6.1/libarchive-3.6.1.tar.xz" - sha256: "5a411aceb978f43e626f0c2d1812ddd8807b645ed892453acabd532376c148e6" - "3.6.0": - url: "https://github.com/libarchive/libarchive/releases/download/v3.6.0/libarchive-3.6.0.tar.xz" - sha256: "df283917799cb88659a5b33c0a598f04352d61936abcd8a48fe7b64e74950de7" - "3.5.2": - url: "https://github.com/libarchive/libarchive/releases/download/v3.5.2/libarchive-3.5.2.tar.xz" - sha256: "f0b19ff39c3c9a5898a219497ababbadab99d8178acc980155c7e1271089b5a0" - "3.5.1": - url: "https://github.com/libarchive/libarchive/releases/download/v3.5.1/libarchive-3.5.1.tar.xz" - sha256: "0e17d3a8d0b206018693b27f08029b598f6ef03600c2b5d10c94ce58692e299b" - "3.4.3": - url: "https://github.com/libarchive/libarchive/releases/download/v3.4.3/libarchive-3.4.3.tar.xz" - sha256: "0bfc3fd40491768a88af8d9b86bf04a9e95b6d41a94f9292dbc0ec342288c05f" - "3.4.0": - url: "https://github.com/libarchive/libarchive/releases/download/v3.4.0/libarchive-3.4.0.tar.gz" - sha256: "8643d50ed40c759f5412a3af4e353cffbce4fdf3b5cf321cb72cacf06b2d825e" patches: - "3.7.3": - - patch_file: "patches/0001-3.7.3-zlib-winapi.patch" - patch_description: "Remove broken ZLIB WINAPI check" - patch_type: "portability" - - patch_file: "patches/0003-3.7.3-cmake.patch" + "3.7.6": + - patch_file: "patches/0003-3.7.6-cmake.patch" patch_description: "Make CMake build-system compatible with Conan" patch_type: "conan" - - patch_file: "patches/0005-3.7.3-try-compile-cmakedeps.patch" + - patch_file: "patches/0005-3.7.6-try-compile-cmakedeps.patch" patch_description: "Patch try_compile check to work with imported CMake targets from Conan packages" patch_type: "conan" - - patch_file: "patches/0006-3.7.3-fix-msvc-build.patch" + - patch_file: "patches/0006-3.7.6-fix-msvc-build.patch" patch_description: "Fix MSVC build" patch_type: "conan" - "3.7.2": - - patch_file: "patches/0001-3.7.2-zlib-winapi.patch" - patch_description: "Remove broken ZLIB WINAPI check" - patch_type: "portability" - - patch_file: "patches/0003-3.7.1-cmake.patch" + "3.7.4": + - patch_file: "patches/0003-3.7.4-cmake.patch" patch_description: "Make CMake build-system compatible with Conan" patch_type: "conan" - - patch_file: "patches/0005-3.7.1-try-compile-cmakedeps.patch" + - patch_file: "patches/0005-3.7.4-try-compile-cmakedeps.patch" patch_description: "Patch try_compile check to work with imported CMake targets from Conan packages" patch_type: "conan" - - patch_file: "patches/0006-3.7.1-fix-msvc-build.patch" + - patch_file: "patches/0006-3.7.4-fix-msvc-build.patch" patch_description: "Fix MSVC build" patch_type: "conan" - "3.7.1": - - patch_file: "patches/0007-3.7.1-include-getopt.patch" - patch_description: "include getopt.h if HAVE_GETOPT_OPTRESET is defined" - patch_type: "portability" - patch_source: "https://github.com/libarchive/libarchive/pull/2007" - - patch_file: "patches/0001-3.7.1-zlib-winapi.patch" - patch_description: "Remove broken ZLIB WINAPI check" - patch_type: "portability" - - patch_file: "patches/0003-3.7.1-cmake.patch" + "3.7.3": + - patch_file: "patches/0003-3.7.3-cmake.patch" patch_description: "Make CMake build-system compatible with Conan" patch_type: "conan" - - patch_file: "patches/0005-3.7.1-try-compile-cmakedeps.patch" + - patch_file: "patches/0005-3.7.3-try-compile-cmakedeps.patch" patch_description: "Patch try_compile check to work with imported CMake targets from Conan packages" patch_type: "conan" - - patch_file: "patches/0006-3.7.1-fix-msvc-build.patch" + - patch_file: "patches/0006-3.7.3-fix-msvc-build.patch" patch_description: "Fix MSVC build" patch_type: "conan" - "3.6.2": - - patch_file: "patches/0001-3.6.2-zlib-winapi.patch" - patch_description: "Remove broken ZLIB WINAPI check" - patch_type: "portability" - - patch_file: "patches/0003-3.6.2-cmake.patch" + "3.7.2": + - patch_file: "patches/0003-3.7.2-cmake.patch" patch_description: "Make CMake build-system compatible with Conan" patch_type: "conan" - - patch_file: "patches/0005-3.6.2-try-compile-cmakedeps.patch" + - patch_file: "patches/0005-3.7.2-try-compile-cmakedeps.patch" patch_description: "Patch try_compile check to work with imported CMake targets from Conan packages" patch_type: "conan" - - patch_file: "patches/0006-3.6.2-fix-msvc-build.patch" + - patch_file: "patches/0006-3.7.2-fix-msvc-build.patch" patch_description: "Fix MSVC build" patch_type: "conan" - "3.6.1": - - patch_file: "patches/0001-3.6.0-zlib-winapi.patch" - patch_description: "Remove broken ZLIB WINAPI check" - patch_type: "portability" - - patch_file: "patches/0003-3.6.0-cmake.patch" - patch_description: "Make CMake build-system compatible with Conan" - patch_type: "conan" - - patch_file: "patches/0004-3.6.0-android.patch" - patch_description: "Add missing include directory for Android" - patch_type: "portability" - "3.6.0": - - patch_file: "patches/0001-3.6.0-zlib-winapi.patch" - patch_description: "Remove broken ZLIB WINAPI check" - patch_type: "portability" - - patch_file: "patches/0003-3.6.0-cmake.patch" - patch_description: "Make CMake cooperate with Conan" - patch_type: "conan" - - patch_file: "patches/0004-3.6.0-android.patch" - patch_description: "Add missing include directory for Android" - patch_type: "portability" - "3.5.2": - - patch_file: "patches/0001-3.4.3-zlib-winapi.patch" - patch_description: "Remove broken ZLIB WINAPI check" - patch_type: "portability" - - patch_file: "patches/0003-3.5.2-cmake.patch" - patch_description: "Make CMake cooperate with Conan" - patch_type: "conan" - "3.5.1": - - patch_file: "patches/0001-3.4.3-zlib-winapi.patch" - patch_description: "Remove broken ZLIB WINAPI check" - patch_type: "portability" - - patch_file: "patches/0003-3.5.1-cmake.patch" - patch_description: "Make CMake cooperate with Conan" - patch_type: "conan" - "3.4.3": - - patch_file: "patches/0001-3.4.3-zlib-winapi.patch" - patch_description: "Remove broken ZLIB WINAPI check" - patch_type: "portability" - - patch_file: "patches/0003-3.4.3-cmake.patch" - patch_description: "Make CMake cooperate with Conan" - patch_type: "conan" - "3.4.0": - - patch_file: "patches/0001-3.4.0-zlib-winapi.patch" - patch_description: "Remove broken ZLIB WINAPI check" - patch_type: "portability" - - patch_file: "patches/0002-3.4.0-msvc-no-we4061.patch" - patch_description: "Remove MSVC compiler warning e4061" - patch_type: "portability" - - patch_file: "patches/0003-3.4.0-cmake.patch" - patch_description: "Make CMake cooperate with Conan" - patch_type: "conan" diff --git a/recipes/libarchive/all/conanfile.py b/recipes/libarchive/all/conanfile.py index 6013bc25052c4..ba7095f6abb17 100644 --- a/recipes/libarchive/all/conanfile.py +++ b/recipes/libarchive/all/conanfile.py @@ -12,10 +12,10 @@ class LibarchiveConan(ConanFile): name = "libarchive" description = "Multi-format archive and compression library" - topics = "archive", "compression", "tar", "data-compressor", "file-compression" + license = "BSD-2-Clause" url = "https://github.com/conan-io/conan-center-index" homepage = "https://libarchive.org" - license = "BSD-2-Clause" + topics = ("archive", "compression", "tar", "data-compressor", "file-compression") package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { @@ -69,8 +69,6 @@ def export_sources(self): def config_options(self): if self.settings.os == "Windows": del self.options.fPIC - if Version(self.version) < "3.4.2": - del self.options.with_mbedtls if Version(self.version) < "3.7.3": del self.options.with_pcre2 @@ -89,13 +87,13 @@ def requirements(self): if self.options.with_bzip2: self.requires("bzip2/1.0.8") if self.options.with_libxml2: - self.requires("libxml2/2.12.3") + self.requires("libxml2/[>=2.12.5 <3]") if self.options.with_expat: - self.requires("expat/2.5.0") + self.requires("expat/[>=2.6.2 <3]") if self.options.with_iconv: self.requires("libiconv/1.17") if self.options.with_pcreposix: - self.requires("pcre2/10.42") + self.requires("pcre/8.45") if self.options.with_nettle: self.requires("nettle/3.9.1") if self.options.with_openssl: @@ -107,11 +105,11 @@ def requirements(self): if self.options.with_lzo: self.requires("lzo/2.10") if self.options.with_lzma: - self.requires("xz_utils/5.4.5") + self.requires("xz_utils/[>=5.4.5 <6]") if self.options.with_zstd: - self.requires("zstd/1.5.5") + self.requires("zstd/[>=1.5 <1.6]") if self.options.get_safe("with_mbedtls"): - self.requires("mbedtls/3.5.1") + self.requires("mbedtls/3.6.1") if self.options.get_safe("with_pcre2"): self.requires("pcre2/10.43") @@ -158,8 +156,7 @@ def generate(self): tc.variables["ENABLE_UNZIP"] = False # too strict check tc.variables["ENABLE_WERROR"] = False - if Version(self.version) >= "3.4.2": - tc.variables["ENABLE_MBEDTLS"] = self.options.with_mbedtls + tc.variables["ENABLE_MBEDTLS"] = self.options.with_mbedtls if Version(self.version) >= "3.7.3": tc.variables["ENABLE_PCRE2POSIX"] = self.options.with_pcre2 tc.variables["ENABLE_XATTR"] = self.options.with_xattr diff --git a/recipes/libarchive/all/patches/0001-3.4.0-zlib-winapi.patch b/recipes/libarchive/all/patches/0001-3.4.0-zlib-winapi.patch deleted file mode 100644 index 5acce6e86c2cd..0000000000000 --- a/recipes/libarchive/all/patches/0001-3.4.0-zlib-winapi.patch +++ /dev/null @@ -1,20 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 4fd93d04..922efd15 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -415,14 +415,7 @@ IF(ZLIB_FOUND) - INCLUDE_DIRECTORIES(${ZLIB_INCLUDE_DIR}) - LIST(APPEND ADDITIONAL_LIBS ${ZLIB_LIBRARIES}) - IF(WIN32 AND NOT CYGWIN) -- # -- # Test if ZLIB_WINAPI macro is needed to use. -- # -- TRY_MACRO_FOR_LIBRARY( -- "${ZLIB_INCLUDE_DIR}" "${ZLIB_LIBRARIES}" -- RUNS -- "#include \nint main() {uLong f = zlibCompileFlags(); return (f&(1U<<10))?0:-1; }" -- ZLIB_WINAPI) -+ set(ZLIB_WINAPI yes) - IF(ZLIB_WINAPI) - ADD_DEFINITIONS(-DZLIB_WINAPI) - ELSE(ZLIB_WINAPI) diff --git a/recipes/libarchive/all/patches/0001-3.4.3-zlib-winapi.patch b/recipes/libarchive/all/patches/0001-3.4.3-zlib-winapi.patch deleted file mode 100644 index b0d70de9dec3b..0000000000000 --- a/recipes/libarchive/all/patches/0001-3.4.3-zlib-winapi.patch +++ /dev/null @@ -1,20 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 6b00410c..e0359b51 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -420,14 +420,7 @@ IF(ZLIB_FOUND) - INCLUDE_DIRECTORIES(${ZLIB_INCLUDE_DIR}) - LIST(APPEND ADDITIONAL_LIBS ${ZLIB_LIBRARIES}) - IF(WIN32 AND NOT CYGWIN) -- # -- # Test if ZLIB_WINAPI macro is needed to use. -- # -- TRY_MACRO_FOR_LIBRARY( -- "${ZLIB_INCLUDE_DIR}" "${ZLIB_LIBRARIES}" -- RUNS -- "#include \nint main() {uLong f = zlibCompileFlags(); return (f&(1U<<10))?0:-1; }" -- ZLIB_WINAPI) -+ set(ZLIB_WINAPI yes) - IF(ZLIB_WINAPI) - ADD_DEFINITIONS(-DZLIB_WINAPI) - ELSE(ZLIB_WINAPI) diff --git a/recipes/libarchive/all/patches/0001-3.6.0-zlib-winapi.patch b/recipes/libarchive/all/patches/0001-3.6.0-zlib-winapi.patch deleted file mode 100644 index dceed2848f701..0000000000000 --- a/recipes/libarchive/all/patches/0001-3.6.0-zlib-winapi.patch +++ /dev/null @@ -1,20 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 7a0d300a..646e5ce7 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -426,14 +426,7 @@ IF(ZLIB_FOUND) - INCLUDE_DIRECTORIES(${ZLIB_INCLUDE_DIR}) - LIST(APPEND ADDITIONAL_LIBS ${ZLIB_LIBRARIES}) - IF(WIN32 AND NOT CYGWIN) -- # -- # Test if ZLIB_WINAPI macro is needed to use. -- # -- TRY_MACRO_FOR_LIBRARY( -- "${ZLIB_INCLUDE_DIR}" "${ZLIB_LIBRARIES}" -- RUNS -- "#include \nint main() {uLong f = zlibCompileFlags(); return (f&(1U<<10))?0:-1; }" -- ZLIB_WINAPI) -+ set(ZLIB_WINAPI yes) - IF(ZLIB_WINAPI) - ADD_DEFINITIONS(-DZLIB_WINAPI) - ELSE(ZLIB_WINAPI) diff --git a/recipes/libarchive/all/patches/0001-3.6.2-zlib-winapi.patch b/recipes/libarchive/all/patches/0001-3.6.2-zlib-winapi.patch deleted file mode 100644 index 9e88323972df9..0000000000000 --- a/recipes/libarchive/all/patches/0001-3.6.2-zlib-winapi.patch +++ /dev/null @@ -1,27 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 713e3bc..2315da5 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -430,14 +430,14 @@ IF(ZLIB_FOUND) - INCLUDE_DIRECTORIES(${ZLIB_INCLUDE_DIR}) - LIST(APPEND ADDITIONAL_LIBS ${ZLIB_LIBRARIES}) - IF(WIN32 AND NOT CYGWIN) -- # -- # Test if ZLIB_WINAPI macro is needed to use. -- # -- TRY_MACRO_FOR_LIBRARY( -- "${ZLIB_INCLUDE_DIR}" "${ZLIB_LIBRARIES}" -- RUNS -- "#include \nint main() {uLong f = zlibCompileFlags(); return (f&(1U<<10))?0:-1; }" -- ZLIB_WINAPI) -+ -+ -+ -+ -+ -+ -+ -+ set(ZLIB_WINAPI yes) - IF(ZLIB_WINAPI) - ADD_DEFINITIONS(-DZLIB_WINAPI) - ELSE(ZLIB_WINAPI) diff --git a/recipes/libarchive/all/patches/0001-3.7.1-zlib-winapi.patch b/recipes/libarchive/all/patches/0001-3.7.1-zlib-winapi.patch deleted file mode 100644 index beb5f743fa31f..0000000000000 --- a/recipes/libarchive/all/patches/0001-3.7.1-zlib-winapi.patch +++ /dev/null @@ -1,27 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 6849ce40..57cf7f8f 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -444,14 +444,14 @@ IF(ZLIB_FOUND) - INCLUDE_DIRECTORIES(${ZLIB_INCLUDE_DIR}) - LIST(APPEND ADDITIONAL_LIBS ${ZLIB_LIBRARIES}) - IF(WIN32 AND NOT CYGWIN) -- # -- # Test if ZLIB_WINAPI macro is needed to use. -- # -- TRY_MACRO_FOR_LIBRARY( -- "${ZLIB_INCLUDE_DIR}" "${ZLIB_LIBRARIES}" -- RUNS -- "#include \nint main() {uLong f = zlibCompileFlags(); return (f&(1U<<10))?0:-1; }" -- ZLIB_WINAPI) -+ -+ -+ -+ -+ -+ -+ -+ SET(ZLIB_WINAPI yes) - IF(ZLIB_WINAPI) - ADD_DEFINITIONS(-DZLIB_WINAPI) - ELSE(ZLIB_WINAPI) diff --git a/recipes/libarchive/all/patches/0001-3.7.2-zlib-winapi.patch b/recipes/libarchive/all/patches/0001-3.7.2-zlib-winapi.patch deleted file mode 100644 index 9c5a48b11c9e1..0000000000000 --- a/recipes/libarchive/all/patches/0001-3.7.2-zlib-winapi.patch +++ /dev/null @@ -1,35 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index ff1b025..53ecd0e 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -13,7 +13,6 @@ SET(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/build/cmake") - if(NOT CMAKE_RUNTIME_OUTPUT_DIRECTORY) - set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${libarchive_BINARY_DIR}/bin) - endif() --# - # Set the Build type for make based generators. - # You can choose following types: - # Debug : Debug build -@@ -445,14 +444,14 @@ IF(ZLIB_FOUND) - INCLUDE_DIRECTORIES(${ZLIB_INCLUDE_DIR}) - LIST(APPEND ADDITIONAL_LIBS ${ZLIB_LIBRARIES}) - IF(WIN32 AND NOT CYGWIN) -- # -- # Test if ZLIB_WINAPI macro is needed to use. -- # -- TRY_MACRO_FOR_LIBRARY( -- "${ZLIB_INCLUDE_DIR}" "${ZLIB_LIBRARIES}" -- RUNS -- "#include \nint main() {uLong f = zlibCompileFlags(); return (f&(1U<<10))?0:-1; }" -- ZLIB_WINAPI) -+ -+ -+ -+ -+ -+ -+ -+ SET(ZLIB_WINAPI yes) - IF(ZLIB_WINAPI) - ADD_DEFINITIONS(-DZLIB_WINAPI) - ELSE(ZLIB_WINAPI) diff --git a/recipes/libarchive/all/patches/0001-3.7.3-zlib-winapi.patch b/recipes/libarchive/all/patches/0001-3.7.3-zlib-winapi.patch deleted file mode 100644 index ca141ca403e55..0000000000000 --- a/recipes/libarchive/all/patches/0001-3.7.3-zlib-winapi.patch +++ /dev/null @@ -1,23 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index c0fbd70..44ca23d 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -454,12 +454,12 @@ IF(ZLIB_FOUND) - # - # Test if ZLIB_WINAPI macro is needed to use. - # -- TRY_MACRO_FOR_LIBRARY( -- "${ZLIB_INCLUDE_DIR}" "${ZLIB_LIBRARIES}" -- RUNS -- "#include \nint main() {uLong f = zlibCompileFlags(); return (f&(1U<<10))?0:-1; }" -- ZLIB_WINAPI) -- IF(ZLIB_WINAPI) -+ # TRY_MACRO_FOR_LIBRARY( -+ # "${ZLIB_INCLUDE_DIR}" "${ZLIB_LIBRARIES}" -+ # RUNS -+ # "#include \nint main() {uLong f = zlibCompileFlags(); return (f&(1U<<10))?0:-1; }" -+ # ZLIB_WINAPI) -+ IF(TRUE) - ADD_DEFINITIONS(-DZLIB_WINAPI) - ELSE(ZLIB_WINAPI) - # Test if a macro is needed for the library. diff --git a/recipes/libarchive/all/patches/0002-3.4.0-msvc-no-we4061.patch b/recipes/libarchive/all/patches/0002-3.4.0-msvc-no-we4061.patch deleted file mode 100644 index ff6f218ef3e36..0000000000000 --- a/recipes/libarchive/all/patches/0002-3.4.0-msvc-no-we4061.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 922efd15..4ffd0930 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -157,7 +157,6 @@ IF (MSVC) - # This is added into CMAKE_C_FLAGS when CMAKE_BUILD_TYPE is "Debug" - # Enable level 4 C4061: The enumerate has no associated handler in a switch - # statement. -- SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /we4061") - # Enable level 4 C4254: A larger bit field was assigned to a smaller bit - # field. - SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /we4254") diff --git a/recipes/libarchive/all/patches/0003-3.4.0-cmake.patch b/recipes/libarchive/all/patches/0003-3.4.0-cmake.patch deleted file mode 100644 index 7b34085f1a3a2..0000000000000 --- a/recipes/libarchive/all/patches/0003-3.4.0-cmake.patch +++ /dev/null @@ -1,142 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 4ffd0930..01e8592c 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -6,7 +6,7 @@ endif() - # - PROJECT(libarchive C) - # --SET(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/build/cmake") -+list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/build/cmake") - if(NOT CMAKE_RUNTIME_OUTPUT_DIRECTORY) - set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${libarchive_BINARY_DIR}/bin) - endif() -@@ -412,7 +412,7 @@ IF(ZLIB_FOUND) - SET(HAVE_LIBZ 1) - SET(HAVE_ZLIB_H 1) - INCLUDE_DIRECTORIES(${ZLIB_INCLUDE_DIR}) -- LIST(APPEND ADDITIONAL_LIBS ${ZLIB_LIBRARIES}) -+ LIST(APPEND ADDITIONAL_LIBS ZLIB::ZLIB) - IF(WIN32 AND NOT CYGWIN) - set(ZLIB_WINAPI yes) - IF(ZLIB_WINAPI) -@@ -474,7 +474,7 @@ IF(LIBLZMA_FOUND) - SET(HAVE_LIBLZMA 1) - SET(HAVE_LZMA_H 1) - CMAKE_PUSH_CHECK_STATE() -- SET(CMAKE_REQUIRED_INCLUDES ${LIBLZMA_INCLUDE_DIR}) -+ SET(CMAKE_REQUIRED_INCLUDES ${LIBLZMA_INCLUDE_DIRS}) - SET(CMAKE_REQUIRED_LIBRARIES ${LIBLZMA_LIBRARIES}) - INCLUDE_DIRECTORIES(${LIBLZMA_INCLUDE_DIRS}) - LIST(APPEND ADDITIONAL_LIBS ${LIBLZMA_LIBRARIES}) -@@ -491,7 +491,7 @@ IF(LIBLZMA_FOUND) - ELSE(LIBLZMA_FOUND) - # LZMA not found and will not be used. - ENDIF(LIBLZMA_FOUND) --MARK_AS_ADVANCED(CLEAR LIBLZMA_INCLUDE_DIR) -+MARK_AS_ADVANCED(CLEAR LIBLZMA_INCLUDE_DIRS) - MARK_AS_ADVANCED(CLEAR LIBLZMA_LIBRARY) - - # -@@ -561,7 +561,7 @@ IF(ENABLE_LZ4) - ENDIF (LZ4_INCLUDE_DIR) - - FIND_PATH(LZ4_INCLUDE_DIR lz4.h) -- FIND_LIBRARY(LZ4_LIBRARY NAMES lz4 liblz4) -+ FIND_LIBRARY(LZ4_LIBRARY NAMES lz4 liblz4 lz4_static liblz4_static) - INCLUDE(FindPackageHandleStandardArgs) - FIND_PACKAGE_HANDLE_STANDARD_ARGS(LZ4 DEFAULT_MSG LZ4_LIBRARY LZ4_INCLUDE_DIR) - ELSE(ENABLE_LZ4) -@@ -757,7 +757,7 @@ ENDIF(ENABLE_NETTLE) - # Find OpenSSL - # (Except on Mac, where OpenSSL is deprecated.) - # --IF(ENABLE_OPENSSL AND NOT CMAKE_SYSTEM_NAME MATCHES "Darwin") -+IF(ENABLE_OPENSSL) - FIND_PACKAGE(OpenSSL) - IF(OPENSSL_FOUND) - SET(HAVE_LIBCRYPTO 1) -@@ -1316,7 +1316,7 @@ CHECK_FUNCTION_EXISTS_GLIBC(localtime_r HAVE_LOCALTIME_R) - CHECK_FUNCTION_EXISTS_GLIBC(lstat HAVE_LSTAT) - CHECK_FUNCTION_EXISTS_GLIBC(lutimes HAVE_LUTIMES) - CHECK_FUNCTION_EXISTS_GLIBC(mbrtowc HAVE_MBRTOWC) --CHECK_FUNCTION_EXISTS_GLIBC(memmove HAVE_MEMMOVE) -+set(HAVE_MEMMOVE 1) - CHECK_FUNCTION_EXISTS_GLIBC(mkdir HAVE_MKDIR) - CHECK_FUNCTION_EXISTS_GLIBC(mkfifo HAVE_MKFIFO) - CHECK_FUNCTION_EXISTS_GLIBC(mknod HAVE_MKNOD) -@@ -1348,11 +1348,11 @@ CHECK_FUNCTION_EXISTS_GLIBC(utime HAVE_UTIME) - CHECK_FUNCTION_EXISTS_GLIBC(utimes HAVE_UTIMES) - CHECK_FUNCTION_EXISTS_GLIBC(utimensat HAVE_UTIMENSAT) - CHECK_FUNCTION_EXISTS_GLIBC(vfork HAVE_VFORK) --CHECK_FUNCTION_EXISTS_GLIBC(wcrtomb HAVE_WCRTOMB) --CHECK_FUNCTION_EXISTS_GLIBC(wcscmp HAVE_WCSCMP) --CHECK_FUNCTION_EXISTS_GLIBC(wcscpy HAVE_WCSCPY) --CHECK_FUNCTION_EXISTS_GLIBC(wcslen HAVE_WCSLEN) --CHECK_FUNCTION_EXISTS_GLIBC(wctomb HAVE_WCTOMB) -+set(HAVE_WCRTOMB 1) -+set(HAVE_WCSCMP 1) -+set(HAVE_WCSCPY 1) -+set(HAVE_WCSLEN 1) -+set(HAVE_WCTOMB 1) - CHECK_FUNCTION_EXISTS_GLIBC(_ctime64_s HAVE__CTIME64_S) - CHECK_FUNCTION_EXISTS_GLIBC(_fseeki64 HAVE__FSEEKI64) - CHECK_FUNCTION_EXISTS_GLIBC(_get_timezone HAVE__GET_TIMEZONE) -@@ -1364,10 +1364,10 @@ CHECK_FUNCTION_EXISTS(cygwin_conv_path HAVE_CYGWIN_CONV_PATH) - CHECK_FUNCTION_EXISTS(fseeko HAVE_FSEEKO) - CHECK_FUNCTION_EXISTS(strerror_r HAVE_STRERROR_R) - CHECK_FUNCTION_EXISTS(strftime HAVE_STRFTIME) --CHECK_FUNCTION_EXISTS(vprintf HAVE_VPRINTF) --CHECK_FUNCTION_EXISTS(wmemcmp HAVE_WMEMCMP) --CHECK_FUNCTION_EXISTS(wmemcpy HAVE_WMEMCPY) --CHECK_FUNCTION_EXISTS(wmemmove HAVE_WMEMMOVE) -+set(HAVE_VPRINTF 1) -+set(HAVE_WMEMCMP 1) -+set(HAVE_WMEMCPY 1) -+set(HAVE_WMEMMOVE 1) - - CMAKE_POP_CHECK_STATE() # Restore the state of the variables - -diff --git a/libarchive/CMakeLists.txt b/libarchive/CMakeLists.txt -index ec775bb4..8ef2d620 100644 ---- a/libarchive/CMakeLists.txt -+++ b/libarchive/CMakeLists.txt -@@ -235,11 +235,15 @@ ELSEIF(ARCHIVE_ACL_SUNOS) - ENDIF() - - # Libarchive is a shared library -+if (BUILD_SHARED_LIBS) -+ - ADD_LIBRARY(archive SHARED ${libarchive_SOURCES} ${include_HEADERS}) - TARGET_INCLUDE_DIRECTORIES(archive PUBLIC .) - TARGET_LINK_LIBRARIES(archive ${ADDITIONAL_LIBS}) - SET_TARGET_PROPERTIES(archive PROPERTIES SOVERSION ${SOVERSION}) - -+else() -+ - # archive_static is a static library - ADD_LIBRARY(archive_static STATIC ${libarchive_SOURCES} ${include_HEADERS}) - TARGET_LINK_LIBRARIES(archive_static ${ADDITIONAL_LIBS}) -@@ -249,13 +253,21 @@ SET_TARGET_PROPERTIES(archive_static PROPERTIES COMPILE_DEFINITIONS - IF(NOT WIN32 OR CYGWIN) - SET_TARGET_PROPERTIES(archive_static PROPERTIES OUTPUT_NAME archive) - ENDIF(NOT WIN32 OR CYGWIN) -+endif() - - IF(ENABLE_INSTALL) - # How to install the libraries -- INSTALL(TARGETS archive archive_static -+ if (BUILD_SHARED_LIBS) -+ INSTALL(TARGETS archive -+ RUNTIME DESTINATION bin -+ LIBRARY DESTINATION lib -+ ARCHIVE DESTINATION lib) -+ else() -+ INSTALL(TARGETS archive_static - RUNTIME DESTINATION bin - LIBRARY DESTINATION lib - ARCHIVE DESTINATION lib) -+ endif() - INSTALL_MAN(${libarchive_MANS}) - INSTALL(FILES ${include_HEADERS} DESTINATION include) - ENDIF() diff --git a/recipes/libarchive/all/patches/0003-3.4.3-cmake.patch b/recipes/libarchive/all/patches/0003-3.4.3-cmake.patch deleted file mode 100644 index 45a9561474f8e..0000000000000 --- a/recipes/libarchive/all/patches/0003-3.4.3-cmake.patch +++ /dev/null @@ -1,150 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 6013d9e6..125b1cb3 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -6,7 +6,7 @@ endif() - # - PROJECT(libarchive C) - # --SET(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/build/cmake") -+list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/build/cmake") - if(NOT CMAKE_RUNTIME_OUTPUT_DIRECTORY) - set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${libarchive_BINARY_DIR}/bin) - endif() -@@ -418,7 +418,7 @@ IF(ZLIB_FOUND) - SET(HAVE_LIBZ 1) - SET(HAVE_ZLIB_H 1) - INCLUDE_DIRECTORIES(${ZLIB_INCLUDE_DIR}) -- LIST(APPEND ADDITIONAL_LIBS ${ZLIB_LIBRARIES}) -+ LIST(APPEND ADDITIONAL_LIBS ZLIB::ZLIB) - IF(WIN32 AND NOT CYGWIN) - set(ZLIB_WINAPI yes) - IF(ZLIB_WINAPI) -@@ -480,7 +480,7 @@ IF(LIBLZMA_FOUND) - SET(HAVE_LIBLZMA 1) - SET(HAVE_LZMA_H 1) - CMAKE_PUSH_CHECK_STATE() -- SET(CMAKE_REQUIRED_INCLUDES ${LIBLZMA_INCLUDE_DIR}) -+ SET(CMAKE_REQUIRED_INCLUDES ${LIBLZMA_INCLUDE_DIRS}) - SET(CMAKE_REQUIRED_LIBRARIES ${LIBLZMA_LIBRARIES}) - INCLUDE_DIRECTORIES(${LIBLZMA_INCLUDE_DIRS}) - LIST(APPEND ADDITIONAL_LIBS ${LIBLZMA_LIBRARIES}) -@@ -497,7 +497,7 @@ IF(LIBLZMA_FOUND) - ELSE(LIBLZMA_FOUND) - # LZMA not found and will not be used. - ENDIF(LIBLZMA_FOUND) --MARK_AS_ADVANCED(CLEAR LIBLZMA_INCLUDE_DIR) -+MARK_AS_ADVANCED(CLEAR LIBLZMA_INCLUDE_DIRS) - MARK_AS_ADVANCED(CLEAR LIBLZMA_LIBRARY) - - # -@@ -567,7 +567,7 @@ IF(ENABLE_LZ4) - ENDIF (LZ4_INCLUDE_DIR) - - FIND_PATH(LZ4_INCLUDE_DIR lz4.h) -- FIND_LIBRARY(LZ4_LIBRARY NAMES lz4 liblz4) -+ FIND_LIBRARY(LZ4_LIBRARY NAMES lz4 liblz4 lz4_static liblz4_static) - INCLUDE(FindPackageHandleStandardArgs) - FIND_PACKAGE_HANDLE_STANDARD_ARGS(LZ4 DEFAULT_MSG LZ4_LIBRARY LZ4_INCLUDE_DIR) - ELSE(ENABLE_LZ4) -@@ -783,7 +783,7 @@ ENDIF(ENABLE_NETTLE) - # Find OpenSSL - # (Except on Mac, where OpenSSL is deprecated.) - # --IF(ENABLE_OPENSSL AND NOT CMAKE_SYSTEM_NAME MATCHES "Darwin") -+IF(ENABLE_OPENSSL) - FIND_PACKAGE(OpenSSL) - IF(OPENSSL_FOUND) - SET(HAVE_LIBCRYPTO 1) -@@ -1349,7 +1349,7 @@ CHECK_FUNCTION_EXISTS_GLIBC(localtime_r HAVE_LOCALTIME_R) - CHECK_FUNCTION_EXISTS_GLIBC(lstat HAVE_LSTAT) - CHECK_FUNCTION_EXISTS_GLIBC(lutimes HAVE_LUTIMES) - CHECK_FUNCTION_EXISTS_GLIBC(mbrtowc HAVE_MBRTOWC) --CHECK_FUNCTION_EXISTS_GLIBC(memmove HAVE_MEMMOVE) -+set(HAVE_MEMMOVE 1) - CHECK_FUNCTION_EXISTS_GLIBC(mkdir HAVE_MKDIR) - CHECK_FUNCTION_EXISTS_GLIBC(mkfifo HAVE_MKFIFO) - CHECK_FUNCTION_EXISTS_GLIBC(mknod HAVE_MKNOD) -@@ -1371,6 +1371,7 @@ CHECK_FUNCTION_EXISTS_GLIBC(strchr HAVE_STRCHR) - CHECK_FUNCTION_EXISTS_GLIBC(strdup HAVE_STRDUP) - CHECK_FUNCTION_EXISTS_GLIBC(strerror HAVE_STRERROR) - CHECK_FUNCTION_EXISTS_GLIBC(strncpy_s HAVE_STRNCPY_S) -+CHECK_FUNCTION_EXISTS_GLIBC(strnlen HAVE_STRNLEN) - CHECK_FUNCTION_EXISTS_GLIBC(strrchr HAVE_STRRCHR) - CHECK_FUNCTION_EXISTS_GLIBC(symlink HAVE_SYMLINK) - CHECK_FUNCTION_EXISTS_GLIBC(timegm HAVE_TIMEGM) -@@ -1381,11 +1382,11 @@ CHECK_FUNCTION_EXISTS_GLIBC(utime HAVE_UTIME) - CHECK_FUNCTION_EXISTS_GLIBC(utimes HAVE_UTIMES) - CHECK_FUNCTION_EXISTS_GLIBC(utimensat HAVE_UTIMENSAT) - CHECK_FUNCTION_EXISTS_GLIBC(vfork HAVE_VFORK) --CHECK_FUNCTION_EXISTS_GLIBC(wcrtomb HAVE_WCRTOMB) --CHECK_FUNCTION_EXISTS_GLIBC(wcscmp HAVE_WCSCMP) --CHECK_FUNCTION_EXISTS_GLIBC(wcscpy HAVE_WCSCPY) --CHECK_FUNCTION_EXISTS_GLIBC(wcslen HAVE_WCSLEN) --CHECK_FUNCTION_EXISTS_GLIBC(wctomb HAVE_WCTOMB) -+set(HAVE_WCRTOMB 1) -+set(HAVE_WCSCMP 1) -+set(HAVE_WCSCPY 1) -+set(HAVE_WCSLEN 1) -+set(HAVE_WCTOMB 1) - CHECK_FUNCTION_EXISTS_GLIBC(_ctime64_s HAVE__CTIME64_S) - CHECK_FUNCTION_EXISTS_GLIBC(_fseeki64 HAVE__FSEEKI64) - CHECK_FUNCTION_EXISTS_GLIBC(_get_timezone HAVE__GET_TIMEZONE) -@@ -1398,10 +1399,10 @@ CHECK_FUNCTION_EXISTS(cygwin_conv_path HAVE_CYGWIN_CONV_PATH) - CHECK_FUNCTION_EXISTS(fseeko HAVE_FSEEKO) - CHECK_FUNCTION_EXISTS(strerror_r HAVE_STRERROR_R) - CHECK_FUNCTION_EXISTS(strftime HAVE_STRFTIME) --CHECK_FUNCTION_EXISTS(vprintf HAVE_VPRINTF) --CHECK_FUNCTION_EXISTS(wmemcmp HAVE_WMEMCMP) --CHECK_FUNCTION_EXISTS(wmemcpy HAVE_WMEMCPY) --CHECK_FUNCTION_EXISTS(wmemmove HAVE_WMEMMOVE) -+set(HAVE_VPRINTF 1) -+set(HAVE_WMEMCMP 1) -+set(HAVE_WMEMCPY 1) -+set(HAVE_WMEMMOVE 1) - - CMAKE_POP_CHECK_STATE() # Restore the state of the variables - -diff --git a/libarchive/CMakeLists.txt b/libarchive/CMakeLists.txt -index 9389bbc9..76e0b5c7 100644 ---- a/libarchive/CMakeLists.txt -+++ b/libarchive/CMakeLists.txt -@@ -236,11 +236,15 @@ ELSEIF(ARCHIVE_ACL_SUNOS) - ENDIF() - - # Libarchive is a shared library -+if (BUILD_SHARED_LIBS) -+ - ADD_LIBRARY(archive SHARED ${libarchive_SOURCES} ${include_HEADERS}) - TARGET_INCLUDE_DIRECTORIES(archive PUBLIC .) - TARGET_LINK_LIBRARIES(archive ${ADDITIONAL_LIBS}) - SET_TARGET_PROPERTIES(archive PROPERTIES SOVERSION ${SOVERSION}) - -+else() -+ - # archive_static is a static library - ADD_LIBRARY(archive_static STATIC ${libarchive_SOURCES} ${include_HEADERS}) - TARGET_LINK_LIBRARIES(archive_static ${ADDITIONAL_LIBS}) -@@ -250,13 +254,21 @@ SET_TARGET_PROPERTIES(archive_static PROPERTIES COMPILE_DEFINITIONS - IF(NOT WIN32 OR CYGWIN) - SET_TARGET_PROPERTIES(archive_static PROPERTIES OUTPUT_NAME archive) - ENDIF(NOT WIN32 OR CYGWIN) -+endif() - - IF(ENABLE_INSTALL) - # How to install the libraries -- INSTALL(TARGETS archive archive_static -+ if (BUILD_SHARED_LIBS) -+ INSTALL(TARGETS archive -+ RUNTIME DESTINATION bin -+ LIBRARY DESTINATION lib -+ ARCHIVE DESTINATION lib) -+ else() -+ INSTALL(TARGETS archive_static - RUNTIME DESTINATION bin - LIBRARY DESTINATION lib - ARCHIVE DESTINATION lib) -+ endif() - INSTALL_MAN(${libarchive_MANS}) - INSTALL(FILES ${include_HEADERS} DESTINATION include) - ENDIF() diff --git a/recipes/libarchive/all/patches/0003-3.5.1-cmake.patch b/recipes/libarchive/all/patches/0003-3.5.1-cmake.patch deleted file mode 100644 index 181a183093fc3..0000000000000 --- a/recipes/libarchive/all/patches/0003-3.5.1-cmake.patch +++ /dev/null @@ -1,142 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 256b966e..30c42967 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -6,7 +6,7 @@ endif() - # - PROJECT(libarchive C) - # --SET(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/build/cmake") -+list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/build/cmake") - if(NOT CMAKE_RUNTIME_OUTPUT_DIRECTORY) - set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${libarchive_BINARY_DIR}/bin) - endif() -@@ -418,7 +418,7 @@ IF(ZLIB_FOUND) - SET(HAVE_LIBZ 1) - SET(HAVE_ZLIB_H 1) - INCLUDE_DIRECTORIES(${ZLIB_INCLUDE_DIR}) -- LIST(APPEND ADDITIONAL_LIBS ${ZLIB_LIBRARIES}) -+ LIST(APPEND ADDITIONAL_LIBS ZLIB::ZLIB) - IF(WIN32 AND NOT CYGWIN) - set(ZLIB_WINAPI yes) - IF(ZLIB_WINAPI) -@@ -480,7 +480,7 @@ IF(LIBLZMA_FOUND) - SET(HAVE_LIBLZMA 1) - SET(HAVE_LZMA_H 1) - CMAKE_PUSH_CHECK_STATE() -- SET(CMAKE_REQUIRED_INCLUDES ${LIBLZMA_INCLUDE_DIR}) -+ SET(CMAKE_REQUIRED_INCLUDES ${LIBLZMA_INCLUDE_DIRS}) - SET(CMAKE_REQUIRED_LIBRARIES ${LIBLZMA_LIBRARIES}) - INCLUDE_DIRECTORIES(${LIBLZMA_INCLUDE_DIRS}) - LIST(APPEND ADDITIONAL_LIBS ${LIBLZMA_LIBRARIES}) -@@ -497,7 +497,7 @@ IF(LIBLZMA_FOUND) - ELSE(LIBLZMA_FOUND) - # LZMA not found and will not be used. - ENDIF(LIBLZMA_FOUND) --MARK_AS_ADVANCED(CLEAR LIBLZMA_INCLUDE_DIR) -+MARK_AS_ADVANCED(CLEAR LIBLZMA_INCLUDE_DIRS) - MARK_AS_ADVANCED(CLEAR LIBLZMA_LIBRARY) - - # -@@ -567,7 +567,7 @@ IF(ENABLE_LZ4) - ENDIF (LZ4_INCLUDE_DIR) - - FIND_PATH(LZ4_INCLUDE_DIR lz4.h) -- FIND_LIBRARY(LZ4_LIBRARY NAMES lz4 liblz4) -+ FIND_LIBRARY(LZ4_LIBRARY NAMES lz4 liblz4 lz4_static liblz4_static) - INCLUDE(FindPackageHandleStandardArgs) - FIND_PACKAGE_HANDLE_STANDARD_ARGS(LZ4 DEFAULT_MSG LZ4_LIBRARY LZ4_INCLUDE_DIR) - ELSE(ENABLE_LZ4) -@@ -783,7 +783,7 @@ ENDIF(ENABLE_NETTLE) - # Find OpenSSL - # (Except on Mac, where OpenSSL is deprecated.) - # --IF(ENABLE_OPENSSL AND NOT CMAKE_SYSTEM_NAME MATCHES "Darwin") -+IF(ENABLE_OPENSSL) - FIND_PACKAGE(OpenSSL) - IF(OPENSSL_FOUND) - SET(HAVE_LIBCRYPTO 1) -@@ -1349,7 +1349,7 @@ CHECK_FUNCTION_EXISTS_GLIBC(localtime_r HAVE_LOCALTIME_R) - CHECK_FUNCTION_EXISTS_GLIBC(lstat HAVE_LSTAT) - CHECK_FUNCTION_EXISTS_GLIBC(lutimes HAVE_LUTIMES) - CHECK_FUNCTION_EXISTS_GLIBC(mbrtowc HAVE_MBRTOWC) --CHECK_FUNCTION_EXISTS_GLIBC(memmove HAVE_MEMMOVE) -+set(HAVE_MEMMOVE 1) - CHECK_FUNCTION_EXISTS_GLIBC(mkdir HAVE_MKDIR) - CHECK_FUNCTION_EXISTS_GLIBC(mkfifo HAVE_MKFIFO) - CHECK_FUNCTION_EXISTS_GLIBC(mknod HAVE_MKNOD) -@@ -1382,11 +1382,11 @@ CHECK_FUNCTION_EXISTS_GLIBC(utime HAVE_UTIME) - CHECK_FUNCTION_EXISTS_GLIBC(utimes HAVE_UTIMES) - CHECK_FUNCTION_EXISTS_GLIBC(utimensat HAVE_UTIMENSAT) - CHECK_FUNCTION_EXISTS_GLIBC(vfork HAVE_VFORK) --CHECK_FUNCTION_EXISTS_GLIBC(wcrtomb HAVE_WCRTOMB) --CHECK_FUNCTION_EXISTS_GLIBC(wcscmp HAVE_WCSCMP) --CHECK_FUNCTION_EXISTS_GLIBC(wcscpy HAVE_WCSCPY) --CHECK_FUNCTION_EXISTS_GLIBC(wcslen HAVE_WCSLEN) --CHECK_FUNCTION_EXISTS_GLIBC(wctomb HAVE_WCTOMB) -+set(HAVE_WCRTOMB 1) -+set(HAVE_WCSCMP 1) -+set(HAVE_WCSCPY 1) -+set(HAVE_WCSLEN 1) -+set(HAVE_WCTOMB 1) - CHECK_FUNCTION_EXISTS_GLIBC(_ctime64_s HAVE__CTIME64_S) - CHECK_FUNCTION_EXISTS_GLIBC(_fseeki64 HAVE__FSEEKI64) - CHECK_FUNCTION_EXISTS_GLIBC(_get_timezone HAVE__GET_TIMEZONE) -@@ -1399,10 +1399,10 @@ CHECK_FUNCTION_EXISTS(cygwin_conv_path HAVE_CYGWIN_CONV_PATH) - CHECK_FUNCTION_EXISTS(fseeko HAVE_FSEEKO) - CHECK_FUNCTION_EXISTS(strerror_r HAVE_STRERROR_R) - CHECK_FUNCTION_EXISTS(strftime HAVE_STRFTIME) --CHECK_FUNCTION_EXISTS(vprintf HAVE_VPRINTF) --CHECK_FUNCTION_EXISTS(wmemcmp HAVE_WMEMCMP) --CHECK_FUNCTION_EXISTS(wmemcpy HAVE_WMEMCPY) --CHECK_FUNCTION_EXISTS(wmemmove HAVE_WMEMMOVE) -+set(HAVE_VPRINTF 1) -+set(HAVE_WMEMCMP 1) -+set(HAVE_WMEMCPY 1) -+set(HAVE_WMEMMOVE 1) - - CMAKE_POP_CHECK_STATE() # Restore the state of the variables - -diff --git a/libarchive/CMakeLists.txt b/libarchive/CMakeLists.txt -index 9389bbc9..76e0b5c7 100644 ---- a/libarchive/CMakeLists.txt -+++ b/libarchive/CMakeLists.txt -@@ -236,11 +236,15 @@ ELSEIF(ARCHIVE_ACL_SUNOS) - ENDIF() - - # Libarchive is a shared library -+if (BUILD_SHARED_LIBS) -+ - ADD_LIBRARY(archive SHARED ${libarchive_SOURCES} ${include_HEADERS}) - TARGET_INCLUDE_DIRECTORIES(archive PUBLIC .) - TARGET_LINK_LIBRARIES(archive ${ADDITIONAL_LIBS}) - SET_TARGET_PROPERTIES(archive PROPERTIES SOVERSION ${SOVERSION}) - -+else() -+ - # archive_static is a static library - ADD_LIBRARY(archive_static STATIC ${libarchive_SOURCES} ${include_HEADERS}) - TARGET_LINK_LIBRARIES(archive_static ${ADDITIONAL_LIBS}) -@@ -250,13 +254,21 @@ SET_TARGET_PROPERTIES(archive_static PROPERTIES COMPILE_DEFINITIONS - IF(NOT WIN32 OR CYGWIN) - SET_TARGET_PROPERTIES(archive_static PROPERTIES OUTPUT_NAME archive) - ENDIF(NOT WIN32 OR CYGWIN) -+endif() - - IF(ENABLE_INSTALL) - # How to install the libraries -- INSTALL(TARGETS archive archive_static -+ if (BUILD_SHARED_LIBS) -+ INSTALL(TARGETS archive -+ RUNTIME DESTINATION bin -+ LIBRARY DESTINATION lib -+ ARCHIVE DESTINATION lib) -+ else() -+ INSTALL(TARGETS archive_static - RUNTIME DESTINATION bin - LIBRARY DESTINATION lib - ARCHIVE DESTINATION lib) -+ endif() - INSTALL_MAN(${libarchive_MANS}) - INSTALL(FILES ${include_HEADERS} DESTINATION include) - ENDIF() diff --git a/recipes/libarchive/all/patches/0003-3.5.2-cmake.patch b/recipes/libarchive/all/patches/0003-3.5.2-cmake.patch deleted file mode 100644 index 46955b7f8f7ce..0000000000000 --- a/recipes/libarchive/all/patches/0003-3.5.2-cmake.patch +++ /dev/null @@ -1,142 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index e0359b51..3927a742 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -6,7 +6,7 @@ endif() - # - PROJECT(libarchive C) - # --SET(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/build/cmake") -+list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/build/cmake") - if(NOT CMAKE_RUNTIME_OUTPUT_DIRECTORY) - set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${libarchive_BINARY_DIR}/bin) - endif() -@@ -418,7 +418,7 @@ IF(ZLIB_FOUND) - SET(HAVE_LIBZ 1) - SET(HAVE_ZLIB_H 1) - INCLUDE_DIRECTORIES(${ZLIB_INCLUDE_DIR}) -- LIST(APPEND ADDITIONAL_LIBS ${ZLIB_LIBRARIES}) -+ LIST(APPEND ADDITIONAL_LIBS ZLIB::ZLIB) - IF(WIN32 AND NOT CYGWIN) - set(ZLIB_WINAPI yes) - IF(ZLIB_WINAPI) -@@ -480,7 +480,7 @@ IF(LIBLZMA_FOUND) - SET(HAVE_LIBLZMA 1) - SET(HAVE_LZMA_H 1) - CMAKE_PUSH_CHECK_STATE() -- SET(CMAKE_REQUIRED_INCLUDES ${LIBLZMA_INCLUDE_DIR}) -+ SET(CMAKE_REQUIRED_INCLUDES ${LIBLZMA_INCLUDE_DIRS}) - SET(CMAKE_REQUIRED_LIBRARIES ${LIBLZMA_LIBRARIES}) - INCLUDE_DIRECTORIES(${LIBLZMA_INCLUDE_DIRS}) - LIST(APPEND ADDITIONAL_LIBS ${LIBLZMA_LIBRARIES}) -@@ -497,7 +497,7 @@ IF(LIBLZMA_FOUND) - ELSE(LIBLZMA_FOUND) - # LZMA not found and will not be used. - ENDIF(LIBLZMA_FOUND) --MARK_AS_ADVANCED(CLEAR LIBLZMA_INCLUDE_DIR) -+MARK_AS_ADVANCED(CLEAR LIBLZMA_INCLUDE_DIRS) - MARK_AS_ADVANCED(CLEAR LIBLZMA_LIBRARY) - - # -@@ -567,7 +567,7 @@ IF(ENABLE_LZ4) - ENDIF (LZ4_INCLUDE_DIR) - - FIND_PATH(LZ4_INCLUDE_DIR lz4.h) -- FIND_LIBRARY(LZ4_LIBRARY NAMES lz4 liblz4) -+ FIND_LIBRARY(LZ4_LIBRARY NAMES lz4 liblz4 lz4_static liblz4_static) - INCLUDE(FindPackageHandleStandardArgs) - FIND_PACKAGE_HANDLE_STANDARD_ARGS(LZ4 DEFAULT_MSG LZ4_LIBRARY LZ4_INCLUDE_DIR) - ELSE(ENABLE_LZ4) -@@ -783,7 +783,7 @@ ENDIF(ENABLE_NETTLE) - # Find OpenSSL - # (Except on Mac, where OpenSSL is deprecated.) - # --IF(ENABLE_OPENSSL AND NOT CMAKE_SYSTEM_NAME MATCHES "Darwin") -+IF(ENABLE_OPENSSL) - FIND_PACKAGE(OpenSSL) - IF(OPENSSL_FOUND) - SET(HAVE_LIBCRYPTO 1) -@@ -1350,7 +1350,7 @@ CHECK_FUNCTION_EXISTS_GLIBC(localtime_r HAVE_LOCALTIME_R) - CHECK_FUNCTION_EXISTS_GLIBC(lstat HAVE_LSTAT) - CHECK_FUNCTION_EXISTS_GLIBC(lutimes HAVE_LUTIMES) - CHECK_FUNCTION_EXISTS_GLIBC(mbrtowc HAVE_MBRTOWC) --CHECK_FUNCTION_EXISTS_GLIBC(memmove HAVE_MEMMOVE) -+set(HAVE_MEMMOVE 1) - CHECK_FUNCTION_EXISTS_GLIBC(mkdir HAVE_MKDIR) - CHECK_FUNCTION_EXISTS_GLIBC(mkfifo HAVE_MKFIFO) - CHECK_FUNCTION_EXISTS_GLIBC(mknod HAVE_MKNOD) -@@ -1383,11 +1383,11 @@ CHECK_FUNCTION_EXISTS_GLIBC(utime HAVE_UTIME) - CHECK_FUNCTION_EXISTS_GLIBC(utimes HAVE_UTIMES) - CHECK_FUNCTION_EXISTS_GLIBC(utimensat HAVE_UTIMENSAT) - CHECK_FUNCTION_EXISTS_GLIBC(vfork HAVE_VFORK) --CHECK_FUNCTION_EXISTS_GLIBC(wcrtomb HAVE_WCRTOMB) --CHECK_FUNCTION_EXISTS_GLIBC(wcscmp HAVE_WCSCMP) --CHECK_FUNCTION_EXISTS_GLIBC(wcscpy HAVE_WCSCPY) --CHECK_FUNCTION_EXISTS_GLIBC(wcslen HAVE_WCSLEN) --CHECK_FUNCTION_EXISTS_GLIBC(wctomb HAVE_WCTOMB) -+set(HAVE_WCRTOMB 1) -+set(HAVE_WCSCMP 1) -+set(HAVE_WCSCPY 1) -+set(HAVE_WCSLEN 1) -+set(HAVE_WCTOMB 1) - CHECK_FUNCTION_EXISTS_GLIBC(_ctime64_s HAVE__CTIME64_S) - CHECK_FUNCTION_EXISTS_GLIBC(_fseeki64 HAVE__FSEEKI64) - CHECK_FUNCTION_EXISTS_GLIBC(_get_timezone HAVE__GET_TIMEZONE) -@@ -1400,10 +1400,10 @@ CHECK_FUNCTION_EXISTS(cygwin_conv_path HAVE_CYGWIN_CONV_PATH) - CHECK_FUNCTION_EXISTS(fseeko HAVE_FSEEKO) - CHECK_FUNCTION_EXISTS(strerror_r HAVE_STRERROR_R) - CHECK_FUNCTION_EXISTS(strftime HAVE_STRFTIME) --CHECK_FUNCTION_EXISTS(vprintf HAVE_VPRINTF) --CHECK_FUNCTION_EXISTS(wmemcmp HAVE_WMEMCMP) --CHECK_FUNCTION_EXISTS(wmemcpy HAVE_WMEMCPY) --CHECK_FUNCTION_EXISTS(wmemmove HAVE_WMEMMOVE) -+set(HAVE_VPRINTF 1) -+set(HAVE_WMEMCMP 1) -+set(HAVE_WMEMCPY 1) -+set(HAVE_WMEMMOVE 1) - - CMAKE_POP_CHECK_STATE() # Restore the state of the variables - -diff --git a/libarchive/CMakeLists.txt b/libarchive/CMakeLists.txt -index e1d76a51..792b26b3 100644 ---- a/libarchive/CMakeLists.txt -+++ b/libarchive/CMakeLists.txt -@@ -238,11 +238,15 @@ ELSEIF(ARCHIVE_ACL_SUNOS) - ENDIF() - - # Libarchive is a shared library -+if (BUILD_SHARED_LIBS) -+ - ADD_LIBRARY(archive SHARED ${libarchive_SOURCES} ${include_HEADERS}) - TARGET_INCLUDE_DIRECTORIES(archive PUBLIC .) - TARGET_LINK_LIBRARIES(archive ${ADDITIONAL_LIBS}) - SET_TARGET_PROPERTIES(archive PROPERTIES SOVERSION ${SOVERSION}) - -+else() -+ - # archive_static is a static library - ADD_LIBRARY(archive_static STATIC ${libarchive_SOURCES} ${include_HEADERS}) - TARGET_LINK_LIBRARIES(archive_static ${ADDITIONAL_LIBS}) -@@ -252,13 +256,21 @@ SET_TARGET_PROPERTIES(archive_static PROPERTIES COMPILE_DEFINITIONS - IF(NOT WIN32 OR CYGWIN) - SET_TARGET_PROPERTIES(archive_static PROPERTIES OUTPUT_NAME archive) - ENDIF(NOT WIN32 OR CYGWIN) -+endif() - - IF(ENABLE_INSTALL) - # How to install the libraries -- INSTALL(TARGETS archive archive_static -+ if (BUILD_SHARED_LIBS) -+ INSTALL(TARGETS archive -+ RUNTIME DESTINATION bin -+ LIBRARY DESTINATION lib -+ ARCHIVE DESTINATION lib) -+ else() -+ INSTALL(TARGETS archive_static - RUNTIME DESTINATION bin - LIBRARY DESTINATION lib - ARCHIVE DESTINATION lib) -+ endif() - INSTALL_MAN(${libarchive_MANS}) - INSTALL(FILES ${include_HEADERS} DESTINATION include) - ENDIF() diff --git a/recipes/libarchive/all/patches/0003-3.6.0-cmake.patch b/recipes/libarchive/all/patches/0003-3.6.0-cmake.patch deleted file mode 100644 index 3c89010df2aba..0000000000000 --- a/recipes/libarchive/all/patches/0003-3.6.0-cmake.patch +++ /dev/null @@ -1,153 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 646e5ce7..9bca273f 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -9,7 +9,7 @@ endif() - # - PROJECT(libarchive C) - # --SET(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/build/cmake") -+list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/build/cmake") - if(NOT CMAKE_RUNTIME_OUTPUT_DIRECTORY) - set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${libarchive_BINARY_DIR}/bin) - endif() -@@ -424,7 +424,7 @@ IF(ZLIB_FOUND) - SET(HAVE_LIBZ 1) - SET(HAVE_ZLIB_H 1) - INCLUDE_DIRECTORIES(${ZLIB_INCLUDE_DIR}) -- LIST(APPEND ADDITIONAL_LIBS ${ZLIB_LIBRARIES}) -+ LIST(APPEND ADDITIONAL_LIBS ZLIB::ZLIB) - IF(WIN32 AND NOT CYGWIN) - set(ZLIB_WINAPI yes) - IF(ZLIB_WINAPI) -@@ -486,7 +486,7 @@ IF(LIBLZMA_FOUND) - SET(HAVE_LIBLZMA 1) - SET(HAVE_LZMA_H 1) - CMAKE_PUSH_CHECK_STATE() -- SET(CMAKE_REQUIRED_INCLUDES ${LIBLZMA_INCLUDE_DIR}) -+ SET(CMAKE_REQUIRED_INCLUDES ${LIBLZMA_INCLUDE_DIRS}) - SET(CMAKE_REQUIRED_LIBRARIES ${LIBLZMA_LIBRARIES}) - INCLUDE_DIRECTORIES(${LIBLZMA_INCLUDE_DIRS}) - LIST(APPEND ADDITIONAL_LIBS ${LIBLZMA_LIBRARIES}) -@@ -503,7 +503,7 @@ IF(LIBLZMA_FOUND) - ELSE(LIBLZMA_FOUND) - # LZMA not found and will not be used. - ENDIF(LIBLZMA_FOUND) --MARK_AS_ADVANCED(CLEAR LIBLZMA_INCLUDE_DIR) -+MARK_AS_ADVANCED(CLEAR LIBLZMA_INCLUDE_DIRS) - MARK_AS_ADVANCED(CLEAR LIBLZMA_LIBRARY) - - # -@@ -573,7 +573,7 @@ IF(ENABLE_LZ4) - ENDIF (LZ4_INCLUDE_DIR) - - FIND_PATH(LZ4_INCLUDE_DIR lz4.h) -- FIND_LIBRARY(LZ4_LIBRARY NAMES lz4 liblz4) -+ FIND_LIBRARY(LZ4_LIBRARY NAMES lz4 liblz4 lz4_static liblz4_static) - INCLUDE(FindPackageHandleStandardArgs) - FIND_PACKAGE_HANDLE_STANDARD_ARGS(LZ4 DEFAULT_MSG LZ4_LIBRARY LZ4_INCLUDE_DIR) - ELSE(ENABLE_LZ4) -@@ -790,7 +790,7 @@ ENDIF(ENABLE_NETTLE) - # Find OpenSSL - # (Except on Mac, where OpenSSL is deprecated.) - # --IF(ENABLE_OPENSSL AND NOT CMAKE_SYSTEM_NAME MATCHES "Darwin") -+IF(ENABLE_OPENSSL) - FIND_PACKAGE(OpenSSL) - IF(OPENSSL_FOUND) - SET(HAVE_LIBCRYPTO 1) -@@ -1357,7 +1357,7 @@ CHECK_FUNCTION_EXISTS_GLIBC(localtime_r HAVE_LOCALTIME_R) - CHECK_FUNCTION_EXISTS_GLIBC(lstat HAVE_LSTAT) - CHECK_FUNCTION_EXISTS_GLIBC(lutimes HAVE_LUTIMES) - CHECK_FUNCTION_EXISTS_GLIBC(mbrtowc HAVE_MBRTOWC) --CHECK_FUNCTION_EXISTS_GLIBC(memmove HAVE_MEMMOVE) -+set(HAVE_MEMMOVE 1) - CHECK_FUNCTION_EXISTS_GLIBC(mkdir HAVE_MKDIR) - CHECK_FUNCTION_EXISTS_GLIBC(mkfifo HAVE_MKFIFO) - CHECK_FUNCTION_EXISTS_GLIBC(mknod HAVE_MKNOD) -@@ -1390,11 +1390,11 @@ CHECK_FUNCTION_EXISTS_GLIBC(utime HAVE_UTIME) - CHECK_FUNCTION_EXISTS_GLIBC(utimes HAVE_UTIMES) - CHECK_FUNCTION_EXISTS_GLIBC(utimensat HAVE_UTIMENSAT) - CHECK_FUNCTION_EXISTS_GLIBC(vfork HAVE_VFORK) --CHECK_FUNCTION_EXISTS_GLIBC(wcrtomb HAVE_WCRTOMB) --CHECK_FUNCTION_EXISTS_GLIBC(wcscmp HAVE_WCSCMP) --CHECK_FUNCTION_EXISTS_GLIBC(wcscpy HAVE_WCSCPY) --CHECK_FUNCTION_EXISTS_GLIBC(wcslen HAVE_WCSLEN) --CHECK_FUNCTION_EXISTS_GLIBC(wctomb HAVE_WCTOMB) -+set(HAVE_WCRTOMB 1) -+set(HAVE_WCSCMP 1) -+set(HAVE_WCSCPY 1) -+set(HAVE_WCSLEN 1) -+set(HAVE_WCTOMB 1) - CHECK_FUNCTION_EXISTS_GLIBC(_ctime64_s HAVE__CTIME64_S) - CHECK_FUNCTION_EXISTS_GLIBC(_fseeki64 HAVE__FSEEKI64) - CHECK_FUNCTION_EXISTS_GLIBC(_get_timezone HAVE__GET_TIMEZONE) -@@ -1407,10 +1407,10 @@ CHECK_FUNCTION_EXISTS(cygwin_conv_path HAVE_CYGWIN_CONV_PATH) - CHECK_FUNCTION_EXISTS(fseeko HAVE_FSEEKO) - CHECK_FUNCTION_EXISTS(strerror_r HAVE_STRERROR_R) - CHECK_FUNCTION_EXISTS(strftime HAVE_STRFTIME) --CHECK_FUNCTION_EXISTS(vprintf HAVE_VPRINTF) --CHECK_FUNCTION_EXISTS(wmemcmp HAVE_WMEMCMP) --CHECK_FUNCTION_EXISTS(wmemcpy HAVE_WMEMCPY) --CHECK_FUNCTION_EXISTS(wmemmove HAVE_WMEMMOVE) -+set(HAVE_VPRINTF 1) -+set(HAVE_WMEMCMP 1) -+set(HAVE_WMEMCPY 1) -+set(HAVE_WMEMMOVE 1) - - CMAKE_POP_CHECK_STATE() # Restore the state of the variables - -diff --git a/libarchive/CMakeLists.txt b/libarchive/CMakeLists.txt -index e1d76a51..713c6496 100644 ---- a/libarchive/CMakeLists.txt -+++ b/libarchive/CMakeLists.txt -@@ -5,6 +5,10 @@ - # - ############################################ - -+if (ANDROID) -+ include_directories(${PROJECT_SOURCE_DIR}/contrib/android/include) -+endif() -+ - # Public headers - SET(include_HEADERS - archive.h -@@ -238,11 +242,15 @@ ELSEIF(ARCHIVE_ACL_SUNOS) - ENDIF() - - # Libarchive is a shared library -+if (BUILD_SHARED_LIBS) -+ - ADD_LIBRARY(archive SHARED ${libarchive_SOURCES} ${include_HEADERS}) - TARGET_INCLUDE_DIRECTORIES(archive PUBLIC .) - TARGET_LINK_LIBRARIES(archive ${ADDITIONAL_LIBS}) - SET_TARGET_PROPERTIES(archive PROPERTIES SOVERSION ${SOVERSION}) - -+else() -+ - # archive_static is a static library - ADD_LIBRARY(archive_static STATIC ${libarchive_SOURCES} ${include_HEADERS}) - TARGET_LINK_LIBRARIES(archive_static ${ADDITIONAL_LIBS}) -@@ -252,13 +260,21 @@ SET_TARGET_PROPERTIES(archive_static PROPERTIES COMPILE_DEFINITIONS - IF(NOT WIN32 OR CYGWIN) - SET_TARGET_PROPERTIES(archive_static PROPERTIES OUTPUT_NAME archive) - ENDIF(NOT WIN32 OR CYGWIN) -+endif() - - IF(ENABLE_INSTALL) - # How to install the libraries -- INSTALL(TARGETS archive archive_static -+ if (BUILD_SHARED_LIBS) -+ INSTALL(TARGETS archive -+ RUNTIME DESTINATION bin -+ LIBRARY DESTINATION lib -+ ARCHIVE DESTINATION lib) -+ else() -+ INSTALL(TARGETS archive_static - RUNTIME DESTINATION bin - LIBRARY DESTINATION lib - ARCHIVE DESTINATION lib) -+ endif() - INSTALL_MAN(${libarchive_MANS}) - INSTALL(FILES ${include_HEADERS} DESTINATION include) - ENDIF() diff --git a/recipes/libarchive/all/patches/0003-3.6.2-cmake.patch b/recipes/libarchive/all/patches/0003-3.6.2-cmake.patch deleted file mode 100644 index aca2961950d2d..0000000000000 --- a/recipes/libarchive/all/patches/0003-3.6.2-cmake.patch +++ /dev/null @@ -1,98 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index a4a9284a..f5dbccac 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -9,7 +9,7 @@ endif() - # - PROJECT(libarchive C) - # --SET(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/build/cmake") -+list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/build/cmake") - if(NOT CMAKE_RUNTIME_OUTPUT_DIRECTORY) - set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${libarchive_BINARY_DIR}/bin) - endif() -@@ -428,7 +428,7 @@ IF(ZLIB_FOUND) - SET(HAVE_LIBZ 1) - SET(HAVE_ZLIB_H 1) - INCLUDE_DIRECTORIES(${ZLIB_INCLUDE_DIR}) -- LIST(APPEND ADDITIONAL_LIBS ${ZLIB_LIBRARIES}) -+ LIST(APPEND ADDITIONAL_LIBS ZLIB::ZLIB) - IF(WIN32 AND NOT CYGWIN) - - -@@ -497,7 +497,7 @@ IF(LIBLZMA_FOUND) - SET(HAVE_LIBLZMA 1) - SET(HAVE_LZMA_H 1) - CMAKE_PUSH_CHECK_STATE() -- SET(CMAKE_REQUIRED_INCLUDES ${LIBLZMA_INCLUDE_DIR}) -+ SET(CMAKE_REQUIRED_INCLUDES ${LIBLZMA_INCLUDE_DIRS}) - SET(CMAKE_REQUIRED_LIBRARIES ${LIBLZMA_LIBRARIES}) - INCLUDE_DIRECTORIES(${LIBLZMA_INCLUDE_DIRS}) - LIST(APPEND ADDITIONAL_LIBS ${LIBLZMA_LIBRARIES}) -@@ -514,7 +514,7 @@ IF(LIBLZMA_FOUND) - ELSE(LIBLZMA_FOUND) - # LZMA not found and will not be used. - ENDIF(LIBLZMA_FOUND) --MARK_AS_ADVANCED(CLEAR LIBLZMA_INCLUDE_DIR) -+MARK_AS_ADVANCED(CLEAR LIBLZMA_INCLUDE_DIRS) - MARK_AS_ADVANCED(CLEAR LIBLZMA_LIBRARY) - - # -@@ -584,7 +584,7 @@ IF(ENABLE_LZ4) - ENDIF (LZ4_INCLUDE_DIR) - - FIND_PATH(LZ4_INCLUDE_DIR lz4.h) -- FIND_LIBRARY(LZ4_LIBRARY NAMES lz4 liblz4) -+ FIND_LIBRARY(LZ4_LIBRARY NAMES lz4 liblz4 lz4_static liblz4_static) - INCLUDE(FindPackageHandleStandardArgs) - FIND_PACKAGE_HANDLE_STANDARD_ARGS(LZ4 DEFAULT_MSG LZ4_LIBRARY LZ4_INCLUDE_DIR) - ELSE(ENABLE_LZ4) -@@ -806,7 +806,7 @@ ENDIF(ENABLE_NETTLE) - # Find OpenSSL - # (Except on Mac, where OpenSSL is deprecated.) - # --IF(ENABLE_OPENSSL AND NOT CMAKE_SYSTEM_NAME MATCHES "Darwin") -+IF(ENABLE_OPENSSL) - FIND_PACKAGE(OpenSSL) - IF(OPENSSL_FOUND) - SET(HAVE_LIBCRYPTO 1) -diff --git a/libarchive/CMakeLists.txt b/libarchive/CMakeLists.txt -index ff7ade00..8c867130 100644 ---- a/libarchive/CMakeLists.txt -+++ b/libarchive/CMakeLists.txt -@@ -242,13 +242,13 @@ ELSEIF(ARCHIVE_ACL_SUNOS) - LIST(APPEND libarchive_SOURCES archive_disk_acl_sunos.c) - ENDIF() - --# Libarchive is a shared library -+if (BUILD_SHARED_LIBS) - ADD_LIBRARY(archive SHARED ${libarchive_SOURCES} ${include_HEADERS}) - TARGET_INCLUDE_DIRECTORIES(archive PUBLIC .) - TARGET_LINK_LIBRARIES(archive ${ADDITIONAL_LIBS}) - SET_TARGET_PROPERTIES(archive PROPERTIES SOVERSION ${SOVERSION}) - --# archive_static is a static library -+else() - ADD_LIBRARY(archive_static STATIC ${libarchive_SOURCES} ${include_HEADERS}) - TARGET_LINK_LIBRARIES(archive_static ${ADDITIONAL_LIBS}) - SET_TARGET_PROPERTIES(archive_static PROPERTIES COMPILE_DEFINITIONS -@@ -257,13 +257,13 @@ SET_TARGET_PROPERTIES(archive_static PROPERTIES COMPILE_DEFINITIONS - IF(NOT WIN32 OR CYGWIN) - SET_TARGET_PROPERTIES(archive_static PROPERTIES OUTPUT_NAME archive) - ENDIF(NOT WIN32 OR CYGWIN) -- -+endif() - IF(ENABLE_INSTALL) -- # How to install the libraries -- INSTALL(TARGETS archive archive_static -- RUNTIME DESTINATION bin -- LIBRARY DESTINATION lib -- ARCHIVE DESTINATION lib) -+ if (BUILD_SHARED_LIBS) -+ INSTALL(TARGETS archive RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib) -+ else() -+ INSTALL(TARGETS archive_static RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib) -+ endif() - INSTALL_MAN(${libarchive_MANS}) - INSTALL(FILES ${include_HEADERS} DESTINATION include) - ENDIF() diff --git a/recipes/libarchive/all/patches/0003-3.7.1-cmake.patch b/recipes/libarchive/all/patches/0003-3.7.1-cmake.patch deleted file mode 100644 index 67a75a07b08b2..0000000000000 --- a/recipes/libarchive/all/patches/0003-3.7.1-cmake.patch +++ /dev/null @@ -1,91 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 6849ce40..8d5b6018 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -9,7 +9,7 @@ endif() - # - PROJECT(libarchive C) - # --SET(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/build/cmake") -+LIST(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/build/cmake") - if(NOT CMAKE_RUNTIME_OUTPUT_DIRECTORY) - set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${libarchive_BINARY_DIR}/bin) - endif() -@@ -442,7 +442,7 @@ IF(ZLIB_FOUND) - SET(HAVE_LIBZ 1) - SET(HAVE_ZLIB_H 1) - INCLUDE_DIRECTORIES(${ZLIB_INCLUDE_DIR}) -- LIST(APPEND ADDITIONAL_LIBS ${ZLIB_LIBRARIES}) -+ LIST(APPEND ADDITIONAL_LIBS ZLIB::ZLIB) - IF(WIN32 AND NOT CYGWIN) - - -@@ -511,7 +511,7 @@ IF(LIBLZMA_FOUND) - SET(HAVE_LIBLZMA 1) - SET(HAVE_LZMA_H 1) - CMAKE_PUSH_CHECK_STATE() -- SET(CMAKE_REQUIRED_INCLUDES ${LIBLZMA_INCLUDE_DIR}) -+ SET(CMAKE_REQUIRED_INCLUDES ${LIBLZMA_INCLUDE_DIRS}) - SET(CMAKE_REQUIRED_LIBRARIES ${LIBLZMA_LIBRARIES}) - INCLUDE_DIRECTORIES(${LIBLZMA_INCLUDE_DIRS}) - LIST(APPEND ADDITIONAL_LIBS ${LIBLZMA_LIBRARIES}) -@@ -532,7 +532,7 @@ ELSE(LIBLZMA_FOUND) - # LZMA not found and will not be used. - SET(HAVE_LZMA_STREAM_ENCODER_MT 0) - ENDIF(LIBLZMA_FOUND) --MARK_AS_ADVANCED(CLEAR LIBLZMA_INCLUDE_DIR) -+MARK_AS_ADVANCED(CLEAR LIBLZMA_INCLUDE_DIRS) - MARK_AS_ADVANCED(CLEAR LIBLZMA_LIBRARY) - - # -@@ -603,7 +603,7 @@ IF(ENABLE_LZ4) - ENDIF (LZ4_INCLUDE_DIR) - - FIND_PATH(LZ4_INCLUDE_DIR lz4.h) -- FIND_LIBRARY(LZ4_LIBRARY NAMES lz4 liblz4) -+ FIND_LIBRARY(LZ4_LIBRARY NAMES lz4 liblz4 lz4_static liblz4_static) - INCLUDE(FindPackageHandleStandardArgs) - FIND_PACKAGE_HANDLE_STANDARD_ARGS(LZ4 DEFAULT_MSG LZ4_LIBRARY LZ4_INCLUDE_DIR) - ELSE(ENABLE_LZ4) -@@ -827,7 +827,7 @@ ENDIF(ENABLE_NETTLE) - # Find OpenSSL - # (Except on Mac, where OpenSSL is deprecated.) - # --IF(ENABLE_OPENSSL AND NOT CMAKE_SYSTEM_NAME MATCHES "Darwin") -+IF(ENABLE_OPENSSL) - FIND_PACKAGE(OpenSSL) - IF(OPENSSL_FOUND) - SET(HAVE_LIBCRYPTO 1) -diff --git a/libarchive/CMakeLists.txt b/libarchive/CMakeLists.txt -index f7fdfb68..9d2915ac 100644 ---- a/libarchive/CMakeLists.txt -+++ b/libarchive/CMakeLists.txt -@@ -251,6 +251,7 @@ IF(BUILD_SHARED_LIBS) - ENDIF(BUILD_SHARED_LIBS) - - # archive_static is a static library -+if(NOT BUILD_SHARED_LIBS) - ADD_LIBRARY(archive_static STATIC ${libarchive_SOURCES} ${include_HEADERS}) - TARGET_LINK_LIBRARIES(archive_static ${ADDITIONAL_LIBS}) - SET_TARGET_PROPERTIES(archive_static PROPERTIES COMPILE_DEFINITIONS -@@ -259,6 +260,7 @@ SET_TARGET_PROPERTIES(archive_static PROPERTIES COMPILE_DEFINITIONS - IF(NOT WIN32 OR CYGWIN OR NOT BUILD_SHARED_LIBS) - SET_TARGET_PROPERTIES(archive_static PROPERTIES OUTPUT_NAME archive) - ENDIF(NOT WIN32 OR CYGWIN OR NOT BUILD_SHARED_LIBS) -+endif() - - IF(ENABLE_INSTALL) - # How to install the libraries -@@ -268,10 +270,12 @@ IF(ENABLE_INSTALL) - LIBRARY DESTINATION lib - ARCHIVE DESTINATION lib) - ENDIF(BUILD_SHARED_LIBS) -+ if(NOT BUILD_SHARED_LIBS) - INSTALL(TARGETS archive_static - RUNTIME DESTINATION bin - LIBRARY DESTINATION lib - ARCHIVE DESTINATION lib) -+ endif() - INSTALL_MAN(${libarchive_MANS}) - INSTALL(FILES ${include_HEADERS} DESTINATION include) - ENDIF() diff --git a/recipes/libarchive/all/patches/0003-3.7.2-cmake.patch b/recipes/libarchive/all/patches/0003-3.7.2-cmake.patch new file mode 100644 index 0000000000000..ffd8ff242c656 --- /dev/null +++ b/recipes/libarchive/all/patches/0003-3.7.2-cmake.patch @@ -0,0 +1,83 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 6849ce40..8d5b6018 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -9,7 +9,7 @@ endif() + # + PROJECT(libarchive C) + # +-SET(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/build/cmake") ++LIST(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/build/cmake") + if(NOT CMAKE_RUNTIME_OUTPUT_DIRECTORY) + set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${libarchive_BINARY_DIR}/bin) + endif() + +@@ -511,7 +511,7 @@ IF(LIBLZMA_FOUND) + SET(HAVE_LIBLZMA 1) + SET(HAVE_LZMA_H 1) + CMAKE_PUSH_CHECK_STATE() +- SET(CMAKE_REQUIRED_INCLUDES ${LIBLZMA_INCLUDE_DIR}) ++ SET(CMAKE_REQUIRED_INCLUDES ${LIBLZMA_INCLUDE_DIRS}) + SET(CMAKE_REQUIRED_LIBRARIES ${LIBLZMA_LIBRARIES}) + INCLUDE_DIRECTORIES(${LIBLZMA_INCLUDE_DIRS}) + LIST(APPEND ADDITIONAL_LIBS ${LIBLZMA_LIBRARIES}) +@@ -532,7 +532,7 @@ ELSE(LIBLZMA_FOUND) + # LZMA not found and will not be used. + SET(HAVE_LZMA_STREAM_ENCODER_MT 0) + ENDIF(LIBLZMA_FOUND) +-MARK_AS_ADVANCED(CLEAR LIBLZMA_INCLUDE_DIR) ++MARK_AS_ADVANCED(CLEAR LIBLZMA_INCLUDE_DIRS) + MARK_AS_ADVANCED(CLEAR LIBLZMA_LIBRARY) + + # +@@ -603,7 +603,7 @@ IF(ENABLE_LZ4) + ENDIF (LZ4_INCLUDE_DIR) + + FIND_PATH(LZ4_INCLUDE_DIR lz4.h) +- FIND_LIBRARY(LZ4_LIBRARY NAMES lz4 liblz4) ++ FIND_LIBRARY(LZ4_LIBRARY NAMES lz4 liblz4 lz4_static liblz4_static) + INCLUDE(FindPackageHandleStandardArgs) + FIND_PACKAGE_HANDLE_STANDARD_ARGS(LZ4 DEFAULT_MSG LZ4_LIBRARY LZ4_INCLUDE_DIR) + ELSE(ENABLE_LZ4) +@@ -827,7 +827,7 @@ ENDIF(ENABLE_NETTLE) + # Find OpenSSL + # (Except on Mac, where OpenSSL is deprecated.) + # +-IF(ENABLE_OPENSSL AND NOT CMAKE_SYSTEM_NAME MATCHES "Darwin") ++IF(ENABLE_OPENSSL) + FIND_PACKAGE(OpenSSL) + IF(OPENSSL_FOUND) + SET(HAVE_LIBCRYPTO 1) +diff --git a/libarchive/CMakeLists.txt b/libarchive/CMakeLists.txt +index f7fdfb68..9d2915ac 100644 +--- a/libarchive/CMakeLists.txt ++++ b/libarchive/CMakeLists.txt +@@ -251,6 +251,7 @@ IF(BUILD_SHARED_LIBS) + ENDIF(BUILD_SHARED_LIBS) + + # archive_static is a static library ++if(NOT BUILD_SHARED_LIBS) + ADD_LIBRARY(archive_static STATIC ${libarchive_SOURCES} ${include_HEADERS}) + TARGET_LINK_LIBRARIES(archive_static ${ADDITIONAL_LIBS}) + SET_TARGET_PROPERTIES(archive_static PROPERTIES COMPILE_DEFINITIONS +@@ -259,6 +260,7 @@ SET_TARGET_PROPERTIES(archive_static PROPERTIES COMPILE_DEFINITIONS + IF(NOT WIN32 OR CYGWIN OR NOT BUILD_SHARED_LIBS) + SET_TARGET_PROPERTIES(archive_static PROPERTIES OUTPUT_NAME archive) + ENDIF(NOT WIN32 OR CYGWIN OR NOT BUILD_SHARED_LIBS) ++endif() + + IF(ENABLE_INSTALL) + # How to install the libraries +@@ -268,10 +270,12 @@ IF(ENABLE_INSTALL) + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib) + ENDIF(BUILD_SHARED_LIBS) ++ if(NOT BUILD_SHARED_LIBS) + INSTALL(TARGETS archive_static + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib) ++ endif() + INSTALL_MAN(${libarchive_MANS}) + INSTALL(FILES ${include_HEADERS} DESTINATION include) + ENDIF() diff --git a/recipes/libarchive/all/patches/0003-3.7.4-cmake.patch b/recipes/libarchive/all/patches/0003-3.7.4-cmake.patch new file mode 100644 index 0000000000000..1cd38344e5586 --- /dev/null +++ b/recipes/libarchive/all/patches/0003-3.7.4-cmake.patch @@ -0,0 +1,83 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 7e87e07..2c9a5f8 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -12,7 +12,7 @@ endif() + # + PROJECT(libarchive C) + # +-SET(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/build/cmake") ++LIST(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/build/cmake") + if(NOT CMAKE_RUNTIME_OUTPUT_DIRECTORY) + set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${libarchive_BINARY_DIR}/bin) + endif() +@@ -451,7 +451,7 @@ IF(ZLIB_FOUND) + SET(HAVE_LIBZ 1) + SET(HAVE_ZLIB_H 1) + INCLUDE_DIRECTORIES(${ZLIB_INCLUDE_DIR}) +- LIST(APPEND ADDITIONAL_LIBS ${ZLIB_LIBRARIES}) ++ LIST(APPEND ADDITIONAL_LIBS ZLIB::ZLIB) + IF(WIN32 AND NOT CYGWIN) + # + # Test if ZLIB_WINAPI macro is needed to use. +@@ -541,7 +541,7 @@ ELSE(LIBLZMA_FOUND) + # LZMA not found and will not be used. + SET(HAVE_LZMA_STREAM_ENCODER_MT 0) + ENDIF(LIBLZMA_FOUND) +-MARK_AS_ADVANCED(CLEAR LIBLZMA_INCLUDE_DIR) ++MARK_AS_ADVANCED(CLEAR LIBLZMA_INCLUDE_DIRS) + MARK_AS_ADVANCED(CLEAR LIBLZMA_LIBRARY) + + # +@@ -612,7 +612,7 @@ IF(ENABLE_LZ4) + ENDIF (LZ4_INCLUDE_DIR) + + FIND_PATH(LZ4_INCLUDE_DIR lz4.h) +- FIND_LIBRARY(LZ4_LIBRARY NAMES lz4 liblz4) ++ FIND_LIBRARY(LZ4_LIBRARY NAMES lz4 liblz4 lz4_static liblz4_static) + INCLUDE(FindPackageHandleStandardArgs) + FIND_PACKAGE_HANDLE_STANDARD_ARGS(LZ4 DEFAULT_MSG LZ4_LIBRARY LZ4_INCLUDE_DIR) + ELSE(ENABLE_LZ4) +@@ -836,7 +836,7 @@ ENDIF(ENABLE_NETTLE) + # Find OpenSSL + # (Except on Mac, where OpenSSL is deprecated.) + # +-IF(ENABLE_OPENSSL AND NOT CMAKE_SYSTEM_NAME MATCHES "Darwin") ++IF(ENABLE_OPENSSL) + FIND_PACKAGE(OpenSSL) + IF(OPENSSL_FOUND) + SET(HAVE_LIBCRYPTO 1) +diff --git a/libarchive/CMakeLists.txt b/libarchive/CMakeLists.txt +index b79091c..bd9e980 100644 +--- a/libarchive/CMakeLists.txt ++++ b/libarchive/CMakeLists.txt +@@ -251,6 +251,7 @@ IF(BUILD_SHARED_LIBS) + ENDIF(BUILD_SHARED_LIBS) + + # archive_static is a static library ++if(NOT BUILD_SHARED_LIBS) + ADD_LIBRARY(archive_static STATIC ${libarchive_SOURCES} ${include_HEADERS}) + TARGET_INCLUDE_DIRECTORIES(archive_static PUBLIC .) + TARGET_LINK_LIBRARIES(archive_static ${ADDITIONAL_LIBS}) +@@ -260,7 +261,7 @@ SET_TARGET_PROPERTIES(archive_static PROPERTIES COMPILE_DEFINITIONS + IF(NOT WIN32 OR CYGWIN OR NOT BUILD_SHARED_LIBS) + SET_TARGET_PROPERTIES(archive_static PROPERTIES OUTPUT_NAME archive) + ENDIF(NOT WIN32 OR CYGWIN OR NOT BUILD_SHARED_LIBS) +- ++endif() + IF(ENABLE_INSTALL) + # How to install the libraries + IF(BUILD_SHARED_LIBS) +@@ -269,10 +270,12 @@ IF(ENABLE_INSTALL) + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib) + ENDIF(BUILD_SHARED_LIBS) ++ if(NOT BUILD_SHARED_LIBS) + INSTALL(TARGETS archive_static + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib) ++ endif() + INSTALL_MAN(${libarchive_MANS}) + INSTALL(FILES ${include_HEADERS} DESTINATION include) + ENDIF() diff --git a/recipes/libarchive/all/patches/0003-3.7.6-cmake.patch b/recipes/libarchive/all/patches/0003-3.7.6-cmake.patch new file mode 100644 index 0000000000000..98e97aac6cf07 --- /dev/null +++ b/recipes/libarchive/all/patches/0003-3.7.6-cmake.patch @@ -0,0 +1,84 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 582258c..b59a7e2 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -16,7 +16,7 @@ endif() + # + PROJECT(libarchive C) + # +-SET(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/build/cmake") ++LIST(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/build/cmake") + if(NOT CMAKE_RUNTIME_OUTPUT_DIRECTORY) + set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${libarchive_BINARY_DIR}/bin) + endif() +@@ -469,7 +469,7 @@ ENDIF() + IF(ZLIB_FOUND) + SET(HAVE_LIBZ 1) + SET(HAVE_ZLIB_H 1) + INCLUDE_DIRECTORIES(${ZLIB_INCLUDE_DIR}) +- LIST(APPEND ADDITIONAL_LIBS ${ZLIB_LIBRARIES}) ++ LIST(APPEND ADDITIONAL_LIBS ZLIB::ZLIB) + IF(WIN32 AND NOT CYGWIN) + # +@@ -560,7 +560,7 @@ ELSE(LIBLZMA_FOUND) + # LZMA not found and will not be used. + SET(HAVE_LZMA_STREAM_ENCODER_MT 0) + ENDIF(LIBLZMA_FOUND) +-MARK_AS_ADVANCED(CLEAR LIBLZMA_INCLUDE_DIR) ++MARK_AS_ADVANCED(CLEAR LIBLZMA_INCLUDE_DIRS) + MARK_AS_ADVANCED(CLEAR LIBLZMA_LIBRARY) + + # +@@ -631,7 +631,7 @@ IF(ENABLE_LZ4) + ENDIF (LZ4_INCLUDE_DIR) + + FIND_PATH(LZ4_INCLUDE_DIR lz4.h) +- FIND_LIBRARY(LZ4_LIBRARY NAMES lz4 liblz4) ++ FIND_LIBRARY(LZ4_LIBRARY NAMES lz4 liblz4 lz4_static liblz4_static) + INCLUDE(FindPackageHandleStandardArgs) + FIND_PACKAGE_HANDLE_STANDARD_ARGS(LZ4 DEFAULT_MSG LZ4_LIBRARY LZ4_INCLUDE_DIR) + ELSE(ENABLE_LZ4) +@@ -854,7 +854,7 @@ ENDIF(ENABLE_NETTLE) + # Find OpenSSL + # (Except on Mac, where OpenSSL is deprecated.) + # +-IF(ENABLE_OPENSSL AND NOT CMAKE_SYSTEM_NAME MATCHES "Darwin") ++IF(ENABLE_OPENSSL) + FIND_PACKAGE(OpenSSL) + IF(OPENSSL_FOUND) + SET(HAVE_LIBCRYPTO 1) +diff --git a/libarchive/CMakeLists.txt b/libarchive/CMakeLists.txt +index dd0b280..2a31de6 100644 +--- a/libarchive/CMakeLists.txt ++++ b/libarchive/CMakeLists.txt +@@ -255,6 +255,7 @@ IF(BUILD_SHARED_LIBS) + ENDIF(BUILD_SHARED_LIBS) + + # archive_static is a static library ++IF(NOT BUILD_SHARED_LIBS) + ADD_LIBRARY(archive_static STATIC ${libarchive_SOURCES} ${include_HEADERS}) + TARGET_INCLUDE_DIRECTORIES(archive_static PUBLIC .) + TARGET_LINK_LIBRARIES(archive_static ${ADDITIONAL_LIBS}) +@@ -264,7 +265,7 @@ SET_TARGET_PROPERTIES(archive_static PROPERTIES COMPILE_DEFINITIONS + IF(NOT WIN32 OR CYGWIN OR NOT BUILD_SHARED_LIBS) + SET_TARGET_PROPERTIES(archive_static PROPERTIES OUTPUT_NAME archive) + ENDIF(NOT WIN32 OR CYGWIN OR NOT BUILD_SHARED_LIBS) +- ++ENDIF() + IF(ENABLE_INSTALL) + # How to install the libraries + IF(BUILD_SHARED_LIBS) +@@ -272,11 +273,12 @@ IF(ENABLE_INSTALL) + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib) +- ENDIF(BUILD_SHARED_LIBS) ++ ELSE() + INSTALL(TARGETS archive_static + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib) ++ ENDIF() + INSTALL_MAN(${libarchive_MANS}) + INSTALL(FILES ${include_HEADERS} DESTINATION include) + ENDIF() diff --git a/recipes/libarchive/all/patches/0004-3.6.0-android.patch b/recipes/libarchive/all/patches/0004-3.6.0-android.patch deleted file mode 100644 index c4c91d3ecb18a..0000000000000 --- a/recipes/libarchive/all/patches/0004-3.6.0-android.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff --git a/libarchive/CMakeLists.txt b/libarchive/CMakeLists.txt -index 792b26b3..713c6496 100644 ---- a/libarchive/CMakeLists.txt -+++ b/libarchive/CMakeLists.txt -@@ -5,6 +5,10 @@ - # - ############################################ - -+if (ANDROID) -+ include_directories(${PROJECT_SOURCE_DIR}/contrib/android/include) -+endif() -+ - # Public headers - SET(include_HEADERS - archive.h diff --git a/recipes/libarchive/all/patches/0005-3.6.2-try-compile-cmakedeps.patch b/recipes/libarchive/all/patches/0005-3.6.2-try-compile-cmakedeps.patch deleted file mode 100644 index 69e42f1f5678b..0000000000000 --- a/recipes/libarchive/all/patches/0005-3.6.2-try-compile-cmakedeps.patch +++ /dev/null @@ -1,39 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index f5dbccac..ea7ff16a 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -830,12 +830,11 @@ IF(NOT OPENSSL_FOUND) - ENDIF(NOT OPENSSL_FOUND) - - # --# How to prove that CRYPTO functions, which have several names on various --# platforms, just see if archive_digest.c can compile and link against --# required libraries. - # - MACRO(CHECK_CRYPTO ALGORITHMS IMPLEMENTATION) -- FOREACH(ALGORITHM ${ALGORITHMS}) -+ FOREACH(ALGORITHM ${ALGORITHMS}) -+ include(CMakePushCheckState) -+ cmake_push_check_state() - IF(NOT ARCHIVE_CRYPTO_${ALGORITHM}) - STRING(TOLOWER "${ALGORITHM}" lower_algorithm) - STRING(TOUPPER "${ALGORITHM}" algorithm) -@@ -856,8 +855,8 @@ MACRO(CHECK_CRYPTO ALGORITHMS IMPLEMENTATION) - IF ("${IMPLEMENTATION}" MATCHES "^OPENSSL$" AND OPENSSL_FOUND) - SET(TRY_CRYPTO_REQUIRED_INCLUDES - "${TRY_CRYPTO_REQUIRED_INCLUDES};${OPENSSL_INCLUDE_DIR}") -- SET(TRY_CRYPTO_REQUIRED_LIBS -- "-DLINK_LIBRARIES:STRING=${OPENSSL_LIBRARIES}") -+ set(CMAKE_REQUIRED_LIBRARIES -+ ${OPENSSL_LIBRARIES}) - ELSEIF("${IMPLEMENTATION}" MATCHES "^MBEDTLS$" AND MBEDTLS_FOUND) - SET(TRY_CRYPTO_REQUIRED_INCLUDES - "${TRY_CRYPTO_REQUIRED_INCLUDES};${MBEDTLS_INCLUDE_DIRS}") -@@ -934,6 +933,7 @@ main(int argc, char **argv) - ENDIF ("${IMPLEMENTATION}" MATCHES "^OPENSSL$" AND OPENSSL_FOUND) - ENDIF (ARCHIVE_CRYPTO_${ALGORITHM}_${IMPLEMENTATION}) - ENDIF(NOT ARCHIVE_CRYPTO_${ALGORITHM}) -+ cmake_pop_check_state() - ENDFOREACH(ALGORITHM ${ALGORITHMS}) - ENDMACRO(CHECK_CRYPTO ALGORITHMS IMPLEMENTATION) - diff --git a/recipes/libarchive/all/patches/0005-3.7.1-try-compile-cmakedeps.patch b/recipes/libarchive/all/patches/0005-3.7.1-try-compile-cmakedeps.patch deleted file mode 100644 index c71291d02944a..0000000000000 --- a/recipes/libarchive/all/patches/0005-3.7.1-try-compile-cmakedeps.patch +++ /dev/null @@ -1,32 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 6849ce40..e7c9fbee 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -854,14 +854,14 @@ IF(NOT OPENSSL_FOUND) - ENDIF(LIBMD_FOUND) - ENDIF(NOT OPENSSL_FOUND) - --# - # How to prove that CRYPTO functions, which have several names on various - # platforms, just see if archive_digest.c can compile and link against - # required libraries. --# - MACRO(CHECK_CRYPTO ALGORITHMS IMPLEMENTATION) -+ include(CMakePushCheckState) - FOREACH(ALGORITHM ${ALGORITHMS}) - IF(NOT ARCHIVE_CRYPTO_${ALGORITHM}) -+ cmake_push_check_state() - STRING(TOLOWER "${ALGORITHM}" lower_algorithm) - STRING(TOUPPER "${ALGORITHM}" algorithm) - IF ("${IMPLEMENTATION}" MATCHES "^OPENSSL$" AND NOT OPENSSL_FOUND) -@@ -881,8 +881,8 @@ MACRO(CHECK_CRYPTO ALGORITHMS IMPLEMENTATION) - IF ("${IMPLEMENTATION}" MATCHES "^OPENSSL$" AND OPENSSL_FOUND) - SET(TRY_CRYPTO_REQUIRED_INCLUDES - "${TRY_CRYPTO_REQUIRED_INCLUDES};${OPENSSL_INCLUDE_DIR}") -- SET(TRY_CRYPTO_REQUIRED_LIBS -- "-DLINK_LIBRARIES:STRING=${OPENSSL_LIBRARIES}") -+ SET(CMAKE_REQUIRED_LIBRARIES ${OPENSSL_LIBRARIES}) -+ - ELSEIF("${IMPLEMENTATION}" MATCHES "^MBEDTLS$" AND MBEDTLS_FOUND) - SET(TRY_CRYPTO_REQUIRED_INCLUDES - "${TRY_CRYPTO_REQUIRED_INCLUDES};${MBEDTLS_INCLUDE_DIRS}") diff --git a/recipes/libarchive/all/patches/0005-3.7.2-try-compile-cmakedeps.patch b/recipes/libarchive/all/patches/0005-3.7.2-try-compile-cmakedeps.patch new file mode 100644 index 0000000000000..53603bc1f64f9 --- /dev/null +++ b/recipes/libarchive/all/patches/0005-3.7.2-try-compile-cmakedeps.patch @@ -0,0 +1,32 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 6849ce40..e7c9fbee 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -855,14 +855,14 @@ IF(NOT OPENSSL_FOUND) + ENDIF(LIBMD_FOUND) + ENDIF(NOT OPENSSL_FOUND) + +-# + # How to prove that CRYPTO functions, which have several names on various + # platforms, just see if archive_digest.c can compile and link against + # required libraries. +-# + MACRO(CHECK_CRYPTO ALGORITHMS IMPLEMENTATION) ++ include(CMakePushCheckState) + FOREACH(ALGORITHM ${ALGORITHMS}) + IF(NOT ARCHIVE_CRYPTO_${ALGORITHM}) ++ cmake_push_check_state() + STRING(TOLOWER "${ALGORITHM}" lower_algorithm) + STRING(TOUPPER "${ALGORITHM}" algorithm) + IF ("${IMPLEMENTATION}" MATCHES "^OPENSSL$" AND NOT OPENSSL_FOUND) +@@ -882,8 +882,8 @@ MACRO(CHECK_CRYPTO ALGORITHMS IMPLEMENTATION) + IF ("${IMPLEMENTATION}" MATCHES "^OPENSSL$" AND OPENSSL_FOUND) + SET(TRY_CRYPTO_REQUIRED_INCLUDES + "${TRY_CRYPTO_REQUIRED_INCLUDES};${OPENSSL_INCLUDE_DIR}") +- SET(TRY_CRYPTO_REQUIRED_LIBS +- "-DLINK_LIBRARIES:STRING=${OPENSSL_LIBRARIES}") ++ SET(CMAKE_REQUIRED_LIBRARIES ${OPENSSL_LIBRARIES}) ++ + ELSEIF("${IMPLEMENTATION}" MATCHES "^MBEDTLS$" AND MBEDTLS_FOUND) + SET(TRY_CRYPTO_REQUIRED_INCLUDES + "${TRY_CRYPTO_REQUIRED_INCLUDES};${MBEDTLS_INCLUDE_DIRS}") diff --git a/recipes/libarchive/all/patches/0005-3.7.4-try-compile-cmakedeps.patch b/recipes/libarchive/all/patches/0005-3.7.4-try-compile-cmakedeps.patch new file mode 100644 index 0000000000000..a6c90a0205df0 --- /dev/null +++ b/recipes/libarchive/all/patches/0005-3.7.4-try-compile-cmakedeps.patch @@ -0,0 +1,25 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 2c9a5f8..91d0f49 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -869,8 +869,10 @@ ENDIF(NOT OPENSSL_FOUND) + # required libraries. + # + MACRO(CHECK_CRYPTO ALGORITHMS IMPLEMENTATION) ++ include(CMakePushCheckState) + FOREACH(ALGORITHM ${ALGORITHMS}) + IF(NOT ARCHIVE_CRYPTO_${ALGORITHM}) ++ cmake_push_check_state() + STRING(TOLOWER "${ALGORITHM}" lower_algorithm) + STRING(TOUPPER "${ALGORITHM}" algorithm) + IF ("${IMPLEMENTATION}" MATCHES "^OPENSSL$" AND NOT OPENSSL_FOUND) +@@ -903,8 +905,7 @@ MACRO(CHECK_CRYPTO ALGORITHMS IMPLEMENTATION) + SET(TRY_CRYPTO_REQUIRED_LIBS + "-DLINK_LIBRARIES:STRING=${NETTLE_LIBRARY}") + ELSEIF("${IMPLEMENTATION}" MATCHES "^LIBMD$" AND LIBMD_FOUND) +- SET(TRY_CRYPTO_REQUIRED_LIBS +- "-DLINK_LIBRARIES:STRING=${LIBMD_LIBRARY}") ++ SET(CMAKE_REQUIRED_LIBRARIES ${OPENSSL_LIBRARIES}) + ENDIF("${IMPLEMENTATION}" MATCHES "^OPENSSL$" AND OPENSSL_FOUND) + + CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/build/cmake/config.h.in diff --git a/recipes/libarchive/all/patches/0005-3.7.6-try-compile-cmakedeps.patch b/recipes/libarchive/all/patches/0005-3.7.6-try-compile-cmakedeps.patch new file mode 100644 index 0000000000000..7485f8082d921 --- /dev/null +++ b/recipes/libarchive/all/patches/0005-3.7.6-try-compile-cmakedeps.patch @@ -0,0 +1,25 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index b59a7e2..dfa6af0 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -887,8 +887,10 @@ ENDIF(NOT OPENSSL_FOUND) + # required libraries. + # + MACRO(CHECK_CRYPTO ALGORITHMS IMPLEMENTATION) ++ include(CMakePushCheckState) + FOREACH(ALGORITHM ${ALGORITHMS}) + IF(NOT ARCHIVE_CRYPTO_${ALGORITHM}) ++ cmake_push_check_state() + STRING(TOLOWER "${ALGORITHM}" lower_algorithm) + STRING(TOUPPER "${ALGORITHM}" algorithm) + IF ("${IMPLEMENTATION}" MATCHES "^OPENSSL$" AND NOT OPENSSL_FOUND) +@@ -921,8 +923,7 @@ MACRO(CHECK_CRYPTO ALGORITHMS IMPLEMENTATION) + SET(TRY_CRYPTO_REQUIRED_LIBS + "-DLINK_LIBRARIES:STRING=${NETTLE_LIBRARY}") + ELSEIF("${IMPLEMENTATION}" MATCHES "^LIBMD$" AND LIBMD_FOUND) +- SET(TRY_CRYPTO_REQUIRED_LIBS +- "-DLINK_LIBRARIES:STRING=${LIBMD_LIBRARY}") ++ SET(CMAKE_REQUIRED_LIBRARIES ${OPENSSL_LIBRARIES}) + ENDIF("${IMPLEMENTATION}" MATCHES "^OPENSSL$" AND OPENSSL_FOUND) + + CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/build/cmake/config.h.in diff --git a/recipes/libarchive/all/patches/0006-3.6.2-fix-msvc-build.patch b/recipes/libarchive/all/patches/0006-3.6.2-fix-msvc-build.patch deleted file mode 100644 index c0903cf80cf94..0000000000000 --- a/recipes/libarchive/all/patches/0006-3.6.2-fix-msvc-build.patch +++ /dev/null @@ -1,48 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 713e3bc5..9bc36214 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -1374,7 +1374,7 @@ CHECK_FUNCTION_EXISTS_GLIBC(localtime_r HAVE_LOCALTIME_R) - CHECK_FUNCTION_EXISTS_GLIBC(lstat HAVE_LSTAT) - CHECK_FUNCTION_EXISTS_GLIBC(lutimes HAVE_LUTIMES) - CHECK_FUNCTION_EXISTS_GLIBC(mbrtowc HAVE_MBRTOWC) --CHECK_FUNCTION_EXISTS_GLIBC(memmove HAVE_MEMMOVE) -+set(HAVE_MEMMOVE 1) - CHECK_FUNCTION_EXISTS_GLIBC(mkdir HAVE_MKDIR) - CHECK_FUNCTION_EXISTS_GLIBC(mkfifo HAVE_MKFIFO) - CHECK_FUNCTION_EXISTS_GLIBC(mknod HAVE_MKNOD) -@@ -1407,11 +1407,11 @@ CHECK_FUNCTION_EXISTS_GLIBC(utime HAVE_UTIME) - CHECK_FUNCTION_EXISTS_GLIBC(utimes HAVE_UTIMES) - CHECK_FUNCTION_EXISTS_GLIBC(utimensat HAVE_UTIMENSAT) - CHECK_FUNCTION_EXISTS_GLIBC(vfork HAVE_VFORK) --CHECK_FUNCTION_EXISTS_GLIBC(wcrtomb HAVE_WCRTOMB) --CHECK_FUNCTION_EXISTS_GLIBC(wcscmp HAVE_WCSCMP) --CHECK_FUNCTION_EXISTS_GLIBC(wcscpy HAVE_WCSCPY) --CHECK_FUNCTION_EXISTS_GLIBC(wcslen HAVE_WCSLEN) --CHECK_FUNCTION_EXISTS_GLIBC(wctomb HAVE_WCTOMB) -+set(HAVE_WCRTOMB 1) -+set(HAVE_WCSCMP 1) -+set(HAVE_WCSCPY 1) -+set(HAVE_WCSLEN 1) -+set(HAVE_WCTOMB 1) - CHECK_FUNCTION_EXISTS_GLIBC(_ctime64_s HAVE__CTIME64_S) - CHECK_FUNCTION_EXISTS_GLIBC(_fseeki64 HAVE__FSEEKI64) - CHECK_FUNCTION_EXISTS_GLIBC(_get_timezone HAVE__GET_TIMEZONE) -@@ -1424,10 +1424,10 @@ CHECK_FUNCTION_EXISTS(cygwin_conv_path HAVE_CYGWIN_CONV_PATH) - CHECK_FUNCTION_EXISTS(fseeko HAVE_FSEEKO) - CHECK_FUNCTION_EXISTS(strerror_r HAVE_STRERROR_R) - CHECK_FUNCTION_EXISTS(strftime HAVE_STRFTIME) --CHECK_FUNCTION_EXISTS(vprintf HAVE_VPRINTF) --CHECK_FUNCTION_EXISTS(wmemcmp HAVE_WMEMCMP) --CHECK_FUNCTION_EXISTS(wmemcpy HAVE_WMEMCPY) --CHECK_FUNCTION_EXISTS(wmemmove HAVE_WMEMMOVE) -+set(HAVE_VPRINTF 1) -+set(HAVE_WMEMCMP 1) -+set(HAVE_WMEMCPY 1) -+set(HAVE_WMEMMOVE 1) - - CMAKE_POP_CHECK_STATE() # Restore the state of the variables - --- -2.33.0.windows.1 - diff --git a/recipes/libarchive/all/patches/0006-3.7.1-fix-msvc-build.patch b/recipes/libarchive/all/patches/0006-3.7.1-fix-msvc-build.patch deleted file mode 100644 index 04ec53a2e20ba..0000000000000 --- a/recipes/libarchive/all/patches/0006-3.7.1-fix-msvc-build.patch +++ /dev/null @@ -1,45 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 6849ce40..d5dac48b 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -1401,7 +1401,7 @@ CHECK_FUNCTION_EXISTS_GLIBC(localtime_r HAVE_LOCALTIME_R) - CHECK_FUNCTION_EXISTS_GLIBC(lstat HAVE_LSTAT) - CHECK_FUNCTION_EXISTS_GLIBC(lutimes HAVE_LUTIMES) - CHECK_FUNCTION_EXISTS_GLIBC(mbrtowc HAVE_MBRTOWC) --CHECK_FUNCTION_EXISTS_GLIBC(memmove HAVE_MEMMOVE) -+SET(HAVE_MEMMOVE 1) - CHECK_FUNCTION_EXISTS_GLIBC(mkdir HAVE_MKDIR) - CHECK_FUNCTION_EXISTS_GLIBC(mkfifo HAVE_MKFIFO) - CHECK_FUNCTION_EXISTS_GLIBC(mknod HAVE_MKNOD) -@@ -1434,11 +1434,11 @@ CHECK_FUNCTION_EXISTS_GLIBC(utime HAVE_UTIME) - CHECK_FUNCTION_EXISTS_GLIBC(utimes HAVE_UTIMES) - CHECK_FUNCTION_EXISTS_GLIBC(utimensat HAVE_UTIMENSAT) - CHECK_FUNCTION_EXISTS_GLIBC(vfork HAVE_VFORK) --CHECK_FUNCTION_EXISTS_GLIBC(wcrtomb HAVE_WCRTOMB) --CHECK_FUNCTION_EXISTS_GLIBC(wcscmp HAVE_WCSCMP) --CHECK_FUNCTION_EXISTS_GLIBC(wcscpy HAVE_WCSCPY) --CHECK_FUNCTION_EXISTS_GLIBC(wcslen HAVE_WCSLEN) --CHECK_FUNCTION_EXISTS_GLIBC(wctomb HAVE_WCTOMB) -+SET(HAVE_WCRTOMB 1) -+SET(HAVE_WCSCMP 1) -+SET(HAVE_WCSCPY 1) -+SET(HAVE_WCSLEN 1) -+SET(HAVE_WCTOMB 1) - CHECK_FUNCTION_EXISTS_GLIBC(_fseeki64 HAVE__FSEEKI64) - CHECK_FUNCTION_EXISTS_GLIBC(_get_timezone HAVE__GET_TIMEZONE) - CHECK_SYMBOL_EXISTS(ctime_s "time.h" HAVE_CTIME_S) -@@ -1451,10 +1451,10 @@ CHECK_FUNCTION_EXISTS(cygwin_conv_path HAVE_CYGWIN_CONV_PATH) - CHECK_FUNCTION_EXISTS(fseeko HAVE_FSEEKO) - CHECK_FUNCTION_EXISTS(strerror_r HAVE_STRERROR_R) - CHECK_FUNCTION_EXISTS(strftime HAVE_STRFTIME) --CHECK_FUNCTION_EXISTS(vprintf HAVE_VPRINTF) --CHECK_FUNCTION_EXISTS(wmemcmp HAVE_WMEMCMP) --CHECK_FUNCTION_EXISTS(wmemcpy HAVE_WMEMCPY) --CHECK_FUNCTION_EXISTS(wmemmove HAVE_WMEMMOVE) -+SET(HAVE_VPRINTF 1) -+SET(HAVE_WMEMCMP 1) -+SET(HAVE_WMEMCPY 1) -+SET(HAVE_WMEMMOVE 1) - - CMAKE_POP_CHECK_STATE() # Restore the state of the variables - diff --git a/recipes/libarchive/all/patches/0006-3.7.2-fix-msvc-build.patch b/recipes/libarchive/all/patches/0006-3.7.2-fix-msvc-build.patch new file mode 100644 index 0000000000000..4a669d0956310 --- /dev/null +++ b/recipes/libarchive/all/patches/0006-3.7.2-fix-msvc-build.patch @@ -0,0 +1,45 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 6849ce40..d5dac48b 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1402,7 +1402,7 @@ CHECK_FUNCTION_EXISTS_GLIBC(localtime_r HAVE_LOCALTIME_R) + CHECK_FUNCTION_EXISTS_GLIBC(lstat HAVE_LSTAT) + CHECK_FUNCTION_EXISTS_GLIBC(lutimes HAVE_LUTIMES) + CHECK_FUNCTION_EXISTS_GLIBC(mbrtowc HAVE_MBRTOWC) +-CHECK_FUNCTION_EXISTS_GLIBC(memmove HAVE_MEMMOVE) ++SET(HAVE_MEMMOVE 1) + CHECK_FUNCTION_EXISTS_GLIBC(mkdir HAVE_MKDIR) + CHECK_FUNCTION_EXISTS_GLIBC(mkfifo HAVE_MKFIFO) + CHECK_FUNCTION_EXISTS_GLIBC(mknod HAVE_MKNOD) +@@ -1435,11 +1435,11 @@ CHECK_FUNCTION_EXISTS_GLIBC(utime HAVE_UTIME) + CHECK_FUNCTION_EXISTS_GLIBC(utimes HAVE_UTIMES) + CHECK_FUNCTION_EXISTS_GLIBC(utimensat HAVE_UTIMENSAT) + CHECK_FUNCTION_EXISTS_GLIBC(vfork HAVE_VFORK) +-CHECK_FUNCTION_EXISTS_GLIBC(wcrtomb HAVE_WCRTOMB) +-CHECK_FUNCTION_EXISTS_GLIBC(wcscmp HAVE_WCSCMP) +-CHECK_FUNCTION_EXISTS_GLIBC(wcscpy HAVE_WCSCPY) +-CHECK_FUNCTION_EXISTS_GLIBC(wcslen HAVE_WCSLEN) +-CHECK_FUNCTION_EXISTS_GLIBC(wctomb HAVE_WCTOMB) ++SET(HAVE_WCRTOMB 1) ++SET(HAVE_WCSCMP 1) ++SET(HAVE_WCSCPY 1) ++SET(HAVE_WCSLEN 1) ++SET(HAVE_WCTOMB 1) + CHECK_FUNCTION_EXISTS_GLIBC(_fseeki64 HAVE__FSEEKI64) + CHECK_FUNCTION_EXISTS_GLIBC(_get_timezone HAVE__GET_TIMEZONE) + CHECK_SYMBOL_EXISTS(ctime_s "time.h" HAVE_CTIME_S) +@@ -1452,10 +1452,10 @@ CHECK_FUNCTION_EXISTS(cygwin_conv_path HAVE_CYGWIN_CONV_PATH) + CHECK_FUNCTION_EXISTS(fseeko HAVE_FSEEKO) + CHECK_FUNCTION_EXISTS(strerror_r HAVE_STRERROR_R) + CHECK_FUNCTION_EXISTS(strftime HAVE_STRFTIME) +-CHECK_FUNCTION_EXISTS(vprintf HAVE_VPRINTF) +-CHECK_FUNCTION_EXISTS(wmemcmp HAVE_WMEMCMP) +-CHECK_FUNCTION_EXISTS(wmemcpy HAVE_WMEMCPY) +-CHECK_FUNCTION_EXISTS(wmemmove HAVE_WMEMMOVE) ++SET(HAVE_VPRINTF 1) ++SET(HAVE_WMEMCMP 1) ++SET(HAVE_WMEMCPY 1) ++SET(HAVE_WMEMMOVE 1) + + CMAKE_POP_CHECK_STATE() # Restore the state of the variables + diff --git a/recipes/libarchive/all/patches/0006-3.7.4-fix-msvc-build.patch b/recipes/libarchive/all/patches/0006-3.7.4-fix-msvc-build.patch new file mode 100644 index 0000000000000..754faa44c171c --- /dev/null +++ b/recipes/libarchive/all/patches/0006-3.7.4-fix-msvc-build.patch @@ -0,0 +1,45 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 91d0f49..4041b9b 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1473,7 +1473,7 @@ CHECK_FUNCTION_EXISTS_GLIBC(localtime_r HAVE_LOCALTIME_R) + CHECK_FUNCTION_EXISTS_GLIBC(lstat HAVE_LSTAT) + CHECK_FUNCTION_EXISTS_GLIBC(lutimes HAVE_LUTIMES) + CHECK_FUNCTION_EXISTS_GLIBC(mbrtowc HAVE_MBRTOWC) +-CHECK_FUNCTION_EXISTS_GLIBC(memmove HAVE_MEMMOVE) ++SET(HAVE_MEMMOVE 1) + CHECK_FUNCTION_EXISTS_GLIBC(mkdir HAVE_MKDIR) + CHECK_FUNCTION_EXISTS_GLIBC(mkfifo HAVE_MKFIFO) + CHECK_FUNCTION_EXISTS_GLIBC(mknod HAVE_MKNOD) +@@ -1507,11 +1507,11 @@ CHECK_FUNCTION_EXISTS_GLIBC(utime HAVE_UTIME) + CHECK_FUNCTION_EXISTS_GLIBC(utimes HAVE_UTIMES) + CHECK_FUNCTION_EXISTS_GLIBC(utimensat HAVE_UTIMENSAT) + CHECK_FUNCTION_EXISTS_GLIBC(vfork HAVE_VFORK) +-CHECK_FUNCTION_EXISTS_GLIBC(wcrtomb HAVE_WCRTOMB) +-CHECK_FUNCTION_EXISTS_GLIBC(wcscmp HAVE_WCSCMP) +-CHECK_FUNCTION_EXISTS_GLIBC(wcscpy HAVE_WCSCPY) +-CHECK_FUNCTION_EXISTS_GLIBC(wcslen HAVE_WCSLEN) +-CHECK_FUNCTION_EXISTS_GLIBC(wctomb HAVE_WCTOMB) ++SET(HAVE_WCRTOMB 1) ++SET(HAVE_WCSCMP 1) ++SET(HAVE_WCSCPY 1) ++SET(HAVE_WCSLEN 1) ++SET(HAVE_WCTOMB 1) + CHECK_FUNCTION_EXISTS_GLIBC(_fseeki64 HAVE__FSEEKI64) + CHECK_FUNCTION_EXISTS_GLIBC(_get_timezone HAVE__GET_TIMEZONE) + CHECK_SYMBOL_EXISTS(ctime_s "time.h" HAVE_CTIME_S) +@@ -1524,10 +1524,10 @@ CHECK_FUNCTION_EXISTS(cygwin_conv_path HAVE_CYGWIN_CONV_PATH) + CHECK_FUNCTION_EXISTS(fseeko HAVE_FSEEKO) + CHECK_FUNCTION_EXISTS(strerror_r HAVE_STRERROR_R) + CHECK_FUNCTION_EXISTS(strftime HAVE_STRFTIME) +-CHECK_FUNCTION_EXISTS(vprintf HAVE_VPRINTF) +-CHECK_FUNCTION_EXISTS(wmemcmp HAVE_WMEMCMP) +-CHECK_FUNCTION_EXISTS(wmemcpy HAVE_WMEMCPY) +-CHECK_FUNCTION_EXISTS(wmemmove HAVE_WMEMMOVE) ++SET(HAVE_VPRINTF 1) ++SET(HAVE_WMEMCMP 1) ++SET(HAVE_WMEMCPY 1) ++SET(HAVE_WMEMMOVE 1) + + CMAKE_POP_CHECK_STATE() # Restore the state of the variables + diff --git a/recipes/libarchive/all/patches/0006-3.7.6-fix-msvc-build.patch b/recipes/libarchive/all/patches/0006-3.7.6-fix-msvc-build.patch new file mode 100644 index 0000000000000..9652721d7fe5e --- /dev/null +++ b/recipes/libarchive/all/patches/0006-3.7.6-fix-msvc-build.patch @@ -0,0 +1,45 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index dfa6af0..b2cac97 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1491,7 +1491,7 @@ CHECK_FUNCTION_EXISTS_GLIBC(localtime_r HAVE_LOCALTIME_R) + CHECK_FUNCTION_EXISTS_GLIBC(lstat HAVE_LSTAT) + CHECK_FUNCTION_EXISTS_GLIBC(lutimes HAVE_LUTIMES) + CHECK_FUNCTION_EXISTS_GLIBC(mbrtowc HAVE_MBRTOWC) +-CHECK_FUNCTION_EXISTS_GLIBC(memmove HAVE_MEMMOVE) ++SET(HAVE_MEMMOVE 1) + CHECK_FUNCTION_EXISTS_GLIBC(mkdir HAVE_MKDIR) + CHECK_FUNCTION_EXISTS_GLIBC(mkfifo HAVE_MKFIFO) + CHECK_FUNCTION_EXISTS_GLIBC(mknod HAVE_MKNOD) +@@ -1525,11 +1525,11 @@ CHECK_FUNCTION_EXISTS_GLIBC(utime HAVE_UTIME) + CHECK_FUNCTION_EXISTS_GLIBC(utimes HAVE_UTIMES) + CHECK_FUNCTION_EXISTS_GLIBC(utimensat HAVE_UTIMENSAT) + CHECK_FUNCTION_EXISTS_GLIBC(vfork HAVE_VFORK) +-CHECK_FUNCTION_EXISTS_GLIBC(wcrtomb HAVE_WCRTOMB) +-CHECK_FUNCTION_EXISTS_GLIBC(wcscmp HAVE_WCSCMP) +-CHECK_FUNCTION_EXISTS_GLIBC(wcscpy HAVE_WCSCPY) +-CHECK_FUNCTION_EXISTS_GLIBC(wcslen HAVE_WCSLEN) +-CHECK_FUNCTION_EXISTS_GLIBC(wctomb HAVE_WCTOMB) ++SET(HAVE_WCRTOMB 1) ++SET(HAVE_WCSCMP 1) ++SET(HAVE_WCSCPY 1) ++SET(HAVE_WCSLEN 1) ++SET(HAVE_WCTOMB 1) + CHECK_FUNCTION_EXISTS_GLIBC(_fseeki64 HAVE__FSEEKI64) + CHECK_FUNCTION_EXISTS_GLIBC(_get_timezone HAVE__GET_TIMEZONE) + CHECK_SYMBOL_EXISTS(ctime_s "time.h" HAVE_CTIME_S) +@@ -1542,10 +1542,10 @@ CHECK_FUNCTION_EXISTS(cygwin_conv_path HAVE_CYGWIN_CONV_PATH) + CHECK_FUNCTION_EXISTS(fseeko HAVE_FSEEKO) + CHECK_FUNCTION_EXISTS(strerror_r HAVE_STRERROR_R) + CHECK_FUNCTION_EXISTS(strftime HAVE_STRFTIME) +-CHECK_FUNCTION_EXISTS(vprintf HAVE_VPRINTF) +-CHECK_FUNCTION_EXISTS(wmemcmp HAVE_WMEMCMP) +-CHECK_FUNCTION_EXISTS(wmemcpy HAVE_WMEMCPY) +-CHECK_FUNCTION_EXISTS(wmemmove HAVE_WMEMMOVE) ++SET(HAVE_VPRINTF 1) ++SET(HAVE_WMEMCMP 1) ++SET(HAVE_WMEMCPY 1) ++SET(HAVE_WMEMMOVE 1) + + CMAKE_POP_CHECK_STATE() # Restore the state of the variables + diff --git a/recipes/libarchive/all/patches/0007-3.7.1-include-getopt.patch b/recipes/libarchive/all/patches/0007-3.7.1-include-getopt.patch deleted file mode 100644 index 6db790a6cd811..0000000000000 --- a/recipes/libarchive/all/patches/0007-3.7.1-include-getopt.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- unzip/bsdunzip.c 2023-07-29 19:27:43.000000000 +0200 -+++ unzip/bsdunzip.c 2023-10-28 13:19:27.181106700 +0200 -@@ -78,6 +78,10 @@ - #include - #endif - #endif -+#ifdef HAVE_GETOPT_OPTRESET -+#include -+#endif -+ - - #include - #include diff --git a/recipes/libarchive/config.yml b/recipes/libarchive/config.yml index 628dfea5b0312..df2cddd584f6d 100644 --- a/recipes/libarchive/config.yml +++ b/recipes/libarchive/config.yml @@ -1,21 +1,9 @@ versions: - "3.7.3": - folder: all - "3.7.2": - folder: all - "3.7.1": - folder: all - "3.6.2": + "3.7.6": folder: all - "3.6.1": + "3.7.4": folder: all - "3.6.0": - folder: all - "3.5.2": - folder: all - "3.5.1": - folder: all - "3.4.3": + "3.7.3": folder: all - "3.4.0": + "3.7.2": folder: all diff --git a/recipes/libassert/config.yml b/recipes/libassert/config.yml index bd98ac7180d13..635e69403c99f 100644 --- a/recipes/libassert/config.yml +++ b/recipes/libassert/config.yml @@ -1,5 +1,12 @@ versions: - # Newer versions at the top + "2.1.2": + folder: v2 + "2.1.1": + folder: v2 + "2.1.0": + folder: v2 + "2.0.2": + folder: v2 "2.0.1": folder: v2 "2.0.0": diff --git a/recipes/libassert/v2/conandata.yml b/recipes/libassert/v2/conandata.yml index 31e3f085fe933..b97af2f4b26ef 100644 --- a/recipes/libassert/v2/conandata.yml +++ b/recipes/libassert/v2/conandata.yml @@ -1,15 +1,28 @@ sources: - # Newer versions at the top + "2.1.2": + url: "https://github.com/jeremy-rifkin/libassert/archive/refs/tags/v2.1.2.tar.gz" + sha256: "a7220ca354270deca08a7a162b93523c738ba3c8037a4df1a46ababfdc664196" + "2.1.1": + url: "https://github.com/jeremy-rifkin/libassert/archive/refs/tags/v2.1.1.tar.gz" + sha256: "2bdf27523f964f41668d266cfdbd7f5f58988af963d976577195969ed44359d1" + "2.1.0": + url: "https://github.com/jeremy-rifkin/libassert/archive/refs/tags/v2.1.0.tar.gz" + sha256: "e42405b49cde017c44c78aacac35c6e03564532838709031e73d10ab71f5363d" + "2.0.2": + url: "https://github.com/jeremy-rifkin/libassert/archive/refs/tags/v2.0.2.tar.gz" + sha256: "4a0b52e6523bdde0116231a67583131ea1a84bb574076fad939fc13fc7490443" "2.0.1": - url: - - "https://github.com/jeremy-rifkin/libassert/archive/refs/tags/v2.0.1.tar.gz" + url: "https://github.com/jeremy-rifkin/libassert/archive/refs/tags/v2.0.1.tar.gz" sha256: "405a44c14c5e40de5b81b01538ba12ef9d7c1f57e2c29f81b929e7e179847d4c" "2.0.0": - url: - - "https://github.com/jeremy-rifkin/libassert/archive/refs/tags/v2.0.0.tar.gz" + url: "https://github.com/jeremy-rifkin/libassert/archive/refs/tags/v2.0.0.tar.gz" sha256: "d4b2da2179a94637b34d18813a814531a1eceb0ddc6dd6db6098050dd638f4a1" - patches: + "2.1.0": + - patch_file: "patches/2.1.0/0001-msvc-ice.patch" + patch_type: "portability" + patch_source: https://github.com/jeremy-rifkin/libassert/commit/aff047da702316b10219a967f78da352f847b8d0 + patch_description: "Handle an ICE in old MSVC" "2.0.1": - patch_file: "patches/2.0.1/0001-fix-string_view-detection.patch" patch_type: "portability" diff --git a/recipes/libassert/v2/conanfile.py b/recipes/libassert/v2/conanfile.py index 5beca1484870e..7026af82c23fe 100644 --- a/recipes/libassert/v2/conanfile.py +++ b/recipes/libassert/v2/conanfile.py @@ -1,8 +1,7 @@ from conan import ConanFile from conan.errors import ConanInvalidConfiguration from conan.tools.microsoft import check_min_vs, is_msvc_static_runtime, is_msvc -from conan.tools.apple import is_apple_os -from conan.tools.files import get, copy, rm, rmdir +from conan.tools.files import get, copy, rmdir from conan.tools.build import check_min_cppstd from conan.tools.scm import Version from conan.tools.cmake import CMake, CMakeToolchain, CMakeDeps, cmake_layout @@ -17,9 +16,8 @@ class LibassertConan(ConanFile): license = "MIT" url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/jeremy-rifkin/libassert" - package_type = "library" - topics = ("assert", "library", "assertions", "stacktrace", "diagnostics", "defensive programming", "testing") + package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], @@ -53,7 +51,10 @@ def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - self.requires("cpptrace/0.5.1", transitive_headers=True, transitive_libs=True) + if Version(self.version) >= "2.1.2": + self.requires("cpptrace/0.7.2", transitive_headers=True, transitive_libs=True) + else: + self.requires("cpptrace/0.7.1", transitive_headers=True, transitive_libs=True) def validate(self): if self.settings.compiler.cppstd: @@ -106,12 +107,7 @@ def package(self): keep_path=False ) - rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) - rmdir(self, os.path.join(self.package_folder, "share")) - rm(self, "*.la", os.path.join(self.package_folder, "lib")) - rm(self, "*.pdb", os.path.join(self.package_folder, "lib")) - rm(self, "*.pdb", os.path.join(self.package_folder, "bin")) def package_info(self): self.cpp_info.libs = ["assert"] @@ -135,7 +131,7 @@ def package_info(self): self.cpp_info.components["assert"].libs = ["assert"] if not self.options.shared: self.cpp_info.components["assert"].defines.append("LIBASSERT_STATIC_DEFINE") - + if self.settings.os in ["Linux", "FreeBSD"]: self.cpp_info.system_libs.append("m") self.cpp_info.requires = ["cpptrace::cpptrace"] diff --git a/recipes/libassert/v2/patches/2.1.0/0001-msvc-ice.patch b/recipes/libassert/v2/patches/2.1.0/0001-msvc-ice.patch new file mode 100644 index 0000000000000..5e0ad013faca0 --- /dev/null +++ b/recipes/libassert/v2/patches/2.1.0/0001-msvc-ice.patch @@ -0,0 +1,32 @@ +diff --git a/src/utils.hpp b/src/utils.hpp +index 80b7ca4..18b90e5 100644 +--- a/src/utils.hpp ++++ b/src/utils.hpp +@@ -97,7 +97,8 @@ namespace libassert::detail { + } + }; + +- // note: the use of U here is mainly to workaround a gcc 8 issue https://godbolt.org/z/bdsWhdGj3 ++ #if LIBASSERT_IS_GCC && LIBASSERT_GCC_VERSION < 900 ++ // note: the use of U here is to workaround a gcc 8 issue https://godbolt.org/z/bdsWhdGj3 + template + constexpr std::array, N> to_array_impl(U(&&a)[N], std::index_sequence) { + return {{std::move(a[I])...}}; +@@ -106,6 +107,17 @@ namespace libassert::detail { + constexpr std::array, N> to_array(U(&&a)[N]) { + return to_array_impl(std::move(a), std::make_index_sequence{}); + } ++ #else ++ // unfortunately the above workaround ICEs MSVC https://godbolt.org/z/bjMEcY9fM ++ template ++ constexpr std::array, N> to_array_impl(T(&&a)[N], std::index_sequence) { ++ return {{std::move(a[I])...}}; ++ } ++ template ++ constexpr std::array, N> to_array(T(&&a)[N]) { ++ return to_array_impl(std::move(a), std::make_index_sequence{}); ++ } ++ #endif + + template + constexpr void constexpr_swap(A& a, B& b) { diff --git a/recipes/libassert/v2/test_package/CMakeLists.txt b/recipes/libassert/v2/test_package/CMakeLists.txt index af9ab923ee8f6..c539de918f22b 100644 --- a/recipes/libassert/v2/test_package/CMakeLists.txt +++ b/recipes/libassert/v2/test_package/CMakeLists.txt @@ -1,11 +1,8 @@ cmake_minimum_required(VERSION 3.15) - -project(test_package CXX) - +project(test_package LANGUAGES CXX) add_executable(${PROJECT_NAME} test_package.cpp) find_package(libassert REQUIRED CONFIG) target_link_libraries(${PROJECT_NAME} PRIVATE libassert::assert) - target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) diff --git a/recipes/libavif/all/conandata.yml b/recipes/libavif/all/conandata.yml index f4a45a5fbdb30..7d4af07ae59e6 100644 --- a/recipes/libavif/all/conandata.yml +++ b/recipes/libavif/all/conandata.yml @@ -1,4 +1,10 @@ sources: + "1.1.1": + url: "https://github.com/AOMediaCodec/libavif/archive/refs/tags/v1.1.1.tar.gz" + sha256: "914662e16245e062ed73f90112fbb4548241300843a7772d8d441bb6859de45b" + "1.1.0": + url: "https://github.com/AOMediaCodec/libavif/archive/refs/tags/v1.1.0.tar.gz" + sha256: "edb31951005d7a143be1724f24825809599a4832073add50eaf987733defb5c8" "1.0.4": url: "https://github.com/AOMediaCodec/libavif/archive/refs/tags/v1.0.4.tar.gz" sha256: "dc56708c83a4b934a8af2b78f67f866ba2fb568605c7cf94312acf51ee57d146" @@ -18,6 +24,14 @@ sources: url: "https://github.com/AOMediaCodec/libavif/archive/refs/tags/v0.9.3.tar.gz" sha256: "bcd9a1f57f982a9615eb7e2faf87236dc88eb1d0c886f3471c7440ead605060d" patches: + "1.1.1": + - patch_file: patches/1.1.1-0001-disable-developer-only-codepaths.patch + patch_description: "disable compiler options for develop" + patch_type: "portability" + "1.1.0": + - patch_file: patches/1.1.0-0001-disable-developer-only-codepaths.patch + patch_description: "disable compiler options for develop" + patch_type: "portability" "1.0.4": - patch_file: patches/1.0.1-0001-disable-developer-only-codepaths.patch patch_description: "disable compiler options for develop" diff --git a/recipes/libavif/all/conanfile.py b/recipes/libavif/all/conanfile.py index 49fe058e91455..f9c0bcaec2901 100644 --- a/recipes/libavif/all/conanfile.py +++ b/recipes/libavif/all/conanfile.py @@ -3,6 +3,7 @@ from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, replace_in_file, rmdir, save from conan.tools.scm import Version +from conan.tools.env import VirtualBuildEnv import os import textwrap @@ -22,11 +23,19 @@ class LibAVIFConan(ConanFile): "shared": [True, False], "fPIC": [True, False], "with_decoder": ["aom", "dav1d"], + "with_ycgco_r": [True, False], + "with_gain_map": [True, False], + "with_metav1": [True, False], + "with_sample_transform": [True, False], } default_options = { "shared": False, "fPIC": True, "with_decoder": "dav1d", + "with_ycgco_r": False, + "with_gain_map": False, + "with_metav1": False, + "with_sample_transform": False, } @property @@ -39,6 +48,12 @@ def export_sources(self): def config_options(self): if self.settings.os == "Windows": del self.options.fPIC + if Version(self.version) < "1.0.0": + del self.options.with_ycgco_r + if Version(self.version) < "1.1.0": + del self.options.with_gain_map + del self.options.with_metav1 + del self.options.with_sample_transform def configure(self): if self.options.shared: @@ -65,6 +80,9 @@ def validate(self): if self._depends_on_sharpyuv and Version(self.dependencies["libwebp"].ref.version) < "1.3.0": raise ConanInvalidConfiguration(f"{self.ref} requires libwebp >= 1.3.0 in order to get libsharpyuv") + def build_requirements(self): + self.tool_requires("cmake/[>=3.19 <4]") + def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) @@ -75,19 +93,33 @@ def generate(self): tc.variables["AVIF_CODEC_DAV1D"] = self.options.with_decoder == "dav1d" tc.variables["AVIF_CODEC_AOM_DECODE"] = self.options.with_decoder == "aom" tc.variables["LIBYUV_VERSION"] = self.dependencies["libyuv"].ref.version + if "with_ycgco_r" in self.options: + tc.variables["AVIF_ENABLE_EXPERIMENTAL_YCGCO_R"] = self.options.with_ycgco_r + if "with_gain_map" in self.options: + tc.variables["AVIF_ENABLE_EXPERIMENTAL_GAIN_MAP"] = self.options.with_gain_map + if "with_metav1" in self.options: + tc.variables["AVIF_ENABLE_EXPERIMENTAL_METAV1"] = self.options.with_metav1 + if "with_sample_transform" in self.options: + tc.variables["AVIF_ENABLE_EXPERIMENTAL_SAMPLE_TRANSFORM"] = self.options.with_sample_transform tc.generate() deps = CMakeDeps(self) + if Version(self.version) >= "1.1.0": + deps.set_property("libyuv", "cmake_target_name", "yuv::yuv") deps.generate() + venv = VirtualBuildEnv(self) + venv.generate(scope="build") + def _patch_sources(self): apply_conandata_patches(self) cmakelists = os.path.join(self.source_folder, "CMakeLists.txt") - replace_in_file(self, cmakelists, "find_package(libyuv QUIET)", "find_package(libyuv REQUIRED CONFIG)") - replace_in_file(self, cmakelists, "${LIBYUV_LIBRARY}", "libyuv::libyuv") - replace_in_file(self, cmakelists, "find_package(dav1d REQUIRED)", "find_package(dav1d REQUIRED CONFIG)") - replace_in_file(self, cmakelists, "${DAV1D_LIBRARY}", "dav1d::dav1d") - replace_in_file(self, cmakelists, "find_package(aom REQUIRED)", "find_package(libaom-av1 REQUIRED CONFIG)") - replace_in_file(self, cmakelists, "${AOM_LIBRARIES}", "libaom-av1::libaom-av1") + if Version(self.version) < "1.1.0": + replace_in_file(self, cmakelists, "find_package(libyuv QUIET)", "find_package(libyuv REQUIRED CONFIG)") + replace_in_file(self, cmakelists, "${LIBYUV_LIBRARY}", "libyuv::libyuv") + replace_in_file(self, cmakelists, "find_package(dav1d REQUIRED)", "find_package(dav1d REQUIRED CONFIG)") + replace_in_file(self, cmakelists, "${DAV1D_LIBRARY}", "dav1d::dav1d") + replace_in_file(self, cmakelists, "find_package(aom REQUIRED)", "find_package(libaom-av1 REQUIRED CONFIG)") + replace_in_file(self, cmakelists, "${AOM_LIBRARIES}", "libaom-av1::libaom-av1") def build(self): self._patch_sources() diff --git a/recipes/libavif/all/patches/1.1.0-0001-disable-developer-only-codepaths.patch b/recipes/libavif/all/patches/1.1.0-0001-disable-developer-only-codepaths.patch new file mode 100644 index 0000000000000..205b84f1dcbf0 --- /dev/null +++ b/recipes/libavif/all/patches/1.1.0-0001-disable-developer-only-codepaths.patch @@ -0,0 +1,38 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index bc478ae..1b2229d 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -137,13 +137,13 @@ if(AVIF_BUILD_APPS + ) + set(AVIF_USE_CXX ON) + endif() +- ++if(0) + if(APPLE) + set(XCRUN xcrun) + else() + set(XCRUN) + endif() +- ++endif() + # This is also needed to get shared libraries (e.g. pixbufloader-avif) to compile against a static libavif. + set(CMAKE_POSITION_INDEPENDENT_CODE ON) + if(BUILD_SHARED_LIBS) +@@ -260,7 +260,7 @@ if(AVIF_ENABLE_EXPERIMENTAL_GAIN_MAP) + check_avif_option(AVIF_LIBXML2 TARGET LibXml2::LibXml2 PKG_NAME LibXml2) + endif() + # --------------------------------------------------------------------------------------- +- ++if(0) + # Enable all warnings + include(CheckCCompilerFlag) + if(CMAKE_C_COMPILER_ID MATCHES "Clang") +@@ -290,7 +290,7 @@ elseif(CMAKE_C_COMPILER_ID MATCHES "MSVC") + else() + message(FATAL_ERROR "libavif: Unknown compiler, bailing out") + endif() +- ++endif() + if(AVIF_ENABLE_WERROR) + # Warnings as errors + if(CMAKE_C_COMPILER_ID MATCHES "Clang" OR CMAKE_C_COMPILER_ID MATCHES "GNU") diff --git a/recipes/libavif/all/patches/1.1.1-0001-disable-developer-only-codepaths.patch b/recipes/libavif/all/patches/1.1.1-0001-disable-developer-only-codepaths.patch new file mode 100644 index 0000000000000..00825d66fdb2c --- /dev/null +++ b/recipes/libavif/all/patches/1.1.1-0001-disable-developer-only-codepaths.patch @@ -0,0 +1,38 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index baf5964..dc3704e 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -147,13 +147,13 @@ option(AVIF_LOCAL_FUZZTEST + + # Whether the libavif library uses c++ indirectly (e.g. through linking to libyuv). + set(AVIF_LIB_USE_CXX OFF) +- ++if(0) + if(APPLE) + set(XCRUN xcrun) + else() + set(XCRUN) + endif() +- ++endif() + # This is also needed to get shared libraries (e.g. pixbufloader-avif) to compile against a static libavif. + set(CMAKE_POSITION_INDEPENDENT_CODE ON) + if(BUILD_SHARED_LIBS) +@@ -269,7 +269,7 @@ if(AVIF_ENABLE_EXPERIMENTAL_GAIN_MAP) + check_avif_option(AVIF_LIBXML2 TARGET LibXml2::LibXml2 PKG_NAME LibXml2) + endif() + # --------------------------------------------------------------------------------------- +- ++if(0) + # Enable all warnings + include(CheckCCompilerFlag) + if(MSVC) +@@ -310,7 +310,7 @@ elseif(CMAKE_C_COMPILER_ID MATCHES "GNU") + else() + message(FATAL_ERROR "libavif: Unknown compiler, bailing out") + endif() +- ++endif() + if(AVIF_ENABLE_WERROR) + # Warnings as errors + if(MSVC) diff --git a/recipes/libavif/config.yml b/recipes/libavif/config.yml index 0a86bfa38351a..d8cfe5a49c15a 100644 --- a/recipes/libavif/config.yml +++ b/recipes/libavif/config.yml @@ -1,4 +1,8 @@ versions: + "1.1.1": + folder: all + "1.1.0": + folder: all "1.0.4": folder: all "1.0.3": diff --git a/recipes/libavrocpp/all/conandata.yml b/recipes/libavrocpp/all/conandata.yml index 4db9766f42d9f..4431ba3942fec 100644 --- a/recipes/libavrocpp/all/conandata.yml +++ b/recipes/libavrocpp/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.11.3": + url: "https://github.com/apache/avro/archive/release-1.11.3.tar.gz" + sha256: "da377ac1cf8b91458bf702cbcfb214eecb5c399b267f0ca9c0aade6cabaf126e" "1.11.1": url: "https://github.com/apache/avro/archive/release-1.11.1.tar.gz" sha256: "599f96bb405f72a35154b2477caa6254d723bb4e3f6a0e54e9ae540664321752" @@ -12,6 +15,22 @@ sources: url: "https://github.com/apache/avro/archive/release-1.10.1.tar.gz" sha256: "8fd1f850ce37e60835e6d8335c0027a959aaa316773da8a9660f7d33a66ac142" patches: + "1.11.3": + - patch_file: "patches/0001-add-iterator-include-1-11-0.patch" + patch_description: "include iterator" + patch_type: "portability" + - patch_file: "patches/0002-disable-tests-1-11-1.patch" + patch_description: "disable tests" + patch_type: "conan" + - patch_file: "patches/0003-allow-static-boost-linkage-1-11-0.patch" + patch_description: "remove boost linkage definitions" + patch_type: "conan" + - patch_file: "patches/0004-fix-windows-shared-installation-1-11-1.patch" + patch_description: "fix runtime installation path" + patch_type: "portability" + - patch_file: "patches/0006-disable-warn-as-error-1-11-3.patch" + patch_description: "disable warn as error for boost c++14 breaking change" + patch_type: "portability" "1.11.1": - patch_file: "patches/0001-add-iterator-include-1-11-0.patch" patch_description: "include iterator" diff --git a/recipes/libavrocpp/all/conanfile.py b/recipes/libavrocpp/all/conanfile.py index d9c7f619040a6..e0658c9cdfa87 100644 --- a/recipes/libavrocpp/all/conanfile.py +++ b/recipes/libavrocpp/all/conanfile.py @@ -1,6 +1,6 @@ from conan import ConanFile from conan.tools.files import apply_conandata_patches, export_conandata_patches, get, copy, rm, replace_in_file -from conan.tools.build import check_min_cppstd +from conan.tools.build import check_min_cppstd, valid_min_cppstd from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout import os @@ -14,6 +14,7 @@ class LibavrocppConan(ConanFile): url = "https://github.com/conan-io/conan-center-index" homepage = "https://avro.apache.org/" topics = ("serialization", "deserialization","avro") + package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], @@ -42,9 +43,10 @@ def configure(self): def layout(self): cmake_layout(self, src_folder="src") - + def requirements(self): - self.requires("boost/1.81.0") + # boost upper to 1.81.0 requires C++14 minimum + self.requires("boost/1.81.0", transitive_headers=True) self.requires("snappy/1.1.9") def validate(self): @@ -93,7 +95,7 @@ def package(self): rm(self, dll_pattern_to_remove, os.path.join(self.package_folder, "bin")) def package_info(self): - self.cpp_info.libs = ["avrocpp" if self.options.shared else "avrocpp_s"] + self.cpp_info.libs = ["avrocpp"] if self.options.shared else ["avrocpp_s"] if self.options.shared: self.cpp_info.defines.append("AVRO_DYN_LINK") if self.settings.os in ["Linux", "FreeBSD"]: diff --git a/recipes/libavrocpp/all/patches/0006-disable-warn-as-error-1-11-3.patch b/recipes/libavrocpp/all/patches/0006-disable-warn-as-error-1-11-3.patch new file mode 100644 index 0000000000000..711abad6d4b00 --- /dev/null +++ b/recipes/libavrocpp/all/patches/0006-disable-warn-as-error-1-11-3.patch @@ -0,0 +1,13 @@ +diff --git a/lang/c++/CMakeLists.txt b/lang/c++/CMakeLists.txt +index 52d6ac8a..26d8d146 100644 +--- a/lang/c++/CMakeLists.txt ++++ b/lang/c++/CMakeLists.txt +@@ -59,7 +59,7 @@ if (WIN32 AND NOT CYGWIN AND NOT MSYS) + endif() + + if (CMAKE_COMPILER_IS_GNUCXX) +- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -pedantic -Werror") ++ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -pedantic") + if (AVRO_ADD_PROTECTOR_FLAGS) + set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fstack-protector-all -D_GLIBCXX_DEBUG") + # Unset _GLIBCXX_DEBUG for avrogencpp.cc because using Boost Program Options diff --git a/recipes/libavrocpp/config.yml b/recipes/libavrocpp/config.yml index 9fcb2d236146c..c159828f2eb37 100644 --- a/recipes/libavrocpp/config.yml +++ b/recipes/libavrocpp/config.yml @@ -1,4 +1,6 @@ versions: + 1.11.3: + folder: all 1.11.1: folder: all 1.11.0: diff --git a/recipes/libbacktrace/all/conandata.yml b/recipes/libbacktrace/all/conandata.yml index 56d79ce7402eb..7aec17549ec3c 100644 --- a/recipes/libbacktrace/all/conandata.yml +++ b/recipes/libbacktrace/all/conandata.yml @@ -1,8 +1,22 @@ sources: + "cci.20240730": + url: "https://github.com/ianlancetaylor/libbacktrace/archive/0dd27b95f9f2c11b4a89db5f185a888af912838e.tar.gz" + sha256: "dfbc52012846c57759eaaa5131c329c43f77695c808b3e1847ec2dacce238c35" "cci.20210118": url: "https://github.com/ianlancetaylor/libbacktrace/archive/dedbe13fda00253fe5d4f2fb812c909729ed5937.tar.gz" sha256: "dc8c167f48f3de5ae318c528b26b72f300edb6e33744e55394674fd4b7cdd21d" patches: + "cci.20240730": + - patch_file: "patches/cci.20240719-0001-pointer-arithmetic.patch" + patch_description: "casting pointer types for pointer arithmetics" + patch_type: "portability" + - patch_file: "patches/0002-msvc-unistd-alternative.patch" + patch_description: "support msvc for codes using unistd.h" + patch_type: "portability" "cci.20210118": - patch_file: "patches/0001-pointer-arithmetic.patch" + patch_description: "casting pointer types for pointer arithmetics" + patch_type: "portability" - patch_file: "patches/0002-msvc-unistd-alternative.patch" + patch_description: "support msvc for codes using unistd.h" + patch_type: "portability" diff --git a/recipes/libbacktrace/all/conanfile.py b/recipes/libbacktrace/all/conanfile.py index 2fa71b8e36228..fd0cc977d3ab2 100644 --- a/recipes/libbacktrace/all/conanfile.py +++ b/recipes/libbacktrace/all/conanfile.py @@ -14,9 +14,9 @@ class LibbacktraceConan(ConanFile): name = "libbacktrace" description = "A C library that may be linked into a C/C++ program to produce symbolic backtraces." + license = "BSD-3-Clause" url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/ianlancetaylor/libbacktrace" - license = "BSD-3-Clause" topics = ("backtrace", "stack-trace") package_type = "library" settings = "os", "arch", "compiler", "build_type" @@ -52,7 +52,7 @@ def layout(self): def validate(self): check_min_vs(self, "180") if is_msvc(self) and self.options.shared: - raise ConanInvalidConfiguration("libbacktrace shared is not supported with Visual Studio") + raise ConanInvalidConfiguration(f"{self.ref} shared is not supported with Visual Studio") def build_requirements(self): if self._settings_build.os == "Windows": diff --git a/recipes/libbacktrace/all/patches/cci.20240719-0001-pointer-arithmetic.patch b/recipes/libbacktrace/all/patches/cci.20240719-0001-pointer-arithmetic.patch new file mode 100644 index 0000000000000..dbf4fb3485b67 --- /dev/null +++ b/recipes/libbacktrace/all/patches/cci.20240719-0001-pointer-arithmetic.patch @@ -0,0 +1,31 @@ +diff --git a/pecoff.c b/pecoff.c +index 636e1b1..975e417 100644 +--- a/pecoff.c ++++ b/pecoff.c +@@ -704,7 +704,7 @@ coff_add (struct backtrace_state *state, int descriptor, + magic_ok = memcmp (magic, "PE\0", 4) == 0; + fhdr_off += 4; + +- memcpy (&fhdr, fhdr_view.data + 4, sizeof fhdr); ++ memcpy (&fhdr, (char*)fhdr_view.data + 4, sizeof fhdr); + } + else + { +@@ -738,7 +738,7 @@ coff_add (struct backtrace_state *state, int descriptor, + sects_view_valid = 1; + opt_hdr = (const b_coff_optional_header *) sects_view.data; + sects = (const b_coff_section_header *) +- (sects_view.data + fhdr.size_of_optional_header); ++ ((b_coff_optional_header *)sects_view.data + fhdr.size_of_optional_header); + + is_64 = 0; + memset (&image_base, 0, sizeof image_base); +@@ -781,7 +781,7 @@ coff_add (struct backtrace_state *state, int descriptor, + goto fail; + syms_view_valid = 1; + +- str_size = coff_read4 (syms_view.data + syms_size); ++ str_size = coff_read4 ((const unsigned char *)((char *)syms_view.data + syms_size)); + + str_off = syms_off + syms_size; + diff --git a/recipes/libbacktrace/config.yml b/recipes/libbacktrace/config.yml index bc0e7ddecd921..952bd0433d7d5 100644 --- a/recipes/libbacktrace/config.yml +++ b/recipes/libbacktrace/config.yml @@ -1,3 +1,5 @@ versions: + "cci.20240730": + folder: all "cci.20210118": folder: all diff --git a/recipes/libbigwig/all/conanfile.py b/recipes/libbigwig/all/conanfile.py index 2795e50cf9841..be4c72a8890d2 100644 --- a/recipes/libbigwig/all/conanfile.py +++ b/recipes/libbigwig/all/conanfile.py @@ -47,7 +47,7 @@ def requirements(self): # https://github.com/dpryan79/libBigWig/blob/master/bigWigIO.h#L5 self.requires("libcurl/[>=7.78.0 <9]", transitive_headers=True) if self.options.with_zlibng: - self.requires("zlib-ng/2.1.6") + self.requires("zlib-ng/2.2.0") else: self.requires("zlib/[>=1.2.11 <2]") diff --git a/recipes/libbsd/all/conandata.yml b/recipes/libbsd/all/conandata.yml index 5c7d8675d858e..fe3e56bc2a2d1 100644 --- a/recipes/libbsd/all/conandata.yml +++ b/recipes/libbsd/all/conandata.yml @@ -8,3 +8,7 @@ patches: patch_description: "Enables building on MacOS" patch_type: "portability" patch_source: "https://github.com/NixOS/nixpkgs/blob/1016bfcff1df163aff75d908df1e00f897a29b9b/pkgs/development/libraries/libbsd/darwin.patch" + - patch_file: "patches/0002-fix-getentropy-conditional.patch" + patch_description: "Fix check if getentropy needs building" + patch_type: "backport" + patch_source: "https://gitlab.freedesktop.org/libbsd/libbsd/-/commit/5cfa39e5cde6b64ccf3d1335cee4d4744d4ce242.patch" diff --git a/recipes/libbsd/all/patches/0002-fix-getentropy-conditional.patch b/recipes/libbsd/all/patches/0002-fix-getentropy-conditional.patch new file mode 100644 index 0000000000000..4c7cb9a8e5cf7 --- /dev/null +++ b/recipes/libbsd/all/patches/0002-fix-getentropy-conditional.patch @@ -0,0 +1,31 @@ +From 5cfa39e5cde6b64ccf3d1335cee4d4744d4ce242 Mon Sep 17 00:00:00 2001 +From: Guillem Jover +Date: Wed, 23 Nov 2022 23:42:49 +0100 +Subject: [PATCH] =?UTF-8?q?build:=20Use=20=C2=AByes=C2=BB=20instead=20of?= + =?UTF-8?q?=20=C2=ABtrue=C2=BB=20for=20AC=5FCHECK=5FFUNCS=20cache=20value?= +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +This autoconf macro sets the ac_cv_func_ cached variable to «yes» not +«true» so we were checking for an impossible condition. +--- + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index 17d113c..842f5d6 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -173,7 +173,7 @@ AC_CHECK_FUNCS([clearenv dirfd fopencookie __fpurge \ + getauxval getentropy getexecname getline \ + pstat_getproc sysconf \ + strlcpy strlcat strnstr strmode fpurge]) +-AM_CONDITIONAL([HAVE_GETENTROPY], [test "x$ac_cv_func_getentropy" = "xtrue"]) ++AM_CONDITIONAL([HAVE_GETENTROPY], [test "x$ac_cv_func_getentropy" = "xyes"]) + + AC_CONFIG_FILES([ + Makefile +-- +GitLab + diff --git a/recipes/libcap/all/conandata.yml b/recipes/libcap/all/conandata.yml index 16d2439fd2b12..213e20579f77b 100644 --- a/recipes/libcap/all/conandata.yml +++ b/recipes/libcap/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.70": + url: "https://www.kernel.org/pub/linux/libs/security/linux-privs/libcap2/libcap-2.70.tar.xz" + sha256: "23a6ef8aadaf1e3e875f633bb2d116cfef8952dba7bc7c569b13458e1952b30f" "2.69": url: "https://www.kernel.org/pub/linux/libs/security/linux-privs/libcap2/libcap-2.69.tar.xz" sha256: "f311f8f3dad84699d0566d1d6f7ec943a9298b28f714cae3c931dfd57492d7eb" @@ -33,6 +36,13 @@ sources: url: "https://www.kernel.org/pub/linux/libs/security/linux-privs/libcap2/libcap-2.45.tar.xz" sha256: "d66639f765c0e10557666b00f519caf0bd07a95f867dddaee131cd284fac3286" patches: + "2.70": + - patch_file: "patches/2.57/0001-libcap-Remove-hardcoded-fPIC.patch" + patch_description: "allow to configure fPIC option from conan recipe" + patch_type: "conan" + - patch_file: "patches/2.57/0002-Make.Rules-Make-compile-tools-configurable.patch" + patch_description: "allow to override compiler via environment variables" + patch_type: "conan" "2.69": - patch_file: "patches/2.57/0001-libcap-Remove-hardcoded-fPIC.patch" patch_description: "allow to configure fPIC option from conan recipe" diff --git a/recipes/libcap/config.yml b/recipes/libcap/config.yml index 9ca623681ce66..e8abe4aef997c 100644 --- a/recipes/libcap/config.yml +++ b/recipes/libcap/config.yml @@ -1,4 +1,6 @@ versions: + "2.70": + folder: all "2.69": folder: all "2.68": diff --git a/recipes/libcoro/all/conandata.yml b/recipes/libcoro/all/conandata.yml index 1587140b431f7..08d3f083c5782 100644 --- a/recipes/libcoro/all/conandata.yml +++ b/recipes/libcoro/all/conandata.yml @@ -1,4 +1,10 @@ sources: + "0.12.1": + url: "https://github.com/jbaldwin/libcoro/archive/refs/tags/v0.12.1.tar.gz" + sha256: "2cb6f45fc73dad6008cc930d92939785684835e03b12df422b98fcab9e393add" + "0.12": + url: "https://github.com/jbaldwin/libcoro/archive/refs/tags/v0.12.tar.gz" + sha256: "9a89f329e12fda7d6425523fb2cbd1ebaf41e0e1d41e210d93ad4f3a196333a2" "0.11.1": url: "https://github.com/jbaldwin/libcoro/archive/refs/tags/v0.11.1.tar.gz" sha256: "c7eb1bf133519ec0e0bc2e3e018ac4d1447a143e5e7385dab19204277d7c7671" diff --git a/recipes/libcoro/all/conanfile.py b/recipes/libcoro/all/conanfile.py index 60b120e4f9dc5..0e6a519c86124 100644 --- a/recipes/libcoro/all/conanfile.py +++ b/recipes/libcoro/all/conanfile.py @@ -13,10 +13,10 @@ class LibcoroConan(ConanFile): name = "libcoro" description = "C++20 coroutine library" - topics = ("coroutines", "concurrency", "tasks", "executors", "networking") license = "Apache-2.0" url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/jbaldwin/libcoro" + topics = ("coroutines", "concurrency", "tasks", "executors", "networking") package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { diff --git a/recipes/libcoro/config.yml b/recipes/libcoro/config.yml index a682e35c6d452..3e368a245af64 100644 --- a/recipes/libcoro/config.yml +++ b/recipes/libcoro/config.yml @@ -1,4 +1,8 @@ versions: + "0.12.1": + folder: all + "0.12": + folder: all "0.11.1": folder: all "0.10": diff --git a/recipes/libcurl/all/conandata.yml b/recipes/libcurl/all/conandata.yml index 1d6933bdf0eb3..1874298a4a4e7 100644 --- a/recipes/libcurl/all/conandata.yml +++ b/recipes/libcurl/all/conandata.yml @@ -1,4 +1,24 @@ sources: + "8.10.1": + url: + - "https://curl.se/download/curl-8.10.1.tar.xz" + - "https://github.com/curl/curl/releases/download/curl-8_10_1/curl-8.10.1.tar.xz" + sha256: "73a4b0e99596a09fa5924a4fb7e4b995a85fda0d18a2c02ab9cf134bebce04ee" + "8.10.0": + url: + - "https://curl.se/download/curl-8.10.0.tar.xz" + - "https://github.com/curl/curl/releases/download/curl-8_10_0/curl-8.10.0.tar.xz" + sha256: "e6b142f0e85e954759d37e26a3627e2278137595be80e3a860c4353e4335e5a0" + "8.9.1": + url: + - "https://curl.se/download/curl-8.9.1.tar.xz" + - "https://github.com/curl/curl/releases/download/curl-8_9_1/curl-8.9.1.tar.xz" + sha256: "f292f6cc051d5bbabf725ef85d432dfeacc8711dd717ea97612ae590643801e5" + "8.8.0": + url: + - "https://curl.se/download/curl-8.8.0.tar.xz" + - "https://github.com/curl/curl/releases/download/curl-8_8_0/curl-8.8.0.tar.xz" + sha256: "0f58bb95fc330c8a46eeb3df5701b0d90c9d9bfcc42bd1cd08791d12551d4400" "8.6.0": url: - "https://curl.se/download/curl-8.6.0.tar.xz" @@ -19,21 +39,11 @@ sources: - "https://curl.se/download/curl-8.2.1.tar.xz" - "https://github.com/curl/curl/releases/download/curl-8_2_1/curl-8.2.1.tar.xz" sha256: "dd322f6bd0a20e6cebdfd388f69e98c3d183bed792cf4713c8a7ef498cba4894" - "8.2.0": - url: - - "https://curl.se/download/curl-8.2.0.tar.xz" - - "https://github.com/curl/curl/releases/download/curl-8_2_0/curl-8.2.0.tar.xz" - sha256: "2859ec79e2cd96e976a99493547359b8001af1d1e21f3a3a3b846544ef54500f" "8.1.2": url: - "https://curl.se/download/curl-8.1.2.tar.xz" - "https://github.com/curl/curl/releases/download/curl-8_1_2/curl-8.1.2.tar.xz" sha256: "31b1118eb8bfd43cd95d9a3f146f814ff874f6ed3999b29d94f4d1e7dbac5ef6" - "8.1.1": - url: - - "https://curl.se/download/curl-8.1.1.tar.xz" - - "https://github.com/curl/curl/releases/download/curl-8_1_1/curl-8.1.1.tar.xz" - sha256: "08a948e061929645597c1ef7194e07b308b22084ff03fa7400b465e6c05149e5" "8.0.1": url: - "https://curl.se/download/curl-8.0.1.tar.xz" @@ -44,48 +54,3 @@ sources: - "https://curl.se/download/curl-7.88.1.tar.xz" - "https://github.com/curl/curl/releases/download/curl-7_88_1/curl-7.88.1.tar.xz" sha256: "1dae31b2a7c1fe269de99c0c31bb488346aab3459b5ffca909d6938249ae415f" - "7.87.0": - url: - - "https://curl.se/download/curl-7.87.0.tar.xz" - - "https://github.com/curl/curl/releases/download/curl-7_87_0/curl-7.87.0.tar.xz" - sha256: "ee5f1a1955b0ed413435ef79db28b834ea5f0fb7c8cfb1ce47175cc3bee08fff" - "7.86.0": - url: - - "https://curl.se/download/curl-7.86.0.tar.xz" - - "https://github.com/curl/curl/releases/download/curl-7_86_0/curl-7.86.0.tar.xz" - sha256: "2d61116e5f485581f6d59865377df4463f2e788677ac43222b496d4e49fb627b" - "7.85.0": - url: - - "https://curl.se/download/curl-7.85.0.tar.xz" - - "https://github.com/curl/curl/releases/download/curl-7_85_0/curl-7.85.0.tar.xz" - sha256: "88b54a6d4b9a48cb4d873c7056dcba997ddd5b7be5a2d537a4acb55c20b04be6" - "7.84.0": - url: - - "https://curl.se/download/curl-7.84.0.tar.xz" - - "https://github.com/curl/curl/releases/download/curl-7_84_0/curl-7.84.0.tar.xz" - sha256: "2d118b43f547bfe5bae806d8d47b4e596ea5b25a6c1f080aef49fbcd817c5db8" - "7.83.1": - url: - - "https://curl.se/download/curl-7.83.1.tar.xz" - - "https://github.com/curl/curl/releases/download/curl-7_83_1/curl-7.83.1.tar.xz" - sha256: "2cb9c2356e7263a1272fd1435ef7cdebf2cd21400ec287b068396deb705c22c4" - "7.82.0": - url: - - "https://curl.se/download/curl-7.82.0.tar.xz" - - "https://github.com/curl/curl/releases/download/curl-7_82_0/curl-7.82.0.tar.xz" - sha256: "0aaa12d7bd04b0966254f2703ce80dd5c38dbbd76af0297d3d690cdce58a583c" - "7.80.0": - url: - - "https://curl.se/download/curl-7.80.0.tar.xz" - - "https://github.com/curl/curl/releases/download/curl-7_80_0/curl-7.80.0.tar.xz" - sha256: "a132bd93188b938771135ac7c1f3ac1d3ce507c1fcbef8c471397639214ae2ab" - "7.79.1": - url: - - "https://curl.se/download/curl-7.79.1.tar.xz" - - "https://github.com/curl/curl/releases/download/curl-7_79_1/curl-7.79.1.tar.xz" - sha256: "0606f74b1182ab732a17c11613cbbaf7084f2e6cca432642d0e3ad7c224c3689" - "7.78.0": - url: - - "https://curl.se/download/curl-7.78.0.tar.xz" - - "https://github.com/curl/curl/releases/download/curl-7_78_0/curl-7.78.0.tar.xz" - sha256: "be42766d5664a739c3974ee3dfbbcbe978a4ccb1fe628bb1d9b59ac79e445fb5" diff --git a/recipes/libcurl/all/conanfile.py b/recipes/libcurl/all/conanfile.py index 41ce8fa327a98..1eb13831e058b 100644 --- a/recipes/libcurl/all/conanfile.py +++ b/recipes/libcurl/all/conanfile.py @@ -64,6 +64,7 @@ class LibcurlConan(ConanFile): "with_cookies": [True, False], "with_ipv6": [True, False], "with_docs": [True, False], + "with_misc_docs": [True, False], "with_verbose_debug": [True, False], "with_symbol_hiding": [True, False], "with_unix_sockets": [True, False], @@ -109,6 +110,7 @@ class LibcurlConan(ConanFile): "with_cookies": True, "with_ipv6": True, "with_docs": False, + "with_misc_docs": False, "with_verbose_debug": True, "with_symbol_hiding": False, "with_unix_sockets": True, @@ -134,10 +136,6 @@ def _is_win_x_android(self): def _is_using_cmake_build(self): return is_msvc(self) or self._is_win_x_android - @property - def _has_with_libpsl_option(self): - return not (self._is_using_cmake_build and Version(self.version) < "7.84.0") - def export_sources(self): copy(self, "lib_Makefile_add.am", self.recipe_folder, self.export_sources_folder) export_conandata_patches(self) @@ -145,15 +143,11 @@ def export_sources(self): def config_options(self): if self.settings.os == "Windows": del self.options.fPIC - if not self._has_with_libpsl_option: - del self.options.with_libpsl if self._is_using_cmake_build: del self.options.with_libgsasl - # Before 7.86.0, enabling unix sockets configure option would fail on windows - # It was fixed with this PR: https://github.com/curl/curl/pull/9688 - if self._is_mingw and Version(self.version) < "7.86.0": - del self.options.with_unix_sockets + if Version(self.version) < "8.7.0": + del self.options.with_misc_docs # Default options self.options.with_ssl = "darwinssl" if is_apple_os(self) else "openssl" @@ -188,7 +182,7 @@ def requirements(self): if self.options.with_zstd: self.requires("zstd/1.5.5") if self.options.with_c_ares: - self.requires("c-ares/1.25.0") + self.requires("c-ares/[>=1.27 <2]") if self.options.get_safe("with_libpsl"): self.requires("libpsl/0.21.1") @@ -287,7 +281,10 @@ def _patch_autotools(self): # - link errors if mingw shared or iOS/tvOS/watchOS # - it makes recipe consistent with CMake build where we don't build curl tool top_makefile = os.path.join(self.source_folder, "Makefile.am") - replace_in_file(self, top_makefile, "SUBDIRS = lib src", "SUBDIRS = lib") + if Version(self.version) < "8.8.0": + replace_in_file(self, top_makefile, "SUBDIRS = lib src", "SUBDIRS = lib") + else: + replace_in_file(self, top_makefile, "SUBDIRS = lib docs src scripts", "SUBDIRS = lib") replace_in_file(self, top_makefile, "include src/Makefile.inc", "") # zlib naming is not always very consistent @@ -342,48 +339,67 @@ def _patch_cmake(self): # Use upstream FindZstd.cmake because check_symbol_exists() is called # afterwards and it would fail with zstd_LIBRARIES generated by CMakeDeps replace_in_file(self, cmakelists, "find_package(Zstd REQUIRED)", "find_package(Zstd REQUIRED MODULE)") - replace_in_file(self, os.path.join(self.source_folder, "CMake", "FindZstd.cmake"), "if(UNIX)", "if(0)") + if Version(self.version) < "8.10.0": + replace_in_file(self, os.path.join(self.source_folder, "CMake", "FindZstd.cmake"), "if(UNIX)", "if(0)") # c-ares - replace_in_file(self, cmakelists, "find_package(CARES REQUIRED)", "find_package(c-ares REQUIRED CONFIG)") - replace_in_file(self, cmakelists, "${CARES_LIBRARY}", "c-ares::cares") + if Version(self.version) < "8.10.0": + replace_in_file(self, cmakelists, "find_package(CARES REQUIRED)", "find_package(c-ares REQUIRED CONFIG)") + replace_in_file(self, cmakelists, "${CARES_LIBRARY}", "c-ares::cares") + else: + replace_in_file(self, cmakelists, "find_package(Cares REQUIRED)", "find_package(c-ares REQUIRED CONFIG)") + replace_in_file(self, cmakelists, "${CARES_LIBRARIES}", "c-ares::cares") # libpsl - if self._has_with_libpsl_option: + if Version(self.version) < "8.10.0": replace_in_file(self, cmakelists, "find_package(LibPSL)", "find_package(libpsl REQUIRED CONFIG)") - replace_in_file(self, cmakelists, "if(LIBPSL_FOUND)", "if(libpsl_FOUND)") replace_in_file(self, cmakelists, "${LIBPSL_LIBRARY}", "libpsl::libpsl") replace_in_file(self, cmakelists, "${LIBPSL_INCLUDE_DIR}", "${libpsl_INCLUDE_DIRS}") + else: + replace_in_file(self, cmakelists, "${LIBPSL_LIBRARIES}", "libpsl::libpsl") + replace_in_file(self, cmakelists, "${LIBPSL_INCLUDE_DIRS}", "${libpsl_INCLUDE_DIRS}") + replace_in_file(self, cmakelists, "if(LIBPSL_FOUND)", "if(libpsl_FOUND)") # libssh2 - replace_in_file(self, cmakelists, "find_package(LibSSH2)", "find_package(Libssh2 REQUIRED CONFIG)") + if Version(self.version) < "8.10.0": + replace_in_file(self, cmakelists, "find_package(LibSSH2)", "find_package(Libssh2 REQUIRED CONFIG)") + replace_in_file(self, cmakelists, "${LIBSSH2_LIBRARY}", "Libssh2::libssh2") + replace_in_file(self, cmakelists, "${LIBSSH2_INCLUDE_DIR}", "${Libssh2_INCLUDE_DIRS}") + else: + replace_in_file(self, cmakelists, "${LIBSSH2_LIBRARIES}", "Libssh2::libssh2") + replace_in_file(self, cmakelists, "${LIBSSH2_INCLUDE_DIRS}", "${Libssh2_INCLUDE_DIRS}") replace_in_file(self, cmakelists, "if(LIBSSH2_FOUND)", "if(Libssh2_FOUND)") - replace_in_file(self, cmakelists, "${LIBSSH2_LIBRARY}", "Libssh2::libssh2") - replace_in_file(self, cmakelists, "${LIBSSH2_INCLUDE_DIR}", "${Libssh2_INCLUDE_DIRS}") # libnghttp2 - replace_in_file(self, cmakelists, "find_package(NGHTTP2 REQUIRED)", "find_package(libnghttp2 REQUIRED CONFIG)") + if Version(self.version) < "8.10.0": + replace_in_file(self, cmakelists, "find_package(NGHTTP2 REQUIRED)", "find_package(libnghttp2 REQUIRED CONFIG)") + else: + replace_in_file(self, cmakelists, "find_package(NGHTTP2)", "find_package(libnghttp2 REQUIRED CONFIG)") replace_in_file(self, cmakelists, "${NGHTTP2_INCLUDE_DIRS}", "${libnghttp2_INCLUDE_DIRS}") replace_in_file(self, cmakelists, "${NGHTTP2_LIBRARIES}", "libnghttp2::nghttp2") # wolfssl replace_in_file(self, cmakelists, "find_package(WolfSSL REQUIRED)", "find_package(wolfssl REQUIRED CONFIG)") - replace_in_file(self, cmakelists, "${WolfSSL_LIBRARIES}", "${wolfssl_LIBRARIES}") - replace_in_file(self, cmakelists, "${WolfSSL_INCLUDE_DIRS}", "${wolfssl_INCLUDE_DIRS}") + if Version(self.version) < "8.10.0": + replace_in_file(self, cmakelists, "${WolfSSL_LIBRARIES}", "${wolfssl_LIBRARIES}") + replace_in_file(self, cmakelists, "${WolfSSL_INCLUDE_DIRS}", "${wolfssl_INCLUDE_DIRS}") + else: + replace_in_file(self, cmakelists, "${WOLFSSL_LIBRARIES}", "${wolfssl_LIBRARIES}") + replace_in_file(self, cmakelists, "${WOLFSSL_INCLUDE_DIRS}", "${wolfssl_INCLUDE_DIRS}") # INTERFACE_LIBRARY (generated by the cmake_find_package generator) targets doesn't have the LOCATION property. # So skipp the LOCATION check in the CMakeLists.txt - if Version(self.version) >= "7.80.0": - replace_in_file(self, - cmakelists, - 'get_target_property(_lib "${_libname}" LOCATION)', - """get_target_property(_type "${_libname}" TYPE) + replace_in_file( + self, + cmakelists, + 'get_target_property(_lib "${_libname}" LOCATION)', + """get_target_property(_type "${_libname}" TYPE) if(${_type} STREQUAL "INTERFACE_LIBRARY") # Reading the INTERFACE_LIBRARY property on non-imported target will error out. continue() endif() get_target_property(_lib "${_libname}" LOCATION)""", - ) + ) def _yes_no(self, value): return "yes" if value else "no" @@ -445,7 +461,7 @@ def _generate_with_autotools(self): tc.configure_args.append(f"--with-wolfssl={path}") else: tc.configure_args.append("--without-wolfssl") - + if self.options.with_ssl == "mbedtls": path = unix_path(self, self.dependencies["mbedtls"].package_folder) tc.configure_args.append(f"--with-mbedtls={path}") @@ -498,6 +514,12 @@ def _generate_with_autotools(self): tc.configure_args.append(f"--with-ca-fallback={self._yes_no(self.options.with_ca_fallback)}") + if "with_misc_docs" in self.options: + if self.options.with_misc_docs: + tc.configure_args.append("--enable-docs") + else: + tc.configure_args.append("--disable-docs") + # Cross building flags if cross_building(self): if self.settings.os == "Linux" and "arm" in self.settings.arch: @@ -523,7 +545,6 @@ def _generate_with_autotools(self): if self.settings.os != "Windows": tc.fpic = self.options.get_safe("fPIC", True) - if cross_building(self) and is_apple_os(self): tc.extra_defines.extend(['HAVE_SOCKET', 'HAVE_FCNTL_O_NONBLOCK']) @@ -567,32 +588,16 @@ def _generate_with_cmake(self): tc.variables["BUILD_SHARED_LIBS"] = self.options.shared tc.variables["CURL_STATICLIB"] = not self.options.shared tc.variables["CMAKE_DEBUG_POSTFIX"] = "" - if Version(self.version) >= "7.81.0": - tc.variables["CURL_USE_SCHANNEL"] = self.options.with_ssl == "schannel" - else: - tc.variables["CMAKE_USE_SCHANNEL"] = self.options.with_ssl == "schannel" - if Version(self.version) >= "7.81.0": - tc.variables["CURL_USE_OPENSSL"] = self.options.with_ssl == "openssl" - else: - tc.variables["CMAKE_USE_OPENSSL"] = self.options.with_ssl == "openssl" - if Version(self.version) >= "7.81.0": - tc.variables["CURL_USE_WOLFSSL"] = self.options.with_ssl == "wolfssl" - else: - tc.variables["CMAKE_USE_WOLFSSL"] = self.options.with_ssl == "wolfssl" - if Version(self.version) >= "7.81.0": - tc.variables["CURL_USE_MBEDTLS"] = self.options.with_ssl == "mbedtls" - else: - tc.variables["CMAKE_USE_MBEDTLS"] = self.options.with_ssl == "mbedtls" + tc.variables["CURL_USE_SCHANNEL"] = self.options.with_ssl == "schannel" + tc.variables["CURL_USE_OPENSSL"] = self.options.with_ssl == "openssl" + tc.variables["CURL_USE_WOLFSSL"] = self.options.with_ssl == "wolfssl" + tc.variables["CURL_USE_MBEDTLS"] = self.options.with_ssl == "mbedtls" tc.variables["USE_NGHTTP2"] = self.options.with_nghttp2 tc.variables["CURL_ZLIB"] = self.options.with_zlib tc.variables["CURL_BROTLI"] = self.options.with_brotli tc.variables["CURL_ZSTD"] = self.options.with_zstd - if self._has_with_libpsl_option: - tc.variables["CURL_USE_LIBPSL"] = self.options.with_libpsl - if Version(self.version) >= "7.81.0": - tc.variables["CURL_USE_LIBSSH2"] = self.options.with_libssh2 - else: - tc.variables["CMAKE_USE_LIBSSH2"] = self.options.with_libssh2 + tc.variables["CURL_USE_LIBPSL"] = self.options.with_libpsl + tc.variables["CURL_USE_LIBSSH2"] = self.options.with_libssh2 tc.variables["ENABLE_ARES"] = self.options.with_c_ares if not self.options.with_c_ares: tc.variables["ENABLE_THREADED_RESOLVER"] = self.options.with_threaded_resolver @@ -680,6 +685,7 @@ def package_info(self): self.cpp_info.components["curl"].system_libs.append("crypt32") elif is_apple_os(self): self.cpp_info.components["curl"].frameworks.append("CoreFoundation") + self.cpp_info.components["curl"].frameworks.append("CoreServices") self.cpp_info.components["curl"].frameworks.append("SystemConfiguration") if self.options.with_ldap: self.cpp_info.components["curl"].system_libs.append("ldap") diff --git a/recipes/libcurl/config.yml b/recipes/libcurl/config.yml index ba6c695e81b4c..eb9a8179a3b87 100644 --- a/recipes/libcurl/config.yml +++ b/recipes/libcurl/config.yml @@ -1,4 +1,12 @@ versions: + "8.10.1": + folder: all + "8.10.0": + folder: all + "8.9.1": + folder: all + "8.8.0": + folder: all "8.6.0": folder: all "8.5.0": @@ -7,31 +15,9 @@ versions: folder: all "8.2.1": folder: all - "8.2.0": - folder: all "8.1.2": folder: all - "8.1.1": - folder: all "8.0.1": folder: all "7.88.1": folder: all - "7.87.0": - folder: all - "7.86.0": - folder: all - "7.85.0": - folder: all - "7.84.0": - folder: all - "7.83.1": - folder: all - "7.82.0": - folder: all - "7.80.0": - folder: all - "7.79.1": - folder: all - "7.78.0": - folder: all diff --git a/recipes/libcvd/all/conanfile.py b/recipes/libcvd/all/conanfile.py index a272a22ebfe97..da62d0fad1d30 100644 --- a/recipes/libcvd/all/conanfile.py +++ b/recipes/libcvd/all/conanfile.py @@ -71,13 +71,15 @@ def layout(self): def requirements(self): # https://github.com/edrosten/libcvd/blob/main/cmake/CVDFindAllDeps.cmake + # Used in a public header https://github.com/edrosten/libcvd/blob/RELEASE_2_5_0/cvd/canny.h#L4 + self.requires("toon/3.2", transitive_headers=True, transitive_libs=True) if self.options.with_ffmpeg: # FFMPEG v5.x+ are not supported self.requires("ffmpeg/4.4.4", transitive_libs=True) if self.options.with_libdc1394: - self.requires("libdc1394/2.2.7") # FIXME: libidc1394 seems to be missing raw1394 dependency # test_package fails with "undefined reference to `raw1394_new_handle'" etc + self.requires("libdc1394/2.2.7") if self.options.with_libjpeg == "libjpeg-turbo": self.requires("libjpeg-turbo/3.0.2") elif self.options.with_libjpeg == "libjpeg": @@ -90,14 +92,7 @@ def requirements(self): self.requires("libtiff/4.6.0") if self.options.get_safe("with_opengl", True): # https://github.com/edrosten/libcvd/blob/RELEASE_2_5_0/cvd/videodisplay.h#L18-L20 - if self.settings.os in ["Linux", "FreeBSD"]: - self.requires("libglvnd/1.7.0", transitive_headers=True, transitive_libs=True) - self.requires("xorg/system", transitive_headers=True, transitive_libs=True) - else: - self.requires("opengl/system", transitive_headers=True, transitive_libs=True) - # TODO: https://github.com/ankurhanda/TooN - # https://github.com/edrosten/libcvd/blob/RELEASE_2_5_0/cvd/canny.h#L4 - # self.requires("toon/3.1.1", transitive_headers=True, transitive_libs=True) + self.requires("opengl/system", transitive_headers=True, transitive_libs=True) def validate(self): if self.settings.compiler.cppstd: @@ -123,7 +118,6 @@ def generate(self): tc.variables["CMAKE_DISABLE_FIND_PACKAGE_TIFF"] = not self.options.with_libtiff tc.variables["CMAKE_DISABLE_FIND_PACKAGE_OpenGL"] = not self.options.get_safe("with_opengl", True) tc.variables["CMAKE_DISABLE_FIND_PACKAGE_X11"] = not self.options.get_safe("with_opengl", True) - tc.variables["CMAKE_DISABLE_FIND_PACKAGE_TooN"] = True tc.variables["CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS"] = True tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0077"] = "NEW" tc.generate() diff --git a/recipes/libdatrie/all/conandata.yml b/recipes/libdatrie/all/conandata.yml new file mode 100644 index 0000000000000..96b260a1cc4e3 --- /dev/null +++ b/recipes/libdatrie/all/conandata.yml @@ -0,0 +1,9 @@ +sources: + "0.2.13": + url: "https://linux.thai.net/pub/ThaiLinux/software/libthai/libdatrie-0.2.13.tar.xz" + sha256: "12231bb2be2581a7f0fb9904092d24b0ed2a271a16835071ed97bed65267f4be" +patches: + "0.2.13": + - patch_file: "patches/fix-exports.patch" + patch_type: "portability" + patch_description: "Fix .def exports for Windows" diff --git a/recipes/libdatrie/all/conanfile.py b/recipes/libdatrie/all/conanfile.py new file mode 100644 index 0000000000000..7ec417808f17c --- /dev/null +++ b/recipes/libdatrie/all/conanfile.py @@ -0,0 +1,138 @@ +import os + +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.apple import fix_apple_shared_install_name, is_apple_os +from conan.tools.build import cross_building +from conan.tools.env import Environment, VirtualBuildEnv, VirtualRunEnv +from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rm, rmdir, save, rename +from conan.tools.gnu import Autotools, AutotoolsDeps, AutotoolsToolchain +from conan.tools.layout import basic_layout +from conan.tools.microsoft import is_msvc, unix_path + +required_conan_version = ">=1.54.0" + + +class LibdatrieConan(ConanFile): + name = "libdatrie" + description = "Implementation of double-array structure for representing tries" + license = "LGPL-2.1-or-later" + homepage = "https://linux.thai.net/projects/datrie" + url = "https://github.com/conan-io/conan-center-index" + topics = ("trie", "double-array-trie", "datrie") + + package_type = "library" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + "tools": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + "tools": False, + } + + @property + def _settings_build(self): + return getattr(self, "settings_build", self.settings) + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + self.settings.rm_safe("compiler.cppstd") + self.settings.rm_safe("compiler.libcxx") + + def layout(self): + basic_layout(self, src_folder="src") + + def export_sources(self): + export_conandata_patches(self) + + def requirements(self): + self.requires("libiconv/1.17") + + def validate(self): + if is_apple_os(self) and self.options.shared: + # Fails due to build script bugs + raise ConanInvalidConfiguration("shared builds on Apple OS-s are not supported. Contributions are welcome!") + + def build_requirements(self): + if self._settings_build.os == "Windows": + self.win_bash = True + if not self.conf.get("tools.microsoft.bash:path", check_type=str): + self.tool_requires("msys2/cci.latest") + if is_msvc(self): + self.tool_requires("automake/1.16.5") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + env = VirtualBuildEnv(self) + env.generate() + + if not cross_building(self): + env = VirtualRunEnv(self) + env.generate(scope="build") + + tc = AutotoolsToolchain(self) + tc.configure_args.extend([ + "--disable-doxygen-doc", + ]) + if is_msvc(self): + tc.extra_cflags.append("-FS") + tc.extra_cxxflags.append("-FS") + tc.generate() + + if is_msvc(self): + env = Environment() + iconv_info = self.dependencies["libiconv"].cpp_info + env.append("CPPFLAGS", [f"-I{unix_path(self, iconv_info.includedir)}"] + [f"-D{d}" for d in iconv_info.defines]) + env.append("_LINK_", [lib if lib.endswith(".lib") else f"{lib}.lib" for lib in iconv_info.libs]) + env.append("LDFLAGS", [f"-L{unix_path(self, iconv_info.libdir)}"]) + env.vars(self).save_script("conanautotoolsdeps_cl_workaround") + else: + tc = AutotoolsDeps(self) + tc.generate() + + if is_msvc(self): + env = Environment() + automake_conf = self.dependencies.build["automake"].conf_info + compile_wrapper = unix_path(self, automake_conf.get("user.automake:compile-wrapper", check_type=str)) + ar_wrapper = unix_path(self, automake_conf.get("user.automake:lib-wrapper", check_type=str)) + env.define("CC", f"{compile_wrapper} cl -nologo") + env.define("LD", "link -nologo") + env.define("AR", f"{ar_wrapper} lib") + env.vars(self).save_script("conanbuild_msvc") + + def build(self): + apply_conandata_patches(self) + autotools = Autotools(self) + autotools.configure() + if not self.options.tools: + save(self, os.path.join(self.build_folder, "tools", "Makefile"), "all:\n\t\ninstall:\n\t\n") + # Unnecessary and breaks MSVC build + save(self, os.path.join(self.build_folder, "man", "Makefile"), "all:\n\t\ninstall:\n\t\n") + autotools.make() + + def package(self): + copy(self, "COPYING", self.source_folder, os.path.join(self.package_folder, "licenses")) + autotools = Autotools(self) + autotools.install() + rm(self, "*.la", os.path.join(self.package_folder, "lib")) + rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) + rmdir(self, os.path.join(self.package_folder, "share")) + fix_apple_shared_install_name(self) + if is_msvc(self) and self.options.shared: + rename(self, os.path.join(self.package_folder, "lib", "datrie.dll.lib"), + os.path.join(self.package_folder, "lib", "datrie.lib")) + + def package_info(self): + self.cpp_info.set_property("pkg_config_name", "datrie-0.2") + self.cpp_info.libs = ["datrie"] diff --git a/recipes/libdatrie/all/patches/fix-exports.patch b/recipes/libdatrie/all/patches/fix-exports.patch new file mode 100644 index 0000000000000..70886973e7745 --- /dev/null +++ b/recipes/libdatrie/all/patches/fix-exports.patch @@ -0,0 +1,7 @@ +--- datrie/libdatrie.def ++++ datrie/libdatrie.def +@@ -1,3 +1,4 @@ ++EXPORTS + alpha_map_new + alpha_map_clone + alpha_map_free diff --git a/recipes/libdatrie/all/test_package/CMakeLists.txt b/recipes/libdatrie/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..baf1d9bc4e755 --- /dev/null +++ b/recipes/libdatrie/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES C) + +find_package(libdatrie REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.c) +target_link_libraries(${PROJECT_NAME} PRIVATE libdatrie::libdatrie) +target_compile_features(${PROJECT_NAME} PRIVATE c_std_99) diff --git a/recipes/libdatrie/all/test_package/conanfile.py b/recipes/libdatrie/all/test_package/conanfile.py new file mode 100644 index 0000000000000..3a91c9439218e --- /dev/null +++ b/recipes/libdatrie/all/test_package/conanfile.py @@ -0,0 +1,26 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def layout(self): + cmake_layout(self) + + def requirements(self): + self.requires(self.tested_reference_str) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/libdatrie/all/test_package/test_package.c b/recipes/libdatrie/all/test_package/test_package.c new file mode 100644 index 0000000000000..683c115b1b56f --- /dev/null +++ b/recipes/libdatrie/all/test_package/test_package.c @@ -0,0 +1,15 @@ +#include + +int main(void) { + AlphaMap *en_map = alpha_map_new(); + if (!en_map) + return 1; + if (alpha_map_add_range(en_map, 0x0061, 0x007a) != 0) + return 1; + Trie *test_trie = trie_new(en_map); + if (!test_trie) + return 1; + trie_free(test_trie); + alpha_map_free(en_map); + return 0; +} diff --git a/recipes/libdatrie/config.yml b/recipes/libdatrie/config.yml new file mode 100644 index 0000000000000..58b2f36b9fab3 --- /dev/null +++ b/recipes/libdatrie/config.yml @@ -0,0 +1,3 @@ +versions: + "0.2.13": + folder: all diff --git a/recipes/libdeflate/all/conandata.yml b/recipes/libdeflate/all/conandata.yml index 720157d82ac2b..3f2d733ec1559 100644 --- a/recipes/libdeflate/all/conandata.yml +++ b/recipes/libdeflate/all/conandata.yml @@ -1,4 +1,13 @@ sources: + "1.22": + url: "https://github.com/ebiggers/libdeflate/archive/refs/tags/v1.22.tar.gz" + sha256: "7f343c7bf2ba46e774d8a632bf073235e1fd27723ef0a12a90f8947b7fe851d6" + "1.21": + url: "https://github.com/ebiggers/libdeflate/archive/refs/tags/v1.21.tar.gz" + sha256: "50827d312c0413fbd41b0628590cd54d9ad7ebf88360cba7c0e70027942dbd01" + "1.20": + url: "https://github.com/ebiggers/libdeflate/archive/refs/tags/v1.20.tar.gz" + sha256: "ed1454166ced78913ff3809870a4005b7170a6fd30767dc478a09b96847b9c2a" "1.19": url: "https://github.com/ebiggers/libdeflate/archive/refs/tags/v1.19.tar.gz" sha256: "27bf62d71cd64728ff43a9feb92f2ac2f2bf748986d856133cc1e51992428c25" diff --git a/recipes/libdeflate/config.yml b/recipes/libdeflate/config.yml index fe3db2bc74050..e0c8d8a06e43c 100644 --- a/recipes/libdeflate/config.yml +++ b/recipes/libdeflate/config.yml @@ -1,4 +1,10 @@ versions: + "1.22": + folder: "all" + "1.21": + folder: "all" + "1.20": + folder: "all" "1.19": folder: "all" "1.18": diff --git a/recipes/libdisplay-info/all/conandata.yml b/recipes/libdisplay-info/all/conandata.yml index 916fa487be227..8019b0f27fc6e 100644 --- a/recipes/libdisplay-info/all/conandata.yml +++ b/recipes/libdisplay-info/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.2.0": + url: "https://gitlab.freedesktop.org/emersion/libdisplay-info/-/archive/0.2.0/libdisplay-info-0.2.0.tar.bz2" + sha256: "f6cf2ddbba3753ae38de5113d1fcb8fab977dfaf5fb07b38cd68d8482765e208" "0.1.1": url: "https://gitlab.freedesktop.org/emersion/libdisplay-info/-/archive/0.1.1/libdisplay-info-0.1.1.tar.bz2" sha256: "51cdb0362882ca2af62532ab4d95e60d81e9890b339264719fd55f8e3945d695" diff --git a/recipes/libdisplay-info/config.yml b/recipes/libdisplay-info/config.yml index b893ff21f7c23..cc2bbccb73a1b 100644 --- a/recipes/libdisplay-info/config.yml +++ b/recipes/libdisplay-info/config.yml @@ -1,3 +1,5 @@ versions: + "0.2.0": + folder: all "0.1.1": folder: all diff --git a/recipes/libdivide/all/conandata.yml b/recipes/libdivide/all/conandata.yml index 6b1811615bec8..1cbb0260b35e7 100644 --- a/recipes/libdivide/all/conandata.yml +++ b/recipes/libdivide/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "5.1": + url: "https://github.com/ridiculousfish/libdivide/archive/refs/tags/v5.1.tar.gz" + sha256: "fec2e4141878c58eb92cfcd478accc3b7f34b39491c1e638566f083d378cc7d4" "5.0": url: "https://github.com/ridiculousfish/libdivide/archive/refs/tags/5.0.tar.gz" sha256: "01ffdf90bc475e42170741d381eb9cfb631d9d7ddac7337368bcd80df8c98356" diff --git a/recipes/libdivide/config.yml b/recipes/libdivide/config.yml index c374cc0645132..042bc67b62f0b 100644 --- a/recipes/libdivide/config.yml +++ b/recipes/libdivide/config.yml @@ -1,4 +1,6 @@ versions: + "5.1": + folder: all "5.0": folder: all "3.0": diff --git a/recipes/libdrm/all/conanfile.py b/recipes/libdrm/all/conanfile.py index 6b0ee32f2161c..be977e2be8299 100644 --- a/recipes/libdrm/all/conanfile.py +++ b/recipes/libdrm/all/conanfile.py @@ -9,7 +9,7 @@ from conan.tools.meson import MesonToolchain, Meson from conan.tools.scm import Version -required_conan_version = ">=1.53.0" +required_conan_version = ">=1.64.0 <2 || >=2.2.0" class LibdrmConan(ConanFile): @@ -88,9 +88,9 @@ def validate(self): raise ConanInvalidConfiguration("libdrm supports only Linux or FreeBSD") def build_requirements(self): - self.tool_requires("meson/1.3.0") + self.tool_requires("meson/1.4.0") if not self.conf.get("tools.gnu:pkg_config", default=False, check_type=str): - self.tool_requires("pkgconf/2.1.0") + self.tool_requires("pkgconf/2.2.0") def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) @@ -116,8 +116,9 @@ def generate(self): else: tc.project_options[o] = "true" if getattr(self.options, o) else "false" - tc.project_options["datadir"] = os.path.join(self.package_folder, "res") - tc.project_options["mandir"] = os.path.join(self.package_folder, "res", "man") + tc.project_options["datadir"] = "res" + tc.project_options["mandir"] = os.path.join("res", "man") + tc.project_options["man-pages"] = "disabled" if Version(self.version) >= "2.4.113" else "false" tc.generate() def build(self): diff --git a/recipes/libdwarf/all/conandata.yml b/recipes/libdwarf/all/conandata.yml index 1a5e4c96d2caf..bdb4e53c187f7 100644 --- a/recipes/libdwarf/all/conandata.yml +++ b/recipes/libdwarf/all/conandata.yml @@ -1,4 +1,13 @@ sources: + "0.11.0": + url: "https://github.com/davea42/libdwarf-code/archive/refs/tags/v0.11.0.tar.gz" + sha256: "5135af38dc202206538a3dcdc90675aa8b320e132156849c6855dea5ea0c0729" + "0.10.1": + url: "https://github.com/davea42/libdwarf-code/archive/refs/tags/v0.10.1.tar.gz" + sha256: "4ab8ae7b4b7aa42453725054b348f4fdb2460d5ba644199a1305311c718ff416" + "0.9.2": + url: "https://github.com/davea42/libdwarf-code/archive/refs/tags/v0.9.2.tar.gz" + sha256: "5371c68248c16a4a9cb071284c87c0cdb8f560d5277e0b86893fdc6576062f95" "0.9.1": url: "https://github.com/davea42/libdwarf-code/archive/refs/tags/v0.9.1.tar.gz" sha256: "6da3f46a9f92b4e284c97c733851879d9b91b16642bede90c7614860a946824e" @@ -15,6 +24,18 @@ sources: url: "https://www.prevanders.net/libdwarf-0.5.0.tar.xz" sha256: "11fa822c60317fa00e1a01a2ac9e8388f6693e8662ab72d352c5f50c7e0112a9" patches: + "0.11.0": + - patch_file: "patches/0.10.1-0001-fixes.patch" + patch_description: "fix DW_API definition and cmake" + patch_type: "portability" + "0.10.1": + - patch_file: "patches/0.10.1-0001-fixes.patch" + patch_description: "fix DW_API definition and cmake" + patch_type: "portability" + "0.9.2": + - patch_file: "patches/0.9.2-0001-fixes.patch" + patch_description: "fix DW_API definition and cmake" + patch_type: "portability" "0.9.1": - patch_file: "patches/0.9.1-0001-fixes.patch" patch_description: "fix DW_API definition and cmake" diff --git a/recipes/libdwarf/all/conanfile.py b/recipes/libdwarf/all/conanfile.py index 8eab28c0da9ce..7deafab14a912 100644 --- a/recipes/libdwarf/all/conanfile.py +++ b/recipes/libdwarf/all/conanfile.py @@ -56,7 +56,7 @@ def requirements(self): self.requires("libelf/0.8.13") self.requires("zlib/[>=1.2.11 <2]") if Version(self.version) >= Version("0.9.0"): - self.requires("zstd/1.5.5") + self.requires("zstd/[~1.5]") def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) diff --git a/recipes/libdwarf/all/patches/0.10.1-0001-fixes.patch b/recipes/libdwarf/all/patches/0.10.1-0001-fixes.patch new file mode 100644 index 0000000000000..8b49c6af7451b --- /dev/null +++ b/recipes/libdwarf/all/patches/0.10.1-0001-fixes.patch @@ -0,0 +1,65 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index f219f078..d8a78136 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -226,6 +226,12 @@ if (ENABLE_DECOMPRESSION) + set(HAVE_ZSTD_H TRUE) + set(BUILT_WITH_ZLIB_AND_ZSTD TRUE) + endif() ++ find_package(zstd CONFIG REQUIRED) ++ if(TARGET zstd::libzstd_shared) ++ set(ZSTD_LIB zstd::libzstd_shared) ++ else() ++ set(ZSTD_LIB zstd::libzstd_static) ++ endif() + endif () + + message(STATUS "CMAKE_SIZEOF_VOID_P ... " ${CMAKE_SIZEOF_VOID_P} ) +diff --git a/src/lib/libdwarf/CMakeLists.txt b/src/lib/libdwarf/CMakeLists.txt +index 02787555..862c97b8 100644 +--- a/src/lib/libdwarf/CMakeLists.txt ++++ b/src/lib/libdwarf/CMakeLists.txt +@@ -117,7 +117,7 @@ install(TARGETS dwarf + PUBLIC_HEADER DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" + ) + +-configure_file(libdwarf.pc.in libdwarf.pc @ONLY) ++# configure_file(libdwarf.pc.in libdwarf.pc @ONLY) + + # The install has to be here, not in + # another CMakeLists.txt to make install work properly +@@ -135,5 +135,5 @@ install(EXPORT libdwarfTargets + FILE libdwarf-targets.cmake + NAMESPACE libdwarf:: + DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/libdwarf") +-install(FILES "${PROJECT_BINARY_DIR}/src/lib/libdwarf/libdwarf.pc" DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig") ++# install(FILES "${PROJECT_BINARY_DIR}/src/lib/libdwarf/libdwarf.pc" DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig") + install(FILES "${PROJECT_SOURCE_DIR}/cmake/Findzstd.cmake" DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/libdwarf") +index 380d2ef7..8c62ee7e 100644 +--- a/src/lib/libdwarf/libdwarf.h ++++ b/src/lib/libdwarf/libdwarf.h +@@ -51,7 +51,7 @@ + #endif /* DW_API */ + + #ifndef LIBDWARF_STATIC +-# if defined(_WIN32) || defined(__CYGWIN__) ++# if defined(LIBDWARF_SHARED) && (defined(_WIN32) || defined(__CYGWIN__)) + # ifdef LIBDWARF_BUILD + # define DW_API __declspec(dllexport) + # else /* !LIBDWARF_BUILD */ +diff --git a/src/lib/libdwarf/libdwarf_private.h b/src/lib/libdwarf/libdwarf_private.h +index b37ae994..7fa89256 100644 +--- a/src/lib/libdwarf/libdwarf_private.h ++++ b/src/lib/libdwarf/libdwarf_private.h +@@ -26,11 +26,7 @@ + #ifdef _MSC_VER /* Macro to select VS compiler */ + #include + typedef SSIZE_T ssize_t; +-#ifdef _WIN64 +-typedef long long off_t; +-#else + typedef long off_t; +-#endif + #endif /* _MSC_VER */ + + #ifndef TRUE diff --git a/recipes/libdwarf/all/patches/0.9.2-0001-fixes.patch b/recipes/libdwarf/all/patches/0.9.2-0001-fixes.patch new file mode 100644 index 0000000000000..937423ef0cfb3 --- /dev/null +++ b/recipes/libdwarf/all/patches/0.9.2-0001-fixes.patch @@ -0,0 +1,66 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index f219f078..d8a78136 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -225,6 +225,12 @@ if (ENABLE_DECOMPRESSION) + set(HAVE_ZSTD_H TRUE) + set(BUILT_WITH_ZLIB_AND_ZSTD TRUE) + endif() ++ find_package(zstd CONFIG REQUIRED) ++ if(TARGET zstd::libzstd_shared) ++ set(ZSTD_LIB zstd::libzstd_shared) ++ else() ++ set(ZSTD_LIB zstd::libzstd_static) ++ endif() + endif () + + message(STATUS "CMAKE_SIZEOF_VOID_P ... " ${CMAKE_SIZEOF_VOID_P} ) +diff --git a/src/lib/libdwarf/CMakeLists.txt b/src/lib/libdwarf/CMakeLists.txt +index 6cb0b24e..069343ba 100644 +--- a/src/lib/libdwarf/CMakeLists.txt ++++ b/src/lib/libdwarf/CMakeLists.txt +@@ -117,7 +117,7 @@ install(TARGETS dwarf + PUBLIC_HEADER DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" + ) + +-configure_file(libdwarf.pc.cmake libdwarf.pc @ONLY) ++# configure_file(libdwarf.pc.cmake libdwarf.pc @ONLY) + + # The install has to be here, not in + # another CMakeLists.txt to make install work properly +@@ -135,5 +135,5 @@ install(EXPORT libdwarfTargets + FILE libdwarf-targets.cmake + NAMESPACE libdwarf:: + DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/libdwarf") +-install(FILES "${PROJECT_BINARY_DIR}/src/lib/libdwarf/libdwarf.pc" DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig") ++# install(FILES "${PROJECT_BINARY_DIR}/src/lib/libdwarf/libdwarf.pc" DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig") + install(FILES "${PROJECT_SOURCE_DIR}/cmake/Findzstd.cmake" DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/libdwarf") +diff --git a/src/lib/libdwarf/libdwarf.h b/src/lib/libdwarf/libdwarf.h +index 380d2ef7..8c62ee7e 100644 +--- a/src/lib/libdwarf/libdwarf.h ++++ b/src/lib/libdwarf/libdwarf.h +@@ -51,7 +51,7 @@ + #endif /* DW_API */ + + #ifndef LIBDWARF_STATIC +-# if defined(_WIN32) || defined(__CYGWIN__) ++# if defined(LIBDWARF_SHARED) && (defined(_WIN32) || defined(__CYGWIN__)) + # ifdef LIBDWARF_BUILD + # define DW_API __declspec(dllexport) + # else /* !LIBDWARF_BUILD */ +diff --git a/src/lib/libdwarf/libdwarf_private.h b/src/lib/libdwarf/libdwarf_private.h +index b37ae994..7fa89256 100644 +--- a/src/lib/libdwarf/libdwarf_private.h ++++ b/src/lib/libdwarf/libdwarf_private.h +@@ -26,11 +26,7 @@ + #ifdef _MSC_VER /* Macro to select VS compiler */ + #include + typedef SSIZE_T ssize_t; +-#ifdef _WIN64 +-typedef long long off_t; +-#else + typedef long off_t; +-#endif + #endif /* _MSC_VER */ + + #ifndef TRUE diff --git a/recipes/libdwarf/config.yml b/recipes/libdwarf/config.yml index b5a49fc99b335..fcb658d2d4a9c 100644 --- a/recipes/libdwarf/config.yml +++ b/recipes/libdwarf/config.yml @@ -1,4 +1,10 @@ versions: + "0.11.0": + folder: all + "0.10.1": + folder: all + "0.9.2": + folder: all "0.9.1": folder: all "0.9.0": diff --git a/recipes/libelfin/all/test_package/Makefile b/recipes/libelfin/all/test_package/Makefile deleted file mode 100644 index ccf962b53e8bc..0000000000000 --- a/recipes/libelfin/all/test_package/Makefile +++ /dev/null @@ -1,5 +0,0 @@ -# From http://timelessname.com/elfbin/ - -hello: hello.asm - nasm -f elf hello.asm - gcc -m32 -s -o hello hello.o -nostartfiles -nostdlib -nodefaultlibs diff --git a/recipes/libelfin/all/test_package/conanfile.py b/recipes/libelfin/all/test_package/conanfile.py index c2a19b9121acf..d7de1f914ce42 100644 --- a/recipes/libelfin/all/test_package/conanfile.py +++ b/recipes/libelfin/all/test_package/conanfile.py @@ -24,5 +24,4 @@ def build(self): def test(self): if can_run(self): bin_path = os.path.join(self.cpp.build.bindir, "test_package") - elf_path = os.path.join(self.source_folder, "hello") - self.run(f"{bin_path} {elf_path}", env="conanrun") + self.run(bin_path, env="conanrun") diff --git a/recipes/libelfin/all/test_package/hello b/recipes/libelfin/all/test_package/hello deleted file mode 100644 index 7202f6f7d512e..0000000000000 Binary files a/recipes/libelfin/all/test_package/hello and /dev/null differ diff --git a/recipes/libelfin/all/test_package/hello.asm b/recipes/libelfin/all/test_package/hello.asm deleted file mode 100644 index 0cc26b9d3a4a8..0000000000000 --- a/recipes/libelfin/all/test_package/hello.asm +++ /dev/null @@ -1,16 +0,0 @@ - SECTION .data -msg: db "Hi World",10 -len: equ $-msg - - SECTION .text - global main -main: - mov edx,len - mov ecx,msg - mov ebx,1 - mov eax,4 - int 0x80 - mov ebx,0 - mov eax,1 - int 0x80 - diff --git a/recipes/libelfin/all/test_package/test_package.cpp b/recipes/libelfin/all/test_package/test_package.cpp index 41843df23299f..4cec1bba9e2d9 100644 --- a/recipes/libelfin/all/test_package/test_package.cpp +++ b/recipes/libelfin/all/test_package/test_package.cpp @@ -1,29 +1,8 @@ -#include +#include #include -#include -#include -#include - -int -main(int argc, char** argv) -{ - using elf::to_string; - - int fd = open(argv[1], O_RDONLY); - elf::elf f(elf::create_mmap_loader(fd)); - - auto& hdr = f.get_hdr(); - std::cout << "ELF Header:\n"; - std::cout << " Magic: " << std::hex; - for (auto c : hdr.ei_magic) - std::cout << ' ' << static_cast(c); - std::cout << '\n'; - std::cout << " Class: " << to_string(hdr.ei_class) << '\n'; - std::cout << " Data: " << to_string(hdr.ei_data) << '\n'; - std::cout << " Version: " << static_cast(hdr.ei_version) << '\n'; - std::cout << " OS/ABI: " << to_string(hdr.ei_osabi) << '\n'; - std::cout << " ABI Version: " << static_cast(hdr.ei_abiversion) << '\n'; - std::cout << " Type: " << to_string(hdr.type) << '\n'; +int main() { + elf::pt pt_obj = elf::pt::load; + std::cout << elf::to_string(pt_obj) << std::endl; return 0; } diff --git a/recipes/libenvpp/all/conandata.yml b/recipes/libenvpp/all/conandata.yml index 9ad4addaf724a..07ebab632a379 100644 --- a/recipes/libenvpp/all/conandata.yml +++ b/recipes/libenvpp/all/conandata.yml @@ -1,4 +1,10 @@ sources: + "1.4.3": + url: "https://github.com/ph3at/libenvpp/archive/refs/tags/v1.4.3.tar.gz" + sha256: "affbd735b6f47615a54c9159baef9de206cc85badb5af4f662669f3789a13fa8" + "1.4.1": + url: "https://github.com/ph3at/libenvpp/archive/refs/tags/v1.4.1.tar.gz" + sha256: "1bcd0a1eb4eef32a53cbb410ae38d708ea662e491cc5536cb9b15d54cc8b5707" "1.4.0": url: "https://github.com/ph3at/libenvpp/archive/refs/tags/v1.4.0.tar.gz" sha256: "3f9a4a4b62abc06522de76e3a999cc3cd6b60299dc26b28ccc2183aa614f10cd" @@ -6,11 +12,19 @@ sources: url: "https://github.com/ph3at/libenvpp/archive/refs/tags/v1.3.0.tar.gz" sha256: "9201ae39dc67118ee46b4e60fe2e5d22b046faceae4a4b4eec6ab62bc48875dd" patches: + "1.4.3": + - patch_file: "patches/1.4.3-0001-use-cci-fmt.patch" + patch_description: "use cci fmt package, remove static flag from add_library" + patch_type: "conan" + "1.4.1": + - patch_file: "patches/1.3.0-0001-use-cci-fmt.patch" + patch_description: "use cci fmt package, remove static flag from add_library" + patch_type: "conan" "1.4.0": - - patch_file: "patches/0001-use-cci-fmt.patch" + - patch_file: "patches/1.3.0-0001-use-cci-fmt.patch" patch_description: "use cci fmt package, remove static flag from add_library" patch_type: "conan" "1.3.0": - - patch_file: "patches/0001-use-cci-fmt.patch" + - patch_file: "patches/1.3.0-0001-use-cci-fmt.patch" patch_description: "use cci fmt package, remove static flag from add_library" patch_type: "conan" diff --git a/recipes/libenvpp/all/patches/0001-use-cci-fmt.patch b/recipes/libenvpp/all/patches/1.3.0-0001-use-cci-fmt.patch similarity index 100% rename from recipes/libenvpp/all/patches/0001-use-cci-fmt.patch rename to recipes/libenvpp/all/patches/1.3.0-0001-use-cci-fmt.patch diff --git a/recipes/libenvpp/all/patches/1.4.3-0001-use-cci-fmt.patch b/recipes/libenvpp/all/patches/1.4.3-0001-use-cci-fmt.patch new file mode 100644 index 0000000000000..1f86bff7a146b --- /dev/null +++ b/recipes/libenvpp/all/patches/1.4.3-0001-use-cci-fmt.patch @@ -0,0 +1,31 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 8aa4975..231e523 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -55,7 +55,7 @@ endfunction() + + # External dependencies. + include(FetchContent) +- ++if(0) + if(LIBENVPP_INSTALL) + set(FMT_INSTALL ON CACHE BOOL "" FORCE) + endif() +@@ -78,7 +78,8 @@ macro(fetch_content_from_submodule DEPNAME RELPATH) + endmacro() + + fetch_content_from_submodule(fmt external/fmt) +- ++endif() ++find_package(fmt REQUIRED CONFIG) + if(LIBENVPP_TESTS) + fetch_content_from_submodule(Catch2 external/Catch2) + list(APPEND CMAKE_MODULE_PATH ${catch2_SOURCE_DIR}/extras) +@@ -144,6 +145,7 @@ endif() + + # Installation target. + if(LIBENVPP_INSTALL) ++ include(CMakePackageConfigHelpers) + # Libenvpp installation. + set(LIBENVPP_PROJECT_CONFIG_OUT "${CMAKE_CURRENT_BINARY_DIR}/libenvpp-config.cmake") + set(LIBENVPP_VERSION_CONFIG_FILE "${CMAKE_CURRENT_BINARY_DIR}/libenvpp-config-version.cmake") diff --git a/recipes/libenvpp/config.yml b/recipes/libenvpp/config.yml index 25c9b4921636c..cfa794e1b67d5 100644 --- a/recipes/libenvpp/config.yml +++ b/recipes/libenvpp/config.yml @@ -1,4 +1,8 @@ versions: + "1.4.3": + folder: all + "1.4.1": + folder: all "1.4.0": folder: all "1.3.0": diff --git a/recipes/libfabric/all/conandata.yml b/recipes/libfabric/all/conandata.yml index 1eedb4da16c00..1488ae656448e 100644 --- a/recipes/libfabric/all/conandata.yml +++ b/recipes/libfabric/all/conandata.yml @@ -1,4 +1,4 @@ sources: - "1.12.1": - url: https://github.com/ofiwg/libfabric/releases/download/v1.12.1/libfabric-1.12.1.tar.bz2 - sha256: db3c8e0a495e6e9da6a7436adab905468aedfbd4579ee3da5232a5c111ba642c + "1.21.0": + url: "https://github.com/ofiwg/libfabric/releases/download/v1.21.0/libfabric-1.21.0.tar.bz2" + sha256: "0c1b7b830d9147f661e5d7f359250b85b5a9885c330464cd3b5e5d35b86551c7" diff --git a/recipes/libfabric/all/conanfile.py b/recipes/libfabric/all/conanfile.py index 96dbea392e3a6..9d5b8417f1cbd 100644 --- a/recipes/libfabric/all/conanfile.py +++ b/recipes/libfabric/all/conanfile.py @@ -1,99 +1,195 @@ -from conans import ConanFile, AutoToolsBuildEnvironment, tools -from conans.errors import ConanInvalidConfiguration import os -required_conan_version = ">=1.35.0" +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.apple import is_apple_os, fix_apple_shared_install_name +from conan.tools.env import VirtualBuildEnv, VirtualRunEnv +from conan.tools.files import copy, get, rm, rmdir +from conan.tools.gnu import Autotools, AutotoolsToolchain, AutotoolsDeps +from conan.tools.layout import basic_layout + +required_conan_version = ">=1.53.0" + class LibfabricConan(ConanFile): name = "libfabric" - description = "Open Fabric Interfaces" - topics = ("fabric", "communication", "framework", "service") + description = ("Libfabric, also known as Open Fabrics Interfaces (OFI), " + "defines a communication API for high-performance parallel and distributed applications.") + license = ("BSD-2-Clause", "GPL-2.0-or-later") url = "https://github.com/conan-io/conan-center-index" homepage = "http://libfabric.org" - license = "BSD-2-Clause", "GPL-2.0-or-later" + topics = ("fabric", "communication", "framework", "service") + + package_type = "library" settings = "os", "arch", "compiler", "build_type" - _providers = ['gni', 'psm', 'psm2', 'psm3', 'rxm', 'sockets', 'tcp', 'udp', 'usnic', 'verbs', 'bgq'] + _providers = [ + "dmabuf_peer_mem", + "efa", + "hook_debug", + "hook_hmem", + "mrail", + "perf", + "profile", + "rxd", + "rxm", + "shm", + "sm2", + "sockets", + "tcp", + "trace", + "ucx", + "udp", + "usnic", + "verbs", + ] options = { - **{ p: "ANY" for p in _providers }, - **{ - "shared": [True, False], - "fPIC": [True, False], - "with_libnl": "ANY", - "with_bgq_progress": [None, "auto", "manual"], - "with_bgq_mr": [None, "basic", "scalable"] - } + "shared": [True, False], + "fPIC": [True, False], + **{ p: [None, "ANY"] for p in _providers }, } default_options = { - **{ p: "auto" for p in _providers }, - **{ - "shared": False, - "fPIC": True, - "with_libnl": None, - "with_bgq_progress": None, - "with_bgq_mr": None - } + "shared": False, + "fPIC": True, + "dmabuf_peer_mem": "yes", + "efa": "yes", + "hook_debug": "yes", + "hook_hmem": "yes", + "mrail": "yes", + "perf": "no", + "profile": "yes", + "rxd": "yes", + "rxm": "yes", + "shm": "yes", + "sm2": "yes", + "sockets": "yes", + "tcp": "yes", + "trace": "yes", + "ucx": "no", + "udp": "yes", + "usnic": "no", + "verbs": "yes" } - @property - def _source_subfolder(self): - return "source_subfolder" - - _autotools = None - def config_options(self): - if self.settings.os == 'Windows': - del self.options.fPIC + if is_apple_os(self): + # Requires libnl, which is not available on macOS + del self.options.usnic + # Require Linux-specific process_vm_readv syscall + del self.options.shm + del self.options.sm2 + # rdma-core is not available on macOS + del self.options.efa + del self.options.verbs def configure(self): if self.options.shared: - del self.options.fPIC - del self.settings.compiler.libcxx - del self.settings.compiler.cppstd + self.options.rm_safe("fPIC") + self.settings.rm_safe("compiler.libcxx") + self.settings.rm_safe("compiler.cppstd") + + def _is_enabled(self, opt): + return str(self.options.get_safe(opt)) == "yes" or str(self.options.get_safe(opt)).startswith("dl") + + def requirements(self): + if self._is_enabled("usnic"): + self.requires("libnl/3.8.0") + if self._is_enabled("efa") or self._is_enabled("usnic") or self._is_enabled("verbs"): + self.requires("rdma-core/52.0") + + def layout(self): + basic_layout(self, src_folder="src") def validate(self): - if self.settings.os not in ["Linux", "FreeBSD", "Macos"]: - raise ConanInvalidConfiguration("libfabric only builds on Linux, Macos, and FreeBSD.") - for p in self._providers: - if self.options.get_safe(p) not in ["auto", "yes", "no", "dl"] and not os.path.isdir(str(self.options.get_safe(p))): - raise ConanInvalidConfiguration("Option {} can only be one of 'auto', 'yes', 'no', 'dl' or a directory path") - if self.options.get_safe('with_libnl') and not os.path.isdir(str(self.options.with_libnl)): - raise ConanInvalidConfiguration("Value of with_libnl must be an existing directory") + if self.settings.os == "Windows": + # FIXME: libfabric provides msbuild project files. + raise ConanInvalidConfiguration(f"{self.ref} Conan recipes is not supported on Windows. Contributions are welcome.") + + for provider in self._providers: + provider = str(self.options.get_safe(provider)) + if provider.lower() not in ["yes", "no", "dl", "none"] and \ + not os.path.isdir(provider) and \ + (not provider.startswith("dl:") and not os.path.isdir(provider[3:])): + raise ConanInvalidConfiguration(f"{self.ref} provider option '{provider}' is not valid. It must be 'yes', 'no', 'dl', 'dl:' or a directory path.") + + if self._is_enabled("verbs"): + if not self.dependencies["rdma-core"].options.build_librdmacm: + raise ConanInvalidConfiguration(f"{self.ref} '-o rdma-core/*:build_librdmacm=True' is required when '-o &:verbs=True'") + + def build_requirements(self): + # Used in ./configure tests and build + self.tool_requires("libtool/2.4.7") def source(self): - tools.get(**self.conan_data["sources"][self.version], - destination=self._source_subfolder, strip_root=True) - - def _configure_autotools(self): - if self._autotools: - return self._autotools - self._autotools = AutoToolsBuildEnvironment(self) - args = [] + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = AutotoolsToolchain(self) for p in self._providers: - args.append('--enable-{}={}'.format(p, self.options.get_safe(p))) - if self.options.with_libnl: - args.append('--with-libnl={}'.format(self.options.with_libnl)) - if self.options.with_bgq_progress: - args.append('--with-bgq-progress={}'.format(self.options.with_bgq_progress)) - if self.options.with_bgq_mr: - args.append('--with-bgq-mr={}'.format(self.options.with_bgq_mr)) - self._autotools.configure(args=args, configure_dir=self._source_subfolder) - return self._autotools + if p == "verbs" and self.options.get_safe(p, "no") != "no": + path = self.dependencies["rdma-core"].package_folder + if self.options.get_safe("verbs") == "dl": + tc.configure_args.append(f"--enable-verbs=dl:{path}") + else: + tc.configure_args.append(f"--enable-verbs={path}") + else: + tc.configure_args.append(f"--enable-{p}={self.options.get_safe(p, 'no')}") + if self.settings.build_type == "Debug": + tc.configure_args.append("--enable-debug") + tc.configure_args.append(f"--with-bgq-progress=no") + tc.configure_args.append(f"--with-bgq-mr=no") + tc.configure_args.append("--with-cassin-headers=no") + tc.configure_args.append("--with-cuda=no") # TODO + tc.configure_args.append("--with-curl=no") # TODO + tc.configure_args.append("--with-cxi-uapi-headers=no") + tc.configure_args.append("--with-dsa=no") + tc.configure_args.append("--with-gdrcopy=no") + tc.configure_args.append("--with-json-c=no") # TODO + if self._is_enabled("usnic"): + tc.configure_args.append(f"--with-libnl={self.dependencies['libnl'].package_folder}") + else: + tc.configure_args.append("--with-libnl=no") + tc.configure_args.append("--with-lttng=no") + tc.configure_args.append("--with-neuron=no") + tc.configure_args.append(f"--with-numa=no") + tc.configure_args.append("--with-psm2-src=no") + tc.configure_args.append("--with-psm3-rv=no") + tc.configure_args.append("--with-rocr=no") + tc.configure_args.append("--with-synapseai=no") + tc.configure_args.append("--with-uring=no") # TODO + tc.configure_args.append("--with-ze=no") + tc.configure_args.append("-enable-psm=no") + tc.configure_args.append("--enable-psm2=no") + tc.configure_args.append("--enable-psm3=no") + tc.configure_args.append("--enable-xpmem=no") + tc.configure_args.append("--enable-cxi=no") + tc.configure_args.append("--enable-opx=no") + tc.configure_args.append("--enable-bgq=no") + tc.generate() + + deps = AutotoolsDeps(self) + deps.generate() + + VirtualBuildEnv(self).generate() + VirtualRunEnv(self).generate(scope="build") def build(self): - autotools = self._configure_autotools() + autotools = Autotools(self) + autotools.configure() autotools.make() def package(self): - self.copy(pattern="COPYING", dst="licenses", src=self._source_subfolder) - autotools = self._configure_autotools() + copy(self, "COPYING", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) + autotools = Autotools(self) autotools.install() - - tools.rmdir(os.path.join(self.package_folder, "share")) - tools.rmdir(os.path.join(self.package_folder, "lib", "pkgconfig")) - tools.remove_files_by_mask(os.path.join(self.package_folder, "lib"), "*.la") + rmdir(self, os.path.join(self.package_folder, "share")) + rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) + rm(self, "*.la", self.package_folder, recursive=True) + fix_apple_shared_install_name(self) def package_info(self): - self.cpp_info.names["pkg_config"] = "libfabric" - self.cpp_info.libs = self.collect_libs() + self.cpp_info.set_property("pkg_config_name", "libfabric") + self.cpp_info.libs = ["fabric"] if self.settings.os in ["Linux", "FreeBSD"]: - self.cpp_info.system_libs = ["pthread", "m"] + self.cpp_info.system_libs = ["pthread", "m", "rt", "dl"] + if self.settings.compiler in ["gcc", "clang"]: + self.cpp_info.system_libs.append("atomic") diff --git a/recipes/libfabric/all/test_package/CMakeLists.txt b/recipes/libfabric/all/test_package/CMakeLists.txt index 196188113685c..09b7943e0c2de 100644 --- a/recipes/libfabric/all/test_package/CMakeLists.txt +++ b/recipes/libfabric/all/test_package/CMakeLists.txt @@ -1,8 +1,7 @@ -cmake_minimum_required(VERSION 3.1) -project(test_package) +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup() +find_package(libfabric REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) -target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS}) +target_link_libraries(${PROJECT_NAME} PRIVATE libfabric::libfabric) diff --git a/recipes/libfabric/all/test_package/conanfile.py b/recipes/libfabric/all/test_package/conanfile.py index bd7165a553cf4..ef5d7042163ec 100644 --- a/recipes/libfabric/all/test_package/conanfile.py +++ b/recipes/libfabric/all/test_package/conanfile.py @@ -1,10 +1,19 @@ -from conans import ConanFile, CMake, tools +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake import os class TestPackageConan(ConanFile): - settings = "os", "compiler", "build_type", "arch" - generators = "cmake" + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) def build(self): cmake = CMake(self) @@ -12,6 +21,6 @@ def build(self): cmake.build() def test(self): - if not tools.cross_building(self.settings): - bin_path = os.path.join("bin", "test_package") - self.run(bin_path, run_environment=True) + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/libfabric/all/test_v1_package/CMakeLists.txt b/recipes/libfabric/all/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..91630d79f4abb --- /dev/null +++ b/recipes/libfabric/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/libfabric/all/test_v1_package/conanfile.py b/recipes/libfabric/all/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..7e2dfe859bb27 --- /dev/null +++ b/recipes/libfabric/all/test_v1_package/conanfile.py @@ -0,0 +1,17 @@ +from conans import ConanFile, CMake, tools +import os + + +class TestPackageConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake", "cmake_find_package_multi" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if not tools.cross_building(self.settings): + bin_path = os.path.join("bin", "test_package") + self.run(bin_path, run_environment=True) diff --git a/recipes/libfabric/config.yml b/recipes/libfabric/config.yml index daa3a213a56fa..09d8df06c28ff 100644 --- a/recipes/libfabric/config.yml +++ b/recipes/libfabric/config.yml @@ -1,3 +1,3 @@ versions: - "1.12.1": + "1.21.0": folder: all diff --git a/recipes/libfdk_aac/all/conanfile.py b/recipes/libfdk_aac/all/conanfile.py index ea032fb6c5ddd..63fd8a8038b15 100644 --- a/recipes/libfdk_aac/all/conanfile.py +++ b/recipes/libfdk_aac/all/conanfile.py @@ -6,7 +6,9 @@ from conan.tools.gnu import Autotools, AutotoolsToolchain from conan.tools.layout import basic_layout from conan.tools.microsoft import is_msvc, NMakeToolchain +from conan.tools.build import cross_building from conan.tools.scm import Version +from conan.errors import ConanInvalidConfiguration import os required_conan_version = ">=1.55.0" @@ -46,6 +48,12 @@ def configure(self): if self.options.shared: self.options.rm_safe("fPIC") + def validate_build(self): + if cross_building(self) and self.settings.os == "Android": + # https://github.com/mstorsjo/fdk-aac/issues/124#issuecomment-653473956 + # INFO: It's possible to inject a log.h to fix the error, but there is no official support. + raise ConanInvalidConfiguration(f"{self.ref} cross-building for Android is not supported. Please, try native build.") + def layout(self): if self._use_cmake: cmake_layout(self, src_folder="src") diff --git a/recipes/libffi/all/conandata.yml b/recipes/libffi/all/conandata.yml index 5984134b2d8b9..4ae82714f72f8 100644 --- a/recipes/libffi/all/conandata.yml +++ b/recipes/libffi/all/conandata.yml @@ -1,17 +1,19 @@ sources: + "3.4.6": + url: "https://github.com/libffi/libffi/releases/download/v3.4.6/libffi-3.4.6.tar.gz" + sha256: "b0dea9df23c863a7a50e825440f3ebffabd65df1497108e5d437747843895a4e" "3.4.4": url: "https://github.com/libffi/libffi/releases/download/v3.4.4/libffi-3.4.4.tar.gz" sha256: "d66c56ad259a82cf2a9dfc408b32bf5da52371500b84745f7fb8b645712df676" - "3.4.3": - url: "https://github.com/libffi/libffi/releases/download/v3.4.3/libffi-3.4.3.tar.gz" - sha256: "4416dd92b6ae8fcb5b10421e711c4d3cb31203d77521a77d85d0102311e6c3b8" - "3.4.2": - url: "https://github.com/libffi/libffi/releases/download/v3.4.2/libffi-3.4.2.tar.gz" - sha256: "540fb721619a6aba3bdeef7d940d8e9e0e6d2c193595bc243241b77ff9e93620" "3.3": url: "https://github.com/libffi/libffi/releases/download/v3.3/libffi-3.3.tar.gz" sha256: "72fba7922703ddfa7a028d513ac15a85c8d54c8d67f55fa5a4802885dc652056" patches: + "3.4.6": + - patch_file: "patches/0002-3.4.6-fix-libtool-path.patch" + - patch_file: "patches/0004-3.4.6-fix-complex-type-msvc.patch" + - patch_file: "patches/0005-3.4.4-do-not-install-libraries-to-arch-dependent-directories.patch" + - patch_file: "patches/0006-3.4.6-library-no-version-suffix.patch" "3.4.4": - patch_file: "patches/0002-3.4.3-fix-libtool-path.patch" - patch_file: "patches/0004-3.3-fix-complex-type-msvc.patch" @@ -21,20 +23,6 @@ patches: patch_type: "portability" patch_source: "https://github.com/libffi/libffi/pull/764" patch_description: "Forward declare the open_temp_exec_file function which is required by the C99 standard" - "3.4.3": - - patch_file: "patches/0002-3.4.3-fix-libtool-path.patch" - - patch_file: "patches/0004-3.3-fix-complex-type-msvc.patch" - - patch_file: "patches/0005-3.4.3-do-not-install-libraries-to-arch-dependent-directories.patch" - - patch_file: "patches/0006-3.4.3-library-no-version-suffix.patch" - - patch_file: "patches/0007-3.4.3-forward-declare-open_temp_exec_file.patch" - patch_type: "portability" - patch_source: "https://github.com/libffi/libffi/pull/764" - patch_description: "Forward declare the open_temp_exec_file function which is required by the C99 standard" - "3.4.2": - - patch_file: "patches/0002-3.4.2-fix-libtool-path.patch" - - patch_file: "patches/0004-3.3-fix-complex-type-msvc.patch" - - patch_file: "patches/0005-3.4.2-do-not-install-libraries-to-arch-dependent-directories.patch" - - patch_file: "patches/0006-3.4.2-library-no-version-suffix.patch" "3.3": - patch_file: "patches/0002-3.3-fix-libtool-path.patch" - patch_file: "patches/0004-3.3-fix-complex-type-msvc.patch" diff --git a/recipes/libffi/all/conanfile.py b/recipes/libffi/all/conanfile.py index e46a94d1b4462..cc062fca08904 100644 --- a/recipes/libffi/all/conanfile.py +++ b/recipes/libffi/all/conanfile.py @@ -1,7 +1,8 @@ from conan import ConanFile -from conan.tools.apple import fix_apple_shared_install_name +from conan.errors import ConanInvalidConfiguration +from conan.tools.apple import fix_apple_shared_install_name, is_apple_os from conan.tools.env import VirtualBuildEnv -from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, mkdir, replace_in_file, rm, rmdir +from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, mkdir, rm, rmdir from conan.tools.gnu import Autotools, AutotoolsToolchain from conan.tools.layout import basic_layout from conan.tools.microsoft import check_min_vs, is_msvc, is_msvc_static_runtime, msvc_runtime_flag, unix_path @@ -42,6 +43,10 @@ def export_sources(self): def config_options(self): if self.settings.os == "Windows": del self.options.fPIC + + def validate(self): + if is_apple_os(self) and self.settings.arch == "armv8" and Version(self.version) < "3.4.0": + raise ConanInvalidConfiguration(f"{self.ref} does not support Apple ARM CPUs") def configure(self): if self.options.shared: @@ -78,9 +83,12 @@ def generate(self): if self._settings_build.compiler == "apple-clang": tc.configure_args.append("--disable-multi-os-directory") - tc.extra_defines.append("FFI_BUILDING") if self.options.shared: tc.extra_defines.append("FFI_BUILDING_DLL") + if Version(self.version) < "3.4.6": + tc.extra_defines.append("FFI_BUILDING") + elif not self.options.shared: + tc.extra_defines.append("FFI_STATIC_BUILD") env = tc.environment() if self._settings_build.os == "Windows" and (is_msvc(self) or self.settings.compiler == "clang"): @@ -134,22 +142,9 @@ def generate(self): env.define("INSTALL", unix_path(self, os.path.join(self.source_folder, "install-sh"))) tc.generate(env=env) - def _patch_source(self): + def build(self): apply_conandata_patches(self) - if Version(self.version) < "3.3": - if self.settings.compiler == "clang" and Version(str(self.settings.compiler.version)) >= 7.0: - # https://android.googlesource.com/platform/external/libffi/+/ca22c3cb49a8cca299828c5ffad6fcfa76fdfa77 - sysv_s_src = os.path.join(self.source_folder, "src", "arm", "sysv.S") - replace_in_file(self, sysv_s_src, "fldmiad", "vldmia") - replace_in_file(self, sysv_s_src, "fstmiad", "vstmia") - replace_in_file(self, sysv_s_src, "fstmfdd\tsp!,", "vpush") - - # https://android.googlesource.com/platform/external/libffi/+/7748bd0e4a8f7d7c67b2867a3afdd92420e95a9f - replace_in_file(self, sysv_s_src, "stmeqia", "stmiaeq") - - def build(self): - self._patch_source() autotools = Autotools(self) autotools.configure() autotools.make() @@ -170,4 +165,5 @@ def package_info(self): self.cpp_info.libs = ["{}ffi".format("lib" if is_msvc(self) else "")] self.cpp_info.set_property("pkg_config_name", "libffi") if not self.options.shared: - self.cpp_info.defines = ["FFI_BUILDING"] + static_define = "FFI_STATIC_BUILD" if Version(self.version) >= "3.4.6" else "FFI_BUILDING" + self.cpp_info.defines = [static_define] diff --git a/recipes/libffi/all/patches/0002-3.4.2-fix-libtool-path.patch b/recipes/libffi/all/patches/0002-3.4.2-fix-libtool-path.patch deleted file mode 100644 index fad9e64adff17..0000000000000 --- a/recipes/libffi/all/patches/0002-3.4.2-fix-libtool-path.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- configure -+++ configure -@@ -8979,7 +8979,7 @@ - LIBTOOL_DEPS=$ltmain - - # Always use our own libtool. --LIBTOOL='$(SHELL) $(top_builddir)/libtool' -+LIBTOOL='$(SHELL) $(top_builddir)/libtool.sh' - - - -@@ -9072,7 +9072,7 @@ - esac - - # Global variables: --ofile=libtool -+ofile=libtool.sh - can_build_shared=yes - - # All known linkers require a '.a' archive for static linking (except MSVC, diff --git a/recipes/libffi/all/patches/0002-3.4.6-fix-libtool-path.patch b/recipes/libffi/all/patches/0002-3.4.6-fix-libtool-path.patch new file mode 100644 index 0000000000000..e557baacf2699 --- /dev/null +++ b/recipes/libffi/all/patches/0002-3.4.6-fix-libtool-path.patch @@ -0,0 +1,20 @@ +--- configure ++++ configure +@@ -9882,7 +9882,7 @@ + LIBTOOL_DEPS=$ltmain + + # Always use our own libtool. +-LIBTOOL='$(SHELL) $(top_builddir)/libtool' ++LIBTOOL='$(SHELL) $(top_builddir)/libtool.sh' + + + +@@ -9974,7 +9974,7 @@ + esac + + # Global variables: +-ofile=libtool ++ofile=libtool.sh + can_build_shared=yes + + # All known linkers require a '.a' archive for static linking (except MSVC and diff --git a/recipes/libffi/all/patches/0004-3.4.6-fix-complex-type-msvc.patch b/recipes/libffi/all/patches/0004-3.4.6-fix-complex-type-msvc.patch new file mode 100644 index 0000000000000..4779afe0a2e85 --- /dev/null +++ b/recipes/libffi/all/patches/0004-3.4.6-fix-complex-type-msvc.patch @@ -0,0 +1,56 @@ +diff --git a/src/types.c b/src/types.c +index c1c27f3..d5d52bb 100644 +--- a/src/types.c ++++ b/src/types.c +@@ -31,6 +31,8 @@ + #include + #include + ++#include ++ + /* Type definitions */ + + #define FFI_TYPEDEF(name, type, id, maybe_const)\ +@@ -45,17 +47,17 @@ maybe_const ffi_type ffi_type_##name = { \ + id, NULL \ + } + +-#define FFI_COMPLEX_TYPEDEF(name, type, maybe_const) \ ++#define FFI_COMPLEX_TYPEDEF(name, complex_type, maybe_const) \ + static ffi_type *ffi_elements_complex_##name [2] = { \ + (ffi_type *)(&ffi_type_##name), NULL \ + }; \ + struct struct_align_complex_##name { \ + char c; \ +- _Complex type x; \ ++ complex_type x; \ + }; \ + FFI_EXTERN \ + maybe_const ffi_type ffi_type_complex_##name = { \ +- sizeof(_Complex type), \ ++ sizeof(complex_type), \ + offsetof(struct struct_align_complex_##name, x), \ + FFI_TYPE_COMPLEX, \ + (ffi_type **)ffi_elements_complex_##name \ +@@ -99,8 +101,18 @@ const ffi_type ffi_type_longdouble = { 16, 16, 4, NULL }; + FFI_TYPEDEF(longdouble, long double, FFI_TYPE_LONGDOUBLE, FFI_LDBL_CONST); + #endif + ++#ifdef _MSC_VER ++# define FLOAT_COMPLEX _C_float_complex ++# define DOUBLE_COMPLEX _C_double_complex ++# define LDOUBLE_COMPLEX _C_ldouble_complex ++#else ++# define FLOAT_COMPLEX float _Complex ++# define DOUBLE_COMPLEX double _Complex ++# define LDOUBLE_COMPLEX long double _Complex ++#endif ++ + #ifdef FFI_TARGET_HAS_COMPLEX_TYPE +-FFI_COMPLEX_TYPEDEF(float, float, const); +-FFI_COMPLEX_TYPEDEF(double, double, const); +-FFI_COMPLEX_TYPEDEF(longdouble, long double, FFI_LDBL_CONST); ++FFI_COMPLEX_TYPEDEF(float, FLOAT_COMPLEX, const); ++FFI_COMPLEX_TYPEDEF(double, DOUBLE_COMPLEX, const); ++FFI_COMPLEX_TYPEDEF(longdouble, LDOUBLE_COMPLEX, FFI_LDBL_CONST); + #endif diff --git a/recipes/libffi/all/patches/0005-3.4.2-do-not-install-libraries-to-arch-dependent-directories.patch b/recipes/libffi/all/patches/0005-3.4.2-do-not-install-libraries-to-arch-dependent-directories.patch deleted file mode 100644 index 8e14796ab662a..0000000000000 --- a/recipes/libffi/all/patches/0005-3.4.2-do-not-install-libraries-to-arch-dependent-directories.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- Makefile.in -+++ Makefile.in -@@ -517,7 +517,7 @@ - target_os = @target_os@ - target_vendor = @target_vendor@ - toolexecdir = @toolexecdir@ --toolexeclibdir = @toolexeclibdir@ -+toolexeclibdir = @libdir@ - top_build_prefix = @top_build_prefix@ - top_builddir = @top_builddir@ - top_srcdir = @top_srcdir@ diff --git a/recipes/libffi/all/patches/0005-3.4.3-do-not-install-libraries-to-arch-dependent-directories.patch b/recipes/libffi/all/patches/0005-3.4.3-do-not-install-libraries-to-arch-dependent-directories.patch deleted file mode 100644 index e82abf24a4fb1..0000000000000 --- a/recipes/libffi/all/patches/0005-3.4.3-do-not-install-libraries-to-arch-dependent-directories.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- Makefile.in -+++ Makefile.in -@@ -520,7 +520,7 @@ - target_vendor = @target_vendor@ - tmake_file = @tmake_file@ - toolexecdir = @toolexecdir@ --toolexeclibdir = @toolexeclibdir@ -+toolexeclibdir = @libdir@ - top_build_prefix = @top_build_prefix@ - top_builddir = @top_builddir@ - top_srcdir = @top_srcdir@ diff --git a/recipes/libffi/all/patches/0006-3.4.2-library-no-version-suffix.patch b/recipes/libffi/all/patches/0006-3.4.2-library-no-version-suffix.patch deleted file mode 100644 index 80c36df06441e..0000000000000 --- a/recipes/libffi/all/patches/0006-3.4.2-library-no-version-suffix.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- Makefile.in -+++ Makefile.in -@@ -610,7 +610,7 @@ - @LIBFFI_BUILD_VERSIONED_SHLIB_FALSE@libffi_version_dep = - @LIBFFI_BUILD_VERSIONED_SHLIB_GNU_TRUE@@LIBFFI_BUILD_VERSIONED_SHLIB_TRUE@libffi_version_dep = libffi.map - @LIBFFI_BUILD_VERSIONED_SHLIB_SUN_TRUE@@LIBFFI_BUILD_VERSIONED_SHLIB_TRUE@libffi_version_dep = libffi.map-sun --libffi_version_info = -version-info `grep -v '^\#' $(srcdir)/libtool-version` -+libffi_version_info = -avoid-version - libffi_la_LDFLAGS = -no-undefined $(libffi_version_info) $(libffi_version_script) $(LTLDFLAGS) $(AM_LTLDFLAGS) - libffi_la_DEPENDENCIES = $(libffi_la_LIBADD) $(libffi_version_dep) - AM_CPPFLAGS = -I. -I$(top_srcdir)/include -Iinclude -I$(top_srcdir)/src diff --git a/recipes/libffi/all/patches/0006-3.4.3-library-no-version-suffix.patch b/recipes/libffi/all/patches/0006-3.4.3-library-no-version-suffix.patch deleted file mode 100644 index 0ad4d29b1c4ce..0000000000000 --- a/recipes/libffi/all/patches/0006-3.4.3-library-no-version-suffix.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- Makefile.in -+++ Makefile.in -@@ -615,7 +615,7 @@ - @LIBFFI_BUILD_VERSIONED_SHLIB_FALSE@libffi_version_dep = - @LIBFFI_BUILD_VERSIONED_SHLIB_GNU_TRUE@@LIBFFI_BUILD_VERSIONED_SHLIB_TRUE@libffi_version_dep = libffi.map - @LIBFFI_BUILD_VERSIONED_SHLIB_SUN_TRUE@@LIBFFI_BUILD_VERSIONED_SHLIB_TRUE@libffi_version_dep = libffi.map-sun --libffi_version_info = -version-info `grep -v '^\#' $(srcdir)/libtool-version` -+libffi_version_info = -avoid-version - libffi_la_LDFLAGS = -no-undefined $(libffi_version_info) $(libffi_version_script) $(LTLDFLAGS) $(AM_LTLDFLAGS) - libffi_la_DEPENDENCIES = $(libffi_la_LIBADD) $(libffi_version_dep) - AM_CPPFLAGS = -I. -I$(top_srcdir)/include -Iinclude -I$(top_srcdir)/src diff --git a/recipes/libffi/all/patches/0006-3.4.6-library-no-version-suffix.patch b/recipes/libffi/all/patches/0006-3.4.6-library-no-version-suffix.patch new file mode 100644 index 0000000000000..726e8c1eb4a47 --- /dev/null +++ b/recipes/libffi/all/patches/0006-3.4.6-library-no-version-suffix.patch @@ -0,0 +1,13 @@ +diff --git a/Makefile.in b/Makefile.in +index 450200a..abcee85 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -618,7 +618,7 @@ AM_CFLAGS = $(am__append_3) + @LIBFFI_BUILD_VERSIONED_SHLIB_FALSE@libffi_version_dep = + @LIBFFI_BUILD_VERSIONED_SHLIB_GNU_TRUE@@LIBFFI_BUILD_VERSIONED_SHLIB_TRUE@libffi_version_dep = libffi.map + @LIBFFI_BUILD_VERSIONED_SHLIB_SUN_TRUE@@LIBFFI_BUILD_VERSIONED_SHLIB_TRUE@libffi_version_dep = libffi.map-sun +-libffi_version_info = -version-info `grep -v '^\#' $(srcdir)/libtool-version` ++libffi_version_info = -avoid-version + libffi_la_LDFLAGS = -no-undefined $(libffi_version_info) $(libffi_version_script) $(LTLDFLAGS) $(AM_LTLDFLAGS) + libffi_la_DEPENDENCIES = $(libffi_la_LIBADD) $(libffi_version_dep) + AM_CPPFLAGS = -I. -I$(top_srcdir)/include -Iinclude -I$(top_srcdir)/src diff --git a/recipes/libffi/config.yml b/recipes/libffi/config.yml index af3a9af92b306..e6382ec734d6d 100644 --- a/recipes/libffi/config.yml +++ b/recipes/libffi/config.yml @@ -1,9 +1,7 @@ versions: - "3.4.4": - folder: "all" - "3.4.3": + "3.4.6": folder: "all" - "3.4.2": + "3.4.4": folder: "all" "3.3": folder: "all" diff --git a/recipes/libfork/all/conandata.yml b/recipes/libfork/all/conandata.yml index 29f8392061e5d..26ad554c10e51 100644 --- a/recipes/libfork/all/conandata.yml +++ b/recipes/libfork/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "3.8.0": + url: "https://github.com/conorwilliams/libfork/archive/v3.8.0.tar.gz" + sha256: "53f23f0d27bb0753c0b03132f3c17bf8099617f037a2389a04e85fdd6f2736e8" "3.7.2": url: "https://github.com/conorwilliams/libfork/archive/v3.7.2.tar.gz" sha256: "0c4fbb7a6000c0a93b219b385d9834bd07bc5f19d89aa41ba8e27b5723694b15" diff --git a/recipes/libfork/all/conanfile.py b/recipes/libfork/all/conanfile.py index 003c113741bce..f2a0617be709d 100644 --- a/recipes/libfork/all/conanfile.py +++ b/recipes/libfork/all/conanfile.py @@ -8,8 +8,7 @@ required_conan_version = ">=1.53.0" - -class PackageConan(ConanFile): +class LibforkConan(ConanFile): name = "libfork" description = "A bleeding-edge, lock-free, wait-free, continuation-stealing tasking library." license = "MPL-2.0" @@ -45,7 +44,6 @@ def _compilers_minimum_version(self): def layout(self): basic_layout(self, src_folder="src") - def package_id(self): self.info.clear() @@ -59,9 +57,6 @@ def validate(self): def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) - def build(self): - pass - def package(self): copy(self, "LICENSE.md", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) copy(self, "*.hpp", src=os.path.join(self.source_folder, "include"), dst=os.path.join(self.package_folder, "include")) diff --git a/recipes/libfork/all/test_package/CMakeLists.txt b/recipes/libfork/all/test_package/CMakeLists.txt index 23f7d6ffa9876..01ecf1d73c686 100644 --- a/recipes/libfork/all/test_package/CMakeLists.txt +++ b/recipes/libfork/all/test_package/CMakeLists.txt @@ -1,7 +1,7 @@ cmake_minimum_required(VERSION 3.15) -project(test_package CXX) +project(test_package LANGUAGES CXX) -find_package(libfork REQUIRED) +find_package(libfork REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) target_link_libraries(${PROJECT_NAME} PRIVATE libfork::libfork) diff --git a/recipes/libfork/all/test_package/conanfile.py b/recipes/libfork/all/test_package/conanfile.py index 502059e940b33..8a476e09ae305 100644 --- a/recipes/libfork/all/test_package/conanfile.py +++ b/recipes/libfork/all/test_package/conanfile.py @@ -5,17 +5,17 @@ from conan.tools.build import can_run -class LibforkPackageTestConan(ConanFile): - settings = "os", "compiler", "build_type", "arch" +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" test_type = "explicit" - def requirements(self): - self.requires(self.tested_reference_str) - def layout(self): cmake_layout(self) + def requirements(self): + self.requires(self.tested_reference_str) + def build(self): cmake = CMake(self) cmake.configure() diff --git a/recipes/libfork/config.yml b/recipes/libfork/config.yml index a47dcb81bcc23..ee862d73f6252 100644 --- a/recipes/libfork/config.yml +++ b/recipes/libfork/config.yml @@ -1,3 +1,5 @@ versions: + "3.8.0": + folder: all "3.7.2": folder: all diff --git a/recipes/libftp/all/conandata.yml b/recipes/libftp/all/conandata.yml index 6f6b3ca9dc582..b6a96e96b90f5 100644 --- a/recipes/libftp/all/conandata.yml +++ b/recipes/libftp/all/conandata.yml @@ -1,4 +1,13 @@ sources: + "1.1.0": + url: "https://github.com/deniskovalchuk/libftp/archive/refs/tags/v1.1.0.tar.gz" + sha256: "8d9ff413436b17eef225c4b12539965cdea786d02bb2c688b153992d36f88f48" + "0.5.1": + url: "https://github.com/deniskovalchuk/libftp/archive/refs/tags/v0.5.1.tar.gz" + sha256: "6cc6e80b50ba425b66175d3b0d22358db4ebeb4941edc33bba47d72442de5645" + "0.5.0": + url: "https://github.com/deniskovalchuk/libftp/archive/refs/tags/v0.5.0.tar.gz" + sha256: "566d4d176bf754571e01563c4c0182a9c54b90903cd958a609fa0d6bd4c2141e" "0.4.1": url: "https://github.com/deniskovalchuk/libftp/archive/refs/tags/v0.4.1.tar.gz" sha256: "873dd7647234f72fecfe57150b0a4a60f4c16611d26ad7eb687e0561f54b9eec" diff --git a/recipes/libftp/all/conanfile.py b/recipes/libftp/all/conanfile.py index a3d283d843da6..144e760e21d70 100644 --- a/recipes/libftp/all/conanfile.py +++ b/recipes/libftp/all/conanfile.py @@ -12,11 +12,11 @@ class LibFTPConan(ConanFile): name = "libftp" - description = "A cross-platform FTP client library based on Boost.Asio" + description = "A cross-platform FTP/FTPS client library based on Boost.Asio" license = "MIT" url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/deniskovalchuk/libftp" - topics = ("ftp", "boost") + topics = ("ftp", "ftps", "boost", "ssl", "tls", "openssl") package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { @@ -58,6 +58,8 @@ def layout(self): def requirements(self): self.requires("boost/1.84.0", transitive_headers=True) + if Version(self.version) >= "0.5.0": + self.requires("openssl/[>=1.1 <4]", transitive_headers=True, transitive_libs=True) def validate(self): if is_msvc(self) and self.options.shared: diff --git a/recipes/libftp/all/test_package/test_package.cpp b/recipes/libftp/all/test_package/test_package.cpp index 8c6d986925378..78760fc11e2a1 100644 --- a/recipes/libftp/all/test_package/test_package.cpp +++ b/recipes/libftp/all/test_package/test_package.cpp @@ -4,8 +4,6 @@ int main(void) { try { ftp::client client; - client.get_current_directory(); - client.disconnect(); } catch (const std::exception & ex) { std::cerr << ex.what() << std::endl; diff --git a/recipes/libftp/config.yml b/recipes/libftp/config.yml index 3a9d5538921fc..fe91f9493569b 100644 --- a/recipes/libftp/config.yml +++ b/recipes/libftp/config.yml @@ -1,3 +1,9 @@ versions: + "1.1.0": + folder: all + "0.5.1": + folder: all + "0.5.0": + folder: all "0.4.1": folder: all diff --git a/recipes/libgettext/all/conanfile.py b/recipes/libgettext/all/conanfile.py index a3d65fe027cb3..9532952752a09 100644 --- a/recipes/libgettext/all/conanfile.py +++ b/recipes/libgettext/all/conanfile.py @@ -124,6 +124,15 @@ def generate(self): if (str(self.settings.compiler) == "Visual Studio" and Version(self.settings.compiler.version) >= "12") or \ (str(self.settings.compiler) == "msvc" and Version(self.settings.compiler.version) >= "180"): tc.extra_cflags += ["-FS"] + + if self.settings.build_type == "Debug": + # Skip checking for the 'n' printf format directly + # in msvc, as it is known to not be available due to security concerns. + # Skipping it avoids a GUI prompt during ./configure for a debug build + # See https://github.com/conan-io/conan-center-index/issues/23698 + tc.configure_args.extend([ + 'gl_cv_func_printf_directive_n=no' + ]) tc.make_args += ["-C", "intl"] env = tc.environment() if is_msvc(self) or self._is_clang_cl: diff --git a/recipes/libgettext/all/test_package/conanfile.py b/recipes/libgettext/all/test_package/conanfile.py index b9667f823f2c1..50e1b261c1fd4 100644 --- a/recipes/libgettext/all/test_package/conanfile.py +++ b/recipes/libgettext/all/test_package/conanfile.py @@ -1,8 +1,6 @@ from conan import ConanFile from conan.tools.build import can_run -from conan.tools.env import Environment, VirtualRunEnv -from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout -from conan.tools.files import copy, rename +from conan.tools.cmake import CMake, cmake_layout import os @@ -10,6 +8,7 @@ class TestPackageConan(ConanFile): settings = "os", "arch", "compiler", "build_type" test_type = "explicit" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" def requirements(self): self.requires(self.tested_reference_str) @@ -17,33 +16,12 @@ def requirements(self): def layout(self): cmake_layout(self) - def generate(self): - CMakeDeps(self).generate() - CMakeToolchain(self).generate() - for locale, lang in [("en", "en_US"), ("ru", "ru_RU"), ("es", "es_ES")]: - env = Environment() - env.define("LANG", lang) - env.vars(self, scope=f"run_{locale}").save_script(f"locale_{locale}") - - VirtualRunEnv(self).generate(scope=f"run_{locale}") - def build(self): cmake = CMake(self) cmake.configure() cmake.build() - for locale in ["en", "ru", "es"]: - directory = os.path.join(self.source_folder, locale, "LC_MESSAGES") - if not os.path.isdir(directory): - os.makedirs(directory) - po_folder = os.path.join(self.source_folder, "po", locale) - dest_folder = os.path.join(self.source_folder, locale, "LC_MESSAGES") - copy(self, "conan.mo.workaround_git_ignore", po_folder, dest_folder) - mo_file = os.path.join(dest_folder, "conan.mo") - if not os.path.exists(mo_file): - rename(self, os.path.join(dest_folder, "conan.mo.workaround_git_ignore"), mo_file) def test(self): if can_run(self): bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") - for locale in ["en", "ru", "es"]: - self.run(f"{bin_path} {os.path.abspath(self.source_folder)}", env=f"conanrun_{locale}") + self.run(bin_path, env=f"conanrun") diff --git a/recipes/libgettext/all/test_package/po/en/conan.mo.workaround_git_ignore b/recipes/libgettext/all/test_package/po/en/conan.mo.workaround_git_ignore deleted file mode 100644 index f2f426b3ff66b..0000000000000 Binary files a/recipes/libgettext/all/test_package/po/en/conan.mo.workaround_git_ignore and /dev/null differ diff --git a/recipes/libgettext/all/test_package/po/en/conan.po b/recipes/libgettext/all/test_package/po/en/conan.po deleted file mode 100644 index 082414b2e22f6..0000000000000 --- a/recipes/libgettext/all/test_package/po/en/conan.po +++ /dev/null @@ -1,23 +0,0 @@ -# Conan 1.0. -# Copyright (C) Bincrafters -# This file is distributed under the same license as the Conan package. -# Bincrafters , 2019. -msgid "" -msgstr "" -"Project-Id-Version: conan 1.0\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-07-11 03:48-0700\n" -"PO-Revision-Date: 2019-07-11 03:57-0700\n" -"Last-Translator: U-DESKTOP-HHN0EAP\\sse4 \n" -"Language-Team: English\n" -"Language: en\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#. Example of i18n usage -#: hello.c:17 -#, c-format -msgid "hello" -msgstr "hello" diff --git a/recipes/libgettext/all/test_package/po/es/conan.mo.workaround_git_ignore b/recipes/libgettext/all/test_package/po/es/conan.mo.workaround_git_ignore deleted file mode 100644 index 941535abc76d2..0000000000000 Binary files a/recipes/libgettext/all/test_package/po/es/conan.mo.workaround_git_ignore and /dev/null differ diff --git a/recipes/libgettext/all/test_package/po/es/conan.po b/recipes/libgettext/all/test_package/po/es/conan.po deleted file mode 100644 index 29a2b6106de38..0000000000000 --- a/recipes/libgettext/all/test_package/po/es/conan.po +++ /dev/null @@ -1,23 +0,0 @@ -# Conan 1.0. -# Copyright (C) Bincrafters -# This file is distributed under the same license as the Conan package. -# Bincrafters , 2019. -msgid "" -msgstr "" -"Project-Id-Version: conan 1.0\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-07-11 03:48-0700\n" -"PO-Revision-Date: 2019-07-11 03:58-0700\n" -"Last-Translator: U-DESKTOP-HHN0EAP\\sse4 \n" -"Language-Team: Spanish\n" -"Language: es\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#. Example of i18n usage -#: hello.c:17 -#, c-format -msgid "hello" -msgstr "holla" diff --git a/recipes/libgettext/all/test_package/po/ru/conan.mo.workaround_git_ignore b/recipes/libgettext/all/test_package/po/ru/conan.mo.workaround_git_ignore deleted file mode 100644 index 8f1f836a04c91..0000000000000 Binary files a/recipes/libgettext/all/test_package/po/ru/conan.mo.workaround_git_ignore and /dev/null differ diff --git a/recipes/libgettext/all/test_package/po/ru/conan.po b/recipes/libgettext/all/test_package/po/ru/conan.po deleted file mode 100644 index 34ecc9f75cf1e..0000000000000 --- a/recipes/libgettext/all/test_package/po/ru/conan.po +++ /dev/null @@ -1,24 +0,0 @@ -# Conan 1.0. -# Copyright (C) Bincrafters -# This file is distributed under the same license as the Conan package. -# Bincrafters , 2019. -msgid "" -msgstr "" -"Project-Id-Version: conan 1.0\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-07-11 03:48-0700\n" -"PO-Revision-Date: 2019-07-11 03:58-0700\n" -"Last-Translator: U-DESKTOP-HHN0EAP\\sse4 \n" -"Language-Team: Russian\n" -"Language: ru\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" -"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" - -#. Example of i18n usage -#: hello.c:17 -#, c-format -msgid "hello" -msgstr "privet" diff --git a/recipes/libgettext/all/test_package/test_package.c b/recipes/libgettext/all/test_package/test_package.c index 615e9408bed47..262221a2aba6a 100644 --- a/recipes/libgettext/all/test_package/test_package.c +++ b/recipes/libgettext/all/test_package/test_package.c @@ -1,26 +1,8 @@ #include -#include -#include #include -int main(int argc, char * const argv[]) -{ - if (argc < 2) - return -1; - if(!bindtextdomain("conan", argv[1])) - { - printf("Warning: Could not bind text domain\n"); - } - if(!textdomain("conan")) - { - printf("Warning: Could not set text domain\n"); - } - if(!setlocale(LC_ALL, "")) - { - printf("Warning: could not set locale\n"); - } - const char * lang = getenv("LANG"); - lang = lang ? lang : ""; - printf("hello in %s: %s\n", lang, gettext("hello")); +int main() { + gettext("Hello, world!"); + return 0; } diff --git a/recipes/libgettext/all/test_v1_package/CMakeLists.txt b/recipes/libgettext/all/test_v1_package/CMakeLists.txt deleted file mode 100644 index f9bddeec6f96a..0000000000000 --- a/recipes/libgettext/all/test_v1_package/CMakeLists.txt +++ /dev/null @@ -1,10 +0,0 @@ -cmake_minimum_required(VERSION 3.1) -project(test_package C) - -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) - -find_package(Intl CONFIG REQUIRED) - -add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ - ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/libgettext/all/test_v1_package/conanfile.py b/recipes/libgettext/all/test_v1_package/conanfile.py deleted file mode 100644 index 36bfb4bd5c2c9..0000000000000 --- a/recipes/libgettext/all/test_v1_package/conanfile.py +++ /dev/null @@ -1,31 +0,0 @@ -from conans import ConanFile, CMake, tools -from conan.tools.files import copy, rename -import os -import shutil - - -class TestPackageConan(ConanFile): - settings = "os", "arch", "compiler", "build_type" - generators = "cmake", "cmake_find_package_multi" - - def build(self): - cmake = CMake(self) - cmake.configure() - cmake.build() - for locale in ["en", "ru", "es"]: - directory = os.path.join(self.source_folder, locale, "LC_MESSAGES") - if not os.path.isdir(directory): - os.makedirs(directory) - po_folder = os.path.join(self.source_folder, "..", "test_package", "po", locale) - dest_folder = os.path.join(self.source_folder, locale, "LC_MESSAGES") - copy(self, "conan.mo.workaround_git_ignore", po_folder, dest_folder) - mo_file = os.path.join(dest_folder, "conan.mo") - if not os.path.exists(mo_file): - rename(self, os.path.join(dest_folder, "conan.mo.workaround_git_ignore"), mo_file) - - def test(self): - if not tools.cross_building(self): - bin_path = os.path.join("bin", "test_package") - for locale in ["en_US", "ru_RU", "es_ES"]: - with tools.environment_append({"LANG": locale}): - self.run(f"{bin_path} {os.path.abspath(self.source_folder)}", run_environment=True) diff --git a/recipes/libgit2/0.27.x/CMakeLists.txt b/recipes/libgit2/0.27.x/CMakeLists.txt deleted file mode 100644 index c502da172e7b8..0000000000000 --- a/recipes/libgit2/0.27.x/CMakeLists.txt +++ /dev/null @@ -1,7 +0,0 @@ -cmake_minimum_required(VERSION 3.1) -project(cmake_wrapper C) - -include("${CMAKE_BINARY_DIR}/conanbuildinfo.cmake") -conan_basic_setup(KEEP_RPATHS) - -add_subdirectory(source_subfolder) diff --git a/recipes/libgit2/0.27.x/conandata.yml b/recipes/libgit2/0.27.x/conandata.yml deleted file mode 100644 index dddcd1d95b8f4..0000000000000 --- a/recipes/libgit2/0.27.x/conandata.yml +++ /dev/null @@ -1,4 +0,0 @@ -sources: - "0.27.10": - url: "https://github.com/libgit2/libgit2/archive/v0.27.10.tar.gz" - sha256: "f6fd26378ff71bd7a4b17b576c82c774a2e9c2d6b74b24718a8fb29551e1c4a5" diff --git a/recipes/libgit2/0.27.x/conanfile.py b/recipes/libgit2/0.27.x/conanfile.py deleted file mode 100644 index 07e2765904500..0000000000000 --- a/recipes/libgit2/0.27.x/conanfile.py +++ /dev/null @@ -1,156 +0,0 @@ -from conan.tools.microsoft import is_msvc, is_msvc_static_runtime -from conans import ConanFile, tools, CMake -from conans.errors import ConanInvalidConfiguration -import functools -import os - -required_conan_version = ">=1.45.0" - - -class LibGit2Conan(ConanFile): - name = "libgit2" - description = ( - "libgit2 is a portable, pure C implementation of the Git core methods " - "provided as a re-entrant linkable library with a solid API" - ) - topics = ("libgit2", "git", "scm") - url = "https://github.com/conan-io/conan-center-index" - homepage = "https://libgit2.org/" - license = "GPL-2.0-linking-exception" - - settings = "os", "arch", "compiler", "build_type" - options = { - "shared": [True, False], - "fPIC": [True, False], - "threadsafe": [True, False], - "with_iconv": [True, False], - "with_libssh2": [True, False], - "with_https": [False, "openssl", "winhttp", "security"], - "with_sha1": ["collisiondetection", "commoncrypto", "openssl", "generic", "win32"], - } - default_options = { - "shared": False, - "fPIC": True, - "threadsafe": True, - "with_iconv": False, - "with_libssh2": True, - "with_https": "openssl", - "with_sha1": "collisiondetection", - } - - exports_sources = "CMakeLists.txt" - generators = "cmake", "cmake_find_package" - - @property - def _source_subfolder(self): - return "source_subfolder" - - def config_options(self): - if self.settings.os == "Windows": - del self.options.fPIC - - if not tools.is_apple_os(self.settings.os): - del self.options.with_iconv - - def configure(self): - if self.options.shared: - del self.options.fPIC - del self.settings.compiler.cppstd - del self.settings.compiler.libcxx - - @property - def _need_openssl(self): - return "openssl" in (self.options.with_https, self.options.with_sha1) - - def requirements(self): - self.requires("zlib/1.2.12") - self.requires("http_parser/2.9.4") - if self.options.with_libssh2: - self.requires("libssh2/1.10.0") - if self.settings.os != "Windows": - self.requires("libcurl/7.83.1") - if self._need_openssl: - self.requires("openssl/1.1.1o") - - def validate(self): - if self.options.with_https == "security": - if not tools.is_apple_os(self.settings.os): - raise ConanInvalidConfiguration("security is only valid for Apple products") - elif self.options.with_https == "winhttp": - if self.settings.os != "Windows": - raise ConanInvalidConfiguration("winhttp is only valid on Windows") - - if self.options.with_sha1 == "win32": - if self.settings.os != "Windows": - raise ConanInvalidConfiguration("win32 is only valid on Windows") - - def source(self): - tools.get(**self.conan_data["sources"][self.version], - destination=self._source_subfolder, strip_root=True) - - _cmake_https = { - "openssl": "OpenSSL", - "winhttp": "WinHTTP", - "security": "SecureTransport", - False: "OFF", - } - - _cmake_sha1 = { - "collisiondetection": "CollisionDetection", - "commoncrypto": "CommonCrypto", - "openssl": "OpenSSL", - "generic": "Generic", - "win32": "Win32", - } - - @functools.lru_cache(1) - def _configure_cmake(self): - cmake = CMake(self) - cmake.definitions["THREADSAFE"] = self.options.threadsafe - cmake.definitions["USE_SSH"] = self.options.with_libssh2 - - cmake.definitions["USE_ICONV"] = self.options.get_safe("with_iconv", False) - - cmake.definitions["USE_HTTPS"] = self._cmake_https[str(self.options.with_https)] - cmake.definitions["SHA1_BACKEND"] = self._cmake_sha1[str(self.options.with_sha1)] - - cmake.definitions["BUILD_CLAR"] = False - cmake.definitions["BUILD_EXAMPLES"] = False - - if is_msvc(self): - cmake.definitions["STATIC_CRT"] = is_msvc_static_runtime(self) - - cmake.configure() - return cmake - - def _patch_sources(self): - tools.replace_in_file(os.path.join(self._source_subfolder, "src", "CMakeLists.txt"), - "FIND_PKGLIBRARIES(LIBSSH2 libssh2)", - "FIND_PACKAGE(Libssh2 REQUIRED)\n" - "\tSET(LIBSSH2_FOUND ON)\n" - "\tSET(LIBSSH2_INCLUDE_DIRS ${Libssh2_INCLUDE_DIRS})\n" - "\tSET(LIBSSH2_LIBRARIES ${Libssh2_LIBRARIES})\n" - "\tSET(LIBSSH2_LIBRARY_DIRS ${Libssh2_LIB_DIRS})") - - tools.replace_in_file(os.path.join(self._source_subfolder, "src", "CMakeLists.txt"), - "FIND_PKGLIBRARIES(CURL libcurl)", - "FIND_PACKAGE(CURL REQUIRED)\n") - - def build(self): - self._patch_sources() - cmake = self._configure_cmake() - cmake.build() - - def package(self): - self.copy("COPYING", src=self._source_subfolder, dst="licenses") - cmake = self._configure_cmake() - cmake.install() - tools.rmdir(os.path.join(self.package_folder, "lib", "pkgconfig")) - - def package_info(self): - self.cpp_info.set_property("pkg_config_name", "libgit2") - self.cpp_info.libs = ["git2"] - if self.settings.os == "Windows": - self.cpp_info.system_libs.extend(["winhttp", "rpcrt4", "crypt32"]) - if self.settings.os in ["Linux", "FreeBSD"] and self.options.threadsafe: - self.cpp_info.system_libs.append("pthread") diff --git a/recipes/libgit2/0.27.x/test_package/CMakeLists.txt b/recipes/libgit2/0.27.x/test_package/CMakeLists.txt deleted file mode 100644 index 912bdc647f324..0000000000000 --- a/recipes/libgit2/0.27.x/test_package/CMakeLists.txt +++ /dev/null @@ -1,10 +0,0 @@ -cmake_minimum_required(VERSION 3.1) -project(test_package C) - -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) - -find_package(libgit2 REQUIRED CONFIG) - -add_executable(${PROJECT_NAME} test_package.c) -target_link_libraries(${PROJECT_NAME} libgit2::libgit2) diff --git a/recipes/libgit2/0.27.x/test_package/test_package.c b/recipes/libgit2/0.27.x/test_package/test_package.c deleted file mode 100644 index 1ea125101cdc8..0000000000000 --- a/recipes/libgit2/0.27.x/test_package/test_package.c +++ /dev/null @@ -1,34 +0,0 @@ -#include - -#include - -int main() -{ - git_libgit2_init(); - int versionMajor, versionMinor, versionRev; - git_libgit2_version(&versionMajor, &versionMinor, &versionRev); - - printf("libgit2 v%i.%i.%i\n", versionMajor, versionMinor, versionRev); - - printf("Compile Features:\n"); - - int features = git_libgit2_features(); - - if (features & GIT_FEATURE_THREADS) - printf(" - Thread safe\n"); - else - printf(" - Single thread only\n"); - - if (features & GIT_FEATURE_HTTPS) - printf(" - TLS (openssl, winhttp or security)\n"); - else - printf(" - No TLS\n"); - - if (features & GIT_FEATURE_SSH) - printf(" - SSH (libssh2)\n"); - else - printf(" - No SSH support\n"); - - git_libgit2_shutdown(); - return 0; -} diff --git a/recipes/libgit2/0.28.x/CMakeLists.txt b/recipes/libgit2/0.28.x/CMakeLists.txt deleted file mode 100644 index c502da172e7b8..0000000000000 --- a/recipes/libgit2/0.28.x/CMakeLists.txt +++ /dev/null @@ -1,7 +0,0 @@ -cmake_minimum_required(VERSION 3.1) -project(cmake_wrapper C) - -include("${CMAKE_BINARY_DIR}/conanbuildinfo.cmake") -conan_basic_setup(KEEP_RPATHS) - -add_subdirectory(source_subfolder) diff --git a/recipes/libgit2/0.28.x/conandata.yml b/recipes/libgit2/0.28.x/conandata.yml deleted file mode 100644 index 25994eed756a3..0000000000000 --- a/recipes/libgit2/0.28.x/conandata.yml +++ /dev/null @@ -1,4 +0,0 @@ -sources: - "0.28.5": - url: "https://github.com/libgit2/libgit2/archive/v0.28.5.tar.gz" - sha256: "2b7b68aee6f123bc84cc502a9c12738435b8054e7d628962e091cd2a25be4f42" diff --git a/recipes/libgit2/0.28.x/conanfile.py b/recipes/libgit2/0.28.x/conanfile.py deleted file mode 100644 index 7e3da960a3cb2..0000000000000 --- a/recipes/libgit2/0.28.x/conanfile.py +++ /dev/null @@ -1,160 +0,0 @@ -from conan.tools.microsoft import is_msvc, is_msvc_static_runtime -from conans import ConanFile, tools, CMake -from conans.errors import ConanInvalidConfiguration -import functools -import os - -required_conan_version = ">=1.45.0" - - -class LibGit2Conan(ConanFile): - name = "libgit2" - description = ( - "libgit2 is a portable, pure C implementation of the Git core methods " - "provided as a re-entrant linkable library with a solid API" - ) - topics = ("libgit2", "git", "scm") - url = "https://github.com/conan-io/conan-center-index" - homepage = "https://libgit2.org/" - license = "GPL-2.0-linking-exception" - - settings = "os", "arch", "compiler", "build_type" - options = { - "shared": [True, False], - "fPIC": [True, False], - "threadsafe": [True, False], - "with_iconv": [True, False], - "with_libssh2": [True, False], - "with_https": [False, "openssl", "mbedtls", "winhttp", "security"], - "with_sha1": ["collisiondetection", "commoncrypto", "openssl", "mbedtls", "generic", "win32"], - } - default_options = { - "shared": False, - "fPIC": True, - "threadsafe": True, - "with_iconv": False, - "with_libssh2": True, - "with_https": "openssl", - "with_sha1": "collisiondetection", - } - - exports_sources = "CMakeLists.txt" - generators = "cmake", "cmake_find_package" - - @property - def _source_subfolder(self): - return "source_subfolder" - - def config_options(self): - if self.settings.os == "Windows": - del self.options.fPIC - - if not tools.is_apple_os(self.settings.os): - del self.options.with_iconv - - def configure(self): - if self.options.shared: - del self.options.fPIC - del self.settings.compiler.cppstd - del self.settings.compiler.libcxx - - @property - def _need_openssl(self): - return "openssl" in (self.options.with_https, self.options.with_sha1) - - @property - def _need_mbedtls(self): - return "mbedtls" in (self.options.with_https, self.options.with_sha1) - - def requirements(self): - self.requires("zlib/1.2.12") - self.requires("http_parser/2.9.4") - if self.options.with_libssh2: - self.requires("libssh2/1.10.0") - if self._need_openssl: - self.requires("openssl/1.1.1o") - if self._need_mbedtls: - self.requires("mbedtls/3.1.0") - if tools.is_apple_os(self.settings.os) and self.options.with_iconv: - self.requires("libiconv/1.16") - - def validate(self): - if self.options.with_https == "security": - if not tools.is_apple_os(self.settings.os): - raise ConanInvalidConfiguration("security is only valid for Apple products") - elif self.options.with_https == "winhttp": - if self.settings.os != "Windows": - raise ConanInvalidConfiguration("winhttp is only valid on Windows") - - if self.options.with_sha1 == "win32": - if self.settings.os != "Windows": - raise ConanInvalidConfiguration("win32 is only valid on Windows") - - def source(self): - tools.get(**self.conan_data["sources"][self.version], - destination=self._source_subfolder, strip_root=True) - - _cmake_https = { - "openssl": "OpenSSL", - "winhttp": "WinHTTP", - "security": "SecureTransport", - "mbedtls": "mbedTLS", - False: "OFF", - } - - _cmake_sha1 = { - "collisiondetection": "CollisionDetection", - "commoncrypto": "CommonCrypto", - "openssl": "OpenSSL", - "mbedtls": "mbedTLS", - "generic": "Generic", - "win32": "Win32", - } - - @functools.lru_cache(1) - def _configure_cmake(self): - cmake = CMake(self) - cmake.definitions["THREADSAFE"] = self.options.threadsafe - cmake.definitions["USE_SSH"] = self.options.with_libssh2 - - cmake.definitions["USE_ICONV"] = self.options.get_safe("with_iconv", False) - - cmake.definitions["USE_HTTPS"] = self._cmake_https[str(self.options.with_https)] - cmake.definitions["SHA1_BACKEND"] = self._cmake_sha1[str(self.options.with_sha1)] - - cmake.definitions["BUILD_CLAR"] = False - cmake.definitions["BUILD_EXAMPLES"] = False - - if is_msvc(self): - cmake.definitions["STATIC_CRT"] = is_msvc_static_runtime(self) - - cmake.configure() - return cmake - - def _patch_sources(self): - tools.replace_in_file(os.path.join(self._source_subfolder, "src", "CMakeLists.txt"), - "FIND_PKGLIBRARIES(LIBSSH2 libssh2)", - "FIND_PACKAGE(Libssh2 REQUIRED)\n" - "\tSET(LIBSSH2_FOUND ON)\n" - "\tSET(LIBSSH2_INCLUDE_DIRS ${Libssh2_INCLUDE_DIRS})\n" - "\tSET(LIBSSH2_LIBRARIES ${Libssh2_LIBRARIES})\n" - "\tSET(LIBSSH2_LIBRARY_DIRS ${Libssh2_LIB_DIRS})") - - def build(self): - self._patch_sources() - cmake = self._configure_cmake() - cmake.build() - - def package(self): - self.copy("COPYING", src=self._source_subfolder, dst="licenses") - cmake = self._configure_cmake() - cmake.install() - tools.rmdir(os.path.join(self.package_folder, "lib", "pkgconfig")) - - def package_info(self): - self.cpp_info.set_property("pkg_config_name", "libgit2") - self.cpp_info.libs = ["git2"] - if self.settings.os == "Windows": - self.cpp_info.system_libs.extend(["winhttp", "rpcrt4", "crypt32"]) - if self.settings.os in ["Linux", "FreeBSD"] and self.options.threadsafe: - self.cpp_info.system_libs.append("pthread") diff --git a/recipes/libgit2/0.28.x/test_package/CMakeLists.txt b/recipes/libgit2/0.28.x/test_package/CMakeLists.txt deleted file mode 100644 index 912bdc647f324..0000000000000 --- a/recipes/libgit2/0.28.x/test_package/CMakeLists.txt +++ /dev/null @@ -1,10 +0,0 @@ -cmake_minimum_required(VERSION 3.1) -project(test_package C) - -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) - -find_package(libgit2 REQUIRED CONFIG) - -add_executable(${PROJECT_NAME} test_package.c) -target_link_libraries(${PROJECT_NAME} libgit2::libgit2) diff --git a/recipes/libgit2/0.28.x/test_package/test_package.c b/recipes/libgit2/0.28.x/test_package/test_package.c deleted file mode 100644 index 96e8eda89c73b..0000000000000 --- a/recipes/libgit2/0.28.x/test_package/test_package.c +++ /dev/null @@ -1,34 +0,0 @@ -#include - -#include - -int main() -{ - git_libgit2_init(); - int versionMajor, versionMinor, versionRev; - git_libgit2_version(&versionMajor, &versionMinor, &versionRev); - - printf("libgit2 v%i.%i.%i\n", versionMajor, versionMinor, versionRev); - - printf("Compile Features:\n"); - - int features = git_libgit2_features(); - - if (features & GIT_FEATURE_THREADS) - printf(" - Thread safe\n"); - else - printf(" - Single thread only\n"); - - if (features & GIT_FEATURE_HTTPS) - printf(" - TLS (openssl, mbedtls, winhttp or security)\n"); - else - printf(" - No TLS\n"); - - if (features & GIT_FEATURE_SSH) - printf(" - SSH (libssh2)\n"); - else - printf(" - No SSH support\n"); - - git_libgit2_shutdown(); - return 0; -} diff --git a/recipes/libgit2/all/CMakeLists.txt b/recipes/libgit2/all/CMakeLists.txt deleted file mode 100644 index c502da172e7b8..0000000000000 --- a/recipes/libgit2/all/CMakeLists.txt +++ /dev/null @@ -1,7 +0,0 @@ -cmake_minimum_required(VERSION 3.1) -project(cmake_wrapper C) - -include("${CMAKE_BINARY_DIR}/conanbuildinfo.cmake") -conan_basic_setup(KEEP_RPATHS) - -add_subdirectory(source_subfolder) diff --git a/recipes/libgit2/all/conandata.yml b/recipes/libgit2/all/conandata.yml index 7725b775b39de..966e9ed4a24c0 100644 --- a/recipes/libgit2/all/conandata.yml +++ b/recipes/libgit2/all/conandata.yml @@ -1,4 +1,19 @@ sources: + "1.8.4": + url: "https://github.com/libgit2/libgit2/archive/v1.8.4.tar.gz" + sha256: "49d0fc50ab931816f6bfc1ac68f8d74b760450eebdb5374e803ee36550f26774" + "1.8.3": + url: "https://github.com/libgit2/libgit2/archive/v1.8.3.tar.gz" + sha256: "868810a5508d41dd7033d41bdc55312561f3f916d64f5b7be92bc1ff4dcae02a" + "1.8.2": + url: "https://github.com/libgit2/libgit2/archive/v1.8.2.tar.gz" + sha256: "184699f0d9773f96eeeb5cb245ba2304400f5b74671f313240410f594c566a28" + "1.8.1": + url: "https://github.com/libgit2/libgit2/archive/v1.8.1.tar.gz" + sha256: "8c1eaf0cf07cba0e9021920bfba9502140220786ed5d8a8ec6c7ad9174522f8e" + "1.7.2": + url: "https://github.com/libgit2/libgit2/archive/v1.7.2.tar.gz" + sha256: "de384e29d7efc9330c6cdb126ebf88342b5025d920dcb7c645defad85195ea7f" "1.5.0": url: "https://github.com/libgit2/libgit2/archive/v1.5.0.tar.gz" sha256: "8de872a0f201b33d9522b817c92e14edb4efad18dae95cf156cf240b2efff93e" @@ -18,21 +33,47 @@ sources: url: "https://github.com/libgit2/libgit2/archive/v1.0.1.tar.gz" sha256: "1775427a6098f441ddbaa5bd4e9b8a043c7401e450ed761e69a415530fea81d2" patches: + "1.8.4": + - patch_file: "patches/1.8.1-0001-fix-cmake.patch" + patch_description: "use cci's packages" + patch_type: "conan" + "1.8.3": + - patch_file: "patches/1.8.1-0001-fix-cmake.patch" + patch_description: "use cci's packages" + patch_type: "conan" + "1.8.2": + - patch_file: "patches/1.8.1-0001-fix-cmake.patch" + patch_description: "use cci's packages" + patch_type: "conan" + "1.8.1": + - patch_file: "patches/1.8.1-0001-fix-cmake.patch" + patch_description: "use cci's packages" + patch_type: "conan" + "1.7.2": + - patch_file: "patches/1.7.2-0001-fix-cmake.patch" + patch_description: "use cci's packages" + patch_type: "conan" "1.5.0": - patch_file: "patches/1.4.3-0001-fix-cmake.patch" - base_path: "source_subfolder" + patch_description: "use cci's packages" + patch_type: "conan" "1.4.3": - patch_file: "patches/1.4.3-0001-fix-cmake.patch" - base_path: "source_subfolder" + patch_description: "use cci's packages" + patch_type: "conan" "1.3.0": - patch_file: "patches/1.3.0-0001-fix-cmake.patch" - base_path: "source_subfolder" + patch_description: "use cci's packages" + patch_type: "conan" "1.2.0": - patch_file: "patches/1.2.0-0001-fix-cmake.patch" - base_path: "source_subfolder" + patch_description: "use cci's packages" + patch_type: "conan" "1.1.1": - patch_file: "patches/1.1.1-0001-fix-cmake.patch" - base_path: "source_subfolder" + patch_description: "use cci's packages" + patch_type: "conan" "1.0.1": - patch_file: "patches/1.0.1-0001-fix-cmake.patch" - base_path: "source_subfolder" + patch_description: "use cci's packages" + patch_type: "conan" diff --git a/recipes/libgit2/all/conanfile.py b/recipes/libgit2/all/conanfile.py index c042b13f51df6..ac07d7f6dac70 100644 --- a/recipes/libgit2/all/conanfile.py +++ b/recipes/libgit2/all/conanfile.py @@ -1,10 +1,14 @@ -from conan.tools.microsoft import is_msvc, is_msvc_static_runtime -from conans import ConanFile, tools, CMake -from conans.errors import ConanInvalidConfiguration -import functools +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.microsoft import is_msvc_static_runtime, is_msvc +from conan.tools.files import apply_conandata_patches, export_conandata_patches, get, copy, rmdir +from conan.tools.scm import Version +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.apple import is_apple_os import os -required_conan_version = ">=1.45.0" + +required_conan_version = ">=1.53.0" class LibGit2Conan(ConanFile): @@ -13,11 +17,11 @@ class LibGit2Conan(ConanFile): "libgit2 is a portable, pure C implementation of the Git core methods " "provided as a re-entrant linkable library with a solid API" ) - topics = ("libgit2", "git", "scm") + license = "GPL-2.0-linking-exception" url = "https://github.com/conan-io/conan-center-index" homepage = "https://libgit2.org/" - license = "GPL-2.0-linking-exception" - + topics = ("git", "scm") + package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], @@ -29,6 +33,7 @@ class LibGit2Conan(ConanFile): "with_sha1": ["collisiondetection", "commoncrypto", "openssl", "mbedtls", "generic", "win32"], "with_ntlmclient": [True, False], "with_regex": ["builtin", "pcre", "pcre2", "regcomp_l", "regcomp"], + "with_http_parser": ["http-parser", "llhttp"], } default_options = { "shared": False, @@ -40,23 +45,17 @@ class LibGit2Conan(ConanFile): "with_sha1": "collisiondetection", "with_ntlmclient": True, "with_regex": "builtin", + "with_http_parser": "http-parser", } - generators = "cmake", "cmake_find_package" - - @property - def _source_subfolder(self): - return "source_subfolder" def export_sources(self): - self.copy("CMakeLists.txt") - for patch in self.conan_data.get("patches", {}).get(self.version, []): - self.copy(patch["patch_file"]) + export_conandata_patches(self) def config_options(self): if self.settings.os == "Windows": del self.options.fPIC - if not tools.is_apple_os(self.settings.os): + if not is_apple_os(self): del self.options.with_iconv if self.settings.os == "Windows": @@ -65,27 +64,38 @@ def config_options(self): if self.settings.os == "Macos": self.options.with_regex = "regcomp_l" + # < 1.8.1 requries http_parser only. + if Version(self.version) < "1.8.1": + del self.options.with_http_parser + def configure(self): if self.options.shared: - del self.options.fPIC - del self.settings.compiler.cppstd - del self.settings.compiler.libcxx + self.options.rm_safe("fPIC") + self.settings.rm_safe("compiler.libcxx") + self.settings.rm_safe("compiler.cppstd") + + def layout(self): + cmake_layout(self, src_folder="src") def requirements(self): - self.requires("zlib/1.2.12") - self.requires("http_parser/2.9.4") + self.requires("zlib/[>=1.2.11 <2]") + if Version(self.version) < "1.8.1" or self.options.get_safe("with_http_parser") == "http-parser": + self.requires("http_parser/2.9.4") + else: + self.requires("llhttp/9.1.3") + if self.options.with_libssh2: - self.requires("libssh2/1.10.0") + self.requires("libssh2/1.11.0") if self._need_openssl: - self.requires("openssl/1.1.1o") + self.requires("openssl/[>=1.1 <4]") if self._need_mbedtls: - self.requires("mbedtls/3.1.0") + self.requires("mbedtls/3.2.1") if self.options.get_safe("with_iconv"): - self.requires("libiconv/1.16") + self.requires("libiconv/1.17") if self.options.with_regex == "pcre": self.requires("pcre/8.45") elif self.options.with_regex == "pcre2": - self.requires("pcre2/10.40") + self.requires("pcre2/10.42") @property def _need_openssl(self): @@ -97,7 +107,7 @@ def _need_mbedtls(self): def validate(self): if self.options.with_https == "security": - if not tools.is_apple_os(self.settings.os): + if not is_apple_os(self): raise ConanInvalidConfiguration("security is only valid for Apple products") elif self.options.with_https == "winhttp": if self.settings.os != "Windows": @@ -108,22 +118,21 @@ def validate(self): raise ConanInvalidConfiguration("win32 is only valid on Windows") if self.options.with_regex == "regcomp" or self.options.with_regex == "regcomp_l": - if self.settings.compiler == "Visual Studio": + if is_msvc(self): raise ConanInvalidConfiguration("{} isn't supported by Visual Studio".format(self.options.with_regex)) if self.settings.os in ["iOS", "tvOS", "watchOS"] and self.options.with_regex == "regcomp_l": raise ConanInvalidConfiguration("regcomp_l isn't supported on {}".format(self.settings.os)) def source(self): - tools.get(**self.conan_data["sources"][self.version], - destination=self._source_subfolder, strip_root=True) + get(self, **self.conan_data["sources"][self.version], strip_root=True) _cmake_https = { "openssl": "OpenSSL", "winhttp": "WinHTTP", "security": "SecureTransport", "mbedtls": "mbedTLS", - False: "OFF", + "False": "OFF", } _cmake_sha1 = { @@ -133,49 +142,57 @@ def source(self): "mbedtls": "mbedTLS", "generic": "Generic", "win32": "Win32", + "False": "OFF", } - @functools.lru_cache(1) - def _configure_cmake(self): - cmake = CMake(self) - cmake.definitions["THREADSAFE"] = self.options.threadsafe - cmake.definitions["USE_SSH"] = self.options.with_libssh2 - - cmake.definitions["USE_ICONV"] = self.options.get_safe("with_iconv", False) - - cmake.definitions["USE_HTTPS"] = self._cmake_https[str(self.options.with_https)] - cmake.definitions["USE_SHA1"] = self._cmake_sha1[str(self.options.with_sha1)] - - if tools.Version(self.version) >= "1.4.0": - cmake.definitions["BUILD_TESTS"] = False - cmake.definitions["BUILD_CLAR"] = False - cmake.definitions["BUILD_EXAMPLES"] = False - cmake.definitions["USE_HTTP_PARSER"] = "system" - - cmake.definitions["REGEX_BACKEND"] = self.options.with_regex - + def generate(self): + tc = CMakeToolchain(self) + tc.variables["THREADSAFE"] = self.options.threadsafe + if Version(self.version) < "1.8.1": + tc.variables["USE_SSH"] = self.options.with_libssh2 + else: + tc.variables["USE_SSH"] = "libssh2" if self.options.with_libssh2 else False + tc.variables["USE_ICONV"] = self.options.get_safe("with_iconv", False) + tc.variables["USE_HTTPS"] = self._cmake_https[str(self.options.with_https)] + tc.variables["USE_SHA1"] = self._cmake_sha1[str(self.options.with_sha1)] + if Version(self.version) >= "1.4.0": + tc.variables["BUILD_TESTS"] = False + tc.variables["BUILD_CLAR"] = False + tc.variables["BUILD_CLI"] = False + tc.variables["BUILD_EXAMPLES"] = False + if Version(self.version) < "1.8.1": + tc.variables["USE_HTTP_PARSER"] = "system" + else: + tc.variables["USE_HTTP_PARSER"] = self.options.get_safe("with_http_parser") + tc.variables["REGEX_BACKEND"] = self.options.with_regex if is_msvc(self): - cmake.definitions["STATIC_CRT"] = is_msvc_static_runtime(self) - - cmake.configure() - return cmake + tc.variables["STATIC_CRT"] = is_msvc_static_runtime(self) + # REGEX_BACKEND is SET(), avoid options overriding it + tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0077"] = "NEW" + tc.generate() + deps = CMakeDeps(self) + if self.options.get_safe("with_http_parser") == "llhttp": + deps.set_property("llhttp", "cmake_file_name", "LLHTTP") + deps.generate() def build(self): - for patch in self.conan_data.get("patches", {}).get(self.version, []): - tools.patch(**patch) - cmake = self._configure_cmake() + apply_conandata_patches(self) + cmake = CMake(self) + cmake.configure() cmake.build() def package(self): - self.copy("COPYING", src=self._source_subfolder, dst="licenses") - cmake = self._configure_cmake() + copy(self, pattern="COPYING", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) + cmake = CMake(self) cmake.install() - tools.rmdir(os.path.join(self.package_folder, "lib", "pkgconfig")) + rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) def package_info(self): self.cpp_info.set_property("pkg_config_name", "libgit2") self.cpp_info.libs = ["git2"] if self.settings.os == "Windows": self.cpp_info.system_libs.extend(["winhttp", "rpcrt4", "crypt32"]) + if Version(self.version) >= "1.7.0": + self.cpp_info.system_libs.append("secur32") if self.settings.os in ["Linux", "FreeBSD"] and self.options.threadsafe: self.cpp_info.system_libs.append("pthread") diff --git a/recipes/libgit2/all/patches/1.0.1-0001-fix-cmake.patch b/recipes/libgit2/all/patches/1.0.1-0001-fix-cmake.patch index 2f0d05b998d5d..3c23186ba4771 100644 --- a/recipes/libgit2/all/patches/1.0.1-0001-fix-cmake.patch +++ b/recipes/libgit2/all/patches/1.0.1-0001-fix-cmake.patch @@ -1,5 +1,19 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 8264158..374a21c 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -11,8 +11,8 @@ + # Install: + # > cmake --build . --target install + +-PROJECT(libgit2 C) + CMAKE_MINIMUM_REQUIRED(VERSION 3.5.1) ++PROJECT(libgit2 C) + CMAKE_POLICY(SET CMP0015 NEW) + IF(POLICY CMP0051) + CMAKE_POLICY(SET CMP0051 NEW) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt -index dff1d94..abd9c45 100644 +index dff1d94..25652b7 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -158,11 +158,11 @@ ENDIF() @@ -31,3 +45,15 @@ index dff1d94..abd9c45 100644 ENDIF() IF (LIBSSH2_FOUND) SET(GIT_SSH 1) +@@ -209,10 +213,7 @@ IF (LIBSSH2_FOUND) + LIST(APPEND LIBGIT2_LIBS ${LIBSSH2_LIBRARIES}) + LIST(APPEND LIBGIT2_PC_LIBS ${LIBSSH2_LDFLAGS}) + +- CHECK_LIBRARY_EXISTS("${LIBSSH2_LIBRARIES}" libssh2_userauth_publickey_frommemory "${LIBSSH2_LIBRARY_DIRS}" HAVE_LIBSSH2_MEMORY_CREDENTIALS) +- IF (HAVE_LIBSSH2_MEMORY_CREDENTIALS) +- SET(GIT_SSH_MEMORY_CREDENTIALS 1) +- ENDIF() ++ SET(GIT_SSH_MEMORY_CREDENTIALS 1) + ELSE() + MESSAGE(STATUS "LIBSSH2 not found. Set CMAKE_PREFIX_PATH if it is installed outside of the default search path.") + ENDIF() diff --git a/recipes/libgit2/all/patches/1.1.1-0001-fix-cmake.patch b/recipes/libgit2/all/patches/1.1.1-0001-fix-cmake.patch index 5dc56b1a31b92..3abde1ad5528a 100644 --- a/recipes/libgit2/all/patches/1.1.1-0001-fix-cmake.patch +++ b/recipes/libgit2/all/patches/1.1.1-0001-fix-cmake.patch @@ -1,5 +1,5 @@ diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt -index d01cc64..0941cbd 100644 +index d01cc64..5691f7e 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -167,11 +167,11 @@ ENDIF() @@ -31,3 +31,15 @@ index d01cc64..0941cbd 100644 ENDIF() IF (LIBSSH2_FOUND) SET(GIT_SSH 1) +@@ -218,10 +222,7 @@ IF (LIBSSH2_FOUND) + LIST(APPEND LIBGIT2_LIBS ${LIBSSH2_LIBRARIES}) + LIST(APPEND LIBGIT2_PC_LIBS ${LIBSSH2_LDFLAGS}) + +- CHECK_LIBRARY_EXISTS("${LIBSSH2_LIBRARIES}" libssh2_userauth_publickey_frommemory "${LIBSSH2_LIBRARY_DIRS}" HAVE_LIBSSH2_MEMORY_CREDENTIALS) +- IF (HAVE_LIBSSH2_MEMORY_CREDENTIALS) +- SET(GIT_SSH_MEMORY_CREDENTIALS 1) +- ENDIF() ++ SET(GIT_SSH_MEMORY_CREDENTIALS 1) + ELSE() + MESSAGE(STATUS "LIBSSH2 not found. Set CMAKE_PREFIX_PATH if it is installed outside of the default search path.") + ENDIF() diff --git a/recipes/libgit2/all/patches/1.2.0-0001-fix-cmake.patch b/recipes/libgit2/all/patches/1.2.0-0001-fix-cmake.patch index 0fbbd568d7b10..950bd6ff11e0a 100644 --- a/recipes/libgit2/all/patches/1.2.0-0001-fix-cmake.patch +++ b/recipes/libgit2/all/patches/1.2.0-0001-fix-cmake.patch @@ -1,5 +1,5 @@ diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt -index 45dec27..783c657 100644 +index 45dec27..d7652f7 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -178,11 +178,11 @@ ENDIF() @@ -31,3 +31,15 @@ index 45dec27..783c657 100644 ENDIF() IF (LIBSSH2_FOUND) SET(GIT_SSH 1) +@@ -239,10 +243,7 @@ IF (LIBSSH2_FOUND) + LIST(APPEND LIBGIT2_LIBS ${LIBSSH2_LIBRARIES}) + LIST(APPEND LIBGIT2_PC_LIBS ${LIBSSH2_LDFLAGS}) + +- CHECK_LIBRARY_EXISTS("${LIBSSH2_LIBRARIES}" libssh2_userauth_publickey_frommemory "${LIBSSH2_LIBRARY_DIRS}" HAVE_LIBSSH2_MEMORY_CREDENTIALS) +- IF (HAVE_LIBSSH2_MEMORY_CREDENTIALS) +- SET(GIT_SSH_MEMORY_CREDENTIALS 1) +- ENDIF() ++ SET(GIT_SSH_MEMORY_CREDENTIALS 1) + ELSE() + MESSAGE(STATUS "LIBSSH2 not found. Set CMAKE_PREFIX_PATH if it is installed outside of the default search path.") + ENDIF() diff --git a/recipes/libgit2/all/patches/1.3.0-0001-fix-cmake.patch b/recipes/libgit2/all/patches/1.3.0-0001-fix-cmake.patch index 997b6dd7759b0..34d77da78eff1 100644 --- a/recipes/libgit2/all/patches/1.3.0-0001-fix-cmake.patch +++ b/recipes/libgit2/all/patches/1.3.0-0001-fix-cmake.patch @@ -1,5 +1,5 @@ diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt -index fdb3673..783c657 100644 +index fdb3673..d7652f7 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -178,11 +178,11 @@ ENDIF() @@ -38,3 +38,15 @@ index fdb3673..783c657 100644 ENDIF() IF (LIBSSH2_FOUND) SET(GIT_SSH 1) +@@ -246,10 +243,7 @@ IF (LIBSSH2_FOUND) + LIST(APPEND LIBGIT2_LIBS ${LIBSSH2_LIBRARIES}) + LIST(APPEND LIBGIT2_PC_LIBS ${LIBSSH2_LDFLAGS}) + +- CHECK_LIBRARY_EXISTS("${LIBSSH2_LIBRARIES}" libssh2_userauth_publickey_frommemory "${LIBSSH2_LIBRARY_DIRS}" HAVE_LIBSSH2_MEMORY_CREDENTIALS) +- IF (HAVE_LIBSSH2_MEMORY_CREDENTIALS) +- SET(GIT_SSH_MEMORY_CREDENTIALS 1) +- ENDIF() ++ SET(GIT_SSH_MEMORY_CREDENTIALS 1) + ELSE() + MESSAGE(STATUS "LIBSSH2 not found. Set CMAKE_PREFIX_PATH if it is installed outside of the default search path.") + ENDIF() diff --git a/recipes/libgit2/all/patches/1.4.3-0001-fix-cmake.patch b/recipes/libgit2/all/patches/1.4.3-0001-fix-cmake.patch index 459414c1a9584..66a17f3f7e869 100644 --- a/recipes/libgit2/all/patches/1.4.3-0001-fix-cmake.patch +++ b/recipes/libgit2/all/patches/1.4.3-0001-fix-cmake.patch @@ -18,7 +18,7 @@ index 955aea3..ff94eb8 100644 add_feature_info(http-parser ON "http-parser support (system)") else() diff --git a/cmake/SelectSSH.cmake b/cmake/SelectSSH.cmake -index 23dfc97..a094cc7 100644 +index 23dfc97..386f184 100644 --- a/cmake/SelectSSH.cmake +++ b/cmake/SelectSSH.cmake @@ -1,13 +1,10 @@ @@ -40,3 +40,15 @@ index 23dfc97..a094cc7 100644 if(NOT LIBSSH2_FOUND) message(FATAL_ERROR "LIBSSH2 not found. Set CMAKE_PREFIX_PATH if it is installed outside of the default search path.") +@@ -20,10 +17,7 @@ if(LIBSSH2_FOUND) + list(APPEND LIBGIT2_SYSTEM_LIBS ${LIBSSH2_LIBRARIES}) + list(APPEND LIBGIT2_PC_LIBS ${LIBSSH2_LDFLAGS}) + +- check_library_exists("${LIBSSH2_LIBRARIES}" libssh2_userauth_publickey_frommemory "${LIBSSH2_LIBRARY_DIRS}" HAVE_LIBSSH2_MEMORY_CREDENTIALS) +- if(HAVE_LIBSSH2_MEMORY_CREDENTIALS) +- set(GIT_SSH_MEMORY_CREDENTIALS 1) +- endif() ++ set(GIT_SSH_MEMORY_CREDENTIALS 1) + else() + message(STATUS "LIBSSH2 not found. Set CMAKE_PREFIX_PATH if it is installed outside of the default search path.") + endif() diff --git a/recipes/libgit2/all/patches/1.7.2-0001-fix-cmake.patch b/recipes/libgit2/all/patches/1.7.2-0001-fix-cmake.patch new file mode 100644 index 0000000000000..8705249e1247a --- /dev/null +++ b/recipes/libgit2/all/patches/1.7.2-0001-fix-cmake.patch @@ -0,0 +1,70 @@ +diff --git a/cmake/SelectHTTPParser.cmake b/cmake/SelectHTTPParser.cmake +index 955aea3..ff94eb8 100644 +--- a/cmake/SelectHTTPParser.cmake ++++ b/cmake/SelectHTTPParser.cmake +@@ -1,10 +1,10 @@ + # Optional external dependency: http-parser + if(USE_HTTP_PARSER STREQUAL "system") +- find_package(HTTPParser) ++ find_package(http_parser) + +- if(HTTP_PARSER_FOUND AND HTTP_PARSER_VERSION_MAJOR EQUAL 2) +- list(APPEND LIBGIT2_SYSTEM_INCLUDES ${HTTP_PARSER_INCLUDE_DIRS}) +- list(APPEND LIBGIT2_SYSTEM_LIBS ${HTTP_PARSER_LIBRARIES}) ++ if(http_parser_FOUND) ++ list(APPEND LIBGIT2_SYSTEM_INCLUDES ${http_parser_INCLUDE_DIRS}) ++ list(APPEND LIBGIT2_SYSTEM_LIBS ${http_parser_LIBRARIES}) + list(APPEND LIBGIT2_PC_LIBS "-lhttp_parser") + add_feature_info(http-parser ON "http-parser support (system)") + else() +diff --git a/cmake/SelectHTTPSBackend.cmake b/cmake/SelectHTTPSBackend.cmake +index d149416..33473ee 100644 +--- a/cmake/SelectHTTPSBackend.cmake ++++ b/cmake/SelectHTTPSBackend.cmake +@@ -9,6 +9,11 @@ if(CMAKE_SYSTEM_NAME MATCHES "Darwin") + endif() + + if(USE_HTTPS) ++ if(WIN32) ++ list(APPEND LIBGIT2_SYSTEM_LIBS "secur32") ++ list(APPEND LIBGIT2_PC_LIBS "-lsecur32") ++ endif() ++ + # Auto-select TLS backend + sanitizebool(USE_HTTPS) + if(USE_HTTPS STREQUAL ON) +diff --git a/cmake/SelectSSH.cmake b/cmake/SelectSSH.cmake +index 23dfc97..386f184 100644 +--- a/cmake/SelectSSH.cmake ++++ b/cmake/SelectSSH.cmake +@@ -1,13 +1,10 @@ + # Optional external dependency: libssh2 + if(USE_SSH) +- find_pkglibraries(LIBSSH2 libssh2) +- if(NOT LIBSSH2_FOUND) +- find_package(LibSSH2) +- set(LIBSSH2_INCLUDE_DIRS ${LIBSSH2_INCLUDE_DIR}) +- get_filename_component(LIBSSH2_LIBRARY_DIRS "${LIBSSH2_LIBRARY}" DIRECTORY) +- set(LIBSSH2_LIBRARIES ${LIBSSH2_LIBRARY}) +- set(LIBSSH2_LDFLAGS "-lssh2") +- endif() ++ FIND_PACKAGE(Libssh2 REQUIRED) ++ SET(LIBSSH2_FOUND ON) ++ SET(LIBSSH2_INCLUDE_DIRS ${Libssh2_INCLUDE_DIRS}) ++ SET(LIBSSH2_LIBRARIES ${Libssh2_LIBRARIES}) ++ SET(LIBSSH2_LIBRARY_DIRS ${Libssh2_LIB_DIRS}) + + if(NOT LIBSSH2_FOUND) + message(FATAL_ERROR "LIBSSH2 not found. Set CMAKE_PREFIX_PATH if it is installed outside of the default search path.") +@@ -20,10 +17,7 @@ if(LIBSSH2_FOUND) + list(APPEND LIBGIT2_SYSTEM_LIBS ${LIBSSH2_LIBRARIES}) + list(APPEND LIBGIT2_PC_LIBS ${LIBSSH2_LDFLAGS}) + +- check_library_exists("${LIBSSH2_LIBRARIES}" libssh2_userauth_publickey_frommemory "${LIBSSH2_LIBRARY_DIRS}" HAVE_LIBSSH2_MEMORY_CREDENTIALS) +- if(HAVE_LIBSSH2_MEMORY_CREDENTIALS) +- set(GIT_SSH_MEMORY_CREDENTIALS 1) +- endif() ++ set(GIT_SSH_MEMORY_CREDENTIALS 1) + else() + message(STATUS "LIBSSH2 not found. Set CMAKE_PREFIX_PATH if it is installed outside of the default search path.") + endif() diff --git a/recipes/libgit2/all/patches/1.8.1-0001-fix-cmake.patch b/recipes/libgit2/all/patches/1.8.1-0001-fix-cmake.patch new file mode 100644 index 0000000000000..7515a48158c94 --- /dev/null +++ b/recipes/libgit2/all/patches/1.8.1-0001-fix-cmake.patch @@ -0,0 +1,72 @@ +diff --git a/cmake/SelectHTTPParser.cmake b/cmake/SelectHTTPParser.cmake +index 4fc1f69..1e8d83e 100644 +--- a/cmake/SelectHTTPParser.cmake ++++ b/cmake/SelectHTTPParser.cmake +@@ -1,10 +1,10 @@ + # Optional external dependency: http-parser + if(USE_HTTP_PARSER STREQUAL "http-parser") +- find_package(HTTPParser) ++ find_package(http_parser) + +- if(HTTP_PARSER_FOUND AND HTTP_PARSER_VERSION_MAJOR EQUAL 2) +- list(APPEND LIBGIT2_SYSTEM_INCLUDES ${HTTP_PARSER_INCLUDE_DIRS}) +- list(APPEND LIBGIT2_SYSTEM_LIBS ${HTTP_PARSER_LIBRARIES}) ++ if(http_parser_FOUND) ++ list(APPEND LIBGIT2_SYSTEM_INCLUDES ${http_parser_INCLUDE_DIRS}) ++ list(APPEND LIBGIT2_SYSTEM_LIBS ${http_parser_LIBRARIES}) + list(APPEND LIBGIT2_PC_LIBS "-lhttp_parser") + set(GIT_HTTPPARSER_HTTPPARSER 1) + add_feature_info(http-parser ON "using http-parser (system)") +diff --git a/cmake/SelectHTTPSBackend.cmake b/cmake/SelectHTTPSBackend.cmake +index d293001..acffba9 100644 +--- a/cmake/SelectHTTPSBackend.cmake ++++ b/cmake/SelectHTTPSBackend.cmake +@@ -9,6 +9,11 @@ if(CMAKE_SYSTEM_NAME MATCHES "Darwin") + endif() + + if(USE_HTTPS) ++ if(WIN32) ++ list(APPEND LIBGIT2_SYSTEM_LIBS "secur32") ++ list(APPEND LIBGIT2_PC_LIBS "-lsecur32") ++ endif() ++ + # Auto-select TLS backend + sanitizebool(USE_HTTPS) + if(USE_HTTPS STREQUAL ON) +diff --git a/cmake/SelectSSH.cmake b/cmake/SelectSSH.cmake +index 079857f..652b310 100644 +--- a/cmake/SelectSSH.cmake ++++ b/cmake/SelectSSH.cmake +@@ -4,15 +4,11 @@ if(USE_SSH STREQUAL "exec") + + add_feature_info(SSH ON "using OpenSSH exec support") + elseif(USE_SSH STREQUAL ON OR USE_SSH STREQUAL "libssh2") +- find_pkglibraries(LIBSSH2 libssh2) +- +- if(NOT LIBSSH2_FOUND) +- find_package(LibSSH2) +- set(LIBSSH2_INCLUDE_DIRS ${LIBSSH2_INCLUDE_DIR}) +- get_filename_component(LIBSSH2_LIBRARY_DIRS "${LIBSSH2_LIBRARY}" DIRECTORY) +- set(LIBSSH2_LIBRARIES ${LIBSSH2_LIBRARY}) +- set(LIBSSH2_LDFLAGS "-lssh2") +- endif() ++ FIND_PACKAGE(Libssh2 REQUIRED) ++ SET(LIBSSH2_FOUND ON) ++ SET(LIBSSH2_INCLUDE_DIRS ${Libssh2_INCLUDE_DIRS}) ++ SET(LIBSSH2_LIBRARIES ${Libssh2_LIBRARIES}) ++ SET(LIBSSH2_LIBRARY_DIRS ${Libssh2_LIB_DIRS}) + + if(NOT LIBSSH2_FOUND) + message(FATAL_ERROR "LIBSSH2 not found. Set CMAKE_PREFIX_PATH if it is installed outside of the default search path.") +@@ -22,10 +18,7 @@ elseif(USE_SSH STREQUAL ON OR USE_SSH STREQUAL "libssh2") + list(APPEND LIBGIT2_SYSTEM_LIBS ${LIBSSH2_LIBRARIES}) + list(APPEND LIBGIT2_PC_LIBS ${LIBSSH2_LDFLAGS}) + +- check_library_exists("${LIBSSH2_LIBRARIES}" libssh2_userauth_publickey_frommemory "${LIBSSH2_LIBRARY_DIRS}" HAVE_LIBSSH2_MEMORY_CREDENTIALS) +- if(HAVE_LIBSSH2_MEMORY_CREDENTIALS) +- set(GIT_SSH_LIBSSH2_MEMORY_CREDENTIALS 1) +- endif() ++ set(GIT_SSH_MEMORY_CREDENTIALS 1) + + if(WIN32 AND EMBED_SSH_PATH) + file(GLOB SSH_SRC "${EMBED_SSH_PATH}/src/*.c") diff --git a/recipes/libgit2/all/test_package/CMakeLists.txt b/recipes/libgit2/all/test_package/CMakeLists.txt index 912bdc647f324..b2c8aa0ca7f27 100644 --- a/recipes/libgit2/all/test_package/CMakeLists.txt +++ b/recipes/libgit2/all/test_package/CMakeLists.txt @@ -1,10 +1,7 @@ cmake_minimum_required(VERSION 3.1) -project(test_package C) - -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) +project(test_package LANGUAGES C) find_package(libgit2 REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.c) -target_link_libraries(${PROJECT_NAME} libgit2::libgit2) +target_link_libraries(${PROJECT_NAME} PRIVATE libgit2::libgit2) diff --git a/recipes/libgit2/all/test_package/conanfile.py b/recipes/libgit2/all/test_package/conanfile.py index 38f4483872d47..ef5d7042163ec 100644 --- a/recipes/libgit2/all/test_package/conanfile.py +++ b/recipes/libgit2/all/test_package/conanfile.py @@ -1,10 +1,19 @@ -from conans import ConanFile, CMake, tools +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake import os class TestPackageConan(ConanFile): settings = "os", "arch", "compiler", "build_type" - generators = "cmake", "cmake_find_package_multi" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) def build(self): cmake = CMake(self) @@ -12,6 +21,6 @@ def build(self): cmake.build() def test(self): - if not tools.cross_building(self): - bin_path = os.path.join("bin", "test_package") - self.run(bin_path, run_environment=True) + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/libgit2/config.yml b/recipes/libgit2/config.yml index c472349adb3cc..1a78cc1abe633 100644 --- a/recipes/libgit2/config.yml +++ b/recipes/libgit2/config.yml @@ -1,4 +1,14 @@ versions: + "1.8.4": + folder: "all" + "1.8.3": + folder: "all" + "1.8.2": + folder: "all" + "1.8.1": + folder: "all" + "1.7.2": + folder: "all" "1.5.0": folder: "all" "1.4.3": @@ -11,7 +21,3 @@ versions: folder: "all" "1.0.1": folder: "all" - "0.28.5": - folder: "0.28.x" - "0.27.10": - folder: "0.27.x" diff --git a/recipes/libglvnd/all/conanfile.py b/recipes/libglvnd/all/conanfile.py index 2362f8db4e5aa..422acffdcd2c7 100644 --- a/recipes/libglvnd/all/conanfile.py +++ b/recipes/libglvnd/all/conanfile.py @@ -8,7 +8,7 @@ import os import textwrap -required_conan_version = ">=1.50.0" +required_conan_version = ">=1.64.0 <2 || >=2.2.0" class LibGlvndConan(ConanFile): name = "libglvnd" @@ -59,7 +59,7 @@ def validate(self): raise ConanInvalidConfiguration(f"{self.name} is only compatible with Linux and FreeBSD") def build_requirements(self): - self.tool_requires("meson/1.3.2") + self.tool_requires("meson/1.4.0") if not self.conf.get("tools.gnu:pkg_config", default=False, check_type=str): self.tool_requires("pkgconf/2.1.0") @@ -87,6 +87,10 @@ def generate(self): tc.project_options["headers"] = self.options.headers tc.project_options["entrypoint-patching"] = "enabled" if self.options.entrypoint_patching else "disabled" tc.project_options["libdir"] = "lib" + # Configure the data directory so that it defaults to the correct location for ICD discovery on the local system. + tc.project_options["datadir"] = os.path.join("usr", "share") if self.settings.os == "Linux" else os.path.join("usr", "local", "share") + if self.settings.os == "FreeBSD": + tc.project_options["sysconfdir"] = os.path.join("usr", "local", "etc") tc.generate() def build(self): diff --git a/recipes/libgphoto2/all/conandata.yml b/recipes/libgphoto2/all/conandata.yml index 8bad48c781d69..aa37e732ae2d3 100644 --- a/recipes/libgphoto2/all/conandata.yml +++ b/recipes/libgphoto2/all/conandata.yml @@ -6,7 +6,5 @@ sources: url: "https://github.com/gphoto/libgphoto2/releases/download/v2.5.27/libgphoto2-2.5.27.tar.xz" sha256: "a7253bd18c6ef65352150ac36a668f883a5ad2634eb6455b3ca9aa6ac98d0073" patches: - "2.5.31": - - patch_file: "patches/2.5.27-0001-macos_snprintf.patch" "2.5.27": - patch_file: "patches/2.5.27-0001-macos_snprintf.patch" diff --git a/recipes/libgphoto2/all/conanfile.py b/recipes/libgphoto2/all/conanfile.py index 42df92be12821..f6d84c552b0a4 100644 --- a/recipes/libgphoto2/all/conanfile.py +++ b/recipes/libgphoto2/all/conanfile.py @@ -57,7 +57,7 @@ def requirements(self): if self.options.with_libcurl: self.requires("libcurl/[>=7.78.0 <9]") if self.options.with_libxml2: - self.requires("libxml2/2.12.3") + self.requires("libxml2/[>=2.12.5 <3]") if self.options.with_libexif: self.requires("libexif/0.6.24") if self.options.with_libjpeg: @@ -69,7 +69,7 @@ def validate(self): def build_requirements(self): if not self.conf.get("tools.gnu:pkg_config", check_type=str): - self.tool_requires("pkgconf/2.1.0") + self.tool_requires("pkgconf/[>=2.2 <3]") if self._settings_build.os == "Windows": self.win_bash = True if not self.conf.get("tools.microsoft.bash:path", check_type=str): diff --git a/recipes/libheif/all/conandata.yml b/recipes/libheif/all/conandata.yml index e7a2fc9ba8c25..dcb36f523596c 100644 --- a/recipes/libheif/all/conandata.yml +++ b/recipes/libheif/all/conandata.yml @@ -1,4 +1,13 @@ sources: + "1.19.0": + url: "https://github.com/strukturag/libheif/releases/download/v1.19.0/libheif-1.19.0.tar.gz" + sha256: "c0323638557994791c7bf939ee9752e8a0f3f5ce4f07328daefa0159e3530eb4" + "1.18.2": + url: "https://github.com/strukturag/libheif/releases/download/v1.18.2/libheif-1.18.2.tar.gz" + sha256: "c4002a622bec9f519f29d84bfdc6024e33fd67953a5fb4dc2c2f11f67d5e45bf" + "1.18.1": + url: "https://github.com/strukturag/libheif/releases/download/v1.18.1/libheif-1.18.1.tar.gz" + sha256: "8702564b0f288707ea72b260b3bf4ba9bf7abfa7dac01353def3a86acd6bbb76" "1.16.2": url: "https://github.com/strukturag/libheif/releases/download/v1.16.2/libheif-1.16.2.tar.gz" sha256: "7f97e4205c0bd9f9b8560536c8bd2e841d1c9a6d610401eb3eb87ed9cdfe78ea" @@ -15,6 +24,8 @@ sources: url: "https://github.com/strukturag/libheif/releases/download/v1.9.1/libheif-1.9.1.tar.gz" sha256: "5f65ca2bd2510eed4e13bdca123131c64067e9dd809213d7aef4dc5e37948bca" patches: + "1.18.1": + - patch_file: "patches/0001-cmake_1.18.1.patch" "1.16.2": - patch_file: "patches/0001-cmake_1.16.2.patch" - patch_file: "patches/0002-plugins_cmake_1.16.2.patch" diff --git a/recipes/libheif/all/conanfile.py b/recipes/libheif/all/conanfile.py index 912d662dba19e..03ba06e99d6ae 100644 --- a/recipes/libheif/all/conanfile.py +++ b/recipes/libheif/all/conanfile.py @@ -1,20 +1,21 @@ from conan import ConanFile +from conan.errors import ConanInvalidConfiguration from conan.tools.build import check_min_cppstd, stdcpp_library from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rmdir +from conan.tools.scm import Version import os -required_conan_version = ">=1.54.0" +required_conan_version = ">=2.1" class LibheifConan(ConanFile): name = "libheif" description = "libheif is an HEIF and AVIF file format decoder and encoder." - topics = ("heif", "codec", "video") + license = ("LGPL-3.0-only", "GPL-3.0-or-later", "MIT") url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/strukturag/libheif" - license = ("LGPL-3.0-only", "GPL-3.0-or-later", "MIT") - + topics = ("heif", "codec", "video") package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { @@ -24,6 +25,10 @@ class LibheifConan(ConanFile): "with_x265": [True, False], "with_libaomav1": [True, False], "with_dav1d": [True, False], + "with_jpeg": [True, False], + "with_openjpeg": [True, False], + "with_openjph": [True, False], + "with_openh264": [True, False], } default_options = { "shared": False, @@ -32,14 +37,29 @@ class LibheifConan(ConanFile): "with_x265": False, "with_libaomav1": False, "with_dav1d": False, + "with_jpeg": False, + "with_openjpeg": False, + "with_openjph": False, + "with_openh264": False, } + @property + def _min_cppstd(self): + return "20" if Version(self.version) >= "1.19.0" else "11" + def export_sources(self): export_conandata_patches(self) def config_options(self): if self.settings.os == "Windows": del self.options.fPIC + if Version(self.version) < "1.17.0": + del self.options.with_jpeg + del self.options.with_openjpeg + if Version(self.version) < "1.18.0": + del self.options.with_openjph + if Version(self.version) < "1.19.0": + del self.options.with_openh264 def configure(self): if self.options.shared: @@ -57,29 +77,58 @@ def requirements(self): self.requires("libaom-av1/3.6.1") if self.options.with_dav1d: self.requires("dav1d/1.2.1") + if self.options.get_safe("with_jpeg"): + self.requires("libjpeg/9f") + if self.options.get_safe("with_openjpeg"): + self.requires("openjpeg/2.5.2") + if self.options.get_safe("with_openjph"): + self.requires("openjph/0.16.0", transitive_headers=False) + if self.options.get_safe("with_openh264"): + self.requires("openh264/2.4.1") def validate(self): - if self.settings.compiler.get_safe("cppstd"): - check_min_cppstd(self, 11) + check_min_cppstd(self, self._min_cppstd) + + def build_requirements(self): + if Version(self.version) >= "1.18.0": + self.tool_requires("cmake/[>=3.16 <4]") def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) + apply_conandata_patches(self) def generate(self): tc = CMakeToolchain(self) + tc.variables["WITH_LIBSHARPYUV"] = False tc.variables["WITH_LIBDE265"] = self.options.with_libde265 tc.variables["WITH_X265"] = self.options.with_x265 tc.variables["WITH_AOM"] = self.options.with_libaomav1 + tc.variables["WITH_AOM_DECODER"] = self.options.with_libaomav1 + tc.variables["WITH_AOM_ENCODER"] = self.options.with_libaomav1 tc.variables["WITH_RAV1E"] = False tc.variables["WITH_DAV1D"] = self.options.with_dav1d tc.variables["WITH_EXAMPLES"] = False tc.variables["WITH_GDK_PIXBUF"] = False + tc.variables["BUILD_TESTING"] = False + tc.variables["WITH_JPEG_DECODER"] = self.options.get_safe("with_jpeg", False) + tc.variables["WITH_JPEG_ENCODER"] = self.options.get_safe("with_jpeg", False) + tc.variables["WITH_OpenJPEG_DECODER"] = self.options.get_safe("with_openjpeg", False) + tc.variables["WITH_OpenJPEG_ENCODER"] = self.options.get_safe("with_openjpeg", False) + tc.variables["WITH_OPENJPH_ENCODER"] = self.options.get_safe("with_openjph", False) + tc.variables["WITH_OPENH264_DECODER"] = self.options.get_safe("with_openh264", False) + # Disable finding possible Doxygen in system, so no docs are built + tc.variables["CMAKE_DISABLE_FIND_PACKAGE_Doxygen"] = True + tc.cache_variables["CMAKE_COMPILE_WARNING_AS_ERROR"] = False tc.generate() deps = CMakeDeps(self) + if Version(self.version) >= "1.18.0": + deps.set_property("libde265", "cmake_file_name", "LIBDE265") + deps.set_property("openjph", "cmake_file_name", "OPENJPH") + if Version(self.version) >= "1.19.0": + deps.set_property("openh264", "cmake_file_name", "OpenH264") deps.generate() def build(self): - apply_conandata_patches(self) cmake = CMake(self) cmake.configure() cmake.build() @@ -95,26 +144,32 @@ def package_info(self): self.cpp_info.set_property("cmake_file_name", "libheif") self.cpp_info.set_property("cmake_target_name", "libheif::heif") self.cpp_info.set_property("pkg_config_name", "libheif") - # TODO: back to global scope in conan v2 once cmake_find_package_* generators removed - self.cpp_info.components["heif"].libs = ["heif"] + self.cpp_info.libs = ["heif"] + if not self.options.shared: - self.cpp_info.components["heif"].defines = ["LIBHEIF_STATIC_BUILD"] + self.cpp_info.defines = ["LIBHEIF_STATIC_BUILD"] if self.settings.os in ["Linux", "FreeBSD"]: - self.cpp_info.components["heif"].system_libs.extend(["m", "pthread"]) + self.cpp_info.system_libs.extend(["m", "pthread"]) + if Version(self.version) >= "1.18.0": + self.cpp_info.system_libs.append("dl") if not self.options.shared: libcxx = stdcpp_library(self) if libcxx: - self.cpp_info.components["heif"].system_libs.append(libcxx) + self.cpp_info.system_libs.append(libcxx) - # TODO: to remove in conan v2 once cmake_find_package_* generators removed - self.cpp_info.components["heif"].set_property("cmake_target_name", "libheif::heif") - self.cpp_info.components["heif"].set_property("pkg_config_name", "libheif") - self.cpp_info.components["heif"].requires = [] if self.options.with_libde265: - self.cpp_info.components["heif"].requires.append("libde265::libde265") + self.cpp_info.requires.append("libde265::libde265") if self.options.with_x265: - self.cpp_info.components["heif"].requires.append("libx265::libx265") + self.cpp_info.requires.append("libx265::libx265") if self.options.with_libaomav1: - self.cpp_info.components["heif"].requires.append("libaom-av1::libaom-av1") + self.cpp_info.requires.append("libaom-av1::libaom-av1") if self.options.with_dav1d: - self.cpp_info.components["heif"].requires.append("dav1d::dav1d") + self.cpp_info.requires.append("dav1d::dav1d") + if self.options.get_safe("with_jpeg"): + self.cpp_info.requires.append("libjpeg::libjpeg") + if self.options.get_safe("with_openjpeg"): + self.cpp_info.requires.append("openjpeg::openjpeg") + if self.options.get_safe("with_openjph"): + self.cpp_info.requires.append("openjph::openjph") + if self.options.get_safe("with_openh264"): + self.cpp_info.requires.append("openh264::openh264") diff --git a/recipes/libheif/all/patches/0001-cmake_1.18.1.patch b/recipes/libheif/all/patches/0001-cmake_1.18.1.patch new file mode 100644 index 0000000000000..271d7b71513e3 --- /dev/null +++ b/recipes/libheif/all/patches/0001-cmake_1.18.1.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 12c4039..2ea1805 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -47,7 +47,7 @@ set(CMAKE_CXX_EXTENSIONS OFF) + + set(CMAKE_VISIBILITY_INLINES_HIDDEN 1) + +-set(CMAKE_POSITION_INDEPENDENT_CODE ON) ++# set(CMAKE_POSITION_INDEPENDENT_CODE ON) + + # Create the compile command database for clang by default + set(CMAKE_EXPORT_COMPILE_COMMANDS ON) diff --git a/recipes/libheif/all/test_package/CMakeLists.txt b/recipes/libheif/all/test_package/CMakeLists.txt index 13ebf8fab7134..f87ac8ae49013 100644 --- a/recipes/libheif/all/test_package/CMakeLists.txt +++ b/recipes/libheif/all/test_package/CMakeLists.txt @@ -5,4 +5,8 @@ find_package(libheif REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) target_link_libraries(${PROJECT_NAME} PRIVATE libheif::heif) -target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) +if(libheif_VERSION VERSION_GREATER_EQUAL "1.19.0") + target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_20) +else() + target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) +endif() diff --git a/recipes/libheif/config.yml b/recipes/libheif/config.yml index 887a8fb56ade3..68663e291c9e4 100644 --- a/recipes/libheif/config.yml +++ b/recipes/libheif/config.yml @@ -1,4 +1,10 @@ versions: + "1.19.0": + folder: all + "1.18.2": + folder: all + "1.18.1": + folder: all "1.16.2": folder: all "1.13.0": diff --git a/recipes/libidn/all/conandata.yml b/recipes/libidn/all/conandata.yml index 8be8baf6f09f3..fcb454914799b 100644 --- a/recipes/libidn/all/conandata.yml +++ b/recipes/libidn/all/conandata.yml @@ -5,4 +5,3 @@ sources: patches: "1.36": - patch_file: "patches/0001-unconditional-system-stdint-h.patch" - base_path: "source_subfolder" diff --git a/recipes/libidn/all/conanfile.py b/recipes/libidn/all/conanfile.py index 49221670d5e8e..2512e8efab52b 100644 --- a/recipes/libidn/all/conanfile.py +++ b/recipes/libidn/all/conanfile.py @@ -1,13 +1,14 @@ -from conan import ConanFile -from conan.errors import ConanInvalidConfiguration -from conan.tools.files import get, rmdir -from conan.tools.scm import Version -from conans import AutoToolsBuildEnvironment, tools -import contextlib -import functools import os -required_conan_version = ">=1.33.0" +from conan import ConanFile +from conan.tools.build import cross_building +from conan.tools.env import VirtualBuildEnv, VirtualRunEnv, Environment +from conan.tools.files import get, rmdir, export_conandata_patches, apply_conandata_patches, copy, replace_in_file, rm, save +from conan.tools.gnu import AutotoolsToolchain, Autotools, AutotoolsDeps +from conan.tools.layout import basic_layout +from conan.tools.microsoft import unix_path, is_msvc + +required_conan_version = ">=1.53.0" class LibIdnConan(ConanFile): @@ -17,6 +18,8 @@ class LibIdnConan(ConanFile): topics = ("libidn", "encode", "decode", "internationalized", "domain", "name") license = "GPL-3.0-or-later" url = "https://github.com/conan-io/conan-center-index" + + package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], @@ -29,17 +32,12 @@ class LibIdnConan(ConanFile): "threads": True, } - @property - def _source_subfolder(self): - return "source_subfolder" - @property def _settings_build(self): return getattr(self, "settings_build", self.settings) def export_sources(self): - for patch in self.conan_data.get("patches", {}).get(self.version, []): - self.copy(patch["patch_file"]) + export_conandata_patches(self) def config_options(self): if self.settings.os == "Windows": @@ -47,91 +45,120 @@ def config_options(self): def configure(self): if self.options.shared: - del self.options.fPIC - del self.settings.compiler.libcxx - del self.settings.compiler.cppstd + self.options.rm_safe("fPIC") + self.settings.rm_safe("compiler.libcxx") + self.settings.rm_safe("compiler.cppstd") + + def layout(self): + basic_layout(self, src_folder="src") def requirements(self): self.requires("libiconv/1.17") - def validate(self): - if self.settings.os == "Windows" and self.options.shared: - raise ConanInvalidConfiguration("Shared libraries are not supported on Windows due to libtool limitation") - def build_requirements(self): - if self._settings_build.os == "Windows" and not tools.get_env("CONAN_BASH_PATH"): - self.build_requires("msys2/cci.latest") - if self.settings.compiler == "Visual Studio": - self.build_requires("automake/1.16.5") + if self._settings_build.os == "Windows": + self.win_bash = True + if not self.conf.get("tools.microsoft.bash:path", check_type=str): + self.tool_requires("msys2/cci.latest") + if is_msvc(self): + self.tool_requires("automake/1.16.5") def source(self): - get(self, **self.conan_data["sources"][self.version], - destination=self._source_subfolder, strip_root=True) - - @contextlib.contextmanager - def _build_context(self): - if self.settings.compiler == "Visual Studio": - with tools.vcvars(self): - env = { - "CC": "{} cl -nologo".format(tools.unix_path(self.deps_user_info["automake"].compile)), - "CXX": "{} cl -nologo".format(tools.unix_path(self.deps_user_info["automake"].compile)), - "LD": "{} link -nologo".format(tools.unix_path(self.deps_user_info["automake"].compile)), - "AR": "{} lib".format(tools.unix_path(self.deps_user_info["automake"].ar_lib)), - } - with tools.environment_append(env): - yield - else: - yield + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + env = VirtualBuildEnv(self) + env.generate() + + if not cross_building(self): + env = VirtualRunEnv(self) + env.generate(scope="build") - @functools.lru_cache(1) - def _configure_autotools(self): - autotools = AutoToolsBuildEnvironment(self, win_bash=tools.os_info.is_windows) - autotools.libs = [] + tc = AutotoolsToolchain(self) if not self.options.shared: - autotools.defines.append("LIBIDN_STATIC") - if self.settings.compiler == "Visual Studio": - if Version(self.settings.compiler.version) >= "12": - autotools.flags.append("-FS") - autotools.link_flags.extend("-L{}".format(p.replace("\\", "/")) for p in self.deps_cpp_info.lib_paths) + tc.extra_defines.append("LIBIDN_STATIC") yes_no = lambda v: "yes" if v else "no" - conf_args = [ - "--enable-shared={}".format(yes_no(self.options.shared)), - "--enable-static={}".format(yes_no(not self.options.shared)), + tc.configure_args += [ "--enable-threads={}".format(yes_no(self.options.threads)), - "--with-libiconv-prefix={}".format(tools.unix_path(self.deps_cpp_info["libiconv"].rootpath)), + "--with-libiconv-prefix={}".format(unix_path(self, self.dependencies["libiconv"].package_folder)), + "--disable-csharp", "--disable-nls", "--disable-rpath", ] - autotools.configure(args=conf_args, configure_dir=self._source_subfolder) - return autotools - - def build(self): - for patch in self.conan_data.get("patches", {}).get(self.version, []): - tools.patch(**patch) - if self.settings.compiler == "Visual Studio": + if is_msvc(self): + tc.extra_cflags.append("-FS") + tc.extra_cxxflags.append("-FS") + tc.generate() + + if is_msvc(self): + env = Environment() + dep_info = self.dependencies["libiconv"].cpp_info.aggregated_components() + env.append("CPPFLAGS", [f"-I{unix_path(self, p)}" for p in dep_info.includedirs] + [f"-D{d}" for d in dep_info.defines]) + env.append("_LINK_", [lib if lib.endswith(".lib") else f"{lib}.lib" for lib in (dep_info.libs + dep_info.system_libs)]) + env.append("LDFLAGS", [f"-L{unix_path(self, p)}" for p in dep_info.libdirs] + dep_info.sharedlinkflags + dep_info.exelinkflags) + env.append("CFLAGS", dep_info.cflags) + env.vars(self).save_script("conanautotoolsdeps_cl_workaround") + else: + deps = AutotoolsDeps(self) + deps.generate() + + if is_msvc(self): + env = Environment() + automake_conf = self.dependencies.build["automake"].conf_info + compile_wrapper = unix_path(self, automake_conf.get("user.automake:compile-wrapper", check_type=str)) + ar_wrapper = unix_path(self, automake_conf.get("user.automake:lib-wrapper", check_type=str)) + # Workaround for iconv.lib not being found due to linker flag order + libiconv_libdir = unix_path(self, self.dependencies["libiconv"].cpp_info.aggregated_components().libdir) + env.define("CC", f"{compile_wrapper} cl -nologo -L{libiconv_libdir}") + env.define("CXX", f"{compile_wrapper} cl -nologo") + env.define("LD", "link -nologo") + env.define("AR", f'{ar_wrapper} lib') + env.vars(self).save_script("conanbuild_msvc") + + def _patch_sources(self): + apply_conandata_patches(self) + # Disable examples and tests + for subdir in ["examples", "tests", "fuzz", "gltests", os.path.join("lib", "gltests"), "doc"]: + save(self, os.path.join(self.source_folder, subdir, "Makefile.in"), "all:\ninstall:\n") + + if is_msvc(self): if self.settings.arch in ("x86_64", "armv8", "armv8.3"): ssize = "signed long long int" else: ssize = "signed long int" - tools.replace_in_file(os.path.join(self._source_subfolder, "lib", "stringprep.h"), - "ssize_t", ssize) - with self._build_context(): - autotools = self._configure_autotools() - autotools.make(args=["V=1"]) + replace_in_file(self, os.path.join(self.source_folder, "lib", "stringprep.h"), "ssize_t", ssize) - def package(self): - self.copy("COPYING", src=self._source_subfolder, dst="licenses") - with self._build_context(): - autotools = self._configure_autotools() - autotools.install() + if self.settings.os == "Windows": + # Otherwise tries to create a symlink from GNUmakefile to itself, which fails on Windows + replace_in_file(self, os.path.join(self.source_folder, "configure"), + '"$GNUmakefile") CONFIG_LINKS="$CONFIG_LINKS $GNUmakefile:$GNUmakefile" ;;', "") + replace_in_file(self, os.path.join(self.source_folder, "configure"), + 'ac_config_links="$ac_config_links $GNUmakefile:$GNUmakefile"', "") + def build(self): + self._patch_sources() + autotools = Autotools(self) + autotools.configure() + autotools.make() + + def package(self): + copy(self, "COPYING", self.source_folder, os.path.join(self.package_folder, "licenses")) + autotools = Autotools(self) + autotools.install() rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) rmdir(self, os.path.join(self.package_folder, "share")) - tools.remove_files_by_mask(os.path.join(self.package_folder, "lib"), "*.la") + rm(self, "*.la", os.path.join(self.package_folder, "lib"), recursive=True) + + if is_msvc(self) and self.options.shared: + os.rename(os.path.join(self.package_folder, "lib", "idn.dll.lib"), + os.path.join(self.package_folder, "lib", "idn-12.lib")) def package_info(self): - self.cpp_info.libs = ["idn"] - self.cpp_info.names["pkg_config"] = "libidn" + if is_msvc(self) and self.options.shared: + self.cpp_info.libs = ["idn-12"] + else: + self.cpp_info.libs = ["idn"] + self.cpp_info.set_property("pkg_config_name", "libidn") if self.settings.os in ["Linux", "FreeBSD"]: if self.options.threads: self.cpp_info.system_libs = ["pthread"] @@ -139,7 +166,6 @@ def package_info(self): if not self.options.shared: self.cpp_info.defines = ["LIBIDN_STATIC"] + # TODO: to remove in conan v2 bin_path = os.path.join(self.package_folder, "bin") - self.output.info("Appending PATH environment variable: {}".format(bin_path)) self.env_info.PATH.append(bin_path) - diff --git a/recipes/libidn/all/test_package/CMakeLists.txt b/recipes/libidn/all/test_package/CMakeLists.txt index 7b9b613cbb24a..3482998466c6b 100644 --- a/recipes/libidn/all/test_package/CMakeLists.txt +++ b/recipes/libidn/all/test_package/CMakeLists.txt @@ -1,8 +1,7 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.15) project(test_package C) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup() +find_package(libidn REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.c) -target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS}) +target_link_libraries(${PROJECT_NAME} PRIVATE libidn::libidn) diff --git a/recipes/libidn/all/test_package/conanfile.py b/recipes/libidn/all/test_package/conanfile.py index 07c965844de9b..441cef7471a37 100644 --- a/recipes/libidn/all/test_package/conanfile.py +++ b/recipes/libidn/all/test_package/conanfile.py @@ -1,10 +1,20 @@ -from conans import ConanFile, CMake, tools import os +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake + class TestPackageConan(ConanFile): - settings = "os", "compiler", "build_type", "arch" - generators = "cmake" + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str, run=True) + + def layout(self): + cmake_layout(self) def build(self): cmake = CMake(self) @@ -12,8 +22,8 @@ def build(self): cmake.build() def test(self): - if not tools.cross_building(self): - self.run("idn --help", run_environment=True) + if can_run(self): + self.run("idn --help", env="conanrun") - bin_path = os.path.join("bin", "test_package") - self.run(bin_path, run_environment=True) + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/libidn/all/test_v1_package/CMakeLists.txt b/recipes/libidn/all/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..91630d79f4abb --- /dev/null +++ b/recipes/libidn/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/libidn/all/test_v1_package/conanfile.py b/recipes/libidn/all/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..3eaa9f0102538 --- /dev/null +++ b/recipes/libidn/all/test_v1_package/conanfile.py @@ -0,0 +1,19 @@ +from conans import ConanFile, CMake, tools +import os + + +class TestPackageConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake", "cmake_find_package_multi" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if not tools.cross_building(self): + self.run("idn --help", run_environment=True) + + bin_path = os.path.join("bin", "test_package") + self.run(bin_path, run_environment=True) diff --git a/recipes/libidn2/all/conandata.yml b/recipes/libidn2/all/conandata.yml index b710e69645f11..d33653d85c4f6 100644 --- a/recipes/libidn2/all/conandata.yml +++ b/recipes/libidn2/all/conandata.yml @@ -5,4 +5,3 @@ sources: patches: "2.3.0": - patch_file: "patches/0001-no-versioning-of-symbols.patch" - base_path: "source_subfolder" diff --git a/recipes/libidn2/all/conanfile.py b/recipes/libidn2/all/conanfile.py index 0a83958ffe3fd..18257e8db29d2 100644 --- a/recipes/libidn2/all/conanfile.py +++ b/recipes/libidn2/all/conanfile.py @@ -1,18 +1,30 @@ -from conans import AutoToolsBuildEnvironment, ConanFile, tools -from conans.errors import ConanInvalidConfiguration -from contextlib import contextmanager import os -required_conan_version = ">=1.33.0" +from conan import ConanFile +from conan.tools.apple import fix_apple_shared_install_name +from conan.tools.build import cross_building +from conan.tools.env import Environment, VirtualBuildEnv, VirtualRunEnv +from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rmdir +from conan.tools.gnu import Autotools, AutotoolsDeps, AutotoolsToolchain +from conan.tools.layout import basic_layout +from conan.tools.microsoft import is_msvc, unix_path + +required_conan_version = ">=1.53.0" class LibIdn(ConanFile): name = "libidn2" - description = "GNU Libidn is a fully documented implementation of the Stringprep, Punycode and IDNA 2003 specifications." - homepage = "https://www.gnu.org/software/libidn/" - topics = ("libidn", "encode", "decode", "internationalized", "domain", "name") + description = ( + "GNU Libidn is a fully documented implementation of the Stringprep, Punycode and IDNA 2003" + " specifications." + ) license = "GPL-3.0-or-later" url = "https://github.com/conan-io/conan-center-index" + homepage = "https://www.gnu.org/software/libidn/" + topics = ("libidn", "encode", "decode", "internationalized", "domain", "name") + + package_type = "library" + settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], "fPIC": [True, False], @@ -21,17 +33,13 @@ class LibIdn(ConanFile): "shared": False, "fPIC": True, } - settings = "os", "arch", "compiler", "build_type" - - _autotools = None @property - def _source_subfolder(self): - return "source_subfolder" + def _settings_build(self): + return getattr(self, "settings_build", self.settings) def export_sources(self): - for patch in self.conan_data.get("patches", {}).get(self.version, []): - self.copy(patch["patch_file"]) + export_conandata_patches(self) def config_options(self): if self.settings.os == "Windows": @@ -39,93 +47,104 @@ def config_options(self): def configure(self): if self.options.shared: - del self.options.fPIC - del self.settings.compiler.libcxx - del self.settings.compiler.cppstd + self.options.rm_safe("fPIC") + self.settings.rm_safe("compiler.libcxx") + self.settings.rm_safe("compiler.cppstd") - def requirements(self): - self.requires("libiconv/1.16") - - def validate(self): - if self.settings.os == "Windows" and self.options.shared: - raise ConanInvalidConfiguration("Shared libraries are not supported on Windows due to libtool limitation") + def layout(self): + basic_layout(self, src_folder="src") - @property - def _settings_build(self): - return getattr(self, "settings_build", self.settings) + def requirements(self): + self.requires("libiconv/1.17") def build_requirements(self): - if self._settings_build.os == "Windows" and not tools.get_env("CONAN_BASH_PATH"): - self.build_requires("msys2/cci.latest") - if self.settings.compiler == "Visual Studio": - self.build_requires("automake/1.16.4") + if self._settings_build.os == "Windows": + self.win_bash = True + if not self.conf.get("tools.microsoft.bash:path", check_type=str): + self.tool_requires("msys2/cci.latest") + if is_msvc(self): + self.tool_requires("automake/1.16.5") def source(self): - tools.get(**self.conan_data["sources"][self.version], - destination=self._source_subfolder, strip_root=True) - - @contextmanager - def _build_context(self): - if self.settings.compiler == "Visual Studio": - with tools.vcvars(self.settings): - env = { - "CC": "{} cl -nologo".format(tools.unix_path(self.deps_user_info["automake"].compile)), - "CXX": "{} cl -nologo".format(tools.unix_path(self.deps_user_info["automake"].compile)), - "LD": "{} link -nologo".format(tools.unix_path(self.deps_user_info["automake"].compile)), - "AR": "{} lib".format(tools.unix_path(self.deps_user_info["automake"].ar_lib)), - } - with tools.environment_append(env): - yield - else: - yield + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + env = VirtualBuildEnv(self) + env.generate() + + if not cross_building(self): + env = VirtualRunEnv(self) + env.generate(scope="build") - def _configure_autotools(self): - if self._autotools: - return self._autotools - self._autotools = AutoToolsBuildEnvironment(self, win_bash=tools.os_info.is_windows) - self._autotools.libs = [] + tc = AutotoolsToolchain(self) if not self.options.shared: - self._autotools.defines.append("IDN2_STATIC") - if self.settings.compiler == "Visual Studio": - if tools.Version(self.settings.compiler.version) >= "12": - self._autotools.flags.append("-FS") - self._autotools.link_flags.extend("-L{}".format(p.replace("\\", "/")) for p in self.deps_cpp_info.lib_paths) - yes_no = lambda v: "yes" if v else "no" - conf_args = [ - "--enable-shared={}".format(yes_no(self.options.shared)), - "--enable-static={}".format(yes_no(not self.options.shared)), - "--with-libiconv-prefix={}".format(tools.unix_path(self.deps_cpp_info["libiconv"].rootpath)), + tc.extra_defines.append("IDN2_STATIC") + if is_msvc(self): + tc.extra_cflags.append("-FS") + tc.extra_cxxflags.append("-FS") + tc.configure_args += [ + f"--with-libiconv-prefix={unix_path(self, self.dependencies['libiconv'].package_folder)}", "--disable-nls", "--disable-rpath", ] - self._autotools.configure(args=conf_args, configure_dir=self._source_subfolder) - return self._autotools + tc.generate() + + if is_msvc(self): + env = Environment() + dep_info = self.dependencies["libiconv"].cpp_info.aggregated_components() + env.append("CPPFLAGS", [f"-I{unix_path(self, p)}" for p in dep_info.includedirs] + [f"-D{d}" for d in dep_info.defines]) + env.append("_LINK_", [lib if lib.endswith(".lib") else f"{lib}.lib" for lib in (dep_info.libs + dep_info.system_libs)]) + env.append("LDFLAGS", [f"-L{unix_path(self, p)}" for p in dep_info.libdirs] + dep_info.sharedlinkflags + dep_info.exelinkflags) + env.append("CFLAGS", dep_info.cflags) + env.vars(self).save_script("conanautotoolsdeps_cl_workaround") + else: + deps = AutotoolsDeps(self) + deps.generate() + + if is_msvc(self): + env = Environment() + automake_conf = self.dependencies.build["automake"].conf_info + compile_wrapper = unix_path(self, automake_conf.get("user.automake:compile-wrapper", check_type=str)) + ar_wrapper = unix_path(self, automake_conf.get("user.automake:lib-wrapper", check_type=str)) + dumpbin_nm = unix_path(self, os.path.join(self.source_folder, "dumpbin_nm.py")) + env.define("CC", f"{compile_wrapper} cl -nologo") + env.define("CXX", f"{compile_wrapper} cl -nologo") + env.define("LD", "link -nologo") + env.define("AR", f'{ar_wrapper} lib') + env.vars(self).save_script("conanbuild_msvc") def build(self): - for patch in self.conan_data.get("patches", {}).get(self.version, []): - tools.patch(**patch) - with self._build_context(): - autotools = self._configure_autotools() - autotools.make() + apply_conandata_patches(self) + autotools = Autotools(self) + autotools.configure() + autotools.make() def package(self): - self.copy("COPYING", src=self._source_subfolder, dst="licenses") - with self._build_context(): - autotools = self._configure_autotools() - autotools.install() + copy(self, "COPYING", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) + autotools = Autotools(self) + autotools.install() os.unlink(os.path.join(self.package_folder, "lib", "libidn2.la")) + rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) + rmdir(self, os.path.join(self.package_folder, "share")) + fix_apple_shared_install_name(self) - tools.rmdir(os.path.join(self.package_folder, "lib", "pkgconfig")) - tools.rmdir(os.path.join(self.package_folder, "share")) + if is_msvc(self) and self.options.shared: + os.rename(os.path.join(self.package_folder, "lib", "idn2.dll.lib"), + os.path.join(self.package_folder, "lib", "idn2-0.lib")) + copy(self, "idn2.exe", + os.path.join(self.build_folder, "src", ".libs"), + os.path.join(self.package_folder, "bin")) def package_info(self): - self.cpp_info.libs = ["idn2"] - self.cpp_info.names["pkg_config"] = "libidn2" + if is_msvc(self) and self.options.shared: + self.cpp_info.libs = ["idn2-0"] + else: + self.cpp_info.libs = ["idn2"] + self.cpp_info.set_property("pkg_config_name", "libidn2") if self.settings.os == "Windows": if not self.options.shared: self.cpp_info.defines = ["IDN2_STATIC"] bin_path = os.path.join(self.package_folder, "bin") - self.output.info("Appending PATH environment variable: {}".format(bin_path)) self.env_info.PATH.append(bin_path) diff --git a/recipes/libidn2/all/test_package/CMakeLists.txt b/recipes/libidn2/all/test_package/CMakeLists.txt index 7b9b613cbb24a..2279e3cb07d2a 100644 --- a/recipes/libidn2/all/test_package/CMakeLists.txt +++ b/recipes/libidn2/all/test_package/CMakeLists.txt @@ -1,8 +1,7 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.15) project(test_package C) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup() +find_package(libidn2 REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.c) -target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS}) +target_link_libraries(${PROJECT_NAME} PRIVATE libidn2::libidn2) diff --git a/recipes/libidn2/all/test_package/conanfile.py b/recipes/libidn2/all/test_package/conanfile.py index ae0c2ab3c933c..f56ad0548e3d9 100644 --- a/recipes/libidn2/all/test_package/conanfile.py +++ b/recipes/libidn2/all/test_package/conanfile.py @@ -1,10 +1,19 @@ -from conans import ConanFile, CMake, tools +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake import os class TestPackageConan(ConanFile): - settings = "os", "compiler", "build_type", "arch" - generators = "cmake" + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str, run=True) + + def layout(self): + cmake_layout(self) def build(self): cmake = CMake(self) @@ -12,9 +21,8 @@ def build(self): cmake.build() def test(self): - if not tools.cross_building(self.settings): - self.run("idn2 --help", run_environment=True) - - bin_path = os.path.join("bin", "test_package") - self.run(bin_path, run_environment=True) + if can_run(self): + self.run("idn2 --help", env="conanrun") + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/libidn2/all/test_v1_package/CMakeLists.txt b/recipes/libidn2/all/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..91630d79f4abb --- /dev/null +++ b/recipes/libidn2/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/libidn2/all/test_v1_package/conanfile.py b/recipes/libidn2/all/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..a5e01055d3933 --- /dev/null +++ b/recipes/libidn2/all/test_v1_package/conanfile.py @@ -0,0 +1,20 @@ +from conans import ConanFile, CMake, tools +import os + + +class TestPackageConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake", "cmake_find_package_multi" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if not tools.cross_building(self.settings): + self.run("idn2 --help", run_environment=True) + + bin_path = os.path.join("bin", "test_package") + self.run(bin_path, run_environment=True) + diff --git a/recipes/libigl/2.x.x/CMakeLists.txt b/recipes/libigl/2.x.x/CMakeLists.txt deleted file mode 100644 index 64994fe16fd84..0000000000000 --- a/recipes/libigl/2.x.x/CMakeLists.txt +++ /dev/null @@ -1,9 +0,0 @@ -cmake_minimum_required(VERSION 2.8) -project(conanlibigl) - -include(conanbuildinfo.cmake) -conan_basic_setup() - -find_package(Eigen3 REQUIRED) - -add_subdirectory(source_subfolder) diff --git a/recipes/libigl/2.x.x/conandata.yml b/recipes/libigl/2.x.x/conandata.yml deleted file mode 100644 index 1ac5bf040c202..0000000000000 --- a/recipes/libigl/2.x.x/conandata.yml +++ /dev/null @@ -1,8 +0,0 @@ -sources: - "2.3.0": - sha256: 5124443c2657023394039fe56fb240d4f7a867723ee4ebba053eaeb881ed7455 - url: https://github.com/libigl/libigl/archive/refs/tags/v2.3.0.zip -patches: - "2.3.0": - - patch_file: "patches/0001-correct-fpic.patch" - base_path: "source_subfolder" diff --git a/recipes/libigl/2.x.x/conanfile.py b/recipes/libigl/2.x.x/conanfile.py deleted file mode 100644 index f5ac50b8841ac..0000000000000 --- a/recipes/libigl/2.x.x/conanfile.py +++ /dev/null @@ -1,140 +0,0 @@ -import os -from conans import ConanFile, tools, CMake -from conans.errors import ConanInvalidConfiguration - - -class LibiglConan(ConanFile): - name = "libigl" - description = ("Simple C++ geometry processing library") - topics = ("conan", "libigl", "geometry", "matrices", "algorithms") - url = "https://github.com/conan-io/conan-center-index" - exports_sources = ["CMakeLists.txt", "patches/**"] - homepage = "https://libigl.github.io/" - license = "MPL-2.0" - settings = "os", "arch", "compiler", "build_type" - options = {"header_only": [True, False], "fPIC": [True, False]} - default_options = {"header_only": True, "fPIC": True} - generators = "cmake", "cmake_find_package" - requires = ("eigen/3.3.9") - _cmake = None - - @property - def _source_subfolder(self): - return "source_subfolder" - - @property - def _build_subfolder(self): - return "build_subfolder" - - @property - def _minimum_cpp_standard(self): - return 14 - - @property - def _minimum_compilers_version(self): - return { - "Visual Studio": "16", - "gcc": "6", - "clang": "3.4", - "apple-clang": "5.1", - } - - def validate(self): - if self.settings.compiler.get_safe("cppstd"): - tools.check_min_cppstd(self, self._minimum_cpp_standard) - min_version = self._minimum_compilers_version.get(str(self.settings.compiler)) - if not min_version: - self.output.warn("{} recipe lacks information about the {} compiler support.".format( - self.name, self.settings.compiler)) - else: - if tools.Version(self.settings.compiler.version) < min_version: - raise ConanInvalidConfiguration("{} requires C++{} support. The current compiler {} {} does not support it.".format( - self.name, self._minimum_cpp_standard, self.settings.compiler, self.settings.compiler.version)) - if self.settings.compiler == "Visual Studio" and "MT" in self.settings.compiler.runtime and not self.options.header_only: - raise ConanInvalidConfiguration("Visual Studio build with MT runtime is not supported") - if "arm" in self.settings.arch or "x86" is self.settings.arch: - raise ConanInvalidConfiguration("Not available for arm. Requested arch: {}".format(self.settings.arch)) - - def config_options(self): - if self.settings.os == "Windows": - del self.options.fPIC - - def configure(self): - if self.options.header_only: - del self.options.fPIC - - def _patch_sources(self): - for patch in self.conan_data.get("patches", {}).get(self.version, []): - tools.patch(**patch) - - def source(self): - tools.get(**self.conan_data["sources"][self.version], strip_root=True, destination=self._source_subfolder) - - def _configure_cmake(self): - if not self._cmake: - self._cmake = CMake(self, parallel=False) - self._cmake.definitions["LIBIGL_EXPORT_TARGETS"] = True - self._cmake.definitions["LIBIGL_USE_STATIC_LIBRARY"] = not self.options.header_only - - # All these dependencies are needed to build the examples or the tests - self._cmake.definitions["LIBIGL_BUILD_TUTORIALS"] = "OFF" - self._cmake.definitions["LIBIGL_BUILD_TESTS"] = "OFF" - self._cmake.definitions["LIBIGL_BUILD_PYTHON"] = "OFF" - - self._cmake.definitions["LIBIGL_WITH_CGAL"] = False - self._cmake.definitions["LIBIGL_WITH_COMISO"] = False - self._cmake.definitions["LIBIGL_WITH_CORK"] = False - self._cmake.definitions["LIBIGL_WITH_EMBREE"] = False - self._cmake.definitions["LIBIGL_WITH_MATLAB"] = False - self._cmake.definitions["LIBIGL_WITH_MOSEK"] = False - self._cmake.definitions["LIBIGL_WITH_OPENGL"] = False - self._cmake.definitions["LIBIGL_WITH_OPENGL_GLFW"] = False - self._cmake.definitions["LIBIGL_WITH_OPENGL_GLFW_IMGUI"] = False - self._cmake.definitions["LIBIGL_WITH_PNG"] = False - self._cmake.definitions["LIBIGL_WITH_TETGEN"] = False - self._cmake.definitions["LIBIGL_WITH_TRIANGLE"] = False - self._cmake.definitions["LIBIGL_WITH_XML"] = False - self._cmake.definitions["LIBIGL_WITH_PYTHON"] = "OFF" - self._cmake.definitions["LIBIGL_WITH_PREDICATES"] = False - return self._cmake - - def build(self): - self._patch_sources() - cmake = self._configure_cmake() - cmake.configure() - cmake.build() - - def package(self): - cmake = self._configure_cmake() - cmake.install() - self.copy("LICENSE.GPL", dst="licenses", src=self._source_subfolder) - self.copy("LICENSE.MPL2", dst="licenses", src=self._source_subfolder) - - tools.rmdir(os.path.join(self.package_folder, "share")) - if not self.options.header_only: - tools.remove_files_by_mask(self.package_folder, "*.c") - tools.remove_files_by_mask(self.package_folder, "*.cpp") - - def package_id(self): - if self.options.header_only: - self.info.header_only() - - def package_info(self): - self.cpp_info.filenames["cmake_find_package"] = "libigl" - self.cpp_info.filenames["cmake_find_package_multi"] = "libigl" - self.cpp_info.names["cmake_find_package"] = "igl" - self.cpp_info.names["cmake_find_package_multi"] = "igl" - - self.cpp_info.components["igl_common"].names["cmake_find_package"] = "common" - self.cpp_info.components["igl_common"].names["cmake_find_package_multi"] = "common" - self.cpp_info.components["igl_common"].libs = [] - self.cpp_info.components["igl_common"].requires = ["eigen::eigen"] - if self.settings.os == "Linux": - self.cpp_info.components["igl_common"].system_libs = ["pthread"] - - self.cpp_info.components["igl_core"].names["cmake_find_package"] = "core" - self.cpp_info.components["igl_core"].names["cmake_find_package_multi"] = "core" - self.cpp_info.components["igl_core"].requires = ["igl_common"] - if not self.options.header_only: - self.cpp_info.components["igl_core"].libs = ["igl"] - self.cpp_info.components["igl_core"].defines.append("IGL_STATIC_LIBRARY") diff --git a/recipes/libigl/2.x.x/patches/0001-correct-fpic.patch b/recipes/libigl/2.x.x/patches/0001-correct-fpic.patch deleted file mode 100644 index 6a5a6c38650c0..0000000000000 --- a/recipes/libigl/2.x.x/patches/0001-correct-fpic.patch +++ /dev/null @@ -1,17 +0,0 @@ -diff --git a/cmake/libigl.cmake b/cmake/libigl.cmake -index 6de1b418..0cc75fcd 100644 ---- a/cmake/libigl.cmake -+++ b/cmake/libigl.cmake -@@ -96,11 +96,6 @@ if(BUILD_SHARED_LIBS) - set_target_properties(igl_common PROPERTIES INTERFACE_POSITION_INDEPENDENT_CODE ON) - endif() - --if(UNIX AND NOT HUNTER_ENABLED) -- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC") -- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC") --endif() -- - if(HUNTER_ENABLED) - hunter_add_package(Eigen) - find_package(Eigen3 CONFIG REQUIRED) - diff --git a/recipes/libigl/2.x.x/test_package/CMakeLists.txt b/recipes/libigl/2.x.x/test_package/CMakeLists.txt deleted file mode 100644 index 174c1ae49d642..0000000000000 --- a/recipes/libigl/2.x.x/test_package/CMakeLists.txt +++ /dev/null @@ -1,11 +0,0 @@ -cmake_minimum_required(VERSION 3.1) -project(PackageTest CXX) - -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) - -find_package(libigl REQUIRED CONFIG) - -add_executable(example example.cpp) -target_link_libraries(example igl::core) -target_compile_features(example PUBLIC cxx_std_11) diff --git a/recipes/libigl/all/conan_deps.cmake b/recipes/libigl/all/conan_deps.cmake new file mode 100644 index 0000000000000..4c824341569d9 --- /dev/null +++ b/recipes/libigl/all/conan_deps.cmake @@ -0,0 +1 @@ +find_package(Eigen3 REQUIRED) diff --git a/recipes/libigl/all/conandata.yml b/recipes/libigl/all/conandata.yml new file mode 100644 index 0000000000000..d6842af62c120 --- /dev/null +++ b/recipes/libigl/all/conandata.yml @@ -0,0 +1,13 @@ +sources: + "2.5.0": + url: "https://github.com/libigl/libigl/archive/refs/tags/v2.5.0.zip" + sha256: "84af6a5f9266a4c1ce530f9ef8028c8a3569318563012d72a753622f61ea2f68" + "2.3.0": + url: "https://github.com/libigl/libigl/archive/refs/tags/v2.3.0.zip" + sha256: "5124443c2657023394039fe56fb240d4f7a867723ee4ebba053eaeb881ed7455" +patches: + "2.3.0": + - patch_file: "patches/001-replace-random_shuffle.patch" + patch_type: "portability" + patch_description: "Replace std::random_shuffle that was removed in C++17" + patch_source: "https://github.com/libigl/libigl/commit/3f3d186db7c2f5ce79194c3439134ca5faf2818a" diff --git a/recipes/libigl/all/conanfile.py b/recipes/libigl/all/conanfile.py new file mode 100644 index 0000000000000..232115da3d96e --- /dev/null +++ b/recipes/libigl/all/conanfile.py @@ -0,0 +1,214 @@ +import os + +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration, ConanException +from conan.tools.build import check_min_cppstd +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.env import VirtualBuildEnv +from conan.tools.files import copy, get, rm, rmdir, replace_in_file, export_conandata_patches, apply_conandata_patches +from conan.tools.microsoft import is_msvc_static_runtime +from conan.tools.scm import Version + +required_conan_version = ">=1.53.0" + + +class LibiglConan(ConanFile): + name = "libigl" + description = "Simple C++ geometry processing library" + # As per https://libigl.github.io/license/, the library itself is MPL-2, components are not + # No issue as we don't build them, but if done so in the future, please update this field! + license = "MPL-2.0" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://libigl.github.io/" + topics = ("geometry", "matrices", "algorithms", "header-only") + + package_type = "static-library" + settings = "os", "arch", "compiler", "build_type" + options = { + "fPIC": [True, False], + "header_only": [True, False], + } + default_options = { + "fPIC": True, + "header_only": False, + } + + @property + def _minimum_cpp_standard(self): + return 14 + + @property + def _minimum_compilers_version(self): + return { + "Visual Studio": "16", + "msvc": "192", + "gcc": "6", + "clang": "3.4", + "apple-clang": "5.1", + } + + def export_sources(self): + export_conandata_patches(self) + copy(self, "conan_deps.cmake", self.recipe_folder, os.path.join(self.export_sources_folder, "src")) + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def configure(self): + if self.options.header_only: + self.options.rm_safe("fPIC") + # No automatic detection for non "library" package-types, manually override + self.package_type = "header-library" + + def layout(self): + cmake_layout(self, src_folder="src") + + def requirements(self): + if Version(self.version) >= "2.5.0": + self.requires("eigen/3.4.0", transitive_headers=True) + else: + # 3.4.0 is not compatible with older versions + self.requires("eigen/3.3.9", transitive_headers=True) + + def build_requirements(self): + self.tool_requires("cmake/[>=3.16 <4]") + + def package_id(self): + if self.info.options.header_only: + self.info.clear() + + def validate_build(self): + if (os.getenv('CONAN_CENTER_BUILD_SERVICE') is not None and + Version(self.version) == "2.3.0" and self.settings.build_type == "Debug"): + raise ConanInvalidConfiguration("Debug build disabled from building in CCI due to excessive memory use in ConanCenter CI") + + def validate(self): + if Version(self.version) < "2.4.0" and "arm" in self.settings.arch: + raise ConanInvalidConfiguration(f"Old versions of this library do not support {self.settings.arch} architecture") + if self.settings.arch == "x86": + raise ConanInvalidConfiguration(f"Architecture {self.settings.arch} is not supported") + if is_msvc_static_runtime(self) and not self.options.header_only: + raise ConanInvalidConfiguration("Visual Studio build with MT runtime is not supported") + + def loose_lt_semver(v1, v2): + return all(int(p1) < int(p2) for p1, p2 in zip(str(v1).split("."), str(v2).split("."))) + + if self.settings.compiler.cppstd: + check_min_cppstd(self, self._minimum_cpp_standard) + min_version = self._minimum_compilers_version.get(str(self.settings.compiler)) + if min_version and loose_lt_semver(self.settings.compiler.version, min_version): + raise ConanInvalidConfiguration( + f"{self.name} requires C++{self._minimum_cpp_standard} support. The current compiler" + f" {self.settings.compiler} {self.settings.compiler.version} does not support it." + ) + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + env = VirtualBuildEnv(self) + env.generate() + + tc = CMakeToolchain(self) + tc.variables["CMAKE_PROJECT_libigl_INCLUDE"] = "conan_deps.cmake" + tc.variables["LIBIGL_USE_STATIC_LIBRARY"] = not self.options.header_only + tc.variables["LIBIGL_POSITION_INDEPENDENT_CODE"] = self.options.get_safe("fPIC", True) + tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0048"] = "NEW" + tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0077"] = "NEW" + + # All these dependencies are needed to build the examples or the tests + tc.variables["LIBIGL_BUILD_TUTORIALS"] = False + tc.variables["LIBIGL_BUILD_TESTS"] = False + tc.variables["LIBIGL_BUILD_PYTHON"] = False + + if Version(self.version) >= "2.4.0": + tc.variables["LIBIGL_EMBREE"] = False + tc.variables["LIBIGL_GLFW"] = False + tc.variables["LIBIGL_IMGUI"] = False + tc.variables["LIBIGL_OPENGL"] = False + tc.variables["LIBIGL_STB"] = False + tc.variables["LIBIGL_PREDICATES"] = False + tc.variables["LIBIGL_SPECTRA"] = False + tc.variables["LIBIGL_XML"] = False + tc.variables["LIBIGL_COPYLEFT_CORE"] = False + tc.variables["LIBIGL_COPYLEFT_CGAL"] = False + tc.variables["LIBIGL_COPYLEFT_COMISO"] = False + tc.variables["LIBIGL_COPYLEFT_TETGEN"] = False + tc.variables["LIBIGL_RESTRICTED_MATLAB"] = False + tc.variables["LIBIGL_RESTRICTED_MOSEK"] = False + tc.variables["LIBIGL_RESTRICTED_TRIANGLE"] = False + tc.variables["LIBIGL_GLFW_TESTS"] = False + else: + tc.variables["LIBIGL_EXPORT_TARGETS"] = True + tc.variables["LIBIGL_WITH_EMBREE"] = False + tc.variables["LIBIGL_WITH_OPENGL_GLFW"] = False + tc.variables["LIBIGL_WITH_OPENGL_GLFW_IMGUI"] = False + tc.variables["LIBIGL_WITH_OPENGL"] = False + tc.variables["LIBIGL_WITH_PNG"] = False + tc.variables["LIBIGL_WITH_PREDICATES"] = False + tc.variables["LIBIGL_WITH_XML"] = False + tc.variables["LIBIGL_WITH_CGAL"] = False + tc.variables["LIBIGL_WITH_COMISO"] = False + tc.variables["LIBIGL_WITH_CORK"] = False + tc.variables["LIBIGL_WITH_TETGEN"] = False + tc.variables["LIBIGL_WITH_MATLAB"] = False + tc.variables["LIBIGL_WITH_MOSEK"] = False + tc.variables["LIBIGL_WITH_TRIANGLE"] = False + tc.variables["LIBIGL_WITH_PYTHON"] = False + tc.generate() + + deps = CMakeDeps(self) + deps.generate() + + def _patch_sources(self): + apply_conandata_patches(self) + if Version(self.version) < "2.4.0": + libigl_cmake = os.path.join(self.source_folder, "cmake", "libigl.cmake") + replace_in_file(self, libigl_cmake, "-fPIC", "") + replace_in_file(self, libigl_cmake, "INTERFACE_POSITION_INDEPENDENT_CODE ON", "") + + def build(self): + self._patch_sources() + cmake = CMake(self) + cmake.configure() + try: + cmake.build() + except ConanException: + # Workaround for C3I running out of memory during build + self.conf.define("tools.build:jobs", 1) + cmake.build() + + def package(self): + cmake = CMake(self) + cmake.install() + # If components are built and packaged in the future, uncomment this line, their license is different + # copy(self, "LICENSE.GPL", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) + copy(self, "LICENSE.MPL2", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) + + rmdir(self, os.path.join(self.package_folder, "share")) + rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) + if not self.options.header_only: + rm(self, "*.c", self.package_folder, recursive=True) + rm(self, "*.cpp", self.package_folder, recursive=True) + + def package_info(self): + self.cpp_info.set_property("cmake_file_name", "libigl") + self.cpp_info.set_property("cmake_target_name", "igl::igl") + + self.cpp_info.components["common"].set_property("cmake_target_name", "igl::common") + self.cpp_info.components["common"].requires = ["eigen::eigen"] + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.components["common"].system_libs = ["pthread"] + + self.cpp_info.components["core"].set_property("cmake_target_name", "igl::core") + self.cpp_info.components["core"].requires = ["common"] + if not self.options.header_only: + self.cpp_info.components["core"].libs = ["igl"] + self.cpp_info.components["core"].defines.append("IGL_STATIC_LIBRARY") + + # TODO: to remove in conan v2 once cmake_find_package_* generators removed + self.cpp_info.filenames["cmake_find_package"] = "libigl" + self.cpp_info.filenames["cmake_find_package_multi"] = "libigl" + self.cpp_info.names["cmake_find_package"] = "igl" + self.cpp_info.names["cmake_find_package_multi"] = "igl" diff --git a/recipes/libigl/all/patches/001-replace-random_shuffle.patch b/recipes/libigl/all/patches/001-replace-random_shuffle.patch new file mode 100644 index 0000000000000..fa53d862ad422 --- /dev/null +++ b/recipes/libigl/all/patches/001-replace-random_shuffle.patch @@ -0,0 +1,31 @@ +From 3f3d186db7c2f5ce79194c3439134ca5faf2818a Mon Sep 17 00:00:00 2001 +From: Jeremie Dumas +Date: Wed, 5 Jan 2022 11:26:47 -0800 +Subject: [PATCH] Fix blue noise random shuffle. + +--- + include/igl/blue_noise.cpp | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/include/igl/blue_noise.cpp b/include/igl/blue_noise.cpp +index ac447feb42..10df1ad1ba 100644 +--- a/include/igl/blue_noise.cpp ++++ b/include/igl/blue_noise.cpp +@@ -15,6 +15,7 @@ + #include + #include + #include ++#include + + namespace igl + { +@@ -209,7 +210,8 @@ namespace igl + } + //printf(" --------\n"); + // randomize order: this might be a little paranoid... +- std::random_shuffle(std::begin(N), std::end(N)); ++ std::mt19937 twister; ++ std::shuffle(std::begin(N), std::end(N), twister); + bool found = false; + for(const BlueNoiseKeyType & nk : N) + { diff --git a/recipes/libigl/all/test_package/CMakeLists.txt b/recipes/libigl/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..eba5d0a0a901d --- /dev/null +++ b/recipes/libigl/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(PackageTest CXX) + +find_package(libigl REQUIRED CONFIG) + +add_executable(example example.cpp) +target_link_libraries(example igl::core) +target_compile_features(example PUBLIC cxx_std_11) diff --git a/recipes/libigl/all/test_package/conanfile.py b/recipes/libigl/all/test_package/conanfile.py new file mode 100644 index 0000000000000..8d52b7021efe1 --- /dev/null +++ b/recipes/libigl/all/test_package/conanfile.py @@ -0,0 +1,26 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "example") + self.run(bin_path, env="conanrun") diff --git a/recipes/libigl/2.x.x/test_package/example.cpp b/recipes/libigl/all/test_package/example.cpp similarity index 100% rename from recipes/libigl/2.x.x/test_package/example.cpp rename to recipes/libigl/all/test_package/example.cpp diff --git a/recipes/libigl/all/test_v1_package/CMakeLists.txt b/recipes/libigl/all/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..91630d79f4abb --- /dev/null +++ b/recipes/libigl/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/libigl/2.x.x/test_package/conanfile.py b/recipes/libigl/all/test_v1_package/conanfile.py similarity index 100% rename from recipes/libigl/2.x.x/test_package/conanfile.py rename to recipes/libigl/all/test_v1_package/conanfile.py diff --git a/recipes/libigl/config.yml b/recipes/libigl/config.yml index 58d1203871eb7..7578fb2ee13b0 100644 --- a/recipes/libigl/config.yml +++ b/recipes/libigl/config.yml @@ -1,3 +1,5 @@ versions: + "2.5.0": + folder: "all" "2.3.0": - folder: "2.x.x" + folder: "all" diff --git a/recipes/libinput/all/conanfile.py b/recipes/libinput/all/conanfile.py index 93eb56ba01fa4..0b86139ccb90d 100644 --- a/recipes/libinput/all/conanfile.py +++ b/recipes/libinput/all/conanfile.py @@ -3,14 +3,14 @@ from conan import ConanFile from conan.errors import ConanInvalidConfiguration -from conan.tools.env import VirtualBuildEnv -from conan.tools.files import copy, get, replace_in_file, rmdir, save +from conan.tools.env import VirtualBuildEnv, VirtualRunEnv +from conan.tools.files import copy, get, rmdir, save from conan.tools.gnu import PkgConfigDeps from conan.tools.layout import basic_layout from conan.tools.meson import Meson, MesonToolchain -required_conan_version = ">=1.53.0" +required_conan_version = ">=1.60.0 <2.0 || >=2.0.5" class LibinputConan(ConanFile): @@ -91,6 +91,12 @@ def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) def generate(self): + tc = VirtualBuildEnv(self) + tc.generate() + if self.options.get_safe("with_wayland") and not self._has_build_profile: + env = VirtualRunEnv(self) + env.generate(scope="build") + tc = MesonToolchain(self) tc.project_options["build.pkg_config_path"] = self.generators_folder tc.project_options["coverity"] = False @@ -111,10 +117,8 @@ def generate(self): else: # Manually generate pkgconfig file of wayland-protocols since # PkgConfigDeps.build_context_activated can't work with legacy 1 profile - # We must use legacy conan v1 deps_cpp_info because self.dependencies doesn't - # contain build requirements when using 1 profile. - wp_prefix = self.deps_cpp_info["wayland-protocols"].rootpath - wp_version = self.deps_cpp_info["wayland-protocols"].version + wp_prefix = self.dependencies.build["wayland-protocols"].package_folder + wp_version = self.dependencies.build["wayland-protocols"].ref.version wp_pkg_content = textwrap.dedent(f"""\ prefix={wp_prefix} datarootdir=${{prefix}}/res @@ -125,8 +129,6 @@ def generate(self): """) save(self, os.path.join(self.generators_folder, "wayland-protocols.pc"), wp_pkg_content) pkg_config_deps.generate() - tc = VirtualBuildEnv(self) - tc.generate() def build(self): meson = Meson(self) diff --git a/recipes/libinterpolate/all/conandata.yml b/recipes/libinterpolate/all/conandata.yml index 7d38fb0462c3a..a64f016c933a3 100644 --- a/recipes/libinterpolate/all/conandata.yml +++ b/recipes/libinterpolate/all/conandata.yml @@ -1,13 +1,17 @@ sources: - "2.6.2": + "2.7": url: - - "https://github.com/CD3/libInterpolate/archive/refs/tags/2.6.2.tar.gz" - sha256: "42f40c9b77fda6e0c52ed39b522458456e89fb4981d63f812aa158c6f4be8ab0" + - "https://github.com/CD3/libInterpolate/archive/refs/tags/2.7.tar.gz" + sha256: "a502a00d6aee13e9b8ae9af6fafbcb783d5380835e353a0fc85a586ca7e31e43" + "2.6.4": + url: + - "https://github.com/CD3/libInterpolate/archive/refs/tags/2.6.4.tar.gz" + sha256: "231a39fcc87ffc3e03936f7a21abc78ef309c2f1de79bd3ae72c24d78352d666" "2.6.3": url: - "https://github.com/CD3/libInterpolate/archive/refs/tags/2.6.3.tar.gz" sha256: "bb2f253c27594b4e56ed9349630086665f529100eac2cd3cba63d198c3a84ff9" - "2.6.4": + "2.6.2": url: - - "https://github.com/CD3/libInterpolate/archive/refs/tags/2.6.4.tar.gz" - sha256: "231a39fcc87ffc3e03936f7a21abc78ef309c2f1de79bd3ae72c24d78352d666" + - "https://github.com/CD3/libInterpolate/archive/refs/tags/2.6.2.tar.gz" + sha256: "42f40c9b77fda6e0c52ed39b522458456e89fb4981d63f812aa158c6f4be8ab0" diff --git a/recipes/libinterpolate/all/conanfile.py b/recipes/libinterpolate/all/conanfile.py index c6aadd8b682fe..711fe3eaa7335 100644 --- a/recipes/libinterpolate/all/conanfile.py +++ b/recipes/libinterpolate/all/conanfile.py @@ -39,8 +39,8 @@ def layout(self): basic_layout(self, src_folder="src") def requirements(self): - self.requires("boost/1.80.0", transitive_headers=True) - self.requires("eigen/3.3.7", transitive_headers=True) + self.requires("boost/1.85.0", transitive_headers=True) + self.requires("eigen/3.4.0", transitive_headers=True) def package_id(self): self.info.clear() @@ -48,7 +48,7 @@ def package_id(self): def validate(self): if Version(self.version) < "2.6.4" and self.settings.os != "Linux": raise ConanInvalidConfiguration(f"{self.ref} is not supported by {self.settings.os}; Try the version >= 2.6.4") - if Version(self.version) >= "2.6.4" and self.settings.os not in ["Linux", "Windows"]: + if Version(self.version) >= "2.6.4" and self.settings.os not in ["Linux", "Windows", "Macos"]: raise ConanInvalidConfiguration(f"{self.ref} is not supported by {self.settings.os}.") if self.settings.compiler.get_safe("cppstd"): check_min_cppstd(self, self._min_cppstd) diff --git a/recipes/libinterpolate/all/test_package/CMakeLists.txt b/recipes/libinterpolate/all/test_package/CMakeLists.txt index 05a0c0e049e56..711c61c005037 100644 --- a/recipes/libinterpolate/all/test_package/CMakeLists.txt +++ b/recipes/libinterpolate/all/test_package/CMakeLists.txt @@ -5,3 +5,4 @@ find_package(libInterpolate REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) target_link_libraries(${PROJECT_NAME} PRIVATE libInterpolate::Interpolate) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) diff --git a/recipes/libinterpolate/all/test_package/conanfile.py b/recipes/libinterpolate/all/test_package/conanfile.py index 48499fa0989d9..e845ae751a301 100644 --- a/recipes/libinterpolate/all/test_package/conanfile.py +++ b/recipes/libinterpolate/all/test_package/conanfile.py @@ -4,7 +4,6 @@ import os -# It will become the standard on Conan 2.x class TestPackageConan(ConanFile): settings = "os", "arch", "compiler", "build_type" generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" diff --git a/recipes/libinterpolate/config.yml b/recipes/libinterpolate/config.yml index 2f31497672d43..45546f7415b6d 100644 --- a/recipes/libinterpolate/config.yml +++ b/recipes/libinterpolate/config.yml @@ -1,7 +1,9 @@ versions: - "2.6.2": + "2.7": + folder: all + "2.6.4": folder: all "2.6.3": folder: all - "2.6.4": + "2.6.2": folder: all diff --git a/recipes/libjpeg-turbo/all/conandata.yml b/recipes/libjpeg-turbo/all/conandata.yml index 0fb3e348f183d..f4f8c634444a1 100644 --- a/recipes/libjpeg-turbo/all/conandata.yml +++ b/recipes/libjpeg-turbo/all/conandata.yml @@ -1,4 +1,10 @@ sources: + "3.0.4": + url: "https://github.com/libjpeg-turbo/libjpeg-turbo/releases/download/3.0.4/libjpeg-turbo-3.0.4.tar.gz" + sha256: "99130559e7d62e8d695f2c0eaeef912c5828d5b84a0537dcb24c9678c9d5b76b" + "3.0.3": + url: "https://github.com/libjpeg-turbo/libjpeg-turbo/releases/download/3.0.3/libjpeg-turbo-3.0.3.tar.gz" + sha256: "343e789069fc7afbcdfe44dbba7dbbf45afa98a15150e079a38e60e44578865d" "3.0.2": url: "https://github.com/libjpeg-turbo/libjpeg-turbo/releases/download/3.0.2/libjpeg-turbo-3.0.2.tar.gz" sha256: "c2ce515a78d91b09023773ef2770d6b0df77d674e144de80d63e0389b3a15ca6" diff --git a/recipes/libjpeg-turbo/all/test_package/conanfile.py b/recipes/libjpeg-turbo/all/test_package/conanfile.py index fb5d85902cc52..0a6bc68712d90 100644 --- a/recipes/libjpeg-turbo/all/test_package/conanfile.py +++ b/recipes/libjpeg-turbo/all/test_package/conanfile.py @@ -23,5 +23,4 @@ def build(self): def test(self): if can_run(self): bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") - img_name = os.path.join(self.source_folder, "testimg.jpg") - self.run(f"{bin_path} {img_name}", env="conanrun") + self.run(bin_path, env="conanrun") diff --git a/recipes/libjpeg-turbo/all/test_package/test_package.c b/recipes/libjpeg-turbo/all/test_package/test_package.c index 2f94478d7ef6f..243a65f0efd44 100644 --- a/recipes/libjpeg-turbo/all/test_package/test_package.c +++ b/recipes/libjpeg-turbo/all/test_package/test_package.c @@ -1,528 +1,9 @@ -/* - * rdjpgcom.c - * - * Copyright (C) 1994-1997, Thomas G. Lane. - * Modified 2009 by Bill Allombert, Guido Vollbeding. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file contains a very simple stand-alone application that displays - * the text in COM (comment) markers in a JFIF file. - * This may be useful as an example of the minimum logic needed to parse - * JPEG markers. - */ - #include -#include -#include - -#define JPEG_CJPEG_DJPEG /* to get the command-line config symbols */ -#include "jpeglib.h" /* get auto-config symbols, */ - -#ifdef HAVE_LOCALE_H -#include /* Bill Allombert: use locale for isprint */ -#endif -#include /* to declare isupper(), tolower() */ -#ifdef USE_SETMODE -#include /* to declare setmode()'s parameter macros */ -/* If you have setmode() but not , just delete this line: */ -#include /* to declare setmode() */ -#endif - -#ifdef USE_CCOMMAND /* command-line reader for Macintosh */ -#ifdef __MWERKS__ -#include /* Metrowerks needs this */ -#include /* ... and this */ -#endif -#ifdef THINK_C -#include /* Think declares it here */ -#endif -#endif - -#ifdef DONT_USE_B_MODE /* define mode parameters for fopen() */ -#define READ_BINARY "r" -#else -#ifdef VMS /* VMS is very nonstandard */ -#define READ_BINARY "rb", "ctx=stm" -#else /* standard ANSI-compliant case */ -#define READ_BINARY "rb" -#endif -#endif - -#ifndef EXIT_FAILURE /* define exit() codes if not provided */ -#define EXIT_FAILURE 1 -#endif -#ifndef EXIT_SUCCESS -#ifdef VMS -#define EXIT_SUCCESS 1 /* VMS is very nonstandard */ -#else -#define EXIT_SUCCESS 0 -#endif -#endif - -/* - * These macros are used to read the input file. - * To reuse this code in another application, you might need to change these. - */ - -static FILE *infile; /* input JPEG file */ - -/* Return next input byte, or EOF if no more */ -#define NEXTBYTE() getc(infile) - -/* Error exit handler */ -#define ERREXIT(msg) (fprintf(stderr, "%s\n", msg), exit(EXIT_FAILURE)) - -/* Read one byte, testing for EOF */ -static int read_1_byte(void) { - int c; - - c = NEXTBYTE(); - if (c == EOF) - ERREXIT("Premature EOF in JPEG file"); - return c; -} - -/* Read 2 bytes, convert to unsigned int */ -/* All 2-byte quantities in JPEG markers are MSB first */ -static unsigned int read_2_bytes(void) { - int c1, c2; - - c1 = NEXTBYTE(); - if (c1 == EOF) - ERREXIT("Premature EOF in JPEG file"); - c2 = NEXTBYTE(); - if (c2 == EOF) - ERREXIT("Premature EOF in JPEG file"); - return (((unsigned int)c1) << 8) + ((unsigned int)c2); -} - -/* - * JPEG markers consist of one or more 0xFF bytes, followed by a marker - * code byte (which is not an FF). Here are the marker codes of interest - * in this program. (See jdmarker.c for a more complete list.) - */ - -#define M_SOF0 0xC0 /* Start Of Frame N */ -#define M_SOF1 0xC1 /* N indicates which compression process */ -#define M_SOF2 0xC2 /* Only SOF0-SOF2 are now in common use */ -#define M_SOF3 0xC3 -#define M_SOF5 0xC5 /* NB: codes C4 and CC are NOT SOF markers */ -#define M_SOF6 0xC6 -#define M_SOF7 0xC7 -#define M_SOF9 0xC9 -#define M_SOF10 0xCA -#define M_SOF11 0xCB -#define M_SOF13 0xCD -#define M_SOF14 0xCE -#define M_SOF15 0xCF -#define M_SOI 0xD8 /* Start Of Image (beginning of datastream) */ -#define M_EOI 0xD9 /* End Of Image (end of datastream) */ -#define M_SOS 0xDA /* Start Of Scan (begins compressed data) */ -#define M_APP0 0xE0 /* Application-specific marker, type N */ -#define M_APP12 0xEC /* (we don't bother to list all 16 APPn's) */ -#define M_COM 0xFE /* COMment */ - -/* - * Find the next JPEG marker and return its marker code. - * We expect at least one FF byte, possibly more if the compressor used FFs - * to pad the file. - * There could also be non-FF garbage between markers. The treatment of such - * garbage is unspecified; we choose to skip over it but emit a warning msg. - * NB: this routine must not be used after seeing SOS marker, since it will - * not deal correctly with FF/00 sequences in the compressed image data... - */ - -static int next_marker(void) { - int c; - int discarded_bytes = 0; - - /* Find 0xFF byte; count and skip any non-FFs. */ - c = read_1_byte(); - while (c != 0xFF) { - discarded_bytes++; - c = read_1_byte(); - } - /* Get marker code byte, swallowing any duplicate FF bytes. Extra FFs - * are legal as pad bytes, so don't count them in discarded_bytes. - */ - do { - c = read_1_byte(); - } while (c == 0xFF); - - if (discarded_bytes != 0) { - fprintf(stderr, "Warning: garbage data found in JPEG file\n"); - } - - return c; -} - -/* - * Read the initial marker, which should be SOI. - * For a JFIF file, the first two bytes of the file should be literally - * 0xFF M_SOI. To be more general, we could use next_marker, but if the - * input file weren't actually JPEG at all, next_marker might read the whole - * file and then return a misleading error message... - */ - -static int first_marker(void) { - int c1, c2; - - c1 = NEXTBYTE(); - c2 = NEXTBYTE(); - if (c1 != 0xFF || c2 != M_SOI) - { - ERREXIT("Not a JPEG file"); - } - return c2; -} - -/* - * Most types of marker are followed by a variable-length parameter segment. - * This routine skips over the parameters for any marker we don't otherwise - * want to process. - * Note that we MUST skip the parameter segment explicitly in order not to - * be fooled by 0xFF bytes that might appear within the parameter segment; - * such bytes do NOT introduce new markers. - */ - -static void skip_variable(void) -/* Skip over an unknown or uninteresting variable-length marker */ -{ - unsigned int length; - - /* Get the marker parameter length count */ - length = read_2_bytes(); - /* Length includes itself, so must be at least 2 */ - if (length < 2) - ERREXIT("Erroneous JPEG marker length"); - length -= 2; - /* Skip over the remaining bytes */ - while (length > 0) { - (void)read_1_byte(); - length--; - } -} - -/* - * Process a COM marker. - * We want to print out the marker contents as legible text; - * we must guard against non-text junk and varying newline representations. - */ - -static void process_COM(int raw) { - unsigned int length; - int ch; - int lastch = 0; - -/* Bill Allombert: set locale properly for isprint */ -#ifdef HAVE_LOCALE_H - setlocale(LC_CTYPE, ""); -#endif - - /* Get the marker parameter length count */ - length = read_2_bytes(); - /* Length includes itself, so must be at least 2 */ - if (length < 2) - ERREXIT("Erroneous JPEG marker length"); - length -= 2; - - while (length > 0) { - ch = read_1_byte(); - if (raw) { - putc(ch, stdout); - /* Emit the character in a readable form. - * Nonprintables are converted to \nnn form, - * while \ is converted to \\. - * Newlines in CR, CR/LF, or LF form will be printed as one newline. - */ - } else if (ch == '\r') { - printf("\n"); - } else if (ch == '\n') { - if (lastch != '\r') - printf("\n"); - } else if (ch == '\\') { - printf("\\\\"); - } else if (isprint(ch)) { - putc(ch, stdout); - } else { - printf("\\%03o", ch); - } - lastch = ch; - length--; - } - printf("\n"); - -/* Bill Allombert: revert to C locale */ -#ifdef HAVE_LOCALE_H - setlocale(LC_CTYPE, "C"); -#endif -} - -/* - * Process a SOFn marker. - * This code is only needed if you want to know the image dimensions... - */ - -static void process_SOFn(int marker) { - unsigned int length; - unsigned int image_height, image_width; - int data_precision, num_components; - const char *process; - int ci; - - length = read_2_bytes(); /* usual parameter length count */ - - data_precision = read_1_byte(); - image_height = read_2_bytes(); - image_width = read_2_bytes(); - num_components = read_1_byte(); - - switch (marker) { - case M_SOF0: - process = "Baseline"; - break; - case M_SOF1: - process = "Extended sequential"; - break; - case M_SOF2: - process = "Progressive"; - break; - case M_SOF3: - process = "Lossless"; - break; - case M_SOF5: - process = "Differential sequential"; - break; - case M_SOF6: - process = "Differential progressive"; - break; - case M_SOF7: - process = "Differential lossless"; - break; - case M_SOF9: - process = "Extended sequential, arithmetic coding"; - break; - case M_SOF10: - process = "Progressive, arithmetic coding"; - break; - case M_SOF11: - process = "Lossless, arithmetic coding"; - break; - case M_SOF13: - process = "Differential sequential, arithmetic coding"; - break; - case M_SOF14: - process = "Differential progressive, arithmetic coding"; - break; - case M_SOF15: - process = "Differential lossless, arithmetic coding"; - break; - default: - process = "Unknown"; - break; - } - - printf("JPEG image is %uw * %uh, %d color components, %d bits per sample\n", - image_width, image_height, num_components, data_precision); - printf("JPEG process: %s\n", process); - - if (length != (unsigned int)(8 + num_components * 3)) - ERREXIT("Bogus SOF marker length"); - - for (ci = 0; ci < num_components; ci++) { - (void)read_1_byte(); /* Component ID code */ - (void)read_1_byte(); /* H, V sampling factors */ - (void)read_1_byte(); /* Quantization table number */ - } -} - -/* - * Parse the marker stream until SOS or EOI is seen; - * display any COM markers. - * While the companion program wrjpgcom will always insert COM markers before - * SOFn, other implementations might not, so we scan to SOS before stopping. - * If we were only interested in the image dimensions, we would stop at SOFn. - * (Conversely, if we only cared about COM markers, there would be no need - * for special code to handle SOFn; we could treat it like other markers.) - */ - -static int scan_JPEG_header(int verbose, int raw) { - int marker; - /* Expect SOI at start of file */ - if (first_marker() != M_SOI) - ERREXIT("Expected SOI marker first"); - - /* Scan miscellaneous markers until we reach SOS. */ - for (;;) { - marker = next_marker(); - switch (marker) { - /* Note that marker codes 0xC4, 0xC8, 0xCC are not, and must not be, - * treated as SOFn. C4 in particular is actually DHT. - */ - case M_SOF0: /* Baseline */ - case M_SOF1: /* Extended sequential, Huffman */ - case M_SOF2: /* Progressive, Huffman */ - case M_SOF3: /* Lossless, Huffman */ - case M_SOF5: /* Differential sequential, Huffman */ - case M_SOF6: /* Differential progressive, Huffman */ - case M_SOF7: /* Differential lossless, Huffman */ - case M_SOF9: /* Extended sequential, arithmetic */ - case M_SOF10: /* Progressive, arithmetic */ - case M_SOF11: /* Lossless, arithmetic */ - case M_SOF13: /* Differential sequential, arithmetic */ - case M_SOF14: /* Differential progressive, arithmetic */ - case M_SOF15: /* Differential lossless, arithmetic */ - if (verbose) - process_SOFn(marker); - else - skip_variable(); - break; - - case M_SOS: /* stop before hitting compressed data */ - return marker; - - case M_EOI: /* in case it's a tables-only JPEG stream */ - return marker; - - case M_COM: - process_COM(raw); - break; - - case M_APP12: - /* Some digital camera makers put useful textual information into - * APP12 markers, so we print those out too when in -verbose mode. - */ - if (verbose) { - printf("APP12 contains:\n"); - process_COM(raw); - } else - skip_variable(); - break; - - default: /* Anything else just gets skipped */ - skip_variable(); /* we assume it has a parameter count... */ - break; - } - } /* end loop */ -} - -/* Command line parsing code */ - -static const char *progname; /* program name for error messages */ - -static void usage(void) -/* complain about bad command line */ -{ - fprintf(stderr, "rdjpgcom displays any textual comments in a JPEG file.\n"); - - fprintf(stderr, "Usage: %s [switches] [inputfile]\n", progname); - - fprintf(stderr, "Switches (names may be abbreviated):\n"); - fprintf( - stderr, - " -raw Display non-printable characters in comments (unsafe)\n"); - fprintf(stderr, " -verbose Also display dimensions of JPEG image\n"); - - exit(EXIT_FAILURE); -} - -static int keymatch(char *arg, const char *keyword, int minchars) -/* Case-insensitive matching of (possibly abbreviated) keyword switches. */ -/* keyword is the constant keyword (must be lower case already), */ -/* minchars is length of minimum legal abbreviation. */ -{ - register int ca, ck; - register int nmatched = 0; - - while ((ca = *arg++) != '\0') { - if ((ck = *keyword++) == '\0') - return 0; /* arg longer than keyword, no good */ - if (isupper(ca)) /* force arg to lcase (assume ck is already) */ - ca = tolower(ca); - if (ca != ck) - return 0; /* no good */ - nmatched++; /* count matched characters */ - } - /* reached end of argument; fail if it's too short for unique abbrev */ - if (nmatched < minchars) - return 0; - return 1; /* A-OK */ -} - -/* - * The main program. - */ - -int main(int argc, char **argv) { - int argn; - char *arg; - int verbose = 1, raw = 0; - -/* On Mac, fetch a command line. */ -#ifdef USE_CCOMMAND - argc = ccommand(&argv); -#endif - - progname = argv[0]; - if (progname == NULL || progname[0] == 0) - progname = "rdjpgcom"; /* in case C library doesn't provide it */ - - /* Parse switches, if any */ - for (argn = 1; argn < argc; argn++) - { - arg = argv[argn]; - if (arg[0] != '-') - break; /* not switch, must be file name */ - arg++; /* advance over '-' */ - if (keymatch(arg, "verbose", 1)) - { - verbose++; - } - else if (keymatch(arg, "raw", 1)) - { - raw = 1; - } - else - usage(); - } - - /* Open the input file. */ - /* Unix style: expect zero or one file name */ - if (argn < argc - 1) - { - fprintf(stderr, "%s: only one input file\n", progname); - usage(); - } - if (argn < argc) - { - if ((infile = fopen(argv[argn], READ_BINARY)) == NULL) - { - fprintf(stderr, "%s: can't open %s\n", progname, argv[argn]); - exit(EXIT_FAILURE); - } - } - else if ((infile = fopen("testimg.jpg", READ_BINARY)) == NULL) - { -/* default input file is stdin */ -#ifdef USE_SETMODE /* need to hack file mode? */ - setmode(fileno(stdin), O_BINARY); -#endif -#ifdef USE_FDOPEN /* need to re-open in binary mode? */ - if ((infile = fdopen(fileno(stdin), READ_BINARY)) == NULL) - { - fprintf(stderr, "%s: can't open stdin\n", progname); - exit(EXIT_FAILURE); - } -#else - infile = stdin; -#endif - } - - /* Scan the JPEG headers. */ - (void)scan_JPEG_header(verbose, raw); +#include "jpeglib.h" - /* All done. */ - exit(EXIT_SUCCESS); - return 0; /* suppress no-return-value warnings */ +int main() { + struct jpeg_decompress_struct info; + struct jpeg_error_mgr err; + info.err = jpeg_std_error(&err); + jpeg_create_decompress(&info); } diff --git a/recipes/libjpeg-turbo/all/test_package/testimg.jpg b/recipes/libjpeg-turbo/all/test_package/testimg.jpg deleted file mode 100644 index a026e486f57de..0000000000000 Binary files a/recipes/libjpeg-turbo/all/test_package/testimg.jpg and /dev/null differ diff --git a/recipes/libjpeg-turbo/all/test_package_module/conanfile.py b/recipes/libjpeg-turbo/all/test_package_module/conanfile.py index fd19bb1425057..0a6bc68712d90 100644 --- a/recipes/libjpeg-turbo/all/test_package_module/conanfile.py +++ b/recipes/libjpeg-turbo/all/test_package_module/conanfile.py @@ -23,5 +23,4 @@ def build(self): def test(self): if can_run(self): bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") - img_name = os.path.join(self.source_folder, os.pardir, "test_package", "testimg.jpg") - self.run(f"{bin_path} {img_name}", env="conanrun") + self.run(bin_path, env="conanrun") diff --git a/recipes/libjpeg-turbo/all/test_v1_package/conanfile.py b/recipes/libjpeg-turbo/all/test_v1_package/conanfile.py index a2b04c499e0ac..38f4483872d47 100644 --- a/recipes/libjpeg-turbo/all/test_v1_package/conanfile.py +++ b/recipes/libjpeg-turbo/all/test_v1_package/conanfile.py @@ -14,5 +14,4 @@ def build(self): def test(self): if not tools.cross_building(self): bin_path = os.path.join("bin", "test_package") - img_name = os.path.join(self.source_folder, os.pardir, "test_package", "testimg.jpg") - self.run(f"{bin_path} {img_name}", run_environment=True) + self.run(bin_path, run_environment=True) diff --git a/recipes/libjpeg-turbo/all/test_v1_package_module/conanfile.py b/recipes/libjpeg-turbo/all/test_v1_package_module/conanfile.py index b6600e428515c..19e6a0c06e3d8 100644 --- a/recipes/libjpeg-turbo/all/test_v1_package_module/conanfile.py +++ b/recipes/libjpeg-turbo/all/test_v1_package_module/conanfile.py @@ -14,5 +14,4 @@ def build(self): def test(self): if not tools.cross_building(self): bin_path = os.path.join("bin", "test_package") - img_name = os.path.join(self.source_folder, os.pardir, "test_package", "testimg.jpg") - self.run(f"{bin_path} {img_name}", run_environment=True) + self.run(bin_path, run_environment=True) diff --git a/recipes/libjpeg-turbo/config.yml b/recipes/libjpeg-turbo/config.yml index b86a136393472..584908f335b17 100644 --- a/recipes/libjpeg-turbo/config.yml +++ b/recipes/libjpeg-turbo/config.yml @@ -1,4 +1,8 @@ versions: + "3.0.4": + folder: all + "3.0.3": + folder: all "3.0.2": folder: all "3.0.1": diff --git a/recipes/libjpeg/all/Win32.Mak b/recipes/libjpeg/all/Win32.Mak deleted file mode 100644 index d3345df3a31cf..0000000000000 --- a/recipes/libjpeg/all/Win32.Mak +++ /dev/null @@ -1,671 +0,0 @@ -# Win32.Mak - Win32 application master NMAKE definitions file for the -# Microsoft Windows SDK programming samples -# Copyright (C) Microsoft Corporation -# ------------------------------------------------------------------------- -# This files should be included at the top of all MAKEFILEs as follows: -# !include -# ------------------------------------------------------------------------- -# -# Define APPVER = [ 4.0 | 5.0 | 5.01 | 5.02 | 6.0 | 6.1] prior to including win32.mak to get -# build time checking for version dependencies and to mark the executable -# with version information. -# -# Define TARGETOS = [ WIN95 | WINNT | BOTH ] prior to including win32.mak -# to get some build time checking for platform dependencies. -# -# Define TARGETLANG = [ LANG_JAPANESE | LANG_CHINESE | LANG_KOREAN ] prior -# to including win32.mak to getcompile & link flags for building -# applications to run on Far-East Windows. (This is an optional parameter. -# The system locale is the default.) -# -# Define _WIN32_IE = [ 0x0300 | 0x0400 | 0x0500 | 0x0600 | 0x0700 | 0x0800] prior to including win32.mak to -# get compile and link flags for building applications and components to -# run on Internet Explorer. (This is an optional parameter. IE 4.0 is -# the default.) -# -# ------------------------------------------------------------------------- -# NMAKE Options -# -# Use the table below to determine the additional options for NMAKE to -# generate various application debugging, profiling and performance tuning -# information. -# -# Application Information Type Invoke NMAKE -# ---------------------------- ------------ -# For No Debugging Info nmake nodebug=1 -# For Working Set Tuner Info nmake tune=1 -# For Call Attributed Profiling Info nmake profile=1 -# -# Note: The three options above are mutually exclusive (you may use only -# one to compile/link the application). -# -# Note: creating the environment variables NODEBUG, TUNE, and PROFILE is an -# alternate method to setting these options via the nmake command line. -# -# Note: TUNE and PROFILE do nothing for 64bit compilation -# -# Additional NMAKE Options Invoke NMAKE -# ---------------------------- ------------ -# For No ANSI NULL Compliance nmake no_ansi=1 -# (ANSI NULL is defined as PVOID 0) -# -# ========================================================================= -# Build Rules Quick Start -# -# To build one of the following types of executables, use the specified -# compiler and linker command-line options. -# -# --------------------------------------------------------------------------- -# To build: | Compiler Options | Linker options (pick one -# | | line. con = console, -# | | gui = GUI, ole = GUI OLE) -# --------------------------------------------------------------------------- -# Single threaded | cdebug cflags cvars | ldebug guilflags guilibs -# app with static | | ldebug conlflags conlibs -# CRT | | ldebug guilflags olelibs -# --------------------------------------------------------------------------- -# Multithreaded app | cdebug cflags cvarsmt | ldebug guilflags guilibsmt -# with static CRT | | ldebug conlflags conlibsmt -# | | ldebug guilflags olelibsmt -# --------------------------------------------------------------------------- -# Single or multi- | cdebug cflags cvarsdll | ldebug guilflags guilibsdll -# threaded app with | | ldebug conlflags conlibsdll -# DLL version of CRT | | ldebug guilflags olelibsdll -# (MSVCRT.DLL) | | -# --------------------------------------------------------------------------- -# DLL with static | cdebug cflags cvarsmt | ldebug dlllflags guilibsmt -# CRT* | | ldebug dlllflags conlibsmt -# | | ldebug dlllflags olelibsmt -# --------------------------------------------------------------------------- -# DLL with DLL | cdebug cflags cvarsdll | ldebug dlllflags guilibsdll -# version of CRT | | ldebug dlllflags conlibsdll -# (MSVCRT.DLL) | | ldebug dlllflags olelibsdll -# --------------------------------------------------------------------------- -# -# * Always make DLLs multithreaded because a DLL has no way to know whether -# the calling application has multiple threads, and has no way to prevent -# multithreaded apps from loading it. -# -# To specify an Intel x86 build that defaults to stdcall, add scall to the -# list of compiler options. -# -# ========================================================================= - -!IFNDEF _WIN32_MAK_ -_WIN32_MAK_ = 1 - -# ------------------------------------------------------------------------- -# Get CPU Type - exit if CPU environment variable is not defined -# ------------------------------------------------------------------------- - -# Win95 does not define PROCESSOR_ARCHITECTURE - default to i386 - -!IF "$(PROCESSOR_ARCHITECTURE)" == "" -CPU=i386 -PROCESSOR_ARCHITECTURE=x86 -!endif - -!IF !DEFINED(CPU) || "$(CPU)" == "" -CPU = $(PROCESSOR_ARCHITECTURE) -!ENDIF # CPU - -# if PROCESSOR_ARCHITECTURE was x86 or X86 change CPU to i386 - -!IF ( "$(CPU)" == "X86" ) || ( "$(CPU)" == "x86" ) -CPU = i386 -!ENDIF # CPU == X86 - -!IF "$(CPU)" != "i386" -!IF "$(CPU)" != "IA64" -!IF "$(CPU)" != "AMD64" -!ERROR Must specify CPU environment variable ( CPU=i386, CPU=IA64, CPU=AMD64) -!ENDIF -!ENDIF -!ENDIF - - -# ------------------------------------------------------------------------- -# Get Target Operating System - Default to WINNT -# ------------------------------------------------------------------------- -!IFNDEF TARGETOS -TARGETOS = WINNT -!ENDIF - -!IF "$(TARGETOS)" != "WINNT" -!IF "$(TARGETOS)" != "WIN95" -!IF "$(TARGETOS)" != "BOTH" -!ERROR Must specify TARGETOS environment variable (BOTH, WIN95, WINNT) -!ENDIF -!ENDIF -!ENDIF - -# default to APPVER of 5.0 - -!IFNDEF APPVER -APPVER = 5.0 -!ENDIF - -!IF "$(APPVER)" != "6.1" -!IF "$(APPVER)" != "6.0" -!IF "$(APPVER)" != "5.02" -!IF "$(APPVER)" != "5.01" -!IF "$(APPVER)" != "5.0" -!IF "$(APPVER)" != "4.0" -!ERROR Must specify APPVER environment variable (4.0, 5.0, 5.01, 5.02, 6.0, 6.1) -!ENDIF -!ENDIF -!ENDIF -!ENDIF -!ENDIF -!ENDIF - -!IF "$(APPVER)" =="6.1" -!IFNDEF _WIN32_IE -_WIN32_IE = 0x0800 -!ENDIF # _WIN32_IE -!ENDIF # APPVER == 6.1 - -!IF "$(APPVER)" =="6.0" -!IFNDEF _WIN32_IE -_WIN32_IE = 0x0700 -!ENDIF # _WIN32_IE -!ENDIF # APPVER == 6.0 - -!IF "$(APPVER)" =="5.0" -!IFNDEF _WIN32_IE -_WIN32_IE = 0x0500 -!ENDIF # _WIN32_IE -!ENDIF # APPVER == 5.0 - -!IF "$(APPVER)" =="5.01" -!IFNDEF _WIN32_IE -_WIN32_IE = 0x0600 -!ENDIF # _WIN32_IE -!ENDIF # APPVER == 5.01 - -!IF "$(APPVER)" =="5.02" -!IFNDEF _WIN32_IE -_WIN32_IE = 0x0600 -!ENDIF # _WIN32_IE -!ENDIF # APPVER == 5.02 - -!IFNDEF _WIN32_IE -_WIN32_IE = 0x0400 -!ENDIF - -# ------------------------------------------------------------------------- -# Build tool declarations common to all platforms -# Check to see if Cole Porter is used, otherwise use C/C++ compiler -# ------------------------------------------------------------------------- - -cc = cl -link = link -implib = lib - -midl = midl -rc = Rc -hc = Start /Wait Hcrtf -mc = Mc - -hcvars = -xn - -# ------------------------------------------------------------------------- -# Platform Dependent Compile Flags - must be specified after $(cc) -# -# Note: Debug switches are on by default for current release -# -# These switches set code generation and debugging options for the compiler. -# They also set macros used for conditional compilation. -# -# The debugging switches allow for source level debugging with WinDebug or -# Microsoft Visual C++. -# -# Common compiler flags: -# -c - compile without linking -# -W3 - Set warning level to level 3 (-W4 for 64-bit compilations) -# -Zi - generate debugging information -# -Od - disable all optimizations -# -Ox - use maximum optimizations -# -Zd - generate only public symbols and line numbers for debugging -# -GS - enable security checks -# -# i386 specific compiler flags: -# -Gz - stdcall (only if scall is added to makefile's compiler build rules) -# -# ------------------------------------------------------------------------- - -# declarations common to all compiler options -ccommon = -c -DCRTAPI1=_cdecl -DCRTAPI2=_cdecl -nologo -GS - -# for compatibility with old source code, map {try, except, leave, finally} -# to their proper names (i.e. prefaced by "__") -!IFDEF SEHMAP -ccommon = $(ccommon) -FIsehmap.h -!ENDIF - -!IF "$(TARGETLANG)" == "LANG_JAPANESE" -ccommon = $(ccommon) -DJAPAN -DDBCS -DFE_IME -!ENDIF - -!IF "$(TARGETLANG)" == "LANG_CHINESE" -ccommon = $(ccommon) -DDBCS -DFE_IME -!ENDIF - -!IF "$(TARGETLANG)" == "LANG_KOREAN" -ccommon = $(ccommon) -DDBCS -DFE_IME -!ENDIF - -!IF "$(CPU)" == "i386" -cflags = $(ccommon) -D_X86_=1 -DWIN32 -D_WIN32 -W3 -scall = -Gz - -!ELSEIF "$(CPU)" == "IA64" -cflags = $(ccommon) -D_IA64_=1 -DWIN64 -D_WIN64 -DWIN32 -D_WIN32 -cflags = $(cflags) -W4 -scall = - -!ELSEIF "$(CPU)" == "AMD64" -cflags = $(ccommon) -D_AMD64_=1 -DWIN64 -D_WIN64 -DWIN32 -D_WIN32 -cflags = $(cflags) -W4 -scall = - -!ENDIF - - -!IF "$(APPVER)" == "4.0" -NMAKE_WINVER = 0x0400 -!ELSEIF "$(APPVER)" == "5.0" -NMAKE_WINVER = 0x0500 -!ELSEIF "$(APPVER)" == "5.01" -NMAKE_WINVER = 0x0501 -!ELSEIF "$(APPVER)" == "5.02" -NMAKE_WINVER = 0x0502 -!ELSEIF "$(APPVER)" == "6.0" -NMAKE_WINVER = 0x0600 -!ELSEIF "$(APPVER)" == "6.1" -NMAKE_WINVER = 0x0601 -!ENDIF - -!IF "$(TARGETOS)" == "WINNT" -cflags = $(cflags) -D_WINNT -D_WIN32_WINNT=$(NMAKE_WINVER) -DNTDDI_VERSION=$(NMAKE_WINVER)0000 -!ENDIF - -!IF "$(TARGETOS)" == "WIN95" -cflags = $(cflags) -D_WIN95 -D_WIN32_WINDOWS=$(NMAKE_WINVER) /D_WIN32_DCOM -!ENDIF - -# regardless of the TARGET OS, define compile time WINVER to match APPVER macro -cflags = $(cflags) -D_WIN32_IE=$(_WIN32_IE) -DWINVER=$(NMAKE_WINVER) - - -# Set debugging options - -!IF "$(CPU)" != "IA64" -!IFDEF NODEBUG -cdebug = -Ox -DNDEBUG -!ELSE IFDEF PROFILE -cdebug = -Gh -Ox -DNDEBUG -!ELSE IFDEF TUNE -cdebug = -Gh -Ox -DNDEBUG -!ELSE -cdebug = -Zi -Od -DDEBUG -Fdlibjpeg.pdb -!ENDIF - -!ELSE - -!IFDEF NODEBUG -cdebug = -Ox -DNDEBUG -!ELSE -cdebug = -Zi -Od -DDEBUG -Fdlibjpeg.pdb -!ENDIF - -!ENDIF - -# ------------------------------------------------------------------------- -# Target Module & Subsystem Dependent Compile Defined Variables - must be -# specified after $(cc) -# -# The following table indicates the various acceptable combinations of -# the C Run-Time libraries LIBC, LIBCMT, and MSVCRT respect to the creation -# of a EXE and/or DLL target object. The appropriate compiler flag macros -# that should be used for each combination are also listed. -# -# Executable Type C Runtime Lib Compiler switch -# ------------------------------------------------------------- -# Single threaded app static CRT CVARS * -# Single-threaded app DLL CRT CVARSDLL -# Multi-threaded app static CRT CVARSMT * -# Multi-threaded app DLL CRT CVARSDLL * -# -# Single threaded DLL static CRT CVARS -# Single-threaded DLL DLL CRT CVARSDLL -# Multi-threaded DLL static CRT CVARSMT * -# Multi-threaded DLL DLL CRT CVARSDLL * -# -# * - Denotes the Recommended Configuration -# -# When building single-threaded applications you can link your executable -# with either LIBC, LIBCMT, or MSVCRT, although LIBC will provide the best -# performance. -# -# When building multi-threaded applications, either LIBCMT or MSVCRT can -# be used as the C-Runtime library, as both are multi-thread safe. -# -# Note: Any executable which accesses a DLL linked with MSVCRT.LIB must -# also link with MSVCRT.LIB instead of LIBC.LIB or LIBCMT.LIB. -# When using DLLs, it is recommended that all of the modules be -# linked with MSVCRT.LIB. -# -# Note: The macros of the form xDLL are used when linking the object with -# the DLL version of the C Run-Time (that is, MSVCRT.LIB). They are -# not used when the target object is itself a DLL. -# -# ------------------------------------------------------------------------- - -!IFDEF NO_ANSI -noansi = -DNULL=0 -!ENDIF - - -# for Windows applications that use the C Run-Time libraries -!IFDEF NODEBUG -cvarsmt = $(noansi) -D_MT -MT -cvars = $(cvarsmt) -cvarsdll = $(noansi) -D_MT -D_DLL -MD -!ELSE -cvarsmt = $(noansi) -D_MT -MTd -cvars = $(cvarsmt) -cvarsdll = $(noansi) -D_MT -D_DLL -MDd -!ENDIF - - -# for compatibility with older-style makefiles -cvarsmtdll = $(cvarsdll) - -# for POSIX applications -psxvars = -D_POSIX_ - -# resource compiler -rcflags = /r -!ifdef NODEBUG -rcvars = -DWIN32 -D_WIN32 -DWINVER=$(NMAKE_WINVER) $(noansi) -!else -rcvars = -DWIN32 -D_WIN32 -DWINVER=$(NMAKE_WINVER) -DDEBUG -D_DEBUG $(noansi) -!endif - - -!IF "$(TARGETLANG)" == "LANG_JAPANESE" -rcflags = $(rcflags) /c932 -rcvars = $(rcvars) -DJAPAN -DDBCS -DFE_IME -!ENDIF - -!IF "$(TARGETLANG)" == "LANG_CHINESE" -rcvars = $(rcvars) -DDBCS -DFE_IME -!ENDIF - -!IF "$(TARGETLANG)" == "LANG_KOREAN" -rcvars = $(rcvars) -DDBCS -DFE_IME -!ENDIF - - -# ------------------------------------------------------------------------- -# Platform Dependent MIDL Flags - must be specified after midl -# -# -# ------------------------------------------------------------------------- -!IF "$(TARGETOS)" == "WIN95" -MIDL_OPTIMIZATION=-target NT40 -!ELSEIF "$(TARGETOS)" == "WINNT" -!IF "$(APPVER)" == "5.0" -MIDL_OPTIMIZATION=-target NT50 -!ELSEIF "$(APPVER)" == "6.0" -MIDL_OPTIMIZATION=-target NT60 -!ELSEIF "$(APPVER)" == "6.1" -MIDL_OPTIMIZATION=-target NT61 -!ELSEIF "$(APPVER)" == "5.01" -MIDL_OPTIMIZATION=-target NT51 -!ELSEIF "$(APPVER)" == "5.02" -MIDL_OPTIMIZATION=-target NT51 -!ELSEIF "$(APPVER)" == "4.0" -MIDL_OPTIMIZATION=-target NT40 -!ENDIF -!ENDIF - -!IF "$(CPU)" == "IA64" -MIDL_OPTIMIZATION = $(MIDL_OPTIMIZATION) /ia64 -!ELSEIF "$(CPU)" == "AMD64" -MIDL_OPTIMIZATION = $(MIDL_OPTIMIZATION) /x64 -!ELSE -MIDL_OPTIMIZATION = $(MIDL_OPTIMIZATION) /win32 -!ENDIF - -!IF ("$(TARGETOS)" == "WINNT" ) && ("$(APPVER)" != "4.0") -MIDL_OPTIMIZATION = $(MIDL_OPTIMIZATION) /robust -!ENDIF - - - -# ------------------------------------------------------------------------- -# Platform Dependent Link Flags - must be specified after $(link) -# -# Note: $(DLLENTRY) should be appended to each -entry: flag on the link -# line. -# -# Note: When creating a DLL that uses C Run-Time functions it is -# recommended to include the entry point function of the name DllMain -# in the DLL's source code. Also, the MAKEFILE should include the -# -entry:_DllMainCRTStartup$(DLLENTRY) option for the creation of -# this DLL. (The C Run-Time entry point _DllMainCRTStartup in turn -# calls the DLL defined DllMain entry point.) -# -# ------------------------------------------------------------------------- - -# declarations common to all linker options -lflags = $(lflags) /INCREMENTAL:NO /NOLOGO - -# declarations for use on Intel x86 systems -!IF "$(CPU)" == "i386" -DLLENTRY = @12 -!ENDIF - -# declarations for use on Intel Architecture 64-bit systems -!IF "$(CPU)" == "IA64" -DLLENTRY = -!ENDIF - -# declarations for use on AMD64 systems -!IF "$(CPU)" == "AMD64" -DLLENTRY = -!ENDIF - - -# ------------------------------------------------------------------------- -# Target Module Dependent Link Debug Flags - must be specified after $(link) -# -# These switches allow the inclusion of the necessary symbolic information -# for source level debugging with WinDebug, profiling and/or performance -# tuning. -# -# Note: Debug switches are on by default. -# ------------------------------------------------------------------------- - -!IF "$(CPU)" == "i386" - -!IFDEF NODEBUG -ldebug = /RELEASE -!ELSE -ldebug = /DEBUG /DEBUGTYPE:cv -!ENDIF - -!ELSE - -!IFDEF NODEBUG -ldebug = /RELEASE -!ELSE IFDEF PROFILE -ldebug = /DEBUG:mapped,partial /DEBUGTYPE:coff -!ELSE IFDEF TUNE -ldebug = /DEBUG:mapped,partial /DEBUGTYPE:coff -!ELSE -ldebug = /DEBUG /DEBUGTYPE:cv -!ENDIF - -!ENDIF - -# for compatibility with older-style makefiles -linkdebug = $(ldebug) - - -# ------------------------------------------------------------------------- -# Subsystem Dependent Link Flags - must be specified after $(link) -# -# These switches allow for source level debugging with WinDebug for local -# and global variables. They also provide the standard application type and -# entry point declarations. -# -# Note that on x86 screensavers have a WinMain entrypoint, but on RISC -# platforms it is main. This is a Win95 compatibility issue. -# -# ------------------------------------------------------------------------- - -# Windows 98 needs subsystem version set to 4.10 for version 5.0 features. -!IF ("$(APPVER)" == "5.0") && (("$(TARGETOS)" == "BOTH") || ("$(TARGETOS)" == "WIN95")) -EXEVER = 4.10 -!ELSE -EXEVER = $(APPVER) -!ENDIF - - -# --------------------------------------------- - -# for Windows applications -conlflags = $(lflags) -subsystem:console,$(EXEVER) -guilflags = $(lflags) -subsystem:windows,$(EXEVER) -dlllflags = $(lflags) -entry:_DllMainCRTStartup$(DLLENTRY) -dll - -# For screen savers -!IF "$(CPU)" == "i386" -savlflags = $(lflags) -subsystem:windows,$(EXEVER) -entry:WinMainCRTStartup -!ELSE -savlflags = $(lflags) -subsystem:windows,$(EXEVER) -entry:mainCRTStartup -!ENDIF - -# for POSIX applications -psxlflags = $(lflags) -subsystem:posix -entry:__PosixProcessStartup - -# for compatibility with older-style makefiles -conflags = $(conlflags) -guiflags = $(guilflags) -psxflags = $(psxlflags) - -# ------------------------------------------------------------------------- -# C Run-Time Target Module Dependent Link Libraries -# -# Note: For POSIX applications, link with $(psxlibs). -# ------------------------------------------------------------------------- - -# for POSIX applications -psxlibs = libcpsx.lib psxdll.lib psxrtl.lib oldnames.lib - - -# optional profiling and tuning libraries -!IF "$(CPU)" != "IA64" - -!IFDEF PROFILE -optlibs = cap.lib -!ELSE IFDEF TUNE -optlibs = wst.lib -!ELSE -optlibs = -!ENDIF - -!ELSE -optlibs = -!ENDIF - -# if building for basic Windows 95, use WinSock1, else use WinSock2 -!IF "$(TARGETOS)" == "WIN95" -!IF "$(APPVER)" == "4.0" -winsocklibs = wsock32.lib -!ELSE -winsocklibs = ws2_32.lib mswsock.lib -!ENDIF -!ELSE -winsocklibs = ws2_32.lib mswsock.lib -!ENDIF - - -# basic subsystem specific libraries, less the C Run-Time -baselibs = kernel32.lib $(optlibs) $(winsocklibs) advapi32.lib -winlibs = $(baselibs) user32.lib gdi32.lib comdlg32.lib winspool.lib - -# for Windows applications that use the C Run-Time libraries -conlibs = $(baselibs) -guilibs = $(winlibs) - -# for OLE applications -olelibs = ole32.lib uuid.lib oleaut32.lib $(guilibs) - -#for backwards compatibility -conlibsmt = $(conlibs) -conlibsdll = $(conlibs) -guilibsmt = $(guilibs) -guilibsdll = $(guilibs) -olelibsmt = $(olelibs) -olelibsdll = $(olelibs) - -# for backward compatibility -ole2libs = $(olelibs) -ole2libsmt = $(olelibsmt) -ole2libsdll = $(olelibsdll) - -# Visual Basic -bc = vb6 -bc_exe = /Make -bc_dll = /Makedll - -# Set the Output Directory -!IF ("$(APPVER)" == "6.1") -OUTDIR=WIN7 -!ELSEIF ("$(APPVER)" == "6.0") -OUTDIR=Vista -!ELSEIF "$(APPVER)" == "5.0" -OUTDIR=WIN2000 -!ELSEIF "$(APPVER)" == "5.01" -OUTDIR=XP32 -!ELSEIF "$(APPVER)" == "5.02" -OUTDIR=SRV2003 -!ELSEIF "$(APPVER)" == "4.0" -OUTDIR=NT4 -!ENDIF - -!IF "$(CPU)" == "AMD64" -OUTDIR=$(OUTDIR)_X64 -!ELSEIF "$(CPU)" == "IA64" -OUTDIR=$(OUTDIR)_64 -!ENDIF - -#set Prerelease Out directories -!IF "$(SDKPRERELEASE)" == "1" -OUTDIR=PRE_$(OUTDIR) -!ENDIF - -#Set DEBUG -!IF "$(NODEBUG)" == "" -OUTDIR=$(OUTDIR)_DEBUG -!ELSE -OUTDIR=$(OUTDIR)_RETAIL -!ENDIF - -!IF "$(OS)" == "Windows_NT" -CLEANUP=if exist $(OUTDIR)/$(NULL) rd /s /q $(OUTDIR) -!ELSE -CLEANUP=deltree /y $(OUTDIR) -!ENDIF - -VC6MSG=This sample only compiles with Microsoft Visual C++ 6.0. \ - To compile this run vcvars32.bat for Visual C++ 6.0, and setenv.bat in $(MSSDK). - -WIN64MSG=This sample is currently not supported on the 64 bit platform. - -#ENDIF _WIN32_MAK_ -!ENDIF diff --git a/recipes/libjpeg/all/conandata.yml b/recipes/libjpeg/all/conandata.yml index b147d8fb1dd7d..c16f5b9d9e4d8 100644 --- a/recipes/libjpeg/all/conandata.yml +++ b/recipes/libjpeg/all/conandata.yml @@ -1,14 +1,18 @@ sources: + "9f": + url: "https://ijg.org/files/jpegsrc.v9f.tar.gz" + sha256: "04705c110cb2469caa79fb71fba3d7bf834914706e9641a4589485c1f832565b" "9e": - url: "http://ijg.org/files/jpegsrc.v9e.tar.gz" + url: "https://ijg.org/files/jpegsrc.v9e.tar.gz" sha256: "4077d6a6a75aeb01884f708919d25934c93305e49f7e3f36db9129320e6f4f3d" "9d": - url: "http://ijg.org/files/jpegsrc.v9d.tar.gz" + url: "https://ijg.org/files/jpegsrc.v9d.tar.gz" sha256: "2303a6acfb6cc533e0e86e8a9d29f7e6079e118b9de3f96e07a71a11c082fa6a" - "9c": - url: "http://ijg.org/files/jpegsrc.v9c.tar.gz" - sha256: "682aee469c3ca857c4c38c37a6edadbfca4b04d42e56613b11590ec6aa4a278d" patches: + "9f": + - patch_file: "patches/0001-9f-libjpeg-add-msvc-dll-support.patch" + patch_description: "Add support to generate DLL on Windows" + patch_type: "portability" "9e": - patch_file: "patches/0001-9e-libjpeg-add-msvc-dll-support.patch" patch_description: "Add support to generate DLL on Windows" @@ -17,7 +21,3 @@ patches: - patch_file: "patches/0001-libjpeg-add-msvc-dll-support.patch" patch_description: "Add support to generate DLL on Windows" patch_type: "portability" - "9c": - - patch_file: "patches/0001-libjpeg-add-msvc-dll-support.patch" - patch_description: "Add support to generate DLL on Windows" - patch_type: "portability" diff --git a/recipes/libjpeg/all/conanfile.py b/recipes/libjpeg/all/conanfile.py index dd93ec3f8004c..e5205d93bc015 100644 --- a/recipes/libjpeg/all/conanfile.py +++ b/recipes/libjpeg/all/conanfile.py @@ -1,13 +1,13 @@ from conan import ConanFile +from conan.errors import ConanInvalidConfiguration from conan.tools.apple import fix_apple_shared_install_name -from conan.tools.env import Environment, VirtualBuildEnv +from conan.tools.env import VirtualBuildEnv from conan.tools.files import apply_conandata_patches, chdir, copy, export_conandata_patches, get, load, replace_in_file, rm, rmdir, save from conan.tools.gnu import Autotools, AutotoolsToolchain from conan.tools.layout import basic_layout -from conan.tools.microsoft import is_msvc, is_msvc_static_runtime, NMakeToolchain +from conan.tools.microsoft import MSBuild, MSBuildToolchain import os import re -import shutil required_conan_version = ">=1.55.0" @@ -32,15 +32,14 @@ class LibjpegConan(ConanFile): } @property - def _is_clang_cl(self): - return self.settings.os == "Windows" and self.settings.compiler == "clang" + def _is_cl_like(self): + return self.settings.compiler.get_safe("runtime") is not None @property def _settings_build(self): return getattr(self, "settings_build", self.settings) def export_sources(self): - copy(self, "Win32.Mak", src=self.recipe_folder, dst=self.export_sources_folder) export_conandata_patches(self) def config_options(self): @@ -53,11 +52,15 @@ def configure(self): self.settings.rm_safe("compiler.cppstd") self.settings.rm_safe("compiler.libcxx") + def validate(self): + if self.version == "9d" and self.settings.os == "Windows" and self.settings.arch == "armv8": + raise ConanInvalidConfiguration("This version of libjpeg does not support ARM64, please use a newer version") + def layout(self): basic_layout(self, src_folder="src") def build_requirements(self): - if self._settings_build.os == "Windows" and not (is_msvc(self) or self. _is_clang_cl): + if self._settings_build.os == "Windows" and not self._is_cl_like: self.win_bash = True if not self.conf.get("tools.microsoft.bash:path", check_type=str): self.tool_requires("msys2/cci.latest") @@ -66,14 +69,11 @@ def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) def generate(self): - if is_msvc(self) or self._is_clang_cl: - # clean environment variables that might affect on the build (e.g. if set by Jenkins) - env = Environment() - env.define("PROFILE", None) - env.define("TUNE", None) - env.define("NODEBUG", None) - env.vars(self).save_script("conanbuildenv_nmake_unset_env") - tc = NMakeToolchain(self) + if self._is_cl_like: + tc = MSBuildToolchain(self) + tc.cflags.append("-DLIBJPEG_BUILDING") + if not self.options.shared: + tc.cflags.append(" -DLIBJPEG_STATIC") tc.generate() else: env = VirtualBuildEnv(self) @@ -82,46 +82,65 @@ def generate(self): tc.extra_defines.append("LIBJPEG_BUILDING") tc.generate() - def _build_nmake(self): - copy(self, "Win32.Mak", src=os.path.join(self.source_folder, os.pardir), dst=self.source_folder) - with chdir(self, self.source_folder): - # export symbols if shared - replace_in_file( - self, - "Win32.Mak", - "\nccommon = -c ", - "\nccommon = -c -DLIBJPEG_BUILDING {}".format("" if self.options.shared else "-DLIBJPEG_STATIC "), - ) - shutil.copy("jconfig.vc", "jconfig.h") - make_args = [ - "nodebug=1" if self.settings.build_type != "Debug" else "", - ] - if self._is_clang_cl: - compilers_from_conf = self.conf.get("tools.build:compiler_executables", default={}, check_type=dict) - buildenv_vars = VirtualBuildEnv(self).vars() - cl = compilers_from_conf.get("c", buildenv_vars.get("CC", "clang-cl")) - link = buildenv_vars.get("LD", "lld-link") - lib = buildenv_vars.get("AR", "llvm-lib") - rc = compilers_from_conf.get("rc", buildenv_vars.get("RC", "llvm-rc")) - replace_in_file(self, "Win32.Mak", "cc = cl", f"cc = {cl}") - replace_in_file(self, "Win32.Mak", "link = link", f"link = {link}") - replace_in_file(self, "Win32.Mak", "implib = lib", f"implib = {lib}") - replace_in_file(self, "Win32.Mak", "rc = Rc", f"rc = {rc}") - # set flags directly in makefile.vc - # cflags are critical for the library. ldflags and ldlibs are only for binaries - if is_msvc_static_runtime(self): - replace_in_file(self, "makefile.vc", "(cvars)", "(cvarsmt)") - replace_in_file(self, "makefile.vc", "(conlibs)", "(conlibsmt)") - else: - replace_in_file(self, "makefile.vc", "(cvars)", "(cvarsdll)") - replace_in_file(self, "makefile.vc", "(conlibs)", "(conlibsdll)") - target = "{}/libjpeg.lib".format("shared" if self.options.shared else "static") - self.run("nmake -f makefile.vc {} {}".format(" ".join(make_args), target)) - def build(self): apply_conandata_patches(self) - if is_msvc(self) or self._is_clang_cl: - self._build_nmake() + if self._is_cl_like: + with chdir(self, self.source_folder): + self.run("nmake /f makefile.vs setupcopy-v16") + + # Rename target to 'libjpeg.lib' to match legacy behaviour (otherwise we break backwards compatibility) + # static: "libjpeg.lib" + # shared: "libjpeg.lib" (import), "libjpeg-9.dll" (DLL) + jpeg_vcxproj = os.path.join(self.source_folder, "jpeg.vcxproj") + target_name = "libjpeg-9" if self.options.shared else "libjpeg" + replace_in_file(self, jpeg_vcxproj, """""", + f""" {target_name} + """) + if self.options.shared: + replace_in_file(self, jpeg_vcxproj, "", + "$(OutDir)libjpeg.lib") + + # Support static/shared + if self.options.shared: + replace_in_file(self, jpeg_vcxproj, + "StaticLibrary", + "DynamicLibrary" + ) + + # Don't force LTO + replace_in_file(self, jpeg_vcxproj, "true", "") + + # Inject conan-generated .props file + # Note: importing it right before Microsoft.Cpp.props also ensures we correctly + # handle the toolset setting + conantoolchain_props = os.path.join(self.generators_folder, MSBuildToolchain.filename) + replace_in_file( + self, jpeg_vcxproj, + """""", + f"""""", + ) + + # Patch settings for a different build type + if self.settings.build_type is not "Release": + replacements = { + "Release": str(self.settings.build_type) + } + if self.settings.build_type == "Debug": + replacements.update({ + "Full": "Disabled", + "NDEBUG;": "_DEBUG;", + }) + for key, value in replacements.items(): + replace_in_file(self, jpeg_vcxproj, key, value) + + replace_in_file(self, os.path.join(self.source_folder, "jpeg.sln"), "Release", str(self.settings.build_type)) + + msbuild = MSBuild(self) + if self.settings.arch == "x86": + # This .sln uses "Win32" instead of the usual "x86" + # as the solution platform, so need to override this + msbuild.platform = "Win32" + msbuild.build(sln="jpeg.sln") else: autotools = Autotools(self) autotools.configure() @@ -129,7 +148,7 @@ def build(self): def package(self): copy(self, "README", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) - if is_msvc(self) or self._is_clang_cl: + if self._is_cl_like: for filename in ["jpeglib.h", "jerror.h", "jconfig.h", "jmorecfg.h"]: copy(self, filename, src=self.source_folder, dst=os.path.join(self.package_folder, "include"), keep_path=False) @@ -164,7 +183,7 @@ def package_info(self): self.cpp_info.set_property("cmake_file_name", "JPEG") self.cpp_info.set_property("cmake_target_name", "JPEG::JPEG") self.cpp_info.set_property("pkg_config_name", "libjpeg") - prefix = "lib" if is_msvc(self) or self._is_clang_cl else "" + prefix = "lib" if self._is_cl_like else "" self.cpp_info.libs = [f"{prefix}jpeg"] self.cpp_info.resdirs = ["res"] if not self.options.shared: diff --git a/recipes/libjpeg/all/patches/0001-9f-libjpeg-add-msvc-dll-support.patch b/recipes/libjpeg/all/patches/0001-9f-libjpeg-add-msvc-dll-support.patch new file mode 100644 index 0000000000000..ac2d14df61117 --- /dev/null +++ b/recipes/libjpeg/all/patches/0001-9f-libjpeg-add-msvc-dll-support.patch @@ -0,0 +1,31 @@ +--- jmorecfg.h ++++ jmorecfg.h +@@ -238,14 +238,26 @@ + * or code profilers that require it. + */ + ++#if defined(_MSC_VER) ++#if defined(LIBJPEG_STATIC) ++#define LIBJPEG_EXPORTS ++#elif !defined(LIBJPEG_BUILDING) ++#define LIBJPEG_EXPORTS __declspec(dllimport) ++#else ++#define LIBJPEG_EXPORTS __declspec(dllexport) ++#endif ++#else ++#define LIBJPEG_EXPORTS ++#endif ++ + /* a function called through method pointers: */ + #define METHODDEF(type) static type + /* a function used only in its module: */ + #define LOCAL(type) static type + /* a function referenced thru EXTERNs: */ +-#define GLOBAL(type) type ++#define GLOBAL(type) LIBJPEG_EXPORTS type + /* a reference to a GLOBAL function: */ +-#define EXTERN(type) extern type ++#define EXTERN(type) extern GLOBAL(type) + + + /* This macro is used to declare a "method", that is, a function pointer. diff --git a/recipes/libjpeg/all/test_package/CMakeLists.txt b/recipes/libjpeg/all/test_package/CMakeLists.txt index 7885c9011ac59..2506f77d5cc66 100644 --- a/recipes/libjpeg/all/test_package/CMakeLists.txt +++ b/recipes/libjpeg/all/test_package/CMakeLists.txt @@ -10,11 +10,3 @@ if (MSVC) target_compile_definitions(${PROJECT_NAME} PRIVATE _CRT_SECURE_NO_WARNINGS _CRT_NONSTDC_NO_WARNINGS) endif() -if(BUILD_TRANSUPP) - add_executable(test_transupp test_transupp.c ${LIBJPEG_RES_DIR}/transupp.c) - target_link_libraries(test_transupp PRIVATE JPEG::JPEG) - target_compile_features(test_transupp PRIVATE c_std_99) - if (MSVC) - target_compile_definitions(test_transupp PRIVATE _CRT_SECURE_NO_WARNINGS _CRT_NONSTDC_NO_WARNINGS) - endif() -endif() diff --git a/recipes/libjpeg/all/test_package/conanfile.py b/recipes/libjpeg/all/test_package/conanfile.py index 0243933ba22dd..4e22017cf1618 100644 --- a/recipes/libjpeg/all/test_package/conanfile.py +++ b/recipes/libjpeg/all/test_package/conanfile.py @@ -1,33 +1,20 @@ from conan import ConanFile from conan.tools.build import can_run -from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout -from conan.tools.microsoft import is_msvc, is_msvc_static_runtime +from conan.tools.cmake import CMake, cmake_layout import os class TestPackageConan(ConanFile): settings = "os", "arch", "compiler", "build_type" - generators = "CMakeDeps", "VirtualRunEnv" + generators = "CMakeDeps", "VirtualRunEnv", "CMakeToolchain" test_type = "explicit" - @property - def _build_transupp(self): - # transupp+libjpeg makes use of stdio of the C library. This cannot be used when using a dll libjpeg, built with a static c library. - return not (self.dependencies["libjpeg"].options.shared and is_msvc(self) and is_msvc_static_runtime(self)) - def layout(self): cmake_layout(self) def requirements(self): self.requires(self.tested_reference_str) - def generate(self): - tc = CMakeToolchain(self) - tc.variables["BUILD_TRANSUPP"] = self._build_transupp - if self._build_transupp: - tc.variables["LIBJPEG_RES_DIR"] = self.dependencies["libjpeg"].cpp_info.resdirs[0].replace("\\", "/") - tc.generate() - def build(self): cmake = CMake(self) cmake.configure() @@ -36,9 +23,4 @@ def build(self): def test(self): if can_run(self): bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") - img_name = os.path.join(self.source_folder, "testimg.jpg") - self.run(f"{bin_path} {img_name}", env="conanrun") - test_transupp_path = os.path.join(self.cpp.build.bindirs[0], "test_transupp") - if os.path.exists(test_transupp_path): - out_img = os.path.join(self.build_folder, "outimg.jpg") - self.run(f"{test_transupp_path} {img_name} {out_img}", env="conanrun") + self.run(f"{bin_path}", env="conanrun") diff --git a/recipes/libjpeg/all/test_package/test_package.c b/recipes/libjpeg/all/test_package/test_package.c index 2f94478d7ef6f..d23690dd29b19 100644 --- a/recipes/libjpeg/all/test_package/test_package.c +++ b/recipes/libjpeg/all/test_package/test_package.c @@ -1,528 +1,11 @@ -/* - * rdjpgcom.c - * - * Copyright (C) 1994-1997, Thomas G. Lane. - * Modified 2009 by Bill Allombert, Guido Vollbeding. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file contains a very simple stand-alone application that displays - * the text in COM (comment) markers in a JFIF file. - * This may be useful as an example of the minimum logic needed to parse - * JPEG markers. - */ - #include -#include -#include - -#define JPEG_CJPEG_DJPEG /* to get the command-line config symbols */ -#include "jpeglib.h" /* get auto-config symbols, */ - -#ifdef HAVE_LOCALE_H -#include /* Bill Allombert: use locale for isprint */ -#endif -#include /* to declare isupper(), tolower() */ -#ifdef USE_SETMODE -#include /* to declare setmode()'s parameter macros */ -/* If you have setmode() but not , just delete this line: */ -#include /* to declare setmode() */ -#endif - -#ifdef USE_CCOMMAND /* command-line reader for Macintosh */ -#ifdef __MWERKS__ -#include /* Metrowerks needs this */ -#include /* ... and this */ -#endif -#ifdef THINK_C -#include /* Think declares it here */ -#endif -#endif - -#ifdef DONT_USE_B_MODE /* define mode parameters for fopen() */ -#define READ_BINARY "r" -#else -#ifdef VMS /* VMS is very nonstandard */ -#define READ_BINARY "rb", "ctx=stm" -#else /* standard ANSI-compliant case */ -#define READ_BINARY "rb" -#endif -#endif - -#ifndef EXIT_FAILURE /* define exit() codes if not provided */ -#define EXIT_FAILURE 1 -#endif -#ifndef EXIT_SUCCESS -#ifdef VMS -#define EXIT_SUCCESS 1 /* VMS is very nonstandard */ -#else -#define EXIT_SUCCESS 0 -#endif -#endif - -/* - * These macros are used to read the input file. - * To reuse this code in another application, you might need to change these. - */ - -static FILE *infile; /* input JPEG file */ - -/* Return next input byte, or EOF if no more */ -#define NEXTBYTE() getc(infile) - -/* Error exit handler */ -#define ERREXIT(msg) (fprintf(stderr, "%s\n", msg), exit(EXIT_FAILURE)) - -/* Read one byte, testing for EOF */ -static int read_1_byte(void) { - int c; - - c = NEXTBYTE(); - if (c == EOF) - ERREXIT("Premature EOF in JPEG file"); - return c; -} - -/* Read 2 bytes, convert to unsigned int */ -/* All 2-byte quantities in JPEG markers are MSB first */ -static unsigned int read_2_bytes(void) { - int c1, c2; - - c1 = NEXTBYTE(); - if (c1 == EOF) - ERREXIT("Premature EOF in JPEG file"); - c2 = NEXTBYTE(); - if (c2 == EOF) - ERREXIT("Premature EOF in JPEG file"); - return (((unsigned int)c1) << 8) + ((unsigned int)c2); -} - -/* - * JPEG markers consist of one or more 0xFF bytes, followed by a marker - * code byte (which is not an FF). Here are the marker codes of interest - * in this program. (See jdmarker.c for a more complete list.) - */ - -#define M_SOF0 0xC0 /* Start Of Frame N */ -#define M_SOF1 0xC1 /* N indicates which compression process */ -#define M_SOF2 0xC2 /* Only SOF0-SOF2 are now in common use */ -#define M_SOF3 0xC3 -#define M_SOF5 0xC5 /* NB: codes C4 and CC are NOT SOF markers */ -#define M_SOF6 0xC6 -#define M_SOF7 0xC7 -#define M_SOF9 0xC9 -#define M_SOF10 0xCA -#define M_SOF11 0xCB -#define M_SOF13 0xCD -#define M_SOF14 0xCE -#define M_SOF15 0xCF -#define M_SOI 0xD8 /* Start Of Image (beginning of datastream) */ -#define M_EOI 0xD9 /* End Of Image (end of datastream) */ -#define M_SOS 0xDA /* Start Of Scan (begins compressed data) */ -#define M_APP0 0xE0 /* Application-specific marker, type N */ -#define M_APP12 0xEC /* (we don't bother to list all 16 APPn's) */ -#define M_COM 0xFE /* COMment */ - -/* - * Find the next JPEG marker and return its marker code. - * We expect at least one FF byte, possibly more if the compressor used FFs - * to pad the file. - * There could also be non-FF garbage between markers. The treatment of such - * garbage is unspecified; we choose to skip over it but emit a warning msg. - * NB: this routine must not be used after seeing SOS marker, since it will - * not deal correctly with FF/00 sequences in the compressed image data... - */ - -static int next_marker(void) { - int c; - int discarded_bytes = 0; - - /* Find 0xFF byte; count and skip any non-FFs. */ - c = read_1_byte(); - while (c != 0xFF) { - discarded_bytes++; - c = read_1_byte(); - } - /* Get marker code byte, swallowing any duplicate FF bytes. Extra FFs - * are legal as pad bytes, so don't count them in discarded_bytes. - */ - do { - c = read_1_byte(); - } while (c == 0xFF); - - if (discarded_bytes != 0) { - fprintf(stderr, "Warning: garbage data found in JPEG file\n"); - } - - return c; -} - -/* - * Read the initial marker, which should be SOI. - * For a JFIF file, the first two bytes of the file should be literally - * 0xFF M_SOI. To be more general, we could use next_marker, but if the - * input file weren't actually JPEG at all, next_marker might read the whole - * file and then return a misleading error message... - */ - -static int first_marker(void) { - int c1, c2; - - c1 = NEXTBYTE(); - c2 = NEXTBYTE(); - if (c1 != 0xFF || c2 != M_SOI) - { - ERREXIT("Not a JPEG file"); - } - return c2; -} - -/* - * Most types of marker are followed by a variable-length parameter segment. - * This routine skips over the parameters for any marker we don't otherwise - * want to process. - * Note that we MUST skip the parameter segment explicitly in order not to - * be fooled by 0xFF bytes that might appear within the parameter segment; - * such bytes do NOT introduce new markers. - */ - -static void skip_variable(void) -/* Skip over an unknown or uninteresting variable-length marker */ -{ - unsigned int length; - - /* Get the marker parameter length count */ - length = read_2_bytes(); - /* Length includes itself, so must be at least 2 */ - if (length < 2) - ERREXIT("Erroneous JPEG marker length"); - length -= 2; - /* Skip over the remaining bytes */ - while (length > 0) { - (void)read_1_byte(); - length--; - } -} - -/* - * Process a COM marker. - * We want to print out the marker contents as legible text; - * we must guard against non-text junk and varying newline representations. - */ - -static void process_COM(int raw) { - unsigned int length; - int ch; - int lastch = 0; - -/* Bill Allombert: set locale properly for isprint */ -#ifdef HAVE_LOCALE_H - setlocale(LC_CTYPE, ""); -#endif - - /* Get the marker parameter length count */ - length = read_2_bytes(); - /* Length includes itself, so must be at least 2 */ - if (length < 2) - ERREXIT("Erroneous JPEG marker length"); - length -= 2; - - while (length > 0) { - ch = read_1_byte(); - if (raw) { - putc(ch, stdout); - /* Emit the character in a readable form. - * Nonprintables are converted to \nnn form, - * while \ is converted to \\. - * Newlines in CR, CR/LF, or LF form will be printed as one newline. - */ - } else if (ch == '\r') { - printf("\n"); - } else if (ch == '\n') { - if (lastch != '\r') - printf("\n"); - } else if (ch == '\\') { - printf("\\\\"); - } else if (isprint(ch)) { - putc(ch, stdout); - } else { - printf("\\%03o", ch); - } - lastch = ch; - length--; - } - printf("\n"); - -/* Bill Allombert: revert to C locale */ -#ifdef HAVE_LOCALE_H - setlocale(LC_CTYPE, "C"); -#endif -} - -/* - * Process a SOFn marker. - * This code is only needed if you want to know the image dimensions... - */ - -static void process_SOFn(int marker) { - unsigned int length; - unsigned int image_height, image_width; - int data_precision, num_components; - const char *process; - int ci; - - length = read_2_bytes(); /* usual parameter length count */ - - data_precision = read_1_byte(); - image_height = read_2_bytes(); - image_width = read_2_bytes(); - num_components = read_1_byte(); - - switch (marker) { - case M_SOF0: - process = "Baseline"; - break; - case M_SOF1: - process = "Extended sequential"; - break; - case M_SOF2: - process = "Progressive"; - break; - case M_SOF3: - process = "Lossless"; - break; - case M_SOF5: - process = "Differential sequential"; - break; - case M_SOF6: - process = "Differential progressive"; - break; - case M_SOF7: - process = "Differential lossless"; - break; - case M_SOF9: - process = "Extended sequential, arithmetic coding"; - break; - case M_SOF10: - process = "Progressive, arithmetic coding"; - break; - case M_SOF11: - process = "Lossless, arithmetic coding"; - break; - case M_SOF13: - process = "Differential sequential, arithmetic coding"; - break; - case M_SOF14: - process = "Differential progressive, arithmetic coding"; - break; - case M_SOF15: - process = "Differential lossless, arithmetic coding"; - break; - default: - process = "Unknown"; - break; - } - - printf("JPEG image is %uw * %uh, %d color components, %d bits per sample\n", - image_width, image_height, num_components, data_precision); - printf("JPEG process: %s\n", process); - - if (length != (unsigned int)(8 + num_components * 3)) - ERREXIT("Bogus SOF marker length"); - - for (ci = 0; ci < num_components; ci++) { - (void)read_1_byte(); /* Component ID code */ - (void)read_1_byte(); /* H, V sampling factors */ - (void)read_1_byte(); /* Quantization table number */ - } -} - -/* - * Parse the marker stream until SOS or EOI is seen; - * display any COM markers. - * While the companion program wrjpgcom will always insert COM markers before - * SOFn, other implementations might not, so we scan to SOS before stopping. - * If we were only interested in the image dimensions, we would stop at SOFn. - * (Conversely, if we only cared about COM markers, there would be no need - * for special code to handle SOFn; we could treat it like other markers.) - */ - -static int scan_JPEG_header(int verbose, int raw) { - int marker; - /* Expect SOI at start of file */ - if (first_marker() != M_SOI) - ERREXIT("Expected SOI marker first"); - - /* Scan miscellaneous markers until we reach SOS. */ - for (;;) { - marker = next_marker(); - switch (marker) { - /* Note that marker codes 0xC4, 0xC8, 0xCC are not, and must not be, - * treated as SOFn. C4 in particular is actually DHT. - */ - case M_SOF0: /* Baseline */ - case M_SOF1: /* Extended sequential, Huffman */ - case M_SOF2: /* Progressive, Huffman */ - case M_SOF3: /* Lossless, Huffman */ - case M_SOF5: /* Differential sequential, Huffman */ - case M_SOF6: /* Differential progressive, Huffman */ - case M_SOF7: /* Differential lossless, Huffman */ - case M_SOF9: /* Extended sequential, arithmetic */ - case M_SOF10: /* Progressive, arithmetic */ - case M_SOF11: /* Lossless, arithmetic */ - case M_SOF13: /* Differential sequential, arithmetic */ - case M_SOF14: /* Differential progressive, arithmetic */ - case M_SOF15: /* Differential lossless, arithmetic */ - if (verbose) - process_SOFn(marker); - else - skip_variable(); - break; - - case M_SOS: /* stop before hitting compressed data */ - return marker; - - case M_EOI: /* in case it's a tables-only JPEG stream */ - return marker; - - case M_COM: - process_COM(raw); - break; - - case M_APP12: - /* Some digital camera makers put useful textual information into - * APP12 markers, so we print those out too when in -verbose mode. - */ - if (verbose) { - printf("APP12 contains:\n"); - process_COM(raw); - } else - skip_variable(); - break; - - default: /* Anything else just gets skipped */ - skip_variable(); /* we assume it has a parameter count... */ - break; - } - } /* end loop */ -} - -/* Command line parsing code */ - -static const char *progname; /* program name for error messages */ - -static void usage(void) -/* complain about bad command line */ -{ - fprintf(stderr, "rdjpgcom displays any textual comments in a JPEG file.\n"); - - fprintf(stderr, "Usage: %s [switches] [inputfile]\n", progname); - - fprintf(stderr, "Switches (names may be abbreviated):\n"); - fprintf( - stderr, - " -raw Display non-printable characters in comments (unsafe)\n"); - fprintf(stderr, " -verbose Also display dimensions of JPEG image\n"); - - exit(EXIT_FAILURE); -} - -static int keymatch(char *arg, const char *keyword, int minchars) -/* Case-insensitive matching of (possibly abbreviated) keyword switches. */ -/* keyword is the constant keyword (must be lower case already), */ -/* minchars is length of minimum legal abbreviation. */ -{ - register int ca, ck; - register int nmatched = 0; - - while ((ca = *arg++) != '\0') { - if ((ck = *keyword++) == '\0') - return 0; /* arg longer than keyword, no good */ - if (isupper(ca)) /* force arg to lcase (assume ck is already) */ - ca = tolower(ca); - if (ca != ck) - return 0; /* no good */ - nmatched++; /* count matched characters */ - } - /* reached end of argument; fail if it's too short for unique abbrev */ - if (nmatched < minchars) - return 0; - return 1; /* A-OK */ -} - -/* - * The main program. - */ - -int main(int argc, char **argv) { - int argn; - char *arg; - int verbose = 1, raw = 0; - -/* On Mac, fetch a command line. */ -#ifdef USE_CCOMMAND - argc = ccommand(&argv); -#endif - - progname = argv[0]; - if (progname == NULL || progname[0] == 0) - progname = "rdjpgcom"; /* in case C library doesn't provide it */ - - /* Parse switches, if any */ - for (argn = 1; argn < argc; argn++) - { - arg = argv[argn]; - if (arg[0] != '-') - break; /* not switch, must be file name */ - arg++; /* advance over '-' */ - if (keymatch(arg, "verbose", 1)) - { - verbose++; - } - else if (keymatch(arg, "raw", 1)) - { - raw = 1; - } - else - usage(); - } - - /* Open the input file. */ - /* Unix style: expect zero or one file name */ - if (argn < argc - 1) - { - fprintf(stderr, "%s: only one input file\n", progname); - usage(); - } - if (argn < argc) - { - if ((infile = fopen(argv[argn], READ_BINARY)) == NULL) - { - fprintf(stderr, "%s: can't open %s\n", progname, argv[argn]); - exit(EXIT_FAILURE); - } - } - else if ((infile = fopen("testimg.jpg", READ_BINARY)) == NULL) - { -/* default input file is stdin */ -#ifdef USE_SETMODE /* need to hack file mode? */ - setmode(fileno(stdin), O_BINARY); -#endif -#ifdef USE_FDOPEN /* need to re-open in binary mode? */ - if ((infile = fdopen(fileno(stdin), READ_BINARY)) == NULL) - { - fprintf(stderr, "%s: can't open stdin\n", progname); - exit(EXIT_FAILURE); - } -#else - infile = stdin; -#endif - } - - /* Scan the JPEG headers. */ - (void)scan_JPEG_header(verbose, raw); - - /* All done. */ - exit(EXIT_SUCCESS); - return 0; /* suppress no-return-value warnings */ +#include "jpeglib.h" +#include "transupp.h" + +int main() { + struct jpeg_decompress_struct info; + struct jpeg_error_mgr err; + info.err = jpeg_std_error(&err); + jpeg_create_decompress(&info); + printf("libjpeg test successful\n"); } diff --git a/recipes/libjpeg/all/test_package/test_transupp.c b/recipes/libjpeg/all/test_package/test_transupp.c deleted file mode 100644 index 188c5655a0762..0000000000000 --- a/recipes/libjpeg/all/test_package/test_transupp.c +++ /dev/null @@ -1,96 +0,0 @@ -#include -#include -#include - -#include "jpeglib.h" -#include "jpegint.h" -#include "transupp.h" - -struct error_data { - struct jpeg_error_mgr pub; - const char *name; -}; - - -static void -my_error_handler(j_common_ptr cinfo) { - struct error_data *data = (struct error_data *) cinfo; - while(1) { - fprintf(stderr, "-"); - } - fprintf(stderr, "%s:\n", data->name); - fflush(stdout); - fflush(stderr); - (*cinfo->err->output_message) (cinfo); - exit(2); -} - -int main(int argc, char *argv[]) { - if (argc < 3) { - fprintf(stderr, "Usage: %s \n", argv[0]); - return 1; - } - - struct error_data err_in; - err_in.name = "input"; - err_in.pub.error_exit = my_error_handler; - - struct error_data err_out; - err_out.name = "output"; - err_out.pub.error_exit = my_error_handler; - - FILE *fin = fopen(argv[1], "rb"); - - struct jpeg_decompress_struct src; - struct jpeg_compress_struct dst; - - src.err = jpeg_std_error(&err_in.pub); - jpeg_create_decompress(&src); - - dst.err = jpeg_std_error(&err_in.pub); - jpeg_create_compress(&dst); - - jpeg_stdio_src(&src, fin); - - jcopy_markers_setup(&src, JCOPYOPT_ALL); - - (void)jpeg_read_header(&src, TRUE); - - jpeg_transform_info transform = { - .transform = JXFORM_ROT_180, - }; - - if ((src.image_width % 2) || (dst.image_height % 2)) { - fprintf(stderr, "The input image is odd-sized. The transform will not be correct.\n"); - } - - if (!jtransform_request_workspace(&src, &transform)) { - fprintf(stderr, "Can only transform odd-size images perfectly.\n"); - return 3; - } - - jvirt_barray_ptr *src_coeffs = jpeg_read_coefficients(&src); - jpeg_copy_critical_parameters(&src, &dst); - - jvirt_barray_ptr *dst_coefs = jtransform_adjust_parameters(&src, &dst, src_coeffs, &transform); - - - FILE *fout = fopen(argv[2], "wb"); - jpeg_stdio_dest(&dst, fout); - - jpeg_write_coefficients(&dst, dst_coefs); - - jcopy_markers_execute(&src, &dst, JCOPYOPT_ALL); - jtransform_execute_transformation(&src, &dst, src_coeffs, &transform); - - jpeg_finish_compress(&dst); - jpeg_destroy_compress(&dst); - fclose(fout); - - jpeg_finish_decompress(&src); - jpeg_destroy_decompress(&src); - fclose(fin); - - printf("Done\n"); - return 0; -} diff --git a/recipes/libjpeg/all/test_package/testimg.jpg b/recipes/libjpeg/all/test_package/testimg.jpg deleted file mode 100644 index a026e486f57de..0000000000000 Binary files a/recipes/libjpeg/all/test_package/testimg.jpg and /dev/null differ diff --git a/recipes/libjpeg/all/test_v1_package/CMakeLists.txt b/recipes/libjpeg/all/test_v1_package/CMakeLists.txt deleted file mode 100644 index 961b416af6b07..0000000000000 --- a/recipes/libjpeg/all/test_v1_package/CMakeLists.txt +++ /dev/null @@ -1,8 +0,0 @@ -cmake_minimum_required(VERSION 3.8) -project(test_package LANGUAGES C) - -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) - -add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ - ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/libjpeg/all/test_v1_package/conanfile.py b/recipes/libjpeg/all/test_v1_package/conanfile.py deleted file mode 100644 index 803919e9ca672..0000000000000 --- a/recipes/libjpeg/all/test_v1_package/conanfile.py +++ /dev/null @@ -1,31 +0,0 @@ -from conan.tools.microsoft import is_msvc, is_msvc_static_runtime -from conans import ConanFile, CMake, tools -import os - - -class TestPackageConan(ConanFile): - settings = "os", "arch", "compiler", "build_type" - generators = "cmake", "cmake_find_package", "cmake_find_package_multi" - - @property - def _test_transupp(self): - # transupp+libjpeg makes use of stdio of the C library. This cannot be used when using a dll libjpeg, built with a static c library. - return not (self.options["libjpeg"].shared and is_msvc(self) and is_msvc_static_runtime(self)) - - def build(self): - cmake = CMake(self) - cmake.definitions["BUILD_TRANSUPP"] = self._test_transupp - if self._test_transupp: - cmake.definitions["LIBJPEG_RES_DIR"] = os.path.join(self.deps_cpp_info["libjpeg"].rootpath, "res").replace("\\", "/") - cmake.configure() - cmake.build() - - def test(self): - if not tools.cross_building(self): - bin_path = os.path.join("bin", "test_package") - img_name = os.path.join(self.source_folder, os.pardir, "test_package", "testimg.jpg") - self.run(f"{bin_path} {img_name}", run_environment=True) - if self._test_transupp: - test_transupp_path = os.path.join("bin", "test_transupp") - out_img = os.path.join(self.build_folder, "outimg.jpg") - self.run(f"{test_transupp_path} {img_name} {out_img}", run_environment=True) diff --git a/recipes/libjpeg/config.yml b/recipes/libjpeg/config.yml index 6c44911f307cd..182822cf7c426 100644 --- a/recipes/libjpeg/config.yml +++ b/recipes/libjpeg/config.yml @@ -1,7 +1,7 @@ versions: + "9f": + folder: all "9e": folder: all "9d": folder: all - "9c": - folder: all diff --git a/recipes/libjxl/all/CMakeLists.txt b/recipes/libjxl/all/CMakeLists.txt deleted file mode 100644 index c986d294c7547..0000000000000 --- a/recipes/libjxl/all/CMakeLists.txt +++ /dev/null @@ -1,7 +0,0 @@ -cmake_minimum_required(VERSION 3.1) -project(cmake_wrapper) - -include(conanbuildinfo.cmake) -conan_basic_setup() - -add_subdirectory("source_subfolder") diff --git a/recipes/libjxl/all/conan_deps.cmake b/recipes/libjxl/all/conan_deps.cmake new file mode 100644 index 0000000000000..e62d6fec8071b --- /dev/null +++ b/recipes/libjxl/all/conan_deps.cmake @@ -0,0 +1,24 @@ +find_package(Brotli REQUIRED CONFIG) +find_package(HWY REQUIRED CONFIG) +find_package(LCMS2 REQUIRED CONFIG) + +# Add wrapper targets for the project to link against +add_library(brotlicommon INTERFACE) +target_link_libraries(brotlicommon INTERFACE brotli::brotli) +set_target_properties(brotlicommon PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${Brotli_INCLUDE_DIRS}") +set_target_properties(brotlicommon PROPERTIES INCLUDE_DIRECTORIES "${Brotli_INCLUDE_DIRS}") +add_library(brotlidec ALIAS brotlicommon) +add_library(brotlienc ALIAS brotlicommon) +add_library(brotlicommon-static ALIAS brotlicommon) +add_library(brotlidec-static ALIAS brotlicommon) +add_library(brotlienc-static ALIAS brotlicommon) + +add_library(hwy INTERFACE) +target_link_libraries(hwy INTERFACE highway::highway) +set_target_properties(hwy PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${HWY_INCLUDE_DIRS}") +set_target_properties(hwy PROPERTIES INCLUDE_DIRECTORIES "${HWY_INCLUDE_DIRS}") + +add_library(lcms2 INTERFACE) +target_link_libraries(lcms2 INTERFACE lcms::lcms) +set_target_properties(lcms2 PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${LCMS2_INCLUDE_DIRS}") +set_target_properties(lcms2 PROPERTIES INCLUDE_DIRECTORIES "${LCMS2_INCLUDE_DIRS}") diff --git a/recipes/libjxl/all/conandata.yml b/recipes/libjxl/all/conandata.yml index 8a3abcae1301c..bfe21c7baaca3 100644 --- a/recipes/libjxl/all/conandata.yml +++ b/recipes/libjxl/all/conandata.yml @@ -1,18 +1,10 @@ sources: - "0.5.0": - url: "https://github.com/libjxl/libjxl/archive/v0.5.zip" - sha256: "a208be41542c6f81f10a82c6bb4bc75d3eceb9d4f7ecb6ea0ad2f2d236694c4b" - "0.6.1": - url: "https://github.com/libjxl/libjxl/archive/v0.6.1.zip" - sha256: "3e4877daef07724aa6f490bf80c45ada804f35fe3cce59c27e89c5ae3099535a" -patches: - "0.5.0": - - patch_file: "patches/0001-clean-targets-v0.5.patch" - base_path: "source_subfolder" - - patch_file: "patches/0002-fix-dependencies-v0.5.patch" - base_path: "source_subfolder" - "0.6.1": - - patch_file: "patches/0001-clean-targets-v0.6.patch" - base_path: "source_subfolder" - - patch_file: "patches/0002-fix-dependencies-v0.6.patch" - base_path: "source_subfolder" + "0.10.3": + url: "https://github.com/libjxl/libjxl/archive/v0.10.3.zip" + sha256: "a9e2103f61ab79f5561b506ad03fcba33207263284b1a796eba3ca826ab0a75f" + "0.10.2": + url: "https://github.com/libjxl/libjxl/archive/v0.10.2.zip" + sha256: "910ab4245eebe0fba801a057f5fbc4fe96dad7c9979880bb49ad3e2623a911a2" + "0.8.2": + url: "https://github.com/libjxl/libjxl/archive/v0.8.2.zip" + sha256: "1f2ccc06f07c4f6cf4aa6c7763ba0598f12a7544d597f02beb07f615eb08ccf0" diff --git a/recipes/libjxl/all/conanfile.py b/recipes/libjxl/all/conanfile.py index a8d214a9a78ab..e7c69a5172e12 100644 --- a/recipes/libjxl/all/conanfile.py +++ b/recipes/libjxl/all/conanfile.py @@ -1,9 +1,16 @@ -from conans import ConanFile, CMake, tools import os -import shutil -import glob -required_conan_version = ">=1.33.0" +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.build import cross_building, stdcpp_library, check_min_cppstd +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.env import VirtualBuildEnv +from conan.tools.files import copy, get, rmdir, save, rm, replace_in_file +from conan.tools.gnu import PkgConfigDeps +from conan.tools.microsoft import is_msvc +from conan.tools.scm import Version + +required_conan_version = ">=1.53.0" class LibjxlConan(ConanFile): @@ -14,114 +21,201 @@ class LibjxlConan(ConanFile): homepage = "https://github.com/libjxl/libjxl" topics = ("image", "jpeg-xl", "jxl", "jpeg") - settings = "os", "compiler", "build_type", "arch" - options = {"shared": [True, False], "fPIC": [True, False]} - default_options = {"shared": False, "fPIC": True} - - exports_sources = "CMakeLists.txt", "patches/**" - generators = "cmake" - _cmake = None - - @property - def _source_subfolder(self): - return "source_subfolder" + package_type = "library" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + "avx512": [True, False], + "avx512_spr": [True, False], + "avx512_zen4": [True, False], + "with_tcmalloc": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + "avx512": False, + "avx512_spr": False, + "avx512_zen4": False, + "with_tcmalloc": False, + } + + def export_sources(self): + copy(self, "conan_deps.cmake", self.recipe_folder, os.path.join(self.export_sources_folder, "src")) def config_options(self): if self.settings.os == "Windows": del self.options.fPIC + if self.settings.arch not in ["x86", "x86_64"] or Version(self.version) < "0.9": + del self.options.avx512 + del self.options.avx512_spr + del self.options.avx512_zen4 + # https://github.com/libjxl/libjxl/blob/v0.9.1/CMakeLists.txt#L52-L59 + if self.settings.os in ["Linux", "FreeBSD"] and self.settings.arch == "x86_64": + self.options.with_tcmalloc = True def configure(self): if self.options.shared: - del self.options.fPIC + self.options.rm_safe("fPIC") + + def layout(self): + cmake_layout(self, src_folder="src") def requirements(self): - self.requires("brotli/1.0.9") - self.requires("highway/0.12.2") - self.requires("lcms/2.11") + self.requires("brotli/1.1.0") + self.requires("highway/1.1.0") + self.requires("lcms/2.16") + if self.options.with_tcmalloc: + self.requires("gperftools/2.15") + + def validate(self): + if self.settings.compiler.cppstd: + check_min_cppstd(self, 11) + + def build_requirements(self): + # Require newer CMake, which allows INCLUDE_DIRECTORIES to be set on INTERFACE targets + # Also, v0.9+ require CMake 3.16 + self.tool_requires("cmake/[>=3.19 <4]") def source(self): - tools.get(**self.conan_data["sources"][self.version], - destination=self._source_subfolder, strip_root=True) + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + VirtualBuildEnv(self).generate() + + tc = CMakeToolchain(self) + tc.variables["CMAKE_PROJECT_LIBJXL_INCLUDE"] = "conan_deps.cmake" + tc.variables["BUILD_TESTING"] = False + tc.variables["JPEGXL_STATIC"] = False + tc.variables["JPEGXL_BUNDLE_LIBPNG"] = False + tc.variables["JPEGXL_ENABLE_BENCHMARK"] = False + tc.variables["JPEGXL_ENABLE_DOXYGEN"] = False + tc.variables["JPEGXL_ENABLE_EXAMPLES"] = False + tc.variables["JPEGXL_ENABLE_JNI"] = False + tc.variables["JPEGXL_ENABLE_MANPAGES"] = False + tc.variables["JPEGXL_ENABLE_OPENEXR"] = False + tc.variables["JPEGXL_ENABLE_PLUGINS"] = False + tc.variables["JPEGXL_ENABLE_SJPEG"] = False + tc.variables["JPEGXL_ENABLE_SKCMS"] = False + tc.variables["JPEGXL_ENABLE_TCMALLOC"] = self.options.with_tcmalloc + tc.variables["JPEGXL_ENABLE_VIEWERS"] = False + tc.variables["JPEGXL_ENABLE_TOOLS"] = False + tc.variables["JPEGXL_FORCE_SYSTEM_BROTLI"] = True + tc.variables["JPEGXL_FORCE_SYSTEM_GTEST"] = True + tc.variables["JPEGXL_FORCE_SYSTEM_HWY"] = True + tc.variables["JPEGXL_FORCE_SYSTEM_LCMS2"] = True + tc.variables["JPEGXL_WARNINGS_AS_ERRORS"] = False + tc.variables["JPEGXL_FORCE_NEON"] = False + tc.variables["JPEGXL_ENABLE_AVX512"] = self.options.get_safe("avx512", False) + tc.variables["JPEGXL_ENABLE_AVX512_SPR"] = self.options.get_safe("avx512_spr", False) + tc.variables["JPEGXL_ENABLE_AVX512_ZEN4"] = self.options.get_safe("avx512_zen4", False) + if cross_building(self): + tc.variables["CMAKE_SYSTEM_PROCESSOR"] = str(self.settings.arch) + # Allow non-cache_variables to be used + tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0077"] = "NEW" + # Skip the buggy custom FindAtomic and force the use of atomic library directly for libstdc++ + tc.variables["ATOMICS_LIBRARIES"] = "atomic" if self._atomic_required else "" + if Version(self.version) >= "0.8": + # TODO: add support for the jpegli JPEG encoder library + tc.variables["JPEGXL_ENABLE_JPEGLI"] = False + tc.variables["JPEGXL_ENABLE_JPEGLI_LIBJPEG"] = False + # TODO: can hopefully be removed in newer versions + # https://github.com/libjxl/libjxl/issues/3159 + if Version(self.version) >= "0.9" and self.settings.build_type == "Debug" and is_msvc(self): + tc.preprocessor_definitions["JXL_DEBUG_V_LEVEL"] = 1 + tc.generate() + + deps = CMakeDeps(self) + deps.set_property("brotli", "cmake_file_name", "Brotli") + deps.set_property("highway", "cmake_file_name", "HWY") + deps.set_property("lcms", "cmake_file_name", "LCMS2") + deps.generate() + + # For tcmalloc + deps = PkgConfigDeps(self) + deps.generate() + + @property + def _atomic_required(self): + return self.settings.get_safe("compiler.libcxx") in ["libstdc++", "libstdc++11"] def _patch_sources(self): - for patch in self.conan_data["patches"][self.version]: - tools.patch(**patch) - - def _configure_cmake(self): - if self._cmake: - return self._cmake - self._cmake = CMake(self) - self._cmake.definitions["BUILD_TESTING"] = False - self._cmake.definitions["JPEGXL_STATIC"] = not self.options.shared - self._cmake.definitions["JPEGXL_ENABLE_BENCHMARK"] = False - self._cmake.definitions["JPEGXL_ENABLE_EXAMPLES"] = False - self._cmake.definitions["JPEGXL_ENABLE_MANPAGES"] = False - self._cmake.definitions["JPEGXL_ENABLE_SJPEG"] = False - self._cmake.definitions["JPEGXL_ENABLE_OPENEXR"] = False - self._cmake.definitions["JPEGXL_ENABLE_SKCMS"] = False - self._cmake.definitions["JPEGXL_ENABLE_TCMALLOC"] = False - if tools.cross_building(self): - self._cmake.definitions["CMAKE_SYSTEM_PROCESSOR"] = \ - str(self.settings.arch) - self._cmake.configure() - return self._cmake + # Disable tools, extras and third_party + save(self, os.path.join(self.source_folder, "tools", "CMakeLists.txt"), "") + save(self, os.path.join(self.source_folder, "third_party", "CMakeLists.txt"), "") + # FindAtomics.cmake values are set by CMakeToolchain instead + save(self, os.path.join(self.source_folder, "cmake", "FindAtomics.cmake"), "") + + # Allow fPIC to be set by Conan + replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), + "set(CMAKE_POSITION_INDEPENDENT_CODE TRUE)", "") + for cmake_file in ["jxl.cmake", "jxl_threads.cmake", "jxl_cms.cmake", "jpegli.cmake"]: + path = os.path.join(self.source_folder, "lib", cmake_file) + if os.path.exists(path): + fpic = "ON" if self.options.get_safe("fPIC", True) else "OFF" + replace_in_file(self, path, "POSITION_INDEPENDENT_CODE ON", f"POSITION_INDEPENDENT_CODE {fpic}") def build(self): self._patch_sources() - cmake = self._configure_cmake() + cmake = CMake(self) + cmake.configure() cmake.build() def package(self): - cmake = self._configure_cmake() + cmake = CMake(self) cmake.install() - - self.copy("LICENSE", src=self._source_subfolder, dst="licenses") - tools.rmdir(os.path.join(self.package_folder, "lib", "pkgconfig")) - + copy(self, "LICENSE", self.source_folder, os.path.join(self.package_folder, "licenses")) + rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) if self.options.shared: - libs_dir = os.path.join(self.package_folder, "lib") - tools.remove_files_by_mask(libs_dir, "*.a") - tools.remove_files_by_mask(libs_dir, "*-static.lib") - - if self.settings.os == "Windows": - self.copy("jxl_dec.dll", src="bin", dst="bin") - self.copy("jxl_dec.lib", src="lib", dst="lib") - for dll_path in glob.glob(os.path.join(libs_dir, "*.dll")): - shutil.move(dll_path, os.path.join(self.package_folder, - "bin", os.path.basename(dll_path))) - else: - self.copy("libjxl_dec.*", src="lib", dst="lib") + rm(self, "*.a", os.path.join(self.package_folder, "lib")) + rm(self, "*-static.lib", os.path.join(self.package_folder, "lib")) def _lib_name(self, name): - if not self.options.shared and self.settings.os == "Windows": + if Version(self.version) < "0.9" and not self.options.shared and self.settings.os == "Windows": return name + "-static" return name def package_info(self): + libcxx = stdcpp_library(self) + # jxl - self.cpp_info.components["jxl"].names["pkg_config"] = "libjxl" + self.cpp_info.components["jxl"].set_property("pkg_config_name", "libjxl") self.cpp_info.components["jxl"].libs = [self._lib_name("jxl")] - self.cpp_info.components["jxl"].requires = ["brotli::brotli", - "highway::highway", - "lcms::lcms"] + self.cpp_info.components["jxl"].requires = ["brotli::brotli", "highway::highway", "lcms::lcms"] + if self.options.with_tcmalloc: + self.cpp_info.components["jxl"].requires.append("gperftools::tcmalloc_minimal") + if self._atomic_required: + self.cpp_info.components["jxl"].system_libs.append("atomic") + if not self.options.shared: + self.cpp_info.components["jxl"].defines.append("JXL_STATIC_DEFINE") + if libcxx: + self.cpp_info.components["jxl"].system_libs.append(libcxx) + + # jxl_cms + if Version(self.version) >= "0.9.0": + self.cpp_info.components["jxl_cms"].set_property("pkg_config_name", "libjxl_cms") + self.cpp_info.components["jxl_cms"].libs = [self._lib_name("jxl_cms")] + self.cpp_info.components["jxl_cms"].requires = ["lcms::lcms", "highway::highway"] + if not self.options.shared: + self.cpp_info.components["jxl"].defines.append("JXL_CMS_STATIC_DEFINE") + if libcxx: + self.cpp_info.components["jxl_cms"].system_libs.append(libcxx) + # jxl_dec - self.cpp_info.components["jxl_dec"].names["pkg_config"] = "libjxl_dec" - self.cpp_info.components["jxl_dec"].libs = [self._lib_name("jxl_dec")] - self.cpp_info.components["jxl_dec"].requires = ["brotli::brotli", - "highway::highway", - "lcms::lcms"] + if Version(self.version) < "0.9.0": + if not self.options.shared: + self.cpp_info.components["jxl_dec"].set_property("pkg_config_name", "libjxl_dec") + self.cpp_info.components["jxl_dec"].libs = [self._lib_name("jxl_dec")] + self.cpp_info.components["jxl_dec"].requires = ["brotli::brotli", "highway::highway", "lcms::lcms"] + if libcxx: + self.cpp_info.components["jxl_dec"].system_libs.append(libcxx) + # jxl_threads - self.cpp_info.components["jxl_threads"].names["pkg_config"] = \ - "libjxl_threads" - self.cpp_info.components["jxl_threads"].libs = \ - [self._lib_name("jxl_threads")] - if self.settings.os == "Linux": + self.cpp_info.components["jxl_threads"].set_property("pkg_config_name", "libjxl_threads") + self.cpp_info.components["jxl_threads"].libs = [self._lib_name("jxl_threads")] + if self.settings.os in ["Linux", "FreeBSD"]: self.cpp_info.components["jxl_threads"].system_libs = ["pthread"] - - if not self.options.shared and tools.stdcpp_library(self): - self.cpp_info.components["jxl"].system_libs.append( - tools.stdcpp_library(self)) - self.cpp_info.components["jxl_dec"].system_libs.append( - tools.stdcpp_library(self)) - self.cpp_info.components["jxl_threads"].system_libs.append( - tools.stdcpp_library(self)) + if not self.options.shared: + self.cpp_info.components["jxl_threads"].defines.append("JXL_THREADS_STATIC_DEFINE") + if libcxx: + self.cpp_info.components["jxl_threads"].system_libs.append(libcxx) diff --git a/recipes/libjxl/all/patches/0001-clean-targets-v0.5.patch b/recipes/libjxl/all/patches/0001-clean-targets-v0.5.patch deleted file mode 100644 index 1f47c925782ce..0000000000000 --- a/recipes/libjxl/all/patches/0001-clean-targets-v0.5.patch +++ /dev/null @@ -1,38 +0,0 @@ ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -150,8 +150,6 @@ set(CMAKE_EXPORT_COMPILE_COMMANDS ON) - if(JPEGXL_STATIC) - set(CMAKE_FIND_LIBRARY_SUFFIXES .a) - set(BUILD_SHARED_LIBS 0) -- set(CMAKE_EXE_LINKER_FLAGS -- "${CMAKE_EXE_LINKER_FLAGS} -static -static-libgcc -static-libstdc++") - if (MINGW) - # In MINGW libstdc++ uses pthreads directly. When building statically a - # program (regardless of whether the source code uses pthread or not) the -@@ -247,8 +245,6 @@ set(CMAKE_CXX_STANDARD 11) - set(CMAKE_CXX_EXTENSIONS OFF) - set(CMAKE_CXX_STANDARD_REQUIRED YES) - --add_subdirectory(third_party) -- - set(THREADS_PREFER_PTHREAD_FLAG YES) - find_package(Threads REQUIRED) - -@@ -331,6 +327,3 @@ endif () - if (${JPEGXL_ENABLE_PLUGINS}) - add_subdirectory(plugins) - endif () -- --# Binary tools --add_subdirectory(tools) - ---- a/lib/CMakeLists.txt -+++ b/lib/CMakeLists.txt -@@ -119,7 +119,6 @@ endif() #!MSVC - include(jxl.cmake) - - # Other libraries outside the core jxl library. --include(jxl_extras.cmake) - include(jxl_threads.cmake) - - # Install all the library headers from the source and the generated ones. There diff --git a/recipes/libjxl/all/patches/0001-clean-targets-v0.6.patch b/recipes/libjxl/all/patches/0001-clean-targets-v0.6.patch deleted file mode 100644 index e59af39610354..0000000000000 --- a/recipes/libjxl/all/patches/0001-clean-targets-v0.6.patch +++ /dev/null @@ -1,36 +0,0 @@ ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -161,6 +161,4 @@ # ourselves; for real use case we don't care about stdlib, as it is "granted", - # so just linking all other libraries is fine. - if (NOT APPLE) -- set(CMAKE_EXE_LINKER_FLAGS -- "${CMAKE_EXE_LINKER_FLAGS} -static -static-libgcc -static-libstdc++") - endif() - endif() # JPEGXL_STATIC -@@ -278,8 +277,6 @@ set(CMAKE_CXX_STANDARD 11) - set(CMAKE_CXX_EXTENSIONS OFF) - set(CMAKE_CXX_STANDARD_REQUIRED YES) - --add_subdirectory(third_party) -- - # Copy the JXL license file to the output build directory. - configure_file("${CMAKE_CURRENT_SOURCE_DIR}/LICENSE" - ${PROJECT_BINARY_DIR}/LICENSE.jpeg-xl COPYONLY) -@@ -380,6 +376,3 @@ # Plugins for third-party software - if (${JPEGXL_ENABLE_PLUGINS}) - add_subdirectory(plugins) - endif () -- --# Binary tools --add_subdirectory(tools) - ---- a/lib/CMakeLists.txt -+++ b/lib/CMakeLists.txt -@@ -132,7 +132,6 @@ # The jxl library definition. - include(jxl.cmake) - - # Other libraries outside the core jxl library. --include(jxl_extras.cmake) - include(jxl_threads.cmake) - - # Install all the library headers from the source and the generated ones. There diff --git a/recipes/libjxl/all/patches/0002-fix-dependencies-v0.5.patch b/recipes/libjxl/all/patches/0002-fix-dependencies-v0.5.patch deleted file mode 100644 index 8ec6fc1cb0d9d..0000000000000 --- a/recipes/libjxl/all/patches/0002-fix-dependencies-v0.5.patch +++ /dev/null @@ -1,106 +0,0 @@ ---- a/lib/jxl.cmake -+++ b/lib/jxl.cmake -@@ -328,7 +328,7 @@ if (JPEGXL_ENABLE_SKCMS) - list(APPEND JPEGXL_INTERNAL_FLAGS -DJPEGXL_ENABLE_SKCMS=1) - list(APPEND JPEGXL_INTERNAL_LIBS skcms) - else () -- list(APPEND JPEGXL_INTERNAL_LIBS lcms2) -+ list(APPEND JPEGXL_INTERNAL_LIBS ${CONAN_LIBS_LCMS}) - endif () - - if (NOT JPEGXL_ENABLE_TRANSCODE_JPEG) -@@ -353,8 +353,6 @@ set_property(TARGET jxl_dec-obj PROPERTY POSITION_INDEPENDENT_CODE ON) - target_include_directories(jxl_dec-obj PUBLIC - ${PROJECT_SOURCE_DIR} - ${CMAKE_CURRENT_SOURCE_DIR}/include -- $ -- $ - ) - target_compile_definitions(jxl_dec-obj PUBLIC - ${OBJ_COMPILE_DEFINITIONS} -@@ -371,8 +369,6 @@ set_property(TARGET jxl_enc-obj PROPERTY POSITION_INDEPENDENT_CODE ON) - target_include_directories(jxl_enc-obj PUBLIC - ${PROJECT_SOURCE_DIR} - ${CMAKE_CURRENT_SOURCE_DIR}/include -- $ -- $ - ) - target_compile_definitions(jxl_enc-obj PUBLIC - ${OBJ_COMPILE_DEFINITIONS} -@@ -381,23 +377,6 @@ if (JPEGXL_ENABLE_PROFILER) - target_link_libraries(jxl_enc-obj PUBLIC jxl_profiler) - endif() - --#TODO(lode): don't depend on CMS for the core library --if (JPEGXL_ENABLE_SKCMS) -- target_include_directories(jxl_enc-obj PRIVATE -- $ -- ) -- target_include_directories(jxl_dec-obj PRIVATE -- $ -- ) --else () -- target_include_directories(jxl_enc-obj PRIVATE -- $ -- ) -- target_include_directories(jxl_dec-obj PRIVATE -- $ -- ) --endif () -- - # Headers for exporting/importing public headers - include(GenerateExportHeader) - # TODO(deymo): Add these visibility properties to the static dependencies of -@@ -416,9 +395,6 @@ set_target_properties(jxl_enc-obj PROPERTIES - VISIBILITY_INLINES_HIDDEN 1 - DEFINE_SYMBOL JXL_INTERNAL_LIBRARY_BUILD - ) --generate_export_header(jxl_enc-obj -- BASE_NAME JXL -- EXPORT_FILE_NAME include/jxl/jxl_export.h) - target_include_directories(jxl_enc-obj PUBLIC - ${CMAKE_CURRENT_BINARY_DIR}/include) - -@@ -496,9 +472,8 @@ if (((NOT DEFINED "${TARGET_SUPPORTS_SHARED_LIBS}") OR - add_library(jxl SHARED - $ - $) --strip_static(JPEGXL_INTERNAL_SHARED_LIBS JPEGXL_INTERNAL_LIBS) - target_link_libraries(jxl PUBLIC ${JPEGXL_COVERAGE_FLAGS}) --target_link_libraries(jxl PRIVATE ${JPEGXL_INTERNAL_SHARED_LIBS}) -+target_link_libraries(jxl PRIVATE ${JPEGXL_INTERNAL_LIBS}) - # Shared library include path contains only the "include/" paths. - target_include_directories(jxl PUBLIC - "${CMAKE_CURRENT_SOURCE_DIR}/include" -@@ -507,13 +482,13 @@ set_target_properties(jxl PROPERTIES - VERSION ${JPEGXL_LIBRARY_VERSION} - SOVERSION ${JPEGXL_LIBRARY_SOVERSION} - LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}" -- RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}") -+ RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}" -+ DEFINE_SYMBOL JXL_INTERNAL_LIBRARY_BUILD) - - # Public shared decoder library. - add_library(jxl_dec SHARED $) --strip_static(JPEGXL_DEC_INTERNAL_SHARED_LIBS JPEGXL_DEC_INTERNAL_LIBS) - target_link_libraries(jxl_dec PUBLIC ${JPEGXL_COVERAGE_FLAGS}) --target_link_libraries(jxl_dec PRIVATE ${JPEGXL_DEC_INTERNAL_SHARED_LIBS}) -+target_link_libraries(jxl_dec PRIVATE ${JPEGXL_DEC_INTERNAL_LIBS}) - # Shared library include path contains only the "include/" paths. - target_include_directories(jxl_dec PUBLIC - "${CMAKE_CURRENT_SOURCE_DIR}/include" -@@ -549,8 +524,14 @@ install(TARGETS jxl - else() - add_library(jxl ALIAS jxl-static) - add_library(jxl_dec ALIAS jxl_dec-static) -+set_target_properties(jxl-static PROPERTIES -+ DEFINE_SYMBOL JXL_INTERNAL_LIBRARY_BUILD) - endif() # TARGET_SUPPORTS_SHARED_LIBS AND NOT JPEGXL_STATIC - -+generate_export_header(jxl -+ BASE_NAME JXL -+ EXPORT_FILE_NAME include/jxl/jxl_export.h) -+ - # Add a pkg-config file for libjxl. - set(JPEGXL_LIBRARY_REQUIRES - "libhwy libbrotlicommon libbrotlienc libbrotlidec") diff --git a/recipes/libjxl/all/patches/0002-fix-dependencies-v0.6.patch b/recipes/libjxl/all/patches/0002-fix-dependencies-v0.6.patch deleted file mode 100644 index b4ff403da499f..0000000000000 --- a/recipes/libjxl/all/patches/0002-fix-dependencies-v0.6.patch +++ /dev/null @@ -1,126 +0,0 @@ ---- a/lib/jxl.cmake -+++ b/lib/jxl.cmake -@@ -334,7 +334,7 @@ if (JPEGXL_ENABLE_SKCMS) - list(APPEND JPEGXL_INTERNAL_LIBS skcms) - endif () - else () -- list(APPEND JPEGXL_INTERNAL_LIBS lcms2) -+ list(APPEND JPEGXL_INTERNAL_LIBS ${CONAN_LIBS_LCMS}) - endif () - - if (NOT JPEGXL_ENABLE_TRANSCODE_JPEG) -@@ -359,8 +359,6 @@ set_property(TARGET jxl_dec-obj PROPERTY POSITION_INDEPENDENT_CODE ON) - target_include_directories(jxl_dec-obj PUBLIC - ${PROJECT_SOURCE_DIR} - ${CMAKE_CURRENT_SOURCE_DIR}/include -- $ -- $ - ) - target_compile_definitions(jxl_dec-obj PUBLIC - ${OBJ_COMPILE_DEFINITIONS} -@@ -377,8 +375,6 @@ set_property(TARGET jxl_enc-obj PROPERTY POSITION_INDEPENDENT_CODE ON) - target_include_directories(jxl_enc-obj PUBLIC - ${PROJECT_SOURCE_DIR} - ${CMAKE_CURRENT_SOURCE_DIR}/include -- $ -- $ - ) - target_compile_definitions(jxl_enc-obj PUBLIC - ${OBJ_COMPILE_DEFINITIONS} -@@ -387,17 +383,6 @@ if (JPEGXL_ENABLE_PROFILER) - target_link_libraries(jxl_enc-obj PUBLIC jxl_profiler) - endif() - --#TODO(lode): don't depend on CMS for the core library --if (JPEGXL_ENABLE_SKCMS) -- target_include_directories(jxl_enc-obj PRIVATE -- $ -- ) --else () -- target_include_directories(jxl_enc-obj PRIVATE -- $ -- ) --endif () -- - # Headers for exporting/importing public headers - include(GenerateExportHeader) - set_target_properties(jxl_dec-obj PROPERTIES -@@ -413,9 +398,6 @@ set_target_properties(jxl_enc-obj PROPERTIES - VISIBILITY_INLINES_HIDDEN 1 - DEFINE_SYMBOL JXL_INTERNAL_LIBRARY_BUILD - ) --generate_export_header(jxl_enc-obj -- BASE_NAME JXL -- EXPORT_FILE_NAME include/jxl/jxl_export.h) - target_include_directories(jxl_enc-obj PUBLIC - ${CMAKE_CURRENT_BINARY_DIR}/include) - -@@ -495,9 +477,8 @@ if (((NOT DEFINED "${TARGET_SUPPORTS_SHARED_LIBS}") OR - - # Public shared library. - add_library(jxl SHARED ${JPEGXL_INTERNAL_OBJECTS}) --strip_static(JPEGXL_INTERNAL_SHARED_LIBS JPEGXL_INTERNAL_LIBS) - target_link_libraries(jxl PUBLIC ${JPEGXL_COVERAGE_FLAGS}) --target_link_libraries(jxl PRIVATE ${JPEGXL_INTERNAL_SHARED_LIBS}) -+target_link_libraries(jxl PRIVATE ${JPEGXL_INTERNAL_LIBS}) - # Shared library include path contains only the "include/" paths. - target_include_directories(jxl PUBLIC - "${CMAKE_CURRENT_SOURCE_DIR}/include" -@@ -506,13 +487,13 @@ set_target_properties(jxl PROPERTIES - VERSION ${JPEGXL_LIBRARY_VERSION} - SOVERSION ${JPEGXL_LIBRARY_SOVERSION} - LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}" -- RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}") -+ RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}" -+ DEFINE_SYMBOL JXL_INTERNAL_LIBRARY_BUILD) - - # Public shared decoder library. - add_library(jxl_dec SHARED $) --strip_static(JPEGXL_DEC_INTERNAL_SHARED_LIBS JPEGXL_DEC_INTERNAL_LIBS) - target_link_libraries(jxl_dec PUBLIC ${JPEGXL_COVERAGE_FLAGS}) --target_link_libraries(jxl_dec PRIVATE ${JPEGXL_DEC_INTERNAL_SHARED_LIBS}) -+target_link_libraries(jxl_dec PRIVATE ${JPEGXL_DEC_INTERNAL_LIBS}) - # Shared library include path contains only the "include/" paths. - target_include_directories(jxl_dec PUBLIC - "${CMAKE_CURRENT_SOURCE_DIR}/include" -@@ -523,6 +504,12 @@ set_target_properties(jxl_dec PROPERTIES - LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}" - RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}") - -+set(LINKER_EXCLUDE_LIBS_FLAG "-Wl,--exclude-libs=ALL") -+include(CheckCSourceCompiles) -+list(APPEND CMAKE_EXE_LINKER_FLAGS ${LINKER_EXCLUDE_LIBS_FLAG}) -+check_c_source_compiles("int main(){return 0;}" LINKER_SUPPORT_EXCLUDE_LIBS) -+list(REMOVE_ITEM CMAKE_EXE_LINKER_FLAGS ${LINKER_EXCLUDE_LIBS_FLAG}) -+ - # Add a jxl.version file as a version script to tag symbols with the - # appropriate version number. This script is also used to limit what's exposed - # in the shared library from the static dependencies bundled here. -@@ -541,8 +528,10 @@ foreach(target IN ITEMS jxl jxl_dec) - # This hides the default visibility symbols from static libraries bundled into - # the shared library. In particular this prevents exposing symbols from hwy - # and skcms in the shared library. -- set_property(TARGET ${target} APPEND_STRING PROPERTY -- LINK_FLAGS " -Wl,--exclude-libs=ALL") -+ if(${LINKER_SUPPORT_EXCLUDE_LIBS}) -+ set_property(TARGET ${target} APPEND_STRING PROPERTY -+ LINK_FLAGS " ${LINKER_EXCLUDE_LIBS_FLAG}") -+ endif() - endforeach() - - # Only install libjxl shared library. The libjxl_dec is not installed since it -@@ -553,8 +542,14 @@ install(TARGETS jxl - else() - add_library(jxl ALIAS jxl-static) - add_library(jxl_dec ALIAS jxl_dec-static) -+set_target_properties(jxl-static PROPERTIES -+ DEFINE_SYMBOL JXL_INTERNAL_LIBRARY_BUILD) - endif() # TARGET_SUPPORTS_SHARED_LIBS AND NOT JPEGXL_STATIC - -+generate_export_header(jxl -+ BASE_NAME JXL -+ EXPORT_FILE_NAME include/jxl/jxl_export.h) -+ - # Add a pkg-config file for libjxl. - set(JPEGXL_LIBRARY_REQUIRES - "libhwy libbrotlicommon libbrotlienc libbrotlidec") diff --git a/recipes/libjxl/all/test_package/CMakeLists.txt b/recipes/libjxl/all/test_package/CMakeLists.txt index 7b9b613cbb24a..4cb796f1c09f2 100644 --- a/recipes/libjxl/all/test_package/CMakeLists.txt +++ b/recipes/libjxl/all/test_package/CMakeLists.txt @@ -1,8 +1,7 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.15) project(test_package C) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup() +find_package(libjxl REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.c) -target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS}) +target_link_libraries(${PROJECT_NAME} PRIVATE libjxl::libjxl) diff --git a/recipes/libjxl/all/test_package/conanfile.py b/recipes/libjxl/all/test_package/conanfile.py index 138d4f5333429..ef5d7042163ec 100644 --- a/recipes/libjxl/all/test_package/conanfile.py +++ b/recipes/libjxl/all/test_package/conanfile.py @@ -1,10 +1,19 @@ -from conans import ConanFile, CMake, tools +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake import os class TestPackageConan(ConanFile): - settings = "os", "compiler", "build_type", "arch" - generators = "cmake" + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) def build(self): cmake = CMake(self) @@ -12,7 +21,6 @@ def build(self): cmake.build() def test(self): - if not tools.cross_building(self): - bin_path = os.path.join("bin", "test_package") - img_path = os.path.join(self.source_folder, "test.jxl") - self.run(bin_path + " " + img_path, run_environment=True) + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/libjxl/all/test_package/test.jxl b/recipes/libjxl/all/test_package/test.jxl deleted file mode 100644 index a0f419a98a426..0000000000000 Binary files a/recipes/libjxl/all/test_package/test.jxl and /dev/null differ diff --git a/recipes/libjxl/all/test_package/test_package.c b/recipes/libjxl/all/test_package/test_package.c index 2cb652aa9249a..3b65dffc293ab 100644 --- a/recipes/libjxl/all/test_package/test_package.c +++ b/recipes/libjxl/all/test_package/test_package.c @@ -4,87 +4,15 @@ #include "jxl/decode.h" #include "jxl/thread_parallel_runner.h" -static int ReadFile(const char filename[], uint8_t *data[], size_t *size) +int main() { - FILE *fp = fopen(filename, "rb"); - if (!fp) - return 0; - - if (fseek(fp, 0, SEEK_END) != 0) { - fclose(fp); - return 0; - } - - *size = ftell(fp); - if (fseek(fp, 0, SEEK_SET) != 0) { - fclose(fp); - return 0; - } - - *data = malloc(*size); - if (!*data) { - fclose(fp); - return 0; - } - - if (fread(*data, sizeof(uint8_t), *size, fp) != *size) { - free(*data); - fclose(fp); - return 0; - } - - if (fclose(fp) != 0) { - free(*data); - return 0; - } - - return 1; -} - -int main(int argc, char *argv[]) -{ - int ret = EXIT_FAILURE; - - if (argc < 2) { - fprintf(stderr, "Need at least one argument\n"); - return ret; - } - - uint8_t *data; - size_t size; - if (!ReadFile(argv[1], &data, &size)) - return ret; - JxlDecoder *dec = NULL; void *runner = NULL; - dec = JxlDecoderCreate(NULL); - if (JxlDecoderSubscribeEvents(dec, JXL_DEC_BASIC_INFO) != JXL_DEC_SUCCESS) - goto Exit; - - runner = JxlThreadParallelRunnerCreate( - NULL, JxlThreadParallelRunnerDefaultNumWorkerThreads()); - if (JxlDecoderSetParallelRunner(dec, JxlThreadParallelRunner, runner) - != JXL_DEC_SUCCESS) - goto Exit; - if (JxlDecoderSetInput(dec, data, size) != JXL_DEC_SUCCESS) - goto Exit; - - if (JxlDecoderProcessInput(dec) != JXL_DEC_BASIC_INFO) - goto Exit; - - JxlBasicInfo info; - if (JxlDecoderGetBasicInfo(dec, &info) != JXL_DEC_SUCCESS) - goto Exit; - - printf("Image size: %d x %d pixels\n", info.xsize, info.ysize); - - ret = EXIT_SUCCESS; - -Exit: - free(data); - JxlThreadParallelRunnerDestroy(runner); - JxlDecoderDestroy(dec); - return ret; + // Allways True + if (JxlDecoderSubscribeEvents(dec, JXL_DEC_BASIC_INFO) == JXL_DEC_SUCCESS) + { + printf("Test"); + } } diff --git a/recipes/libjxl/all/test_v1_package/CMakeLists.txt b/recipes/libjxl/all/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..91630d79f4abb --- /dev/null +++ b/recipes/libjxl/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/libjxl/all/test_v1_package/conanfile.py b/recipes/libjxl/all/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..49a3a66ea5bad --- /dev/null +++ b/recipes/libjxl/all/test_v1_package/conanfile.py @@ -0,0 +1,17 @@ +from conans import ConanFile, CMake, tools +import os + + +class TestPackageConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake", "cmake_find_package_multi" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if not tools.cross_building(self): + bin_path = os.path.join("bin", "test_package") + self.run(bin_path, run_environment=True) diff --git a/recipes/libjxl/config.yml b/recipes/libjxl/config.yml index c79a1af3be31f..040248cefb07f 100644 --- a/recipes/libjxl/config.yml +++ b/recipes/libjxl/config.yml @@ -1,5 +1,7 @@ versions: - "0.5.0": + "0.10.3": folder: all - "0.6.1": + "0.10.2": + folder: all + "0.8.2": folder: all diff --git a/recipes/libkml/all/conandata.yml b/recipes/libkml/all/conandata.yml index deea781fb42fe..018a7586f3180 100644 --- a/recipes/libkml/all/conandata.yml +++ b/recipes/libkml/all/conandata.yml @@ -1,3 +1,5 @@ +# NOTE: if a new version >1.3.0 is added, verify if it is +# compatible with C++17 and above to reflect this in recipe sources: "1.3.0": url: "https://github.com/libkml/libkml/archive/1.3.0.zip" diff --git a/recipes/libkml/all/conanfile.py b/recipes/libkml/all/conanfile.py index 1a9d0a90947d1..4ea7fb43e50c7 100644 --- a/recipes/libkml/all/conanfile.py +++ b/recipes/libkml/all/conanfile.py @@ -1,4 +1,4 @@ -from conan import ConanFile +from conan import ConanFile, conan_version from conan.errors import ConanInvalidConfiguration from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rmdir, save @@ -43,7 +43,7 @@ def layout(self): def requirements(self): self.requires("boost/1.81.0", transitive_headers=True) - self.requires("expat/2.5.0") + self.requires("expat/[>=2.6.2 <3]") self.requires("minizip/1.2.13") self.requires("uriparser/0.9.7") self.requires("zlib/[>=1.2.11 <2]") @@ -51,6 +51,12 @@ def requirements(self): def validate(self): if self.options.shared and is_msvc(self) and is_msvc_static_runtime(self): raise ConanInvalidConfiguration(f"{self.ref} shared with Visual Studio and MT runtime is not supported") + + def package_id(self): + cppstd = self.info.settings.get_safe("compiler.cppstd") + if cppstd and cppstd not in ['98', 'gnu98', '11', 'gnu11', '14', 'gnu14']: + prefix = "gnu" if str(cppstd).startswith("gnu") else "" + self.info.settings.compiler.cppstd = f"{prefix}14" def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) @@ -58,6 +64,20 @@ def source(self): def generate(self): tc = CMakeToolchain(self) tc.variables["CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS"] = True + + # Fallback to C++14 - the implementation uses + # functionality that is not compliant with C++17 + # See https://github.com/conan-io/conan/issues/16148 + cppstd = self.settings.get_safe("compiler.cppstd") + if cppstd and conan_version.major >= 2: + from conan.tools.build import valid_max_cppstd + if not valid_max_cppstd(self, "14"): + self.output.warning(f"Recipe not compatible with C++ {cppstd}, falling back to C++14") + use_gnu_extensions = str(cppstd).startswith("gnu") + tc.blocks.remove("cppstd") + tc.cache_variables["CMAKE_CXX_STANDARD"] = "14" + tc.cache_variables["CMAKE_CXX_EXTENSIONS"] = use_gnu_extensions + # To install relocatable shared libs on Macos tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0042"] = "NEW" tc.generate() diff --git a/recipes/libliftoff/all/conandata.yml b/recipes/libliftoff/all/conandata.yml index 9cc2caed8889e..18f54d8b034f2 100644 --- a/recipes/libliftoff/all/conandata.yml +++ b/recipes/libliftoff/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.5.0": + url: "https://gitlab.freedesktop.org/emersion/libliftoff/-/archive/v0.5.0/libliftoff-v0.5.0.tar.bz2" + sha256: "2ed21be3c563b129bd8f188195a23256017e15908c195f3edcd3697584caf1c8" "0.4.1": url: "https://gitlab.freedesktop.org/emersion/libliftoff/-/archive/v0.4.1/libliftoff-v0.4.1.tar.bz2" sha256: "2ec4a6b467dda20476acb4d6bd864538ccdaa946e8666f96efa98156bf25cfb5" diff --git a/recipes/libliftoff/all/conanfile.py b/recipes/libliftoff/all/conanfile.py index 28626c0146534..792e87c5ed4a9 100644 --- a/recipes/libliftoff/all/conanfile.py +++ b/recipes/libliftoff/all/conanfile.py @@ -16,7 +16,7 @@ class LibliftoffConan(ConanFile): description = "Lightweight KMS plane library." license = "MIT" url = "https://github.com/conan-io/conan-center-index" - homepage = "https://github.com/project/package" + homepage = "https://gitlab.freedesktop.org/emersion/libliftoff" topics = ("drm", "KMS", "plane") package_type = "library" settings = "os", "arch", "compiler", "build_type" @@ -39,16 +39,16 @@ def layout(self): basic_layout(self, src_folder="src") def requirements(self): - self.requires("libdrm/2.4.114") + self.requires("libdrm/2.4.119") def validate(self): if self.settings.os not in ["Linux", "FreeBSD"]: raise ConanInvalidConfiguration(f"{self.name} only supports FreeBSD and Linux") def build_requirements(self): - self.tool_requires("meson/1.2.2") + self.tool_requires("meson/1.3.2") if not self.conf.get("tools.gnu:pkg_config", default=False, check_type=str): - self.tool_requires("pkgconf/2.0.3") + self.tool_requires("pkgconf/2.1.0") def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) diff --git a/recipes/libliftoff/all/test_package/conanfile.py b/recipes/libliftoff/all/test_package/conanfile.py index 5aab0703e7a4e..cdcf9b281723d 100644 --- a/recipes/libliftoff/all/test_package/conanfile.py +++ b/recipes/libliftoff/all/test_package/conanfile.py @@ -17,9 +17,9 @@ def requirements(self): self.requires(self.tested_reference_str) def build_requirements(self): - self.tool_requires("meson/1.2.2") + self.tool_requires("meson/1.3.2") if not self.conf.get("tools.gnu:pkg_config", default=False, check_type=str): - self.tool_requires("pkgconf/2.0.3") + self.tool_requires("pkgconf/2.1.0") def build(self): meson = Meson(self) diff --git a/recipes/libliftoff/config.yml b/recipes/libliftoff/config.yml index 3a9d5538921fc..bdf259c14aca4 100644 --- a/recipes/libliftoff/config.yml +++ b/recipes/libliftoff/config.yml @@ -1,3 +1,5 @@ versions: + "0.5.0": + folder: all "0.4.1": folder: all diff --git a/recipes/liblqr/all/CMakeLists.txt b/recipes/liblqr/all/CMakeLists.txt new file mode 100644 index 0000000000000..303355e779e6b --- /dev/null +++ b/recipes/liblqr/all/CMakeLists.txt @@ -0,0 +1,44 @@ +cmake_minimum_required(VERSION 3.15) +project(liblqr LANGUAGES C) + +find_package(glib REQUIRED CONFIG) + +set(LQR_SRC_SUBDIR ${LQR_SRC_DIR}/lqr) + +file(GLOB LQR_SRCS_FILES ${LQR_SRC_SUBDIR}/*.c) + +add_library(lqr-1 ${LQR_SRCS_FILES}) +target_include_directories(lqr-1 PUBLIC ${LQR_SRC_DIR} ${LQR_SRC_SUBDIR}) +target_link_libraries(lqr-1 PUBLIC glib::glib-2.0) +if(WIN32) + if(BUILD_SHARED_LIBS) + target_compile_definitions(lqr-1 PRIVATE LQR_EXPORTS) + else() + target_compile_definitions(lqr-1 PUBLIC LQR_DISABLE_DECLSPEC) + endif() +endif() + +install(FILES ${LQR_SRC_SUBDIR}/lqr.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/lqr-1) +install( + FILES + ${LQR_SRC_SUBDIR}/lqr_base.h + ${LQR_SRC_SUBDIR}/lqr_carver_bias_pub.h + ${LQR_SRC_SUBDIR}/lqr_carver_list_pub.h + ${LQR_SRC_SUBDIR}/lqr_carver_pub.h + ${LQR_SRC_SUBDIR}/lqr_carver_rigmask_pub.h + ${LQR_SRC_SUBDIR}/lqr_cursor_pub.h + ${LQR_SRC_SUBDIR}/lqr_energy_pub.h + ${LQR_SRC_SUBDIR}/lqr_gradient_pub.h + ${LQR_SRC_SUBDIR}/lqr_progress_pub.h + ${LQR_SRC_SUBDIR}/lqr_rwindow_pub.h + ${LQR_SRC_SUBDIR}/lqr_vmap_list_pub.h + ${LQR_SRC_SUBDIR}/lqr_vmap_pub.h + DESTINATION + ${CMAKE_INSTALL_INCLUDEDIR}/lqr-1/lqr +) +install( + TARGETS lqr-1 + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} +) diff --git a/recipes/liblqr/all/conandata.yml b/recipes/liblqr/all/conandata.yml new file mode 100644 index 0000000000000..d562db29a3a36 --- /dev/null +++ b/recipes/liblqr/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "0.4.3": + url: "http://liblqr.wdfiles.com/local--files/en:download-page/liblqr-1-0.4.3.tar.bz2" + sha256: "862fc5cecaa96d38d4d9279c8a6fbfc276393f0548909ee0912e41df59894471" diff --git a/recipes/liblqr/all/conanfile.py b/recipes/liblqr/all/conanfile.py new file mode 100644 index 0000000000000..56681e130e9e4 --- /dev/null +++ b/recipes/liblqr/all/conanfile.py @@ -0,0 +1,130 @@ +from conan import ConanFile +from conan.tools.apple import fix_apple_shared_install_name +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.env import VirtualBuildEnv +from conan.tools.files import copy, get, rm, rmdir +from conan.tools.gnu import Autotools, AutotoolsToolchain, PkgConfigDeps +from conan.tools.layout import basic_layout +import os + +required_conan_version = ">=1.54.0" + + +class LibLqrConan(ConanFile): + name = "liblqr" + description = ( + "The LiquidRescale (lqr) library provides a C/C++ API for performing " + "non-uniform resizing of images by the seam-carving technique." + ) + license = ("LGPL-3.0-or-later", "GPL-3.0-or-later") + url = "https://github.com/conan-io/conan-center-index" + homepage = "http://liblqr.wikidot.com" + topics = ("image", "resizing", "seam-carving") + package_type = "library" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + } + + @property + def _is_cl_like(self): + return self.settings.compiler.get_safe("runtime") is not None + + @property + def _settings_build(self): + return getattr(self, "settings_build", self.settings) + + def export_sources(self): + copy(self, "CMakeLists.txt", src=self.recipe_folder, dst=self.export_sources_folder) + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + self.settings.rm_safe("compiler.cppstd") + self.settings.rm_safe("compiler.libcxx") + + def layout(self): + if self._is_cl_like: + cmake_layout(self, src_folder="src") + else: + basic_layout(self, src_folder="src") + + def requirements(self): + self.requires("glib/2.81.0", transitive_headers=True) + + def build_requirements(self): + if not self._is_cl_like: + if not self.conf.get("tools.gnu:pkg_config", check_type=str): + self.tool_requires("pkgconf/[>=2.2 <3]") + if self._settings_build.os == "Windows": + self.win_bash = True + if not self.conf.get("tools.microsoft.bash:path", check_type=str): + self.tool_requires("msys2/cci.latest") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + if self._is_cl_like: + tc = CMakeToolchain(self) + tc.variables["LQR_SRC_DIR"] = self.source_folder.replace("\\", "/") + tc.generate() + deps = CMakeDeps(self) + deps.generate() + else: + env = VirtualBuildEnv(self) + env.generate() + + tc = AutotoolsToolchain(self) + yes_no = lambda v: "yes" if v else "no" + tc.configure_args.append("--disable-install-man") + if self.settings.os == "Windows": + # This option in upstream configure.ac must be disabled for static + # windows build, to avoid adding __declspec(dllexport) in front + # of declarations during build. + tc.configure_args.append(f"--enable-declspec={yes_no(self.options.shared)}") + tc.generate() + + deps = PkgConfigDeps(self) + deps.generate() + + def build(self): + if self._is_cl_like: + cmake = CMake(self) + cmake.configure(build_script_folder=os.path.join(self.source_folder, os.pardir)) + cmake.build() + else: + autotools = Autotools(self) + autotools.configure() + autotools.make() + + def package(self): + copy(self, "COPYING*", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) + if self._is_cl_like: + cmake = CMake(self) + cmake.install() + else: + autotools = Autotools(self) + autotools.install() + rm(self, "*.la", os.path.join(self.package_folder, "lib")) + rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) + fix_apple_shared_install_name(self) + + def package_info(self): + self.cpp_info.set_property("pkg_config_name", "lqr-1") + self.cpp_info.includedirs = [os.path.join("include", "lqr-1")] + self.cpp_info.libs = ["lqr-1"] + self.cpp_info.requires = ["glib::glib-2.0"] + if self.settings.os == "Windows" and not self.options.shared: + self.cpp_info.defines.append("LQR_DISABLE_DECLSPEC") + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.system_libs.append("m") diff --git a/recipes/liblqr/all/test_package/CMakeLists.txt b/recipes/liblqr/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..fe1dadeb5b33a --- /dev/null +++ b/recipes/liblqr/all/test_package/CMakeLists.txt @@ -0,0 +1,7 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES C) + +find_package(liblqr REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.c) +target_link_libraries(${PROJECT_NAME} PRIVATE liblqr::liblqr) diff --git a/recipes/liblqr/all/test_package/conanfile.py b/recipes/liblqr/all/test_package/conanfile.py new file mode 100644 index 0000000000000..0a6bc68712d90 --- /dev/null +++ b/recipes/liblqr/all/test_package/conanfile.py @@ -0,0 +1,26 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import CMake, cmake_layout +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeToolchain", "CMakeDeps", "VirtualRunEnv" + test_type = "explicit" + + def layout(self): + cmake_layout(self) + + def requirements(self): + self.requires(self.tested_reference_str) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/liblqr/all/test_package/test_package.c b/recipes/liblqr/all/test_package/test_package.c new file mode 100644 index 0000000000000..890b1df50ef9c --- /dev/null +++ b/recipes/liblqr/all/test_package/test_package.c @@ -0,0 +1,15 @@ +#include + +#include + +int main() { + gint channels = 3; + gint w = 100; + gint h = 100; + guchar *rgb_buffer = (guchar *) malloc(channels * w * h * sizeof(guchar)); + + LqrCarver *r = lqr_carver_new(rgb_buffer, w, h, channels); + lqr_carver_destroy(r); + + return 0; +} diff --git a/recipes/liblqr/config.yml b/recipes/liblqr/config.yml new file mode 100644 index 0000000000000..9be35d17501c4 --- /dev/null +++ b/recipes/liblqr/config.yml @@ -0,0 +1,3 @@ +versions: + "0.4.3": + folder: all diff --git a/recipes/libmagic/all/conanfile.py b/recipes/libmagic/all/conanfile.py index 6d0843dc3f3f3..6faae6cdf6502 100644 --- a/recipes/libmagic/all/conanfile.py +++ b/recipes/libmagic/all/conanfile.py @@ -44,9 +44,9 @@ def layout(self): def requirements(self): self.requires("bzip2/1.0.8") - self.requires("xz_utils/5.4.4") + self.requires("xz_utils/[>=5.4.5 <6]") self.requires("zlib/[>=1.2.11 <2]") - self.requires("zstd/1.5.5") + self.requires("zstd/[^1.5]") # TODO: Add lzlib recipe # self.requires("lzlib/1.13") diff --git a/recipes/libmaxminddb/all/conandata.yml b/recipes/libmaxminddb/all/conandata.yml index 6267e2c13434f..673b071ef221d 100644 --- a/recipes/libmaxminddb/all/conandata.yml +++ b/recipes/libmaxminddb/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.10.0": + url: "https://github.com/maxmind/libmaxminddb/releases/download/1.10.0/libmaxminddb-1.10.0.tar.gz" + sha256: "5e6db72df423ae225bfe8897069f6def40faa8931f456b99d79b8b4d664c6671" "1.9.1": url: "https://github.com/maxmind/libmaxminddb/releases/download/1.9.1/libmaxminddb-1.9.1.tar.gz" sha256: "a80682a89d915fdf60b35d316232fb04ebf36fff27fda9bd39fe8a38d3cd3f12" diff --git a/recipes/libmaxminddb/all/conanfile.py b/recipes/libmaxminddb/all/conanfile.py index 7afd56f70e087..866a4b5b085e7 100644 --- a/recipes/libmaxminddb/all/conanfile.py +++ b/recipes/libmaxminddb/all/conanfile.py @@ -1,9 +1,10 @@ from conan import ConanFile from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout from conan.tools.files import export_conandata_patches, apply_conandata_patches, copy, get, rmdir +from conan.tools.scm import Version import os -required_conan_version = ">=1.52.0" +required_conan_version = ">=1.53.0" class LibmaxminddbConan(ConanFile): name = "libmaxminddb" @@ -13,13 +14,16 @@ class LibmaxminddbConan(ConanFile): homepage = "http://maxmind.github.io/libmaxminddb/" topics = ("maxmind", "geoip") settings = "os", "arch", "compiler", "build_type" + package_type = "library" options = { "shared": [True, False], "fPIC": [True, False], + "with_binaries": [True, False], } default_options = { "shared": False, "fPIC": True, + "with_binaries": True, } def export_sources(self): @@ -28,21 +32,14 @@ def export_sources(self): def config_options(self): if self.settings.os == "Windows": del self.options.fPIC + if Version(self.version) < "1.10.0": + del self.options.with_binaries def configure(self): if self.options.shared: - try: - del self.options.fPIC - except Exception: - pass - try: - del self.settings.compiler.libcxx - except Exception: - pass - try: - del self.settings.compiler.cppstd - except Exception: - pass + self.options.rm_safe("fPIC") + self.settings.rm_safe("compiler.libcxx") + self.settings.rm_safe("compiler.cppstd") def layout(self): cmake_layout(self, src_folder="src") @@ -54,6 +51,8 @@ def source(self): def generate(self): tc = CMakeToolchain(self) tc.variables["BUILD_TESTING"] = False + if "with_binaries" in self.options: + tc.variables["MAXMINDDB_BUILD_BINARIES"] = self.options.with_binaries # Honor BUILD_SHARED_LIBS from conan_toolchain (see https://github.com/conan-io/conan/issues/11840) tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0077"] = "NEW" tc.generate() @@ -79,9 +78,8 @@ def package_info(self): if self.settings.os == "Windows": self.cpp_info.system_libs = ["ws2_32"] - if self.settings.os != "Windows": + if self.settings.os != "Windows" and self.options.get_safe("with_binaries", True): bin_path = os.path.join(self.package_folder, "bin") - self.output.info(f"Appending PATH environment variable: {bin_path}") self.env_info.PATH.append(bin_path) # TODO: to remove in conan v2 once cmake_find_package_* generators removed diff --git a/recipes/libmaxminddb/config.yml b/recipes/libmaxminddb/config.yml index 0a05d03a9c3a0..4c7c42eea0733 100644 --- a/recipes/libmaxminddb/config.yml +++ b/recipes/libmaxminddb/config.yml @@ -1,4 +1,6 @@ versions: + "1.10.0": + folder: all "1.9.1": folder: all "1.8.0": diff --git a/recipes/libmd/all/conandata.yml b/recipes/libmd/all/conandata.yml new file mode 100644 index 0000000000000..6433755dc3365 --- /dev/null +++ b/recipes/libmd/all/conandata.yml @@ -0,0 +1,6 @@ +sources: + "1.1.0": + url: + - "https://libbsd.freedesktop.org/releases/libmd-1.1.0.tar.xz" + - "https://archive.hadrons.org/software/libmd/libmd-1.1.0.tar.xz" + sha256: "1bd6aa42275313af3141c7cf2e5b964e8b1fd488025caf2f971f43b00776b332" diff --git a/recipes/libmd/all/conanfile.py b/recipes/libmd/all/conanfile.py new file mode 100644 index 0000000000000..b7ad5096688cd --- /dev/null +++ b/recipes/libmd/all/conanfile.py @@ -0,0 +1,114 @@ +import os + +from conan import ConanFile +from conan.tools.apple import fix_apple_shared_install_name +from conan.tools.env import Environment, VirtualBuildEnv +from conan.tools.files import chdir, rename, copy, get, rm, rmdir +from conan.tools.gnu import Autotools, AutotoolsToolchain +from conan.tools.layout import basic_layout +from conan.tools.microsoft import is_msvc, unix_path + +required_conan_version = ">=1.53.0" + + +class LibMDConan(ConanFile): + name = "libmd" + description = "Message Digest functions from BSD systems" + license = "BSD-2-Clause AND BSD-3-Clause AND ISC AND Beerware AND DocumentRef-COPYING:LicenseRef-libmd-Public-Domain" + homepage = "https://gitlab.freedesktop.org/libbsd/libmd" + url = "https://github.com/conan-io/conan-center-index" + topics = ("message-digest", "hash", "bsd", + "md2", "md4", "md5", "ripemd", "rmd160", + "sha", "sha1", "sha2", "sha256", "sha512") + + package_type = "library" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + } + + @property + def _settings_build(self): + return getattr(self, "settings_build", self.settings) + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + self.settings.rm_safe("compiler.cppstd") + self.settings.rm_safe("compiler.libcxx") + + def build_requirements(self): + if self._settings_build.os == "Windows": + self.win_bash = True + if not self.conf.get("tools.microsoft.bash:path", check_type=str): + self.tool_requires("msys2/cci.latest") + if is_msvc(self): + self.tool_requires("automake/1.16.5") + + def generate(self): + venv = VirtualBuildEnv(self) + venv.generate() + + tc = AutotoolsToolchain(self) + if is_msvc(self): + tc.extra_cflags.append("-FS") + tc.extra_cxxflags.append("-FS") + tc.generate() + + if is_msvc(self): + env = Environment() + automake_conf = self.dependencies.build["automake"].conf_info + compile_wrapper = unix_path(self, automake_conf.get("user.automake:compile-wrapper", check_type=str)) + ar_wrapper = unix_path(self, automake_conf.get("user.automake:lib-wrapper", check_type=str)) + env.define("CC", f"{compile_wrapper} cl -nologo") + env.define("CXX", f"{compile_wrapper} cl -nologo") + env.define("LD", "link -nologo") + env.define("AR", f"{ar_wrapper} lib") + env.define("NM", "dumpbin -symbols") + env.define("OBJDUMP", ":") + env.define("RANLIB", ":") + env.define("STRIP", ":") + env.vars(self).save_script("conanbuild_msvc") + + def layout(self): + basic_layout(self, src_folder="src") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def build(self): + with chdir(self, self.source_folder): + autotools = Autotools(self) + autotools.configure() + autotools.make() + + def package(self): + copy(self, "COPYING", self.source_folder, os.path.join(self.package_folder, "licenses")) + with chdir(self, self.source_folder): + autotools = Autotools(self) + autotools.install() + if self.settings.os == "Windows" and self.options.shared: + rename(self, os.path.join(self.package_folder, "lib", "md.dll.lib"), + os.path.join(self.package_folder, "lib", "md-0.lib")) + rm(self, "*.la", os.path.join(self.package_folder, "lib")) + rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) + rmdir(self, os.path.join(self.package_folder, "share")) + fix_apple_shared_install_name(self) + + def package_info(self): + self.cpp_info.set_property("pkg_config_name", "libmd") + + if self.settings.os == "Windows" and self.options.shared: + lib = "md-0" + else: + lib = "md" + self.cpp_info.libs = [lib] diff --git a/recipes/libmd/all/test_package/CMakeLists.txt b/recipes/libmd/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..6bdd5550a5b87 --- /dev/null +++ b/recipes/libmd/all/test_package/CMakeLists.txt @@ -0,0 +1,7 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package C) + +find_package(libmd REQUIRED) + +add_executable(${PROJECT_NAME} test_package.c) +target_link_libraries(${PROJECT_NAME} PRIVATE libmd::libmd) diff --git a/recipes/libmd/all/test_package/conanfile.py b/recipes/libmd/all/test_package/conanfile.py new file mode 100644 index 0000000000000..0f2d20bbcb70a --- /dev/null +++ b/recipes/libmd/all/test_package/conanfile.py @@ -0,0 +1,27 @@ +import os + +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake + + +class TestPackageConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/libmd/all/test_package/test_package.c b/recipes/libmd/all/test_package/test_package.c new file mode 100644 index 0000000000000..a7d2d1ef0b245 --- /dev/null +++ b/recipes/libmd/all/test_package/test_package.c @@ -0,0 +1,12 @@ +#include +#include + +int main() { + const char data[] = "12345"; + uint8_t hash[MD5_DIGEST_LENGTH]; + MD5_CTX md5_ctx; + MD5Init(&md5_ctx); + MD5Update(&md5_ctx, (const uint8_t *)data, strlen(data)); + MD5Final(hash, &md5_ctx); + return 0; +} diff --git a/recipes/libmd/config.yml b/recipes/libmd/config.yml new file mode 100644 index 0000000000000..11b7aff3a5ac4 --- /dev/null +++ b/recipes/libmd/config.yml @@ -0,0 +1,3 @@ +versions: + "1.1.0": + folder: "all" diff --git a/recipes/libmediainfo/all/test_package/conanfile.py b/recipes/libmediainfo/all/test_package/conanfile.py index a518ea1284361..181c93b2a88a0 100644 --- a/recipes/libmediainfo/all/test_package/conanfile.py +++ b/recipes/libmediainfo/all/test_package/conanfile.py @@ -31,5 +31,4 @@ def build(self): def test(self): if can_run(self): bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") - testsrc = os.path.join(self.source_folder, "testsrc.mp4") - self.run(f"{bin_path} {testsrc}", env="conanrun") + self.run(bin_path, env="conanrun") diff --git a/recipes/libmediainfo/all/test_package/test_package.cpp b/recipes/libmediainfo/all/test_package/test_package.cpp index d4de9d263a0bc..5aa26cc3025e5 100644 --- a/recipes/libmediainfo/all/test_package/test_package.cpp +++ b/recipes/libmediainfo/all/test_package/test_package.cpp @@ -10,22 +10,18 @@ #include int main(int argc, const char *argv[]) { - if (argc < 2) { - std::cerr << "Need at least one argument\n"; - return 1; - } MEDIAINFO_NS::MediaInfo mediainfo; #if defined(LIBMEDIAINFO_SHARED) std::cout << "Is MediaInfo ready? " << mediainfo.IsReady() << "\n"; #endif - ZenLib::Ztring videofile(argv[1]); - size_t opened = mediainfo.Open(videofile.To_Unicode()); - if (!opened) { - std::cerr << "Open failed\n"; - return 1; - } + std::string fakeVideoData = "FAKE DATA FOR TESTING\n"; + + mediainfo.Open_Buffer_Init(fakeVideoData.size(), 0); + mediainfo.Open_Buffer_Continue((unsigned char*)fakeVideoData.data(), fakeVideoData.size()); + mediainfo.Open_Buffer_Finalize(); + MEDIAINFO_NS::String info = mediainfo.Inform(); #ifdef UNICODE std::wcout << info; diff --git a/recipes/libmediainfo/all/test_package/testsrc.mp4 b/recipes/libmediainfo/all/test_package/testsrc.mp4 deleted file mode 100644 index 7e12ea126587e..0000000000000 Binary files a/recipes/libmediainfo/all/test_package/testsrc.mp4 and /dev/null differ diff --git a/recipes/libmediainfo/all/test_v1_package/conanfile.py b/recipes/libmediainfo/all/test_v1_package/conanfile.py index f87f616cc28bd..c3c864d919d33 100644 --- a/recipes/libmediainfo/all/test_v1_package/conanfile.py +++ b/recipes/libmediainfo/all/test_v1_package/conanfile.py @@ -15,5 +15,4 @@ def build(self): def test(self): if not tools.cross_building(self): bin_path = os.path.join("bin", "test_package") - testsrc = os.path.join(self.source_folder, os.pardir, "test_package", "testsrc.mp4") - self.run(f"{bin_path} {testsrc}", run_environment=True) + self.run(bin_path, run_environment=True) diff --git a/recipes/libmeshb/all/conandata.yml b/recipes/libmeshb/all/conandata.yml new file mode 100644 index 0000000000000..dd9233505c3f3 --- /dev/null +++ b/recipes/libmeshb/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "7.80": + url: "https://github.com/LoicMarechal/libMeshb/archive/refs/tags/v7.80.tar.gz" + sha256: "3026e84fa7c5c14428b1e0d1484038b0cf24921814e9cd0b6e0f13a34b0f1248" diff --git a/recipes/libmeshb/all/conanfile.py b/recipes/libmeshb/all/conanfile.py new file mode 100644 index 0000000000000..4f0284a48ab3d --- /dev/null +++ b/recipes/libmeshb/all/conanfile.py @@ -0,0 +1,81 @@ +from conan import ConanFile +from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout +from conan.tools.files import copy, get, replace_in_file, rmdir +import os + +required_conan_version = ">=1.53.0" + +class LibmeshbConan(ConanFile): + name = "libmeshb" + description = "A library to handle the *.meshb file format." + license = "MPL-2.0" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/LoicMarechal/libMeshb" + topics = ("3d", "mesh", "geometry") + package_type = "library" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + "with_gmf_asio": [True, False] + } + default_options = { + "shared": False, + "fPIC": True, + "with_gmf_asio": False + } + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + del self.options.with_gmf_asio + self.settings.rm_safe("compiler.cppstd") + self.settings.rm_safe("compiler.libcxx") + + def configure(self): + # Windows shared build doesn't seems supported because code doesn't include dllexport + # See https://www.kitware.com/create-dlls-on-windows-without-declspec-using-new-cmake-export-all-feature/ + if self.settings.os == "Windows": + del self.options.shared + self.package_type = "static-library" + if self.options.get_safe("shared"): + self.options.rm_safe("fPIC") + + def layout(self): + cmake_layout(self, src_folder="src") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + tc.variables["WITH_GMF_AIO"] = self.options.get_safe("with_gmf_asio", False) + tc.generate() + + def _patch_sources(self): + replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), "add_subdirectory (examples)", "") + replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), "install (FILES LICENSE.txt copyright.txt DESTINATION share/libMeshb)", "") + replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), "install (DIRECTORY sample_meshes DESTINATION share/libMeshb)", "") + replace_in_file(self, os.path.join(self.source_folder, "sources/CMakeLists.txt"), "install(DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/ DESTINATION include)", "") + + def build(self): + self._patch_sources() + cmake = CMake(self) + cmake.configure() + cmake.build() + + def package(self): + copy(self, "LICENSE.txt", self.source_folder, os.path.join(self.package_folder, "licenses")) + cmake = CMake(self) + cmake.install() + + rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) + + def package_info(self): + self.cpp_info.set_property("cmake_file_name", "libMeshb") + self.cpp_info.set_property("cmake_target_name", "libMeshb::Meshb.7") + self.cpp_info.libs = ["Meshb.7"] + + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.system_libs.append("rt") + self.cpp_info.system_libs.append("m") \ No newline at end of file diff --git a/recipes/libmeshb/all/test_package/CMakeLists.txt b/recipes/libmeshb/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..5cc1c2f79e98d --- /dev/null +++ b/recipes/libmeshb/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) + +project(test_package LANGUAGES C) + +find_package(libMeshb REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.c) +target_link_libraries(${PROJECT_NAME} PRIVATE libMeshb::Meshb.7) diff --git a/recipes/libmeshb/all/test_package/conanfile.py b/recipes/libmeshb/all/test_package/conanfile.py new file mode 100644 index 0000000000000..f5cf204295e19 --- /dev/null +++ b/recipes/libmeshb/all/test_package/conanfile.py @@ -0,0 +1,25 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake +import os + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/libmeshb/all/test_package/test_package.c b/recipes/libmeshb/all/test_package/test_package.c new file mode 100644 index 0000000000000..ab27c830995fa --- /dev/null +++ b/recipes/libmeshb/all/test_package/test_package.c @@ -0,0 +1,7 @@ +#include + +int main() { + int ver, dim; + int64_t LibIdx = GmfOpenMesh("/dev/null", GmfRead, &ver, &dim); + return 0; +} diff --git a/recipes/libmeshb/config.yml b/recipes/libmeshb/config.yml new file mode 100644 index 0000000000000..d51cd95e8905e --- /dev/null +++ b/recipes/libmeshb/config.yml @@ -0,0 +1,3 @@ +versions: + "7.80": + folder: all diff --git a/recipes/libmetalink/all/conanfile.py b/recipes/libmetalink/all/conanfile.py index 10c23cc875879..57b9b280bec17 100644 --- a/recipes/libmetalink/all/conanfile.py +++ b/recipes/libmetalink/all/conanfile.py @@ -53,9 +53,9 @@ def layout(self): def requirements(self): if self.options.xml_backend == "expat": - self.requires("expat/2.5.0") + self.requires("expat/[>=2.6.2 <3]") elif self.options.xml_backend == "libxml2": - self.requires("libxml2/2.12.3") + self.requires("libxml2/[>=2.12.5 <3]") def validate(self): if is_msvc(self): diff --git a/recipes/libmount/all/conandata.yml b/recipes/libmount/all/conandata.yml index d36ca36c23c13..876a74600fc50 100644 --- a/recipes/libmount/all/conandata.yml +++ b/recipes/libmount/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.40.2": + url: "https://mirrors.edge.kernel.org/pub/linux/utils/util-linux/v2.40/util-linux-2.40.2.tar.xz" + sha256: "d78b37a66f5922d70edf3bdfb01a6b33d34ed3c3cafd6628203b2a2b67c8e8b3" "2.39.2": url: "https://mirrors.edge.kernel.org/pub/linux/utils/util-linux/v2.39/util-linux-2.39.2.tar.xz" sha256: "87abdfaa8e490f8be6dde976f7c80b9b5ff9f301e1b67e3899e1f05a59a1531f" @@ -11,6 +14,3 @@ sources: "2.36": url: "https://mirrors.edge.kernel.org/pub/linux/utils/util-linux/v2.36/util-linux-2.36.tar.xz" sha256: "9e4b1c67eb13b9b67feb32ae1dc0d50e08ce9e5d82e1cccd0ee771ad2fa9e0b1" - "2.33.1": - url: "https://mirrors.edge.kernel.org/pub/linux/utils/util-linux/v2.33/util-linux-2.33.1.tar.xz" - sha256: "c14bd9f3b6e1792b90db87696e87ec643f9d63efa0a424f092a5a6b2f2dbef21" diff --git a/recipes/libmount/config.yml b/recipes/libmount/config.yml index 867141253ca23..d10bf81ca7041 100644 --- a/recipes/libmount/config.yml +++ b/recipes/libmount/config.yml @@ -1,4 +1,6 @@ versions: + "2.40.2": + folder: all "2.39.2": folder: all "2.39": @@ -7,5 +9,3 @@ versions: folder: all "2.36": folder: all - "2.33.1": - folder: all diff --git a/recipes/libnl/all/conanfile.py b/recipes/libnl/all/conanfile.py index a355e8b21201e..a6e8ec2b93bbb 100644 --- a/recipes/libnl/all/conanfile.py +++ b/recipes/libnl/all/conanfile.py @@ -3,6 +3,8 @@ from conan.tools.layout import basic_layout from conan.tools.gnu import AutotoolsToolchain, Autotools from conan.errors import ConanInvalidConfiguration +from conan.tools.env import VirtualBuildEnv +from conan.tools.scm import Version import os required_conan_version = ">=1.53.0" @@ -15,6 +17,7 @@ class LibNlConan(ConanFile): homepage = "https://github.com/thom311/libnl" topics = ("netlink") settings = "os", "arch", "compiler", "build_type" + package_type = "library" options = { "fPIC": [True, False], "shared": [True, False], @@ -45,6 +48,8 @@ def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) def generate(self): + env = VirtualBuildEnv(self) + env.generate() tc = AutotoolsToolchain(self) tc.generate() @@ -66,14 +71,30 @@ def package_info(self): self.cpp_info.components["nl"].libs = ["nl-3"] self.cpp_info.components["nl"].includedirs = [os.path.join('include', 'libnl3')] self.cpp_info.components["nl"].system_libs = ["pthread", "m"] + self.cpp_info.components["nl"].set_property("pkg_config_name", "libnl-3.0") + self.cpp_info.components["nl-route"].libs = ["nl-route-3"] self.cpp_info.components["nl-route"].requires = ["nl"] + self.cpp_info.components["nl-route"].set_property("pkg_config_name", "libnl-route-3.0") + self.cpp_info.components["nl-genl"].libs = ["nl-genl-3"] self.cpp_info.components["nl-genl"].requires = ["nl"] + self.cpp_info.components["nl-genl"].set_property("pkg_config_name", "libnl-genl-3.0") + self.cpp_info.components["nl-nf"].libs = ["nl-nf-3"] self.cpp_info.components["nl-nf"].requires = ["nl-route"] + self.cpp_info.components["nl-nf"].set_property("pkg_config_name", "libnl-nf-3.0") + self.cpp_info.components["nl-cli"].libs = ["nl-cli-3"] self.cpp_info.components["nl-cli"].requires = ["nl-nf", "nl-genl"] self.cpp_info.components["nl-cli"].system_libs = ["dl"] + self.cpp_info.components["nl-cli"].set_property("pkg_config_name", "libnl-cli-3.0") + self.cpp_info.components["nl-idiag"].libs = ["nl-idiag-3"] self.cpp_info.components["nl-idiag"].requires = ["nl"] + self.cpp_info.components["nl-idiag"].set_property("pkg_config_name", "libnl-idiag-3.0") + + if Version(self.version) >= "3.3.0": + self.cpp_info.components["nl-xfrm"].libs = ["nl-xfrm-3"] + self.cpp_info.components["nl-xfrm"].requires = ["nl"] + self.cpp_info.components["nl-xfrm"].set_property("pkg_config_name", "libnl-xfrm-3.0") diff --git a/recipes/libnl/all/test_package/CMakeLists.txt b/recipes/libnl/all/test_package/CMakeLists.txt index c5d1b19c7a8f9..f6ba7c21f8d96 100644 --- a/recipes/libnl/all/test_package/CMakeLists.txt +++ b/recipes/libnl/all/test_package/CMakeLists.txt @@ -1,7 +1,18 @@ cmake_minimum_required(VERSION 3.15) project(test_package LANGUAGES C) +include(FindPkgConfig) + find_package(libnl REQUIRED CONFIG) +find_package(PkgConfig REQUIRED) +pkg_check_modules(libnl-3.0 REQUIRED IMPORTED_TARGET libnl-3.0) +pkg_check_modules(libnl-route-3.0 REQUIRED IMPORTED_TARGET libnl-route-3.0) +pkg_check_modules(libnl-genl-3.0 REQUIRED IMPORTED_TARGET libnl-genl-3.0) +pkg_check_modules(libnl-nf-3.0 REQUIRED IMPORTED_TARGET libnl-nf-3.0) +pkg_check_modules(libnl-cli-3.0 REQUIRED IMPORTED_TARGET libnl-cli-3.0) +pkg_check_modules(libnl-idiag-3.0 REQUIRED IMPORTED_TARGET libnl-idiag-3.0) +pkg_check_modules(libnl-xfrm-3.0 QUIET IMPORTED_TARGET libnl-xfrm-3.0) + add_executable(${PROJECT_NAME} ${PROJECT_NAME}.c) -target_link_libraries(${PROJECT_NAME} PRIVATE libnl::nl libnl::nl-route libnl::nl-genl libnl::nl-nf libnl::nl-cli libnl::nl-idiag) +target_link_libraries(${PROJECT_NAME} PRIVATE libnl::nl libnl::nl-route libnl::nl-genl libnl::nl-nf libnl::nl-cli libnl::nl-idiag $<$:libnl::nl-xfrm>) diff --git a/recipes/libnl/all/test_package/conanfile.py b/recipes/libnl/all/test_package/conanfile.py index 9b544e8a245c0..813661a00f9e6 100644 --- a/recipes/libnl/all/test_package/conanfile.py +++ b/recipes/libnl/all/test_package/conanfile.py @@ -6,7 +6,7 @@ class NetlinkTestConan(ConanFile): settings = "os", "compiler", "build_type", "arch" - generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv", "PkgConfigDeps", "VirtualBuildEnv" test_type = "explicit" def layout(self): @@ -15,6 +15,10 @@ def layout(self): def requirements(self): self.requires(self.tested_reference_str) + def build_requirements(self): + if not self.conf.get("tools.gnu:pkg_config", check_type=str): + self.tool_requires("pkgconf/[>=2.2 <3]") + def build(self): cmake = CMake(self) cmake.configure() diff --git a/recipes/libnuma/all/conandata.yml b/recipes/libnuma/all/conandata.yml index 34ddb5ae1b18a..a2f4fdcdf22c7 100644 --- a/recipes/libnuma/all/conandata.yml +++ b/recipes/libnuma/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.0.19": + url: "https://github.com/numactl/numactl/releases/download/v2.0.19/numactl-2.0.19.tar.gz" + sha256: "f2672a0381cb59196e9c246bf8bcc43d5568bc457700a697f1a1df762b9af884" "2.0.16": url: "https://github.com/numactl/numactl/releases/download/v2.0.16/numactl-2.0.16.tar.gz" sha256: "1b242f893af977a1d31af6ce9d6b8dafdd2d8ec3dc9207f7c2dc0d3446e7c7c8" diff --git a/recipes/libnuma/config.yml b/recipes/libnuma/config.yml index e2f73008d4e9a..96481d820a1e4 100644 --- a/recipes/libnuma/config.yml +++ b/recipes/libnuma/config.yml @@ -1,4 +1,6 @@ versions: + "2.0.19": + folder: all "2.0.16": folder: all "2.0.14": diff --git a/recipes/libpcap/all/conanfile.py b/recipes/libpcap/all/conanfile.py index f8f592dda7427..9023196f55440 100644 --- a/recipes/libpcap/all/conanfile.py +++ b/recipes/libpcap/all/conanfile.py @@ -5,7 +5,7 @@ from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout from conan.tools.env import VirtualBuildEnv, VirtualRunEnv from conan.tools.files import chdir, copy, get, rm, rmdir -from conan.tools.gnu import Autotools, AutotoolsDeps, AutotoolsToolchain +from conan.tools.gnu import Autotools, AutotoolsDeps, AutotoolsToolchain, PkgConfigDeps from conan.tools.layout import basic_layout from conan.tools.microsoft import is_msvc, is_msvc_static_runtime from conan.tools.scm import Version @@ -28,19 +28,22 @@ class LibPcapConan(ConanFile): options = { "shared": [True, False], "fPIC": [True, False], + "enable_dbus": [True, False], + "enable_libnl": [True, False], "enable_libusb": [True, False], + "enable_rdma": [True, False], + "with_snf": [True, False], } default_options = { "shared": False, "fPIC": True, + "enable_dbus": False, + "enable_libnl": False, "enable_libusb": False, + "enable_rdma": False, + "with_snf": False, } - # TODO: Add dbus-glib when available - # TODO: Add libnl-genl when available - # TODO: Add libbluetooth when available - # TODO: Add libibverbs when available - @property def _settings_build(self): return getattr(self, "settings_build", self.settings) @@ -50,6 +53,8 @@ def config_options(self): del self.options.fPIC if self.settings.os != "Linux": del self.options.enable_libusb + del self.options.enable_libnl + del self.options.enable_rdma def configure(self): if self.options.shared: @@ -66,6 +71,13 @@ def layout(self): def requirements(self): if self.options.get_safe("enable_libusb"): self.requires("libusb/1.0.26") + if self.options.get_safe("enable_libnl"): + self.requires("libnl/3.8.0") + if self.options.get_safe("enable_rdma"): + self.requires("rdma-core/52.0") + if self.options.get_safe("enable_dbus"): + self.requires("dbus/1.15.8") + # TODO: Add libbluetooth when available def validate(self): if Version(self.version) < "1.10.0" and self.settings.os == "Macos" and self.options.shared: @@ -78,7 +90,7 @@ def validate(self): def build_requirements(self): if self._settings_build.os == "Windows": - self.tool_requires("winflexbison/2.5.24") + self.tool_requires("winflexbison/2.5.25") else: self.tool_requires("bison/3.8.2") self.tool_requires("flex/2.6.4") @@ -107,22 +119,26 @@ def generate(self): tc = AutotoolsToolchain(self) yes_no = lambda v: "yes" if v else "no" tc.configure_args.extend([ - f"--enable-usb={yes_no(self.options.get_safe('enable_libusb'))}", - "--disable-universal", - "--without-libnl", + "--disable-universal", # don't build universal binaries on macOS + "--enable-usb" if self.options.get_safe("enable_libusb") else "--disable-usb", + "--enable-dbus" if self.options.get_safe("enable_dbus") else "--disable-dbus", + "--enable-rdma" if self.options.get_safe("enable_rdma") else "--disable-rdma", + "--with-libnl" if self.options.get_safe("enable_libnl") else "--without-libnl", "--disable-bluetooth", - "--disable-packet-ring", - "--disable-dbus", - "--disable-rdma", + f"--with-snf={yes_no(self.options.get_safe('with_snf'))}", ]) + if Version(self.version) < "1.10": + tc.configure_args.append("--disable-packet-ring") if cross_building(self): - target_os = "linux" if self.settings.os == "Linux" else "null" + target_os = "linux" if self.settings.os in ["Linux", "Android"] else "null" tc.configure_args.append(f"--with-pcap={target_os}") elif "arm" in self.settings.arch and self.settings.os == "Linux": tc.configure_args.append("--host=arm-linux") tc.generate() AutotoolsDeps(self).generate() + deps = PkgConfigDeps(self) + deps.generate() def build(self): if self.settings.os == "Windows": @@ -171,3 +187,13 @@ def package_info(self): self.cpp_info.libs = [f"pcap{suffix}"] if self.settings.os == "Windows": self.cpp_info.system_libs = ["ws2_32"] + if self.options.get_safe("enable_libusb"): + self.cpp_info.requires.append("libusb::libusb") + if self.options.get_safe("enable_libnl"): + self.cpp_info.requires.append("libnl::nl-genl") + if self.options.get_safe("enable_rdma"): + self.cpp_info.requires.append("rdma-core::libibverbs") + if self.options.get_safe("enable_dbus"): + self.cpp_info.requires.append("dbus::dbus") + if self.options.get_safe("with_snf"): + self.cpp_info.system_libs.append("snf") diff --git a/recipes/libphonenumber/all/conandata.yml b/recipes/libphonenumber/all/conandata.yml new file mode 100644 index 0000000000000..11c4aae27deb2 --- /dev/null +++ b/recipes/libphonenumber/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "8.13.42": + url: "https://github.com/google/libphonenumber/archive/refs/tags/v8.13.42.tar.gz" + sha256: "7fac3a3c5f37607108ea2ca4c334000a6c29fe1cd6b30db31505cba73ab96c7d" diff --git a/recipes/libphonenumber/all/conanfile.py b/recipes/libphonenumber/all/conanfile.py new file mode 100644 index 0000000000000..9a88f82447a58 --- /dev/null +++ b/recipes/libphonenumber/all/conanfile.py @@ -0,0 +1,184 @@ +import os + +from conan import ConanFile, conan_version +from conan.errors import ConanInvalidConfiguration +from conan.tools.apple import is_apple_os +from conan.tools.build import check_min_cppstd, valid_min_cppstd, can_run +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.files import copy, get, rm, rmdir, replace_in_file +from conan.tools.gnu import PkgConfigDeps +from conan.tools.scm import Version + +required_conan_version = ">=1.56.0 <2 || >=2.0.6" + + +class LibphonenumberConan(ConanFile): + name = "libphonenumber" + description = "Google's common C++ library for parsing, formatting, and validating international phone numbers" + license = "Apache-2.0" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/google/libphonenumber" + topics = ("phone-numbers", "phone") + + package_type = "library" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + "build_geocoder": [True, False], + "use_alternate_formats": [True, False], + "use_boost": [True, False], + "use_icu_regexp": [True, False], + "use_lite_metadata": [True, False], + "use_posix_thread": [True, False], + "use_std_mutex": [True, False], + #re2 is not an option, because using it crashes + } + default_options = { + "shared": False, + "fPIC": True, + "build_geocoder": True, + "use_alternate_formats": True, + "use_boost": False, + "use_icu_regexp": True, + "use_lite_metadata": False, + "use_posix_thread": False, + "use_std_mutex": True, + } + options_description = { + "build_geocoder": "Build the offline phone number geocoder", + "use_alternate_formats": "Use alternate formats for the phone number matcher.", + "use_icu_regexp": "Use ICU regexp engine", + "use_lite_metadata": "Generates smaller metadata that doesn't include example numbers", + "use_posix_thread": "Use Posix thread for multi-threading", + "use_std_mutex": "use C++ 2011 std::mutex for multi-threading", + } + + @property + def _min_cppstd(self): + return 11 if Version(self.dependencies["abseil"].ref.version) < "20230125.0" else 14 + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + # TODO: could use pthread4w + del self.options.use_posix_thread + if not can_run(self): + # otherwise fails when trying to build and run generate_geocoding_data + del self.options.build_geocoder + + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + + def layout(self): + cmake_layout(self, src_folder="src") + + def requirements(self): + # https://github.com/google/libphonenumber/blob/v8.13.35/cpp/src/phonenumbers/phonenumberutil.h#L33-L34 + self.requires("abseil/20240116.2", transitive_headers=True) + self.requires("protobuf/5.27.0", transitive_headers=True, transitive_libs=True) + if self.options.use_boost: + # https://github.com/google/libphonenumber/blob/v8.13.35/cpp/src/phonenumbers/base/synchronization/lock_boost.h + self.requires("boost/1.85.0", transitive_headers=True, transitive_libs=True) + if self.options.use_icu_regexp or self.options.get_safe("build_geocoder"): + # https://github.com/google/libphonenumber/blob/v8.13.35/cpp/src/phonenumbers/geocoding/phonenumber_offline_geocoder.h#L23 + self.requires("icu/75.1", transitive_headers=True, transitive_libs=True) + + def validate(self): + if self.settings.os == "Windows": + raise ConanInvalidConfiguration(f"{self.name} not supported in Windows yet, contributions welcome\n" + "https://github.com/google/libphonenumber/blob/master/FAQ.md#what-about-windows") + if self.settings.compiler.cppstd: + check_min_cppstd(self, self._min_cppstd) + + if not self.options.use_std_mutex and not self.options.use_boost and not self.options.get_safe("use_posix_thread"): + raise ConanInvalidConfiguration("At least one of use_std_mutex, use_boost or use_posix_thread must be enabled") + + if not self.options.use_icu_regexp: + # Fails with 'undefined reference to `vtable for i18n::phonenumbers::ICURegExpFactory'' + raise ConanInvalidConfiguration("use_icu_regexp=False is not supported") + + if conan_version.major == 1: + raise ConanInvalidConfiguration("Conan 1.x is not supported. Contributions are welcome!") + + def build_requirements(self): + if not self.conf.get("tools.gnu:pkg_config", check_type=str): + self.tool_requires("pkgconf/2.2.0") + self.tool_requires("protobuf/") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + tc.variables["BUILD_SHARED_LIBS"] = self.options.shared + tc.variables["BUILD_STATIC_LIB"] = not self.options.shared + tc.variables["BUILD_GEOCODER"] = self.options.get_safe("build_geocoder", False) + tc.variables["USE_ALTERNATE_FORMATS"] = self.options.use_alternate_formats + tc.variables["USE_BOOST"] = self.options.use_boost + tc.variables["USE_ICU_REGEXP"] = self.options.use_icu_regexp + tc.variables["USE_LITE_METADATA"] = self.options.use_lite_metadata + tc.variables["USE_POSIX_THREAD"] = self.options.get_safe("use_posix_thread", False) + tc.variables["USE_PROTOBUF_LITE"] = self.dependencies["protobuf"].options.lite + tc.variables["USE_RE2"] = False # Hardcoded, attempt to use it crashed + tc.variables["USE_STDMUTEX"] = self.options.use_std_mutex + tc.variables["BUILD_TESTING"] = False + tc.variables["BUILD_TOOLS_ONLY"] = False + tc.variables["REGENERATE_METADATA"] = False # Requires a Java runtime + # Otherwise tries to use , and requires the recipe to export a define accordingly. + # The define can be set based only on a compilation test. + tc.variables["USE_STD_MAP"] = True + if not valid_min_cppstd(self, self._min_cppstd): + tc.variables["CMAKE_CXX_STANDARD"] = self._min_cppstd + tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0077"] = "NEW" + tc.cache_variables["CMAKE_TRY_COMPILE_CONFIGURATION"] = str(self.settings.build_type) + tc.generate() + deps = CMakeDeps(self) + deps.generate() + deps = PkgConfigDeps(self) + deps.generate() + + def _patch_sources(self): + # (failed) attempt to make it work in windows/msvc, patching some build scripts + # https://github.com/conan-io/conan-center-index/pull/23689/commits/c5e7091d134174fb590218ed066c074f45274a93 + replace_in_file(self, os.path.join(self.source_folder, "cpp", "CMakeLists.txt"), " -Werror", "") + + def build(self): + self._patch_sources() + cmake = CMake(self) + cmake.configure(build_script_folder=os.path.join(self.source_folder, "cpp")) + cmake.build() + + def package(self): + copy(self, "LICENSE", self.source_folder, os.path.join(self.package_folder, "licenses")) + cmake = CMake(self) + cmake.install() + rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) + rm(self, "*.pdb", self.package_folder, recursive=True) + + def package_info(self): + if self.options.shared: + self.cpp_info.components["phonenumber"].set_property("cmake_target_aliases", ["libphonenumber::phonenumber-shared"]) + self.cpp_info.components["phonenumber"].libs = ["phonenumber"] + if self.settings.os in ["Linux", "FreeBSD"] and self.options.use_posix_thread: + self.cpp_info.components["phonenumber"].system_libs.append("pthread") + elif is_apple_os(self): + self.cpp_info.components["phonenumber"].frameworks.extend(["CoreFoundation", "Foundation"]) + + requires = ["abseil::absl_node_hash_set", "abseil::absl_strings", "abseil::absl_synchronization"] + if self.dependencies["protobuf"].options.lite: + requires.append("protobuf::libprotobuf-lite") + else: + requires.append("protobuf::libprotobuf") + if self.options.use_boost: + requires.extend(["boost::headers", "boost::thread"]) + if self.options.use_icu_regexp: + requires.extend(["icu::icu-uc", "icu::icu-i18n"]) + self.cpp_info.components["phonenumber"].requires = requires + + if self.options.get_safe("build_geocoder"): + if self.options.shared: + self.cpp_info.components["geocoding"].set_property("cmake_target_aliases", ["libphonenumber::geocoding-shared"]) + self.cpp_info.components["geocoding"].libs.append("geocoding") + self.cpp_info.components["geocoding"].requires = ["abseil::absl_synchronization", "icu::icu-uc"] diff --git a/recipes/libphonenumber/all/test_package/CMakeLists.txt b/recipes/libphonenumber/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..f3619ef8d61cf --- /dev/null +++ b/recipes/libphonenumber/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) + +find_package(libphonenumber REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE libphonenumber::libphonenumber) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) diff --git a/recipes/libphonenumber/all/test_package/conanfile.py b/recipes/libphonenumber/all/test_package/conanfile.py new file mode 100644 index 0000000000000..ef5d7042163ec --- /dev/null +++ b/recipes/libphonenumber/all/test_package/conanfile.py @@ -0,0 +1,26 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/libphonenumber/all/test_package/test_package.cpp b/recipes/libphonenumber/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..7bcbdb54c0b0f --- /dev/null +++ b/recipes/libphonenumber/all/test_package/test_package.cpp @@ -0,0 +1,11 @@ +#include +#include + +int main() { + using namespace i18n::phonenumbers; + PhoneNumber number; + number.set_country_code(1); + number.set_national_number(uint64{650}); + auto util = PhoneNumberUtil::GetInstance(); + util->GetLengthOfGeographicalAreaCode(number); +} diff --git a/recipes/libphonenumber/config.yml b/recipes/libphonenumber/config.yml new file mode 100644 index 0000000000000..2d7b667f12200 --- /dev/null +++ b/recipes/libphonenumber/config.yml @@ -0,0 +1,3 @@ +versions: + "8.13.42": + folder: all diff --git a/recipes/libpng/all/conandata.yml b/recipes/libpng/all/conandata.yml index 9d660e1b52521..0861bf8b1062b 100644 --- a/recipes/libpng/all/conandata.yml +++ b/recipes/libpng/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.6.44": + url: "https://sourceforge.net/projects/libpng/files/libpng16/1.6.44/libpng-1.6.44.tar.xz" + sha256: "60c4da1d5b7f0aa8d158da48e8f8afa9773c1c8baa5d21974df61f1886b8ce8e" "1.6.43": url: "https://sourceforge.net/projects/libpng/files/libpng16/1.6.43/libpng-1.6.43.tar.xz" sha256: "6a5ca0652392a2d7c9db2ae5b40210843c0bbc081cbd410825ab00cc59f14a6c" diff --git a/recipes/libpng/all/conanfile.py b/recipes/libpng/all/conanfile.py index a5aa7d7b88067..d41cc8f49d2bb 100644 --- a/recipes/libpng/all/conanfile.py +++ b/recipes/libpng/all/conanfile.py @@ -2,7 +2,7 @@ from conan.errors import ConanInvalidConfiguration from conan.tools.apple import is_apple_os from conan.tools.cmake import CMake, CMakeToolchain, CMakeDeps, cmake_layout -from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, replace_in_file, rm, rmdir +from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rm, rmdir from conan.tools.microsoft import is_msvc from conan.tools.scm import Version import os @@ -149,6 +149,7 @@ def package(self): rmdir(self, os.path.join(self.package_folder, "lib", "libpng")) rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) rmdir(self, os.path.join(self.package_folder, "share")) + rm(self, "*.cmake", os.path.join(self.package_folder, "lib", "cmake", "PNG")) def package_info(self): major_min_version = f"{Version(self.version).major}{Version(self.version).minor}" diff --git a/recipes/libpng/config.yml b/recipes/libpng/config.yml index 05a40beb2a7b3..72e85034a3407 100644 --- a/recipes/libpng/config.yml +++ b/recipes/libpng/config.yml @@ -1,4 +1,6 @@ versions: + "1.6.44": + folder: all "1.6.43": folder: all "1.6.42": diff --git a/recipes/libpointmatcher/all/conandata.yml b/recipes/libpointmatcher/all/conandata.yml index 448e7fdb12dff..90e42a2d1fa6b 100644 --- a/recipes/libpointmatcher/all/conandata.yml +++ b/recipes/libpointmatcher/all/conandata.yml @@ -1,9 +1,13 @@ sources: - "1.3.1": - url: "https://github.com/ethz-asl/libpointmatcher/archive/refs/tags/1.3.1.tar.gz" - sha256: "82f93d2e7689efeef8837b8e969919b51c51ad4a1d1fa921c4dd8df4811378ab" + "1.4.3": + url: "https://github.com/ethz-asl/libpointmatcher/archive/refs/tags/1.4.3.tar.gz" + sha256: "7f8f56d4e561206fb5720ece6fecf6d27e9fd214d4dd326d228fddbea8289cda" patches: - "1.3.1": - - patch_file: "patches/1.3.1-0001-fix-cmake.patch" + "1.4.3": + - patch_file: "patches/1.4.3-0001-fix-cmake.patch" patch_description: "Fix upstream CMakeLists" patch_type: "conan" + - patch_file: "patches/1.4.3-0002-fix-const-error.patch" + patch_description: "Fix ScalarType const_cast compile error" + patch_type: "bugfix" + patch_source: "https://github.com/norlab-ulaval/libpointmatcher/pull/580" diff --git a/recipes/libpointmatcher/all/conanfile.py b/recipes/libpointmatcher/all/conanfile.py index b189d68d9c79e..a55b2ee1013f1 100644 --- a/recipes/libpointmatcher/all/conanfile.py +++ b/recipes/libpointmatcher/all/conanfile.py @@ -1,15 +1,21 @@ +import os + from conan import ConanFile +from conan.errors import ConanInvalidConfiguration from conan.tools.build import check_min_cppstd from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rmdir -import os +from conan.tools.microsoft import is_msvc +from conan.tools.scm import Version required_conan_version = ">=1.53.0" class LibpointmatcherConan(ConanFile): name = "libpointmatcher" - description = "An Iterative Closest Point (ICP) library for 2D and 3D mapping in Robotics" + description = ( + "An Iterative Closest Point (ICP) library for 2D and 3D mapping in Robotics" + ) license = "BSD-3-Clause" topics = ("robotics", "lidar", "point-cloud") homepage = "https://github.com/ethz-asl/libpointmatcher" @@ -26,10 +32,22 @@ class LibpointmatcherConan(ConanFile): "fPIC": True, "with_openmp": False, } + short_paths = True @property def _min_cppstd(self): - return "11" + return "17" + + @property + def _compilers_minimum_version(self): + # https://github.com/norlab-ulaval/libpointmatcher/blob/1.4.3/CMakeLists.txt#L240 + return { + "gcc": "9", + "clang": "5", + "apple-clang": "7", + "msvc": "190", + "Visual Studio": "14", + } def export_sources(self): export_conandata_patches(self) @@ -41,19 +59,28 @@ def config_options(self): def configure(self): if self.options.shared: self.options.rm_safe("fPIC") + if is_msvc(self): + # Only static for msvc + del self.options.shared + self.package_type = "static-library" def layout(self): cmake_layout(self, src_folder="src") def requirements(self): self.requires("boost/1.81.0", transitive_headers=True) - # FIXME: eigen 3.4.0 is not compatible yet (see https://github.com/ethz-asl/libpointmatcher/issues/496) - self.requires("eigen/3.3.9", transitive_headers=True) + self.requires("eigen/3.4.0", transitive_headers=True) self.requires("libnabo/1.0.7") + self.requires("yaml-cpp/0.7.0", transitive_headers=True) def validate(self): if self.settings.compiler.get_safe("cppstd"): check_min_cppstd(self, self._min_cppstd) + minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) + if minimum_version and Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration( + f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." + ) def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) @@ -62,9 +89,12 @@ def generate(self): tc = CMakeToolchain(self) tc.cache_variables["USE_OPEN_MP"] = self.options.with_openmp tc.cache_variables["USE_OPEN_CL"] = False - tc.cache_variables["SHARED_LIBS"] = self.options.shared - # TODO: to unvendor, but libpointmatcher depends on legacy API of yaml-cpp (0.3.x) - tc.variables["USE_SYSTEM_YAML_CPP"] = False + tc.cache_variables["SHARED_LIBS"] = self.options.get_safe("shared") + tc.cache_variables["BUILD_EXAMPLES"] = False + tc.cache_variables["BUILD_EVALUATIONS"] = False + tc.cache_variables["BUILD_TESTS"] = False + if not self.settings.compiler.cppstd: + tc.variables["CMAKE_CXX_STANDARD"] = self._min_cppstd tc.generate() deps = CMakeDeps(self) deps.generate() @@ -76,8 +106,12 @@ def build(self): cmake.build() def package(self): - copy(self, "copyright", src=os.path.join(self.source_folder, "debian"), - dst=os.path.join(self.package_folder, "licenses")) + copy( + self, + "copyright", + src=os.path.join(self.source_folder, "debian"), + dst=os.path.join(self.package_folder, "licenses"), + ) cmake = CMake(self) cmake.install() rmdir(self, os.path.join(self.package_folder, "share")) @@ -85,4 +119,8 @@ def package(self): def package_info(self): self.cpp_info.set_property("cmake_file_name", "libpointmatcher") self.cpp_info.set_property("pkg_config_name", "libpointmatcher") - self.cpp_info.libs = ["pointmatcher"] + sufix = "d" if self.settings.build_type == "Debug" else "" + self.cpp_info.libs = [f"pointmatcher{sufix}"] + + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.system_libs = ["pthread", "m", "rt"] diff --git a/recipes/libpointmatcher/all/patches/1.3.1-0001-fix-cmake.patch b/recipes/libpointmatcher/all/patches/1.3.1-0001-fix-cmake.patch deleted file mode 100644 index bec21dac0c243..0000000000000 --- a/recipes/libpointmatcher/all/patches/1.3.1-0001-fix-cmake.patch +++ /dev/null @@ -1,208 +0,0 @@ ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -1,4 +1,4 @@ --cmake_minimum_required(VERSION 2.8.11) -+cmake_minimum_required(VERSION 3.15) - - include(CheckSymbolExists) - -@@ -46,6 +46,7 @@ if( BUILD_32 ) - endif( BUILD_32 ) - - # Ensure proper build type -+if(0) - if (NOT CMAKE_BUILD_TYPE) - message("-- No build type specified; defaulting to CMAKE_BUILD_TYPE=Release.") - set(CMAKE_BUILD_TYPE Release CACHE STRING -@@ -65,12 +66,14 @@ endif (NOT CMAKE_BUILD_TYPE) - if (NOT CMAKE_BUILD_TYPE STREQUAL "Debug") - add_definitions(-O3) - endif(NOT CMAKE_BUILD_TYPE STREQUAL "Debug") -+endif() - - # For Windows - if( MSVC ) - add_definitions( /D _VARIADIC_MAX=10 ) # VS2012 does not support tuples correctly yet - add_definitions( /D _USE_MATH_DEFINES) # defines M_PI for Visual Studio - add_definitions( /D _ENABLE_EXTENDED_ALIGNED_STORAGE) # this variable must be defined with VS2017 to acknowledge alignment changes of aligned_storage -+ add_compile_options(/bigobj) - endif() - - #======================= installation ===================================== -@@ -120,19 +123,16 @@ if (Boost_MINOR_VERSION GREATER 47) - find_package(Boost COMPONENTS thread filesystem system program_options date_time chrono REQUIRED) - endif (Boost_MINOR_VERSION GREATER 47) - include_directories(${Boost_INCLUDE_DIRS}) --set(EXTERNAL_LIBS ${EXTERNAL_LIBS} ${Boost_LIBRARIES}) -+set(EXTERNAL_LIBS ${EXTERNAL_LIBS} Boost::headers Boost::thread Boost::filesystem Boost::system Boost::program_options Boost::date_time Boost::chrono) - - - #-------------------- - # DEPENDENCY: eigen 3 - #-------------------- --find_path(EIGEN_INCLUDE_DIR Eigen/Core -- /usr/local/include/eigen3 -- /usr/include/eigen3 --) -+find_package(Eigen3 REQUIRED CONFIG) -+set(EXTERNAL_LIBS ${EXTERNAL_LIBS} Eigen3::Eigen ) - - # Suppress Eigen's warning by adding it to the system's library --include_directories(SYSTEM "${EIGEN_INCLUDE_DIR}") - - #TODO: this should be a more standard way - #find_package(Eigen3 REQUIRED) -@@ -143,10 +143,9 @@ include_directories(SYSTEM "${EIGEN_INCLUDE_DIR}") - #-------------------- - # DEPENDENCY: nabo - #-------------------- --find_package(libnabo REQUIRED PATHS ${LIBNABO_INSTALL_DIR}) -+find_package(libnabo REQUIRED CONFIG) - #include(libnaboConfig) --include_directories(${libnabo_INCLUDE_DIRS}) --set(EXTERNAL_LIBS ${EXTERNAL_LIBS} ${libnabo_LIBRARIES}) -+set(EXTERNAL_LIBS ${EXTERNAL_LIBS} libnabo::nabo) - message(STATUS "libnabo found, version ${libnabo_VERSION} (include=${libnabo_INCLUDE_DIRS} libs=${libnabo_LIBRARIES})") - - #-------------------- -@@ -215,8 +214,7 @@ else(USE_SYSTEM_YAML_CPP) - #get_property(yaml-cpp-pm_INCLUDE TARGET yaml-cpp-pm PROPERTY INCLUDE_DIRECTORIES) - #include_directories(${yaml-cpp-pm_INCLUDE}) - -- get_property(yaml-cpp-pm_LIB TARGET yaml-cpp-pm PROPERTY LOCATION) -- set (EXTERNAL_LIBS ${EXTERNAL_LIBS} ${yaml-cpp-pm_LIB} ) -+ set (EXTERNAL_LIBS ${EXTERNAL_LIBS} yaml-cpp-pm ) - set (EXTRA_DEPS ${EXTRA_DEPS} yaml-cpp-pm) - set(yamlcpp_FOUND) - -@@ -241,6 +239,7 @@ endif (POSIX_TIMERS AND NOT APPLE) - #========================== libpointmatcher itself ============================== - - # Check the compiler version as we need full C++11 support. -+if(0) - if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang") - # using Clang - if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "3.3") -@@ -276,6 +275,7 @@ if (CMAKE_VERSION VERSION_LESS "3.1") - else () - set (CMAKE_CXX_STANDARD 11) - endif () -+endif() - - # SOURCE - -@@ -350,12 +350,12 @@ file(GLOB_RECURSE POINTMATCHER_HEADERS "pointmatcher/*.h") - - # MacOS and Windows deal with shared/dynamic library differently. For - # simplicity, we only authorize static library in those cases. --if(APPLE OR WIN32) -+if(0) - - add_library(pointmatcher ${POINTMATCHER_SRC} ${POINTMATCHER_HEADERS} ) - install(TARGETS pointmatcher ARCHIVE DESTINATION ${INSTALL_LIB_DIR}) - --else(APPLE OR WIN32) -+else() - set(SHARED_LIBS "true" CACHE BOOL "To build shared (true) or static (false) library") - - if (SHARED_LIBS) -@@ -369,14 +369,15 @@ else(APPLE OR WIN32) - add_library(pointmatcher ${POINTMATCHER_SRC} ${POINTMATCHER_HEADERS} ) - install(TARGETS pointmatcher ARCHIVE DESTINATION ${INSTALL_LIB_DIR}) - endif(SHARED_LIBS) --endif(APPLE OR WIN32) -+ set_target_properties(pointmatcher PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS ON) -+ target_compile_features(pointmatcher PUBLIC cxx_std_11) -+endif() - - target_include_directories(pointmatcher PRIVATE ${CMAKE_SOURCE_DIR}/pointmatcher) - target_include_directories(pointmatcher PRIVATE ${CMAKE_SOURCE_DIR}/pointmatcher/DataPointsFilters) - target_include_directories(pointmatcher PRIVATE ${CMAKE_SOURCE_DIR}/pointmatcher/DataPointsFilters/utils) - - # link all libraries to libpointmatcher --add_definitions(-Wall) - #target_link_libraries(pointmatcher ${yaml-cpp_LIBRARIES} ${libnabo_LIBRARIES}) - target_link_libraries(pointmatcher ${EXTERNAL_LIBS}) - -@@ -432,11 +433,8 @@ endif(GENERATE_API_DOC) - #=============== trigger other makefile ====================== - - # Example programs --add_subdirectory(examples) - # Evaluation programs --add_subdirectory(evaluations) - # Unit testing --add_subdirectory(utest) - - - #=================== allow find_package() ========================= -@@ -451,6 +449,7 @@ add_subdirectory(utest) - # 1- local build # - - # Register the local build in case one doesn't use "make install" -+if(0) - export(PACKAGE libpointmatcher) - - # Create variable for the local build tree -@@ -537,3 +536,4 @@ configure_file( - - add_custom_target(uninstall - COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake) -+endif() ---- a/contrib/CMakeLists.txt -+++ b/contrib/CMakeLists.txt -@@ -1,8 +1,6 @@ - # External libraries packed with libpointmatcher - - # GTest --include_directories(${CMAKE_CURRENT_SOURCE_DIR}) --add_library(gtest gtest/gtest-all.cc) - - # Wrapped yaml-cpp - if(NOT USE_SYSTEM_YAML_CPP) ---- a/contrib/yaml-cpp-pm/CMakeLists.txt -+++ b/contrib/yaml-cpp-pm/CMakeLists.txt -@@ -19,7 +19,6 @@ set(YAML_CPP_BUILD_CONTRIB OFF) - # --> General - # see http://www.cmake.org/cmake/help/cmake2.6docs.html#variable:BUILD_SHARED_LIBS - # http://www.cmake.org/cmake/help/cmake2.6docs.html#command:add_library --set(BUILD_SHARED_LIBS OFF) - - # --> Apple - option(APPLE_UNIVERSAL_BIN "Apple: Build universal binary" OFF) -@@ -55,7 +54,6 @@ endif() - - if(WIN32) - if(BUILD_SHARED_LIBS) -- add_definitions(-D${PROJECT_NAME}_DLL) # use or build Windows DLL - endif() - if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) - set(CMAKE_INSTALL_PREFIX "C:/") -@@ -63,7 +61,7 @@ if(WIN32) - endif() - - # GCC / Clang specialities --if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang") -+if(0) - ### General stuff - if(WIN32) - set(CMAKE_SHARED_LIBRARY_PREFIX "") # DLLs do not have a "lib" prefix -@@ -105,7 +103,7 @@ endif() - ### - ### Library - ### --add_library(yaml-cpp-pm -+add_library(yaml-cpp-pm OBJECT - ${sources} - ${public_headers} - ${private_headers} -@@ -113,6 +111,9 @@ add_library(yaml-cpp-pm - ${contrib_public_headers} - ${contrib_private_headers} - ) -+if(BUILD_SHARED_LIBS) -+ set_target_properties(yaml-cpp-pm PROPERTIES POSITION_INDEPENDENT_CODE ON) -+endif() - - set_target_properties(yaml-cpp-pm PROPERTIES - VERSION "${YAML_CPP_VERSION}" diff --git a/recipes/libpointmatcher/all/patches/1.4.3-0001-fix-cmake.patch b/recipes/libpointmatcher/all/patches/1.4.3-0001-fix-cmake.patch new file mode 100644 index 0000000000000..50590958948df --- /dev/null +++ b/recipes/libpointmatcher/all/patches/1.4.3-0001-fix-cmake.patch @@ -0,0 +1,109 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 0acebe3..b17f3d5 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,4 +1,4 @@ +-cmake_minimum_required(VERSION 3.10.2) ++cmake_minimum_required(VERSION 3.15) + + include(GNUInstallDirs) # populate CMAKE_INSTALL_{LIB,BIN}DIR + include(CheckSymbolExists) +@@ -9,8 +9,6 @@ include(CMakePackageConfigHelpers) + # Project details / setup + #======================== + +-set(CMAKE_POSITION_INDEPENDENT_CODE ON) # add -fPIC as required +- + # Extract version from header, done first to satisfy CMP0048, + # see `cmake --help-policy CMP0048` for more information. + file( +@@ -51,6 +49,7 @@ if( BUILD_32 ) + endif() + + # Ensure proper build type ++if(0) + if (NOT CMAKE_BUILD_TYPE) + message("-- No build type specified; defaulting to CMAKE_BUILD_TYPE=Release.") + set(CMAKE_BUILD_TYPE Release CACHE STRING +@@ -64,6 +63,7 @@ else () + message("\n=================================================================================") + endif () + endif () ++endif() + + + #================= extra building definitions ============================== +@@ -110,9 +110,6 @@ endforeach() + # initially + set(EXTERNAL_LIBS "") + +-# compile local version of gtest +-add_subdirectory(contrib) +- + #--------------------------- + # DEPENDENCY: POSIX Threads + #--------------------------- +@@ -134,22 +131,10 @@ endif () + #-------------------- + # DEPENDENCY: eigen 3 + #-------------------- +-find_path(EIGEN_INCLUDE_DIR NAMES signature_of_eigen3_matrix_library +- HINTS ENV EIGEN3_INC_DIR +- ENV EIGEN3_DIR +- PATHS Eigen/Core +- /usr/local/include +- /usr/include +- PATH_SUFFIXES include eigen3 eigen +- DOC "Directory containing the Eigen3 header files" +-) + + # Suppress Eigen's warning by adding it to the system's library +-include_directories(SYSTEM "${EIGEN_INCLUDE_DIR}") +- +-#TODO: this should be a more standard way +-#find_package(Eigen3 REQUIRED) +-#message("-- eigen3 , version ${EIGEN_VERSION}") ++find_package(Eigen3 REQUIRED) ++set(EXTERNAL_LIBS ${EXTERNAL_LIBS} Eigen3::Eigen ) + + + +@@ -158,7 +143,7 @@ include_directories(SYSTEM "${EIGEN_INCLUDE_DIR}") + #-------------------- + if (NOT TARGET nabo) + # Find libnabo: +- find_package(libnabo REQUIRED PATHS ${LIBNABO_INSTALL_DIR}) ++ find_package(libnabo REQUIRED PATHS) + if (TARGET libnabo::nabo) + set(libnabo_LIBRARIES libnabo::nabo) + message(STATUS "libnabo found, version ${libnabo_VERSION} (Config mode, libs=${libnabo_LIBRARIES})") +@@ -238,6 +223,7 @@ check_symbol_exists(_POSIX_TIMERS "unistd.h;time.h" POSIX_TIMERS) + #========================== libpointmatcher itself ============================== + + # Check the compiler version as we need full C++17 support. ++if(0) + if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang") + # using Clang + if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "5") +@@ -273,6 +259,7 @@ if (CMAKE_VERSION VERSION_LESS "3.8") + else () + set (CMAKE_CXX_STANDARD 17) + endif () ++endif () + + # SOURCE + +@@ -483,7 +470,7 @@ endif() + # include_directories(${libpointmatcher_INCLUDE_DIRS}) + # target_link_libraries(executableName ${libpointmatcher_LIBRARIES}) + # ... +- ++if(0) + # 1- local build # + + # Install cmake config module +@@ -574,3 +561,4 @@ if (NOT TARGET uninstall) + add_custom_target(uninstall + COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake) + endif() ++endif() diff --git a/recipes/libpointmatcher/all/patches/1.4.3-0002-fix-const-error.patch b/recipes/libpointmatcher/all/patches/1.4.3-0002-fix-const-error.patch new file mode 100644 index 0000000000000..1dd09a84875d2 --- /dev/null +++ b/recipes/libpointmatcher/all/patches/1.4.3-0002-fix-const-error.patch @@ -0,0 +1,13 @@ +diff --git a/pointmatcher/PointCloudGenerator.cpp b/pointmatcher/PointCloudGenerator.cpp +index d084dd2..739995b 100644 +--- a/pointmatcher/PointCloudGenerator.cpp ++++ b/pointmatcher/PointCloudGenerator.cpp +@@ -170,7 +170,7 @@ typename PointMatcher::DataPoints PointMatcher::PointCloudGenerator::gener + { + // Sample random values of theta and phi. + const ScalarType phi{ 2.0f * pi * uniformDistribution(randomNumberGenerator) }; +- const ScalarType radiusSample{ radius * sqrt(uniformDistribution(randomNumberGenerator)) }; ++ const ScalarType radiusSample{ static_cast(radius * sqrt(uniformDistribution(randomNumberGenerator))) }; + + // Pre-compute values, such as sine and cosine of phi and theta. + const ScalarType sinPhi{ std::sin(phi) }; diff --git a/recipes/libpointmatcher/config.yml b/recipes/libpointmatcher/config.yml index 59334d5077368..91b545dcd8ee8 100644 --- a/recipes/libpointmatcher/config.yml +++ b/recipes/libpointmatcher/config.yml @@ -1,3 +1,3 @@ versions: - "1.3.1": + "1.4.3": folder: all diff --git a/recipes/libpopcnt/all/conandata.yml b/recipes/libpopcnt/all/conandata.yml new file mode 100644 index 0000000000000..b0127ac4b8ec5 --- /dev/null +++ b/recipes/libpopcnt/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "3.1": + url: "https://github.com/kimwalisch/libpopcnt/archive/refs/tags/v3.1.tar.gz" + sha256: "b4ea061f4c2e5385dff0dd032ad5a16c60dc0dd050391283afb463c0d62c19bd" diff --git a/recipes/libpopcnt/all/conanfile.py b/recipes/libpopcnt/all/conanfile.py new file mode 100644 index 0000000000000..5f7a42a3c6d34 --- /dev/null +++ b/recipes/libpopcnt/all/conanfile.py @@ -0,0 +1,44 @@ +from conan import ConanFile +from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout +from conan.tools.files import copy, get +import os + +required_conan_version = ">=1.52.0" + +class LibPopcntConan(ConanFile): + name = "libpopcnt" + description = "Fast C/C++ bit population count library" + license = "BSD-2-Clause" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/kimwalisch/libpopcnt" + topics = ("popcnt", "popcount", "neon", "avx2", "avx512", "header-only") + package_type = "header-library" + settings = "os", "arch", "compiler", "build_type" + no_copy_source = True + + def layout(self): + cmake_layout(self, src_folder="src") + + def package_id(self): + self.info.clear() + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + tc.generate() + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def package(self): + copy(self, "LICENSE", self.source_folder, os.path.join(self.package_folder, "licenses")) + cmake = CMake(self) + cmake.install() + + def package_info(self): + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] diff --git a/recipes/libpopcnt/all/test_package/CMakeLists.txt b/recipes/libpopcnt/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..999d497c63aec --- /dev/null +++ b/recipes/libpopcnt/all/test_package/CMakeLists.txt @@ -0,0 +1,7 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES C) + +find_package(libpopcnt REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.c) +target_link_libraries(${PROJECT_NAME} PRIVATE libpopcnt::libpopcnt) diff --git a/recipes/libpopcnt/all/test_package/conanfile.py b/recipes/libpopcnt/all/test_package/conanfile.py new file mode 100644 index 0000000000000..3a91c9439218e --- /dev/null +++ b/recipes/libpopcnt/all/test_package/conanfile.py @@ -0,0 +1,26 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def layout(self): + cmake_layout(self) + + def requirements(self): + self.requires(self.tested_reference_str) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/libpopcnt/all/test_package/test_package.c b/recipes/libpopcnt/all/test_package/test_package.c new file mode 100644 index 0000000000000..6faee9c998607 --- /dev/null +++ b/recipes/libpopcnt/all/test_package/test_package.c @@ -0,0 +1,10 @@ +#include +#include +#include + +int main() { + const char data = 0xff; + uint64_t bits = popcnt(&data, sizeof(char)); + printf("popcnt(0xff) = %" PRIu64 " (expected 8) - Test package successful \n", bits); + return 0; +} diff --git a/recipes/libpopcnt/config.yml b/recipes/libpopcnt/config.yml new file mode 100644 index 0000000000000..992d10eb37c11 --- /dev/null +++ b/recipes/libpopcnt/config.yml @@ -0,0 +1,3 @@ +versions: + "3.1": + folder: all diff --git a/recipes/libpq/all/conandata.yml b/recipes/libpq/all/conandata.yml index bad003ca4bd76..e2fb75c61ff71 100644 --- a/recipes/libpq/all/conandata.yml +++ b/recipes/libpq/all/conandata.yml @@ -31,6 +31,9 @@ patches: - patch_file: "patches/15/001-mingw-build-static-libraries.patch" patch_description: "port MinGW: Enable building static libraries in MinGW." patch_type: "portability" + - patch_file: "patches/15.5/0001-Use-BIO_-get-set-_app_data-instead-of-BIO_-get-se.patch" + patch_description: "Fix libpq w/ openssl >=3.2.x" + patch_type: "backport" "15.4": - patch_file: "patches/15/001-mingw-build-static-libraries.patch" patch_description: "port MinGW: Enable building static libraries in MinGW." diff --git a/recipes/libpq/all/conanfile.py b/recipes/libpq/all/conanfile.py index 53f51b549f74e..03fae8567c8cd 100644 --- a/recipes/libpq/all/conanfile.py +++ b/recipes/libpq/all/conanfile.py @@ -16,11 +16,12 @@ class LibpqConan(ConanFile): name = "libpq" description = "The library used by all the standard PostgreSQL tools." - topics = ("libpq", "postgresql", "database", "db") + topics = ("postgresql", "database", "db") url = "https://github.com/conan-io/conan-center-index" homepage = "https://www.postgresql.org/docs/current/static/libpq.html" license = "PostgreSQL" + package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], @@ -164,6 +165,13 @@ def _patch_sources(self): replace_in_file(self, os.path.join(self.source_folder, "src", "interfaces", "libpq", "Makefile"), "ifeq ($(enable_thread_safety), yes)\nOBJS += pthread-win32.o\nendif", "") + # When linking to static openssl, it comes with static pthread library too, failing with: + # libpq.so.5.15: U pthread_exit@GLIBC_2.2.5: libpq must not be calling any function which invokes exit + # https://www.postgresql.org/message-id/20210703001639.GB2374652%40rfd.leadboat.com + if Version(self.version) >= "15": + replace_in_file(self, os.path.join(self.source_folder, "src", "interfaces", "libpq", "Makefile"), + "-v __cxa_atexit", + "-v __cxa_atexit -e pthread_exit") def build(self): apply_conandata_patches(self) @@ -236,7 +244,7 @@ def package(self): autotools.install() with chdir(self, os.path.join(self.source_folder, "src", "bin", "pg_config")): autotools.install() - copy(self, "*.h", src=os.path.join(self.build_folder, "src", "include", "catalog"), + copy(self, "*.h", src=os.path.join(self.source_folder, "src", "include", "catalog"), dst=os.path.join(self.package_folder, "include", "catalog")) rmdir(self, os.path.join(self.package_folder, "share")) rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) diff --git a/recipes/libpq/all/patches/15.5/0001-Use-BIO_-get-set-_app_data-instead-of-BIO_-get-se.patch b/recipes/libpq/all/patches/15.5/0001-Use-BIO_-get-set-_app_data-instead-of-BIO_-get-se.patch new file mode 100644 index 0000000000000..03514f3a2bc18 --- /dev/null +++ b/recipes/libpq/all/patches/15.5/0001-Use-BIO_-get-set-_app_data-instead-of-BIO_-get-se.patch @@ -0,0 +1,193 @@ +From 672103a67aaf0dae5be6c5adcc5ce19e5b6d7676 Mon Sep 17 00:00:00 2001 +From: Tristan Partin +Date: Mon, 27 Nov 2023 11:49:52 -0600 +Subject: [PATCH v1] Use BIO_{get,set}_app_data() instead of + BIO_{get,set}_data() + +Compiling Postgres against OpenSSL 3.2 exposed a regression: + +$ psql "postgresql://$DB?sslmode=require" +psql: error: connection to server at "redacted" (redacted), port 5432 failed: ERROR: Parameter 'user' is missing in startup packet. +double free or corruption (out) +Aborted (core dumped) + +Analyzing the backtrace, openssl was overwriting heap-allocated data in +our PGconn struct because it thought BIO::ptr was a struct bss_sock_st +*. OpenSSL then called a memset() on a member of that struct, and we +zeroed out data in our PGconn struct. + +BIO_get_data(3) says the following: + +> These functions are mainly useful when implementing a custom BIO. +> +> The BIO_set_data() function associates the custom data pointed to by ptr +> with the BIO a. This data can subsequently be retrieved via a call to +> BIO_get_data(). This can be used by custom BIOs for storing +> implementation specific information. + +If you take a look at my_BIO_s_socket(), we create a partially custom +BIO, but for the most part are defaulting to the methods defined by +BIO_s_socket(). We need to set application-specific data and not BIO +private data, so that the BIO implementation we rely on, can properly +assert that its private data is what it expects. + +Rebased against libpq15 + +Co-authored-by: Bo Andreson +--- + src/backend/libpq/be-secure-openssl.c | 11 +++-------- + src/include/pg_config.h.in | 3 --- + src/interfaces/libpq/fe-secure-openssl.c | 20 +++----------------- + src/tools/msvc/Solution.pm | 2 -- + 4 files changed, 6 insertions(+), 30 deletions(-) + +diff --git a/configure b/configure +index d83a402ea1..d55440cd6a 100755 +--- a/configure ++++ b/configure +@@ -13239,7 +13239,7 @@ done + # defines OPENSSL_VERSION_NUMBER to claim version 2.0.0, even though it + # doesn't have these OpenSSL 1.1.0 functions. So check for individual + # functions. +- for ac_func in OPENSSL_init_ssl BIO_get_data BIO_meth_new ASN1_STRING_get0_data HMAC_CTX_new HMAC_CTX_free ++ for ac_func in OPENSSL_init_ssl BIO_meth_new ASN1_STRING_get0_data HMAC_CTX_new HMAC_CTX_free + do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` + ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +diff --git a/configure.ac b/configure.ac +index 570daced81..2bc752ca1a 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -1347,7 +1347,7 @@ if test "$with_ssl" = openssl ; then + # defines OPENSSL_VERSION_NUMBER to claim version 2.0.0, even though it + # doesn't have these OpenSSL 1.1.0 functions. So check for individual + # functions. +- AC_CHECK_FUNCS([OPENSSL_init_ssl BIO_get_data BIO_meth_new ASN1_STRING_get0_data HMAC_CTX_new HMAC_CTX_free]) ++ AC_CHECK_FUNCS([OPENSSL_init_ssl BIO_meth_new ASN1_STRING_get0_data HMAC_CTX_new HMAC_CTX_free]) + # OpenSSL versions before 1.1.0 required setting callback functions, for + # thread-safety. In 1.1.0, it's no longer required, and CRYPTO_lock() + # function was removed. +diff --git a/src/backend/libpq/be-secure-openssl.c b/src/backend/libpq/be-secure-openssl.c +index f5c5ed210e..aed8a75345 100644 +--- a/src/backend/libpq/be-secure-openssl.c ++++ b/src/backend/libpq/be-secure-openssl.c +@@ -839,11 +839,6 @@ be_tls_write(Port *port, void *ptr, size_t len, int *waitfor) + * to retry; do we need to adopt their logic for that? + */ + +-#ifndef HAVE_BIO_GET_DATA +-#define BIO_get_data(bio) (bio->ptr) +-#define BIO_set_data(bio, data) (bio->ptr = data) +-#endif +- + static BIO_METHOD *my_bio_methods = NULL; + + static int +@@ -853,7 +848,7 @@ my_sock_read(BIO *h, char *buf, int size) + + if (buf != NULL) + { +- res = secure_raw_read(((Port *) BIO_get_data(h)), buf, size); ++ res = secure_raw_read(((Port *) BIO_get_app_data(h)), buf, size); + BIO_clear_retry_flags(h); + if (res <= 0) + { +@@ -873,7 +868,7 @@ my_sock_write(BIO *h, const char *buf, int size) + { + int res = 0; + +- res = secure_raw_write(((Port *) BIO_get_data(h)), buf, size); ++ res = secure_raw_write(((Port *) BIO_get_app_data(h)), buf, size); + BIO_clear_retry_flags(h); + if (res <= 0) + { +@@ -949,7 +944,7 @@ my_SSL_set_fd(Port *port, int fd) + SSLerr(SSL_F_SSL_SET_FD, ERR_R_BUF_LIB); + goto err; + } +- BIO_set_data(bio, port); ++ BIO_set_app_data(bio, port); + + BIO_set_fd(bio, fd, BIO_NOCLOSE); + SSL_set_bio(port->ssl, bio, bio); +diff --git a/src/include/pg_config.h.in b/src/include/pg_config.h.in +index d09e9f9a1c..768e3d719c 100644 +--- a/src/include/pg_config.h.in ++++ b/src/include/pg_config.h.in +@@ -77,9 +77,6 @@ + /* Define to 1 if you have the `backtrace_symbols' function. */ + #undef HAVE_BACKTRACE_SYMBOLS + +-/* Define to 1 if you have the `BIO_get_data' function. */ +-#undef HAVE_BIO_GET_DATA +- + /* Define to 1 if you have the `BIO_meth_new' function. */ + #undef HAVE_BIO_METH_NEW + +diff --git a/src/interfaces/libpq/fe-secure-openssl.c b/src/interfaces/libpq/fe-secure-openssl.c +index af59ff49f7..8d68d023e9 100644 +--- a/src/interfaces/libpq/fe-secure-openssl.c ++++ b/src/interfaces/libpq/fe-secure-openssl.c +@@ -1800,11 +1800,6 @@ PQsslAttribute(PGconn *conn, const char *attribute_name) + * to retry; do we need to adopt their logic for that? + */ + +-#ifndef HAVE_BIO_GET_DATA +-#define BIO_get_data(bio) (bio->ptr) +-#define BIO_set_data(bio, data) (bio->ptr = data) +-#endif +- + static BIO_METHOD *my_bio_methods; + + static int +@@ -1812,7 +1807,7 @@ my_sock_read(BIO *h, char *buf, int size) + { + int res; + +- res = pqsecure_raw_read((PGconn *) BIO_get_data(h), buf, size); ++ res = pqsecure_raw_read((PGconn *) BIO_get_app_data(h), buf, size); + BIO_clear_retry_flags(h); + if (res < 0) + { +@@ -1842,7 +1837,7 @@ my_sock_write(BIO *h, const char *buf, int size) + { + int res; + +- res = pqsecure_raw_write((PGconn *) BIO_get_data(h), buf, size); ++ res = pqsecure_raw_write((PGconn *) BIO_get_app_data(h), buf, size); + BIO_clear_retry_flags(h); + if (res < 0) + { +@@ -1933,7 +1928,7 @@ my_SSL_set_fd(PGconn *conn, int fd) + SSLerr(SSL_F_SSL_SET_FD, ERR_R_BUF_LIB); + goto err; + } +- BIO_set_data(bio, conn); ++ BIO_set_app_data(bio, conn); + + SSL_set_bio(conn->ssl, bio, bio); + BIO_set_fd(bio, fd, BIO_NOCLOSE); +diff --git a/src/tools/msvc/Solution.pm b/src/tools/msvc/Solution.pm +index 790f03b05e..a53239fa28 100644 +--- a/src/tools/msvc/Solution.pm ++++ b/src/tools/msvc/Solution.pm +@@ -226,7 +226,6 @@ sub GenerateFiles + HAVE_ATOMICS => 1, + HAVE_ATOMIC_H => undef, + HAVE_BACKTRACE_SYMBOLS => undef, +- HAVE_BIO_GET_DATA => undef, + HAVE_BIO_METH_NEW => undef, + HAVE_CLOCK_GETTIME => undef, + HAVE_COMPUTED_GOTO => undef, +@@ -566,7 +565,6 @@ sub GenerateFiles + || ($digit1 >= '1' && $digit2 >= '1' && $digit3 >= '0')) + { + $define{HAVE_ASN1_STRING_GET0_DATA} = 1; +- $define{HAVE_BIO_GET_DATA} = 1; + $define{HAVE_BIO_METH_NEW} = 1; + $define{HAVE_HMAC_CTX_FREE} = 1; + $define{HAVE_HMAC_CTX_NEW} = 1; +-- +Tristan Partin +Neon (https://neon.tech) + diff --git a/recipes/libpqxx/all/conandata.yml b/recipes/libpqxx/all/conandata.yml index 4d1617ceb885b..50ce1231a555d 100644 --- a/recipes/libpqxx/all/conandata.yml +++ b/recipes/libpqxx/all/conandata.yml @@ -1,4 +1,10 @@ sources: + "7.9.2": + url: "https://github.com/jtv/libpqxx/archive/refs/tags/7.9.2.tar.gz" + sha256: "e37d5774c39f6c802e32d7f418e88b8e530404fb54758516e884fc0ebdee6da4" + "7.9.1": + url: "https://github.com/jtv/libpqxx/archive/refs/tags/7.9.1.tar.gz" + sha256: "4fafd63009b1d6c2b64b8c184c04ae4d1f7aa99d8585154832d28012bae5b0b6" "7.9.0": url: "https://github.com/jtv/libpqxx/archive/refs/tags/7.9.0.tar.gz" sha256: "a1fafd5f6455f6c66241fca1f35f5cb603251580b99f9a0cf1b5d0a586006f16" @@ -27,6 +33,14 @@ sources: url: "https://github.com/jtv/libpqxx/archive/6.4.8.tar.gz" sha256: "3f7aba951822e01f1b9f9f353702954773323dd9f9dc376ffb57cb6bbd9a7a2f" patches: + "7.9.2": + - patch_file: "patches/0001-cmake-fix-module.patch" + patch_description: "Keep `CMAKE_MODULE_PATH` to be changed by conan." + patch_type: "conan" + "7.9.1": + - patch_file: "patches/0001-cmake-fix-module.patch" + patch_description: "Keep `CMAKE_MODULE_PATH` to be changed by conan." + patch_type: "conan" "7.9.0": - patch_file: "patches/0001-cmake-fix-module.patch" patch_description: "Keep `CMAKE_MODULE_PATH` to be changed by conan." diff --git a/recipes/libpqxx/config.yml b/recipes/libpqxx/config.yml index 4c8b35797bd1a..5c0e478232496 100644 --- a/recipes/libpqxx/config.yml +++ b/recipes/libpqxx/config.yml @@ -1,4 +1,8 @@ versions: + "7.9.2": + folder: all + "7.9.1": + folder: all "7.9.0": folder: all "7.8.1": diff --git a/recipes/libprotobuf-mutator/all/CMakeLists.txt b/recipes/libprotobuf-mutator/all/CMakeLists.txt index 694038520f556..54f184da6c63a 100644 --- a/recipes/libprotobuf-mutator/all/CMakeLists.txt +++ b/recipes/libprotobuf-mutator/all/CMakeLists.txt @@ -1,13 +1,9 @@ -cmake_minimum_required(VERSION 2.8.11) -project(cmake_wrapper) +cmake_minimum_required(VERSION 3.15) +project(cmake_wrapper CXX) -include(conanbuildinfo.cmake) -conan_basic_setup() +find_package(Protobuf REQUIRED) +find_package(absl CONFIG REQUIRED) -add_subdirectory(source_subfolder) +add_subdirectory(src) -if(MSVC) - # Should be added because of - # https://docs.microsoft.com/en-us/windows/win32/api/synchapi/nf-synchapi-initonceexecuteonce - add_definitions(-D_WIN32_WINNT=0x0600) -endif() +target_link_libraries(protobuf-mutator PUBLIC protobuf::libprotobuf absl::strings) diff --git a/recipes/libprotobuf-mutator/all/conandata.yml b/recipes/libprotobuf-mutator/all/conandata.yml index 813688d3f74a5..1152bb8579584 100644 --- a/recipes/libprotobuf-mutator/all/conandata.yml +++ b/recipes/libprotobuf-mutator/all/conandata.yml @@ -1,4 +1,4 @@ sources: - "cci.20210831": - url: "https://github.com/google/libprotobuf-mutator/archive/ffd86a32874e5c08a143019aad1aaf0907294c9f.zip" - sha256: "14f595863452808483776ce1964209db00cdac79e649b31eb4d4b06ca72912d8" + "1.3": + url: "https://github.com/google/libprotobuf-mutator/archive/refs/tags/v1.3.tar.gz" + sha256: "1ee3473a6b0274494fce599539605bb19305c0efadc62b58d645812132c31baa" diff --git a/recipes/libprotobuf-mutator/all/conanfile.py b/recipes/libprotobuf-mutator/all/conanfile.py index f0419a2397845..b03de6dbf5696 100644 --- a/recipes/libprotobuf-mutator/all/conanfile.py +++ b/recipes/libprotobuf-mutator/all/conanfile.py @@ -1,8 +1,14 @@ -from conans import ConanFile, CMake, tools -from conans.errors import ConanInvalidConfiguration +from conan import ConanFile +from conan.tools.build import check_min_cppstd +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.files import copy, get, replace_in_file, rmdir +from conan.tools.microsoft import is_msvc, is_msvc_static_runtime +from conan.tools.env import VirtualBuildEnv +from conan.tools.scm import Version +from conan.errors import ConanInvalidConfiguration import os -required_conan_version = ">=1.33.0" +required_conan_version = ">=1.54.0" class LibProtobufMutatorConan(ConanFile): @@ -13,76 +19,117 @@ class LibProtobufMutatorConan(ConanFile): description = "A library to randomly mutate protobuffers." topics = ("test", "fuzzing", "protobuf") settings = "os", "compiler", "build_type", "arch" - generators = "cmake" - exports_sources = ["CMakeLists.txt"] - - _cmake = None + package_type = "library" + options = { + "shared": [True, False], + "fPIC": [True, False] + } + default_options = { + "shared": False, + "fPIC": True + } @property - def _source_subfolder(self): - return "source_subfolder" + def _min_cppstd(self): + return 14 @property - def _build_subfolder(self): - return "build_subfolder" + def _compilers_minimum_version(self): + return { + "apple-clang": "10", + "clang": "7", + "gcc": "5", + "msvc": "191", + "Visual Studio": "15", + } + + def export_sources(self): + copy(self, "CMakeLists.txt", src=self.recipe_folder, dst=self.export_sources_folder) + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def configure(self): + if self.options.get_safe("shared"): + self.options.rm_safe("fPIC") + if is_msvc(self): + self.options.rm_safe("shared") + self.package_type = "static-library" + + def layout(self): + cmake_layout(self, src_folder="src") def requirements(self): - self.requires("protobuf/3.17.1") - - def source(self): - tools.get(**self.conan_data["sources"][self.version], - destination=self._source_subfolder, strip_root=True) + # Protobuf headers are required by public src/binary_format.h and + self.requires("protobuf/4.25.3", transitive_headers=True) + # Abseil headers are required by public src/field_instance.h + self.requires("abseil/20240116.2") def validate(self): - if self.settings.compiler != "clang": - raise ConanInvalidConfiguration("Only clang allowed") - if self.settings.compiler.libcxx != "libstdc++11": - raise ConanInvalidConfiguration("Requires either compiler.libcxx=libstdc++11") if self.settings.compiler.cppstd: - tools.check_min_cppstd(self, 11) + check_min_cppstd(self, self._min_cppstd) + minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) + if minimum_version and Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration(f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support.") + + def build_requirements(self): + self.tool_requires("cmake/[>=3.24 <4]") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) def _patch_sources(self): - tools.replace_in_file( - os.path.join(self._source_subfolder, 'CMakeLists.txt'), - """include_directories(${PROTOBUF_INCLUDE_DIRS})""", - """include_directories(${protobuf_INCLUDE_DIRS})""") - tools.replace_in_file( - os.path.join(self._source_subfolder, 'CMakeLists.txt'), - """set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake/external)""", - """# (disabled by conan) set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake/external)""") - tools.replace_in_file( - os.path.join(self._source_subfolder, 'CMakeLists.txt'), - """add_subdirectory(examples EXCLUDE_FROM_ALL)""", - """# (disabled by conan) add_subdirectory(examples EXCLUDE_FROM_ALL)""") - - def _configure_cmake(self): - if self._cmake: - return self._cmake - - self._cmake = CMake(self) - self._cmake.definitions["LIB_PROTO_MUTATOR_TESTING"] = "OFF" - self._cmake.definitions["LIB_PROTO_MUTATOR_DOWNLOAD_PROTOBUF"] = "OFF" - self._cmake.definitions["LIB_PROTO_MUTATOR_WITH_ASAN"] = "OFF" - self._cmake.definitions["LIB_PROTO_MUTATOR_FUZZER_LIBRARIES"] = "" - # todo: check option(LIB_PROTO_MUTATOR_MSVC_STATIC_RUNTIME "Link static runtime libraries" ON) - self._cmake.configure(build_folder=self._build_subfolder) - return self._cmake + # Preserves Conan as dependency manager + replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), + "set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake/external)", + "", + ) + # Fix libprotobuf-mutator.pc installation origin path + replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), + "${CMAKE_BINARY_DIR}/libprotobuf-mutator.pc", + "${CMAKE_CURRENT_BINARY_DIR}/libprotobuf-mutator.pc", + ) + # Do not include examples when running CMake configure to avoid more dependencies + replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), + "add_subdirectory(examples EXCLUDE_FROM_ALL)", + "", + ) + + def generate(self): + tc = VirtualBuildEnv(self) + tc.generate() + tc = CMakeToolchain(self) + tc.variables["LIB_PROTO_MUTATOR_TESTING"] = False + tc.variables["LIB_PROTO_MUTATOR_DOWNLOAD_PROTOBUF"] = False + tc.variables["LIB_PROTO_MUTATOR_WITH_ASAN"] = False + tc.variables["PKG_CONFIG_PATH"] = "share" + if is_msvc(self): + tc.variables["LIB_PROTO_MUTATOR_MSVC_STATIC_RUNTIME"] = is_msvc_static_runtime(self) + tc.generate() + tc = CMakeDeps(self) + tc.generate() def build(self): self._patch_sources() - cmake = self._configure_cmake() + cmake = CMake(self) + cmake.configure(build_script_folder=os.path.join(self.source_folder, os.pardir)) cmake.build() def package(self): - self.copy(pattern="LICENSE", dst="licenses", src=self._source_subfolder) - cmake = self._configure_cmake() + copy(self, pattern="LICENSE", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) + cmake = CMake(self) cmake.install() - tools.rmdir(os.path.join(self.package_folder, "OFF")) - tools.rmdir(os.path.join(self.package_folder, "lib", "cmake")) + rmdir(self, os.path.join(self.package_folder, "share")) + rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) def package_info(self): - self.cpp_info.names["cmake_find_package"] = "libprotobuf-mutator" - self.cpp_info.names["cmake_find_package_multi"] = "libprotobuf-mutator" - - self.cpp_info.libs = ['protobuf-mutator-libfuzzer', 'protobuf-mutator'] - self.cpp_info.includedirs.append(os.path.join("include", "libprotobuf-mutator")) + self.cpp_info.components["mutator"].libs = ["protobuf-mutator"] + self.cpp_info.components["mutator"].set_property("cmake_target_name", "libprotobuf-mutator::protobuf-mutator") + self.cpp_info.components["mutator"].includedirs.append("include/libprotobuf-mutator") + self.cpp_info.components["mutator"].requires = ["protobuf::libprotobuf", "abseil::absl_strings"] + + self.cpp_info.components["fuzzer"].libs = ['protobuf-mutator-libfuzzer'] + self.cpp_info.components["fuzzer"].set_property("cmake_target_name", "libprotobuf-mutator::protobuf-mutator-libfuzzer") + self.cpp_info.components["fuzzer"].includedirs.append("include/libprotobuf-mutator") + self.cpp_info.components["fuzzer"].requires = ["mutator", "protobuf::libprotobuf"] diff --git a/recipes/libprotobuf-mutator/all/test_package/CMakeLists.txt b/recipes/libprotobuf-mutator/all/test_package/CMakeLists.txt index 00520b9489805..70a0e97ac972f 100644 --- a/recipes/libprotobuf-mutator/all/test_package/CMakeLists.txt +++ b/recipes/libprotobuf-mutator/all/test_package/CMakeLists.txt @@ -1,19 +1,8 @@ -cmake_minimum_required(VERSION 3.1) -project(test_package CXX) +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) - -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) find_package(libprotobuf-mutator REQUIRED CONFIG) - -protobuf_generate_cpp( - MSG_PROTO_SRCS - MSG_PROTO_HDRS - msg.proto -) - - -add_executable(${PROJECT_NAME} ${MSG_PROTO_SRCS} test_package.cpp) -target_include_directories(${PROJECT_NAME} PRIVATE ${CMAKE_CURRENT_BINARY_DIR}) -target_link_libraries(${PROJECT_NAME} libprotobuf-mutator::libprotobuf-mutator) +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE libprotobuf-mutator::protobuf-mutator libprotobuf-mutator::protobuf-mutator-libfuzzer) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_14) diff --git a/recipes/libprotobuf-mutator/all/test_package/conanfile.py b/recipes/libprotobuf-mutator/all/test_package/conanfile.py index 38f4483872d47..ef5d7042163ec 100644 --- a/recipes/libprotobuf-mutator/all/test_package/conanfile.py +++ b/recipes/libprotobuf-mutator/all/test_package/conanfile.py @@ -1,10 +1,19 @@ -from conans import ConanFile, CMake, tools +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake import os class TestPackageConan(ConanFile): settings = "os", "arch", "compiler", "build_type" - generators = "cmake", "cmake_find_package_multi" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) def build(self): cmake = CMake(self) @@ -12,6 +21,6 @@ def build(self): cmake.build() def test(self): - if not tools.cross_building(self): - bin_path = os.path.join("bin", "test_package") - self.run(bin_path, run_environment=True) + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/libprotobuf-mutator/all/test_package/msg.proto b/recipes/libprotobuf-mutator/all/test_package/msg.proto deleted file mode 100644 index cb25c9d008352..0000000000000 --- a/recipes/libprotobuf-mutator/all/test_package/msg.proto +++ /dev/null @@ -1,11 +0,0 @@ -syntax = "proto2"; -package libfuzzer_example; - -import "google/protobuf/any.proto"; - -message Msg { - optional float optional_float = 1; - optional uint64 optional_uint64 = 2; - optional string optional_string = 3; - optional google.protobuf.Any any = 4; -} diff --git a/recipes/libprotobuf-mutator/all/test_package/test_package.cpp b/recipes/libprotobuf-mutator/all/test_package/test_package.cpp index c169f66031176..f7273ed21de60 100644 --- a/recipes/libprotobuf-mutator/all/test_package/test_package.cpp +++ b/recipes/libprotobuf-mutator/all/test_package/test_package.cpp @@ -1,23 +1,11 @@ -#include -#include +#include -#include "msg.pb.h" -#include +#include -DEFINE_PROTO_FUZZER(const libfuzzer_example::Msg& message) { - protobuf_mutator::protobuf::FileDescriptorProto file; - - // Emulate a bug. - if (message.optional_uint64() == std::hash{}(message.optional_string()) && - message.optional_string() == "abcdefghijklmnopqrstuvwxyz" && - !std::isnan(message.optional_float()) && - std::fabs(message.optional_float()) > 1000 && - message.any().UnpackTo(&file) && !file.name().empty()) - { - std::cerr << message.DebugString() << "\n"; - } -} int main() { - return 0; + protobuf_mutator::Mutator mutator{}; + const auto seed_value{42}; + mutator.Seed(seed_value); + return EXIT_SUCCESS; } diff --git a/recipes/libprotobuf-mutator/config.yml b/recipes/libprotobuf-mutator/config.yml index 9d5b0e4c50569..d2eb4ed4a511f 100644 --- a/recipes/libprotobuf-mutator/config.yml +++ b/recipes/libprotobuf-mutator/config.yml @@ -1,3 +1,3 @@ versions: - "cci.20210831": + "1.3": folder: all diff --git a/recipes/libqasm/all/conandata.yml b/recipes/libqasm/all/conandata.yml new file mode 100644 index 0000000000000..84b1a8d8bd8e7 --- /dev/null +++ b/recipes/libqasm/all/conandata.yml @@ -0,0 +1,13 @@ +sources: + "0.6.8": + url: "https://github.com/QuTech-Delft/libqasm/archive/refs/tags/0.6.8.tar.gz" + sha256: "b98ff44f0c569a0cc20b3728ba7d4711299aaac07d4dadfe52e638b366b91251" + "0.6.7": + url: "https://github.com/QuTech-Delft/libqasm/archive/refs/tags/0.6.7.tar.gz" + sha256: "3e85be4f433b178b89e32bc738bd4f69266cd1c4ad0ed12b5367381ac6e44eb2" + "0.6.6": + url: "https://github.com/QuTech-Delft/libqasm/archive/refs/tags/0.6.6.tar.gz" + sha256: "b3a2d1670f8865ce22bcc62c6a696ee7e0764a7b76901a4f082efa2287e0cbad" + "0.6.5": + url: "https://github.com/QuTech-Delft/libqasm/archive/refs/tags/0.6.5.tar.gz" + sha256: "0577622a512d1f64892949af02abe3d0b53195ad454045715a0ebf837ecde0d6" diff --git a/recipes/libqasm/all/conanfile.py b/recipes/libqasm/all/conanfile.py new file mode 100644 index 0000000000000..142f8f4210203 --- /dev/null +++ b/recipes/libqasm/all/conanfile.py @@ -0,0 +1,131 @@ +import os + +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.apple import fix_apple_shared_install_name +from conan.tools.build import check_min_cppstd +from conan.tools.cmake import CMakeToolchain, CMakeDeps, CMake, cmake_layout +from conan.tools.env import VirtualBuildEnv +from conan.tools.files import copy, get, rm, replace_in_file +from conan.tools.microsoft import is_msvc +from conan.tools.scm import Version + +required_conan_version = ">=1.60.0 <2 || >=2.0.6" + + +class LibqasmConan(ConanFile): + name = "libqasm" + license = "Apache-2.0" + homepage = "https://github.com/QuTech-Delft/libqasm" + url = "https://github.com/conan-io/conan-center-index" + description = "Library to parse cQASM files" + topics = ("code generation", "parser", "compiler", "quantum compilation", "quantum simulation") + settings = "os", "compiler", "build_type", "arch" + package_type = "library" + options = { + "shared": [True, False], + "fPIC": [True, False], + "build_python": [True, False] + } + default_options = { + "shared": False, + "fPIC": True, + "build_python": False + } + + @property + def _should_build_test(self): + return not self.conf.get("tools.build:skip_test", default=True, check_type=bool) + + @property + def _min_cppstd(self): + return "20" + + @property + def _compilers_minimum_version(self): + return { + "gcc": "10", + "clang": "13", + "apple-clang": "14", + "Visual Studio": "16", + "msvc": "192" + } + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + if self.settings.arch == "wasm": + self.options["antlr4-cppruntime"].shared = self.options.shared + + def layout(self): + cmake_layout(self, src_folder="src") + + def build_requirements(self): + self.tool_requires("tree-gen/") + self.tool_requires("zulu-openjdk/21.0.1") + if self.settings.arch == "wasm": + self.tool_requires("emsdk/3.1.50") + if self._should_build_test: + self.test_requires("gtest/1.15.0") + if self.options.build_python: + self.tool_requires("cpython/3.12.2") + + def validate(self): + if self.settings.compiler.cppstd: + check_min_cppstd(self, self._min_cppstd) + minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) + if minimum_version and Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration(f"{self.ref} requires C++{self._min_cppstd}," + f"which your compiler does not support.") + + if self.settings.arch != "wasm" and self.dependencies["antlr4-cppruntime"].options.shared != self.options.shared: + raise ConanInvalidConfiguration(f"{self.ref} requires antlr4-cppruntime to be built with the same shared option value.") + + def requirements(self): + if Version(self.version) < "0.6.7": + self.requires("fmt/10.2.1", transitive_headers=True) + self.requires("tree-gen/1.0.7", transitive_headers=True, transitive_libs=True) + else: + self.requires("fmt/11.0.2", transitive_headers=True) + self.requires("tree-gen/1.0.8", transitive_headers=True, transitive_libs=True) + self.requires("range-v3/0.12.0", transitive_headers=True) + if not self.settings.arch == "wasm": + self.requires("antlr4-cppruntime/4.13.1", transitive_headers=True) + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + deps = CMakeDeps(self) + deps.generate() + tc = CMakeToolchain(self) + tc.variables["LIBQASM_BUILD_PYTHON"] = self.options.build_python + tc.variables["LIBQASM_BUILD_TESTS"] = self._should_build_test + tc.generate() + env = VirtualBuildEnv(self) + env.generate() + + def _patch_sources(self): + werror = "/WX" if is_msvc(self) else "-Werror" + replace_in_file(self, os.path.join(self.source_folder, "src", "CMakeLists.txt"), werror, "") + replace_in_file(self, os.path.join(self.source_folder, "test", "CMakeLists.txt"), werror, "") + + def build(self): + self._patch_sources() + cmake = CMake(self) + cmake.configure() + cmake.build() + + def package(self): + copy(self, "LICENSE.md", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) + cmake = CMake(self) + cmake.install() + fix_apple_shared_install_name(self) + rm(self, "*.pdb", self.package_folder, recursive=True) + + def package_info(self): + self.cpp_info.libs = ["cqasm"] diff --git a/recipes/libqasm/all/test_package/CMakeLists.txt b/recipes/libqasm/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..528ff39eb1365 --- /dev/null +++ b/recipes/libqasm/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(PackageTest CXX) + +find_package(libqasm REQUIRED CONFIG) + +add_executable(test_package "${CMAKE_CURRENT_SOURCE_DIR}/src/test_package.cpp") +target_compile_features(test_package PRIVATE cxx_std_20) +target_link_libraries(test_package PRIVATE libqasm::libqasm) diff --git a/recipes/libqasm/all/test_package/conanfile.py b/recipes/libqasm/all/test_package/conanfile.py new file mode 100644 index 0000000000000..6ad8a48ce8086 --- /dev/null +++ b/recipes/libqasm/all/test_package/conanfile.py @@ -0,0 +1,27 @@ +import os + +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import CMake, cmake_layout + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def layout(self): + cmake_layout(self) + + def test(self): + if can_run(self): + cmd = os.path.join(self.cpp.build.bindirs[0], "test_package") + self.run(cmd, env="conanrun") diff --git a/recipes/libqasm/all/test_package/src/test_package.cpp b/recipes/libqasm/all/test_package/src/test_package.cpp new file mode 100644 index 0000000000000..07ad803c4364b --- /dev/null +++ b/recipes/libqasm/all/test_package/src/test_package.cpp @@ -0,0 +1,13 @@ +#if __has_include("cqasm.hpp") +#include "cqasm.hpp" +#else +#include "libqasm/cqasm.hpp" +#endif + +#include + +int main() { + auto analyzer = cqasm::v3x::default_analyzer(); + auto result = analyzer.analyze_string("version 3.0; qubit[2] q; H q[0]; CNOT q[0], q[1]; measure q", ""); + std::cout << result.to_json(); +} diff --git a/recipes/libqasm/config.yml b/recipes/libqasm/config.yml new file mode 100644 index 0000000000000..d6940cdc093d7 --- /dev/null +++ b/recipes/libqasm/config.yml @@ -0,0 +1,9 @@ +versions: + "0.6.8": + folder: all + "0.6.7": + folder: all + "0.6.6": + folder: all + "0.6.5": + folder: all diff --git a/recipes/libraw/all/CMakeLists.txt b/recipes/libraw/all/CMakeLists.txt index 867dedb15eb72..f6b105c027f9d 100644 --- a/recipes/libraw/all/CMakeLists.txt +++ b/recipes/libraw/all/CMakeLists.txt @@ -1,6 +1,7 @@ cmake_minimum_required(VERSION 3.8) project(LibRaw LANGUAGES CXX) +option(LIBRAW_BUILD_THREAD_SAFE "Build raw_r library with -pthread enabled" OFF) option(LIBRAW_WITH_JPEG "Build with libjpeg" ON) option(LIBRAW_WITH_LCMS "Build with LCMS" ON) option(LIBRAW_WITH_JASPER "Build with Jasper" ON) @@ -32,33 +33,47 @@ if(LIBRAW_WITH_JASPER) endif() add_library(raw ${libraw_LIB_SRCS}) -target_compile_features(raw PRIVATE cxx_std_11) +target_compile_features(raw PUBLIC cxx_std_11) target_include_directories(raw PUBLIC "${LIBRAW_SRC_DIR}") if(WIN32) target_link_libraries(raw PUBLIC ws2_32) if(BUILD_SHARED_LIBS) - target_compile_definitions(raw PRIVATE LIBRAW_BUILDLIB) + target_compile_definitions(raw PUBLIC LIBRAW_BUILDLIB) else() target_compile_definitions(raw PUBLIC LIBRAW_NODLL) endif() endif() if(MSVC) - target_compile_options(raw PRIVATE /wd4018 /wd4101 /wd4244 /wd4251 /wd4267 /wd4996) + target_compile_options(raw PUBLIC /wd4018 /wd4101 /wd4244 /wd4251 /wd4267 /wd4996) endif() if(LIBRAW_WITH_JPEG) - target_compile_definitions(raw PRIVATE USE_JPEG USE_JPEG8) - target_link_libraries(raw PRIVATE JPEG::JPEG) + target_compile_definitions(raw PUBLIC USE_JPEG USE_JPEG8) + target_link_libraries(raw PUBLIC JPEG::JPEG) endif () if (LIBRAW_WITH_LCMS) - target_compile_definitions(raw PRIVATE USE_LCMS2) - target_link_libraries(raw PRIVATE lcms::lcms) + target_compile_definitions(raw PUBLIC USE_LCMS2) + target_link_libraries(raw PUBLIC lcms::lcms) endif () if (LIBRAW_WITH_JASPER) - target_compile_definitions(raw PRIVATE USE_JASPER) - target_link_libraries(raw PRIVATE Jasper::Jasper) + target_compile_definitions(raw PUBLIC USE_JASPER) + target_link_libraries(raw PUBLIC Jasper::Jasper) endif () include(GNUInstallDirs) +if(LIBRAW_BUILD_THREAD_SAFE) + add_library(raw_r ${libraw_LIB_SRCS}) + target_link_libraries(raw_r INTERFACE raw) + target_compile_options(raw_r PRIVATE -pthread) + target_link_options(raw_r PRIVATE -pthread) + target_include_directories(raw_r PUBLIC "${LIBRAW_SRC_DIR}") + install( + TARGETS raw_r + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + ) +endif() + install(DIRECTORY "${LIBRAW_SRC_DIR}/libraw" DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) install( TARGETS raw diff --git a/recipes/libraw/all/conandata.yml b/recipes/libraw/all/conandata.yml index 3a0ac9ffca1b4..1b7daa83fdaae 100644 --- a/recipes/libraw/all/conandata.yml +++ b/recipes/libraw/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.21.3": + url: "https://github.com/LibRaw/LibRaw/archive/0.21.3.tar.gz" + sha256: "dc3d8b54e333d9d5441336049db255d14b27f19bd326a306cf5aea866806780a" "0.21.2": url: "https://github.com/LibRaw/LibRaw/archive/0.21.2.tar.gz" sha256: "7ac056e0d9e814d808f6973a950bbf45e71b53283eed07a7ea87117a6c0ced96" diff --git a/recipes/libraw/all/conanfile.py b/recipes/libraw/all/conanfile.py index 4fda00c094ccf..d77cb1f6c1d38 100644 --- a/recipes/libraw/all/conanfile.py +++ b/recipes/libraw/all/conanfile.py @@ -1,8 +1,10 @@ +import os + from conan import ConanFile -from conan.tools.build import check_min_cppstd +from conan.tools.build import check_min_cppstd, stdcpp_library from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout from conan.tools.files import copy, get -import os +from conan.tools.microsoft import is_msvc required_conan_version = ">=1.53.0" @@ -18,6 +20,7 @@ class LibRawConan(ConanFile): options = { "shared": [True, False], "fPIC": [True, False], + "build_thread_safe": [True, False], "with_jpeg": [False, "libjpeg", "libjpeg-turbo", "mozjpeg"], "with_lcms": [True, False], "with_jasper": [True, False], @@ -25,6 +28,7 @@ class LibRawConan(ConanFile): default_options = { "shared": False, "fPIC": True, + "build_thread_safe": False, "with_jpeg": "libjpeg", "with_lcms": True, "with_jasper": True, @@ -38,6 +42,8 @@ def _min_cppstd(self): def config_options(self): if self.settings.os == "Windows": del self.options.fPIC + if is_msvc(self): + del self.options.build_thread_safe def configure(self): if self.options.shared: @@ -56,7 +62,7 @@ def requirements(self): elif self.options.with_jpeg == "mozjpeg": self.requires("mozjpeg/4.1.3") if self.options.with_lcms: - self.requires("lcms/2.14") + self.requires("lcms/2.16") if self.options.with_jasper: self.requires("jasper/4.0.0") @@ -71,6 +77,7 @@ def generate(self): tc = CMakeToolchain(self) tc.variables["RAW_LIB_VERSION_STRING"] = self.version tc.variables["LIBRAW_SRC_DIR"] = self.source_folder.replace("\\", "/") + tc.variables["LIBRAW_BUILD_THREAD_SAFE"] = self.options.get_safe("build_thread_safe", False) tc.variables["LIBRAW_WITH_JPEG"] = bool(self.options.with_jpeg) tc.variables["LIBRAW_WITH_LCMS"] = self.options.with_lcms tc.variables["LIBRAW_WITH_JASPER"] = self.options.with_jasper @@ -91,20 +98,37 @@ def package(self): cmake.install() def package_info(self): - self.cpp_info.libs = ["raw"] + self.cpp_info.components["libraw_"].set_property("pkg_config_name", "libraw") + self.cpp_info.components["libraw_"].libs = ["raw"] + self.cpp_info.components["libraw_"].includedirs.append(os.path.join("include", "libraw")) if self.settings.os == "Windows": - self.cpp_info.system_libs.append("ws2_32") + self.cpp_info.components["libraw_"].system_libs.append("ws2_32") if not self.options.shared: - self.cpp_info.defines.append("LIBRAW_NODLL") + self.cpp_info.components["libraw_"].defines.append("LIBRAW_NODLL") + requires = [] if self.options.with_jpeg == "libjpeg": - self.cpp_info.requires.append("libjpeg::libjpeg") + requires.append("libjpeg::libjpeg") elif self.options.with_jpeg == "libjpeg-turbo": - self.cpp_info.requires.append("libjpeg-turbo::jpeg") + requires.append("libjpeg-turbo::jpeg") elif self.options.with_jpeg == "mozjpeg": - self.cpp_info.requires.append("mozjpeg::libjpeg") + requires.append("mozjpeg::libjpeg") if self.options.with_lcms: - self.cpp_info.requires.append("lcms::lcms") + requires.append("lcms::lcms") if self.options.with_jasper: - self.cpp_info.requires.append("jasper::jasper") + requires.append("jasper::jasper") + self.cpp_info.components["libraw_"].requires = requires + + if self.options.get_safe("build_thread_safe"): + self.cpp_info.components["libraw_r"].set_property("pkg_config_name", "libraw_r") + self.cpp_info.components["libraw_r"].libs = ["raw_r"] + self.cpp_info.components["libraw_r"].includedirs.append(os.path.join("include", "libraw")) + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.components["libraw_r"].system_libs.append("pthread") + self.cpp_info.components["libraw_r"].requires = requires + + if not self.options.shared and stdcpp_library(self): + self.cpp_info.components["libraw_"].system_libs.append(stdcpp_library(self)) + if self.options.get_safe("build_thread_safe"): + self.cpp_info.components["libraw_r"].system_libs.append(stdcpp_library(self)) diff --git a/recipes/libraw/config.yml b/recipes/libraw/config.yml index ef61145f2ee72..5756010f50007 100644 --- a/recipes/libraw/config.yml +++ b/recipes/libraw/config.yml @@ -1,4 +1,6 @@ versions: + "0.21.3": + folder: all "0.21.2": folder: all "0.21.1": diff --git a/recipes/librdkafka/all/conandata.yml b/recipes/librdkafka/all/conandata.yml index bf7c468b0c4c1..5796a543cb06d 100644 --- a/recipes/librdkafka/all/conandata.yml +++ b/recipes/librdkafka/all/conandata.yml @@ -1,4 +1,16 @@ sources: + "2.6.0": + url: "https://github.com/edenhill/librdkafka/archive/v2.6.0.tar.gz" + sha256: "abe0212ecd3e7ed3c4818a4f2baf7bf916e845e902bb15ae48834ca2d36ac745" + "2.5.3": + url: "https://github.com/edenhill/librdkafka/archive/v2.5.3.tar.gz" + sha256: "eaa1213fdddf9c43e28834d9a832d9dd732377d35121e42f875966305f52b8ff" + "2.5.0": + url: "https://github.com/edenhill/librdkafka/archive/v2.5.0.tar.gz" + sha256: "3dc62de731fd516dfb1032861d9a580d4d0b5b0856beb0f185d06df8e6c26259" + "2.4.0": + url: "https://github.com/edenhill/librdkafka/archive/v2.4.0.tar.gz" + sha256: "d645e47d961db47f1ead29652606a502bdd2a880c85c1e060e94eea040f1a19a" "2.3.0": url: "https://github.com/edenhill/librdkafka/archive/v2.3.0.tar.gz" sha256: "2d49c35c77eeb3d42fa61c43757fcbb6a206daa560247154e60642bcdcc14d12" @@ -12,6 +24,38 @@ sources: url: "https://github.com/edenhill/librdkafka/archive/v1.9.2.tar.gz" sha256: "3fba157a9f80a0889c982acdd44608be8a46142270a389008b22d921be1198ad" patches: + "2.6.0": + - patch_file: patches/0001-Change-library-names-1-9-1.patch + patch_description: "find_package conan packages" + patch_type: "conan" + - patch_file: patches/0002-Change-library-targets-and-result-variables-2-5-0.patch + patch_description: "refer conan package names" + patch_type: "conan" + "2.5.3": + - patch_file: patches/0001-Change-library-names-1-9-1.patch + patch_description: "find_package conan packages" + patch_type: "conan" + - patch_file: patches/0002-Change-library-targets-and-result-variables-2-5-0.patch + patch_description: "refer conan package names" + patch_type: "conan" + "2.5.0": + - patch_file: patches/0001-Change-library-names-1-9-1.patch + patch_description: "find_package conan packages" + patch_type: "conan" + - patch_file: patches/0002-Change-library-targets-and-result-variables-2-5-0.patch + patch_description: "refer conan package names" + patch_type: "conan" + - patch_file: patches/0003-add-forward-declaration-2-5-0.patch + patch_description: "add forward declarations to fix compilation without ssl" + patch_type: "official" + patch_source: "https://github.com/confluentinc/librdkafka/pull/4794/" + "2.4.0": + - patch_file: patches/0001-Change-library-names-1-9-1.patch + patch_description: "find_package conan packages" + patch_type: "conan" + - patch_file: patches/0002-Change-library-targets-and-result-variables-2-3-0.patch + patch_description: "refer conan package names" + patch_type: "conan" "2.3.0": - patch_file: patches/0001-Change-library-names-1-9-1.patch patch_description: "find_package conan packages" diff --git a/recipes/librdkafka/all/conanfile.py b/recipes/librdkafka/all/conanfile.py index cca10bb2c76c2..d7bc2435f6766 100644 --- a/recipes/librdkafka/all/conanfile.py +++ b/recipes/librdkafka/all/conanfile.py @@ -1,9 +1,10 @@ from conan import ConanFile from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout from conan.tools.env import VirtualBuildEnv -from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rmdir, replace_in_file -from conan.tools.microsoft import is_msvc +from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rmdir from conan.tools.gnu import PkgConfigDeps +from conan.tools.scm import Version +from conan.tools.microsoft import is_msvc import os required_conan_version = ">=1.55.0" @@ -30,6 +31,7 @@ class LibrdkafkaConan(ConanFile): "ssl": [True, False], "sasl": [True, False], "curl": [True, False], + "syslog": [True, False], } default_options = { "shared": False, @@ -40,6 +42,7 @@ class LibrdkafkaConan(ConanFile): "ssl": False, "sasl": False, "curl": False, + "syslog": False, } @property @@ -52,6 +55,8 @@ def export_sources(self): def config_options(self): if self.settings.os == "Windows": del self.options.fPIC + if is_msvc(self): + del self.options.syslog def configure(self): if self.options.shared: @@ -99,6 +104,8 @@ def generate(self): tc.variables["WITH_SASL"] = self.options.sasl tc.variables["ENABLE_LZ4_EXT"] = True tc.variables["WITH_CURL"] = self.options.curl + tc.variables["WITH_SNAPPY"] = True + tc.preprocessor_definitions["WITH_SYSLOG"] = "1" if self.options.get_safe("syslog") else "0" tc.generate() cd = CMakeDeps(self) @@ -110,11 +117,6 @@ def generate(self): def build(self): apply_conandata_patches(self) - # There are references to libcrypto.lib and libssl.lib in rdkafka_ssl.c for versions >= 1.8.0 - if is_msvc(self) and self.settings.build_type == "Debug" and self.options.get_safe("ssl", False): - rdkafka_ssl_path = os.path.join(self.source_folder, "src", "rdkafka_ssl.c") - replace_in_file(self, rdkafka_ssl_path, "libcrypto.lib", "libcryptod.lib") - replace_in_file(self, rdkafka_ssl_path, "libssl.lib", "libssld.lib") cmake = CMake(self) cmake.configure() cmake.build() diff --git a/recipes/librdkafka/all/patches/0002-Change-library-targets-and-result-variables-2-5-0.patch b/recipes/librdkafka/all/patches/0002-Change-library-targets-and-result-variables-2-5-0.patch new file mode 100644 index 0000000000000..a862544f4da08 --- /dev/null +++ b/recipes/librdkafka/all/patches/0002-Change-library-targets-and-result-variables-2-5-0.patch @@ -0,0 +1,26 @@ +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index bbe63cf..44df7d1 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -224,9 +224,9 @@ if(WITH_ZLIB) + endif() + + if(WITH_ZSTD) +- target_link_libraries(rdkafka PRIVATE ${ZSTD_LIBRARY}) +- target_include_directories(rdkafka PRIVATE ${ZSTD_INCLUDE_DIR}) +- message(STATUS "Found ZSTD: ${ZSTD_LIBRARY}") ++ target_link_libraries(rdkafka PRIVATE $,zstd::libzstd_shared,zstd::libzstd_static>) ++# target_include_directories(rdkafka PRIVATE ${ZSTD_INCLUDE_DIR}) ++# message(STATUS "Found ZSTD: ${ZSTD_LIBRARY}") + endif() + + if(WITH_SSL) +@@ -266,7 +266,7 @@ endif() + + if(WITH_LZ4_EXT) + target_include_directories(rdkafka PRIVATE ${LZ4_INCLUDE_DIRS}) +- target_link_libraries(rdkafka PUBLIC LZ4::LZ4) ++ target_link_libraries(rdkafka PUBLIC lz4::lz4) + endif() + + if(WIN32) diff --git a/recipes/librdkafka/all/patches/0003-add-forward-declaration-2-5-0.patch b/recipes/librdkafka/all/patches/0003-add-forward-declaration-2-5-0.patch new file mode 100644 index 0000000000000..dbaef7d2d154f --- /dev/null +++ b/recipes/librdkafka/all/patches/0003-add-forward-declaration-2-5-0.patch @@ -0,0 +1,13 @@ +diff --git a/src/rdkafka_op.h b/src/rdkafka_op.h +index d79121e..d410a2b 100644 +--- a/src/rdkafka_op.h ++++ b/src/rdkafka_op.h +@@ -39,7 +39,7 @@ + typedef struct rd_kafka_q_s rd_kafka_q_t; + typedef struct rd_kafka_toppar_s rd_kafka_toppar_t; + typedef struct rd_kafka_op_s rd_kafka_op_t; +- ++typedef struct rd_kafka_broker_s rd_kafka_broker_t; + /* One-off reply queue + reply version. + * All APIs that take a rd_kafka_replyq_t makes a copy of the + * struct as-is and grabs hold of the existing .q refcount. diff --git a/recipes/librdkafka/config.yml b/recipes/librdkafka/config.yml index edafdb9b6c2ac..9cc6c325a15e0 100644 --- a/recipes/librdkafka/config.yml +++ b/recipes/librdkafka/config.yml @@ -1,4 +1,12 @@ versions: + "2.6.0": + folder: all + "2.5.3": + folder: all + "2.5.0": + folder: all + "2.4.0": + folder: all "2.3.0": folder: all "2.2.0": diff --git a/recipes/librhash/all/CMakeLists.txt b/recipes/librhash/all/CMakeLists.txt new file mode 100644 index 0000000000000..5a8989c04fb68 --- /dev/null +++ b/recipes/librhash/all/CMakeLists.txt @@ -0,0 +1,48 @@ +# Based on https://github.com/rhash/RHash/pull/103 +cmake_minimum_required(VERSION 3.15) +project(rhash LANGUAGES C) + +file(READ "${CMAKE_CURRENT_SOURCE_DIR}/../version.h" versionfile) +string(REGEX MATCH "#define VERSION \"([0-9]*)\.([0-9]*)\.([0-9]*)\"" _ ${versionfile}) +set(RHASH_VERSION_MAJOR ${CMAKE_MATCH_1}) +set(RHASH_VERSION_MINOR ${CMAKE_MATCH_2}) +set(RHASH_VERSION_PATCH ${CMAKE_MATCH_3}) +set(RHASH_VERSION "${RHASH_VERSION_MAJOR}.${RHASH_VERSION_MINOR}.${RHASH_VERSION_PATCH}") + +option(USE_OPENSSL "Enable OpenSSL (optimized hash functions) support" ON) + +set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS TRUE) + +# Get the list of source files from the Makefile +# https://github.com/rhash/RHash/blob/v1.4.4/librhash/Makefile#L6 +file(READ Makefile MAKEFILE_CONTENTS) +if("${MAKEFILE_CONTENTS}" MATCHES "SOURCES *= *([^\n]+)") + string(REPLACE " " ";" SOURCE_FILES ${CMAKE_MATCH_1}) +else() + message(FATAL_ERROR "SOURCES line not found in Makefile") +endif() + +add_library(rhash ${SOURCE_FILES}) + +if(USE_OPENSSL) + find_package(OpenSSL REQUIRED) + target_link_libraries(rhash OpenSSL::Crypto) + target_compile_definitions(rhash PUBLIC USE_OPENSSL) +endif() + +if(MSVC) + target_compile_definitions(rhash PRIVATE _CRT_SECURE_NO_DEPRECATE) +endif() + +set_target_properties(rhash PROPERTIES + COMPILE_DEFINITIONS IN_RHASH + DEFINE_SYMBOL RHASH_EXPORTS + VERSION ${RHASH_VERSION} + SOVERSION ${RHASH_VERSION_MAJOR}) + +install(TARGETS rhash + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib) + +install(FILES "rhash.h" "rhash_torrent.h" DESTINATION include) diff --git a/recipes/librhash/all/conandata.yml b/recipes/librhash/all/conandata.yml index 7551a33f27039..86c6f3d9822c3 100644 --- a/recipes/librhash/all/conandata.yml +++ b/recipes/librhash/all/conandata.yml @@ -1,11 +1,10 @@ sources: + "1.4.4": + url: "https://downloads.sourceforge.net/project/rhash/rhash/1.4.4/rhash-1.4.4-src.tar.gz" + sha256: "8e7d1a8ccac0143c8fe9b68ebac67d485df119ea17a613f4038cda52f84ef52a" "1.4.2": url: "https://downloads.sourceforge.net/project/rhash/rhash/1.4.2/rhash-1.4.2-src.tar.gz" sha256: "600d00f5f91ef04194d50903d3c79412099328c42f28ff43a0bdb777b00bec62" "1.3.9": url: "https://downloads.sourceforge.net/project/rhash/rhash/1.3.9/rhash-1.3.9-src.tar.gz" sha256: "42b1006f998adb189b1f316bf1a60e3171da047a85c4aaded2d0d26c1476c9f6" -patches: - "1.4.2": - - patch_file: "patches/0001-1.4.2-fix-compiler-detection.patch" - base_path: "source_subfolder" diff --git a/recipes/librhash/all/conanfile.py b/recipes/librhash/all/conanfile.py index 5528b9c183b00..a7af280fa7f51 100644 --- a/recipes/librhash/all/conanfile.py +++ b/recipes/librhash/all/conanfile.py @@ -1,17 +1,23 @@ -from conans import AutoToolsBuildEnvironment, ConanFile, tools -from conans.errors import ConanInvalidConfiguration import os -required_conan_version = ">=1.33.0" +from conan import ConanFile +from conan.tools.cmake import CMakeToolchain, CMakeDeps, CMake +from conan.tools.files import copy, get +from conan.tools.layout import basic_layout +from conan.tools.scm import Version + +required_conan_version = ">=1.53.0" class LibRHashConan(ConanFile): name = "librhash" description = "Great utility for computing hash sums" - topics = ("rhash", "hash", "checksum") + license = "MIT" url = "https://github.com/conan-io/conan-center-index" homepage = "http://rhash.sourceforge.net/" - license = "MIT" + topics = ("rhash", "hash", "checksum") + + package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], @@ -24,98 +30,64 @@ class LibRHashConan(ConanFile): "with_openssl": True, } - exports_sources = "patches/*" - _autotools = None - - @property - def _source_subfolder(self): - return "source_subfolder" - @property def _settings_build(self): return getattr(self, "settings_build", self.settings) + def export_sources(self): + copy(self, "CMakeLists.txt", self.recipe_folder, os.path.join(self.export_sources_folder, "src", "librhash")) + def config_options(self): if self.settings.os == "Windows": del self.options.fPIC def configure(self): if self.options.shared: - del self.options.fPIC - del self.settings.compiler.cppstd - del self.settings.compiler.libcxx + self.options.rm_safe("fPIC") + self.settings.rm_safe("compiler.cppstd") + self.settings.rm_safe("compiler.libcxx") + + def layout(self): + basic_layout(self, src_folder="src") def requirements(self): if self.options.with_openssl: - self.requires("openssl/1.1.1q") - - def build_requirements(self): - if self._settings_build.os == "Windows" and not tools.get_env("CONAN_BASH_PATH"): - self.build_requires("msys2/cci.latest") - - def validate(self): - if self.settings.compiler == "Visual Studio": - raise ConanInvalidConfiguration("Visual Studio is not supported") + self.requires("openssl/[>=1.1 <4]") def source(self): - tools.get(**self.conan_data["sources"][self.version], - destination=self._source_subfolder, strip_root=True) - - def _configure_autotools(self): - if self._autotools: - return self._autotools - self._autotools = AutoToolsBuildEnvironment(self, win_bash=tools.os_info.is_windows) - if self.settings.compiler in ("apple-clang", ): - if self.settings.arch in ("armv7", ): - self._autotools.link_flags.append("-arch armv7") - elif self.settings.arch in ("armv8", ): - self._autotools.link_flags.append("-arch arm64") - vars = self._autotools.vars - conf_args = [ - # librhash's configure script does not understand `--enable-opt1=yes` - "--enable-openssl" if self.options.with_openssl else "--disable-openssl", - "--disable-gettext", - # librhash's configure script is custom and does not understand "--bindir=${prefix}/bin" arguments - "--prefix={}".format(tools.unix_path(self.package_folder)), - "--bindir={}".format(tools.unix_path(os.path.join(self.package_folder, "bin"))), - "--libdir={}".format(tools.unix_path(os.path.join(self.package_folder, "lib"))), - # the configure script does not use CPPFLAGS, so add it to CFLAGS/CXXFLAGS - "--extra-cflags={}".format("{} {}".format(vars["CFLAGS"], vars["CPPFLAGS"])), - "--extra-ldflags={}".format(vars["LDFLAGS"]), - ] - if self.options.shared: - conf_args.extend(["--enable-lib-shared", "--disable-lib-static"]) - else: - conf_args.extend(["--disable-lib-shared", "--enable-lib-static"]) + get(self, **self.conan_data["sources"][self.version], strip_root=True) - with tools.environment_append({ - "BUILD_TARGET": tools.get_gnu_triplet(str(self.settings.os), str(self.settings.arch), str(self.settings.compiler)), - }): - self._autotools.configure(args=conf_args, use_default_install_dirs=False, build=False, host=False) - return self._autotools + @property + def _xversion(self): + # https://github.com/rhash/RHash/blob/v1.4.4/configure#L339 + version = Version(self.version) + return f"0x{version.major.value:02x}{version.minor.value:02x}{version.patch.value:02x}{0:02x}" + + def generate(self): + tc = CMakeToolchain(self) + tc.cache_variables["USE_OPENSSL"] = self.options.with_openssl + tc.preprocessor_definitions["RHASH_XVERSION"] = self._xversion + tc.generate() + deps = CMakeDeps(self) + deps.generate() def build(self): - for patch in self.conan_data.get("patches", {}).get(self.version, []): - tools.patch(**patch) - with tools.chdir(self._source_subfolder): - autotools = self._configure_autotools() - autotools.make() + cmake = CMake(self) + cmake.configure(build_script_folder=os.path.join(self.source_folder, "librhash")) + cmake.build() def package(self): - self.copy("COPYING", src=self._source_subfolder, dst="licenses") - with tools.chdir(self._source_subfolder): - autotools = self._configure_autotools() - autotools.install() - autotools.make(target="install-lib-headers") - with tools.chdir("librhash"): - if self.options.shared: - autotools.make(target="install-so-link") - tools.rmdir(os.path.join(self.package_folder, "bin")) - tools.rmdir(os.path.join(self.package_folder, "etc")) - tools.rmdir(os.path.join(self.package_folder, "share")) + copy(self, "COPYING", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) + cmake = CMake(self) + cmake.install() def package_info(self): + self.cpp_info.set_property("cmake_file_name", "LibRHash") + self.cpp_info.set_property("cmake_target_name", "LibRHash::LibRHash") + self.cpp_info.set_property("pkg_config_name", "librhash") + self.cpp_info.libs = ["rhash"] + self.cpp_info.defines.append(f"RHASH_XVERSION={self._xversion}") + + # TODO: to remove in conan v2 once cmake_find_package_* generators removed self.cpp_info.names["cmake_find_package"] = "LibRHash" self.cpp_info.names["cmake_find_package_multi"] = "LibRHash" - self.cpp_info.names["pkg_config"] = "librhash" - self.cpp_info.libs = ["rhash"] diff --git a/recipes/librhash/all/patches/0001-1.4.2-fix-compiler-detection.patch b/recipes/librhash/all/patches/0001-1.4.2-fix-compiler-detection.patch deleted file mode 100644 index f6e51246e4dea..0000000000000 --- a/recipes/librhash/all/patches/0001-1.4.2-fix-compiler-detection.patch +++ /dev/null @@ -1,29 +0,0 @@ -Revert compiler detection to state of 1.3.9 - ---- configure -+++ configure -@@ -513,14 +513,9 @@ - CC_TMP="$CC" - test -n "$OPT_CC" && OTHER_CC= || OTHER_CC="gcc cc" - for CC in "$CC_TMP" $OTHER_CC; do -- cc_name_tmp= - if run_cmd "$CC -v"; then - cc_name_tmp=$($CC -v 2>&1 | tail -n 1 | cut -d ' ' -f 1) -- elif run_cmd "$CC --version"; then -- cc_name_tmp=$($CC --version 2>&1 | head -n 1 | cut -d ' ' -f 1) -- fi -- if test -n "${cc_name_tmp}"; then -- if echo "$cc_name_tmp" | grep -q "gcc"; then -+ if test "$cc_name_tmp" = "gcc"; then - cc_name=$cc_name_tmp - start_check "$CC version" - cc_vendor=gnu -@@ -544,7 +539,7 @@ - finish_check "$cc_name $cc_version" - break - fi -- if echo "$cc_name_tmp" | grep -q "clang"; then -+ if $CC -v 2>&1 | grep -q "clang"; then - start_check "$CC version" - cc_vendor=clang - cc_version=$($CC -dumpversion 2>&1) diff --git a/recipes/librhash/all/test_package/CMakeLists.txt b/recipes/librhash/all/test_package/CMakeLists.txt index 80f208bb6a15a..f1b9a5e0be249 100644 --- a/recipes/librhash/all/test_package/CMakeLists.txt +++ b/recipes/librhash/all/test_package/CMakeLists.txt @@ -1,9 +1,6 @@ -cmake_minimum_required(VERSION 3.3) +cmake_minimum_required(VERSION 3.15) project(test_package C) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) - find_package(LibRHash CONFIG REQUIRED) add_executable(${PROJECT_NAME} test_package.c) diff --git a/recipes/librhash/all/test_package/conanfile.py b/recipes/librhash/all/test_package/conanfile.py index 2c7657d70d5d9..ef5d7042163ec 100644 --- a/recipes/librhash/all/test_package/conanfile.py +++ b/recipes/librhash/all/test_package/conanfile.py @@ -1,10 +1,19 @@ -from conans import ConanFile, CMake, tools +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake import os -class SolaceTestConan(ConanFile): - settings = "os", "compiler", "build_type", "arch" - generators = "cmake", "cmake_find_package_multi" +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) def build(self): cmake = CMake(self) @@ -12,6 +21,6 @@ def build(self): cmake.build() def test(self): - if not tools.cross_building(self): - bin_path = os.path.join("bin", "test_package") - self.run(bin_path, run_environment=True) + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/librhash/all/test_v1_package/CMakeLists.txt b/recipes/librhash/all/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..91630d79f4abb --- /dev/null +++ b/recipes/librhash/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/librhash/all/test_v1_package/conanfile.py b/recipes/librhash/all/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..2c7657d70d5d9 --- /dev/null +++ b/recipes/librhash/all/test_v1_package/conanfile.py @@ -0,0 +1,17 @@ +from conans import ConanFile, CMake, tools +import os + + +class SolaceTestConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake", "cmake_find_package_multi" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if not tools.cross_building(self): + bin_path = os.path.join("bin", "test_package") + self.run(bin_path, run_environment=True) diff --git a/recipes/librhash/config.yml b/recipes/librhash/config.yml index 24eb5d89c9135..334d34ca8c5c1 100644 --- a/recipes/librhash/config.yml +++ b/recipes/librhash/config.yml @@ -1,4 +1,6 @@ versions: + 1.4.4: + folder: all 1.4.2: folder: all 1.3.9: diff --git a/recipes/libschrift/all/conanfile.py b/recipes/libschrift/all/conanfile.py index 949296527320a..403894f67a231 100644 --- a/recipes/libschrift/all/conanfile.py +++ b/recipes/libschrift/all/conanfile.py @@ -12,8 +12,8 @@ class LibschriftConan(ConanFile): topics = ("truetype", "suckless", ) url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/tomolt/libschrift" - license = "ISC", - + license = ("ISC",) + package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], diff --git a/recipes/libschrift/all/test_package/OpenSans-Bold.ttf b/recipes/libschrift/all/test_package/OpenSans-Bold.ttf deleted file mode 100644 index fd79d43bea029..0000000000000 Binary files a/recipes/libschrift/all/test_package/OpenSans-Bold.ttf and /dev/null differ diff --git a/recipes/libschrift/all/test_package/conanfile.py b/recipes/libschrift/all/test_package/conanfile.py index d4c18b77de306..0a6bc68712d90 100644 --- a/recipes/libschrift/all/test_package/conanfile.py +++ b/recipes/libschrift/all/test_package/conanfile.py @@ -23,5 +23,4 @@ def build(self): def test(self): if can_run(self): bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") - font_path = os.path.join(self.source_folder, "OpenSans-Bold.ttf") - self.run(f"{bin_path} {font_path}", env="conanrun") + self.run(bin_path, env="conanrun") diff --git a/recipes/libschrift/all/test_package/test_package.c b/recipes/libschrift/all/test_package/test_package.c index 154c09dca4013..3217d119826cb 100644 --- a/recipes/libschrift/all/test_package/test_package.c +++ b/recipes/libschrift/all/test_package/test_package.c @@ -1,7 +1,10 @@ +#include +#include + #include "schrift.h" -int main(int argc, char* argv[]) { - sft_loadfile(argv[1]); +int main(void) { + printf("Schrift version: %s\n", sft_version()); - return 0; + return EXIT_SUCCESS; } diff --git a/recipes/libsecret/all/conandata.yml b/recipes/libsecret/all/conandata.yml index 55e19d25249c5..66c4f8677d553 100644 --- a/recipes/libsecret/all/conandata.yml +++ b/recipes/libsecret/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.21.4": + url: "https://download.gnome.org/sources/libsecret/0.21/libsecret-0.21.4.tar.xz" + sha256: "163d08d783be6d4ab9a979ceb5a4fecbc1d9660d3c34168c581301cd53912b20" "0.20.5": url: "https://download.gnome.org/sources/libsecret/0.20/libsecret-0.20.5.tar.xz" sha256: "3fb3ce340fcd7db54d87c893e69bfc2b1f6e4d4b279065ffe66dac9f0fd12b4d" diff --git a/recipes/libsecret/all/conanfile.py b/recipes/libsecret/all/conanfile.py index db4251a471dac..2090a9010ba96 100644 --- a/recipes/libsecret/all/conanfile.py +++ b/recipes/libsecret/all/conanfile.py @@ -1,11 +1,12 @@ from conan import ConanFile from conan.errors import ConanInvalidConfiguration -from conan.tools.apple import fix_apple_shared_install_name +from conan.tools.apple import fix_apple_shared_install_name, is_apple_os from conan.tools.env import VirtualBuildEnv from conan.tools.files import copy, get, rmdir from conan.tools.gnu import PkgConfigDeps from conan.tools.layout import basic_layout from conan.tools.meson import Meson, MesonToolchain +from conan.tools.scm import Version import os required_conan_version = ">=1.60.0 <2.0 || >=2.0.6" @@ -24,57 +25,60 @@ class LibsecretConan(ConanFile): options = { "shared": [True, False], "fPIC": [True, False], - "with_libgcrypt": [True, False], + "crypto": [False, "libgcrypt", "gnutls"], + "with_libgcrypt": [True, False, "deprecated"], } default_options = { "shared": False, "fPIC": True, - "with_libgcrypt": True, + "crypto": "libgcrypt", + "with_libgcrypt": "deprecated", } - @property - def _use_gcrypt(self): - return self.options.get_safe("with_libgcrypt", False) - def config_options(self): - if self.settings.os == "Windows": - del self.options.fPIC if self.settings.os != "Linux": # libgcrypt recipe is currently only available on Linux - del self.options.with_libgcrypt + self.options.crypto = False def configure(self): if self.options.shared: self.options.rm_safe("fPIC") self.settings.rm_safe("compiler.cppstd") self.settings.rm_safe("compiler.libcxx") + if self.options.with_libgcrypt != "deprecated": + self.output.warning(f"The '{self.ref}:with_libgcrypt' option is deprecated. Use '{self.ref}:crypto' instead.") def layout(self): basic_layout(self, src_folder="src") def requirements(self): - self.requires("glib/2.78.1", transitive_headers=True, transitive_libs=True) - if self._use_gcrypt: - self.requires("libgcrypt/1.8.4") + self.requires("glib/2.78.3", transitive_headers=True, transitive_libs=True) + if self.options.get_safe("crypto") == "libgcrypt": + self.requires("libgcrypt/1.10.3") + elif self.options.get_safe("crypto") == "gnutls": + self.requires("gnutls/3.8.2") def validate(self): if self.settings.os == "Windows": - raise ConanInvalidConfiguration( - "libsecret recipe is not yet compatible with Windows." - ) + raise ConanInvalidConfiguration(f"{self.ref} recipe is not yet compatible with Windows.") + if self.options.crypto == "gnutls" and Version(self.version) < "0.21.2": + raise ConanInvalidConfiguration(f"{self.ref} does not support GnuTLS before version 0.21.2. Use -o '&:crypto=libgcrypt' instead.") + + def package_id(self): + del self.info.options.with_libgcrypt def build_requirements(self): - self.tool_requires("meson/1.2.3") + self.tool_requires("meson/1.4.1") if not self.conf.get("tools.gnu:pkg_config", check_type=str): - self.tool_requires("pkgconf/2.0.3") + self.tool_requires("pkgconf/2.2.0") self.tool_requires("glib/") - if self.settings.os == "Macos": + if is_apple_os(self): # Avoid using gettext from homebrew which may be linked against # a different/incompatible libiconv than the one being exposed # in the runtime environment (DYLD_LIBRARY_PATH) # See https://github.com/conan-io/conan-center-index/pull/17502#issuecomment-1542492466 - self.tool_requires("gettext/0.21") + self.tool_requires("gettext/0.22.5") def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) @@ -86,7 +90,10 @@ def generate(self): tc.project_options["introspection"] = "false" tc.project_options["manpage"] = "false" tc.project_options["gtk_doc"] = "false" - tc.project_options["gcrypt"] = "true" if self._use_gcrypt else "false" + if Version(self.version) >= "0.21.2": + tc.project_options["crypto"] = str(self.options.crypto) if self.options.crypto else "disabled" + else: + tc.project_options["gcrypt"] = "true" if self.options.crypto == "libgcrypt" else "false" tc.generate() deps = PkgConfigDeps(self) deps.generate() @@ -106,8 +113,10 @@ def package(self): def package_info(self): self.cpp_info.set_property("pkg_config_name", "libsecret-1") - self.cpp_info.requires = ["glib::glib-2.0", "glib::gobject-2.0", "glib::gio-2.0"] - if self._use_gcrypt: - self.cpp_info.requires.append("libgcrypt::libgcrypt") self.cpp_info.includedirs = [os.path.join("include", "libsecret-1")] self.cpp_info.libs = ["secret-1"] + self.cpp_info.requires = ["glib::glib-2.0", "glib::gobject-2.0", "glib::gio-2.0"] + if self.options.get_safe("crypto") == "libgcrypt": + self.cpp_info.requires.append("libgcrypt::libgcrypt") + elif self.options.get_safe("crypto") == "gnutls": + self.cpp_info.requires.append("gnutls::gnutls") diff --git a/recipes/libsecret/all/test_package/CMakeLists.txt b/recipes/libsecret/all/test_package/CMakeLists.txt index 0158ca54705aa..12e42237d500c 100644 --- a/recipes/libsecret/all/test_package/CMakeLists.txt +++ b/recipes/libsecret/all/test_package/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.15) project(test_package LANGUAGES CXX) find_package(libsecret REQUIRED CONFIG) diff --git a/recipes/libsecret/config.yml b/recipes/libsecret/config.yml index 470f4b110022f..f624806eaea4d 100644 --- a/recipes/libsecret/config.yml +++ b/recipes/libsecret/config.yml @@ -1,4 +1,6 @@ versions: + "0.21.4": + folder: all "0.20.5": folder: all "0.20.4": diff --git a/recipes/libselinux/all/conandata.yml b/recipes/libselinux/all/conandata.yml index 7387838ec6a10..6ec0dbf8b0f22 100644 --- a/recipes/libselinux/all/conandata.yml +++ b/recipes/libselinux/all/conandata.yml @@ -40,6 +40,15 @@ patches: base_path: libselinux-3.6 patch_description: "Fix a missing #include " patch_type: "portability" + - patch_file: patches/0004-libsepol-src-Makefile-fix-reallocarray-detection.patch + patch_description: "libsepol/src/Makefile: fix reallocarray detection" + patch_source: "https://lore.kernel.org/selinux/20240108210314.339682-1-fontaine.fabrice@gmail.com/" + patch_type: "portability" + base_path: libsepol-3.6 + - patch_file: patches/0005-libselinux-libsepol-Add-CFLAGS-and-LDFLAGS.patch + patch_description: "libselinux, libsepol: Add CFLAGS and LDFLAGS to Makefile checks" + patch_source: "https://lore.kernel.org/selinux/20240313224806.2859045-1-jwcart2@gmail.com/T/#u" + patch_type: "portability" "3.3": - patch_file: patches/0003-fix-link-pcre.patch base_path: libselinux-3.3 diff --git a/recipes/libselinux/all/conanfile.py b/recipes/libselinux/all/conanfile.py index 11d688ce34c15..19bf1f194402c 100644 --- a/recipes/libselinux/all/conanfile.py +++ b/recipes/libselinux/all/conanfile.py @@ -2,6 +2,7 @@ from conan import ConanFile from conan.errors import ConanInvalidConfiguration +from conan.tools.build import cross_building from conan.tools.env import VirtualBuildEnv from conan.tools.files import apply_conandata_patches, chdir, copy, export_conandata_patches, get, rename, replace_in_file, save from conan.tools.gnu import Autotools, AutotoolsToolchain, PkgConfigDeps @@ -62,7 +63,7 @@ def validate(self): def build_requirements(self): self.tool_requires("flex/2.6.4") if not self.conf.get("tools.gnu:pkg_config", default=False, check_type=str): - self.tool_requires("pkgconf/2.0.3") + self.tool_requires("pkgconf/2.2.0") def source(self): for download in self.conan_data["sources"][self.version]: @@ -87,7 +88,10 @@ def generate(self): sepol_lib_folder = os.path.join(self._sepol_source_folder, "src") tc.extra_ldflags.append(f"-L{sepol_lib_folder}") tc.make_args.append("USE_PCRE2=y") - tc.generate() + env = tc.environment() + if cross_building(self): + env.append_path("PKG_CONFIG_LIBDIR", self.generators_folder) + tc.generate(env=env) def build(self): apply_conandata_patches(self) diff --git a/recipes/libselinux/all/patches/0004-libsepol-src-Makefile-fix-reallocarray-detection.patch b/recipes/libselinux/all/patches/0004-libsepol-src-Makefile-fix-reallocarray-detection.patch new file mode 100644 index 0000000000000..c9a5ee550ab55 --- /dev/null +++ b/recipes/libselinux/all/patches/0004-libsepol-src-Makefile-fix-reallocarray-detection.patch @@ -0,0 +1,48 @@ +From a520f972bce9ec267f4e76b729bc3b7c1bdf13e6 Mon Sep 17 00:00:00 2001 +From: Fabrice Fontaine +Date: Mon, 8 Jan 2024 22:03:14 +0100 +Subject: [PATCH 1/3] libsepol/src/Makefile: fix reallocarray detection + +Pass LDFLAGS when checking for reallocarray to avoid the following +static build failure with musl raised since version 3.4 and +https://github.com/SELinuxProject/selinux/commit/f0a5f6e33084bd83d409bb7c932256139f471e71 +because -static is not passed when checking for reallocarray: + +/home/autobuild/autobuild/instance-9/output-1/host/bin/armeb-buildroot-linux-musleabi-gcc -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -O0 -g0 -static -I. -I../include -D_GNU_SOURCE -I../cil/include -fPIC -c -o assertion.o assertion.c +In file included from assertion.c:28: +private.h:88:21: error: static declaration of 'reallocarray' follows non-static declaration + 88 | static inline void* reallocarray(void *ptr, size_t nmemb, size_t size) { + | ^~~~~~~~~~~~ +In file included from ../include/sepol/policydb/mls_types.h:35, + from ../include/sepol/policydb/context.h:23, + from ../include/sepol/policydb/policydb.h:62, + from assertion.c:24: +/home/autobuild/autobuild/instance-9/output-1/host/armeb-buildroot-linux-musleabi/sysroot/usr/include/stdlib.h:150:7: note: previous declaration of 'reallocarray' with type 'void *(void *, size_t, size_t)' {aka 'void *(void *, unsigned int, unsigned int)'} + 150 | void *reallocarray (void *, size_t, size_t); + | ^~~~~~~~~~~~ + +Fixes: + - http://autobuild.buildroot.org/results/0170032548a38e2c991d62dc5823808458ad03b3 + +Signed-off-by: Fabrice Fontaine +Acked-by: James Carter +--- +src/Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/Makefile b/src/Makefile +index d80a941f..16b9bd5e 100644 +--- a/src/Makefile ++++ b/src/Makefile +@@ -31,7 +31,7 @@ endif + + # check for reallocarray(3) availability + H := \# +-ifeq (yes,$(shell printf '${H}define _GNU_SOURCE\n${H}include \nint main(void){void*p=reallocarray(NULL, 1, sizeof(char));return 0;}' | $(CC) -x c -o /dev/null - >/dev/null 2>&1 && echo yes)) ++ifeq (yes,$(shell printf '${H}define _GNU_SOURCE\n${H}include \nint main(void){void*p=reallocarray(NULL, 1, sizeof(char));return 0;}' | $(CC) $(LDFLAGS) -x c -o /dev/null - >/dev/null 2>&1 && echo yes)) + override CFLAGS += -DHAVE_REALLOCARRAY + endif + +-- +2.44.0 + diff --git a/recipes/libselinux/all/patches/0005-libselinux-libsepol-Add-CFLAGS-and-LDFLAGS.patch b/recipes/libselinux/all/patches/0005-libselinux-libsepol-Add-CFLAGS-and-LDFLAGS.patch new file mode 100644 index 0000000000000..bea3664ddd66d --- /dev/null +++ b/recipes/libselinux/all/patches/0005-libselinux-libsepol-Add-CFLAGS-and-LDFLAGS.patch @@ -0,0 +1,61 @@ +[PATCH] libselinux, libsepol: Add CFLAGS and LDFLAGS to Makefile checks +@ 2024-03-13 22:48 James Carter + 0 siblings, 0 replies; only message in thread +From: James Carter @ 2024-03-13 22:48 UTC (permalink / raw) + To: selinux; +Cc: jordan, winfried_mb2, James Carter + +In libselinux there is an availability check for strlcpy() and +in both libselinux and libsepol there are availability checks for +reallocarray() in the src Makfiles. CFLAGS and LDFLAGS are needed +for cross-compiling, but, unfortunately, the default CFLAGS cause +all of these availability checks to fail to compile because of +compilationerrors (rather than just the function not being available). + +Add CFLAGS and LDFLAGS to the availibility checks, update the checks +so that a compilation error will only happen if the function being +checked for is not available, and make checks for the same function +the same in both libselinux and libsepol. + +Suggested-by: Jordan Williams +Suggested-by: Winfried Dobbe +Signed-off-by: James Carter +--- + libselinux/src/Makefile | 4 ++-- + libsepol/src/Makefile | 2 +- + 2 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/libselinux-3.6/src/Makefile b/libselinux-3.6/src/Makefile +index d3b981fc..41cfbdca 100644 +--- a/libselinux-3.6/src/Makefile ++++ b/libselinux-3.6/src/Makefile +@@ -104,13 +104,13 @@ override CFLAGS += -I../include -D_GNU_SOURCE $(DISABLE_FLAGS) $(PCRE_CFLAGS) + + # check for strlcpy(3) availability + H := \# +-ifeq (yes,$(shell printf '${H}include \nint main(void){char*d,*s;strlcpy(d, s, 0);return 0;}' | $(CC) -x c -o /dev/null - >/dev/null 2>&1 && echo yes)) ++ifeq (yes,$(shell printf '${H}include \nint main(void){char d[2];const char *s="a";return (size_t)strlcpy(d,s,sizeof(d))>=sizeof(d);}' | $(CC) $(CFLAGS) $(LDFLAGS) -x c -o /dev/null - >/dev/null 2>&1 && echo yes)) + override CFLAGS += -DHAVE_STRLCPY + endif + + # check for reallocarray(3) availability + H := \# +-ifeq (yes,$(shell printf '${H}include \nint main(void){reallocarray(NULL, 0, 0);return 0;}' | $(CC) -x c -o /dev/null - >/dev/null 2>&1 && echo yes)) ++ifeq (yes,$(shell printf '${H}include \nint main(void){return reallocarray(NULL,0,0)==NULL;}' | $(CC) $(CFLAGS) $(LDFLAGS) -x c -o /dev/null - >/dev/null 2>&1 && echo yes)) + override CFLAGS += -DHAVE_REALLOCARRAY + endif + +diff --git a/libsepol-3.6/src/Makefile b/libsepol-3.6/src/Makefile +index 16b9bd5e..7b0e8446 100644 +--- a/libsepol-3.6/src/Makefile ++++ b/libsepol-3.6/src/Makefile +@@ -31,7 +31,7 @@ endif + + # check for reallocarray(3) availability + H := \# +-ifeq (yes,$(shell printf '${H}define _GNU_SOURCE\n${H}include \nint main(void){void*p=reallocarray(NULL, 1, sizeof(char));return 0;}' | $(CC) $(LDFLAGS) -x c -o /dev/null - >/dev/null 2>&1 && echo yes)) ++ifeq (yes,$(shell printf '${H}include \nint main(void){return reallocarray(NULL,0,0)==NULL;}' | $(CC) $(CFLAGS) $(LDFLAGS) -x c -o /dev/null - >/dev/null 2>&1 && echo yes)) + override CFLAGS += -DHAVE_REALLOCARRAY + endif + +-- +2.44.0 diff --git a/recipes/libsixel/all/conanfile.py b/recipes/libsixel/all/conanfile.py index 941e12b139215..2dd78a289a478 100644 --- a/recipes/libsixel/all/conanfile.py +++ b/recipes/libsixel/all/conanfile.py @@ -66,7 +66,7 @@ def requirements(self): if self.options.with_jpeg: self.requires("libjpeg/9e") if self.options.with_png: - self.requires("libpng/1.6.40") + self.requires("libpng/[>=1.6 <2]") def validate(self): if hasattr(self, "settings_build") and cross_building(self): @@ -75,9 +75,9 @@ def validate(self): raise ConanInvalidConfiguration(f"{self.ref} does not support Visual Studio") def build_requirements(self): - self.tool_requires("meson/1.2.3") + self.tool_requires("meson/[>=1.2.3 <2]") if not self.conf.get("tools.gnu:pkg_config", default=False, check_type=str): - self.tool_requires("pkgconf/2.0.3") + self.tool_requires("pkgconf/[>=2.2 <3]") def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) diff --git a/recipes/libsndfile/all/conanfile.py b/recipes/libsndfile/all/conanfile.py index 6ce8582b64685..0065582b94835 100644 --- a/recipes/libsndfile/all/conanfile.py +++ b/recipes/libsndfile/all/conanfile.py @@ -52,6 +52,8 @@ def config_options(self): def configure(self): if self.options.shared: self.options.rm_safe("fPIC") + self.settings.rm_safe("compiler.cppstd") + self.settings.rm_safe("compiler.libcxx") def layout(self): cmake_layout(self, src_folder="src") @@ -64,7 +66,7 @@ def requirements(self): self.requires("vorbis/1.3.7") self.requires("flac/1.4.2") self.requires("opus/1.4") - if self.options.get_safe("with_mpeg", False): + if self.options.get_safe("with_mpeg"): self.requires("mpg123/1.31.2") self.requires("libmp3lame/3.100") diff --git a/recipes/libsndfile/all/test_package/CMakeLists.txt b/recipes/libsndfile/all/test_package/CMakeLists.txt index 3fb4ef12f8bc8..c6050edfee50e 100644 --- a/recipes/libsndfile/all/test_package/CMakeLists.txt +++ b/recipes/libsndfile/all/test_package/CMakeLists.txt @@ -1,7 +1,10 @@ cmake_minimum_required(VERSION 3.1) -project(test_package LANGUAGES CXX) +project(test_package LANGUAGES C CXX) find_package(SndFile REQUIRED CONFIG) -add_executable(${PROJECT_NAME} test_package.cpp) -target_link_libraries(${PROJECT_NAME} PRIVATE SndFile::sndfile) +add_executable(${PROJECT_NAME}_c test_package.c) +target_link_libraries(${PROJECT_NAME}_c PRIVATE SndFile::sndfile) + +add_executable(${PROJECT_NAME}_cxx test_package.cpp) +target_link_libraries(${PROJECT_NAME}_cxx PRIVATE SndFile::sndfile) diff --git a/recipes/libsndfile/all/test_package/conanfile.py b/recipes/libsndfile/all/test_package/conanfile.py index 0a6bc68712d90..cc3db8ee5d1af 100644 --- a/recipes/libsndfile/all/test_package/conanfile.py +++ b/recipes/libsndfile/all/test_package/conanfile.py @@ -22,5 +22,7 @@ def build(self): def test(self): if can_run(self): - bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") + bin_path = os.path.join(self.cpp.build.bindir, "test_package_c") + self.run(bin_path, env="conanrun") + bin_path = os.path.join(self.cpp.build.bindir, "test_package_cxx") self.run(bin_path, env="conanrun") diff --git a/recipes/libsndfile/all/test_package/test_package.c b/recipes/libsndfile/all/test_package/test_package.c new file mode 100644 index 0000000000000..ef4f2a16fbf4e --- /dev/null +++ b/recipes/libsndfile/all/test_package/test_package.c @@ -0,0 +1,14 @@ +#include "sndfile.h" + +#include + +int main(int argc, char *argv[]) { + if (argc < 2) { + puts("Usage: example \n"); + return 0; + } + SF_INFO sfinfo; + SNDFILE *infile = sf_open (argv[1], SFM_READ, &sfinfo); + printf("Sample rate: %d\n", sfinfo.samplerate); + return 0; +} diff --git a/recipes/libsndfile/all/test_package/test_package.cpp b/recipes/libsndfile/all/test_package/test_package.cpp index 2f577c46055c5..c21e7e86b6c71 100644 --- a/recipes/libsndfile/all/test_package/test_package.cpp +++ b/recipes/libsndfile/all/test_package/test_package.cpp @@ -9,9 +9,9 @@ int main(int argc, char *argv[]) { if (argc < 2) { std::cout << "Usage: example \n"; - } else { - SndfileHandle handle(argv[1]); - std::cout << "Sample rate: " << handle.samplerate() << "\n"; + return 0; } + SndfileHandle handle(argv[1]); + std::cout << "Sample rate: " << handle.samplerate() << "\n"; return 0; } diff --git a/recipes/libsndfile/all/test_v1_package/conanfile.py b/recipes/libsndfile/all/test_v1_package/conanfile.py index 38f4483872d47..84595c5cac284 100644 --- a/recipes/libsndfile/all/test_v1_package/conanfile.py +++ b/recipes/libsndfile/all/test_v1_package/conanfile.py @@ -13,5 +13,7 @@ def build(self): def test(self): if not tools.cross_building(self): - bin_path = os.path.join("bin", "test_package") + bin_path = os.path.join("bin", "test_package_c") + self.run(bin_path, run_environment=True) + bin_path = os.path.join("bin", "test_package_cxx") self.run(bin_path, run_environment=True) diff --git a/recipes/libsndio/all/conandata.yml b/recipes/libsndio/all/conandata.yml new file mode 100644 index 0000000000000..17fe5ab522e62 --- /dev/null +++ b/recipes/libsndio/all/conandata.yml @@ -0,0 +1,8 @@ +sources: + "1.9.0": + "source": + url: "https://github.com/ratchov/sndio/archive/refs/tags/v1.9.0.tar.gz" + sha256: "4e8d77069b651d7c4bb2a50ba49004bd7fcfdfec1516f88a76457f831c17a546" + "license": + url: "https://raw.githubusercontent.com/ratchov/sndio/e10e4f836b88f8d5ea2864845e3712f560e6bed6/LICENSE" + sha256: "4ae392ab9cfbf2d6ac8522f5f4b025685d60c824979fad783aaf72d55165730f" diff --git a/recipes/libsndio/all/conanfile.py b/recipes/libsndio/all/conanfile.py new file mode 100644 index 0000000000000..adf05fa3505c4 --- /dev/null +++ b/recipes/libsndio/all/conanfile.py @@ -0,0 +1,157 @@ +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.env import VirtualBuildEnv, VirtualRunEnv +from conan.tools.files import chdir, copy, get, rmdir, replace_in_file, download +from conan.tools.gnu import Autotools, AutotoolsToolchain, AutotoolsDeps +from conan.tools.scm import Version +from conan.tools.build import cross_building +import os + +required_conan_version = ">=1.53.0" + + +class LibsndioConan(ConanFile): + name = "libsndio" + license = "ISC" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://sndio.org/" + topics = ("sndio", "sound", "audio", "midi") + description = ("A small audio and MIDI framework that provides a lightweight audio & MIDI server " + "and a user-space API to access either the server or the hardware directly in a uniform way.") + package_type = "shared-library" + settings = "os", "arch", "compiler", "build_type" + options = { + "with_alsa": [True, False] + } + default_options = { + "with_alsa": True, + } + + def configure(self): + self.settings.rm_safe("compiler.libcxx") + self.settings.rm_safe("compiler.cppstd") + + def validate(self): + if self.settings.os not in ["Linux", "FreeBSD"]: + raise ConanInvalidConfiguration(f"Unsupported OS for {self.ref}") + + if self.options.with_alsa and not self.dependencies["libalsa"].options.get_safe("shared", False): + raise ConanInvalidConfiguration(f"{self.ref} requires libalsa to be built as a shared library") + + def requirements(self): + if self.options.get_safe("with_alsa"): + self.requires("libalsa/1.2.10", options={"shared": True}) + + def build_requirements(self): + self.tool_requires("libtool/2.4.7") + + def source(self): + get(self, **self.conan_data["sources"][self.version]["source"], strip_root=True) + download(self, **self.conan_data["sources"][self.version]["license"], filename="LICENSE") + + # Remove all targets other than libsndio + lines = [ + "cd sndiod && ${MAKE} install", + "cd sndioctl && ${MAKE} install", + "cd aucat && ${MAKE} install", + "cd midicat && ${MAKE} install", + "cd sndiod && ${MAKE}", + "cd sndioctl && ${MAKE}", + "cd aucat && ${MAKE}", + "cd midicat && ${MAKE}" + ] + for line in lines: + replace_in_file(self, os.path.join(self.source_folder, "Makefile.in"), line, "") + + def generate(self): + virtual_build_env = VirtualBuildEnv(self) + virtual_build_env.generate() + + # Inject requires env vars in build scope + # It's required in case of native build when there is AutotoolsDeps & at least one dependency which might be shared, because configure tries to run a test executable + if not cross_building(self): + env = VirtualRunEnv(self) + env.generate(scope="build") + + tc = AutotoolsToolchain(self) + + # Set expected config + tc.configure_args.append("--datadir=${prefix}/res") + + # Bundled `configure` script does not support these options, so remove + exclusions = ["--enable-shared", "--disable-shared", "--disable-static", "--enable-static", "--sbindir", "--oldincludedir"] + tc.configure_args = [arg for arg in tc.configure_args if not any(exclusion in arg for exclusion in exclusions)] + + # Add alsa support + if self.options.get_safe("with_alsa"): + tc.configure_args.append("--enable-alsa") + else: + tc.configure_args.append("--disable-alsa") + + # The original project source has a hand-written `configure` script that does not expose + # many hooks for specifying additional build flags and library dependencies. Because the script is + # not auto-generated with Autotools, the standard Conan workflow of using AutoolsDeps is not possible. + # The one hook the script does provide is a command line arg: `CC=*|CFLAGS=*|LDFLAGS=*|AR=*)`. + # We use this to inject the various flags, paths, and libraries that the Conan dependency tree specifies. + dep_cflags = [] + dep_ldflags = [] + for dependency in reversed(self.dependencies.host.topological_sort.values()): + deps_cpp_info = dependency.cpp_info.aggregated_components() + + dep_cflags.extend(deps_cpp_info.cflags + deps_cpp_info.defines) + for path in deps_cpp_info.includedirs: + dep_cflags.append(f"-I{path}") + + dep_ldflags.extend(deps_cpp_info.sharedlinkflags + deps_cpp_info.exelinkflags) + for path in deps_cpp_info.libdirs: + dep_ldflags.append(f"-L{path}") + for lib in deps_cpp_info.libs + deps_cpp_info.system_libs: + dep_ldflags.append(f"-l{lib}") + + cflags = ' '.join([flag for flag in dep_cflags]) + ldflags = ' '.join([flag for flag in dep_ldflags]) + tc.configure_args.extend([ + f"CFLAGS={cflags}", + f"LDFLAGS={ldflags}" + ]) + + tc.generate() + + tc = AutotoolsDeps(self) + tc.generate() + + def build(self): + autotools = Autotools(self) + if Version(self.version) > "1.2.4": + autotools.configure() + autotools.make() + else: + with chdir(self, self.source_folder): + autotools.configure() + autotools.make() + + def package(self): + copy(self, "LICENSE", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) + if Version(self.version) > "1.2.4": + autotools = Autotools(self) + autotools.install() + else: + with chdir(self, self.source_folder): + autotools = Autotools(self) + autotools.install() + rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) + rmdir(self, os.path.join(self.package_folder, "share")) + rmdir(self, os.path.join(self.package_folder, "bin")) + + def package_info(self): + self.cpp_info.set_property("cmake_find_mode", "both") + self.cpp_info.set_property("cmake_file_name", "sndio") + self.cpp_info.set_property("cmake_target_name", "sndio::sndio") + self.cpp_info.set_property("pkg_config_name", "sndio") + self.cpp_info.libs = ["sndio"] + self.cpp_info.system_libs = ["dl", "m", "rt"] + + # TODO: to remove in conan v2? + self.cpp_info.names["cmake_find_package"] = "sndio" + self.cpp_info.names["cmake_find_package_multi"] = "sndio" + self.cpp_info.names["pkg_config"] = "sndio" diff --git a/recipes/libsndio/all/test_package/CMakeLists.txt b/recipes/libsndio/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..29d5d52c61281 --- /dev/null +++ b/recipes/libsndio/all/test_package/CMakeLists.txt @@ -0,0 +1,7 @@ +cmake_minimum_required(VERSION 3.1) +project(test_package LANGUAGES C) + +find_package(sndio REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.c) +target_link_libraries(${PROJECT_NAME} PRIVATE sndio::sndio) diff --git a/recipes/libsndio/all/test_package/conanfile.py b/recipes/libsndio/all/test_package/conanfile.py new file mode 100644 index 0000000000000..0a6bc68712d90 --- /dev/null +++ b/recipes/libsndio/all/test_package/conanfile.py @@ -0,0 +1,26 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import CMake, cmake_layout +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeToolchain", "CMakeDeps", "VirtualRunEnv" + test_type = "explicit" + + def layout(self): + cmake_layout(self) + + def requirements(self): + self.requires(self.tested_reference_str) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/libsndio/all/test_package/test_package.c b/recipes/libsndio/all/test_package/test_package.c new file mode 100644 index 0000000000000..03387869c0a9d --- /dev/null +++ b/recipes/libsndio/all/test_package/test_package.c @@ -0,0 +1,24 @@ +#include +#include +#include +#include +#include +#include +#include +#include + +int main(int argc, char *argv[]) { + int ch; + unsigned mode = SIO_PLAY | SIO_REC; + struct sio_hdl *hdl; + + hdl = sio_open(NULL, mode, 0); + if (hdl == NULL) { + fprintf(stderr, "sio_open() failed, but test is ok\n"); + exit(0); + } else { + printf("sio_open() success" ); + } + sio_close(hdl); + return 0; +} diff --git a/recipes/libsndio/config.yml b/recipes/libsndio/config.yml new file mode 100644 index 0000000000000..95efce85442dd --- /dev/null +++ b/recipes/libsndio/config.yml @@ -0,0 +1,3 @@ +versions: + "1.9.0": + folder: "all" diff --git a/recipes/libsodium/all/conandata.yml b/recipes/libsodium/all/conandata.yml index c399471111c38..011a9515014e0 100644 --- a/recipes/libsodium/all/conandata.yml +++ b/recipes/libsodium/all/conandata.yml @@ -1,6 +1,9 @@ # To update the version on CCI, add a new cci.date entry from the stable branch: # https://github.com/jedisct1/libsodium/commits/stable sources: + "1.0.20": + url: "https://github.com/jedisct1/libsodium/archive/1.0.20-RELEASE.tar.gz" + sha256: "8e5aeca07a723a27bbecc3beef14b0068d37e7fc0e97f51b3f1c82d2a58005c1" "1.0.19": url: "https://github.com/jedisct1/libsodium/releases/download/1.0.19-RELEASE/libsodium-1.0.19.tar.gz" sha256: "018d79fe0a045cca07331d37bd0cb57b2e838c51bc48fd837a1472e50068bbea" diff --git a/recipes/libsodium/config.yml b/recipes/libsodium/config.yml index 4dfbbb5c3d410..124484cdfba0a 100644 --- a/recipes/libsodium/config.yml +++ b/recipes/libsodium/config.yml @@ -1,4 +1,6 @@ versions: + "1.0.20": + folder: all "1.0.19": folder: all "1.0.18": diff --git a/recipes/libssh2/all/conandata.yml b/recipes/libssh2/all/conandata.yml index 46c0ee9468864..c8e5373109020 100644 --- a/recipes/libssh2/all/conandata.yml +++ b/recipes/libssh2/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.11.1": + sha256: 9954cb54c4f548198a7cbebad248bdc87dd64bd26185708a294b2b50771e3769 + url: https://github.com/libssh2/libssh2/releases/download/libssh2-1.11.1/libssh2-1.11.1.tar.xz "1.11.0": sha256: a488a22625296342ddae862de1d59633e6d446eff8417398e06674a49be3d7c2 url: https://github.com/libssh2/libssh2/releases/download/libssh2-1.11.0/libssh2-1.11.0.tar.xz diff --git a/recipes/libssh2/all/conanfile.py b/recipes/libssh2/all/conanfile.py index 3ccfe30d867cc..693bcb37db269 100644 --- a/recipes/libssh2/all/conanfile.py +++ b/recipes/libssh2/all/conanfile.py @@ -1,12 +1,12 @@ from conan import ConanFile from conan.tools.apple import fix_apple_shared_install_name from conan.tools.cmake import CMake, CMakeToolchain, CMakeDeps, cmake_layout -from conan.tools.files import apply_conandata_patches, export_conandata_patches, get, copy, rmdir, collect_libs +from conan.tools.files import apply_conandata_patches, export_conandata_patches, get, copy, rmdir, collect_libs, replace_in_file from conan.tools.microsoft import is_msvc from conan.tools.scm import Version import os -required_conan_version = ">=1.53.0" +required_conan_version = ">=2.7" class Libssh2Conan(ConanFile): @@ -43,6 +43,11 @@ def export_sources(self): def layout(self): cmake_layout(self, src_folder="src") + @property + def _mbedtls_cmake_package_name(self): + pkg_name = "mbedTLS" if Version(self.version) < "1.11.1" else "MbedTLS" + return pkg_name + def generate(self): tc = CMakeToolchain(self) tc.cache_variables["ENABLE_ZLIB_COMPRESSION"] = self.options.with_zlib @@ -66,6 +71,8 @@ def generate(self): tc.generate() deps = CMakeDeps(self) + deps.set_property("mbedtls", "cmake_file_name", self._mbedtls_cmake_package_name) + deps.set_property("mbedtls", "cmake_additional_variables_prefixes", ["MBEDTLS"]) deps.generate() def config_options(self): @@ -90,10 +97,16 @@ def requirements(self): else: self.requires("mbedtls/2.28.4") + def build_requirements(self): + self.tool_requires("cmake/[>=3.20 <4]") + def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) apply_conandata_patches(self) + cmakelists = os.path.join("src", "CMakeLists.txt") if Version(self.version) <= "1.10" else "CMakeLists.txt" + replace_in_file(self, os.path.join(self.source_folder, cmakelists), "MBEDTLS_FOUND", f"{self._mbedtls_cmake_package_name}_FOUND") + def build(self): cmake = CMake(self) cmake.configure() @@ -120,10 +133,6 @@ def package_info(self): self.cpp_info.components["_libssh2"].system_libs.extend(["pthread", "dl"]) # TODO: to remove in conan v2 once cmake_find_package_* generators removed - self.cpp_info.names["cmake_find_package"] = "Libssh2" - self.cpp_info.names["cmake_find_package_multi"] = "Libssh2" - self.cpp_info.components["_libssh2"].names["cmake_find_package"] = "libssh2" - self.cpp_info.components["_libssh2"].names["cmake_find_package_multi"] = "libssh2" self.cpp_info.components["_libssh2"].set_property("cmake_target_name", "Libssh2::libssh2") self.cpp_info.components["_libssh2"].set_property("pkg_config_name", "libssh2") if self.options.with_zlib: diff --git a/recipes/libssh2/config.yml b/recipes/libssh2/config.yml index 3cada2e5e398c..344cf19e3fd11 100644 --- a/recipes/libssh2/config.yml +++ b/recipes/libssh2/config.yml @@ -1,4 +1,6 @@ versions: + "1.11.1": + folder: all "1.11.0": folder: all "1.10.0": diff --git a/recipes/libstudxml/1.1.x/conanfile.py b/recipes/libstudxml/1.1.x/conanfile.py index 42db9e71046d4..f5228bce1c824 100644 --- a/recipes/libstudxml/1.1.x/conanfile.py +++ b/recipes/libstudxml/1.1.x/conanfile.py @@ -38,7 +38,7 @@ def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - self.requires("expat/2.5.0", transitive_headers=True, transitive_libs=True) + self.requires("expat/[>=2.6.2 <3]", transitive_headers=True, transitive_libs=True) def source(self): get(self, **self.conan_data["sources"][self.version], diff --git a/recipes/libsvm/all/conandata.yml b/recipes/libsvm/all/conandata.yml index 4ce3fd15b7dba..0567d38d76228 100644 --- a/recipes/libsvm/all/conandata.yml +++ b/recipes/libsvm/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "333": + url: "https://github.com/cjlin1/libsvm/archive/v333.tar.gz" + sha256: "ee898ca11cef85b09e059b278b3ab4ff58cd38f70169829e75b4a3cb9ddc5013" "332": url: "https://github.com/cjlin1/libsvm/archive/v332.tar.gz" sha256: "e1d7d316112d199ebd69c9695f79226d236b86e2c8d88e70cfe35fd383954ed8" diff --git a/recipes/libsvm/all/conanfile.py b/recipes/libsvm/all/conanfile.py index 5391a6c157e8a..3b312ef9f419c 100644 --- a/recipes/libsvm/all/conanfile.py +++ b/recipes/libsvm/all/conanfile.py @@ -12,19 +12,21 @@ class libsvmConan(ConanFile): name = "libsvm" description = "Libsvm is a simple, easy-to-use, and efficient software for SVM classification and regression" + license = "BSD-3-Clause" url = "https://github.com/conan-io/conan-center-index" homepage = "https://www.csie.ntu.edu.tw/~cjlin/libsvm/" - license = "BSD-3-Clause" - topics = "svm", "vector" + topics = ("svm", "vector") + + package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], "fPIC": [True, False], - } + } default_options = { "shared": False, "fPIC": True, - } + } def export_sources(self): copy(self, "CMakeLists.txt", self.recipe_folder, self.export_sources_folder) diff --git a/recipes/libsvm/config.yml b/recipes/libsvm/config.yml index c1b9e6f304394..c8909e199de65 100644 --- a/recipes/libsvm/config.yml +++ b/recipes/libsvm/config.yml @@ -1,4 +1,6 @@ versions: + "333": + folder: all "332": folder: all "330": diff --git a/recipes/libsvtav1/all/conandata.yml b/recipes/libsvtav1/all/conandata.yml index fcb9aa5c7563f..cef6d3411b8ae 100644 --- a/recipes/libsvtav1/all/conandata.yml +++ b/recipes/libsvtav1/all/conandata.yml @@ -1,19 +1,16 @@ sources: + "2.1.2": + url: "https://gitlab.com/AOMediaCodec/SVT-AV1/-/archive/v2.1.2/SVT-AV1-v2.1.2.tar.gz" + sha256: "65e90af18f31f8c8d2e9febf909a7d61f36172536abb25a7089f152210847cd9" + "2.1.0": + url: "https://gitlab.com/AOMediaCodec/SVT-AV1/-/archive/v2.1.0/SVT-AV1-v2.1.0.tar.gz" + sha256: "72a076807544f3b269518ab11656f77358284da7782cece497781ab64ed4cb8a" "1.7.0": url: "https://gitlab.com/AOMediaCodec/SVT-AV1/-/archive/v1.7.0/SVT-AV1-v1.7.0.tar.gz" sha256: "ce0973584f1a187aa4abf63f509ff8464397120878e322a3153f87e9c161fc4f" "1.6.0": url: https://gitlab.com/AOMediaCodec/SVT-AV1/-/archive/v1.6.0/SVT-AV1-v1.6.0.tar.bz2 sha256: c6b49111a2d4c5113f1ada0c2f716d94bd4a8db704623d453066826401ecdab5 - "1.4.1": - url: https://gitlab.com/AOMediaCodec/SVT-AV1/-/archive/v1.4.1/SVT-AV1-v1.4.1.tar.bz2 - sha256: 0e988582f315fe76c909accf5e7f81b975c5bd2b850ee760d8e9fac297f70b5d - "1.3.0": - url: https://gitlab.com/AOMediaCodec/SVT-AV1/-/archive/v1.3.0/SVT-AV1-v1.3.0.tar.bz2 - sha256: f85fd13ef16880550e425797bdfdf1b0ba310c21d6b343f74ea79dd2fbb2336e - "1.2.1": - url: https://gitlab.com/AOMediaCodec/SVT-AV1/-/archive/v1.2.1/SVT-AV1-v1.2.1.tar.bz2 - sha256: 805827daa8aedec4f1362b959f377075e2a811680bfc76b6f4fbf2ef4e7101d4 patches: "1.7.0": - patch_file: "patches/external-cpuinfo-1.7.0.patch" @@ -25,30 +22,3 @@ patches: patch_type: "portability" patch_source: https://gitlab.com/AOMediaCodec/SVT-AV1/-/merge_requests/2178 patch_description: "Allow compiling with external cpuinfo" - "1.4.1": - - patch_file: "patches/llvm-clang-macos.patch" - patch_type: "portability" - patch_source: https://gitlab.com/AOMediaCodec/SVT-AV1/-/merge_requests/2087 - patch_description: "Allow statically compiling on macos with llvm-clang" - - patch_file: "patches/external-cpuinfo-1.4.1.patch" - patch_type: "portability" - patch_source: https://gitlab.com/AOMediaCodec/SVT-AV1/-/merge_requests/2178 - patch_description: "Allow compiling with external cpuinfo" - "1.3.0": - - patch_file: "patches/llvm-clang-macos.patch" - patch_type: "portability" - patch_source: https://gitlab.com/AOMediaCodec/SVT-AV1/-/merge_requests/2087 - patch_description: "Allow statically compiling on macos with llvm-clang" - - patch_file: "patches/external-cpuinfo-1.3.0.patch" - patch_type: "portability" - patch_source: https://gitlab.com/AOMediaCodec/SVT-AV1/-/merge_requests/2178 - patch_description: "Allow compiling with external cpuinfo" - "1.2.1": - - patch_file: "patches/llvm-clang-macos.patch" - patch_type: "portability" - patch_source: https://gitlab.com/AOMediaCodec/SVT-AV1/-/merge_requests/2087 - patch_description: "Allow statically compiling on macos with llvm-clang" - - patch_file: "patches/external-cpuinfo-1.2.1.patch" - patch_type: "portability" - patch_source: https://gitlab.com/AOMediaCodec/SVT-AV1/-/merge_requests/2178 - patch_description: "Allow compiling with external cpuinfo" diff --git a/recipes/libsvtav1/all/conanfile.py b/recipes/libsvtav1/all/conanfile.py index 881442bca3f0b..4e96d05b0f57b 100644 --- a/recipes/libsvtav1/all/conanfile.py +++ b/recipes/libsvtav1/all/conanfile.py @@ -3,17 +3,18 @@ from conan.tools.cmake import cmake_layout, CMakeToolchain, CMakeDeps, CMake from conan.tools.files import copy, get, rmdir, apply_conandata_patches, export_conandata_patches from conan.tools.scm import Version +from conan.errors import ConanInvalidConfiguration -required_conan_version = ">=1.53.0" +required_conan_version = ">=1.54.0" class SVTAV1Conan(ConanFile): name = "libsvtav1" - license = "BSD-3-Clause" description = "An AV1-compliant software encoder/decoder library" - topics = "av1", "codec", "encoder", "decoder", "video" - homepage = "https://gitlab.com/AOMediaCodec/SVT-AV1" + license = "BSD-3-Clause" url = "https://github.com/conan-io/conan-center-index" + homepage = "https://gitlab.com/AOMediaCodec/SVT-AV1" + topics = ("av1", "codec", "encoder", "decoder", "video") package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { @@ -21,12 +22,14 @@ class SVTAV1Conan(ConanFile): "fPIC": [True, False], "build_encoder": [True, False], "build_decoder": [True, False], + "minimal_build": [True, False], } default_options = { "shared": False, "fPIC": True, "build_encoder": True, "build_decoder": True, + "minimal_build": False, } def export_sources(self): @@ -35,6 +38,11 @@ def export_sources(self): def config_options(self): if self.settings.os == "Windows": self.options.rm_safe("fPIC") + if Version(self.version) < "2.0.0": + del self.options.minimal_build + if Version(self.version) >= "2.1.1": + # https://gitlab.com/AOMediaCodec/SVT-AV1/-/blob/c949fe4f14fe288a9b2b47aa3e61335422a83645/CHANGELOG.md#211---2024-06-25 + del self.options.build_decoder def configure(self): if self.options.shared: @@ -46,11 +54,17 @@ def layout(self): def requirements(self): self.requires("cpuinfo/cci.20231129") + def validate(self): + # https://gitlab.com/AOMediaCodec/SVT-AV1/-/issues/2081 + # https://gitlab.com/AOMediaCodec/SVT-AV1/-/commit/800a81b09db1cf8c9c289ecf6f70381d7888b98c + if Version(self.version) < "1.9.0" and self.settings.os == "Android": + raise ConanInvalidConfiguration(f"{self.ref} does not support Android before version 1.9.0.") + def build_requirements(self): if Version(self.version) >= "1.3.0": self.tool_requires("cmake/[>=3.16 <4]") if self.settings.arch in ("x86", "x86_64"): - self.tool_requires("nasm/2.15.05") + self.tool_requires("nasm/2.16.01") def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) @@ -58,11 +72,13 @@ def source(self): def generate(self): tc = CMakeToolchain(self) tc.variables["BUILD_APPS"] = False - tc.variables["BUILD_DEC"] = self.options.build_decoder + if Version(self.version) < "2.1.1": + tc.variables["BUILD_DEC"] = self.options.build_decoder tc.variables["BUILD_ENC"] = self.options.build_encoder tc.variables["USE_EXTERNAL_CPUINFO"] = True if self.settings.arch in ("x86", "x86_64"): tc.variables["ENABLE_NASM"] = True + tc.variables["MINIMAL_BUILD"] = self.options.get_safe("minimal_build", False) tc.generate() deps = CMakeDeps(self) deps.generate() @@ -89,7 +105,7 @@ def package_info(self): self.cpp_info.components["encoder"].requires = ["cpuinfo::cpuinfo"] if self.settings.os in ("FreeBSD", "Linux"): self.cpp_info.components["encoder"].system_libs = ["pthread", "dl", "m"] - if self.options.build_decoder: + if self.options.get_safe("build_decoder"): self.cpp_info.components["decoder"].libs = ["SvtAv1Dec"] self.cpp_info.components["decoder"].includedirs = ["include/svt-av1"] self.cpp_info.components["decoder"].set_property("pkg_config_name", "SvtAv1Dec") diff --git a/recipes/libsvtav1/all/patches/external-cpuinfo-1.2.1.patch b/recipes/libsvtav1/all/patches/external-cpuinfo-1.2.1.patch deleted file mode 100644 index 8e74085d78f88..0000000000000 --- a/recipes/libsvtav1/all/patches/external-cpuinfo-1.2.1.patch +++ /dev/null @@ -1,68 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 9c8615541bd0a1db44ec36a761f30bd4dbb26cfb..6245acfe3e05098be57e8b1ad00126455b74e223 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -41,6 +41,11 @@ if(NOT CMAKE_SIZEOF_VOID_P EQUAL 8) - endif() - - option(COMPILE_C_ONLY "Compile only C code with no simds (autodetect, default off for x86)" OFF) -+option(USE_EXTERNAL_CPUINFO "Consume system cpuinfo library only" OFF) -+ -+if(USE_EXTERNAL_CPUINFO) -+ find_package(cpuinfo CONFIG REQUIRED) -+endif() - - include(CheckCSourceCompiles) - -@@ -542,7 +547,7 @@ endif() - - add_subdirectory(third_party/fastfeat) - --if(NOT COMPILE_C_ONLY AND HAVE_X86_PLATFORM) -+if(NOT USE_EXTERNAL_CPUINFO AND NOT COMPILE_C_ONLY AND HAVE_X86_PLATFORM) - add_subdirectory(third_party/cpuinfo) - endif() - -diff --git a/Source/Lib/Encoder/CMakeLists.txt b/Source/Lib/Encoder/CMakeLists.txt -index fa3e11c137638b8949faf00683233188653ddd4e..d4e8880309a9dac9e909b817e01cef31da4531b5 100644 ---- a/Source/Lib/Encoder/CMakeLists.txt -+++ b/Source/Lib/Encoder/CMakeLists.txt -@@ -131,7 +131,9 @@ set_target_properties(SvtAv1Enc PROPERTIES VERSION ${ENC_VERSION}) - set_target_properties(SvtAv1Enc PROPERTIES SOVERSION ${ENC_VERSION_MAJOR}) - set_target_properties(SvtAv1Enc PROPERTIES C_VISIBILITY_PRESET hidden) - target_link_libraries(SvtAv1Enc PUBLIC ${PLATFORM_LIBS}) --if(NOT COMPILE_C_ONLY AND HAVE_X86_PLATFORM) -+if(USE_EXTERNAL_CPUINFO) -+ target_link_libraries(SvtAv1Enc PRIVATE cpuinfo::cpuinfo) -+elseif(NOT COMPILE_C_ONLY AND HAVE_X86_PLATFORM) - target_link_libraries(SvtAv1Enc PRIVATE cpuinfo_public) - endif() - -diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt -index 99a0bcfd62ac7f5f268d3527d0f65c688a44eb6c..d5a3ca47f948663a56dd731e457a4922677e1f78 100644 ---- a/test/CMakeLists.txt -+++ b/test/CMakeLists.txt -@@ -85,7 +85,7 @@ set(lib_list - $ - $ - $ -- cpuinfo_public -+ $,cpuinfo::cpuinfo,cpuinfo_public> - gtest_all) - if(UNIX) - # App Source Files -diff --git a/Source/Lib/Decoder/CMakeLists.txt b/Source/Lib/Decoder/CMakeLists.txt -index ca7e51f2c2c1ec12695a0c1dd5ef90bc259edb1d..bdac723c418f619ceee2dbd7a52d9fc4ac395dc8 100644 ---- a/Source/Lib/Decoder/CMakeLists.txt -+++ b/Source/Lib/Decoder/CMakeLists.txt -@@ -100,7 +100,9 @@ set_target_properties(SvtAv1Dec PROPERTIES SOVERSION ${DEC_VERSION_MAJOR}) - set_target_properties(SvtAv1Dec PROPERTIES C_VISIBILITY_PRESET hidden) - add_dependencies(SvtAv1Dec EbVersionHeaderGen) - target_link_libraries(SvtAv1Dec PUBLIC ${PLATFORM_LIBS}) --if(NOT COMPILE_C_ONLY AND HAVE_X86_PLATFORM) -+if(USE_EXTERNAL_CPUINFO) -+ target_link_libraries(SvtAv1Dec PRIVATE cpuinfo::cpuinfo) -+elseif(NOT COMPILE_C_ONLY AND HAVE_X86_PLATFORM) - target_link_libraries(SvtAv1Dec PRIVATE cpuinfo_public) - endif() - diff --git a/recipes/libsvtav1/all/patches/external-cpuinfo-1.3.0.patch b/recipes/libsvtav1/all/patches/external-cpuinfo-1.3.0.patch deleted file mode 100644 index 8540fba08ffe5..0000000000000 --- a/recipes/libsvtav1/all/patches/external-cpuinfo-1.3.0.patch +++ /dev/null @@ -1,68 +0,0 @@ -diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt -index f98c8675acc06b3c998f29fcc712ac8befcda129..f464ead3ea55bacd71451a24252cbaf33194292c 100644 ---- a/test/CMakeLists.txt -+++ b/test/CMakeLists.txt -@@ -151,7 +151,7 @@ set(lib_list - $ - $ - $ -- cpuinfo_public -+ $,cpuinfo::cpuinfo,cpuinfo_public> - gtest_all) - if(UNIX) - # App Source Files -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 2c7c8d67f6ce94e74b685a3494b0430b60f80105..f7f0dbe1f480060aebd5ccd9b62969ab4a69449a 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -41,6 +41,11 @@ if(NOT CMAKE_SIZEOF_VOID_P EQUAL 8) - endif() - - option(COMPILE_C_ONLY "Compile only C code with no simds (autodetect, default off for x86)" OFF) -+option(USE_EXTERNAL_CPUINFO "Consume system cpuinfo library only" OFF) -+ -+if(USE_EXTERNAL_CPUINFO) -+ find_package(cpuinfo CONFIG REQUIRED) -+endif() - - include(CheckCSourceCompiles) - -@@ -542,7 +547,7 @@ endif() - - add_subdirectory(third_party/fastfeat) - --if(NOT COMPILE_C_ONLY AND HAVE_X86_PLATFORM) -+if(NOT USE_EXTERNAL_CPUINFO AND NOT COMPILE_C_ONLY AND HAVE_X86_PLATFORM) - add_subdirectory(third_party/cpuinfo) - endif() - -diff --git a/Source/Lib/Encoder/CMakeLists.txt b/Source/Lib/Encoder/CMakeLists.txt -index 2991364b7d12dd846ff981c86306d9d2b46cc934..0c0ee78b869c0c875eb36fce4706b6fd3f1c9b7c 100644 ---- a/Source/Lib/Encoder/CMakeLists.txt -+++ b/Source/Lib/Encoder/CMakeLists.txt -@@ -129,7 +129,9 @@ set_target_properties(SvtAv1Enc PROPERTIES VERSION ${ENC_VERSION}) - set_target_properties(SvtAv1Enc PROPERTIES SOVERSION ${ENC_VERSION_MAJOR}) - set_target_properties(SvtAv1Enc PROPERTIES C_VISIBILITY_PRESET hidden) - target_link_libraries(SvtAv1Enc PUBLIC ${PLATFORM_LIBS}) --if(NOT COMPILE_C_ONLY AND HAVE_X86_PLATFORM) -+if(USE_EXTERNAL_CPUINFO) -+ target_link_libraries(SvtAv1Enc PRIVATE cpuinfo::cpuinfo) -+elseif(NOT COMPILE_C_ONLY AND HAVE_X86_PLATFORM) - target_link_libraries(SvtAv1Enc PRIVATE cpuinfo_public) - endif() - -diff --git a/Source/Lib/Decoder/CMakeLists.txt b/Source/Lib/Decoder/CMakeLists.txt -index 0f220a78a6db783ef2b5d6dd6cc182766c4362a3..8fb88f1c958fa965bc8f9ed9c1d563ee3858baee 100644 ---- a/Source/Lib/Decoder/CMakeLists.txt -+++ b/Source/Lib/Decoder/CMakeLists.txt -@@ -147,7 +147,9 @@ set_target_properties(SvtAv1Dec PROPERTIES SOVERSION ${DEC_VERSION_MAJOR}) - set_target_properties(SvtAv1Dec PROPERTIES C_VISIBILITY_PRESET hidden) - add_dependencies(SvtAv1Dec EbVersionHeaderGen) - target_link_libraries(SvtAv1Dec PUBLIC ${PLATFORM_LIBS}) --if(NOT COMPILE_C_ONLY AND HAVE_X86_PLATFORM) -+if(USE_EXTERNAL_CPUINFO) -+ target_link_libraries(SvtAv1Dec PRIVATE cpuinfo::cpuinfo) -+elseif(NOT COMPILE_C_ONLY AND HAVE_X86_PLATFORM) - target_link_libraries(SvtAv1Dec PRIVATE cpuinfo_public) - endif() - diff --git a/recipes/libsvtav1/all/patches/external-cpuinfo-1.4.1.patch b/recipes/libsvtav1/all/patches/external-cpuinfo-1.4.1.patch deleted file mode 100644 index 6673e558c5c3e..0000000000000 --- a/recipes/libsvtav1/all/patches/external-cpuinfo-1.4.1.patch +++ /dev/null @@ -1,68 +0,0 @@ -diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt -index f98c8675acc06b3c998f29fcc712ac8befcda129..f464ead3ea55bacd71451a24252cbaf33194292c 100644 ---- a/test/CMakeLists.txt -+++ b/test/CMakeLists.txt -@@ -151,7 +151,7 @@ set(lib_list - $ - $ - $ -- cpuinfo_public -+ $,cpuinfo::cpuinfo,cpuinfo_public> - gtest_all) - if(UNIX) - # App Source Files -diff --git a/Source/Lib/Decoder/CMakeLists.txt b/Source/Lib/Decoder/CMakeLists.txt -index 0f220a78a6db783ef2b5d6dd6cc182766c4362a3..8fb88f1c958fa965bc8f9ed9c1d563ee3858baee 100644 ---- a/Source/Lib/Decoder/CMakeLists.txt -+++ b/Source/Lib/Decoder/CMakeLists.txt -@@ -147,7 +147,9 @@ set_target_properties(SvtAv1Dec PROPERTIES SOVERSION ${DEC_VERSION_MAJOR}) - set_target_properties(SvtAv1Dec PROPERTIES C_VISIBILITY_PRESET hidden) - add_dependencies(SvtAv1Dec EbVersionHeaderGen) - target_link_libraries(SvtAv1Dec PUBLIC ${PLATFORM_LIBS}) --if(NOT COMPILE_C_ONLY AND HAVE_X86_PLATFORM) -+if(USE_EXTERNAL_CPUINFO) -+ target_link_libraries(SvtAv1Dec PRIVATE cpuinfo::cpuinfo) -+elseif(NOT COMPILE_C_ONLY AND HAVE_X86_PLATFORM) - target_link_libraries(SvtAv1Dec PRIVATE cpuinfo_public) - endif() - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 48953de55693cd1f51a7260b84d4e9da1e463cd5..9899442e29eb5e8d3675de68ebfa296a9045f917 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -41,6 +41,11 @@ if(NOT CMAKE_SIZEOF_VOID_P EQUAL 8) - endif() - - option(COMPILE_C_ONLY "Compile only C code with no simds (autodetect, default off for x86)" OFF) -+option(USE_EXTERNAL_CPUINFO "Consume system cpuinfo library only" OFF) -+ -+if(USE_EXTERNAL_CPUINFO) -+ find_package(cpuinfo CONFIG REQUIRED) -+endif() - - include(CheckCSourceCompiles) - -@@ -590,7 +595,7 @@ endif() - - add_subdirectory(third_party/fastfeat) - --if(NOT COMPILE_C_ONLY AND HAVE_X86_PLATFORM) -+if(NOT USE_EXTERNAL_CPUINFO AND NOT COMPILE_C_ONLY AND HAVE_X86_PLATFORM) - add_subdirectory(third_party/cpuinfo) - endif() - -diff --git a/Source/Lib/Encoder/CMakeLists.txt b/Source/Lib/Encoder/CMakeLists.txt -index 12badfd32963989a0e6a7e181321c9a6b527706b..6ed1ca0cce8f13c536899fc16d6eaa3458f7de8c 100644 ---- a/Source/Lib/Encoder/CMakeLists.txt -+++ b/Source/Lib/Encoder/CMakeLists.txt -@@ -129,7 +129,9 @@ set_target_properties(SvtAv1Enc PROPERTIES VERSION ${ENC_VERSION}) - set_target_properties(SvtAv1Enc PROPERTIES SOVERSION ${ENC_VERSION_MAJOR}) - set_target_properties(SvtAv1Enc PROPERTIES C_VISIBILITY_PRESET hidden) - target_link_libraries(SvtAv1Enc PUBLIC ${PLATFORM_LIBS}) --if(NOT COMPILE_C_ONLY AND HAVE_X86_PLATFORM) -+if(USE_EXTERNAL_CPUINFO) -+ target_link_libraries(SvtAv1Enc PRIVATE cpuinfo::cpuinfo) -+elseif(NOT COMPILE_C_ONLY AND HAVE_X86_PLATFORM) - target_link_libraries(SvtAv1Enc PRIVATE cpuinfo_public) - endif() - diff --git a/recipes/libsvtav1/all/test_package/CMakeLists.txt b/recipes/libsvtav1/all/test_package/CMakeLists.txt index 57e131a83ee08..9a816703844c2 100644 --- a/recipes/libsvtav1/all/test_package/CMakeLists.txt +++ b/recipes/libsvtav1/all/test_package/CMakeLists.txt @@ -1,8 +1,11 @@ -cmake_minimum_required(VERSION 3.8) -project(test_package CXX) +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) find_package(libsvtav1 REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) target_link_libraries(${PROJECT_NAME} PRIVATE libsvtav1::encoder) -target_link_libraries(${PROJECT_NAME} PRIVATE libsvtav1::decoder) +if (TARGET libsvtav1::decoder) + target_link_libraries(${PROJECT_NAME} PRIVATE libsvtav1::decoder) + target_compile_definitions(${PROJECT_NAME} PRIVATE HAVE_DECODER) +endif() diff --git a/recipes/libsvtav1/all/test_package/test_package.cpp b/recipes/libsvtav1/all/test_package/test_package.cpp index cb808440d268e..bb98a869a2556 100644 --- a/recipes/libsvtav1/all/test_package/test_package.cpp +++ b/recipes/libsvtav1/all/test_package/test_package.cpp @@ -1,5 +1,7 @@ #include "EbSvtAv1Enc.h" -#include "EbSvtAv1Dec.h" +#ifdef HAVE_DECODER +# include "EbSvtAv1Dec.h" +#endif #include diff --git a/recipes/libsvtav1/config.yml b/recipes/libsvtav1/config.yml index c8fea3589a745..510ab3b3cd3f2 100644 --- a/recipes/libsvtav1/config.yml +++ b/recipes/libsvtav1/config.yml @@ -1,11 +1,9 @@ versions: - "1.7.0": - folder: all - "1.6.0": + "2.1.2": folder: all - "1.4.1": + "2.1.0": folder: all - "1.3.0": + "1.7.0": folder: all - "1.2.1": + "1.6.0": folder: all diff --git a/recipes/libsystemd/all/conandata.yml b/recipes/libsystemd/all/conandata.yml index e7dd7400914db..ebdc4097aca58 100644 --- a/recipes/libsystemd/all/conandata.yml +++ b/recipes/libsystemd/all/conandata.yml @@ -1,4 +1,10 @@ sources: + "255.10": + url: "https://github.com/systemd/systemd-stable/archive/v255.10.tar.gz" + sha256: "1747b848e68223597abb90ca2758b25230ac4c19e252e9ec77c8518750f621ed" + "255.7": + url: "https://github.com/systemd/systemd-stable/archive/v255.7.tar.gz" + sha256: "da29f2490c192ca743511098b1d15e385b1b5e7744979661dc30514c1ac61f0e" "255.2": url: "https://github.com/systemd/systemd-stable/archive/v255.2.tar.gz" sha256: "ba7354a742dc9a8bb7dbeaa40cbf7cf2ca84f506d5b7ae5ab8d14c8eecb7aca0" @@ -14,25 +20,15 @@ sources: "253.6": url: "https://github.com/systemd/systemd-stable/archive/v253.6.tar.gz" sha256: "a0aebcfaa2e001a4d846691631d1722c4cfa1a175e4ea62db6edca0ea3cf1e3e" - "252.12": - url: "https://github.com/systemd/systemd-stable/archive/v252.12.tar.gz" - sha256: "c6c249d65b3aff0a2b99410f430f404068c74a7cd96b63f482c933afd7288112" - "251.18": - url: "https://github.com/systemd/systemd-stable/archive/v251.18.tar.gz" - sha256: "aaa5eca2dcf3fda242ed6816a00a83c91762b44ef3c76ee4eb8476a592c38f7f" - "249.16": - url: "https://github.com/systemd/systemd-stable/archive/v249.16.tar.gz" - sha256: "e6c8a686023ef0ce402f4abde42245e3ada661e000c4811dc16c8cd9b4c6d885" - "248.12": - url: "https://github.com/systemd/systemd-stable/archive/v248.12.tar.gz" - sha256: "d0826453439363b57a4f092ae078b128a95e87047281a79e8b136116ab83abc9" - "247.13": - url: "https://github.com/systemd/systemd-stable/archive/v247.13.tar.gz" - sha256: "0958bfcebf3ed4e451f6cc49802f338fcc80eb4fe4f0cf5cb5b1b90fa62e5f47" - "246.16": - url: "https://github.com/systemd/systemd-stable/archive/v246.16.tar.gz" - sha256: "b69f9940d65870f090269a28f1047a633d4b80d0001e091d53a031dd40a822d2" patches: + "255.10": + - patch_file: "patches/251.18/0001-Remove-dependency-from-coreutils.patch" + patch_description: "allow to build in environments without 'realpath --relative-to' by replacing it with conan-specific build variable" + patch_type: "conan" + "255.7": + - patch_file: "patches/251.18/0001-Remove-dependency-from-coreutils.patch" + patch_description: "allow to build in environments without 'realpath --relative-to' by replacing it with conan-specific build variable" + patch_type: "conan" "255.2": - patch_file: "patches/251.18/0001-Remove-dependency-from-coreutils.patch" patch_description: "allow to build in environments without 'realpath --relative-to' by replacing it with conan-specific build variable" @@ -74,47 +70,3 @@ patches: patch_source: "https://patch-diff.githubusercontent.com/raw/systemd/systemd/pull/29538" patch_description: "fixes cross-compilation by passing necessary compiler arguments to generator scripts" patch_type: "portability" - "252.12": - - patch_file: "patches/248.12/0001-missing_syscalls.py-Replace-unicode-with-ascii.patch" - patch_description: "allow to use meson.build with older versions of Python by replacing utf8 message to ascii message in the helper script" - patch_type: "conan" - - patch_file: "patches/251.18/0001-Remove-dependency-from-coreutils.patch" - patch_description: "allow to build in environments without 'realpath --relative-to' by replacing it with conan-specific build variable" - patch_type: "conan" - "251.18": - - patch_file: "patches/248.12/0001-missing_syscalls.py-Replace-unicode-with-ascii.patch" - patch_description: "allow to use meson.build with older versions of Python by replacing utf8 message to ascii message in the helper script" - patch_type: "conan" - - patch_file: "patches/251.18/0001-Remove-dependency-from-coreutils.patch" - patch_description: "allow to build in environments without 'realpath --relative-to' by replacing it with conan-specific build variable" - patch_type: "conan" - "249.16": - - patch_file: "patches/248.12/0001-missing_syscalls.py-Replace-unicode-with-ascii.patch" - patch_description: "allow to use meson.build with older versions of Python by replacing utf8 message to ascii message in the helper script" - patch_type: "conan" - - patch_file: "patches/249.16/0001-Remove-dependency-from-coreutils.patch" - patch_description: "allow to build in environments without 'realpath --relative-to' by replacing it with conan-specific build variable" - patch_type: "conan" - "248.12": - - patch_file: "patches/248.12/0001-missing_syscalls.py-Replace-unicode-with-ascii.patch" - patch_description: "allow to use meson.build with older versions of Python by replacing utf8 message to ascii message in the helper script" - patch_type: "conan" - - patch_file: "patches/247.13/0001-Remove-dependency-from-coreutils.patch" - patch_description: "allow to build in environments without 'realpath --relative-to' by replacing it with conan-specific build variable" - patch_type: "conan" - "247.13": - - patch_file: "patches/247.13/0001-Remove-dependency-from-coreutils.patch" - patch_description: "allow to build in environments without 'realpath --relative-to' by replacing it with conan-specific build variable" - patch_type: "conan" - "246.16": - - patch_file: "patches/246.16/0001-Drop-bundled-copy-of-linux-if_arp.h.patch" - patch_description: "fix build error with Linux headers >= 5.14 by removing a bundled copy of it" - patch_type: "portability" - patch_source: "https://github.com/systemd/systemd-stable/commit/06dea04b38ce506c1436cd4fef9bf9919a34f441" - - patch_file: "patches/246.16/0002-meson.build-change-operator-combining-bools-from-to-.patch" - patch_description: "allow to build with meson >= 0.60.0 by fixing syntax error" - patch_type: "bugfix" - patch_source: "https://github.com/systemd/systemd-stable/commit/3d0666d9091dd097022f02fae79890b5746285c1" - - patch_file: "patches/246.16/0003-Remove-dependency-from-coreutils.patch" - patch_description: "allow to build in environments without 'realpath --relative-to' by replacing it with conan-specific build variable" - patch_type: "conan" diff --git a/recipes/libsystemd/all/conanfile.py b/recipes/libsystemd/all/conanfile.py index 047032ef9a2e3..2f7cbdaadba28 100644 --- a/recipes/libsystemd/all/conanfile.py +++ b/recipes/libsystemd/all/conanfile.py @@ -11,7 +11,7 @@ from conan.tools.meson import Meson, MesonToolchain from conan.tools.scm import Version -required_conan_version = ">=1.60.0" +required_conan_version = ">=1.64.0" class LibsystemdConan(ConanFile): @@ -52,13 +52,19 @@ def configure(self): def layout(self): basic_layout(self, src_folder="src") + @property + def _compilers_minimum_version(self): + return { + "gcc": "7", # gcc 5 is failing + "clang": "10" + } + def requirements(self): self.requires("libcap/2.69") self.requires("libmount/2.39.2") - if Version(self.version) >= "251.18": - self.requires("libxcrypt/4.4.36") + self.requires("libxcrypt/4.4.36") if self.options.with_selinux: - self.requires("libselinux/3.5") + self.requires("libselinux/3.6") if self.options.with_lz4: self.requires("lz4/1.9.4") if self.options.with_xz: @@ -69,9 +75,14 @@ def requirements(self): def validate(self): if self.settings.os != "Linux": raise ConanInvalidConfiguration("Only Linux supported") + minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) + if Version(self.version) >= "255.0" and minimum_version and Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration( + f"{self.ref} requires {str(self.settings.compiler)} >= {minimum_version}." + ) def build_requirements(self): - self.tool_requires("meson/1.3.0") + self.tool_requires("meson/1.4.0") self.tool_requires("m4/1.4.19") self.tool_requires("gperf/3.1") if not self.conf.get("tools.gnu:pkg_config", check_type=str): @@ -134,14 +145,10 @@ def generate(self): "libiptc", "elfutils", "repart", "homed", "importd", "acl", "dns-over-tls", "log-trace"] - if Version(self.version) >= "247.1": - unrelated.append("oomd") - if Version(self.version) >= "248.1": - unrelated.extend(["sysext", "nscd"]) - if Version(self.version) >= "251.1": - unrelated.append("link-boot-shared") - if Version(self.version) >= "252.1": - unrelated.append("link-journalctl-shared") + unrelated.append("oomd") + unrelated.extend(["sysext", "nscd"]) + unrelated.append("link-boot-shared") + unrelated.append("link-journalctl-shared") if Version(self.version) < "254.7": unrelated.extend(["gnu-efi", "valgrind"]) else: @@ -150,9 +157,10 @@ def generate(self): for opt in unrelated: tc.project_options[opt] = "false" - # 'rootprefix' is unused during libsystemd packaging but systemd > v247 - # build files require 'prefix' to be a subdirectory of 'rootprefix'. - tc.project_options["rootprefix"] = self.package_folder + if Version(self.version) < "255": + # 'rootprefix' is unused during libsystemd packaging but systemd > v247 + # build files require 'prefix' to be a subdirectory of 'rootprefix'. + tc.project_options["rootprefix"] = "/" # Since, Conan 1.64 # There are a few places in libsystemd where pkgconfig dependencies are # not used in compile time and only used in link time. And because of diff --git a/recipes/libsystemd/all/patches/246.16/0001-Drop-bundled-copy-of-linux-if_arp.h.patch b/recipes/libsystemd/all/patches/246.16/0001-Drop-bundled-copy-of-linux-if_arp.h.patch deleted file mode 100644 index cb77bf0883880..0000000000000 --- a/recipes/libsystemd/all/patches/246.16/0001-Drop-bundled-copy-of-linux-if_arp.h.patch +++ /dev/null @@ -1,223 +0,0 @@ -From 00ff923c28498dad77c1705c3699a21bcc941329 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= -Date: Wed, 15 Sep 2021 16:33:05 +0200 -Subject: [PATCH 1/2] Drop bundled copy of linux/if_arp.h -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -As far as I can see, we use this to get a list of ARPHRD_* defines (used in -particular for Type= in .link files). If we drop our copy, and build against -old kernel headers, the user will have a shorter list of types available. This -seems OK, and I don't think it's worth carrying our own version of this file -just to have newest possible entries. - -7c5b9952c4f6e2b72f90edbe439982528b7cf223 recently updated this file, but we'd -have to update it every time the kernel adds new entries. But if we look at -the failure carefully: - -src/basic/arphrd-from-name.gperf:65:16: error: ‘ARPHRD_MCTP’ undeclared (first use in this function); did you mean ‘ARPHRD_FCPP’? - 65 | MCTP, ARPHRD_MCTP - | ^~ - | ARPHRD_FCPP - -we see that the list we were generating was from the system headers, so it was -only as good as the system headers anyway, without the newer entries in our -bundled copy, if there were any. So let's make things simpler by always using -system headers. - -And if somebody wants to fix things so that we always have the newest list, -then we should just generate and store the converted list, not the full header. - -(cherry picked from commit e7f46ee3ae1cc66a94b293957721d68dc09d7449) ---- - src/basic/linux/if_arp.h | 164 --------------------------------------- - src/basic/meson.build | 1 - - 2 files changed, 165 deletions(-) - delete mode 100644 src/basic/linux/if_arp.h - -diff --git a/src/basic/linux/if_arp.h b/src/basic/linux/if_arp.h -deleted file mode 100644 -index c3cc5a9e5e..0000000000 ---- a/src/basic/linux/if_arp.h -+++ /dev/null -@@ -1,164 +0,0 @@ --/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */ --/* -- * INET An implementation of the TCP/IP protocol suite for the LINUX -- * operating system. INET is implemented using the BSD Socket -- * interface as the means of communication with the user level. -- * -- * Global definitions for the ARP (RFC 826) protocol. -- * -- * Version: @(#)if_arp.h 1.0.1 04/16/93 -- * -- * Authors: Original taken from Berkeley UNIX 4.3, (c) UCB 1986-1988 -- * Portions taken from the KA9Q/NOS (v2.00m PA0GRI) source. -- * Ross Biro -- * Fred N. van Kempen, -- * Florian La Roche, -- * Jonathan Layes -- * Arnaldo Carvalho de Melo ARPHRD_HWX25 -- * -- * This program is free software; you can redistribute it and/or -- * modify it under the terms of the GNU General Public License -- * as published by the Free Software Foundation; either version -- * 2 of the License, or (at your option) any later version. -- */ --#ifndef _UAPI_LINUX_IF_ARP_H --#define _UAPI_LINUX_IF_ARP_H -- --#include -- --/* ARP protocol HARDWARE identifiers. */ --#define ARPHRD_NETROM 0 /* from KA9Q: NET/ROM pseudo */ --#define ARPHRD_ETHER 1 /* Ethernet 10Mbps */ --#define ARPHRD_EETHER 2 /* Experimental Ethernet */ --#define ARPHRD_AX25 3 /* AX.25 Level 2 */ --#define ARPHRD_PRONET 4 /* PROnet token ring */ --#define ARPHRD_CHAOS 5 /* Chaosnet */ --#define ARPHRD_IEEE802 6 /* IEEE 802.2 Ethernet/TR/TB */ --#define ARPHRD_ARCNET 7 /* ARCnet */ --#define ARPHRD_APPLETLK 8 /* APPLEtalk */ --#define ARPHRD_DLCI 15 /* Frame Relay DLCI */ --#define ARPHRD_ATM 19 /* ATM */ --#define ARPHRD_METRICOM 23 /* Metricom STRIP (new IANA id) */ --#define ARPHRD_IEEE1394 24 /* IEEE 1394 IPv4 - RFC 2734 */ --#define ARPHRD_EUI64 27 /* EUI-64 */ --#define ARPHRD_INFINIBAND 32 /* InfiniBand */ -- --/* Dummy types for non ARP hardware */ --#define ARPHRD_SLIP 256 --#define ARPHRD_CSLIP 257 --#define ARPHRD_SLIP6 258 --#define ARPHRD_CSLIP6 259 --#define ARPHRD_RSRVD 260 /* Notional KISS type */ --#define ARPHRD_ADAPT 264 --#define ARPHRD_ROSE 270 --#define ARPHRD_X25 271 /* CCITT X.25 */ --#define ARPHRD_HWX25 272 /* Boards with X.25 in firmware */ --#define ARPHRD_CAN 280 /* Controller Area Network */ --#define ARPHRD_PPP 512 --#define ARPHRD_CISCO 513 /* Cisco HDLC */ --#define ARPHRD_HDLC ARPHRD_CISCO --#define ARPHRD_LAPB 516 /* LAPB */ --#define ARPHRD_DDCMP 517 /* Digital's DDCMP protocol */ --#define ARPHRD_RAWHDLC 518 /* Raw HDLC */ --#define ARPHRD_RAWIP 519 /* Raw IP */ -- --#define ARPHRD_TUNNEL 768 /* IPIP tunnel */ --#define ARPHRD_TUNNEL6 769 /* IP6IP6 tunnel */ --#define ARPHRD_FRAD 770 /* Frame Relay Access Device */ --#define ARPHRD_SKIP 771 /* SKIP vif */ --#define ARPHRD_LOOPBACK 772 /* Loopback device */ --#define ARPHRD_LOCALTLK 773 /* Localtalk device */ --#define ARPHRD_FDDI 774 /* Fiber Distributed Data Interface */ --#define ARPHRD_BIF 775 /* AP1000 BIF */ --#define ARPHRD_SIT 776 /* sit0 device - IPv6-in-IPv4 */ --#define ARPHRD_IPDDP 777 /* IP over DDP tunneller */ --#define ARPHRD_IPGRE 778 /* GRE over IP */ --#define ARPHRD_PIMREG 779 /* PIMSM register interface */ --#define ARPHRD_HIPPI 780 /* High Performance Parallel Interface */ --#define ARPHRD_ASH 781 /* Nexus 64Mbps Ash */ --#define ARPHRD_ECONET 782 /* Acorn Econet */ --#define ARPHRD_IRDA 783 /* Linux-IrDA */ --/* ARP works differently on different FC media .. so */ --#define ARPHRD_FCPP 784 /* Point to point fibrechannel */ --#define ARPHRD_FCAL 785 /* Fibrechannel arbitrated loop */ --#define ARPHRD_FCPL 786 /* Fibrechannel public loop */ --#define ARPHRD_FCFABRIC 787 /* Fibrechannel fabric */ -- /* 787->799 reserved for fibrechannel media types */ --#define ARPHRD_IEEE802_TR 800 /* Magic type ident for TR */ --#define ARPHRD_IEEE80211 801 /* IEEE 802.11 */ --#define ARPHRD_IEEE80211_PRISM 802 /* IEEE 802.11 + Prism2 header */ --#define ARPHRD_IEEE80211_RADIOTAP 803 /* IEEE 802.11 + radiotap header */ --#define ARPHRD_IEEE802154 804 --#define ARPHRD_IEEE802154_MONITOR 805 /* IEEE 802.15.4 network monitor */ -- --#define ARPHRD_PHONET 820 /* PhoNet media type */ --#define ARPHRD_PHONET_PIPE 821 /* PhoNet pipe header */ --#define ARPHRD_CAIF 822 /* CAIF media type */ --#define ARPHRD_IP6GRE 823 /* GRE over IPv6 */ --#define ARPHRD_NETLINK 824 /* Netlink header */ --#define ARPHRD_6LOWPAN 825 /* IPv6 over LoWPAN */ --#define ARPHRD_VSOCKMON 826 /* Vsock monitor header */ -- --#define ARPHRD_VOID 0xFFFF /* Void type, nothing is known */ --#define ARPHRD_NONE 0xFFFE /* zero header length */ -- --/* ARP protocol opcodes. */ --#define ARPOP_REQUEST 1 /* ARP request */ --#define ARPOP_REPLY 2 /* ARP reply */ --#define ARPOP_RREQUEST 3 /* RARP request */ --#define ARPOP_RREPLY 4 /* RARP reply */ --#define ARPOP_InREQUEST 8 /* InARP request */ --#define ARPOP_InREPLY 9 /* InARP reply */ --#define ARPOP_NAK 10 /* (ATM)ARP NAK */ -- -- --/* ARP ioctl request. */ --struct arpreq { -- struct sockaddr arp_pa; /* protocol address */ -- struct sockaddr arp_ha; /* hardware address */ -- int arp_flags; /* flags */ -- struct sockaddr arp_netmask; /* netmask (only for proxy arps) */ -- char arp_dev[IFNAMSIZ]; --}; -- --struct arpreq_old { -- struct sockaddr arp_pa; /* protocol address */ -- struct sockaddr arp_ha; /* hardware address */ -- int arp_flags; /* flags */ -- struct sockaddr arp_netmask; /* netmask (only for proxy arps) */ --}; -- --/* ARP Flag values. */ --#define ATF_COM 0x02 /* completed entry (ha valid) */ --#define ATF_PERM 0x04 /* permanent entry */ --#define ATF_PUBL 0x08 /* publish entry */ --#define ATF_USETRAILERS 0x10 /* has requested trailers */ --#define ATF_NETMASK 0x20 /* want to use a netmask (only -- for proxy entries) */ --#define ATF_DONTPUB 0x40 /* don't answer this addresses */ -- --/* -- * This structure defines an ethernet arp header. -- */ -- --struct arphdr { -- __be16 ar_hrd; /* format of hardware address */ -- __be16 ar_pro; /* format of protocol address */ -- unsigned char ar_hln; /* length of hardware address */ -- unsigned char ar_pln; /* length of protocol address */ -- __be16 ar_op; /* ARP opcode (command) */ -- --#if 0 -- /* -- * Ethernet looks like this : This bit is variable sized however... -- */ -- unsigned char ar_sha[ETH_ALEN]; /* sender hardware address */ -- unsigned char ar_sip[4]; /* sender IP address */ -- unsigned char ar_tha[ETH_ALEN]; /* target hardware address */ -- unsigned char ar_tip[4]; /* target IP address */ --#endif -- --}; -- -- --#endif /* _UAPI_LINUX_IF_ARP_H */ -diff --git a/src/basic/meson.build b/src/basic/meson.build -index ae01beaeaa..feb4e75b74 100644 ---- a/src/basic/meson.build -+++ b/src/basic/meson.build -@@ -95,7 +95,6 @@ basic_sources = files(''' - linux/fou.h - linux/if.h - linux/if_addr.h -- linux/if_arp.h - linux/if_bonding.h - linux/if_bridge.h - linux/if_ether.h --- -2.37.2 - diff --git a/recipes/libsystemd/all/patches/246.16/0002-meson.build-change-operator-combining-bools-from-to-.patch b/recipes/libsystemd/all/patches/246.16/0002-meson.build-change-operator-combining-bools-from-to-.patch deleted file mode 100644 index 8ad824a0820d5..0000000000000 --- a/recipes/libsystemd/all/patches/246.16/0002-meson.build-change-operator-combining-bools-from-to-.patch +++ /dev/null @@ -1,34 +0,0 @@ -From eda62b3f67ce3ae5d1ddf281034a66bcf6c74933 Mon Sep 17 00:00:00 2001 -From: Dan Streetman -Date: Fri, 3 Sep 2021 12:43:33 -0400 -Subject: [PATCH 2/2] meson.build: change operator combining bools from + to - and - -upstream meson stopped allowing combining boolean with the plus -operator, and now requires using the logical and operator - -reference: -https://github.com/mesonbuild/meson/commit/43302d3296baff6aeaf8e03f5d701b0402e37a6c - -Fixes: #20632 -(cherry picked from commit c29537f39e4f413a6cbfe9669fa121bdd6d8b36f) ---- - meson.build | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/meson.build b/meson.build -index 77da8a4504..3754e89c24 100644 ---- a/meson.build -+++ b/meson.build -@@ -40,7 +40,7 @@ conf.set_quoted('RELATIVE_SOURCE_PATH', relative_source_path) - - want_ossfuzz = get_option('oss-fuzz') - want_libfuzzer = get_option('llvm-fuzz') --if want_ossfuzz + want_libfuzzer > 1 -+if want_ossfuzz and want_libfuzzer - error('only one of oss-fuzz or llvm-fuzz can be specified') - endif - --- -2.37.2 - diff --git a/recipes/libsystemd/all/patches/246.16/0003-Remove-dependency-from-coreutils.patch b/recipes/libsystemd/all/patches/246.16/0003-Remove-dependency-from-coreutils.patch deleted file mode 100644 index 9aa5388102343..0000000000000 --- a/recipes/libsystemd/all/patches/246.16/0003-Remove-dependency-from-coreutils.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 39d419d89e069213ec3bce9390df26de68f41135 Mon Sep 17 00:00:00 2001 -From: Sergey Bobrenok -Date: Thu, 18 Aug 2022 21:51:58 +0300 -Subject: [PATCH] Remove dependency from coreutils - -In a conan recipe we already know the relative path to the source directory. We -can simply replace '@CONAN_SRC_REL_PATH@' with the actual path there. ---- - meson.build | 4 +--- - 1 file changed, 1 insertion(+), 3 deletions(-) - -diff --git a/meson.build b/meson.build -index 77da8a4504..08560292a1 100644 ---- a/meson.build -+++ b/meson.build -@@ -33,9 +33,7 @@ substs.set('PROJECT_VERSION', meson.project_version(), - # the wrong result when systemd is being built as a meson subproject - project_source_root = meson.current_source_dir() - project_build_root = meson.current_build_dir() --relative_source_path = run_command('realpath', -- '--relative-to=@0@'.format(project_build_root), -- project_source_root).stdout().strip() -+relative_source_path = @CONAN_SRC_REL_PATH@ - conf.set_quoted('RELATIVE_SOURCE_PATH', relative_source_path) - - want_ossfuzz = get_option('oss-fuzz') --- -2.37.2 - diff --git a/recipes/libsystemd/all/patches/247.13/0001-Remove-dependency-from-coreutils.patch b/recipes/libsystemd/all/patches/247.13/0001-Remove-dependency-from-coreutils.patch deleted file mode 100644 index 4114c124814c8..0000000000000 --- a/recipes/libsystemd/all/patches/247.13/0001-Remove-dependency-from-coreutils.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 2dbb0fe320ca75e7e2be6eba8b5fe6fe07a1ece1 Mon Sep 17 00:00:00 2001 -From: Sergey Bobrenok -Date: Thu, 18 Aug 2022 21:51:58 +0300 -Subject: [PATCH] Remove dependency from coreutils - -In a conan recipe we already know the relative path to the source directory. We -can simply replace '@CONAN_SRC_REL_PATH@' with the actual path there. ---- - meson.build | 4 +--- - 1 file changed, 1 insertion(+), 3 deletions(-) - -diff --git a/meson.build b/meson.build -index 177cd4fb66..869c2352f6 100644 ---- a/meson.build -+++ b/meson.build -@@ -33,9 +33,7 @@ substs.set('PROJECT_VERSION', meson.project_version(), - # the wrong result when systemd is being built as a meson subproject - project_source_root = meson.current_source_dir() - project_build_root = meson.current_build_dir() --relative_source_path = run_command('realpath', -- '--relative-to=@0@'.format(project_build_root), -- project_source_root).stdout().strip() -+relative_source_path = @CONAN_SRC_REL_PATH@ - conf.set_quoted('RELATIVE_SOURCE_PATH', relative_source_path) - - conf.set('BUILD_MODE', 'BUILD_MODE_' + get_option('mode').to_upper(), - -base-commit: bb47600aeb38c68c857fbf0ee5f66c3144dd81ce --- -2.40.1 - diff --git a/recipes/libsystemd/all/patches/248.12/0001-missing_syscalls.py-Replace-unicode-with-ascii.patch b/recipes/libsystemd/all/patches/248.12/0001-missing_syscalls.py-Replace-unicode-with-ascii.patch deleted file mode 100644 index b040e39278226..0000000000000 --- a/recipes/libsystemd/all/patches/248.12/0001-missing_syscalls.py-Replace-unicode-with-ascii.patch +++ /dev/null @@ -1,32 +0,0 @@ -From e8ff65fb110f1a1118ab709fe41e1c3dff0b3c40 Mon Sep 17 00:00:00 2001 -From: Sergey Bobrenok -Date: Wed, 17 Aug 2022 22:31:13 +0300 -Subject: [PATCH] missing_syscalls.py: Replace unicode with ascii - -In some system configurations 'find_program('missing_syscalls.py')' may -fail with error: - 'ascii' codec can't decode byte 0xe2 in position 615: ordinal not in range(128) - Unusable script 'src/basic/missing_syscalls.py' - Program missing_syscalls.py found: NO ---- - src/basic/missing_syscalls.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/basic/missing_syscalls.py b/src/basic/missing_syscalls.py -index 1bfa31ba37..cc353fe723 100644 ---- a/src/basic/missing_syscalls.py -+++ b/src/basic/missing_syscalls.py -@@ -32,7 +32,7 @@ def dictify(f): - - @dictify - def parse_syscall_table(filename): -- print(f'Reading {filename}…') -+ print(f'Reading {filename}...') - for line in open(filename): - items = line.split() - if len(items) >= 2: - -base-commit: 786df410b1cb3a2294c9a5d118c958525e7439e6 --- -2.40.1 - diff --git a/recipes/libsystemd/all/patches/249.16/0001-Remove-dependency-from-coreutils.patch b/recipes/libsystemd/all/patches/249.16/0001-Remove-dependency-from-coreutils.patch deleted file mode 100644 index 1df9689ea3a32..0000000000000 --- a/recipes/libsystemd/all/patches/249.16/0001-Remove-dependency-from-coreutils.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 08ad698a1b3f7c1caf9dac54c68c2878c664ceec Mon Sep 17 00:00:00 2001 -From: Sergey Bobrenok -Date: Thu, 18 Aug 2022 21:51:58 +0300 -Subject: [PATCH] Remove dependency from coreutils - -In a conan recipe we already know the relative path to the source directory. We -can simply replace '@CONAN_SRC_REL_PATH@' with the actual path there. ---- - meson.build | 4 +--- - 1 file changed, 1 insertion(+), 3 deletions(-) - -diff --git a/meson.build b/meson.build -index ece21fbd10..aefc82513e 100644 ---- a/meson.build -+++ b/meson.build -@@ -25,9 +25,7 @@ conf.set('PROJECT_VERSION', meson.project_version(), - # the wrong result when systemd is being built as a meson subproject - project_source_root = meson.current_source_dir() - project_build_root = meson.current_build_dir() --relative_source_path = run_command('realpath', -- '--relative-to=@0@'.format(project_build_root), -- project_source_root).stdout().strip() -+relative_source_path = @CONAN_SRC_REL_PATH@ - conf.set_quoted('RELATIVE_SOURCE_PATH', relative_source_path) - - conf.set10('BUILD_MODE_DEVELOPER', get_option('mode') == 'developer', - -base-commit: 358552f75f0ef03af2d6d0ba0f5423f17eab7f84 --- -2.40.1 - diff --git a/recipes/libsystemd/config.yml b/recipes/libsystemd/config.yml index 84d8505540435..f9ba7f3698786 100644 --- a/recipes/libsystemd/config.yml +++ b/recipes/libsystemd/config.yml @@ -1,4 +1,8 @@ versions: + "255.10": + folder: all + "255.7": + folder: all "255.2": folder: all "255": @@ -9,15 +13,3 @@ versions: folder: all "253.6": folder: all - "252.12": - folder: all - "251.18": - folder: all - "249.16": - folder: all - "248.12": - folder: all - "247.13": - folder: all - "246.16": - folder: all diff --git a/recipes/libtiff/all/conandata.yml b/recipes/libtiff/all/conandata.yml index e73e0da6320f6..72d0f547b3861 100644 --- a/recipes/libtiff/all/conandata.yml +++ b/recipes/libtiff/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "4.7.0": + url: "https://download.osgeo.org/libtiff/tiff-4.7.0.tar.xz" + sha256: "273a0a73b1f0bed640afee4a5df0337357ced5b53d3d5d1c405b936501f71017" "4.6.0": url: "https://download.osgeo.org/libtiff/tiff-4.6.0.tar.gz" sha256: "88b3979e6d5c7e32b50d7ec72fb15af724f6ab2cbf7e10880c360a77e4b5d99a" @@ -15,6 +18,10 @@ sources: url: "https://download.osgeo.org/libtiff/tiff-4.3.0.tar.gz" sha256: "0e46e5acb087ce7d1ac53cf4f56a09b221537fc86dfc5daaad1c2e89e1b37ac8" patches: + "4.7.0": + - patch_file: "patches/4.5.1-0001-cmake-dependencies.patch" + patch_description: "CMake: robust handling of dependencies" + patch_type: "conan" "4.6.0": - patch_file: "patches/4.5.1-0001-cmake-dependencies.patch" patch_description: "CMake: robust handling of dependencies" diff --git a/recipes/libtiff/config.yml b/recipes/libtiff/config.yml index d9523166c1893..3209eca1a3fa1 100644 --- a/recipes/libtiff/config.yml +++ b/recipes/libtiff/config.yml @@ -1,4 +1,6 @@ versions: + "4.7.0": + folder: all "4.6.0": folder: all "4.5.1": diff --git a/recipes/libtorrent/all/conandata.yml b/recipes/libtorrent/all/conandata.yml index c7cf929c7aa2c..f3e1e6a5c8ef1 100644 --- a/recipes/libtorrent/all/conandata.yml +++ b/recipes/libtorrent/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.0.10": + url: "https://github.com/arvidn/libtorrent/releases/download/v2.0.10/libtorrent-rasterbar-2.0.10.tar.gz" + sha256: "fc935b8c1daca5c0a4d304bff59e64e532be16bb877c012aea4bda73d9ca885d" "2.0.9": url: "https://github.com/arvidn/libtorrent/releases/download/v2.0.9/libtorrent-rasterbar-2.0.9.tar.gz" sha256: "90cd92b6061c5b664840c3d5e151d43fedb24f5b2b24e14425ffbb884ef1798e" diff --git a/recipes/libtorrent/all/conanfile.py b/recipes/libtorrent/all/conanfile.py index f21e595615c63..35190c929ad49 100644 --- a/recipes/libtorrent/all/conanfile.py +++ b/recipes/libtorrent/all/conanfile.py @@ -187,9 +187,9 @@ def package_info(self): self.cpp_info.components["libtorrent-rasterbar"].requires.append("libiconv::libiconv") if self.settings.os in ["Linux", "FreeBSD"]: - self.cpp_info.components["libtorrent-rasterbar"].system_libs = ["dl", "pthread"] + self.cpp_info.components["libtorrent-rasterbar"].system_libs = ["dl", "pthread", "m"] elif self.settings.os == "Windows": - self.cpp_info.components["libtorrent-rasterbar"].system_libs = ["wsock32", "ws2_32", "iphlpapi", "dbghelp"] + self.cpp_info.components["libtorrent-rasterbar"].system_libs = ["wsock32", "ws2_32", "iphlpapi", "dbghelp", "mswsock"] elif self.settings.os == "Macos": self.cpp_info.components["libtorrent-rasterbar"].frameworks = ["CoreFoundation", "SystemConfiguration"] diff --git a/recipes/libtorrent/config.yml b/recipes/libtorrent/config.yml index dd7ddb590b4ae..debcafe432f02 100644 --- a/recipes/libtorrent/config.yml +++ b/recipes/libtorrent/config.yml @@ -1,4 +1,6 @@ versions: + "2.0.10": + folder: "all" "2.0.9": folder: "all" "2.0.8": diff --git a/recipes/libunwind/all/conandata.yml b/recipes/libunwind/all/conandata.yml index 642e7bcf9b975..efd030d0bf16c 100644 --- a/recipes/libunwind/all/conandata.yml +++ b/recipes/libunwind/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.8.1": + url: "https://github.com/libunwind/libunwind/releases/download/v1.8.1/libunwind-1.8.1.tar.gz" + sha256: "ddf0e32dd5fafe5283198d37e4bf9decf7ba1770b6e7e006c33e6df79e6a6157" "1.8.0": url: "https://github.com/libunwind/libunwind/releases/download/v1.8.0/libunwind-1.8.0.tar.gz" sha256: "b6b3df40a0970c8f2865fb39aa2af7b5d6f12ad6c5774e266ccca4d6b8b72268" diff --git a/recipes/libunwind/config.yml b/recipes/libunwind/config.yml index 272599e8759c3..2132c142d0b3f 100644 --- a/recipes/libunwind/config.yml +++ b/recipes/libunwind/config.yml @@ -1,4 +1,6 @@ versions: + "1.8.1": + folder: all "1.8.0": folder: all "1.7.2": diff --git a/recipes/liburing/all/conandata.yml b/recipes/liburing/all/conandata.yml index 48e308169639a..903fcbb9911ba 100644 --- a/recipes/liburing/all/conandata.yml +++ b/recipes/liburing/all/conandata.yml @@ -1,4 +1,13 @@ sources: + "2.8": + url: "https://github.com/axboe/liburing/archive/liburing-2.8.tar.gz" + sha256: "3ed7891d1b2bbe743ef3fb6d0a4970e630aa02d7c7bd3b0212791fb7be815984" + "2.7": + url: "https://github.com/axboe/liburing/archive/liburing-2.7.tar.gz" + sha256: "56202ad443c50e684dde3692819be3b91bbe003e1c14bf5abfa11973669978c1" + "2.6": + url: "https://github.com/axboe/liburing/archive/liburing-2.6.tar.gz" + sha256: "682f06733e6db6402c1f904cbbe12b94942a49effc872c9e01db3d7b180917cc" "2.5": url: "https://github.com/axboe/liburing/archive/liburing-2.5.tar.gz" sha256: "456f5f882165630f0dc7b75e8fd53bd01a955d5d4720729b4323097e6e9f2a98" @@ -20,34 +29,45 @@ sources: "0.7": url: "https://github.com/axboe/liburing/archive/liburing-0.7.tar.gz" sha256: "8e2842cfe947f3a443af301bdd6d034455536c38a455c7a700d0c1ad165a7543" - patches: - "0.7": - - patch_file: "patches/liburing-0.7-disable_samples_and_tests.patch" + "2.8": + - patch_file: "patches/liburing-2.4-disable_samples_and_tests.patch" patch_description: "Disable tests and samples as it might not work while cross-compiling" patch_type: "conan" - "2.0": - - patch_file: "patches/liburing-2.0-disable_samples_and_tests.patch" + "2.7": + - patch_file: "patches/liburing-2.4-disable_samples_and_tests.patch" patch_description: "Disable tests and samples as it might not work while cross-compiling" patch_type: "conan" - "2.1": - - patch_file: "patches/0001-liburing-2.1-memfd-create.patch" - - patch_file: "patches/liburing-2.0-disable_samples_and_tests.patch" + "2.6": + - patch_file: "patches/liburing-2.4-disable_samples_and_tests.patch" patch_description: "Disable tests and samples as it might not work while cross-compiling" patch_type: "conan" - "2.2": - - patch_file: "patches/liburing-2.2-disable_samples_and_tests.patch" + "2.5": + - patch_file: "patches/liburing-2.4-disable_samples_and_tests.patch" + patch_description: "Disable tests and samples as it might not work while cross-compiling" + patch_type: "conan" + "2.4": + - patch_file: "patches/liburing-2.4-disable_samples_and_tests.patch" patch_description: "Disable tests and samples as it might not work while cross-compiling" patch_type: "conan" "2.3": - patch_file: "patches/liburing-2.2-disable_samples_and_tests.patch" patch_description: "Disable tests and samples as it might not work while cross-compiling" patch_type: "conan" - "2.4": - - patch_file: "patches/liburing-2.4-disable_samples_and_tests.patch" + "2.2": + - patch_file: "patches/liburing-2.2-disable_samples_and_tests.patch" patch_description: "Disable tests and samples as it might not work while cross-compiling" patch_type: "conan" - "2.5": - - patch_file: "patches/liburing-2.4-disable_samples_and_tests.patch" + "2.1": + - patch_file: "patches/0001-liburing-2.1-memfd-create.patch" + - patch_file: "patches/liburing-2.0-disable_samples_and_tests.patch" + patch_description: "Disable tests and samples as it might not work while cross-compiling" + patch_type: "conan" + "2.0": + - patch_file: "patches/liburing-2.0-disable_samples_and_tests.patch" + patch_description: "Disable tests and samples as it might not work while cross-compiling" + patch_type: "conan" + "0.7": + - patch_file: "patches/liburing-0.7-disable_samples_and_tests.patch" patch_description: "Disable tests and samples as it might not work while cross-compiling" patch_type: "conan" diff --git a/recipes/liburing/all/conanfile.py b/recipes/liburing/all/conanfile.py index c90a304cde4c7..d9633472c289d 100644 --- a/recipes/liburing/all/conanfile.py +++ b/recipes/liburing/all/conanfile.py @@ -11,14 +11,14 @@ class Liburing(ConanFile): name = "liburing" - license = "GPL-2.0-or-later" - homepage = "https://github.com/axboe/liburing" - url = "https://github.com/conan-io/conan-center-index" description = ("helpers to setup and teardown io_uring instances, and also a simplified interface for " "applications that don't need (or want) to deal with the full kernel side implementation.") + license = ("GPL-2.0-or-later", "MIT", "LGPL-2.1-or-later") + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/axboe/liburing" topics = ("asynchronous-io", "async", "kernel") - settings = "os", "arch", "compiler", "build_type" + package_type = "library" options = { "fPIC": [True, False], "shared": [True, False], @@ -53,8 +53,7 @@ def validate(self): # FIXME: use kernel version of build/host machine. # kernel version should be encoded in profile if self.settings.os != "Linux": - raise ConanInvalidConfiguration( - "liburing is supported only on linux") + raise ConanInvalidConfiguration(f"{self.ref} is supported only on linux") def layout(self): basic_layout(self, src_folder='src') diff --git a/recipes/liburing/all/patches/liburing-2.4-disable_samples_and_tests.patch b/recipes/liburing/all/patches/liburing-2.4-disable_samples_and_tests.patch index f3b6165682fd2..beb6f175e2861 100644 --- a/recipes/liburing/all/patches/liburing-2.4-disable_samples_and_tests.patch +++ b/recipes/liburing/all/patches/liburing-2.4-disable_samples_and_tests.patch @@ -2,12 +2,11 @@ diff --git a/Makefile b/Makefile index 73d021c..74aa8d7 100644 --- a/Makefile +++ b/Makefile -@@ -8,8 +8,6 @@ default: all +@@ -8,6 +8,4 @@ default: all all: @$(MAKE) -C src - @$(MAKE) -C test - @$(MAKE) -C examples - .PHONY: all install default clean test - .PHONY: FORCE cscope + \ No newline at end of file diff --git a/recipes/liburing/config.yml b/recipes/liburing/config.yml index d47042c99f1bb..a350e9cf0e598 100644 --- a/recipes/liburing/config.yml +++ b/recipes/liburing/config.yml @@ -1,4 +1,10 @@ versions: + "2.8": + folder: all + "2.7": + folder: all + "2.6": + folder: all "2.5": folder: all "2.4": diff --git a/recipes/libuv/all/conandata.yml b/recipes/libuv/all/conandata.yml index 578b3b599b79b..d0ee02e78c23d 100644 --- a/recipes/libuv/all/conandata.yml +++ b/recipes/libuv/all/conandata.yml @@ -1,4 +1,13 @@ sources: + "1.49.2": + url: "https://github.com/libuv/libuv/archive/v1.49.2.tar.gz" + sha256: "388ffcf3370d4cf7c4b3a3205504eea06c4be5f9e80d2ab32d19f8235accc1cf" + "1.49.1": + url: "https://github.com/libuv/libuv/archive/v1.49.1.tar.gz" + sha256: "94312ede44c6cae544ae316557e2651aea65efce5da06f8d44685db08392ec5d" + "1.49.0": + url: "https://github.com/libuv/libuv/archive/v1.49.0.tar.gz" + sha256: "a10656a0865e2cff7a1b523fa47d0f5a9c65be963157301f814d1cc5dbd4dc1d" "1.48.0": url: "https://github.com/libuv/libuv/archive/v1.48.0.tar.gz" sha256: "8c253adb0f800926a6cbd1c6576abae0bc8eb86a4f891049b72f9e5b7dc58f33" @@ -14,22 +23,25 @@ sources: "1.44.2": url: "https://github.com/libuv/libuv/archive/v1.44.2.tar.gz" sha256: "e6e2ba8b4c349a4182a33370bb9be5e23c51b32efb9b9e209d0e8556b73a48da" - "1.44.1": - url: "https://github.com/libuv/libuv/archive/v1.44.1.tar.gz" - sha256: "e91614e6dc2dd0bfdd140ceace49438882206b7a6fb00b8750914e67a9ed6d6b" "1.43.0": url: "https://github.com/libuv/libuv/archive/v1.43.0.tar.gz" sha256: "9e27825a55279de69a7c43e42d509fd1337c9bece2547c761e91a1592e91cc4d" "1.42.0": url: "https://github.com/libuv/libuv/archive/v1.42.0.tar.gz" sha256: "371e5419708f6aaeb8656671f89400b92a9bba6443369af1bb70bcd6e4b3c764" - "1.41.1": - url: "https://github.com/libuv/libuv/archive/v1.41.1.tar.gz" - sha256: "62c29d1d76b0478dc8aaed0ed1f874324f6cd2d6ff4cb59a44026c09e818cd53" - "1.41.0": - url: "https://github.com/libuv/libuv/archive/v1.41.0.zip" - sha256: "cb89a8b9f686c5ccf7ed09a9e0ece151a73ebebc17af3813159c335b02181794" patches: + "1.49.2": + - patch_file: "patches/1.49.0/fix-cmake.patch" + patch_description: "separate shared and static library build" + patch_type: "conan" + "1.49.1": + - patch_file: "patches/1.49.0/fix-cmake.patch" + patch_description: "separate shared and static library build" + patch_type: "conan" + "1.49.0": + - patch_file: "patches/1.49.0/fix-cmake.patch" + patch_description: "separate shared and static library build" + patch_type: "conan" "1.48.0": - patch_file: "patches/1.48.0/fix-cmake.patch" patch_description: "separate shared and static library build" @@ -50,10 +62,6 @@ patches: - patch_file: "patches/1.44.2/fix-cmake.patch" patch_description: "separate shared and static library build" patch_type: "conan" - "1.44.1": - - patch_file: "patches/1.44.1/fix-cmake.patch" - patch_description: "separate shared and static library build" - patch_type: "conan" "1.43.0": - patch_file: "patches/1.43.0/fix-cmake.patch" patch_description: "separate shared and static library build" @@ -62,15 +70,3 @@ patches: - patch_file: "patches/1.42.0/fix-cmake.patch" patch_description: "separate shared and static library build" patch_type: "conan" - "1.41.1": - - patch_file: "patches/1.41.0/fix-cmake.patch" - patch_description: "separate shared and static library build" - patch_type: "conan" - - patch_file: "patches/1.40.0/fix-ios.patch" - "1.41.0": - - patch_file: "patches/1.41.0/fix-cmake.patch" - patch_description: "separate shared and static library build" - patch_type: "conan" - - patch_file: "patches/1.40.0/fix-ios.patch" - patch_description: "fix dlopen filename" - patch_type: "portability" diff --git a/recipes/libuv/all/patches/1.40.0/fix-ios.patch b/recipes/libuv/all/patches/1.40.0/fix-ios.patch deleted file mode 100644 index 616e7c2083eea..0000000000000 --- a/recipes/libuv/all/patches/1.40.0/fix-ios.patch +++ /dev/null @@ -1,28 +0,0 @@ -patch from https://github.com/libuv/libuv/commit/1addf9b88a17bc32d009d377a14d540ccddd06db -fixed in 1.42.0 - ---- a/src/unix/darwin.c -+++ b/src/unix/darwin.c -@@ -33,9 +33,7 @@ - #include - #include /* sysconf */ - --#if !TARGET_OS_IPHONE - #include "darwin-stub.h" --#endif - - static uv_once_t once = UV_ONCE_INIT; - static uint64_t (*time_func)(void); -@@ -223,10 +221,10 @@ static int uv__get_cpu_speed(uint64_t* speed) { - err = UV_ENOENT; - core_foundation_handle = dlopen("/System/Library/Frameworks/" - "CoreFoundation.framework/" -- "Versions/A/CoreFoundation", -+ "CoreFoundation", - RTLD_LAZY | RTLD_LOCAL); - iokit_handle = dlopen("/System/Library/Frameworks/IOKit.framework/" -- "Versions/A/IOKit", -+ "IOKit", - RTLD_LAZY | RTLD_LOCAL); - - if (core_foundation_handle == NULL || iokit_handle == NULL) diff --git a/recipes/libuv/all/patches/1.41.0/fix-cmake.patch b/recipes/libuv/all/patches/1.41.0/fix-cmake.patch deleted file mode 100644 index 08dd6f34be1b3..0000000000000 --- a/recipes/libuv/all/patches/1.41.0/fix-cmake.patch +++ /dev/null @@ -1,77 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index c8e881d1..82daa0d2 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -335,13 +335,19 @@ if(APPLE OR CMAKE_SYSTEM_NAME MATCHES "DragonFly|FreeBSD|Linux|NetBSD|OpenBSD") - list(APPEND uv_test_libraries util) - endif() - --add_library(uv SHARED ${uv_sources}) --target_compile_definitions(uv -- INTERFACE -- USING_UV_SHARED=1 -- PRIVATE -- BUILDING_UV_SHARED=1 -- ${uv_defines}) -+add_library(uv ${uv_sources}) -+get_target_property(target_type uv TYPE) -+if (target_type STREQUAL "SHARED_LIBRARY") -+ target_compile_definitions(uv -+ INTERFACE -+ USING_UV_SHARED=1 -+ PRIVATE -+ BUILDING_UV_SHARED=1 -+ ) -+else() -+ set_property(TARGET uv PROPERTY OUTPUT_NAME "uv_a") -+endif() -+target_compile_definitions(uv PRIVATE ${uv_defines}) - target_compile_options(uv PRIVATE ${uv_cflags}) - target_include_directories(uv - PUBLIC -@@ -351,17 +357,6 @@ target_include_directories(uv - $) - target_link_libraries(uv ${uv_libraries}) - --add_library(uv_a STATIC ${uv_sources}) --target_compile_definitions(uv_a PRIVATE ${uv_defines}) --target_compile_options(uv_a PRIVATE ${uv_cflags}) --target_include_directories(uv_a -- PUBLIC -- $ -- $ -- PRIVATE -- $) --target_link_libraries(uv_a ${uv_libraries}) -- - if(LIBUV_BUILD_TESTS) - # Small hack: use ${uv_test_sources} now to get the runner skeleton, - # before the actual tests are added. -@@ -605,19 +600,18 @@ if(UNIX OR MINGW) - configure_file(libuv-static.pc.in libuv-static.pc @ONLY) - - install(DIRECTORY include/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) -- install(FILES LICENSE DESTINATION ${CMAKE_INSTALL_DOCDIR}) -- install(FILES ${PROJECT_BINARY_DIR}/libuv.pc ${PROJECT_BINARY_DIR}/libuv-static.pc -- DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) -- install(TARGETS uv LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) -- install(TARGETS uv_a ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) -+ install(FILES LICENSE DESTINATION ${CMAKE_INSTALL_PREFIX}/licenses) -+ install(TARGETS uv -+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} -+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) - endif() - - if(MSVC) - install(DIRECTORY include/ DESTINATION include) -- install(FILES LICENSE DESTINATION .) -- install(TARGETS uv uv_a -- RUNTIME DESTINATION lib/$ -- ARCHIVE DESTINATION lib/$) -+ install(FILES LICENSE DESTINATION ${CMAKE_INSTALL_PREFIX}/licenses) -+ install(TARGETS uv -+ RUNTIME DESTINATION bin -+ ARCHIVE DESTINATION lib) - endif() - - message(STATUS "summary of build options: diff --git a/recipes/libuv/all/patches/1.49.0/fix-cmake.patch b/recipes/libuv/all/patches/1.49.0/fix-cmake.patch new file mode 100644 index 0000000000000..6d9a35e21bcd5 --- /dev/null +++ b/recipes/libuv/all/patches/1.49.0/fix-cmake.patch @@ -0,0 +1,67 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 28c6df2..608d0f7 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -471,7 +471,7 @@ if(LIBUV_BUILD_SHARED) + endif() + target_link_libraries(uv ${uv_libraries}) + set_target_properties(uv PROPERTIES OUTPUT_NAME "uv") +-endif() ++else() + + add_library(uv_a STATIC ${uv_sources}) + target_compile_definitions(uv_a PRIVATE ${uv_defines}) +@@ -491,7 +491,7 @@ set_target_properties(uv_a PROPERTIES OUTPUT_NAME "uv") + if(WIN32) + set_target_properties(uv_a PROPERTIES PREFIX "lib") + endif() +- ++endif() + if(LIBUV_BUILD_TESTS) + # Small hack: use ${uv_test_sources} now to get the runner skeleton, + # before the actual tests are added. +@@ -759,18 +759,18 @@ set(UV_VERSION_MAJOR "${CMAKE_MATCH_1}") + set(includedir ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR}) + set(libdir ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}) + set(prefix ${CMAKE_INSTALL_PREFIX}) +-configure_file(libuv-static.pc.in libuv-static.pc @ONLY) ++# configure_file(libuv-static.pc.in libuv-static.pc @ONLY) + + install(DIRECTORY include/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) + install(FILES LICENSE DESTINATION ${CMAKE_INSTALL_DOCDIR}) + install(FILES LICENSE-extra DESTINATION ${CMAKE_INSTALL_DOCDIR}) +-install(FILES ${PROJECT_BINARY_DIR}/libuv-static.pc +- DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) +-install(TARGETS uv_a EXPORT libuvConfig +- ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) +-install(EXPORT libuvConfig +- DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/libuv +- NAMESPACE libuv::) ++# install(FILES ${PROJECT_BINARY_DIR}/libuv-static.pc ++# DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) ++# install(TARGETS uv_a EXPORT libuvConfig ++# ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) ++# install(EXPORT libuvConfig ++# DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/libuv ++# NAMESPACE libuv::) + + if(LIBUV_BUILD_SHARED) + # The version in the filename is mirroring the behaviour of autotools. +@@ -784,8 +784,16 @@ if(LIBUV_BUILD_SHARED) + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) ++else() ++ configure_file(libuv-static.pc.in libuv-static.pc @ONLY) ++ install(FILES ${PROJECT_BINARY_DIR}/libuv-static.pc ++ DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) ++ install(TARGETS uv_a EXPORT libuvConfig ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) ++ install(EXPORT libuvConfig ++ DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/libuv ++ NAMESPACE libuv::) + endif() +- + if(MSVC) + set(CMAKE_DEBUG_POSTFIX d) + get_filename_component(CMAKE_C_COMPILER_DIR ${CMAKE_C_COMPILER} DIRECTORY) diff --git a/recipes/libuv/config.yml b/recipes/libuv/config.yml index 55c98b3fd5a25..341ae1de60810 100644 --- a/recipes/libuv/config.yml +++ b/recipes/libuv/config.yml @@ -1,4 +1,10 @@ versions: + "1.49.2": + folder: all + "1.49.1": + folder: all + "1.49.0": + folder: all "1.48.0": folder: all "1.47.0": @@ -9,13 +15,7 @@ versions: folder: all "1.44.2": folder: all - "1.44.1": - folder: all "1.43.0": folder: all "1.42.0": folder: all - "1.41.1": - folder: all - "1.41.0": - folder: all diff --git a/recipes/libuvc/all/conanfile.py b/recipes/libuvc/all/conanfile.py index cb9de052b88cd..b0897cfc1830a 100644 --- a/recipes/libuvc/all/conanfile.py +++ b/recipes/libuvc/all/conanfile.py @@ -24,13 +24,11 @@ class LibuvcConan(ConanFile): "shared": [True, False], "fPIC": [True, False], "with_jpeg": [False, "libjpeg", "libjpeg-turbo", "mozjpeg"], - "jpeg_turbo": [True, False, "deprecated"], } default_options = { "shared": False, "fPIC": True, "with_jpeg": "libjpeg", - "jpeg_turbo": "deprecated", } def export_sources(self): @@ -46,12 +44,6 @@ def configure(self): self.settings.rm_safe("compiler.cppstd") self.settings.rm_safe("compiler.libcxx") - # TODO: to remove once deprecated jpeg_turbo option removed - if self.options.jpeg_turbo != "deprecated": - self.output.warning("jpeg_turbo option is deprecated, please use with_jpeg option instead") - if self.options.jpeg_turbo: - self.options.with_jpeg == "libjpeg-turbo" - def layout(self): cmake_layout(self, src_folder="src") @@ -64,10 +56,6 @@ def requirements(self): elif self.options.with_jpeg == "mozjpeg": self.requires("mozjpeg/4.1.3") - def package_id(self): - # TODO: to remove once deprecated jpeg_turbo option removed - del self.info.options.jpeg_turbo - def validate(self): if is_msvc(self): # Upstream issues, e.g.: diff --git a/recipes/libva/all/conandata.yml b/recipes/libva/all/conandata.yml index da7a69068bfd9..b9410dc0ab2cf 100644 --- a/recipes/libva/all/conandata.yml +++ b/recipes/libva/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.21.0": + url: "https://github.com/intel/libva/archive/refs/tags/2.21.0.tar.gz" + sha256: "f7c3fffef3f04eb146e036dad2587d852bfb70e4926d014bf437244915ef7425" "2.20.0": url: "https://github.com/intel/libva/archive/refs/tags/2.20.0.tar.gz" sha256: "117f8d658a5fc9ea406ca80a3eb4ae1d70b15a54807c9ed77199c812bed73b60" diff --git a/recipes/libva/all/test_package/conanfile.py b/recipes/libva/all/test_package/conanfile.py index abc9920da73b3..d0b998814a4e8 100644 --- a/recipes/libva/all/test_package/conanfile.py +++ b/recipes/libva/all/test_package/conanfile.py @@ -8,6 +8,7 @@ class TestPackageConan(ConanFile): settings = "os", "compiler", "build_type", "arch" generators = "CMakeToolchain", "CMakeDeps", "VirtualBuildEnv", "VirtualRunEnv" + test_type = "explicit" def requirements(self): self.requires(self.tested_reference_str) diff --git a/recipes/libva/config.yml b/recipes/libva/config.yml index bb6ad1a3e3dc2..d0c85671c9e11 100644 --- a/recipes/libva/config.yml +++ b/recipes/libva/config.yml @@ -1,3 +1,5 @@ versions: + "2.21.0": + folder: all "2.20.0": folder: all diff --git a/recipes/libvault/all/conandata.yml b/recipes/libvault/all/conandata.yml index fad4071cba2ec..bfc950b624ab9 100644 --- a/recipes/libvault/all/conandata.yml +++ b/recipes/libvault/all/conandata.yml @@ -1,23 +1,4 @@ sources: - "0.52.0": - url: "https://github.com/abedra/libvault/archive/refs/tags/0.52.0.zip" - sha256: 49058ac9a1d3d1d08ac165f5f7b50e3a2a2ab0d3f9b8bb8194fa7a8de36edcf8 - "0.51.0": - url: "https://github.com/abedra/libvault/archive/refs/tags/0.51.0.zip" - sha256: 570ccc6451cf8e93b1c585bbf6ab5212ff9290b3a9b477752cf0651414b3d026 - "0.48.0": - url: "https://github.com/abedra/libvault/archive/0.48.0.zip" - sha256: 0a42be282ff0aff77b68cb7238014aa762df5c6b62e4d3561878874ca3760489 -patches: - "0.52.0": - - patch_file: "patches/0.52.0-0001-fix-cmake.patch" - patch_type: "conan" - patch_description: "use libcurl from conan center" - "0.51.0": - - patch_file: "patches/0.51.0-0001-fix-cmake.patch" - patch_type: "conan" - patch_description: "use libcurl from conan center" - "0.48.0": - - patch_file: "patches/0.48.0-0001-fix-cmake.patch" - patch_type: "conan" - patch_description: "use libcurl from conan center" + "0.59.0": + url: "https://github.com/abedra/libvault/archive/refs/tags/0.59.0.zip" + sha256: 668e71e1689f6142735387989042945e42fd6e0483f223ce3a08121887a335ce diff --git a/recipes/libvault/all/conanfile.py b/recipes/libvault/all/conanfile.py index 408c16f6dbb3b..98c9c4d3f5c6b 100644 --- a/recipes/libvault/all/conanfile.py +++ b/recipes/libvault/all/conanfile.py @@ -5,7 +5,8 @@ from conan.tools.apple import is_apple_os from conan.tools.build import check_min_cppstd from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout -from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rmdir +from conan.tools.files import copy, get, rmdir, replace_in_file +from conan.tools.microsoft import is_msvc, is_msvc_static_runtime from conan.tools.scm import Version required_conan_version = ">=1.54.0" @@ -33,8 +34,19 @@ class LibvaultConan(ConanFile): def _mac_os_minimum_required_version(self): return "10.15" - def export_sources(self): - export_conandata_patches(self) + @property + def _min_cppstd(self): + return 17 + + @property + def _compilers_minimum_version(self): + return { + "Visual Studio": "16", + "msvc": "192", + "gcc": "8", + "clang": "7.0", + "apple-clang": "12", + } def config_options(self): if self.settings.os == "Windows": @@ -49,29 +61,18 @@ def layout(self): def requirements(self): # public header VaultClient.h includes curl/curl.h and use several functions - self.requires("libcurl/[>=7.78.0 <9]", transitive_headers=True, transitive_libs=True) + self.requires("libcurl/[>=7.78.0 <9]", transitive_headers=True) def validate(self): - compiler = str(self.settings.compiler) - compiler_version = Version(self.settings.compiler.version.value) - - minimum_compiler_version = { - "Visual Studio": "16", - "msvc": "192", - "gcc": "8", - "clang": "7.0", - "apple-clang": "12", - } - - minimum_cpp_standard = 17 - - if compiler in minimum_compiler_version and \ - compiler_version < minimum_compiler_version[compiler]: + if self.settings.compiler.cppstd: + check_min_cppstd(self, self._min_cppstd) + minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) + if minimum_version and Version(self.settings.compiler.version) < minimum_version: raise ConanInvalidConfiguration( - f"{self.name} requires a compiler that supports at least C++{minimum_cpp_standard}. " - f"{compiler} {compiler_version} is not supported.") + f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." + ) - if compiler == "clang" and self.settings.compiler.libcxx in ["libstdc++", "libstdc++11"] and self.settings.compiler.version == "11": + if self.settings.compiler == "clang" and self.settings.compiler.libcxx in ["libstdc++", "libstdc++11"] and self.settings.compiler.version == "11": raise ConanInvalidConfiguration("clang 11 with libstdc++ is not supported due to old libstdc++ missing C++17 support") if is_apple_os(self): @@ -80,9 +81,6 @@ def validate(self): raise ConanInvalidConfiguration( "Macos Mojave (10.14) and earlier cannot to be built because C++ standard library too old.") - if self.settings.compiler.get_safe("cppstd"): - check_min_cppstd(self, minimum_cpp_standard) - def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) @@ -91,12 +89,24 @@ def generate(self): tc.variables["ENABLE_TEST"] = False tc.variables["ENABLE_INTEGRATION_TEST"] = False tc.variables["ENABLE_COVERAGE"] = False + tc.variables["LINK_CURL"] = True + tc.variables["CMAKE_OSX_DEPLOYMENT_TARGET"] = self._mac_os_minimum_required_version + + if is_msvc(self): + tc.variables["USE_MSVC_RUNTIME_LIBRARY_DLL"] = not is_msvc_static_runtime(self) + tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0077"] = "NEW" + tc.generate() + tc = CMakeDeps(self) tc.generate() - deps = CMakeDeps(self) - deps.generate() + + def _patch_sources(self): + # INFO: https://github.com/abedra/libvault/pull/123 + replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), + "target_link_libraries(vault curl)", + "target_link_libraries(vault CURL::libcurl)") def build(self): - apply_conandata_patches(self) + self._patch_sources() cmake = CMake(self) cmake.configure() cmake.build() @@ -112,6 +122,7 @@ def package_info(self): self.cpp_info.libs = ["vault"] if self.settings.os in ["Linux", "FreeBSD"]: self.cpp_info.system_libs.append("m") + if self.settings.compiler == "gcc" and Version(self.settings.compiler.version).major == "8": self.cpp_info.system_libs.append("stdc++fs") diff --git a/recipes/libvault/all/patches/0.48.0-0001-fix-cmake.patch b/recipes/libvault/all/patches/0.48.0-0001-fix-cmake.patch deleted file mode 100644 index df2816ee6d88d..0000000000000 --- a/recipes/libvault/all/patches/0.48.0-0001-fix-cmake.patch +++ /dev/null @@ -1,42 +0,0 @@ ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -1,10 +1,6 @@ - cmake_minimum_required(VERSION 3.12) - project(vault VERSION 0.48.0 DESCRIPTION "Vault library for C++") - --set(CMAKE_CXX_STANDARD 17) --set(CMAKE_CXX_STANDARD_REQUIRED ON) --set(CMAKE_CXX_EXTENSIONS OFF) --set(CMAKE_CXX_FLAGS_DEBUG --coverage) - set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) - - option(ENABLE_TEST "Enable tests?" ON) -@@ -14,12 +10,7 @@ option(LINK_CURL "Link curl library for vault" OFF) - option(BUILD_SHARED_LIBS "Build vault as a shared library" ON) - option(INSTALL "Run install targets" ON) - --find_package(CURL) --if (CURL_FOUND) -- include_directories(${CURL_INCLUDE_DIR}) --else (CURL_FOUND) -- message(FATAL_ERROR "CURL not found") --endif (CURL_FOUND) -+find_package(CURL REQUIRED) - - include(GNUInstallDirs) - include_directories("${PROJECT_SOURCE_DIR}/lib") -@@ -120,9 +111,11 @@ set_target_properties(vault PROPERTIES - - target_include_directories(vault PRIVATE src) - --if(LINK_CURL) -- target_link_libraries(vault curl) --endif(LINK_CURL) -+target_link_libraries(vault PUBLIC CURL::libcurl) -+target_compile_features(vault PUBLIC cxx_std_17) -+if(WIN32) -+ set_target_properties(vault PROPERTIES RUNTIME_OUTPUT_NAME "VaultClient") -+endif() - - if (ENABLE_COVERAGE) - target_link_libraries(vault gcov) diff --git a/recipes/libvault/all/patches/0.51.0-0001-fix-cmake.patch b/recipes/libvault/all/patches/0.51.0-0001-fix-cmake.patch deleted file mode 100644 index 2ff417c356ac8..0000000000000 --- a/recipes/libvault/all/patches/0.51.0-0001-fix-cmake.patch +++ /dev/null @@ -1,41 +0,0 @@ ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -1,9 +1,6 @@ - cmake_minimum_required(VERSION 3.12) - project(vault VERSION 0.51.0 DESCRIPTION "Vault library for C++") - --set(CMAKE_CXX_STANDARD 17) --set(CMAKE_CXX_STANDARD_REQUIRED ON) --set(CMAKE_CXX_EXTENSIONS OFF) - set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) - - option(ENABLE_TEST "Enable tests?" ON) -@@ -13,12 +10,7 @@ option(LINK_CURL "Link curl library for vault" OFF) - option(BUILD_SHARED_LIBS "Build vault as a shared library" ON) - option(INSTALL "Run install targets" ON) - --find_package(CURL) --if (CURL_FOUND) -- include_directories(${CURL_INCLUDE_DIR}) --else (CURL_FOUND) -- message(FATAL_ERROR "CURL not found") --endif (CURL_FOUND) -+find_package(CURL REQUIRED) - - include(GNUInstallDirs) - include_directories("${PROJECT_SOURCE_DIR}/lib") -@@ -119,9 +111,11 @@ set_target_properties(vault PROPERTIES - - target_include_directories(vault PRIVATE src) - --if(LINK_CURL) -- target_link_libraries(vault curl) --endif(LINK_CURL) -+target_link_libraries(vault PUBLIC CURL::libcurl) -+target_compile_features(vault PUBLIC cxx_std_17) -+if(WIN32) -+ set_target_properties(vault PROPERTIES RUNTIME_OUTPUT_NAME "VaultClient") -+endif() - - if (ENABLE_COVERAGE) - target_link_libraries(vault gcov) diff --git a/recipes/libvault/all/patches/0.52.0-0001-fix-cmake.patch b/recipes/libvault/all/patches/0.52.0-0001-fix-cmake.patch deleted file mode 100644 index 70b3ab582fcdc..0000000000000 --- a/recipes/libvault/all/patches/0.52.0-0001-fix-cmake.patch +++ /dev/null @@ -1,41 +0,0 @@ ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -1,9 +1,6 @@ - cmake_minimum_required(VERSION 3.12) - project(vault VERSION 0.52.0 DESCRIPTION "Vault library for C++") - --set(CMAKE_CXX_STANDARD 17) --set(CMAKE_CXX_STANDARD_REQUIRED ON) --set(CMAKE_CXX_EXTENSIONS OFF) - set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) - - option(ENABLE_TEST "Enable tests?" ON) -@@ -13,12 +10,7 @@ option(LINK_CURL "Link curl library for vault" OFF) - option(BUILD_SHARED_LIBS "Build vault as a shared library" ON) - option(INSTALL "Run install targets" ON) - --find_package(CURL) --if (CURL_FOUND) -- include_directories(${CURL_INCLUDE_DIR}) --else (CURL_FOUND) -- message(FATAL_ERROR "CURL not found") --endif (CURL_FOUND) -+find_package(CURL REQUIRED) - - include(GNUInstallDirs) - include_directories("${PROJECT_SOURCE_DIR}/lib") -@@ -119,9 +111,11 @@ set_target_properties(vault PROPERTIES - - target_include_directories(vault PRIVATE src) - --if(LINK_CURL) -- target_link_libraries(vault curl) --endif(LINK_CURL) -+target_link_libraries(vault PUBLIC CURL::libcurl) -+target_compile_features(vault PUBLIC cxx_std_17) -+if(WIN32) -+ set_target_properties(vault PROPERTIES RUNTIME_OUTPUT_NAME "VaultClient") -+endif() - - if (ENABLE_COVERAGE) - target_link_libraries(vault gcov) diff --git a/recipes/libvault/config.yml b/recipes/libvault/config.yml index 327b1962634e5..06bedb729ed91 100644 --- a/recipes/libvault/config.yml +++ b/recipes/libvault/config.yml @@ -1,7 +1,3 @@ versions: - "0.52.0": - folder: "all" - "0.51.0": - folder: "all" - "0.48.0": + "0.59.0": folder: "all" diff --git a/recipes/libvips/all/conandata.yml b/recipes/libvips/all/conandata.yml index ef20d5b718d8d..83aa22c513b0b 100644 --- a/recipes/libvips/all/conandata.yml +++ b/recipes/libvips/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "8.15.3": + url: "https://github.com/libvips/libvips/releases/download/v8.15.3/vips-8.15.3.tar.xz" + sha256: "3e27d9f536eafad64013958fe9e8a1964c90b564c731d49db7c1a1c11b1052a0" "8.15.2": url: "https://github.com/libvips/libvips/releases/download/v8.15.2/vips-8.15.2.tar.xz" sha256: "a2ab15946776ca7721d11cae3215f20f1f097b370ff580cd44fc0f19387aee84" @@ -8,3 +11,9 @@ sources: "8.14.2": url: "https://github.com/libvips/libvips/releases/download/v8.14.2/vips-8.14.2.tar.xz" sha256: "27dad021f0835a5ab14e541d02abd41e4c3bd012d2196438df5a9e754984f7ce" +patches: + "8.15.3": + - patch_file: "patches/0001-fix-8-15-3-msvc-build.patch" + patch_description: "Fix broken msvc build due to ssize_t" + patch_type: "portability" + patch_source: "https://github.com/libvips/libvips/pull/4153" diff --git a/recipes/libvips/all/conanfile.py b/recipes/libvips/all/conanfile.py index 4e2008334f2bb..559a6bbfdb975 100644 --- a/recipes/libvips/all/conanfile.py +++ b/recipes/libvips/all/conanfile.py @@ -3,7 +3,7 @@ from conan.tools.apple import fix_apple_shared_install_name from conan.tools.build import check_min_cppstd from conan.tools.env import VirtualBuildEnv -from conan.tools.files import copy, get, replace_in_file, rm, rmdir +from conan.tools.files import copy, get, replace_in_file, rm, rmdir, apply_conandata_patches, export_conandata_patches from conan.tools.gnu import PkgConfigDeps from conan.tools.layout import basic_layout from conan.tools.meson import Meson, MesonToolchain @@ -122,11 +122,14 @@ def configure(self): self.settings.rm_safe("compiler.cppstd") self.settings.rm_safe("compiler.libcxx") + def export_sources(self): + export_conandata_patches(self) + def layout(self): basic_layout(self, src_folder="src") def requirements(self): - self.requires("expat/2.5.0") + self.requires("expat/[>=2.6.2 <3]") self.requires("glib/2.78.3", transitive_headers=True, transitive_libs=True) if self.options.get_safe("with_archive"): self.requires("libarchive/3.7.2") @@ -139,7 +142,7 @@ def requirements(self): if self.options.with_fftw: self.requires("fftw/3.3.10") if self.options.with_fontconfig: - self.requires("fontconfig/2.14.2") + self.requires("fontconfig/2.15.0") if self.options.with_heif: self.requires("libheif/1.16.2") if self.options.get_safe("with_highway"): @@ -147,27 +150,27 @@ def requirements(self): if self.options.with_jpeg == "libjpeg": self.requires("libjpeg/9e") elif self.options.with_jpeg == "libjpeg-turbo": - self.requires("libjpeg-turbo/3.0.1") + self.requires("libjpeg-turbo/3.0.2") elif self.options.with_jpeg == "mozjpeg": self.requires("mozjpeg/4.1.5") if self.options.with_jpeg_xl: self.requires("libjxl/0.6.1") if self.options.with_lcms: - self.requires("lcms/2.14") + self.requires("lcms/2.16") if self.options.with_magick: self.requires("imagemagick/7.0.11-14") if self.options.with_matio: self.requires("matio/1.5.24") if self.options.with_openexr: - self.requires("openexr/3.2.1") + self.requires("openexr/3.2.3") if self.options.with_openjpeg: - self.requires("openjpeg/2.5.0") + self.requires("openjpeg/2.5.2") if self.options.with_pangocairo: self.requires("pango/1.50.10") if self.options.with_pdfium: self.requires("pdfium/95.0.4629") if self.options.with_png == "libpng": - self.requires("libpng/1.6.40") + self.requires("libpng/[>=1.6 <2]") elif self.options.with_png == "libspng": self.requires("libspng/0.7.4") if self.options.with_poppler: @@ -215,7 +218,7 @@ def validate(self): raise ConanInvalidConfiguration("librsvg recipe not available in conancenter yet") def build_requirements(self): - self.tool_requires("meson/1.3.0") + self.tool_requires("meson/1.4.0") if not self.conf.get("tools.gnu:pkg_config", check_type=str): self.tool_requires("pkgconf/2.1.0") if self.options.introspection: @@ -227,7 +230,7 @@ def build_requirements(self): # a different/incompatible libiconv than the one being exposed # in the runtime environment (DYLD_LIBRARY_PATH) # See https://github.com/conan-io/conan-center-index/pull/17502#issuecomment-1542492466 - self.tool_requires("gettext/0.21") + self.tool_requires("gettext/0.22.5") def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) @@ -299,6 +302,8 @@ def generate(self): deps.generate() def _patch_sources(self): + apply_conandata_patches(self) + # Disable tests meson_build = os.path.join(self.source_folder, "meson.build") replace_in_file(self, meson_build, "subdir('test')", "") diff --git a/recipes/libvips/all/patches/0001-fix-8-15-3-msvc-build.patch b/recipes/libvips/all/patches/0001-fix-8-15-3-msvc-build.patch new file mode 100644 index 0000000000000..fb781f613a9aa --- /dev/null +++ b/recipes/libvips/all/patches/0001-fix-8-15-3-msvc-build.patch @@ -0,0 +1,36 @@ +From a1f3bf3c98d21b09a75f57682cdb12a6e48ebb08 Mon Sep 17 00:00:00 2001 +From: Julianiolo <50519317+Julianiolo@users.noreply.github.com> +Date: Fri, 13 Sep 2024 21:31:02 +0200 +Subject: [PATCH] replace ssize_t with gint64 + +--- + libvips/iofuncs/generate.c | 2 +- + libvips/iofuncs/util.c | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/libvips/iofuncs/generate.c b/libvips/iofuncs/generate.c +index bb3d1b2d7..8941762f7 100644 +--- a/libvips/iofuncs/generate.c ++++ b/libvips/iofuncs/generate.c +@@ -638,7 +638,7 @@ write_vips(VipsRegion *region, VipsRect *area, void *a) + // write() uses int not size_t on windows, so we need to chunk + // ... max 1gb, why not + int chunk_size = VIPS_MIN(1024 * 1024 * 1024, count); +- ssize_t nwritten = write(region->im->fd, buf, chunk_size); ++ gint64 nwritten = write(region->im->fd, buf, chunk_size); + + /* n == 0 isn't strictly an error, but we treat it as + * one to make sure we don't get stuck in this loop. +diff --git a/libvips/iofuncs/util.c b/libvips/iofuncs/util.c +index 46976ef42..acf78ade8 100644 +--- a/libvips/iofuncs/util.c ++++ b/libvips/iofuncs/util.c +@@ -541,7 +541,7 @@ vips__write(int fd, const void *buf, size_t count) + // write() uses int not size_t on windows, so we need to chunk + // ... max 1gb, why not + int chunk_size = VIPS_MIN(1024 * 1024 * 1024, count); +- ssize_t nwritten = write(fd, buf, chunk_size); ++ gint64 nwritten = write(fd, buf, chunk_size); + + /* n == 0 isn't strictly an error, but we treat it as + * one to make sure we don't get stuck in this loop. diff --git a/recipes/libvips/config.yml b/recipes/libvips/config.yml index 411a90d607682..3f10cc1059b5d 100644 --- a/recipes/libvips/config.yml +++ b/recipes/libvips/config.yml @@ -1,4 +1,6 @@ versions: + "8.15.3": + folder: all "8.15.2": folder: all "8.15.1": diff --git a/recipes/libvpx/all/conandata.yml b/recipes/libvpx/all/conandata.yml index 6d2cd13499015..556d9f33bcae4 100644 --- a/recipes/libvpx/all/conandata.yml +++ b/recipes/libvpx/all/conandata.yml @@ -1,4 +1,10 @@ sources: + "1.14.1": + url: "https://github.com/webmproject/libvpx/archive/refs/tags/v1.14.1.tar.gz" + sha256: "901747254d80a7937c933d03bd7c5d41e8e6c883e0665fadcb172542167c7977" + "1.14.0": + url: "https://github.com/webmproject/libvpx/archive/refs/tags/v1.14.0.tar.gz" + sha256: "5f21d2db27071c8a46f1725928a10227ae45c5cd1cad3727e4aafbe476e321fa" "1.13.1": url: "https://github.com/webmproject/libvpx/archive/refs/tags/v1.13.1.tar.gz" sha256: "00dae80465567272abd077f59355f95ac91d7809a2d3006f9ace2637dd429d14" @@ -8,9 +14,6 @@ sources: "1.10.0": url: "https://github.com/webmproject/libvpx/archive/refs/tags/v1.10.0.tar.gz" sha256: "85803ccbdbdd7a3b03d930187cb055f1353596969c1f92ebec2db839fa4f834a" - "1.9.0": - url: "https://github.com/webmproject/libvpx/archive/refs/tags/v1.9.0.tar.gz" - sha256: "d279c10e4b9316bf11a570ba16c3d55791e1ad6faa4404c67422eb631782c80a" patches: "1.11.0": - patch_file: "patches/0001-extended-support-1.10.0.patch" @@ -22,12 +25,3 @@ patches: patch_type: "portability" patch_description: "Add support for more compilers" patch_source: "https://github.com/webmproject/libvpx/commit/cafe7cc1f10cfea74edb2ded7c3df2d69fcf1eee" - "1.9.0": - - patch_file: "patches/0001-extended-support-1.9.0.patch" - patch_type: "portability" - patch_description: "Add support for more compilers" - patch_source: "https://github.com/webmproject/libvpx/commit/cafe7cc1f10cfea74edb2ded7c3df2d69fcf1eee" - - patch_file: "patches/0002-msvc_conan_build.patch" - patch_type: "portability" - patch_description: "Add support for more compilers" - patch_source: "https://github.com/webmproject/libvpx/commit/04086a30664d2a3e89d6a6e4e1c18f1a82c8f958" diff --git a/recipes/libvpx/all/conanfile.py b/recipes/libvpx/all/conanfile.py index e53344de221a5..babc16fe80346 100644 --- a/recipes/libvpx/all/conanfile.py +++ b/recipes/libvpx/all/conanfile.py @@ -60,6 +60,9 @@ def configure(self): self.package_type = "static-library" if self.options.get_safe("shared"): self.options.rm_safe("fPIC") + if self.settings.os == "Android": + del self.options.shared + self.package_type = "static-library" def layout(self): basic_layout(self, src_folder="src") @@ -103,7 +106,7 @@ def _target_name(self): compiler = f"vs{vc_version}" elif is_msvc(self): vc_version = str(self.settings.compiler.version) - vc_version = {"170": "11", "180": "12", "190": "14", "191": "15", "192": "16", "193": "17"}[vc_version] + vc_version = {"170": "11", "180": "12", "190": "14", "191": "15", "192": "16", "193": "17", "194": "17"}[vc_version] compiler = f"vs{vc_version}" elif self.settings.compiler in ["gcc", "clang", "apple-clang"]: compiler = 'gcc' diff --git a/recipes/libvpx/all/patches/0001-extended-support-1.9.0.patch b/recipes/libvpx/all/patches/0001-extended-support-1.9.0.patch deleted file mode 100644 index 7e10a765c149c..0000000000000 --- a/recipes/libvpx/all/patches/0001-extended-support-1.9.0.patch +++ /dev/null @@ -1,58 +0,0 @@ ---- a/build/make/gen_msvs_sln.sh -+++ b/build/make/gen_msvs_sln.sh -@@ -219,6 +219,7 @@ for opt in "$@"; do - 14) vs_year=2015 ;; - 15) vs_year=2017 ;; - 16) vs_year=2019 ;; -+ 17) vs_year=2022 ;; - *) die Unrecognized Visual Studio Version in $opt ;; - esac - ;; -@@ -232,7 +233,7 @@ done - outfile=${outfile:-/dev/stdout} - mkoutfile=${mkoutfile:-/dev/stdout} - case "${vs_ver}" in -- 1[4-6]) -+ 1[4-7]) - # VS has used Format Version 12.00 continuously since vs11. - sln_vers="12.00" - sln_vers_str="Visual Studio ${vs_year}" ---- a/build/make/gen_msvs_vcxproj.sh -+++ b/build/make/gen_msvs_vcxproj.sh -@@ -168,7 +168,7 @@ for opt in "$@"; do - --ver=*) - vs_ver="$optval" - case "$optval" in -- 1[4-6]) -+ 1[4-7]) - ;; - *) die Unrecognized Visual Studio Version in $opt - ;; -@@ -342,6 +342,9 @@ generate_vcxproj() { - if [ "$vs_ver" = "16" ]; then - tag_content PlatformToolset v142 - fi -+ if [ "$vs_ver" = "17" ]; then -+ tag_content PlatformToolset v143 -+ fi - tag_content CharacterSet Unicode - if [ "$config" = "Release" ]; then - tag_content WholeProgramOptimization true ---- a/configure -+++ b/configure -@@ -138,6 +138,7 @@ all_platforms="${all_platforms} x86-win32-gcc" - all_platforms="${all_platforms} x86-win32-vs14" - all_platforms="${all_platforms} x86-win32-vs15" - all_platforms="${all_platforms} x86-win32-vs16" -+all_platforms="${all_platforms} x86-win32-vs17" - all_platforms="${all_platforms} x86_64-android-gcc" - all_platforms="${all_platforms} x86_64-darwin9-gcc" - all_platforms="${all_platforms} x86_64-darwin10-gcc" -@@ -158,6 +159,7 @@ all_platforms="${all_platforms} x86_64-win64-gcc" - all_platforms="${all_platforms} x86_64-win64-vs14" - all_platforms="${all_platforms} x86_64-win64-vs15" - all_platforms="${all_platforms} x86_64-win64-vs16" -+all_platforms="${all_platforms} x86_64-win64-vs17" - all_platforms="${all_platforms} generic-gnu" - - # all_targets is a list of all targets that can be configured diff --git a/recipes/libvpx/all/patches/0002-msvc_conan_build.patch b/recipes/libvpx/all/patches/0002-msvc_conan_build.patch deleted file mode 100644 index 28885c1c83394..0000000000000 --- a/recipes/libvpx/all/patches/0002-msvc_conan_build.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/build/make/msvs_common.sh b/build/make/msvs_common.sh -index 27ddf7f..da462ec 100644 ---- a/build/make/msvs_common.sh -+++ b/build/make/msvs_common.sh -@@ -9,7 +9,7 @@ - ## be found in the AUTHORS file in the root of the source tree. - ## - --if [ "$(uname -o 2>/dev/null)" = "Cygwin" ] \ -+if [ "$(uname -o 2>/dev/null)" = "Cygwin" ] || [ "$(uname -o 2>/dev/null)" = "Msys" ]\ - && cygpath --help >/dev/null 2>&1; then - FIXPATH='cygpath -m' - else diff --git a/recipes/libvpx/config.yml b/recipes/libvpx/config.yml index a39af33955838..33ef774be6ba3 100644 --- a/recipes/libvpx/config.yml +++ b/recipes/libvpx/config.yml @@ -1,9 +1,11 @@ versions: + "1.14.1": + folder: all + "1.14.0": + folder: all "1.13.1": folder: all "1.11.0": folder: all "1.10.0": folder: all - "1.9.0": - folder: all diff --git a/recipes/libwebm/all/conandata.yml b/recipes/libwebm/all/conandata.yml index 18c5b099c2c71..db15e75e26a4f 100644 --- a/recipes/libwebm/all/conandata.yml +++ b/recipes/libwebm/all/conandata.yml @@ -1,5 +1,7 @@ sources: - '1.0.0.31': - url: 'https://chromium.googlesource.com/webm/libwebm/+archive/libwebm-1.0.0.31.tar.gz' - '1.0.0.30': - url: 'https://chromium.googlesource.com/webm/libwebm/+archive/libwebm-1.0.0.30.tar.gz' + "1.0.0.31": + url: "https://github.com/webmproject/libwebm/archive/refs/tags/libwebm-1.0.0.31.tar.gz" + sha256: "616cfdca1c869222dc60d5a49d112c1464040390e3876afca4d385347c6ce55e" + "1.0.0.30": + url: "https://github.com/webmproject/libwebm/archive/refs/tags/libwebm-1.0.0.30.tar.gz" + sha256: "6c1381fd1a66e86e095b76028ede696724e198ea0e39957c9649af5f0718b96a" diff --git a/recipes/libwebm/all/conanfile.py b/recipes/libwebm/all/conanfile.py index 7d2ceec33ba43..4fc3f3659a659 100644 --- a/recipes/libwebm/all/conanfile.py +++ b/recipes/libwebm/all/conanfile.py @@ -42,7 +42,7 @@ def layout(self): cmake_layout(self, src_folder="src") def source(self): - get(self, **self.conan_data["sources"][self.version]) + get(self, **self.conan_data["sources"][self.version], strip_root=True) def generate(self): tc = CMakeToolchain(self) diff --git a/recipes/libwebm/config.yml b/recipes/libwebm/config.yml index 71746ecdc81bd..c6c0e669617aa 100644 --- a/recipes/libwebm/config.yml +++ b/recipes/libwebm/config.yml @@ -1,5 +1,5 @@ versions: - '1.0.0.31': + "1.0.0.31": folder: all - '1.0.0.30': + "1.0.0.30": folder: all diff --git a/recipes/libwebp/all/conandata.yml b/recipes/libwebp/all/conandata.yml index 0aaa6446c5482..a68caa1df2fd9 100644 --- a/recipes/libwebp/all/conandata.yml +++ b/recipes/libwebp/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.4.0": + url: "https://storage.googleapis.com/downloads.webmproject.org/releases/webp/libwebp-1.4.0.tar.gz" + sha256: "61f873ec69e3be1b99535634340d5bde750b2e4447caa1db9f61be3fd49ab1e5" "1.3.2": url: "https://storage.googleapis.com/downloads.webmproject.org/releases/webp/libwebp-1.3.2.tar.gz" sha256: "2a499607df669e40258e53d0ade8035ba4ec0175244869d1025d460562aa09b4" @@ -12,6 +15,10 @@ sources: url: "https://storage.googleapis.com/downloads.webmproject.org/releases/webp/libwebp-1.1.0.tar.gz" sha256: "98a052268cc4d5ece27f76572a7f50293f439c17a98e67c4ea0c7ed6f50ef043" patches: + "1.4.0": + - patch_file: "patches/1.4.0-0001-fix-cmake.patch" + patch_description: "disable PIC, disable prefix library name on MSVC" + patch_type: "conan" "1.3.2": - patch_file: "patches/1.3.1-0001-fix-cmake.patch" patch_description: "disable PIC, disable prefix library name on MSVC" diff --git a/recipes/libwebp/all/patches/1.4.0-0001-fix-cmake.patch b/recipes/libwebp/all/patches/1.4.0-0001-fix-cmake.patch new file mode 100644 index 0000000000000..f819b1e43d235 --- /dev/null +++ b/recipes/libwebp/all/patches/1.4.0-0001-fix-cmake.patch @@ -0,0 +1,21 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index ad5e14c3..89c836f3 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -60,7 +60,6 @@ if(WEBP_LINK_STATIC) + else() + set(CMAKE_FIND_LIBRARY_SUFFIXES .a ${CMAKE_FIND_LIBRARY_SUFFIXES}) + endif() +- set(CMAKE_POSITION_INDEPENDENT_CODE ON) + # vwebp does not compile on Ubuntu with static libraries so disabling it for + # now. + set(WEBP_BUILD_VWEBP OFF) +@@ -155,7 +154,7 @@ endif() + set(PTHREAD_LIBS ${CMAKE_THREAD_LIBS_INIT}) + set(INSTALLED_LIBRARIES) + +-if(MSVC) ++if(0) + # match the naming convention used by nmake + set(webp_libname_prefix "lib") + set(CMAKE_SHARED_LIBRARY_PREFIX "${webp_libname_prefix}") diff --git a/recipes/libwebp/config.yml b/recipes/libwebp/config.yml index e184761fe568e..c2fa30e005fdd 100644 --- a/recipes/libwebp/config.yml +++ b/recipes/libwebp/config.yml @@ -1,4 +1,6 @@ versions: + "1.4.0": + folder: all "1.3.2": folder: all "1.3.1": diff --git a/recipes/libwebsockets/all/conandata.yml b/recipes/libwebsockets/all/conandata.yml index ed95c45ed0deb..8032d01c8d8b8 100644 --- a/recipes/libwebsockets/all/conandata.yml +++ b/recipes/libwebsockets/all/conandata.yml @@ -14,12 +14,3 @@ sources: "4.2.0": url: "https://github.com/warmcat/libwebsockets/archive/v4.2.0.tar.gz" sha256: "a57e9a4765dbcd4d880feba8089b43ed69995eaf10d5d61a07981d9ddd975f40" - "4.1.6": - url: "https://github.com/warmcat/libwebsockets/archive/v4.1.6.tar.gz" - sha256: "402e9a8df553c9cd2aff5d7a9758e9e5285bf3070c82539082864633db3deb83" - "4.1.4": - url: "https://github.com/warmcat/libwebsockets/archive/v4.1.4.tar.gz" - sha256: "00da77b4b89db3e0b1a2778f756f08d55d7f6b1632e18d981fc399c412866147" - "4.0.15": - url: "https://github.com/warmcat/libwebsockets/archive/v4.0.15.tar.gz" - sha256: "adce8152c3e802b8fe71b26d7252944944c49954ba6b5ba9fbb7fa5c4aad93dc" diff --git a/recipes/libwebsockets/all/conanfile.py b/recipes/libwebsockets/all/conanfile.py index 0fd0cf66a67ea..21f493452d927 100644 --- a/recipes/libwebsockets/all/conanfile.py +++ b/recipes/libwebsockets/all/conanfile.py @@ -2,7 +2,7 @@ from conan.errors import ConanException, ConanInvalidConfiguration from conan.tools.cmake import cmake_layout, CMake, CMakeToolchain, CMakeDeps from conan.tools.files import get, replace_in_file, rmdir, copy, save, collect_libs -from conan.tools.microsoft import is_msvc +from conan.tools.microsoft import check_min_vs, is_msvc from conan.tools.scm import Version import os import textwrap @@ -30,6 +30,7 @@ class LibwebsocketsConan(ConanFile): "with_sqlite3": [True, False], "with_libmount": [True, False], "with_hubbub": [True, False], + "with_netlink": [True, False], "ssl_client_use_os_ca_certs": [True, False], # SSL support should make use of the OS-installed CA root certs "ssl_server_with_ecdh_cert": [True, False], # Include SSL server use ECDH certificate @@ -114,6 +115,7 @@ class LibwebsocketsConan(ConanFile): "with_sqlite3": False, "with_libmount": False, "with_hubbub": False, + "with_netlink": False, "ssl_client_use_os_ca_certs": True, "ssl_server_with_ecdh_cert": False, @@ -224,8 +226,7 @@ def requirements(self): self.requires("sqlite3/3.44.2") if self.options.with_ssl == "openssl": - # Cannot add the [>=1.1 <4] range, as it seems openssl3 makes it fail - self.requires("openssl/1.1.1w", transitive_headers=True) + self.requires("openssl/[>=1.1.1w <4]", transitive_headers=True) elif self.options.with_ssl == "mbedtls": self.requires("mbedtls/3.5.0") elif self.options.with_ssl == "wolfssl": @@ -235,12 +236,8 @@ def validate(self): if self.options.shared and self.settings.compiler == "gcc" and Version(self.settings.compiler.version) < "5": # https://github.com/conan-io/conan-center-index/pull/5321#issuecomment-826367276 raise ConanInvalidConfiguration("{}/{} shared=True with gcc<5 does not build. Please submit a PR with a fix.".format(self.name, self.version)) - if Version(self.version) <= "4.0.15" and self.settings.compiler == "apple-clang" and Version(self.settings.compiler.version) >= "12": - raise ConanInvalidConfiguration("{}/{} with apple-clang>=12 does not build. Please submit a PR with a fix.".format(self.name, self.version)) if Version(self.version) >= "4.3.2": - if ("Visual" in str(self.settings.compiler.version) and Version(self.settings.compiler.version) < 16) or \ - ("msvc" == str(self.settings.compiler.version) and Version(self.settings.compiler.version) < 192): - raise ConanInvalidConfiguration ("{}/{} requires at least Visual Studio 2019".format(self.name, self.version)) + check_min_vs(self, "192") if self.options.with_hubbub: raise ConanInvalidConfiguration("Library hubbub not implemented (yet) in CCI") @@ -295,11 +292,16 @@ def generate(self): tc.variables["LWS_WITH_SHARED"] = self.options.shared tc.variables["LWS_WITH_STATIC"] = not self.options.shared tc.variables["LWS_WITH_SSL"] = bool(self.options.with_ssl) + tc.variables["LWS_WITH_NETLINK"] = self.options.with_netlink + + # Allow forwarding project targets to try_compile and derivatives + tc.variables["CMAKE_TRY_COMPILE_CONFIGURATION"] = self.settings.build_type if self.options.with_ssl == "openssl": - tc.variables["LWS_OPENSSL_LIBRARIES"] = self._cmakify_path_list(self._find_libraries("openssl")) - tc.variables["LWS_OPENSSL_INCLUDE_DIRS"] = self._cmakify_path_list(self.dependencies["openssl"].cpp_info.includedirs) - elif self.options.with_ssl == "mbedtls": + # Ensure find_package(OpenSSL) is called early + tc.variables["CMAKE_PROJECT_libwebsockets_INCLUDE"] = os.path.join(self.source_folder, "project_include.cmake").replace('\\','/') + + if self.options.with_ssl == "mbedtls": tc.variables["LWS_WITH_MBEDTLS"] = True tc.variables["LWS_MBEDTLS_LIBRARIES"] = self._cmakify_path_list(self._find_libraries("mbedtls")) tc.variables["LWS_MBEDTLS_INCLUDE_DIRS"] = self._cmakify_path_list(self.dependencies["mbedtls"].cpp_info.includedirs) @@ -417,9 +419,8 @@ def generate(self): tc.variables["LWS_WITH_ALSA"] = False tc.variables["LWS_WITH_GTK"] = False - if Version(self.version) >= "4.1.0": - tc.variables["LWS_WITH_SYS_SMD"] = self.settings.os != "Windows" - tc.variables["DISABLE_WERROR"] = True + tc.variables["LWS_WITH_SYS_SMD"] = self.settings.os != "Windows" + tc.variables["DISABLE_WERROR"] = True tc.generate() deps = CMakeDeps(self) @@ -432,16 +433,18 @@ def _patch_sources(self): "SET(CMAKE_INSTALL_NAME_DIR \"${CMAKE_INSTALL_PREFIX}/${LWS_INSTALL_LIB_DIR}${LIB_SUFFIX}\")", "", ) - if Version(self.version) == "4.0.15" and self.options.with_ssl: - replace_in_file(self, - cmakelists, - "list(APPEND LIB_LIST ws2_32.lib userenv.lib psapi.lib iphlpapi.lib)", - "list(APPEND LIB_LIST ws2_32.lib userenv.lib psapi.lib iphlpapi.lib crypt32.lib)" - ) - if Version(self.version) < "4.1.0": - replace_in_file(self, cmakelists, "-Werror", "") - if Version(self.version) >= "4.1.4": - replace_in_file(self, cmakelists, "add_compile_options(/W3 /WX)", "add_compile_options(/W3)") + + # Early call to find_package(OpenSSL) because its referenced in different places + if self.options.with_ssl == "openssl": + project_include_file = os.path.join(self.source_folder, "project_include.cmake") + save(self, project_include_file, 'find_package(OpenSSL REQUIRED)\nset(OPENSSL_INCLUDE_DIRS ${OPENSSL_INCLUDE_DIR})') + + # Prevent locating and copying OpenSSL binaries (not needed by the recipe) + replace_in_file(self, + os.path.join(self.source_folder, "cmake", "FindOpenSSLbins.cmake"), + "if(OPENSSL_FOUND)", "if(FALSE)") + + replace_in_file(self, cmakelists, "add_compile_options(/W3 /WX)", "add_compile_options(/W3)") def build(self): self._patch_sources() diff --git a/recipes/libwebsockets/all/test_package/test_package.c b/recipes/libwebsockets/all/test_package/test_package.c index e09bc89a8abe9..a76a8da0d85c5 100644 --- a/recipes/libwebsockets/all/test_package/test_package.c +++ b/recipes/libwebsockets/all/test_package/test_package.c @@ -4,89 +4,8 @@ #include "libwebsockets.h" -static struct lws *web_socket = NULL; - -#define EXAMPLE_RX_BUFFER_BYTES (10) - -static int callback_example( struct lws *wsi, enum lws_callback_reasons reason, void *user, void *in, size_t len ) -{ - switch( reason ) - { - case LWS_CALLBACK_CLIENT_ESTABLISHED: - lws_callback_on_writable( wsi ); - break; - - case LWS_CALLBACK_CLIENT_RECEIVE: - /* Handle incomming messages here. */ - break; - - case LWS_CALLBACK_CLIENT_WRITEABLE: - { - unsigned char buf[LWS_SEND_BUFFER_PRE_PADDING + EXAMPLE_RX_BUFFER_BYTES + LWS_SEND_BUFFER_POST_PADDING]; - unsigned char *p = &buf[LWS_SEND_BUFFER_PRE_PADDING]; - size_t n = sprintf( (char *)p, "%u", rand() ); - lws_write( wsi, p, n, LWS_WRITE_TEXT ); - break; - } - - case LWS_CALLBACK_CLOSED: - case LWS_CALLBACK_CLIENT_CONNECTION_ERROR: - web_socket = NULL; - break; - - default: - break; - } - - return 0; -} - -enum protocols -{ - PROTOCOL_EXAMPLE = 0, - PROTOCOL_COUNT -}; - -static struct lws_protocols protocols[] = -{ - { - "example-protocol", - callback_example, - 0, - EXAMPLE_RX_BUFFER_BYTES, - }, - { NULL, NULL, 0, 0 } /* terminator */ -}; - -int main( int argc, char *argv[] ) -{ - struct lws_context_creation_info info; - memset( &info, 0, sizeof(info) ); - - info.port = CONTEXT_PORT_NO_LISTEN; - info.protocols = protocols; - info.gid = -1; - info.uid = -1; - - struct lws_context *context = lws_create_context( &info ); - - /* Connect if we are not connected to the server. */ - struct lws_client_connect_info ccinfo = {0}; - ccinfo.context = context; - ccinfo.address = "localhost"; - ccinfo.port = 8000; - ccinfo.path = "/"; - ccinfo.host = lws_canonical_hostname( context ); - ccinfo.origin = "origin"; - ccinfo.protocol = protocols[PROTOCOL_EXAMPLE].name; - web_socket = lws_client_connect_via_info(&ccinfo); - - /* Send a random number to the server every second. */ - lws_callback_on_writable( web_socket ); - - lws_service( context, /* timeout_ms = */ 250 ); - - lws_context_destroy( context ); - +int main() { + const char* lws_version = lws_get_library_version(); + printf("libwebsocket version: %s\n", lws_version); return 0; } diff --git a/recipes/libwebsockets/config.yml b/recipes/libwebsockets/config.yml index f20bf16edc50b..35cfe962e4082 100644 --- a/recipes/libwebsockets/config.yml +++ b/recipes/libwebsockets/config.yml @@ -9,9 +9,3 @@ versions: folder: all "4.2.0": folder: all - "4.1.6": - folder: all - "4.1.4": - folder: all - "4.0.15": - folder: all diff --git a/recipes/libx264/all/conandata.yml b/recipes/libx264/all/conandata.yml index 394a54354a73d..f92af6ff75c03 100644 --- a/recipes/libx264/all/conandata.yml +++ b/recipes/libx264/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "cci.20240224": + url: "https://code.videolan.org/videolan/x264/-/archive/7241d020118bb09cc0ad119d7bc9f630a1caad10/x264-7241d020118bb09cc0ad119d7bc9f630a1caad10.tar.bz2" + sha256: "5417c167a69cc19db044c227163f9b9b1dface9fca361a3e83d5417f8e304dd6" "cci.20220602": url: "https://code.videolan.org/videolan/x264/-/archive/baee400fa9ced6f5481a728138fed6e867b0ff7f/x264-baee400fa9ced6f5481a728138fed6e867b0ff7f.tar.bz2" sha256: "ce6623b8b289765daee04a297c2fd1a293cb2565a1749c76d66c8d72c7ddc1ab" diff --git a/recipes/libx264/all/conanfile.py b/recipes/libx264/all/conanfile.py index 3312e7972a7a4..87ce8800e9d4e 100644 --- a/recipes/libx264/all/conanfile.py +++ b/recipes/libx264/all/conanfile.py @@ -115,25 +115,29 @@ def generate(self): if cross_building(self): if self.settings.os == "Android": - # the as of ndk does not work well for building libx264 - env = Environment() + buildenv_vars = VirtualBuildEnv(self).vars() + ndk_root = self.conf.get("tools.android:ndk_path", buildenv_vars.get("NDK_ROOT")) + + # INFO: Conan package android-ndk does not expose toolchain path. Looks fragile but follows always same for Android NDK + build_os = {"Linux": "linux", "Macos": "darwin", "Windows": "windows"}.get(str(self._settings_build.os)) + toolchain = os.path.join(ndk_root, "toolchains", "llvm", "prebuilt", f"{build_os}-{self._settings_build.arch}") + + sysroot = self.conf.get("tools.build:sysroot", buildenv_vars.get("SYSROOT", f"{toolchain}/sysroot")) + # INFO: x264 will look for strings appended to the cross prefix + cross_prefix = os.path.join(toolchain, "bin", "llvm-") compilers_from_conf = self.conf.get("tools.build:compiler_executables", default={}, check_type=dict) - buildenv_vars = VirtualBuildEnv(self).vars() - cc = compilers_from_conf.get("c", buildenv_vars.get("CC", "clang-cl")) - env.define("AS", cc) - - ndk_root = self.conf.get("tools.android:ndk_path") - - arch = { - "armv7": "arm", - "armv8": "aarch64", - "x86": "i686", - "x86_64": "x86_64", - }.get(str(self.settings.arch)) - abi = "androideabi" if self.settings.arch == "armv7" else "android" - args["--cross-prefix"] = f"{ndk_root}/bin/{arch}-linux-{abi}-" - env.vars(self).save_script("conanbuild_android") + + args["--build"] = None # --build is not recognized + args["--cross-prefix"] = cross_prefix + args["--sysroot"] = sysroot + + # the as of ndk does not work well for building libx264 + env = Environment() + cc_as = compilers_from_conf.get("c", buildenv_vars.get("AS", "clang")) + env.define("AS", cc_as) + env_vars = env.vars(self, scope="build") + env_vars.save_script("conanbuild_android") if is_msvc(self): env = Environment() diff --git a/recipes/libx264/config.yml b/recipes/libx264/config.yml index be7607c4d1266..cce887c4b4859 100644 --- a/recipes/libx264/config.yml +++ b/recipes/libx264/config.yml @@ -1,4 +1,6 @@ versions: + "cci.20240224": + folder: all "cci.20220602": folder: all "20191217": diff --git a/recipes/libx265/all/conanfile.py b/recipes/libx265/all/conanfile.py index 677f51dce82b0..313852081c905 100644 --- a/recipes/libx265/all/conanfile.py +++ b/recipes/libx265/all/conanfile.py @@ -49,7 +49,8 @@ def config_options(self): del self.options.with_numa # FIXME: Disable assembly by default if host is arm and compiler apple-clang for the moment. # Indeed, apple-clang is not able to understand some asm instructions of libx265 - if self.settings.compiler == "apple-clang" and "arm" in self.settings.arch: + # FIXME: Disable assembly by default if host is Android for the moment. It fails to build + if (self.settings.compiler == "apple-clang" and "arm" in self.settings.arch) or self.settings.os == "Android": self.options.assembly = False def configure(self): @@ -63,10 +64,27 @@ def requirements(self): if self.options.get_safe("with_numa", False): self.requires("libnuma/2.0.14") + def validate_build(self): + if cross_building(self) and self.settings.os == "Android" and self.options.assembly: + # FIXME: x265 uses custom command to invoke clang to compile assembly files. + # clang++ -fPIC -c src/source/common/aarch64/mc-a.S -o mc-a.S.o + # FAILED: mc-a.S.o libx2f309356bd8526/b/build/Release/mc-a.S.o + # clang++ -fPIC -c src/source/common/aarch64/mc-a.S -o mc-a.S.o + # :11:9: error: unknown directive + # .func x265_pixel_avg_pp_4x4_neon + raise ConanInvalidConfiguration(f"{self.ref} fails to build with '&:assembly=True' for Android. Contributions are welcome.") + def validate(self): if self.options.shared and is_msvc(self) and is_msvc_static_runtime(self): raise ConanInvalidConfiguration("shared not supported with static runtime") + if self.settings.compiler == "apple-clang" and "arm" in self.settings.arch and self.options.assembly: + # Undefined symbols for architecture arm64: + # "x265::setupAssemblyPrimitives(x265::EncoderPrimitives&, int)", referenced from: + # x265::x265_setup_primitives(x265_param*) in libx265.a[20](primitives.cpp.o) + # ld: symbol(s) not found for architecture arm64 + raise ConanInvalidConfiguration(f"{self.ref} fails to build for Mac M1. Contributions are welcome.") + def build_requirements(self): if self.options.assembly: if self.settings.arch in ["x86", "x86_64"]: @@ -154,7 +172,10 @@ def package_info(self): if not self.options.shared: self.cpp_info.sharedlinkflags = ["-Wl,-Bsymbolic,-znoexecstack"] elif self.settings.os == "Android": - self.cpp_info.libs.extend(["dl", "m"]) - libcxx = stdcpp_library(self) - if libcxx: - self.cpp_info.system_libs.append(libcxx) + self.cpp_info.system_libs.extend(["dl", "m"]) + if not self.options.shared: + libcxx = stdcpp_library(self) + if libcxx: + if self.settings.os == "Android" and self.settings.compiler.libcxx == "c++_static": + self.cpp_info.system_libs.append("c++abi") + self.cpp_info.system_libs.append(libcxx) diff --git a/recipes/libxlsxwriter/all/conandata.yml b/recipes/libxlsxwriter/all/conandata.yml index 2cd855a6df663..0ea86bf27abee 100644 --- a/recipes/libxlsxwriter/all/conandata.yml +++ b/recipes/libxlsxwriter/all/conandata.yml @@ -1,4 +1,10 @@ sources: + "1.1.9": + url: "https://github.com/jmcnamara/libxlsxwriter/archive/v1.1.9.tar.gz" + sha256: "03ae330d50f74c8a70be0b06b52bd50868f7cd1251ed040fe3b68d1ad6fd11dc" + "1.1.8": + url: "https://github.com/jmcnamara/libxlsxwriter/archive/v1.1.8.tar.gz" + sha256: "122c98353e5b69284a1cd782be7ae67bdefde2146f8197ef89a1aaf886058e86" "1.1.7": url: "https://github.com/jmcnamara/libxlsxwriter/archive/RELEASE_1.1.7.tar.gz" sha256: "1f378e25d8bb5be258d3e04d3d24b8c23ff21bf206e6e206661844a96ca25eda" @@ -15,6 +21,14 @@ sources: url: "https://github.com/jmcnamara/libxlsxwriter/archive/RELEASE_1.0.0.tar.gz" sha256: "8b353379333c323d14a9d265cd2491d3a6c0032c8d6ec2141f10b82ab66a087c" patches: + "1.1.9": + - patch_file: "patches/1.1.9-0001-fix-cmake.patch" + patch_description: "Fix CMake: disable pkgconfig & avoid some hardcoded flags" + patch_type: "conan" + "1.1.8": + - patch_file: "patches/1.1.7-0001-fix-cmake.patch" + patch_description: "Fix CMake: robust dependencies discovery & avoid some hardcoded flags" + patch_type: "conan" "1.1.7": - patch_file: "patches/1.1.7-0001-fix-cmake.patch" patch_description: "Fix CMake: robust dependencies discovery & avoid some hardcoded flags" diff --git a/recipes/libxlsxwriter/all/conanfile.py b/recipes/libxlsxwriter/all/conanfile.py index 1c65ddbb9e247..fa8e3e538ed45 100644 --- a/recipes/libxlsxwriter/all/conanfile.py +++ b/recipes/libxlsxwriter/all/conanfile.py @@ -11,11 +11,11 @@ class LibxlsxwriterConan(ConanFile): name = "libxlsxwriter" + description = "A C library for creating Excel XLSX files" license = "BSD-2-Clause" url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/jmcnamara/libxlsxwriter" topics = ("excel", "xlsx") - description = "A C library for creating Excel XLSX files" package_type = "library" settings = "os", "arch", "compiler", "build_type" @@ -65,8 +65,7 @@ def validate(self): raise ConanInvalidConfiguration(f"{self.name}:md5=openssl is not suppported in {self.ref}") def source(self): - get(self, **self.conan_data["sources"][self.version], - destination=self.source_folder, strip_root=True) + get(self, **self.conan_data["sources"][self.version], strip_root=True) def generate(self): tc = CMakeToolchain(self) @@ -83,6 +82,8 @@ def generate(self): tc.variables["USE_STATIC_MSVC_RUNTIME"] = is_msvc_static_runtime(self) tc.generate() deps = CMakeDeps(self) + if Version(self.version) >= "1.1.9": + deps.set_property("minizip", "cmake_additional_variables_prefixes", ["MINIZIP"]) deps.generate() def build(self): diff --git a/recipes/libxlsxwriter/all/patches/1.1.9-0001-fix-cmake.patch b/recipes/libxlsxwriter/all/patches/1.1.9-0001-fix-cmake.patch new file mode 100644 index 0000000000000..629e8a20aa61d --- /dev/null +++ b/recipes/libxlsxwriter/all/patches/1.1.9-0001-fix-cmake.patch @@ -0,0 +1,25 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index e444dcc..44a638d 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -183,9 +183,9 @@ endif() + + if(NOT BUILD_SHARED_LIBS) + if(UNIX) +- set(CMAKE_POSITION_INDEPENDENT_CODE ON) ++# set(CMAKE_POSITION_INDEPENDENT_CODE ON) + elseif(MINGW OR MSYS) +- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -static -static-libgcc -Wno-char-subscripts -Wno-long-long") ++ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-char-subscripts -Wno-long-long") + list(APPEND LXW_PRIVATE_COMPILE_DEFINITIONS USE_FILE32API) + elseif(MSVC) + set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /Fd\"${CMAKE_BINARY_DIR}/${PROJECT_NAME}.pdb\"") +@@ -208,7 +208,7 @@ if(MSVC AND USE_STATIC_MSVC_RUNTIME) + endif() + + # Configure pkg-config +-find_package(PkgConfig) ++# find_package(PkgConfig) + file(READ "include/xlsxwriter.h" ver) + + string(REGEX MATCH "LXW_VERSION \"([^\"]+)\"" _ ${ver}) diff --git a/recipes/libxlsxwriter/config.yml b/recipes/libxlsxwriter/config.yml index 5eb935f412b85..62ca2e89bd627 100644 --- a/recipes/libxlsxwriter/config.yml +++ b/recipes/libxlsxwriter/config.yml @@ -1,4 +1,8 @@ versions: + "1.1.9": + folder: "all" + "1.1.8": + folder: "all" "1.1.7": folder: "all" "1.1.5": diff --git a/recipes/libxml2/all/conandata.yml b/recipes/libxml2/all/conandata.yml index a0070b6bc4a60..c069bc0bd33b1 100644 --- a/recipes/libxml2/all/conandata.yml +++ b/recipes/libxml2/all/conandata.yml @@ -1,22 +1,19 @@ sources: - "2.12.5": - url: "https://download.gnome.org/sources/libxml2/2.12/libxml2-2.12.5.tar.xz" - sha256: "a972796696afd38073e0f59c283c3a2f5a560b5268b4babc391b286166526b21" + "2.13.4": + url: "https://download.gnome.org/sources/libxml2/2.13/libxml2-2.13.4.tar.xz" + sha256: "65d042e1c8010243e617efb02afda20b85c2160acdbfbcb5b26b80cec6515650" + "2.12.9": + url: "https://download.gnome.org/sources/libxml2/2.12/libxml2-2.12.9.tar.xz" + sha256: "59912db536ab56a3996489ea0299768c7bcffe57169f0235e7f962a91f483590" "2.12.4": url: "https://download.gnome.org/sources/libxml2/2.12/libxml2-2.12.4.tar.xz" sha256: "497360e423cf0bd99eacdb7c6215dea92e6d6e89ee940393c2bae0e77cb9b7d0" "2.12.3": url: "https://download.gnome.org/sources/libxml2/2.12/libxml2-2.12.3.tar.xz" sha256: "8c8f1092340a89ff32bc44ad5c9693aff9bc8a7a3e161bb239666e5d15ac9aaa" - "2.12.2": - url: "https://download.gnome.org/sources/libxml2/2.12/libxml2-2.12.2.tar.xz" - sha256: "3f2e6464fa15073eb8f3d18602d54fafc489b7715171064615a40490c6be9f4f" - "2.12.1": - url: "https://download.gnome.org/sources/libxml2/2.12/libxml2-2.12.1.tar.xz" - sha256: "8982b9ccdf7f456e30d8f7012d50858c6623e495333b6191def455c7e95427eb" - "2.11.7": - url: "https://download.gnome.org/sources/libxml2/2.11/libxml2-2.11.7.tar.xz" - sha256: "fb27720e25eaf457f94fd3d7189bcf2626c6dccf4201553bc8874d50e3560162" + "2.11.9": + url: "https://download.gnome.org/sources/libxml2/2.11/libxml2-2.11.9.tar.xz" + sha256: "780157a1efdb57188ec474dca87acaee67a3a839c2525b2214d318228451809f" "2.11.6": url: "https://download.gnome.org/sources/libxml2/2.11/libxml2-2.11.6.tar.xz" sha256: "c90eee7506764abbe07bb616b82da452529609815aefef423d66ef080eb0c300" @@ -32,9 +29,6 @@ sources: "2.9.14": url: "https://download.gnome.org/sources/libxml2/2.9/libxml2-2.9.14.tar.xz" sha256: "60d74a257d1ccec0475e749cba2f21559e48139efba6ff28224357c7c798dfee" - "2.9.13": - url: "https://download.gnome.org/sources/libxml2/2.9/libxml2-2.9.13.tar.xz" - sha256: "276130602d12fe484ecc03447ee5e759d0465558fbc9d6bd144e3745306ebf0e" "2.9.12": url: "https://download.gnome.org/sources/libxml2/2.9/libxml2-2.9.12.tar.xz" sha256: "28a92f6ab1f311acf5e478564c49088ef0ac77090d9c719bbc5d518f1fe62eb9" diff --git a/recipes/libxml2/all/conanfile.py b/recipes/libxml2/all/conanfile.py index ec0a90e4ddd03..6ab1df68617ff 100644 --- a/recipes/libxml2/all/conanfile.py +++ b/recipes/libxml2/all/conanfile.py @@ -83,6 +83,8 @@ def config_options(self): del self.options.docbook if Version(self.version) >= "2.11.0": self.options.rm_safe("run-debug") + if Version(self.version) >= "2.13.0": + self.options.rm_safe("mem-debug") def configure(self): if self.options.shared: @@ -346,8 +348,8 @@ def _create_cmake_module_variables(self, module_file): set(LIBXML2_INCLUDE_DIR ${{LibXml2_INCLUDE_DIRS}}) set(LIBXML2_INCLUDE_DIRS ${{LibXml2_INCLUDE_DIRS}}) elseif(DEFINED libxml2_INCLUDE_DIRS) - set(LIBXML2_LIBRARIES ${{libxml2_INCLUDE_DIRS}}) - set(LIBXML2_LIBRARY ${{libxml2_INCLUDE_DIRS}}) + set(LIBXML2_INCLUDE_DIR ${{libxml2_INCLUDE_DIRS}}) + set(LIBXML2_INCLUDE_DIRS ${{libxml2_INCLUDE_DIRS}}) endif() if(DEFINED LibXml2_LIBRARIES) set(LIBXML2_LIBRARIES ${{LibXml2_LIBRARIES}}) @@ -398,6 +400,10 @@ def package_info(self): elif self.settings.os == "Windows": if self.options.ftp or self.options.http: self.cpp_info.system_libs.extend(["ws2_32", "wsock32"]) + if Version(self.version) >= "2.13.4": + # https://gitlab.gnome.org/GNOME/libxml2/-/issues/791 + # https://gitlab.gnome.org/GNOME/libxml2/-/blob/2.13/win32/Makefile.msvc?ref_type=heads#L84 + self.cpp_info.system_libs.append("bcrypt") # TODO: to remove in conan v2 once cmake_find_package* & pkg_config generators removed self.cpp_info.filenames["cmake_find_package"] = "LibXml2" diff --git a/recipes/libxml2/config.yml b/recipes/libxml2/config.yml index 1c968c066198a..bf2c99b1007bf 100644 --- a/recipes/libxml2/config.yml +++ b/recipes/libxml2/config.yml @@ -1,15 +1,13 @@ versions: - "2.12.5": + "2.13.4": + folder: all + "2.12.9": folder: all "2.12.4": folder: all "2.12.3": folder: all - "2.12.2": - folder: all - "2.12.1": - folder: all - "2.11.7": + "2.11.9": folder: all "2.11.6": folder: all @@ -21,8 +19,6 @@ versions: folder: all "2.9.14": folder: all - "2.9.13": - folder: all "2.9.12": folder: all "2.9.10": diff --git a/recipes/libxmlpp/all/conandata.yml b/recipes/libxmlpp/all/conandata.yml index b93f808923cc5..9676ddd7ccf09 100644 --- a/recipes/libxmlpp/all/conandata.yml +++ b/recipes/libxmlpp/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "5.4.0": + url: "https://github.com/libxmlplusplus/libxmlplusplus/releases/download/5.4.0/libxml++-5.4.0.tar.xz" + sha256: "e9a23c436686a94698d2138e6bcbaf849121d63bfa0f50dc34fefbfd79566848" "5.2.0": url: "https://github.com/libxmlplusplus/libxmlplusplus/releases/download/5.2.0/libxml++-5.2.0.tar.xz" sha256: "e41b8eae55210511585ae638615f00db7f982c0edea94699865f582daf03b44f" @@ -8,9 +11,6 @@ sources: "5.0.1": url: "https://github.com/libxmlplusplus/libxmlplusplus/releases/download/5.0.1/libxml++-5.0.1.tar.xz" sha256: "15c38307a964fa6199f4da6683a599eb7e63cc89198545b36349b87cf9aa0098" - "2.42.1": - url: "https://github.com/libxmlplusplus/libxmlplusplus/releases/download/2.42.1/libxml++-2.42.1.tar.xz" - sha256: "9b59059abe5545d28ceb388a55e341095f197bd219c73e6623aeb6d801e00be8" patches: "5.2.0": - patch_file: "patches/5.2.0-0001-enable_static_builds_on_msvc.patch" @@ -27,8 +27,3 @@ patches: patch_type: "portability" patch_description: "Manage dllexport correctly to be able to build static libraries on MSVC" patch_source: "https://github.com/libxmlplusplus/libxmlplusplus/commit/2a2825c67a30ea34f3514659bfd91111db8e009d.patch" - "2.42.1": - - patch_file: "patches/2.42.1-0001-enable_static_builds_on_msvc.patch" - patch_type: "portability" - patch_description: "Manage dllexport correctly to be able to build static libraries on MSVC" - patch_source: "https://github.com/libxmlplusplus/libxmlplusplus/commit/2a2825c67a30ea34f3514659bfd91111db8e009d.patch" diff --git a/recipes/libxmlpp/all/conanfile.py b/recipes/libxmlpp/all/conanfile.py index b79b459f36df3..8c526bf0e516c 100644 --- a/recipes/libxmlpp/all/conanfile.py +++ b/recipes/libxmlpp/all/conanfile.py @@ -34,9 +34,25 @@ class LibXMLPlusPlus(ConanFile): "fPIC": True, } + @property + def _min_cppstd(self): + return "17" if Version(self.version) >= "5.4.0" else "11" + + @property + def _compilers_minimum_version(self): + return { + "17": { + "gcc": "8", + "clang": "7", + "apple-clang": "12", + "Visual Studio": "16", + "msvc": "192", + }, + }.get(self._min_cppstd, {}) + @property def _lib_version(self): - return "2.6" if Version(self.version) <= "2.42.1" else "5.0" + return "5.0" def export_sources(self): export_conandata_patches(self) @@ -53,31 +69,24 @@ def layout(self): basic_layout(self, src_folder="src") def requirements(self): - self.requires("libxml2/2.12.4") - if Version(self.version) <= "2.42.1": - self.requires("glibmm/2.66.4", transitive_headers=True, transitive_libs=True) - else: - self.requires("glibmm/2.75.0") + self.requires("libxml2/[>=2.12.5 <3]") + self.requires("glibmm/2.75.0") def validate(self): if hasattr(self, "settings_build") and cross_building(self): raise ConanInvalidConfiguration("Cross-building not implemented") - if Version(self.version) < "2.91.1": - from conan import conan_version - import sys - if conan_version.major == 2: - # FIXME: linter complains, but function is there - # https://docs.conan.io/2.0/reference/tools/build.html?highlight=check_min_cppstd#conan-tools-build-check-max-cppstd - check_max_cppstd = getattr(sys.modules['conan.tools.build'], 'check_max_cppstd') - # INFO: error: no template named 'auto_ptr' in namespace 'std'. Removed in C++17. - check_max_cppstd(self, 14) if self.settings.compiler.get_safe("cppstd"): - check_min_cppstd(self, 11) + check_min_cppstd(self, self._min_cppstd) + minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) + if minimum_version and Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration( + f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." + ) def build_requirements(self): - self.tool_requires("meson/1.3.1") + self.tool_requires("meson/[>=1.2.3 <2]") if not self.conf.get("tools.gnu:pkg_config", check_type=str): - self.tool_requires("pkgconf/2.1.0") + self.tool_requires("pkgconf/[>=2.2 <3]") def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) diff --git a/recipes/libxmlpp/all/patches/2.42.1-0001-enable_static_builds_on_msvc.patch b/recipes/libxmlpp/all/patches/2.42.1-0001-enable_static_builds_on_msvc.patch deleted file mode 100644 index 32d4ca9bbdc42..0000000000000 --- a/recipes/libxmlpp/all/patches/2.42.1-0001-enable_static_builds_on_msvc.patch +++ /dev/null @@ -1,47 +0,0 @@ -diff --git a/libxml++config.h.meson b/libxml++config.h.meson -index fdae143..5d853c2 100755 ---- a/libxml++config.h.meson -+++ b/libxml++config.h.meson -@@ -21,9 +21,16 @@ - /* Micro version number of libxml++. */ - #mesondefine LIBXMLXX_MICRO_VERSION - --#if defined (GLIBMM_DLL) && !defined (LIBXMLXX_STATIC) -+/* Defined if libxml++ is built as a static library. */ -+#mesondefine LIBXMLXX_STATIC -+ -+#if !defined (LIBXMLXX_STATIC) - #ifdef LIBXMLPP_BUILD -- #define LIBXMLPP_API __declspec(dllexport) -+ #ifdef __GNUC__ -+ #define LIBXMLPP_API __attribute__((visibility("default"))) -+ #else -+ #define LIBXMLPP_API __declspec(dllexport) -+ #endif - #elif !defined (__GNUC__) - #define LIBXMLPP_API __declspec(dllimport) - #else /* don't dllimport classes/methods on GCC/MinGW */ -diff --git a/meson.build b/meson.build -index e89f2c6..20d66ed 100644 ---- a/meson.build -+++ b/meson.build -@@ -292,15 +292,13 @@ endif - # Always set for backwards compatibility. - pkg_conf_data.set('LIBXMLCPP_EXCEPTIONS_ENABLED', 1) - -+if get_option('default_library') == 'static' -+ pkg_conf_data.set('LIBXMLXX_STATIC', 1) -+endif -+ - # Static library? - library_build_type = get_option('default_library') - --if cpp_compiler.get_argument_syntax() == 'msvc' -- if library_build_type == 'static' or library_build_type == 'both' -- error('Static builds are not supported by MSVC-style builds') -- endif --endif -- - configure_file( - input: 'libxml++-2.6.pc.in', - output: '@BASENAME@', diff --git a/recipes/libxmlpp/all/test_package/CMakeLists.txt b/recipes/libxmlpp/all/test_package/CMakeLists.txt index 082b48301a3b9..0e449196b865f 100644 --- a/recipes/libxmlpp/all/test_package/CMakeLists.txt +++ b/recipes/libxmlpp/all/test_package/CMakeLists.txt @@ -5,4 +5,8 @@ find_package(libxmlpp REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) target_link_libraries(${PROJECT_NAME} PRIVATE libxmlpp::libxmlpp) -target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) +if(libxmlpp_VERSION VERSION_GREATER_EQUAL "5.4.0") + target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) +else() + target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) +endif() diff --git a/recipes/libxmlpp/config.yml b/recipes/libxmlpp/config.yml index 9005a59d2fb31..f9ffdcfd89507 100644 --- a/recipes/libxmlpp/config.yml +++ b/recipes/libxmlpp/config.yml @@ -1,9 +1,9 @@ versions: + "5.4.0": + folder: all "5.2.0": folder: all "5.0.3": folder: all "5.0.1": folder: all - "2.42.1": - folder: all diff --git a/recipes/libxpm/all/CMakeLists.txt b/recipes/libxpm/all/CMakeLists.txt index 681dd5c613eec..94c9cd557b1f0 100644 --- a/recipes/libxpm/all/CMakeLists.txt +++ b/recipes/libxpm/all/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.15) project(libXpm VERSION "${CONAN_libXpm_VERSION}" LANGUAGES C) @@ -16,8 +16,7 @@ endif() # ---- Library ---- -add_library( - Xpm +add_library(Xpm src/Attrib.c src/CrBufFrI.c src/CrDatFrI.c @@ -41,15 +40,15 @@ add_library( src/WrFFrI.c ) -if(WIN32) - target_sources(Xpm PRIVATE windows/libXpm.def) - target_compile_definitions(Xpm PRIVATE FOR_MSW) -else() - target_sources( - Xpm PRIVATE +if(UNIX) + # Pixmap-related functions require X11 and are not available on Windows + target_sources(Xpm PRIVATE src/CrBufFrP.c src/CrDatFrP.c src/CrIFrP.c + src/CrPFrBuf.c + src/CrPFrDat.c + src/CrPFrI.c src/RdFToP.c src/WrFFrP.c ) @@ -57,6 +56,11 @@ else() target_link_libraries(Xpm PRIVATE "${X11_LIBRARY}") endif() +if(WIN32) + set_target_properties(Xpm PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS TRUE) + target_compile_definitions(Xpm PRIVATE FOR_MSW) +endif() + if(MSVC) target_compile_definitions( Xpm PRIVATE @@ -68,6 +72,14 @@ endif() target_include_directories(Xpm PRIVATE include/X11) +if(NOT WIN32) + target_compile_definitions(Xpm PRIVATE + # Build without the --enable-open-zfile option: + # https://gitlab.freedesktop.org/xorg/lib/libxpm/-/blob/libXpm-3.5.17/configure.ac?ref_type=tags#L67-88 + NO_ZPIPE + ) +endif() + set_target_properties( Xpm PROPERTIES VERSION "${PROJECT_VERSION}" diff --git a/recipes/libxpm/all/conandata.yml b/recipes/libxpm/all/conandata.yml index 3db82178c2eeb..0c9046c699ed9 100644 --- a/recipes/libxpm/all/conandata.yml +++ b/recipes/libxpm/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "3.5.17": + url: "https://gitlab.freedesktop.org/xorg/lib/libxpm/-/archive/libXpm-3.5.17/libxpm-libXpm-3.5.17.tar.gz" + sha256: "c63123e2de511edac5df33425a3a3b292e06973198c94470c454a9c973f211f6" "3.5.13": + url: "https://gitlab.freedesktop.org/xorg/lib/libxpm/-/archive/libXpm-3.5.13/libxpm-libXpm-3.5.13.tar.gz" sha256: "516fcb7a3cc5b491ca2b95df29018b1643c40649d72473d3c62379d8fdc472ff" - url: https://gitlab.freedesktop.org/xorg/lib/libxpm/-/archive/libXpm-3.5.13/libxpm-libXpm-3.5.13.tar.gz diff --git a/recipes/libxpm/all/conanfile.py b/recipes/libxpm/all/conanfile.py index 0312deadc10a9..19a22b67425e0 100644 --- a/recipes/libxpm/all/conanfile.py +++ b/recipes/libxpm/all/conanfile.py @@ -26,15 +26,9 @@ class LibXpmConan(ConanFile): "shared": False, "fPIC": True, } - no_copy_source = True def export_sources(self): - copy(self, "CMakeLists.txt", - src=self.recipe_folder, - dst=os.path.join(self.export_sources_folder, "src")) - copy(self, "*", - src=os.path.join(self.recipe_folder, "windows"), - dst=os.path.join(self.export_sources_folder, "src", "windows")) + copy(self, "CMakeLists.txt", self.recipe_folder, os.path.join(self.export_sources_folder, "src")) def config_options(self): if self.settings.os == "Windows": @@ -62,7 +56,7 @@ def source(self): def generate(self): tc = CMakeToolchain(self) - tc.variables["CONAN_libXpm_VERSION"] = self.version + tc.cache_variables["CONAN_libXpm_VERSION"] = self.version tc.generate() def build(self): diff --git a/recipes/libxpm/all/windows/libXpm.def b/recipes/libxpm/all/windows/libXpm.def deleted file mode 100644 index 5381386ee75ee..0000000000000 --- a/recipes/libxpm/all/windows/libXpm.def +++ /dev/null @@ -1,29 +0,0 @@ -EXPORTS - -XpmCreateImageFromData -XpmCreateDataFromImage -XpmReadFileToImage -XpmWriteFileFromImage -XpmCreateImageFromBuffer -XpmReadFileToBuffer -XpmWriteFileFromBuffer -XpmReadFileToData -XpmWriteFileFromData -XpmAttributesSize -XpmFreeAttributes -XpmFreeExtensions -XpmFreeXpmImage -XpmFreeXpmInfo -XpmGetErrorString -XpmLibraryVersion - -XpmReadFileToXpmImage -XpmWriteFileFromXpmImage -XpmCreateImageFromXpmImage -XpmCreateXpmImageFromImage -XpmCreateDataFromXpmImage -XpmCreateXpmImageFromData -XpmCreateXpmImageFromBuffer -XpmCreateBufferFromXpmImage - -XpmFree diff --git a/recipes/libxpm/config.yml b/recipes/libxpm/config.yml index 96f25a4bd1d23..9876f21755330 100644 --- a/recipes/libxpm/config.yml +++ b/recipes/libxpm/config.yml @@ -1,3 +1,5 @@ versions: + "3.5.17": + folder: all "3.5.13": folder: all diff --git a/recipes/libxshmfence/all/conandata.yml b/recipes/libxshmfence/all/conandata.yml index 8c16f251fa486..21938ecba1296 100644 --- a/recipes/libxshmfence/all/conandata.yml +++ b/recipes/libxshmfence/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.3.2": + url: "https://www.x.org/archive/individual/lib/libxshmfence-1.3.2.tar.gz" + sha256: "e93a85099604beb244ee756dcaf70e18b08701c1ca84c4de0126cd71bd6c8181" "1.3": - url: "https://www.x.org/archive//individual/lib/libxshmfence-1.3.tar.gz" + url: "https://www.x.org/archive/individual/lib/libxshmfence-1.3.tar.gz" sha256: "7eb3d46ad91bab444f121d475b11b39273142d090f7e9ac43e6a87f4ff5f902c" diff --git a/recipes/libxshmfence/config.yml b/recipes/libxshmfence/config.yml index d2eb4ed4a511f..5fbc1fce7e8d6 100644 --- a/recipes/libxshmfence/config.yml +++ b/recipes/libxshmfence/config.yml @@ -1,3 +1,5 @@ versions: + "1.3.2": + folder: all "1.3": folder: all diff --git a/recipes/libxslt/all/conandata.yml b/recipes/libxslt/all/conandata.yml index c4c2c71816465..d43b2343523d6 100644 --- a/recipes/libxslt/all/conandata.yml +++ b/recipes/libxslt/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.1.42": + sha256: "85ca62cac0d41fc77d3f6033da9df6fd73d20ea2fc18b0a3609ffb4110e1baeb" + url: "https://download.gnome.org/sources/libxslt/1.1/libxslt-1.1.42.tar.xz" "1.1.39": sha256: "2a20ad621148339b0759c4d4e96719362dee64c9a096dbba625ba053846349f0" url: "https://download.gnome.org/sources/libxslt/1.1/libxslt-1.1.39.tar.xz" diff --git a/recipes/libxslt/all/conanfile.py b/recipes/libxslt/all/conanfile.py index 711c11f5938b0..5e1f29e0b7b60 100644 --- a/recipes/libxslt/all/conanfile.py +++ b/recipes/libxslt/all/conanfile.py @@ -60,9 +60,12 @@ def layout(self): basic_layout(self, src_folder="src") def requirements(self): - if Version(self.version) >= "1.1.39": + if Version(self.version) >= "1.1.42": + self.requires("libxml2/[>=2.12.5 <3]", transitive_headers=True, transitive_libs=True) + elif Version(self.version) >= "1.1.39": # see https://github.com/conan-io/conan-center-index/pull/16205#discussion_r1149570846 - self.requires("libxml2/2.12.3", transitive_headers=True, transitive_libs=True) + # Older versions use deprecated functions that were removed in libxml2 2.13 + self.requires("libxml2/[>=2.12.5 <2.13]", transitive_headers=True, transitive_libs=True) else: self.requires("libxml2/2.11.6", transitive_headers=True, transitive_libs=True) @@ -225,6 +228,8 @@ def package_info(self): self.cpp_info.components["exslt"].set_property("pkg_config_name", "libexslt") self.cpp_info.components["exslt"].libs = [f"{prefix}exslt{suffix}"] self.cpp_info.components["exslt"].requires = ["xslt"] + if not self.options.shared: + self.cpp_info.components["exslt"].defines = ["LIBEXSLT_STATIC"] # TODO: to remove in conan v2 once cmake_find_package* & pkg_config generators removed self.cpp_info.names["cmake_find_package"] = "LibXslt" diff --git a/recipes/libxslt/config.yml b/recipes/libxslt/config.yml index d65db35f37aec..8628ebacf1c45 100644 --- a/recipes/libxslt/config.yml +++ b/recipes/libxslt/config.yml @@ -1,4 +1,6 @@ versions: + "1.1.42": + folder: all "1.1.39": folder: all "1.1.37": diff --git a/recipes/libyang/all/conandata.yml b/recipes/libyang/all/conandata.yml new file mode 100644 index 0000000000000..f8459393ddff0 --- /dev/null +++ b/recipes/libyang/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "2.1.148": + url: "https://github.com/CESNET/libyang/archive/refs/tags/v2.1.148.tar.gz" + sha256: "77a0aaaeb3df720aeb70d6896e32e2c2be099d48df73e3cfb52567051af3e44b" diff --git a/recipes/libyang/all/conanfile.py b/recipes/libyang/all/conanfile.py new file mode 100644 index 0000000000000..2567464f94618 --- /dev/null +++ b/recipes/libyang/all/conanfile.py @@ -0,0 +1,82 @@ +import os + +from conan import ConanFile +from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout, CMakeDeps +from conan.tools.files import get, rmdir, copy +from conan.errors import ConanInvalidConfiguration + +required_conan_version = ">=1.53.0" + + +class LibYangConan(ConanFile): + name = "libyang" + license = "BSD-3-Clause" + url = "https://github.com/conan-io/conan-center-index" + description = "YANG data modeling language library" + homepage = "https://github.com/CESNET/libyang" + topics = ("yang", "bsd", "netconf", "restconf", "yin") + settings = "os", "compiler", "build_type", "arch" + options = {"shared": [True, False], + "fPIC": [True, False]} + default_options = { + "shared": False, + "fPIC": True + } + + + def validate(self): + # TODO For Windows support: https://github.com/CESNET/libyang?tab=readme-ov-file#windows-build-requirements + # CMake Error at CMakeLists.txt:386 (find_package): + # By not providing "Findpthreads.cmake" in CMAKE_MODULE_PATH this project has + if self.settings.os == "Windows": + raise ConanInvalidConfiguration( + f"{self.ref} Conan recipe is not prepared to work on Windows. Contributions are welcome.") + + def requirements(self): + self.requires("pcre2/10.42", transitive_headers=True) + + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + self.settings.rm_safe("compiler.cppstd") + self.settings.rm_safe("compiler.libcxx") + + def layout(self): + cmake_layout(self, src_folder="src") + + def source(self): + get(self, **self.conan_data["sources"][self.version], + destination=self.source_folder, strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + tc.variables["ENABLE_TESTS"] = False + tc.variables["ENABLE_VALGRIND_TESTS"] = False + tc.variables["ENABLE_STATIC"] = not self.options.shared + tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0077"] = "NEW" + tc.generate() + tc = CMakeDeps(self) + tc.generate() + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def package(self): + copy(self, "LICENSE", self.source_folder, + os.path.join(self.package_folder, "licenses")) + cmake = CMake(self) + cmake.install() + rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) + # move *.yang files from /share to /res + copy(self, "*.yang", os.path.join(self.package_folder, "share"), + os.path.join(self.package_folder, "res", "share")) + rmdir(self, os.path.join(self.package_folder, "share")) + + def package_info(self): + self.cpp_info.set_property("cmake_file_name", "LibYANG") + self.cpp_info.libs = ["yang"] + self.cpp_info.resdirs = ["res"] + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.system_libs.extend(["pthread", "dl", "m"]) diff --git a/recipes/libyang/all/test_package/CMakeLists.txt b/recipes/libyang/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..2a5a447e67b6b --- /dev/null +++ b/recipes/libyang/all/test_package/CMakeLists.txt @@ -0,0 +1,7 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package C) + +find_package(LibYANG REQUIRED) + +add_executable(${PROJECT_NAME} test_package.c) +target_link_libraries(${PROJECT_NAME} PRIVATE libyang::libyang) diff --git a/recipes/libyang/all/test_package/conanfile.py b/recipes/libyang/all/test_package/conanfile.py new file mode 100644 index 0000000000000..ec1844a785913 --- /dev/null +++ b/recipes/libyang/all/test_package/conanfile.py @@ -0,0 +1,27 @@ +import os + +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake + + +class TestPackageConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/libyang/all/test_package/test_package.c b/recipes/libyang/all/test_package/test_package.c new file mode 100644 index 0000000000000..b892125a1218e --- /dev/null +++ b/recipes/libyang/all/test_package/test_package.c @@ -0,0 +1,11 @@ +#include + +int main() +{ + struct ly_ctx *ctx = NULL; + if ( ly_ctx_new( NULL, 0, &ctx ) ) + { + return 1; + } + return 0; +} diff --git a/recipes/libyang/config.yml b/recipes/libyang/config.yml new file mode 100644 index 0000000000000..78864b67abe0f --- /dev/null +++ b/recipes/libyang/config.yml @@ -0,0 +1,3 @@ +versions: + "2.1.148": + folder: "all" diff --git a/recipes/libyuv/all/conandata.yml b/recipes/libyuv/all/conandata.yml index 3b9b5764537d0..f89be505198c3 100644 --- a/recipes/libyuv/all/conandata.yml +++ b/recipes/libyuv/all/conandata.yml @@ -1,6 +1,8 @@ # Versions from LIBYUV_VERSION definition in include/libyuv/version.h # Pay attention to package commits incrementing this definition sources: + "1892": + url: "https://chromium.googlesource.com/libyuv/libyuv/+archive/4cd90347e78ff76755df2107009e900374aee9cd.tar.gz" "1880": url: "https://chromium.googlesource.com/libyuv/libyuv/+archive/fb6341d326846fbbe669ad5173e520f66b339621.tar.gz" "1854": @@ -12,6 +14,13 @@ sources: "1768": url: "https://chromium.googlesource.com/libyuv/libyuv/+archive/dfaf7534e0e536f7e5ef8ddd7326797bd09b8622.tar.gz" patches: + "1892": + - patch_file: "patches/1892-0001-fix-cmake.patch" + patch_description: "Fix CMake to be more robust & predictable" + patch_type: "conan" + - patch_file: "patches/1892-0001-check-arm-sve.patch" + patch_description: "Check if -march=armv9-a+sve2 is supported" + patch_type: "conan" "1880": - patch_file: "patches/1880-0001-fix-cmake.patch" patch_description: "Fix CMake to be more robust & predictable" diff --git a/recipes/libyuv/all/conanfile.py b/recipes/libyuv/all/conanfile.py index 4d851737efc1b..2452cb8e27058 100644 --- a/recipes/libyuv/all/conanfile.py +++ b/recipes/libyuv/all/conanfile.py @@ -1,7 +1,8 @@ from conan import ConanFile from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout -from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get +from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, replace_in_file from conan.tools.microsoft import is_msvc +from conan.tools.scm import Version import os required_conan_version = ">=1.53.0" @@ -50,9 +51,9 @@ def requirements(self): if self.options.with_jpeg == "libjpeg": self.requires("libjpeg/9e") elif self.options.with_jpeg == "libjpeg-turbo": - self.requires("libjpeg-turbo/3.0.1") + self.requires("libjpeg-turbo/[>=3.0.3 <4]") elif self.options.with_jpeg == "mozjpeg": - self.requires("mozjpeg/4.1.3") + self.requires("mozjpeg/4.1.5") def source(self): get(self, **self.conan_data["sources"][self.version]) @@ -65,8 +66,21 @@ def generate(self): deps = CMakeDeps(self) deps.generate() - def build(self): + def _patch_sources(self): apply_conandata_patches(self) + + # remove default CMAKE_POSITION_INDEPENDENT_CODE if not requested + use_fpic = self.options.get_safe("fPIC") or self.options.get_safe("shared") + if Version(self.version) >= "1892" and not use_fpic: + replace_in_file( + self, + os.path.join(self.source_folder, "CMakeLists.txt"), + "SET(CMAKE_POSITION_INDEPENDENT_CODE ON)", + "", + ) + + def build(self): + self._patch_sources() cmake = CMake(self) cmake.configure() cmake.build() diff --git a/recipes/libyuv/all/patches/1892-0001-check-arm-sve.patch b/recipes/libyuv/all/patches/1892-0001-check-arm-sve.patch new file mode 100644 index 0000000000000..c5fe4176018fc --- /dev/null +++ b/recipes/libyuv/all/patches/1892-0001-check-arm-sve.patch @@ -0,0 +1,48 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -107,25 +107,38 @@ if(NOT MSVC) + TARGET_COMPILE_OPTIONS(${ly_lib_name}_neon64 PRIVATE -march=armv8-a+dotprod+i8mm) + LIST(APPEND ly_lib_parts $) + +- # Enable AArch64 SVE kernels. +- ADD_LIBRARY(${ly_lib_name}_sve OBJECT +- ${ly_src_dir}/row_sve.cc) +- TARGET_COMPILE_OPTIONS(${ly_lib_name}_sve PRIVATE -march=armv9-a+sve2) +- LIST(APPEND ly_lib_parts $) +- + set(OLD_CMAKE_REQURED_FLAGS ${CMAKE_REQUIRED_FLAGS}) + set(OLD_CMAKE_TRY_COMPILE_TARGET_TYPE ${CMAKE_TRY_COMPILE_TARGET_TYPE}) +- set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -march=armv9-a+sme") ++ ++ set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQURED_FLAGS} -march=armv9-a+sve2") + set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY) ++ # Check whether the compiler can compile SVE functions; this fails ++ # with Clang for macOS. ++ check_c_source_compiles(" ++int main(void) { return 0; } ++ " CAN_COMPILE_SVE) ++ ++ set(CMAKE_REQUIRED_FLAGS "${OLD_CMAKE_REQURED_FLAGS} -march=armv9-a+sme") + # Check whether the compiler can compile SME functions; this fails + # with Clang for Windows. + check_c_source_compiles(" + __arm_locally_streaming void func(void) { } + int main(void) { return 0; } + " CAN_COMPILE_SME) ++ + set(CMAKE_REQUIRED_FLAGS ${OLD_CMAKE_REQURED_FLAGS}) + set(CMAKE_TRY_COMPILE_TARGET_TYPE ${OLD_CMAKE_TRY_COMPILE_TARGET_TYPE}) + ++ # Enable AArch64 SVE kernels. ++ if (CAN_COMPILE_SVE) ++ ADD_LIBRARY(${ly_lib_name}_sve OBJECT ++ ${ly_src_dir}/row_sve.cc) ++ TARGET_COMPILE_OPTIONS(${ly_lib_name}_sve PRIVATE -march=armv9-a+sve2) ++ LIST(APPEND ly_lib_parts $) ++ else() ++ ADD_DEFINITIONS(-DLIBYUV_DISABLE_SVE) ++ endif() ++ + if (CAN_COMPILE_SME) + # Enable AArch64 SME kernels. + ADD_LIBRARY(${ly_lib_name}_sme OBJECT diff --git a/recipes/libyuv/all/patches/1892-0001-fix-cmake.patch b/recipes/libyuv/all/patches/1892-0001-fix-cmake.patch new file mode 100644 index 0000000000000..9c6d556910436 --- /dev/null +++ b/recipes/libyuv/all/patches/1892-0001-fix-cmake.patch @@ -0,0 +1,67 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -4,8 +4,8 @@ + + include(CheckCSourceCompiles) + ++CMAKE_MINIMUM_REQUIRED( VERSION 3.8 ) + PROJECT ( YUV C CXX ) # "C" is required even for C++ projects +-CMAKE_MINIMUM_REQUIRED( VERSION 2.8.12 ) + OPTION( UNIT_TEST "Built unit tests" OFF ) + + SET ( ly_base_dir ${PROJECT_SOURCE_DIR} ) +@@ -139,15 +139,10 @@ int main(void) { return 0; } + endif() + + # this creates the static library (.a) +-ADD_LIBRARY( ${ly_lib_static} STATIC ${ly_lib_parts}) ++ADD_LIBRARY( ${ly_lib_static} ${ly_lib_parts}) ++target_compile_features(${ly_lib_static} PUBLIC cxx_std_11) + + # this creates the shared library (.so) +-ADD_LIBRARY( ${ly_lib_shared} SHARED ${ly_lib_parts}) +-SET_TARGET_PROPERTIES( ${ly_lib_shared} PROPERTIES OUTPUT_NAME "${ly_lib_name}" ) +-SET_TARGET_PROPERTIES( ${ly_lib_shared} PROPERTIES PREFIX "lib" ) +-if(WIN32) +- SET_TARGET_PROPERTIES( ${ly_lib_shared} PROPERTIES IMPORT_PREFIX "lib" ) +-endif() + + # this creates the cpuid tool + ADD_EXECUTABLE ( cpuid ${ly_base_dir}/util/cpuid.c ) +@@ -160,12 +155,18 @@ TARGET_LINK_LIBRARIES ( yuvconvert ${ly_lib_static} ) + # this creates the yuvconstants tool + ADD_EXECUTABLE ( yuvconstants ${ly_base_dir}/util/yuvconstants.c ) + TARGET_LINK_LIBRARIES ( yuvconstants ${ly_lib_static} ) ++include(CheckFunctionExists) ++check_function_exists(round HAVE_MATH_SYSTEM) ++if(NOT HAVE_MATH_SYSTEM) ++ target_link_libraries(yuvconstants m) ++endif() + +-find_package ( JPEG ) +-if (JPEG_FOUND) +- include_directories( ${JPEG_INCLUDE_DIR} ) +- target_link_libraries( ${ly_lib_shared} ${JPEG_LIBRARY} ) +- add_definitions( -DHAVE_JPEG ) ++option(LIBYUV_WITH_JPEG "Build libyuv with jpeg" ON) ++if (LIBYUV_WITH_JPEG) ++ find_package(JPEG REQUIRED) ++ target_link_libraries(${ly_lib_static} JPEG::JPEG ) ++ target_compile_definitions(${ly_lib_static} PRIVATE HAVE_JPEG) ++ target_compile_definitions(yuvconvert PRIVATE HAVE_JPEG) + endif() + + if(UNIT_TEST) +@@ -211,10 +212,8 @@ endif() + + + # install the conversion tool, .so, .a, and all the header files +-INSTALL ( PROGRAMS ${CMAKE_BINARY_DIR}/yuvconvert DESTINATION bin ) +-INSTALL ( TARGETS ${ly_lib_static} DESTINATION lib ) +-INSTALL ( TARGETS ${ly_lib_shared} LIBRARY DESTINATION lib RUNTIME DESTINATION bin ) ++INSTALL ( TARGETS yuvconvert yuvconstants DESTINATION bin) ++INSTALL ( TARGETS ${ly_lib_static} RUNTIME DESTINATION bin ARCHIVE DESTINATION lib LIBRARY DESTINATION lib) + INSTALL ( DIRECTORY ${PROJECT_SOURCE_DIR}/include/ DESTINATION include ) + + # create the .deb and .rpm packages using cpack +-INCLUDE ( CM_linux_packages.cmake ) diff --git a/recipes/libyuv/config.yml b/recipes/libyuv/config.yml index fe46d8f150b2c..9b10304af3038 100644 --- a/recipes/libyuv/config.yml +++ b/recipes/libyuv/config.yml @@ -1,4 +1,6 @@ versions: + "1892": + folder: all "1880": folder: all "1854": diff --git a/recipes/libzip/all/conandata.yml b/recipes/libzip/all/conandata.yml index 0dcb786c62874..9567df4b1e773 100644 --- a/recipes/libzip/all/conandata.yml +++ b/recipes/libzip/all/conandata.yml @@ -1,4 +1,14 @@ sources: + "1.11.2": + url: + - "https://libzip.org/download/libzip-1.11.2.tar.gz" + - "https://github.com/nih-at/libzip/releases/download/v1.11.2/libzip-1.11.2.tar.gz" + sha256: "6b2a43837005e1c23fdfee532b78f806863e412d2089b9c42b49ab08cbcd7665" + "1.11.1": + url: + - "https://libzip.org/download/libzip-1.11.1.tar.gz" + - "https://github.com/nih-at/libzip/releases/download/v1.11.1/libzip-1.11.1.tar.gz" + sha256: "c0e6fa52a62ba11efd30262290dc6970947aef32e0cc294ee50e9005ceac092a" "1.10.1": url: - "https://libzip.org/download/libzip-1.10.1.tar.gz" @@ -20,6 +30,20 @@ sources: - "https://github.com/nih-at/libzip/releases/download/v1.7.3/libzip-1.7.3.tar.gz" sha256: "0e2276c550c5a310d4ebf3a2c3dfc43fb3b4602a072ff625842ad4f3238cb9cc" patches: + "1.11.2": + - patch_file: "patches/1.7.3-0001-cmake-install-bundle.patch" + patch_description: "fix installation path of utilities" + patch_type: "conan" + - patch_file: "patches/1.11.2-0002-remove-rpath.patch" + patch_description: "remove rpath feature" + patch_type: "conan" + "1.11.1": + - patch_file: "patches/1.7.3-0001-cmake-install-bundle.patch" + patch_description: "fix installation path of utilities" + patch_type: "conan" + - patch_file: "patches/1.11.1-0002-remove-rpath.patch" + patch_description: "remove rpath feature" + patch_type: "conan" "1.10.1": - patch_file: "patches/1.7.3-0001-cmake-install-bundle.patch" patch_description: "fix installation path of utilities" diff --git a/recipes/libzip/all/conanfile.py b/recipes/libzip/all/conanfile.py index ef4f7c2c57579..f6403b2c2308d 100644 --- a/recipes/libzip/all/conanfile.py +++ b/recipes/libzip/all/conanfile.py @@ -11,9 +11,9 @@ class LibZipConan(ConanFile): name = "libzip" description = "A C library for reading, creating, and modifying zip archives" + license = "BSD-3-Clause" url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/nih-at/libzip" - license = "BSD-3-Clause" topics = ("zip", "zip-archives", "zip-editing") package_type = "library" settings = "os", "arch", "compiler", "build_type" diff --git a/recipes/libzip/all/patches/1.11.1-0002-remove-rpath.patch b/recipes/libzip/all/patches/1.11.1-0002-remove-rpath.patch new file mode 100644 index 0000000000000..6ee1d37d42f37 --- /dev/null +++ b/recipes/libzip/all/patches/1.11.1-0002-remove-rpath.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 8d019b9..5cd6a81 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -290,7 +290,7 @@ if(WIN32) + endif(WIN32) + + # rpath handling: use rpath in installed binaries +-if(NOT CMAKE_SYSTEM_NAME MATCHES Linux) ++if(0) + set(CMAKE_INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}) + set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) + endif() diff --git a/recipes/libzip/all/patches/1.11.2-0002-remove-rpath.patch b/recipes/libzip/all/patches/1.11.2-0002-remove-rpath.patch new file mode 100644 index 0000000000000..2d5c920bd02c6 --- /dev/null +++ b/recipes/libzip/all/patches/1.11.2-0002-remove-rpath.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 23e0f0f..85dec3d 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -293,7 +293,7 @@ if(WIN32) + endif(WIN32) + + # rpath handling: use rpath in installed binaries +-if(NOT CMAKE_SYSTEM_NAME MATCHES Linux) ++if(0) + set(CMAKE_INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}) + set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) + endif() diff --git a/recipes/libzip/config.yml b/recipes/libzip/config.yml index 614d36cf38cf3..4c71d7dcc950f 100644 --- a/recipes/libzip/config.yml +++ b/recipes/libzip/config.yml @@ -1,4 +1,8 @@ versions: + "1.11.2": + folder: all + "1.11.1": + folder: all "1.10.1": folder: all "1.9.2": diff --git a/recipes/lielab/all/conandata.yml b/recipes/lielab/all/conandata.yml new file mode 100644 index 0000000000000..6803bdea9abab --- /dev/null +++ b/recipes/lielab/all/conandata.yml @@ -0,0 +1,7 @@ +sources: + "0.4.1": + url: "https://github.com/sandialabs/Lielab/archive/refs/tags/v0.4.1.tar.gz" + sha256: "862BEC2114B9E554F77ECB2F7B3D5CEABF7374A9A0E7F80BCB94A868F3D9F51C" + "0.4.0": + url: "https://github.com/sandialabs/Lielab/archive/refs/tags/v0.4.0.tar.gz" + sha256: "5CABF2D31D7D38EEEF525ADEE5D22C0359E9C043884D4AB5FBA219D3CB217A5C" diff --git a/recipes/lielab/all/conanfile.py b/recipes/lielab/all/conanfile.py new file mode 100644 index 0000000000000..ecc16c01755a9 --- /dev/null +++ b/recipes/lielab/all/conanfile.py @@ -0,0 +1,83 @@ +from conan import ConanFile +from conan.tools.cmake import CMakeToolchain, CMake +from conan.tools.files import copy, get, rmdir +from conan.tools.build import check_min_cppstd +from conan.tools.scm import Version +from conan.errors import ConanInvalidConfiguration +import os + +required_conan_version = ">=1.52.0" + +class LielabConan(ConanFile): + name = "lielab" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/sandialabs/Lielab" + description = "Lielab is a C++ library for numerical Lie-theory: Lie groups," \ + " Lie algebras, homogeneous manifolds, and various functions and algorithms" \ + " on these spaces." + topics = ("Lie-theory", "Lie-group", "Lie-algebra", "numerical", "header-only") + package_type = "header-library" + license = "MIT" + + settings = "os", "arch", "compiler", "build_type" + + no_copy_source = True + + def requirements(self): + self.requires("eigen/3.4.0") + + @property + def _min_cppstd(self): + return 20 + + @property + def _compilers_minimum_version(self): + return { + "gcc": "11", + "clang": "12", + "apple-clang": "13.1", + "Visual Studio": "17", + "msvc": "193", + } + + def validate(self): + if self.settings.compiler.cppstd: + check_min_cppstd(self, self._min_cppstd) + minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) + if minimum_version and Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration(f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support.") + + def build_requirements(self): + self.tool_requires("cmake/[>=3.23 <4]") + + def source(self): + get(self, **self.conan_data["sources"][self.version], + destination=self.source_folder, strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + tc.variables["LIELAB_INSTALL_LIBRARY"] = True + tc.variables["LIELAB_BUILD_TESTS"] = False + tc.variables["LIELAB_BUILD_PYTHON"] = False + tc.generate() + + def package(self): + copy(self, "LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) + cmake = CMake(self) + cmake.configure() + cmake.install() + rmdir(self, os.path.join(self.package_folder, "share")) + + def package_info(self): + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] + + self.cpp_info.set_property("cmake_file_name", "Lielab") + self.cpp_info.set_property("cmake_target_name", "Lielab::Lielab") + + self.cpp_info.names["cmake_find_package"] = "Lielab" + self.cpp_info.names["cmake_find_package_multi"] = "Lielab" + + def package_id(self): + self.info.clear() + diff --git a/recipes/lielab/all/test_package/CMakeLists.txt b/recipes/lielab/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..c13d8b918525c --- /dev/null +++ b/recipes/lielab/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) + +find_package(Lielab REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE Lielab::Lielab) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_20) diff --git a/recipes/lielab/all/test_package/conanfile.py b/recipes/lielab/all/test_package/conanfile.py new file mode 100644 index 0000000000000..3a91c9439218e --- /dev/null +++ b/recipes/lielab/all/test_package/conanfile.py @@ -0,0 +1,26 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def layout(self): + cmake_layout(self) + + def requirements(self): + self.requires(self.tested_reference_str) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/lielab/all/test_package/test_package.cpp b/recipes/lielab/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..81a29ab2a8a75 --- /dev/null +++ b/recipes/lielab/all/test_package/test_package.cpp @@ -0,0 +1,12 @@ +#include +#include +#include + + +int main(void) { + std::cout << "Lielab v" << Lielab::VERSION << std::endl; + std::cout << Lielab::AUTHOR << std::endl; + std::cout << Lielab::LOCATION << std::endl; + + return EXIT_SUCCESS; +} diff --git a/recipes/lielab/config.yml b/recipes/lielab/config.yml new file mode 100644 index 0000000000000..bf6438ecd493c --- /dev/null +++ b/recipes/lielab/config.yml @@ -0,0 +1,5 @@ +versions: + "0.4.1": + folder: "all" + "0.4.0": + folder: "all" diff --git a/recipes/lightgbm/all/conandata.yml b/recipes/lightgbm/all/conandata.yml index 53438b1b2b9ba..8355ba2b45e51 100644 --- a/recipes/lightgbm/all/conandata.yml +++ b/recipes/lightgbm/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "4.3.0": + url: "https://github.com/microsoft/LightGBM/archive/refs/tags/v4.3.0.tar.gz" + sha256: "9e5a88bc231addfe4a0e57aa5ceb157f045103cd69ad8c2f393ef941ef52a9ac" "4.2.0": url: "https://github.com/microsoft/LightGBM/archive/refs/tags/v4.2.0.tar.gz" sha256: "4b2df6e3c5fa345a2fac6cefff65dd08cbe2fa4717cd8335c2a58c1a0c7c6b02" diff --git a/recipes/lightgbm/all/conanfile.py b/recipes/lightgbm/all/conanfile.py index cae89a9218102..e84bccaa188bb 100644 --- a/recipes/lightgbm/all/conanfile.py +++ b/recipes/lightgbm/all/conanfile.py @@ -6,6 +6,7 @@ from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout from conan.tools.files import copy, get, replace_in_file, export_conandata_patches, apply_conandata_patches from conan.tools.microsoft import is_msvc +from conan.tools.env import VirtualBuildEnv from conan.tools.scm import Version required_conan_version = ">=1.53.0" @@ -65,6 +66,10 @@ def validate(self): if self.settings.compiler.get_safe("cppstd"): check_min_cppstd(self, 11) + def build_requirements(self): + if Version(self.version) >= "4.3.0": + self.tool_requires("cmake/[>=3.18 <4]") + def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) @@ -78,8 +83,10 @@ def generate(self): tc.cache_variables["APPLE_OUTPUT_DYLIB"] = True tc.variables["_MAJOR_VERSION"] = Version(self.version).major tc.generate() - tc = CMakeDeps(self) - tc.generate() + deps = CMakeDeps(self) + deps.generate() + venv = VirtualBuildEnv(self) + venv.generate(scope="build") def _patch_sources(self): apply_conandata_patches(self) diff --git a/recipes/lightgbm/config.yml b/recipes/lightgbm/config.yml index 5160a2bc07bab..e59972b46cebb 100644 --- a/recipes/lightgbm/config.yml +++ b/recipes/lightgbm/config.yml @@ -1,4 +1,6 @@ versions: + "4.3.0": + folder: all "4.2.0": folder: all "4.1.0": diff --git a/recipes/limereport/all/conandata.yml b/recipes/limereport/all/conandata.yml new file mode 100644 index 0000000000000..a6aa17992b336 --- /dev/null +++ b/recipes/limereport/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "1.7.4": + url: "https://github.com/fralx/LimeReport/archive/refs/tags/1.7.4.tar.gz" + sha256: 5e16ffa4f1f6c9175ef00be95029d5dda57287236ef8529582e1df1366c8dc30 diff --git a/recipes/limereport/all/conanfile.py b/recipes/limereport/all/conanfile.py new file mode 100644 index 0000000000000..60455f5993eb1 --- /dev/null +++ b/recipes/limereport/all/conanfile.py @@ -0,0 +1,119 @@ +from conan.tools.cmake import CMake, CMakeToolchain, CMakeDeps, cmake_layout +from conan.tools.files import copy, get, replace_in_file +from conan.tools.build import check_min_cppstd +from conan import ConanFile +from conan.tools.microsoft import is_msvc +from conan.tools.scm import Version +from conan.errors import ConanInvalidConfiguration +import os + + +class LimereportConan(ConanFile): + name = "limereport" + description = "Report generator for Qt Framework" + homepage = "https://limereport.ru" + topics = ("limereport", "pdf", "report","qt") + license = "LGPL-3.0", "GPL-3.0" + url = "https://github.com/conan-io/conan-center-index" + package_type = "library" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + "with_zint": [True, False] + } + default_options = { + "shared": False, + "fPIC": True, + "with_zint": False, + } + + @property + def _min_cppstd(self): + return 17 + + @property + def _compilers_minimum_version(self): + return { + "Visual Studio": "16", + "msvc": "192", + "gcc": "8", + "clang": "8", + "apple-clang": "9.1", + } + + @property + def _qt_version_major(self): + return Version(self.dependencies["qt"].ref.version).major + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + + def layout(self): + cmake_layout(self, src_folder="src") + + def requirements(self): + # QString included in Irglobal.h and Limereport expects be running Qt on customer side + self.requires("qt/[>=5.15 <7]", transitive_headers=True, transitive_libs=True) + if self.options.with_zint: + self.requires("zint/2.10.0") + + def validate(self): + if self.settings.compiler.cppstd: + check_min_cppstd(self, self._min_cppstd) + minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) + if minimum_version and Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration( + f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." + ) + if not (self.dependencies["qt"].options.qtdeclarative): + raise ConanInvalidConfiguration(f"{self.ref} requires -o='qt/*:qtdeclarative=True'") + if not (self.dependencies["qt"].options.qtsvg and self.dependencies["qt"].options.qttools): + raise ConanInvalidConfiguration(f"{self.ref} requires -o='qt/*:qtsvg=True' and -o='qt/*:qttools=True'") + if self.options.with_zint and not self.dependencies["zint"].options.with_qt: + raise ConanInvalidConfiguration(f"{self.ref} option with_zint=True requires -o 'zint/*:with_qt=True'") + + def source(self): + get(self, **self.conan_data["sources"][self.version], + destination=self.source_folder, strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + tc.cache_variables["LIMEREPORT_STATIC"] = not self.options.shared + if is_msvc(self): + tc.variables["WINDOWS_BUILD"] = True + tc.cache_variables["USE_QT6"] = self._qt_version_major == 6 + tc.cache_variables["ENABLE_ZINT"] = self.options.with_zint + tc.generate() + tc = CMakeDeps(self) + tc.generate() + + def _patch_sources(self): + # Avoid using vendozied zint + replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), "add_subdirectory(3rdparty)", "") + + def build(self): + self._patch_sources() + cmake = CMake(self) + cmake.configure() + cmake.build() + + def package(self): + copy(self, "LICENSE", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) + copy(self, "COPYING", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) + cmake = CMake(self) + cmake.install() + + def package_info(self): + self.cpp_info.libs = [f"limereport-qt{self._qt_version_major}"] + self.cpp_info.requires = ["qt::qtCore", "qt::qtWidgets", "qt::qtQml", "qt::qtXml", "qt::qtSql", + "qt::qtPrintSupport", "qt::qtSvg", "qt::qtUiTools"] + if self.options.with_zint: + self.cpp_info.requires.append("zint::zint") + if self.options.shared: + self.cpp_info.defines.append("LIMEREPORT_IMPORTS") diff --git a/recipes/limereport/all/test_package/CMakeLists.txt b/recipes/limereport/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..08e6667600f91 --- /dev/null +++ b/recipes/limereport/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package CXX) + +find_package(limereport CONFIG REQUIRED) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} limereport::limereport) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) diff --git a/recipes/limereport/all/test_package/conanfile.py b/recipes/limereport/all/test_package/conanfile.py new file mode 100644 index 0000000000000..76ff27872680a --- /dev/null +++ b/recipes/limereport/all/test_package/conanfile.py @@ -0,0 +1,30 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import CMake, cmake_layout, CMakeToolchain +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "VirtualRunEnv" + test_type = "explicit" + + def layout(self): + cmake_layout(self) + + def requirements(self): + self.requires(self.tested_reference_str) + + def generate(self): + tc = CMakeToolchain(self) + tc.generate() + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/limereport/all/test_package/test_package.cpp b/recipes/limereport/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..a10ab64ab7245 --- /dev/null +++ b/recipes/limereport/all/test_package/test_package.cpp @@ -0,0 +1,15 @@ +#include +#include +#include +#include + +int main(int argc, char* argv[]) +{ + auto report = new LimeReport::ReportEngine(); + + std::cout << "limereport: " << report->reportName().toStdString() << std::endl; + std::cout << "LIMEREPORT_VERSION_STR: " << LIMEREPORT_VERSION_STR << std::endl; + + delete report; + return EXIT_SUCCESS; +} diff --git a/recipes/limereport/config.yml b/recipes/limereport/config.yml new file mode 100644 index 0000000000000..41f47d462d189 --- /dev/null +++ b/recipes/limereport/config.yml @@ -0,0 +1,3 @@ +versions: + "1.7.4": + folder: "all" diff --git a/recipes/liquid-dsp/all/conandata.yml b/recipes/liquid-dsp/all/conandata.yml index 23e1bf444316a..e94d8d3d73cb9 100644 --- a/recipes/liquid-dsp/all/conandata.yml +++ b/recipes/liquid-dsp/all/conandata.yml @@ -1,8 +1,7 @@ sources: + "1.6.0": + url: "https://github.com/jgaeddert/liquid-dsp/archive/v1.6.0.tar.gz" + sha256: "6ee6a5dfb48e047b118cf613c0b9f43e34356a5667a77a72a55371d2c8c53bf5" "1.3.2": url: "https://github.com/jgaeddert/liquid-dsp/archive/refs/tags/v1.3.2.tar.gz" sha256: "85093624EF9CB90EAD64C836D2F42690197EDACE1A86257D6524C4E4DC870483" -patches: - "1.3.2": - - patch_file: "patches/1.3.2/0001-Remove-headers-check.patch" - base_path: "source_subfolder" diff --git a/recipes/liquid-dsp/all/conanfile.py b/recipes/liquid-dsp/all/conanfile.py index 26e149f068f7a..131fb07babeea 100644 --- a/recipes/liquid-dsp/all/conanfile.py +++ b/recipes/liquid-dsp/all/conanfile.py @@ -1,45 +1,42 @@ -from conans import ConanFile, tools -from conans.errors import ConanInvalidConfiguration -from contextlib import contextmanager import os -required_conan_version = ">=1.33.0" +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.apple import is_apple_os +from conan.tools.build import cross_building +from conan.tools.env import Environment, VirtualBuildEnv +from conan.tools.files import chdir, copy, get, rename +from conan.tools.gnu import Autotools, AutotoolsToolchain +from conan.tools.layout import basic_layout +from conan.tools.microsoft import is_msvc + +required_conan_version = ">=1.53.0" + class LiquidDspConan(ConanFile): name = "liquid-dsp" - description = ( - "Digital signal processing library for software-defined radios (and more)" - ) - topics = ("dsp", "sdr", "liquid-dsp") + description = "Digital signal processing library for software-defined radios (and more)" + license = "MIT" url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/jgaeddert/liquid-dsp" - license = ("MIT",) - settings = "os", "arch", "build_type", "compiler" - exports_sources = ["generate_link_library.bat"] + topics = ("dsp", "sdr") + + package_type = "library" + settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], + "fPIC": [True, False], "simdoverride": [True, False], } default_options = { "shared": False, + "fPIC": True, "simdoverride": False, } - _autotools = None - - @property - def _source_subfolder(self): - return "source_subfolder" - - @property - def _libname(self): - if self.settings.os == "Windows": - return "libliquid" - return "liquid" - @property def _target_name(self): - if self.settings.os == "Macos": + if is_apple_os(self): if not self.options.shared: return "libliquid.ar" return "libliquid.dylib" @@ -49,138 +46,81 @@ def _target_name(self): @property def _lib_pattern(self): - if self.settings.os == "Macos" and not self.options.shared: + if is_apple_os(self) and not self.options.shared: return "libliquid.a" - if self.settings.os != "Windows": - return self._target_name - return "libliquid.lib" + return self._target_name - def configure(self): - del self.settings.compiler.cppstd - del self.settings.compiler.libcxx + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC - @property - def _settings_build(self): - return getattr(self, "settings_build", self.settings) + def configure(self): + self.settings.rm_safe("compiler.cppstd") + self.settings.rm_safe("compiler.libcxx") + if self.options.shared: + self.options.rm_safe("fPIC") - def build_requirements(self): - if self._settings_build.os == "Windows" and not tools.get_env("CONAN_BASH_PATH"): - self.build_requires("msys2/cci.latest") - if self.settings.compiler == "Visual Studio": - self.build_requires("mingw-w64/8.1") - self.build_requires("automake/1.16.4") - - def export_sources(self): - for patch in self.conan_data.get("patches", {}).get(self.version, []): - self.copy(patch["patch_file"]) + def layout(self): + basic_layout(self, src_folder="src") def validate(self): - if hasattr(self, "settings_build") and tools.cross_building(self): + if cross_building(self): raise ConanInvalidConfiguration("Cross building is not yet supported. Contributions are welcome") + if is_msvc(self): + raise ConanInvalidConfiguration("MSVC is not supported due to missing 'complex' data type support") + + def build_requirements(self): + # For ./bootstrap.sh + self.tool_requires("autoconf/2.71") + self.tool_requires("automake/1.16.5") def source(self): - tools.get( - **self.conan_data["sources"][self.version], - destination=self._source_subfolder, - strip_root=True, - ) + get(self, **self.conan_data["sources"][self.version], strip_root=True) - def _patch_sources(self): - if self.settings.os == "Windows": - for patch in self.conan_data["patches"][self.version]: - tools.patch(**patch) - - def _gen_link_library(self): - if self.settings.compiler != "Visual Studio" or (not self.options.shared): - return - self.run("cmd /c generate_link_library.bat") - with tools.chdir(self._source_subfolder): - self.run( - "{} /def:libliquid.def /out:libliquid.lib /machine:{}".format( - os.getenv("AR"), "X86" if self.settings.arch == "x86" else "X64" - ), - win_bash=tools.os_info.is_windows, - ) + def generate(self): + venv = VirtualBuildEnv(self) + venv.generate() - def _rename_libraries(self): - with tools.chdir(self._source_subfolder): - if self.settings.os == "Windows" and self.options.shared: - tools.rename("libliquid.so", "libliquid.dll") - elif self.settings.os == "Windows" and not self.options.shared: - tools.rename("libliquid.a", "libliquid.lib") - elif self.settings.os == "Macos" and not self.options.shared: - tools.rename("libliquid.ar", "libliquid.a") - - @contextmanager - def _build_context(self): - if self.settings.compiler == "Visual Studio": - env = { - "CC": "gcc", - "CXX": "g++", - "LD": "ld", - "AR": "ar", - } - with tools.environment_append(env): - yield - else: - yield - - @contextmanager - def _msvc_context(self): - if self.settings.compiler == "Visual Studio": - with tools.vcvars(self.settings): - env = { - "CC": "cl -nologo", - "CXX": "cl -nologo", - "AR": "lib", - "LD": "link", - } - with tools.environment_append(env): - yield + gcc_env = Environment() + if self.settings.build_type == "Debug": + cflags = "-g -O0" else: - yield + cflags = "-s -O2 -DNDEBUG" + gcc_env.append("CFLAGS", cflags) + gcc_env.vars(self, scope="gcc").save_script("conan_gcc_env") - def build(self): - self._patch_sources() - ncpus = tools.cpu_count() - configure_args = [] - cflags = ["-static-libgcc"] + tc = AutotoolsToolchain(self) if self.settings.build_type == "Debug": - configure_args.append("--enable-debug-messages") - cflags.extend(["-g", "-O0"]) - else: - cflags.extend(["-s", "-O2", "-DNDEBUG"]) + tc.configure_args.append("--enable-debug-messages") if self.options.simdoverride: - configure_args.append("--enable-simdoverride") - if self.settings.compiler == "Visual Studio": - configure_args.append("CFLAGS='{}'".format(" ".join(cflags))) - configure_args_str = " ".join(configure_args) - with self._build_context(): - with tools.chdir(self._source_subfolder): - self.run("./bootstrap.sh", win_bash=tools.os_info.is_windows) - self.run( - "./configure {}".format(configure_args_str), - win_bash=tools.os_info.is_windows, - ) - self.run( - "make {} -j{}".format(self._target_name, ncpus), - win_bash=tools.os_info.is_windows, - ) + tc.configure_args.append("--enable-simdoverride") + tc.generate(gcc_env) + + def _rename_libraries(self): + with chdir(self, self.source_folder): + if is_apple_os(self) and not self.options.shared: + rename(self, "libliquid.ar", "libliquid.a") + + def build(self): + with chdir(self, self.source_folder): + self.run("./bootstrap.sh", env=["conanbuild", "gcc"]) + autotools = Autotools(self) + autotools.configure() + autotools.make(self._target_name) self._rename_libraries() - with self._msvc_context(): - self._gen_link_library() def package(self): - self.copy(pattern="LICENSE", src=self._source_subfolder, dst="licenses") - self.copy( - pattern="liquid.h", - dst=os.path.join("include", "liquid"), - src=os.path.join(self._source_subfolder, "include"), - ) - self.copy(pattern="libliquid.dll", dst="bin", src=self._source_subfolder) - self.copy(pattern=self._lib_pattern, dst="lib", src=self._source_subfolder) + copy(self, "LICENSE", + dst=os.path.join(self.package_folder, "licenses"), + src=self.source_folder) + copy(self, "liquid.h", + dst=os.path.join(self.package_folder, "include", "liquid"), + src=os.path.join(self.source_folder, "include")) + copy(self, self._lib_pattern, + dst=os.path.join(self.package_folder, "lib"), + src=self.source_folder) def package_info(self): - self.cpp_info.libs = [self._libname] - if self.settings.os == "Linux": + self.cpp_info.libs = ["liquid"] + if self.settings.os in ["Linux", "FreeBSD"]: self.cpp_info.system_libs.append("m") diff --git a/recipes/liquid-dsp/all/generate_link_library.bat b/recipes/liquid-dsp/all/generate_link_library.bat deleted file mode 100644 index fb20541a4c46c..0000000000000 --- a/recipes/liquid-dsp/all/generate_link_library.bat +++ /dev/null @@ -1,4 +0,0 @@ -@echo off -echo Generating link library for MSVC... -echo EXPORTS >> source_subfolder\libliquid.def -for /f "skip=19 tokens=4" %%A in ('%LD% /dump /EXPORTS source_subfolder\libliquid.dll') do echo %%A >> source_subfolder\libliquid.def diff --git a/recipes/liquid-dsp/all/patches/1.3.2/0001-Remove-headers-check.patch b/recipes/liquid-dsp/all/patches/1.3.2/0001-Remove-headers-check.patch deleted file mode 100644 index ad10a374ed0d9..0000000000000 --- a/recipes/liquid-dsp/all/patches/1.3.2/0001-Remove-headers-check.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 8a99b1c6853193c1f518bc81b705d7094225e114 Mon Sep 17 00:00:00 2001 -From: Rui Oliveira -Date: Fri, 18 Jun 2021 09:37:46 +0100 -Subject: [PATCH] Remove headers check - ---- - configure.ac | 8 -------- - 1 file changed, 8 deletions(-) - -diff --git a/configure.ac b/configure.ac -index e6bc297e..5b591c87 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -81,20 +81,12 @@ AC_FUNC_ERROR_AT_LINE - AC_FUNC_MALLOC - AC_FUNC_REALLOC - --# AC_CHECK_LIB (library, function, [action-if-found], [action-if-not-found], [other-libraries]) --AC_CHECK_LIB([c],[main],[],[AC_MSG_ERROR(Could not use standard C library)], []) --AC_CHECK_LIB([m],[main],[],[AC_MSG_ERROR(Could not use standard math library)],[]) -- - # AC_CHECK_FUNC(function, [action-if-found], [action-if-not-found]) - AC_CHECK_FUNCS([malloc realloc free memset memmove],[], - [AC_MSG_ERROR(Could not use memory allocation functions)]) - AC_CHECK_FUNCS([sinf cosf expf cargf cexpf crealf cimagf sqrtf],[], - [AC_MSG_ERROR(Could not use special math functions)],) - --# Check for necessary header files --AC_CHECK_HEADERS([stdio.h stdlib.h complex.h string.h getopt.h sys/resource.h float.h inttypes.h limits.h stdlib.h string.h unistd.h],[], -- [AC_MSG_ERROR(Could not use standard headers)]) -- - # Check for optional header files, libraries, programs - AC_CHECK_HEADERS(fec.h fftw3.h) - AC_CHECK_LIB([fftw3f], [fftwf_plan_dft_1d], [], --- -2.32.0.windows.1 - diff --git a/recipes/liquid-dsp/all/test_package/CMakeLists.txt b/recipes/liquid-dsp/all/test_package/CMakeLists.txt index 2859677acfc5b..a71be24831850 100644 --- a/recipes/liquid-dsp/all/test_package/CMakeLists.txt +++ b/recipes/liquid-dsp/all/test_package/CMakeLists.txt @@ -1,8 +1,7 @@ -cmake_minimum_required(VERSION 3.0) -project(test_package) +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup() +find_package(liquid-dsp REQUIRED CONFIG) add_executable(${CMAKE_PROJECT_NAME} test_package.cpp) -target_link_libraries(${CMAKE_PROJECT_NAME} ${CONAN_LIBS}) +target_link_libraries(${CMAKE_PROJECT_NAME} liquid-dsp::liquid-dsp) diff --git a/recipes/liquid-dsp/all/test_package/conanfile.py b/recipes/liquid-dsp/all/test_package/conanfile.py index bd7165a553cf4..ef5d7042163ec 100644 --- a/recipes/liquid-dsp/all/test_package/conanfile.py +++ b/recipes/liquid-dsp/all/test_package/conanfile.py @@ -1,10 +1,19 @@ -from conans import ConanFile, CMake, tools +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake import os class TestPackageConan(ConanFile): - settings = "os", "compiler", "build_type", "arch" - generators = "cmake" + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) def build(self): cmake = CMake(self) @@ -12,6 +21,6 @@ def build(self): cmake.build() def test(self): - if not tools.cross_building(self.settings): - bin_path = os.path.join("bin", "test_package") - self.run(bin_path, run_environment=True) + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/liquid-dsp/config.yml b/recipes/liquid-dsp/config.yml index 906e859d7afd8..6d49f977901cf 100644 --- a/recipes/liquid-dsp/config.yml +++ b/recipes/liquid-dsp/config.yml @@ -1,3 +1,5 @@ versions: + "1.6.0": + folder: "all" "1.3.2": folder: "all" diff --git a/recipes/llama-cpp/all/cmake/llama-cpp-cuda-static.cmake b/recipes/llama-cpp/all/cmake/llama-cpp-cuda-static.cmake new file mode 100644 index 0000000000000..2e9b341b77e42 --- /dev/null +++ b/recipes/llama-cpp/all/cmake/llama-cpp-cuda-static.cmake @@ -0,0 +1,7 @@ +find_dependency(CUDAToolkit REQUIRED) +if (WIN32) + # As of 12.3.1 CUDA Toolkit for Windows does not offer a static cublas library + target_link_libraries(llama-cpp::common INTERFACE CUDA::cudart_static CUDA::cublas CUDA::cublasLt CUDA::cuda_driver) +else () + target_link_libraries(llama-cpp::common INTERFACE CUDA::cudart_static CUDA::cublas_static CUDA::cublasLt_static CUDA::cuda_driver) +endif() diff --git a/recipes/llama-cpp/all/conandata.yml b/recipes/llama-cpp/all/conandata.yml old mode 100644 new mode 100755 index 9a540abd27e25..f31f9bb9e4c75 --- a/recipes/llama-cpp/all/conandata.yml +++ b/recipes/llama-cpp/all/conandata.yml @@ -1,4 +1,12 @@ sources: - "b2038": - url: "https://github.com/ggerganov/llama.cpp/archive/refs/tags/b2038.tar.gz" - sha256: "a55bc75f5c76624cabfd9ea5e045f76597411231cb6fc231f2a0bff6287ab13b" + "b3542": + url: "https://github.com/ggerganov/llama.cpp/archive/refs/tags/b3542.tar.gz" + sha256: "6f8b23d930400fce5708d2c85022ef33f1083af8f6ac395abefadacee0942e78" + "b3040": + url: "https://github.com/ggerganov/llama.cpp/archive/refs/tags/b3040.tar.gz" + sha256: "020e040139660eb40113503bb1057d5387677d249b990e008e04821532f7cd62" +patches: + "b3542": + - patch_file: "patches/b3542-001-curl-patch-targets.patch" + "b3040": + - patch_file: "patches/b3040-001-curl-patch-targets.patch" diff --git a/recipes/llama-cpp/all/conanfile.py b/recipes/llama-cpp/all/conanfile.py old mode 100644 new mode 100755 index b39564c4e0974..06fe2b68724c2 --- a/recipes/llama-cpp/all/conanfile.py +++ b/recipes/llama-cpp/all/conanfile.py @@ -5,7 +5,7 @@ from conan.tools.apple import is_apple_os from conan.tools.build import check_min_cppstd, cross_building from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout -from conan.tools.files import copy, get, rmdir +from conan.tools.files import copy, get, rmdir, apply_conandata_patches, export_conandata_patches from conan.tools.scm import Version @@ -20,16 +20,22 @@ class LlamaCppConan(ConanFile): homepage = "https://github.com/ggerganov/llama.cpp" license = "MIT" settings = "os", "arch", "compiler", "build_type" + package_type = "library" + options = { "shared": [True, False], "fPIC": [True, False], + "with_examples": [True, False], + "with_cuda": [True, False], + "with_curl": [True, False], } default_options = { "shared": False, "fPIC": True, + "with_examples": False, + "with_cuda": False, + "with_curl": False, } - - package_type = "library" @property def _min_cppstd(self): @@ -41,6 +47,10 @@ def _compilers_minimum_version(self): "gcc": "8" } + def export_sources(self): + export_conandata_patches(self) + copy(self, "cmake/*", dst=self.export_sources_folder, src=self.recipe_folder) + def config_options(self): if self.settings.os == "Windows": del self.options.fPIC @@ -61,6 +71,10 @@ def validate(self): def layout(self): cmake_layout(self, src_folder="src") + def requirements(self): + if self.options.with_curl: + self.requires("libcurl/[>=7.78 <9]") + def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) @@ -71,13 +85,16 @@ def generate(self): tc = CMakeToolchain(self) tc.variables["LLAMA_STANDALONE"] = False tc.variables["LLAMA_BUILD_TESTS"] = False - tc.variables["LLAMA_BUILD_EXAMPLES"] = False + tc.variables["LLAMA_BUILD_EXAMPLES"] = self.options.get_safe("with_examples") + tc.variables["LLAMA_CURL"] = self.options.get_safe("with_curl") tc.variables["BUILD_SHARED_LIBS"] = bool(self.options.shared) + tc.variables["GGML_CUDA"] = self.options.get_safe("with_cuda") if hasattr(self, "settings_build") and cross_building(self): tc.variables["LLAMA_NATIVE"] = False tc.generate() def build(self): + apply_conandata_patches(self) cmake = CMake(self) cmake.configure() cmake.build() @@ -87,6 +104,7 @@ def package(self): cmake = CMake(self) cmake.install() rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) + rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) copy(self, "*", os.path.join(self.source_folder, "models"), os.path.join(self.package_folder, "res", "models")) copy(self, "*.h*", os.path.join(self.source_folder, "common"), os.path.join(self.package_folder, "include", "common")) copy(self, "*common*.lib", src=self.build_folder, dst=os.path.join(self.package_folder, "lib"), keep_path=False) @@ -94,19 +112,25 @@ def package(self): copy(self, "*common*.so", src=self.build_folder, dst=os.path.join(self.package_folder, "lib"), keep_path=False) copy(self, "*common*.dylib", src=self.build_folder, dst=os.path.join(self.package_folder, "lib"), keep_path=False) copy(self, "*common*.a", src=self.build_folder, dst=os.path.join(self.package_folder, "lib"), keep_path=False) - + copy(self, "*.cmake", src=os.path.join(self.export_sources_folder, "cmake"), dst=os.path.join(self.package_folder, "lib", "cmake")) def package_info(self): + self.cpp_info.components["common"].includedirs = [os.path.join("include", "common")] + self.cpp_info.components["common"].libs = ["common"] + self.cpp_info.components["common"].libdirs = ["lib"] + if self.version >= Version("b3240"): + self.cpp_info.components["common"].libs.append("ggml") + self.cpp_info.components["llama"].libs = ["llama"] self.cpp_info.components["llama"].resdirs = ["res"] self.cpp_info.components["llama"].libdirs = ["lib"] + if self.options.with_cuda and not self.options.shared: + self.cpp_info.builddirs.append(os.path.join("lib", "cmake")) + module_path = os.path.join("lib", "cmake", "llama-cpp-cuda-static.cmake") + self.cpp_info.set_property("cmake_build_modules", [module_path]) + if is_apple_os(self): - self.cpp_info.components["llama"].frameworks.extend(["Foundation", "Accelerate", "Metal"]) + self.cpp_info.components["common"].frameworks.extend(["Foundation", "Accelerate", "Metal"]) elif self.settings.os in ("Linux", "FreeBSD"): - self.cpp_info.components["llama"].system_libs.extend(["dl", "m", "pthread"]) - - self.cpp_info.components["common"].requires.append("llama") - self.cpp_info.components["common"].includedirs = [os.path.join("include", "common")] - self.cpp_info.components["common"].libs = ["common"] - + self.cpp_info.components["common"].system_libs.extend(["dl", "m", "pthread", "gomp"]) diff --git a/recipes/llama-cpp/all/patches/b3040-001-curl-patch-targets.patch b/recipes/llama-cpp/all/patches/b3040-001-curl-patch-targets.patch new file mode 100755 index 0000000000000..454fe46b32c1f --- /dev/null +++ b/recipes/llama-cpp/all/patches/b3040-001-curl-patch-targets.patch @@ -0,0 +1,15 @@ +diff --git a/common/CMakeLists.txt b/common/CMakeLists.txt +index 0ec8d6d8..647ef30b 100644 +--- a/common/CMakeLists.txt ++++ b/common/CMakeLists.txt +@@ -77,9 +77,7 @@ set(LLAMA_COMMON_EXTRA_LIBS build_info) + if (LLAMA_CURL) + find_package(CURL REQUIRED) + add_definitions(-DLLAMA_USE_CURL) +- include_directories(${CURL_INCLUDE_DIRS}) +- find_library(CURL_LIBRARY curl REQUIRED) +- set(LLAMA_COMMON_EXTRA_LIBS ${LLAMA_COMMON_EXTRA_LIBS} ${CURL_LIBRARY}) ++ list(APPEND LLAMA_COMMON_EXTRA_LIBS CURL::libcurl) + endif () + + target_include_directories(${TARGET} PUBLIC .) diff --git a/recipes/llama-cpp/all/patches/b3542-001-curl-patch-targets.patch b/recipes/llama-cpp/all/patches/b3542-001-curl-patch-targets.patch new file mode 100755 index 0000000000000..dcb0f491566b5 --- /dev/null +++ b/recipes/llama-cpp/all/patches/b3542-001-curl-patch-targets.patch @@ -0,0 +1,26 @@ +diff --git a/common/CMakeLists.txt b/common/CMakeLists.txt +index 761971d6..3afd9759 100644 +--- a/common/CMakeLists.txt ++++ b/common/CMakeLists.txt +@@ -66,7 +66,7 @@ add_library(${TARGET} STATIC + train.cpp + ngram-cache.h + ngram-cache.cpp +- ) ++) + + if (BUILD_SHARED_LIBS) + set_target_properties(${TARGET} PROPERTIES POSITION_INDEPENDENT_CODE ON) +@@ -78,10 +78,8 @@ set(LLAMA_COMMON_EXTRA_LIBS build_info) + if (LLAMA_CURL) + find_package(CURL REQUIRED) + add_definitions(-DLLAMA_USE_CURL) +- include_directories(${CURL_INCLUDE_DIRS}) +- find_library(CURL_LIBRARY curl REQUIRED) +- set(LLAMA_COMMON_EXTRA_LIBS ${LLAMA_COMMON_EXTRA_LIBS} ${CURL_LIBRARY}) +-endif () ++ list(APPEND LLAMA_COMMON_EXTRA_LIBS CURL::libcurl) ++endif() + + target_include_directories(${TARGET} PUBLIC .) + target_compile_features (${TARGET} PUBLIC cxx_std_11) diff --git a/recipes/llama-cpp/all/test_package/CMakeLists.txt b/recipes/llama-cpp/all/test_package/CMakeLists.txt old mode 100644 new mode 100755 index ebff8cc0707b3..fa2157e90aaa3 --- a/recipes/llama-cpp/all/test_package/CMakeLists.txt +++ b/recipes/llama-cpp/all/test_package/CMakeLists.txt @@ -7,8 +7,3 @@ find_package(llama-cpp REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) target_link_libraries(${PROJECT_NAME} PRIVATE llama-cpp::llama llama-cpp::common) set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 11) - -add_custom_command(TARGET test_package POST_BUILD - COMMAND ${CMAKE_COMMAND} -E copy_directory - ${llama-cpp_INCLUDE_DIR}/../res/models - ${CMAKE_CURRENT_BINARY_DIR}/models) diff --git a/recipes/llama-cpp/all/test_package/conanfile.py b/recipes/llama-cpp/all/test_package/conanfile.py index 7bb00fd3fe796..6cd089d783d39 100644 --- a/recipes/llama-cpp/all/test_package/conanfile.py +++ b/recipes/llama-cpp/all/test_package/conanfile.py @@ -2,7 +2,7 @@ from conan import ConanFile from conan.tools.build import can_run -from conan.tools.cmake import cmake_layout, CMake +from conan.tools.cmake import CMake, cmake_layout class TestPackageConan(ConanFile): @@ -23,5 +23,5 @@ def build(self): def test(self): if can_run(self): - bin_path = os.path.join(self.cpp.build.bindir, "test_package ./models/ggml-vocab-llama.gguf 'Hello World'") + bin_path = os.path.join(self.cpp.build.bindir, "test_package") self.run(bin_path, env="conanrun") diff --git a/recipes/llama-cpp/all/test_package/test_package.cpp b/recipes/llama-cpp/all/test_package/test_package.cpp index a87c31b0d652c..1201d51a3f7ee 100644 --- a/recipes/llama-cpp/all/test_package/test_package.cpp +++ b/recipes/llama-cpp/all/test_package/test_package.cpp @@ -1,41 +1,8 @@ -#include "common.h" #include "llama.h" +#include +int main() { + llama_model_params params = llama_model_default_params(); + std::cout << "Main GPU: " << params.main_gpu << std::endl; -#include -#include -#include -#include - -// from https://github.com/ggerganov/llama.cpp/tree/master/examples/tokenize - -int main(int argc, char ** argv) { - if (argc < 2 || argv[1][0] == '-') { - printf("usage: %s MODEL_PATH PROMPT [--ids]\n" , argv[0]); - return 1; - } - - const char * model_path = argv[1]; - const char * prompt = argv[2]; - - - llama_backend_init(false); - - llama_model_params model_params = llama_model_default_params(); - model_params.vocab_only = true; - llama_model * model = llama_load_model_from_file(model_path, model_params); - - llama_context_params ctx_params = llama_context_default_params(); - llama_context * ctx = llama_new_context_with_model(model, ctx_params); - - const bool add_bos = llama_should_add_bos_token(model); - - std::vector tokens; - - tokens = ::llama_tokenize(model, prompt, add_bos, true); - - for (int i = 0; i < (int) tokens.size(); i++) { - printf("%6d -> '%s'\n", tokens[i], llama_token_to_piece(ctx, tokens[i]).c_str()); - } - - return 0; + return 0; } diff --git a/recipes/llama-cpp/config.yml b/recipes/llama-cpp/config.yml index 139b1481c0979..80c3c72b8c4f3 100644 --- a/recipes/llama-cpp/config.yml +++ b/recipes/llama-cpp/config.yml @@ -1,3 +1,5 @@ versions: - "b2038": + "b3542": + folder: "all" + "b3040": folder: "all" diff --git a/recipes/llnl-units/all/conandata.yml b/recipes/llnl-units/all/conandata.yml new file mode 100644 index 0000000000000..61314f6985693 --- /dev/null +++ b/recipes/llnl-units/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "0.9.1": + url: "https://github.com/LLNL/units/archive/refs/tags/v0.9.1.tar.gz" + sha256: "7edb83613a07cf55873f22d61c0062e46db6f8cb27d137866858811ec2e1ad4f" diff --git a/recipes/llnl-units/all/conanfile.py b/recipes/llnl-units/all/conanfile.py new file mode 100644 index 0000000000000..62478d1b6985f --- /dev/null +++ b/recipes/llnl-units/all/conanfile.py @@ -0,0 +1,103 @@ +import os + +from conan import ConanFile +from conan.tools.cmake import CMake, CMakeToolchain +from conan.tools.files import copy, rm, rmdir, get + + +class UnitsConan(ConanFile): + name = "llnl-units" + license = "BSD-3-Clause" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://units.readthedocs.io" + description = ( + "A run-time C++ library for working with units " + "of measurement and conversions between them " + "and with string representations of units " + "and measurements" + ) + topics = ( + "units", + "dimensions", + "quantities", + "physical-units", + "dimensional-analysis", + "run-time", + ) + settings = "os", "compiler", "build_type", "arch" + package_type = "library" + options = { + "shared": [True, False], + "fPIC": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + } + + @property + def _min_cppstd(self): + return 14 + + @property + def _compilers_minimum_version(self): + return { + "apple-clang": "10", + "clang": "7", + "gcc": "7", + "msvc": "191", + "Visual Studio": "15", + } + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + tc.preprocessor_definitions["UNITS_CMAKE_PROJECT_NAME"] = "LLNL-UNITS" + tc.preprocessor_definitions["UNITS_ENABLE_TESTS"] = "OFF" + tc.preprocessor_definitions["UNITS_BUILD_SHARED_LIBRARY"] = self.options.shared + tc.preprocessor_definitions[ + "UNITS_BUILD_STATIC_LIBRARY" + ] = not self.options.shared + tc.generate() + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def package(self): + copy( + self, + "LICENSE", + self.source_folder, + os.path.join(self.package_folder, "licenses"), + ) + cmake = CMake(self) + cmake.install() + rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) + rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) + rmdir(self, os.path.join(self.package_folder, "share")) + rm(self, "*.la", os.path.join(self.package_folder, "lib")) + rm(self, "*.pdb", os.path.join(self.package_folder, "lib")) + rm(self, "*.pdb", os.path.join(self.package_folder, "bin")) + + def package_info(self): + self.cpp_info.libs = ["units"] + namespace = self.conf.get("user.llnl-units:namespace", check_type=str) + base_type = self.conf.get("user.llnl-units:base_type", check_type=str, default="uint32_t") + self.cpp_info.defines = [f"UNITS_BASE_TYPE={base_type}"] + if namespace: + self.cpp_info.defines.append(f"UNITS_NAMESPACE={units_namespace}") + + self.cpp_info.set_property("cmake_file_name", "units") + self.cpp_info.set_property("cmake_target_name", "units::units") diff --git a/recipes/llnl-units/all/test_package/CMakeLists.txt b/recipes/llnl-units/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..32484e5b71ec5 --- /dev/null +++ b/recipes/llnl-units/all/test_package/CMakeLists.txt @@ -0,0 +1,10 @@ +cmake_minimum_required(VERSION 3.15) + +project(test_package LANGUAGES CXX) + +find_package(units REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) + +target_link_libraries(${PROJECT_NAME} PRIVATE units::units) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_14) diff --git a/recipes/llnl-units/all/test_package/conanfile.py b/recipes/llnl-units/all/test_package/conanfile.py new file mode 100644 index 0000000000000..02eb5ce439fb4 --- /dev/null +++ b/recipes/llnl-units/all/test_package/conanfile.py @@ -0,0 +1,27 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake +import os + + +# It will become the standard on Conan 2.x +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/llnl-units/all/test_package/test_package.cpp b/recipes/llnl-units/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..875f7bb1c1123 --- /dev/null +++ b/recipes/llnl-units/all/test_package/test_package.cpp @@ -0,0 +1,20 @@ +#include +#include +#include "units/units.hpp" +using namespace units; + +int main(void) { + auto new_unit=m/s; + auto another=new_unit*s; + bool test = another == m; + std::cout << test << std::endl; + + measurement length1=45.0*m; + measurement length2=20.0*m; + measurement result=900.0*m*m; + measurement area=length1*length2; + bool test2 = area == result; + std::cout << test2 << std::endl; + + return EXIT_SUCCESS; +} diff --git a/recipes/llnl-units/config.yml b/recipes/llnl-units/config.yml new file mode 100644 index 0000000000000..6895ae8f05494 --- /dev/null +++ b/recipes/llnl-units/config.yml @@ -0,0 +1,3 @@ +versions: + "0.9.1": + folder: all diff --git a/recipes/llvm-core/all/CMakeLists.txt b/recipes/llvm-core/all/CMakeLists.txt deleted file mode 100644 index e88dcfa953495..0000000000000 --- a/recipes/llvm-core/all/CMakeLists.txt +++ /dev/null @@ -1,26 +0,0 @@ -cmake_minimum_required(VERSION 3.13.4) -project(conanllvm) - -include(${CMAKE_CURRENT_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(KEEP_RPATHS) - -if(LLVM_ENABLE_ZLIB) - find_package(ZLIB QUIET) - - # The FindZLIB find module provided by CMake behaves differently than the FindZLIB.cmake script generated by CONAN. - # So the following two lines fill in the needed properties. - list(GET ZLIB_LIBRARIES 0 ZLIB_LIBRARY) - set_property(TARGET ZLIB::ZLIB PROPERTY LOCATION "${ZLIB_LIBRARY}") - - # Additionally LLVM 11.1.0 requires the zlib lib dir to be in the library path. - # This is not needed for later versions and can be removed once - # LLVM-12 becomes the oldest supported version. - if(UNIX) - set(ENV{LIBRARY_PATH} "${CONAN_LIB_DIRS_ZLIB}:$ENV{LIBRARY_PATH}") - elseif(WIN32) - file(TO_NATIVE_PATH "${CONAN_LIB_DIRS_ZLIB}" WINDOWS_ZLIB_PATH) - string(APPEND CMAKE_EXE_LINKER_FLAGS " /LIBPATH:${WINDOWS_ZLIB_PATH}") - endif() -endif() - -add_subdirectory("source") diff --git a/recipes/llvm-core/all/conandata.yml b/recipes/llvm-core/all/conandata.yml index 331f5f3a1903f..763714460b800 100644 --- a/recipes/llvm-core/all/conandata.yml +++ b/recipes/llvm-core/all/conandata.yml @@ -10,18 +10,60 @@ sources: sha256: ce8508e318a01a63d4e8b3090ab2ded3c598a50258cc49e2625b9120d4c03ea5 patches: - "11.1.0": - - base_path: "source" - patch_file: "patches/11x/11.1.0-cmake.patch" - - base_path: "source" - patch_file: "patches/11x/11.1.0-native.patch" - "12.0.0": - - base_path: "source" - patch_file: "patches/12x/12.0.0-cmake.patch" - - base_path: "source" - patch_file: "patches/12x/12.0.0-native.patch" "13.0.0": - - base_path: "source" - patch_file: "patches/13x/13.0.0-cmake.patch" - - base_path: "source" - patch_file: "patches/13x/13.0.0-native.patch" + - patch_file: patches/13x/0000-cmake-dependencies.patch + patch_description: fix references to third party libs to match conan variables and targets + patch_type: conan + - patch_file: patches/13x/0001-calculate-job-pools.patch + patch_description: calculate resource limits for compiling LLVM + patch_type: portability + patch_source: https://github.com/llvm/llvm-project/pull/65274 + - patch_file: patches/13x/0002-missing-includes.patch + patch_description: fix missing header files + patch_type: portability + patch_source: https://github.com/llvm/llvm-project-release-prs/pull/3 + - patch_file: patches/13x/0003-no-build-with-install-rpath.patch + patch_description: do not build shared libs with install rpath + patch_type: conan + - patch_file: patches/13x/0004-remove-lto-exports.patch + patch_description: remove LTO exports causing link error with lld + patch_source: https://github.com/llvm/llvm-project-release-prs/pull/279 + patch_type: portability + "12.0.0": + - patch_file: patches/12x/0000-cmake-dependencies.patch + patch_description: fix references to third party libs to match conan variables and targets + patch_type: conan + - patch_file: patches/12x/0001-calculate-job-pools.patch + patch_description: calculate resource limits for compiling LLVM + patch_type: portability + patch_source: https://github.com/llvm/llvm-project/pull/65274 + - patch_file: patches/12x/0002-missing-includes.patch + patch_description: fix missing header files + patch_type: portability + patch_source: https://github.com/llvm/llvm-project-release-prs/pull/3 + - patch_file: patches/12x/0003-no-build-with-install-rpath.patch + patch_description: do not build shared libs with install rpath + patch_type: conan + - patch_file: patches/12x/0004-remove-lto-exports.patch + patch_description: remove LTO exports causing link error with lld + patch_source: https://github.com/llvm/llvm-project-release-prs/pull/279 + patch_type: portability + "11.1.0": + - patch_file: patches/11x/0000-cmake-dependencies.patch + patch_description: fix references to third party libs to match conan variables and targets + patch_type: conan + - patch_file: "patches/11x/0001-calculate-job-pools.patch" + patch_description: calculate resource limits for compiling LLVM + patch_type: portability + patch_source: https://github.com/llvm/llvm-project/pull/65274 + - patch_file: patches/11x/0002-missing-includes.patch + patch_description: fix missing header files + patch_type: portability + patch_source: https://github.com/llvm/llvm-project-release-prs/pull/3 + - patch_file: patches/11x/0003-no-build-with-install-rpath.patch + patch_description: do not build shared libs with install rpath + patch_type: conan + - patch_file: patches/11x/0004-remove-lto-exports.patch + patch_description: remove LTO exports causing link error with lld + patch_source: https://github.com/llvm/llvm-project-release-prs/pull/279 + patch_type: portability diff --git a/recipes/llvm-core/all/conanfile.py b/recipes/llvm-core/all/conanfile.py index 263cb7360506c..172f48102fc18 100644 --- a/recipes/llvm-core/all/conanfile.py +++ b/recipes/llvm-core/all/conanfile.py @@ -1,429 +1,477 @@ -from conan.errors import ConanInvalidConfiguration from conan import ConanFile -from conan.tools.build import cross_building -from conan.tools.files import apply_conandata_patches, chdir, collect_libs, get, load, rename, replace_in_file, rm, rmdir, save +from conan.errors import ConanInvalidConfiguration +from conan.tools.apple import is_apple_os +from conan.tools.build import check_min_cppstd, cross_building +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.files import ( + apply_conandata_patches, + collect_libs, + get, + rmdir, + save, + copy, + export_conandata_patches, + rm, + rename, + replace_in_file +) +from conan.tools.microsoft import is_msvc, msvc_runtime_flag from conan.tools.scm import Version -from conans import CMake -from collections import defaultdict + import json -import re -import os.path import os +from pathlib import Path +import re import textwrap -required_conan_version = ">=1.50.2" # Due to conan.tools.scm.Version + +required_conan_version = ">=1.62.0" + +# LLVM's default config is to enable all targets, but end users can significantly reduce +# build times for the package by specifying only the targets they need as a +# semi-colon delimited string in the value of the 'targets' option +LLVM_TARGETS = { + "AArch64", + "AMDGPU", + "ARM", + "AVR", + "BPF", + "Hexagon", + "Lanai", + "LoongArch", + "Mips", + "MSP430", + "NVPTX", + "PowerPC", + "RISCV", + "Sparc", + "SystemZ", + "VE", + "WebAssembly", + "X86", + "XCore" +} class LLVMCoreConan(ConanFile): - name = 'llvm-core' + name = "llvm-core" description = ( - 'A toolkit for the construction of highly optimized compilers,' - 'optimizers, and runtime environments.' + "A toolkit for the construction of highly optimized compilers," + "optimizers, and runtime environments." ) - license = 'Apache-2.0 WITH LLVM-exception' - topics = ('llvm', 'compiler') - homepage = 'https://llvm.org' - url = 'https://github.com/conan-io/conan-center-index' - - settings = ('os', 'arch', 'compiler', 'build_type') + license = "Apache-2.0 WITH LLVM-exception" + topics = ("llvm", "compiler") + homepage = "https://llvm.org" + url = "https://github.com/conan-io/conan-center-index" + settings = "os", "arch", "compiler", "build_type" options = { - 'shared': [True, False], - 'fPIC': [True, False], - 'components': 'ANY', - 'targets': 'ANY', - 'exceptions': [True, False], - 'rtti': [True, False], - 'threads': [True, False], - 'lto': ['On', 'Off', 'Full', 'Thin'], - 'static_stdlib': [True, False], - 'unwind_tables': [True, False], - 'expensive_checks': [True, False], - 'use_perf': [True, False], - 'use_sanitizer': [ - 'Address', - 'Memory', - 'MemoryWithOrigins', - 'Undefined', - 'Thread', - 'DataFlow', - 'Address;Undefined', - 'None' + "shared": [True, False], + "fPIC": [True, False], + "components": ["ANY"], + "targets": ["ANY"], + "exceptions": [True, False], + "rtti": [True, False], + "threads": [True, False], + "lto": ["On", "Off", "Full", "Thin"], + "static_stdlib": [True, False], + "unwind_tables": [True, False], + "expensive_checks": [True, False], + "use_perf": [True, False], + "use_sanitizer": [ + "Address", + "Memory", + "MemoryWithOrigins", + "Undefined", + "Thread", + "DataFlow", + "Address;Undefined", + "None" ], - 'with_ffi': [True, False], - 'with_zlib': [True, False], - 'with_xml2': [True, False], - 'use_llvm_cmake_files': [True, False], + "with_ffi": [True, False], + "with_libedit": [True, False], + "with_terminfo": [True, False], + "with_zlib": [True, False], + "with_xml2": [True, False], + "with_z3": [True, False], } default_options = { - 'shared': False, - 'fPIC': True, - 'components': 'all', - 'targets': 'all', - 'exceptions': True, - 'rtti': True, - 'threads': True, - 'lto': 'Off', - 'static_stdlib': False, - 'unwind_tables': True, - 'expensive_checks': False, - 'use_perf': False, - 'use_sanitizer': 'None', - 'with_ffi': False, - 'with_zlib': True, - 'with_xml2': True, - 'use_llvm_cmake_files': False, + "shared": False, + "fPIC": True, + "components": "all", + "targets": "all", + "exceptions": True, + "rtti": True, + "threads": True, + "lto": "Off", + "static_stdlib": False, + "unwind_tables": True, + "expensive_checks": False, + "use_perf": False, + "use_sanitizer": "None", + "with_libedit": True, + "with_ffi": False, + "with_terminfo": False, # differs from LLVM default + "with_xml2": True, + "with_z3": True, + "with_zlib": True, } - # Older cmake versions may have issues generating the graphviz output used - # to model the components - build_requires = [ - 'cmake/3.20.5' - ] - - generators = 'cmake', 'cmake_find_package' - no_copy_source = True - short_paths = True - @property - def _source_subfolder(self): - return 'source' - - def _supports_compiler(self): - compiler = self.settings.compiler.value - version = Version(self.settings.compiler.version) - major_rev, minor_rev = version.major, (version.minor or 0) - - unsupported_combinations = [ - [compiler == 'gcc', major_rev == 5, minor_rev < 1], - [compiler == 'gcc', major_rev < 5], - [compiler == 'clang', major_rev < 4], - [compiler == 'apple-clang', major_rev < 9], - [compiler == 'Visual Studio', major_rev < 15] - ] - if any(all(combination) for combination in unsupported_combinations): - message = 'unsupported compiler: "{}", version "{}"' - raise ConanInvalidConfiguration(message.format(compiler, version)) - - def _patch_sources(self): - apply_conandata_patches(self) - - def _patch_build(self): - if os.path.exists('FindIconv.cmake'): - replace_in_file(self, 'FindIconv.cmake', 'iconv charset', 'iconv') + def _min_cppstd(self): + return 14 - def _configure_cmake(self): - cmake = CMake(self) - cmake.definitions['BUILD_SHARED_LIBS'] = False - cmake.definitions['CMAKE_SKIP_RPATH'] = True - cmake.definitions['CMAKE_POSITION_INDEPENDENT_CODE'] = \ - self.options.get_safe('fPIC', default=False) or self.options.shared - - if not self.options.shared: - cmake.definitions['DISABLE_LLVM_LINK_LLVM_DYLIB'] = True - # cmake.definitions['LLVM_LINK_DYLIB'] = self.options.shared - - cmake.definitions['LLVM_TARGET_ARCH'] = 'host' - cmake.definitions['LLVM_TARGETS_TO_BUILD'] = self.options.targets - cmake.definitions['LLVM_BUILD_LLVM_DYLIB'] = self.options.shared - cmake.definitions['LLVM_DYLIB_COMPONENTS'] = self.options.components - cmake.definitions['LLVM_ENABLE_PIC'] = \ - self.options.get_safe('fPIC', default=False) - - if self.settings.compiler == 'Visual Studio': - build_type = str(self.settings.build_type).upper() - cmake.definitions['LLVM_USE_CRT_{}'.format(build_type)] = \ - self.settings.compiler.runtime - - cmake.definitions['LLVM_ABI_BREAKING_CHECKS'] = 'WITH_ASSERTS' - cmake.definitions['LLVM_ENABLE_WARNINGS'] = True - cmake.definitions['LLVM_ENABLE_PEDANTIC'] = True - cmake.definitions['LLVM_ENABLE_WERROR'] = False - - cmake.definitions['LLVM_TEMPORARILY_ALLOW_OLD_TOOLCHAIN'] = True - cmake.definitions['LLVM_USE_RELATIVE_PATHS_IN_DEBUG_INFO'] = False - cmake.definitions['LLVM_BUILD_INSTRUMENTED_COVERAGE'] = False - cmake.definitions['LLVM_OPTIMIZED_TABLEGEN'] = True - cmake.definitions['LLVM_REVERSE_ITERATION'] = False - cmake.definitions['LLVM_ENABLE_BINDINGS'] = False - cmake.definitions['LLVM_CCACHE_BUILD'] = False - - cmake.definitions['LLVM_INCLUDE_TOOLS'] = self.options.shared - cmake.definitions['LLVM_INCLUDE_EXAMPLES'] = False - cmake.definitions['LLVM_INCLUDE_TESTS'] = False - cmake.definitions['LLVM_INCLUDE_BENCHMARKS'] = False - cmake.definitions['LLVM_APPEND_VC_REV'] = False - cmake.definitions['LLVM_BUILD_DOCS'] = False - cmake.definitions['LLVM_ENABLE_IDE'] = False - cmake.definitions['LLVM_ENABLE_TERMINFO'] = False - - cmake.definitions['LLVM_ENABLE_EH'] = self.options.exceptions - cmake.definitions['LLVM_ENABLE_RTTI'] = self.options.rtti - cmake.definitions['LLVM_ENABLE_THREADS'] = self.options.threads - cmake.definitions['LLVM_ENABLE_LTO'] = self.options.lto - cmake.definitions['LLVM_STATIC_LINK_CXX_STDLIB'] = \ - self.options.static_stdlib - cmake.definitions['LLVM_ENABLE_UNWIND_TABLES'] = \ - self.options.unwind_tables - cmake.definitions['LLVM_ENABLE_EXPENSIVE_CHECKS'] = \ - self.options.expensive_checks - cmake.definitions['LLVM_ENABLE_ASSERTIONS'] = \ - self.settings.build_type == 'Debug' - - cmake.definitions['LLVM_USE_NEWPM'] = False - cmake.definitions['LLVM_USE_OPROFILE'] = False - cmake.definitions['LLVM_USE_PERF'] = self.options.use_perf - if self.options.use_sanitizer == 'None': - cmake.definitions['LLVM_USE_SANITIZER'] = '' - else: - cmake.definitions['LLVM_USE_SANITIZER'] = \ - self.options.use_sanitizer - - cmake.definitions['LLVM_ENABLE_Z3_SOLVER'] = False - cmake.definitions['LLVM_ENABLE_LIBPFM'] = False - cmake.definitions['LLVM_ENABLE_LIBEDIT'] = False - cmake.definitions['LLVM_ENABLE_FFI'] = self.options.with_ffi - cmake.definitions['LLVM_ENABLE_ZLIB'] = "FORCE_ON" if \ - self.options.get_safe('with_zlib', False) else False - cmake.definitions['LLVM_ENABLE_LIBXML2'] = \ - self.options.get_safe('with_xml2', False) - return cmake + @property + def _compilers_minimum_version(self): + return { + "apple-clang": "10", + "clang": "7", + "gcc": "7", + "msvc": "191", + "Visual Studio": "15", + } def export_sources(self): - self.copy("CMakeLists.txt") - for patch in self.conan_data.get("patches", {}).get(self.version, []): - self.copy(patch["patch_file"]) + export_conandata_patches(self) def config_options(self): - if self.settings.os == 'Windows': + if self.settings.os == "Windows": del self.options.fPIC - del self.options.with_xml2 + del self.options.with_libedit # not supported on windows + + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + + def layout(self): + cmake_layout(self, src_folder="src") def requirements(self): if self.options.with_ffi: - self.requires('libffi/3.3') - if self.options.get_safe('with_zlib', False): - self.requires('zlib/1.2.12') - if self.options.get_safe('with_xml2', False): - self.requires('libxml2/2.9.10') - - def package_id(self): - del self.info.options.use_llvm_cmake_files + self.requires("libffi/3.4.4") + if self.options.get_safe("with_libedit"): + self.requires("editline/3.1") + if self.options.with_zlib: + self.requires("zlib/[>=1.2.11 <2]") + if self.options.with_xml2: + self.requires("libxml2/[>=2.12.5 <3]") + if self.options.with_z3: + self.requires("z3/4.13.0") + + def build_requirements(self): + self.tool_requires("ninja/[>=1.10.2 <2]") def validate(self): - if self.options.shared: # Shared builds disabled just due to the CI - message = 'Shared builds not currently supported' - raise ConanInvalidConfiguration(message) - # del self.options.fPIC - # if self.settings.os == 'Windows' and self.options.shared: - # message = 'Shared builds not supported on Windows' - # raise ConanInvalidConfiguration(message) + if self.settings.compiler.cppstd: + check_min_cppstd(self, self._min_cppstd) + minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) + if minimum_version and Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration( + f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." + ) + + if self.options.shared: + if self.settings.os == "Windows": + raise ConanInvalidConfiguration("Shared builds are currently not supported on Windows") + if is_apple_os(self): + # FIXME iconv contains duplicate symbols in the libiconv and libcharset libraries (both of which are + # provided by libiconv). This may be an issue with how conan packages libiconv + iconv_dep = self.dependencies.get("libiconv") + if iconv_dep and not iconv_dep.options.shared: + raise ConanInvalidConfiguration("Static iconv cannot be linked into a shared library on macos " + "due to duplicate symbols. Use libxml2/*:iconv=False.") + if self.options.exceptions and not self.options.rtti: - message = 'Cannot enable exceptions without rtti support' - raise ConanInvalidConfiguration(message) - self._supports_compiler() - if cross_building(self, skip_x64_x86=True): - raise ConanInvalidConfiguration('Cross-building not implemented') + raise ConanInvalidConfiguration("Cannot enable exceptions without rtti support") + + if cross_building(self): + # FIXME support cross compilation + # For Cross Building, LLVM builds a "native" toolchain in a subdirectory of the main build directory. + # This subdirectory would need to have the conan cmake configuration files for the build platform + # installed into it for a cross build to be successful. + # see also https://llvm.org/docs/HowToCrossCompileLLVM.html + raise ConanInvalidConfiguration("Cross compilation is not supported. Contributions are welcome!") + + def validate_build(self): + if os.getenv("CONAN_CENTER_BUILD_SERVICE") and self.settings.build_type == "Debug": + if self.settings.os == "Linux": + raise ConanInvalidConfiguration("Debug build is not supported on CCI due to resource limitations") + elif self.options.shared: + raise ConanInvalidConfiguration("Shared Debug build is not supported on CCI due to resource limitations") def source(self): - get(self, **self.conan_data["sources"][self.version], strip_root=True, - destination=self._source_subfolder) - self._patch_sources() + get(self, **self.conan_data["sources"][self.version], strip_root=True) - def build(self): - self._patch_build() - cmake = self._configure_cmake() - cmake.configure() - cmake.build() + def _apply_resource_limits(self, cmake_definitions): + if os.getenv("CONAN_CENTER_BUILD_SERVICE"): + self.output.info("Applying CCI Resource Limits") + default_ram_per_compile_job = 16384 + default_ram_per_link_job = 2048 + else: + default_ram_per_compile_job = None + default_ram_per_link_job = None - @property - def _module_subfolder(self): - return os.path.join("lib", "cmake", "llvm") + ram_per_compile_job = self.conf.get("user.llvm-core:ram_per_compile_job", default_ram_per_compile_job) + if ram_per_compile_job: + cmake_definitions["LLVM_RAM_PER_COMPILE_JOB"] = ram_per_compile_job + + ram_per_link_job = self.conf.get("user.llvm-core:ram_per_link_job", default_ram_per_link_job) + if ram_per_link_job: + cmake_definitions["LLVM_RAM_PER_LINK_JOB"] = ram_per_link_job @property - def _alias_module_file_rel_path(self): - return os.path.join(self._module_subfolder, "conan-official-{}-targets.cmake".format(self.name)) + def _targets_to_build(self): + return self.options.targets if self.options.targets != "all" else self._all_targets @property - def _old_alias_module_file_rel_path(self): - return os.path.join(self._module_subfolder, "conan-official-{}-old-targets.cmake".format(self.name)) - - def _create_cmake_module_alias_targets(self, module_file, targets): - content = "" - for alias, aliased in targets.items(): - content += textwrap.dedent("""\ - if(TARGET {aliased} AND NOT TARGET {alias}) - add_library({alias} INTERFACE IMPORTED) - set_property(TARGET {alias} PROPERTY INTERFACE_LINK_LIBRARIES {aliased}) - endif() - """.format(alias=alias, aliased=aliased)) - save(self, module_file, content) + def _all_targets(self): + targets = LLVM_TARGETS if Version(self.version) >= 14 else LLVM_TARGETS - {"LoongArch", "VE"} + return ";".join(targets) + + def generate(self): + tc = CMakeToolchain(self, generator="Ninja") + # https://releases.llvm.org/12.0.0/docs/CMake.html + # https://releases.llvm.org/13.0.0/docs/CMake.html + cmake_variables = { + # Enables LLVM to find conan libraries during try_compile + "CMAKE_TRY_COMPILE_CONFIGURATION": str(self.settings.build_type), + # LLVM has two separate concepts of a "shared library build". + # "BUILD_SHARED_LIBS" builds shared versions of all the static components + # "LLVM_BUILD_LLVM_DYLIB" builds a single shared library containing all components. + # It is likely the latter that the user expects by a "shared library" build. + "BUILD_SHARED_LIBS": False, + "LLVM_BUILD_LLVM_DYLIB": self.options.shared, + "LLVM_LINK_LLVM_DYLIB": self.options.shared, + "LLVM_DYLIB_COMPONENTS": self.options.components, + "LLVM_ABI_BREAKING_CHECKS": "WITH_ASSERTS", + "LLVM_INCLUDE_TOOLS": True, + "LLVM_INCLUDE_EXAMPLES": False, + "LLVM_INCLUDE_TESTS": False, + "LLVM_ENABLE_IDE": False, + "LLVM_ENABLE_EH": self.options.exceptions, + "LLVM_ENABLE_RTTI": self.options.rtti, + "LLVM_ENABLE_THREADS": self.options.threads, + "LLVM_ENABLE_LTO": self.options.lto, + "LLVM_STATIC_LINK_CXX_STDLIB": self.options.static_stdlib, + "LLVM_ENABLE_UNWIND_TABLES": self.options.unwind_tables, + "LLVM_ENABLE_EXPENSIVE_CHECKS": self.options.expensive_checks, + "LLVM_ENABLE_ASSERTIONS": str(self.settings.build_type), + "LLVM_USE_PERF": self.options.use_perf, + "LLVM_ENABLE_LIBEDIT": self.options.get_safe("with_libedit", False), + "LLVM_ENABLE_Z3_SOLVER": self.options.with_z3, + "LLVM_ENABLE_FFI": self.options.with_ffi, + "LLVM_ENABLE_ZLIB": "FORCE_ON" if self.options.with_zlib else False, + "LLVM_ENABLE_LIBXML2": "FORCE_ON" if self.options.with_xml2 else False, + "LLVM_ENABLE_TERMINFO": self.options.with_terminfo + } + if self.options.targets != "all": + cmake_variables["LLVM_TARGETS_TO_BUILD"] = self.options.targets - def package(self): - self.copy('LICENSE.TXT', dst='licenses', src=self._source_subfolder) - lib_path = os.path.join(self.package_folder, 'lib') + self._apply_resource_limits(cmake_variables) - cmake = self._configure_cmake() - cmake.install() + if is_msvc(self): + build_type = str(self.settings.build_type).upper() + cmake_variables[f"LLVM_USE_CRT_{build_type}"] = msvc_runtime_flag(self) if not self.options.shared: - for ext in ['.a', '.lib']: - lib = '**/lib/*LLVMTableGenGlobalISel{}'.format(ext) - self.copy(lib, dst='lib', keep_path=False) - lib = '*LLVMTableGenGlobalISel{}'.format(ext) - self.copy(lib, dst='lib', src='lib') - - CMake(self).configure(args=['--graphviz=graph/llvm.dot'], source_dir='.', build_dir='.') - with chdir(self, 'graph'): - dot_text = load(self, 'llvm.dot').replace('\r\n', '\n') - - dep_regex = re.compile(r'//\s(.+)\s->\s(.+)$', re.MULTILINE) - deps = re.findall(dep_regex, dot_text) - - dummy_targets = defaultdict(list) - for target, dep in deps: - if not target.startswith('LLVM'): - dummy_targets[target].append(dep) - - cmake_targets = { - 'libffi::libffi': 'ffi', - 'ZLIB::ZLIB': 'z', - 'Iconv::Iconv': 'iconv', - 'LibXml2::LibXml2': 'xml2' - } + cmake_variables.update({ + "DISABLE_LLVM_LINK_LLVM_DYLIB": True, + "LLVM_ENABLE_PIC": self.options.get_safe("fPIC", default=True) + }) - components = defaultdict(list) - for lib, dep in deps: - if not lib.startswith('LLVM'): - continue - elif dep.startswith('-delayload:'): + if self.options.use_sanitizer == "None": + cmake_variables["LLVM_USE_SANITIZER"] = "" + else: + cmake_variables["LLVM_USE_SANITIZER"] = self.options.use_sanitizer + + if self.settings.os == "Linux": + # Workaround for: https://github.com/conan-io/conan/issues/13560 + libdirs_host = [l for dependency in self.dependencies.host.values() for l in dependency.cpp_info.aggregated_components().libdirs] + tc.variables["CMAKE_BUILD_RPATH"] = ";".join(libdirs_host) + + tc.cache_variables.update(cmake_variables) + tc.generate() + + tc = CMakeDeps(self) + tc.generate() + + def build(self): + apply_conandata_patches(self) + cmake = CMake(self) + cmake.configure() + cmake.build() + + @property + def _package_folder_path(self): + return Path(self.package_folder) + + def _update_component_dependencies(self, components): + def _sanitized_components(deps_list): + match_genex = re.compile(r"""\\\$""") + replacements = { + "LibXml2::LibXml2": "libxml2::libxml2", + "ZLIB::ZLIB": "zlib::zlib" + } + for dep in deps_list.split(";"): + match = match_genex.search(dep) + if match: + yield match.group(1) + else: + replacement = replacements.get(dep) + if replacement: + yield replacement + elif dep.startswith("-l"): + yield dep[2:] + else: + yield dep + + def _parse_deps(deps_list): + data = { + "requires": [], + "system_libs": [] + } + windows_system_libs = [ + "ole32", + "delayimp", + "shell32", + "advapi32", + "-delayload:shell32.dll", + "uuid", + "psapi", + "-delayload:ole32.dll" + ] + for component in _sanitized_components(deps_list): + if component in windows_system_libs: continue - elif dep.startswith('LLVM'): - components[dep] - elif dep in cmake_targets: - dep = cmake_targets[dep] - elif os.path.exists(dep): - dep = os.path.splitext(os.path.basename(dep))[0] - dep = dep.replace('lib', '') - dep = dep.replace('-l', '') - - if dep in dummy_targets.keys(): - components[lib].extend(dummy_targets[dep]) - components[lib] = list(set(components[lib])) + if component in ["rt", "m", "dl", "pthread"]: + data["system_libs"].append(component) else: - components[lib].append(dep) - - alias_targets = {} - old_alias_targets = {} - for component, _ in components.items(): - alias_targets[component] = "LLVM::{}".format(component) - old_alias_targets["llvm-core::{}".format(component[4:].replace('LLVM', '').lower())] = "LLVM::{}".format(component) - - # TODO: to remove in conan v2 once cmake_find_package_* generators removed - self._create_cmake_module_alias_targets( - os.path.join(self.package_folder, self._alias_module_file_rel_path), - alias_targets - ) + data["requires"].append(component) + return data - self._create_cmake_module_alias_targets( - os.path.join(self.package_folder, self._old_alias_module_file_rel_path), - old_alias_targets - ) + # Can't use tools.files.load due to CRLF endings on Windows causing issues with Regular Expressions + cmake_exports = (self._package_folder_path / "lib" / "cmake" / "llvm" / "LLVMExports.cmake").read_text("utf-8") + match_dependencies = re.compile( + r'''^set_target_properties\((\w+).*\n?\s*INTERFACE_LINK_LIBRARIES\s+"(\S+)"''', re.MULTILINE) - rmdir(self, os.path.join(self.package_folder, 'share')) + for llvm_lib, dependencies in match_dependencies.findall(cmake_exports): + if llvm_lib in components: + components[llvm_lib].update(_parse_deps(dependencies)) - rm(self, "LLVMExports*.cmake", self.package_folder, recursive=True) - rename(self, os.path.join(self.package_folder, self._module_subfolder, 'LLVM-Config.cmake'), - os.path.join(self.package_folder, self._module_subfolder, 'LLVM-ConfigInternal.cmake')) - rename(self, os.path.join(self.package_folder, self._module_subfolder, 'LLVMConfig.cmake'), - os.path.join(self.package_folder, self._module_subfolder, 'LLVMConfigInternal.cmake')) + def _llvm_build_info(self): + cmake_config = (self._package_folder_path / "lib" / "cmake" / "llvm" / "LLVMConfig.cmake").read_text("utf-8") - replace_in_file(self, os.path.join(self.package_folder, self._module_subfolder, 'AddLLVM.cmake'), - "include(LLVM-Config)", - "include(LLVM-ConfigInternal)") - replace_in_file(self, os.path.join(self.package_folder, self._module_subfolder, 'LLVMConfigInternal.cmake'), - "LLVM-Config.cmake", - "LLVM-ConfigInternal.cmake") + match_cmake_var = re.compile(r"""^set\(LLVM_AVAILABLE_LIBS (?P.*)\)$""", re.MULTILINE) + match = match_cmake_var.search(cmake_config) + if match is None: + self.output.warning("Could not find components in LLVMConfig.cmake") + return None - for mask in ["Find*.cmake", "*Config.cmake", "*-config.cmake"]: - rm(self, mask, self.package_folder, recursive=True) + components = {component: {} for component in match.groupdict()["components"].split(";")} + self._update_component_dependencies(components) - for name in os.listdir(lib_path): - fullname = os.path.join(lib_path, name) - if 'LLVM' not in name and os.path.isfile(fullname): - os.remove(fullname) + return { + "components": components, + "native_arch": re.search(r"""^set\(LLVM_NATIVE_ARCH (\S*)\)$""", cmake_config, re.MULTILINE).group(1) + } - if not self.options.shared: - if self.options.get_safe('with_zlib', False): - if not 'z' in components['LLVMSupport']: - components['LLVMSupport'].append('z') - components_path = \ - os.path.join(self.package_folder, 'lib', 'components.json') - with open(components_path, 'w') as components_file: - json.dump(components, components_file, indent=4) - else: - suffixes = ['.dylib', '.so'] - for name in os.listdir(lib_path): - if not any(suffix in name for suffix in suffixes): - os.remove(os.path.join(lib_path, name)) + @property + def _cmake_module_path(self): + return Path("lib") / "cmake" / "llvm" - def package_info(self): - self.cpp_info.set_property("cmake_file_name", "LLVM") + @property + def _build_info_file(self): + return self._package_folder_path / self._cmake_module_path / "conan_llvm_build_info.json" - if self.options.shared: - self.cpp_info.libs = collect_libs(self) - if self.settings.os == 'Linux': - self.cpp_info.system_libs = ['pthread', 'rt', 'dl', 'm'] - elif self.settings.os == 'Macos': - self.cpp_info.system_libs = ['m'] - return - - components_path = \ - os.path.join(self.package_folder, 'lib', 'components.json') - with open(components_path, 'r') as components_file: - components = json.load(components_file) - - dependencies = ['ffi', 'z', 'iconv', 'xml2'] - targets = { - 'ffi': 'libffi::libffi', - 'z': 'zlib::zlib', - 'xml2': 'libxml2::libxml2' - } + @property + def _build_module_file_rel_path(self): + return self._cmake_module_path / f"conan-official-{self.name}-variables.cmake" + + def _create_cmake_build_module(self, build_info, module_file): + targets_with_jit = ["X86", "PowerPC", "AArch64", "ARM", "Mips", "SystemZ"] + content = textwrap.dedent(f"""\ + set(LLVM_TOOLS_BINARY_DIR "${{CMAKE_CURRENT_LIST_DIR}}/../../../bin") + cmake_path(NORMAL_PATH LLVM_TOOLS_BINARY_DIR) + set(LLVM_PACKAGE_VERSION "{self.version}") + set(LLVM_AVAILABLE_LIBS "{';'.join(build_info['components'].keys())}") + set(LLVM_BUILD_TYPE "{self.settings.build_type}") + set(LLVM_CMAKE_DIR "${{CMAKE_CURRENT_LIST_DIR}}") + set(LLVM_ALL_TARGETS "{self._all_targets}") + set(LLVM_TARGETS_TO_BUILD "{self._targets_to_build}") + set(LLVM_TARGETS_WITH_JIT "{';'.join(targets_with_jit)}") + set(LLVM_NATIVE_ARCH "{build_info['native_arch']}") + set_property(GLOBAL PROPERTY LLVM_TARGETS_CONFIGURED On) + set_property(GLOBAL PROPERTY LLVM_COMPONENT_LIBS ${{LLVM_AVAILABLE_LIBS}}) + if (NOT TARGET intrinsics_gen) + add_custom_target(intrinsics_gen) + endif() + if (NOT TARGET omp_gen) + add_custom_target(omp_gen) + endif() + if (NOT TARGET acc_gen) + add_custom_target(acc_gen) + endif() + """) + save(self, module_file, content) - for component, deps in components.items(): - self.cpp_info.components[component].libs = [component] - self.cpp_info.components[component].requires.extend(dep for dep in deps if dep.startswith('LLVM')) + def _write_build_info(self): + build_info = self._llvm_build_info() + with open(self._build_info_file, "w", encoding="utf-8") as fp: + json.dump(build_info, fp, indent=2) - for lib, target in targets.items(): - if lib in deps: - self.cpp_info.components[component].requires.append(target) + return build_info - self.cpp_info.components[component].system_libs = [ - dep for dep in deps - if not dep.startswith('LLVM') and dep not in dependencies - ] + def _read_build_info(self) -> dict: + with open(self._build_info_file, encoding="utf-8") as fp: + return json.load(fp) - self.cpp_info.components[component].set_property("cmake_target_name", component) - self.cpp_info.components[component].builddirs.append(self._module_subfolder) - - self.cpp_info.components[component].names["cmake_find_package"] = component - self.cpp_info.components[component].names["cmake_find_package_multi"] = component - self.cpp_info.components[component].build_modules["cmake_find_package"].extend([ - self._alias_module_file_rel_path, - self._old_alias_module_file_rel_path, - ]) - self.cpp_info.components[component].build_modules["cmake_find_package_multi"].extend([ - self._alias_module_file_rel_path, - self._old_alias_module_file_rel_path, - ]) - - if self.options.use_llvm_cmake_files: - self.cpp_info.components[component].build_modules["cmake_find_package"].append( - os.path.join(self._module_subfolder, "LLVMConfigInternal.cmake") - ) - self.cpp_info.components[component].build_modules["cmake_find_package_multi"].append( - os.path.join(self._module_subfolder, "LLVMConfigInternal.cmake") - ) - - # TODO: to remove in conan v2 once cmake_find_package* generators removed - self.cpp_info.names["cmake_find_package"] = "LLVM" - self.cpp_info.names["cmake_find_package_multi"] = "LLVM" + def package(self): + copy(self, "LICENSE.TXT", self.source_folder, (self._package_folder_path / "licenses").as_posix()) + cmake = CMake(self) + cmake.install() + + build_info = self._write_build_info() + + cmake_folder = self._package_folder_path / "lib" / "cmake" / "llvm" + cmake_folder_posix = cmake_folder.as_posix() + rm(self, "LLVMConfig.cmake", cmake_folder_posix) + rm(self, "LLVMExports*", cmake_folder_posix) + rm(self, "Find*", cmake_folder_posix) + rm(self, "*.pdb", (self._package_folder_path / "lib").as_posix()) + rm(self, "*.pdb", (self._package_folder_path / "bin").as_posix()) + # need to rename this as Conan will flag it, but it's not actually a Config file and is needed by + # downstream packages + rename(self, (cmake_folder / "LLVM-Config.cmake").as_posix(), (cmake_folder / "LLVM-ConfigInternal.cmake").as_posix()) + replace_in_file(self, (cmake_folder / "AddLLVM.cmake").as_posix(), "LLVM-Config", "LLVM-ConfigInternal") + rmdir(self, (self._package_folder_path / "share").as_posix()) + if self.options.shared: + rm(self, "*.a", (self._package_folder_path / "lib").as_posix()) + + self._create_cmake_build_module( + build_info, + (self._package_folder_path / self._build_module_file_rel_path).as_posix() + ) + + def package_info(self): + self.cpp_info.set_property("cmake_file_name", "LLVM") + self.cpp_info.set_property("cmake_build_modules", + [self._build_module_file_rel_path, + (self._cmake_module_path / "LLVM-ConfigInternal.cmake").as_posix()] + ) + self.cpp_info.builddirs.append(self._cmake_module_path) + + if not self.options.shared: + build_info = self._read_build_info() + components = build_info["components"] + + for component_name, data in components.items(): + self.cpp_info.components[component_name].set_property("cmake_target_name", component_name) + self.cpp_info.components[component_name].libs = [component_name] + requires = data.get("requires") + if requires is not None: + self.cpp_info.components[component_name].requires += requires + system_libs = data.get("system_libs") + if system_libs is not None: + self.cpp_info.components[component_name].system_libs += system_libs + else: + self.cpp_info.set_property("cmake_target_name", "LLVM") + self.cpp_info.libs = collect_libs(self) diff --git a/recipes/llvm-core/all/patches/11x/0000-cmake-dependencies.patch b/recipes/llvm-core/all/patches/11x/0000-cmake-dependencies.patch new file mode 100644 index 0000000000000..3da6ed6f9b317 --- /dev/null +++ b/recipes/llvm-core/all/patches/11x/0000-cmake-dependencies.patch @@ -0,0 +1,118 @@ +diff --git a/cmake/config-ix.cmake b/cmake/config-ix.cmake +index 90e5d327c75..c8bcb1afb76 100644 +--- a/cmake/config-ix.cmake ++++ b/cmake/config-ix.cmake +@@ -5,6 +5,7 @@ endif() + + include(CheckIncludeFile) + include(CheckLibraryExists) ++include(CMakePushCheckState) + include(CheckSymbolExists) + include(CheckFunctionExists) + include(CheckStructHasMember) +@@ -56,13 +57,27 @@ check_include_file(sys/types.h HAVE_SYS_TYPES_H) + check_include_file(termios.h HAVE_TERMIOS_H) + check_include_file(unistd.h HAVE_UNISTD_H) + check_include_file(valgrind/valgrind.h HAVE_VALGRIND_VALGRIND_H) +-check_include_file(zlib.h HAVE_ZLIB_H) ++ ++if(LLVM_ENABLE_ZLIB) ++ find_package(ZLIB REQUIRED) ++ cmake_push_check_state() ++ list(APPEND CMAKE_REQUIRED_INCLUDES ${ZLIB_INCLUDE_DIRS}) ++ check_include_file(zlib.h HAVE_ZLIB_H) ++ cmake_pop_check_state() ++endif() ++ + check_include_file(fenv.h HAVE_FENV_H) + check_symbol_exists(FE_ALL_EXCEPT "fenv.h" HAVE_DECL_FE_ALL_EXCEPT) + check_symbol_exists(FE_INEXACT "fenv.h" HAVE_DECL_FE_INEXACT) + + check_include_file(mach/mach.h HAVE_MACH_MACH_H) +-check_include_file(histedit.h HAVE_HISTEDIT_H) ++if(LLVM_ENABLE_LIBEDIT) ++ find_package(editline REQUIRED) ++ cmake_push_check_state() ++ list(APPEND CMAKE_REQUIRED_INCLUDES ${editline_INCLUDE_DIRS}) ++ check_include_file(histedit.h HAVE_HISTEDIT_H) ++ cmake_pop_check_state() ++endif() + check_include_file(CrashReporterClient.h HAVE_CRASHREPORTERCLIENT_H) + if(APPLE) + include(CheckCSourceCompiles) +@@ -118,24 +133,21 @@ endif() + # Don't look for these libraries if we're using MSan, since uninstrumented third + # party code may call MSan interceptors like strlen, leading to false positives. + if(NOT LLVM_USE_SANITIZER MATCHES "Memory.*") +- set(HAVE_LIBZ 0) + if(LLVM_ENABLE_ZLIB) +- foreach(library z zlib_static zlib) +- string(TOUPPER ${library} library_suffix) +- check_library_exists(${library} compress2 "" HAVE_LIBZ_${library_suffix}) +- if(HAVE_LIBZ_${library_suffix}) +- set(HAVE_LIBZ 1) +- set(ZLIB_LIBRARIES "${library}") +- break() +- endif() +- endforeach() ++ cmake_push_check_state() ++ list(APPEND CMAKE_REQUIRED_INCLUDES ${ZLIB_INCLUDE_DIRS}) ++ list(APPEND CMAKE_REQUIRED_LIBRARIES ${ZLIB_LIBRARIES}) ++ check_symbol_exists(compress2 zlib.h HAVE_LIBZ) ++ cmake_pop_check_state() + endif() + +- # Don't look for these libraries on Windows. +- if (NOT PURE_WINDOWS) + # Skip libedit if using ASan as it contains memory leaks. + if (LLVM_ENABLE_LIBEDIT AND HAVE_HISTEDIT_H AND NOT LLVM_USE_SANITIZER MATCHES ".*Address.*") ++ cmake_push_check_state() ++ list(APPEND CMAKE_REQUIRED_INCLUDES ${editline_INCLUDE_DIRS}) ++ list(APPEND CMAKE_REQUIRED_LIBRARIES ${editline_LIBRARIES}) + check_library_exists(edit el_init "" HAVE_LIBEDIT) ++ cmake_pop_check_state() + else() + set(HAVE_LIBEDIT 0) + endif() +@@ -157,19 +169,11 @@ if(NOT LLVM_USE_SANITIZER MATCHES "Memory.*") + find_library(ICONV_LIBRARY_PATH NAMES iconv libiconv libiconv-2 c) + set(LLVM_LIBXML2_ENABLED 0) + set(LIBXML2_FOUND 0) +- if((LLVM_ENABLE_LIBXML2) AND ((CMAKE_SYSTEM_NAME MATCHES "Linux") AND (ICONV_LIBRARY_PATH) OR APPLE)) +- find_package(LibXml2) +- if (LIBXML2_FOUND) ++ if(LLVM_ENABLE_LIBXML2) ++ find_package(LibXml2 REQUIRED) + set(LLVM_LIBXML2_ENABLED 1) +- if ((CMAKE_OSX_SYSROOT) AND (EXISTS ${CMAKE_OSX_SYSROOT}/${LIBXML2_INCLUDE_DIR})) +- include_directories(${CMAKE_OSX_SYSROOT}/${LIBXML2_INCLUDE_DIR}) +- else() +- include_directories(${LIBXML2_INCLUDE_DIR}) +- endif() +- endif() + endif() + endif() +-endif() + + if (LLVM_ENABLE_LIBXML2 STREQUAL "FORCE_ON" AND NOT LLVM_LIBXML2_ENABLED) + message(FATAL_ERROR "Failed to congifure libxml2") +@@ -517,7 +521,7 @@ else( LLVM_ENABLE_THREADS ) + message(STATUS "Threads disabled.") + endif() + +-if (LLVM_ENABLE_ZLIB ) ++if (LLVM_ENABLE_ZLIB STREQUAL "FORCE_ON") + # Check if zlib is available in the system. + if ( NOT HAVE_ZLIB_H OR NOT HAVE_LIBZ ) + set(LLVM_ENABLE_ZLIB 0) +diff --git a/lib/LineEditor/CMakeLists.txt b/lib/LineEditor/CMakeLists.txt +index 59190379406..3952bf0144f 100644 +--- a/lib/LineEditor/CMakeLists.txt ++++ b/lib/LineEditor/CMakeLists.txt +@@ -1,5 +1,5 @@ + if(HAVE_LIBEDIT) +- set(link_libs edit) ++ set(link_libs editline::editline) + endif() + + add_llvm_component_library(LLVMLineEditor diff --git a/recipes/llvm-core/all/patches/11x/0001-calculate-job-pools.patch b/recipes/llvm-core/all/patches/11x/0001-calculate-job-pools.patch new file mode 100644 index 0000000000000..b00101aa4e526 --- /dev/null +++ b/recipes/llvm-core/all/patches/11x/0001-calculate-job-pools.patch @@ -0,0 +1,42 @@ +diff --git a/cmake/modules/HandleLLVMOptions.cmake b/cmake/modules/HandleLLVMOptions.cmake +index 5ef22eb493b..3478c7ef6eb 100644 +--- a/cmake/modules/HandleLLVMOptions.cmake ++++ b/cmake/modules/HandleLLVMOptions.cmake +@@ -27,6 +27,19 @@ string(TOUPPER "${LLVM_ENABLE_LTO}" uppercase_LLVM_ENABLE_LTO) + # The following only works with the Ninja generator in CMake >= 3.0. + set(LLVM_PARALLEL_COMPILE_JOBS "" CACHE STRING + "Define the maximum number of concurrent compilation jobs (Ninja only).") ++cmake_host_system_information(RESULT AVAILABLE_PHYSICAL_MEMORY QUERY AVAILABLE_PHYSICAL_MEMORY) ++cmake_host_system_information(RESULT NUMBER_OF_LOGICAL_CORES QUERY NUMBER_OF_LOGICAL_CORES) ++if(LLVM_RAM_PER_COMPILE_JOB) ++ math(EXPR memory_available_jobs "${AVAILABLE_PHYSICAL_MEMORY} / ${LLVM_RAM_PER_COMPILE_JOB}" OUTPUT_FORMAT DECIMAL) ++ if (memory_available_jobs LESS 1) ++ set(memory_available_jobs 1) ++ endif() ++ if (memory_available_jobs LESS NUMBER_OF_LOGICAL_CORES) ++ set(LLVM_PARALLEL_COMPILE_JOBS "${memory_available_jobs}") ++ else() ++ set(LLVM_PARALLEL_COMPILE_JOBS "${NUMBER_OF_LOGICAL_CORES}") ++ endif() ++endif() + if(LLVM_PARALLEL_COMPILE_JOBS) + if(NOT CMAKE_GENERATOR STREQUAL "Ninja") + message(WARNING "Job pooling is only available with Ninja generators.") +@@ -38,6 +51,17 @@ endif() + + set(LLVM_PARALLEL_LINK_JOBS "" CACHE STRING + "Define the maximum number of concurrent link jobs (Ninja only).") ++if(LLVM_RAM_PER_LINK_JOB) ++ math(EXPR memory_available_jobs "${AVAILABLE_PHYSICAL_MEMORY} / ${LLVM_RAM_PER_LINK_JOB}" OUTPUT_FORMAT DECIMAL) ++ if (memory_available_jobs LESS 1) ++ set(memory_available_jobs 1) ++ endif() ++ if (memory_available_jobs LESS NUMBER_OF_LOGICAL_CORES) ++ set(LLVM_PARALLEL_LINK_JOBS "${memory_available_jobs}") ++ else() ++ set(LLVM_PARALLEL_LINK_JOBS "${NUMBER_OF_LOGICAL_CORES}") ++ endif() ++endif() + if(CMAKE_GENERATOR STREQUAL "Ninja") + if(NOT LLVM_PARALLEL_LINK_JOBS AND uppercase_LLVM_ENABLE_LTO STREQUAL "THIN") + message(STATUS "ThinLTO provides its own parallel linking - limiting parallel link jobs to 2.") diff --git a/recipes/llvm-core/all/patches/11x/0002-missing-includes.patch b/recipes/llvm-core/all/patches/11x/0002-missing-includes.patch new file mode 100644 index 0000000000000..929a539e77369 --- /dev/null +++ b/recipes/llvm-core/all/patches/11x/0002-missing-includes.patch @@ -0,0 +1,24 @@ +diff --git a/include/llvm/Support/Signals.h b/include/llvm/Support/Signals.h +index e0a18e72f2a..148216b8f87 100644 +--- a/include/llvm/Support/Signals.h ++++ b/include/llvm/Support/Signals.h +@@ -14,6 +14,7 @@ + #ifndef LLVM_SUPPORT_SIGNALS_H + #define LLVM_SUPPORT_SIGNALS_H + ++#include + #include + + namespace llvm { +diff --git a/utils/benchmark/src/benchmark_register.h b/utils/benchmark/src/benchmark_register.h +index 0705e219f2f..4caa5ad4da0 100644 +--- a/utils/benchmark/src/benchmark_register.h ++++ b/utils/benchmark/src/benchmark_register.h +@@ -1,6 +1,7 @@ + #ifndef BENCHMARK_REGISTER_H + #define BENCHMARK_REGISTER_H + ++#include + #include + + #include "check.h" diff --git a/recipes/llvm-core/all/patches/11x/0003-no-build-with-install-rpath.patch b/recipes/llvm-core/all/patches/11x/0003-no-build-with-install-rpath.patch new file mode 100644 index 0000000000000..e56177aab947f --- /dev/null +++ b/recipes/llvm-core/all/patches/11x/0003-no-build-with-install-rpath.patch @@ -0,0 +1,13 @@ +diff --git a/cmake/modules/AddLLVM.cmake b/cmake/modules/AddLLVM.cmake +index b74adc11ade9..8c70fe15d2a0 100644 +--- a/cmake/modules/AddLLVM.cmake ++++ b/cmake/modules/AddLLVM.cmake +@@ -2081,7 +2081,7 @@ function(llvm_setup_rpath name) + endif() + + set_target_properties(${name} PROPERTIES +- BUILD_WITH_INSTALL_RPATH On ++ BUILD_WITH_INSTALL_RPATH OFF + INSTALL_RPATH "${_install_rpath}" + ${_install_name_dir}) + endfunction() diff --git a/recipes/llvm-core/all/patches/11x/0004-remove-lto-exports.patch b/recipes/llvm-core/all/patches/11x/0004-remove-lto-exports.patch new file mode 100644 index 0000000000000..6dea8a2419a11 --- /dev/null +++ b/recipes/llvm-core/all/patches/11x/0004-remove-lto-exports.patch @@ -0,0 +1,32 @@ +diff --git a/tools/lto/lto.exports b/tools/lto/lto.exports +index 1f0a6b23d3fd..2871abd34e40 100644 +--- a/tools/lto/lto.exports ++++ b/tools/lto/lto.exports +@@ -43,12 +43,6 @@ lto_codegen_optimize + lto_codegen_compile_optimized + lto_codegen_set_should_internalize + lto_codegen_set_should_embed_uselists +-LLVMCreateDisasm +-LLVMCreateDisasmCPU +-LLVMDisasmDispose +-LLVMDisasmInstruction +-LLVMSetDisasmOptions +-LLVMCreateDisasmCPUFeatures + thinlto_create_codegen + thinlto_codegen_dispose + thinlto_codegen_add_module +diff --git a/tools/remarks-shlib/CMakeLists.txt b/tools/remarks-shlib/CMakeLists.txt +index e948496c603a..97bc45e110dc 100644 +--- a/tools/remarks-shlib/CMakeLists.txt ++++ b/tools/remarks-shlib/CMakeLists.txt +@@ -6,7 +6,9 @@ set(SOURCES + libremarks.cpp + ) + +-set(LLVM_EXPORTED_SYMBOL_FILE ${CMAKE_CURRENT_SOURCE_DIR}/Remarks.exports) ++if (NOT (BUILD_SHARED_LIBS OR LLVM_LINK_LLVM_DYLIB)) ++ set(LLVM_EXPORTED_SYMBOL_FILE ${CMAKE_CURRENT_SOURCE_DIR}/Remarks.exports) ++endif() + + add_llvm_library(Remarks SHARED INSTALL_WITH_TOOLCHAIN ${SOURCES}) + diff --git a/recipes/llvm-core/all/patches/11x/11.1.0-cmake.patch b/recipes/llvm-core/all/patches/11x/11.1.0-cmake.patch deleted file mode 100644 index 6f2c7682aa4e0..0000000000000 --- a/recipes/llvm-core/all/patches/11x/11.1.0-cmake.patch +++ /dev/null @@ -1,57 +0,0 @@ ---- cmake/config-ix.cmake -+++ cmake/config-ix.cmake -@@ -159,6 +159,9 @@ - set(LIBXML2_FOUND 0) - if((LLVM_ENABLE_LIBXML2) AND ((CMAKE_SYSTEM_NAME MATCHES "Linux") AND (ICONV_LIBRARY_PATH) OR APPLE)) - find_package(LibXml2) -+ set(LIBXML2_FOUND 1) -+ list(GET LibXml2_INCLUDE_DIRS -1 LIBXML2_INCLUDE_DIR) -+ set(LIBXML2_LIBRARIES ${LibXml2_LIBRARIES}) - if (LIBXML2_FOUND) - set(LLVM_LIBXML2_ENABLED 1) - if ((CMAKE_OSX_SYSROOT) AND (EXISTS ${CMAKE_OSX_SYSROOT}/${LIBXML2_INCLUDE_DIR})) -@@ -321,7 +321,7 @@ - message(FATAL_ERROR "libffi includes are not found.") - endif() - -- find_library(FFI_LIBRARY_PATH ffi PATHS ${FFI_LIBRARY_DIR}) -+ find_library(FFI_LIBRARY_PATH NAMES ffi libffi PATHS ${FFI_LIBRARY_DIR}) - if( NOT FFI_LIBRARY_PATH ) - message(FATAL_ERROR "libffi is not found.") - endif() ---- cmake/modules/TableGen.cmake -+++ cmake/modules/TableGen.cmake -@@ -138,12 +138,7 @@ - macro(add_tablegen target project) - set(${target}_OLD_LLVM_LINK_COMPONENTS ${LLVM_LINK_COMPONENTS}) - set(LLVM_LINK_COMPONENTS ${LLVM_LINK_COMPONENTS} TableGen) -- -- # CMake-3.9 doesn't let compilation units depend on their dependent libraries. -- if(NOT (CMAKE_GENERATOR STREQUAL "Ninja" AND NOT CMAKE_VERSION VERSION_LESS 3.9) AND NOT XCODE) -- # FIXME: It leaks to user, callee of add_tablegen. -- set(LLVM_ENABLE_OBJLIB ON) -- endif() -+ set(LLVM_ENABLE_OBJLIB OFF) - - add_llvm_executable(${target} DISABLE_LLVM_LINK_LLVM_DYLIB ${ARGN}) - set(LLVM_LINK_COMPONENTS ${${target}_OLD_LLVM_LINK_COMPONENTS}) ---- lib/WindowsManifest/CMakeLists.txt -+++ lib/WindowsManifest/CMakeLists.txt -@@ -8,16 +8,6 @@ - if(LIBXML2_LIBRARIES) - target_link_libraries(LLVMWindowsManifest PUBLIC ${LIBXML2_LIBRARIES}) - -- get_filename_component(xml2_library ${LIBXML2_LIBRARIES} NAME) -- if (CMAKE_STATIC_LIBRARY_PREFIX AND -- xml2_library MATCHES "^${CMAKE_STATIC_LIBRARY_PREFIX}.*${CMAKE_STATIC_LIBRARY_SUFFIX}$") -- string(REGEX REPLACE "^${CMAKE_STATIC_LIBRARY_PREFIX}" "" xml2_library ${xml2_library}) -- string(REGEX REPLACE "${CMAKE_STATIC_LIBRARY_SUFFIX}$" "" xml2_library ${xml2_library}) -- elseif (CMAKE_SHARED_LIBRARY_PREFIX AND -- xml2_library MATCHES "^${CMAKE_SHARED_LIBRARY_PREFIX}.*${CMAKE_SHARED_LIBRARY_SUFFIX}$") -- string(REGEX REPLACE "^${CMAKE_SHARED_LIBRARY_PREFIX}" "" xml2_library ${xml2_library}) -- string(REGEX REPLACE "${CMAKE_SHARED_LIBRARY_SUFFIX}$" "" xml2_library ${xml2_library}) -- endif() - set_property(TARGET LLVMWindowsManifest PROPERTY -- LLVM_SYSTEM_LIBS ${xml2_library}) -+ LLVM_SYSTEM_LIBS ${LIBXML2_LIBRARIES}) - endif() diff --git a/recipes/llvm-core/all/patches/11x/11.1.0-native.patch b/recipes/llvm-core/all/patches/11x/11.1.0-native.patch deleted file mode 100644 index c541a76820341..0000000000000 --- a/recipes/llvm-core/all/patches/11x/11.1.0-native.patch +++ /dev/null @@ -1,81 +0,0 @@ ---- CMakeLists.txt -+++ CMakeLists.txt -@@ -942,10 +942,6 @@ - include_directories( ${LLVM_INCLUDE_DIR} ${LLVM_MAIN_INCLUDE_DIR}) - - # when crosscompiling import the executable targets from a file --if(LLVM_USE_HOST_TOOLS) -- include(CrossCompile) -- llvm_create_cross_target(LLVM NATIVE "" Release) --endif(LLVM_USE_HOST_TOOLS) - if(LLVM_TARGET_IS_CROSSCOMPILE_HOST) - # Dummy use to avoid CMake Warning: Manually-specified variables were not used - # (this is a variable that CrossCompile sets on recursive invocations) ---- cmake/modules/TableGen.cmake -+++ cmake/modules/TableGen.cmake -@@ -150,33 +150,6 @@ - set(${project}_TABLEGEN_EXE ${${project}_TABLEGEN} PARENT_SCOPE) - set(${project}_TABLEGEN_TARGET ${${project}_TABLEGEN} PARENT_SCOPE) - -- if(LLVM_USE_HOST_TOOLS) -- if( ${${project}_TABLEGEN} STREQUAL "${target}" ) -- # The NATIVE tablegen executable *must* depend on the current target one -- # otherwise the native one won't get rebuilt when the tablgen sources -- # change, and we end up with incorrect builds. -- build_native_tool(${target} ${project}_TABLEGEN_EXE DEPENDS ${target}) -- set(${project}_TABLEGEN_EXE ${${project}_TABLEGEN_EXE} PARENT_SCOPE) -- -- add_custom_target(${project}-tablegen-host DEPENDS ${${project}_TABLEGEN_EXE}) -- set(${project}_TABLEGEN_TARGET ${project}-tablegen-host PARENT_SCOPE) -- -- # Create an artificial dependency between tablegen projects, because they -- # compile the same dependencies, thus using the same build folders. -- # FIXME: A proper fix requires sequentially chaining tablegens. -- if (NOT ${project} STREQUAL LLVM AND TARGET ${project}-tablegen-host AND -- TARGET LLVM-tablegen-host) -- add_dependencies(${project}-tablegen-host LLVM-tablegen-host) -- endif() -- -- # If we're using the host tablegen, and utils were not requested, we have no -- # need to build this tablegen. -- if ( NOT LLVM_BUILD_UTILS ) -- set_target_properties(${target} PROPERTIES EXCLUDE_FROM_ALL ON) -- endif() -- endif() -- endif() -- - if ((${project} STREQUAL LLVM OR ${project} STREQUAL MLIR) AND NOT LLVM_INSTALL_TOOLCHAIN_ONLY AND LLVM_BUILD_UTILS) - set(export_to_llvmexports) - if(${target} IN_LIST LLVM_DISTRIBUTION_COMPONENTS OR ---- tools/llvm-config/CMakeLists.txt -+++ tools/llvm-config/CMakeLists.txt -@@ -77,11 +77,3 @@ - - # Add the dependency on the generation step. - add_file_dependencies(${CMAKE_CURRENT_SOURCE_DIR}/llvm-config.cpp ${BUILDVARIABLES_OBJPATH}) -- --if(CMAKE_CROSSCOMPILING AND NOT LLVM_CONFIG_PATH) -- build_native_tool(llvm-config LLVM_CONFIG_PATH) -- set(LLVM_CONFIG_PATH "${LLVM_CONFIG_PATH}" CACHE STRING "") -- -- add_custom_target(NativeLLVMConfig DEPENDS ${LLVM_CONFIG_PATH}) -- add_dependencies(llvm-config NativeLLVMConfig) --endif() ---- tools/llvm-shlib/CMakeLists.txt -+++ tools/llvm-shlib/CMakeLists.txt -@@ -155,13 +155,8 @@ - - set(LLVM_EXPORTED_SYMBOL_FILE ${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/libllvm-c.exports) - if(NOT LLVM_NM) -- if(CMAKE_CROSSCOMPILING) -- build_native_tool(llvm-nm llvm_nm) -- set(llvm_nm_target "${llvm_nm}") -- else() -- set(llvm_nm $) -- set(llvm_nm_target llvm-nm) -- endif() -+ set(llvm_nm $) -+ set(llvm_nm_target llvm-nm) - else() - set(llvm_nm ${LLVM_NM}) - set(llvm_nm_target "") diff --git a/recipes/llvm-core/all/patches/12x/0000-cmake-dependencies.patch b/recipes/llvm-core/all/patches/12x/0000-cmake-dependencies.patch new file mode 100644 index 0000000000000..319d08bc1921c --- /dev/null +++ b/recipes/llvm-core/all/patches/12x/0000-cmake-dependencies.patch @@ -0,0 +1,92 @@ +diff --git a/cmake/config-ix.cmake b/cmake/config-ix.cmake +index 818fafbce14..8ef381257b6 100644 +--- a/cmake/config-ix.cmake ++++ b/cmake/config-ix.cmake +@@ -63,7 +63,13 @@ check_symbol_exists(FE_ALL_EXCEPT "fenv.h" HAVE_DECL_FE_ALL_EXCEPT) + check_symbol_exists(FE_INEXACT "fenv.h" HAVE_DECL_FE_INEXACT) + + check_include_file(mach/mach.h HAVE_MACH_MACH_H) +-check_include_file(histedit.h HAVE_HISTEDIT_H) ++if (LLVM_ENABLE_LIBEDIT) ++ find_package(editline REQUIRED) ++ cmake_push_check_state() ++ list(APPEND CMAKE_REQUIRED_INCLUDES ${editline_INCLUDE_DIRS}) ++ check_include_file(histedit.h HAVE_HISTEDIT_H) ++ cmake_pop_check_state() ++endif() + check_include_file(CrashReporterClient.h HAVE_CRASHREPORTERCLIENT_H) + if(APPLE) + include(CheckCSourceCompiles) +@@ -127,7 +133,7 @@ if(LLVM_ENABLE_ZLIB) + # library on a 64-bit system which would result in a link-time failure. + cmake_push_check_state() + list(APPEND CMAKE_REQUIRED_INCLUDES ${ZLIB_INCLUDE_DIRS}) +- list(APPEND CMAKE_REQUIRED_LIBRARIES ${ZLIB_LIBRARY}) ++ list(APPEND CMAKE_REQUIRED_LIBRARIES ${ZLIB_LIBRARIES}) + check_symbol_exists(compress2 zlib.h HAVE_ZLIB) + cmake_pop_check_state() + if(LLVM_ENABLE_ZLIB STREQUAL FORCE_ON AND NOT HAVE_ZLIB) +@@ -165,7 +171,11 @@ if(NOT LLVM_USE_SANITIZER MATCHES "Memory.*") + if (NOT PURE_WINDOWS) + # Skip libedit if using ASan as it contains memory leaks. + if (LLVM_ENABLE_LIBEDIT AND HAVE_HISTEDIT_H AND NOT LLVM_USE_SANITIZER MATCHES ".*Address.*") ++ cmake_push_check_state() ++ list(APPEND CMAKE_REQUIRED_INCLUDES ${editline_INCLUDE_DIRS}) ++ list(APPEND CMAKE_REQUIRED_LIBRARIES ${editline_LIBRARIES}) + check_library_exists(edit el_init "" HAVE_LIBEDIT) ++ cmake_pop_check_state() + else() + set(HAVE_LIBEDIT 0) + endif() +diff --git a/lib/LineEditor/CMakeLists.txt b/lib/LineEditor/CMakeLists.txt +index 61328f76905..b95d073d972 100644 +--- a/lib/LineEditor/CMakeLists.txt ++++ b/lib/LineEditor/CMakeLists.txt +@@ -1,5 +1,5 @@ + if(HAVE_LIBEDIT) +- set(link_libs edit) ++ set(link_libs editline::editline) + endif() + + add_llvm_component_library(LLVMLineEditor +diff --git a/lib/Support/CMakeLists.txt b/lib/Support/CMakeLists.txt +index cdee11412eb..f32a7b7909d 100644 +--- a/lib/Support/CMakeLists.txt ++++ b/lib/Support/CMakeLists.txt +@@ -236,14 +236,7 @@ set(llvm_system_libs ${system_libs}) + # This block is only needed for llvm-config. When we deprecate llvm-config and + # move to using CMake export, this block can be removed. + if(LLVM_ENABLE_ZLIB) +- # CMAKE_BUILD_TYPE is only meaningful to single-configuration generators. +- if(CMAKE_BUILD_TYPE) +- string(TOUPPER ${CMAKE_BUILD_TYPE} build_type) +- get_property(zlib_library TARGET ZLIB::ZLIB PROPERTY LOCATION_${build_type}) +- endif() +- if(NOT zlib_library) +- get_property(zlib_library TARGET ZLIB::ZLIB PROPERTY LOCATION) +- endif() ++ set(zlib_library ${ZLIB_LIBRARIES}) + get_library_name(${zlib_library} zlib_library) + set(llvm_system_libs ${llvm_system_libs} "${zlib_library}") + endif() +diff --git a/lib/WindowsManifest/CMakeLists.txt b/lib/WindowsManifest/CMakeLists.txt +index 8134ac8c815..652062f7fb9 100644 +--- a/lib/WindowsManifest/CMakeLists.txt ++++ b/lib/WindowsManifest/CMakeLists.txt +@@ -21,14 +21,8 @@ add_llvm_component_library(LLVMWindowsManifest + # This block is only needed for llvm-config. When we deprecate llvm-config and + # move to using CMake export, this block can be removed. + if(LLVM_ENABLE_LIBXML2) +- # CMAKE_BUILD_TYPE is only meaningful to single-configuration generators. +- if(CMAKE_BUILD_TYPE) +- string(TOUPPER ${CMAKE_BUILD_TYPE} build_type) +- get_property(libxml2_library TARGET LibXml2::LibXml2 PROPERTY LOCATION_${build_type}) +- endif() +- if(NOT zlib_library) +- get_property(libxml2_library TARGET LibXml2::LibXml2 PROPERTY LOCATION) +- endif() ++ find_package(libxml2 REQUIRED CONFIG) ++ set(libxml2_library ${libxml2_LIBRARIES}) + get_library_name(${libxml2_library} libxml2_library) + set_property(TARGET LLVMWindowsManifest PROPERTY LLVM_SYSTEM_LIBS ${libxml2_library}) + endif() diff --git a/recipes/llvm-core/all/patches/12x/0001-calculate-job-pools.patch b/recipes/llvm-core/all/patches/12x/0001-calculate-job-pools.patch new file mode 100644 index 0000000000000..ab29c3a894ccd --- /dev/null +++ b/recipes/llvm-core/all/patches/12x/0001-calculate-job-pools.patch @@ -0,0 +1,42 @@ +diff --git a/cmake/modules/HandleLLVMOptions.cmake b/cmake/modules/HandleLLVMOptions.cmake +index 5d4d692a70a..5776a85b747 100644 +--- a/cmake/modules/HandleLLVMOptions.cmake ++++ b/cmake/modules/HandleLLVMOptions.cmake +@@ -27,6 +27,19 @@ string(TOUPPER "${LLVM_ENABLE_LTO}" uppercase_LLVM_ENABLE_LTO) + # The following only works with the Ninja generator in CMake >= 3.0. + set(LLVM_PARALLEL_COMPILE_JOBS "" CACHE STRING + "Define the maximum number of concurrent compilation jobs (Ninja only).") ++cmake_host_system_information(RESULT AVAILABLE_PHYSICAL_MEMORY QUERY AVAILABLE_PHYSICAL_MEMORY) ++cmake_host_system_information(RESULT NUMBER_OF_LOGICAL_CORES QUERY NUMBER_OF_LOGICAL_CORES) ++if(LLVM_RAM_PER_COMPILE_JOB) ++ math(EXPR memory_available_jobs "${AVAILABLE_PHYSICAL_MEMORY} / ${LLVM_RAM_PER_COMPILE_JOB}" OUTPUT_FORMAT DECIMAL) ++ if (memory_available_jobs LESS 1) ++ set(memory_available_jobs 1) ++ endif() ++ if (memory_available_jobs LESS NUMBER_OF_LOGICAL_CORES) ++ set(LLVM_PARALLEL_COMPILE_JOBS "${memory_available_jobs}") ++ else() ++ set(LLVM_PARALLEL_COMPILE_JOBS "${NUMBER_OF_LOGICAL_CORES}") ++ endif() ++endif() + if(LLVM_PARALLEL_COMPILE_JOBS) + if(NOT CMAKE_GENERATOR STREQUAL "Ninja") + message(WARNING "Job pooling is only available with Ninja generators.") +@@ -38,6 +51,17 @@ endif() + + set(LLVM_PARALLEL_LINK_JOBS "" CACHE STRING + "Define the maximum number of concurrent link jobs (Ninja only).") ++if(LLVM_RAM_PER_LINK_JOB) ++ math(EXPR memory_available_jobs "${AVAILABLE_PHYSICAL_MEMORY} / ${LLVM_RAM_PER_LINK_JOB}" OUTPUT_FORMAT DECIMAL) ++ if (memory_available_jobs LESS 1) ++ set(memory_available_jobs 1) ++ endif() ++ if (memory_available_jobs LESS NUMBER_OF_LOGICAL_CORES) ++ set(LLVM_PARALLEL_LINK_JOBS "${memory_available_jobs}") ++ else() ++ set(LLVM_PARALLEL_LINK_JOBS "${NUMBER_OF_LOGICAL_CORES}") ++ endif() ++endif() + if(CMAKE_GENERATOR STREQUAL "Ninja") + if(NOT LLVM_PARALLEL_LINK_JOBS AND uppercase_LLVM_ENABLE_LTO STREQUAL "THIN") + message(STATUS "ThinLTO provides its own parallel linking - limiting parallel link jobs to 2.") diff --git a/recipes/llvm-core/all/patches/12x/0002-missing-includes.patch b/recipes/llvm-core/all/patches/12x/0002-missing-includes.patch new file mode 100644 index 0000000000000..c7cfb90318b49 --- /dev/null +++ b/recipes/llvm-core/all/patches/12x/0002-missing-includes.patch @@ -0,0 +1,12 @@ +diff --git a/include/llvm/Support/Signals.h b/include/llvm/Support/Signals.h +index 44f5a750ff5..937e0572d4a 100644 +--- a/include/llvm/Support/Signals.h ++++ b/include/llvm/Support/Signals.h +@@ -14,6 +14,7 @@ + #ifndef LLVM_SUPPORT_SIGNALS_H + #define LLVM_SUPPORT_SIGNALS_H + ++#include + #include + + namespace llvm { diff --git a/recipes/llvm-core/all/patches/12x/0003-no-build-with-install-rpath.patch b/recipes/llvm-core/all/patches/12x/0003-no-build-with-install-rpath.patch new file mode 100644 index 0000000000000..df143f02d6491 --- /dev/null +++ b/recipes/llvm-core/all/patches/12x/0003-no-build-with-install-rpath.patch @@ -0,0 +1,13 @@ +diff --git a/cmake/modules/AddLLVM.cmake b/cmake/modules/AddLLVM.cmake +index 97c9980c7de3..23fead47c2d7 100644 +--- a/cmake/modules/AddLLVM.cmake ++++ b/cmake/modules/AddLLVM.cmake +@@ -2118,7 +2118,7 @@ function(llvm_setup_rpath name) + + # Enable BUILD_WITH_INSTALL_RPATH unless CMAKE_BUILD_RPATH is set. + if("${CMAKE_BUILD_RPATH}" STREQUAL "") +- set_property(TARGET ${name} PROPERTY BUILD_WITH_INSTALL_RPATH ON) ++ set_property(TARGET ${name} PROPERTY BUILD_WITH_INSTALL_RPATH OFF) + endif() + + set_target_properties(${name} PROPERTIES diff --git a/recipes/llvm-core/all/patches/12x/0004-remove-lto-exports.patch b/recipes/llvm-core/all/patches/12x/0004-remove-lto-exports.patch new file mode 100644 index 0000000000000..60db5a636b646 --- /dev/null +++ b/recipes/llvm-core/all/patches/12x/0004-remove-lto-exports.patch @@ -0,0 +1,32 @@ +diff --git a/tools/lto/lto.exports b/tools/lto/lto.exports +index 1f0a6b23d3fd..2871abd34e40 100644 +--- a/tools/lto/lto.exports ++++ b/tools/lto/lto.exports +@@ -43,12 +43,6 @@ lto_codegen_optimize + lto_codegen_compile_optimized + lto_codegen_set_should_internalize + lto_codegen_set_should_embed_uselists +-LLVMCreateDisasm +-LLVMCreateDisasmCPU +-LLVMDisasmDispose +-LLVMDisasmInstruction +-LLVMSetDisasmOptions +-LLVMCreateDisasmCPUFeatures + thinlto_create_codegen + thinlto_codegen_dispose + thinlto_codegen_add_module +diff --git a/tools/remarks-shlib/CMakeLists.txt b/tools/remarks-shlib/CMakeLists.txt +index 865436247270..aa11669d9a75 100644 +--- a/tools/remarks-shlib/CMakeLists.txt ++++ b/tools/remarks-shlib/CMakeLists.txt +@@ -9,7 +9,9 @@ if(LLVM_ENABLE_PIC) + libremarks.cpp + ) + +- set(LLVM_EXPORTED_SYMBOL_FILE ${CMAKE_CURRENT_SOURCE_DIR}/Remarks.exports) ++ if (NOT (BUILD_SHARED_LIBS OR LLVM_LINK_LLVM_DYLIB)) ++ set(LLVM_EXPORTED_SYMBOL_FILE ${CMAKE_CURRENT_SOURCE_DIR}/Remarks.exports) ++ endif() + + add_llvm_library(Remarks SHARED INSTALL_WITH_TOOLCHAIN ${SOURCES}) + diff --git a/recipes/llvm-core/all/patches/12x/12.0.0-cmake.patch b/recipes/llvm-core/all/patches/12x/12.0.0-cmake.patch deleted file mode 100644 index 8d3f7dbf7cf98..0000000000000 --- a/recipes/llvm-core/all/patches/12x/12.0.0-cmake.patch +++ /dev/null @@ -1,55 +0,0 @@ ---- cmake/config-ix.cmake -+++ cmake/config-ix.cmake -@@ -143,6 +143,9 @@ - elseif(NOT LLVM_USE_SANITIZER MATCHES "Memory.*") - find_package(LibXml2) - endif() -+ set(LIBXML2_FOUND 1) -+ list(GET LibXml2_INCLUDE_DIRS -1 LIBXML2_INCLUDE_DIR) -+ set(LIBXML2_LIBRARIES ${LibXml2_LIBRARIES}) - if(LibXml2_FOUND) - # Check if libxml2 we found is usable; for example, we may have found a 32-bit - # library on a 64-bit system which would result in a link-time failure. -@@ -335,7 +335,7 @@ - message(FATAL_ERROR "libffi includes are not found.") - endif() - -- find_library(FFI_LIBRARY_PATH ffi PATHS ${FFI_LIBRARY_DIR}) -+ find_library(FFI_LIBRARY_PATH NAMES ffi libffi PATHS ${FFI_LIBRARY_DIR}) - if( NOT FFI_LIBRARY_PATH ) - message(FATAL_ERROR "libffi is not found.") - endif() ---- cmake/modules/TableGen.cmake -+++ cmake/modules/TableGen.cmake -@@ -132,12 +132,7 @@ - macro(add_tablegen target project) - set(${target}_OLD_LLVM_LINK_COMPONENTS ${LLVM_LINK_COMPONENTS}) - set(LLVM_LINK_COMPONENTS ${LLVM_LINK_COMPONENTS} TableGen) -- -- # CMake doesn't let compilation units depend on their dependent libraries on some generators. -- if(NOT CMAKE_GENERATOR STREQUAL "Ninja" AND NOT XCODE) -- # FIXME: It leaks to user, callee of add_tablegen. -- set(LLVM_ENABLE_OBJLIB ON) -- endif() -+ set(LLVM_ENABLE_OBJLIB OFF) - - add_llvm_executable(${target} DISABLE_LLVM_LINK_LLVM_DYLIB ${ARGN}) - set(LLVM_LINK_COMPONENTS ${${target}_OLD_LLVM_LINK_COMPONENTS}) ---- lib/WindowsManifest/CMakeLists.txt -+++ lib/WindowsManifest/CMakeLists.txt -@@ -21,14 +21,5 @@ - # This block is only needed for llvm-config. When we deprecate llvm-config and - # move to using CMake export, this block can be removed. - if(LLVM_ENABLE_LIBXML2) -- # CMAKE_BUILD_TYPE is only meaningful to single-configuration generators. -- if(CMAKE_BUILD_TYPE) -- string(TOUPPER ${CMAKE_BUILD_TYPE} build_type) -- get_property(libxml2_library TARGET LibXml2::LibXml2 PROPERTY LOCATION_${build_type}) -- endif() -- if(NOT zlib_library) -- get_property(libxml2_library TARGET LibXml2::LibXml2 PROPERTY LOCATION) -- endif() -- get_library_name(${libxml2_library} libxml2_library) -- set_property(TARGET LLVMWindowsManifest PROPERTY LLVM_SYSTEM_LIBS ${libxml2_library}) -+ set_property(TARGET LLVMWindowsManifest PROPERTY LLVM_SYSTEM_LIBS ${LIBXML2_LIBRARIES}) - endif() diff --git a/recipes/llvm-core/all/patches/12x/12.0.0-native.patch b/recipes/llvm-core/all/patches/12x/12.0.0-native.patch deleted file mode 100644 index f5c6d542fab8f..0000000000000 --- a/recipes/llvm-core/all/patches/12x/12.0.0-native.patch +++ /dev/null @@ -1,81 +0,0 @@ ---- CMakeLists.txt -+++ CMakeLists.txt -@@ -891,10 +891,6 @@ - include_directories( ${LLVM_INCLUDE_DIR} ${LLVM_MAIN_INCLUDE_DIR}) - - # when crosscompiling import the executable targets from a file --if(LLVM_USE_HOST_TOOLS) -- include(CrossCompile) -- llvm_create_cross_target(LLVM NATIVE "" Release) --endif(LLVM_USE_HOST_TOOLS) - if(LLVM_TARGET_IS_CROSSCOMPILE_HOST) - # Dummy use to avoid CMake Warning: Manually-specified variables were not used - # (this is a variable that CrossCompile sets on recursive invocations) ---- cmake/modules/TableGen.cmake -+++ cmake/modules/TableGen.cmake -@@ -144,33 +144,6 @@ - set(${project}_TABLEGEN_EXE ${${project}_TABLEGEN} PARENT_SCOPE) - set(${project}_TABLEGEN_TARGET ${${project}_TABLEGEN} PARENT_SCOPE) - -- if(LLVM_USE_HOST_TOOLS) -- if( ${${project}_TABLEGEN} STREQUAL "${target}" ) -- # The NATIVE tablegen executable *must* depend on the current target one -- # otherwise the native one won't get rebuilt when the tablgen sources -- # change, and we end up with incorrect builds. -- build_native_tool(${target} ${project}_TABLEGEN_EXE DEPENDS ${target}) -- set(${project}_TABLEGEN_EXE ${${project}_TABLEGEN_EXE} PARENT_SCOPE) -- -- add_custom_target(${project}-tablegen-host DEPENDS ${${project}_TABLEGEN_EXE}) -- set(${project}_TABLEGEN_TARGET ${project}-tablegen-host PARENT_SCOPE) -- -- # Create an artificial dependency between tablegen projects, because they -- # compile the same dependencies, thus using the same build folders. -- # FIXME: A proper fix requires sequentially chaining tablegens. -- if (NOT ${project} STREQUAL LLVM AND TARGET ${project}-tablegen-host AND -- TARGET LLVM-tablegen-host) -- add_dependencies(${project}-tablegen-host LLVM-tablegen-host) -- endif() -- -- # If we're using the host tablegen, and utils were not requested, we have no -- # need to build this tablegen. -- if ( NOT LLVM_BUILD_UTILS ) -- set_target_properties(${target} PROPERTIES EXCLUDE_FROM_ALL ON) -- endif() -- endif() -- endif() -- - if ((${project} STREQUAL LLVM OR ${project} STREQUAL MLIR) AND NOT LLVM_INSTALL_TOOLCHAIN_ONLY AND LLVM_BUILD_UTILS) - set(export_to_llvmexports) - if(${target} IN_LIST LLVM_DISTRIBUTION_COMPONENTS OR ---- tools/llvm-config/CMakeLists.txt -+++ tools/llvm-config/CMakeLists.txt -@@ -75,11 +75,3 @@ - - # Add the dependency on the generation step. - add_file_dependencies(${CMAKE_CURRENT_SOURCE_DIR}/llvm-config.cpp ${BUILDVARIABLES_OBJPATH}) -- --if(CMAKE_CROSSCOMPILING AND NOT LLVM_CONFIG_PATH) -- build_native_tool(llvm-config LLVM_CONFIG_PATH) -- set(LLVM_CONFIG_PATH "${LLVM_CONFIG_PATH}" CACHE STRING "") -- -- add_custom_target(NativeLLVMConfig DEPENDS ${LLVM_CONFIG_PATH}) -- add_dependencies(llvm-config NativeLLVMConfig) --endif() ---- tools/llvm-shlib/CMakeLists.txt -+++ tools/llvm-shlib/CMakeLists.txt -@@ -155,13 +155,8 @@ - - set(LLVM_EXPORTED_SYMBOL_FILE ${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/libllvm-c.exports) - if(NOT LLVM_NM) -- if(CMAKE_CROSSCOMPILING) -- build_native_tool(llvm-nm llvm_nm) -- set(llvm_nm_target "${llvm_nm}") -- else() -- set(llvm_nm $) -- set(llvm_nm_target llvm-nm) -- endif() -+ set(llvm_nm $) -+ set(llvm_nm_target llvm-nm) - else() - set(llvm_nm ${LLVM_NM}) - set(llvm_nm_target "") diff --git a/recipes/llvm-core/all/patches/13x/0000-cmake-dependencies.patch b/recipes/llvm-core/all/patches/13x/0000-cmake-dependencies.patch new file mode 100644 index 0000000000000..a49abd15efa6c --- /dev/null +++ b/recipes/llvm-core/all/patches/13x/0000-cmake-dependencies.patch @@ -0,0 +1,84 @@ +diff --git a/cmake/config-ix.cmake b/cmake/config-ix.cmake +index dd0aaadb47c..790a0b27a49 100644 +--- a/cmake/config-ix.cmake ++++ b/cmake/config-ix.cmake +@@ -63,7 +63,13 @@ check_symbol_exists(FE_ALL_EXCEPT "fenv.h" HAVE_DECL_FE_ALL_EXCEPT) + check_symbol_exists(FE_INEXACT "fenv.h" HAVE_DECL_FE_INEXACT) + + check_include_file(mach/mach.h HAVE_MACH_MACH_H) +-check_include_file(histedit.h HAVE_HISTEDIT_H) ++if(LLVM_ENABLE_LIBEDIT) ++ find_package(editline REQUIRED) ++ cmake_push_check_state() ++ list(APPEND CMAKE_REQUIRED_INCLUDES ${editline_INCLUDE_DIRS}) ++ check_include_file(histedit.h HAVE_HISTEDIT_H) ++ cmake_pop_check_state() ++endif() + check_include_file(CrashReporterClient.h HAVE_CRASHREPORTERCLIENT_H) + if(APPLE) + include(CheckCSourceCompiles) +@@ -127,7 +133,7 @@ if(LLVM_ENABLE_ZLIB) + # library on a 64-bit system which would result in a link-time failure. + cmake_push_check_state() + list(APPEND CMAKE_REQUIRED_INCLUDES ${ZLIB_INCLUDE_DIRS}) +- list(APPEND CMAKE_REQUIRED_LIBRARIES ${ZLIB_LIBRARY}) ++ list(APPEND CMAKE_REQUIRED_LIBRARIES ${ZLIB_LIBRARIES}) + check_symbol_exists(compress2 zlib.h HAVE_ZLIB) + cmake_pop_check_state() + if(LLVM_ENABLE_ZLIB STREQUAL FORCE_ON AND NOT HAVE_ZLIB) +@@ -166,7 +172,11 @@ if(NOT LLVM_USE_SANITIZER MATCHES "Memory.*") + if (NOT PURE_WINDOWS) + # Skip libedit if using ASan as it contains memory leaks. + if (LLVM_ENABLE_LIBEDIT AND HAVE_HISTEDIT_H AND NOT LLVM_USE_SANITIZER MATCHES ".*Address.*") ++ cmake_push_check_state() ++ list(APPEND CMAKE_REQUIRED_INCLUDES ${editline_INCLUDE_DIRS}) ++ list(APPEND CMAKE_REQUIRED_LIBRARIES ${editline_LIBRARIES}) + check_library_exists(edit el_init "" HAVE_LIBEDIT) ++ cmake_pop_check_state() + else() + set(HAVE_LIBEDIT 0) + endif() +diff --git a/lib/LineEditor/CMakeLists.txt b/lib/LineEditor/CMakeLists.txt +index 61328f76905..b95d073d972 100644 +--- a/lib/LineEditor/CMakeLists.txt ++++ b/lib/LineEditor/CMakeLists.txt +@@ -1,5 +1,5 @@ + if(HAVE_LIBEDIT) +- set(link_libs edit) ++ set(link_libs editline::editline) + endif() + + add_llvm_component_library(LLVMLineEditor +diff --git a/lib/Support/CMakeLists.txt b/lib/Support/CMakeLists.txt +index 014b4a2caf1..486e4f39642 100644 +--- a/lib/Support/CMakeLists.txt ++++ b/lib/Support/CMakeLists.txt +@@ -267,7 +267,7 @@ if(LLVM_ENABLE_ZLIB) + # CMAKE_BUILD_TYPE is only meaningful to single-configuration generators. + if(CMAKE_BUILD_TYPE) + string(TOUPPER ${CMAKE_BUILD_TYPE} build_type) +- get_property(zlib_library TARGET ZLIB::ZLIB PROPERTY LOCATION_${build_type}) ++ set(zlib_library ${ZLIB_LIBRARIES}) + endif() + if(NOT zlib_library) + get_property(zlib_library TARGET ZLIB::ZLIB PROPERTY LOCATION) +diff --git a/lib/WindowsManifest/CMakeLists.txt b/lib/WindowsManifest/CMakeLists.txt +index 8134ac8c815..ccd772f6176 100644 +--- a/lib/WindowsManifest/CMakeLists.txt ++++ b/lib/WindowsManifest/CMakeLists.txt +@@ -21,12 +21,13 @@ add_llvm_component_library(LLVMWindowsManifest + # This block is only needed for llvm-config. When we deprecate llvm-config and + # move to using CMake export, this block can be removed. + if(LLVM_ENABLE_LIBXML2) ++ find_package(libxml2 REQUIRED CONFIG) + # CMAKE_BUILD_TYPE is only meaningful to single-configuration generators. + if(CMAKE_BUILD_TYPE) + string(TOUPPER ${CMAKE_BUILD_TYPE} build_type) +- get_property(libxml2_library TARGET LibXml2::LibXml2 PROPERTY LOCATION_${build_type}) ++ set(libxml2_library ${libxml2_LIBRARIES}) + endif() +- if(NOT zlib_library) ++ if(NOT libxml2_library) + get_property(libxml2_library TARGET LibXml2::LibXml2 PROPERTY LOCATION) + endif() + get_library_name(${libxml2_library} libxml2_library) diff --git a/recipes/llvm-core/all/patches/13x/0001-calculate-job-pools.patch b/recipes/llvm-core/all/patches/13x/0001-calculate-job-pools.patch new file mode 100644 index 0000000000000..ec100e4785349 --- /dev/null +++ b/recipes/llvm-core/all/patches/13x/0001-calculate-job-pools.patch @@ -0,0 +1,42 @@ +diff --git a/cmake/modules/HandleLLVMOptions.cmake b/cmake/modules/HandleLLVMOptions.cmake +index 0c3419390c2..eb234109e88 100644 +--- a/cmake/modules/HandleLLVMOptions.cmake ++++ b/cmake/modules/HandleLLVMOptions.cmake +@@ -33,6 +33,19 @@ string(TOUPPER "${LLVM_ENABLE_LTO}" uppercase_LLVM_ENABLE_LTO) + # The following only works with the Ninja generator in CMake >= 3.0. + set(LLVM_PARALLEL_COMPILE_JOBS "" CACHE STRING + "Define the maximum number of concurrent compilation jobs (Ninja only).") ++cmake_host_system_information(RESULT AVAILABLE_PHYSICAL_MEMORY QUERY AVAILABLE_PHYSICAL_MEMORY) ++cmake_host_system_information(RESULT NUMBER_OF_LOGICAL_CORES QUERY NUMBER_OF_LOGICAL_CORES) ++if(LLVM_RAM_PER_COMPILE_JOB) ++ math(EXPR memory_available_jobs "${AVAILABLE_PHYSICAL_MEMORY} / ${LLVM_RAM_PER_COMPILE_JOB}" OUTPUT_FORMAT DECIMAL) ++ if (memory_available_jobs LESS 1) ++ set(memory_available_jobs 1) ++ endif() ++ if (memory_available_jobs LESS NUMBER_OF_LOGICAL_CORES) ++ set(LLVM_PARALLEL_COMPILE_JOBS "${memory_available_jobs}") ++ else() ++ set(LLVM_PARALLEL_COMPILE_JOBS "${NUMBER_OF_LOGICAL_CORES}") ++ endif() ++endif() + if(LLVM_PARALLEL_COMPILE_JOBS) + if(NOT CMAKE_GENERATOR STREQUAL "Ninja") + message(WARNING "Job pooling is only available with Ninja generators.") +@@ -44,6 +57,17 @@ endif() + + set(LLVM_PARALLEL_LINK_JOBS "" CACHE STRING + "Define the maximum number of concurrent link jobs (Ninja only).") ++if(LLVM_RAM_PER_LINK_JOB) ++ math(EXPR memory_available_jobs "${AVAILABLE_PHYSICAL_MEMORY} / ${LLVM_RAM_PER_LINK_JOB}" OUTPUT_FORMAT DECIMAL) ++ if (memory_available_jobs LESS 1) ++ set(memory_available_jobs 1) ++ endif() ++ if (memory_available_jobs LESS NUMBER_OF_LOGICAL_CORES) ++ set(LLVM_PARALLEL_LINK_JOBS "${memory_available_jobs}") ++ else() ++ set(LLVM_PARALLEL_LINK_JOBS "${NUMBER_OF_LOGICAL_CORES}") ++ endif() ++endif() + if(CMAKE_GENERATOR STREQUAL "Ninja") + if(NOT LLVM_PARALLEL_LINK_JOBS AND uppercase_LLVM_ENABLE_LTO STREQUAL "THIN") + message(STATUS "ThinLTO provides its own parallel linking - limiting parallel link jobs to 2.") diff --git a/recipes/llvm-core/all/patches/13x/0002-missing-includes.patch b/recipes/llvm-core/all/patches/13x/0002-missing-includes.patch new file mode 100644 index 0000000000000..c7cfb90318b49 --- /dev/null +++ b/recipes/llvm-core/all/patches/13x/0002-missing-includes.patch @@ -0,0 +1,12 @@ +diff --git a/include/llvm/Support/Signals.h b/include/llvm/Support/Signals.h +index 44f5a750ff5..937e0572d4a 100644 +--- a/include/llvm/Support/Signals.h ++++ b/include/llvm/Support/Signals.h +@@ -14,6 +14,7 @@ + #ifndef LLVM_SUPPORT_SIGNALS_H + #define LLVM_SUPPORT_SIGNALS_H + ++#include + #include + + namespace llvm { diff --git a/recipes/llvm-core/all/patches/13x/0003-no-build-with-install-rpath.patch b/recipes/llvm-core/all/patches/13x/0003-no-build-with-install-rpath.patch new file mode 100644 index 0000000000000..05560e5a0c714 --- /dev/null +++ b/recipes/llvm-core/all/patches/13x/0003-no-build-with-install-rpath.patch @@ -0,0 +1,13 @@ +diff --git a/cmake/modules/AddLLVM.cmake b/cmake/modules/AddLLVM.cmake +index 29e40f45fef8..bde9a02b3432 100644 +--- a/cmake/modules/AddLLVM.cmake ++++ b/cmake/modules/AddLLVM.cmake +@@ -2143,7 +2143,7 @@ function(llvm_setup_rpath name) + + # Enable BUILD_WITH_INSTALL_RPATH unless CMAKE_BUILD_RPATH is set. + if("${CMAKE_BUILD_RPATH}" STREQUAL "") +- set_property(TARGET ${name} PROPERTY BUILD_WITH_INSTALL_RPATH ON) ++ set_property(TARGET ${name} PROPERTY BUILD_WITH_INSTALL_RPATH OFF) + endif() + + set_target_properties(${name} PROPERTIES diff --git a/recipes/llvm-core/all/patches/13x/0004-remove-lto-exports.patch b/recipes/llvm-core/all/patches/13x/0004-remove-lto-exports.patch new file mode 100644 index 0000000000000..46cb2cbbecf38 --- /dev/null +++ b/recipes/llvm-core/all/patches/13x/0004-remove-lto-exports.patch @@ -0,0 +1,32 @@ +diff --git a/tools/lto/lto.exports b/tools/lto/lto.exports +index 1948bba29b67..8fdbd3522b9b 100644 +--- a/tools/lto/lto.exports ++++ b/tools/lto/lto.exports +@@ -44,12 +44,6 @@ lto_codegen_compile_optimized + lto_codegen_set_should_internalize + lto_codegen_set_should_embed_uselists + lto_set_debug_options +-LLVMCreateDisasm +-LLVMCreateDisasmCPU +-LLVMDisasmDispose +-LLVMDisasmInstruction +-LLVMSetDisasmOptions +-LLVMCreateDisasmCPUFeatures + thinlto_create_codegen + thinlto_codegen_dispose + thinlto_codegen_add_module +diff --git a/tools/remarks-shlib/CMakeLists.txt b/tools/remarks-shlib/CMakeLists.txt +index 865436247270..aa11669d9a75 100644 +--- a/tools/remarks-shlib/CMakeLists.txt ++++ b/tools/remarks-shlib/CMakeLists.txt +@@ -9,7 +9,9 @@ if(LLVM_ENABLE_PIC) + libremarks.cpp + ) + +- set(LLVM_EXPORTED_SYMBOL_FILE ${CMAKE_CURRENT_SOURCE_DIR}/Remarks.exports) ++ if (NOT (BUILD_SHARED_LIBS OR LLVM_LINK_LLVM_DYLIB)) ++ set(LLVM_EXPORTED_SYMBOL_FILE ${CMAKE_CURRENT_SOURCE_DIR}/Remarks.exports) ++ endif() + + add_llvm_library(Remarks SHARED INSTALL_WITH_TOOLCHAIN ${SOURCES}) + diff --git a/recipes/llvm-core/all/patches/13x/13.0.0-cmake.patch b/recipes/llvm-core/all/patches/13x/13.0.0-cmake.patch deleted file mode 100644 index 981f067a21505..0000000000000 --- a/recipes/llvm-core/all/patches/13x/13.0.0-cmake.patch +++ /dev/null @@ -1,54 +0,0 @@ ---- cmake/config-ix.cmake -+++ cmake/config-ix.cmake -@@ -143,6 +143,9 @@ if(LLVM_ENABLE_LIBXML2) - elseif(NOT LLVM_USE_SANITIZER MATCHES "Memory.*") - find_package(LibXml2) - endif() -+ set(LIBXML2_FOUND 1) -+ list(GET LibXml2_INCLUDE_DIRS -1 LIBXML2_INCLUDE_DIR) -+ set(LIBXML2_LIBRARIES ${LibXml2_LIBRARIES}) - if(LibXml2_FOUND) - # Check if libxml2 we found is usable; for example, we may have found a 32-bit - # library on a 64-bit system which would result in a link-time failure. -@@ -343,7 +346,7 @@ if( LLVM_ENABLE_FFI ) - message(FATAL_ERROR "libffi includes are not found.") - endif() - -- find_library(FFI_LIBRARY_PATH ffi PATHS ${FFI_LIBRARY_DIR}) -+ find_library(FFI_LIBRARY_PATH NAMES ffi libffi PATHS ${FFI_LIBRARY_DIR}) - if( NOT FFI_LIBRARY_PATH ) - message(FATAL_ERROR "libffi is not found.") - endif() ---- cmake/modules/TableGen.cmake -+++ cmake/modules/TableGen.cmake -@@ -135,11 +135,7 @@ macro(add_tablegen target project) - set(${target}_OLD_LLVM_LINK_COMPONENTS ${LLVM_LINK_COMPONENTS}) - set(LLVM_LINK_COMPONENTS ${LLVM_LINK_COMPONENTS} TableGen) - -- # CMake doesn't let compilation units depend on their dependent libraries on some generators. -- if(NOT CMAKE_GENERATOR STREQUAL "Ninja" AND NOT XCODE) -- # FIXME: It leaks to user, callee of add_tablegen. -- set(LLVM_ENABLE_OBJLIB ON) -- endif() -+ set(LLVM_ENABLE_OBJLIB OFF) - - add_llvm_executable(${target} DISABLE_LLVM_LINK_LLVM_DYLIB ${ARGN}) - set(LLVM_LINK_COMPONENTS ${${target}_OLD_LLVM_LINK_COMPONENTS}) ---- lib/WindowsManifest/CMakeLists.txt -+++ lib/WindowsManifest/CMakeLists.txt -@@ -21,14 +21,5 @@ add_llvm_component_library(LLVMWindowsManifest - # This block is only needed for llvm-config. When we deprecate llvm-config and - # move to using CMake export, this block can be removed. - if(LLVM_ENABLE_LIBXML2) -- # CMAKE_BUILD_TYPE is only meaningful to single-configuration generators. -- if(CMAKE_BUILD_TYPE) -- string(TOUPPER ${CMAKE_BUILD_TYPE} build_type) -- get_property(libxml2_library TARGET LibXml2::LibXml2 PROPERTY LOCATION_${build_type}) -- endif() -- if(NOT zlib_library) -- get_property(libxml2_library TARGET LibXml2::LibXml2 PROPERTY LOCATION) -- endif() -- get_library_name(${libxml2_library} libxml2_library) -- set_property(TARGET LLVMWindowsManifest PROPERTY LLVM_SYSTEM_LIBS ${libxml2_library}) -+ set_property(TARGET LLVMWindowsManifest PROPERTY LLVM_SYSTEM_LIBS ${LIBXML2_LIBRARIES}) - endif() diff --git a/recipes/llvm-core/all/patches/13x/13.0.0-native.patch b/recipes/llvm-core/all/patches/13x/13.0.0-native.patch deleted file mode 100644 index fa8482ce0493b..0000000000000 --- a/recipes/llvm-core/all/patches/13x/13.0.0-native.patch +++ /dev/null @@ -1,78 +0,0 @@ ---- CMakeLists.txt -+++ CMakeLists.txt -@@ -931,10 +931,6 @@ set(CMAKE_INCLUDE_CURRENT_DIR ON) - include_directories( ${LLVM_INCLUDE_DIR} ${LLVM_MAIN_INCLUDE_DIR}) - - # when crosscompiling import the executable targets from a file --if(LLVM_USE_HOST_TOOLS) -- include(CrossCompile) -- llvm_create_cross_target(LLVM NATIVE "" Release) --endif(LLVM_USE_HOST_TOOLS) - if(LLVM_TARGET_IS_CROSSCOMPILE_HOST) - # Dummy use to avoid CMake Warning: Manually-specified variables were not used - # (this is a variable that CrossCompile sets on recursive invocations) ---- cmake/modules/TableGen.cmake -+++ cmake/modules/TableGen.cmake -@@ -147,32 +147,6 @@ macro(add_tablegen target project) - set(${project}_TABLEGEN_EXE ${${project}_TABLEGEN} PARENT_SCOPE) - set(${project}_TABLEGEN_TARGET ${${project}_TABLEGEN} PARENT_SCOPE) - -- if(LLVM_USE_HOST_TOOLS) -- if( ${${project}_TABLEGEN} STREQUAL "${target}" ) -- # The NATIVE tablegen executable *must* depend on the current target one -- # otherwise the native one won't get rebuilt when the tablgen sources -- # change, and we end up with incorrect builds. -- build_native_tool(${target} ${project}_TABLEGEN_EXE DEPENDS ${target}) -- set(${project}_TABLEGEN_EXE ${${project}_TABLEGEN_EXE} PARENT_SCOPE) -- -- add_custom_target(${project}-tablegen-host DEPENDS ${${project}_TABLEGEN_EXE}) -- set(${project}_TABLEGEN_TARGET ${project}-tablegen-host PARENT_SCOPE) -- -- # Create an artificial dependency between tablegen projects, because they -- # compile the same dependencies, thus using the same build folders. -- # FIXME: A proper fix requires sequentially chaining tablegens. -- if (NOT ${project} STREQUAL LLVM AND TARGET ${project}-tablegen-host AND -- TARGET LLVM-tablegen-host) -- add_dependencies(${project}-tablegen-host LLVM-tablegen-host) -- endif() -- -- # If we're using the host tablegen, and utils were not requested, we have no -- # need to build this tablegen. -- if ( NOT LLVM_BUILD_UTILS ) -- set_target_properties(${target} PROPERTIES EXCLUDE_FROM_ALL ON) -- endif() -- endif() -- endif() - - if ((${project} STREQUAL LLVM OR ${project} STREQUAL MLIR) AND NOT LLVM_INSTALL_TOOLCHAIN_ONLY AND LLVM_BUILD_UTILS) - set(export_to_llvmexports) ---- tools/llvm-config/CMakeLists.txt -+++ tools/llvm-config/CMakeLists.txt -@@ -75,11 +75,3 @@ endif() - - # Add the dependency on the generation step. - add_file_dependencies(${CMAKE_CURRENT_SOURCE_DIR}/llvm-config.cpp ${BUILDVARIABLES_OBJPATH}) -- --if(CMAKE_CROSSCOMPILING AND NOT LLVM_CONFIG_PATH) -- build_native_tool(llvm-config LLVM_CONFIG_PATH) -- set(LLVM_CONFIG_PATH "${LLVM_CONFIG_PATH}" CACHE STRING "") -- -- add_custom_target(NativeLLVMConfig DEPENDS ${LLVM_CONFIG_PATH}) -- add_dependencies(llvm-config NativeLLVMConfig) --endif() ---- tools/llvm-shlib/CMakeLists.txt -+++ tools/llvm-shlib/CMakeLists.txt -@@ -162,13 +162,6 @@ if(LLVM_BUILD_LLVM_C_DYLIB AND MSVC) - - set(LLVM_EXPORTED_SYMBOL_FILE ${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/libllvm-c.exports) - if(NOT LLVM_NM) -- if(CMAKE_CROSSCOMPILING) -- build_native_tool(llvm-nm llvm_nm) -- set(llvm_nm_target "${llvm_nm}") -- else() -- set(llvm_nm $) -- set(llvm_nm_target llvm-nm) -- endif() - else() - set(llvm_nm ${LLVM_NM}) - set(llvm_nm_target "") diff --git a/recipes/llvm-core/all/test_package/CMakeLists.txt b/recipes/llvm-core/all/test_package/CMakeLists.txt index 726aa5975f221..4de3810296f19 100644 --- a/recipes/llvm-core/all/test_package/CMakeLists.txt +++ b/recipes/llvm-core/all/test_package/CMakeLists.txt @@ -1,20 +1,31 @@ -cmake_minimum_required(VERSION 3.13.4) -project(test_package) +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup() - -find_package(LLVM REQUIRED) +macro(test_llvm_cmake_variable VARIABLE) + if(NOT DEFINED ${VARIABLE}) + message(FATAL_ERROR "${VARIABLE} is not defined") + endif() + message(STATUS "${VARIABLE}: ${${VARIABLE}}") +endmacro() +set(CMAKE_CXX_STANDARD 17) add_executable(${PROJECT_NAME} test_package.cpp) -target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_14) -if(TARGET LLVMInterpreter) # static libraries - target_link_libraries(${PROJECT_NAME} PRIVATE - LLVMInterpreter - LLVMIRReader - LLVMX86CodeGen - ) -else() # shared library - target_link_libraries(${PROJECT_NAME} LLVM) +if (LLVM_SHARED) + find_package(LLVM REQUIRED) + target_link_libraries(${PROJECT_NAME} PRIVATE LLVM) +else() + find_package(LLVM REQUIRED) + llvm_map_components_to_libnames(llvm_libs interpreter nativecodegen irreader) + target_link_libraries(${PROJECT_NAME} PRIVATE ${llvm_libs}) endif() + +message(STATUS "Testing LLVM Build Module Variables") +test_llvm_cmake_variable(LLVM_PACKAGE_VERSION) +test_llvm_cmake_variable(LLVM_BUILD_TYPE) +test_llvm_cmake_variable(LLVM_CMAKE_DIR) +test_llvm_cmake_variable(LLVM_TOOLS_BINARY_DIR) +test_llvm_cmake_variable(LLVM_ALL_TARGETS) +test_llvm_cmake_variable(LLVM_TARGETS_TO_BUILD) +test_llvm_cmake_variable(LLVM_TARGETS_WITH_JIT) +test_llvm_cmake_variable(LLVM_NATIVE_ARCH) diff --git a/recipes/llvm-core/all/test_package/conanfile.py b/recipes/llvm-core/all/test_package/conanfile.py index e0ca8f6b664cb..5ae2ff91c80a2 100644 --- a/recipes/llvm-core/all/test_package/conanfile.py +++ b/recipes/llvm-core/all/test_package/conanfile.py @@ -1,39 +1,43 @@ -from conans import ConanFile, CMake, tools +from conan import ConanFile +from conan.tools.cmake import cmake_layout, CMakeDeps, CMakeToolchain, CMake +from conan.tools.env import VirtualRunEnv +from conan.tools.build import can_run -import os.path +import os -class LLVMCoreTestPackageConan(ConanFile): - settings = ('os', 'arch', 'compiler', 'build_type') - generators = ('cmake', 'cmake_find_package') +class TestPackageConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + + def layout(self): + cmake_layout(self) + + def requirements(self): + self.requires(self.tested_reference_str) + + def build_requirements(self): + # required for cmake_path support + self.tool_requires("cmake/[>=3.20 <4]") + + def generate(self): + deps = CMakeDeps(self) + deps.check_components_exist = True + deps.generate() + + tc = CMakeToolchain(self) + if self.dependencies[self.tested_reference_str].options.shared: + tc.variables["LLVM_SHARED"] = True + tc.generate() + + VirtualRunEnv(self).generate() def build(self): - build_system = CMake(self) - build_system.configure() - build_system.build() + cmake = CMake(self) + cmake.configure() + cmake.build() def test(self): - test_package = not tools.cross_building(self.settings) - if 'x86' not in str(self.settings.arch).lower(): - test_package = False - elif str(self.options['llvm-core'].targets) not in ['all', 'X86']: - test_package = False - elif self.options['llvm-core'].shared: - if self.options['llvm-core'].components != 'all': - requirements = ['interpreter', 'irreader', 'x86codegen'] - targets = str(self.options['llvm-core'].components) - if self.settings.os == 'Windows': - requirements.append('demangle') - if not all([target in components for target in requirements]): - test_package = False - - if test_package: - command = [ - os.path.join('bin', 'test_package'), - os.path.join(os.path.dirname(__file__), 'test_function.ll') - ] - self.run(command, run_environment=True) - - llvm_path = self.deps_cpp_info['llvm-core'].rootpath - license_path = os.path.join(llvm_path, 'licenses', 'LICENSE.TXT') - assert os.path.exists(license_path) + if can_run(self): + cmd = os.path.join(self.cpp.build.bindir, "test_package") + args = os.path.join(os.path.dirname(__file__), "test_function.ll") + self.run(f"{cmd} {args}", env="conanrun") diff --git a/recipes/llvm-openmp/all/conanfile.py b/recipes/llvm-openmp/all/conanfile.py index a885645ea3471..c1412f45efbaa 100644 --- a/recipes/llvm-openmp/all/conanfile.py +++ b/recipes/llvm-openmp/all/conanfile.py @@ -16,12 +16,9 @@ class LLVMOpenMpConan(ConanFile): name = "llvm-openmp" - description = ("The OpenMP (Open Multi-Processing) specification " - "is a standard for a set of compiler directives, " - "library routines, and environment variables that " - "can be used to specify shared memory parallelism " - "in Fortran and C/C++ programs. This is the LLVM " - "implementation.") + description = ("The OpenMP (Open Multi-Processing) specification is a standard for a set of compiler directives, " + "library routines, and environment variables that can be used to specify shared memory parallelism " + "in Fortran and C/C++ programs. This is the LLVM implementation.") license = "Apache-2.0 WITH LLVM-exception" url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/llvm/llvm-project/blob/main/openmp" diff --git a/recipes/lmdb/all/conandata.yml b/recipes/lmdb/all/conandata.yml index 34b1aee159c75..3d8d01ecc53e6 100644 --- a/recipes/lmdb/all/conandata.yml +++ b/recipes/lmdb/all/conandata.yml @@ -1,7 +1,10 @@ sources: + "0.9.32": + url: "https://git.openldap.org/openldap/openldap/-/archive/LMDB_0.9.32/openldap-LMDB_0.9.32.tar.gz" + sha256: "c0937223bba3c37c896809883a3c9b43049354578b239d6ed2476236a87f40c9" "0.9.31": url: "https://git.openldap.org/openldap/openldap/-/archive/LMDB_0.9.31/openldap-LMDB_0.9.31.tar.gz" - sha256: "d35d4f6f46313d62fd342c9dcbf574432919ce5e802d2b6cbe2ebd549821e5c4" + sha256: "f7aecdd1bcc69fb32bb33d8544cfe50f8e9e916f366d598a268e1f43ee9c7603" "0.9.29": url: "https://git.openldap.org/openldap/openldap/-/archive/LMDB_0.9.29/openldap-LMDB_0.9.29.tar.gz" - sha256: "d4c668167a2d703ef91db733b4069b8b74dbc374405855be6626b45e2a7e2dd3" + sha256: "e4d9f32dba4e15fcc66e0085a03432ff40a8065848d352ea47b1cb717e7369a4" diff --git a/recipes/lmdb/config.yml b/recipes/lmdb/config.yml index 3c0c6966f556b..0014799ccef1f 100644 --- a/recipes/lmdb/config.yml +++ b/recipes/lmdb/config.yml @@ -1,4 +1,6 @@ "versions": + "0.9.32": + "folder": "all" "0.9.31": "folder": "all" "0.9.29": diff --git a/recipes/lodepng/all/test_package/bees.png b/recipes/lodepng/all/test_package/bees.png deleted file mode 100644 index 11640c7488fb1..0000000000000 Binary files a/recipes/lodepng/all/test_package/bees.png and /dev/null differ diff --git a/recipes/lodepng/all/test_package/conanfile.py b/recipes/lodepng/all/test_package/conanfile.py index f6238eccc60b7..0a6bc68712d90 100644 --- a/recipes/lodepng/all/test_package/conanfile.py +++ b/recipes/lodepng/all/test_package/conanfile.py @@ -23,5 +23,4 @@ def build(self): def test(self): if can_run(self): bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") - bees = os.path.join(self.source_folder, "bees.png") - self.run(f"{bin_path} {bees}", env="conanrun") + self.run(bin_path, env="conanrun") diff --git a/recipes/lodepng/all/test_package/test_package.cpp b/recipes/lodepng/all/test_package/test_package.cpp index 744f347b97c7b..9f83682fff5cd 100644 --- a/recipes/lodepng/all/test_package/test_package.cpp +++ b/recipes/lodepng/all/test_package/test_package.cpp @@ -1,31 +1,12 @@ #include -#include -#include -#include - #include "lodepng.h" int main(int argc, const char *argv[]) { - if (argc < 2) { - std::cerr << "Need at least one argument\n"; - } - std::ifstream stream(argv[1], std::ios::in | std::ios::binary); - std::vector data((std::istreambuf_iterator(stream)), std::istreambuf_iterator()); - - std::cout << "file name " << argv[1] << "\n"; - std::cout << "file size " << data.size() << " bytes\n"; - - std::vector decoded; - unsigned width = 0, height = 0; - unsigned error = lodepng::decode(decoded, width, height, data); - if (error != 0) { - std::cerr << "lodepng::decode returned with error code " << error << "\n"; - return 1; - } - std::cout << "image size: " << width << " x " << height << " pixels.\n"; + LodePNGCompressSettings compress_settings; + lodepng_compress_settings_init(&compress_settings); - stream.close(); + printf("compress_settings.btype = %d\n", compress_settings.btype); return 0; } diff --git a/recipes/lodepng/all/test_v1_package/conanfile.py b/recipes/lodepng/all/test_v1_package/conanfile.py index 4441530a937ba..38f4483872d47 100644 --- a/recipes/lodepng/all/test_v1_package/conanfile.py +++ b/recipes/lodepng/all/test_v1_package/conanfile.py @@ -14,5 +14,4 @@ def build(self): def test(self): if not tools.cross_building(self): bin_path = os.path.join("bin", "test_package") - bees = os.path.join(self.source_folder, os.pardir, "test_package", "bees.png") - self.run(f"{bin_path} {bees}", run_environment=True) + self.run(bin_path, run_environment=True) diff --git a/recipes/log4cplus/all/conandata.yml b/recipes/log4cplus/all/conandata.yml index 3625645bc7de9..806ae51d2f04e 100644 --- a/recipes/log4cplus/all/conandata.yml +++ b/recipes/log4cplus/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.1.2": + url: "https://github.com/log4cplus/log4cplus/releases/download/REL_2_1_2/log4cplus-2.1.2.tar.bz2" + sha256: "2450dfbb4ab35dd2c9e64d8c750c514bf7293b81d8f32af7ab124417f70adfad" "2.1.1": url: "https://github.com/log4cplus/log4cplus/releases/download/REL_2_1_1/log4cplus-2.1.1.tar.bz2" sha256: "6597de782775e4e0fba8fdcad938c3709fd839a8084c4b6edfae3cc5046e2688" @@ -11,11 +14,14 @@ sources: "2.0.7": url: "https://github.com/log4cplus/log4cplus/releases/download/REL_2_0_7/log4cplus-2.0.7.tar.bz2" sha256: "8fadbafee2ba4e558a0f78842613c9fb239c775d83f23340d091084c0e1b12ab" - # v1 is required for the openvdb recipe "1.2.2": url: "https://github.com/log4cplus/log4cplus/releases/download/REL_1_2_2/log4cplus-1.2.2.tar.bz2" sha256: "853efd919f9ca76c518c0944e6b0ced1174523a86b6db046ed4f23fe695167bd" patches: + "2.1.2": + - patch_file: "patches/2.1.2-0001-fix-cmake.patch" + patch_description: "disable fPIC" + patch_type: "conan" "2.1.1": - patch_file: "patches/2.0.6-0001-fix-cmake.patch" patch_description: "disable fPIC, move cmake_minimum_version to front" diff --git a/recipes/log4cplus/all/conanfile.py b/recipes/log4cplus/all/conanfile.py index 5851367f991c2..e874b2d20f4c6 100644 --- a/recipes/log4cplus/all/conanfile.py +++ b/recipes/log4cplus/all/conanfile.py @@ -4,6 +4,7 @@ from conan.tools.build import check_min_cppstd, valid_min_cppstd from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout from conan.tools.scm import Version +from conan.tools.microsoft import is_msvc import os required_conan_version = ">=1.53.0" @@ -11,10 +12,11 @@ class Log4cplusConan(ConanFile): name = "log4cplus" description = "simple to use C++ logging API, modelled after the Java log4j API" - license = ("BSD-2-Clause, Apache-2.0") url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/log4cplus/log4cplus" + license = ("BSD-2-Clause, Apache-2.0") topics = ("logging", "log", "logging-library") + package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], @@ -64,7 +66,10 @@ def validate(self): if self.settings.compiler.cppstd: check_min_cppstd(self, 11) if Version(self.version) < 2 and valid_min_cppstd(self, 17): - raise ConanInvalidConfiguration("log4cplus < 2.0.0 does not support C++17") + raise ConanInvalidConfiguration(f"${self.ref} does not support C++17") + if Version(self.version) >= "2.1.2" and \ + is_msvc(self) and Version(self.settings.compiler.version) < 192: + raise ConanInvalidConfiguration(f"${self.ref} requires Visual Studio 2019 or newer") def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) diff --git a/recipes/log4cplus/all/patches/2.1.2-0001-fix-cmake.patch b/recipes/log4cplus/all/patches/2.1.2-0001-fix-cmake.patch new file mode 100644 index 0000000000000..9bec3910bc1e9 --- /dev/null +++ b/recipes/log4cplus/all/patches/2.1.2-0001-fix-cmake.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 9dcbb8a..f80d3b9 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -15,7 +15,7 @@ cmake_minimum_required (VERSION 3.12) + project (log4cplus) + + # Use "-fPIC" / "-fPIE" for all targets by default, including static libs. +-set (CMAKE_POSITION_INDEPENDENT_CODE ON) ++# set (CMAKE_POSITION_INDEPENDENT_CODE ON) + + enable_language (CXX) + if (MSVC) diff --git a/recipes/log4cplus/config.yml b/recipes/log4cplus/config.yml index 2862fb5934cdf..bd3466aea568e 100644 --- a/recipes/log4cplus/config.yml +++ b/recipes/log4cplus/config.yml @@ -1,4 +1,7 @@ versions: + "2.1.2": + folder: all + # 2.1.1 is the last version for Visual Studio 2017 "2.1.1": folder: all "2.1.0": @@ -7,5 +10,6 @@ versions: folder: all "2.0.7": folder: all + # v1 is required for the openvdb recipe "1.2.2": folder: all diff --git a/recipes/log4cxx/all/conandata.yml b/recipes/log4cxx/all/conandata.yml index 6e4b69d1303a5..5f5b6f75de86a 100644 --- a/recipes/log4cxx/all/conandata.yml +++ b/recipes/log4cxx/all/conandata.yml @@ -1,23 +1,46 @@ sources: + "1.2.0": + url: "https://archive.apache.org/dist/logging/log4cxx/1.2.0/apache-log4cxx-1.2.0.tar.gz" + sha256: "09f4748aa5675ef5c0770bedbf5e00488668933c5a935a43ac5b85be2436c48a" "1.1.0": url: "https://archive.apache.org/dist/logging/log4cxx/1.1.0/apache-log4cxx-1.1.0.tar.gz" sha256: "1fc7d82697534184bc0f757348d969d24852b948f63d6b17283fd1ee29c2c28a" + "0.13.0": + url: "https://archive.apache.org/dist/logging/log4cxx/0.13.0/apache-log4cxx-0.13.0.tar.gz" + sha256: "4e5be64b6b1e6de8525f8b87635270b81f772a98902d20d7ac646fdf1ac08284" "0.12.1": url: "https://archive.apache.org/dist/logging/log4cxx/0.12.1/apache-log4cxx-0.12.1.tar.gz" sha256: "7bea5cb477f0e31c838f0e1f4f498cc3b30c2eae74703ddda923e7e8c2268d22" - "0.12.0": - url: "https://archive.apache.org/dist/logging/log4cxx/0.12.0/apache-log4cxx-0.12.0.tar.gz" - sha256: "bd5b5009ca914c8fa7944b92ea6b4ca6fb7d146f65d526f21bf8b3c6a0520e44" patches: + "1.2.0": + - patch_file: "patches/1.2.0-0001-find-apr.patch" + patch_description: "use cci's package name" + patch_type: "conan" "1.1.0": - patch_file: "patches/1.1.0-0001-find-apr.patch" patch_description: "use cci's package name" patch_type: "conan" - "0.12.1": - - patch_file: "patches/0.12.0-0001-find-apr.patch" - patch_description: "use cci's package name" + "0.13.0": + - patch_file: "patches/0.13.0-0001-find-apr.patch" patch_type: "conan" - "0.12.0": - - patch_file: "patches/0.12.0-0001-find-apr.patch" + patch_description: "Use conan generated apr, apr-util target names" + - patch_file: "patches/0.13.0-0001-logchar-type.patch" + patch_type: "bugfix" + patch_description: "Prevent compilation errors when with_wchar_t=False" + patch_source: "https://github.com/apache/logging-log4cxx/commit/5109466a844d1e5fb8b455a23077765a30325a24" + - patch_file: "patches/0.13.0-0001-visual-studio-15.patch" + patch_type: "bugfix" + patch_description: "Prevent Visual Studio 2017 compilation error" + patch_source: "https://github.com/apache/logging-log4cxx/commit/f59bf53f831b8b68ef3a2f3a6705ae626090758e" + - patch_file: "patches/0.13.0-0001-fix-static-library-compilation.patch" + patch_type: "bugfix" + patch_description: "Prevent compilation error when shared=False" + patch_source: "https://github.com/apache/logging-log4cxx/commit/09b5b723a1a210c28bf8b05b0676bb2b104359ba" + "0.12.1": + - patch_file: "patches/0.12.1-0001-find-apr.patch" patch_description: "use cci's package name" patch_type: "conan" + - patch_file: "patches/0.12.1-0001-logchar-type.patch" + patch_type: "bugfix" + patch_description: "Prevent compilation errors when with_wchar_t=False" + patch_source: "https://github.com/apache/logging-log4cxx/commit/5109466a844d1e5fb8b455a23077765a30325a24" diff --git a/recipes/log4cxx/all/conanfile.py b/recipes/log4cxx/all/conanfile.py index f7fedd1522a39..2a819c7258550 100644 --- a/recipes/log4cxx/all/conanfile.py +++ b/recipes/log4cxx/all/conanfile.py @@ -24,15 +24,44 @@ class Log4cxxConan(ConanFile): options = { "shared": [True, False], "fPIC": [True, False], + "char_type": ["utf-8", "wchar_t", "unichar"], + "char_encoding": ["utf-8", "locale"], + "with_networking": [True, False], + "with_wchar_t": [True, False], + "with_fmt_layout": [True, False], + "with_odbc_appender": [True, False], + "with_multiprocess_rolling_file_appender": [True, False], + "with_smtp_appender": [True, False], + "with_qt": [True, False], + } + options_description = { + "char_type": "The log4cxx internal character type (selects the std::basic_string template parameter used by log4cxx::LogString)", + "char_encoding": "The external character set used when writing to files", + "with_networking": "Include appenders that use network i/o", + "with_wchar_t": "Include wchar_t API methods in class interfaces", + "with_fmt_layout": "Include the log4cxx::FMTLayout class that uses libfmt to layout messages", + "with_odbc_appender": "Include the log4cxx::ODBCAppender that sends log events to a database", + "with_multiprocess_rolling_file_appender": "Include the appender that allows multiple applications to log to the same file", + "with_smtp_appender": "Include the appender that sends an e-mail when a specific logging event occurs", + "with_qt": "Allow QString values in the LOG4CXX_WARN, LOG4CXX_INFO, LOG4CXX_DEBUG etc. macros", } default_options = { "shared": False, "fPIC": True, + "char_type": "utf-8", + "char_encoding": "utf-8", + "with_networking": True, + "with_wchar_t": False, + "with_fmt_layout": False, + "with_odbc_appender": False, + "with_multiprocess_rolling_file_appender": False, + "with_smtp_appender": False, + "with_qt": False, } @property def _min_cppstd(self): - return 17 + return 11 @property def _compilers_minimum_version(self): @@ -49,7 +78,14 @@ def export_sources(self): def config_options(self): if self.settings.os == "Windows": - del self.options.fPIC + self.options.rm_safe("fPIC") + self.options.rm_safe("with_smtp_appender") # *nix only + elif Version(self.version) <= "1.0.0": # SMTP appender is broken in version 0.12 through 1.0.0 + self.options.rm_safe("with_smtp_appender") + if Version(self.version) < "1.0.0": + self.options.rm_safe("with_multiprocess_rolling_file_appender") + self.options.rm_safe("with_networking") + self.options.rm_safe("with_fmt_layout") def configure(self): if self.options.shared: @@ -61,17 +97,31 @@ def layout(self): def requirements(self): self.requires("apr/1.7.4") self.requires("apr-util/1.6.1") - self.requires("expat/2.5.0") - if self.settings.os != "Windows": + if self.options.get_safe("with_odbc_appender") and self.settings.os != "Windows": self.requires("odbc/2.3.11") + if self.options.get_safe("with_smtp_appender"): + self.requires("libesmtp/1.1.0") + if self.options.get_safe("with_fmt_layout"): + self.requires("fmt/10.2.1") + if self.options.get_safe("with_qt"): + self.requires("qt/[~5.15]") def validate(self): - # TODO: if compiler doesn't support C++17, boost can be used instead - if self.settings.compiler.get_safe("cppstd"): - check_min_cppstd(self, self._min_cppstd) - minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) - if minimum_version and Version(self.settings.compiler.version) < minimum_version: - raise ConanInvalidConfiguration(f"{self.ref} requires a compiler that supports at least C++{self._min_cppstd}") + if Version(self.version) < "1.0.0" or self.options.get_safe("with_multiprocess_rolling_file_appender"): + # TODO: if compiler doesn't support C++17, boost can be used instead + if Version(self.version) < "1.0.0": + self.output.info(f"Version {self.version} requires C++17. log4cxx version 1.x does not.") + else: + self.output.info("multiprocess rolling file appender requires C++17.") + minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) + compiler_version = Version(self.settings.compiler.version) + if compiler_version < minimum_version: + raise ConanInvalidConfiguration(f"{self.settings.compiler} {compiler_version} does not support C++17: {minimum_version} required.") + if self.settings.compiler.get_safe("cppstd"): + check_min_cppstd(self, "17") + + def _patch_sources(self): + apply_conandata_patches(self) def build_requirements(self): if self.settings.os != "Windows": @@ -79,15 +129,23 @@ def build_requirements(self): self.tool_requires("pkgconf/2.0.3") def source(self): - # OSError: [WinError 123] The filename, directory name, or volume label syntax is incorrect: - # 'src\\test\\resources\\output\\xyz\\:' - pattern = "*[!:]" - get(self, **self.conan_data["sources"][self.version], strip_root=True, pattern=pattern) + get(self, **self.conan_data["sources"][self.version], strip_root=True) def generate(self): tc = CMakeToolchain(self) - tc.cache_variables["BUILD_TESTING"] = False - tc.cache_variables["LOG4CXX_INSTALL_PDB"] = False + tc.variables["BUILD_TESTING"] = False + tc.variables["LOG4CXX_INSTALL_PDB"] = False + if Version(self.version) >= "1.0.0": + tc.variables["LOG4CXX_NETWORKING_SUPPORT"] = self.options.with_networking + tc.variables["LOG4CXX_MULTIPROCESS_ROLLING_FILE_APPENDER"] = self.options.with_multiprocess_rolling_file_appender + tc.variables["ENABLE_FMT_LAYOUT"] = self.options.with_fmt_layout + if Version(self.version) > "1.0.0" and self.settings.os != "Windows": + tc.variables["LOG4CXX_ENABLE_ESMTP"] = self.options.with_smtp_appender + tc.variables["LOG4CXX_ENABLE_ODBC"] = self.options.with_odbc_appender + tc.variables["LOG4CXX_CHAR"] = self.options.char_type + tc.variables["LOG4CXX_CHARSET"] = self.options.char_encoding + tc.variables["LOG4CXX_WCHAR_T"] = self.options.with_wchar_t + tc.variables["LOG4CXX_QT_SUPPORT"] = self.options.with_qt tc.generate() tc = CMakeDeps(self) tc.generate() @@ -141,3 +199,4 @@ def package_info(self): # TODO: to remove in conan v2 once cmake_find_package* & pkg_config generators removed self.cpp_info.build_modules["cmake_find_package"] = [self._module_file_rel_path] self.cpp_info.build_modules["cmake_find_package_multi"] = [self._module_file_rel_path] + diff --git a/recipes/log4cxx/all/patches/0.12.0-0001-find-apr.patch b/recipes/log4cxx/all/patches/0.12.1-0001-find-apr.patch similarity index 100% rename from recipes/log4cxx/all/patches/0.12.0-0001-find-apr.patch rename to recipes/log4cxx/all/patches/0.12.1-0001-find-apr.patch diff --git a/recipes/log4cxx/all/patches/0.12.1-0001-logchar-type.patch b/recipes/log4cxx/all/patches/0.12.1-0001-logchar-type.patch new file mode 100644 index 0000000000000..a59e3639553ae --- /dev/null +++ b/recipes/log4cxx/all/patches/0.12.1-0001-logchar-type.patch @@ -0,0 +1,21 @@ +--- a/src/main/include/CMakeLists.txt ++++ b/src/main/include/CMakeLists.txt +@@ -22,9 +22,18 @@ endif() + + if(${LOG4CXX_CHAR} STREQUAL "unichar") + set(LOGCHAR_IS_UNICHAR 1) ++ set(LOGCHAR_IS_WCHAR 0) ++ set(LOGCHAR_IS_UTF8 0) + elseif(${LOG4CXX_CHAR} STREQUAL "wchar_t") + set(LOGCHAR_IS_WCHAR 1) ++ set(LOGCHAR_IS_UNICHAR 0) ++ set(LOGCHAR_IS_UTF8 0) ++elseif(${LOG4CXX_CHAR} STREQUAL "utf-8") ++ set(LOGCHAR_IS_UNICHAR 0) ++ set(LOGCHAR_IS_WCHAR 0) ++ set(LOGCHAR_IS_UTF8 1) + endif() ++ + option(LOG4CXX_WCHAR_T "Enable wchar_t API methods" ON) + option(LOG4CXX_UNICHAR "Enable UniChar API methods" OFF) + set(INIT_IOS_BASE 0) diff --git a/recipes/log4cxx/all/patches/0.13.0-0001-find-apr.patch b/recipes/log4cxx/all/patches/0.13.0-0001-find-apr.patch new file mode 100644 index 0000000000000..174331cfd2a57 --- /dev/null +++ b/recipes/log4cxx/all/patches/0.13.0-0001-find-apr.patch @@ -0,0 +1,17 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -41,10 +41,12 @@ if(NOT BUILD_SHARED_LIBS) + endif() + + # Find Apache Runtime +-find_package(APR REQUIRED) ++find_package(apr REQUIRED) ++set(APR_LIBRARIES apr::apr) + + # Find Apache Runtime Utilities +-find_package(APR-Util REQUIRED) ++find_package(apr-util REQUIRED) ++set(APR_UTIL_LIBRARIES apr-util::apr-util) + + find_package( Threads REQUIRED ) + diff --git a/recipes/log4cxx/all/patches/0.13.0-0001-fix-static-library-compilation.patch b/recipes/log4cxx/all/patches/0.13.0-0001-fix-static-library-compilation.patch new file mode 100644 index 0000000000000..53bcabf38e8da --- /dev/null +++ b/recipes/log4cxx/all/patches/0.13.0-0001-fix-static-library-compilation.patch @@ -0,0 +1,12 @@ +--- a/src/main/cpp/threadutility.cpp ++++ b/src/main/cpp/threadutility.cpp +@@ -16,6 +16,9 @@ + */ + + #include "log4cxx/helpers/threadutility.h" ++#if !defined(LOG4CXX) ++ #define LOG4CXX 1 ++#endif + #include "log4cxx/private/log4cxx_private.h" + #include "log4cxx/helpers/loglog.h" + diff --git a/recipes/log4cxx/all/patches/0.13.0-0001-logchar-type.patch b/recipes/log4cxx/all/patches/0.13.0-0001-logchar-type.patch new file mode 100644 index 0000000000000..cb4669d6873b4 --- /dev/null +++ b/recipes/log4cxx/all/patches/0.13.0-0001-logchar-type.patch @@ -0,0 +1,44 @@ +diff --git a/src/main/cpp/threadutility.cpp b/src/main/cpp/threadutility.cpp +index c14c12fd..057ecd86 100644 +--- a/src/main/cpp/threadutility.cpp ++++ b/src/main/cpp/threadutility.cpp +@@ -113,11 +113,13 @@ void ThreadUtility::threadStartedNameThread(LogString threadName, + std::thread::id /*threadId*/, + std::thread::native_handle_type nativeHandle){ + #if LOG4CXX_HAS_PTHREAD_SETNAME +- if( pthread_setname_np( static_cast( nativeHandle ), threadName.c_str() ) < 0 ){ +- LOGLOG_ERROR( LOG4CXX_STR("unable to set thread name") ); ++ LOG4CXX_ENCODE_CHAR(sthreadName, threadName); ++ if (pthread_setname_np(static_cast(nativeHandle), sthreadName.c_str()) < 0) { ++ LOGLOG_ERROR(LOG4CXX_STR("unable to set thread name")); + } + #elif LOG4CXX_HAS_SETTHREADDESCRIPTION +- HRESULT hr = SetThreadDescription(static_cast(nativeHandle), threadName.c_str()); ++ LOG4CXX_ENCODE_WCHAR(wthreadName, threadName); ++ HRESULT hr = SetThreadDescription(static_cast(nativeHandle), wthreadName.c_str()); + if(FAILED(hr)){ + LOGLOG_ERROR( LOG4CXX_STR("unable to set thread name") ); + } +diff --git a/src/main/include/CMakeLists.txt b/src/main/include/CMakeLists.txt +index e31443fb..32122e41 100644 +--- a/src/main/include/CMakeLists.txt ++++ b/src/main/include/CMakeLists.txt +@@ -39,9 +39,18 @@ endif() + + if(${LOG4CXX_CHAR} STREQUAL "unichar") + set(LOGCHAR_IS_UNICHAR 1) ++ set(LOGCHAR_IS_WCHAR 0) ++ set(LOGCHAR_IS_UTF8 0) + elseif(${LOG4CXX_CHAR} STREQUAL "wchar_t") + set(LOGCHAR_IS_WCHAR 1) ++ set(LOGCHAR_IS_UNICHAR 0) ++ set(LOGCHAR_IS_UTF8 0) ++elseif(${LOG4CXX_CHAR} STREQUAL "utf-8") ++ set(LOGCHAR_IS_UNICHAR 0) ++ set(LOGCHAR_IS_WCHAR 0) ++ set(LOGCHAR_IS_UTF8 1) + endif() ++ + option(LOG4CXX_WCHAR_T "Enable wchar_t API methods" ON) + option(LOG4CXX_UNICHAR "Enable UniChar API methods" OFF) + set(INIT_IOS_BASE 0) diff --git a/recipes/log4cxx/all/patches/0.13.0-0001-visual-studio-15.patch b/recipes/log4cxx/all/patches/0.13.0-0001-visual-studio-15.patch new file mode 100644 index 0000000000000..0c491ee579c3b --- /dev/null +++ b/recipes/log4cxx/all/patches/0.13.0-0001-visual-studio-15.patch @@ -0,0 +1,52 @@ +diff --git a/src/main/cpp/threadutility.cpp b/src/main/cpp/threadutility.cpp +index b57ab66..ef48704 100644 +--- a/src/main/cpp/threadutility.cpp ++++ b/src/main/cpp/threadutility.cpp +@@ -27,7 +27,11 @@ + #include + #endif + +-using log4cxx::helpers::ThreadUtility; ++namespace log4cxx ++{ ++namespace helpers ++{ ++ + + struct ThreadUtility::priv_data{ + priv_data(){ +@@ -36,9 +40,9 @@ struct ThreadUtility::priv_data{ + start_post = nullptr; + } + +- log4cxx::helpers::ThreadStartPre start_pre; +- log4cxx::helpers::ThreadStarted started; +- log4cxx::helpers::ThreadStartPost start_post; ++ ThreadStartPre start_pre; ++ ThreadStarted started; ++ ThreadStartPost start_post; + }; + + #if LOG4CXX_HAS_PTHREAD_SIGMASK +@@ -138,14 +142,18 @@ void ThreadUtility::postThreadUnblockSignals(){ + } + + +-log4cxx::helpers::ThreadStartPre ThreadUtility::preStartFunction(){ ++ThreadStartPre ThreadUtility::preStartFunction(){ + return m_priv->start_pre; + } + +-log4cxx::helpers::ThreadStarted ThreadUtility::threadStartedFunction(){ ++ThreadStarted ThreadUtility::threadStartedFunction(){ + return m_priv->started; + } + +-log4cxx::helpers::ThreadStartPost ThreadUtility::postStartFunction(){ ++ThreadStartPost ThreadUtility::postStartFunction(){ + return m_priv->start_post; + } ++ ++} //namespace helpers ++} //namespace log4cxx ++ diff --git a/recipes/log4cxx/all/patches/1.2.0-0001-find-apr.patch b/recipes/log4cxx/all/patches/1.2.0-0001-find-apr.patch new file mode 100644 index 0000000000000..03f1b1478ec0e --- /dev/null +++ b/recipes/log4cxx/all/patches/1.2.0-0001-find-apr.patch @@ -0,0 +1,26 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 61c0479..6ac3e77 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -51,16 +51,18 @@ endif() + + # Find Apache Runtime + option(APR_STATIC "Link to the APR static library" OFF) +-find_package(APR REQUIRED) ++find_package(apr REQUIRED) ++set(APR_LIBRARIES apr::apr) + + # Find Apache Runtime Utilities + option(APU_STATIC "Link to the APR-Util static library" OFF) +-find_package(APR-Util REQUIRED) ++find_package(apr-util REQUIRED) ++set(APR_UTIL_LIBRARIES apr-util::apr-util) + + find_package( Threads REQUIRED ) + + # Find expat for XML parsing +-find_package(EXPAT REQUIRED) ++find_package(EXPAT REQUIRED MODULE) + if(TARGET EXPAT::EXPAT) + set(EXPAT_LIBRARIES EXPAT::EXPAT) + elseif(TARGET expat::expat) diff --git a/recipes/log4cxx/all/test_package/CMakeLists.txt b/recipes/log4cxx/all/test_package/CMakeLists.txt index a9ec878c74ebe..da8e02ac1cd82 100644 --- a/recipes/log4cxx/all/test_package/CMakeLists.txt +++ b/recipes/log4cxx/all/test_package/CMakeLists.txt @@ -4,5 +4,6 @@ project(test_package LANGUAGES CXX) find_package(log4cxx REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) -target_link_libraries(${PROJECT_NAME} log4cxx) target_compile_features(${PROJECT_NAME} PUBLIC cxx_std_17) +target_include_directories(${PROJECT_NAME} PRIVATE ${log4cxx_INCLUDE_DIR}) +target_link_libraries(${PROJECT_NAME} PRIVATE log4cxx ) diff --git a/recipes/log4cxx/all/test_package/conanfile.py b/recipes/log4cxx/all/test_package/conanfile.py index 382876561a203..c27e4673f4ff9 100644 --- a/recipes/log4cxx/all/test_package/conanfile.py +++ b/recipes/log4cxx/all/test_package/conanfile.py @@ -3,7 +3,6 @@ from conan.tools.cmake import cmake_layout, CMake import os - class TestPackageConan(ConanFile): settings = "os", "arch", "compiler", "build_type" generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" @@ -22,6 +21,7 @@ def build(self): def test(self): if can_run(self): - bin_path = os.path.join(self.cpp.build.bindir, "test_package") config_xml_name = os.path.join(self.source_folder, "log4cxx_config.xml") - self.run(f"{bin_path} {config_xml_name}", env="conanrun") + bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") + self.run("{} {}".format(bin_path, config_xml_name), env="conanrun") + diff --git a/recipes/log4cxx/all/test_package/test_package.cpp b/recipes/log4cxx/all/test_package/test_package.cpp index 4e52b04611957..41abd554c33f4 100644 --- a/recipes/log4cxx/all/test_package/test_package.cpp +++ b/recipes/log4cxx/all/test_package/test_package.cpp @@ -1,20 +1,18 @@ -#include "log4cxx/logger.h" +#include "log4cxx/logmanager.h" #include "log4cxx/xml/domconfigurator.h" #include -using namespace log4cxx; -using namespace log4cxx::xml; - int main(int argc, const char* argv[]) { - LoggerPtr logger(Logger::getLogger("TEST")); if (argc < 2) { - std::cerr << "Expected path to config xml\n"; + std::cerr << "Usage error. Expected an argument, the path to a xml configuration file\n"; return -1; } - DOMConfigurator::configure(argv[1]); - LOG4CXX_INFO(logger, "App started!"); - LOG4CXX_ERROR(logger, "Some error!"); + log4cxx::xml::DOMConfigurator::configure(argv[1]); + auto logger = log4cxx::LogManager::getLogger("TEST"); + LOG4CXX_INFO(logger, "App started"); + LOG4CXX_ERROR(logger, "Information message"); + log4cxx::LogManager::shutdown(); return 0; } diff --git a/recipes/log4cxx/config.yml b/recipes/log4cxx/config.yml index 18729d7b4cdc5..fb792fbdf460c 100644 --- a/recipes/log4cxx/config.yml +++ b/recipes/log4cxx/config.yml @@ -1,7 +1,9 @@ versions: + "1.2.0": + folder: all "1.1.0": folder: all - "0.12.1": + "0.13.0": folder: all - "0.12.0": + "0.12.1": folder: all diff --git a/recipes/logfault/all/conandata.yml b/recipes/logfault/all/conandata.yml new file mode 100644 index 0000000000000..4ef9e5e9edbe3 --- /dev/null +++ b/recipes/logfault/all/conandata.yml @@ -0,0 +1,5 @@ +sources: + 0.5.2: + url: + - https://github.com/jgaa/logfault/archive/refs/tags/v0.5.2.tar.gz + sha256: b6c7a4faca340bb7e3105c2094acd2afd52ce1bcfbe7e3ed2233c1ec933a904f diff --git a/recipes/logfault/all/conanfile.py b/recipes/logfault/all/conanfile.py new file mode 100644 index 0000000000000..d93b9976fa00f --- /dev/null +++ b/recipes/logfault/all/conanfile.py @@ -0,0 +1,69 @@ +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.build import check_min_cppstd +from conan.tools.files import copy, get +from conan.tools.layout import basic_layout +from conan.tools.scm import Version +from conan.tools.cmake import CMake, CMakeToolchain +import os + + +required_conan_version = ">=1.52.0" + + +class PackageConan(ConanFile): + name = "logfault" + description = "Simple to use, header only C++ library for application-logging on all major platforms." + license = "MIT" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/jgaa/logfault" + topics = ("logging", "header-only") + package_type = "header-library" + settings = "os", "arch", "compiler", "build_type" + no_copy_source = True + + @property + def _min_cppstd(self): + return 17 + + @property + def _compilers_minimum_version(self): + return { + "Visual Studio": "15", + "msvc": "191", + "gcc": "8", + "clang": "7", + "apple-clang": "12", + } + + def layout(self): + basic_layout(self, src_folder="src") + + def package_id(self): + self.info.clear() + + def validate(self): + if self.settings.compiler.get_safe("cppstd"): + check_min_cppstd(self, self._min_cppstd) + minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) + if minimum_version and Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration( + f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." + ) + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def package(self): + copy(self, "LICENSE", self.source_folder, os.path.join(self.package_folder, "licenses")) + copy( + self, + "*.h", + os.path.join(self.source_folder, "include"), + os.path.join(self.package_folder, "include"), + ) + + def package_info(self): + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] + diff --git a/recipes/logfault/all/test_package/CMakeLists.txt b/recipes/logfault/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..fcdef5afc6817 --- /dev/null +++ b/recipes/logfault/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) + +find_package(LOGFAULT REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE logfault::logfault) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) diff --git a/recipes/logfault/all/test_package/conanfile.py b/recipes/logfault/all/test_package/conanfile.py new file mode 100644 index 0000000000000..0a808db45f245 --- /dev/null +++ b/recipes/logfault/all/test_package/conanfile.py @@ -0,0 +1,27 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake +import os + + +# It will become the standard on Conan 2.x +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def layout(self): + cmake_layout(self) + + def requirements(self): + self.requires(self.tested_reference_str) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/logfault/all/test_package/test_package.cpp b/recipes/logfault/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..a80ce4ba7c1ff --- /dev/null +++ b/recipes/logfault/all/test_package/test_package.cpp @@ -0,0 +1,13 @@ + +// General tests for manual testing during development + +#include +#include "logfault/logfault.h" + +using namespace std; + +int main( int argc, char *argv[]) { + + logfault::LogManager::Instance().AddHandler(std::make_unique(clog, logfault::LogLevel::DEBUGGING)); + LFLOG_INFO << "Testing" << 1 << 2 << 3; +} diff --git a/recipes/logfault/config.yml b/recipes/logfault/config.yml new file mode 100644 index 0000000000000..ccf525f369b0e --- /dev/null +++ b/recipes/logfault/config.yml @@ -0,0 +1,3 @@ +versions: + "0.5.2": + folder: all diff --git a/recipes/logr/config.yml b/recipes/logr/config.yml index 71c5abd93f78c..afa3309f2914c 100644 --- a/recipes/logr/config.yml +++ b/recipes/logr/config.yml @@ -1,4 +1,6 @@ versions: + "0.7.0": + folder: v0.7 "0.6.0": folder: all "0.5.1": diff --git a/recipes/logr/v0.7/conandata.yml b/recipes/logr/v0.7/conandata.yml new file mode 100644 index 0000000000000..745404ba635bc --- /dev/null +++ b/recipes/logr/v0.7/conandata.yml @@ -0,0 +1,4 @@ +sources: + "0.7.0": + url: "https://github.com/ngrodzitski/logr/archive/v0.7.0.tar.gz" + sha256: "b43b6624a9223bcb0a11c83afb3df69ef4388d42abef9abb1b80fbc85b890287" diff --git a/recipes/logr/v0.7/conanfile.py b/recipes/logr/v0.7/conanfile.py new file mode 100644 index 0000000000000..7eee46ae5d249 --- /dev/null +++ b/recipes/logr/v0.7/conanfile.py @@ -0,0 +1,140 @@ +from conan import ConanFile +from conan.tools.build import check_min_cppstd +from conan.tools.files import get, copy, rm +from conan.tools.layout import basic_layout +from conan.tools.scm import Version +from conan.errors import ConanInvalidConfiguration +from conan.tools.microsoft import check_min_vs +import os + +required_conan_version = ">=1.50.0" + + +class LogrConan(ConanFile): + name = "logr" + description = ( + "Logger frontend substitution for spdlog, glog, etc " + "for server/desktop applications" + ) + license = "BSD-3-Clause" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/ngrodzitski/logr" + topics = ("logger", "development", "util", "utils", "header-only") + settings = "os", "arch", "compiler", "build_type" + package_type = "header-library" + options = { + "with_spdlog": [True, False], + "with_glog": [True, False], + "with_log4cplus": [True, False], + "with_boostlog": [True, False], + } + default_options = { + "with_spdlog": True, + "with_glog": False, + "with_log4cplus": False, + "with_boostlog": False, + } + + @property + def _min_cppstd(self): + return 17 + + @property + def _minimum_compilers_version(self): + return { + "gcc": "10", + "clang": "11", + "apple-clang": "12", + } + + def layout(self): + basic_layout(self, src_folder="src") + + def requirements(self): + self.requires("fmt/10.2.1") + + if self.options.with_spdlog: + self.requires("spdlog/1.12.0") + + if self.options.with_glog: + self.requires("glog/0.6.0") + + if self.options.with_log4cplus: + self.requires("log4cplus/2.1.0") + + if self.options.with_boostlog: + self.requires("boost/1.83.0") + + def package_id(self): + self.info.settings.clear() + + def validate(self): + if self.settings.get_safe("compiler.cppstd"): + check_min_cppstd(self, self._min_cppstd) + + check_min_vs(self, 192) + + minimum_version = self._minimum_compilers_version.get(str(self.settings.compiler), False) + if minimum_version and Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration( + f"{self.ref} requires minimum {self.settings.compiler} version of {minimum_version}" + ) + + def build(self): + pass + + def source(self): + get(self, **self.conan_data["sources"][self.version], + destination=self.source_folder, strip_root=True) + + def package(self): + copy(self, "LICENSE", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) + copy(self, "*.*pp", src=os.path.join(self.source_folder, "logr", "include"), dst=os.path.join(self.package_folder, "include")) + + include_folder = os.path.join(self.package_folder, "include", "logr") + if not self.options.with_spdlog: + rm(self, "spdlog_backend.hpp", include_folder) + + if not self.options.with_glog: + rm(self, "glog_backend.hpp", include_folder) + + if not self.options.with_log4cplus: + rm(self, "log4cplus_backend.hpp", include_folder) + + if not self.options.with_boostlog: + rm(self, "boostlog_backend.hpp", include_folder) + + def package_info(self): + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] + + self.cpp_info.components["logr_base"].includedirs = ["include"] + self.cpp_info.components["logr_base"].requires = ["fmt::fmt"] + + if self.options.with_spdlog: + self.cpp_info.components["logr_spdlog"].includedirs = [] + self.cpp_info.components["logr_spdlog"].requires = [ + "logr_base", + "spdlog::spdlog", + ] + + if self.options.with_glog: + self.cpp_info.components["logr_glog"].includedirs = [] + self.cpp_info.components["logr_glog"].requires = [ + "logr_base", + "glog::glog", + ] + + if self.options.with_log4cplus: + self.cpp_info.components["logr_log4cplus"].includedirs = [] + self.cpp_info.components["logr_log4cplus"].requires = [ + "logr_base", + "log4cplus::log4cplus", + ] + + if self.options.with_boostlog: + self.cpp_info.components["logr_boostlog"].includedirs = [] + self.cpp_info.components["logr_boostlog"].requires = [ + "logr_base", + "boost::log", + ] diff --git a/recipes/logr/v0.7/test_package/CMakeLists.txt b/recipes/logr/v0.7/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..5e62d2b8b4d92 --- /dev/null +++ b/recipes/logr/v0.7/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.8) +project(test_package LANGUAGES CXX) + +find_package(logr REQUIRED) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE logr::logr) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) diff --git a/recipes/logr/v0.7/test_package/conanfile.py b/recipes/logr/v0.7/test_package/conanfile.py new file mode 100644 index 0000000000000..f5cf204295e19 --- /dev/null +++ b/recipes/logr/v0.7/test_package/conanfile.py @@ -0,0 +1,25 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake +import os + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/logr/v0.7/test_package/test_package.cpp b/recipes/logr/v0.7/test_package/test_package.cpp new file mode 100644 index 0000000000000..27d9ac363797b --- /dev/null +++ b/recipes/logr/v0.7/test_package/test_package.cpp @@ -0,0 +1,46 @@ +// Logger frontend library for C++. +// +// Copyright (c) 2020 - present, Nicolai Grodzitski +// See LICENSE file in the root of the project. + + +#include + +#include +#include + + +int main() { + auto logger = logr::basic_ostream_logger_t<1024u>(std::cout); + + logger.info( "Hello World! [raw message]" ); + logger.info( LOGR_SRC_LOCATION, "Hello World! [raw message]" ); + + logger.info( []() { return "Hello World! [cb]"; } ); + logger.info( LOGR_SRC_LOCATION, []() { return "Hello World! [cb]"; } ); + + logger.info( []( auto out ) { + format_to( out, "Hello {}! [{}]", "World", "cb with explicit out" ); + } ); + + logger.info( LOGR_SRC_LOCATION, []( auto out ) { + format_to( out, "Hello {}! [{}]", "World", "cb with explicit out" ); + } ); + logger.info( LOGR_SRC_LOCATION, []( auto out ) { + format_to( out, + FMT_STRING( "Hello {}! [{}]" ), + "World", + "cb with explicit out and FMT_STRING" ); + } ); + + logger.info( LOGR_SRC_LOCATION, []( auto out ) { + format_to( out, + fmt::runtime( "Hello {}! [{}]" ), + "World", + "cb with explicit out and runtime-string" ); + } ); + + logger.flush(); + + return 0; +} diff --git a/recipes/lua/all/conandata.yml b/recipes/lua/all/conandata.yml index 8ec9d4e74c4ed..c45d4283f1442 100644 --- a/recipes/lua/all/conandata.yml +++ b/recipes/lua/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "5.4.7": + url: "https://www.lua.org/ftp/lua-5.4.7.tar.gz" + sha256: "9fbf5e28ef86c69858f6d3d34eccc32e911c1a28b4120ff3e84aaa70cfbf1e30" "5.4.6": url: "https://www.lua.org/ftp/lua-5.4.6.tar.gz" sha256: "7d5ea1b9cb6aa0b59ca3dde1c6adcb57ef83a1ba8e5432c0ecd06bf439b3ad88" diff --git a/recipes/lua/config.yml b/recipes/lua/config.yml index 2b62e0c775189..00a91f7d773a9 100644 --- a/recipes/lua/config.yml +++ b/recipes/lua/config.yml @@ -1,4 +1,6 @@ versions: + "5.4.7": + folder: all "5.4.6": folder: all "5.4.4": diff --git a/recipes/luajit/all/conandata.yml b/recipes/luajit/all/conandata.yml index 1e7abff8db36b..0617a7db6d602 100644 --- a/recipes/luajit/all/conandata.yml +++ b/recipes/luajit/all/conandata.yml @@ -1,10 +1,11 @@ +# INFO: Upstream moved to rolling releases and removed all tarballs. +# The Github mirror (https://github.com/LuaJIT/LuaJIT) does not match the checksums and have missing header files. +# Conan will consume the backup sources from the Conan Center Artifactory instead, which are the original tarballs (same checksums). +# Read the issue https://github.com/conan-io/conan-center-index/issues/25032 for more information. sources: "2.1.0-beta3": - url: "https://luajit.org/download/LuaJIT-2.1.0-beta3.tar.gz" + url: "https://c3i.jfrog.io/artifactory/conan-center-backup-sources/1ad2e34b111c802f9d0cdf019e986909123237a28c746b21295b63c9e785d9c3" sha256: "1ad2e34b111c802f9d0cdf019e986909123237a28c746b21295b63c9e785d9c3" - "2.0.5": - url: "http://luajit.org/download/LuaJIT-2.0.5.tar.gz" - sha256: "874b1f8297c697821f561f9b73b57ffd419ed8f4278c82e05b48806d30c1e979" patches: "2.1.0-beta3": - patch_file: "patches/2.1.0-beta3-0001-remove-mac-deploy.patch" diff --git a/recipes/luajit/all/conanfile.py b/recipes/luajit/all/conanfile.py index 47079e98290b1..1a87a46c223ac 100644 --- a/recipes/luajit/all/conanfile.py +++ b/recipes/luajit/all/conanfile.py @@ -48,7 +48,8 @@ def validate(self): raise ConanInvalidConfiguration(f"{self.ref} is not supported by Mac M1. Please, try any version >=2.1") def source(self): - get(self, **self.conan_data["sources"][self.version], destination=self.source_folder, strip_root=True) + filename = f"LuaJIT-{self.version}.tar.gz" + get(self, **self.conan_data["sources"][self.version], destination=self.source_folder, filename=filename, strip_root=True) def generate(self): if is_msvc(self): diff --git a/recipes/luajit/all/patches/20230104-0001-remove-mac-deploy.patch b/recipes/luajit/all/patches/20230104-0001-remove-mac-deploy.patch deleted file mode 100644 index 42e0eca4a7fb6..0000000000000 --- a/recipes/luajit/all/patches/20230104-0001-remove-mac-deploy.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff --git a/src/Makefile b/src/Makefile -index 30d64be..b753ea1 100644 ---- a/src/Makefile -+++ b/src/Makefile -@@ -316,9 +316,6 @@ ifeq (,$(shell $(TARGET_CC) -o /dev/null -c -x c /dev/null -fno-stack-protector - TARGET_XCFLAGS+= -fno-stack-protector - endif - ifeq (Darwin,$(TARGET_SYS)) -- ifeq (,$(MACOSX_DEPLOYMENT_TARGET)) -- $(error missing: export MACOSX_DEPLOYMENT_TARGET=XX.YY) -- endif - TARGET_STRIP+= -x - TARGET_XCFLAGS+= -DLUAJIT_UNWIND_EXTERNAL - TARGET_XSHLDFLAGS= -dynamiclib -single_module -undefined dynamic_lookup -fPIC diff --git a/recipes/luajit/config.yml b/recipes/luajit/config.yml index f13e8f0f1a9ec..72c6723e528aa 100644 --- a/recipes/luajit/config.yml +++ b/recipes/luajit/config.yml @@ -1,5 +1,3 @@ versions: "2.1.0-beta3": folder: "all" - "2.0.5": - folder: "all" diff --git a/recipes/luau/all/conandata.yml b/recipes/luau/all/conandata.yml index dfd67db933c9e..a75ea6a2148a0 100644 --- a/recipes/luau/all/conandata.yml +++ b/recipes/luau/all/conandata.yml @@ -1,52 +1,22 @@ sources: + "0.650": + url: "https://github.com/Roblox/luau/archive/0.650.tar.gz" + sha256: "a605ae7a188455844ab131ff0d2df6f38c088142d6bd5eebb87795e619c3d7aa" + "0.645": + url: "https://github.com/Roblox/luau/archive/0.645.tar.gz" + sha256: "28aaa3e57e7adc44debedc6be9802f2625334eef0124ff722c8ab340dc6bbe1c" + "0.640": + url: "https://github.com/Roblox/luau/archive/0.640.tar.gz" + sha256: "63ada3e4c8c17e5aff8964b16951bfd1b567329dd81c11ae1144b6e95f354762" + "0.635": + url: "https://github.com/Roblox/luau/archive/0.635.tar.gz" + sha256: "b2ec66070bb53ab9c26e41608dd75c9672c942cf0738c4b965c5eb956a954910" + "0.630": + url: "https://github.com/Roblox/luau/archive/0.630.tar.gz" + sha256: "601938ebd428d37c2bb10697500bff4fe304f7c0651cf64721b9dc5600a30ed9" + "0.625": + url: "https://github.com/Roblox/luau/archive/0.625.tar.gz" + sha256: "4dd9295a67c2de6536b6e1208ea81cebfc5caefadcdacd7e09341c7a1dbbb9e2" "0.620": url: "https://github.com/Roblox/luau/archive/0.620.tar.gz" sha256: "a6ae1f0396334e72b1241dabb73aa123037613f3276bf2e71d0dc75568b1eb52" - "0.615": - url: "https://github.com/Roblox/luau/archive/0.615.tar.gz" - sha256: "264192ff1cb1bc3d5c223e5fbe9c4c628d203e2ac6ff72100e09640f43f60a60" - "0.610": - url: "https://github.com/Roblox/luau/archive/0.610.tar.gz" - sha256: "a6ee2cab90c816a86b86113f01d9da865378074ee09dc6122dbe8bfbdf819ede" - "0.607": - url: "https://github.com/Roblox/luau/archive/0.607.tar.gz" - sha256: "519409d7dbb43da13390131a90c831cb0f2ab9c25e337acf15508313a339bf36" - "0.603": - url: "https://github.com/Roblox/luau/archive/0.603.tar.gz" - sha256: "97687486b0ffe8d7a4917e13648a9776ee015ca9e1c10b6da169caec6ca5b427" - "0.598": - url: "https://github.com/Roblox/luau/archive/0.598.tar.gz" - sha256: "a2bab4b513fe5f2fe174c45de4807846e6ce83420c9ba7a34c81c48b99e01c98" - "0.593": - url: "https://github.com/Roblox/luau/archive/0.593.tar.gz" - sha256: "1cbe4390ef71bb0f2210853978c900974aa02fab73de92b6e18e7bb10dd0e3c1" - "0.589": - url: "https://github.com/Roblox/luau/archive/0.589.tar.gz" - sha256: "dc4489de52dbf29cd3d04d78c1112f812e04a03b68d57585749260ba791e65ed" - "0.582": - url: "https://github.com/Roblox/luau/archive/0.582.tar.gz" - sha256: "ee6da6329e58afc956bcca907ed9c6bc0455cd580990aa73f7cfb285aea22a6d" - "0.577": - url: "https://github.com/Roblox/luau/archive/0.577.tar.gz" - sha256: "4fd3f0d7a3bb6a9f4ed69711d261c4ae6ab6dfe8eb8e444f738c3338c559c7c8" - "0.572": - url: "https://github.com/Roblox/luau/archive/0.572.tar.gz" - sha256: "5cdd13233eefc4b3f27970118272254a24be81fafcccf60e7a29391fbc529151" - "0.568": - url: "https://github.com/Roblox/luau/archive/0.568.tar.gz" - sha256: "8218f1943b53439b9cc076bcb6d6223c089093659cc75dda6e2695ee9b370a8c" - "0.563": - url: "https://github.com/Roblox/luau/archive/0.563.tar.gz" - sha256: "717c1b3e03d20829d75eb484e0699fc824b651b8f394164bc4ab8194482890b2" - "0.558": - url: "https://github.com/Roblox/luau/archive/0.558.tar.gz" - sha256: "3484adddb18872700e033f5917af44d90c266f9e0fff2fac21aec1061f472a06" -patches: - "0.563": - - patch_file: "patches/0.536-0002-rename-lerp.patch" - patch_description: "rename lerp function to avoid name conflict" - patch_type: "portability" - "0.558": - - patch_file: "patches/0.536-0002-rename-lerp.patch" - patch_description: "rename lerp function to avoid name conflict" - patch_type: "portability" diff --git a/recipes/luau/all/conanfile.py b/recipes/luau/all/conanfile.py index 643eab7b93170..dda97f96ca72a 100644 --- a/recipes/luau/all/conanfile.py +++ b/recipes/luau/all/conanfile.py @@ -1,6 +1,6 @@ from conan import ConanFile from conan.errors import ConanInvalidConfiguration -from conan.tools.files import apply_conandata_patches, export_conandata_patches, get, copy +from conan.tools.files import get, copy from conan.tools.build import check_min_cppstd from conan.tools.scm import Version from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout @@ -45,7 +45,6 @@ def _compilers_minimum_version(self): def export_sources(self): copy(self, "CMakeLists.txt", self.recipe_folder, self.export_sources_folder) - export_conandata_patches(self) def layout(self): cmake_layout(self, src_folder="src") @@ -73,11 +72,7 @@ def generate(self): tc.variables["LUAU_SRC_DIR"] = self.source_folder.replace("\\", "/") tc.generate() - def _patch_sources(self): - apply_conandata_patches(self) - def build(self): - self._patch_sources() cmake = CMake(self) cmake.configure(build_script_folder=os.path.join(self.source_folder, os.pardir)) cmake.build() diff --git a/recipes/luau/all/patches/0.536-0002-rename-lerp.patch b/recipes/luau/all/patches/0.536-0002-rename-lerp.patch deleted file mode 100644 index 324b7d737bf16..0000000000000 --- a/recipes/luau/all/patches/0.536-0002-rename-lerp.patch +++ /dev/null @@ -1,28 +0,0 @@ -diff --git a/VM/src/lmathlib.cpp b/VM/src/lmathlib.cpp -index a6e7b49..7c3e3c6 100644 ---- a/VM/src/lmathlib.cpp -+++ b/VM/src/lmathlib.cpp -@@ -300,7 +300,7 @@ static float fade(float t) - return t * t * t * (t * (t * 6 - 15) + 10); - } - --static float lerp(float t, float a, float b) -+static float lerp_l(float t, float a, float b) - { - return a + t * (b - a); - } -@@ -342,10 +342,10 @@ static float perlin(float x, float y, float z) - int ba = p[b] + zi; - int bb = p[b + 1] + zi; - -- return lerp(w, -- lerp(v, lerp(u, grad(p[aa], xf, yf, zf), grad(p[ba], xf - 1, yf, zf)), lerp(u, grad(p[ab], xf, yf - 1, zf), grad(p[bb], xf - 1, yf - 1, zf))), -- lerp(v, lerp(u, grad(p[aa + 1], xf, yf, zf - 1), grad(p[ba + 1], xf - 1, yf, zf - 1)), -- lerp(u, grad(p[ab + 1], xf, yf - 1, zf - 1), grad(p[bb + 1], xf - 1, yf - 1, zf - 1)))); -+ return lerp_l(w, -+ lerp_l(v, lerp_l(u, grad(p[aa], xf, yf, zf), grad(p[ba], xf - 1, yf, zf)), lerp_l(u, grad(p[ab], xf, yf - 1, zf), grad(p[bb], xf - 1, yf - 1, zf))), -+ lerp_l(v, lerp_l(u, grad(p[aa + 1], xf, yf, zf - 1), grad(p[ba + 1], xf - 1, yf, zf - 1)), -+ lerp_l(u, grad(p[ab + 1], xf, yf - 1, zf - 1), grad(p[bb + 1], xf - 1, yf - 1, zf - 1)))); - } - - static int math_noise(lua_State* L) diff --git a/recipes/luau/config.yml b/recipes/luau/config.yml index f0ef8a9cb387e..f2a2b8d31f2e5 100644 --- a/recipes/luau/config.yml +++ b/recipes/luau/config.yml @@ -1,29 +1,15 @@ versions: - "0.620": - folder: all - "0.615": - folder: all - "0.610": - folder: all - "0.607": - folder: all - "0.603": + "0.650": folder: all - "0.598": + "0.645": folder: all - "0.593": + "0.640": folder: all - "0.589": + "0.635": folder: all - "0.582": + "0.630": folder: all - "0.577": + "0.625": folder: all - "0.572": - folder: all - "0.568": - folder: all - "0.563": - folder: all - "0.558": + "0.620": folder: all diff --git a/recipes/lunasvg/all/conandata.yml b/recipes/lunasvg/all/conandata.yml index 841dc89eb9587..01f4784f10bfe 100644 --- a/recipes/lunasvg/all/conandata.yml +++ b/recipes/lunasvg/all/conandata.yml @@ -1,4 +1,16 @@ sources: + "3.0.1": + url: "https://github.com/sammycage/lunasvg/archive/v3.0.1.tar.gz" + sha256: "39e3f47d4e40f7992d7958123ca1993ff1a02887539af2af1c638da2855a603c" + "3.0.0": + url: "https://github.com/sammycage/lunasvg/archive/v3.0.0.tar.gz" + sha256: "075f0a049ff205ce059feb1fe3ac0e826a1ac62d2360cb72463395f68c4c8764" + "2.4.1": + url: "https://github.com/sammycage/lunasvg/archive/v2.4.1.tar.gz" + sha256: "db9d2134c8c2545694e71e62fb0772a7d089fe53e1ace1e08c2279a89e450534" + "2.4.0": + url: "https://github.com/sammycage/lunasvg/archive/v2.4.0.tar.gz" + sha256: "0682c60501c91d75f4261d9c1a5cd44c2c9da8dba76f8402eab628448c9a4591" "2.3.9": url: "https://github.com/sammycage/lunasvg/archive/v2.3.9.tar.gz" sha256: "088bc9fd1191a004552c65bdcc260989b83da441b0bdaa965e79d984feba88fa" @@ -18,6 +30,22 @@ sources: url: "https://github.com/sammycage/lunasvg/archive/refs/tags/v2.3.1.tar.gz" sha256: "6492bf0f51982f5382f83f1a42f247bb1bbcbaef4a15963bbd53073cd4944a25" patches: + "3.0.1": + - patch_file: "patches/3.0.0-0001-use-cci-package.patch" + patch_description: "use cci plutovg" + patch_type: "conan" + "3.0.0": + - patch_file: "patches/3.0.0-0001-use-cci-package.patch" + patch_description: "use cci plutovg" + patch_type: "conan" + "2.4.1": + - patch_file: "patches/2.4.1-0001-fix-cmake.patch" + patch_description: "use external plutovg and fix installation path for conan" + patch_type: "conan" + "2.4.0": + - patch_file: "patches/2.3.9-0001-fix-cmake.patch" + patch_description: "use external plutovg and fix installation path for conan" + patch_type: "conan" "2.3.9": - patch_file: "patches/2.3.9-0001-fix-cmake.patch" patch_description: "use external plutovg and fix installation path for conan" diff --git a/recipes/lunasvg/all/conanfile.py b/recipes/lunasvg/all/conanfile.py index e2d264c8bbac5..002cef7926081 100644 --- a/recipes/lunasvg/all/conanfile.py +++ b/recipes/lunasvg/all/conanfile.py @@ -1,7 +1,6 @@ from conan import ConanFile from conan.errors import ConanInvalidConfiguration -from conan.tools.microsoft import check_min_vs, is_msvc -from conan.tools.files import apply_conandata_patches, export_conandata_patches, get, copy +from conan.tools.files import apply_conandata_patches, export_conandata_patches, get, copy, rmdir from conan.tools.build import check_min_cppstd from conan.tools.scm import Version from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout @@ -34,6 +33,8 @@ def _min_cppstd(self): return "14" if Version(self.version) <= "2.3.8": return "17" + if Version(self.version) >= "3.0.0": + return "17" return "11" @property @@ -72,8 +73,10 @@ def layout(self): def requirements(self): if Version(self.version) < "2.3.5": self.requires("plutovg/cci.20220103") - else: + elif Version(self.version) < "3.0.0": self.requires("plutovg/cci.20221030") + else: + self.requires("plutovg/0.0.7") def validate(self): if self.info.settings.compiler.cppstd: @@ -90,8 +93,10 @@ def source(self): def generate(self): tc = CMakeToolchain(self) tc.variables["BUILD_SHARED_LIBS"] = self.options.shared - tc.variables["CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS"] = True + if Version(self.version) < "2.4.1": + tc.variables["CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS"] = True tc.generate() + tc.variables["LUNASVG_BUILD_EXAMPLES"] = False tc = CMakeDeps(self) tc.generate() @@ -107,7 +112,11 @@ def package(self): cmake = CMake(self) cmake.install() + rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) + def package_info(self): self.cpp_info.libs = ["lunasvg"] if self.settings.os in ["Linux", "FreeBSD"]: self.cpp_info.system_libs = ["m"] + if Version(self.version) >= "2.4.1" and not self.options.shared: + self.cpp_info.defines = ["LUNASVG_BUILD_STATIC"] diff --git a/recipes/lunasvg/all/patches/2.4.1-0001-fix-cmake.patch b/recipes/lunasvg/all/patches/2.4.1-0001-fix-cmake.patch new file mode 100644 index 0000000000000..190bb9b65c6b5 --- /dev/null +++ b/recipes/lunasvg/all/patches/2.4.1-0001-fix-cmake.patch @@ -0,0 +1,38 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 3565911..e33555e 100755 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -12,8 +12,8 @@ add_library(lunasvg) + + add_subdirectory(include) + add_subdirectory(source) +-add_subdirectory(3rdparty/plutovg) +- ++find_package(plutovg CONFIG REQUIRED) ++target_link_libraries(lunasvg plutovg::plutovg) + target_compile_definitions(lunasvg PRIVATE LUNASVG_BUILD) + if(NOT BUILD_SHARED_LIBS) + target_compile_definitions(lunasvg PRIVATE LUNASVG_BUILD_STATIC) +@@ -25,16 +25,16 @@ if(LUNASVG_BUILD_EXAMPLES) + target_include_directories(svg2png PRIVATE 3rdparty/stb) + endif() + +-set(LUNASVG_LIBDIR ${CMAKE_INSTALL_PREFIX}/lib) +-set(LUNASVG_INCDIR ${CMAKE_INSTALL_PREFIX}/include) ++# set(LUNASVG_LIBDIR ${CMAKE_INSTALL_PREFIX}/lib) ++# set(LUNASVG_INCDIR ${CMAKE_INSTALL_PREFIX}/include) + + install(FILES + include/lunasvg.h +- DESTINATION ${LUNASVG_INCDIR} ++ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} + ) + + install(TARGETS lunasvg +- LIBRARY DESTINATION ${LUNASVG_LIBDIR} +- ARCHIVE DESTINATION ${LUNASVG_LIBDIR} +- INCLUDES DESTINATION ${LUNASVG_INCDIR} ++ RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" ++ LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" ++ ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" + ) diff --git a/recipes/lunasvg/all/patches/3.0.0-0001-use-cci-package.patch b/recipes/lunasvg/all/patches/3.0.0-0001-use-cci-package.patch new file mode 100644 index 0000000000000..8e3b94580b37c --- /dev/null +++ b/recipes/lunasvg/all/patches/3.0.0-0001-use-cci-package.patch @@ -0,0 +1,44 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 0e7ed4b..9c4f8c7 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -6,16 +6,16 @@ set(LUNASVG_VERSION_MICRO 0) + + project(lunasvg LANGUAGES CXX VERSION ${LUNASVG_VERSION_MAJOR}.${LUNASVG_VERSION_MINOR}.${LUNASVG_VERSION_MICRO}) + +-include(FetchContent) +-FetchContent_Declare(plutovg +- GIT_REPOSITORY https://github.com/sammycage/plutovg.git +- GIT_TAG main +- GIT_SHALLOW ON +- FIND_PACKAGE_ARGS 0.0.4 +-) +- +-FetchContent_MakeAvailable(plutovg) +- ++# include(FetchContent) ++# FetchContent_Declare(plutovg ++# GIT_REPOSITORY https://github.com/sammycage/plutovg.git ++# GIT_TAG main ++# GIT_SHALLOW ON ++# FIND_PACKAGE_ARGS 0.0.4 ++# ) ++ ++# FetchContent_MakeAvailable(plutovg) ++find_package(plutovg CONFIG REQUIRED) + set(lunasvg_sources + source/lunasvg.cpp + source/graphics.cpp +diff --git a/source/graphics.h b/source/graphics.h +index 775f53c..5676f01 100644 +--- a/source/graphics.h ++++ b/source/graphics.h +@@ -1,7 +1,7 @@ + #ifndef LUNASVG_GRAPHICS_H + #define LUNASVG_GRAPHICS_H + +-#include ++#include + + #include + #include diff --git a/recipes/lunasvg/all/test_package/CMakeLists.txt b/recipes/lunasvg/all/test_package/CMakeLists.txt index 29d0fd86a92ba..94475f0604f5d 100644 --- a/recipes/lunasvg/all/test_package/CMakeLists.txt +++ b/recipes/lunasvg/all/test_package/CMakeLists.txt @@ -9,6 +9,12 @@ if (lunasvg_VERSION VERSION_LESS_EQUAL "2.3.2") target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_14) elseif (lunasvg_VERSION VERSION_LESS_EQUAL "2.3.8") target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) +elseif (lunasvg_VERSION VERSION_GREATER_EQUAL "3.0.0") + target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) else() target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) endif() + +if (lunasvg_VERSION VERSION_LESS "3.0.0") + target_compile_definitions(${PROJECT_NAME} PRIVATE LUNASVG_BEFORE_3_0_0) +endif() diff --git a/recipes/lunasvg/all/test_package/test_package.cpp b/recipes/lunasvg/all/test_package/test_package.cpp index 1e47dd43f1e9a..9c72aef23c7d4 100644 --- a/recipes/lunasvg/all/test_package/test_package.cpp +++ b/recipes/lunasvg/all/test_package/test_package.cpp @@ -1,4 +1,8 @@ +#ifdef LUNASVG_BEFORE_3_0_0 #include "lunasvg.h" +#else +#include "lunasvg/lunasvg.h" +#endif #include int main() { diff --git a/recipes/lunasvg/all/test_v1_package/CMakeLists.txt b/recipes/lunasvg/all/test_v1_package/CMakeLists.txt index 596ce1fb31ebb..3e7d5abf87992 100644 --- a/recipes/lunasvg/all/test_v1_package/CMakeLists.txt +++ b/recipes/lunasvg/all/test_v1_package/CMakeLists.txt @@ -8,4 +8,14 @@ find_package(lunasvg REQUIRED CONFIG) add_executable(${PROJECT_NAME} ../test_package/test_package.cpp) target_link_libraries(${PROJECT_NAME} PRIVATE lunasvg::lunasvg) -target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_14) +if (lunasvg_VERSION VERSION_LESS_EQUAL "2.3.2") + target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_14) +elseif (lunasvg_VERSION VERSION_LESS_EQUAL "2.3.8") + target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) +else() + target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) +endif() + +if (lunasvg_VERSION VERSION_LESS "3.0.0") + target_compile_definitions(${PROJECT_NAME} PRIVATE LUNASVG_BEFORE_3_0_0) +endif() diff --git a/recipes/lunasvg/config.yml b/recipes/lunasvg/config.yml index 670758a7b8c7f..36b14539bcd19 100644 --- a/recipes/lunasvg/config.yml +++ b/recipes/lunasvg/config.yml @@ -1,4 +1,12 @@ versions: + "3.0.1": + folder: all + "3.0.0": + folder: all + "2.4.1": + folder: all + "2.4.0": + folder: all "2.3.9": folder: all "2.3.8": diff --git a/recipes/lz4/all/conandata.yml b/recipes/lz4/all/conandata.yml index fc3f8472653fd..27dd4979a6d6f 100644 --- a/recipes/lz4/all/conandata.yml +++ b/recipes/lz4/all/conandata.yml @@ -1,13 +1,13 @@ sources: + "1.10.0": + url: "https://github.com/lz4/lz4/archive/v1.10.0.tar.gz" + sha256: "537512904744b35e232912055ccf8ec66d768639ff3abe5788d90d792ec5f48b" "1.9.4": - sha256: 0b0e3aa07c8c063ddf40b082bdf7e37a1562bda40a0ff5272957f3e987e0e54b - url: https://github.com/lz4/lz4/archive/v1.9.4.tar.gz + url: "https://github.com/lz4/lz4/archive/v1.9.4.tar.gz" + sha256: "0b0e3aa07c8c063ddf40b082bdf7e37a1562bda40a0ff5272957f3e987e0e54b" "1.9.3": - sha256: 030644df4611007ff7dc962d981f390361e6c97a34e5cbc393ddfbe019ffe2c1 - url: https://github.com/lz4/lz4/archive/v1.9.3.tar.gz - "1.9.2": - sha256: 658ba6191fa44c92280d4aa2c271b0f4fbc0e34d249578dd05e50e76d0e5efcc - url: https://github.com/lz4/lz4/archive/v1.9.2.tar.gz + url: "https://github.com/lz4/lz4/archive/v1.9.3.tar.gz" + sha256: "030644df4611007ff7dc962d981f390361e6c97a34e5cbc393ddfbe019ffe2c1" patches: "1.9.4": - patch_file: "patches/0004-Added-namespace-declaration-for-xxhash-in-CMake.patch" @@ -18,13 +18,3 @@ patches: - patch_file: "patches/0003-cmake-minimum-required-first-1.9.3.patch" patch_description: "Move cmake_minimum_required to the top of CMakeFile.txt" patch_type: conan - "1.9.2": - - patch_file: "patches/0001-cmake-add-shared-DEFINE_SYMBOL.patch" - patch_description: "Add LZ4_DLL_EXPORT to MSVC" - patch_type: portability - - patch_file: "patches/0002-cmake-optional-cli.patch" - patch_description: "Add ability not to compile the CLI" - patch_type: conan - - patch_file: "patches/0003-cmake-minimum-required-first-1.9.2.patch" - patch_description: "Move cmake_minimum_required to the top of CMakeFile.txt" - patch_type: conan diff --git a/recipes/lz4/all/conanfile.py b/recipes/lz4/all/conanfile.py index 00e8eb7116e69..ea0b3ac51007a 100644 --- a/recipes/lz4/all/conanfile.py +++ b/recipes/lz4/all/conanfile.py @@ -16,7 +16,7 @@ class LZ4Conan(ConanFile): url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/lz4/lz4" topics = ("compression") - + package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], @@ -50,7 +50,8 @@ def source(self): def generate(self): tc = CMakeToolchain(self) tc.variables["LZ4_BUILD_CLI"] = False - tc.variables["LZ4_BUILD_LEGACY_LZ4C"] = False + if Version(self.version) < "1.10.0": + tc.variables["LZ4_BUILD_LEGACY_LZ4C"] = False tc.variables["LZ4_BUNDLED_MODE"] = False tc.variables["LZ4_POSITION_INDEPENDENT_LIB"] = self.options.get_safe("fPIC", True) # Generate a relocatable shared lib on Macos @@ -61,10 +62,7 @@ def generate(self): @property def _cmakelists_folder(self): - if Version(self.version) < "1.9.3": - subfolder = os.path.join("contrib", "cmake_unofficial") - else: - subfolder = os.path.join("build", "cmake") + subfolder = os.path.join("build", "cmake") return os.path.join(self.source_folder, subfolder) def build(self): diff --git a/recipes/lz4/all/patches/0001-cmake-add-shared-DEFINE_SYMBOL.patch b/recipes/lz4/all/patches/0001-cmake-add-shared-DEFINE_SYMBOL.patch deleted file mode 100644 index 5de5fbc440858..0000000000000 --- a/recipes/lz4/all/patches/0001-cmake-add-shared-DEFINE_SYMBOL.patch +++ /dev/null @@ -1,16 +0,0 @@ ---- contrib/cmake_unofficial/CMakeLists.txt -+++ contrib/cmake_unofficial/CMakeLists.txt -@@ -103,9 +103,13 @@ - if(BUILD_SHARED_LIBS) - add_library(lz4_shared SHARED ${LZ4_SOURCES}) - set_target_properties(lz4_shared PROPERTIES - OUTPUT_NAME lz4 - SOVERSION "${LZ4_VERSION_MAJOR}" - VERSION "${LZ4_VERSION_STRING}") - list(APPEND LZ4_LIBRARIES_BUILT lz4_shared) -+ if(MSVC) -+ set_target_properties(lz4_shared PROPERTIES -+ DEFINE_SYMBOL LZ4_DLL_EXPORT=1) -+ endif() - endif() - if(BUILD_STATIC_LIBS) diff --git a/recipes/lz4/all/patches/0002-cmake-optional-cli.patch b/recipes/lz4/all/patches/0002-cmake-optional-cli.patch deleted file mode 100644 index b2fe91a0e8bf9..0000000000000 --- a/recipes/lz4/all/patches/0002-cmake-optional-cli.patch +++ /dev/null @@ -1,41 +0,0 @@ ---- a/contrib/cmake_unofficial/CMakeLists.txt -+++ b/contrib/cmake_unofficial/CMakeLists.txt -@@ -12,6 +12,7 @@ - - set(LZ4_TOP_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../..") - -+option(LZ4_BUILD_CLI "Build lz4 program" ON) - option(LZ4_BUILD_LEGACY_LZ4C "Build lz4c progam with legacy argument support" ON) - - # Parse version information -@@ -128,10 +129,12 @@ else() - endif() - - # lz4 -+if(LZ4_BUILD_CLI) - set(LZ4_PROGRAMS_BUILT lz4cli) - add_executable(lz4cli ${LZ4_CLI_SOURCES}) - set_target_properties(lz4cli PROPERTIES OUTPUT_NAME lz4) - target_link_libraries(lz4cli ${LZ4_LINK_LIBRARY}) -+endif() - - # lz4c - if (LZ4_BUILD_LEGACY_LZ4C) -@@ -193,7 +196,7 @@ if(NOT LZ4_BUNDLED_MODE) - DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig") - - # install lz4cat and unlz4 symlinks on *nix -- if(UNIX) -+ if(UNIX AND LZ4_BUILD_CLI) - install(CODE " - foreach(f lz4cat unlz4) - set(dest \"\$ENV{DESTDIR}${CMAKE_INSTALL_FULL_BINDIR}/\${f}\") -@@ -209,7 +212,7 @@ if(NOT LZ4_BUNDLED_MODE) - install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${f}.1" - DESTINATION "${CMAKE_INSTALL_MANDIR}/man1") - endforeach() -- endif(UNIX) -+ endif(UNIX AND LZ4_BUILD_CLI) - endif(NOT LZ4_BUNDLED_MODE) - - # pkg-config diff --git a/recipes/lz4/all/patches/0003-cmake-minimum-required-first-1.9.2.patch b/recipes/lz4/all/patches/0003-cmake-minimum-required-first-1.9.2.patch deleted file mode 100644 index 2333a27871ed9..0000000000000 --- a/recipes/lz4/all/patches/0003-cmake-minimum-required-first-1.9.2.patch +++ /dev/null @@ -1,25 +0,0 @@ ---- a/contrib/cmake_unofficial/CMakeLists.txt -+++ b/contrib/cmake_unofficial/CMakeLists.txt -@@ -9,11 +9,10 @@ - # - # LZ4's CMake support is maintained by Evan Nemerson; when filing - # bugs please mention @nemequ to make sure I see it. -+cmake_minimum_required (VERSION 2.8.6) - - set(LZ4_TOP_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../..") - --option(LZ4_BUILD_CLI "Build lz4 program" ON) --option(LZ4_BUILD_LEGACY_LZ4C "Build lz4c progam with legacy argument support" ON) - - # Parse version information - file(STRINGS "${LZ4_TOP_SOURCE_DIR}/lib/lz4.h" LZ4_VERSION_MAJOR REGEX "^#define LZ4_VERSION_MAJOR +([0-9]+) +.*$") -@@ -34,7 +33,8 @@ else() - LANGUAGES C) - endif() - --cmake_minimum_required (VERSION 2.8.6) -+option(LZ4_BUILD_CLI "Build lz4 program" ON) -+option(LZ4_BUILD_LEGACY_LZ4C "Build lz4c progam with legacy argument support" ON) - - # If LZ4 is being bundled in another project, we don't want to - # install anything. However, we want to let people override this, so diff --git a/recipes/lz4/config.yml b/recipes/lz4/config.yml index f96920e268df8..7af8322c88129 100644 --- a/recipes/lz4/config.yml +++ b/recipes/lz4/config.yml @@ -1,7 +1,7 @@ versions: + "1.10.0": + folder: all "1.9.4": folder: all "1.9.3": folder: all - "1.9.2": - folder: all diff --git a/recipes/lzham/all/conanfile.py b/recipes/lzham/all/conanfile.py index b1b9dc2a684e4..42a7472a117cb 100644 --- a/recipes/lzham/all/conanfile.py +++ b/recipes/lzham/all/conanfile.py @@ -1,12 +1,14 @@ import os from conan import ConanFile +from conan.errors import ConanInvalidConfiguration from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout from conan.tools.files import ( apply_conandata_patches, copy, export_conandata_patches, get, + replace_in_file, rmdir ) from conan.tools.microsoft import ( @@ -51,6 +53,28 @@ def configure(self): if self.options.shared: self.options.rm_safe("fPIC") + def validate(self): + if self.settings.os == "Windows" and self.settings.arch not in ["x86", "x86_64"]: + raise ConanInvalidConfiguration("On Windows, only x86 and x86_64 are supported") + + def _msvc_libs(self, targets=False): + arch = "x86" if self.settings.arch == "x86" else "x64" + suffix = f"{arch}D" if self.settings.build_type == "Debug" else arch + if self.options.shared == True: + if targets: + # Note: this causes its dependencies to be built too + return ['lzhamdll'] + + files = [f"lzham_{suffix}.dll", f"lzham_{suffix}.lib"] + else: + libs = ['lzhamcomp', 'lzhamdecomp', 'lzhamlib'] + if targets: + return libs + + files = [f"{lib}_{suffix}.lib" for lib in libs] + + return files + def layout(self): if is_msvc(self): vs_layout(self) @@ -79,10 +103,21 @@ def generate(self): # Honor BUILD_SHARED_LIBS from conan_toolchain (see # https://github.com/conan-io/conan/issues/11840) tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0077"] = "NEW" + + # Build relocatable shared libraries on Apple OSs + tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0042"] = "NEW" tc.generate() def build(self): apply_conandata_patches(self) + for project in ['lzhamcomp', 'lzhamdecomp', 'lzhamdll', 'lzhamlib']: + filename = 'lzham' if project == 'lzhamdll' else project + vcxproj_file = os.path.join(self.source_folder, project, f"{filename}.vcxproj") + # Avoid errors when the toolset on the consumer side is not exactly the same version + replace_in_file(self, vcxproj_file, "WholeProgramOptimization>true", "WholeProgramOptimization>false") + # Don't override the runtime library set by Conan's MSBuildToolchain + replace_in_file(self, vcxproj_file, "MultiThreaded", "") + replace_in_file(self, vcxproj_file, "MultiThreadedDebug", "") if is_msvc(self): msbuild = MSBuild(self) msbuild.build_type = ( @@ -91,7 +126,7 @@ def build(self): msbuild.platform = ( "Win32" if self.settings.arch == "x86" else msbuild.platform ) - msbuild.build(sln="lzham.sln") + msbuild.build(sln="lzham.sln", targets=self._msvc_libs(targets=True)) else: cmake = CMake(self) cmake.configure() @@ -106,21 +141,21 @@ def package(self): ) if is_msvc(self): - suffix = "x64D" if self.settings.build_type == "Debug" else "x64" - copy( - self, - pattern=f"lzham_{suffix}.lib", - dst=os.path.join(self.package_folder, "lib"), - src=os.path.join(self.build_folder, "lib", "x64"), - keep_path=False - ) - copy( - self, - pattern=f"lzham_{suffix}.dll", - dst=os.path.join(self.package_folder, "bin"), - src=os.path.join(self.build_folder, "bin"), - keep_path=False - ) + arch = "x86" if self.settings.arch == "x86" else "x64" + for target in self._msvc_libs(): + self.output.warning(target) + debug_suffix = "D" if self.settings.build_type == "Debug" and not self.options.shared else "" + arch_folder = f"{arch}{debug_suffix}" + subfolder = "lib" if not target.endswith('dll') else "bin" + subfolder_src = os.path.join("lib", arch_folder) if not target.endswith('dll') else "bin" + self.output.warning(subfolder_src) + copy( + self, + pattern=target, + dst=os.path.join(self.package_folder, subfolder), + src=os.path.join(self.build_folder, subfolder_src), + keep_path=False + ) copy( self, pattern="*.h", @@ -141,10 +176,8 @@ def package_info(self): self.cpp_info.system_libs.extend(["m", "pthread"]) if is_msvc(self): - lib_name = "lzham_x64" - if self.settings.build_type == "Debug": - lib_name += "D" - self.cpp_info.libs = [lib_name] + libs = list(set([filename[:-4] for filename in self._msvc_libs()])) + self.cpp_info.libs = libs else: self.cpp_info.libs = ["lzhamdll", "lzhamcomp", "lzhamdecomp"] self.cpp_info.set_property("cmake_file_name", "lzham") diff --git a/recipes/lzham/all/test_package/test_package.cpp b/recipes/lzham/all/test_package/test_package.cpp index c588215577f5f..33155f701528a 100644 --- a/recipes/lzham/all/test_package/test_package.cpp +++ b/recipes/lzham/all/test_package/test_package.cpp @@ -1,23 +1,13 @@ -#include -#include +#include +#include -#include +#include int main() { - unsigned char in[] = "Hello Conan Center!"; - unsigned char out[sizeof(in)]; + const std::string version(lzham_z_version()); - lzham_z_stream stream; - std::memset(&stream, 0, sizeof(stream)); - stream.next_in = in; - stream.avail_in = sizeof(in); - stream.next_out = out; - stream.avail_out = sizeof(out); - if (lzham_z_deflateInit(&stream, LZHAM_Z_BEST_COMPRESSION) != LZHAM_Z_OK) - return EXIT_FAILURE; + std::cout << "lzham version: " << version << std::endl; - if (lzham_z_deflate(&stream, LZHAM_Z_FULL_FLUSH) != LZHAM_Z_OK) - return EXIT_FAILURE; return EXIT_SUCCESS; } diff --git a/recipes/m4/all/test_package/conanfile.py b/recipes/m4/all/test_package/conanfile.py index 4a294edf870e7..54ca0966a46f1 100644 --- a/recipes/m4/all/test_package/conanfile.py +++ b/recipes/m4/all/test_package/conanfile.py @@ -1,8 +1,4 @@ from conan import ConanFile -from conan.tools.files import save -from io import StringIO -import os -import textwrap class TestPackageConan(ConanFile): @@ -10,28 +6,9 @@ class TestPackageConan(ConanFile): generators = "VirtualBuildEnv" test_type = "explicit" - @property - def _m4_input_path(self): - return os.path.join(self.build_folder, "input.m4") - def build_requirements(self): self.tool_requires(self.tested_reference_str) - def build(self): - save(self, self._m4_input_path, textwrap.dedent("""\ - m4_define(NAME1, `Harry, Jr.') - m4_define(NAME2, `Sally') - m4_define(MET, `$1 met $2') - MET(`NAME1', `NAME2') - """)) - def test(self): extension = ".exe" if self.settings.os == "Windows" else "" self.run(f"m4{extension} --version") - self.run(f"m4{extension} -P {self._m4_input_path}") - - self.run(f"m4{extension} -R {self.source_folder}/frozen.m4f {self.source_folder}/test.m4") - - output = StringIO() - self.run(f"m4{extension} -P {self._m4_input_path}", output) - assert "Harry, Jr. met Sally" in output.getvalue() diff --git a/recipes/m4/all/test_package/frozen.m4f b/recipes/m4/all/test_package/frozen.m4f deleted file mode 100644 index 26431a17d4fd6..0000000000000 --- a/recipes/m4/all/test_package/frozen.m4f +++ /dev/null @@ -1,11 +0,0 @@ -# This is a frozen state file generated by GNU M4 1.4.18 -V1 -Q1,1 -[] -T9,27 -say_hello[Hello ]conanize_name([$1]) -T11,203 -all_letters -  !"#*%&'()$+,./0123456789:;<=>?@[\]^_`{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ- -T13,10 -conanize_name[Conan $1] diff --git a/recipes/m4/all/test_package/test.m4 b/recipes/m4/all/test_package/test.m4 deleted file mode 100644 index a04483498966a..0000000000000 --- a/recipes/m4/all/test_package/test.m4 +++ /dev/null @@ -1,2 +0,0 @@ -say_hello([World]) -[All letters: ]all_letters diff --git a/recipes/m4/all/test_v1_package/conanfile.py b/recipes/m4/all/test_v1_package/conanfile.py deleted file mode 100644 index fdefc9766275f..0000000000000 --- a/recipes/m4/all/test_v1_package/conanfile.py +++ /dev/null @@ -1,42 +0,0 @@ -from conans import ConanFile, tools -from conans.errors import ConanException -from io import StringIO -import os -import textwrap - - -class TestPackageConan(ConanFile): - settings = "os", "arch", "compiler", "build_type" - - @property - def _m4_input_path(self): - return os.path.join(self.build_folder, "input.m4") - - def build(self): - tools.save(self._m4_input_path, textwrap.dedent("""\ - m4_define(NAME1, `Harry, Jr.') - m4_define(NAME2, `Sally') - m4_define(MET, `$1 met $2') - MET(`NAME1', `NAME2') - """)) - - def test(self): - if hasattr(self, "settings_build"): - exe_suffix = ".exe" if self.settings.os == "Windows" else "" - m4_bin = os.path.join(self.deps_cpp_info["m4"].rootpath, "bin", "m4" + exe_suffix) - else: - m4_bin = tools.get_env("M4") - if m4_bin is None or not m4_bin.startswith(self.deps_cpp_info["m4"].rootpath): - raise ConanException("M4 environment variable not set") - - if not tools.cross_building(self, skip_x64_x86=True): - self.run(f"{m4_bin} --version", run_environment=True) - self.run(f"{m4_bin} -P {self._m4_input_path}") - - test_package_dir = os.path.join(self.source_folder, os.pardir, "test_package") - self.run(f"{m4_bin} -R {test_package_dir}/frozen.m4f {test_package_dir}/test.m4", run_environment=True) - - output = StringIO() - self.run(f"{m4_bin} -P {self._m4_input_path}", output=output) - - assert "Harry, Jr. met Sally" in output.getvalue() diff --git a/recipes/magic_enum/all/conandata.yml b/recipes/magic_enum/all/conandata.yml index dd9aed1156ca9..e3dccd6201a11 100644 --- a/recipes/magic_enum/all/conandata.yml +++ b/recipes/magic_enum/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.9.6": + url: "https://github.com/Neargye/magic_enum/archive/v0.9.6.tar.gz" + sha256: "fcda8295256a2084f1f98a63b3d2c66b3d7140eea008e1ef94ea015b2f6d3034" "0.9.5": url: "https://github.com/Neargye/magic_enum/archive/v0.9.5.tar.gz" sha256: "44ad80db5a72f5047e01d90e18315751d9ac90c0ab42cbea7a6f9ec66a4cd679" diff --git a/recipes/magic_enum/all/conanfile.py b/recipes/magic_enum/all/conanfile.py index 5d4edee82bb6d..5a5f4c8dfc750 100644 --- a/recipes/magic_enum/all/conanfile.py +++ b/recipes/magic_enum/all/conanfile.py @@ -1,8 +1,8 @@ from conan import ConanFile from conan.errors import ConanInvalidConfiguration from conan.tools.build import check_min_cppstd -from conan.tools.files import copy, get -from conan.tools.layout import basic_layout +from conan.tools.files import copy, get, rmdir +from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout from conan.tools.scm import Version import os @@ -39,7 +39,7 @@ def _compilers_minimum_version(self): } def layout(self): - basic_layout(self, src_folder="src") + cmake_layout(self, src_folder="src") def package_id(self): self.info.clear() @@ -56,15 +56,29 @@ def validate(self): def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) + def generate(self): + tc = CMakeToolchain(self) + tc.cache_variables["MAGIC_ENUM_OPT_BUILD_EXAMPLES"] = False + tc.cache_variables["MAGIC_ENUM_OPT_BUILD_TESTS"] = False + tc.generate() + def build(self): - pass + cmake = CMake(self) + cmake.configure() + cmake.build() def package(self): - copy(self, "*", src=os.path.join(self.source_folder, "include"), dst=os.path.join(self.package_folder, "include")) - copy(self, "LICENSE", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) + cmake = CMake(self) + cmake.install() + if "0.9.4" <= Version(self.version) <= "0.9.6": + copy(self, "*", os.path.join(self.package_folder, "include"), os.path.join(self.package_folder, "include", "magic_enum")) + copy(self, "LICENSE", self.source_folder, os.path.join(self.package_folder, "licenses")) + rmdir(self, os.path.join(self.package_folder, "lib")) + rmdir(self, os.path.join(self.package_folder, "share")) def package_info(self): self.cpp_info.set_property("cmake_file_name", "magic_enum") self.cpp_info.set_property("cmake_target_name", "magic_enum::magic_enum") + self.cpp_info.set_property("pkg_config_name", "magic_enum") self.cpp_info.bindirs = [] self.cpp_info.libdirs = [] diff --git a/recipes/magic_enum/all/test_package/CMakeLists.txt b/recipes/magic_enum/all/test_package/CMakeLists.txt index f5917740f5800..c185d76435a4f 100644 --- a/recipes/magic_enum/all/test_package/CMakeLists.txt +++ b/recipes/magic_enum/all/test_package/CMakeLists.txt @@ -6,7 +6,3 @@ find_package(magic_enum REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) target_link_libraries(${PROJECT_NAME} PRIVATE magic_enum::magic_enum) target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) - -if(magic_enum_VERSION VERSION_GREATER_EQUAL "0.9.4") - target_compile_definitions(${PROJECT_NAME} PRIVATE MAGIC_ENUM_INCLUDE_WITH_FOLDER) -endif() diff --git a/recipes/magic_enum/all/test_package/test_package.cpp b/recipes/magic_enum/all/test_package/test_package.cpp index 208a3dd5fc806..fcb911e1f966e 100644 --- a/recipes/magic_enum/all/test_package/test_package.cpp +++ b/recipes/magic_enum/all/test_package/test_package.cpp @@ -1,8 +1,4 @@ -#ifdef MAGIC_ENUM_INCLUDE_WITH_FOLDER -# include -#else -# include -#endif +#include #include #include diff --git a/recipes/magic_enum/config.yml b/recipes/magic_enum/config.yml index 45e3b1189db90..c08b3138c2531 100644 --- a/recipes/magic_enum/config.yml +++ b/recipes/magic_enum/config.yml @@ -1,4 +1,6 @@ versions: + "0.9.6": + folder: all "0.9.5": folder: all "0.9.4": diff --git a/recipes/makefile-project-workspace-creator/all/conanfile.py b/recipes/makefile-project-workspace-creator/all/conanfile.py index c3268efeaebb0..4a70766451e93 100644 --- a/recipes/makefile-project-workspace-creator/all/conanfile.py +++ b/recipes/makefile-project-workspace-creator/all/conanfile.py @@ -1,37 +1,51 @@ import os -from conans import ConanFile, tools + +from conan import ConanFile +from conan.tools.files import copy, get +from conan.tools.layout import basic_layout + +required_conan_version = ">=1.53.0" class MPCGeneratorConan(ConanFile): name = "makefile-project-workspace-creator" description = "The Makefile, Project and Workspace Creator" license = "BSD-3-Clause" - homepage = "https://objectcomputing.com/" url = "https://github.com/conan-io/conan-center-index" - topics = ("conan", "makefile-project-workspace-creator", "objectcomputing", "installer") - settings = "os" + homepage = "https://github.com/objectcomputing/MPC" + topics = ("objectcomputing", "installer") - @property - def _source_subfolder(self): - return "source_subfolder" + package_type = "build-scripts" + settings = "os", "arch", "compiler", "build_type" - def requirements(self): - if self.settings.os == "Windows": - self.requires("strawberryperl/5.30.0.1") + def layout(self): + basic_layout(self, src_folder="src") - def build(self): - pass + def package_id(self): + self.info.clear() - def source(self): - tools.get(**self.conan_data["sources"][self.version]) - os.rename("MPC-MPC_" + self.version.replace(".", "_"), self._source_subfolder) + def build(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) def package(self): - self.copy(pattern="*", src=self._source_subfolder, dst="bin") - self.copy(pattern="LICENSE", src=os.path.join(self._source_subfolder, "docs"), dst="licenses") + copy(self, "*", + src=self.build_folder, + dst=os.path.join(self.package_folder, "bin"), + excludes=["history", "docs", "rpm", "MPC.ico", "PROBLEM-REPORT-FORM", "azure-pipelines.yml", "ChangeLog"]) + copy(self, "LICENSE", + src=os.path.join(self.build_folder, "docs"), + dst=os.path.join(self.package_folder, "licenses")) def package_info(self): + self.cpp_info.frameworkdirs = [] + self.cpp_info.libdirs = [] + self.cpp_info.resdirs = [] + self.cpp_info.includedirs = [] + bin_path = os.path.join(self.package_folder, "bin") - self.output.info('Appending PATH environment variable: %s' % bin_path) + # MPC_ROOT: https://github.com/objectcomputing/MPC/blob/5b4c2443871e5e9b6267edef17fed66afc125fa4/docs/USAGE#L243 + self.buildenv_info.define("MPC_ROOT", bin_path) + + # TODO: Remove after dropping Conan 1.x self.env_info.PATH.append(bin_path) self.env_info.MPC_ROOT = bin_path diff --git a/recipes/makefile-project-workspace-creator/all/test_package/conanfile.py b/recipes/makefile-project-workspace-creator/all/test_package/conanfile.py index d02d604b53d44..a57997b529e79 100644 --- a/recipes/makefile-project-workspace-creator/all/test_package/conanfile.py +++ b/recipes/makefile-project-workspace-creator/all/test_package/conanfile.py @@ -1,12 +1,25 @@ -from conans import ConanFile, tools +from conan import ConanFile +from conan.tools.layout import basic_layout +from conan.tools.files import save, load +import os -class DefaultNameConan(ConanFile): - settings = "os" +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "VirtualBuildEnv", "VirtualRunEnv" + test_type = "explicit" - def build(self): - pass + def layout(self): + basic_layout(self) + + def requirements(self): + self.requires(self.tested_reference_str) + + def generate(self): + build_vars = self.dependencies[self.tested_reference_str].buildenv_info.vars(self, scope="build") + mpc_root = build_vars["MPC_ROOT"] + save(self, os.path.join(self.build_folder, "mpc_root.txt"), mpc_root) def test(self): - if not tools.cross_building(self.settings): - self.run("perl -S mpc.pl --version", run_environment=True) + mpc_root = load(self, os.path.join(self.build_folder, "mpc_root.txt")) + assert os.path.exists(os.path.join(mpc_root, 'mpc.pl')) diff --git a/recipes/manif/all/conandata.yml b/recipes/manif/all/conandata.yml new file mode 100644 index 0000000000000..5d0f0b0b2a6f2 --- /dev/null +++ b/recipes/manif/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "0.0.5": + url: "https://github.com/artivis/manif/archive/refs/tags/0.0.5.tar.gz" + sha256: "246a781c54a5c57179d48096faca0d108944e120f69d8fd7fb69e3cb4a0a67fb" diff --git a/recipes/manif/all/conanfile.py b/recipes/manif/all/conanfile.py new file mode 100644 index 0000000000000..f0f62f808f152 --- /dev/null +++ b/recipes/manif/all/conanfile.py @@ -0,0 +1,66 @@ +import os + +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.build import check_min_cppstd +from conan.tools.files import copy, get +from conan.tools.layout import basic_layout +from conan.tools.scm import Version + +required_conan_version = ">=1.52.0" + + +class PackageConan(ConanFile): + name = "manif" + description = "A small C++11 header-only library for Lie theory" + license = "MIT" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://artivis.github.io/manif" + topics = ("lie-groups", "state-estimation", "geometry", "robotics", "computer-vision", "header-only") + + package_type = "header-library" + settings = "os", "arch", "compiler", "build_type" + no_copy_source = True + + @property + def _min_cppstd(self): + return 11 + + @property + def _compilers_minimum_version(self): + return { + "gcc": "6", + } + + def layout(self): + basic_layout(self, src_folder="src") + + def requirements(self): + self.requires("eigen/3.4.0") + self.requires("tl-optional/1.1.0") + + def package_id(self): + self.info.clear() + + def validate(self): + if self.settings.compiler.cppstd: + check_min_cppstd(self, self._min_cppstd) + minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) + if minimum_version and Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration( + f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." + ) + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def package(self): + copy(self, "LICENSE", self.source_folder, os.path.join(self.package_folder, "licenses")) + copy(self, "*.h", os.path.join(self.source_folder, "include"), os.path.join(self.package_folder, "include")) + + def package_info(self): + self.cpp_info.set_property("cmake_file_name", "manif") + self.cpp_info.set_property("cmake_target_name", "MANIF::manif") + + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] diff --git a/recipes/manif/all/test_package/CMakeLists.txt b/recipes/manif/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..84ba50bb17606 --- /dev/null +++ b/recipes/manif/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) + +find_package(manif REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE MANIF::manif) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) diff --git a/recipes/manif/all/test_package/conanfile.py b/recipes/manif/all/test_package/conanfile.py new file mode 100644 index 0000000000000..3a91c9439218e --- /dev/null +++ b/recipes/manif/all/test_package/conanfile.py @@ -0,0 +1,26 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def layout(self): + cmake_layout(self) + + def requirements(self): + self.requires(self.tested_reference_str) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/manif/all/test_package/test_package.cpp b/recipes/manif/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..c82dc520226c0 --- /dev/null +++ b/recipes/manif/all/test_package/test_package.cpp @@ -0,0 +1,10 @@ +#include + +using namespace manif; + +int main() { + SE3d X = SE3d::Random(); + SE3Tangentd w = SE3Tangentd::Random(); + SE3d::Jacobian J_o_x, J_o_w; + auto X_plus_w = X.plus(w, J_o_x, J_o_w); +} diff --git a/recipes/manif/config.yml b/recipes/manif/config.yml new file mode 100644 index 0000000000000..6506e357707be --- /dev/null +++ b/recipes/manif/config.yml @@ -0,0 +1,3 @@ +versions: + "0.0.5": + folder: all diff --git a/recipes/mariadb-connector-c/all/conandata.yml b/recipes/mariadb-connector-c/all/conandata.yml index df3894df1372a..599405bd8a89f 100644 --- a/recipes/mariadb-connector-c/all/conandata.yml +++ b/recipes/mariadb-connector-c/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "3.3.8": + url: "https://downloads.mariadb.com/Connectors/c/connector-c-3.3.8/mariadb-connector-c-3.3.8-src.tar.gz" + sha256: "f9f076b4aa9fb22cc94b24f82c80f9ef063805ecd6533a2eb5d5060cf93833e8" "3.3.3": url: "https://downloads.mariadb.com/Connectors/c/connector-c-3.3.3/mariadb-connector-c-3.3.3-src.tar.gz" sha256: "d77630e2376fe08185b5354621c877b0a203a6b186a0694574d37b764aeb2874" @@ -12,16 +15,17 @@ sources: url: "https://downloads.mariadb.com/Connectors/c/connector-c-3.1.11/mariadb-connector-c-3.1.11-src.tar.gz" sha256: "3e6f6c399493fe90efdc21a3fe70c30434b7480e8195642a959f1dd7a0fa5b0f" patches: - "3.3.3": - - patch_file: "patches/3.3.3-0002-find-package-zstd.patch" - patch_description: "Use ZSTD cmake file from Conan" + "3.3.8": + - patch_file: "patches/3.3.8-0001-fix-install-and-static-or-shared.patch" + patch_description: "fix install path, separate static/shared build" patch_type: "conan" + - patch_file: "patches/3.1.11-0004-include-mysqld_error-header.patch" + patch_description: "always include mysqld_error.h" + patch_type: "portability" + "3.3.3": - patch_file: "patches/3.3.3-0001-fix-install-and-static-or-shared.patch" patch_description: "fix install path, separate static/shared build" patch_type: "conan" - - patch_file: "patches/3.1.19-0002-remove-wx-flag.patch" - patch_description: "remove WX flags in MSVC" - patch_type: "conan" - patch_file: "patches/3.1.11-0003-include-order-windows-winsock2.patch" patch_description: "fix include order for windows winsock2" patch_type: "portability" @@ -32,9 +36,6 @@ patches: - patch_file: "patches/3.1.19-0001-fix-install-and-static-or-shared.patch" patch_description: "fix install path, separate static/shared build" patch_type: "conan" - - patch_file: "patches/3.1.19-0002-remove-wx-flag.patch" - patch_description: "remove WX flags in MSVC" - patch_type: "conan" - patch_file: "patches/3.1.11-0003-include-order-windows-winsock2.patch" patch_description: "fix include order for windows winsock2" patch_type: "portability" diff --git a/recipes/mariadb-connector-c/all/conanfile.py b/recipes/mariadb-connector-c/all/conanfile.py index 576fa5d4f935e..28811d8017067 100644 --- a/recipes/mariadb-connector-c/all/conanfile.py +++ b/recipes/mariadb-connector-c/all/conanfile.py @@ -92,6 +92,7 @@ def generate(self): tc.variables["INSTALL_BINDIR"] = "bin" tc.variables["INSTALL_LIBDIR"] = "lib" tc.variables["INSTALL_PLUGINDIR"] = os.path.join("lib", "plugin").replace("\\", "/") + tc.variables["ZLIB_LIBRARY"] = "ZLIB::ZLIB" # To install relocatable shared libs on Macos tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0042"] = "NEW" tc.generate() @@ -104,7 +105,7 @@ def _patch_sources(self): apply_conandata_patches(self) root_cmake = os.path.join(self.source_folder, "CMakeLists.txt") - replace_in_file(self, root_cmake, "${ZLIB_LIBRARY}", "${ZLIB_LIBRARIES}") + libmariadb_cmake = os.path.join(self.source_folder, "libmariadb", "CMakeLists.txt") replace_in_file(self, root_cmake, "SET(SSL_LIBRARIES ${OPENSSL_SSL_LIBRARY} ${OPENSSL_CRYPTO_LIBRARY})", @@ -113,6 +114,14 @@ def _patch_sources(self): replace_in_file(self, root_cmake, "${CURL_LIBRARIES}", "CURL::libcurl") plugins_io_cmake = os.path.join(self.source_folder, "plugins", "io", "CMakeLists.txt") replace_in_file(self, plugins_io_cmake, "${CURL_LIBRARIES}", "CURL::libcurl") + if Version(self.version) >= "3.3.6": + replace_in_file(self, root_cmake, "${WARNING_AS_ERROR}", "") + elif Version(self.version) >= "3.1.18": + replace_in_file(self, root_cmake, " -WX", "") + if Version(self.version) >= "3.3": + replace_in_file(self, root_cmake, + "INCLUDE(${CC_SOURCE_DIR}/cmake/FindZStd.cmake)", + "find_package(ZSTD REQUIRED CONFIG)") def build(self): self._patch_sources() diff --git a/recipes/mariadb-connector-c/all/patches/3.1.19-0002-remove-wx-flag.patch b/recipes/mariadb-connector-c/all/patches/3.1.19-0002-remove-wx-flag.patch deleted file mode 100644 index 4dde44415f18b..0000000000000 --- a/recipes/mariadb-connector-c/all/patches/3.1.19-0002-remove-wx-flag.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index f3b6cbd..f3e8993 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -100,7 +100,7 @@ IF(MSVC) - ADD_DEFINITIONS(-DWIN32_LEAN_AND_MEAN) - IF (MSVC) - # Treat warnings as errors -- SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -WX") -+ # SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -WX") - SET(CONFIG_TYPES "DEBUG" "RELEASE" "RELWITHDEBINFO") - FOREACH(BUILD_TYPE ${CONFIG_TYPES}) - FOREACH(COMPILER CXX C) diff --git a/recipes/mariadb-connector-c/all/patches/3.3.3-0001-fix-install-and-static-or-shared.patch b/recipes/mariadb-connector-c/all/patches/3.3.3-0001-fix-install-and-static-or-shared.patch index 8a6f9ad7f1f55..31844dd32529b 100644 --- a/recipes/mariadb-connector-c/all/patches/3.3.3-0001-fix-install-and-static-or-shared.patch +++ b/recipes/mariadb-connector-c/all/patches/3.3.3-0001-fix-install-and-static-or-shared.patch @@ -2,15 +2,6 @@ diff --git a/libmariadb/CMakeLists.txt b/libmariadb/CMakeLists.txt index 070fdc9..77584e6 100644 --- a/libmariadb/CMakeLists.txt +++ b/libmariadb/CMakeLists.txt -@@ -288,7 +288,7 @@ SET(MARIADB_NONBLOCK_SYMBOLS - - # handle static plugins - SET(LIBMARIADB_SOURCES ${LIBMARIADB_SOURCES} ${LIBMARIADB_PLUGIN_SOURCES}) --SET(SYSTEM_LIBS ${SYSTEM_LIBS} ${LIBMARIADB_PLUGIN_LIBS} ${ZSTD_LIBRARY} ${ZLIB_LIBRARY}) -+SET(SYSTEM_LIBS ${SYSTEM_LIBS} ${LIBMARIADB_PLUGIN_LIBS} ${ZSTD_LIBRARY} ZLIB::ZLIB) - MESSAGE(STATUS "SYSTEM_LIBS: ${SYSTEM_LIBS}") - INCLUDE_DIRECTORIES(${LIBMARIADB_PLUGIN_INCLUDES}) - ADD_DEFINITIONS(${LIBMARIADB_PLUGIN_DEFS}) @@ -404,7 +404,7 @@ ELSE() ENDIF() diff --git a/recipes/mariadb-connector-c/all/patches/3.3.3-0002-find-package-zstd.patch b/recipes/mariadb-connector-c/all/patches/3.3.3-0002-find-package-zstd.patch deleted file mode 100644 index 19168ffa68018..0000000000000 --- a/recipes/mariadb-connector-c/all/patches/3.3.3-0002-find-package-zstd.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index f3b6cbd..5a60394 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -221,7 +221,7 @@ INCLUDE(${CC_SOURCE_DIR}/cmake/SearchLibrary.cmake) - - # Compression plugins: ZSTD, ZLIB - --INCLUDE(${CC_SOURCE_DIR}/cmake/FindZStd.cmake) -+find_package(ZSTD REQUIRED CONFIG) - - IF(WITH_EXTERNAL_ZLIB) - IF(NOT ZLIB_FOUND) diff --git a/recipes/mariadb-connector-c/all/patches/3.3.8-0001-fix-install-and-static-or-shared.patch b/recipes/mariadb-connector-c/all/patches/3.3.8-0001-fix-install-and-static-or-shared.patch new file mode 100644 index 0000000000000..0dfadf76c0436 --- /dev/null +++ b/recipes/mariadb-connector-c/all/patches/3.3.8-0001-fix-install-and-static-or-shared.patch @@ -0,0 +1,117 @@ +--- libmariadb/CMakeLists.txt ++++ libmariadb/CMakeLists.txt +@@ -414,7 +414,7 @@ + ENDIF() + + +-IF(CMAKE_VERSION VERSION_GREATER 2.8.7) ++IF(FALSE) + # CREATE OBJECT LIBRARY + ADD_LIBRARY(mariadb_obj OBJECT ${LIBMARIADB_SOURCES}) + IF(UNIX) +@@ -443,21 +443,24 @@ + "FILE_DESCRIPTION:Dynamic lib for client/server communication") + ENDIF() + ++IF(NOT BUILD_SHARED_LIBS) + ADD_LIBRARY(mariadbclient STATIC ${MARIADB_OBJECTS} ${EMPTY_FILE}) + TARGET_LINK_LIBRARIES(mariadbclient ${SYSTEM_LIBS} ${CRYPTO_LIBS}) +- ++ELSE() + IF(UNIX) + ADD_LIBRARY(libmariadb SHARED ${libmariadb_RC} ${MARIADB_OBJECTS} ${EMPTY_FILE}) + SET_TARGET_PROPERTIES(libmariadb PROPERTIES COMPILE_FLAGS "${CMAKE_SHARED_LIBRARY_C_FLAGS}") + ELSE() +- ADD_LIBRARY(libmariadb SHARED ${libmariadb_RC} ${MARIADB_OBJECTS} mariadbclient.def) ++ ADD_LIBRARY(libmariadb SHARED ${libmariadb_RC} ${MARIADB_OBJECTS} ${EMPTY_FILE} mariadbclient.def) + SET_TARGET_PROPERTIES(libmariadb PROPERTIES LINKER_LANGUAGE C) + ENDIF() + + TARGET_LINK_LIBRARIES(libmariadb LINK_PRIVATE ${SYSTEM_LIBS} ${CRYPTO_LIBS}) + + SIGN_TARGET(libmariadb) +- ++ENDIF() ++ ++IF(BUILD_SHARED_LIBS) + IF(CMAKE_SYSTEM_NAME MATCHES "Linux" OR + CMAKE_SYSTEM_NAME MATCHES "kFreeBSD" OR + CMAKE_SYSTEM_NAME MATCHES "GNU") +@@ -466,11 +469,14 @@ + ENDIF() + SET_TARGET_PROPERTIES(libmariadb PROPERTIES LINK_FLAGS "${CC_BINARY_DIR}/libmariadb/mariadbclient.def") + ENDIF() +- ++ELSE() + SET_TARGET_PROPERTIES(mariadbclient PROPERTIES IMPORTED_INTERFACE_LINK_LIBRARIES "${SYSTEM_LIBS}") ++ENDIF() ++IF(BUILD_SHARED_LIBS) + SET_TARGET_PROPERTIES(libmariadb PROPERTIES IMPORTED_INTERFACE_LINK_LIBRARIES "${SYSTEM_LIBS}") + + SET_TARGET_PROPERTIES(libmariadb PROPERTIES PREFIX "") ++ENDIF() + + # + # Installation +@@ -490,11 +496,15 @@ + ENDIF() + ENDIF() + ++IF(NOT BUILD_SHARED_LIBS) + create_symlink(libmariadb${CMAKE_STATIC_LIBRARY_SUFFIX} mariadbclient ${INSTALL_LIBDIR}) +- ++ENDIF() ++ ++IF(BUILD_SHARED_LIBS) + SET_TARGET_PROPERTIES(libmariadb PROPERTIES VERSION + ${CPACK_PACKAGE_VERSION_MAJOR} + SOVERSION ${CPACK_PACKAGE_VERSION_MAJOR}) ++ELSE() + + IF(NOT WIN32) + SET_TARGET_PROPERTIES(mariadbclient PROPERTIES OUTPUT_NAME "${LIBMARIADB_STATIC_NAME}") +@@ -502,20 +512,33 @@ + + INSTALL(TARGETS mariadbclient + COMPONENT Development +- DESTINATION ${INSTALL_LIBDIR}) ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} ++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) ++ENDIF() ++ ++IF(BUILD_SHARED_LIBS) + IF(WIN32) + INSTALL(TARGETS libmariadb + COMPONENT SharedLibraries +- DESTINATION ${INSTALL_LIBDIR}) ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} ++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) + ELSE() + # in cmake 3.12+ we can use + #INSTALL(TARGETS libmariadb LIBRARY DESTINATION ${INSTALL_LIBDIR} + # COMPONENT SharedLibraries NAMELINK_COMPONENT Development) + # but as long as we build on CentOS 7 with its cmake 2.8.12.2 we have to use +-INSTALL(TARGETS libmariadb LIBRARY DESTINATION ${INSTALL_LIBDIR} +- COMPONENT SharedLibraries NAMELINK_SKIP) +-INSTALL(TARGETS libmariadb LIBRARY DESTINATION ${INSTALL_LIBDIR} +- COMPONENT Development NAMELINK_ONLY) ++INSTALL(TARGETS libmariadb LIBRARY ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} ++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ COMPONENT SharedLibraries) ++INSTALL(TARGETS libmariadb LIBRARY ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} ++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ COMPONENT Development) + ENDIF() + + IF(MSVC) +@@ -524,3 +547,4 @@ + CONFIGURATIONS Debug RelWithDebInfo + COMPONENT Development) + ENDIF() ++ENDIF() diff --git a/recipes/mariadb-connector-c/config.yml b/recipes/mariadb-connector-c/config.yml index c4757604b999d..4b9cbb0316174 100644 --- a/recipes/mariadb-connector-c/config.yml +++ b/recipes/mariadb-connector-c/config.yml @@ -1,4 +1,6 @@ versions: + "3.3.8": + folder: all "3.3.3": folder: all "3.1.19": diff --git a/recipes/materialx/all/conandata.yml b/recipes/materialx/all/conandata.yml new file mode 100644 index 0000000000000..f0f8336613f73 --- /dev/null +++ b/recipes/materialx/all/conandata.yml @@ -0,0 +1,7 @@ +sources: + "1.39.1": + url: "https://github.com/AcademySoftwareFoundation/MaterialX/archive/refs/tags/v1.39.1.tar.gz" + sha256: "a392fd0aa372bbea7a6f27d20160829ec9380a801976ff467949a90e6555258d" + "1.38.10": + url: "https://github.com/AcademySoftwareFoundation/MaterialX/archive/refs/tags/v1.38.10.tar.gz" + sha256: "706f44100188bc283a135ad24b348e55b405ac9e70cb64b7457c381383cc2887" diff --git a/recipes/materialx/all/conanfile.py b/recipes/materialx/all/conanfile.py new file mode 100644 index 0000000000000..910d0145067ce --- /dev/null +++ b/recipes/materialx/all/conanfile.py @@ -0,0 +1,203 @@ +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.build import check_min_cppstd +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.files import copy, export_conandata_patches, get, rm, rmdir, replace_in_file +from conan.tools.apple import is_apple_os +from conan.tools.scm import Version +import os + +required_conan_version = ">=1.53.0" + +class MaterialXConan(ConanFile): + name = "materialx" + description = "MaterialX is an open standard for the exchange of rich material and look-development content across applications and renderers." + license = "Apache-2.0" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/AcademySoftwareFoundation/MaterialX" + topics = ("vfx", "3d", "graphics", "aswf") + package_type = "library" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + "with_openimageio": [True, False], + "build_gen_msl": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + "with_openimageio": False, + "build_gen_msl": True + } + + short_paths = True + + @property + def _min_cppstd(self): + if Version(self.version) >= "1.39.0": + return 17 + else: + return 14 + + @property + def _compilers_minimum_version(self): + return { + "apple-clang": "10", + "clang": "7", + "gcc": "7", + "msvc": "191", + "Visual Studio": "15", + } + + def export_sources(self): + export_conandata_patches(self) + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + + def layout(self): + cmake_layout(self, src_folder="src") + + def requirements(self): + if self.options.with_openimageio: + self.requires("openimageio/2.5.14.0") + if self.settings.os in ["Linux", "FreeBSD"]: + self.requires("xorg/system") + self.requires("opengl/system") + + def validate(self): + # validate the minimum cpp standard supported. For C++ projects only + if self.settings.compiler.cppstd: + check_min_cppstd(self, self._min_cppstd) + minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) + if minimum_version and Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration( + f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." + ) + + def build_requirements(self): + self.tool_requires("cmake/[>=3.24 <4]") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + tc.variables["MATERIALX_BUILD_TESTS"] = False + tc.variables["MATERIALX_TEST_RENDER"] = False + tc.variables["MATERIALX_BUILD_SHARED_LIBS"] = self.options.shared + tc.variables["MATERIALX_BUILD_GEN_MSL"] = self.options.build_gen_msl and is_apple_os + # TODO: Remove when Conan 1 support is dropped + if not self.settings.compiler.cppstd: + tc.variables["MATERIALX_BUILD_USE_CCACHE"] = self._min_cppstd + tc.variables["MATERIALX_BUILD_USE_CCACHE"] = False + tc.generate() + + tc = CMakeDeps(self) + tc.generate() + + def _patch_sources(self): + replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), + "set(CMAKE_CXX_STANDARD", + "# set(CMAKE_CXX_STANDARD") + replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), + "set(CMAKE_POSITION_INDEPENDENT_CODE", + "# set(CMAKE_POSITION_INDEPENDENT_CODE") + + def build(self): + + cmake = CMake(self) + cmake.configure() + cmake.build() + + def package(self): + copy(self, "LICENSE", self.source_folder, os.path.join(self.package_folder, "licenses")) + cmake = CMake(self) + cmake.install() + + rmdir(self, os.path.join(self.package_folder, "resources")) + rmdir(self, os.path.join(self.package_folder, "libraries")) + rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) + rm(self, "README.md", self.package_folder) + rm(self, "CHANGELOG.md", self.package_folder) + rm(self, "THIRD-PARTY.md", self.package_folder) + rm(self, "LICENSE", self.package_folder) + rm(self, "*.la", os.path.join(self.package_folder, "lib")) + rm(self, "*.pdb", os.path.join(self.package_folder, "lib")) + rm(self, "*.pdb", os.path.join(self.package_folder, "bin")) + + def package_info(self): + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.system_libs.append("m") + self.cpp_info.system_libs.append("dl") + + self.cpp_info.components["MaterialXCore"].libs = ["MaterialXCore"] + + self.cpp_info.components["MaterialXFormat"].libs = ["MaterialXFormat"] + self.cpp_info.components["MaterialXFormat"].requires = ["MaterialXCore"] + + self.cpp_info.components["MaterialXGenGlsl"].libs = ["MaterialXGenGlsl"] + self.cpp_info.components["MaterialXGenGlsl"].requires = ["MaterialXCore", "MaterialXGenShader"] + + self.cpp_info.components["MaterialXGenMdl"].libs = ["MaterialXGenMdl"] + self.cpp_info.components["MaterialXGenMdl"].requires = ["MaterialXCore", "MaterialXGenShader"] + + self.cpp_info.components["MaterialXGenMsl"].libs = ["MaterialXGenMsl"] + self.cpp_info.components["MaterialXGenMsl"].requires = ["MaterialXCore", "MaterialXGenShader"] + + self.cpp_info.components["MaterialXGenOsl"].libs = ["MaterialXGenOsl"] + self.cpp_info.components["MaterialXGenOsl"].requires = ["MaterialXCore", "MaterialXGenShader"] + + self.cpp_info.components["MaterialXGenShader"].libs = ["MaterialXGenShader"] + self.cpp_info.components["MaterialXGenShader"].requires = ["MaterialXCore", "MaterialXFormat"] + + self.cpp_info.components["MaterialXRender"].libs = ["MaterialXRender"] + self.cpp_info.components["MaterialXRender"].requires = ["MaterialXGenShader"] + if self.options.with_openimageio: + self.cpp_info.components["MaterialXRender"].requires.append("openimageio::openimageio") + + self.cpp_info.components["MaterialXRenderGlsl"].libs = ["MaterialXRenderGlsl"] + self.cpp_info.components["MaterialXRenderGlsl"].requires = ["MaterialXRenderHw", "MaterialXGenGlsl"] + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.components["MaterialXRenderGlsl"].requires.append("opengl::opengl") + elif self.settings.os in ["Macos", "iOS"]: + self.cpp_info.frameworks.extend(["Foundation", "Cocoa", "OpenGL"]) + if self.settings.os == "Macos": + self.cpp_info.includedirs.extend(["include/compat/osx"]) + else: + self.cpp_info.includedirs.extend(["include/compat/ios"]) + elif self.settings.os == "Windows": + self.cpp_info.system_libs.append("opengl32") + + self.cpp_info.components["MaterialXRenderHw"].libs = ["MaterialXRenderHw"] + self.cpp_info.components["MaterialXRenderHw"].requires = ["MaterialXRender"] + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.components["MaterialXRenderHw"].requires.append("xorg::xorg") + elif self.settings.os in ["Macos", "iOS"]: + self.cpp_info.frameworks.extend(["Foundation", "Cocoa", "AppKit", "Metal"]) + if self.settings.os == "Macos": + self.cpp_info.includedirs.extend(["include/compat/osx"]) + else: + self.cpp_info.includedirs.extend(["include/compat/ios"]) + + self.cpp_info.components["MaterialXRenderOsl"].libs = ["MaterialXRenderOsl"] + self.cpp_info.components["MaterialXRenderOsl"].requires = ["MaterialXRender"] + + if self.options.build_gen_msl: + self.cpp_info.components["MaterialXGenMsl"].libs = ["MaterialXGenMsl"] + self.cpp_info.components["MaterialXGenMsl"].requires = ["MaterialXCore", "MaterialXGenShader"] + + if self.options.build_gen_msl and self.settings.os == "Macos": + self.cpp_info.components["MaterialXRenderMsl"].libs = ["MaterialXRenderMsl"] + self.cpp_info.components["MaterialXRenderMsl"].requires = ["MaterialXRenderHw", "MaterialXGenMsl"] + self.cpp_info.frameworks.extend(["CoreFoundation", "OpenGL", "AppKit", "Metal"]) + if self.settings.os == "Macos": + self.cpp_info.includedirs.extend(["include/compat/osx"]) + else: + self.cpp_info.includedirs.extend(["include/compat/ios"]) diff --git a/recipes/materialx/all/test_package/CMakeLists.txt b/recipes/materialx/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..54a09a6c2e591 --- /dev/null +++ b/recipes/materialx/all/test_package/CMakeLists.txt @@ -0,0 +1,9 @@ +cmake_minimum_required(VERSION 3.15) + +project(test_package LANGUAGES CXX) # if the project uses c++ + +find_package(materialx REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE materialx::MaterialXCore materialx::MaterialXFormat) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_14) diff --git a/recipes/materialx/all/test_package/conanfile.py b/recipes/materialx/all/test_package/conanfile.py new file mode 100644 index 0000000000000..311e7c4a81341 --- /dev/null +++ b/recipes/materialx/all/test_package/conanfile.py @@ -0,0 +1,25 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake +import os + +class TestMaterialXConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/materialx/all/test_package/test_package.cpp b/recipes/materialx/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..f7a9e7cefee90 --- /dev/null +++ b/recipes/materialx/all/test_package/test_package.cpp @@ -0,0 +1,42 @@ +#include + +#include +#include +#include +#include +#include + +namespace mx = MaterialX; + +int main(void) { + + mx::DocumentPtr doc = mx::createDocument(); + + // Create a base shader nodedef. + mx::NodeDefPtr simpleSrf = doc->addNodeDef("ND_simpleSrf", mx::SURFACE_SHADER_TYPE_STRING, "simpleSrf"); + simpleSrf->setInputValue("diffColor", mx::Color3(1.0f)); + simpleSrf->setInputValue("specColor", mx::Color3(0.0f)); + simpleSrf->setInputValue("roughness", 0.25f); + simpleSrf->setTokenValue("texId", "01"); + + // Create an inherited shader nodedef. + mx::NodeDefPtr anisoSrf = doc->addNodeDef("ND_anisoSrf", mx::SURFACE_SHADER_TYPE_STRING, "anisoSrf"); + anisoSrf->setInheritsFrom(simpleSrf); + anisoSrf->setInputValue("anisotropy", 0.0f); + + // Instantiate shader and material nodes. + mx::NodePtr shaderNode = doc->addNode(anisoSrf->getNodeString(), "", anisoSrf->getType()); + mx::NodePtr materialNode = doc->addMaterialNode("", shaderNode); + + // Set nodedef and shader node qualifiers. + shaderNode->setVersionString("2.0"); + anisoSrf->setVersionString("2"); + shaderNode->setVersionString("2"); + shaderNode->setType(mx::VOLUME_SHADER_TYPE_STRING); + shaderNode->setType(mx::SURFACE_SHADER_TYPE_STRING); + + // Bind a shader input to a value. + mx::InputPtr instanceSpecColor = shaderNode->setInputValue("specColor", mx::Color3(1.0f)); + + return EXIT_SUCCESS; +} diff --git a/recipes/materialx/config.yml b/recipes/materialx/config.yml new file mode 100644 index 0000000000000..a0bedf2527f55 --- /dev/null +++ b/recipes/materialx/config.yml @@ -0,0 +1,5 @@ +versions: + "1.39.1": + folder: all + "1.38.10": + folder: all diff --git a/recipes/mathter/1.x.x/conandata.yml b/recipes/mathter/1.x.x/conandata.yml new file mode 100644 index 0000000000000..f12b02f2c9224 --- /dev/null +++ b/recipes/mathter/1.x.x/conandata.yml @@ -0,0 +1,13 @@ +sources: + "1.1.1": + url: "https://github.com/petiaccja/Mathter/archive/v1.1.1.tar.gz" + sha256: "510e6aa198cd7b207a44d319e4471021f207cba8c4d2d7e40086f1f042fe13ab" + "1.1.0": + url: "https://github.com/petiaccja/Mathter/archive/v1.1.0.tar.gz" + sha256: "a9a82126ecd80112854098a5646d38f72f0af03e9655b28ab8fa38b4c03b0870" + "1.0.1": + url: "https://github.com/petiaccja/Mathter/archive/v1.0.1.tar.gz" + sha256: "ab90736abfa8774103b53fe2b8962981c5f117dc582b01698c18d66cd2398b8c" + "1.0.0": + url: "https://github.com/petiaccja/Mathter/archive/v1.0.0.tar.gz" + sha256: "c75cca8d8aec627935250908f2c0f9f1839561e7596a4199bcf80e12b0e6c53b" diff --git a/recipes/mathter/1.x.x/conanfile.py b/recipes/mathter/1.x.x/conanfile.py new file mode 100644 index 0000000000000..82cdb44fbd38a --- /dev/null +++ b/recipes/mathter/1.x.x/conanfile.py @@ -0,0 +1,84 @@ +import os + +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.build import check_min_cppstd +from conan.tools.files import copy, get +from conan.tools.layout import basic_layout +from conan.tools.scm import Version + +required_conan_version = ">=1.52.0" + + +class MathterConan(ConanFile): + name = "mathter" + description = "Powerful 3D math and small-matrix linear algebra library for games and science." + license = "MIT" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/petiaccja/Mathter" + topics = ("game-dev", "linear-algebra", "vector-math", "matrix-library", "header-only") + + package_type = "header-library" + settings = "os", "arch", "compiler", "build_type" + options = { + "with_xsimd": [True, False] # XSimd is optionally used for hand-rolled vectorization. + } + default_options = { + "with_xsimd": True + } + no_copy_source = True + + @property + def _min_cppstd(self): + return 17 + + @property + def _compilers_minimum_version(self): + return { + "apple-clang": 10, + "clang": 6, + "gcc": 7, + "Visual Studio": 16, + } + + def config_options(self): + if Version(self.version) < "1.1": + del self.options.with_xsimd + + def layout(self): + basic_layout(self, src_folder="src") + + def package_id(self): + self.info.clear() + + def validate(self): + if self.settings.compiler.cppstd: + check_min_cppstd(self, self._min_cppstd) + + minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) + if minimum_version and Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration(f"{self.name} requires C++{self._min_cppstd}, " + "which your compiler does not support.") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def requirements(self): + if self.options.get_safe("with_xsimd"): + self.requires("xsimd/11.1.0") + + def package(self): + if self.version == "1.0.0": + copy(self, "LICENCE", self.source_folder, os.path.join(self.package_folder, "licenses")) + include_dir = os.path.join(self.source_folder, "Mathter") + else: + copy(self, "LICENCE.md", self.source_folder, os.path.join(self.package_folder, "licenses")) + include_dir = os.path.join(self.source_folder, "include", "Mathter") + copy(self, "*.hpp", include_dir, os.path.join(self.package_folder, "include", "Mathter")) + copy(self, "*.natvis", include_dir, os.path.join(self.package_folder, "include", "Mathter")) + + def package_info(self): + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] + if self.options.get_safe("with_xsimd"): + self.cpp_info.defines = ["MATHTER_USE_XSIMD=1"] diff --git a/recipes/mathter/1.x.x/test_package/CMakeLists.txt b/recipes/mathter/1.x.x/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..e6eb2612386c1 --- /dev/null +++ b/recipes/mathter/1.x.x/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(TestPackage CXX) + +find_package(mathter REQUIRED CONFIG) + +add_executable(test_package test_package.cpp) +target_link_libraries(test_package PRIVATE mathter::mathter) +target_compile_features(test_package PRIVATE cxx_std_17) diff --git a/recipes/mathter/1.x.x/test_package/conanfile.py b/recipes/mathter/1.x.x/test_package/conanfile.py new file mode 100644 index 0000000000000..fae501d0afb9e --- /dev/null +++ b/recipes/mathter/1.x.x/test_package/conanfile.py @@ -0,0 +1,26 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/mathter/1.x.x/test_package/test_package.cpp b/recipes/mathter/1.x.x/test_package/test_package.cpp new file mode 100644 index 0000000000000..c46788d9d6a1c --- /dev/null +++ b/recipes/mathter/1.x.x/test_package/test_package.cpp @@ -0,0 +1,16 @@ +#include +#include + +int main() { + using Vec3 = mathter::Vector; + Vec3 v1 = {1, 0, 3}; + Vec3 v2 = {2, 5, 3}; + auto r = v1 + v2; + std::cout << "Mathter installation works." << std::endl; +#ifdef MATHTER_USE_XSIMD + std::cout << "XSimd enabled." << std::endl; +#else + std::cout << "XSimd disabled." << std::endl; +#endif + return 0; +} diff --git a/recipes/mathter/1.x.x/test_v1_package/CMakeLists.txt b/recipes/mathter/1.x.x/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..91630d79f4abb --- /dev/null +++ b/recipes/mathter/1.x.x/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/mathter/all/test_v1_package/conanfile.py b/recipes/mathter/1.x.x/test_v1_package/conanfile.py similarity index 100% rename from recipes/mathter/all/test_v1_package/conanfile.py rename to recipes/mathter/1.x.x/test_v1_package/conanfile.py diff --git a/recipes/mathter/all/conandata.yml b/recipes/mathter/all/conandata.yml index 10ce98e0118c4..72315af7bccd3 100644 --- a/recipes/mathter/all/conandata.yml +++ b/recipes/mathter/all/conandata.yml @@ -1,10 +1,4 @@ sources: - "1.1.0": - url: "https://github.com/petiaccja/Mathter/archive/v1.1.0.tar.gz" - sha256: "a9a82126ecd80112854098a5646d38f72f0af03e9655b28ab8fa38b4c03b0870" - "1.0.1": - url: "https://github.com/petiaccja/Mathter/archive/v1.0.1.tar.gz" - sha256: "ab90736abfa8774103b53fe2b8962981c5f117dc582b01698c18d66cd2398b8c" - "1.0.0": - url: "https://github.com/petiaccja/Mathter/archive/v1.0.0.tar.gz" - sha256: "c75cca8d8aec627935250908f2c0f9f1839561e7596a4199bcf80e12b0e6c53b" + "2.0.0": + url: "https://github.com/petiaccja/Mathter/archive/v2.0.0.tar.gz" + sha256: "cec8472d3a56613d4815d1a14e5bf42976884177cc5283c5ad5aba0710cc4bab" \ No newline at end of file diff --git a/recipes/mathter/all/conanfile.py b/recipes/mathter/all/conanfile.py index 82cdb44fbd38a..ec3643caaab0d 100644 --- a/recipes/mathter/all/conanfile.py +++ b/recipes/mathter/all/conanfile.py @@ -3,8 +3,9 @@ from conan import ConanFile from conan.errors import ConanInvalidConfiguration from conan.tools.build import check_min_cppstd -from conan.tools.files import copy, get -from conan.tools.layout import basic_layout +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.env import VirtualBuildEnv +from conan.tools.files import copy, get, rmdir from conan.tools.scm import Version required_conan_version = ">=1.52.0" @@ -37,16 +38,12 @@ def _compilers_minimum_version(self): return { "apple-clang": 10, "clang": 6, - "gcc": 7, + "gcc": 9, "Visual Studio": 16, } - - def config_options(self): - if Version(self.version) < "1.1": - del self.options.with_xsimd def layout(self): - basic_layout(self, src_folder="src") + cmake_layout(self, src_folder="src") def package_id(self): self.info.clear() @@ -60,25 +57,41 @@ def validate(self): raise ConanInvalidConfiguration(f"{self.name} requires C++{self._min_cppstd}, " "which your compiler does not support.") + def requirements(self): + if self.options.get_safe("with_xsimd"): + self.requires("xsimd/13.0.0") + + def build_requirements(self): + self.tool_requires("cmake/[>=3.25 <4]") + def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) - def requirements(self): - if self.options.get_safe("with_xsimd"): - self.requires("xsimd/11.1.0") + def generate(self): + tc = CMakeToolchain(self) + tc.variables["MATHTER_BUILD_TESTS"] = "OFF" + tc.variables["MATHTER_BUILD_BENCHMARKS"] = "OFF" + tc.variables["MATHTER_BUILD_EXAMPLES"] = "OFF" + tc.variables["MATHTER_ENABLE_SIMD"] = "ON" if self.options.get_safe("with_xsimd") else "OFF" + tc.generate() + cmake_deps = CMakeDeps(self) + cmake_deps.generate() + venv = VirtualBuildEnv(self) + venv.generate() + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() def package(self): - if self.version == "1.0.0": - copy(self, "LICENCE", self.source_folder, os.path.join(self.package_folder, "licenses")) - include_dir = os.path.join(self.source_folder, "Mathter") - else: - copy(self, "LICENCE.md", self.source_folder, os.path.join(self.package_folder, "licenses")) - include_dir = os.path.join(self.source_folder, "include", "Mathter") - copy(self, "*.hpp", include_dir, os.path.join(self.package_folder, "include", "Mathter")) - copy(self, "*.natvis", include_dir, os.path.join(self.package_folder, "include", "Mathter")) + cmake = CMake(self) + cmake.install() + copy(self, "LICENCE.md", self.source_folder, os.path.join(self.package_folder, "licenses")) + rmdir(self, os.path.join(self.package_folder, "lib")) def package_info(self): self.cpp_info.bindirs = [] self.cpp_info.libdirs = [] if self.options.get_safe("with_xsimd"): - self.cpp_info.defines = ["MATHTER_USE_XSIMD=1"] + self.cpp_info.defines = ["MATHTER_ENABLE_SIMD=1"] diff --git a/recipes/mathter/all/test_package/test_package.cpp b/recipes/mathter/all/test_package/test_package.cpp index c46788d9d6a1c..d451c56acac71 100644 --- a/recipes/mathter/all/test_package/test_package.cpp +++ b/recipes/mathter/all/test_package/test_package.cpp @@ -1,16 +1,32 @@ +#include +#include +#include +#include +#include +#include #include + #include +using namespace mathter; + + int main() { - using Vec3 = mathter::Vector; - Vec3 v1 = {1, 0, 3}; - Vec3 v2 = {2, 5, 3}; - auto r = v1 + v2; - std::cout << "Mathter installation works." << std::endl; -#ifdef MATHTER_USE_XSIMD - std::cout << "XSimd enabled." << std::endl; + const auto u = Vector(1, 2, 3); + const auto v = Vector(4, 6, 8); + const auto r = u + v; + if (r[0] != 5) { + std::cout << "Mathter installation failing." << std::endl; + return 1; + } + else { + std::cout << "Mathter installation works." << std::endl; + std::cout << "Options:" << std::endl; +#ifdef MATHTER_ENABLE_SIMD + std::cout << " with_xsimd = True" << std::endl; #else - std::cout << "XSimd disabled." << std::endl; + std::cout << " with_xsimd = False" << std::endl; #endif - return 0; + return 0; + } } diff --git a/recipes/mathter/config.yml b/recipes/mathter/config.yml index d27c249ae17bf..64c627fda4753 100644 --- a/recipes/mathter/config.yml +++ b/recipes/mathter/config.yml @@ -1,7 +1,11 @@ versions: - "1.1.0": + "2.0.0": folder: all + "1.1.1": + folder: 1.x.x + "1.1.0": + folder: 1.x.x "1.0.1": - folder: all + folder: 1.x.x "1.0.0": - folder: all + folder: 1.x.x diff --git a/recipes/matio/all/conandata.yml b/recipes/matio/all/conandata.yml index 9a389d571f858..2c7850edc678c 100644 --- a/recipes/matio/all/conandata.yml +++ b/recipes/matio/all/conandata.yml @@ -8,6 +8,9 @@ sources: "1.5.26": url: "https://downloads.sourceforge.net/project/matio/matio/1.5.26/matio-1.5.26.tar.gz" sha256: "8b47c29f58e468dba7a5555371c6a72ad4c6aa8b15f459b2b0b65a303c063933" + "1.5.27": + url: "https://downloads.sourceforge.net/project/matio/matio/1.5.27/matio-1.5.27.tar.gz" + sha256: "0a6aa00b18c4512b63a8d27906b079c8c6ed41d4b2844f7a4ae598e18d22d3b3" patches: "1.5.23": - patch_file: "patches/require-cmake-3.10.patch" @@ -18,3 +21,6 @@ patches: "1.5.26": - patch_file: "patches/require-cmake-3.10.patch" - patch_file: "patches/cmake-install-bundle.patch" + "1.5.27": + - patch_file: "patches/require-cmake-3.10.patch" + - patch_file: "patches/cmake-install-bundle-1.5.27.patch" diff --git a/recipes/matio/all/conanfile.py b/recipes/matio/all/conanfile.py index 74cf617347b43..d5369f6dca220 100644 --- a/recipes/matio/all/conanfile.py +++ b/recipes/matio/all/conanfile.py @@ -67,6 +67,7 @@ def source(self): def generate(self): tc = CMakeToolchain(self) + tc.variables["MATIO_ENABLE_CPPCHECK"] = False tc.variables["MATIO_EXTENDED_SPARSE"] = self.options.extended_sparse tc.variables["MATIO_PIC"] = self.options.get_safe("fPIC", True) tc.variables["MATIO_SHARED"] = self.options.shared diff --git a/recipes/matio/all/patches/cmake-install-bundle-1.5.27.patch b/recipes/matio/all/patches/cmake-install-bundle-1.5.27.patch new file mode 100644 index 0000000000000..9d320dedb44ec --- /dev/null +++ b/recipes/matio/all/patches/cmake-install-bundle-1.5.27.patch @@ -0,0 +1,14 @@ +Fix CMake configuration errors while cross-building to iOS/tvOS/watchOS + +--- a/cmake/tools.cmake ++++ b/cmake/tools.cmake +@@ -8,8 +8,5 @@ if(NOT HAVE_GETOPT) + endif() + + install(TARGETS matdump +- PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} +- RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} +- LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} +- ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ DESTINATION ${CMAKE_INSTALL_BINDIR} + ) diff --git a/recipes/matio/config.yml b/recipes/matio/config.yml index aa1f75ac7dd6a..71576cf31a76e 100644 --- a/recipes/matio/config.yml +++ b/recipes/matio/config.yml @@ -1,4 +1,6 @@ versions: + "1.5.27": + folder: all "1.5.26": folder: all "1.5.24": diff --git a/recipes/mbedtls/all/conandata.yml b/recipes/mbedtls/all/conandata.yml index bc6f67303c8e3..fadcef127351e 100644 --- a/recipes/mbedtls/all/conandata.yml +++ b/recipes/mbedtls/all/conandata.yml @@ -1,40 +1,28 @@ sources: + "3.6.2": + url: "https://github.com/Mbed-TLS/mbedtls/releases/download/mbedtls-3.6.2/mbedtls-3.6.2.tar.bz2" + sha256: "8b54fb9bcf4d5a7078028e0520acddefb7900b3e66fec7f7175bb5b7d85ccdca" + "3.6.1": + url: "https://github.com/Mbed-TLS/mbedtls/releases/download/mbedtls-3.6.1/mbedtls-3.6.1.tar.bz2" + sha256: "fc8bef0991b43629b7e5319de6f34f13359011105e08e3e16eed3a9fe6ffd3a3" "3.6.0": url: "https://github.com/Mbed-TLS/mbedtls/releases/download/v3.6.0/mbedtls-3.6.0.tar.bz2" sha256: "3ecf94fcfdaacafb757786a01b7538a61750ebd85c4b024f56ff8ba1490fcd38" "3.5.2": url: "https://github.com/Mbed-TLS/mbedtls/archive/mbedtls-3.5.2.tar.gz" sha256: "eedecc468b3f8d052ef05a9d42bf63f04c8a1c50d1c5a94c251c681365a2c723" - "3.5.1": - url: "https://github.com/Mbed-TLS/mbedtls/archive/mbedtls-3.5.1.tar.gz" - sha256: "0da345cda55ec6f6d71afa84cfae55632a16ba0b8b4644f4d0e8a32c9d1117b0" "3.5.0": url: "https://github.com/Mbed-TLS/mbedtls/archive/refs/tags/v3.5.0.tar.gz" sha256: "bdee0e3e45bbf360541306cac0cc27e00402c7a46b9bdf2d24787d5107f008f2" - "3.4.1": - url: "https://github.com/Mbed-TLS/mbedtls/archive/refs/tags/v3.4.1.tar.gz" - sha256: "a420fcf7103e54e775c383e3751729b8fb2dcd087f6165befd13f28315f754f5" "3.2.1": url: "https://github.com/Mbed-TLS/mbedtls/archive/mbedtls-3.2.1.tar.gz" sha256: "5850089672560eeaca03dc36678ee8573bb48ef6e38c94f5ce349af60c16da33" - "3.1.0": - url: "https://github.com/Mbed-TLS/mbedtls/archive/mbedtls-3.1.0.tar.gz" - sha256: "64d01a3b22b91cf3a25630257f268f11bc7bfa37981ae6d397802dd4ccec4690" - "3.0.0": - url: "https://github.com/Mbed-TLS/mbedtls/archive/mbedtls-3.0.0.tar.gz" - sha256: "377d376919be19f07c7e7adeeded088a525be40353f6d938a78e4f986bce2ae0" "2.28.4": url: "https://github.com/Mbed-TLS/mbedtls/archive/refs/tags/v2.28.4.tar.gz" sha256: "578c4dcd15bbff3f5cd56aa07cd4f850fc733634e3d5947be4f7157d5bfd81ac" "2.25.0": url: "https://github.com/ARMmbed/mbedtls/archive/mbedtls-2.25.0.tar.gz" sha256: "ea2049c2dd4868693998d5a9780e198194be5aea1706ff4a9d4f882f18c0a101" - "2.24.0": - url: "https://github.com/Mbed-TLS/mbedtls/archive/mbedtls-2.24.0.tar.gz" - sha256: "b5a779b5f36d5fc4cba55faa410685f89128702423ad07b36c5665441a06a5f3" - "2.23.0": - url: "https://github.com/Mbed-TLS/mbedtls/archive/mbedtls-2.23.0.tar.gz" - sha256: "5c8998217402aa1fc734f4afaeac38fad2421470fac4b3abc112bd46391054fe" "2.16.12": url: "https://github.com/Mbed-TLS/mbedtls/archive/refs/tags/mbedtls-2.16.12.tar.gz" sha256: "0afb4a4ce5b771f2fb86daee786362fbe48285f05b73cd205f46a224ec031783" diff --git a/recipes/mbedtls/all/conanfile.py b/recipes/mbedtls/all/conanfile.py index 4ccbcab9405bc..d2eb38dbb504c 100644 --- a/recipes/mbedtls/all/conanfile.py +++ b/recipes/mbedtls/all/conanfile.py @@ -15,10 +15,10 @@ class MBedTLSConan(ConanFile): "mbed TLS makes it trivially easy for developers to include " "cryptographic and SSL/TLS capabilities in their (embedded) products" ) - topics = ("polarssl", "tls", "security") + license = "Apache-2.0" url = "https://github.com/conan-io/conan-center-index" homepage = "https://tls.mbed.org" - license = "Apache-2.0" + topics = ("polarssl", "tls", "security") package_type = "library" settings = "os", "arch", "compiler", "build_type" diff --git a/recipes/mbedtls/config.yml b/recipes/mbedtls/config.yml index 1fa588f3972ec..c59faa366d45d 100644 --- a/recipes/mbedtls/config.yml +++ b/recipes/mbedtls/config.yml @@ -1,27 +1,24 @@ versions: + "3.6.2": + folder: all + "3.6.1": + folder: all "3.6.0": folder: all "3.5.2": folder: all - "3.5.1": - folder: all + # keep 3.5.0 for libcurl, libssh2, libwebsockets, libzip "3.5.0": folder: all - "3.4.1": - folder: all + # keep 3.2.1 for libcoap, libgit2, lief "3.2.1": folder: all - "3.1.0": - folder: all - "3.0.0": - folder: all + # keep 2.28.4 for libssh2 "2.28.4": folder: all + # keep 2.25.0 for ixwebsocket, nng, open62541, yojimbo, mdnsresponder "2.25.0": folder: all - "2.24.0": - folder: all - "2.23.0": - folder: all + # keep 2.6.12 for cose-c "2.16.12": folder: all diff --git a/recipes/mbits-lngs/all/conanfile.py b/recipes/mbits-lngs/all/conanfile.py index 49f97626d1e47..3558c49245302 100644 --- a/recipes/mbits-lngs/all/conanfile.py +++ b/recipes/mbits-lngs/all/conanfile.py @@ -50,7 +50,7 @@ def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - self.requires("fmt/10.1.0") + self.requires("fmt/10.2.1") self.requires("mbits-utfconv/1.0.3") self.requires("mbits-diags/0.9.6") self.requires("mbits-mstch/1.0.4") diff --git a/recipes/mcap/all/conandata.yml b/recipes/mcap/all/conandata.yml index 4ede1237bc36c..d6df7ac1df80a 100644 --- a/recipes/mcap/all/conandata.yml +++ b/recipes/mcap/all/conandata.yml @@ -1,37 +1,43 @@ sources: + "1.4.1": + url: "https://github.com/foxglove/mcap/archive/refs/tags/releases/cpp/v1.4.1.tar.gz" + sha256: "69bcd33e1590201ea180e9e6ba8a22f3e8e7e2283e9ebcbff6a2c7134d8341db" + "1.4.0": + url: "https://github.com/foxglove/mcap/archive/refs/tags/releases/cpp/v1.4.0.tar.gz" + sha256: "64ff3e51119f37ffcfaf9deecbd987a7cb4d4d9035d74a3fd3773395a470fda1" "1.3.0": url: "https://github.com/foxglove/mcap/archive/releases/cpp/v1.3.0.tar.gz" sha256: "41acf6e85d75556c64407f077e05492d31db1f099e07242ef04364bb2939acf1" "1.2.1": url: "https://github.com/foxglove/mcap/archive/releases/cpp/v1.2.1.tar.gz" sha256: "fdc0c351bbcf8883fec0047ff84fed74da88446859083beb6624a584e2cde669" - 1.2.0: + "1.2.0": url: "https://github.com/foxglove/mcap/archive/refs/tags/releases/cpp/v1.2.0/main.tar.gz" sha256: "11a6badecac2b10e9687e912648a6e9679ef8731e4ab9570346ae9845ae64a65" - 1.1.0: + "1.1.0": url: "https://github.com/foxglove/mcap/archive/refs/tags/releases/cpp/v1.1.0/main.tar.gz" sha256: "1cb2ae9f2e910eeb2e93b3ab722744d1805b9da45764e4fd88703b669413350d" - 1.0.0: + "1.0.0": url: "https://github.com/foxglove/mcap/archive/refs/tags/releases/cpp/v1.0.0/main.tar.gz" sha256: "e36169e46a67a9431f73df335f67488461817bc423f9af63ac0af7f29e0bd696" - 0.9.0: + "0.9.0": url: "https://github.com/foxglove/mcap/archive/refs/tags/releases/cpp/v0.9.0/main.tar.gz" sha256: "e17702fcc0259bf72eab0d84d3fa6e02c051256357ab7ba4421462f2c02b434f" - 0.5.0: + "0.5.0": url: "https://github.com/foxglove/mcap/archive/refs/tags/releases/cpp/v0.5.0/main.tar.gz" sha256: "408e255a6c6419b16de38a9ecbdd9729d60adc657767b2d52a234d1da1185349" - 0.4.0: + "0.4.0": url: "https://github.com/foxglove/mcap/archive/refs/tags/releases/cpp/v0.4.0/main.tar.gz" sha256: "c0ab99e51005fa8b74fe9ca1ed23b205cf532b8b0723eedd243f35a28d7b466b" - 0.3.0: + "0.3.0": url: "https://github.com/foxglove/mcap/archive/refs/tags/releases/cpp/v0.3.0/main.tar.gz" sha256: "ef29ea4c09520b8aaa2d78ce5e79cbbcd87511ed14d6abf3c4b249ae67a4153b" - 0.1.2: + "0.1.2": url: "https://github.com/foxglove/mcap/archive/refs/tags/releases/cpp/v0.1.2/main.tar.gz" sha256: "0f456d6c53730445c3dbf57afd285493cf748c66a02f77d6e48c075128fd0896" - 0.1.1: + "0.1.1": url: "https://github.com/foxglove/mcap/archive/refs/tags/releases/cpp/v0.1.1/main.tar.gz" sha256: "a9ea899315851bfacdb234b7acc917b1a9c67593f0d68e1920321a8f6fa2cfbf" - 0.1.0: + "0.1.0": url: "https://github.com/foxglove/mcap/archive/refs/tags/releases/cpp/v0.1.0/main.tar.gz" sha256: "a936abb1493b0d189d7909a79c45bdc6703b6016801e10b5cd129ba39642d2b2" diff --git a/recipes/mcap/config.yml b/recipes/mcap/config.yml index fb6aa455469ea..0b63fa5acf0da 100644 --- a/recipes/mcap/config.yml +++ b/recipes/mcap/config.yml @@ -1,25 +1,29 @@ versions: + "1.4.1": + folder: all + "1.4.0": + folder: all "1.3.0": folder: all "1.2.1": folder: all - 1.2.0: + "1.2.0": folder: all - 1.1.0: + "1.1.0": folder: all - 1.0.0: + "1.0.0": folder: all - 0.9.0: + "0.9.0": folder: all - 0.5.0: + "0.5.0": folder: all - 0.4.0: + "0.4.0": folder: all - 0.3.0: + "0.3.0": folder: all - 0.1.2: + "0.1.2": folder: all - 0.1.1: + "0.1.1": folder: all - 0.1.0: + "0.1.0": folder: all diff --git a/recipes/md4c/all/conanfile.py b/recipes/md4c/all/conanfile.py index 554edcc0d2057..40333503038dd 100644 --- a/recipes/md4c/all/conanfile.py +++ b/recipes/md4c/all/conanfile.py @@ -20,11 +20,13 @@ class Md4cConan(ConanFile): options = { "shared": [True, False], "fPIC": [True, False], + "md2html": [True, False], "encoding": ["utf-8", "utf-16", "ascii"], } default_options = { "shared": False, "fPIC": True, + "md2html": True, "encoding": "utf-8", } @@ -53,6 +55,7 @@ def source(self): def generate(self): tc = CMakeToolchain(self) + tc.variables["BUILD_MD2HTML_EXECUTABLE"] = self.options.md2html if self.options.encoding == "utf-8": tc.preprocessor_definitions["MD4C_USE_UTF8"] = "1" elif self.options.encoding == "utf-16": diff --git a/recipes/md4qt/all/conandata.yml b/recipes/md4qt/all/conandata.yml index e21deda7ceec5..9d1d364030dad 100644 --- a/recipes/md4qt/all/conandata.yml +++ b/recipes/md4qt/all/conandata.yml @@ -1,139 +1,13 @@ sources: - "2.8.1": - url: "https://github.com/igormironchik/md4qt/archive/refs/tags/2.8.1.tar.gz" - sha256: "02a046c1586da820be0c5dd36f635ca50060f893fe638b542546f4a7a07d3164" - "2.8.0": - url: "https://github.com/igormironchik/md4qt/archive/refs/tags/2.8.0.tar.gz" - sha256: "82ef6acc84ea3a7891e4547f7d79af4caaef0f4d6f152bdab2a5c6ed5a48d11b" + "3.0.0": + url: "https://github.com/igormironchik/md4qt/archive/refs/tags/3.0.0.tar.gz" + sha256: "757f94ce1818123abe899729bba00aa1d99150d4cbe934ab57a95b308fd536dd" + "2.8.2": + url: "https://github.com/igormironchik/md4qt/archive/refs/tags/2.8.2.tar.gz" + sha256: "4f560d752ead3aba4983bd09d87e9e32a8313770d7fde0374988785d193b386a" "2.7.4": url: "https://github.com/igormironchik/md4qt/archive/refs/tags/2.7.4.tar.gz" sha256: "adef8e96e71f13cb9f4450eee7bb02a43694682dc67519323f8e23f7bf10d0d1" - "2.7.3": - url: "https://github.com/igormironchik/md4qt/archive/refs/tags/2.7.3.tar.gz" - sha256: "d464cd137a69218f88af1373b198610f1db6971c7aa56c6869219ffb34e6f0dd" - "2.7.2": - url: "https://github.com/igormironchik/md4qt/archive/refs/tags/2.7.2.tar.gz" - sha256: "2d6b65db799fff944f2ecb8bb411f17687e41e0d5a17a37ad1c4bd22fe997d8b" - "2.7.1": - url: "https://github.com/igormironchik/md4qt/archive/refs/tags/2.7.1.tar.gz" - sha256: "054cbaa286cfd3ce2d4e5c178b303b80eb23ad5bd54541571d6c9afbd285986e" - "2.7.0": - url: "https://github.com/igormironchik/md4qt/archive/refs/tags/2.7.0.tar.gz" - sha256: "e5722b586fa6c6d126487056fa47f0d933b94413ac44b79f52573226eca04a07" "2.6.0": url: "https://github.com/igormironchik/md4qt/archive/refs/tags/2.6.0.tar.gz" sha256: "8884a3b18fd923dd49994190e0b11c1882e409fce59fb6e5ee8e866dd889b8d0" - "2.5.2": - url: "https://github.com/igormironchik/md4qt/archive/refs/tags/2.5.2.tar.gz" - sha256: "f6af98d2b7c405419b4505bf25eb0363cad3561fa78c34001e8dada082812d76" - "2.5.1": - url: "https://github.com/igormironchik/md4qt/archive/refs/tags/2.5.1.tar.gz" - sha256: "6f13fc59fbfbc778df932cf328a5720989e59e5b06278731bd852d07472b5520" - "2.5.0": - url: "https://github.com/igormironchik/md4qt/archive/refs/tags/2.5.0.tar.gz" - sha256: "5965552f15d37475f37f644feaee62a89225312e1c82e813b7a119943d82c808" - "2.4.4": - url: "https://github.com/igormironchik/md4qt/archive/refs/tags/2.4.4.tar.gz" - sha256: "03995edbfe6047d047bcd3c5bb4824c3644927437bb60a95f8a3a9c7096ae981" - "2.4.3": - url: "https://github.com/igormironchik/md4qt/archive/refs/tags/2.4.3.tar.gz" - sha256: "b899a290c09ab073341d8924ebbd43694226d9122e0e174264d3a3770814bb15" - "2.4.2": - url: "https://github.com/igormironchik/md4qt/archive/refs/tags/2.4.2.tar.gz" - sha256: "76f3228dd9afa2661fe9326b51e5ec8dc29e364f99fb0f94704792610d543fa2" - "2.4.1": - url: "https://github.com/igormironchik/md4qt/archive/refs/tags/2.4.1.tar.gz" - sha256: "61a439206e1ed2e68702c9811e3055d0adfda5945fb098ea7bfe8906c33d7b49" - "2.4.0": - url: "https://github.com/igormironchik/md4qt/archive/refs/tags/2.4.0.tar.gz" - sha256: "a53c6fb33cfef23f91cc6e967b538cd1940bb765041a0c1c4ac3aa20bf0b5c7c" - "2.3.9": - url: "https://github.com/igormironchik/md4qt/archive/refs/tags/2.3.9.tar.gz" - sha256: "0ff833b179e01866296a8b2e36b09c19936c2e4434d9e542be389d8104809523" - "2.3.4": - url: "https://github.com/igormironchik/md4qt/archive/refs/tags/2.3.4.tar.gz" - sha256: "7f356658316da4f4eaf7bde43dd43027a602c49640d297357b12e22a1a842a68" - "2.3.3": - url: "https://github.com/igormironchik/md4qt/archive/refs/tags/2.3.3.tar.gz" - sha256: "89584d77d7e338d858e2198b20cd091cc713aef74880ef1fccc6c1e9d8b74acd" - "2.3.2": - url: "https://github.com/igormironchik/md4qt/archive/refs/tags/2.3.2.tar.gz" - sha256: "0a89854d639a3710ab89611333fd1a1047cd5edc87ba767fbefdc37e701ae671" - "2.3.1": - url: "https://github.com/igormironchik/md4qt/archive/refs/tags/2.3.1.tar.gz" - sha256: "7126ecc34f9808943b76b05106ebd42ef01b7b812416efc2382de68a13804d01" - "2.3.0": - url: "https://github.com/igormironchik/md4qt/archive/refs/tags/2.3.0.tar.gz" - sha256: "e8a37c80f1823bbac9cbfd6bbd662ee14e8ff0ac9e97966aa34cb2d0eed18e72" - "2.2.3": - url: "https://github.com/igormironchik/md4qt/archive/refs/tags/2.2.3.tar.gz" - sha256: "31f6de553700b25e4ed8517bcde24bd43b18c3fda1260f968aa5c393a7491783" - "2.2.2": - url: "https://github.com/igormironchik/md4qt/archive/refs/tags/2.2.2.tar.gz" - sha256: "4d5a0f7ed250cbcb8a3a1f4244f8413ed854e538406c571e83ebccf709cff49e" - "2.2.1": - url: "https://github.com/igormironchik/md4qt/archive/refs/tags/2.2.1.tar.gz" - sha256: "1e774a01d866c2738e1ec897ebb58057bf0eb7d7895aed48904907a77934c459" - "2.2.0": - url: "https://github.com/igormironchik/md4qt/archive/refs/tags/2.2.0.tar.gz" - sha256: "3c9228e658e8a613fbd098daf815d3884c8da404238723ff4d68065e5fedd5d7" - "2.1.1": - url: "https://github.com/igormironchik/md4qt/archive/refs/tags/2.1.1.tar.gz" - sha256: "76f4cb2919cae393ef52788a63853aa52e429f8ff218f5eff9d38f4ebb4b3b1e" - "2.1.0": - url: "https://github.com/igormironchik/md4qt/archive/refs/tags/2.1.0.tar.gz" - sha256: "cfbf515adecd798a3f1a4f2e007021b4b31742dd0b36805c273b3b8316fd820d" - "2.0.18": - url: "https://github.com/igormironchik/md4qt/archive/refs/tags/2.0.18.tar.gz" - sha256: "4fe70a63eb78cdf0355f6a6b292c40c8cc8ed4a62bcbec17afefa713b19c28b1" - "2.0.16": - url: "https://github.com/igormironchik/md4qt/archive/refs/tags/2.0.16.tar.gz" - sha256: "9da7cd02883c2f4d4a2371cda4c195ebc02f57bb673ef948b88a256f3db55724" - "2.0.15": - url: "https://github.com/igormironchik/md4qt/archive/refs/tags/2.0.15.tar.gz" - sha256: "53c4a65bb178afde91ae2360072f65a44ae7572a25912a3fe96aeaa6ac86ef27" - "2.0.14": - url: "https://github.com/igormironchik/md4qt/archive/refs/tags/2.0.14.tar.gz" - sha256: "b230f1a99a2a5f4f1f32748d52062276294b34d8254d4128193632e3a8ffaa4e" - "2.0.13": - url: "https://github.com/igormironchik/md4qt/archive/refs/tags/2.0.13.tar.gz" - sha256: "4e6cdcd54c5ce1e1ed9a97bd18ac5aeb7c15bb303193b4261058aef724fe9a41" - "2.0.12": - url: "https://github.com/igormironchik/md4qt/archive/refs/tags/2.0.12.tar.gz" - sha256: "07c89e37c624da036008acac88115b5aee6440f9e9f326139f256f34022f9a20" - "2.0.11": - url: "https://github.com/igormironchik/md4qt/archive/refs/tags/2.0.11.tar.gz" - sha256: "990979474bcbb924efb1c046581589e11889d502e5ad24b9779c131c4f3d9941" - "2.0.10": - url: "https://github.com/igormironchik/md4qt/archive/refs/tags/2.0.10.tar.gz" - sha256: "efcb7c97999ce2d78aba67041a61dda45feb54113e5b21851b0532fdcbc460a8" - "2.0.9": - url: "https://github.com/igormironchik/md4qt/archive/refs/tags/2.0.9.tar.gz" - sha256: "5b00c997eb33e877ca54468a101345e3a9986ce1b61b0919fa8632efabc51b6d" - "2.0.8": - url: "https://github.com/igormironchik/md4qt/archive/refs/tags/2.0.8.tar.gz" - sha256: "50a47d407acf1ca6a5b96af0386da74f7cfb66322ec7453cbb543f4f66251683" - "2.0.7": - url: "https://github.com/igormironchik/md4qt/archive/refs/tags/2.0.7.tar.gz" - sha256: "2852ac88f95051ce0ce112e5d99695307d8748f47553b101edebecce03ee3eae" - "2.0.6": - url: "https://github.com/igormironchik/md4qt/archive/refs/tags/2.0.6.tar.gz" - sha256: "be6b227f8e0053fa7bf3a1a11f0e15cda72dabbe64cc9e50c9ea0789313a57c2" - "2.0.5": - url: "https://github.com/igormironchik/md4qt/archive/refs/tags/2.0.5.tar.gz" - sha256: "363cc13d35c66d8d89df25eef9ac49ec2d259781752208231bad32db4df5dd52" - "2.0.4": - url: "https://github.com/igormironchik/md4qt/archive/refs/tags/2.0.4.tar.gz" - sha256: "2980a0d0b5d3539a5a1402942a1345e97c8ab36acfc8e00d932df157d2e6edc2" - "2.0.3": - url: "https://github.com/igormironchik/md4qt/archive/refs/tags/2.0.3.tar.gz" - sha256: "374bfc74aa6ebb1ea7d2332b96f8b2f6001118793bbe4e55109a13d0ffe7ce55" - "2.0.2": - url: "https://github.com/igormironchik/md4qt/archive/refs/tags/2.0.2.tar.gz" - sha256: "721c7e5f8676dba1023931b9e2fd0d22cbc643bc9864c1d1163df3c5615e7e96" - "2.0.1": - url: "https://github.com/igormironchik/md4qt/archive/refs/tags/2.0.1.tar.gz" - sha256: "879f069cd12db44f2fcc33590ded1f9d778f4c854be14a7ad72fb2ff4acdb3d2" - "2.0.0": - url: "https://github.com/igormironchik/md4qt/archive/refs/tags/2.0.0.tar.gz" - sha256: "3c834c4d832208658f042bd85a821c297fafd0f2eedda9d6ddddced7b724f61a" diff --git a/recipes/md4qt/all/conanfile.py b/recipes/md4qt/all/conanfile.py index 90fcedd907a99..8e13c7e378f4f 100644 --- a/recipes/md4qt/all/conanfile.py +++ b/recipes/md4qt/all/conanfile.py @@ -60,7 +60,10 @@ def build(self): pass def package(self): - copy(self, "LICENSE", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) + if Version(self.version) <= "2.8.1": + copy(self, "LICENSE", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) + else: + copy(self, "MIT.txt", src=os.path.join(self.source_folder, "LICENSES"), dst=os.path.join(self.package_folder, "licenses")) copy(self, "*.hpp", src=os.path.join(self.source_folder, "md4qt"), dst=os.path.join(self.package_folder, "include", "md4qt")) def package_info(self): diff --git a/recipes/md4qt/config.yml b/recipes/md4qt/config.yml index 88cab2028c7e0..233405139e945 100644 --- a/recipes/md4qt/config.yml +++ b/recipes/md4qt/config.yml @@ -1,93 +1,9 @@ versions: - "2.8.1": + "3.0.0": folder: all - "2.8.0": + "2.8.2": folder: all "2.7.4": folder: all - "2.7.3": - folder: all - "2.7.2": - folder: all - "2.7.1": - folder: all - "2.7.0": - folder: all "2.6.0": folder: all - "2.5.2": - folder: all - "2.5.1": - folder: all - "2.5.0": - folder: all - "2.4.4": - folder: all - "2.4.3": - folder: all - "2.4.2": - folder: all - "2.4.1": - folder: all - "2.4.0": - folder: all - "2.3.9": - folder: all - "2.3.4": - folder: all - "2.3.3": - folder: all - "2.3.2": - folder: all - "2.3.1": - folder: all - "2.3.0": - folder: all - "2.2.3": - folder: all - "2.2.2": - folder: all - "2.2.1": - folder: all - "2.2.0": - folder: all - "2.1.1": - folder: all - "2.1.0": - folder: all - "2.0.18": - folder: all - "2.0.16": - folder: all - "2.0.15": - folder: all - "2.0.14": - folder: all - "2.0.13": - folder: all - "2.0.12": - folder: all - "2.0.11": - folder: all - "2.0.10": - folder: all - "2.0.9": - folder: all - "2.0.8": - folder: all - "2.0.7": - folder: all - "2.0.6": - folder: all - "2.0.5": - folder: all - "2.0.4": - folder: all - "2.0.3": - folder: all - "2.0.2": - folder: all - "2.0.1": - folder: all - "2.0.0": - folder: all diff --git a/recipes/melon/all/conandata.yml b/recipes/melon/all/conandata.yml new file mode 100644 index 0000000000000..9550cdb9601e7 --- /dev/null +++ b/recipes/melon/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "1.0.0-alpha.1": + url: "https://github.com/fhamonic/melon/archive/refs/tags/v1.0.0-alpha.1.tar.gz" + sha256: "370f6bb1fddc68f1ab771c8b659fed6d9dc8da51290897ed72fd87589143220c" diff --git a/recipes/melon/all/conanfile.py b/recipes/melon/all/conanfile.py new file mode 100644 index 0000000000000..0d83d36ecc529 --- /dev/null +++ b/recipes/melon/all/conanfile.py @@ -0,0 +1,76 @@ +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.build import check_min_cppstd +from conan.tools.files import copy, get +from conan.tools.layout import basic_layout +from conan.tools.scm import Version +import os + + +required_conan_version = ">=1.52.0" + +class PackageConan(ConanFile): + name = "melon" + description = "A modern and efficient graph library using C++20 ranges and concepts." + license = "BSL-1.0" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/fhamonic/melon" + topics = ("graph", "algorithm", "ranges", "c++20", "header-only") + package_type = "header-library" + settings = "os", "arch", "compiler", "build_type" + no_copy_source = True + + @property + def _min_cppstd(self): + return 20 + + @property + def _compilers_minimum_version(self): + return { + "apple-clang": "14", + "clang": "17", + "gcc": "12", + "msvc": "192", + "Visual Studio": "17", + } + + def layout(self): + basic_layout(self, src_folder="src") + + def requirements(self): + self.requires("range-v3/0.12.0") + self.requires("fmt/10.2.1") + + def package_id(self): + self.info.clear() + + def validate(self): + if self.settings.compiler.get_safe("cppstd"): + check_min_cppstd(self, self._min_cppstd) + minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) + if minimum_version and Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration( + f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." + ) + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def build(self): + pass + + def package(self): + copy(self, "LICENSE", self.source_folder, os.path.join(self.package_folder, "licenses")) + copy( + self, + "*.hpp", + os.path.join(self.source_folder, "include"), + os.path.join(self.package_folder, "include"), + ) + + def package_info(self): + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] + + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.system_libs.extend(["pthread"]) diff --git a/recipes/melon/all/test_package/CMakeLists.txt b/recipes/melon/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..17e2b8206c6aa --- /dev/null +++ b/recipes/melon/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) + +find_package(melon REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE melon::melon) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_20) diff --git a/recipes/melon/all/test_package/conanfile.py b/recipes/melon/all/test_package/conanfile.py new file mode 100644 index 0000000000000..0a808db45f245 --- /dev/null +++ b/recipes/melon/all/test_package/conanfile.py @@ -0,0 +1,27 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake +import os + + +# It will become the standard on Conan 2.x +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def layout(self): + cmake_layout(self) + + def requirements(self): + self.requires(self.tested_reference_str) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/melon/all/test_package/test_package.cpp b/recipes/melon/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..f0417c2d7cc52 --- /dev/null +++ b/recipes/melon/all/test_package/test_package.cpp @@ -0,0 +1,47 @@ +#include "melon/algorithm/bidirectional_dijkstra.hpp" +#include "melon/utility/static_digraph_builder.hpp" +#include "melon/container/static_digraph.hpp" + +using namespace fhamonic::melon; + +// test_package with bidirectional dijkstra because it condenses range-v3 uses +// shown to overwhelm some compilers + +int main(int argc, char *argv[]) +{ + static_digraph_builder builder(6); + + builder.add_arc(0u, 1u, 7); // 0 + builder.add_arc(0u, 2u, 9); // 1 + builder.add_arc(0u, 5u, 14); // 2 + builder.add_arc(1u, 0u, 7); // 3 + builder.add_arc(1u, 2u, 10); // 4 + builder.add_arc(1u, 3u, 15); // 5 + builder.add_arc(2u, 0u, 9); // 6 + builder.add_arc(2u, 1u, 10); // 7 + builder.add_arc(2u, 3u, 12); // 8 + builder.add_arc(2u, 5u, 2); // 9 + builder.add_arc(3u, 1u, 15); // 10 + builder.add_arc(3u, 2u, 12); // 11 + builder.add_arc(3u, 4u, 6); // 12 + builder.add_arc(4u, 3u, 6); // 13 + builder.add_arc(4u, 5u, 9); // 14 + builder.add_arc(5u, 0u, 14); // 15 + builder.add_arc(5u, 2u, 2); // 16 + builder.add_arc(5u, 4u, 9); // 17 + + auto [graph, length_map] = builder.build(); + + bidirectional_dijkstra alg(graph, length_map, 0u, 3u); + + int dist = alg.run(); + if (dist != 21) return EXIT_FAILURE; + + if (!alg.path_found()) return EXIT_FAILURE; + auto path = alg.path(); + if (std::ranges::distance(path) != 2) return EXIT_FAILURE; + if (std::ranges::find(path, 1u) == path.end()) return EXIT_FAILURE; + if (std::ranges::find(path, 8u) == path.end()) return EXIT_FAILURE; + + return EXIT_SUCCESS; +} diff --git a/recipes/melon/config.yml b/recipes/melon/config.yml new file mode 100644 index 0000000000000..6aee52e82f90c --- /dev/null +++ b/recipes/melon/config.yml @@ -0,0 +1,3 @@ +versions: + "1.0.0-alpha.1": + folder: all diff --git a/recipes/meshoptimizer/all/conandata.yml b/recipes/meshoptimizer/all/conandata.yml index 123647cd81c5f..94a9a85900a6d 100644 --- a/recipes/meshoptimizer/all/conandata.yml +++ b/recipes/meshoptimizer/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.21": + url: "https://github.com/zeux/meshoptimizer/archive/refs/tags/v0.21.tar.gz" + sha256: "050A5438E4644833FF69F35110FCF4E37038A89C5FDC8AED45D8CD848ECB3A20" "0.20": url: "https://github.com/zeux/meshoptimizer/archive/refs/tags/v0.20.tar.gz" sha256: "CF1077A83958BED3D8DA28A841CA53A6A42D871E49023EDCE64E37002A0F5A48" diff --git a/recipes/meshoptimizer/config.yml b/recipes/meshoptimizer/config.yml index 31e2badfe4c2f..bb6c09f07b3de 100644 --- a/recipes/meshoptimizer/config.yml +++ b/recipes/meshoptimizer/config.yml @@ -1,4 +1,6 @@ versions: + "0.21": + folder: all "0.20": folder: all "0.17": diff --git a/recipes/meson/all/conandata.yml b/recipes/meson/all/conandata.yml index f567bf8d56087..ad55ba8f8a439 100644 --- a/recipes/meson/all/conandata.yml +++ b/recipes/meson/all/conandata.yml @@ -1,4 +1,16 @@ sources: + "1.6.0": + url: "https://github.com/mesonbuild/meson/archive/1.6.0.tar.gz" + sha256: "342300656bfdafb6cc09325bdd0fd507366ecaa6be25fa4525f50889adf7c606" + "1.5.1": + url: "https://github.com/mesonbuild/meson/archive/1.5.1.tar.gz" + sha256: "55f6acd5bf72c14d4aa5a781993633f84a1d117bdf2c2057735902ced9b81390" + "1.5.0": + url: "https://github.com/mesonbuild/meson/archive/1.5.0.tar.gz" + sha256: "781913826fb6f478eb7d77e1942ab3df39444e4c90e9a3523737e215171db469" + "1.4.1": + url: "https://github.com/mesonbuild/meson/archive/1.4.1.tar.gz" + sha256: "a7efc72ecb873c5a62031ade1921a7177b67cfdcb2e9410a7ab023f9e8192f4b" "1.4.0": url: "https://github.com/mesonbuild/meson/archive/1.4.0.tar.gz" sha256: "61382f295378bddcd9bebb3a9a9065b1cbc671fa41b80964ab02726f9a5f3a88" @@ -26,60 +38,23 @@ sources: "1.1.1": url: "https://github.com/mesonbuild/meson/releases/download/1.1.1/meson-1.1.1.tar.gz" sha256: "d04b541f97ca439fb82fab7d0d480988be4bd4e62563a5ca35fadb5400727b1c" + # qt requires 1.1.0 "1.1.0": url: "https://github.com/mesonbuild/meson/archive/1.1.0.tar.gz" sha256: "f29a3e14062043d75e82d16f1e41856e6b1ed7a7c016e10c7b13afa7ee6364cc" - "1.0.1": - url: "https://github.com/mesonbuild/meson/archive/1.0.1.tar.gz" - sha256: "4ab3a5c0060dc22bdefb04507efc6c38acb910e91bcd467a38e1fa211e5a6cfe" + # wayland-protocols requires 1.0.0 "1.0.0": url: "https://github.com/mesonbuild/meson/releases/download/1.0.0/meson-1.0.0.tar.gz" sha256: "aa50a4ba4557c25e7d48446abfde857957dcdf58385fffbe670ba0e8efacce05" - "0.64.1": - url: "https://github.com/mesonbuild/meson/archive/0.64.1.tar.gz" - sha256: "1d12a4bc1cf3ab18946d12cf0b6452e5254ada1ad50aacc97f87e2cccd7da315" - "0.64.0": - url: "https://github.com/mesonbuild/meson/archive/0.64.0.tar.gz" - sha256: "6477993d781b6efea93091616a6d6a0766c0e026076dbeb11249bf1c9b49a347" - "0.63.3": - url: "https://github.com/mesonbuild/meson/archive/0.63.3.tar.gz" - sha256: "7c516c2099b762203e8a0a22412aa465b7396e6f9b1ab728bad6e6db44dc2659" - "0.63.2": - url: "https://github.com/mesonbuild/meson/archive/0.63.2.tar.gz" - sha256: "023a3f7c74e68991154c3205a6975705861eedbf8130e013d15faa1df1af216e" - "0.63.1": - url: "https://github.com/mesonbuild/meson/archive/0.63.1.tar.gz" - sha256: "f355829f0e8c714423f03a06604c04c216d4cbe3586f3154cb2181076b19207a" - "0.63.0": - url: "https://github.com/mesonbuild/meson/archive/0.63.0.tar.gz" - sha256: "77808d47fa05875c2553d66cb6c6140c2f687b46256dc537eeb8a63889e0bea2" + # gtk requires 0.62.2 "0.62.2": url: "https://github.com/mesonbuild/meson/archive/0.62.2.tar.gz" sha256: "97108f4d9bb16bc758c44749bd25ec7d42c6a762961efbed8b7589a2a3551ea6" - "0.62.1": - url: "https://github.com/mesonbuild/meson/archive/0.62.1.tar.gz" - sha256: "9fb52e66dbc613479a5f70e46cc2e8faf5aa65e09313f2c71fa63b8afd018107" - "0.62.0": - url: "https://github.com/mesonbuild/meson/archive/0.62.0.tar.gz" - sha256: "72ac3bab701dfd597604de29cc74baaa1cc0ad8ca26ae23d5288de26abfe1c80" + # gst-plugins-base requires 0.61.2 "0.61.2": url: "https://github.com/mesonbuild/meson/archive/0.61.2.tar.gz" sha256: "33cd555314a94d52acfbb3f6f44d4e61c4ad0bfec7acf4301be7e40bb969b3a8" - "0.60.2": - url: "https://github.com/mesonbuild/meson/archive/0.60.2.tar.gz" - sha256: "fc7c2f315b5b63fee0414b0b94b5a7d0e9c71c8c9bb8487314eb5a9a33984b8d" + # gobject-introspection requires 0.59.3 "0.59.3": url: "https://github.com/mesonbuild/meson/archive/0.59.3.tar.gz" sha256: "b2c5bfd5032189a66cf6a32d98ba82d94d7d314577d8efe4d9dc159c4073f282" - "0.58.1": - url: "https://github.com/mesonbuild/meson/archive/0.58.1.tar.gz" - sha256: "78e0f553dd3bc632d5f96ab943b1bbccb599c2c84ff27c5fb7f7fff9c8a3f6b4" - "0.57.2": - url: "https://github.com/mesonbuild/meson/archive/0.57.2.tar.gz" - sha256: "cd3773625253df4fd1c380faf03ffae3d02198d6301e7c8bc7bba6c66af66096" - "0.56.2": - url: "https://github.com/mesonbuild/meson/archive/0.56.2.tar.gz" - sha256: "aaae961c3413033789248ffe6762589e80b6cf487c334d0b808e31a32c48f35f" - "0.55.3": - url: "https://github.com/mesonbuild/meson/archive/0.55.3.tar.gz" - sha256: "2b276df50c5b13ccdbfb14d3333141e9e7985aca31b60400b3f3e0be2ee6897e" diff --git a/recipes/meson/all/conanfile.py b/recipes/meson/all/conanfile.py index f11560d3a45d0..1f193b4c68fed 100644 --- a/recipes/meson/all/conanfile.py +++ b/recipes/meson/all/conanfile.py @@ -2,7 +2,7 @@ import textwrap from conan import ConanFile, conan_version -from conan.tools.files import copy, get, rmdir, save +from conan.tools.files import copy, get, rmdir, save, replace_in_file from conan.tools.layout import basic_layout from conan.tools.scm import Version @@ -11,12 +11,12 @@ class MesonConan(ConanFile): name = "meson" - package_type = "application" - description = "Meson is a project to create the best possible next-generation build system" - topics = ("meson", "mesonbuild", "build-system") + description = "a project to create the best possible next-generation build system" + license = "Apache-2.0" url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/mesonbuild/meson" - license = "Apache-2.0" + topics = ("mesonbuild", "build-system") + package_type = "application" no_copy_source = True def layout(self): @@ -24,17 +24,15 @@ def layout(self): def requirements(self): if self.conf.get("tools.meson.mesontoolchain:backend", default="ninja", check_type=str) == "ninja": - self.requires("ninja/1.11.1") + # Meson requires >=1.8.2 as of 1.5 + # https://github.com/mesonbuild/meson/blob/b6b634ad33e5ca9ad4a9d6139dba4244847cc0e8/mesonbuild/backend/ninjabackend.py#L625 + self.requires("ninja/[>=1.10.2 <2]") def package_id(self): self.info.clear() def source(self): - get(self, **self.conan_data["sources"][self.version], - destination=self.source_folder, strip_root=True) - - def build(self): - pass + get(self, **self.conan_data["sources"][self.version], strip_root=True) def package(self): copy(self, "COPYING", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) @@ -54,6 +52,16 @@ def package(self): exec "$meson_dir/meson.py" "$@" """)) + def finalize(self): + copy(self, "*", src=self.immutable_package_folder, dst=self.package_folder) + replace_in_file(self, os.path.join(self.package_folder, "bin", "meson.cmd"), + "set PYTHONDONTWRITEBYTECODE=1", + "") + + replace_in_file(self, os.path.join(self.package_folder, "bin", "meson"), + "export PYTHONDONTWRITEBYTECODE=1", + "") + @staticmethod def _chmod_plus_x(filename): if os.name == "posix": diff --git a/recipes/meson/config.yml b/recipes/meson/config.yml index 2b56413242adf..d2e19a97433c1 100644 --- a/recipes/meson/config.yml +++ b/recipes/meson/config.yml @@ -1,4 +1,12 @@ versions: + "1.6.0": + folder: all + "1.5.1": + folder: all + "1.5.0": + folder: all + "1.4.1": + folder: all "1.4.0": folder: all "1.3.2": @@ -19,39 +27,11 @@ versions: folder: all "1.1.0": folder: all - "1.0.1": - folder: all "1.0.0": folder: all - "0.64.1": - folder: all - "0.64.0": - folder: all - "0.63.3": - folder: all - "0.63.2": - folder: all - "0.63.1": - folder: all - "0.63.0": - folder: all "0.62.2": folder: all - "0.62.1": - folder: all - "0.62.0": - folder: all "0.61.2": folder: all - "0.60.2": - folder: all "0.59.3": folder: all - "0.58.1": - folder: all - "0.57.2": - folder: all - "0.56.2": - folder: all - "0.55.3": - folder: all diff --git a/recipes/metal-cpp/all/conandata.yml b/recipes/metal-cpp/all/conandata.yml new file mode 100644 index 0000000000000..2fd6dd33feee7 --- /dev/null +++ b/recipes/metal-cpp/all/conandata.yml @@ -0,0 +1,30 @@ +sources: + "14.2": + url: "https://developer.apple.com/metal/cpp/files/metal-cpp_macOS14.2_iOS17.2.zip" + sha256: "d800ddbc3fccabce3a513f975eeafd4057e07a29e905ad5aaef8c1f4e12d9ada" + "14": + url: "https://developer.apple.com/metal/cpp/files/metal-cpp_macOS14_iOS17-beta.zip" + sha256: "2009a339ecbd56b36601435fe08c415749f8ad09145755472bb637b319003367" + "13.3": + url: "https://developer.apple.com/metal/cpp/files/metal-cpp_macOS13.3_iOS16.4.zip" + sha256: "0afd87ca851465191ae4e3980aa036c7e9e02fe32e7c760ac1a74244aae6023b" + "13": + url: "https://developer.apple.com/metal/cpp/files/metal-cpp_macOS13_iOS16.zip" + sha256: "6f741894229e9c750add1afc3797274fc008c7507e2ae726370c17c34b7c6a68" +minimum_os_version: + "14.2": + "Macos": "14.2" + "iOS": "17.2" + "tvOS": "17.2" + "14": + "Macos": "14" + "iOS": "17" + "tvOS": "17" + "13.3": + "Macos": "13.3" + "iOS": "16.4" + "tvOS": "16.4" + "13": + "Macos": "13" + "iOS": "16" + "tvOS": "16" diff --git a/recipes/metal-cpp/all/conanfile.py b/recipes/metal-cpp/all/conanfile.py new file mode 100644 index 0000000000000..2efbdaef9686f --- /dev/null +++ b/recipes/metal-cpp/all/conanfile.py @@ -0,0 +1,92 @@ +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.apple import XCRun +from conan.tools.build import check_min_cppstd +from conan.tools.files import get, copy +from conan.tools.layout import basic_layout +from conan.tools.scm import Version + +import os +import platform + +required_conan_version = ">=1.53.0" + + +class MetalcppConan(ConanFile): + name = "metal-cpp" + description = ( + "Library for the usage of Apple Metal GPU programming in C++ applications - " + "Header-only library to wrap Metal in C++ classes" + ) + license = "Apache-2.0" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://developer.apple.com/metal/cpp/" + topics = ("metal", "gpu", "apple", "header-only") + + package_type = "header-library" + settings = "os", "arch", "compiler", "build_type" + + no_copy_source = True + + def layout(self): + basic_layout(self, src_folder="src") + + def package_id(self): + self.info.clear() + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def validate(self): + os_name = str(self.settings.os) + if not os_name in ["Macos", "iOS", "tvOS"]: + raise ConanInvalidConfiguration("Metal can only be used on an Macos, iOS or tvOS platform.") + + if self.settings.compiler.get_safe("cppstd"): + min_cppstd = "17" + check_min_cppstd(self, min_cppstd) + + minimum_os_version = self.conan_data["minimum_os_version"][self.version][os_name] + + xcrun = XCRun(self) + os_version = self.settings.get_safe("os.version") + sdk_version = self.settings.get_safe("os.sdk_version") + visible_sdk_version = xcrun.sdk_version if platform.system() == "Darwin" else None + + sdk_version = sdk_version or os_version or visible_sdk_version + + if sdk_version is None: + # Will raise when `os.version` or `os.sdk_version` are not defined + # and we are *NOT* running this on macOS + raise ConanInvalidConfiguration(f"metal-cpp {self.version} requires the os.version or sdk.version settings, but the are not defined") + + if sdk_version < Version(minimum_os_version): + raise ConanInvalidConfiguration(f"metal-cpp {self.version} requires {os_name} SDK version {minimum_os_version} but {sdk_version} is the target.") + + def package(self): + copy( + self, + pattern="LICENSE.txt", + dst=os.path.join(self.package_folder, "licenses"), + src=os.path.join(self.source_folder) + ) + copy( + self, + pattern="**.hpp", + dst=os.path.join(self.package_folder, "include"), + src=os.path.join(self.source_folder), + keep_path=True + ) + + def package_info(self): + self.cpp_info.set_property("cmake_file_name", "metal-cpp") + self.cpp_info.set_property("cmake_target_name", "metal-cpp::metal-cpp") + self.cpp_info.set_property("pkg_config_name", "metal-cpp") + self.cpp_info.bindirs = [] + self.cpp_info.frameworkdirs = [] + self.cpp_info.libdirs = [] + self.cpp_info.resdirs = [] + + self.cpp_info.frameworks = ["Foundation", "Metal", "MetalKit", "QuartzCore"] + if self.version >= Version('14'): + self.cpp_info.frameworks.append("MetalFX") diff --git a/recipes/metal-cpp/all/test_package/CMakeLists.txt b/recipes/metal-cpp/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..640984ec9c7f0 --- /dev/null +++ b/recipes/metal-cpp/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.12) +project(test_package LANGUAGES CXX) + +find_package(metal-cpp REQUIRED) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE metal-cpp::metal-cpp) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) diff --git a/recipes/metal-cpp/all/test_package/conanfile.py b/recipes/metal-cpp/all/test_package/conanfile.py new file mode 100644 index 0000000000000..e28de31d33b1c --- /dev/null +++ b/recipes/metal-cpp/all/test_package/conanfile.py @@ -0,0 +1,32 @@ +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.apple import is_apple_os +from conan.tools.build import can_run +from conan.tools.cmake import CMake, cmake_layout +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeToolchain", "CMakeDeps", "VirtualRunEnv" + test_type = "explicit" + + def validate(self): + if not is_apple_os(self): + raise ConanInvalidConfiguration("Metal can only be used on an Apple OS.") + + def layout(self): + cmake_layout(self) + + def requirements(self): + self.requires(self.tested_reference_str) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/metal-cpp/all/test_package/test_package.cpp b/recipes/metal-cpp/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..bb32b01f0db92 --- /dev/null +++ b/recipes/metal-cpp/all/test_package/test_package.cpp @@ -0,0 +1,18 @@ +#include + +#define NS_PRIVATE_IMPLEMENTATION +#define MTL_PRIVATE_IMPLEMENTATION + +#include +#include + + +int main() +{ + // Create a metal device to check the library functions + MTL::Device* metalDevice = MTL::CreateSystemDefaultDevice(); + + std::cout << "Metal device detected: " << metalDevice->name()->cString(NS::ASCIIStringEncoding) << std::endl; + + return EXIT_SUCCESS; +} diff --git a/recipes/metal-cpp/config.yml b/recipes/metal-cpp/config.yml new file mode 100644 index 0000000000000..1f484bca5aa17 --- /dev/null +++ b/recipes/metal-cpp/config.yml @@ -0,0 +1,9 @@ +versions: + "14.2": + folder: all + "14": + folder: all + "13.3": + folder: all + "13": + folder: all diff --git a/recipes/metall/all/conandata.yml b/recipes/metall/all/conandata.yml index 023411b883cb5..72fbcaef70e39 100644 --- a/recipes/metall/all/conandata.yml +++ b/recipes/metall/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.28": + url: "https://github.com/LLNL/metall/archive/refs/tags/v0.28.tar.gz" + sha256: "770dedb7f8220c333688b232a22104ca9d8d5823e7a8a21152b58ef970eb85d0" "0.27": url: "https://github.com/LLNL/metall/archive/refs/tags/v0.27.tar.gz" sha256: "6e6f17a760778f9162def939701f9381a75e5275fd1eb1b2af4b2e89e86e1c58" diff --git a/recipes/metall/all/conanfile.py b/recipes/metall/all/conanfile.py index b13166986c15d..6017c84ad4f89 100644 --- a/recipes/metall/all/conanfile.py +++ b/recipes/metall/all/conanfile.py @@ -5,6 +5,7 @@ from conan.tools.layout import basic_layout from conan.tools.scm import Version import os +import platform required_conan_version = ">=1.50.0" @@ -36,13 +37,18 @@ def requirements(self): def package_id(self): self.info.clear() + @property + def _is_glibc_older_than_2_27(self): + libver = platform.libc_ver() + return self.settings.os == 'Linux' and libver[0] == 'glibc' and Version(libver[1]) < "2.27" + def validate(self): if self.settings.compiler.get_safe("cppstd"): check_min_cppstd(self, 17) if self.settings.os not in ["Linux", "Macos"]: raise ConanInvalidConfiguration( - "Metall requires some POSIX functionalities like mmap.") + f"{self.ref} requires some POSIX functionalities like mmap.") def lazy_lt_semver(v1, v2): lv1 = [int(v) for v in v1.split(".")] @@ -56,6 +62,11 @@ def lazy_lt_semver(v1, v2): raise ConanInvalidConfiguration( "{} {} requires C++17, which your compiler does not support.".format(self.name, self.version)) + def validate_build(self): + if Version(self.version) >= "0.28" and self._is_glibc_older_than_2_27: + raise ConanInvalidConfiguration( + f"{self.ref} requires copy_file_range() which is available since glibc 2.27.") + def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) diff --git a/recipes/metall/config.yml b/recipes/metall/config.yml index 1d869b27d6481..1984e8dcd4850 100644 --- a/recipes/metall/config.yml +++ b/recipes/metall/config.yml @@ -1,4 +1,6 @@ versions: + "0.28": + folder: all "0.27": folder: all "0.26": diff --git a/recipes/mgclient/all/conandata.yml b/recipes/mgclient/all/conandata.yml index a07869d5875d5..d3dddbce027d5 100644 --- a/recipes/mgclient/all/conandata.yml +++ b/recipes/mgclient/all/conandata.yml @@ -1,8 +1,15 @@ sources: + "1.4.3": + url: "https://github.com/memgraph/mgclient/archive/refs/tags/v1.4.3.tar.gz" + sha256: "f446b469532cd5154b8fb986ac57ca9880763e34c77e564d2c4c948989b0244e" "1.4.2": url: "https://github.com/memgraph/mgclient/archive/refs/tags/v1.4.2.tar.gz" sha256: "aa89422636b1e25b8f9f34453f331e15d32a5957a9b2381c3598fc3644dbc043" patches: + "1.4.3": + - patch_file: "patches/1.4.2-0001-static-shared.build.patch" + patch_description: "make static and shared build separated" + patch_type: "conan" "1.4.2": - patch_file: "patches/1.4.2-0001-static-shared.build.patch" patch_description: "make static and shared build separated" diff --git a/recipes/mgclient/config.yml b/recipes/mgclient/config.yml index ba127d382373b..af4203f05155e 100644 --- a/recipes/mgclient/config.yml +++ b/recipes/mgclient/config.yml @@ -1,3 +1,5 @@ versions: + "1.4.3": + folder: all "1.4.2": folder: all diff --git a/recipes/mimalloc/all/conandata.yml b/recipes/mimalloc/all/conandata.yml index 4c93c0b6b2850..879d39b04284b 100644 --- a/recipes/mimalloc/all/conandata.yml +++ b/recipes/mimalloc/all/conandata.yml @@ -1,44 +1,30 @@ sources: + "2.1.7": + url: "https://github.com/microsoft/mimalloc/archive/v2.1.7.tar.gz" + sha256: "0eed39319f139afde8515010ff59baf24de9e47ea316a315398e8027d198202d" "2.1.2": url: "https://github.com/microsoft/mimalloc/archive/v2.1.2.tar.gz" sha256: "2b1bff6f717f9725c70bf8d79e4786da13de8a270059e4ba0bdd262ae7be46eb" "2.0.9": url: "https://github.com/microsoft/mimalloc/archive/v2.0.9.tar.gz" sha256: "4a29edae32a914a706715e2ac8e7e4109e25353212edeed0888f4e3e15db5850" - "2.0.7": - url: "https://github.com/microsoft/mimalloc/archive/v2.0.7.tar.gz" - sha256: "f23aac6c73594e417af50cb38f1efed88ef1dc14a490f0eff07c7f7b079810a4" - "2.0.6": - url: "https://github.com/microsoft/mimalloc/archive/v2.0.6.tar.gz" - sha256: "9f05c94cc2b017ed13698834ac2a3567b6339a8bde27640df5a1581d49d05ce5" - "2.0.5": - url: "https://github.com/microsoft/mimalloc/archive/v2.0.5.tar.gz" - sha256: "fb000a017c289ddc0df749f16fef854e033e496276d8426bdd066b59c476f6cf" - "2.0.3": - url: "https://github.com/microsoft/mimalloc/archive/v2.0.3.tar.gz" - sha256: "5af497f360879bf9d07a5146961d275a25f4177fbe21ee6c437db604422acd60" - "2.0.2": - url: "https://github.com/microsoft/mimalloc/archive/v2.0.2.tar.gz" - sha256: "c81a5f443f72373e3105172d6a935e29b0dabd13ba387c080bc444586cbe3021" + "1.8.7": + url: "https://github.com/microsoft/mimalloc/archive/v1.8.7.tar.gz" + sha256: "347793a2c614e525edc4e286ab5cbc4c7a5efc12503e2dafca276d78394c4f07" "1.8.2": url: "https://github.com/microsoft/mimalloc/archive/v1.8.2.tar.gz" sha256: "4058d53d6ceb75862f32c30a6ee686c3cbb5e965b2c324b828ca454f7fe064f9" "1.7.9": url: "https://github.com/microsoft/mimalloc/archive/v1.7.9.tar.gz" sha256: "45e05be518363d32b2cdcce1a1fac3580895ea2e4524e1a3c7e71145cb58659f" - "1.7.7": - url: "https://github.com/microsoft/mimalloc/archive/v1.7.7.tar.gz" - sha256: "0f6663be1e1764851bf9563fcf7a6b3330e23b933eb4737dd07e3289b87895fe" "1.7.6": url: "https://github.com/microsoft/mimalloc/archive/v1.7.6.tar.gz" sha256: "d74f86ada2329016068bc5a243268f1f555edd620b6a7d6ce89295e7d6cf18da" - "1.7.5": - url: "https://github.com/microsoft/mimalloc/archive/v1.7.5.tar.gz" - sha256: "4f9ed087fc1804a8a77c4225ffc3337468f18d6c4f060c4d44f3a3eff85bc5b6" - "1.6.7": - url: "https://github.com/microsoft/mimalloc/archive/v1.6.7.tar.gz" - sha256: "111b718b496f297f128d842880e72e90e33953cf00b45ba0ccd2167e7340ed17" patches: + "2.1.7": + - patch_file: "patches/2.1.7-0002-support-older-compiler.patch" + patch_description: "fix compilation errors on older compilers" + patch_type: "portability" "2.1.2": - patch_file: "patches/2.1.2-0001-change-install-paths.patch" patch_description: "fix install paths" @@ -53,28 +39,9 @@ patches: - patch_file: "patches/2.0.9-0002-support-older-compiler.patch" patch_description: "fix compilation errors on older compilers" patch_type: "portability" - "2.0.7": - - patch_file: "patches/2.0.7-0001-change-install-paths.patch" - patch_description: "fix install paths" - patch_type: "conan" - "2.0.6": - - patch_file: "patches/2.0.6-0001-change-install-paths.patch" - patch_description: "fix install paths" - patch_type: "conan" - "2.0.5": - - patch_file: "patches/2.0.6-0001-change-install-paths.patch" - patch_description: "fix install paths" - patch_type: "conan" - "2.0.3": - - patch_file: "patches/2.0.3-0001-change-install-paths-avoid-symlink.patch" - patch_description: "fix install paths, disable creating symlink" - patch_type: "conan" - "2.0.2": - - patch_file: "patches/2.0.2-0001-change-install-paths-avoid-symlink.patch" - patch_description: "fix install paths, disable creating symlink" - patch_type: "conan" - - patch_file: "patches/2.0.2-0002-include-cstddef-to-get-std-size-t.patch" - patch_description: "include stddef" + "1.8.7": + - patch_file: "patches/1.8.7-0002-support-older-compiler.patch" + patch_description: "fix compilation errors on older compilers" patch_type: "portability" "1.8.2": - patch_file: "patches/1.8.2-0001-change-install-paths.patch" @@ -90,22 +57,7 @@ patches: - patch_file: "patches/1.7.9-0002-support-older-compiler.patch" patch_description: "fix compilation errors on older compilers" patch_type: "portability" - "1.7.7": - - patch_file: "patches/1.7.7-0001-change-install-paths.patch" - patch_description: "fix install paths" - patch_type: "conan" "1.7.6": - patch_file: "patches/1.7.5-0001-change-install-paths.patch" patch_description: "fix install paths" patch_type: "conan" - "1.7.5": - - patch_file: "patches/1.7.5-0001-change-install-paths.patch" - patch_description: "fix install paths" - patch_type: "conan" - "1.6.7": - - patch_file: "patches/1.6.7-0001-change-install-paths-avoid-symlink.patch" - patch_description: "fix install paths, disable creating symlink" - patch_type: "conan" - - patch_file: "patches/1.6.7-0002-include-cstddef-to-get-std-size-t.patch" - patch_description: "include stddef" - patch_type: "portability" diff --git a/recipes/mimalloc/all/conanfile.py b/recipes/mimalloc/all/conanfile.py index eaa8e6193ea4e..1d36b7541ab29 100644 --- a/recipes/mimalloc/all/conanfile.py +++ b/recipes/mimalloc/all/conanfile.py @@ -1,22 +1,22 @@ from conan import ConanFile from conan.errors import ConanInvalidConfiguration from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout -from conan.tools.files import apply_conandata_patches, export_conandata_patches, get, copy, rm, rmdir, replace_in_file, save, collect_libs +from conan.tools.files import apply_conandata_patches, export_conandata_patches, get, copy, rm, rmdir, replace_in_file, collect_libs from conan.tools.microsoft import is_msvc, is_msvc_static_runtime, VCVars +from conan.tools.env import VirtualBuildEnv from conan.tools.scm import Version import os import shutil -import textwrap -required_conan_version = ">=1.53.0" +required_conan_version = ">=2" class MimallocConan(ConanFile): name = "mimalloc" + description = "mimalloc is a compact general purpose allocator with excellent performance." license = "MIT" url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/microsoft/mimalloc" - description = "mimalloc is a compact general purpose allocator with excellent performance." topics = ("mimalloc", "allocator", "performance", "microsoft") package_type = "library" settings = "os", "arch", "compiler", "build_type" @@ -74,7 +74,7 @@ def layout(self): def validate(self): # Currently, mimalloc some version do not work properly with shared MD builds. # https://github.com/conan-io/conan-center-index/pull/10333#issuecomment-1114110046 - if self.version in ["1.7.6", "1.7.7", "2.0.6", "2.0.7"] and \ + if Version(self.version) == "1.7.6" and \ self.options.shared and \ is_msvc(self) and \ not is_msvc_static_runtime(self): @@ -94,6 +94,9 @@ def validate(self): self.options.get_safe("inject"): raise ConanInvalidConfiguration("Single object is incompatible with library injection") + def build_requirements(self): + self.tool_requires("cmake/[>=3.18 <4]") + def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) @@ -105,9 +108,11 @@ def generate(self): tc.variables["MI_BUILD_OBJECT"] = self.options.get_safe("single_object", False) tc.variables["MI_OVERRIDE"] = "ON" if self.options.override else "OFF" tc.variables["MI_SECURE"] = "ON" if self.options.secure else "OFF" - if Version(self.version) >= "1.7.0": - tc.variables["MI_INSTALL_TOPLEVEL"] = "ON" + tc.variables["MI_WIN_REDIRECT"] = "OFF" + tc.variables["MI_INSTALL_TOPLEVEL"] = "ON" tc.generate() + venv = VirtualBuildEnv(self) + venv.generate(scope="build") if is_msvc(self): vcvars = VCVars(self) @@ -134,8 +139,6 @@ def package(self): if self.options.get_safe("single_object"): rm(self, "*.a", os.path.join(self.package_folder, "lib")) - shutil.move(os.path.join(self.package_folder, self._obj_name + ".o"), - os.path.join(self.package_folder, "lib")) shutil.copy(os.path.join(self.package_folder, "lib", self._obj_name + ".o"), os.path.join(self.package_folder, "lib", self._obj_name)) @@ -151,27 +154,6 @@ def package(self): rmdir(self, os.path.join(self.package_folder, "share")) - cmake_target = "mimalloc" if self.options.shared else "mimalloc-static" - self._create_cmake_module_alias_targets( - os.path.join(self.package_folder, self._module_file_rel_path), - {cmake_target: "mimalloc::mimalloc"} - ) - - def _create_cmake_module_alias_targets(self, module_file, targets): - content = "" - for alias, aliased in targets.items(): - content += textwrap.dedent(f"""\ - if(TARGET {aliased} AND NOT TARGET {alias}) - add_library({alias} INTERFACE IMPORTED) - set_property(TARGET {alias} PROPERTY INTERFACE_LINK_LIBRARIES {aliased}) - endif() - """) - save(self, module_file, content) - - @property - def _module_file_rel_path(self): - return os.path.join("lib", "cmake", f"conan-official-{self.name}-targets.cmake") - @property def _obj_name(self): name = "mimalloc" @@ -197,11 +179,6 @@ def package_info(self): self.cpp_info.set_property("cmake_file_name", "mimalloc") self.cpp_info.set_property("cmake_target_name", "mimalloc" if self.options.shared else "mimalloc-static") - self.cpp_info.names["cmake_find_package"] = "mimalloc" - self.cpp_info.names["cmake_find_package_multi"] = "mimalloc" - self.cpp_info.build_modules["cmake_find_package"] = [self._module_file_rel_path] - self.cpp_info.build_modules["cmake_find_package_multi"] = [self._module_file_rel_path] - if self.options.get_safe("inject"): self.cpp_info.includedirs = [] self.cpp_info.libdirs = [] diff --git a/recipes/mimalloc/all/patches/1.6.7-0001-change-install-paths-avoid-symlink.patch b/recipes/mimalloc/all/patches/1.6.7-0001-change-install-paths-avoid-symlink.patch deleted file mode 100644 index 6fa2c822d32ef..0000000000000 --- a/recipes/mimalloc/all/patches/1.6.7-0001-change-install-paths-avoid-symlink.patch +++ /dev/null @@ -1,40 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 35460e8..e5340d5 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -206,7 +206,7 @@ endif() - # Install and output names - # ----------------------------------------------------------------------------- - --set(mi_install_dir "${CMAKE_INSTALL_PREFIX}/lib/mimalloc-${mi_version}") -+set(mi_install_dir ".") - if(MI_SECURE MATCHES "ON") - set(mi_basename "mimalloc-secure") - else() -@@ -263,7 +263,7 @@ if(MI_BUILD_SHARED) - COMMENT "Copy mimalloc-redirect.dll to output directory") - endif() - -- install(TARGETS mimalloc EXPORT mimalloc DESTINATION ${mi_install_dir} LIBRARY) -+ install(TARGETS mimalloc EXPORT mimalloc RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib) - install(EXPORT mimalloc DESTINATION ${mi_install_dir}/cmake) - endif() - -@@ -287,7 +287,7 @@ if (MI_BUILD_STATIC) - set_target_properties(mimalloc-static PROPERTIES OUTPUT_NAME ${mi_basename}) - endif() - -- install(TARGETS mimalloc-static EXPORT mimalloc DESTINATION ${mi_install_dir}) -+ install(TARGETS mimalloc-static EXPORT mimalloc RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib) - endif() - - # install include files -@@ -297,7 +297,7 @@ install(FILES include/mimalloc-new-delete.h DESTINATION ${mi_install_dir}/includ - install(FILES cmake/mimalloc-config.cmake DESTINATION ${mi_install_dir}/cmake) - install(FILES cmake/mimalloc-config-version.cmake DESTINATION ${mi_install_dir}/cmake) - --if(NOT WIN32 AND MI_BUILD_SHARED) -+if(FALSE) - # install a symlink in the /usr/local/lib to the versioned library - set(mi_symlink "${CMAKE_SHARED_MODULE_PREFIX}${mi_basename}${CMAKE_SHARED_LIBRARY_SUFFIX}") - set(mi_soname "mimalloc-${mi_version}/${mi_symlink}.${mi_version}") diff --git a/recipes/mimalloc/all/patches/1.6.7-0002-include-cstddef-to-get-std-size-t.patch b/recipes/mimalloc/all/patches/1.6.7-0002-include-cstddef-to-get-std-size-t.patch deleted file mode 100644 index b6a13ceb0fb42..0000000000000 --- a/recipes/mimalloc/all/patches/1.6.7-0002-include-cstddef-to-get-std-size-t.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/include/mimalloc.h b/include/mimalloc.h -index 254a7d9..3c3142b 100644 ---- a/include/mimalloc.h -+++ b/include/mimalloc.h -@@ -377,6 +377,7 @@ mi_decl_nodiscard mi_decl_export void* mi_new_reallocn(void* p, size_t newcount, - #ifdef __cplusplus - - #include // PTRDIFF_MAX -+#include // std::size_t - #if (__cplusplus >= 201103L) || (_MSC_VER > 1900) // C++11 - #include // std::true_type - #include // std::forward diff --git a/recipes/mimalloc/all/patches/1.7.7-0001-change-install-paths.patch b/recipes/mimalloc/all/patches/1.7.7-0001-change-install-paths.patch deleted file mode 100644 index 108558a1f1922..0000000000000 --- a/recipes/mimalloc/all/patches/1.7.7-0001-change-install-paths.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 2bc0f76..f40e272 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -360,7 +360,7 @@ if(MI_BUILD_SHARED) - install(FILES "$/mimalloc-redirect${MIMALLOC_REDIRECT_SUFFIX}.dll" DESTINATION ${mi_install_libdir}) - endif() - -- install(TARGETS mimalloc EXPORT mimalloc DESTINATION ${mi_install_libdir} LIBRARY) -+ install(TARGETS mimalloc EXPORT mimalloc RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib) - install(EXPORT mimalloc DESTINATION ${mi_install_cmakedir}) - endif() - -@@ -384,7 +384,7 @@ if (MI_BUILD_STATIC) - set_target_properties(mimalloc-static PROPERTIES OUTPUT_NAME ${mi_basename}) - endif() - -- install(TARGETS mimalloc-static EXPORT mimalloc DESTINATION ${mi_install_objdir} LIBRARY) -+ install(TARGETS mimalloc-static EXPORT mimalloc RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib) - install(EXPORT mimalloc DESTINATION ${mi_install_cmakedir}) - endif() - diff --git a/recipes/mimalloc/all/patches/1.8.7-0002-support-older-compiler.patch b/recipes/mimalloc/all/patches/1.8.7-0002-support-older-compiler.patch new file mode 100644 index 0000000000000..4b1890b784ff9 --- /dev/null +++ b/recipes/mimalloc/all/patches/1.8.7-0002-support-older-compiler.patch @@ -0,0 +1,22 @@ +diff --git a/include/mimalloc.h b/include/mimalloc.h +index ae6f99b..773424e 100644 +--- a/include/mimalloc.h ++++ b/include/mimalloc.h +@@ -511,7 +511,7 @@ template struct _mi_heap_stl_allocator_common : publi + #endif + + void collect(bool force) { mi_heap_collect(this->heap.get(), force); } +- template bool is_equal(const _mi_heap_stl_allocator_common& x) const { return (this->heap == x.heap); } ++ template bool is_equal(const _mi_heap_stl_allocator_common& x) const { return (this->heap == x.heap); } + + protected: + std::shared_ptr heap; +@@ -522,7 +522,7 @@ protected: + this->heap.reset(hp, (_mi_destroy ? &heap_destroy : &heap_delete)); /* calls heap_delete/destroy when the refcount drops to zero */ + } + _mi_heap_stl_allocator_common(const _mi_heap_stl_allocator_common& x) mi_attr_noexcept : heap(x.heap) { } +- template _mi_heap_stl_allocator_common(const _mi_heap_stl_allocator_common& x) mi_attr_noexcept : heap(x.heap) { } ++ template _mi_heap_stl_allocator_common(const _mi_heap_stl_allocator_common& x) mi_attr_noexcept : heap(x.heap) { } + + private: + static void heap_delete(mi_heap_t* hp) { if (hp != NULL) { mi_heap_delete(hp); } } diff --git a/recipes/mimalloc/all/patches/2.0.2-0001-change-install-paths-avoid-symlink.patch b/recipes/mimalloc/all/patches/2.0.2-0001-change-install-paths-avoid-symlink.patch deleted file mode 100644 index ffbc799da2d8e..0000000000000 --- a/recipes/mimalloc/all/patches/2.0.2-0001-change-install-paths-avoid-symlink.patch +++ /dev/null @@ -1,30 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt ---- a/CMakeLists.txt 2021-06-18 00:05:40.000000000 -0300 -+++ b/CMakeLists.txt 2021-07-14 18:02:10.941935678 -0300 -@@ -281,7 +281,7 @@ - COMMENT "Copy mimalloc-redirect${MIMALLOC_REDIRECT_SUFFIX}.dll to output directory") - endif() - -- install(TARGETS mimalloc EXPORT mimalloc DESTINATION ${mi_install_libdir} LIBRARY) -+ install(TARGETS mimalloc EXPORT mimalloc RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib) - install(EXPORT mimalloc DESTINATION ${mi_install_cmakedir}) - endif() - -@@ -305,7 +305,7 @@ - set_target_properties(mimalloc-static PROPERTIES OUTPUT_NAME ${mi_basename}) - endif() - -- install(TARGETS mimalloc-static EXPORT mimalloc DESTINATION ${mi_install_libdir} LIBRARY) -+ install(TARGETS mimalloc-static EXPORT mimalloc RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib) - endif() - - # install include files -@@ -315,7 +315,7 @@ - install(FILES cmake/mimalloc-config.cmake DESTINATION ${mi_install_cmakedir}) - install(FILES cmake/mimalloc-config-version.cmake DESTINATION ${mi_install_cmakedir}) - --if(NOT WIN32 AND MI_BUILD_SHARED AND NOT MI_INSTALL_TOPLEVEL) -+if(FALSE) - # install a symlink in the /usr/local/lib to the versioned library - # note: use delayed prefix expansion as \${CMAKE_INSTALL_PREFIX} - set(mi_symlink "${CMAKE_SHARED_MODULE_PREFIX}${mi_basename}${CMAKE_SHARED_LIBRARY_SUFFIX}") diff --git a/recipes/mimalloc/all/patches/2.0.2-0002-include-cstddef-to-get-std-size-t.patch b/recipes/mimalloc/all/patches/2.0.2-0002-include-cstddef-to-get-std-size-t.patch deleted file mode 100644 index fc8068130bf11..0000000000000 --- a/recipes/mimalloc/all/patches/2.0.2-0002-include-cstddef-to-get-std-size-t.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/include/mimalloc.h b/include/mimalloc.h -index 254a7d9..3c3142b 100644 ---- a/include/mimalloc.h -+++ b/include/mimalloc.h -@@ -387,6 +387,7 @@ mi_decl_nodiscard mi_decl_export void* mi_new_reallocn(void* p, size_t newcount, - #ifdef __cplusplus - - #include // PTRDIFF_MAX -+#include // std::size_t - #if (__cplusplus >= 201103L) || (_MSC_VER > 1900) // C++11 - #include // std::true_type - #include // std::forward diff --git a/recipes/mimalloc/all/patches/2.0.3-0001-change-install-paths-avoid-symlink.patch b/recipes/mimalloc/all/patches/2.0.3-0001-change-install-paths-avoid-symlink.patch deleted file mode 100644 index 00b059ccae3db..0000000000000 --- a/recipes/mimalloc/all/patches/2.0.3-0001-change-install-paths-avoid-symlink.patch +++ /dev/null @@ -1,31 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 580e38c..19fce47 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -305,7 +305,7 @@ if(MI_BUILD_SHARED) - COMMENT "Copy mimalloc-redirect${MIMALLOC_REDIRECT_SUFFIX}.dll to output directory") - endif() - -- install(TARGETS mimalloc EXPORT mimalloc DESTINATION ${mi_install_libdir} LIBRARY) -+ install(TARGETS mimalloc EXPORT mimalloc RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib) - install(EXPORT mimalloc DESTINATION ${mi_install_cmakedir}) - endif() - -@@ -329,7 +329,7 @@ if (MI_BUILD_STATIC) - set_target_properties(mimalloc-static PROPERTIES OUTPUT_NAME ${mi_basename}) - endif() - -- install(TARGETS mimalloc-static EXPORT mimalloc DESTINATION ${mi_install_libdir} LIBRARY) -+ install(TARGETS mimalloc-static EXPORT mimalloc RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib) - endif() - - # install include files -@@ -339,7 +339,7 @@ install(FILES include/mimalloc-new-delete.h DESTINATION ${mi_install_incdir}) - install(FILES cmake/mimalloc-config.cmake DESTINATION ${mi_install_cmakedir}) - install(FILES cmake/mimalloc-config-version.cmake DESTINATION ${mi_install_cmakedir}) - --if(NOT WIN32 AND MI_BUILD_SHARED AND NOT MI_INSTALL_TOPLEVEL) -+if(FALSE) - # install a symlink in the /usr/local/lib to the versioned library - # note: use delayed prefix expansion as \${CMAKE_INSTALL_PREFIX} - set(mi_symlink "${CMAKE_SHARED_MODULE_PREFIX}${mi_basename}${CMAKE_SHARED_LIBRARY_SUFFIX}") diff --git a/recipes/mimalloc/all/patches/2.0.6-0001-change-install-paths.patch b/recipes/mimalloc/all/patches/2.0.6-0001-change-install-paths.patch deleted file mode 100644 index bb266a46ce3f6..0000000000000 --- a/recipes/mimalloc/all/patches/2.0.6-0001-change-install-paths.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 8127e09..af459af 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -319,7 +319,7 @@ if(MI_BUILD_SHARED) - install(FILES "$/mimalloc-redirect${MIMALLOC_REDIRECT_SUFFIX}.dll" DESTINATION ${mi_install_libdir}) - endif() - -- install(TARGETS mimalloc EXPORT mimalloc DESTINATION ${mi_install_libdir} LIBRARY) -+ install(TARGETS mimalloc EXPORT mimalloc RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib) - install(EXPORT mimalloc DESTINATION ${mi_install_cmakedir}) - endif() - -@@ -343,7 +343,7 @@ if (MI_BUILD_STATIC) - set_target_properties(mimalloc-static PROPERTIES OUTPUT_NAME ${mi_basename}) - endif() - -- install(TARGETS mimalloc-static EXPORT mimalloc DESTINATION ${mi_install_objdir} LIBRARY) -+ install(TARGETS mimalloc-static EXPORT mimalloc RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib) - install(EXPORT mimalloc DESTINATION ${mi_install_cmakedir}) - endif() - diff --git a/recipes/mimalloc/all/patches/2.0.7-0001-change-install-paths.patch b/recipes/mimalloc/all/patches/2.0.7-0001-change-install-paths.patch deleted file mode 100644 index adf1e00f9607c..0000000000000 --- a/recipes/mimalloc/all/patches/2.0.7-0001-change-install-paths.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 2550f0d..da42112 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -360,7 +360,7 @@ if(MI_BUILD_SHARED) - install(FILES "$/mimalloc-redirect${MIMALLOC_REDIRECT_SUFFIX}.dll" DESTINATION ${mi_install_libdir}) - endif() - -- install(TARGETS mimalloc EXPORT mimalloc DESTINATION ${mi_install_libdir} LIBRARY) -+ install(TARGETS mimalloc EXPORT mimalloc RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib) - install(EXPORT mimalloc DESTINATION ${mi_install_cmakedir}) - endif() - -@@ -384,7 +384,7 @@ if (MI_BUILD_STATIC) - set_target_properties(mimalloc-static PROPERTIES OUTPUT_NAME ${mi_basename}) - endif() - -- install(TARGETS mimalloc-static EXPORT mimalloc DESTINATION ${mi_install_objdir} LIBRARY) -+ install(TARGETS mimalloc-static EXPORT mimalloc RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib) - install(EXPORT mimalloc DESTINATION ${mi_install_cmakedir}) - endif() - diff --git a/recipes/mimalloc/all/patches/2.1.7-0002-support-older-compiler.patch b/recipes/mimalloc/all/patches/2.1.7-0002-support-older-compiler.patch new file mode 100644 index 0000000000000..34149f1737e9e --- /dev/null +++ b/recipes/mimalloc/all/patches/2.1.7-0002-support-older-compiler.patch @@ -0,0 +1,22 @@ +diff --git a/include/mimalloc.h b/include/mimalloc.h +index c41bcc8..cc4929e 100644 +--- a/include/mimalloc.h ++++ b/include/mimalloc.h +@@ -512,7 +512,7 @@ template struct _mi_heap_stl_allocator_common : publi + #endif + + void collect(bool force) { mi_heap_collect(this->heap.get(), force); } +- template bool is_equal(const _mi_heap_stl_allocator_common& x) const { return (this->heap == x.heap); } ++ template bool is_equal(const _mi_heap_stl_allocator_common& x) const { return (this->heap == x.heap); } + + protected: + std::shared_ptr heap; +@@ -523,7 +523,7 @@ protected: + this->heap.reset(hp, (_mi_destroy ? &heap_destroy : &heap_delete)); /* calls heap_delete/destroy when the refcount drops to zero */ + } + _mi_heap_stl_allocator_common(const _mi_heap_stl_allocator_common& x) mi_attr_noexcept : heap(x.heap) { } +- template _mi_heap_stl_allocator_common(const _mi_heap_stl_allocator_common& x) mi_attr_noexcept : heap(x.heap) { } ++ template _mi_heap_stl_allocator_common(const _mi_heap_stl_allocator_common& x) mi_attr_noexcept : heap(x.heap) { } + + private: + static void heap_delete(mi_heap_t* hp) { if (hp != NULL) { mi_heap_delete(hp); } } diff --git a/recipes/mimalloc/all/test_package/CMakeLists.txt b/recipes/mimalloc/all/test_package/CMakeLists.txt index cf60e66aa36cb..65c3184e9021a 100644 --- a/recipes/mimalloc/all/test_package/CMakeLists.txt +++ b/recipes/mimalloc/all/test_package/CMakeLists.txt @@ -1,51 +1,8 @@ -cmake_minimum_required(VERSION 3.8) -project(test_package LANGUAGES C CXX) - -enable_testing() - -option(BUILD_NO_CHANGES "Build no_changes sources" ON) -option(BUILD_INCLUDE_OVERRIDE "Build include_override sources" ON) -option(BUILD_MI_API "Build mi_api sources" ON) +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES C) find_package(mimalloc REQUIRED CONFIG) -if(TARGET mimalloc-static) - set(MIMALLOC_LIBS mimalloc-static) -else() - set(MIMALLOC_LIBS mimalloc) -endif() - -if(BUILD_NO_CHANGES) - add_executable(no_changes no_changes.c) - target_link_libraries(no_changes PRIVATE ${MIMALLOC_LIBS}) - target_compile_features(no_changes PRIVATE c_std_11) - add_test(NAME no_changes COMMAND no_changes) - - add_executable(no_changes_cpp no_changes.cpp) - target_link_libraries(no_changes_cpp PRIVATE ${MIMALLOC_LIBS}) - target_compile_features(no_changes_cpp PRIVATE cxx_std_17) - add_test(NAME no_changes_cpp COMMAND no_changes_cpp) -endif() - -if(BUILD_INCLUDE_OVERRIDE) - add_executable(include_override include_override.c) - target_link_libraries(include_override PRIVATE ${MIMALLOC_LIBS}) - target_compile_features(include_override PRIVATE c_std_11) - add_test(NAME include_override COMMAND include_override) - - add_executable(include_override_cpp include_override.cpp) - target_link_libraries(include_override_cpp PRIVATE ${MIMALLOC_LIBS}) - target_compile_features(include_override_cpp PRIVATE cxx_std_17) - add_test(NAME include_override_cpp COMMAND include_override_cpp) -endif() - -if(BUILD_MI_API) - add_executable(mi_api mi_api.c) - target_link_libraries(mi_api PRIVATE ${MIMALLOC_LIBS}) - target_compile_features(mi_api PRIVATE c_std_11) - add_test(NAME mi_api COMMAND mi_api) - add_executable(mi_api_cpp mi_api.cpp) - target_link_libraries(mi_api_cpp PRIVATE ${MIMALLOC_LIBS}) - target_compile_features(mi_api_cpp PRIVATE cxx_std_17) - add_test(NAME mi_api_cpp COMMAND mi_api_cpp) -endif() +add_executable(${PROJECT_NAME} test_package.c) +target_link_libraries(${PROJECT_NAME} PRIVATE $,mimalloc,mimalloc-static>) +target_compile_features(${PROJECT_NAME} PRIVATE c_std_99) diff --git a/recipes/mimalloc/all/test_package/conanfile.py b/recipes/mimalloc/all/test_package/conanfile.py index 73d57fff7f138..81b2d147a96f2 100644 --- a/recipes/mimalloc/all/test_package/conanfile.py +++ b/recipes/mimalloc/all/test_package/conanfile.py @@ -1,16 +1,12 @@ from conan import ConanFile -from conan.tools.build import build_jobs, can_run -from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout -from conan.tools.env import Environment -from conan.tools.files import chdir +from conan.tools.build import can_run +from conan.tools.cmake import CMake, cmake_layout import os -import functools class TestPackageConan(ConanFile): settings = "os", "arch", "compiler", "build_type" - generators = "CMakeDeps", "VirtualRunEnv" - test_type = "explicit" + generators = "CMakeToolchain", "CMakeDeps", "VirtualRunEnv" def layout(self): cmake_layout(self) @@ -18,49 +14,6 @@ def layout(self): def requirements(self): self.requires(self.tested_reference_str) - @functools.lru_cache(1) - def _test_files(self): - # No override: - if not self.dependencies["mimalloc"].options.override: - return ["mi_api"] - # Injected override - elif self.dependencies["mimalloc"].options.get_safe("inject"): - if self.settings.os == "Macos": - # Could not simulate Macos preload, so just ignore it - return [] - return ["no_changes"] - # Non injected override - return ["include_override", "mi_api"] - - @property - def _lib_name(self): - name = "mimalloc" if self.settings.os == "Windows" else "libmimalloc" - if self.settings.os == "Windows" and not self.dependencies["mimalloc"].options.shared: - name += "-static" - if self.dependencies["mimalloc"].options.secure: - name += "-secure" - if self.settings.build_type not in ("Release", "RelWithDebInfo", "MinSizeRel"): - name += f"-{str(self.settings.build_type).lower()}" - return name - - def generate(self): - tc = CMakeToolchain(self) - tc.variables["BUILD_NO_CHANGES"] = "no_changes" in self._test_files() - tc.variables["BUILD_INCLUDE_OVERRIDE"] = "include_override" in self._test_files() - tc.variables["BUILD_MI_API"] = "mi_api" in self._test_files() - tc.generate() - - env = Environment() - env.define("MIMALLOC_VERBOSE", "1") - if self.dependencies["mimalloc"].options.get_safe("inject"): - if self.settings.os == "Linux": - env.define("LD_PRELOAD", f"{self._lib_name}.so") - elif self.settings.os == "Macos": - env.define("DYLD_FORCE_FLAT_NAMESPACE", "1") - insert_library = os.path.join(self.dependencies["mimalloc"].cpp_info.libdirs[0], f"{self._lib_name}.dylib") - env.define("DYLD_INSERT_LIBRARIES", insert_library) - env.vars(self, scope="run").save_script("mimalloc_env_file") - def build(self): cmake = CMake(self) cmake.configure() @@ -68,5 +21,5 @@ def build(self): def test(self): if can_run(self): - with chdir(self, self.build_folder): - self.run(f"ctest --output-on-failure -C {self.settings.build_type} -j {build_jobs(self)}", env="conanrun") + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/mimalloc/all/test_package/include_override.c b/recipes/mimalloc/all/test_package/include_override.c deleted file mode 100644 index 5e54990b98f79..0000000000000 --- a/recipes/mimalloc/all/test_package/include_override.c +++ /dev/null @@ -1,11 +0,0 @@ -#include "mimalloc-override.h" - -#include - -int main() { - void *data = malloc(1024); - free(data); - - printf("mimalloc version %d\n", mi_version()); - return 0; -} diff --git a/recipes/mimalloc/all/test_package/include_override.cpp b/recipes/mimalloc/all/test_package/include_override.cpp deleted file mode 100644 index edcb49e3434ee..0000000000000 --- a/recipes/mimalloc/all/test_package/include_override.cpp +++ /dev/null @@ -1,16 +0,0 @@ -#ifdef _WIN32 -#include -#else -#include -#endif - -#include -#include - -int main() { - auto *data = new int(1024); - delete data; - - std::cout << "mimalloc version " << mi_version() << "\n"; - return 0; -} diff --git a/recipes/mimalloc/all/test_package/mi_api.c b/recipes/mimalloc/all/test_package/mi_api.c deleted file mode 100644 index 804f582034b95..0000000000000 --- a/recipes/mimalloc/all/test_package/mi_api.c +++ /dev/null @@ -1,11 +0,0 @@ -#include "mimalloc.h" - -#include -#include - -int main() { - void *data = mi_malloc(1024); - - printf("mimalloc version %d\n", mi_version()); - return 0; -} diff --git a/recipes/mimalloc/all/test_package/mi_api.cpp b/recipes/mimalloc/all/test_package/mi_api.cpp deleted file mode 100644 index a361ab757bf42..0000000000000 --- a/recipes/mimalloc/all/test_package/mi_api.cpp +++ /dev/null @@ -1,13 +0,0 @@ -#include "mimalloc.h" - -#include -#include - -int main() { - std::vector> vec; - vec.push_back(1); - vec.pop_back(); - - std::cout << "mimalloc version " << mi_version() << "\n"; - return 0; -} diff --git a/recipes/mimalloc/all/test_package/no_changes.c b/recipes/mimalloc/all/test_package/no_changes.c deleted file mode 100644 index 51737c1ac50f0..0000000000000 --- a/recipes/mimalloc/all/test_package/no_changes.c +++ /dev/null @@ -1,12 +0,0 @@ -#include -#include - -int main() { - void *data = malloc(1024); - - memset(data, '6', 1024); - - free(data); - - return 0; -} diff --git a/recipes/mimalloc/all/test_package/no_changes.cpp b/recipes/mimalloc/all/test_package/no_changes.cpp deleted file mode 100644 index 7a5ad3df0f22c..0000000000000 --- a/recipes/mimalloc/all/test_package/no_changes.cpp +++ /dev/null @@ -1,8 +0,0 @@ -#include - -int main() { - auto *data = new int(1024); - delete data; - - return 0; -} diff --git a/recipes/mimalloc/all/test_package/test_package.c b/recipes/mimalloc/all/test_package/test_package.c new file mode 100644 index 0000000000000..f73b12d64f5d5 --- /dev/null +++ b/recipes/mimalloc/all/test_package/test_package.c @@ -0,0 +1,11 @@ +#include "mimalloc.h" + +#include +#include + +int main() { + void *data = mi_malloc(32); + + printf("mimalloc version %d\n", mi_version()); + return EXIT_SUCCESS; +} diff --git a/recipes/mimalloc/all/test_v1_package/CMakeLists.txt b/recipes/mimalloc/all/test_v1_package/CMakeLists.txt deleted file mode 100644 index 3f3fae06afa0a..0000000000000 --- a/recipes/mimalloc/all/test_v1_package/CMakeLists.txt +++ /dev/null @@ -1,10 +0,0 @@ -cmake_minimum_required(VERSION 3.8) -project(test_v1_package) - -enable_testing() - -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) - -add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ - ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/mimalloc/all/test_v1_package/conanfile.py b/recipes/mimalloc/all/test_v1_package/conanfile.py deleted file mode 100644 index 7f8fb52960e7a..0000000000000 --- a/recipes/mimalloc/all/test_v1_package/conanfile.py +++ /dev/null @@ -1,70 +0,0 @@ -from conans import ConanFile, CMake, RunEnvironment, tools -from conans.errors import ConanException -import os -import functools - - -class TestPackageConan(ConanFile): - settings = "os", "arch", "compiler", "build_type" - generators = "cmake", "cmake_find_package_multi" - - def _mimalloc_option(self, name, default=None): - try: - return getattr(self.options["mimalloc"], name, default) - except (AttributeError, ConanException): - return default - - @functools.lru_cache(1) - def _test_files(self): - # No override: - if not self.options["mimalloc"].override: - return ["mi_api"] - # Injected override: - elif self._mimalloc_option("inject"): - if self.settings.os == "Macos": - # Could not simulate Macos preload, so just ignore it - return [] - return ["no_changes"] - # Non injected override: - return ["include_override", "mi_api"] - - def build(self): - cmake = CMake(self) - cmake.definitions["BUILD_NO_CHANGES"] = "no_changes" in self._test_files() - cmake.definitions["BUILD_INCLUDE_OVERRIDE"] = "include_override" in self._test_files() - cmake.definitions["BUILD_MI_API"] = "mi_api" in self._test_files() - cmake.configure() - cmake.build() - - @property - def _lib_name(self): - name = "mimalloc" if self.settings.os == "Windows" else "libmimalloc" - if self.settings.os == "Windows" and not self.options["mimalloc"].shared: - name += "-static" - if self.options["mimalloc"].secure: - name += "-secure" - if self.settings.build_type not in ("Release", "RelWithDebInfo", "MinSizeRel"): - name += f"-{str(self.settings.build_type).lower()}" - return name - - @property - def _environment(self): - environment = {"MIMALLOC_VERBOSE": "1"} - - if self._mimalloc_option("inject"): - if self.settings.os == "Linux": - environment["LD_PRELOAD"] = f"{self._lib_name}.so" - elif self.settings.os == "Macos": - env_build = RunEnvironment(self) - insert_library = os.path.join(env_build.vars["DYLD_LIBRARY_PATH"][0], f"{self._lib_name}.dylib") - - environment["DYLD_FORCE_FLAT_NAMESPACE"] = "1" - environment["DYLD_INSERT_LIBRARIES"] = insert_library - - return environment - - def test(self): - if tools.cross_building(self): - return - with tools.environment_append(self._environment): - self.run(f"ctest --output-on-failure -C {self.settings.build_type} -j {tools.cpu_count()}", run_environment=True) diff --git a/recipes/mimalloc/config.yml b/recipes/mimalloc/config.yml index 2f9902ecefeb6..8b0873bb9cd4c 100644 --- a/recipes/mimalloc/config.yml +++ b/recipes/mimalloc/config.yml @@ -1,27 +1,17 @@ versions: + "2.1.7": + folder: all + # mold requires 2.1.2 "2.1.2": folder: all "2.0.9": folder: all - "2.0.7": - folder: all - "2.0.6": - folder: all - "2.0.5": - folder: all - "2.0.3": - folder: all - "2.0.2": + "1.8.7": folder: all "1.8.2": folder: all "1.7.9": folder: all - "1.7.7": - folder: all + # arrow requires 1.7.6 "1.7.6": folder: all - "1.7.5": - folder: all - "1.6.7": - folder: all diff --git a/recipes/mingw-builds/all/conandata.yml b/recipes/mingw-builds/all/conandata.yml index 6703f0f20681d..4f44c4f767124 100644 --- a/recipes/mingw-builds/all/conandata.yml +++ b/recipes/mingw-builds/all/conandata.yml @@ -1,4 +1,26 @@ sources: + "13.2.0": + mcf: + seh: + ucrt: + url: "https://github.com/niXman/mingw-builds-binaries/releases/download/13.2.0-rt_v11-rev1/x86_64-13.2.0-release-mcf-seh-ucrt-rt_v11-rev1.7z" + sha256: "9ae11d0b00f4deae7246471193191de62d9e0318917d3577b568e0974c3069bc" + posix: + seh: + ucrt: + url: "https://github.com/niXman/mingw-builds-binaries/releases/download/13.2.0-rt_v11-rev1/x86_64-13.2.0-release-posix-seh-ucrt-rt_v11-rev1.7z" + sha256: "475ee72c5ce1bd54a3e3c334bdd3be5e6575334184fd9718013aa362c9819d2f" + msvcrt: + url: "https://github.com/niXman/mingw-builds-binaries/releases/download/13.2.0-rt_v11-rev1/x86_64-13.2.0-release-posix-seh-msvcrt-rt_v11-rev1.7z" + sha256: "7d3f84b17b235aa233f0fb5df9765bf79dbea950177a69ff99f8ad1d75b0aa6e" + win32: + seh: + ucrt: + url: "https://github.com/niXman/mingw-builds-binaries/releases/download/13.2.0-rt_v11-rev1/x86_64-13.2.0-release-win32-seh-ucrt-rt_v11-rev1.7z" + sha256: "74ca64c55220edd3196681782fbff653c2b9cb4f427f9e532ab6e9a0823dc997" + msvcrt: + url: "https://github.com/niXman/mingw-builds-binaries/releases/download/13.2.0-rt_v11-rev1/x86_64-13.2.0-release-win32-seh-msvcrt-rt_v11-rev1.7z" + sha256: "15b914f38f2f2e2d6f7b9b8425ff22b7e406878b01920190b09ce0dd8259c6aa" "12.2.0": posix: seh: diff --git a/recipes/mingw-builds/all/conanfile.py b/recipes/mingw-builds/all/conanfile.py index 8b875ba354b42..913b244a11774 100644 --- a/recipes/mingw-builds/all/conanfile.py +++ b/recipes/mingw-builds/all/conanfile.py @@ -2,6 +2,7 @@ from conan import ConanFile from conan.errors import ConanInvalidConfiguration from conan.tools.files import copy, download, rmdir +from conan.tools.scm import Version required_conan_version = ">=1.47.0" @@ -14,14 +15,27 @@ class MingwConan(ConanFile): license = "ZPL-2.1", "MIT", "GPL-2.0-or-later" topics = ("gcc", "gnu", "unix", "mingw32", "binutils") settings = "os", "arch" - options = {"threads": ["posix", "win32"], "exception": ["seh", "sjlj"]} - default_options = {"threads": "posix", "exception": "seh"} + options = { + "threads": ["posix", "win32", "mcf"], + "exception": ["seh", "sjlj"], + "runtime": ["msvcrt", "ucrt"] + } + default_options = { + "threads": "posix", + "exception": "seh", + "runtime": "ucrt" + } provides = "mingw-w64" @property def _settings_build(self): return getattr(self, "settings_build", self.settings) + def config_options(self): + # Before version 12 (included) the only possible runtime was msvcrt + if Version(self.version) <= Version("12.2.0"): + del self.options.runtime + def validate(self): valid_os = ["Windows"] if str(self.settings.os) not in valid_os: @@ -52,15 +66,20 @@ def validate(self): def build_requirements(self): self.build_requires("7zip/19.00") + def _get_source(self): + if Version(self.version) <= Version("12.2.0"): + return self.conan_data["sources"][self.version][str(self.options.threads)][str(self.options.exception)] + else: + return self.conan_data["sources"][self.version][str(self.options.threads)][str(self.options.exception)][str(self.options.runtime)] + def build(self): # Source should be downloaded in the build step since it depends on specific options - url = self.conan_data["sources"][self.version][str(self.options.threads)][str(self.options.exception)] + url = self._get_source() self.output.info(f"Downloading: {url['url']}") download(self, url["url"], "file.7z", sha256=url["sha256"]) self.run("7z x file.7z") os.remove('file.7z') - def package(self): target = "mingw64" if self.settings.arch == "x86_64" else "mingw32" copy(self, "*", src=target, dst=self.package_folder) diff --git a/recipes/mingw-builds/config.yml b/recipes/mingw-builds/config.yml index 6ceaf5fe4c164..337b953faeff9 100644 --- a/recipes/mingw-builds/config.yml +++ b/recipes/mingw-builds/config.yml @@ -1,4 +1,6 @@ versions: + "13.2.0": + folder: "all" "12.2.0": folder: "all" "12.1.0": diff --git a/recipes/minhook/all/conandata.yml b/recipes/minhook/all/conandata.yml new file mode 100644 index 0000000000000..9fbac6aa78698 --- /dev/null +++ b/recipes/minhook/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "1.3.3.cci.20240629": + url: "https://github.com/TsudaKageyu/minhook/archive/91cc9466e383d13a43d7cf33c7c8fdccb27095d3.tar.gz" + sha256: "b84b2ff19afe5fb9430948680146bee2e198392ee6333a71f81e339c36a819f1" diff --git a/recipes/minhook/all/conanfile.py b/recipes/minhook/all/conanfile.py new file mode 100644 index 0000000000000..73c08a93a80d6 --- /dev/null +++ b/recipes/minhook/all/conanfile.py @@ -0,0 +1,69 @@ +import os + +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.files import copy, get, rmdir + +required_conan_version = ">=1.53.0" + + +class PackageConan(ConanFile): + name = "minhook" + description = "The Minimalistic x86/x64 API Hooking Library for Windows" + license = "BSD-2-Clause" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/TsudaKageyu/minhook" + topics = ("hook", "windows") + package_type = "library" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + } + default_options = { + "shared": False, + } + + def configure(self): + # minhook is a plain C projects + self.settings.rm_safe("compiler.cppstd") + self.settings.rm_safe("compiler.libcxx") + + def layout(self): + cmake_layout(self, src_folder="src") + + def validate(self): + if self.settings.os != "Windows": + raise ConanInvalidConfiguration(f"{self.ref} can only be built on Windows.") + + if self.settings.arch not in ["x86", "x86_64"]: + raise ConanInvalidConfiguration(f"{self.ref} can only be built on x86 or x86_64 architectures.") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + deps = CMakeDeps(self) + deps.generate() + tc = CMakeToolchain(self) + tc.generate() + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def package(self): + copy(self, "LICENSE.txt", self.source_folder, os.path.join(self.package_folder, "licenses")) + cmake = CMake(self) + cmake.install() + + rmdir(self, os.path.join(self.package_folder, "lib", "minhook")) + + def package_info(self): + if self.settings.arch == "x86_64": + postfix = ".x64d" if self.settings.build_type == "Debug" else ".x64" + else: + postfix = ".x32d" if self.settings.build_type == "Debug" else ".x32" + + self.cpp_info.libs = [f"minhook{postfix}"] diff --git a/recipes/minhook/all/test_package/CMakeLists.txt b/recipes/minhook/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..a090c65f0323b --- /dev/null +++ b/recipes/minhook/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) + +project(test_package LANGUAGES CXX) + +find_package(minhook REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE minhook::minhook) diff --git a/recipes/minhook/all/test_package/conanfile.py b/recipes/minhook/all/test_package/conanfile.py new file mode 100644 index 0000000000000..d7de1f914ce42 --- /dev/null +++ b/recipes/minhook/all/test_package/conanfile.py @@ -0,0 +1,27 @@ +import os + +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/minhook/all/test_package/test_package.cpp b/recipes/minhook/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..95ccf7f207da6 --- /dev/null +++ b/recipes/minhook/all/test_package/test_package.cpp @@ -0,0 +1,75 @@ +#include + +#include + +#include "MinHook.h" + +typedef int(WINAPI *MESSAGEBOXW)(HWND, LPCWSTR, LPCWSTR, UINT); + +// Pointer for calling original MessageBoxW. +MESSAGEBOXW fpMessageBoxW = NULL; + +// Dummy MessageBox function for testing. +int WINAPI DummyMessageBoxW(HWND hWnd, LPCWSTR lpText, LPCWSTR lpCaption, UINT uType) +{ + const int box_width = 40; + std::wstring text(lpText); + std::wstring caption(lpCaption); + + // Top border + std::wcout << "+" << std::wstring(box_width - 2, '-') << "+\n"; + + // Caption + std::wcout << "| " << caption << std::wstring(box_width - 3 - caption.size(), ' ') << "|\n"; + std::wcout << "| " << std::wstring(box_width - 4, '=') << " |\n"; + + // Text + std::wcout << "| " << text << std::wstring(box_width - 3 - text.size(), ' ') << "|\n"; + + // Bottom border + std::wcout << "+" << std::wstring(box_width - 2, '-') << "+\n"; + + return IDOK; // The OK button was selected. +} + +// Detour function which overrides MessageBoxW. +int WINAPI DetourMessageBoxW(HWND hWnd, LPCWSTR lpText, LPCWSTR lpCaption, UINT uType) +{ + return fpMessageBoxW(hWnd, L"Hooked!", lpCaption, uType); +} + +int main() +{ + // Initialize MinHook. + if (MH_Initialize() != MH_OK) { + return 1; + } + + // Create a hook for MessageBoxW, in disabled state. + if (MH_CreateHook(&DummyMessageBoxW, &DetourMessageBoxW, reinterpret_cast(&fpMessageBoxW)) != MH_OK) { + return 1; + } + + // Enable the hook for MessageBoxW. + if (MH_EnableHook(&DummyMessageBoxW) != MH_OK) { + return 1; + } + + // Expected to tell "Hooked!". + DummyMessageBoxW(NULL, L"Not hooked...", L"MinHook Sample", MB_OK); + + // Disable the hook for MessageBoxW. + if (MH_DisableHook(&DummyMessageBoxW) != MH_OK) { + return 1; + } + + // Expected to tell "Not hooked...". + DummyMessageBoxW(NULL, L"Not hooked...", L"MinHook Sample", MB_OK); + + // Uninitialize MinHook. + if (MH_Uninitialize() != MH_OK) { + return 1; + } + + return 0; +} diff --git a/recipes/minhook/config.yml b/recipes/minhook/config.yml new file mode 100644 index 0000000000000..36b74a86356a1 --- /dev/null +++ b/recipes/minhook/config.yml @@ -0,0 +1,3 @@ +versions: + "1.3.3.cci.20240629": + folder: all diff --git a/recipes/mini/all/conandata.yml b/recipes/mini/all/conandata.yml new file mode 100644 index 0000000000000..5c54e75793e6e --- /dev/null +++ b/recipes/mini/all/conandata.yml @@ -0,0 +1,7 @@ +sources: + "0.9.16": + url: "https://github.com/metayeti/mINI/archive/refs/tags/0.9.16.tar.gz" + sha256: "ce20e12b1e3bcd79d6eaa47bf8d4bb319e843dfa3585e069e73d581bdf0a81ec" + "0.9.15": + url: "https://github.com/metayeti/mINI/archive/refs/tags/0.9.15.tar.gz" + sha256: "241e105ab074827ab8b40582aa7b04c6191f84b244603969965c0874ad4f942c" diff --git a/recipes/mini/all/conanfile.py b/recipes/mini/all/conanfile.py new file mode 100644 index 0000000000000..938a8179ad53f --- /dev/null +++ b/recipes/mini/all/conanfile.py @@ -0,0 +1,65 @@ +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.build import check_min_cppstd +from conan.tools.files import get, copy +from conan.tools.layout import basic_layout +from conan.tools.scm import Version +import os + +required_conan_version = ">=1.52.0" + +class MiniConan(ConanFile): + name = "mini" + description = "INI file reader and writer" + license = "MIT" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/metayeti/mINI" + topics = ("ini", "writer", "reader", "header-only") + package_type = "header-library" + settings = "os", "arch", "compiler", "build_type" + no_copy_source = True + + @property + def _min_cppstd(self): + return 14 + + @property + def _compilers_minimum_version(self): + return { + "Visual Studio": "15", + "msvc": "191", + "gcc": "5", + "clang": "5", + "apple-clang": "5.1", + } + + def layout(self): + basic_layout(self, src_folder="src") + + def package_id(self): + self.info.clear() + + def validate(self): + if self.settings.compiler.get_safe("cppstd"): + check_min_cppstd(self, self._min_cppstd) + minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) + if minimum_version and Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration( + f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." + ) + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def package(self): + copy(self, pattern="LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) + copy( + self, + pattern="*.h", + dst=os.path.join(self.package_folder, "include"), + src=os.path.join(self.source_folder, "src"), + ) + + def package_info(self): + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] diff --git a/recipes/mini/all/test_package/CMakeLists.txt b/recipes/mini/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..b1d6d15b13411 --- /dev/null +++ b/recipes/mini/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) + +find_package(mini REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE mini::mini) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_14) diff --git a/recipes/mini/all/test_package/conanfile.py b/recipes/mini/all/test_package/conanfile.py new file mode 100644 index 0000000000000..3a91c9439218e --- /dev/null +++ b/recipes/mini/all/test_package/conanfile.py @@ -0,0 +1,26 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def layout(self): + cmake_layout(self) + + def requirements(self): + self.requires(self.tested_reference_str) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/mini/all/test_package/test_package.cpp b/recipes/mini/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..ee74c82e08d01 --- /dev/null +++ b/recipes/mini/all/test_package/test_package.cpp @@ -0,0 +1,10 @@ +#include + +#include "mini/ini.h" + +int main(void) { + mINI::INIFile file("test_package.ini"); + + std::cout << "mini test successful \n"; + return 0; +} diff --git a/recipes/mini/config.yml b/recipes/mini/config.yml new file mode 100644 index 0000000000000..8e233bb2eb4ca --- /dev/null +++ b/recipes/mini/config.yml @@ -0,0 +1,5 @@ +versions: + "0.9.16": + folder: all + "0.9.15": + folder: all diff --git a/recipes/minio-cpp/all/conandata.yml b/recipes/minio-cpp/all/conandata.yml new file mode 100644 index 0000000000000..22b7a6392d759 --- /dev/null +++ b/recipes/minio-cpp/all/conandata.yml @@ -0,0 +1,9 @@ +sources: + "0.3.0": + url: "https://github.com/minio/minio-cpp/archive/refs/tags/v0.3.0.tar.gz" + sha256: "da0f2f54bf169ad9e5e9368cc9143df4db056fc5c05bb55d8c1d9065e7211f7c" +patches: + "0.3.0": + - patch_file: "patches/0.3.0-0001-fix-fpic-cmake.patch" + patch_description: "Honor fPIC option in CMakeLists.txt" + patch_type: "conan" diff --git a/recipes/minio-cpp/all/conanfile.py b/recipes/minio-cpp/all/conanfile.py new file mode 100644 index 0000000000000..4a2fe5179d9aa --- /dev/null +++ b/recipes/minio-cpp/all/conanfile.py @@ -0,0 +1,106 @@ +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.build import check_min_cppstd +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rmdir +from conan.tools.scm import Version +import os + + +required_conan_version = ">=1.53.0" + + +class MinioCppConan(ConanFile): + name = "minio-cpp" + description = "MinIO C++ Client SDK for Amazon S3 Compatible Cloud Storage" + license = "Apache-2.0" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/minio/minio-cpp" + topics = ("minio", "s3", "storage") + package_type = "static-library" + settings = "os", "arch", "compiler", "build_type" + options = { + "fPIC": [True, False], + } + default_options = { + "fPIC": True, + } + + @property + def _min_cppstd(self): + return 17 + + @property + def _compilers_minimum_version(self): + return { + "gcc": "8", + "clang": "7", + "apple-clang": "12", + "Visual Studio": "16", + "msvc": "192", + } + + def export_sources(self): + export_conandata_patches(self) + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def layout(self): + cmake_layout(self, src_folder="src") + + def requirements(self): + self.requires("curlpp/0.8.1.cci.20240530", transitive_headers=True) + self.requires("inih/58") + self.requires("nlohmann_json/3.11.3", transitive_headers=True) + self.requires("openssl/[>=1.1 <4]") + self.requires("pugixml/1.14") + self.requires("zlib/[>=1.2.11 <2]") + + def validate(self): + if self.settings.compiler.cppstd: + check_min_cppstd(self, self._min_cppstd) + minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) + if minimum_version and Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration( + f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." + ) + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + tc.generate() + deps = CMakeDeps(self) + deps.set_property("curlpp", "cmake_file_name", "unofficial-curlpp") + deps.set_property("curlpp", "cmake_target_name", "unofficial::curlpp::curlpp") + deps.set_property("inih", "cmake_file_name", "unofficial-inih") + deps.set_property("inih", "cmake_target_name", "unofficial::inih::inireader") + deps.set_property("pugixml", "cmake_target_name", "pugixml") + deps.generate() + + def build(self): + apply_conandata_patches(self) + cmake = CMake(self) + cmake.configure() + cmake.build() + + def package(self): + copy(self, "LICENSE", self.source_folder, os.path.join(self.package_folder, "licenses")) + cmake = CMake(self) + cmake.install() + + rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) + rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) + + def package_info(self): + self.cpp_info.libs = ["miniocpp"] + + self.cpp_info.set_property("cmake_file_name", "miniocpp") + self.cpp_info.set_property("cmake_target_name", "miniocpp::miniocpp") + + if self.settings.os == "Windows": + self.cpp_info.system_libs.append("wsock32") + self.cpp_info.system_libs.append("ws2_32") diff --git a/recipes/minio-cpp/all/patches/0.3.0-0001-fix-fpic-cmake.patch b/recipes/minio-cpp/all/patches/0.3.0-0001-fix-fpic-cmake.patch new file mode 100644 index 0000000000000..5c39cf7208f2e --- /dev/null +++ b/recipes/minio-cpp/all/patches/0.3.0-0001-fix-fpic-cmake.patch @@ -0,0 +1,12 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index c2610db..52bbffa 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -124,7 +124,6 @@ target_include_directories(miniocpp PUBLIC + ) + target_link_libraries(miniocpp PUBLIC ${MINIO_CPP_LIBS}) + set_target_properties(miniocpp PROPERTIES VERSION "${MINIO_CPP_VERSION_STRING}") +-set_target_properties(miniocpp PROPERTIES POSITION_INDEPENDENT_CODE ON) + + # Add a cmake alias - this is how users should use minio-cpp in their cmake projects. + add_library(miniocpp::miniocpp ALIAS miniocpp) diff --git a/recipes/minio-cpp/all/test_package/CMakeLists.txt b/recipes/minio-cpp/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..0c450d7efed7e --- /dev/null +++ b/recipes/minio-cpp/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) + +find_package(miniocpp REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE miniocpp::miniocpp) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) diff --git a/recipes/minio-cpp/all/test_package/conanfile.py b/recipes/minio-cpp/all/test_package/conanfile.py new file mode 100644 index 0000000000000..ef5d7042163ec --- /dev/null +++ b/recipes/minio-cpp/all/test_package/conanfile.py @@ -0,0 +1,26 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/minio-cpp/all/test_package/test_package.cpp b/recipes/minio-cpp/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..76e98c39d2ecf --- /dev/null +++ b/recipes/minio-cpp/all/test_package/test_package.cpp @@ -0,0 +1,9 @@ +#include + +int main(int argc, char* argv[]) { + minio::s3::BaseUrl base_url("example.com"); + + minio::creds::StaticProvider provider("access_key", "secret_key"); + + minio::s3::Client client(base_url, &provider); +} diff --git a/recipes/minio-cpp/config.yml b/recipes/minio-cpp/config.yml new file mode 100644 index 0000000000000..d126790212e0c --- /dev/null +++ b/recipes/minio-cpp/config.yml @@ -0,0 +1,3 @@ +versions: + "0.3.0": + folder: all diff --git a/recipes/minizip-ng/all/conandata.yml b/recipes/minizip-ng/all/conandata.yml index 1c6819fac1991..5c7d70a9a8713 100644 --- a/recipes/minizip-ng/all/conandata.yml +++ b/recipes/minizip-ng/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "4.0.6": + url: "https://github.com/zlib-ng/minizip-ng/archive/4.0.6.tar.gz" + sha256: "e96ed3866706a67dbed05bf035e26ef6b60f408e1381bf0fe9af17fe2c0abebc" "4.0.5": url: "https://github.com/zlib-ng/minizip-ng/archive/4.0.5.tar.gz" sha256: "9bb636474b8a4269280d32aca7de4501f5c24cc642c9b4225b4ed7b327f4ee73" diff --git a/recipes/minizip-ng/all/conanfile.py b/recipes/minizip-ng/all/conanfile.py index 7d26ebb7bc61f..6185768b2d0c8 100644 --- a/recipes/minizip-ng/all/conanfile.py +++ b/recipes/minizip-ng/all/conanfile.py @@ -197,6 +197,8 @@ def package_info(self): self.cpp_info.components["minizip"].requires.append("openssl::openssl") elif is_apple_os(self): self.cpp_info.components["minizip"].frameworks.extend(["CoreFoundation", "Security"]) + elif self.settings.os == "Windows": + self.cpp_info.components["minizip"].system_libs.append("crypt32") if self.settings.os != "Windows" and self.options.with_iconv: self.cpp_info.components["minizip"].requires.append("libiconv::libiconv") diff --git a/recipes/minizip-ng/config.yml b/recipes/minizip-ng/config.yml index c5531d3a6ec01..580a769b6b0a8 100644 --- a/recipes/minizip-ng/config.yml +++ b/recipes/minizip-ng/config.yml @@ -1,4 +1,6 @@ versions: + "4.0.6": + folder: all "4.0.5": folder: all "4.0.4": diff --git a/recipes/minmea/all/conandata.yml b/recipes/minmea/all/conandata.yml new file mode 100644 index 0000000000000..f6a2a3a0d5950 --- /dev/null +++ b/recipes/minmea/all/conandata.yml @@ -0,0 +1,12 @@ +sources: + "0.3.0.cci.20230620": + url: "https://github.com/kosma/minmea/archive/e368d847d75abd891c651f7d30ce5efb6681adb7.tar.gz" + sha256: "9b845dfc7f4475c17710a0ac0823b11a6946df7b20dfacd02b03921826eeab3a" +patches: + "0.3.0.cci.20230620": + - patch_file: "patches/001-disable-pkgconfig-libcheck.patch" + patch_description: "Do not search for libcheck - Exclusive for testing" + patch_type: "conan" + - patch_file: "patches/002-windows-support.patch" + patch_description: "Manage compat header file for Windows" + patch_type: "portability" diff --git a/recipes/minmea/all/conanfile.py b/recipes/minmea/all/conanfile.py new file mode 100644 index 0000000000000..30eb575863037 --- /dev/null +++ b/recipes/minmea/all/conanfile.py @@ -0,0 +1,82 @@ +from conan import ConanFile +from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout +from conan.tools.files import copy, get, apply_conandata_patches, export_conandata_patches +from conan.tools.microsoft import is_msvc +from conan.errors import ConanInvalidConfiguration +import os + +required_conan_version = ">=1.53.0" + +class MinmeaConan(ConanFile): + name = "minmea" + description = "a lightweight GPS NMEA 0183 parser library in pure C" + license = ("WTFPL", "MIT", "LGPL-3.0-or-later") + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/kosma/minmea" + topics = ("gps", "NMEA", "parser") + package_type = "library" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + } + + def export_sources(self): + export_conandata_patches(self) + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + self.settings.rm_safe("compiler.cppstd") + self.settings.rm_safe("compiler.libcxx") + + def layout(self): + cmake_layout(self, src_folder="src") + + def validate(self): + # INFO: Windows mingw supported: https://github.com/kosma/minmea?tab=readme-ov-file#compatibility + # INFO: MSVC fails with error C2011: 'timespec': 'struct' type redefinition + if is_msvc(self): + raise ConanInvalidConfiguration(f"{self.ref} can not be built on Visual Studio and msvc. Use mingw instead or similar.") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + if self.settings.os == "Windows": + tc.preprocessor_definitions["MINMEA_INCLUDE_COMPAT"] = "1" + tc.generate() + + def build(self): + apply_conandata_patches(self) + cmake = CMake(self) + cmake.configure() + cmake.build(target="minmea") + + def package(self): + copy(self, "COPYING", self.source_folder, os.path.join(self.package_folder, "licenses")) + copy(self, "LICENSE.*", self.source_folder, os.path.join(self.package_folder, "licenses")) + copy(self, "minmea.h", self.source_folder, os.path.join(self.package_folder, "include")) + copy(self, "libminmea.a", self.build_folder, os.path.join(self.package_folder, "lib")) + copy(self, "libminmea.so", self.build_folder, os.path.join(self.package_folder, "lib")) + copy(self, "libminmea.dylib", self.build_folder, os.path.join(self.package_folder, "lib")) + if self.settings.os == "Windows": + copy(self, "libminmea.dll.a", self.build_folder, os.path.join(self.package_folder, "lib")) + copy(self, "libminmea.dll", self.build_folder, os.path.join(self.package_folder, "bin")) + copy(self, "minmea_compat.h", self.source_folder, os.path.join(self.package_folder, "include")) + + def package_info(self): + self.cpp_info.libs = ["minmea"] + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.system_libs = ["m"] + if self.settings.os == "Windows": + self.cpp_info.defines = ["MINMEA_INCLUDE_COMPAT=1"] diff --git a/recipes/minmea/all/patches/001-disable-pkgconfig-libcheck.patch b/recipes/minmea/all/patches/001-disable-pkgconfig-libcheck.patch new file mode 100644 index 0000000000000..7e3f4636a811b --- /dev/null +++ b/recipes/minmea/all/patches/001-disable-pkgconfig-libcheck.patch @@ -0,0 +1,12 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index b96e1d7..4674f49 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -6,7 +6,6 @@ project(minmea) + + find_package(Threads REQUIRED) # Workaround for https://github.com/libcheck/check/issues/48#issuecomment-322965461 + find_package(PkgConfig) +-pkg_check_modules(CHECK REQUIRED check) + link_directories(${CHECK_LIBRARY_DIRS}) + + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -Wall -Wextra -Werror -std=c99") diff --git a/recipes/minmea/all/patches/002-windows-support.patch b/recipes/minmea/all/patches/002-windows-support.patch new file mode 100644 index 0000000000000..8f7360ca6288d --- /dev/null +++ b/recipes/minmea/all/patches/002-windows-support.patch @@ -0,0 +1,16 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 4674f49..895b835 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -13,6 +13,11 @@ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_POSIX_C_SOURCE=199309L -D_BSD_SOURCE -D_D + + set(minmea_SRCS minmea.c minmea.h) + add_library(minmea ${minmea_SRCS}) ++target_include_directories(minmea PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}) ++if (WIN32) ++ configure_file(compat/minmea_compat_windows.h ${CMAKE_CURRENT_SOURCE_DIR}/minmea_compat.h COPYONLY) ++ target_compile_definitions(minmea PRIVATE MINMEA_INCLUDE_COMPAT) ++endif() + + add_executable(example example.c) + target_link_libraries(example minmea) diff --git a/recipes/minmea/all/test_package/CMakeLists.txt b/recipes/minmea/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..62bf6147b6fb5 --- /dev/null +++ b/recipes/minmea/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES C) + +find_package(minmea REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.c) +target_link_libraries(${PROJECT_NAME} PRIVATE minmea::minmea) +target_compile_features(${PROJECT_NAME} PRIVATE c_std_99) diff --git a/recipes/minmea/all/test_package/conanfile.py b/recipes/minmea/all/test_package/conanfile.py new file mode 100644 index 0000000000000..ef5d7042163ec --- /dev/null +++ b/recipes/minmea/all/test_package/conanfile.py @@ -0,0 +1,26 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/minmea/all/test_package/test_package.c b/recipes/minmea/all/test_package/test_package.c new file mode 100644 index 0000000000000..9c222e438c9ae --- /dev/null +++ b/recipes/minmea/all/test_package/test_package.c @@ -0,0 +1,16 @@ +#include +#include "minmea.h" + + +int main(void) { + char* nmea_data = "$GPGGA,155246.585,5231.171,N,01321.830,E,1,12,1.0,0.0,M,0.0,M,,*6F"; + + if (minmea_sentence_id(nmea_data, false) == MINMEA_SENTENCE_GGA) { + struct minmea_sentence_gga frame; + if (minmea_parse_gga(&frame, nmea_data)) { + printf("$GGA: fix quality: %d\n", frame.fix_quality); + } + } + + return 0; +} diff --git a/recipes/minmea/config.yml b/recipes/minmea/config.yml new file mode 100644 index 0000000000000..85c5d6a070371 --- /dev/null +++ b/recipes/minmea/config.yml @@ -0,0 +1,3 @@ +versions: + "0.3.0.cci.20230620": + folder: all diff --git a/recipes/mlpack/all/conandata.yml b/recipes/mlpack/all/conandata.yml new file mode 100644 index 0000000000000..13e81aa865d9c --- /dev/null +++ b/recipes/mlpack/all/conandata.yml @@ -0,0 +1,7 @@ +sources: + "4.4.0": + url: "https://github.com/mlpack/mlpack/archive/refs/tags/4.4.0.tar.gz" + sha256: "61c604026d05af26c244b0e47024698bbf150dfcc9d77b64057941d7d64d6cf6" + "4.3.0": + url: "https://github.com/mlpack/mlpack/archive/refs/tags/4.3.0.tar.gz" + sha256: "08cd54f711fde66fc3b6c9db89dc26776f9abf1a6256c77cfa3556e2a56f1a3d" diff --git a/recipes/mlpack/all/conanfile.py b/recipes/mlpack/all/conanfile.py new file mode 100644 index 0000000000000..a09b0e5a3296c --- /dev/null +++ b/recipes/mlpack/all/conanfile.py @@ -0,0 +1,119 @@ +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.build import check_min_cppstd +from conan.tools.files import copy, get, replace_in_file +from conan.tools.layout import basic_layout +from conan.tools.microsoft import is_msvc +from conan.tools.scm import Version +import os + +required_conan_version = ">=1.54.0" + + +class MlpackConan(ConanFile): + name = "mlpack" + description = "mlpack: a fast, header-only C++ machine learning library" + license = "BSD-3-Clause" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/mlpack/mlpack" + topics = ("machine-learning", "deep-learning", "regression", "nearest-neighbor-search", "scientific-computing", "header-only") + + package_type = "header-library" + settings = "os", "arch", "compiler", "build_type" + no_copy_source = True + + @property + def _min_cppstd(self): + if Version(self.version) >= "4.4.0": + return 17 + if is_msvc(self): + return 17 + return 14 + + @property + def _compilers_minimum_version(self): + return { + "gcc": "5", + "clang": "5", + "apple-clang": "5", + "msvc": "191", + "Visual Studio": "15", + } + + def layout(self): + basic_layout(self, src_folder="src") + + def requirements(self): + self.requires("armadillo/12.6.4") + self.requires("cereal/1.3.2") + self.requires("ensmallen/2.21.0") + self.requires("stb/cci.20230920") + # TODO: MSVC OpenMP is not compatible, enable for MSVC after #22353 + if not is_msvc(self): + self.requires("llvm-openmp/17.0.6") + + def package_id(self): + self.info.clear() + + def validate(self): + if self.settings.compiler.get_safe("cppstd"): + check_min_cppstd(self, self._min_cppstd) + minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) + if minimum_version and Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration( + f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." + ) + + if not self.dependencies["armadillo"].options.use_blas or not self.dependencies["armadillo"].options.use_lapack: + raise ConanInvalidConfiguration("mlpack requires armadillo to be built with BLAS and LAPACK support.") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def _configure_headers(self): + # https://github.com/mlpack/mlpack/blob/4.3.0/src/mlpack/config.hpp + config_hpp = os.path.join(self.package_folder, "include", "mlpack", "config.hpp") + replace_in_file(self, config_hpp, "// #define MLPACK_HAS_STB", "#define MLPACK_HAS_STB") + replace_in_file(self, config_hpp, "// #define MLPACK_HAS_NO_STB_DIR", "// #define MLPACK_HAS_NO_STB_DIR") + + def package(self): + copy(self, "LICENSE.txt", self.source_folder, os.path.join(self.package_folder, "licenses")) + copy(self, "*", + os.path.join(self.source_folder, "src"), + os.path.join(self.package_folder, "include"), + excludes=["mlpack/bindings/*", "mlpack/tests/*", "mlpack/CMakeLists.txt"]) + self._configure_headers() + + def package_info(self): + self.cpp_info.set_property("cmake_file_name", "mlpack") + self.cpp_info.set_property("cmake_target_name", "mlpack::mlpack") + self.cpp_info.set_property("pkg_config_name", "mlpack") + + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] + + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.system_libs.extend(["m", "pthread"]) + + if self.settings.get_safe("compiler.libcxx") in ["libstdc++", "libstdc++11"]: + self.cpp_info.system_libs.append("atomic") + + # FIXME: Review this flags assignment. LLVM-OpenMP is already defining these ones. + # Do we want to depend on llvm-openmp? Only for apple-clang? + # For more info, see this comment https://github.com/conan-io/conan-center-index/pull/22353#issuecomment-2214593855 + flags = [] + # Based on https://github.com/Kitware/CMake/blob/v3.28.1/Modules/FindOpenMP.cmake#L104-L135 + if self.settings.compiler == "clang": + flags = ["-fopenmp=libomp"] + elif self.settings.compiler == "gcc": + flags = ["-fopenmp"] + if self.settings.os == "Windows": + flags.append("-Wa,-mbig-obj") + elif self.settings.compiler == "sun-cc": + flags = ["-xopenmp"] + elif is_msvc(self): + # https://github.com/mlpack/mlpack/blob/4.3.0/CMakeLists.txt#L164-L175 + flags = ["-openmp:llvm", "/bigobj", "/Zm200", "/Zc:__cplusplus"] + if flags: + self.cpp_info.cflags = flags + self.cpp_info.cxxflags = flags diff --git a/recipes/mlpack/all/test_package/CMakeLists.txt b/recipes/mlpack/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..a68462fb67d65 --- /dev/null +++ b/recipes/mlpack/all/test_package/CMakeLists.txt @@ -0,0 +1,12 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) + +find_package(mlpack REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE mlpack::mlpack) +if(MSVC OR mlpack_VERSION VERSION_GREATER_EQUAL 4.4.0) + target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) +else() + target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_14) +endif() diff --git a/recipes/mlpack/all/test_package/conanfile.py b/recipes/mlpack/all/test_package/conanfile.py new file mode 100644 index 0000000000000..3a91c9439218e --- /dev/null +++ b/recipes/mlpack/all/test_package/conanfile.py @@ -0,0 +1,26 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def layout(self): + cmake_layout(self) + + def requirements(self): + self.requires(self.tested_reference_str) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/mlpack/all/test_package/test_package.cpp b/recipes/mlpack/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..b5b09f906a9df --- /dev/null +++ b/recipes/mlpack/all/test_package/test_package.cpp @@ -0,0 +1,15 @@ +#include + +using namespace mlpack; + +int main() +{ + const size_t numClasses = 2; + const size_t minimumLeafSize = 5; + const size_t numTrees = 10; + + arma::mat dataset; + arma::Row labels, predictions; + RandomForest rf(dataset, labels, numClasses, numTrees, minimumLeafSize); + rf.Classify(dataset, predictions); +} diff --git a/recipes/mlpack/config.yml b/recipes/mlpack/config.yml new file mode 100644 index 0000000000000..e9bbd51f309ab --- /dev/null +++ b/recipes/mlpack/config.yml @@ -0,0 +1,5 @@ +versions: + "4.4.0": + folder: all + "4.3.0": + folder: all diff --git a/recipes/mocknetworkaccessmanager/all/conanfile.py b/recipes/mocknetworkaccessmanager/all/conanfile.py index 02cad6660ab56..11510320e6ea3 100644 --- a/recipes/mocknetworkaccessmanager/all/conanfile.py +++ b/recipes/mocknetworkaccessmanager/all/conanfile.py @@ -38,9 +38,9 @@ def layout(self): def requirements(self): if self.options.with_qt == 5: - self.requires("qt/5.15.12", transitive_headers=True) + self.requires("qt/[~5.15]", transitive_headers=True) else: - self.requires("qt/6.6.1", transitive_headers=True) + self.requires("qt/[>=6.6 <7]", transitive_headers=True) def validate(self): if self.settings.compiler.get_safe("cppstd"): diff --git a/recipes/modern-cpp-kafka/all/conandata.yml b/recipes/modern-cpp-kafka/all/conandata.yml index 11b37a50dbe81..9477b5d2f991b 100644 --- a/recipes/modern-cpp-kafka/all/conandata.yml +++ b/recipes/modern-cpp-kafka/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2024.07.03": + url: "https://github.com/morganstanley/modern-cpp-kafka/archive/v2024.07.03.tar.gz" + sha256: "06b89b5f2757d2107761d65869b98c3ec71e3c8c7e2cb2ab49277f3272044f02" "2023.03.07": url: "https://github.com/morganstanley/modern-cpp-kafka/archive/v2023.03.07.tar.gz" sha256: "4685527a9768d44ed769ec6e502c3edde0b5cf4d341d8f9b476474955c61bba4" diff --git a/recipes/modern-cpp-kafka/config.yml b/recipes/modern-cpp-kafka/config.yml index a01e300c4e30c..0f76703e92e08 100644 --- a/recipes/modern-cpp-kafka/config.yml +++ b/recipes/modern-cpp-kafka/config.yml @@ -1,4 +1,6 @@ versions: + "2024.07.03": + folder: all "2023.03.07": folder: all "2023.01.05": diff --git a/recipes/mold/README.md b/recipes/mold/README.md new file mode 100644 index 0000000000000..8a1ee68e8c4ed --- /dev/null +++ b/recipes/mold/README.md @@ -0,0 +1,22 @@ +# mold: A Modern Linker + +mold is a faster drop-in replacement for existing Unix linkers. It is several +times quicker than the LLVM lld linker, the second-fastest open-source linker. +mold aims to enhance developer productivity by minimizing build time, +particularly in rapid debug-edit-rebuild cycles. + +You can configure Conan to download the latest version of `mold` and use it as the linker +when building your dependencies and projects from source. Currently only supported +when targeting Linux as the platform. + +To use mold automatically as the linker, you can add the following section to your +_host_ profile that targets Linux. When using gcc, please note that the following +flags require gcc 12.1 or greater. + +``` +[tool_requires] +*:mold/[*] +[conf] +tools.build:exelinkflags=['-fuse-ld=mold'] +tools.build:sharedlinkflags=['-fuse-ld=mold'] +``` diff --git a/recipes/mold/all/conandata.yml b/recipes/mold/all/conandata.yml index 27fad647a9723..6ca00d3d20d1b 100644 --- a/recipes/mold/all/conandata.yml +++ b/recipes/mold/all/conandata.yml @@ -1,22 +1,25 @@ sources: + "2.34.1": + url: "https://github.com/rui314/mold/archive/refs/tags/v2.34.1.tar.gz" + sha256: "a8cf638045b4a4b2697d0bcc77fd96eae93d54d57ad3021bf03b0333a727a59d" + "2.33.0": + url: "https://github.com/rui314/mold/archive/refs/tags/v2.33.0.tar.gz" + sha256: "37b3aacbd9b6accf581b92ba1a98ca418672ae330b78fe56ae542c2dcb10a155" + "2.32.1": + url: "https://github.com/rui314/mold/archive/refs/tags/v2.32.1.tar.gz" + sha256: "f3c9a527d884c635834fe7d79b3de959b00783bf9446280ea274d996f0335825" + "2.32.0": + url: "https://github.com/rui314/mold/archive/refs/tags/v2.32.0.tar.gz" + sha256: "4b7e4146ea0f52be9adae8b417399f3676a041e65b55e3f25f088120d30a320b" + "2.31.0": + url: "https://github.com/rui314/mold/archive/refs/tags/v2.31.0.tar.gz" + sha256: "3dc3af83a5d22a4b29971bfad17261851d426961c665480e2ca294e5c74aa1e5" "2.4.0": url: "https://github.com/rui314/mold/archive/refs/tags/v2.4.0.tar.gz" sha256: "be65f3d785d32ece7b3204ecaa57810847fdd25c232cf704cbfff2dafb1ac107" "2.0.0": url: "https://github.com/rui314/mold/archive/refs/tags/v2.0.0.tar.gz" sha256: "2ae8a22db09cbff626df74c945079fa29c1e5f60bbe02502dcf69191cf43527b" - "1.4.2": - url: "https://github.com/rui314/mold/archive/refs/tags/v1.4.2.tar.gz" - sha256: "47e6c48d20f49e5b47dfb8197dd9ffcb11a8833d614f7a03bd29741c658a69cd" - "1.5.1": - url: "https://github.com/rui314/mold/archive/refs/tags/v1.5.1.tar.gz" - sha256: "ec94aa74758f1bc199a732af95c6304ec98292b87f2f4548ce8436a7c5b054a1" - "1.7.1": - url: "https://github.com/rui314/mold/archive/refs/tags/v1.7.1.tar.gz" - sha256: "fa2558664db79a1e20f09162578632fa856b3cde966fbcb23084c352b827dfa9" - "1.8.0": - url: "https://github.com/rui314/mold/archive/refs/tags/v1.8.0.tar.gz" - sha256: "7210225478796c2528aae30320232a5a3b93a640292575a8c55aa2b140041b5c" "1.11.0": url: "https://github.com/rui314/mold/archive/refs/tags/v1.11.0.tar.gz" sha256: "99318eced81b09a77e4c657011076cc8ec3d4b6867bd324b8677974545bc4d6f" diff --git a/recipes/mold/all/conanfile.py b/recipes/mold/all/conanfile.py index a760cce0d4728..141a8d5af4387 100644 --- a/recipes/mold/all/conanfile.py +++ b/recipes/mold/all/conanfile.py @@ -1,5 +1,6 @@ import os from conan import ConanFile +from conan.tools.build import check_min_cppstd from conan.tools.cmake import CMakeToolchain, CMake, cmake_layout, CMakeDeps from conan.tools.files import copy, get, rmdir from conan.errors import ConanInvalidConfiguration @@ -29,6 +30,20 @@ class MoldConan(ConanFile): "with_mimalloc": False, } + @property + def _min_cppstd(self): + return 20 + + @property + def _compilers_minimum_version(self): + return { + "gcc": "11", + "clang": "12", + "apple-clang": "14", + "Visual Studio": "16", + "msvc": "192", + } + def configure(self): if Version(self.version) < "2.0.0": self.license = "AGPL-3.0" @@ -40,16 +55,28 @@ def layout(self): def requirements(self): self.requires("zlib/[>=1.2.11 <2]") - self.requires("openssl/[>=1.1 <4]") self.requires("xxhash/0.8.2") - self.requires("onetbb/2021.10.0") if self.options.with_mimalloc: self.requires("mimalloc/2.1.2") + if Version(self.version) < "2.2.0": + # Newer versions use vendored-in BLAKE3 + self.requires("openssl/[>=1.1 <4]") def package_id(self): del self.info.settings.compiler def validate(self): + # mold has required C+20 since 1.4.1. However, C++20 features are used for the first time in 2.34.0. + if Version(self.version) >= "2.34.0": + # validate the minimum cpp standard supported. For C++ projects only + if self.settings.compiler.cppstd: + check_min_cppstd(self, self._min_cppstd) + minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) + if minimum_version and Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration( + f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." + ) + # TODO most of these checks should run on validate_build, but the conan-center hooks are broken and fail the PR because they # think we're raising on the build() method if self.settings.build_type == "Debug": @@ -64,6 +91,8 @@ def validate(self): raise ConanInvalidConfiguration("Clang version 12 or higher required") if self.settings.compiler == "apple-clang" and "armv8" == self.settings.arch : raise ConanInvalidConfiguration(f'{self.name} is still not supported by Mac M1.') + if Version(self.version) == "2.33.0" and self.settings.compiler == "apple-clang" and Version(self.settings.compiler.version) < "14": + raise ConanInvalidConfiguration(f'{self.ref} doesn\'t support Apple-Clang < 14.') def build_requirements(self): self.tool_requires("cmake/[>=3.18.0 <4]") @@ -75,7 +104,7 @@ def generate(self): tc = CMakeToolchain(self) tc.variables["MOLD_USE_MIMALLOC"] = self.options.with_mimalloc tc.variables["MOLD_USE_SYSTEM_MIMALLOC"] = True - tc.variables["MOLD_USE_SYSTEM_TBB"] = True + tc.variables["MOLD_USE_SYSTEM_TBB"] = False # see https://github.com/conan-io/conan-center-index/pull/23575#issuecomment-2059154281 tc.variables["CMAKE_INSTALL_LIBEXECDIR"] = "libexec" tc.generate() diff --git a/recipes/mold/config.yml b/recipes/mold/config.yml index b4070800652f5..bd00ef151054f 100644 --- a/recipes/mold/config.yml +++ b/recipes/mold/config.yml @@ -1,15 +1,17 @@ versions: - "2.4.0": + "2.34.1": folder: all - "2.0.0": + "2.33.0": folder: all - "1.4.2": + "2.32.1": folder: all - "1.5.1": + "2.32.0": folder: all - "1.7.1": + "2.31.0": folder: all - "1.8.0": + "2.4.0": + folder: all + "2.0.0": folder: all "1.11.0": folder: all diff --git a/recipes/moltenvk/all/conandata.yml b/recipes/moltenvk/all/conandata.yml index cc7f779fc2f3a..f00f13232e63f 100644 --- a/recipes/moltenvk/all/conandata.yml +++ b/recipes/moltenvk/all/conandata.yml @@ -11,68 +11,30 @@ sources: "1.1.11": url: "https://github.com/KhronosGroup/MoltenVK/archive/refs/tags/v1.1.11.tar.gz" sha256: "938ea0ba13c6538b0ee505ab391a3020f206ab9d29c869f20dd19318a4ee8997" - "1.1.10": - url: "https://github.com/KhronosGroup/MoltenVK/archive/refs/tags/v1.1.10.tar.gz" - sha256: "fac11c2501195c9ce042103685c7778e35484562e6c084963a22072dd0a602e0" - "1.1.9": - url: "https://github.com/KhronosGroup/MoltenVK/archive/refs/tags/v1.1.9.tar.gz" - sha256: "ea455a14decb85ec4bc66ffd2b963492afa7b53297b7064a11ca47ca8d2464ea" - "1.1.8": - url: "https://github.com/KhronosGroup/MoltenVK/archive/refs/tags/v1.1.8.tar.gz" - sha256: "f316c814d0cb6d60a0e8ad164d8cafa64010dee9dd41748b038b6b67fa40f08a" - "1.1.6": - url: "https://github.com/KhronosGroup/MoltenVK/archive/refs/tags/v1.1.6.tar.gz" - sha256: "b60df3ac93b943eb14377019445533b5c451fffd6b1df86187b1b9ac7d6dba6b" - "1.1.5": - url: "https://github.com/KhronosGroup/MoltenVK/archive/refs/tags/v1.1.5.tar.gz" - sha256: "2cdcb8dbf2acdcd8cbe70b109dadc05a901038c84970afbe4863e5e23f33deae" - "1.1.4": - url: "https://github.com/KhronosGroup/MoltenVK/archive/refs/tags/v1.1.4.tar.gz" - sha256: "f9bba6d3bf3648e7685c247cb6d126d62508af614bc549cedd5859a7da64967e" - "1.1.1": - url: "https://github.com/KhronosGroup/MoltenVK/archive/v1.1.1.tar.gz" - sha256: "cd1712c571d4155f4143c435c8551a5cb8cbb311ad7fff03595322ab971682c0" - "1.1.0": - url: "https://github.com/KhronosGroup/MoltenVK/archive/v1.1.0.tar.gz" - sha256: "0538fa1c23ddae495c7f82ccd0db90790a90b7017a258ca7575fbae8021f3058" patches: + "1.2.2": + - patch_file: "patches/1.2.2-0001-MVKSmallVector-Make-iterator-const-correct.patch" + patch_description: "Fix build errors in Xcode 15.3 beta" + patch_type: "portability" + patch_source: "https://github.com/KhronosGroup/MoltenVK/issues/2156" + "1.2.1": + - patch_file: "patches/1.2.2-0001-MVKSmallVector-Make-iterator-const-correct.patch" + patch_description: "Fix build errors in Xcode 15.3 beta" + patch_type: "portability" + patch_source: "https://github.com/KhronosGroup/MoltenVK/issues/2156" "1.2.0": - patch_file: "patches/1.2.0-0001-fix-version-number-icd-json.patch" patch_description: "Fix api_version in MoltenVK_icd.json" patch_type: "portability" patch_source: "https://github.com/KhronosGroup/MoltenVK/pull/1747" + - patch_file: "patches/1.2.2-0001-MVKSmallVector-Make-iterator-const-correct.patch" + patch_description: "Fix build errors in Xcode 15.3 beta" + patch_type: "portability" + patch_source: "https://github.com/KhronosGroup/MoltenVK/issues/2156" "1.1.11": - patch_file: "patches/1.1.11-0001-vulkan-alias-private-extern.patch" patch_description: "Fix vulkan alias symbols when vulkan symbols are hidden" patch_type: "portability" - "1.1.10": - - patch_file: "patches/1.1.8-0002-vulkan-alias-private-extern.patch" - patch_description: "Fix vulkan alias symbols when vulkan symbols are hidden" - patch_type: "portability" - "1.1.9": - - patch_file: "patches/1.1.8-0002-vulkan-alias-private-extern.patch" - patch_description: "Fix vulkan alias symbols when vulkan symbols are hidden" - patch_type: "portability" - "1.1.8": - - patch_file: "patches/1.1.8-0001-allow-c++11-std.patch" - patch_description: "Allow to compile with C++11" - patch_type: "portability" - - patch_file: "patches/1.1.8-0002-vulkan-alias-private-extern.patch" - patch_description: "Fix vulkan alias symbols when vulkan symbols are hidden" - patch_type: "portability" - "1.1.6": - - patch_file: "patches/1.1.6-0001-allow-c++11-std.patch" - patch_description: "Allow to compile with C++11" - patch_type: "portability" - "1.1.5": - - patch_file: "patches/1.1.5-0001-allow-c++11-std.patch" - patch_description: "Allow to compile with C++11" + - patch_file: "patches/1.1.11-fix-MVKSmallVector.patch" + patch_description: "Fix MVKSmallVector build errors for Xcode 15.3" patch_type: "portability" - "1.1.1": - - patch_file: "patches/1.1.0-0001-fix-spirv-cross-includes.patch" - patch_description: "Use spirv-cross include convention" - patch_type: "conan" - "1.1.0": - - patch_file: "patches/1.1.0-0001-fix-spirv-cross-includes.patch" - patch_description: "Use spirv-cross include convention" - patch_type: "conan" diff --git a/recipes/moltenvk/all/dependencies/dependencies-1.1.0.yml b/recipes/moltenvk/all/dependencies/dependencies-1.1.0.yml deleted file mode 100644 index d8c73818a1f7e..0000000000000 --- a/recipes/moltenvk/all/dependencies/dependencies-1.1.0.yml +++ /dev/null @@ -1,4 +0,0 @@ -glslang: "8.13.3559" -spirv-cross: "20200917" -spirv-tools: "2020.5" -vulkan-headers: "1.2.154.0" diff --git a/recipes/moltenvk/all/dependencies/dependencies-1.1.1.yml b/recipes/moltenvk/all/dependencies/dependencies-1.1.1.yml deleted file mode 100644 index 3dd4ee92f5875..0000000000000 --- a/recipes/moltenvk/all/dependencies/dependencies-1.1.1.yml +++ /dev/null @@ -1,4 +0,0 @@ -glslang: "8.13.3559" -spirv-cross: "20210115" -spirv-tools: "2020.5" -vulkan-headers: "1.2.162.0" diff --git a/recipes/moltenvk/all/dependencies/dependencies-1.1.10.yml b/recipes/moltenvk/all/dependencies/dependencies-1.1.10.yml deleted file mode 100644 index 056b9e003fb57..0000000000000 --- a/recipes/moltenvk/all/dependencies/dependencies-1.1.10.yml +++ /dev/null @@ -1,4 +0,0 @@ -glslang: "1.3.216.0" -spirv-cross: "1.3.216.0" -spirv-tools: "1.3.216.0" -vulkan-headers: "1.3.216.0" diff --git a/recipes/moltenvk/all/dependencies/dependencies-1.1.4.yml b/recipes/moltenvk/all/dependencies/dependencies-1.1.4.yml deleted file mode 100644 index b1f4555c6b74e..0000000000000 --- a/recipes/moltenvk/all/dependencies/dependencies-1.1.4.yml +++ /dev/null @@ -1,4 +0,0 @@ -glslang: "11.5.0" -spirv-cross: "cci.20210621" -spirv-tools: "2021.2" -vulkan-headers: "1.2.182" diff --git a/recipes/moltenvk/all/dependencies/dependencies-1.1.5.yml b/recipes/moltenvk/all/dependencies/dependencies-1.1.5.yml deleted file mode 100644 index f358857867637..0000000000000 --- a/recipes/moltenvk/all/dependencies/dependencies-1.1.5.yml +++ /dev/null @@ -1,4 +0,0 @@ -glslang: "11.6.0" -spirv-cross: "cci.20210823" -spirv-tools: "2021.3" -vulkan-headers: "1.2.189" diff --git a/recipes/moltenvk/all/dependencies/dependencies-1.1.6.yml b/recipes/moltenvk/all/dependencies/dependencies-1.1.6.yml deleted file mode 100644 index 50da3fc9cd75d..0000000000000 --- a/recipes/moltenvk/all/dependencies/dependencies-1.1.6.yml +++ /dev/null @@ -1,4 +0,0 @@ -glslang: "11.7.0" -spirv-cross: "cci.20211113" -spirv-tools: "2021.4" -vulkan-headers: "1.2.198.0" diff --git a/recipes/moltenvk/all/dependencies/dependencies-1.1.8.yml b/recipes/moltenvk/all/dependencies/dependencies-1.1.8.yml deleted file mode 100644 index a215ca2513dd4..0000000000000 --- a/recipes/moltenvk/all/dependencies/dependencies-1.1.8.yml +++ /dev/null @@ -1,4 +0,0 @@ -glslang: "1.3.204.0" -spirv-cross: "1.3.204.0" -spirv-tools: "1.3.204.0" -vulkan-headers: "1.3.204.1" diff --git a/recipes/moltenvk/all/dependencies/dependencies-1.1.9.yml b/recipes/moltenvk/all/dependencies/dependencies-1.1.9.yml deleted file mode 100644 index d62197eb0b30f..0000000000000 --- a/recipes/moltenvk/all/dependencies/dependencies-1.1.9.yml +++ /dev/null @@ -1,4 +0,0 @@ -glslang: "1.3.211.0" -spirv-cross: "1.3.211.0" -spirv-tools: "1.3.211.0" -vulkan-headers: "1.3.211.0" diff --git a/recipes/moltenvk/all/dependencies/dependencies-1.2.0.yml b/recipes/moltenvk/all/dependencies/dependencies-1.2.0.yml index 33e0cb279be8b..5d099aa6f64ae 100644 --- a/recipes/moltenvk/all/dependencies/dependencies-1.2.0.yml +++ b/recipes/moltenvk/all/dependencies/dependencies-1.2.0.yml @@ -1,4 +1,4 @@ -glslang: "1.3.231.1" -spirv-cross: "1.3.231.1" -spirv-tools: "1.3.231.1" -vulkan-headers: "1.3.231.1" +glslang: "1.3.239.0" +spirv-cross: "1.3.239.0" +spirv-tools: "1.3.239.0" +vulkan-headers: "1.3.239.0" diff --git a/recipes/moltenvk/all/dependencies/dependencies-1.2.1.yml b/recipes/moltenvk/all/dependencies/dependencies-1.2.1.yml index ba333592e0199..5d099aa6f64ae 100644 --- a/recipes/moltenvk/all/dependencies/dependencies-1.2.1.yml +++ b/recipes/moltenvk/all/dependencies/dependencies-1.2.1.yml @@ -1,4 +1,4 @@ -glslang: "1.3.236.0" -spirv-cross: "1.3.236.0" -spirv-tools: "1.3.236.0" -vulkan-headers: "1.3.236.0" +glslang: "1.3.239.0" +spirv-cross: "1.3.239.0" +spirv-tools: "1.3.239.0" +vulkan-headers: "1.3.239.0" diff --git a/recipes/moltenvk/all/patches/1.1.0-0001-fix-spirv-cross-includes.patch b/recipes/moltenvk/all/patches/1.1.0-0001-fix-spirv-cross-includes.patch deleted file mode 100644 index 5280ed8ddc361..0000000000000 --- a/recipes/moltenvk/all/patches/1.1.0-0001-fix-spirv-cross-includes.patch +++ /dev/null @@ -1,54 +0,0 @@ -see https://github.com/KhronosGroup/MoltenVK/pull/1287 - ---- a/MoltenVK/MoltenVK/GPUObjects/MVKPixelFormats.h -+++ b/MoltenVK/MoltenVK/GPUObjects/MVKPixelFormats.h -@@ -22,7 +22,7 @@ - #include "MVKEnvironment.h" - #include "MVKOSExtensions.h" - #include "MVKBaseObject.h" --#include -+#include - #include - - #import ---- a/MoltenVKShaderConverter/Common/SPIRVSupport.cpp -+++ b/MoltenVKShaderConverter/Common/SPIRVSupport.cpp -@@ -18,7 +18,7 @@ - - #include "SPIRVSupport.h" - #include "MVKStrings.h" --#include -+#include - #include - - #import ---- a/MoltenVKShaderConverter/MoltenVKShaderConverter/SPIRVReflection.h -+++ b/MoltenVKShaderConverter/MoltenVKShaderConverter/SPIRVReflection.h -@@ -19,10 +19,10 @@ - #ifndef __SPIRVReflection_h_ - #define __SPIRVReflection_h_ 1 - --#include --#include --#include --#include -+#include -+#include -+#include -+#include - #include - #include - ---- a/MoltenVKShaderConverter/MoltenVKShaderConverter/SPIRVToMSLConverter.h -+++ b/MoltenVKShaderConverter/MoltenVKShaderConverter/SPIRVToMSLConverter.h -@@ -19,8 +19,8 @@ - #ifndef __SPIRVToMSLConverter_h_ - #define __SPIRVToMSLConverter_h_ 1 - --#include --#include -+#include -+#include - #include - #include - #include diff --git a/recipes/moltenvk/all/patches/1.1.11-fix-MVKSmallVector.patch b/recipes/moltenvk/all/patches/1.1.11-fix-MVKSmallVector.patch new file mode 100644 index 0000000000000..6a11e5548351f --- /dev/null +++ b/recipes/moltenvk/all/patches/1.1.11-fix-MVKSmallVector.patch @@ -0,0 +1,48 @@ +diff --git a/MoltenVK/MoltenVK/Utility/MVKSmallVector.h b/MoltenVK/MoltenVK/Utility/MVKSmallVector.h +index ca19169..39a46dc 100755 +--- a/MoltenVK/MoltenVK/Utility/MVKSmallVector.h ++++ b/MoltenVK/MoltenVK/Utility/MVKSmallVector.h +@@ -85,9 +85,9 @@ public: + return *this; + } + +- Type *operator->() { return &vector->alc.ptr[index]; } +- Type &operator*() { return vector->alc.ptr[index]; } +- operator Type*() { return &vector->alc.ptr[index]; } ++ Type *operator->() const { return &vector->alc.ptr[index]; } ++ Type &operator*() const { return vector->alc.ptr[index]; } ++ operator Type*() const { return &vector->alc.ptr[index]; } + + bool operator==( const iterator &it ) const { return vector == it.vector && index == it.index; } + bool operator!=( const iterator &it ) const { return vector != it.vector || index != it.index; } +@@ -97,20 +97,19 @@ public: + iterator& operator--() { --index; return *this; } + iterator operator--( int ) { auto t = *this; --index; return t; } + +- iterator operator+ (const diff_type n) { return iterator( index + n, *vector ); } +- iterator& operator+= (const diff_type n) { index += n; return *this; } +- iterator operator- (const diff_type n) { return iterator( index - n, *vector ); } +- iterator& operator-= (const diff_type n) { index -= n; return *this; } ++ iterator operator+ (const diff_type n) const { return iterator( index + n, *vector ); } ++ iterator& operator+= (const diff_type n) { index += n; return *this; } ++ iterator operator- (const diff_type n) const { return iterator( index - n, *vector ); } ++ iterator& operator-= (const diff_type n) { index -= n; return *this; } + +- diff_type operator- (const iterator& it) { return index - it.index; } ++ diff_type operator- (const iterator& it) const { return index - it.index; } + +- bool operator< (const iterator& it) { return index < it.index; } +- bool operator<= (const iterator& it) { return index <= it.index; } +- bool operator> (const iterator& it) { return index > it.index; } +- bool operator>= (const iterator& it) { return index >= it.index; } ++ bool operator< (const iterator& it) const { return index < it.index; } ++ bool operator<= (const iterator& it) const { return index <= it.index; } ++ bool operator> (const iterator& it) const { return index > it.index; } ++ bool operator>= (const iterator& it) const { return index >= it.index; } + +- const Type &operator[]( const diff_type i ) const { return vector->alc.ptr[index + i]; } +- Type &operator[]( const diff_type i ) { return vector->alc.ptr[index + i]; } ++ Type &operator[]( const diff_type i ) const { return vector->alc.ptr[index + i]; } + + bool is_valid() const { return index < vector->alc.size(); } + size_t get_position() const { return index; } diff --git a/recipes/moltenvk/all/patches/1.1.5-0001-allow-c++11-std.patch b/recipes/moltenvk/all/patches/1.1.5-0001-allow-c++11-std.patch deleted file mode 100644 index 283e7edc667aa..0000000000000 --- a/recipes/moltenvk/all/patches/1.1.5-0001-allow-c++11-std.patch +++ /dev/null @@ -1,16 +0,0 @@ -upstream issue: https://github.com/KhronosGroup/MoltenVK/issues/1474 - ---- a/MoltenVK/MoltenVK/Commands/MVKCommandBuffer.mm -+++ b/MoltenVK/MoltenVK/Commands/MVKCommandBuffer.mm -@@ -769,7 +769,10 @@ void MVKCommandEncoder::markTimestamp(MVKTimestampQueryPool* pQueryPool, uint32_ - if (sampPts) { - for (uint32_t qOfst = 0; qOfst < queryCount; qOfst++) { - if (mvkIsAnyFlagEnabled(sampPts, MVK_COUNTER_SAMPLING_AT_PIPELINE_STAGE)) { -- _timestampStageCounterQueries.push_back({ pQueryPool, query + qOfst }); -+ GPUCounterQuery timestampCounterQuery = {}; -+ timestampCounterQuery.queryPool = pQueryPool; -+ timestampCounterQuery.query = query + qOfst; -+ _timestampStageCounterQueries.push_back(timestampCounterQuery); - } else { - encodeGPUCounterSample(pQueryPool, query + qOfst, sampPts); - } diff --git a/recipes/moltenvk/all/patches/1.1.6-0001-allow-c++11-std.patch b/recipes/moltenvk/all/patches/1.1.6-0001-allow-c++11-std.patch deleted file mode 100644 index 65bfadc2ebffe..0000000000000 --- a/recipes/moltenvk/all/patches/1.1.6-0001-allow-c++11-std.patch +++ /dev/null @@ -1,16 +0,0 @@ -upstream issue: https://github.com/KhronosGroup/MoltenVK/issues/1474 - ---- a/MoltenVK/MoltenVK/Commands/MVKCommandBuffer.mm -+++ b/MoltenVK/MoltenVK/Commands/MVKCommandBuffer.mm -@@ -772,7 +772,10 @@ void MVKCommandEncoder::markTimestamp(MVKTimestampQueryPool* pQueryPool, uint32_ - MVKCounterSamplingFlags sampPts = _device->_pMetalFeatures->counterSamplingPoints; - for (uint32_t qOfst = 0; qOfst < queryCount; qOfst++) { - if (mvkIsAnyFlagEnabled(sampPts, MVK_COUNTER_SAMPLING_AT_PIPELINE_STAGE)) { -- _timestampStageCounterQueries.push_back({ pQueryPool, query + qOfst }); -+ GPUCounterQuery timestampCounterQuery = {}; -+ timestampCounterQuery.queryPool = pQueryPool; -+ timestampCounterQuery.query = query + qOfst; -+ _timestampStageCounterQueries.push_back(timestampCounterQuery); - } else { - encodeGPUCounterSample(pQueryPool, query + qOfst, sampPts); - } diff --git a/recipes/moltenvk/all/patches/1.1.8-0001-allow-c++11-std.patch b/recipes/moltenvk/all/patches/1.1.8-0001-allow-c++11-std.patch deleted file mode 100644 index 420e890ccf5f4..0000000000000 --- a/recipes/moltenvk/all/patches/1.1.8-0001-allow-c++11-std.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- a/MoltenVK/MoltenVK/Commands/MVKCommandBuffer.mm -+++ b/MoltenVK/MoltenVK/Commands/MVKCommandBuffer.mm -@@ -774,7 +774,10 @@ void MVKCommandEncoder::markTimestamp(MVKTimestampQueryPool* pQueryPool, uint32_ - MVKCounterSamplingFlags sampPts = _device->_pMetalFeatures->counterSamplingPoints; - for (uint32_t qOfst = 0; qOfst < queryCount; qOfst++) { - if (mvkIsAnyFlagEnabled(sampPts, MVK_COUNTER_SAMPLING_AT_PIPELINE_STAGE)) { -- _timestampStageCounterQueries.push_back({ pQueryPool, query + qOfst }); -+ GPUCounterQuery timestampCounterQuery = {}; -+ timestampCounterQuery.queryPool = pQueryPool; -+ timestampCounterQuery.query = query + qOfst; -+ _timestampStageCounterQueries.push_back(timestampCounterQuery); - } else { - encodeGPUCounterSample(pQueryPool, query + qOfst, sampPts); - } diff --git a/recipes/moltenvk/all/patches/1.1.8-0002-vulkan-alias-private-extern.patch b/recipes/moltenvk/all/patches/1.1.8-0002-vulkan-alias-private-extern.patch deleted file mode 100644 index e488faca8335a..0000000000000 --- a/recipes/moltenvk/all/patches/1.1.8-0002-vulkan-alias-private-extern.patch +++ /dev/null @@ -1,21 +0,0 @@ ---- a/Common/MVKCommonEnvironment.h -+++ b/Common/MVKCommonEnvironment.h -@@ -104,6 +104,9 @@ extern "C" { - /** Directive to make a public alias of another symbol. */ - #define MVK_PUBLIC_ALIAS(ALIAS, TARGET) asm(".globl _" #ALIAS "\n\t_" #ALIAS " = _" #TARGET) - -+/** Directive to make a private extern alias of another symbol. */ -+#define MVK_PRIVATE_EXTERN_ALIAS(ALIAS, TARGET) asm(".private_extern _" #ALIAS "\n\t_" #ALIAS " = _" #TARGET) -+ - /** - * Directives to hide public symbols from the Vulkan API, to avoid library linking - * conflicts when bound to a Vulkan Loader that also exports identical symbols. -@@ -113,7 +116,7 @@ extern "C" { - #endif - #if MVK_HIDE_VULKAN_SYMBOLS - # define MVK_PUBLIC_VULKAN_SYMBOL --# define MVK_PUBLIC_VULKAN_ALIAS(ALIAS, TARGET) -+# define MVK_PUBLIC_VULKAN_ALIAS(ALIAS, TARGET) MVK_PRIVATE_EXTERN_ALIAS(ALIAS, TARGET) - #else - # define MVK_PUBLIC_VULKAN_SYMBOL MVK_PUBLIC_SYMBOL - # define MVK_PUBLIC_VULKAN_ALIAS(ALIAS, TARGET) MVK_PUBLIC_ALIAS(ALIAS, TARGET) diff --git a/recipes/moltenvk/all/patches/1.2.2-0001-MVKSmallVector-Make-iterator-const-correct.patch b/recipes/moltenvk/all/patches/1.2.2-0001-MVKSmallVector-Make-iterator-const-correct.patch new file mode 100644 index 0000000000000..77fa33557e448 --- /dev/null +++ b/recipes/moltenvk/all/patches/1.2.2-0001-MVKSmallVector-Make-iterator-const-correct.patch @@ -0,0 +1,51 @@ +see https://github.com/KhronosGroup/MoltenVK/pull/2157 + +diff --git a/MoltenVK/MoltenVK/Utility/MVKSmallVector.h b/MoltenVK/MoltenVK/Utility/MVKSmallVector.h +index 93bcb7fc..9649f2b2 100755 +--- a/MoltenVK/MoltenVK/Utility/MVKSmallVector.h ++++ b/MoltenVK/MoltenVK/Utility/MVKSmallVector.h +@@ -86,9 +86,9 @@ public: + return *this; + } + +- Type *operator->() { return &vector->alc.ptr[index]; } +- Type &operator*() { return vector->alc.ptr[index]; } +- operator Type*() { return &vector->alc.ptr[index]; } ++ Type *operator->() const { return &vector->alc.ptr[index]; } ++ Type &operator*() const { return vector->alc.ptr[index]; } ++ operator Type*() const { return &vector->alc.ptr[index]; } + + bool operator==( const iterator &it ) const { return vector == it.vector && index == it.index; } + bool operator!=( const iterator &it ) const { return vector != it.vector || index != it.index; } +@@ -98,20 +98,19 @@ public: + iterator& operator--() { --index; return *this; } + iterator operator--( int ) { auto t = *this; --index; return t; } + +- iterator operator+ (const diff_type n) { return iterator( index + n, *vector ); } +- iterator& operator+= (const diff_type n) { index += n; return *this; } +- iterator operator- (const diff_type n) { return iterator( index - n, *vector ); } +- iterator& operator-= (const diff_type n) { index -= n; return *this; } ++ iterator operator+ (const diff_type n) const { return iterator( index + n, *vector ); } ++ iterator& operator+= (const diff_type n) { index += n; return *this; } ++ iterator operator- (const diff_type n) const { return iterator( index - n, *vector ); } ++ iterator& operator-= (const diff_type n) { index -= n; return *this; } + +- diff_type operator- (const iterator& it) { return index - it.index; } ++ diff_type operator- (const iterator& it) const { return index - it.index; } + +- bool operator< (const iterator& it) { return index < it.index; } +- bool operator<= (const iterator& it) { return index <= it.index; } +- bool operator> (const iterator& it) { return index > it.index; } +- bool operator>= (const iterator& it) { return index >= it.index; } ++ bool operator< (const iterator& it) const { return index < it.index; } ++ bool operator<= (const iterator& it) const { return index <= it.index; } ++ bool operator> (const iterator& it) const { return index > it.index; } ++ bool operator>= (const iterator& it) const { return index >= it.index; } + +- const Type &operator[]( const diff_type i ) const { return vector->alc.ptr[index + i]; } +- Type &operator[]( const diff_type i ) { return vector->alc.ptr[index + i]; } ++ Type &operator[]( const diff_type i ) const { return vector->alc.ptr[index + i]; } + + bool is_valid() const { return index < vector->alc.size(); } + size_t get_position() const { return index; } +-- diff --git a/recipes/moltenvk/config.yml b/recipes/moltenvk/config.yml index e2b738bf7f2a6..e368ebecaad4f 100644 --- a/recipes/moltenvk/config.yml +++ b/recipes/moltenvk/config.yml @@ -7,19 +7,3 @@ versions: folder: all "1.1.11": folder: all - "1.1.10": - folder: all - "1.1.9": - folder: all - "1.1.8": - folder: all - "1.1.6": - folder: all - "1.1.5": - folder: all - "1.1.4": - folder: all - "1.1.1": - folder: all - "1.1.0": - folder: all diff --git a/recipes/mongo-c-driver/all/conandata.yml b/recipes/mongo-c-driver/all/conandata.yml index 5e5abc368ffce..2decfe8254982 100644 --- a/recipes/mongo-c-driver/all/conandata.yml +++ b/recipes/mongo-c-driver/all/conandata.yml @@ -1,28 +1,19 @@ sources: + "1.29.0": + url: "https://github.com/mongodb/mongo-c-driver/releases/download/1.29.0/mongo-c-driver-1.29.0.tar.gz" + sha256: "e3dbe86e1f40e100344c48a4c0e39d2da360d2b12a54f16031fa8f90ff16fe5e" + "1.28.1": + url: "https://github.com/mongodb/mongo-c-driver/archive/refs/tags/1.28.1.tar.gz" + sha256: "249fd66d8d12aac2aec7dea1456e1bf24908c87971016c391a1a82a636029a87" + "1.27.6": + url: "https://github.com/mongodb/mongo-c-driver/archive/refs/tags/1.27.6.tar.gz" + sha256: "7dee166dd106e3074582dd107f62815aa29311520149cda52efb69590b2cae7a" + "1.26.2": + url: "https://github.com/mongodb/mongo-c-driver/archive/refs/tags/1.26.2.tar.gz" + sha256: "7084c488a758bf226cc0b3d500e7e001f0e2e37391cbeecd341050a9a899857d" "1.24.3": url: "https://github.com/mongodb/mongo-c-driver/releases/download/1.24.3/mongo-c-driver-1.24.3.tar.gz" sha256: "cc0ad1006447ded21bbefecf57d6fef61afe6f0d56a4e28da73805d50fdb81b5" - "1.24.1": - url: "https://github.com/mongodb/mongo-c-driver/releases/download/1.24.1/mongo-c-driver-1.24.1.tar.gz" - sha256: "f9bdf71f24c6621c12535bad07f4654a218d84f16b85a68aca3abf6cd36d1859" - "1.23.5": - url: "https://github.com/mongodb/mongo-c-driver/releases/download/1.23.5/mongo-c-driver-1.23.5.tar.gz" - sha256: "260dc2207881ccbe7b79b1fa6b3ba84ab9be94eb93d4beefbbe8a6cb562947ed" - "1.23.4": - url: "https://github.com/mongodb/mongo-c-driver/releases/download/1.23.4/mongo-c-driver-1.23.4.tar.gz" - sha256: "209406c91fcf7c63aa633179a0a6b1b36ba237fb77e0470fd81f7299a408e334" - "1.23.2": - url: "https://github.com/mongodb/mongo-c-driver/releases/download/1.23.2/mongo-c-driver-1.23.2.tar.gz" - sha256: "123c358827eea07cd76a31c40281bb1c81b6744f6587c96d0cf217be8b1234e3" - "1.22.2": - url: "https://github.com/mongodb/mongo-c-driver/releases/download/1.22.2/mongo-c-driver-1.22.2.tar.gz" - sha256: "2e59b9d38d600bd63ccc0b215dd44c6254a66eeb8085a5ac513748cd6220532e" - "1.22.0": - url: "https://github.com/mongodb/mongo-c-driver/releases/download/1.22.0/mongo-c-driver-1.22.0.tar.gz" - sha256: "272067f75e7e57c98f90a6f0c42500ef818b4b085539343676b6ce6831655eaf" - "1.17.6": - url: "https://github.com/mongodb/mongo-c-driver/releases/download/1.17.6/mongo-c-driver-1.17.6.tar.gz" - sha256: "8644deec7ae585e8d12566978f2017181e883f303a028b5b3ccb83c91248b150" patches: "1.24.3": - patch_file: "patches/1.24.1-0001-disable-shared-when-static.patch" @@ -31,70 +22,3 @@ patches: - patch_file: "patches/1.24.1-0002-fix-uninitialized-warning.patch" patch_description: "fix uninitialized variable warning" patch_type: "portability" - - patch_file: "patches/1.22.0-0003-disable-warning-errors.patch" - patch_description: "disable compiler flags to make warnings into errors" - patch_type: "conan" - "1.24.1": - - patch_file: "patches/1.24.1-0001-disable-shared-when-static.patch" - patch_description: "separate static and shared builds" - patch_type: "conan" - - patch_file: "patches/1.24.1-0002-fix-uninitialized-warning.patch" - patch_description: "fix uninitialized variable warning" - patch_type: "portability" - - patch_file: "patches/1.22.0-0003-disable-warning-errors.patch" - patch_description: "disable compiler flags to make warnings into errors" - patch_type: "conan" - "1.23.5": - - patch_file: "patches/1.23.2-0001-disable-shared-when-static.patch" - patch_description: "separate static and shared builds" - patch_type: "conan" - - patch_file: "patches/1.22.0-0002-fix-uninitialized-warning.patch" - patch_description: "fix uninitialized variable warning" - patch_type: "portability" - - patch_file: "patches/1.22.0-0003-disable-warning-errors.patch" - patch_description: "disable compiler flags to make warnings into errors" - patch_type: "conan" - "1.23.4": - - patch_file: "patches/1.23.2-0001-disable-shared-when-static.patch" - patch_description: "separate static and shared builds" - patch_type: "conan" - - patch_file: "patches/1.22.0-0002-fix-uninitialized-warning.patch" - patch_description: "fix uninitialized variable warning" - patch_type: "portability" - - patch_file: "patches/1.22.0-0003-disable-warning-errors.patch" - patch_description: "disable compiler flags to make warnings into errors" - patch_type: "conan" - "1.23.2": - - patch_file: "patches/1.23.2-0001-disable-shared-when-static.patch" - patch_description: "separate static and shared builds" - patch_type: "conan" - - patch_file: "patches/1.22.0-0002-fix-uninitialized-warning.patch" - patch_description: "fix uninitialized variable warning" - patch_type: "portability" - - patch_file: "patches/1.22.0-0003-disable-warning-errors.patch" - patch_description: "disable compiler flags to make warnings into errors" - patch_type: "conan" - "1.22.2": - - patch_file: "patches/1.22.0-0001-disable-shared-when-static.patch" - patch_description: "separate static and shared builds" - patch_type: "conan" - - patch_file: "patches/1.22.0-0002-fix-uninitialized-warning.patch" - patch_description: "fix uninitialized variable warning" - patch_type: "portability" - - patch_file: "patches/1.22.0-0003-disable-warning-errors.patch" - patch_description: "disable compiler flags to make warnings into errors" - patch_type: "conan" - "1.22.0": - - patch_file: "patches/1.22.0-0001-disable-shared-when-static.patch" - patch_description: "separate static and shared builds" - patch_type: "conan" - - patch_file: "patches/1.22.0-0002-fix-uninitialized-warning.patch" - patch_description: "fix uninitialized variable warning" - patch_type: "portability" - - patch_file: "patches/1.22.0-0003-disable-warning-errors.patch" - patch_description: "disable compiler flags to make warnings into errors" - patch_type: "conan" - "1.17.6": - - patch_file: "patches/1.17.6-0001-disable-shared-when-static.patch" - patch_description: "separate static and shared builds" - patch_type: "conan" diff --git a/recipes/mongo-c-driver/all/conanfile.py b/recipes/mongo-c-driver/all/conanfile.py index abc21a11a2f2b..d3e733eb6de05 100644 --- a/recipes/mongo-c-driver/all/conanfile.py +++ b/recipes/mongo-c-driver/all/conanfile.py @@ -70,15 +70,15 @@ def requirements(self): elif self.options.with_ssl == "libressl": self.requires("libressl/3.5.3") if self.options.with_sasl == "cyrus": - self.requires("cyrus-sasl/2.1.27") + self.requires("cyrus-sasl/2.1.28") if self.options.with_snappy: self.requires("snappy/1.1.10") if self.options.with_zlib: self.requires("zlib/[>=1.2.11 <2]") if self.options.with_zstd: - self.requires("zstd/1.5.5") + self.requires("zstd/[^1.5]") if self.options.with_icu: - self.requires("icu/73.2") + self.requires("icu/74.2") def validate(self): if self.options.with_ssl == "darwin" and not is_apple_os(self): @@ -91,7 +91,7 @@ def validate(self): def build_requirements(self): if self.options.with_ssl == "libressl" or self.options.with_zstd: if not self.conf.get("tools.gnu:pkg_config", check_type=str): - self.tool_requires("pkgconf/2.0.3") + self.tool_requires("pkgconf/2.1.0") def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) @@ -118,10 +118,11 @@ def generate(self): # therefore it defeats conan_toolchain variables, but it works fine with cache_variables tc.cache_variables["ENABLE_SSL"] = self._ssl_cmake_value tc.cache_variables["ENABLE_SASL"] = self._sasl_cmake_value - tc.cache_variables["ENABLE_STATIC"] = "OFF" if self.options.shared else "ON" + tc.cache_variables["ENABLE_SHARED"] = self.options.shared + tc.cache_variables["ENABLE_STATIC"] = not self.options.shared tc.cache_variables["ENABLE_TESTS"] = "OFF" tc.cache_variables["ENABLE_EXAMPLES"] = "OFF" - tc.cache_variables["ENABLE_SRV"] = "ON" if self.options.srv else "OFF" + tc.cache_variables["ENABLE_SRV"] = self.options.srv tc.cache_variables["ENABLE_MAINTAINER_FLAGS"] = "OFF" tc.cache_variables["ENABLE_AUTOMATIC_INIT_AND_CLEANUP"] = "ON" tc.cache_variables["ENABLE_CRYPTO_SYSTEM_PROFILE"] = "OFF" @@ -130,29 +131,34 @@ def generate(self): tc.cache_variables["ENABLE_SHM_COUNTERS"] = "OFF" tc.cache_variables["ENABLE_MONGOC"] = "ON" tc.cache_variables["ENABLE_BSON"] = "ON" - tc.cache_variables["ENABLE_SNAPPY"] = "ON" if self.options.with_snappy else "OFF" + tc.cache_variables["ENABLE_SNAPPY"] = self.options.with_snappy tc.cache_variables["ENABLE_ZLIB"] = "SYSTEM" if self.options.with_zlib else "OFF" - tc.cache_variables["ENABLE_ZSTD"] = "ON" if self.options.with_zstd else "OFF" + tc.cache_variables["ENABLE_ZSTD"] = self.options.with_zstd tc.cache_variables["ENABLE_MAN_PAGES"] = "OFF" tc.cache_variables["ENABLE_HTML_DOCS"] = "OFF" tc.cache_variables["ENABLE_EXTRA_ALIGNMENT"] = "ON" tc.cache_variables["ENABLE_RDTSCP"] = "OFF" tc.cache_variables["ENABLE_APPLE_FRAMEWORK"] = "OFF" - tc.cache_variables["ENABLE_ICU"] = "ON" if self.options.with_icu else "OFF" + tc.cache_variables["ENABLE_ICU"] = self.options.with_icu tc.cache_variables["ENABLE_UNINSTALL"] = "OFF" tc.cache_variables["ENABLE_CLIENT_SIDE_ENCRYPTION"] = "OFF" # libmongocrypt recipe not yet in CCI tc.cache_variables["ENABLE_MONGODB_AWS_AUTH"] = "AUTO" - tc.cache_variables["ENABLE_PIC"] = "ON" if self.options.get_safe("fPIC", True) else "OFF" + tc.cache_variables["ENABLE_PIC"] = self.options.get_safe("fPIC", True) # Avoid to install vc runtime stuff tc.variables["CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP"] = "TRUE" if self.options.with_ssl == "openssl": tc.variables["OPENSSL_ROOT_DIR"] = self.dependencies["openssl"].package_folder.replace("\\", "/") - if Version(self.version) >= "1.20.0": - tc.variables["MONGO_USE_CCACHE"] = False + tc.variables["MONGO_USE_CCACHE"] = False if is_msvc(self): # Should be added because of # https://docs.microsoft.com/en-us/windows/win32/api/synchapi/nf-synchapi-initonceexecuteonce tc.preprocessor_definitions["_WIN32_WINNT"] = "0x0600" + tc.cache_variables["BUILD_VERSION"] = self.version + # Skip some fragile checks + # https://github.com/mongodb/mongo-c-driver/blob/1.25.3/src/libmongoc/CMakeLists.txt#L266-L276 + tc.variables["HAVE_ASN1_STRING_GET0_DATA"] = True # Requires OpenSSL 1.1.0+ + # https://github.com/mongodb/mongo-c-driver/blob/1.25.3/src/libmongoc/CMakeLists.txt#L366-L375 + tc.variables["SASL2_HAVE_SASL_CLIENT_DONE"] = True # Requires Cyrus-SASL 2.1.23+ tc.generate() deps = CMakeDeps(self) @@ -166,18 +172,14 @@ def generate(self): def _patch_sources(self): apply_conandata_patches(self) - to_replace_old_new = [ - # Fix Snappy - {"old": "include (FindSnappy)\nif (SNAPPY_INCLUDE_DIRS)", - "new": "if(ENABLE_SNAPPY MATCHES \"ON\")\n find_package(Snappy REQUIRED)"}, - {"old": "SNAPPY_LIBRARIES", "new": "Snappy_LIBRARIES"}, - {"old": "SNAPPY_INCLUDE_DIRS", "new": "Snappy_INCLUDE_DIRS"}, - # Fix LibreSSL - {"old": "set (SSL_LIBRARIES -ltls -lcrypto)", "new": ""}, - ] - for old_new in to_replace_old_new: - replace_in_file(self, os.path.join(self.source_folder, "src", "libmongoc", "CMakeLists.txt"), - old_new["old"], old_new["new"]) + libmongoc_cmake = os.path.join(self.source_folder, "src", "libmongoc", "CMakeLists.txt") + replace_in_file(self, libmongoc_cmake, + "include (FindSnappy)\nif (SNAPPY_INCLUDE_DIRS)", + 'if(ENABLE_SNAPPY MATCHES "ON")\n find_package(Snappy REQUIRED)') + replace_in_file(self, libmongoc_cmake, "SNAPPY_LIBRARIES", "Snappy_LIBRARIES") + replace_in_file(self, libmongoc_cmake, "SNAPPY_INCLUDE_DIRS", "Snappy_INCLUDE_DIRS") + if Version(self.version) < "1.25": + replace_in_file(self, libmongoc_cmake, "set (SSL_LIBRARIES -ltls -lcrypto)", "") # cleanup rpath replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), "set (CMAKE_INSTALL_RPATH_USE_LINK_PATH ON)", "") diff --git a/recipes/mongo-c-driver/all/patches/1.17.6-0001-disable-shared-when-static.patch b/recipes/mongo-c-driver/all/patches/1.17.6-0001-disable-shared-when-static.patch deleted file mode 100644 index dad7659403d2b..0000000000000 --- a/recipes/mongo-c-driver/all/patches/1.17.6-0001-disable-shared-when-static.patch +++ /dev/null @@ -1,77 +0,0 @@ ---- a/src/libbson/CMakeLists.txt -+++ b/src/libbson/CMakeLists.txt -@@ -230,6 +230,7 @@ set (HEADERS_FORWARDING - ${PROJECT_SOURCE_DIR}/src/bson/forwarding/bson.h - ) - -+if (NOT MONGOC_ENABLE_STATIC_BUILD) - add_library (bson_shared SHARED ${SOURCES} ${HEADERS} ${HEADERS_FORWARDING}) - set (CMAKE_CXX_VISIBILITY_PRESET hidden) - target_compile_definitions (bson_shared PRIVATE BSON_COMPILATION JSONSL_PARSE_NAN) -@@ -279,6 +280,7 @@ if (WIN32) - # must be handled specially since we can't resolve them - set (BSON_SYSTEM_LIBRARIES ${BSON_SYSTEM_LIBRARIES} ws2_32) - endif () -+endif() - - if (MONGOC_ENABLE_STATIC_BUILD) - add_library (bson_static STATIC ${SOURCES} ${HEADERS} ${HEADERS_FORWARDING}) -@@ -337,7 +339,7 @@ set (BSON_HEADER_INSTALL_DIR - ) - - if (MONGOC_ENABLE_STATIC_INSTALL) -- set (TARGETS_TO_INSTALL bson_shared bson_static) -+ set (TARGETS_TO_INSTALL bson_static) - else () - set (TARGETS_TO_INSTALL bson_shared) - endif () ---- a/src/libmongoc/CMakeLists.txt -+++ b/src/libmongoc/CMakeLists.txt -@@ -725,6 +725,7 @@ if (MONGOC_ENABLE_MONGODB_AWS_AUTH) - endif() - endif () - -+if (NOT MONGOC_ENABLE_STATIC_BUILD) - add_library (mongoc_shared SHARED ${SOURCES} ${HEADERS} ${HEADERS_FORWARDING}) - set_target_properties (mongoc_shared PROPERTIES CMAKE_CXX_VISIBILITY_PRESET hidden) - target_link_libraries (mongoc_shared PRIVATE ${LIBRARIES} PUBLIC ${BSON_LIBRARIES}) -@@ -744,6 +745,7 @@ target_compile_definitions (mongoc_shared PRIVATE MONGOC_COMPILATION ${KMS_MSG_D - - set_target_properties (mongoc_shared PROPERTIES VERSION 0.0.0 SOVERSION 0) - set_target_properties (mongoc_shared PROPERTIES OUTPUT_NAME "${MONGOC_OUTPUT_BASENAME}-${MONGOC_API_VERSION}") -+endif() - - if (MONGOC_ENABLE_STATIC_BUILD) - add_library (mongoc_static STATIC ${SOURCES} ${HEADERS} ${HEADERS_FORWARDING}) -@@ -766,6 +768,7 @@ if (MONGOC_ENABLE_STATIC_BUILD) - set_target_properties (mongoc_static PROPERTIES OUTPUT_NAME "${MONGOC_OUTPUT_BASENAME}-static-${MONGOC_API_VERSION}") - endif () - -+if (NOT MONGOC_ENABLE_STATIC_BUILD) - if (ENABLE_APPLE_FRAMEWORK) - set_target_properties (mongoc_shared PROPERTIES - FRAMEWORK TRUE -@@ -776,9 +779,14 @@ if (ENABLE_APPLE_FRAMEWORK) - PUBLIC_HEADER "${HEADERS}" - ) - endif () -+endif() - - add_executable (mongoc-stat ${PROJECT_SOURCE_DIR}/../../src/tools/mongoc-stat.c) -+if (NOT MONGOC_ENABLE_STATIC_BUILD) - target_link_libraries (mongoc-stat mongoc_shared ${LIBRARIES}) -+else () -+target_link_libraries (mongoc-stat mongoc_static ${STATIC_LIBRARIES}) -+endif () - - # mongoc-stat works if shared memory performance counters are enabled. - if (ENABLE_SHM_COUNTERS STREQUAL "ON") -@@ -1040,7 +1048,7 @@ file (COPY ${PROJECT_SOURCE_DIR}/tests/x509gen DESTINATION ${PROJECT_BINARY_DIR} - file (COPY ${PROJECT_SOURCE_DIR}/tests/release_files DESTINATION ${PROJECT_BINARY_DIR}/tests) - - if (MONGOC_ENABLE_STATIC_INSTALL) -- set (TARGETS_TO_INSTALL mongoc_shared mongoc_static) -+ set (TARGETS_TO_INSTALL mongoc_static) - else () - set (TARGETS_TO_INSTALL mongoc_shared) - endif () diff --git a/recipes/mongo-c-driver/all/patches/1.22.0-0001-disable-shared-when-static.patch b/recipes/mongo-c-driver/all/patches/1.22.0-0001-disable-shared-when-static.patch deleted file mode 100644 index 23d005b89467b..0000000000000 --- a/recipes/mongo-c-driver/all/patches/1.22.0-0001-disable-shared-when-static.patch +++ /dev/null @@ -1,77 +0,0 @@ ---- a/src/libbson/CMakeLists.txt -+++ b/src/libbson/CMakeLists.txt -@@ -209,6 +209,7 @@ set (HEADERS_FORWARDING - ${PROJECT_SOURCE_DIR}/src/bson/forwarding/bson.h - ) - -+if (NOT MONGOC_ENABLE_STATIC_BUILD) - add_library (bson_shared SHARED ${SOURCES} ${HEADERS} ${HEADERS_FORWARDING}) - set (CMAKE_CXX_VISIBILITY_PRESET hidden) - target_compile_definitions (bson_shared -@@ -275,6 +276,7 @@ if (WIN32) - # must be handled specially since we can't resolve them - set (BSON_SYSTEM_LIBRARIES ${BSON_SYSTEM_LIBRARIES} ws2_32) - endif () -+endif() - - if (MONGOC_ENABLE_STATIC_BUILD) - add_library (bson_static STATIC ${SOURCES} ${HEADERS} ${HEADERS_FORWARDING}) -@@ -349,7 +351,7 @@ set (BSON_HEADER_INSTALL_DIR - ) - - if (MONGOC_ENABLE_STATIC_INSTALL) -- set (TARGETS_TO_INSTALL bson_shared bson_static) -+ set (TARGETS_TO_INSTALL bson_static) - else () - set (TARGETS_TO_INSTALL bson_shared) - endif () ---- a/src/libmongoc/CMakeLists.txt -+++ b/src/libmongoc/CMakeLists.txt -@@ -758,6 +758,7 @@ if (MONGOC_ENABLE_MONGODB_AWS_AUTH) - endif() - endif () - -+if (NOT MONGOC_ENABLE_STATIC_BUILD) - add_library (mongoc_shared SHARED ${SOURCES} ${HEADERS} ${HEADERS_FORWARDING}) - set_target_properties (mongoc_shared PROPERTIES CMAKE_CXX_VISIBILITY_PRESET hidden) - target_link_libraries (mongoc_shared PRIVATE ${LIBRARIES} PUBLIC ${BSON_LIBRARIES}) -@@ -795,6 +796,7 @@ target_include_directories ( - - set_target_properties (mongoc_shared PROPERTIES VERSION 0.0.0 SOVERSION 0) - set_target_properties (mongoc_shared PROPERTIES OUTPUT_NAME "${MONGOC_OUTPUT_BASENAME}-${MONGOC_API_VERSION}") -+endif() - - if (MONGOC_ENABLE_STATIC_BUILD) - add_library (mongoc_static STATIC ${SOURCES} ${HEADERS} ${HEADERS_FORWARDING}) -@@ -835,6 +837,7 @@ if (MONGOC_ENABLE_STATIC_BUILD) - set_target_properties (mongoc_static PROPERTIES OUTPUT_NAME "${MONGOC_OUTPUT_BASENAME}-static-${MONGOC_API_VERSION}") - endif () - -+if (NOT MONGOC_ENABLE_STATIC_BUILD) - if (ENABLE_APPLE_FRAMEWORK) - set_target_properties (mongoc_shared PROPERTIES - FRAMEWORK TRUE -@@ -845,9 +848,14 @@ if (ENABLE_APPLE_FRAMEWORK) - PUBLIC_HEADER "${HEADERS}" - ) - endif () -+endif() - - add_executable (mongoc-stat ${PROJECT_SOURCE_DIR}/../../src/tools/mongoc-stat.c) -+if (NOT MONGOC_ENABLE_STATIC_BUILD) - target_link_libraries (mongoc-stat mongoc_shared ${LIBRARIES}) -+else () -+target_link_libraries (mongoc-stat mongoc_static ${STATIC_LIBRARIES}) -+endif () - - # mongoc-stat works if shared memory performance counters are enabled. - if (ENABLE_SHM_COUNTERS STREQUAL "ON") -@@ -1161,7 +1169,7 @@ file (COPY ${PROJECT_SOURCE_DIR}/tests/x509gen DESTINATION ${PROJECT_BINARY_DIR} - file (COPY ${PROJECT_SOURCE_DIR}/tests/release_files DESTINATION ${PROJECT_BINARY_DIR}/tests) - - if (MONGOC_ENABLE_STATIC_INSTALL) -- set (TARGETS_TO_INSTALL mongoc_shared mongoc_static) -+ set (TARGETS_TO_INSTALL mongoc_static) - else () - set (TARGETS_TO_INSTALL mongoc_shared) - endif () diff --git a/recipes/mongo-c-driver/all/patches/1.22.0-0002-fix-uninitialized-warning.patch b/recipes/mongo-c-driver/all/patches/1.22.0-0002-fix-uninitialized-warning.patch deleted file mode 100644 index 3c24ab717c0d5..0000000000000 --- a/recipes/mongo-c-driver/all/patches/1.22.0-0002-fix-uninitialized-warning.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/src/libbson/src/bson/bson-iter.c b/src/libbson/src/bson/bson-iter.c -index 7b4630f..ee70f12 100644 ---- a/src/libbson/src/bson/bson-iter.c -+++ b/src/libbson/src/bson/bson-iter.c -@@ -2141,7 +2141,7 @@ bson_iter_visit_all (bson_iter_t *iter, /* INOUT */ - - if (iter->err_off) { - if (unsupported && visitor->visit_unsupported_type && -- bson_utf8_validate (key, strlen (key), false)) { -+ key != NULL && bson_utf8_validate (key, strlen (key), false)) { - visitor->visit_unsupported_type (iter, key, bson_type, data); - return false; - } diff --git a/recipes/mongo-c-driver/all/patches/1.22.0-0003-disable-warning-errors.patch b/recipes/mongo-c-driver/all/patches/1.22.0-0003-disable-warning-errors.patch deleted file mode 100644 index 2ade48e877823..0000000000000 --- a/recipes/mongo-c-driver/all/patches/1.22.0-0003-disable-warning-errors.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff --git a/build/cmake/MongoC-Warnings.cmake b/build/cmake/MongoC-Warnings.cmake -index 4784c93..99745c3 100644 ---- a/build/cmake/MongoC-Warnings.cmake -+++ b/build/cmake/MongoC-Warnings.cmake -@@ -58,10 +58,6 @@ mongoc_add_platform_compile_options ( - gnu-like:$<${is_c_lang}:-Werror=implicit> msvc:/we4013 msvc:/we4431 - # Missing return types/statements - gnu-like:-Werror=return-type msvc:/we4716 -- # Incompatible pointer types -- gnu-like:$<$:-Werror=incompatible-pointer-types> msvc:/we4113 -- # Integral/pointer conversions -- gnu-like:$<$:-Werror=int-conversion> msvc:/we4047 - # Discarding qualifiers - gnu:$<$:-Werror=discarded-qualifiers> - clang:$<${is_c_lang}:-Werror=ignored-qualifiers> diff --git a/recipes/mongo-c-driver/all/patches/1.23.2-0001-disable-shared-when-static.patch b/recipes/mongo-c-driver/all/patches/1.23.2-0001-disable-shared-when-static.patch deleted file mode 100644 index 1b39914f6b921..0000000000000 --- a/recipes/mongo-c-driver/all/patches/1.23.2-0001-disable-shared-when-static.patch +++ /dev/null @@ -1,82 +0,0 @@ -diff --git a/src/libbson/CMakeLists.txt b/src/libbson/CMakeLists.txt -index d6df66f..dccdfee 100644 ---- a/src/libbson/CMakeLists.txt -+++ b/src/libbson/CMakeLists.txt -@@ -209,6 +209,7 @@ set (HEADERS_FORWARDING - ${PROJECT_SOURCE_DIR}/src/bson/forwarding/bson.h - ) - -+if (NOT MONGOC_ENABLE_STATIC_BUILD) - add_library (bson_shared SHARED ${SOURCES} ${HEADERS} ${HEADERS_FORWARDING}) - set (CMAKE_CXX_VISIBILITY_PRESET hidden) - target_compile_definitions (bson_shared -@@ -275,6 +276,7 @@ if (WIN32) - # must be handled specially since we can't resolve them - set (BSON_SYSTEM_LIBRARIES ${BSON_SYSTEM_LIBRARIES} ws2_32) - endif () -+endif() - - if (MONGOC_ENABLE_STATIC_BUILD) - add_library (bson_static STATIC ${SOURCES} ${HEADERS} ${HEADERS_FORWARDING}) -@@ -349,7 +351,7 @@ set (BSON_HEADER_INSTALL_DIR - ) - - if (MONGOC_ENABLE_STATIC_INSTALL) -- set (TARGETS_TO_INSTALL bson_shared bson_static) -+ set (TARGETS_TO_INSTALL bson_static) - else () - set (TARGETS_TO_INSTALL bson_shared) - endif () -diff --git a/src/libmongoc/CMakeLists.txt b/src/libmongoc/CMakeLists.txt -index 39f66ac..3f4eefc 100644 ---- a/src/libmongoc/CMakeLists.txt -+++ b/src/libmongoc/CMakeLists.txt -@@ -758,6 +758,7 @@ if (MONGOC_ENABLE_MONGODB_AWS_AUTH) - endif() - endif () - -+if (NOT MONGOC_ENABLE_STATIC_BUILD) - add_library (mongoc_shared SHARED ${SOURCES} ${HEADERS} ${HEADERS_FORWARDING}) - set_target_properties (mongoc_shared PROPERTIES CMAKE_CXX_VISIBILITY_PRESET hidden) - target_link_libraries (mongoc_shared PRIVATE ${LIBRARIES} PUBLIC ${BSON_LIBRARIES}) -@@ -795,6 +796,7 @@ target_include_directories ( - - set_target_properties (mongoc_shared PROPERTIES VERSION 0.0.0 SOVERSION 0) - set_target_properties (mongoc_shared PROPERTIES OUTPUT_NAME "${MONGOC_OUTPUT_BASENAME}-${MONGOC_API_VERSION}") -+endif() - - if (MONGOC_ENABLE_STATIC_BUILD) - add_library (mongoc_static STATIC ${SOURCES} ${HEADERS} ${HEADERS_FORWARDING}) -@@ -835,6 +837,7 @@ if (MONGOC_ENABLE_STATIC_BUILD) - set_target_properties (mongoc_static PROPERTIES OUTPUT_NAME "${MONGOC_OUTPUT_BASENAME}-static-${MONGOC_API_VERSION}") - endif () - -+if (NOT MONGOC_ENABLE_STATIC_BUILD) - if (ENABLE_APPLE_FRAMEWORK) - set_target_properties (mongoc_shared PROPERTIES - FRAMEWORK TRUE -@@ -845,9 +848,15 @@ if (ENABLE_APPLE_FRAMEWORK) - PUBLIC_HEADER "${HEADERS}" - ) - endif () -+endif() - - add_executable (mongoc-stat ${PROJECT_SOURCE_DIR}/../../src/tools/mongoc-stat.c) -+if (NOT MONGOC_ENABLE_STATIC_BUILD) - target_link_libraries (mongoc-stat mongoc_shared ${LIBRARIES}) -+else () -+target_link_libraries (mongoc-stat mongoc_static ${STATIC_LIBRARIES}) -+endif () -+ - - # mongoc-stat works if shared memory performance counters are enabled. - if (ENABLE_SHM_COUNTERS STREQUAL "ON") -@@ -1128,7 +1137,7 @@ file (COPY ${PROJECT_SOURCE_DIR}/tests/x509gen DESTINATION ${PROJECT_BINARY_DIR} - file (COPY ${PROJECT_SOURCE_DIR}/tests/release_files DESTINATION ${PROJECT_BINARY_DIR}/tests) - - if (MONGOC_ENABLE_STATIC_INSTALL) -- set (TARGETS_TO_INSTALL mongoc_shared mongoc_static) -+ set (TARGETS_TO_INSTALL mongoc_static) - else () - set (TARGETS_TO_INSTALL mongoc_shared) - endif () diff --git a/recipes/mongo-c-driver/all/test_v1_package/CMakeLists.txt b/recipes/mongo-c-driver/all/test_v1_package/CMakeLists.txt deleted file mode 100644 index 0d20897301b68..0000000000000 --- a/recipes/mongo-c-driver/all/test_v1_package/CMakeLists.txt +++ /dev/null @@ -1,8 +0,0 @@ -cmake_minimum_required(VERSION 3.1) -project(test_package) - -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) - -add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package - ${CMAKE_CURRENT_BINARY_DIR}/test_package) diff --git a/recipes/mongo-c-driver/all/test_v1_package/conanfile.py b/recipes/mongo-c-driver/all/test_v1_package/conanfile.py deleted file mode 100644 index 38f4483872d47..0000000000000 --- a/recipes/mongo-c-driver/all/test_v1_package/conanfile.py +++ /dev/null @@ -1,17 +0,0 @@ -from conans import ConanFile, CMake, tools -import os - - -class TestPackageConan(ConanFile): - settings = "os", "arch", "compiler", "build_type" - generators = "cmake", "cmake_find_package_multi" - - def build(self): - cmake = CMake(self) - cmake.configure() - cmake.build() - - def test(self): - if not tools.cross_building(self): - bin_path = os.path.join("bin", "test_package") - self.run(bin_path, run_environment=True) diff --git a/recipes/mongo-c-driver/config.yml b/recipes/mongo-c-driver/config.yml index c20e8c0d07847..4bae708190ef5 100644 --- a/recipes/mongo-c-driver/config.yml +++ b/recipes/mongo-c-driver/config.yml @@ -1,17 +1,11 @@ versions: - "1.24.3": - folder: all - "1.24.1": - folder: all - "1.23.5": + "1.29.0": folder: all - "1.23.4": + "1.28.1": folder: all - "1.23.2": + "1.27.6": folder: all - "1.22.2": + "1.26.2": folder: all - "1.22.0": - folder: all - "1.17.6": + "1.24.3": folder: all diff --git a/recipes/mongo-cxx-driver/all/conandata.yml b/recipes/mongo-cxx-driver/all/conandata.yml index 58272018f4021..cb586c6f2a1f1 100644 --- a/recipes/mongo-cxx-driver/all/conandata.yml +++ b/recipes/mongo-cxx-driver/all/conandata.yml @@ -1,4 +1,13 @@ sources: + "3.11.0": + url: "https://github.com/mongodb/mongo-cxx-driver/releases/download/r3.11.0/mongo-cxx-driver-r3.11.0.tar.gz" + sha256: "cb4263229d769ec44aa66563e2dd2d70c6384c85d93840a52fe26b15436c54f1" + "3.10.2": + url: "https://github.com/mongodb/mongo-cxx-driver/releases/download/r3.10.2/mongo-cxx-driver-r3.10.2.tar.gz" + sha256: "52b99b2866019b5ea25d15c5a39e2a88c70fe1259c40f1091deff8bfae0194be" + "3.10.1": + url: "https://github.com/mongodb/mongo-cxx-driver/releases/download/r3.10.1/mongo-cxx-driver-r3.10.1.tar.gz" + sha256: "0297d9d1a513f09438cc05254b14baa49edd1fa64a6ce5d7a80a1eb7677cf2be" "3.8.1": url: "https://github.com/mongodb/mongo-cxx-driver/releases/download/r3.8.1/mongo-cxx-driver-r3.8.1.tar.gz" sha256: "b12c96670e1e68bae1a6f5cb08541f3da52f5ddeb5def274d2cf5d662ef73160" @@ -14,16 +23,28 @@ sources: "3.6.7": url: "https://github.com/mongodb/mongo-cxx-driver/releases/download/r3.6.7/mongo-cxx-driver-r3.6.7.tar.gz" sha256: "2c58005d4fe46f1973352fba821f7bb37e818cefc922377ce979a9fd1bff38ac" - "3.6.6": - url: "https://github.com/mongodb/mongo-cxx-driver/releases/download/r3.6.6/mongo-cxx-driver-r3.6.6.tar.gz" - sha256: "d5906b9e308a8a353a2ef92b699c9b27ae28ec6b34fdda94e15d2981b27e64ca" - "3.6.2": - url: "https://github.com/mongodb/mongo-cxx-driver/releases/download/r3.6.2/mongo-cxx-driver-r3.6.2.tar.gz" - sha256: "24325dce74723f7632da76d0eeb5f5020828498cc5bc1a624c6d7117efb2b7cf" - "3.6.1": - url: "https://github.com/mongodb/mongo-cxx-driver/releases/download/r3.6.1/mongo-cxx-driver-r3.6.1.tar.gz" - sha256: "83523e897ef18f7ce05d85d1632dd4ba486c264a1b89c09020163ab29e11eab7" patches: + "3.11.0": + - patch_file: "patches/3.10.2-0001-dirs.patch" + patch_description: "disable documentation features, fix directories" + patch_type: "conan" + - patch_file: "patches/3.10.1-0002-remove-abi-suffixes.patch" + patch_description: "remove abi suffixes for MSVC" + patch_type: "conan" + "3.10.2": + - patch_file: "patches/3.10.2-0001-dirs.patch" + patch_description: "disable documentation features, fix directories" + patch_type: "conan" + - patch_file: "patches/3.10.1-0002-remove-abi-suffixes.patch" + patch_description: "remove abi suffixes for MSVC" + patch_type: "conan" + "3.10.1": + - patch_file: "patches/3.10.1-0001-dirs.patch" + patch_description: "disable documentation features, fix directories" + patch_type: "conan" + - patch_file: "patches/3.10.1-0002-remove-abi-suffixes.patch" + patch_description: "remove abi suffixes for MSVC" + patch_type: "conan" "3.8.1": - patch_file: "patches/3.8.1-0001-dirs.patch" patch_description: "disable documentation features, fix directories" @@ -59,24 +80,3 @@ patches: - patch_file: "patches/poly_use_std_define.patch" patch_description: "use poly macro instead __cplusplus" patch_type: "portability" - "3.6.6": - - patch_file: "patches/3.6.x-dirs_and_tests.patch" - patch_description: "disable test and documentation features, fix directories" - patch_type: "conan" - - patch_file: "patches/poly_use_std_define.patch" - patch_description: "use poly macro instead __cplusplus" - patch_type: "portability" - "3.6.2": - - patch_file: "patches/3.6.x-dirs_and_tests.patch" - patch_description: "disable test and documentation features, fix directories" - patch_type: "conan" - - patch_file: "patches/poly_use_std_define.patch" - patch_description: "use poly macro instead __cplusplus" - patch_type: "portability" - "3.6.1": - - patch_file: "patches/3.6.x-dirs_and_tests.patch" - patch_description: "disable test and documentation features, fix directories" - patch_type: "conan" - - patch_file: "patches/poly_use_std_define.patch" - patch_description: "use poly macro instead __cplusplus" - patch_type: "portability" diff --git a/recipes/mongo-cxx-driver/all/conanfile.py b/recipes/mongo-cxx-driver/all/conanfile.py index 26e997f666df1..92bb53ee8c6ee 100644 --- a/recipes/mongo-cxx-driver/all/conanfile.py +++ b/recipes/mongo-cxx-driver/all/conanfile.py @@ -4,6 +4,7 @@ from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout from conan.tools.files import export_conandata_patches, apply_conandata_patches, copy, get, rm, rmdir from conan.tools.scm import Version +from conan.tools.microsoft import is_msvc import os import shutil @@ -12,10 +13,10 @@ class MongoCxxConan(ConanFile): name = "mongo-cxx-driver" + description = "C++ Driver for MongoDB" license = "Apache-2.0" url = "https://github.com/conan-io/conan-center-index" homepage = "http://mongocxx.org" - description = "C++ Driver for MongoDB" topics = ("libbsoncxx", "libmongocxx", "mongo", "mongodb", "database", "db") package_type = "library" settings = "os", "arch", "compiler", "build_type" @@ -47,7 +48,7 @@ def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - self.requires("mongo-c-driver/1.24.3") + self.requires("mongo-c-driver/1.28.0") if self.options.polyfill == "boost": self.requires("boost/1.82.0", transitive_headers=True) @@ -129,6 +130,8 @@ def generate(self): if not valid_min_cppstd(self, self._minimal_std_version): tc.variables["CMAKE_CXX_STANDARD"] = self._minimal_std_version tc.variables["ENABLE_TESTS"] = False + if Version(self.version) >= "3.10.1" and is_msvc(self): + tc.variables["ENABLE_ABI_TAG_IN_LIBRARY_FILENAMES"] = False tc.generate() deps = CMakeDeps(self) @@ -182,6 +185,8 @@ def package_info(self): if not self.options.shared: self.cpp_info.components["mongocxx"].defines.append("MONGOCXX_STATIC") self.cpp_info.components["mongocxx"].requires = ["mongo-c-driver::mongoc", "bsoncxx"] + if Version(self.version) >= "3.10.1": + self.cpp_info.components["mongocxx"].includedirs.append(os.path.join("include", "mongocxx", "v_noabi")) # bsoncxx bsoncxx_target = "bsoncxx_shared" if self.options.shared else "bsoncxx_static" @@ -197,3 +202,5 @@ def package_info(self): self.cpp_info.components["bsoncxx"].requires = ["mongo-c-driver::bson"] if self.options.polyfill == "boost": self.cpp_info.components["bsoncxx"].requires.append("boost::headers") + if Version(self.version) >= "3.10.1": + self.cpp_info.components["bsoncxx"].includedirs.append(os.path.join("include", "bsoncxx", "v_noabi")) diff --git a/recipes/mongo-cxx-driver/all/patches/3.10.1-0001-dirs.patch b/recipes/mongo-cxx-driver/all/patches/3.10.1-0001-dirs.patch new file mode 100644 index 0000000000000..41a672d93964e --- /dev/null +++ b/recipes/mongo-cxx-driver/all/patches/3.10.1-0001-dirs.patch @@ -0,0 +1,61 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 2a960f7..f809b6c 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -315,7 +315,7 @@ unset(dist_generated_depends CACHE) + set(BUILD_SOURCE_DIR ${CMAKE_BINARY_DIR}) + + include(MakeDistFiles) +- ++if(FALSE) + add_custom_target(hugo_dir + COMMAND ${CMAKE_COMMAND} -E make_directory hugo + ) +@@ -371,7 +371,7 @@ add_custom_target(format-lint + add_custom_target(docs + DEPENDS hugo doxygen-current + ) +- ++endif() + set(THIRD_PARTY_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/src/third_party) + set(DATA_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/data) + +@@ -381,13 +381,13 @@ option(ENABLE_MACRO_GUARD_TESTS "Enable targets for macro guard compile tests." + if(ENABLE_TESTS) + enable_testing() + endif() +- ++set(MONGO_CXX_PROJECT_DIR ${CMAKE_CURRENT_SOURCE_DIR}) ++set(MONGO_CXX_PROJECT_BIN_DIR ${CMAKE_CURRENT_BINARY_DIR}) + add_subdirectory(src) ++# add_subdirectory(examples EXCLUDE_FROM_ALL) + +-add_subdirectory(examples EXCLUDE_FROM_ALL) +- +-add_subdirectory(benchmark EXCLUDE_FROM_ALL) +- ++# add_subdirectory(benchmark EXCLUDE_FROM_ALL) ++if(FALSE) + # Implement 'dist' target + # + # CMake does not implement anything like 'dist' from autotools. +@@ -525,3 +525,4 @@ endif() + if(CMAKE_GENERATOR_TOOLSET) + message(STATUS "\tinstance: ${CMAKE_GENERATOR_TOOLSET}") + endif() ++endif() +diff --git a/src/bsoncxx/CMakeLists.txt b/src/bsoncxx/CMakeLists.txt +index ce53a71..bcd0a61 100644 +--- a/src/bsoncxx/CMakeLists.txt ++++ b/src/bsoncxx/CMakeLists.txt +@@ -93,8 +93,8 @@ if(TARGET bson_shared OR TARGET bson_static) + set(BSONCXX_PKG_DEP "find_dependency(bson-${LIBBSON_REQUIRED_ABI_VERSION} REQUIRED)") + else() + # Attempt to find libbson by new package name (without lib). +- find_package(bson-${LIBBSON_REQUIRED_ABI_VERSION} ${LIBBSON_REQUIRED_VERSION} QUIET) +- ++ find_package(bson-${LIBBSON_REQUIRED_ABI_VERSION} REQUIRED) ++ set(bson-${LIBBSON_REQUIRED_ABI_VERSION}_FOUND TRUE) + if(bson-${LIBBSON_REQUIRED_ABI_VERSION}_FOUND) + message(STATUS "found libbson version ${bson-${LIBBSON_REQUIRED_ABI_VERSION}_VERSION}") + diff --git a/recipes/mongo-cxx-driver/all/patches/3.10.1-0002-remove-abi-suffixes.patch b/recipes/mongo-cxx-driver/all/patches/3.10.1-0002-remove-abi-suffixes.patch new file mode 100644 index 0000000000000..f1fdc639b41ea --- /dev/null +++ b/recipes/mongo-cxx-driver/all/patches/3.10.1-0002-remove-abi-suffixes.patch @@ -0,0 +1,26 @@ +diff --git a/cmake/BsoncxxUtil.cmake b/cmake/BsoncxxUtil.cmake +index c72f98e..5f977e1 100644 +--- a/cmake/BsoncxxUtil.cmake ++++ b/cmake/BsoncxxUtil.cmake +@@ -76,7 +76,7 @@ function(bsoncxx_add_library TARGET OUTPUT_NAME LINK_TYPE) + endif() + + # MSVC-specific ABI tag suffixes. +- if(MSVC) ++ if(0) + set(vs_suffix "") + + # Include the target architecture if applicable (Win32, x64, etc.). +diff --git a/cmake/MongocxxUtil.cmake b/cmake/MongocxxUtil.cmake +index de9210c..f9937f4 100644 +--- a/cmake/MongocxxUtil.cmake ++++ b/cmake/MongocxxUtil.cmake +@@ -63,7 +63,7 @@ function(mongocxx_add_library TARGET OUTPUT_NAME LINK_TYPE) + endif() + + # MSVC-specific ABI tag suffixes. Inherit from bsoncxx. +- if(MSVC) ++ if(0) + get_target_property(vs_suffix ${bsoncxx_target} BSONCXX_ABI_TAG_VS_SUFFIX) + set_target_properties(${TARGET} PROPERTIES + BSONCXX_ABI_TAG_VS_SUFFIX ${vs_suffix} diff --git a/recipes/mongo-cxx-driver/all/patches/3.10.2-0001-dirs.patch b/recipes/mongo-cxx-driver/all/patches/3.10.2-0001-dirs.patch new file mode 100644 index 0000000000000..360b25feaf147 --- /dev/null +++ b/recipes/mongo-cxx-driver/all/patches/3.10.2-0001-dirs.patch @@ -0,0 +1,57 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 6d612a4..5b3f872 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -279,7 +279,7 @@ unset(dist_generated_depends CACHE) + set(BUILD_SOURCE_DIR ${CMAKE_BINARY_DIR}) + + include(MakeDistFiles) +- ++if(FALSE) + add_custom_target(hugo_dir + COMMAND ${CMAKE_COMMAND} -E make_directory hugo + ) +@@ -335,7 +335,7 @@ add_custom_target(format-lint + add_custom_target(docs + DEPENDS hugo doxygen-current + ) +- ++endif() + set(THIRD_PARTY_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/src/third_party) + set(DATA_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/data) + +@@ -348,10 +348,10 @@ endif() + + add_subdirectory(src) + +-add_subdirectory(examples EXCLUDE_FROM_ALL) +- +-add_subdirectory(benchmark EXCLUDE_FROM_ALL) ++# add_subdirectory(examples EXCLUDE_FROM_ALL) + ++# add_subdirectory(benchmark EXCLUDE_FROM_ALL) ++if(FALSE) + # Implement 'dist' target + # + # CMake does not implement anything like 'dist' from autotools. +@@ -489,3 +489,4 @@ endif() + if(CMAKE_GENERATOR_TOOLSET) + message(STATUS "\tinstance: ${CMAKE_GENERATOR_TOOLSET}") + endif() ++endif() +\ No newline at end of file +diff --git a/src/bsoncxx/CMakeLists.txt b/src/bsoncxx/CMakeLists.txt +index ce53a71..90c4fd2 100644 +--- a/src/bsoncxx/CMakeLists.txt ++++ b/src/bsoncxx/CMakeLists.txt +@@ -93,8 +93,8 @@ if(TARGET bson_shared OR TARGET bson_static) + set(BSONCXX_PKG_DEP "find_dependency(bson-${LIBBSON_REQUIRED_ABI_VERSION} REQUIRED)") + else() + # Attempt to find libbson by new package name (without lib). +- find_package(bson-${LIBBSON_REQUIRED_ABI_VERSION} ${LIBBSON_REQUIRED_VERSION} QUIET) +- ++ find_package(bson-${LIBBSON_REQUIRED_ABI_VERSION} REQUIRED) ++ set(bson-${LIBBSON_REQUIRED_ABI_VERSION}_FOUND TRUE) + if(bson-${LIBBSON_REQUIRED_ABI_VERSION}_FOUND) + message(STATUS "found libbson version ${bson-${LIBBSON_REQUIRED_ABI_VERSION}_VERSION}") + diff --git a/recipes/mongo-cxx-driver/config.yml b/recipes/mongo-cxx-driver/config.yml index dfc6d8b54584e..9198272a479a9 100644 --- a/recipes/mongo-cxx-driver/config.yml +++ b/recipes/mongo-cxx-driver/config.yml @@ -1,4 +1,11 @@ versions: + "3.11.0": + folder: all + "3.10.2": + folder: all + "3.10.1": + folder: all + # keep 3.8.1 for gdal "3.8.1": folder: all "3.8.0": @@ -7,11 +14,6 @@ versions: folder: all "3.7.0": folder: all + # keep 3.6.7 for gdal "3.6.7": folder: all - "3.6.6": - folder: all - "3.6.2": - folder: all - "3.6.1": - folder: all diff --git a/recipes/morton-nd/all/conandata.yml b/recipes/morton-nd/all/conandata.yml index 41b2951c67096..da7e41c780c0c 100644 --- a/recipes/morton-nd/all/conandata.yml +++ b/recipes/morton-nd/all/conandata.yml @@ -5,3 +5,10 @@ sources: "3.0.0": url: "https://github.com/kevinhartman/morton-nd/archive/v3.0.0.tar.gz" sha256: "ba57df04a2e1e73709f55fd3fee71082750013c5792de3c6eb84a8c87d40d781" +patches: + "4.0.0": + - patch_file: "patches/0001-v4.0.0-fix-include-cstdint.patch" + patch_type: "portability" + "3.0.0": + - patch_file: "patches/0001-v3.0.0-fix-include-cstdint.patch" + patch_type: "portability" diff --git a/recipes/morton-nd/all/conanfile.py b/recipes/morton-nd/all/conanfile.py index 5e3263ed60dd4..9558cedb497f2 100644 --- a/recipes/morton-nd/all/conanfile.py +++ b/recipes/morton-nd/all/conanfile.py @@ -1,7 +1,7 @@ from conan import ConanFile from conan.errors import ConanInvalidConfiguration from conan.tools.build import check_min_cppstd -from conan.tools.files import copy, get +from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get from conan.tools.layout import basic_layout from conan.tools.scm import Version import os @@ -14,9 +14,10 @@ class MortonndConan(ConanFile): description = "A header-only Morton encode/decode library (C++14) capable " \ "of encoding from and decoding to N-dimensional space." license = "MIT" - topics = ("morton-nd", "morton", "encoding", "decoding", "n-dimensional") + topics = ("morton", "encoding", "decoding", "n-dimensional") homepage = "https://github.com/kevinhartman/morton-nd" url = "https://github.com/conan-io/conan-center-index" + package_type = "header-library" settings = "os", "arch", "compiler", "build_type" no_copy_source = True @@ -34,6 +35,9 @@ def _compilers_minimum_version(self): "apple-clang": "5.1", } + def layout(self): + basic_layout(self, src_folder="src") + def package_id(self): self.info.clear() @@ -45,13 +49,13 @@ def validate(self): raise ConanInvalidConfiguration( f"{self.name} {self.version} requires C++{self._min_cppstd}, which your compiler does not support.", ) - - def layout(self): - basic_layout(self, src_folder="src") + + def export_sources(self): + export_conandata_patches(self) def source(self): - get(self, **self.conan_data["sources"][self.version], - destination=self.source_folder, strip_root=True) + get(self, **self.conan_data["sources"][self.version], strip_root=True) + apply_conandata_patches(self) def build(self): pass @@ -64,9 +68,7 @@ def package_info(self): self.cpp_info.set_property("cmake_file_name", "morton-nd") self.cpp_info.set_property("cmake_target_name", "morton-nd::MortonND") self.cpp_info.bindirs = [] - self.cpp_info.frameworkdirs = [] self.cpp_info.libdirs = [] - self.cpp_info.resdirs = [] # TODO: to remove in conan v2 once legacy generators removed self.cpp_info.names["cmake_find_package"] = "morton-nd" @@ -75,6 +77,4 @@ def package_info(self): self.cpp_info.components["mortonnd"].names["cmake_find_package_multi"] = "MortonND" self.cpp_info.components["mortonnd"].set_property("cmake_target_name", "morton-nd::MortonND") self.cpp_info.components["mortonnd"].bindirs = [] - self.cpp_info.components["mortonnd"].frameworkdirs = [] self.cpp_info.components["mortonnd"].libdirs = [] - self.cpp_info.components["mortonnd"].resdirs = [] diff --git a/recipes/morton-nd/all/patches/0001-v3.0.0-fix-include-cstdint.patch b/recipes/morton-nd/all/patches/0001-v3.0.0-fix-include-cstdint.patch new file mode 100644 index 0000000000000..52cd77981fa28 --- /dev/null +++ b/recipes/morton-nd/all/patches/0001-v3.0.0-fix-include-cstdint.patch @@ -0,0 +1,24 @@ +diff --git a/include/morton-nd/mortonND_BMI2.h b/include/morton-nd/mortonND_BMI2.h +index b99d2c0..63d89f2 100644 +--- a/include/morton-nd/mortonND_BMI2.h ++++ b/include/morton-nd/mortonND_BMI2.h +@@ -17,6 +17,7 @@ + #include + #include + #include ++#include + + namespace mortonnd { + +diff --git a/include/morton-nd/mortonND_LUT_encoder.h b/include/morton-nd/mortonND_LUT_encoder.h +index 5d75cb2..575c898 100644 +--- a/include/morton-nd/mortonND_LUT_encoder.h ++++ b/include/morton-nd/mortonND_LUT_encoder.h +@@ -13,6 +13,7 @@ + #include + #include + #include ++#include + + namespace mortonnd { + diff --git a/recipes/morton-nd/all/patches/0001-v4.0.0-fix-include-cstdint.patch b/recipes/morton-nd/all/patches/0001-v4.0.0-fix-include-cstdint.patch new file mode 100644 index 0000000000000..0cc25573d036f --- /dev/null +++ b/recipes/morton-nd/all/patches/0001-v4.0.0-fix-include-cstdint.patch @@ -0,0 +1,24 @@ +diff --git a/include/morton-nd/mortonND_BMI2.h b/include/morton-nd/mortonND_BMI2.h +index b99d2c0..63d89f2 100644 +--- a/include/morton-nd/mortonND_BMI2.h ++++ b/include/morton-nd/mortonND_BMI2.h +@@ -17,6 +17,7 @@ + #include + #include + #include ++#include + + namespace mortonnd { + +diff --git a/include/morton-nd/mortonND_LUT.h b/include/morton-nd/mortonND_LUT.h +index 110ad63..fb3777b 100644 +--- a/include/morton-nd/mortonND_LUT.h ++++ b/include/morton-nd/mortonND_LUT.h +@@ -13,6 +13,7 @@ + #include + #include + #include ++#include + + namespace mortonnd { + diff --git a/recipes/morton-nd/all/test_package/conanfile.py b/recipes/morton-nd/all/test_package/conanfile.py index d120a992c06a6..0a6bc68712d90 100644 --- a/recipes/morton-nd/all/test_package/conanfile.py +++ b/recipes/morton-nd/all/test_package/conanfile.py @@ -7,13 +7,14 @@ class TestPackageConan(ConanFile): settings = "os", "arch", "compiler", "build_type" generators = "CMakeToolchain", "CMakeDeps", "VirtualRunEnv" - - def requirements(self): - self.requires(self.tested_reference_str) + test_type = "explicit" def layout(self): cmake_layout(self) + def requirements(self): + self.requires(self.tested_reference_str) + def build(self): cmake = CMake(self) cmake.configure() diff --git a/recipes/morton-nd/all/test_v1_package/CMakeLists.txt b/recipes/morton-nd/all/test_v1_package/CMakeLists.txt index 07fa1c30a5235..b21cc49efde95 100644 --- a/recipes/morton-nd/all/test_v1_package/CMakeLists.txt +++ b/recipes/morton-nd/all/test_v1_package/CMakeLists.txt @@ -1,14 +1,8 @@ -cmake_minimum_required(VERSION 3.8) -project(test_package LANGUAGES CXX) +cmake_minimum_required(VERSION 3.15) +project(test_package) include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) conan_basic_setup(TARGETS) -find_package(morton-nd REQUIRED CONFIG) - -add_executable(${PROJECT_NAME} ../test_package/test_package.cpp) -target_link_libraries(${PROJECT_NAME} PRIVATE morton-nd::MortonND) -target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_14) -if(morton-nd_VERSION VERSION_LESS "4.0.0") - target_compile_definitions(${PROJECT_NAME} PRIVATE "MORTONND_LESS_4_0_0") -endif() +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package + ${CMAKE_CURRENT_BINARY_DIR}/test_package) diff --git a/recipes/mozjpeg/all/test_package/conanfile.py b/recipes/mozjpeg/all/test_package/conanfile.py index 2494f49b77c0d..e845ae751a301 100644 --- a/recipes/mozjpeg/all/test_package/conanfile.py +++ b/recipes/mozjpeg/all/test_package/conanfile.py @@ -23,5 +23,4 @@ def build(self): def test(self): if can_run(self): bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") - img_name = os.path.join(self.source_folder, "testimg.jpg") - self.run(f"{bin_path} {img_name}", env="conanrun") + self.run(bin_path, env="conanrun") diff --git a/recipes/mozjpeg/all/test_package/test_package.c b/recipes/mozjpeg/all/test_package/test_package.c index 2f94478d7ef6f..243a65f0efd44 100644 --- a/recipes/mozjpeg/all/test_package/test_package.c +++ b/recipes/mozjpeg/all/test_package/test_package.c @@ -1,528 +1,9 @@ -/* - * rdjpgcom.c - * - * Copyright (C) 1994-1997, Thomas G. Lane. - * Modified 2009 by Bill Allombert, Guido Vollbeding. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file contains a very simple stand-alone application that displays - * the text in COM (comment) markers in a JFIF file. - * This may be useful as an example of the minimum logic needed to parse - * JPEG markers. - */ - #include -#include -#include - -#define JPEG_CJPEG_DJPEG /* to get the command-line config symbols */ -#include "jpeglib.h" /* get auto-config symbols, */ - -#ifdef HAVE_LOCALE_H -#include /* Bill Allombert: use locale for isprint */ -#endif -#include /* to declare isupper(), tolower() */ -#ifdef USE_SETMODE -#include /* to declare setmode()'s parameter macros */ -/* If you have setmode() but not , just delete this line: */ -#include /* to declare setmode() */ -#endif - -#ifdef USE_CCOMMAND /* command-line reader for Macintosh */ -#ifdef __MWERKS__ -#include /* Metrowerks needs this */ -#include /* ... and this */ -#endif -#ifdef THINK_C -#include /* Think declares it here */ -#endif -#endif - -#ifdef DONT_USE_B_MODE /* define mode parameters for fopen() */ -#define READ_BINARY "r" -#else -#ifdef VMS /* VMS is very nonstandard */ -#define READ_BINARY "rb", "ctx=stm" -#else /* standard ANSI-compliant case */ -#define READ_BINARY "rb" -#endif -#endif - -#ifndef EXIT_FAILURE /* define exit() codes if not provided */ -#define EXIT_FAILURE 1 -#endif -#ifndef EXIT_SUCCESS -#ifdef VMS -#define EXIT_SUCCESS 1 /* VMS is very nonstandard */ -#else -#define EXIT_SUCCESS 0 -#endif -#endif - -/* - * These macros are used to read the input file. - * To reuse this code in another application, you might need to change these. - */ - -static FILE *infile; /* input JPEG file */ - -/* Return next input byte, or EOF if no more */ -#define NEXTBYTE() getc(infile) - -/* Error exit handler */ -#define ERREXIT(msg) (fprintf(stderr, "%s\n", msg), exit(EXIT_FAILURE)) - -/* Read one byte, testing for EOF */ -static int read_1_byte(void) { - int c; - - c = NEXTBYTE(); - if (c == EOF) - ERREXIT("Premature EOF in JPEG file"); - return c; -} - -/* Read 2 bytes, convert to unsigned int */ -/* All 2-byte quantities in JPEG markers are MSB first */ -static unsigned int read_2_bytes(void) { - int c1, c2; - - c1 = NEXTBYTE(); - if (c1 == EOF) - ERREXIT("Premature EOF in JPEG file"); - c2 = NEXTBYTE(); - if (c2 == EOF) - ERREXIT("Premature EOF in JPEG file"); - return (((unsigned int)c1) << 8) + ((unsigned int)c2); -} - -/* - * JPEG markers consist of one or more 0xFF bytes, followed by a marker - * code byte (which is not an FF). Here are the marker codes of interest - * in this program. (See jdmarker.c for a more complete list.) - */ - -#define M_SOF0 0xC0 /* Start Of Frame N */ -#define M_SOF1 0xC1 /* N indicates which compression process */ -#define M_SOF2 0xC2 /* Only SOF0-SOF2 are now in common use */ -#define M_SOF3 0xC3 -#define M_SOF5 0xC5 /* NB: codes C4 and CC are NOT SOF markers */ -#define M_SOF6 0xC6 -#define M_SOF7 0xC7 -#define M_SOF9 0xC9 -#define M_SOF10 0xCA -#define M_SOF11 0xCB -#define M_SOF13 0xCD -#define M_SOF14 0xCE -#define M_SOF15 0xCF -#define M_SOI 0xD8 /* Start Of Image (beginning of datastream) */ -#define M_EOI 0xD9 /* End Of Image (end of datastream) */ -#define M_SOS 0xDA /* Start Of Scan (begins compressed data) */ -#define M_APP0 0xE0 /* Application-specific marker, type N */ -#define M_APP12 0xEC /* (we don't bother to list all 16 APPn's) */ -#define M_COM 0xFE /* COMment */ - -/* - * Find the next JPEG marker and return its marker code. - * We expect at least one FF byte, possibly more if the compressor used FFs - * to pad the file. - * There could also be non-FF garbage between markers. The treatment of such - * garbage is unspecified; we choose to skip over it but emit a warning msg. - * NB: this routine must not be used after seeing SOS marker, since it will - * not deal correctly with FF/00 sequences in the compressed image data... - */ - -static int next_marker(void) { - int c; - int discarded_bytes = 0; - - /* Find 0xFF byte; count and skip any non-FFs. */ - c = read_1_byte(); - while (c != 0xFF) { - discarded_bytes++; - c = read_1_byte(); - } - /* Get marker code byte, swallowing any duplicate FF bytes. Extra FFs - * are legal as pad bytes, so don't count them in discarded_bytes. - */ - do { - c = read_1_byte(); - } while (c == 0xFF); - - if (discarded_bytes != 0) { - fprintf(stderr, "Warning: garbage data found in JPEG file\n"); - } - - return c; -} - -/* - * Read the initial marker, which should be SOI. - * For a JFIF file, the first two bytes of the file should be literally - * 0xFF M_SOI. To be more general, we could use next_marker, but if the - * input file weren't actually JPEG at all, next_marker might read the whole - * file and then return a misleading error message... - */ - -static int first_marker(void) { - int c1, c2; - - c1 = NEXTBYTE(); - c2 = NEXTBYTE(); - if (c1 != 0xFF || c2 != M_SOI) - { - ERREXIT("Not a JPEG file"); - } - return c2; -} - -/* - * Most types of marker are followed by a variable-length parameter segment. - * This routine skips over the parameters for any marker we don't otherwise - * want to process. - * Note that we MUST skip the parameter segment explicitly in order not to - * be fooled by 0xFF bytes that might appear within the parameter segment; - * such bytes do NOT introduce new markers. - */ - -static void skip_variable(void) -/* Skip over an unknown or uninteresting variable-length marker */ -{ - unsigned int length; - - /* Get the marker parameter length count */ - length = read_2_bytes(); - /* Length includes itself, so must be at least 2 */ - if (length < 2) - ERREXIT("Erroneous JPEG marker length"); - length -= 2; - /* Skip over the remaining bytes */ - while (length > 0) { - (void)read_1_byte(); - length--; - } -} - -/* - * Process a COM marker. - * We want to print out the marker contents as legible text; - * we must guard against non-text junk and varying newline representations. - */ - -static void process_COM(int raw) { - unsigned int length; - int ch; - int lastch = 0; - -/* Bill Allombert: set locale properly for isprint */ -#ifdef HAVE_LOCALE_H - setlocale(LC_CTYPE, ""); -#endif - - /* Get the marker parameter length count */ - length = read_2_bytes(); - /* Length includes itself, so must be at least 2 */ - if (length < 2) - ERREXIT("Erroneous JPEG marker length"); - length -= 2; - - while (length > 0) { - ch = read_1_byte(); - if (raw) { - putc(ch, stdout); - /* Emit the character in a readable form. - * Nonprintables are converted to \nnn form, - * while \ is converted to \\. - * Newlines in CR, CR/LF, or LF form will be printed as one newline. - */ - } else if (ch == '\r') { - printf("\n"); - } else if (ch == '\n') { - if (lastch != '\r') - printf("\n"); - } else if (ch == '\\') { - printf("\\\\"); - } else if (isprint(ch)) { - putc(ch, stdout); - } else { - printf("\\%03o", ch); - } - lastch = ch; - length--; - } - printf("\n"); - -/* Bill Allombert: revert to C locale */ -#ifdef HAVE_LOCALE_H - setlocale(LC_CTYPE, "C"); -#endif -} - -/* - * Process a SOFn marker. - * This code is only needed if you want to know the image dimensions... - */ - -static void process_SOFn(int marker) { - unsigned int length; - unsigned int image_height, image_width; - int data_precision, num_components; - const char *process; - int ci; - - length = read_2_bytes(); /* usual parameter length count */ - - data_precision = read_1_byte(); - image_height = read_2_bytes(); - image_width = read_2_bytes(); - num_components = read_1_byte(); - - switch (marker) { - case M_SOF0: - process = "Baseline"; - break; - case M_SOF1: - process = "Extended sequential"; - break; - case M_SOF2: - process = "Progressive"; - break; - case M_SOF3: - process = "Lossless"; - break; - case M_SOF5: - process = "Differential sequential"; - break; - case M_SOF6: - process = "Differential progressive"; - break; - case M_SOF7: - process = "Differential lossless"; - break; - case M_SOF9: - process = "Extended sequential, arithmetic coding"; - break; - case M_SOF10: - process = "Progressive, arithmetic coding"; - break; - case M_SOF11: - process = "Lossless, arithmetic coding"; - break; - case M_SOF13: - process = "Differential sequential, arithmetic coding"; - break; - case M_SOF14: - process = "Differential progressive, arithmetic coding"; - break; - case M_SOF15: - process = "Differential lossless, arithmetic coding"; - break; - default: - process = "Unknown"; - break; - } - - printf("JPEG image is %uw * %uh, %d color components, %d bits per sample\n", - image_width, image_height, num_components, data_precision); - printf("JPEG process: %s\n", process); - - if (length != (unsigned int)(8 + num_components * 3)) - ERREXIT("Bogus SOF marker length"); - - for (ci = 0; ci < num_components; ci++) { - (void)read_1_byte(); /* Component ID code */ - (void)read_1_byte(); /* H, V sampling factors */ - (void)read_1_byte(); /* Quantization table number */ - } -} - -/* - * Parse the marker stream until SOS or EOI is seen; - * display any COM markers. - * While the companion program wrjpgcom will always insert COM markers before - * SOFn, other implementations might not, so we scan to SOS before stopping. - * If we were only interested in the image dimensions, we would stop at SOFn. - * (Conversely, if we only cared about COM markers, there would be no need - * for special code to handle SOFn; we could treat it like other markers.) - */ - -static int scan_JPEG_header(int verbose, int raw) { - int marker; - /* Expect SOI at start of file */ - if (first_marker() != M_SOI) - ERREXIT("Expected SOI marker first"); - - /* Scan miscellaneous markers until we reach SOS. */ - for (;;) { - marker = next_marker(); - switch (marker) { - /* Note that marker codes 0xC4, 0xC8, 0xCC are not, and must not be, - * treated as SOFn. C4 in particular is actually DHT. - */ - case M_SOF0: /* Baseline */ - case M_SOF1: /* Extended sequential, Huffman */ - case M_SOF2: /* Progressive, Huffman */ - case M_SOF3: /* Lossless, Huffman */ - case M_SOF5: /* Differential sequential, Huffman */ - case M_SOF6: /* Differential progressive, Huffman */ - case M_SOF7: /* Differential lossless, Huffman */ - case M_SOF9: /* Extended sequential, arithmetic */ - case M_SOF10: /* Progressive, arithmetic */ - case M_SOF11: /* Lossless, arithmetic */ - case M_SOF13: /* Differential sequential, arithmetic */ - case M_SOF14: /* Differential progressive, arithmetic */ - case M_SOF15: /* Differential lossless, arithmetic */ - if (verbose) - process_SOFn(marker); - else - skip_variable(); - break; - - case M_SOS: /* stop before hitting compressed data */ - return marker; - - case M_EOI: /* in case it's a tables-only JPEG stream */ - return marker; - - case M_COM: - process_COM(raw); - break; - - case M_APP12: - /* Some digital camera makers put useful textual information into - * APP12 markers, so we print those out too when in -verbose mode. - */ - if (verbose) { - printf("APP12 contains:\n"); - process_COM(raw); - } else - skip_variable(); - break; - - default: /* Anything else just gets skipped */ - skip_variable(); /* we assume it has a parameter count... */ - break; - } - } /* end loop */ -} - -/* Command line parsing code */ - -static const char *progname; /* program name for error messages */ - -static void usage(void) -/* complain about bad command line */ -{ - fprintf(stderr, "rdjpgcom displays any textual comments in a JPEG file.\n"); - - fprintf(stderr, "Usage: %s [switches] [inputfile]\n", progname); - - fprintf(stderr, "Switches (names may be abbreviated):\n"); - fprintf( - stderr, - " -raw Display non-printable characters in comments (unsafe)\n"); - fprintf(stderr, " -verbose Also display dimensions of JPEG image\n"); - - exit(EXIT_FAILURE); -} - -static int keymatch(char *arg, const char *keyword, int minchars) -/* Case-insensitive matching of (possibly abbreviated) keyword switches. */ -/* keyword is the constant keyword (must be lower case already), */ -/* minchars is length of minimum legal abbreviation. */ -{ - register int ca, ck; - register int nmatched = 0; - - while ((ca = *arg++) != '\0') { - if ((ck = *keyword++) == '\0') - return 0; /* arg longer than keyword, no good */ - if (isupper(ca)) /* force arg to lcase (assume ck is already) */ - ca = tolower(ca); - if (ca != ck) - return 0; /* no good */ - nmatched++; /* count matched characters */ - } - /* reached end of argument; fail if it's too short for unique abbrev */ - if (nmatched < minchars) - return 0; - return 1; /* A-OK */ -} - -/* - * The main program. - */ - -int main(int argc, char **argv) { - int argn; - char *arg; - int verbose = 1, raw = 0; - -/* On Mac, fetch a command line. */ -#ifdef USE_CCOMMAND - argc = ccommand(&argv); -#endif - - progname = argv[0]; - if (progname == NULL || progname[0] == 0) - progname = "rdjpgcom"; /* in case C library doesn't provide it */ - - /* Parse switches, if any */ - for (argn = 1; argn < argc; argn++) - { - arg = argv[argn]; - if (arg[0] != '-') - break; /* not switch, must be file name */ - arg++; /* advance over '-' */ - if (keymatch(arg, "verbose", 1)) - { - verbose++; - } - else if (keymatch(arg, "raw", 1)) - { - raw = 1; - } - else - usage(); - } - - /* Open the input file. */ - /* Unix style: expect zero or one file name */ - if (argn < argc - 1) - { - fprintf(stderr, "%s: only one input file\n", progname); - usage(); - } - if (argn < argc) - { - if ((infile = fopen(argv[argn], READ_BINARY)) == NULL) - { - fprintf(stderr, "%s: can't open %s\n", progname, argv[argn]); - exit(EXIT_FAILURE); - } - } - else if ((infile = fopen("testimg.jpg", READ_BINARY)) == NULL) - { -/* default input file is stdin */ -#ifdef USE_SETMODE /* need to hack file mode? */ - setmode(fileno(stdin), O_BINARY); -#endif -#ifdef USE_FDOPEN /* need to re-open in binary mode? */ - if ((infile = fdopen(fileno(stdin), READ_BINARY)) == NULL) - { - fprintf(stderr, "%s: can't open stdin\n", progname); - exit(EXIT_FAILURE); - } -#else - infile = stdin; -#endif - } - - /* Scan the JPEG headers. */ - (void)scan_JPEG_header(verbose, raw); +#include "jpeglib.h" - /* All done. */ - exit(EXIT_SUCCESS); - return 0; /* suppress no-return-value warnings */ +int main() { + struct jpeg_decompress_struct info; + struct jpeg_error_mgr err; + info.err = jpeg_std_error(&err); + jpeg_create_decompress(&info); } diff --git a/recipes/mozjpeg/all/test_package/testimg.jpg b/recipes/mozjpeg/all/test_package/testimg.jpg deleted file mode 100644 index a026e486f57de..0000000000000 Binary files a/recipes/mozjpeg/all/test_package/testimg.jpg and /dev/null differ diff --git a/recipes/mozjpeg/all/test_package_module/conanfile.py b/recipes/mozjpeg/all/test_package_module/conanfile.py index fd19bb1425057..0a6bc68712d90 100644 --- a/recipes/mozjpeg/all/test_package_module/conanfile.py +++ b/recipes/mozjpeg/all/test_package_module/conanfile.py @@ -23,5 +23,4 @@ def build(self): def test(self): if can_run(self): bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") - img_name = os.path.join(self.source_folder, os.pardir, "test_package", "testimg.jpg") - self.run(f"{bin_path} {img_name}", env="conanrun") + self.run(bin_path, env="conanrun") diff --git a/recipes/mozjpeg/all/test_v1_package/conanfile.py b/recipes/mozjpeg/all/test_v1_package/conanfile.py index cf6e3a0371de5..5a05af3c2dfd2 100644 --- a/recipes/mozjpeg/all/test_v1_package/conanfile.py +++ b/recipes/mozjpeg/all/test_v1_package/conanfile.py @@ -15,5 +15,4 @@ def build(self): def test(self): if not cross_building(self): bin_path = os.path.join("bin", "test_package") - img_name = os.path.join(self.source_folder, os.pardir, "test_package", "testimg.jpg") - self.run(f"{bin_path} {img_name}", run_environment=True) + self.run(bin_path, run_environment=True) diff --git a/recipes/mozjpeg/all/test_v1_package_module/conanfile.py b/recipes/mozjpeg/all/test_v1_package_module/conanfile.py index b6600e428515c..19e6a0c06e3d8 100644 --- a/recipes/mozjpeg/all/test_v1_package_module/conanfile.py +++ b/recipes/mozjpeg/all/test_v1_package_module/conanfile.py @@ -14,5 +14,4 @@ def build(self): def test(self): if not tools.cross_building(self): bin_path = os.path.join("bin", "test_package") - img_name = os.path.join(self.source_folder, os.pardir, "test_package", "testimg.jpg") - self.run(f"{bin_path} {img_name}", run_environment=True) + self.run(bin_path, run_environment=True) diff --git a/recipes/mp-units/0.8.0/conanfile.py b/recipes/mp-units/0.8.0/conanfile.py index c44e1496f2a03..147e52908bb8c 100644 --- a/recipes/mp-units/0.8.0/conanfile.py +++ b/recipes/mp-units/0.8.0/conanfile.py @@ -59,7 +59,7 @@ def _use_range_v3(self): def requirements(self): self.requires("gsl-lite/0.40.0") if self._use_libfmt: - self.requires("fmt/10.1.0") + self.requires("fmt/10.2.1") if self._use_range_v3: self.requires("range-v3/0.12.0") diff --git a/recipes/mp-units/2.0.0/conandata.yml b/recipes/mp-units/2.0.0/conandata.yml index 6919665f992c1..a3b955f5397c3 100644 --- a/recipes/mp-units/2.0.0/conandata.yml +++ b/recipes/mp-units/2.0.0/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.1.1": + url: https://github.com/mpusz/units/archive/v2.1.1.tar.gz + sha256: 881070fd9a15a8954a4e38d991e398dc9638907bbc13961a530519596c9783f9 "2.1.0": url: https://github.com/mpusz/units/archive/v2.1.0.tar.gz sha256: a42057492f5a8e80442cf13602b97bb48b9c3a408bc91bdb60d86aadc84c95cc diff --git a/recipes/mp-units/2.0.0/conanfile.py b/recipes/mp-units/2.0.0/conanfile.py index c41e90a14db59..655d918b9aed6 100644 --- a/recipes/mp-units/2.0.0/conanfile.py +++ b/recipes/mp-units/2.0.0/conanfile.py @@ -55,7 +55,7 @@ def _use_libfmt(self): def requirements(self): self.requires("gsl-lite/0.40.0") if self._use_libfmt: - self.requires("fmt/10.1.0") + self.requires("fmt/10.2.1") def validate(self): if self.settings.get_safe("compiler.cppstd"): diff --git a/recipes/mp-units/2.2.0/conandata.yml b/recipes/mp-units/2.2.0/conandata.yml new file mode 100644 index 0000000000000..2aee126e2e782 --- /dev/null +++ b/recipes/mp-units/2.2.0/conandata.yml @@ -0,0 +1,4 @@ +sources: + "2.2.1": + url: https://github.com/mpusz/units/archive/v2.2.1.tar.gz + sha256: ce5edb27fad9c54b388040341a03d7f2462d61dcedad85b4c983c0e648a91bac diff --git a/recipes/mp-units/2.2.0/conanfile.py b/recipes/mp-units/2.2.0/conanfile.py new file mode 100644 index 0000000000000..89060efea4041 --- /dev/null +++ b/recipes/mp-units/2.2.0/conanfile.py @@ -0,0 +1,274 @@ +import os + +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.build import default_cppstd, valid_min_cppstd +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.files import copy, get, rmdir +from conan.tools.scm import Version + +required_conan_version = ">=1.59.0" + + +def loose_lt_semver(v1, v2): + lv1 = [int(v) for v in v1.split(".")] + lv2 = [int(v) for v in v2.split(".")] + min_length = min(len(lv1), len(lv2)) + return lv1[:min_length] < lv2[:min_length] + + +class MPUnitsConan(ConanFile): + name = "mp-units" + homepage = "https://github.com/mpusz/mp-units" + description = "The quantities and units library for C++" + topics = ( + "units", + "dimensions", + "quantities", + "dimensional-analysis", + "physical-quantities", + "physical-units", + "system-of-units", + "system-of-quantities", + "isq", + "si", + "library", + "quantity-manipulation", + ) + license = "MIT" + url = "https://github.com/conan-io/conan-center-index" + settings = "os", "arch", "compiler", "build_type" + options = { + "cxx_modules": [True, False], + "std_format": [True, False], + "string_view_ret": [True, False], + "no_crtp": [True, False], + "contracts": ["none", "gsl-lite", "ms-gsl"], + "freestanding": [True, False], + } + default_options = { + # "cxx_modules" default set in config_options() + # "std_format" default set in config_options() + # "string_view_ret" default set in config_options() + # "no_crtp" default set in config_options() + "contracts": "gsl-lite", + "freestanding": False, + } + package_type = "header-library" + no_copy_source = True + + @property + def _feature_compatibility(self): + return { + "minimum_support": { + "min_cppstd": "20", + "compiler": { + "gcc": "12", + "clang": "16", + "apple-clang": "15", + "msvc": "", + "Visual Studio": "", + }, + }, + "std_format": { + "min_cppstd": "20", + "compiler": { + "gcc": "13", + "clang": "17", + "apple-clang": "", + "msvc": "", + "Visual Studio": "", + }, + }, + "cxx_modules": { + "min_cppstd": "20", + "compiler": { + "gcc": "", + "clang": "17", + "apple-clang": "", + "msvc": "", + "Visual Studio": "", + }, + }, + "static_constexpr_vars_in_constexpr_func": { + "min_cppstd": "23", + "compiler": { + "gcc": "13", + "clang": "17", + "apple-clang": "", + "msvc": "", + "Visual Studio": "", + }, + }, + "explicit_this": { + "min_cppstd": "23", + "compiler": { + "gcc": "14", + "clang": "18", + "apple-clang": "", + "msvc": "", + "Visual Studio": "", + }, + }, + } + + @property + def _option_feature_map(self): + return { + "std_format": "std_format", + "cxx_modules": "cxx_modules", + "string_view_ret": "static_constexpr_vars_in_constexpr_func", + "no_crtp": "explicit_this", + } + + def _set_default_option(self, name): + compiler = self.settings.compiler + feature_name = self._option_feature_map[name] + feature = self._feature_compatibility[feature_name] + min_version = feature["compiler"].get(str(compiler)) + setattr( + self.options, + name, + bool( + min_version + and Version(compiler.version) >= min_version + and valid_min_cppstd(self, feature["min_cppstd"]) + ), + ) + + def _check_feature_supported(self, name, feature_name=name): + compiler = self.settings.compiler + cppstd = compiler.get_safe("cppstd") + feature = self._feature_compatibility[feature_name] + + # check C++ version + if cppstd and not valid_min_cppstd(self, feature["min_cppstd"]): + raise ConanInvalidConfiguration( + f"'{name}' requires at least cppstd={feature['min_cppstd']} ({cppstd} in use)", + ) + + # check compiler version + min_version = feature["compiler"].get(str(compiler)) + if min_version == None: + # not tested compiler being used - use at your own risk + return + if min_version == "": + raise ConanInvalidConfiguration( + f"'{name}' is not yet supported by any known {compiler} version" + ) + if loose_lt_semver(str(compiler.version), min_version): + raise ConanInvalidConfiguration( + f"'{name}' requires at least {compiler}-{min_version} ({compiler}-{compiler.version} in use)" + ) + + def config_options(self): + for key in self._option_feature_map.keys(): + self._set_default_option(key) + + def configure(self): + if self.options.freestanding: + self.options.rm_safe("std_format") + + def requirements(self): + if not self.options.freestanding: + if self.options.contracts == "gsl-lite": + self.requires("gsl-lite/0.41.0") + elif self.options.contracts == "ms-gsl": + self.requires("ms-gsl/4.0.0") + if not self.options.std_format: + self.requires("fmt/10.2.1") + + def build_requirements(self): + self.tool_requires("cmake/[>=3.29 <4]") + + def validate(self): + self._check_feature_supported("mp-units", "minimum_support") + for key, value in self._option_feature_map.items(): + if self.options.get_safe(key) == True: + self._check_feature_supported(key, value) + if self.options.freestanding and self.options.contracts != "none": + raise ConanInvalidConfiguration( + "'contracts' should be set to 'none' for a freestanding build" + ) + + def layout(self): + cmake_layout(self, src_folder="src") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + if self.options.cxx_modules: + tc.cache_variables["CMAKE_CXX_SCAN_FOR_MODULES"] = True + tc.cache_variables["MP_UNITS_BUILD_CXX_MODULES"] = self.options.cxx_modules + if self.options.freestanding: + tc.cache_variables["MP_UNITS_API_FREESTANDING"] = True + else: + tc.cache_variables["MP_UNITS_API_STD_FORMAT"] = self.options.std_format + tc.cache_variables["MP_UNITS_API_STRING_VIEW_RET"] = ( + self.options.string_view_ret + ) + tc.cache_variables["MP_UNITS_API_NO_CRTP"] = self.options.no_crtp + tc.cache_variables["MP_UNITS_API_CONTRACTS"] = str( + self.options.contracts + ).upper() + tc.generate() + deps = CMakeDeps(self) + deps.generate() + + def build(self): + cmake = CMake(self) + cmake.configure(build_script_folder="src") + if self.options.cxx_modules: + cmake.build() + + def package_id(self): + self.info.clear() + + def package(self): + copy( + self, + "LICENSE.md", + self.source_folder, + os.path.join(self.package_folder, "licenses"), + ) + cmake = CMake(self) + cmake.install() + rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) + + def package_info(self): + compiler = self.settings.compiler + + # handle contracts + if self.options.contracts == "none": + self.cpp_info.components["core"].defines.append("MP_UNITS_API_CONTRACTS=0") + elif self.options.contracts == "gsl-lite": + self.cpp_info.components["core"].requires.append("gsl-lite::gsl-lite") + self.cpp_info.components["core"].defines.append("MP_UNITS_API_CONTRACTS=2") + elif self.options.contracts == "ms-gsl": + self.cpp_info.components["core"].requires.append("ms-gsl::ms-gsl") + self.cpp_info.components["core"].defines.append("MP_UNITS_API_CONTRACTS=3") + + # handle API options + self.cpp_info.components["core"].defines.append( + "MP_UNITS_API_STRING_VIEW_RET=" + + str(int(self.options.string_view_ret == True)) + ) + self.cpp_info.components["core"].defines.append( + "MP_UNITS_API_NO_CRTP=" + str(int(self.options.no_crtp == True)) + ) + self.cpp_info.components["core"].defines.append( + "MP_UNITS_API_STD_FORMAT=" + str(int(self.options.std_format == True)) + ) + if not self.options.std_format: + self.cpp_info.components["core"].requires.append("fmt::fmt") + + # handle hosted configuration + if not self.options.freestanding: + self.cpp_info.components["core"].defines.append("MP_UNITS_HOSTED=1") + + if compiler == "msvc": + self.cpp_info.components["core"].cxxflags = ["/utf-8"] + + self.cpp_info.components["systems"].requires = ["core"] diff --git a/recipes/mp-units/2.2.0/test_package/CMakeLists.txt b/recipes/mp-units/2.2.0/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..07f3e7cd91e8a --- /dev/null +++ b/recipes/mp-units/2.2.0/test_package/CMakeLists.txt @@ -0,0 +1,10 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package + LANGUAGES CXX +) + +find_package(mp-units CONFIG REQUIRED) + +add_executable(test_package test_package.cpp) +target_link_libraries(test_package PRIVATE mp-units::mp-units) +target_compile_features(test_package PUBLIC cxx_std_20) diff --git a/recipes/mp-units/2.2.0/test_package/conanfile.py b/recipes/mp-units/2.2.0/test_package/conanfile.py new file mode 100644 index 0000000000000..e418ee7701960 --- /dev/null +++ b/recipes/mp-units/2.2.0/test_package/conanfile.py @@ -0,0 +1,27 @@ +import os + +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import CMake, cmake_layout + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/mp-units/2.2.0/test_package/test_package.cpp b/recipes/mp-units/2.2.0/test_package/test_package.cpp new file mode 100644 index 0000000000000..1182e75d816e4 --- /dev/null +++ b/recipes/mp-units/2.2.0/test_package/test_package.cpp @@ -0,0 +1,16 @@ +#include +#include +#include + +using namespace mp_units; + +constexpr auto avg_speed(QuantityOf auto d, QuantityOf auto t) +{ + return d / t; +} + +int main() +{ + using namespace mp_units::si::unit_symbols; + std::cout << "Average speed = " << avg_speed(240 * km, 2 * h) << '\n'; +} diff --git a/recipes/mp-units/2.3.0/conandata.yml b/recipes/mp-units/2.3.0/conandata.yml new file mode 100644 index 0000000000000..bde86ac17bc97 --- /dev/null +++ b/recipes/mp-units/2.3.0/conandata.yml @@ -0,0 +1,7 @@ +sources: + "2.4.0": + url: https://github.com/mpusz/units/archive/v2.4.0.tar.gz + sha256: 777e53ba8da891161e90a93b90b92fa66951d49aaae1b0203ddf934532bbeb56 + "2.3.0": + url: https://github.com/mpusz/units/archive/v2.3.0.tar.gz + sha256: ce2f167ff788ae769e73ea7676f15302827cd37908da3928dcae048f916898d6 diff --git a/recipes/mp-units/2.3.0/conanfile.py b/recipes/mp-units/2.3.0/conanfile.py new file mode 100644 index 0000000000000..22e718ebd0955 --- /dev/null +++ b/recipes/mp-units/2.3.0/conanfile.py @@ -0,0 +1,325 @@ +import os + +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.build import valid_min_cppstd +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.files import copy, get, rmdir +from conan.tools.scm import Version + +required_conan_version = ">=1.59.0" + + +def loose_lt_semver(v1, v2): + lv1 = [int(v) for v in v1.split(".")] + lv2 = [int(v) for v in v2.split(".")] + min_length = min(len(lv1), len(lv2)) + return lv1[:min_length] < lv2[:min_length] + + +class MPUnitsConan(ConanFile): + name = "mp-units" + homepage = "https://github.com/mpusz/mp-units" + description = "The quantities and units library for C++" + topics = ( + "units", + "dimensions", + "quantities", + "dimensional-analysis", + "physical-quantities", + "physical-units", + "system-of-units", + "system-of-quantities", + "isq", + "si", + "library", + "quantity-manipulation", + ) + license = "MIT" + url = "https://github.com/conan-io/conan-center-index" + settings = "os", "arch", "compiler", "build_type" + options = { + "cxx_modules": [True, False], + "import_std": [True, False], + "std_format": [True, False], + "string_view_ret": [True, False], + "no_crtp": [True, False], + "contracts": ["none", "gsl-lite", "ms-gsl"], + "freestanding": [True, False], + } + default_options = { + # "cxx_modules" default set in config_options() + # "import_std" default set in config_options() + # "std_format" default set in config_options() + # "string_view_ret" default set in config_options() + # "no_crtp" default set in config_options() + "contracts": "gsl-lite", + "freestanding": False, + } + no_copy_source = True + + @property + def _feature_compatibility(self): + return { + "minimum_support": { + "min_cppstd": "20", + "compiler": { + "gcc": "12", + "clang": "16", + "apple-clang": "15", + "msvc": "194", + "Visual Studio": "17", + }, + }, + "std_format": { + "min_cppstd": "20", + "compiler": { + "gcc": "13", + "clang": "17", + "apple-clang": "", + "msvc": "194", + "Visual Studio": "17", + }, + }, + "cxx_modules": { + "min_cppstd": "20", + "compiler": { + "gcc": "", + "clang": "17", + "apple-clang": "", + "msvc": "", + "Visual Studio": "", + }, + }, + "import_std": { + "min_cppstd": "23", + "compiler": {"gcc": "", "clang": "18", "apple-clang": "", "msvc": ""}, + }, + "static_constexpr_vars_in_constexpr_func": { + "min_cppstd": "23", + "compiler": { + "gcc": "13", + "clang": "17", + "apple-clang": "", + "msvc": "", + "Visual Studio": "", + }, + }, + "explicit_this": { + "min_cppstd": "23", + "compiler": { + "gcc": "14", + "clang": "18", + "apple-clang": "", + "msvc": "", + "Visual Studio": "", + }, + }, + } + + @property + def _option_feature_map(self): + return { + "std_format": "std_format", + "cxx_modules": "cxx_modules", + "import_std": "import_std", + "string_view_ret": "static_constexpr_vars_in_constexpr_func", + "no_crtp": "explicit_this", + } + + def _set_default_option(self, name): + compiler = self.settings.compiler + feature_name = self._option_feature_map[name] + feature = self._feature_compatibility[feature_name] + min_version = feature["compiler"].get(str(compiler)) + setattr( + self.options, + name, + bool( + min_version + and Version(compiler.version) >= min_version + and valid_min_cppstd(self, feature["min_cppstd"]) + ), + ) + + def _check_feature_supported(self, name, feature_name=name): + compiler = self.settings.compiler + cppstd = compiler.get_safe("cppstd") + feature = self._feature_compatibility[feature_name] + + # check C++ version + if cppstd and not valid_min_cppstd(self, feature["min_cppstd"]): + raise ConanInvalidConfiguration( + f"'{name}' requires at least cppstd={feature['min_cppstd']} ({cppstd} in use)", + ) + + # check compiler version + min_version = feature["compiler"].get(str(compiler)) + if min_version == None: + # not tested compiler being used - use at your own risk + return + if min_version == "": + raise ConanInvalidConfiguration( + f"'{name}' is not yet supported by any known {compiler} version" + ) + if loose_lt_semver(str(compiler.version), min_version): + raise ConanInvalidConfiguration( + f"'{name}' requires at least {compiler}-{min_version} ({compiler}-{compiler.version} in use)" + ) + + def config_options(self): + for key in self._option_feature_map.keys(): + self._set_default_option(key) + # TODO mixing of `import std;` and regular header files includes does not work for now + if self.options.import_std: + self.options.contracts = "none" + + def configure(self): + if self.options.cxx_modules: + self.package_type = "static-library" + else: + self.package_type = "header-library" + if self.options.freestanding: + self.options.rm_safe("std_format") + + def requirements(self): + if not self.options.freestanding: + if self.options.contracts == "gsl-lite": + self.requires("gsl-lite/0.41.0", transitive_headers=True) + elif self.options.contracts == "ms-gsl": + self.requires("ms-gsl/4.0.0", transitive_headers=True) + if not self.options.std_format: + self.requires("fmt/11.0.1", transitive_headers=True) + + def build_requirements(self): + self.tool_requires("cmake/[>=3.30 <4]") + + def validate(self): + self._check_feature_supported("mp-units", "minimum_support") + for key, value in self._option_feature_map.items(): + if self.options.get_safe(key) == True: + self._check_feature_supported(key, value) + if self.options.freestanding and self.options.contracts != "none": + raise ConanInvalidConfiguration( + "'contracts' should be set to 'none' for a freestanding build" + ) + # TODO mixing of `import std;` and regular header files includes does not work for now + if self.options.import_std: + if self.options.contracts != "none": + raise ConanInvalidConfiguration( + "'contracts' should be set to 'none' to use `import std;`" + ) + if not self.options.get_safe("std_format", default=True): + raise ConanInvalidConfiguration( + "'std_format' should be enabled to use `import std;`" + ) + + def layout(self): + cmake_layout(self, src_folder="src") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + opt = self.options + tc = CMakeToolchain(self) + if opt.cxx_modules: + tc.cache_variables["CMAKE_CXX_SCAN_FOR_MODULES"] = True + if opt.import_std: + tc.cache_variables["CMAKE_CXX_MODULE_STD"] = True + # TODO current experimental support according to `Help/dev/experimental.rst` + tc.cache_variables["CMAKE_EXPERIMENTAL_CXX_IMPORT_STD"] = ( + "0e5b6991-d74f-4b3d-a41c-cf096e0b2508" + ) + + # TODO remove the below when Conan will learn to handle C++ modules + if opt.freestanding: + tc.cache_variables["MP_UNITS_API_FREESTANDING"] = True + else: + tc.cache_variables["MP_UNITS_API_STD_FORMAT"] = opt.std_format + tc.cache_variables["MP_UNITS_API_CONTRACTS"] = str(opt.contracts).upper() + + tc.generate() + deps = CMakeDeps(self) + deps.generate() + + def build(self): + cmake = CMake(self) + cmake.configure(build_script_folder="src") + if self.options.cxx_modules: + cmake.build() + + def package_id(self): + if self.package_type == "header-library": + self.info.clear() + + def package(self): + copy( + self, + "LICENSE.md", + self.source_folder, + os.path.join(self.package_folder, "licenses"), + ) + cmake = CMake(self) + cmake.install() + # TODO remove the below when Conan will learn to handle C++ modules + if not self.options.cxx_modules: + # We have to preserve those files for C++ modules build as Conan + # can't generate such CMake targets for now + rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) + + def package_info(self): + compiler = self.settings.compiler + # TODO remove the branch when Conan will learn to handle C++ modules + if self.options.cxx_modules: + # CMakeDeps does not generate C++ modules definitions for now + # Skip the Conan-generated files and use the mp-unitsConfig.cmake bundled with mp-units + self.cpp_info.set_property("cmake_find_mode", "none") + self.cpp_info.builddirs = ["."] + else: + # handle contracts + if self.options.contracts == "none": + self.cpp_info.components["core"].defines.append( + "MP_UNITS_API_CONTRACTS=0" + ) + elif self.options.contracts == "gsl-lite": + self.cpp_info.components["core"].requires.append("gsl-lite::gsl-lite") + self.cpp_info.components["core"].defines.append( + "MP_UNITS_API_CONTRACTS=2" + ) + elif self.options.contracts == "ms-gsl": + self.cpp_info.components["core"].requires.append("ms-gsl::ms-gsl") + self.cpp_info.components["core"].defines.append( + "MP_UNITS_API_CONTRACTS=3" + ) + + # handle API options + self.cpp_info.components["core"].defines.append( + "MP_UNITS_API_STRING_VIEW_RET=" + + str(int(self.options.string_view_ret == True)) + ) + self.cpp_info.components["core"].defines.append( + "MP_UNITS_API_NO_CRTP=" + str(int(self.options.no_crtp == True)) + ) + self.cpp_info.components["core"].defines.append( + "MP_UNITS_API_STD_FORMAT=" + str(int(self.options.std_format == True)) + ) + if not self.options.std_format: + self.cpp_info.components["core"].requires.append("fmt::fmt") + + # handle hosted configuration + if not self.options.freestanding: + self.cpp_info.components["core"].defines.append("MP_UNITS_HOSTED=1") + + # handle import std + if self.options.import_std: + self.cpp_info.components["core"].defines.append("MP_UNITS_IMPORT_STD") + if compiler == "clang" and Version(compiler.version) < 19: + self.cpp_info.components["core"].cxxflags.append( + "-Wno-deprecated-declarations" + ) + + if compiler == "msvc": + self.cpp_info.components["core"].cxxflags.append("/utf-8") + + self.cpp_info.components["systems"].requires = ["core"] diff --git a/recipes/mp-units/2.3.0/test_package/CMakeLists.txt b/recipes/mp-units/2.3.0/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..0938e502d546b --- /dev/null +++ b/recipes/mp-units/2.3.0/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.25) +project(test_package LANGUAGES CXX) + +find_package(mp-units REQUIRED) + +add_executable(test_package test_package.cpp) +target_link_libraries(test_package PRIVATE mp-units::mp-units) +target_compile_features(test_package PUBLIC cxx_std_20) diff --git a/recipes/mp-units/2.3.0/test_package/conanfile.py b/recipes/mp-units/2.3.0/test_package/conanfile.py new file mode 100644 index 0000000000000..b2ed4344df2cb --- /dev/null +++ b/recipes/mp-units/2.3.0/test_package/conanfile.py @@ -0,0 +1,46 @@ +import os + +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) + + def generate(self): + tc = CMakeToolchain(self) + opt = self.dependencies["mp-units"].options + if opt.cxx_modules: + tc.cache_variables["CMAKE_CXX_SCAN_FOR_MODULES"] = True + if opt.import_std: + tc.cache_variables["CMAKE_CXX_MODULE_STD"] = True + # Current experimental support according to `Help/dev/experimental.rst` + tc.cache_variables[ + "CMAKE_EXPERIMENTAL_CXX_IMPORT_STD" + ] = "0e5b6991-d74f-4b3d-a41c-cf096e0b2508" + # TODO remove the below when Conan will learn to handle C++ modules + if opt.freestanding: + tc.cache_variables["MP_UNITS_API_FREESTANDING"] = True + else: + tc.cache_variables["MP_UNITS_API_STD_FORMAT"] = opt.std_format + tc.cache_variables["MP_UNITS_API_CONTRACTS"] = str(opt.contracts).upper() + tc.generate() + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/mp-units/2.3.0/test_package/test_package.cpp b/recipes/mp-units/2.3.0/test_package/test_package.cpp new file mode 100644 index 0000000000000..5cdfe02de428f --- /dev/null +++ b/recipes/mp-units/2.3.0/test_package/test_package.cpp @@ -0,0 +1,30 @@ +#include +#include +#ifdef MP_UNITS_IMPORT_STD +import std; +#else +#include +#endif +#ifdef MP_UNITS_MODULES +import mp_units; +#else +#include +#include +#include +#include +#endif + +using namespace mp_units; + +constexpr QuantityOf auto avg_speed( + QuantityOf auto d, + QuantityOf auto t) +{ + return d / t; +} + +int main() +{ + using namespace mp_units::si::unit_symbols; + std::cout << MP_UNITS_STD_FMT::format("Average speed = {}\n", avg_speed(240 * km, 2 * h)); +} diff --git a/recipes/mp-units/config.yml b/recipes/mp-units/config.yml index 3bf1ad6108b4a..65cd632824585 100644 --- a/recipes/mp-units/config.yml +++ b/recipes/mp-units/config.yml @@ -1,4 +1,12 @@ versions: + "2.4.0": + folder: 2.3.0 + "2.3.0": + folder: 2.3.0 + "2.2.1": + folder: 2.2.0 + "2.1.1": + folder: 2.0.0 "2.1.0": folder: 2.0.0 "2.0.0": diff --git a/recipes/mpdecimal/2.5.x/conanfile.py b/recipes/mpdecimal/2.5.x/conanfile.py index ce8610550b172..eb2f694bc66f9 100644 --- a/recipes/mpdecimal/2.5.x/conanfile.py +++ b/recipes/mpdecimal/2.5.x/conanfile.py @@ -1,5 +1,5 @@ from conan import ConanFile -from conan.tools.gnu import AutotoolsToolchain, AutotoolsDeps, Autotools +from conan.tools.gnu import AutotoolsToolchain, Autotools from conan.tools.files import get, chdir, copy, export_conandata_patches, apply_conandata_patches, mkdir, rename from conan.tools.layout import basic_layout from conan.tools.build import cross_building @@ -102,13 +102,9 @@ def generate(self): tc = AutotoolsToolchain(self) tc.configure_args.append("--enable-cxx" if self.options.cxx else "--disable-cxx") - tc.generate() - - deps = AutotoolsDeps(self) - if is_apple_os(self) and self.settings.arch == "armv8": - deps.environment.append("LDFLAGS", ["-arch arm64"]) - deps.environment.append("LDXXFLAGS", ["-arch arm64"]) - deps.generate() + tc_env = tc.environment() + tc_env.append("LDXXFLAGS", ["$LDFLAGS"]) + tc.generate(tc_env) @property def _dist_folder(self): @@ -219,7 +215,10 @@ def package(self): def package_info(self): lib_pre_suf = ("", "") if is_msvc(self): - lib_pre_suf = ("lib", f"-{self.version}") + if self.options.shared: + lib_pre_suf = ("lib", f"-{self.version}.dll") + else: + lib_pre_suf = ("lib", f"-{self.version}") elif self.settings.os == "Windows": if self.options.shared: lib_pre_suf = ("", ".dll") diff --git a/recipes/mppp/all/conandata.yml b/recipes/mppp/all/conandata.yml index 5ecb23c111e1a..65c8b63bf0804 100644 --- a/recipes/mppp/all/conandata.yml +++ b/recipes/mppp/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.0.3": + url: "https://github.com/bluescarni/mppp/archive/v1.0.3.tar.gz" + sha256: "d5beb0002910de4ea96dc15dc0d80d759afeb2c5e68716523d519d66a7dfe423" "1.0.2": url: "https://github.com/bluescarni/mppp/archive/v1.0.2.tar.gz" sha256: "2a537bc339726388fdda39905692d3df92fceee51d264e720e0e7ab7570bcdaf" @@ -12,6 +15,14 @@ sources: url: "https://github.com/bluescarni/mppp/archive/v0.26.tar.gz" sha256: "4dbfa68802d9a1365eda884f085418afc147d01b7a928e8333e4dcc1c3b3ce9e" patches: + "1.0.3": + - patch_file: "patches/1.0.3-0001-disable-warning-error.patch" + patch_description: "disable the flag for treats warning as errors" + patch_type: "portability" + - patch_file: "patches/1.0.3-0002-remove-fmt-version.patch" + # https://github.com/conan-io/conan/issues/14172 + patch_description: "remove fmt version number from find_package" + patch_type: "conan" "1.0.2": - patch_file: "patches/1.0.0-0001-disable-warning-error.patch" patch_description: "disable the flag for treats warning as errors" diff --git a/recipes/mppp/all/patches/1.0.3-0001-disable-warning-error.patch b/recipes/mppp/all/patches/1.0.3-0001-disable-warning-error.patch new file mode 100644 index 0000000000000..2bbd6313a54a7 --- /dev/null +++ b/recipes/mppp/all/patches/1.0.3-0001-disable-warning-error.patch @@ -0,0 +1,22 @@ +diff --git a/cmake/yacma/YACMACompilerLinkerSettings.cmake b/cmake/yacma/YACMACompilerLinkerSettings.cmake +index 3d9cd9d..2b8cf7b 100644 +--- a/cmake/yacma/YACMACompilerLinkerSettings.cmake ++++ b/cmake/yacma/YACMACompilerLinkerSettings.cmake +@@ -96,7 +96,7 @@ if(NOT _YACMACompilerLinkerSettingsRun) + # NOTE: enable unconditionally, as it seems like the CMake + # machinery for detecting this fails. Perhaps the source code + # used for checking the flag emits warnings? +- list(APPEND _YACMA_CXX_FLAGS_DEBUG "-Werror") ++ # list(APPEND _YACMA_CXX_FLAGS_DEBUG "-Werror") + # New warnings in clang 8. + # NOTE: a few issues with macros here, let's disable for now. + # _YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wextra-semi-stmt) +@@ -197,7 +197,7 @@ if(NOT _YACMACompilerLinkerSettingsRun) + # Enable higher warning level than usual. + _YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(/W4) + # Treat warnings as errors. +- _YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(/WX) ++ #_YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(/WX) + endif() + + # Set the cache variables. diff --git a/recipes/mppp/all/patches/1.0.3-0002-remove-fmt-version.patch b/recipes/mppp/all/patches/1.0.3-0002-remove-fmt-version.patch new file mode 100644 index 0000000000000..33106dff23d74 --- /dev/null +++ b/recipes/mppp/all/patches/1.0.3-0002-remove-fmt-version.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 6fd31fe..503cedf 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -430,7 +430,7 @@ endif() + # to print 128-bit integers. + set(_MPPP_MIN_FMT_VERSION "6.2") + if(MPPP_WITH_FMT) +- find_package(fmt ${_MPPP_MIN_FMT_VERSION} REQUIRED CONFIG) ++ find_package(fmt REQUIRED CONFIG) + message(STATUS "fmt version: ${fmt_VERSION}") + target_link_libraries(mp++ PUBLIC fmt::fmt) + endif() diff --git a/recipes/mppp/config.yml b/recipes/mppp/config.yml index 460a704f2241d..518666119a0f9 100644 --- a/recipes/mppp/config.yml +++ b/recipes/mppp/config.yml @@ -1,4 +1,6 @@ versions: + "1.0.3": + folder: all "1.0.2": folder: all "1.0.0": diff --git a/recipes/ms-gsl/all/conandata.yml b/recipes/ms-gsl/all/conandata.yml index 00aab19c60dba..3469e0134c7e0 100644 --- a/recipes/ms-gsl/all/conandata.yml +++ b/recipes/ms-gsl/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "4.1.0": + url: "https://github.com/microsoft/GSL/archive/v4.1.0.tar.gz" + sha256: "0a227fc9c8e0bf25115f401b9a46c2a68cd28f299d24ab195284eb3f1d7794bd" "4.0.0": url: "https://github.com/microsoft/GSL/archive/v4.0.0.tar.gz" sha256: "f0e32cb10654fea91ad56bde89170d78cfbf4363ee0b01d8f097de2ba49f6ce9" diff --git a/recipes/ms-gsl/all/conanfile.py b/recipes/ms-gsl/all/conanfile.py index 22f61968c9ba8..e4e94a29cb26c 100644 --- a/recipes/ms-gsl/all/conanfile.py +++ b/recipes/ms-gsl/all/conanfile.py @@ -13,11 +13,10 @@ class MicrosoftGslConan(ConanFile): name = "ms-gsl" description = "Microsoft's implementation of the Guidelines Support Library" + license = "MIT" url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/microsoft/GSL" - license = "MIT" - topics = ("gsl", "guidelines", "core", "span") - no_copy_source = True + topics = ("gsl", "guidelines", "core", "span", "header-only") package_type = "header-library" settings = "os", "arch", "compiler", "build_type" options = { @@ -26,6 +25,7 @@ class MicrosoftGslConan(ConanFile): default_options = { "on_contract_violation": "terminate" } + no_copy_source = True @property def _minimum_cpp_standard(self): diff --git a/recipes/ms-gsl/config.yml b/recipes/ms-gsl/config.yml index b00b1020b4e16..9d7804e501efd 100644 --- a/recipes/ms-gsl/config.yml +++ b/recipes/ms-gsl/config.yml @@ -1,4 +1,6 @@ versions: + "4.1.0": + folder: all "4.0.0": folder: all "3.1.0": diff --git a/recipes/msdf-atlas-gen/all/conandata.yml b/recipes/msdf-atlas-gen/all/conandata.yml index 1c3664b5df564..3ce2299e54ce1 100644 --- a/recipes/msdf-atlas-gen/all/conandata.yml +++ b/recipes/msdf-atlas-gen/all/conandata.yml @@ -1,9 +1,16 @@ sources: + "1.3": + url: "https://github.com/Chlumsky/msdf-atlas-gen/archive/refs/tags/v1.3.tar.gz" + sha256: "5d3d58e8bc92836baf23ce3a80ef79cc4c2d022fb86b7f160b11cc06cd62fe78" "1.2.2": url: "https://github.com/Chlumsky/msdf-atlas-gen/archive/refs/tags/v1.2.2.tar.gz" sha256: "7D2EA46F66E21AB9A205BF7703D520F209B9A035EE13CBB266A3B8322F62FA28" patches: + "1.3": + - patch_file: "patches/1.3.0-0001-fix-cmake.patch" + patch_description: "Fix CMakeLists.txt to get libraries from Conan and install in bin dir" + patch_type: "conan" "1.2.2": - - patch_file: "patches/0001-fix-cmake.patch" + - patch_file: "patches/1.2.2-0001-fix-cmake.patch" patch_description: "Fix CMakeLists.txt to get libraries from Conan and install in bin dir" patch_type: "conan" diff --git a/recipes/msdf-atlas-gen/all/conanfile.py b/recipes/msdf-atlas-gen/all/conanfile.py index 51daed7b1f501..d26eb8ef19f91 100644 --- a/recipes/msdf-atlas-gen/all/conanfile.py +++ b/recipes/msdf-atlas-gen/all/conanfile.py @@ -1,27 +1,27 @@ +import os + from conan import ConanFile -from conan.tools.files import get, copy, apply_conandata_patches, export_conandata_patches +from conan.tools.files import get, copy, apply_conandata_patches, export_conandata_patches, rmdir from conan.tools.build import check_min_cppstd from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout -import os - +from conan.tools.scm import Version +from conan.tools.microsoft import is_msvc required_conan_version = ">=1.53.0" class MsdfAtlasGenConan(ConanFile): name = "msdf-atlas-gen" + description = "MSDF font atlas generator" license = "MIT" - homepage = "https://github.com/Chlumsky/msdf-atlas-gen" url = "https://github.com/conan-io/conan-center-index" - description = "MSDF font atlas generator" + homepage = "https://github.com/Chlumsky/msdf-atlas-gen" topics = ("msdf-atlas-gen", "msdf", "font", "atlas") - settings = "os", "arch", "compiler", "build_type" package_type = "application" + settings = "os", "arch", "compiler", "build_type" - def requirements(self): - self.requires("artery-font-format/1.0") - self.requires("msdfgen/1.9.1") - self.requires("lodepng/cci.20200615") + def export_sources(self): + export_conandata_patches(self) def layout(self): cmake_layout(self, src_folder="src") @@ -30,25 +30,41 @@ def validate_build(self): if self.settings.compiler.get_safe("cppstd"): check_min_cppstd(self, 11) + def requirements(self): + if Version(self.version) < "1.3": + self.requires("msdfgen/1.9.1") + self.requires("artery-font-format/1.0") + self.requires("lodepng/cci.20200615") + else: + self.requires("msdfgen/1.12") + self.requires("artery-font-format/1.1") + self.requires("libpng/[>=1.6 <2]") + def package_id(self): del self.info.settings.compiler del self.info.settings.build_type - def export_sources(self): - export_conandata_patches(self) - def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) - apply_conandata_patches(self) def generate(self): tc = CMakeToolchain(self) - tc.variables["MSDF_ATLAS_GEN_BUILD_STANDALONE"] = True + tc.cache_variables["MSDF_ATLAS_GEN_BUILD_STANDALONE"] = True + tc.cache_variables["MSDF_ATLAS_USE_VCPKG"] = False + tc.cache_variables["MSDF_ATLAS_USE_SKIA"] = False + tc.cache_variables["MSDF_ATLAS_NO_ARTERY_FONT"] = False + tc.cache_variables["MSDF_ATLAS_MSDFGEN_EXTERNAL"] = True + tc.cache_variables["MSDF_ATLAS_INSTALL"] = True + if Version(self.version) >= "1.3": + tc.preprocessor_definitions["MSDFGEN_USE_LIBPNG"] = 1 + if is_msvc(self): + tc.cache_variables["MSDF_ATLAS_DYNAMIC_RUNTIME"] = "dynamic" in str(self.settings.compiler.runtime) or "MD" in str(self.settings.compiler.runtime) tc.generate() tc = CMakeDeps(self) tc.generate() def build(self): + apply_conandata_patches(self) cmake = CMake(self) cmake.configure() cmake.build() @@ -57,6 +73,7 @@ def package(self): copy(self, pattern="LICENSE.txt", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) cmake = CMake(self) cmake.install() + rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) def package_info(self): self.cpp_info.frameworkdirs = [] diff --git a/recipes/msdf-atlas-gen/all/patches/0001-fix-cmake.patch b/recipes/msdf-atlas-gen/all/patches/0001-fix-cmake.patch deleted file mode 100644 index 356c6a09fe8be..0000000000000 --- a/recipes/msdf-atlas-gen/all/patches/0001-fix-cmake.patch +++ /dev/null @@ -1,42 +0,0 @@ ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -7,9 +7,11 @@ - set(MSDFGEN_USE_OPENMP OFF CACHE INTERNAL "Build with OpenMP support for multithreaded code (disabled for atlas gen)" FORCE) - set(MSDFGEN_USE_CPP11 ON CACHE INTERNAL "Build with C++11 enabled (always enabled for atlas gen)" FORCE) - set(MSDFGEN_INSTALL OFF CACHE BOOL "Generate installation target for msdfgen") --add_subdirectory(msdfgen) - -+ - find_package(Threads REQUIRED) -+find_package(msdfgen REQUIRED) -+find_package(artery-font-format REQUIRED) - - file(GLOB_RECURSE msdf-atlas-gen_HEADERS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} - "msdf-atlas-gen/*.h" -@@ -24,19 +26,12 @@ - add_library(msdf-atlas-gen ${msdf-atlas-gen_SOURCES} ${msdf-atlas-gen_HEADERS}) - add_library(msdf-atlas-gen::msdf-atlas-gen ALIAS msdf-atlas-gen) - set_target_properties(msdf-atlas-gen PROPERTIES PUBLIC_HEADER "${msdf-atlas-gen_HEADERS}") --target_include_directories(msdf-atlas-gen --INTERFACE -- $ --PRIVATE -- ${CMAKE_CURRENT_SOURCE_DIR}/msdfgen/include # for lodepng.h -- ${CMAKE_CURRENT_SOURCE_DIR}/artery-font-format --) - - if (MSVC) - target_compile_definitions(msdf-atlas-gen PUBLIC _CRT_SECURE_NO_WARNINGS) - endif() - target_compile_features(msdf-atlas-gen PUBLIC cxx_std_11) --target_link_libraries(msdf-atlas-gen PUBLIC Threads::Threads msdfgen::msdfgen msdfgen::msdfgen-ext) -+target_link_libraries(msdf-atlas-gen PUBLIC Threads::Threads msdfgen::msdfgen msdfgen::msdfgen-ext artery-font-format::artery-font-format) - - # TODO make these public in msdfgen so that this doesn't have to be repeated here - if(FREETYPE_WITH_PNG) -@@ -58,3 +53,5 @@ - target_compile_features(msdf-atlas-gen-standalone PUBLIC cxx_std_11) - target_link_libraries(msdf-atlas-gen-standalone PUBLIC msdf-atlas-gen::msdf-atlas-gen) - endif() -+ -+install(TARGETS msdf-atlas-gen-standalone DESTINATION bin) diff --git a/recipes/msdf-atlas-gen/all/patches/1.2.2-0001-fix-cmake.patch b/recipes/msdf-atlas-gen/all/patches/1.2.2-0001-fix-cmake.patch new file mode 100644 index 0000000000000..f4f985352e174 --- /dev/null +++ b/recipes/msdf-atlas-gen/all/patches/1.2.2-0001-fix-cmake.patch @@ -0,0 +1,53 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index b1ec605..6b6277a 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -7,10 +7,11 @@ set(MSDFGEN_BUILD_MSDFGEN_STANDALONE OFF CACHE BOOL "Build the msdfgen standalon + set(MSDFGEN_USE_OPENMP OFF CACHE INTERNAL "Build with OpenMP support for multithreaded code (disabled for atlas gen)" FORCE) + set(MSDFGEN_USE_CPP11 ON CACHE INTERNAL "Build with C++11 enabled (always enabled for atlas gen)" FORCE) + set(MSDFGEN_INSTALL OFF CACHE BOOL "Generate installation target for msdfgen") +-add_subdirectory(msdfgen) +- ++# add_subdirectory(msdfgen) + find_package(Threads REQUIRED) +- ++find_package(msdfgen REQUIRED) ++find_package(artery-font-format REQUIRED) ++find_package(lodepng REQUIRED CONFIG) + file(GLOB_RECURSE msdf-atlas-gen_HEADERS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} + "msdf-atlas-gen/*.h" + "msdf-atlas-gen/*.hpp" +@@ -24,19 +25,19 @@ file(GLOB_RECURSE msdf-atlas-gen_SOURCES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} + add_library(msdf-atlas-gen ${msdf-atlas-gen_SOURCES} ${msdf-atlas-gen_HEADERS}) + add_library(msdf-atlas-gen::msdf-atlas-gen ALIAS msdf-atlas-gen) + set_target_properties(msdf-atlas-gen PROPERTIES PUBLIC_HEADER "${msdf-atlas-gen_HEADERS}") +-target_include_directories(msdf-atlas-gen +-INTERFACE +- $ +-PRIVATE +- ${CMAKE_CURRENT_SOURCE_DIR}/msdfgen/include # for lodepng.h +- ${CMAKE_CURRENT_SOURCE_DIR}/artery-font-format +-) ++# target_include_directories(msdf-atlas-gen ++# INTERFACE ++# $ ++# PRIVATE ++# ${CMAKE_CURRENT_SOURCE_DIR}/msdfgen/include # for lodepng.h ++# ${CMAKE_CURRENT_SOURCE_DIR}/artery-font-format ++# ) + + if (MSVC) + target_compile_definitions(msdf-atlas-gen PUBLIC _CRT_SECURE_NO_WARNINGS) + endif() + target_compile_features(msdf-atlas-gen PUBLIC cxx_std_11) +-target_link_libraries(msdf-atlas-gen PUBLIC Threads::Threads msdfgen::msdfgen msdfgen::msdfgen-ext) ++target_link_libraries(msdf-atlas-gen PUBLIC Threads::Threads msdfgen::msdfgen msdfgen::msdfgen-ext artery-font-format::artery-font-format lodepng::lodepng) + + # TODO make these public in msdfgen so that this doesn't have to be repeated here + if(FREETYPE_WITH_PNG) +@@ -58,3 +59,5 @@ if(MSDF_ATLAS_GEN_BUILD_STANDALONE) + target_compile_features(msdf-atlas-gen-standalone PUBLIC cxx_std_11) + target_link_libraries(msdf-atlas-gen-standalone PUBLIC msdf-atlas-gen::msdf-atlas-gen) + endif() ++ ++install(TARGETS msdf-atlas-gen-standalone DESTINATION bin) diff --git a/recipes/msdf-atlas-gen/all/patches/1.3.0-0001-fix-cmake.patch b/recipes/msdf-atlas-gen/all/patches/1.3.0-0001-fix-cmake.patch new file mode 100644 index 0000000000000..80d3825982383 --- /dev/null +++ b/recipes/msdf-atlas-gen/all/patches/1.3.0-0001-fix-cmake.patch @@ -0,0 +1,23 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 5b7f6db..1936ca5 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -109,7 +109,8 @@ target_include_directories(msdf-atlas-gen INTERFACE + if(MSDF_ATLAS_NO_ARTERY_FONT) + target_compile_definitions(msdf-atlas-gen PUBLIC MSDF_ATLAS_NO_ARTERY_FONT) + else() +- target_include_directories(msdf-atlas-gen PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/artery-font-format) ++ find_package(artery-font-format REQUIRED CONFIG) ++ target_link_libraries(msdf-atlas-gen PRIVATE artery-font-format::artery-font-format) + endif() + set_property(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT msdf-atlas-gen) + +@@ -118,7 +119,7 @@ target_link_libraries(msdf-atlas-gen PRIVATE Threads::Threads) + if(NOT MSDFGEN_DISABLE_PNG) + target_link_libraries(msdf-atlas-gen PRIVATE PNG::PNG) + endif() +-target_link_libraries(msdf-atlas-gen PUBLIC msdfgen::msdfgen) ++target_link_libraries(msdf-atlas-gen PUBLIC msdfgen::msdfgen msdfgen::msdfgen-ext) + + if(BUILD_SHARED_LIBS AND WIN32) + target_compile_definitions(msdf-atlas-gen PRIVATE "MSDF_ATLAS_PUBLIC=__declspec(dllexport)") diff --git a/recipes/msdf-atlas-gen/all/test_package/Sacramento-Regular.ttf b/recipes/msdf-atlas-gen/all/test_package/Sacramento-Regular.ttf deleted file mode 100644 index cfd2eabc8699f..0000000000000 Binary files a/recipes/msdf-atlas-gen/all/test_package/Sacramento-Regular.ttf and /dev/null differ diff --git a/recipes/msdf-atlas-gen/all/test_package/conanfile.py b/recipes/msdf-atlas-gen/all/test_package/conanfile.py index f15dfbbe1bd98..ff5302d78bc18 100644 --- a/recipes/msdf-atlas-gen/all/test_package/conanfile.py +++ b/recipes/msdf-atlas-gen/all/test_package/conanfile.py @@ -12,23 +12,6 @@ class TestPackageConan(ConanFile): def requirements(self): self.requires(self.tested_reference_str) - @property - def _atlas_texture_file(self): - return os.path.join(self.build_folder, "atlas_texture.png") - - @property - def _atlas_desc_file(self): - return os.path.join(self.build_folder, "atlas_desc.json") - def test(self): if can_run(self): - ttf_path = os.path.join(self.source_folder, "Sacramento-Regular.ttf") - charset_path = os.path.join(self.source_folder, "uppercase_charset") - - ret_code = self.run( - "msdf-atlas-gen -font {} -charset {} -imageout {} -json {}".format(ttf_path, charset_path, self._atlas_texture_file, self._atlas_desc_file), env="conanrun") - - assert ret_code == 0 - assert os.path.isfile(self._atlas_texture_file) - assert os.path.isfile(self._atlas_desc_file) - + self.run("msdf-atlas-gen -help", env="conanrun") diff --git a/recipes/msdf-atlas-gen/all/test_package/uppercase_charset b/recipes/msdf-atlas-gen/all/test_package/uppercase_charset deleted file mode 100644 index c3c76b7e894ab..0000000000000 --- a/recipes/msdf-atlas-gen/all/test_package/uppercase_charset +++ /dev/null @@ -1 +0,0 @@ -['A', 'Z'] diff --git a/recipes/msdf-atlas-gen/config.yml b/recipes/msdf-atlas-gen/config.yml index af40d9653a378..297a337077654 100644 --- a/recipes/msdf-atlas-gen/config.yml +++ b/recipes/msdf-atlas-gen/config.yml @@ -1,3 +1,5 @@ versions: + "1.3": + folder: all "1.2.2": folder: all diff --git a/recipes/msdfgen/all/conandata.yml b/recipes/msdfgen/all/conandata.yml index 2d80e884e7bf9..6943aebeb6690 100644 --- a/recipes/msdfgen/all/conandata.yml +++ b/recipes/msdfgen/all/conandata.yml @@ -1,4 +1,10 @@ sources: + "1.12": + url: "https://github.com/Chlumsky/msdfgen/archive/refs/tags/v1.12.tar.gz" + sha256: "f058117496097217d12e4ea86adbff8467adaf6f12af793925d243b86b0c4f57" + "1.11": + url: "https://github.com/Chlumsky/msdfgen/archive/refs/tags/v1.11.tar.gz" + sha256: "fad74e33274f591e72511bc0546189e7aec439f2a512ef1b2fde243554d457cb" "1.10": url: "https://github.com/Chlumsky/msdfgen/archive/refs/tags/v1.10.tar.gz" sha256: "2754d1687bfb80968d9c682e0c4c04c8fcf72df1421d076baf44ea0d87aa3662" @@ -10,8 +16,8 @@ sources: sha256: "909eb88c71268dc00cdda244a1fa40a0feefae45f68a779fbfddd5463559fa40" patches: "1.10": - - patch_file: "patches/1.10-0001-fix-cmake.patch" - patch_description: "move project position to top" + - patch_file: "patches/1.10-0001-honor-msvc-runtime.patch" + patch_description: "Remove hardcoded vc runtime" patch_type: "conan" "1.9.1": - patch_file: "patches/1.9-0001-unvendor-external-libs.patch" diff --git a/recipes/msdfgen/all/conanfile.py b/recipes/msdfgen/all/conanfile.py index 03f96bc253715..2094d2f1bfe2c 100644 --- a/recipes/msdfgen/all/conanfile.py +++ b/recipes/msdfgen/all/conanfile.py @@ -2,22 +2,21 @@ from conan.errors import ConanInvalidConfiguration from conan.tools.build import check_min_cppstd from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout -from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, replace_in_file, rmdir +from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, replace_in_file, rm, rmdir from conan.tools.microsoft import is_msvc, is_msvc_static_runtime from conan.tools.scm import Version import os required_conan_version = ">=1.53.0" - class MsdfgenConan(ConanFile): name = "msdfgen" description = "Multi-channel signed distance field generator" license = "MIT" - topics = ("msdf", "shape", "glyph", "font") - homepage = "https://github.com/Chlumsky/msdfgen" url = "https://github.com/conan-io/conan-center-index" - + homepage = "https://github.com/Chlumsky/msdfgen" + topics = ("msdf", "shape", "glyph", "font") + package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], @@ -49,12 +48,13 @@ def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - self.requires("freetype/2.12.1") + self.requires("freetype/2.13.2") if Version(self.version) < "1.10": self.requires("lodepng/cci.20200615") else: - self.requires("libpng/1.6.39") - self.requires("tinyxml2/9.0.0") + self.requires("libpng/[>=1.6 <2]") + self.requires("tinyxml2/10.0.0") + def validate(self): if self.settings.compiler.get_safe("cppstd"): @@ -65,59 +65,45 @@ def validate(self): raise ConanInvalidConfiguration("skia recipe not available yet in CCI") def source(self): - get(self, **self.conan_data["sources"][self.version], - destination=self.source_folder, strip_root=True) + get(self, **self.conan_data["sources"][self.version], strip_root=True) def generate(self): tc = CMakeToolchain(self) - tc.variables["MSDFGEN_BUILD_MSDFGEN_STANDALONE"] = self.options.utility - tc.variables["MSDFGEN_USE_OPENMP"] = self.options.with_openmp - tc.variables["MSDFGEN_USE_CPP11"] = True - tc.variables["MSDFGEN_USE_SKIA"] = self.options.with_skia - tc.variables["MSDFGEN_INSTALL"] = True + tc.cache_variables["MSDFGEN_BUILD_MSDFGEN_STANDALONE"] = self.options.utility + tc.cache_variables["MSDFGEN_USE_OPENMP"] = self.options.with_openmp + tc.cache_variables["MSDFGEN_USE_CPP11"] = True + tc.cache_variables["MSDFGEN_USE_SKIA"] = self.options.with_skia + tc.cache_variables["MSDFGEN_INSTALL"] = True if Version(self.version) >= "1.10": - tc.variables["MSDFGEN_DYNAMIC_RUNTIME"] = not is_msvc_static_runtime(self) - tc.variables["MSDFGEN_USE_VCPKG"] = False + tc.cache_variables["MSDFGEN_USE_VCPKG"] = False + # Because in upstream CMakeLists, project() is called after some logic based on BUILD_SHARED_LIBS + tc.cache_variables["BUILD_SHARED_LIBS"] = self.options.shared + if Version(self.version) >= "1.11": + tc.cache_variables["MSDFGEN_DYNAMIC_RUNTIME"] = not is_msvc_static_runtime(self) + if self.settings.os == "Linux": + # Workaround for https://github.com/conan-io/conan/issues/13560 + libdirs_host = [l for dependency in self.dependencies.host.values() for l in dependency.cpp_info.aggregated_components().libdirs] + tc.variables["CMAKE_BUILD_RPATH"] = ";".join(libdirs_host) tc.generate() deps = CMakeDeps(self) deps.generate() def _patch_sources(self): apply_conandata_patches(self) - cmakelists = os.path.join(self.source_folder, "CMakeLists.txt") - # workaround against CMAKE_FIND_PACKAGE_PREFER_CONFIG ON in conan toolchain - replace_in_file(self, cmakelists, "find_package(Freetype REQUIRED)", "find_package(Freetype REQUIRED MODULE)") - # remove bundled lodepng & tinyxml2 - rmdir(self, os.path.join(self.source_folder, "lib")) - rmdir(self, os.path.join(self.source_folder, "include")) - # very weird but required for Visual Studio when libs are unvendored (at least for Ninja generator) - if is_msvc(self): - if Version(self.version) < "1.10": + + if Version(self.version) < "1.10": + # remove bundled lodepng & tinyxml2 + rmdir(self, os.path.join(self.source_folder, "lib")) + rmdir(self, os.path.join(self.source_folder, "include")) + + # very weird but required for Visual Studio when libs are unvendored (at least for Ninja generator) + if is_msvc(self): replace_in_file( self, - cmakelists, + os.path.join(self.source_folder, "CMakeLists.txt"), "set_target_properties(msdfgen-standalone PROPERTIES ARCHIVE_OUTPUT_DIRECTORY archive OUTPUT_NAME msdfgen)", "set_target_properties(msdfgen-standalone PROPERTIES OUTPUT_NAME msdfgen IMPORT_PREFIX foo)", ) - else: - replace_in_file( - self, - cmakelists, - 'set_property(TARGET msdfgen-core PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$:Debug>")', - '' - ) - replace_in_file( - self, - cmakelists, - 'set_property(TARGET msdfgen-ext PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$:Debug>")', - '' - ) - replace_in_file( - self, - cmakelists, - 'set_property(TARGET msdfgen PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$:Debug>")', - '' - ) def build(self): self._patch_sources() @@ -130,6 +116,7 @@ def package(self): cmake = CMake(self) cmake.install() rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) + rm(self, "*.pdb", os.path.join(self.package_folder, "bin")) def package_info(self): self.cpp_info.set_property("cmake_file_name", "msdfgen") @@ -167,7 +154,6 @@ def package_info(self): if self.options.with_skia: self.cpp_info.components["msdfgen-ext"].defines.append("MSDFGEN_USE_SKIA") + # TODO: to remove once conan v1 support dropped if self.options.utility: - bin_path = os.path.join(self.package_folder, "bin") - self.output.info("Appending PATH environment variable: {}".format(bin_path)) - self.env_info.PATH.append(bin_path) + self.env_info.PATH.append(os.path.join(self.package_folder, "bin")) diff --git a/recipes/msdfgen/all/patches/1.10-0001-fix-cmake.patch b/recipes/msdfgen/all/patches/1.10-0001-fix-cmake.patch deleted file mode 100644 index 50b04c4c1e5d9..0000000000000 --- a/recipes/msdfgen/all/patches/1.10-0001-fix-cmake.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 6dec916..432f218 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -2,6 +2,9 @@ - cmake_minimum_required(VERSION 3.15) - include(cmake/version.cmake) - -+# Version is specified in vcpkg.json -+project(msdfgen VERSION ${MSDFGEN_VERSION} LANGUAGES CXX) -+ - option(MSDFGEN_CORE_ONLY "Only build the core library with no dependencies" OFF) - option(MSDFGEN_BUILD_STANDALONE "Build the msdfgen standalone executable" ON) - option(MSDFGEN_USE_VCPKG "Use vcpkg package manager to link project dependencies" ON) -@@ -67,9 +70,6 @@ if(MSDFGEN_USE_VCPKG) - endif() - endif() - --# Version is specified in vcpkg.json --project(msdfgen VERSION ${MSDFGEN_VERSION} LANGUAGES CXX) -- - file(GLOB_RECURSE MSDFGEN_CORE_HEADERS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "core/*.h" "core/*.hpp") - file(GLOB_RECURSE MSDFGEN_CORE_SOURCES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "core/*.cpp") - file(GLOB_RECURSE MSDFGEN_EXT_HEADERS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "ext/*.h" "ext/*.hpp") diff --git a/recipes/msdfgen/all/patches/1.10-0001-honor-msvc-runtime.patch b/recipes/msdfgen/all/patches/1.10-0001-honor-msvc-runtime.patch new file mode 100644 index 0000000000000..c0f9784ad23cf --- /dev/null +++ b/recipes/msdfgen/all/patches/1.10-0001-honor-msvc-runtime.patch @@ -0,0 +1,26 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -79,7 +79,6 @@ file(GLOB_RECURSE MSDFGEN_EXT_SOURCES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "ext/ + add_library(msdfgen-core "${CMAKE_CURRENT_SOURCE_DIR}/msdfgen.h" ${MSDFGEN_CORE_HEADERS} ${MSDFGEN_CORE_SOURCES}) + add_library(msdfgen::msdfgen-core ALIAS msdfgen-core) + set_target_properties(msdfgen-core PROPERTIES PUBLIC_HEADER "${MSDFGEN_CORE_HEADERS}") +-set_property(TARGET msdfgen-core PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$:Debug>") + target_compile_definitions(msdfgen-core PUBLIC + MSDFGEN_VERSION=${MSDFGEN_VERSION} + MSDFGEN_VERSION_MAJOR=${MSDFGEN_VERSION_MAJOR} +@@ -127,7 +126,6 @@ if(NOT MSDFGEN_CORE_ONLY) + add_library(msdfgen-ext "${CMAKE_CURRENT_SOURCE_DIR}/msdfgen-ext.h" ${MSDFGEN_EXT_HEADERS} ${MSDFGEN_EXT_SOURCES}) + add_library(msdfgen::msdfgen-ext ALIAS msdfgen-ext) + set_target_properties(msdfgen-ext PROPERTIES PUBLIC_HEADER "${MSDFGEN_EXT_HEADERS}") +- set_property(TARGET msdfgen-ext PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$:Debug>") + target_compile_definitions(msdfgen-ext PUBLIC MSDFGEN_USE_LIBPNG) + target_link_libraries(msdfgen-ext PRIVATE msdfgen::msdfgen-core Freetype::Freetype tinyxml2::tinyxml2 PNG::PNG) + target_include_directories(msdfgen-ext +@@ -171,7 +169,6 @@ if(MSDFGEN_BUILD_STANDALONE) + add_executable(msdfgen ${MSDFGEN_STANDALONE_SOURCES}) + target_compile_definitions(msdfgen PUBLIC MSDFGEN_STANDALONE) + target_compile_definitions(msdfgen PRIVATE MSDFGEN_VERSION_UNDERLINE=${MSDFGEN_VERSION_UNDERLINE}) +- set_property(TARGET msdfgen PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$:Debug>") + target_link_libraries(msdfgen PRIVATE msdfgen::msdfgen) + set_property(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT msdfgen) + endif() diff --git a/recipes/msdfgen/all/test_package/OpenSans-Bold.ttf b/recipes/msdfgen/all/test_package/OpenSans-Bold.ttf deleted file mode 100644 index fd79d43bea029..0000000000000 Binary files a/recipes/msdfgen/all/test_package/OpenSans-Bold.ttf and /dev/null differ diff --git a/recipes/msdfgen/all/test_package/conanfile.py b/recipes/msdfgen/all/test_package/conanfile.py index c4fdfb4dbdc98..0a6bc68712d90 100644 --- a/recipes/msdfgen/all/test_package/conanfile.py +++ b/recipes/msdfgen/all/test_package/conanfile.py @@ -23,5 +23,4 @@ def build(self): def test(self): if can_run(self): bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") - ttf_path = os.path.join(self.source_folder, "OpenSans-Bold.ttf") - self.run(f"{bin_path} {ttf_path}", env="conanrun") + self.run(bin_path, env="conanrun") diff --git a/recipes/msdfgen/all/test_package/test_package.cpp b/recipes/msdfgen/all/test_package/test_package.cpp index d169064c206c2..fc8e183067d7e 100644 --- a/recipes/msdfgen/all/test_package/test_package.cpp +++ b/recipes/msdfgen/all/test_package/test_package.cpp @@ -4,26 +4,9 @@ #include int main(int argc, char **argv) { - if (argc < 2) { - std::cerr << "Need at least one argument\n"; - return 1; - } - msdfgen::FreetypeHandle *ft = msdfgen::initializeFreetype(); if (ft) { - msdfgen::FontHandle *font = msdfgen::loadFont(ft, argv[1]); - if (font) { - msdfgen::Shape shape; - if (msdfgen::loadGlyph(shape, font, 'A')) { - shape.normalize(); - msdfgen::edgeColoringSimple(shape, 3.0); - msdfgen::Bitmap msdf(32, 32); - msdfgen::generateMSDF(msdf, shape, 4.0, 1.0, msdfgen::Vector2(4.0, 4.0)); - msdfgen::savePng(msdf, "output.png"); - } - msdfgen::destroyFont(font); - } - msdfgen::deinitializeFreetype(ft); + std::cout << "Test" << std::endl; // This should be printed } return 0; } diff --git a/recipes/msdfgen/all/test_v1_package/conanfile.py b/recipes/msdfgen/all/test_v1_package/conanfile.py index 7b775db727c08..38f4483872d47 100644 --- a/recipes/msdfgen/all/test_v1_package/conanfile.py +++ b/recipes/msdfgen/all/test_v1_package/conanfile.py @@ -14,5 +14,4 @@ def build(self): def test(self): if not tools.cross_building(self): bin_path = os.path.join("bin", "test_package") - ttf_path = os.path.join(self.source_folder, os.pardir, "test_package", "OpenSans-Bold.ttf") - self.run(f"{bin_path} {ttf_path}", run_environment=True) + self.run(bin_path, run_environment=True) diff --git a/recipes/msdfgen/config.yml b/recipes/msdfgen/config.yml index 9f326bdd6e1a4..aa26d962008db 100644 --- a/recipes/msdfgen/config.yml +++ b/recipes/msdfgen/config.yml @@ -1,4 +1,8 @@ versions: + "1.12": + folder: all + "1.11": + folder: all "1.10": folder: all "1.9.1": diff --git a/recipes/msgpack-c/all/conandata.yml b/recipes/msgpack-c/all/conandata.yml index 0062926e73ac9..9326cc90f6718 100644 --- a/recipes/msgpack-c/all/conandata.yml +++ b/recipes/msgpack-c/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "6.1.0": + url: "https://github.com/msgpack/msgpack-c/releases/download/c-6.1.0/msgpack-c-6.1.0.tar.gz" + sha256: "674119f1a85b5f2ecc4c7d5c2859edf50c0b05e0c10aa0df85eefa2c8c14b796" "6.0.0": url: "https://github.com/msgpack/msgpack-c/releases/download/c-6.0.0/msgpack-c-6.0.0.tar.gz" sha256: "3654f5e2c652dc52e0a993e270bb57d5702b262703f03771c152bba51602aeba" diff --git a/recipes/msgpack-c/config.yml b/recipes/msgpack-c/config.yml index 08e152a5c47d0..3267291611670 100644 --- a/recipes/msgpack-c/config.yml +++ b/recipes/msgpack-c/config.yml @@ -1,4 +1,6 @@ versions: + "6.1.0": + folder: all "6.0.0": folder: all "5.0.0": diff --git a/recipes/msgpack-cxx/all/conandata.yml b/recipes/msgpack-cxx/all/conandata.yml index 7f56a30465e39..3aadf7df1811f 100644 --- a/recipes/msgpack-cxx/all/conandata.yml +++ b/recipes/msgpack-cxx/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "7.0.0": + url: "https://github.com/msgpack/msgpack-c/releases/download/cpp-7.0.0/msgpack-cxx-7.0.0.tar.gz" + sha256: "7504b7af7e7b9002ce529d4f941e1b7fb1fb435768780ce7da4abaac79bb156f" "6.1.1": url: "https://github.com/msgpack/msgpack-c/releases/download/cpp-6.1.1/msgpack-cxx-6.1.1.tar.gz" sha256: "5fd555742e37bbd58d166199e669f01f743c7b3c6177191dd7b31fb0c37fa191" diff --git a/recipes/msgpack-cxx/all/conanfile.py b/recipes/msgpack-cxx/all/conanfile.py index 8d22fa5798373..8112274e3a237 100644 --- a/recipes/msgpack-cxx/all/conanfile.py +++ b/recipes/msgpack-cxx/all/conanfile.py @@ -24,8 +24,8 @@ class MsgpackCXXConan(ConanFile): } no_copy_source = True - def configure_options(self): - # No boost was added since 4.1.0 + def config_options(self): + # Boost was not optional until 4.1.0 if Version(self.version) < "4.1.0": del self.options.use_boost @@ -33,6 +33,7 @@ def layout(self): basic_layout(self, src_folder="src") def requirements(self): + # Boost was not optional until 4.1.0 if self.options.get_safe("use_boost", True): self.requires("boost/1.83.0") @@ -87,8 +88,12 @@ def _module_file_rel_path(self): return os.path.join("lib", "cmake", f"conan-official-{self.name}-targets.cmake") def package_info(self): - # https://github.com/msgpack/msgpack-c/tree/cpp_master#usage - self.cpp_info.set_property("cmake_file_name", "msgpack") + if Version(self.version) > "6.1.1": + self.cpp_info.set_property("cmake_file_name", "msgpack-cxx") + else: + # The README is wrong, the correct name is msgpack-cxx, + # but keep it for old published versions not to break the consumers + self.cpp_info.set_property("cmake_file_name", "msgpack") if Version(self.version) >= "6.0.0": self.cpp_info.set_property("cmake_target_name", "msgpack-cxx") @@ -108,7 +113,13 @@ def package_info(self): self.cpp_info.requires.append("boost::headers") # TODO: to remove in conan v2 once cmake_find_package_* generators removed - self.cpp_info.filenames["cmake_find_package"] = "msgpack" - self.cpp_info.filenames["cmake_find_package_multi"] = "msgpack" + if Version(self.version) > "6.1.1": + self.cpp_info.filenames["cmake_find_package"] = "msgpack-cxx" + self.cpp_info.filenames["cmake_find_package_multi"] = "msgpack-cxx" + else: + # The README is wrong, the correct name is msgpack-cxx, + # but keep it for old published versions not to break the consumers + self.cpp_info.filenames["cmake_find_package"] = "msgpack" + self.cpp_info.filenames["cmake_find_package_multi"] = "msgpack" self.cpp_info.build_modules["cmake_find_package"] = [self._module_file_rel_path] self.cpp_info.build_modules["cmake_find_package_multi"] = [self._module_file_rel_path] diff --git a/recipes/msgpack-cxx/all/test_package/CMakeLists.txt b/recipes/msgpack-cxx/all/test_package/CMakeLists.txt index d8ac6bce3d809..c74139de33ea0 100644 --- a/recipes/msgpack-cxx/all/test_package/CMakeLists.txt +++ b/recipes/msgpack-cxx/all/test_package/CMakeLists.txt @@ -1,10 +1,15 @@ cmake_minimum_required(VERSION 3.8) project(test_package LANGUAGES CXX) -find_package(msgpack REQUIRED CONFIG) +if (MSGPACK_VERSION_LESS_EQ_6_1_1) + find_package(msgpack REQUIRED CONFIG) + set(msgpack-cxx_VERSION ${msgpack_VERSION}) +else() + find_package(msgpack-cxx REQUIRED CONFIG) +endif() add_executable(${PROJECT_NAME} test_package.cpp) -if(msgpack_VERSION VERSION_GREATER_EQUAL "6.0.0") +if(msgpack-cxx_VERSION VERSION_GREATER_EQUAL "6.0.0") target_link_libraries(${PROJECT_NAME} msgpack-cxx) else() target_link_libraries(${PROJECT_NAME} msgpackc-cxx) diff --git a/recipes/msgpack-cxx/all/test_package/conanfile.py b/recipes/msgpack-cxx/all/test_package/conanfile.py index e845ae751a301..4f7740cb3125f 100644 --- a/recipes/msgpack-cxx/all/test_package/conanfile.py +++ b/recipes/msgpack-cxx/all/test_package/conanfile.py @@ -1,12 +1,12 @@ from conan import ConanFile from conan.tools.build import can_run -from conan.tools.cmake import cmake_layout, CMake +from conan.tools.cmake import cmake_layout, CMake, CMakeToolchain import os class TestPackageConan(ConanFile): settings = "os", "arch", "compiler", "build_type" - generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + generators = "CMakeDeps", "VirtualRunEnv" test_type = "explicit" def layout(self): @@ -15,6 +15,11 @@ def layout(self): def requirements(self): self.requires(self.tested_reference_str) + def generate(self): + tc = CMakeToolchain(self) + tc.variables["MSGPACK_VERSION_LESS_EQ_6_1_1"] = self.dependencies[self.tested_reference_str].ref.version <= "6.1.1" + tc.generate() + def build(self): cmake = CMake(self) cmake.configure() diff --git a/recipes/msgpack-cxx/all/test_v1_package/CMakeLists.txt b/recipes/msgpack-cxx/all/test_v1_package/CMakeLists.txt deleted file mode 100644 index be00a8c7f57c7..0000000000000 --- a/recipes/msgpack-cxx/all/test_v1_package/CMakeLists.txt +++ /dev/null @@ -1,8 +0,0 @@ -cmake_minimum_required(VERSION 3.8) -project(test_package) - -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) - -add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ - ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/msgpack-cxx/all/test_v1_package/conanfile.py b/recipes/msgpack-cxx/all/test_v1_package/conanfile.py deleted file mode 100644 index 5a05af3c2dfd2..0000000000000 --- a/recipes/msgpack-cxx/all/test_v1_package/conanfile.py +++ /dev/null @@ -1,18 +0,0 @@ -from conans import ConanFile, CMake -from conan.tools.build import cross_building -import os - - -class TestPackageV1Conan(ConanFile): - settings = "os", "arch", "compiler", "build_type" - generators = "cmake", "cmake_find_package_multi" - - def build(self): - cmake = CMake(self) - cmake.configure() - cmake.build() - - def test(self): - if not cross_building(self): - bin_path = os.path.join("bin", "test_package") - self.run(bin_path, run_environment=True) diff --git a/recipes/msgpack-cxx/config.yml b/recipes/msgpack-cxx/config.yml index ed41d0a75c634..5aecc7725d45b 100644 --- a/recipes/msgpack-cxx/config.yml +++ b/recipes/msgpack-cxx/config.yml @@ -1,4 +1,6 @@ versions: + "7.0.0": + folder: all "6.1.1": folder: all "6.1.0": diff --git a/recipes/msix/all/CMakeLists.txt b/recipes/msix/all/CMakeLists.txt deleted file mode 100644 index c477e0c1e565e..0000000000000 --- a/recipes/msix/all/CMakeLists.txt +++ /dev/null @@ -1,7 +0,0 @@ -cmake_minimum_required(VERSION 2.8.0) -project(cmake_wrapper) - -include(conanbuildinfo.cmake) -conan_basic_setup(TARGETS) - -add_subdirectory("source_subfolder") diff --git a/recipes/msix/all/conandata.yml b/recipes/msix/all/conandata.yml index ef22231170ffe..0de96c69cb0d4 100644 --- a/recipes/msix/all/conandata.yml +++ b/recipes/msix/all/conandata.yml @@ -4,7 +4,8 @@ sources: sha256: "23179d577d0b9d34e93374ae38284ab9f1247ff6cc9175851983fb114ab00087" patches: "1.7": - - base_path: "source_subfolder" - patch_file: "patches/1.7/cmake.patch" - - base_path: "source_subfolder" - patch_file: "patches/1.7/signaturevalidator.patch" + - patch_file: "patches/1.7/cmake.patch" + - patch_file: "patches/1.7/signaturevalidator.patch" + - patch_file: "patches/1.7/001-fix-missing-include.patch" + patch_description: "Fix missing #include " + patch_type: "portability" diff --git a/recipes/msix/all/conanfile.py b/recipes/msix/all/conanfile.py index 0c62a718f8c29..9a1d7b90fe8e0 100644 --- a/recipes/msix/all/conanfile.py +++ b/recipes/msix/all/conanfile.py @@ -1,19 +1,26 @@ -from conans import CMake, ConanFile, tools -from conans.errors import ConanInvalidConfiguration +import os +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.apple import is_apple_os +from conan.tools.build import check_min_cppstd +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.files import apply_conandata_patches, collect_libs, copy, export_conandata_patches, get +from conan.tools.scm import Version -required_conan_version = ">=1.33.0" +required_conan_version = ">=1.53.0" class MsixConan(ConanFile): name = "msix" + description = "An SDK for creating MSIX packages" license = "MIT" url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/microsoft/msix-packaging" - description = "An SDK for creating MSIX packages" - topics = ("msix", "sdk", "packaging", "conan-recipe") + topics = ("sdk", "packaging", "conan-recipe") - settings = "os", "compiler", "build_type", "arch" + package_type = "library" + settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], "fPIC": [True, False], @@ -22,7 +29,7 @@ class MsixConan(ConanFile): "skip_bundles": [True, False], "use_external_zlib": [True, False], "use_validation_parser": [True, False], - "xml_parser": ["applexml", "javaxml", "msxml6", "xerces"] + "with_xerces": [True, False], } default_options = { "shared": False, @@ -32,126 +39,134 @@ class MsixConan(ConanFile): "skip_bundles": False, "use_external_zlib": True, "use_validation_parser": False, - "xml_parser": "msxml6" + "with_xerces": False, } - generators = "cmake" - exports_sources = "CMakeLists.txt", "patches/**" - - _cmake = None + @property + def _min_cppstd(self): + return 14 @property - def _minimum_compilers_version(self): + def _compilers_minimum_version(self): return { - "Visual Studio": "15" + "apple-clang": "10", + "clang": "7", + "msvc": "191", + "Visual Studio": "15", } - @property - def _source_subfolder(self): - return "source_subfolder" - - def _configure_cmake(self): - if self._cmake: - return self._cmake - self._cmake = CMake(self) - if self.settings.os == "Android": - self._cmake.definitions["AOSP"] = True - if self.settings.os == "Linux": - self._cmake.definitions["LINUX"] = True - if self.settings.os == "Macos": - self._cmake.definitions["MACOS"] = True - self._cmake.definitions["CRYPTO_LIB"] = self.options.crypto_lib - self._cmake.definitions["MSIX_PACK"] = self.options.pack - self._cmake.definitions["MSIX_SAMPLES"] = False - self._cmake.definitions["MSIX_TESTS"] = False - self._cmake.definitions["SKIP_BUNDLES"] = self.options.skip_bundles - self._cmake.definitions["USE_MSIX_SDK_ZLIB"] = self.options.use_external_zlib - self._cmake.definitions["USE_SHARED_ZLIB"] = self.options["zlib"].shared - self._cmake.definitions["USE_VALIDATION_PARSER"] = self.options.use_validation_parser - self._cmake.definitions["XML_PARSER"] = self.options.xml_parser - self._cmake.definitions["CALCULATE_VERSION"] = False - self._cmake.definitions["ENABLE_NUGET_PACKAGING"] = False - self._cmake.configure() - return self._cmake - - def _validate_compiler_settings(self): - compiler = self.settings.compiler - if compiler.get_safe("cppstd"): - tools.check_min_cppstd(self, "17") - - min_version = self._minimum_compilers_version.get(str(self.settings.compiler)) - if not min_version: - self.output.warn("{} recipe lacks information about the {} compiler support.".format( - self.name, self.settings.compiler)) - elif tools.Version(self.settings.compiler.version) < min_version: - raise ConanInvalidConfiguration("{} requires C++17 support. The current compiler {} {} does not support it.".format( - self.name, self.settings.compiler, self.settings.compiler.version)) + def export_sources(self): + export_conandata_patches(self) def config_options(self): if self.settings.os == "Windows": del self.options.fPIC - self.options.crypto_lib = "crypt32" + if self.settings.os != "Windows": + del self.options.crypto_lib + if not is_apple_os(self) and self.settings.os not in ["Windows", "Android"]: + # with_xerces is required + del self.options.with_xerces def configure(self): if self.options.shared: - del self.options.fPIC + self.options.rm_safe("fPIC") + + def layout(self): + cmake_layout(self, src_folder="src") def requirements(self): - if self.settings.os == "Linux" and not self.options.skip_bundles: - self.requires("icu/71.1") - if self.options.crypto_lib == "openssl": - self.requires("openssl/1.1.1q") + if self.settings.os in ["Linux", "FreeBSD"] and not self.options.skip_bundles: + self.requires("icu/74.2") + if self.options.get_safe("crypto_lib", "openssl") == "openssl": + self.requires("openssl/[>=1.1 <4]") if self.options.use_external_zlib: - self.requires("zlib/1.2.12") - if self.options.xml_parser == "xerces": - self.requires("xerces-c/3.2.3") + self.requires("zlib/[>=1.2.11 <2]") + if self.options.get_safe("with_xerces", True): + self.requires("xerces-c/3.2.5") + + def _validate_compiler_settings(self): + compiler = self.settings.compiler + if compiler.get_safe("cppstd"): + check_min_cppstd(self, 14) + minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) + if minimum_version and Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration( + f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." + ) def validate(self): - if self.settings.os != "Android" and self.options.xml_parser == "javaxml": - raise ConanInvalidConfiguration("javaxml is supported only for Android") - if self.settings.os == "Linux" and self.settings.compiler != "clang": - raise ConanInvalidConfiguration("Only clang is supported on Linux") - if self.settings.os != "Macos" and self.options.xml_parser == "applexml": - raise ConanInvalidConfiguration("applexml is supported only for MacOS") - if self.settings.os != "Windows" and self.options.crypto_lib == "crypt32": - raise ConanInvalidConfiguration("crypt32 is supported only for Windows") - if self.settings.os != "Windows" and self.options.xml_parser == "msxml6": - raise ConanInvalidConfiguration("msxml6 is supported only for Windows") + if self.settings.os in ["Linux", "FreeBSD"] and self.settings.compiler != "clang": + raise ConanInvalidConfiguration(f"Only clang is supported on {self.settings.os}") + if self.settings.compiler == "clang" and Version(self.settings.compiler.version) >= "12" and self.version == "1.7": + # AppxPackaging.hpp:706:5: error: templates must have C++ linkage + raise ConanInvalidConfiguration("Clang 12 and newer are not supported") if self.options.pack: - if self.settings.os == "Macos": + if is_apple_os(self): if not self.options.use_external_zlib: raise ConanInvalidConfiguration("Using libCompression APIs and packaging features is not supported") - if self.options.xml_parser != "xerces": + if not self.options.get_safe("with_xerces", True): raise ConanInvalidConfiguration("Xerces is the only supported parser for MacOS pack") if not self.options.use_validation_parser: raise ConanInvalidConfiguration("Packaging requires validation parser") - if (self.options.xml_parser == "xerces" and - self.options["xerces-c"].char_type != "char16_t"): - raise ConanInvalidConfiguration("Only char16_t is supported for xerces-c") - + if self.options.get_safe("with_xerces", True) and self.dependencies["xerces-c"].options.char_type != "char16_t": + raise ConanInvalidConfiguration("Only char16_t is supported for xerces-c") + self._validate_compiler_settings() def source(self): - tools.get(**self.conan_data["sources"][self.version], destination=self._source_subfolder, strip_root=True) + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + if self.settings.os == "Android": + tc.variables["AOSP"] = True + if self.settings.os in ["Linux", "FreeBSD"]: + tc.variables["LINUX"] = True + if is_apple_os(self): + tc.variables["MACOS"] = True + tc.variables["CRYPTO_LIB"] = self.options.get_safe("crypto_lib", "openssl") + tc.variables["MSIX_PACK"] = self.options.pack + tc.variables["MSIX_SAMPLES"] = False + tc.variables["MSIX_TESTS"] = False + tc.variables["SKIP_BUNDLES"] = self.options.skip_bundles + tc.variables["USE_MSIX_SDK_ZLIB"] = self.options.use_external_zlib + tc.variables["USE_VALIDATION_PARSER"] = self.options.use_validation_parser + if self.options.get_safe("with_xerces", True): + tc.variables["XML_PARSER"] = "xerces" + elif self.settings.os == "Android": + tc.variables["XML_PARSER"] = "javaxml" + elif is_apple_os(self): + tc.variables["XML_PARSER"] = "applexml" + elif self.settings.os == "Windows": + tc.variables["XML_PARSER"] = "msxml6" + tc.variables["CALCULATE_VERSION"] = False + tc.variables["ENABLE_NUGET_PACKAGING"] = False + tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0077"] = "NEW" + tc.generate() + tc = CMakeDeps(self) + tc.generate() def build(self): - for patch in self.conan_data.get("patches", {}).get(self.version, []): - tools.patch(**patch) - cmake = self._configure_cmake() + apply_conandata_patches(self) + cmake = CMake(self) + cmake.configure() cmake.build() def package(self): - cmake = self._configure_cmake() + cmake = CMake(self) cmake.install() - self.copy("LICENSE", dst="licenses", src=self._source_subfolder) + copy(self, "LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) def package_info(self): - self.cpp_info.libs = tools.collect_libs(self) + self.cpp_info.libs = collect_libs(self) if self.settings.os == "Windows": - self.cpp_info.system_libs = ["runtimeobject"] - if self.settings.compiler == "Visual Studio": - self.cpp_info.system_libs.append("delayimp") - if self.options.crypto_lib == "crypt32": - self.cpp_info.system_libs.extend(["bcrypt", "crypt32", "wintrust"]) - if self.options.xml_parser == "msxml6": + # https://github.com/microsoft/msix-packaging/blob/v1.7/src/msix/CMakeLists.txt#L271 + self.cpp_info.system_libs.extend(["bcrypt", "crypt32", "wintrust", "runtimeobject", "delayimp"]) + if not self.options.with_xerces: self.cpp_info.system_libs.append("msxml6") + if is_apple_os(self): + # https://github.com/microsoft/msix-packaging/blob/v1.7/src/msix/CMakeLists.txt#L364 + self.cpp_info.frameworks.extend(["CoreFoundation", "Foundation"]) + if not self.options.use_external_zlib: + # https://github.com/microsoft/msix-packaging/blob/v1.7/src/msix/CMakeLists.txt#L285 + self.cpp_info.frameworks.append("Compression") diff --git a/recipes/msix/all/patches/1.7/001-fix-missing-include.patch b/recipes/msix/all/patches/1.7/001-fix-missing-include.patch new file mode 100644 index 0000000000000..60cdf07427a6c --- /dev/null +++ b/recipes/msix/all/patches/1.7/001-fix-missing-include.patch @@ -0,0 +1,11 @@ +Fixes https://github.com/microsoft/msix-packaging/issues/596 +--- src/inc/Encoding.hpp ++++ src/inc/Encoding.hpp +@@ -5,6 +5,7 @@ + #pragma once + ++#include + #include + + namespace MSIX { namespace Encoding { + diff --git a/recipes/msix/all/patches/1.7/cmake.patch b/recipes/msix/all/patches/1.7/cmake.patch index b64f3d1cd79c0..6f72f3b88aaf0 100644 --- a/recipes/msix/all/patches/1.7/cmake.patch +++ b/recipes/msix/all/patches/1.7/cmake.patch @@ -103,31 +103,29 @@ index 92b082e6..ebae9789 100644 +# define installing rules for target files +install(TARGETS ${PROJECT_NAME}) diff --git a/src/msix/CMakeLists.txt b/src/msix/CMakeLists.txt -index 75d3afdf..e1fb2984 100644 --- a/src/msix/CMakeLists.txt +++ b/src/msix/CMakeLists.txt -@@ -6,6 +6,11 @@ cmake_minimum_required(VERSION 3.8.0 FATAL_ERROR) +@@ -5,6 +5,11 @@ + cmake_minimum_required(VERSION 3.8.0 FATAL_ERROR) project(msix) - ++ +# Define the library +add_library(${PROJECT_NAME} + msix.cpp +) -+ + # Handle exports and flags we need to set list(APPEND MSIX_UNPACK_EXPORTS - "UnpackPackage" -@@ -144,7 +149,7 @@ if(NOT SKIP_BUNDLES) - if (WIN32) +@@ -145,6 +150,7 @@ list(APPEND MsixSrc PAL/Applicability/Win32/Applicability.cpp) elseif(LINUX) -- find_package(ICU REQUIRED COMPONENTS uc) -+ target_link_libraries(${PROJECT_NAME} PRIVATE CONAN_PKG::icu) + find_package(ICU REQUIRED COMPONENTS uc) ++ target_link_libraries(${PROJECT_NAME} PRIVATE ICU::uc) list(APPEND MsixSrc PAL/Applicability/Linux/Applicability.cpp) elseif(AOSP) list(APPEND MsixSrc PAL/Applicability/AOSP/Applicability.cpp) -@@ -195,14 +200,16 @@ if(CRYPTO_LIB MATCHES crypt32) +@@ -195,14 +201,17 @@ PAL/Signature/Win32/SignatureValidator.cpp ) elseif(CRYPTO_LIB MATCHES openssl) @@ -136,22 +134,23 @@ index 75d3afdf..e1fb2984 100644 - PAL/Crypto/OpenSSL/Crypto.cpp - PAL/Signature/OpenSSL/SignatureValidator.cpp - ) ++ find_package(OpenSSL REQUIRED CONFIG) + list(APPEND MsixSrc + PAL/Crypto/OpenSSL/Crypto.cpp + PAL/Signature/OpenSSL/SignatureValidator.cpp + ) + if((IOS) OR (MACOS)) -+ target_link_libraries(${PROJECT_NAME} PRIVATE CONAN_PKG::openssl -Wl,-dead_strip) ++ target_link_libraries(${PROJECT_NAME} PRIVATE OpenSSL::SSL -Wl,-dead_strip) + elseif(NOT MSVC) -+ target_link_libraries(${PROJECT_NAME} PRIVATE CONAN_PKG::openssl -Wl,--gc-sections) ++ target_link_libraries(${PROJECT_NAME} PRIVATE OpenSSL::SSL -Wl,--gc-sections) else() - # ... and were done here... :/ - message(FATAL_ERROR "OpenSSL NOT FOUND!") -+ target_link_libraries(${PROJECT_NAME} PRIVATE CONAN_PKG::openssl) ++ target_link_libraries(${PROJECT_NAME} PRIVATE OpenSSL::SSL) endif() endif() -@@ -220,14 +227,7 @@ foreach(FILE ${MsixSrc}) +@@ -220,14 +229,7 @@ message(STATUS "\t${FILE}") endforeach() @@ -167,7 +166,7 @@ index 75d3afdf..e1fb2984 100644 # Copy out public headers to /src/unpack configure_file(../inc/MSIXWindows.hpp ${CMAKE_CURRENT_BINARY_DIR}/MSIXWindows.hpp ) -@@ -260,7 +260,7 @@ if(WIN32) +@@ -260,7 +262,7 @@ "/DELAYLOAD:api-ms-win-core-winrt-l1-1-0.dll") string(REPLACE ";" " " DELAYFLAGS "${DELAYFLAGS}") set_property(TARGET ${PROJECT_NAME} APPEND_STRING PROPERTY LINK_FLAGS "${DELAYFLAGS} /LTCG") @@ -176,48 +175,44 @@ index 75d3afdf..e1fb2984 100644 if(USE_STATIC_MSVC) if(CMAKE_BUILD_TYPE MATCHES Debug) set_property(TARGET ${PROJECT_NAME} APPEND_STRING PROPERTY LINK_FLAGS " /NODEFAULTLIB:MSVCRTD") -@@ -285,29 +285,20 @@ if(((IOS) OR (MACOS)) AND (NOT USE_MSIX_SDK_ZLIB)) - target_link_libraries(${PROJECT_NAME} PRIVATE libcompression.dylib) - elseif((AOSP) AND (NOT USE_MSIX_SDK_ZLIB)) - # for AOSP, use the libz.so from the android ndk. -- find_package(ZLIB REQUIRED) +@@ -288,17 +290,8 @@ + find_package(ZLIB REQUIRED) target_link_libraries(${PROJECT_NAME} PRIVATE -lz) --else() # WIN32 or USE_MSIX_SDK_ZLIB + else() # WIN32 or USE_MSIX_SDK_ZLIB - target_include_directories(${PROJECT_NAME} PRIVATE - ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/zlib - ${MSIX_PROJECT_ROOT}/lib/zlib - ) -+else() - if(USE_SHARED_ZLIB) - message(STATUS "MSIX takes a dynamic dependency on zlib") +- if(USE_SHARED_ZLIB) +- message(STATUS "MSIX takes a dynamic dependency on zlib") - target_link_libraries(${PROJECT_NAME} PRIVATE zlib) -+ target_link_libraries(${PROJECT_NAME} PRIVATE CONAN_PKG::zlib) - else() - message(STATUS "MSIX takes a static dependency on zlib") +- else() +- message(STATUS "MSIX takes a static dependency on zlib") - target_link_libraries(${PROJECT_NAME} PRIVATE zlibstatic) -+ target_link_libraries(${PROJECT_NAME} PRIVATE CONAN_PKG::zlib) - endif() +- endif() ++ find_package(ZLIB REQUIRED CONFIG) ++ target_link_libraries(${PROJECT_NAME} PRIVATE ZLIB::ZLIB) endif() # Parser - if(XML_PARSER MATCHES xerces) -- target_include_directories(${PROJECT_NAME} PRIVATE -- ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/xerces/src -- ${MSIX_PROJECT_ROOT}/lib/xerces/src -- ) +@@ -307,7 +299,8 @@ + ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/xerces/src + ${MSIX_PROJECT_ROOT}/lib/xerces/src + ) - target_link_libraries(${PROJECT_NAME} PRIVATE xerces-c) -+ target_link_libraries(${PROJECT_NAME} PRIVATE CONAN_PKG::xerces-c) ++ find_package(XercesC REQUIRED CONFIG) ++ target_link_libraries(${PROJECT_NAME} PRIVATE XercesC::XercesC) endif() if(XML_PARSER MATCHES applexml) -@@ -363,18 +354,6 @@ endif() +@@ -363,18 +356,6 @@ if((IOS) OR (MACOS)) target_link_libraries(${PROJECT_NAME} PRIVATE ${COREFOUNDATION_LIBRARY} ${FOUNDATION_LIBRARY}) endif() -if(LINUX) - target_link_libraries(${PROJECT_NAME} PRIVATE ${ICU_LIBRARIES}) -endif() - +- -if(OpenSSL_FOUND) - # include the libraries needed to use OpenSSL - target_include_directories(${PROJECT_NAME} PRIVATE ${OpenSSL_INCLUDE_PATH}) @@ -229,5 +224,6 @@ index 75d3afdf..e1fb2984 100644 - target_link_libraries(${PROJECT_NAME} PRIVATE crypto) - endif() -endif() ++ +# define installing rules for target files +install(TARGETS ${PROJECT_NAME}) diff --git a/recipes/msix/all/patches/1.7/signaturevalidator.patch b/recipes/msix/all/patches/1.7/signaturevalidator.patch index bc8cdf9e699db..06071e85ee658 100644 --- a/recipes/msix/all/patches/1.7/signaturevalidator.patch +++ b/recipes/msix/all/patches/1.7/signaturevalidator.patch @@ -22,7 +22,7 @@ index 1cc34b20..ccbf68dc 100644 if (!X509V3_EXT_print(extbio.get(), ext, 0, 0)) { - M_ASN1_OCTET_STRING_print(extbio.get(), ext->value); -+ M_ASN1_OCTET_STRING_print(extbio.get(), X509_EXTENSION_get_data(ext)); ++ ASN1_STRING_print(extbio.get(), X509_EXTENSION_get_data(ext)); } // null terminate the string. BIO_write(extbio.get(), "", 1); diff --git a/recipes/msix/all/test_package/CMakeLists.txt b/recipes/msix/all/test_package/CMakeLists.txt index e28b2e2b66dd9..5ad357dd7587a 100644 --- a/recipes/msix/all/test_package/CMakeLists.txt +++ b/recipes/msix/all/test_package/CMakeLists.txt @@ -1,9 +1,8 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.15) project(test_package CXX) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) +find_package(msix REQUIRED CONFIG) add_executable(${PROJECT_NAME} example.cpp) - -conan_target_link_libraries(${PROJECT_NAME}) +target_link_libraries(${PROJECT_NAME} PRIVATE msix::msix) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_14) diff --git a/recipes/msix/all/test_package/conanfile.py b/recipes/msix/all/test_package/conanfile.py index bee328a3e1aa7..ef5d7042163ec 100644 --- a/recipes/msix/all/test_package/conanfile.py +++ b/recipes/msix/all/test_package/conanfile.py @@ -1,10 +1,19 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake import os -from conans import ConanFile, CMake, tools -class MsixTestConan(ConanFile): - settings = "os", "compiler", "build_type", "arch" - generators = "cmake" +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) def build(self): cmake = CMake(self) @@ -12,6 +21,6 @@ def build(self): cmake.build() def test(self): - if not tools.cross_building(self): - bin_path = os.path.join("bin", "test_package") - self.run(bin_path, run_environment=True) + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/msix/all/test_v1_package/CMakeLists.txt b/recipes/msix/all/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..91630d79f4abb --- /dev/null +++ b/recipes/msix/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/msix/all/test_v1_package/conanfile.py b/recipes/msix/all/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..28b18e54620ea --- /dev/null +++ b/recipes/msix/all/test_v1_package/conanfile.py @@ -0,0 +1,17 @@ +import os +from conans import ConanFile, CMake, tools + + +class MsixTestConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake", "cmake_find_package_multi" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if not tools.cross_building(self): + bin_path = os.path.join("bin", "test_package") + self.run(bin_path, run_environment=True) diff --git a/recipes/msys2/all/conanfile.py b/recipes/msys2/all/conanfile.py index 2606f171ddcec..752c04acf11c3 100644 --- a/recipes/msys2/all/conanfile.py +++ b/recipes/msys2/all/conanfile.py @@ -156,8 +156,9 @@ def _do_build(self): os.utime(tmp_name, None) # Prepend the PKG_CONFIG_PATH environment variable with an eventual PKG_CONFIG_PATH environment variable + # Note: this is no longer needed when we exclusively support Conan 2 integrations replace_in_file(self, os.path.join(self._msys_dir, "etc", "profile"), - 'PKG_CONFIG_PATH="', 'PKG_CONFIG_PATH="$PKG_CONFIG_PATH:') + 'PKG_CONFIG_PATH="', 'PKG_CONFIG_PATH="${PKG_CONFIG_PATH:+${PKG_CONFIG_PATH}:}') def package(self): excludes = None diff --git a/recipes/mtfmt/all/conandata.yml b/recipes/mtfmt/all/conandata.yml new file mode 100644 index 0000000000000..479a84d9ef5a9 --- /dev/null +++ b/recipes/mtfmt/all/conandata.yml @@ -0,0 +1,10 @@ +sources: + # Newer versions at the top + "0.1.3": + url: "https://github.com/MtFmT-Lib/mtfmt/archive/refs/tags/v0.1.3.tar.gz" + sha256: "767a9b85b79d915ce7f1e43f0d24dc14942c07af24d6e96f7ff60ee522f1c1ce" +patches: + "0.1.3": + - patch_file: "patches/0.1.3-0001-remove-hardcoded-stds.patch" + patch_description: "Remove hardcoded C/CXX standards" + patch_type: "conan" diff --git a/recipes/mtfmt/all/conanfile.py b/recipes/mtfmt/all/conanfile.py new file mode 100644 index 0000000000000..7f72f34a57527 --- /dev/null +++ b/recipes/mtfmt/all/conanfile.py @@ -0,0 +1,111 @@ +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout +from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rm, rmdir +from conan.tools.microsoft import is_msvc +import os + + +required_conan_version = ">=1.53.0" + + +class MtFmtConan(ConanFile): + name = "mtfmt" + description = "mtfmt (Mini template formatter) is a formatting library designed for embedded systems" + license = "LGPL-3.0-only" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/MtFmT-Lib/mtfmt" + topics = ("formatting", "embedded") + package_type = "library" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + "use_div": [True, False], + "use_malloc": [True, False], + "use_stdout": [True, False], + "use_assert": [True, False], + "use_utf8": [True, False], + "use_fp32": [True, False], + "use_fp64": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + "use_div": False, + "use_malloc": False, + "use_stdout": False, + "use_assert": False, + "use_utf8": True, + "use_fp32": False, + "use_fp64": False, + } + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + self.settings.rm_safe("compiler.cppstd") + self.settings.rm_safe("compiler.libcxx") + + def export_sources(self): + export_conandata_patches(self) + + def layout(self): + cmake_layout(self, src_folder="src") + + def validate(self): + # Windows always builds as release, debug is not supported + if is_msvc(self) and self.settings.build_type == "Debug": + raise ConanInvalidConfiguration(f"{self.ref} does not support MSVC debug builds") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + tc.cache_variables["MTFMT_BUILD_SHARED"] = self.options.shared + tc.cache_variables["MTFMT_RT_USE_DIV"] = self.options.use_div + tc.cache_variables["MTFMT_RT_USE_MALLOC"] = self.options.use_malloc + tc.cache_variables["MTFMT_RT_USE_STDOUT"] = self.options.use_stdout + tc.cache_variables["MTFMT_RT_USE_ASSERT"] = self.options.use_assert + tc.cache_variables["MTFMT_RT_USE_UTF8"] = self.options.use_utf8 + tc.cache_variables["MTFMT_RT_USE_FP32"] = self.options.use_fp32 + tc.cache_variables["MTFMT_RT_USE_FP64"] = self.options.use_fp64 + tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0077"] = "NEW" + tc.generate() + + def _patch_sources(self): + apply_conandata_patches(self) + + def build(self): + self._patch_sources() + cmake = CMake(self) + cmake.configure() + cmake.build() + + def package(self): + copy(self, "LICENSE", self.source_folder, os.path.join(self.package_folder, "licenses")) + cmake = CMake(self) + cmake.install() + rmdir(self, os.path.join(self.package_folder, "mtfmt", "lib", "cmake")) + rmdir(self, os.path.join(self.package_folder, "mtfmt", "share")) + rm(self, "*.la", os.path.join(self.package_folder, "mtfmt", "lib")) + rm(self, "*.pdb", os.path.join(self.package_folder, "mtfmt", "lib")) + rm(self, "*.pdb", os.path.join(self.package_folder, "mtfmt", "bin")) + + def package_info(self): + suffix = "_d" if self.settings.build_type == "Debug" else "" + self.cpp_info.libs = ["mtfmt" + suffix] + + libdir = os.path.join("mtfmt", "lib") + + if not self.options.shared or self.settings.os == "Windows": + libdir = os.path.join(libdir, "static") + + self.cpp_info.libdirs = [libdir] + self.cpp_info.includedirs = [os.path.join("mtfmt", "include")] + self.cpp_info.bindirs = [os.path.join("mtfmt", "bin")] diff --git a/recipes/mtfmt/all/patches/0.1.3-0001-remove-hardcoded-stds.patch b/recipes/mtfmt/all/patches/0.1.3-0001-remove-hardcoded-stds.patch new file mode 100644 index 0000000000000..272d9f3d83b9f --- /dev/null +++ b/recipes/mtfmt/all/patches/0.1.3-0001-remove-hardcoded-stds.patch @@ -0,0 +1,27 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 2d4ffcd..293cf7e 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -2,8 +2,8 @@ cmake_minimum_required(VERSION 3.10) + + project(mtfmt) + +-set(CMAKE_C_STANDARD 11) +-set(CMAKE_CXX_STANDARD 11) ++#set(CMAKE_C_STANDARD 11) ++#set(CMAKE_CXX_STANDARD 11) + + # debug版的åŽç¼€ + set(CMAKE_DEBUG_POSTFIX "_d") +@@ -50,6 +50,11 @@ endif() + # including path + target_include_directories(${TARGET_NAME} PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/inc") + ++# Standards ++target_compile_features(${TARGET_NAME} PRIVATE cxx_std_11) ++target_compile_features(${TARGET_NAME} PRIVATE c_std_11) ++ ++ + # debug? + if(NOT MSVC) + if(NOT CMAKE_BUILD_TYPE) diff --git a/recipes/mtfmt/all/test_package/CMakeLists.txt b/recipes/mtfmt/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..db0d350d8ebe1 --- /dev/null +++ b/recipes/mtfmt/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) + +project(test_package LANGUAGES C) + +find_package(mtfmt REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.c) +target_link_libraries(${PROJECT_NAME} PRIVATE mtfmt::mtfmt) diff --git a/recipes/mtfmt/all/test_package/conanfile.py b/recipes/mtfmt/all/test_package/conanfile.py new file mode 100644 index 0000000000000..ef5d7042163ec --- /dev/null +++ b/recipes/mtfmt/all/test_package/conanfile.py @@ -0,0 +1,26 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/mtfmt/all/test_package/test_package.c b/recipes/mtfmt/all/test_package/test_package.c new file mode 100644 index 0000000000000..29545fce88b63 --- /dev/null +++ b/recipes/mtfmt/all/test_package/test_package.c @@ -0,0 +1,97 @@ +// SPDX-License-Identifier: LGPL-3.0 +/** + * @file example_build_config.c + * @author å‘阳 (hinata.hoshino@foxmail.com) + * @brief ä¸åŒå¯¹é½æ–¹å¼ä¸‹çš„æ ¼å¼åŒ–çš„ä¾‹å­ + * @version 1.0 + * @date 2023-07-23 + * + * @copyright Copyright (c) å‘阳, all rights reserved. + * + */ +#include "mtfmt.h" +#include +#include + +/** + * @brief 测试1个ä½æ˜¯å¦è¢«set + * + */ +#define BIT_TEST(v, b) (!!(((v) & (b)) == (b))) + +/** + * @brief 把booleanå˜æˆC字符串 + * + */ +#define BOOL2STR(b) ((b) ? "true" : "false") + +int main(void) +{ + uint32_t cfg = MSTR_CONFIGURE_CFG_VAL(mstr_configure()); + uint32_t compiler = MSTR_CONFIGURE_CC_VAL(cfg); + + puts("+-----------+--------------------------+-------+"); + + const char* compiler_name = "unknown"; + switch (compiler) { + case MSTR_BUILD_CC_MSVC: compiler_name = "msvc"; break; + case MSTR_BUILD_CC_GNUC: compiler_name = "gcc"; break; + case MSTR_BUILD_CC_ARMCC: compiler_name = "armcc"; break; + case MSTR_BUILD_CC_ARMCLANG: compiler_name = "armclang"; break; + case MSTR_BUILD_CC_EMSCRIPTEN: compiler_name = "emscripten"; break; + case MSTR_BUILD_CC_OTHER: compiler_name = "unknown"; break; + } + printf("| Compiler | %-24s | --- |\n", compiler_name); + + puts("+-----------+--------------------------+-------+"); + + printf( + "| Configure | %-24s | %5s |\n", + "_MSTR_USE_MALLOC", + BOOL2STR(BIT_TEST(cfg, MSTRCFG_USE_MALLOC_BIT)) + ); + printf( + "| | %-24s | %5s |\n", + "_MSTR_BUILD_DLL", + BOOL2STR(BIT_TEST(cfg, MSTRCFG_BUILD_DLL_BIT)) + ); + printf( + "| | %-24s | %5s |\n", + "_MSTR_USE_HARDWARE_DIV", + BOOL2STR(BIT_TEST(cfg, MSTRCFG_BUILD_HARDWARE_DIV)) + ); + printf( + "| | %-24s | %5s |\n", + "_MSTR_USE_STD_IO", + BOOL2STR(BIT_TEST(cfg, MSTRCFG_USE_STD_IO)) + ); + printf( + "| | %-24s | %5s |\n", + "_MSTR_USE_UTF_8", + BOOL2STR(BIT_TEST(cfg, MSTRCFG_USE_UTF_8)) + ); + printf( + "| | %-24s | %5s |\n", + "_MSTR_USE_CPP_EXCEPTION", + BOOL2STR(BIT_TEST(cfg, MSTRCFG_USE_CXX_EXCEPTION)) + ); + printf( + "| | %-24s | %5s |\n", + "_MSTR_USE_FP_FLOAT32", + BOOL2STR(BIT_TEST(cfg, MSTRCFG_USE_FLOAT32)) + ); + printf( + "| | %-24s | %5s |\n", + "_MSTR_USE_FP_FLOAT64", + BOOL2STR(BIT_TEST(cfg, MSTRCFG_USE_FLOAT64)) + ); + printf( + "| | %-24s | %5s |\n", + "_MSTR_USE_ALLOC", + BOOL2STR(BIT_TEST(cfg, MSTRCFG_USE_ALLOCATOR)) + ); + + puts("+-----------+--------------------------+-------+"); + + return 0; +} diff --git a/recipes/mtfmt/config.yml b/recipes/mtfmt/config.yml new file mode 100644 index 0000000000000..b7f57204004e4 --- /dev/null +++ b/recipes/mtfmt/config.yml @@ -0,0 +1,3 @@ +versions: + "0.1.3": + folder: all diff --git a/recipes/mujs/all/conandata.yml b/recipes/mujs/all/conandata.yml index 3a69126dc4af3..eb2092fbfdd74 100644 --- a/recipes/mujs/all/conandata.yml +++ b/recipes/mujs/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.3.5": + url: "https://mujs.com/downloads/mujs-1.3.5.tar.gz" + sha256: "78a311ae4224400774cb09ef5baa2633c26971513f8b931d3224a0eb85b13e0b" "1.3.4": url: "https://mujs.com/downloads/mujs-1.3.4.tar.gz" sha256: "c015475880f6a382e706169c94371a7dd6cc22078832f6e0865af8289c2ef42b" diff --git a/recipes/mujs/all/conanfile.py b/recipes/mujs/all/conanfile.py index 4d4b59f453109..9a9dbc2ba3805 100644 --- a/recipes/mujs/all/conanfile.py +++ b/recipes/mujs/all/conanfile.py @@ -11,10 +11,9 @@ class MujsConan(ConanFile): description = "MuJS is a lightweight Javascript interpreter designed for " \ "embedding in other software to extend them with scripting capabilities." license = "ISC" - topics = ("interpreter", "javascript") - homepage = "https://mujs.com" url = "https://github.com/conan-io/conan-center-index" - + homepage = "https://mujs.com" + topics = ("interpreter", "javascript") package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { diff --git a/recipes/mujs/config.yml b/recipes/mujs/config.yml index f0766a7d62e0c..233cb2080473e 100644 --- a/recipes/mujs/config.yml +++ b/recipes/mujs/config.yml @@ -1,4 +1,6 @@ versions: + "1.3.5": + folder: all "1.3.4": folder: all "1.1.2": diff --git a/recipes/nanoflann/all/conandata.yml b/recipes/nanoflann/all/conandata.yml index f8c576a4749fe..9d51335bc5f52 100644 --- a/recipes/nanoflann/all/conandata.yml +++ b/recipes/nanoflann/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.6.0": + url: "https://github.com/jlblancoc/nanoflann/archive/v1.6.0.tar.gz" + sha256: "f889026fbcb241e1e9d71bab5dfb9cc35775bf18a6466a283e2cbcd60edb2705" "1.5.2": url: "https://github.com/jlblancoc/nanoflann/archive/v1.5.2.tar.gz" sha256: "2adcea7821445119a7a4f83c27abd56dba963e1e9c05a3f58bdb2273ae1b4698" diff --git a/recipes/nanoflann/all/conanfile.py b/recipes/nanoflann/all/conanfile.py index 47bfe18256ddd..90669ce351aaf 100644 --- a/recipes/nanoflann/all/conanfile.py +++ b/recipes/nanoflann/all/conanfile.py @@ -9,10 +9,9 @@ class NanoflannConan(ConanFile): name = "nanoflann" - description = """nanoflann is a C++11 header-only library for building KD-Trees - of datasets with different topologies: R2, R3 (point clouds), - SO(2) and SO(3) (2D and 3D rotation groups). - """ + description = ("nanoflann is a C++11 header-only library for building KD-Trees" + " of datasets with different topologies: R2, R3 (point clouds)," + " SO(2) and SO(3) (2D and 3D rotation groups).") topics = ("flann", "nearest-neighbor", "kd-trees") url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/jlblancoc/nanoflann" @@ -48,3 +47,6 @@ def package_info(self): self.cpp_info.set_property("pkg_config_name", "nanoflann") self.cpp_info.bindirs = [] self.cpp_info.libdirs = [] + if self.settings.os in ("Linux", "FreeBSD"): + # If we ever support NANOFLANN_NO_THREADS, there would be no need to add this if set + self.cpp_info.system_libs.append("pthread") diff --git a/recipes/nanoflann/config.yml b/recipes/nanoflann/config.yml index 42431fc83ed1e..43ca2b954f0dc 100644 --- a/recipes/nanoflann/config.yml +++ b/recipes/nanoflann/config.yml @@ -1,4 +1,6 @@ versions: + "1.6.0": + folder: "all" "1.5.2": folder: "all" "1.5.0": diff --git a/recipes/ncurses/all/conandata.yml b/recipes/ncurses/all/conandata.yml index fc77450ebeca3..6777bbc70de06 100644 --- a/recipes/ncurses/all/conandata.yml +++ b/recipes/ncurses/all/conandata.yml @@ -1,4 +1,9 @@ sources: + "6.5": + url: + - "https://ftp.gnu.org/pub/gnu/ncurses/ncurses-6.5.tar.gz" + - "https://invisible-mirror.net/archives/ncurses/ncurses-6.5.tar.gz" + sha256: "136d91bc269a9a5785e5f9e980bc76ab57428f604ce3e5a5a90cebc767971cc6" "6.4": url: - "https://ftp.gnu.org/pub/gnu/ncurses/ncurses-6.4.tar.gz" @@ -9,46 +14,3 @@ sources: - "https://ftp.gnu.org/pub/gnu/ncurses/ncurses-6.3.tar.gz" - "https://invisible-mirror.net/archives/ncurses/ncurses-6.3.tar.gz" sha256: "97fc51ac2b085d4cde31ef4d2c3122c21abc217e9090a43a30fc5ec21684e059" - "6.2": - url: - - "https://ftp.gnu.org/pub/gnu/ncurses/ncurses-6.2.tar.gz" - - "https://invisible-mirror.net/archives/ncurses/ncurses-6.2.tar.gz" - sha256: "30306e0c76e0f9f1f0de987cf1c82a5c21e1ce6568b9227f7da5b71cbea86c9d" -patches: - "6.2": - - patch_file: "patches/6.2.0-0001-Look-for-pcre2posix-instead-of-pcre2-posix.h.patch" - patch_type: "portability" - - patch_file: "patches/6.2.0-0002-Optionally-include-sys-time.h.patch" - patch_type: "portability" - - patch_file: "patches/6.2.0-0003-Do-not-redeclare-exit.patch" - patch_type: "portability" - - patch_file: "patches/6.2.0-0004-fix-win32con.patch" - patch_type: "portability" - - patch_file: "patches/6.2.0-0005-api-must-be-placed-next-to-variable-name.patch" - patch_type: "portability" - - patch_file: "patches/6.2.0-0006-Add-potentially-missing-STDOUT_FILENO.patch" - patch_type: "portability" - - patch_file: "patches/6.2.0-0007-No-import-export-declaration-on-class-members.patch" - patch_type: "portability" - - patch_file: "patches/6.2.0-0008-Add-include-file-to-add-export-annotation.patch" - patch_type: "portability" - - patch_file: "patches/6.2.0-0010-Pass-BUILDING_XXX-compile-definition-while-building-.patch" - patch_type: "portability" - - patch_file: "patches/6.2.0-0011-Let-each-sublibrary-do-its-own-import-exporting.patch" - patch_type: "portability" - - patch_file: "patches/6.2.0-0012-Learn-configure-about-msvc.patch" - patch_type: "portability" - - patch_file: "patches/6.2.0-0013-Fix-lib_gen.c.patch" - patch_type: "portability" - - patch_file: "patches/6.2.0-0014-avoid-macro-expansion-in-args-by-defining-NCURSES_NO.patch" - patch_type: "portability" - - patch_file: "patches/6.2.0-0015-MSVC-access-does-not-support-X_OK.patch" - patch_type: "portability" - - patch_file: "patches/6.2.0-0016-msvc-has-wchar-support.patch" - patch_type: "portability" - - patch_file: "patches/6.2.0-0017-msvc-fix-tests.patch" - patch_type: "portability" - - patch_file: "patches/6.2.0-0018-missing-functions-c-linkage.patch" - patch_type: "portability" - - patch_file: "patches/6.2.0-0019-Run-autoreconf.patch" - patch_type: "portability" diff --git a/recipes/ncurses/all/patches/6.2.0-0001-Look-for-pcre2posix-instead-of-pcre2-posix.h.patch b/recipes/ncurses/all/patches/6.2.0-0001-Look-for-pcre2posix-instead-of-pcre2-posix.h.patch deleted file mode 100644 index c9d1dc8e8178a..0000000000000 --- a/recipes/ncurses/all/patches/6.2.0-0001-Look-for-pcre2posix-instead-of-pcre2-posix.h.patch +++ /dev/null @@ -1,59 +0,0 @@ -Upstreamed in 18f51bcf99101e5bf4c737239c44064227f34db8 - -ncurses 6.2 - patch 20200229 - -From 7699b26096801fe462233ecb86484bdc3a2f0beb Mon Sep 17 00:00:00 2001 -From: Anonymous Maarten -Date: Tue, 17 Mar 2020 15:22:08 +0100 -Subject: [PATCH 01/15] Look for pcre2posix instead of pcre2-posix.h - ---- - aclocal.m4 | 2 +- - form/fty_regex.c | 4 ++-- - include/ncurses_defs | 2 +- - 3 files changed, 4 insertions(+), 4 deletions(-) - -diff --git a/aclocal.m4 b/aclocal.m4 -index c27cc368..e6ccc42f 100644 ---- a/aclocal.m4 -+++ b/aclocal.m4 -@@ -8506,7 +8506,7 @@ if test "x$with_pcre2" != xno ; then - esac - - # either way, check for the library header files -- AC_CHECK_HEADERS(pcre2-posix.h pcreposix.h) -+ AC_CHECK_HEADERS(pcre2posix.h pcreposix.h) - fi - ])dnl - dnl --------------------------------------------------------------------------- -diff --git a/form/fty_regex.c b/form/fty_regex.c -index da0ef08c..d1daf714 100644 ---- a/form/fty_regex.c -+++ b/form/fty_regex.c -@@ -39,8 +39,8 @@ MODULE_ID("$Id: fty_regex.c,v 1.28 2020/02/02 23:34:34 tom Exp $") - - #if HAVE_REGEX_H_FUNCS || HAVE_LIB_PCRE2 /* We prefer POSIX regex */ - --#if HAVE_PCRE2_POSIX_H --#include -+#if HAVE_PCRE2POSIX_H -+#include - #elif HAVE_PCREPOSIX_H - #include - #else -diff --git a/include/ncurses_defs b/include/ncurses_defs -index e37fc901..a0339457 100644 ---- a/include/ncurses_defs -+++ b/include/ncurses_defs -@@ -120,7 +120,7 @@ HAVE_NANOSLEEP - HAVE_NC_ALLOC_H - HAVE_NEWPAD 1 - HAVE_PANEL_H --HAVE_PCRE2_POSIX_H -+HAVE_PCRE2POSIX_H - HAVE_PCREPOSIX_H - HAVE_POLL - HAVE_POLL_H --- -2.21.1 - diff --git a/recipes/ncurses/all/patches/6.2.0-0002-Optionally-include-sys-time.h.patch b/recipes/ncurses/all/patches/6.2.0-0002-Optionally-include-sys-time.h.patch deleted file mode 100644 index b8cb861a2599a..0000000000000 --- a/recipes/ncurses/all/patches/6.2.0-0002-Optionally-include-sys-time.h.patch +++ /dev/null @@ -1,51 +0,0 @@ -Upstreamed in 18f51bcf99101e5bf4c737239c44064227f34db8 - -ncurses 6.2 - patch 20200229 - -From 3737faf9325859a33d8288337c312fb9ad5b3e02 Mon Sep 17 00:00:00 2001 -From: Anonymous Maarten -Date: Tue, 17 Mar 2020 15:24:34 +0100 -Subject: [PATCH 02/15] Optionally include sys/time.h - ---- - include/nc_mingw.h | 2 ++ - ncurses/tty/lib_twait.c | 2 +- - 2 files changed, 3 insertions(+), 1 deletion(-) - -diff --git a/include/nc_mingw.h b/include/nc_mingw.h -index 68a41849..b47bb2cf 100644 ---- a/include/nc_mingw.h -+++ b/include/nc_mingw.h -@@ -52,10 +52,16 @@ - #undef gettimeofday - #define gettimeofday(tv,tz) _nc_gettimeofday(tv,tz) - -+#if HAVE_SYS_TIME_H - #include /* for struct timeval */ -+#endif - -+#ifdef _MSC_VER -+#include /* for struct timeval */ -+#endif -+ - extern int _nc_gettimeofday(struct timeval *, void *); - - #undef HAVE_GETTIMEOFDAY - #define HAVE_GETTIMEOFDAY 1 - -diff --git a/ncurses/tty/lib_twait.c b/ncurses/tty/lib_twait.c -index 3ab168dd..74d267c7 100644 ---- a/ncurses/tty/lib_twait.c -+++ b/ncurses/tty/lib_twait.c -@@ -71,7 +71,7 @@ - # include - # endif - #endif --#ifdef _WIN32 -+#if HAVE_SYS_TIME_H - # include - #endif - #undef CUR --- -2.21.1 - diff --git a/recipes/ncurses/all/patches/6.2.0-0003-Do-not-redeclare-exit.patch b/recipes/ncurses/all/patches/6.2.0-0003-Do-not-redeclare-exit.patch deleted file mode 100644 index 758bbc562ec77..0000000000000 --- a/recipes/ncurses/all/patches/6.2.0-0003-Do-not-redeclare-exit.patch +++ /dev/null @@ -1,28 +0,0 @@ -Upstreamed in 18f51bcf99101e5bf4c737239c44064227f34db8 - -ncurses 6.2 - patch 20200229 - -From 8e12095e0af72dd9414fcdb35831f585d5b8d67e Mon Sep 17 00:00:00 2001 -From: Anonymous Maarten -Date: Tue, 17 Mar 2020 15:25:00 +0100 -Subject: [PATCH 03/15] Do not redeclare exit - ---- - c++/etip.h.in | 1 - - 1 file changed, 1 deletion(-) - -diff --git a/c++/etip.h.in b/c++/etip.h.in -index 9334f9d3..1155c5fd 100644 ---- a/c++/etip.h.in -+++ b/c++/etip.h.in -@@ -341,7 +341,6 @@ using std::endl; - # else - # include - # endif -- extern "C" void exit(int); - #endif - - inline void THROW(const NCursesException *e) { --- -2.21.1 - diff --git a/recipes/ncurses/all/patches/6.2.0-0004-fix-win32con.patch b/recipes/ncurses/all/patches/6.2.0-0004-fix-win32con.patch deleted file mode 100644 index 4af53ed568c0d..0000000000000 --- a/recipes/ncurses/all/patches/6.2.0-0004-fix-win32con.patch +++ /dev/null @@ -1,91 +0,0 @@ -Upstreamed in 18f51bcf99101e5bf4c737239c44064227f34db8 - -ncurses 6.2 - patch 20200229 - -From 5cb87b2244c1e944e13478b7bb98d0984b7dfdf7 Mon Sep 17 00:00:00 2001 -From: Anonymous Maarten -Date: Tue, 17 Mar 2020 15:25:57 +0100 -Subject: [PATCH 04/15] fix win32con ---- - ncurses/win32con/gettimeofday.c | 4 ++++ - ncurses/win32con/win_driver.c | 14 +++++++------- - 2 files changed, 11 insertions(+), 7 deletions(-) - -diff --git a/ncurses/win32con/gettimeofday.c b/ncurses/win32con/gettimeofday.c -index 8fad9a62..319937c6 100644 ---- a/ncurses/win32con/gettimeofday.c -+++ b/ncurses/win32con/gettimeofday.c -@@ -40,6 +40,10 @@ MODULE_ID("$Id: gettimeofday.c,v 1.4 2020/02/02 23:34:34 tom Exp $") - - #define JAN1970 116444736000000000LL /* the value for 01/01/1970 00:00 */ - -+#ifdef _MSC_VER -+#include -+#endif -+ - int - gettimeofday(struct timeval *tv, void *tz GCC_UNUSED) - { -diff --git a/ncurses/win32con/win_driver.c b/ncurses/win32con/win_driver.c -index 280aa6dc..1bd45bb7 100644 ---- a/ncurses/win32con/win_driver.c -+++ b/ncurses/win32con/win_driver.c -@@ -58,7 +58,7 @@ - MODULE_ID("$Id: win_driver.c,v 1.63 2020/02/02 23:34:34 tom Exp $") - - #ifndef __GNUC__ --# error We need GCC to compile for MinGW -+//# error We need GCC to compile for MinGW - #endif - - #define WINMAGIC NCDRV_MAGIC(NCDRV_WINCONSOLE) -@@ -262,7 +262,7 @@ static BOOL - con_write16(TERMINAL_CONTROL_BLOCK * TCB, int y, int x, cchar_t *str, int limit) - { - int actual = 0; -- CHAR_INFO ci[limit]; -+ CHAR_INFO * ci = (CHAR_INFO*) _alloca(sizeof(CHAR_INFO) * limit); - COORD loc, siz; - SMALL_RECT rec; - int i; -@@ -311,7 +311,7 @@ con_write16(TERMINAL_CONTROL_BLOCK * TCB, int y, int x, cchar_t *str, int limit) - static BOOL - con_write8(TERMINAL_CONTROL_BLOCK * TCB, int y, int x, chtype *str, int n) - { -- CHAR_INFO ci[n]; -+ CHAR_INFO * ci = (CHAR_INFO*) _alloca(sizeof(CHAR_INFO) * n); - COORD loc, siz; - SMALL_RECT rec; - int i; -@@ -510,7 +510,7 @@ wcon_doupdate(TERMINAL_CONTROL_BLOCK * TCB) - if ((CurScreen(sp)->_clear || NewScreen(sp)->_clear)) { - int x; - #if USE_WIDEC_SUPPORT -- cchar_t empty[Width]; -+ cchar_t * empty = (cchar_t*) _alloca(sizeof(cchar_t) * Width); - wchar_t blank[2] = - { - L' ', L'\0' -@@ -519,7 +519,7 @@ wcon_doupdate(TERMINAL_CONTROL_BLOCK * TCB) - for (x = 0; x < Width; x++) - setcchar(&empty[x], blank, 0, 0, 0); - #else -- chtype empty[Width]; -+ chtype * empty = (chtype*) _alloca(sizeof(chtype) * Width); - - for (x = 0; x < Width; x++) - empty[x] = ' '; -@@ -675,8 +675,8 @@ wcon_dobeepflash(TERMINAL_CONTROL_BLOCK * TCB, - int max_cells = (high * wide); - int i; - -- CHAR_INFO this_screen[max_cells]; -- CHAR_INFO that_screen[max_cells]; -+ CHAR_INFO * this_screen = (CHAR_INFO*) _alloca(sizeof(CHAR_INFO) * max_cells); -+ CHAR_INFO * that_screen = (CHAR_INFO*) _alloca(sizeof(CHAR_INFO) * max_cells); - COORD this_size; - SMALL_RECT this_region; - COORD bufferCoord; --- -2.21.1 - diff --git a/recipes/ncurses/all/patches/6.2.0-0005-api-must-be-placed-next-to-variable-name.patch b/recipes/ncurses/all/patches/6.2.0-0005-api-must-be-placed-next-to-variable-name.patch deleted file mode 100644 index 9d34795fa33af..0000000000000 --- a/recipes/ncurses/all/patches/6.2.0-0005-api-must-be-placed-next-to-variable-name.patch +++ /dev/null @@ -1,45 +0,0 @@ -Upstreamed in 18f51bcf99101e5bf4c737239c44064227f34db8 - -ncurses 6.2 - patch 20200229 - -From c225d0ccd87b45fbaf92a4b048887f8f136cedcd Mon Sep 17 00:00:00 2001 -From: Anonymous Maarten -Date: Tue, 17 Mar 2020 15:26:55 +0100 -Subject: [PATCH 05/15] api must be placed next to variable name - ---- - include/term_entry.h | 4 ++-- - ncurses/tinfo/comp_parse.c | 2 +- - 2 files changed, 3 insertions(+), 3 deletions(-) - -diff --git a/include/term_entry.h b/include/term_entry.h -index df13f53f..c4702012 100644 ---- a/include/term_entry.h -+++ b/include/term_entry.h -@@ -200,8 +200,8 @@ extern NCURSES_EXPORT(bool) _nc_entry_match (char *, char *); - extern NCURSES_EXPORT(int) _nc_resolve_uses (bool); /* obs 20040705 */ - extern NCURSES_EXPORT(int) _nc_resolve_uses2 (bool, bool); - extern NCURSES_EXPORT(void) _nc_free_entries (ENTRY *); --extern NCURSES_IMPEXP void NCURSES_API (*_nc_check_termtype)(TERMTYPE *); /* obs 20040705 */ --extern NCURSES_IMPEXP void NCURSES_API (*_nc_check_termtype2)(TERMTYPE2 *, bool); -+extern NCURSES_IMPEXP void (NCURSES_API *_nc_check_termtype)(TERMTYPE *); /* obs 20040705 */ -+extern NCURSES_IMPEXP void (NCURSES_API *_nc_check_termtype2)(TERMTYPE2 *, bool); - - /* trace_xnames.c */ - extern NCURSES_EXPORT(void) _nc_trace_xnames (TERMTYPE *); -diff --git a/ncurses/tinfo/comp_parse.c b/ncurses/tinfo/comp_parse.c -index ab25d5b1..d320129e 100644 ---- a/ncurses/tinfo/comp_parse.c -+++ b/ncurses/tinfo/comp_parse.c -@@ -51,7 +51,7 @@ - MODULE_ID("$Id: comp_parse.c,v 1.109 2020/02/02 23:34:34 tom Exp $") - - static void sanity_check2(TERMTYPE2 *, bool); --NCURSES_IMPEXP void NCURSES_API(*_nc_check_termtype2) (TERMTYPE2 *, bool) = sanity_check2; -+NCURSES_IMPEXP void (NCURSES_API *_nc_check_termtype2) (TERMTYPE2 *, bool) = sanity_check2; - - static void fixup_acsc(TERMTYPE2 *, int); - --- -2.21.1 - diff --git a/recipes/ncurses/all/patches/6.2.0-0006-Add-potentially-missing-STDOUT_FILENO.patch b/recipes/ncurses/all/patches/6.2.0-0006-Add-potentially-missing-STDOUT_FILENO.patch deleted file mode 100644 index 60a2039b3f9e1..0000000000000 --- a/recipes/ncurses/all/patches/6.2.0-0006-Add-potentially-missing-STDOUT_FILENO.patch +++ /dev/null @@ -1,31 +0,0 @@ -Upstreamed in 18f51bcf99101e5bf4c737239c44064227f34db8 - -ncurses 6.2 - patch 20200229 - -From 536b8ba02682dcf367efba46b9616a9695341797 Mon Sep 17 00:00:00 2001 -From: Anonymous Maarten -Date: Tue, 17 Mar 2020 15:27:22 +0100 -Subject: [PATCH 06/15] Add potentially missing STDOUT_FILENO - ---- - progs/progs.priv.h | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/progs/progs.priv.h b/progs/progs.priv.h -index da7a5154..4734e740 100644 ---- a/progs/progs.priv.h -+++ b/progs/progs.priv.h -@@ -155,6 +155,10 @@ extern int optind; - #endif /* gcc workarounds */ - - /* usually in */ -+#ifndef STDIN_FILENO -+#define STDIN_FILENO 0 -+#endif -+ - #ifndef STDOUT_FILENO - #define STDOUT_FILENO 1 - #endif --- -2.21.1 - diff --git a/recipes/ncurses/all/patches/6.2.0-0007-No-import-export-declaration-on-class-members.patch b/recipes/ncurses/all/patches/6.2.0-0007-No-import-export-declaration-on-class-members.patch deleted file mode 100644 index ef00f1218a927..0000000000000 --- a/recipes/ncurses/all/patches/6.2.0-0007-No-import-export-declaration-on-class-members.patch +++ /dev/null @@ -1,53 +0,0 @@ -Upstreamed in 18f51bcf99101e5bf4c737239c44064227f34db8 - -ncurses 6.2 - patch 20200229 - -From ff6bd063127225360332a938ed8e6babd90d9798 Mon Sep 17 00:00:00 2001 -From: Anonymous Maarten -Date: Tue, 17 Mar 2020 15:28:30 +0100 -Subject: [PATCH 07/15] No import/export declaration on class members - ---- - c++/cursslk.h | 12 ++++++------ - 1 file changed, 6 insertions(+), 6 deletions(-) - -diff --git a/c++/cursslk.h b/c++/cursslk.h -index 5a7b78c3..10364c1d 100644 ---- a/c++/cursslk.h -+++ b/c++/cursslk.h -@@ -101,10 +101,10 @@ public: - } Label_Layout; - - private: -- static long NCURSES_IMPEXP count; // Number of Key Sets -- static Label_Layout NCURSES_IMPEXP format; // Layout of the Key Sets -- static int NCURSES_IMPEXP num_labels; // Number Of Labels in Key Sets -- bool NCURSES_IMPEXP b_attrInit; // Are attributes initialized -+ static long count; // Number of Key Sets -+ static Label_Layout format; // Layout of the Key Sets -+ static int num_labels; // Number Of Labels in Key Sets -+ bool b_attrInit; // Are attributes initialized - - Soft_Label_Key *slk_array; // The array of SLK's - -@@ -144,7 +144,7 @@ public: - - // This constructor assumes, that you already constructed a Key Set - // with a layout by the constructor above. This layout will be reused. -- NCURSES_IMPEXP Soft_Label_Key_Set(); -+ Soft_Label_Key_Set(); - - Soft_Label_Key_Set& operator=(const Soft_Label_Key_Set& rhs) - { -@@ -165,7 +165,7 @@ public: - virtual ~Soft_Label_Key_Set() THROWS(NCursesException); - - // Get Label# i. Label counting starts with 1! -- NCURSES_IMPEXP Soft_Label_Key& operator[](int i); -+ Soft_Label_Key& operator[](int i); - - // Retrieve number of Labels - inline int labels() const { return num_labels; } --- -2.21.1 - diff --git a/recipes/ncurses/all/patches/6.2.0-0008-Add-include-file-to-add-export-annotation.patch b/recipes/ncurses/all/patches/6.2.0-0008-Add-include-file-to-add-export-annotation.patch deleted file mode 100644 index d29108c2fbbb7..0000000000000 --- a/recipes/ncurses/all/patches/6.2.0-0008-Add-include-file-to-add-export-annotation.patch +++ /dev/null @@ -1,100 +0,0 @@ -Upstreamed in 3e37c7d3fa122563a9d88168926f61286ef30cd3 - -ncurses 6.2 - patch 20200523 - -this patch differs with upstream: -upstream has integrated this fine in ncurses_dll.h.in (instead of creating a new file) -This change is small, so don't care. - -From ffcd8b69aa8346e94aceefdc4593ad74635708f9 Mon Sep 17 00:00:00 2001 -From: Anonymous Maarten -Date: Sat, 14 Mar 2020 12:38:41 +0100 -Subject: [PATCH 08/15] Add include file to add export annotation - ---- - configure.in | 1 + - include/headers | 1 + - include/ncurses_exports.h.in | 47 ++++++++++++++++++++++++++++++++++++ - 3 files changed, 49 insertions(+) - create mode 100644 include/ncurses_exports.h.in - -diff --git a/configure.in b/configure.in -index 2183a978..fc00f9dc 100644 ---- a/configure.in -+++ b/configure.in -@@ -2395,6 +2395,7 @@ AC_OUTPUT( \ - include/MKterm.h.awk \ - include/curses.head:include/curses.h.in \ - include/ncurses_dll.h \ -+ include/ncurses_exports.h \ - include/termcap.h \ - include/unctrl.h \ - $SUB_MAKEFILES \ -diff --git a/include/headers b/include/headers -index dbb134d1..e20798b4 100644 ---- a/include/headers -+++ b/include/headers -@@ -33,6 +33,7 @@ - curses.h - unctrl.h - ncurses_dll.h -+ncurses_exports.h - - # Support for termcap (and tic, etc.), which can be a separate library - @ termlib -diff --git a/include/ncurses_exports.h.in b/include/ncurses_exports.h.in -new file mode 100644 -index 00000000..252f5021 ---- /dev/null -+++ b/include/ncurses_exports.h.in -@@ -0,0 +1,47 @@ -+/**************************************************************************** -+ * Copyright 2020 Thomas E. Dickey * -+ * * -+ * Permission is hereby granted, free of charge, to any person obtaining a * -+ * copy of this software and associated documentation files (the * -+ * "Software"), to deal in the Software without restriction, including * -+ * without limitation the rights to use, copy, modify, merge, publish, * -+ * distribute, distribute with modifications, sublicense, and/or sell * -+ * copies of the Software, and to permit persons to whom the Software is * -+ * furnished to do so, subject to the following conditions: * -+ * * -+ * The above copyright notice and this permission notice shall be included * -+ * in all copies or substantial portions of the Software. * -+ * * -+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * -+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * -+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * -+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * -+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * -+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * -+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. * -+ * * -+ * Except as contained in this notice, the name(s) of the above copyright * -+ * holders shall not be used in advertising or otherwise to promote the * -+ * sale, use or other dealings in this Software without prior written * -+ * authorization. * -+ ****************************************************************************/ -+/* $Id: ncurses_exports.h.in,v 1.13 2020/02/29 21:53:14 tom Exp $ */ -+ -+#ifndef NCURSES_EXPORTS_H_incl -+#define NCURSES_EXPORTS_H_incl 1 -+ -+#if defined(__CYGWIN__) || defined(_WIN32) -+# if defined(NCURSES_DLL) -+# define NCURSES_EXPORT __declspec(dllexport) -+# elif !defined(NCURSES_STATIC) -+# define NCURSES_EXPORT __declspec(dllimport) -+# else -+# define NCURSES_EXPORT -+# endif -+#endif -+ -+#if !defined(NCURSES_EXPORT) -+# define NCURSES_EXPORT @NCURSES_EXPORT@ -+#endif -+ -+#endif /* NCURSES_EXPORTS_H_incl */ --- -2.21.1 - diff --git a/recipes/ncurses/all/patches/6.2.0-0010-Pass-BUILDING_XXX-compile-definition-while-building-.patch b/recipes/ncurses/all/patches/6.2.0-0010-Pass-BUILDING_XXX-compile-definition-while-building-.patch deleted file mode 100644 index ffa1320f610fb..0000000000000 --- a/recipes/ncurses/all/patches/6.2.0-0010-Pass-BUILDING_XXX-compile-definition-while-building-.patch +++ /dev/null @@ -1,242 +0,0 @@ -Upstreamed in 04d942c3d98cf0a929c6afb17be8c10d4ae39af0 - -ncurses 6.2 - patch 20200704 - -From ed3ad1962ab885b9a9c6e6a3437eb6db274110b5 Mon Sep 17 00:00:00 2001 -From: Anonymous Maarten -Date: Sat, 14 Mar 2020 14:15:41 +0100 -Subject: [PATCH 10/15] Pass BUILDING_XXX compile definition while building - library XXX - ---- - c++/Makefile.in | 6 ++--- - form/Makefile.in | 6 ++--- - include/ncurses_dll.h.in | 49 ++++++------------------------------ - include/ncurses_exports.h.in | 23 +++++++++-------- - menu/Makefile.in | 6 ++--- - ncurses/Makefile.in | 8 +++--- - panel/Makefile.in | 6 ++--- - 7 files changed, 35 insertions(+), 69 deletions(-) - -diff --git a/c++/Makefile.in b/c++/Makefile.in -index 9b22b6ac..17b3e069 100644 ---- a/c++/Makefile.in -+++ b/c++/Makefile.in -@@ -89,7 +89,7 @@ CXXFLAGS = @CXXFLAGS@ @EXTRA_CXXFLAGS@ - CXXLIBS = @CXXLIBS@ - - INCDIR = ../include --CPPFLAGS = -DHAVE_CONFIG_H -I../c++ @CPPFLAGS@ -+CPPFLAGS = -DHAVE_CONFIG_H -DBUILDING_NCURSES_CXX -I../c++ @CPPFLAGS@ - - CTAGS = @CTAGS@ - ETAGS = @ETAGS@ -@@ -97,8 +97,8 @@ ETAGS = @ETAGS@ - CC = ${CXX} - CCFLAGS = $(CPPFLAGS) $(CXXFLAGS) - --CFLAGS_LIBTOOL = $(CCFLAGS) --CFLAGS_NORMAL = $(CCFLAGS) -+CFLAGS_LIBTOOL = $(CCFLAGS) -DNCURSES_STATIC -+CFLAGS_NORMAL = $(CCFLAGS) -DNCURSES_STATIC - CFLAGS_DEBUG = $(CCFLAGS) @CXX_G_OPT@ -DTRACE - CFLAGS_PROFILE = $(CCFLAGS) -pg - CFLAGS_SHARED = $(CCFLAGS) @CC_SHARED_OPTS@ -diff --git a/form/Makefile.in b/form/Makefile.in -index 3e5be8da..34bfd172 100644 ---- a/form/Makefile.in -+++ b/form/Makefile.in -@@ -92,12 +92,12 @@ CC = @CC@ - CPP = @CPP@ - CFLAGS = @CFLAGS@ - --CPPFLAGS = -I${top_srcdir}/ncurses -DHAVE_CONFIG_H @CPPFLAGS@ -+CPPFLAGS = -I${top_srcdir}/ncurses -DHAVE_CONFIG_H @CPPFLAGS@ -DBUILDING_FORM - - CCFLAGS = $(CPPFLAGS) $(CFLAGS) - --CFLAGS_LIBTOOL = $(CCFLAGS) --CFLAGS_NORMAL = $(CCFLAGS) -+CFLAGS_LIBTOOL = $(CCFLAGS) -DNCURSES_STATIC -+CFLAGS_NORMAL = $(CCFLAGS) -DNCURSES_STATIC - CFLAGS_DEBUG = $(CCFLAGS) @CC_G_OPT@ -DTRACE - CFLAGS_PROFILE = $(CCFLAGS) -pg - CFLAGS_SHARED = $(CCFLAGS) @CC_SHARED_OPTS@ -diff --git a/include/ncurses_dll.h.in b/include/ncurses_dll.h.in -index f439d480..568112e2 100644 ---- a/include/ncurses_dll.h.in -+++ b/include/ncurses_dll.h.in -@@ -68,50 +68,15 @@ - #define NCURSES_PUBLIC_VAR(name) @NCURSES_WRAP_PREFIX@##name - #define NCURSES_WRAPPED_VAR(type,name) extern type NCURSES_PUBLIC_VAR(name)(void) - --/* no longer needed on cygwin or mingw, thanks to auto-import */ --/* but this structure may be useful at some point for an MSVC build */ --/* so, for now unconditionally define the important flags */ --/* "the right way" for proper static and dll+auto-import behavior */ --#undef NCURSES_DLL --#define NCURSES_STATIC -+#include "ncurses_exports.h" - --#if defined(__CYGWIN__) || defined(_WIN32) --# if defined(NCURSES_DLL) --# if defined(NCURSES_STATIC) --# undef NCURSES_STATIC --# endif --# endif --# undef NCURSES_IMPEXP --# undef NCURSES_API --# undef NCURSES_EXPORT --# undef NCURSES_EXPORT_VAR --# if defined(NCURSES_DLL) --/* building a DLL */ --# define NCURSES_IMPEXP __declspec(dllexport) --# elif defined(NCURSES_STATIC) --/* building or linking to a static library */ --# define NCURSES_IMPEXP /* nothing */ --# else --/* linking to the DLL */ --# define NCURSES_IMPEXP __declspec(dllimport) --# endif --# define NCURSES_API __cdecl --# define NCURSES_EXPORT(type) NCURSES_IMPEXP type NCURSES_API --# define NCURSES_EXPORT_VAR(type) NCURSES_IMPEXP type -+#if defined(BUILDING_NCURSES) -+# define NCURSES_IMPEXP NCURSES_EXPORT_GENERAL_EXPORT -+#else -+# define NCURSES_IMPEXP NCURSES_EXPORT_GENERAL_IMPORT - #endif - --/* Take care of non-cygwin platforms */ --#if !defined(NCURSES_IMPEXP) --# define NCURSES_IMPEXP /* nothing */ --#endif --#if !defined(NCURSES_API) --# define NCURSES_API /* nothing */ --#endif --#if !defined(NCURSES_EXPORT) --# define NCURSES_EXPORT(type) NCURSES_IMPEXP type NCURSES_API --#endif --#if !defined(NCURSES_EXPORT_VAR) --# define NCURSES_EXPORT_VAR(type) NCURSES_IMPEXP type --#endif -+#define NCURSES_EXPORT(type) NCURSES_IMPEXP type NCURSES_API -+#define NCURSES_EXPORT_VAR(type) NCURSES_IMPEXP type - - #endif /* NCURSES_DLL_H_incl */ -diff --git a/include/ncurses_exports.h.in b/include/ncurses_exports.h.in -index 252f5021..61655f65 100644 ---- a/include/ncurses_exports.h.in -+++ b/include/ncurses_exports.h.in -@@ -31,17 +31,18 @@ - #define NCURSES_EXPORTS_H_incl 1 - - #if defined(__CYGWIN__) || defined(_WIN32) --# if defined(NCURSES_DLL) --# define NCURSES_EXPORT __declspec(dllexport) --# elif !defined(NCURSES_STATIC) --# define NCURSES_EXPORT __declspec(dllimport) --# else --# define NCURSES_EXPORT --# endif --#endif -- --#if !defined(NCURSES_EXPORT) --# define NCURSES_EXPORT @NCURSES_EXPORT@ -+# if defined(NCURSES_STATIC) -+# define NCURSES_EXPORT_GENERAL_IMPORT -+# define NCURSES_EXPORT_GENERAL_EXPORT -+# else -+# define NCURSES_EXPORT_GENERAL_IMPORT __declspec(dllimport) -+# define NCURSES_EXPORT_GENERAL_EXPORT __declspec(dllexport) -+# endif -+# define NCURSES_API __cdecl -+#else -+# define NCURSES_EXPORT_GENERAL_IMPORT -+# define NCURSES_EXPORT_GENERAL_EXPORT -+# define NCURSES_API /* FIXME: __attribute__ ((cdecl)) is only available on x86 */ - #endif - - #endif /* NCURSES_EXPORTS_H_incl */ -diff --git a/menu/Makefile.in b/menu/Makefile.in -index 495651c2..bf153602 100644 ---- a/menu/Makefile.in -+++ b/menu/Makefile.in -@@ -92,12 +92,12 @@ CC = @CC@ - CPP = @CPP@ - CFLAGS = @CFLAGS@ - --CPPFLAGS = -I${top_srcdir}/ncurses -DHAVE_CONFIG_H @CPPFLAGS@ -+CPPFLAGS = -I${top_srcdir}/ncurses -DHAVE_CONFIG_H @CPPFLAGS@ -DBUILDING_MENU - - CCFLAGS = $(CPPFLAGS) $(CFLAGS) - --CFLAGS_LIBTOOL = $(CCFLAGS) --CFLAGS_NORMAL = $(CCFLAGS) -+CFLAGS_LIBTOOL = $(CCFLAGS) -DNCURSES_STATIC -+CFLAGS_NORMAL = $(CCFLAGS) -DNCURSES_STATIC - CFLAGS_DEBUG = $(CCFLAGS) @CC_G_OPT@ -DTRACE - CFLAGS_PROFILE = $(CCFLAGS) -pg - CFLAGS_SHARED = $(CCFLAGS) @CC_SHARED_OPTS@ -diff --git a/ncurses/Makefile.in b/ncurses/Makefile.in -index b2420788..00129d0b 100644 ---- a/ncurses/Makefile.in -+++ b/ncurses/Makefile.in -@@ -102,11 +102,11 @@ CPP = @CPP@ - CFLAGS = @CFLAGS@ - - INCDIR = $(srcdir)/../include --CPPFLAGS = -DHAVE_CONFIG_H -I../ncurses @CPPFLAGS@ -+CPPFLAGS = -DHAVE_CONFIG_H -DBUILDING_NCURSES -I../ncurses @CPPFLAGS@ - - CCFLAGS = $(CPPFLAGS) $(CFLAGS) - --BUILD_CPPFLAGS = -DHAVE_CONFIG_H -DUSE_BUILD_CC -I../ncurses -I$(srcdir) -I../include -I$(INCDIR) @BUILD_CPPFLAGS@ -+BUILD_CPPFLAGS = -DHAVE_CONFIG_H -DUSE_BUILD_CC -I../ncurses -I$(srcdir) -I../include -I$(INCDIR) @BUILD_CPPFLAGS@ - BUILD_CC = @BUILD_CC@ - BUILD_CCFLAGS = @BUILD_CFLAGS@ - BUILD_LDFLAGS = @BUILD_LDFLAGS@ -@@ -118,8 +118,8 @@ BUILD_LIBS = @BUILD_LIBS@ - BUILD_EXEEXT = @BUILD_EXEEXT@ - x = @EXEEXT@ - --CFLAGS_LIBTOOL = $(CCFLAGS) --CFLAGS_NORMAL = $(CCFLAGS) -+CFLAGS_LIBTOOL = $(CCFLAGS) -DNCURSES_STATIC -+CFLAGS_NORMAL = $(CCFLAGS) -DNCURSES_STATIC - CFLAGS_DEBUG = $(CCFLAGS) @CC_G_OPT@ -DTRACE - CFLAGS_PROFILE = $(CCFLAGS) -pg - CFLAGS_SHARED = $(CCFLAGS) @CC_SHARED_OPTS@ -diff --git a/panel/Makefile.in b/panel/Makefile.in -index 5f7b5b92..e1f7e705 100644 ---- a/panel/Makefile.in -+++ b/panel/Makefile.in -@@ -94,12 +94,12 @@ CC = @CC@ - CPP = @CPP@ - CFLAGS = @CFLAGS@ - --CPPFLAGS = -I${top_srcdir}/ncurses -DHAVE_CONFIG_H @CPPFLAGS@ -+CPPFLAGS = -I${top_srcdir}/ncurses -DHAVE_CONFIG_H @CPPFLAGS@ -DBUILDING_PANEL - - CCFLAGS = $(CPPFLAGS) $(CFLAGS) - --CFLAGS_LIBTOOL = $(CCFLAGS) --CFLAGS_NORMAL = $(CCFLAGS) -+CFLAGS_LIBTOOL = $(CCFLAGS) -DNCURSES_STATIC -+CFLAGS_NORMAL = $(CCFLAGS) -DNCURSES_STATIC - CFLAGS_DEBUG = $(CCFLAGS) @CC_G_OPT@ -DTRACE - CFLAGS_PROFILE = $(CCFLAGS) -pg - CFLAGS_SHARED = $(CCFLAGS) @CC_SHARED_OPTS@ ---- a/progs/Makefile.in -+++ b/progs/Makefile.in -@@ -97,8 +97,8 @@ - - CCFLAGS = $(CPPFLAGS) $(CFLAGS) - --CFLAGS_LIBTOOL = $(CCFLAGS) --CFLAGS_NORMAL = $(CCFLAGS) -+CFLAGS_LIBTOOL = $(CCFLAGS) -DNCURSES_STATIC -+CFLAGS_NORMAL = $(CCFLAGS) -DNCURSES_STATIC - CFLAGS_DEBUG = $(CCFLAGS) @CC_G_OPT@ -DTRACE - CFLAGS_PROFILE = $(CCFLAGS) -pg - CFLAGS_SHARED = $(CCFLAGS) @CC_SHARED_OPTS@ diff --git a/recipes/ncurses/all/patches/6.2.0-0011-Let-each-sublibrary-do-its-own-import-exporting.patch b/recipes/ncurses/all/patches/6.2.0-0011-Let-each-sublibrary-do-its-own-import-exporting.patch deleted file mode 100644 index 38de8ccbe5b84..0000000000000 --- a/recipes/ncurses/all/patches/6.2.0-0011-Let-each-sublibrary-do-its-own-import-exporting.patch +++ /dev/null @@ -1,3326 +0,0 @@ -Upstreamed in 04d942c3d98cf0a929c6afb17be8c10d4ae39af0 - -ncurses 6.2 - patch 20200704 - -d61c3c6a ("ncurses 6.2 - patch 20200711", 2020-07-12) - ---- ncurses/win32con/wcwidth.c -+++ ncurses/win32con/wcwidth.c -@@ -36,10 +36,10 @@ MODULE_ID("$Id: wcwidth.c,v 1.3 2020/02/02 23:34:34 tom Exp $") - #define mk_wcwidth_cjk(ucs) _nc_wcwidth_cjk(ucs) - #define mk_wcswidth_cjk(pwcs, n) _nc_wcswidth_cjk(pwcs, n) - --extern int mk_wcwidth(wchar_t); --extern int mk_wcswidth(const wchar_t *, size_t); --extern int mk_wcwidth_cjk(wchar_t); --extern int mk_wcswidth_cjk(const wchar_t *, size_t); -+NCURSES_EXPORT(int) mk_wcwidth(wchar_t); -+NCURSES_EXPORT(int) mk_wcswidth(const wchar_t *, size_t); -+NCURSES_EXPORT(int) mk_wcwidth_cjk(wchar_t); -+NCURSES_EXPORT(int) mk_wcswidth_cjk(const wchar_t *, size_t); - - #include - #else ---- ncurses/wcwidth.h -+++ ncurses/wcwidth.h -@@ -119,7 +119,7 @@ - * in ISO 10646. - */ - --int mk_wcwidth(wchar_t ucs) -+NCURSES_EXPORT(int) mk_wcwidth(wchar_t ucs) - { - /* sorted list of non-overlapping intervals of non-spacing characters */ - /* generated by "uniset +cat=Me +cat=Mn +cat=Cf -00AD +1160-11FF +200B c" */ -@@ -207,7 +207,7 @@ int mk_wcwidth(wchar_t ucs) - } - - --int mk_wcswidth(const wchar_t *pwcs, size_t n) -+NCURSES_EXPORT(int) mk_wcswidth(const wchar_t *pwcs, size_t n) - { - int w, width = 0; - -@@ -230,7 +230,7 @@ int mk_wcswidth(const wchar_t *pwcs, size_t n) - * the traditional terminal character-width behaviour. It is not - * otherwise recommended for general use. - */ --int mk_wcwidth_cjk(wchar_t ucs) -+NCURSES_EXPORT(int) mk_wcwidth_cjk(wchar_t ucs) - { - /* sorted list of non-overlapping intervals of East Asian Ambiguous - * characters, generated by "uniset +WIDTH-A -cat=Me -cat=Mn -cat=Cf c" */ -@@ -298,7 +298,7 @@ int mk_wcwidth_cjk(wchar_t ucs) - } - - --int mk_wcswidth_cjk(const wchar_t *pwcs, size_t n) -+NCURSES_EXPORT(int) mk_wcswidth_cjk(const wchar_t *pwcs, size_t n) - { - int w, width = 0; - -diff --git a/c++/cursesapp.h b/c++/cursesapp.h -index a09a3b63..e423089c 100644 ---- a/c++/cursesapp.h -+++ b/c++/cursesapp.h -@@ -39,7 +39,7 @@ - - #include - --class NCURSES_IMPEXP NCursesApplication { -+class NCURSES_CXX_IMPEXP NCursesApplication { - public: - typedef struct _slk_link { // This structure is used to maintain - struct _slk_link* prev; // a stack of SLKs -diff --git a/c++/cursesf.h b/c++/cursesf.h -index 17d4c70e..1e90c360 100644 ---- a/c++/cursesf.h -+++ b/c++/cursesf.h -@@ -51,11 +51,11 @@ extern "C" { - // The abstract base class for builtin and user defined Fieldtypes. - // ------------------------------------------------------------------------- - // --class NCURSES_IMPEXP NCursesFormField; // forward declaration -+class NCURSES_CXX_IMPEXP NCursesFormField; // forward declaration - - // Class to represent builtin field types as well as C++ written new - // fieldtypes (see classes UserDefineFieldType... --class NCURSES_IMPEXP NCursesFieldType -+class NCURSES_CXX_IMPEXP NCursesFieldType - { - friend class NCursesFormField; - -@@ -101,7 +101,7 @@ public: - // The class representing a forms field, wrapping the lowlevel FIELD struct - // ------------------------------------------------------------------------- - // --class NCURSES_IMPEXP NCursesFormField -+class NCURSES_CXX_IMPEXP NCursesFormField - { - friend class NCursesForm; - -@@ -338,7 +338,7 @@ extern "C" { - // The class representing a form, wrapping the lowlevel FORM struct - // ------------------------------------------------------------------------- - // --class NCURSES_IMPEXP NCursesForm : public NCursesPanel -+class NCURSES_CXX_IMPEXP NCursesForm : public NCursesPanel - { - protected: - FORM* form; // the lowlevel structure -@@ -629,7 +629,7 @@ public: - // data belongs to some class T. Use T as template argument - // to create a UserField. - // ------------------------------------------------------------------------- --template class NCURSES_IMPEXP NCursesUserField : public NCursesFormField -+template class NCURSES_CXX_IMPEXP NCursesUserField : public NCursesFormField - { - public: - NCursesUserField (int rows, -@@ -662,7 +662,7 @@ public: - // The same mechanism is used to attach user data to a form - // ------------------------------------------------------------------------- - // --template class NCURSES_IMPEXP NCursesUserForm : public NCursesForm -+template class NCURSES_CXX_IMPEXP NCursesUserForm : public NCursesForm - { - protected: - // 'Internal' constructor, builds an object without association to a -@@ -721,7 +721,7 @@ public: - // Builtin Fieldtypes - // ------------------------------------------------------------------------- - // --class NCURSES_IMPEXP Alpha_Field : public NCursesFieldType -+class NCURSES_CXX_IMPEXP Alpha_Field : public NCursesFieldType - { - private: - int min_field_width; -@@ -737,7 +737,7 @@ public: - } - }; - --class NCURSES_IMPEXP Alphanumeric_Field : public NCursesFieldType -+class NCURSES_CXX_IMPEXP Alphanumeric_Field : public NCursesFieldType - { - private: - int min_field_width; -@@ -753,7 +753,7 @@ public: - } - }; - --class NCURSES_IMPEXP Integer_Field : public NCursesFieldType -+class NCURSES_CXX_IMPEXP Integer_Field : public NCursesFieldType - { - private: - int precision; -@@ -771,7 +771,7 @@ public: - } - }; - --class NCURSES_IMPEXP Numeric_Field : public NCursesFieldType -+class NCURSES_CXX_IMPEXP Numeric_Field : public NCursesFieldType - { - private: - int precision; -@@ -789,7 +789,7 @@ public: - } - }; - --class NCURSES_IMPEXP Regular_Expression_Field : public NCursesFieldType -+class NCURSES_CXX_IMPEXP Regular_Expression_Field : public NCursesFieldType - { - private: - char* regex; -@@ -834,7 +834,7 @@ public: - } - }; - --class NCURSES_IMPEXP Enumeration_Field : public NCursesFieldType -+class NCURSES_CXX_IMPEXP Enumeration_Field : public NCursesFieldType - { - private: - const char** list; -@@ -873,7 +873,7 @@ public: - } - }; - --class NCURSES_IMPEXP IPV4_Address_Field : public NCursesFieldType -+class NCURSES_CXX_IMPEXP IPV4_Address_Field : public NCursesFieldType - { - private: - void set(NCursesFormField& f) { -@@ -896,7 +896,7 @@ extern "C" { - // Abstract base class for User-Defined Fieldtypes - // ------------------------------------------------------------------------- - // --class NCURSES_IMPEXP UserDefinedFieldType : public NCursesFieldType -+class NCURSES_CXX_IMPEXP UserDefinedFieldType : public NCursesFieldType - { - friend class UDF_Init; // Internal helper to set up statics - private: -@@ -939,7 +939,7 @@ extern "C" { - // Abstract base class for User-Defined Fieldtypes with Choice functions - // ------------------------------------------------------------------------- - // --class NCURSES_IMPEXP UserDefinedFieldType_With_Choice : public UserDefinedFieldType -+class NCURSES_CXX_IMPEXP UserDefinedFieldType_With_Choice : public UserDefinedFieldType - { - friend class UDF_Init; // Internal helper to set up statics - private: -diff --git a/c++/cursesm.h b/c++/cursesm.h -index 413da764..0eab3861 100644 ---- a/c++/cursesm.h -+++ b/c++/cursesm.h -@@ -47,7 +47,7 @@ extern "C" { - // This wraps the ITEM type of - // ------------------------------------------------------------------------- - // --class NCURSES_IMPEXP NCursesMenuItem -+class NCURSES_CXX_IMPEXP NCursesMenuItem - { - friend class NCursesMenu; - -@@ -153,7 +153,7 @@ typedef bool ITEMCALLBACK(NCursesMenuItem&); - // If you don't like to create a child class for individual items to - // overload action(), you may use this class and provide a callback - // function pointer for items. --class NCURSES_IMPEXP NCursesMenuCallbackItem : public NCursesMenuItem -+class NCURSES_CXX_IMPEXP NCursesMenuCallbackItem : public NCursesMenuItem - { - private: - ITEMCALLBACK* p_fct; -@@ -200,7 +200,7 @@ extern "C" { - // This wraps the MENU type of - // ------------------------------------------------------------------------- - // --class NCURSES_IMPEXP NCursesMenu : public NCursesPanel -+class NCURSES_CXX_IMPEXP NCursesMenu : public NCursesPanel - { - protected: - MENU *menu; -@@ -596,7 +596,7 @@ public: - // to create a UserItem. - // ------------------------------------------------------------------------- - // --template class NCURSES_IMPEXP NCursesUserItem : public NCursesMenuItem -+template class NCURSES_CXX_IMPEXP NCursesUserItem : public NCursesMenuItem - { - public: - NCursesUserItem (const char* p_name, -@@ -623,7 +623,7 @@ public: - // The same mechanism is used to attach user data to a menu - // ------------------------------------------------------------------------- - // --template class NCURSES_IMPEXP NCursesUserMenu : public NCursesMenu -+template class NCURSES_CXX_IMPEXP NCursesUserMenu : public NCursesMenu - { - protected: - NCursesUserMenu( int nlines, -diff --git a/c++/cursesp.h b/c++/cursesp.h -index d1eea968..af97b022 100644 ---- a/c++/cursesmain.cc -+++ b/c++/cursesmain.cc -@@ -60,7 +60,7 @@ MODULE_ID("$Id: cursesmain.cc,v 1.18 2020/04/04 23:25:34 tom Exp $") - * You only have to instantiate a static NCursesApplication object in your - * main application source file and link this module with your application. - */ --int main(int argc, char* argv[]) -+NCURSES_CXX_IMPEXP int main(int argc, char* argv[]) - { - setlocale(LC_ALL, ""); - ---- a/c++/cursesp.h -+++ b/c++/cursesp.h -@@ -43,7 +43,7 @@ extern "C" { - # include - } - --class NCURSES_IMPEXP NCursesPanel -+class NCURSES_CXX_IMPEXP NCursesPanel - : public NCursesWindow - { - protected: -diff --git a/c++/cursesw.h b/c++/cursesw.h -index 10a2da7e..62721495 100644 ---- a/c++/cursesw.h -+++ b/c++/cursesw.h -@@ -38,6 +38,19 @@ extern "C" { - # include - } - -+#include "ncurses_exports.h" -+ -+#if defined(BUILDING_NCURSES_CXX) -+# define NCURSES_CXX_IMPEXP NCURSES_EXPORT_GENERAL_EXPORT -+#else -+# define NCURSES_CXX_IMPEXP NCURSES_EXPORT_GENERAL_IMPORT -+#endif -+ -+#define NCURSES_CXX_WRAPPED_VAR(type,name) extern NCURSES_CXX_IMPEXP type NCURSES_PUBLIC_VAR(name)(void) -+ -+#define NCURSES_CXX_EXPORT(type) NCURSES_CXX_IMPEXP type NCURSES_API -+#define NCURSES_CXX_EXPORT_VAR(type) NCURSES_CXX_IMPEXP type -+ - #include - - /* SCO 3.2v4 curses.h includes term.h, which defines lines as a macro. -@@ -757,7 +770,7 @@ extern "C" int _nc_ripoffline(int, int (*init)(WINDOW*, int)); - extern "C" int _nc_xx_ripoff_init(WINDOW *, int); - extern "C" int _nc_has_mouse(void); - --class NCURSES_IMPEXP NCursesWindow -+class NCURSES_CXX_IMPEXP NCursesWindow - { - friend class NCursesMenu; - friend class NCursesForm; -@@ -1371,7 +1384,7 @@ public: - // ------------------------------------------------------------------------- - // We leave this here for compatibility reasons. - // ------------------------------------------------------------------------- --class NCURSES_IMPEXP NCursesColorWindow : public NCursesWindow -+class NCURSES_CXX_IMPEXP NCursesColorWindow : public NCursesWindow - { - public: - NCursesColorWindow(WINDOW* &window) // useful only for stdscr -@@ -1417,7 +1430,7 @@ public: - // Pad Support. We allow an association of a pad with a "real" window - // through which the pad may be viewed. - // ------------------------------------------------------------------------- --class NCURSES_IMPEXP NCursesPad : public NCursesWindow -+class NCURSES_CXX_IMPEXP NCursesPad : public NCursesWindow - { - private: - NCursesWindow* viewWin; // the "viewport" window -@@ -1533,7 +1546,7 @@ public: - // A FramedPad is constructed always with a viewport window. This viewport - // will be framed (by a box() command) and the interior of the box is the - // viewport subwindow. On the frame we display scrollbar sliders. --class NCURSES_IMPEXP NCursesFramedPad : public NCursesPad -+class NCURSES_CXX_IMPEXP NCursesFramedPad : public NCursesPad - { - protected: - virtual void OnOperation(int pad_req); -diff --git a/c++/cursslk.h b/c++/cursslk.h -index 10364c1d..d69f27d5 100644 ---- a/c++/cursslk.h -+++ b/c++/cursslk.h -@@ -39,10 +39,10 @@ - - #include - --class NCURSES_IMPEXP Soft_Label_Key_Set { -+class NCURSES_CXX_IMPEXP Soft_Label_Key_Set { - public: - // This inner class represents the attributes of a Soft Label Key (SLK) -- class NCURSES_IMPEXP Soft_Label_Key { -+ class NCURSES_CXX_IMPEXP Soft_Label_Key { - friend class Soft_Label_Key_Set; - public: - typedef enum { Left=0, Center=1, Right=2 } Justification; -diff --git a/c++/demo.cc b/c++/demo.cc -index 2b5451a4..b5480808 100644 ---- a/c++/demo.cc -+++ b/c++/demo.cc -@@ -187,7 +187,7 @@ public: - }; - - template class MyAction; --template class NCURSES_IMPEXP NCursesUserItem; -+template class NCURSES_CXX_IMPEXP NCursesUserItem; - - class QuitItem : public NCursesMenuItem - { -diff --git a/c++/etip.h.in b/c++/etip.h.in -index 1155c5fd..65a5b450 100644 ---- a/c++/etip.h.in -+++ b/c++/etip.h.in -@@ -140,11 +140,11 @@ extern "C" { - #endif - - // Forward Declarations --class NCURSES_IMPEXP NCursesPanel; --class NCURSES_IMPEXP NCursesMenu; --class NCURSES_IMPEXP NCursesForm; -+class NCURSES_CXX_IMPEXP NCursesPanel; -+class NCURSES_CXX_IMPEXP NCursesMenu; -+class NCURSES_CXX_IMPEXP NCursesForm; - --class NCURSES_IMPEXP NCursesException -+class NCURSES_CXX_IMPEXP NCursesException - { - public: - const char *message; -@@ -178,7 +178,7 @@ public: - } - }; - --class NCURSES_IMPEXP NCursesPanelException : public NCursesException -+class NCURSES_CXX_IMPEXP NCursesPanelException : public NCursesException - { - public: - const NCursesPanel* p; -@@ -229,7 +229,7 @@ public: - } - }; - --class NCURSES_IMPEXP NCursesMenuException : public NCursesException -+class NCURSES_CXX_IMPEXP NCursesMenuException : public NCursesException - { - public: - const NCursesMenu* m; -@@ -280,7 +280,7 @@ public: - } - }; - --class NCURSES_IMPEXP NCursesFormException : public NCursesException -+class NCURSES_CXX_IMPEXP NCursesFormException : public NCursesException - { - public: - const NCursesForm* f; -diff --git a/form/f_trace.c b/form/f_trace.c -index d24708ce..6efc5225 100644 ---- a/form/f_trace.c -+++ b/form/f_trace.c -@@ -35,35 +35,35 @@ - - MODULE_ID("$Id: f_trace.c,v 1.5 2020/02/02 23:34:34 tom Exp $") - --NCURSES_EXPORT(FIELD **) -+FORM_EXPORT(FIELD **) - _nc_retrace_field_ptr(FIELD **code) - { - T((T_RETURN("%p"), (void *)code)); - return code; - } - --NCURSES_EXPORT(FIELD *) -+FORM_EXPORT(FIELD *) - _nc_retrace_field(FIELD *code) - { - T((T_RETURN("%p"), (void *)code)); - return code; - } - --NCURSES_EXPORT(FIELDTYPE *) -+FORM_EXPORT(FIELDTYPE *) - _nc_retrace_field_type(FIELDTYPE *code) - { - T((T_RETURN("%p"), (void *)code)); - return code; - } - --NCURSES_EXPORT(FORM *) -+FORM_EXPORT(FORM *) - _nc_retrace_form(FORM *code) - { - T((T_RETURN("%p"), (void *)code)); - return code; - } - --NCURSES_EXPORT(Form_Hook) -+FORM_EXPORT(Form_Hook) - _nc_retrace_form_hook(Form_Hook code) - { - TR_FUNC_BFR(1); -diff --git a/form/fld_arg.c b/form/fld_arg.c -index e7555f65..852cd6a8 100644 ---- a/form/fld_arg.c -+++ b/form/fld_arg.c -@@ -61,7 +61,7 @@ MODULE_ID("$Id: fld_arg.c,v 1.16 2020/02/02 23:34:34 tom Exp $") - | Return Values : E_OK - success - | E_BAD_ARGUMENT - invalid argument - +--------------------------------------------------------------------------*/ --NCURSES_EXPORT(int) -+FORM_EXPORT(int) - set_fieldtype_arg(FIELDTYPE *typ, - void *(*const make_arg)(va_list *), - void *(*const copy_arg)(const void *), -@@ -94,7 +94,7 @@ set_fieldtype_arg(FIELDTYPE *typ, - | - | Return Values : Pointer to structure or NULL if none is defined. - +--------------------------------------------------------------------------*/ --NCURSES_EXPORT(void *) -+FORM_EXPORT(void *) - field_arg(const FIELD *field) - { - T((T_CALLED("field_arg(%p)"), (const void *)field)); -diff --git a/form/fld_attr.c b/form/fld_attr.c -index 50e2c73d..c974f72d 100644 ---- a/form/fld_attr.c -+++ b/form/fld_attr.c -@@ -40,7 +40,7 @@ MODULE_ID("$Id: fld_attr.c,v 1.13 2020/02/02 23:34:34 tom Exp $") - --------------------------------------------------------------------------*/ - /* "Template" macro to generate a function to set a fields attribute */ - #define GEN_FIELD_ATTR_SET_FCT( name ) \ --NCURSES_IMPEXP int NCURSES_API set_field_ ## name (FIELD * field, chtype attr)\ -+FORM_IMPEXP int NCURSES_API set_field_ ## name (FIELD * field, chtype attr)\ - {\ - int res = E_BAD_ARGUMENT;\ - T((T_CALLED("set_field_" #name "(%p,%s)"), (void *)field, _traceattr(attr)));\ -@@ -65,7 +65,7 @@ NCURSES_IMPEXP int NCURSES_API set_field_ ## name (FIELD * field, chtype attr)\ - - /* "Template" macro to generate a function to get a fields attribute */ - #define GEN_FIELD_ATTR_GET_FCT( name ) \ --NCURSES_IMPEXP chtype NCURSES_API field_ ## name (const FIELD * field)\ -+FORM_IMPEXP chtype NCURSES_API field_ ## name (const FIELD * field)\ - {\ - T((T_CALLED("field_" #name "(%p)"), (const void *) field));\ - returnAttr( A_ATTRIBUTES & (Normalize_Field( field ) -> name) );\ -diff --git a/form/fld_current.c b/form/fld_current.c -index 75e68edd..14e80e34 100644 ---- a/form/fld_current.c -+++ b/form/fld_current.c -@@ -48,7 +48,7 @@ MODULE_ID("$Id: fld_current.c,v 1.15 2020/02/02 23:34:34 tom Exp $") - | E_INVALID_FIELD - current field can't be left - | E_SYSTEM_ERROR - system error - +--------------------------------------------------------------------------*/ --NCURSES_EXPORT(int) -+FORM_EXPORT(int) - set_current_field(FORM *form, FIELD *field) - { - int err = E_OK; -@@ -113,7 +113,7 @@ set_current_field(FORM *form, FIELD *field) - | E_BAD_ARGUMENT - invalid form pointer - | E_REQUEST_DENIED - there is no current field to unfocus - +--------------------------------------------------------------------------*/ --NCURSES_EXPORT(int) -+FORM_EXPORT(int) - unfocus_current_field(FORM *const form) - { - T((T_CALLED("unfocus_current_field(%p)"), (const void *)form)); -@@ -137,7 +137,7 @@ unfocus_current_field(FORM *const form) - | - | Return Values : Pointer to the current field. - +--------------------------------------------------------------------------*/ --NCURSES_EXPORT(FIELD *) -+FORM_EXPORT(FIELD *) - current_field(const FORM *form) - { - T((T_CALLED("current_field(%p)"), (const void *)form)); -@@ -154,7 +154,7 @@ current_field(const FORM *form) - | Return Values : >= 0 : field index - | -1 : fieldpointer invalid or field not connected - +--------------------------------------------------------------------------*/ --NCURSES_EXPORT(int) -+FORM_EXPORT(int) - field_index(const FIELD *field) - { - T((T_CALLED("field_index(%p)"), (const void *)field)); -diff --git a/form/fld_def.c b/form/fld_def.c -index e529b3c0..a9d2abf7 100644 ---- a/form/fld_def.c -+++ b/form/fld_def.c -@@ -66,7 +66,7 @@ static FIELD default_field = - NCURSES_FIELD_EXTENSION - }; - --NCURSES_EXPORT_VAR(FIELD *) _nc_Default_Field = &default_field; -+FORM_EXPORT_VAR(FIELD *) _nc_Default_Field = &default_field; - - /*--------------------------------------------------------------------------- - | Facility : libnform -@@ -82,7 +82,7 @@ NCURSES_EXPORT_VAR(FIELD *) _nc_Default_Field = &default_field; - | Return Values : Pointer to argument structure. Maybe NULL. - | In case of an error in *err an error counter is increased. - +--------------------------------------------------------------------------*/ --NCURSES_EXPORT(TypeArgument *) -+FORM_EXPORT(TypeArgument *) - _nc_Make_Argument(const FIELDTYPE *typ, va_list *ap, int *err) - { - TypeArgument *res = (TypeArgument *)0; -@@ -130,7 +130,7 @@ _nc_Make_Argument(const FIELDTYPE *typ, va_list *ap, int *err) - | Return Values : Pointer to argument structure. Maybe NULL. - | In case of an error in *err an error counter is increased. - +--------------------------------------------------------------------------*/ --NCURSES_EXPORT(TypeArgument *) -+FORM_EXPORT(TypeArgument *) - _nc_Copy_Argument(const FIELDTYPE *typ, const TypeArgument *argp, int *err) - { - TypeArgument *res = (TypeArgument *)0; -@@ -179,7 +179,7 @@ _nc_Copy_Argument(const FIELDTYPE *typ, const TypeArgument *argp, int *err) - | - | Return Values : - - +--------------------------------------------------------------------------*/ --NCURSES_EXPORT(void) -+FORM_EXPORT(void) - _nc_Free_Argument(const FIELDTYPE *typ, TypeArgument *argp) - { - if (typ != 0 && (typ->status & _HAS_ARGS) != 0) -@@ -212,7 +212,7 @@ _nc_Free_Argument(const FIELDTYPE *typ, TypeArgument *argp) - | Return Values : TRUE - copy worked - | FALSE - error occurred - +--------------------------------------------------------------------------*/ --NCURSES_EXPORT(bool) -+FORM_EXPORT(bool) - _nc_Copy_Type(FIELD *dst, FIELD const *src) - { - int err = 0; -@@ -247,7 +247,7 @@ _nc_Copy_Type(FIELD *dst, FIELD const *src) - | - | Return Values : - - +--------------------------------------------------------------------------*/ --NCURSES_EXPORT(void) -+FORM_EXPORT(void) - _nc_Free_Type(FIELD *field) - { - assert(field != 0); -@@ -274,7 +274,7 @@ _nc_Free_Type(FIELD *field) - | - | Return Values : Pointer to the new field or NULL if failure. - +--------------------------------------------------------------------------*/ --NCURSES_EXPORT(FIELD *) -+FORM_EXPORT(FIELD *) - new_field(int rows, int cols, int frow, int fcol, int nrow, int nbuf) - { - static const FIELD_CELL blank = BLANK; -@@ -354,7 +354,7 @@ new_field(int rows, int cols, int frow, int fcol, int nrow, int nbuf) - | E_BAD_ARGUMENT - invalid field pointer - | E_CONNECTED - field is connected - +--------------------------------------------------------------------------*/ --NCURSES_EXPORT(int) -+FORM_EXPORT(int) - free_field(FIELD *field) - { - T((T_CALLED("free_field(%p)"), (void *)field)); -diff --git a/form/fld_dup.c b/form/fld_dup.c -index 9859a09f..08356b13 100644 ---- a/form/fld_dup.c -+++ b/form/fld_dup.c -@@ -48,7 +48,7 @@ MODULE_ID("$Id: fld_dup.c,v 1.15 2020/02/02 23:34:34 tom Exp $") - | - | Return Values : Pointer to the new field or NULL if failure - +--------------------------------------------------------------------------*/ --NCURSES_EXPORT(FIELD *) -+FORM_EXPORT(FIELD *) - dup_field(FIELD *field, int frow, int fcol) - { - FIELD *New_Field = (FIELD *)0; -diff --git a/form/fld_ftchoice.c b/form/fld_ftchoice.c -index 5dc5f4a9..4119e76e 100644 ---- a/form/fld_ftchoice.c -+++ b/form/fld_ftchoice.c -@@ -47,7 +47,7 @@ MODULE_ID("$Id: fld_ftchoice.c,v 1.16 2020/02/02 23:34:34 tom Exp $") - | Return Values : E_OK - success - | E_BAD_ARGUMENT - invalid arguments - +--------------------------------------------------------------------------*/ --NCURSES_EXPORT(int) -+FORM_EXPORT(int) - set_fieldtype_choice(FIELDTYPE *typ, - bool (*const next_choice) (FIELD *, const void *), - bool (*const prev_choice) (FIELD *, const void *)) -diff --git a/form/fld_ftlink.c b/form/fld_ftlink.c -index afa488b3..23bf0912 100644 ---- a/form/fld_ftlink.c -+++ b/form/fld_ftlink.c -@@ -49,7 +49,7 @@ MODULE_ID("$Id: fld_ftlink.c,v 1.16 2020/02/02 23:34:34 tom Exp $") - | - | Return Values : Fieldtype pointer or NULL if error occurred. - +--------------------------------------------------------------------------*/ --NCURSES_EXPORT(FIELDTYPE *) -+FORM_EXPORT(FIELDTYPE *) - link_fieldtype(FIELDTYPE *type1, FIELDTYPE *type2) - { - FIELDTYPE *nftyp = (FIELDTYPE *)0; -diff --git a/form/fld_info.c b/form/fld_info.c -index 9963b5b3..34defdea 100644 ---- a/form/fld_info.c -+++ b/form/fld_info.c -@@ -47,7 +47,7 @@ MODULE_ID("$Id: fld_info.c,v 1.12 2020/02/02 23:34:34 tom Exp $") - | Return Values : E_OK - success - | E_BAD_ARGUMENT - invalid field pointer - +--------------------------------------------------------------------------*/ --NCURSES_EXPORT(int) -+FORM_EXPORT(int) - field_info(const FIELD *field, - int *rows, int *cols, - int *frow, int *fcol, -@@ -89,7 +89,7 @@ field_info(const FIELD *field, - | Return Values : E_OK - success - | E_BAD_ARGUMENT - invalid argument - +--------------------------------------------------------------------------*/ --NCURSES_EXPORT(int) -+FORM_EXPORT(int) - dynamic_field_info(const FIELD *field, int *drows, int *dcols, int *maxgrow) - { - T((T_CALLED("dynamic_field_info(%p,%p,%p,%p)"), -diff --git a/form/fld_just.c b/form/fld_just.c -index 8097019d..f15cdcaa 100644 ---- a/form/fld_just.c -+++ b/form/fld_just.c -@@ -45,7 +45,7 @@ MODULE_ID("$Id: fld_just.c,v 1.14 2020/02/02 23:34:34 tom Exp $") - | E_BAD_ARGUMENT - one of the arguments was incorrect - | E_SYSTEM_ERROR - system error - +--------------------------------------------------------------------------*/ --NCURSES_EXPORT(int) -+FORM_EXPORT(int) - set_field_just(FIELD *field, int just) - { - int res = E_BAD_ARGUMENT; -@@ -77,7 +77,7 @@ set_field_just(FIELD *field, int just) - | - | Return Values : The justification type. - +--------------------------------------------------------------------------*/ --NCURSES_EXPORT(int) -+FORM_EXPORT(int) - field_just(const FIELD *field) - { - T((T_CALLED("field_just(%p)"), (const void *)field)); -diff --git a/form/fld_link.c b/form/fld_link.c -index cb67ac07..b6f4ff75 100644 ---- a/form/fld_link.c -+++ b/form/fld_link.c -@@ -49,7 +49,7 @@ MODULE_ID("$Id: fld_link.c,v 1.14 2020/02/02 23:34:34 tom Exp $") - | - | Return Values : Pointer to the new field or NULL if failure - +--------------------------------------------------------------------------*/ --NCURSES_EXPORT(FIELD *) -+FORM_EXPORT(FIELD *) - link_field(FIELD *field, int frow, int fcol) - { - FIELD *New_Field = (FIELD *)0; -diff --git a/form/fld_max.c b/form/fld_max.c -index 7d0e146d..8fb873b5 100644 ---- a/form/fld_max.c -+++ b/form/fld_max.c -@@ -45,7 +45,7 @@ MODULE_ID("$Id: fld_max.c,v 1.16 2020/02/02 23:34:34 tom Exp $") - | Return Values : E_OK - success - | E_BAD_ARGUMENT - invalid argument - +--------------------------------------------------------------------------*/ --NCURSES_EXPORT(int) -+FORM_EXPORT(int) - set_max_field(FIELD *field, int maxgrow) - { - T((T_CALLED("set_max_field(%p,%d)"), (void *)field, maxgrow)); -diff --git a/form/fld_move.c b/form/fld_move.c -index 0d6692f3..245f26c1 100644 ---- a/form/fld_move.c -+++ b/form/fld_move.c -@@ -46,7 +46,7 @@ MODULE_ID("$Id: fld_move.c,v 1.12 2020/02/02 23:34:34 tom Exp $") - | E_BAD_ARGUMENT - invalid argument passed - | E_CONNECTED - field is connected - +--------------------------------------------------------------------------*/ --NCURSES_EXPORT(int) -+FORM_EXPORT(int) - move_field(FIELD *field, int frow, int fcol) - { - T((T_CALLED("move_field(%p,%d,%d)"), (void *)field, frow, fcol)); -diff --git a/form/fld_newftyp.c b/form/fld_newftyp.c -index 18a7c073..53162f33 100644 ---- a/form/fld_newftyp.c -+++ b/form/fld_newftyp.c -@@ -53,7 +53,7 @@ static FIELDTYPE default_fieldtype = - #endif - }; - --NCURSES_EXPORT_VAR(FIELDTYPE *) -+FORM_EXPORT_VAR(FIELDTYPE *) - _nc_Default_FieldType = &default_fieldtype; - - /*--------------------------------------------------------------------------- -@@ -71,7 +71,7 @@ NCURSES_EXPORT_VAR(FIELDTYPE *) - | - | Return Values : Fieldtype pointer or NULL if error occurred - +--------------------------------------------------------------------------*/ --NCURSES_EXPORT(FIELDTYPE *) -+FORM_EXPORT(FIELDTYPE *) - new_fieldtype(bool (*const field_check) (FIELD *, const void *), - bool (*const char_check) (int, const void *)) - { -@@ -121,7 +121,7 @@ new_fieldtype(bool (*const field_check) (FIELD *, const void *), - | E_CONNECTED - there are fields referencing the type - | E_BAD_ARGUMENT - invalid fieldtype pointer - +--------------------------------------------------------------------------*/ --NCURSES_EXPORT(int) -+FORM_EXPORT(int) - free_fieldtype(FIELDTYPE *typ) - { - T((T_CALLED("free_fieldtype(%p)"), (void *)typ)); -diff --git a/form/fld_opts.c b/form/fld_opts.c -index fee5804a..17ab8027 100644 ---- a/form/fld_opts.c -+++ b/form/fld_opts.c -@@ -51,7 +51,7 @@ MODULE_ID("$Id: fld_opts.c,v 1.13 2020/02/02 23:34:34 tom Exp $") - | E_BAD_ARGUMENT - invalid options - | E_SYSTEM_ERROR - system error - +--------------------------------------------------------------------------*/ --NCURSES_EXPORT(int) -+FORM_EXPORT(int) - set_field_opts(FIELD *field, Field_Options opts) - { - int res = E_BAD_ARGUMENT; -@@ -72,7 +72,7 @@ set_field_opts(FIELD *field, Field_Options opts) - | - | Return Values : The options. - +--------------------------------------------------------------------------*/ --NCURSES_EXPORT(Field_Options) -+FORM_EXPORT(Field_Options) - field_opts(const FIELD *field) - { - T((T_CALLED("field_opts(%p)"), (const void *)field)); -@@ -92,7 +92,7 @@ field_opts(const FIELD *field) - | E_BAD_ARGUMENT - invalid options - | E_SYSTEM_ERROR - system error - +--------------------------------------------------------------------------*/ --NCURSES_EXPORT(int) -+FORM_EXPORT(int) - field_opts_on(FIELD *field, Field_Options opts) - { - int res = E_BAD_ARGUMENT; -@@ -120,7 +120,7 @@ field_opts_on(FIELD *field, Field_Options opts) - | E_BAD_ARGUMENT - invalid options - | E_SYSTEM_ERROR - system error - +--------------------------------------------------------------------------*/ --NCURSES_EXPORT(int) -+FORM_EXPORT(int) - field_opts_off(FIELD *field, Field_Options opts) - { - int res = E_BAD_ARGUMENT; -diff --git a/form/fld_pad.c b/form/fld_pad.c -index b6d59e2c..260ec407 100644 ---- a/form/fld_pad.c -+++ b/form/fld_pad.c -@@ -46,7 +46,7 @@ MODULE_ID("$Id: fld_pad.c,v 1.11 2020/02/02 23:34:34 tom Exp $") - | E_BAD_ARGUMENT - invalid field pointer or pad character - | E_SYSTEM_ERROR - system error - +--------------------------------------------------------------------------*/ --NCURSES_EXPORT(int) -+FORM_EXPORT(int) - set_field_pad(FIELD *field, int ch) - { - int res = E_BAD_ARGUMENT; -@@ -75,7 +75,7 @@ set_field_pad(FIELD *field, int ch) - | - | Return Values : The pad character. - +--------------------------------------------------------------------------*/ --NCURSES_EXPORT(int) -+FORM_EXPORT(int) - field_pad(const FIELD *field) - { - T((T_CALLED("field_pad(%p)"), (const void *)field)); -diff --git a/form/fld_page.c b/form/fld_page.c -index c6fb37c8..7310202c 100644 ---- a/form/fld_page.c -+++ b/form/fld_page.c -@@ -45,7 +45,7 @@ MODULE_ID("$Id: fld_page.c,v 1.13 2020/02/02 23:34:34 tom Exp $") - | Return Values : E_OK - success - | E_CONNECTED - field is connected - +--------------------------------------------------------------------------*/ --NCURSES_EXPORT(int) -+FORM_EXPORT(int) - set_new_page(FIELD *field, bool new_page_flag) - { - T((T_CALLED("set_new_page(%p,%d)"), (void *)field, new_page_flag)); -@@ -72,7 +72,7 @@ set_new_page(FIELD *field, bool new_page_flag) - | Return Values : TRUE - field starts a new page - | FALSE - field doesn't start a new page - +--------------------------------------------------------------------------*/ --NCURSES_EXPORT(bool) -+FORM_EXPORT(bool) - new_page(const FIELD *field) - { - T((T_CALLED("new_page(%p)"), (const void *)field)); -diff --git a/form/fld_stat.c b/form/fld_stat.c -index 487a21dc..19000af2 100644 ---- a/form/fld_stat.c -+++ b/form/fld_stat.c -@@ -44,7 +44,7 @@ MODULE_ID("$Id: fld_stat.c,v 1.15 2020/02/02 23:34:34 tom Exp $") - | - | Return Values : E_OK - success - +--------------------------------------------------------------------------*/ --NCURSES_EXPORT(int) -+FORM_EXPORT(int) - set_field_status(FIELD *field, bool status) - { - T((T_CALLED("set_field_status(%p,%d)"), (void *)field, status)); -@@ -69,7 +69,7 @@ set_field_status(FIELD *field, bool status) - | Return Values : TRUE - buffer has been changed - | FALSE - buffer has not been changed - +--------------------------------------------------------------------------*/ --NCURSES_EXPORT(bool) -+FORM_EXPORT(bool) - field_status(const FIELD *field) - { - T((T_CALLED("field_status(%p)"), (const void *)field)); -diff --git a/form/fld_type.c b/form/fld_type.c -index a445fa4d..69ebe4ca 100644 ---- a/form/fld_type.c -+++ b/form/fld_type.c -@@ -46,7 +46,7 @@ MODULE_ID("$Id: fld_type.c,v 1.17 2020/02/02 23:34:34 tom Exp $") - | Return Values : E_OK - success - | E_SYSTEM_ERROR - system error - +--------------------------------------------------------------------------*/ --NCURSES_EXPORT(int) -+FORM_EXPORT(int) - set_field_type(FIELD *field, FIELDTYPE *type,...) - { - va_list ap; -@@ -88,7 +88,7 @@ set_field_type(FIELD *field, FIELDTYPE *type,...) - | - | Return Values : Pointer to fieldtype of NULL if none is defined. - +--------------------------------------------------------------------------*/ --NCURSES_EXPORT(FIELDTYPE *) -+FORM_EXPORT(FIELDTYPE *) - field_type(const FIELD *field) - { - T((T_CALLED("field_type(%p)"), (const void *)field)); -diff --git a/form/fld_user.c b/form/fld_user.c -index 5cd165c8..2deb68e6 100644 ---- a/form/fld_user.c -+++ b/form/fld_user.c -@@ -44,7 +44,7 @@ MODULE_ID("$Id: fld_user.c,v 1.17 2020/02/02 23:34:34 tom Exp $") - | - | Return Values : E_OK - on success - +--------------------------------------------------------------------------*/ --NCURSES_EXPORT(int) -+FORM_EXPORT(int) - set_field_userptr(FIELD *field, void *usrptr) - { - T((T_CALLED("set_field_userptr(%p,%p)"), (void *)field, (void *)usrptr)); -@@ -63,7 +63,7 @@ set_field_userptr(FIELD *field, void *usrptr) - | Return Values : Value of pointer. If no such pointer has been set, - | NULL is returned - +--------------------------------------------------------------------------*/ --NCURSES_EXPORT(void *) -+FORM_EXPORT(void *) - field_userptr(const FIELD *field) - { - T((T_CALLED("field_userptr(%p)"), (const void *)field)); -diff --git a/form/form.h b/form/form.h -index dabe6764..3c584357 100644 ---- a/form/form.h -+++ b/form/form.h -@@ -44,6 +44,19 @@ - extern "C" { - #endif - -+#include "ncurses_exports.h" -+ -+#if defined(BUILDING_FORM) -+# define FORM_IMPEXP NCURSES_EXPORT_GENERAL_EXPORT -+#else -+# define FORM_IMPEXP NCURSES_EXPORT_GENERAL_IMPORT -+#endif -+ -+#define FORM_WRAPPED_VAR(type,name) extern FORM_IMPEXP type NCURSES_PUBLIC_VAR(name)(void) -+ -+#define FORM_EXPORT(type) FORM_IMPEXP type NCURSES_API -+#define FORM_EXPORT_VAR(type) FORM_IMPEXP type -+ - #ifndef FORM_PRIV_H - typedef void *FIELD_CELL; - #endif -@@ -309,136 +322,136 @@ typedef void (*Form_Hook)(FORM *); - /************************* - * standard field types * - *************************/ --extern NCURSES_EXPORT_VAR(FIELDTYPE *) TYPE_ALPHA; --extern NCURSES_EXPORT_VAR(FIELDTYPE *) TYPE_ALNUM; --extern NCURSES_EXPORT_VAR(FIELDTYPE *) TYPE_ENUM; --extern NCURSES_EXPORT_VAR(FIELDTYPE *) TYPE_INTEGER; --extern NCURSES_EXPORT_VAR(FIELDTYPE *) TYPE_NUMERIC; --extern NCURSES_EXPORT_VAR(FIELDTYPE *) TYPE_REGEXP; -+extern FORM_EXPORT_VAR(FIELDTYPE *) TYPE_ALPHA; -+extern FORM_EXPORT_VAR(FIELDTYPE *) TYPE_ALNUM; -+extern FORM_EXPORT_VAR(FIELDTYPE *) TYPE_ENUM; -+extern FORM_EXPORT_VAR(FIELDTYPE *) TYPE_INTEGER; -+extern FORM_EXPORT_VAR(FIELDTYPE *) TYPE_NUMERIC; -+extern FORM_EXPORT_VAR(FIELDTYPE *) TYPE_REGEXP; - - /************************************ - * built-in additional field types * - * They are not defined in SVr4 * - ************************************/ --extern NCURSES_EXPORT_VAR(FIELDTYPE *) TYPE_IPV4; /* Internet IP Version 4 address */ -+extern FORM_EXPORT_VAR(FIELDTYPE *) TYPE_IPV4; /* Internet IP Version 4 address */ - - /*********************** - * FIELDTYPE routines * - ***********************/ --extern NCURSES_EXPORT(FIELDTYPE *) new_fieldtype ( -+extern FORM_EXPORT(FIELDTYPE *) new_fieldtype ( - bool (* const field_check)(FIELD *,const void *), - bool (* const char_check)(int,const void *)); --extern NCURSES_EXPORT(FIELDTYPE *) link_fieldtype( -+extern FORM_EXPORT(FIELDTYPE *) link_fieldtype( - FIELDTYPE *, FIELDTYPE *); - --extern NCURSES_EXPORT(int) free_fieldtype (FIELDTYPE *); --extern NCURSES_EXPORT(int) set_fieldtype_arg (FIELDTYPE *, -+extern FORM_EXPORT(int) free_fieldtype (FIELDTYPE *); -+extern FORM_EXPORT(int) set_fieldtype_arg (FIELDTYPE *, - void * (* const make_arg)(va_list *), - void * (* const copy_arg)(const void *), - void (* const free_arg)(void *)); --extern NCURSES_EXPORT(int) set_fieldtype_choice (FIELDTYPE *, -+extern FORM_EXPORT(int) set_fieldtype_choice (FIELDTYPE *, - bool (* const next_choice)(FIELD *,const void *), - bool (* const prev_choice)(FIELD *,const void *)); - - /******************* - * FIELD routines * - *******************/ --extern NCURSES_EXPORT(FIELD *) new_field (int,int,int,int,int,int); --extern NCURSES_EXPORT(FIELD *) dup_field (FIELD *,int,int); --extern NCURSES_EXPORT(FIELD *) link_field (FIELD *,int,int); -- --extern NCURSES_EXPORT(int) free_field (FIELD *); --extern NCURSES_EXPORT(int) field_info (const FIELD *,int *,int *,int *,int *,int *,int *); --extern NCURSES_EXPORT(int) dynamic_field_info (const FIELD *,int *,int *,int *); --extern NCURSES_EXPORT(int) set_max_field ( FIELD *,int); --extern NCURSES_EXPORT(int) move_field (FIELD *,int,int); --extern NCURSES_EXPORT(int) set_field_type (FIELD *,FIELDTYPE *,...); --extern NCURSES_EXPORT(int) set_new_page (FIELD *,bool); --extern NCURSES_EXPORT(int) set_field_just (FIELD *,int); --extern NCURSES_EXPORT(int) field_just (const FIELD *); --extern NCURSES_EXPORT(int) set_field_fore (FIELD *,chtype); --extern NCURSES_EXPORT(int) set_field_back (FIELD *,chtype); --extern NCURSES_EXPORT(int) set_field_pad (FIELD *,int); --extern NCURSES_EXPORT(int) field_pad (const FIELD *); --extern NCURSES_EXPORT(int) set_field_buffer (FIELD *,int,const char *); --extern NCURSES_EXPORT(int) set_field_status (FIELD *,bool); --extern NCURSES_EXPORT(int) set_field_userptr (FIELD *, void *); --extern NCURSES_EXPORT(int) set_field_opts (FIELD *,Field_Options); --extern NCURSES_EXPORT(int) field_opts_on (FIELD *,Field_Options); --extern NCURSES_EXPORT(int) field_opts_off (FIELD *,Field_Options); -- --extern NCURSES_EXPORT(chtype) field_fore (const FIELD *); --extern NCURSES_EXPORT(chtype) field_back (const FIELD *); -- --extern NCURSES_EXPORT(bool) new_page (const FIELD *); --extern NCURSES_EXPORT(bool) field_status (const FIELD *); -- --extern NCURSES_EXPORT(void *) field_arg (const FIELD *); -- --extern NCURSES_EXPORT(void *) field_userptr (const FIELD *); -- --extern NCURSES_EXPORT(FIELDTYPE *) field_type (const FIELD *); -- --extern NCURSES_EXPORT(char *) field_buffer (const FIELD *,int); -- --extern NCURSES_EXPORT(Field_Options) field_opts (const FIELD *); -+extern FORM_EXPORT(FIELD *) new_field (int,int,int,int,int,int); -+extern FORM_EXPORT(FIELD *) dup_field (FIELD *,int,int); -+extern FORM_EXPORT(FIELD *) link_field (FIELD *,int,int); -+ -+extern FORM_EXPORT(int) free_field (FIELD *); -+extern FORM_EXPORT(int) field_info (const FIELD *,int *,int *,int *,int *,int *,int *); -+extern FORM_EXPORT(int) dynamic_field_info (const FIELD *,int *,int *,int *); -+extern FORM_EXPORT(int) set_max_field ( FIELD *,int); -+extern FORM_EXPORT(int) move_field (FIELD *,int,int); -+extern FORM_EXPORT(int) set_field_type (FIELD *,FIELDTYPE *,...); -+extern FORM_EXPORT(int) set_new_page (FIELD *,bool); -+extern FORM_EXPORT(int) set_field_just (FIELD *,int); -+extern FORM_EXPORT(int) field_just (const FIELD *); -+extern FORM_EXPORT(int) set_field_fore (FIELD *,chtype); -+extern FORM_EXPORT(int) set_field_back (FIELD *,chtype); -+extern FORM_EXPORT(int) set_field_pad (FIELD *,int); -+extern FORM_EXPORT(int) field_pad (const FIELD *); -+extern FORM_EXPORT(int) set_field_buffer (FIELD *,int,const char *); -+extern FORM_EXPORT(int) set_field_status (FIELD *,bool); -+extern FORM_EXPORT(int) set_field_userptr (FIELD *, void *); -+extern FORM_EXPORT(int) set_field_opts (FIELD *,Field_Options); -+extern FORM_EXPORT(int) field_opts_on (FIELD *,Field_Options); -+extern FORM_EXPORT(int) field_opts_off (FIELD *,Field_Options); -+ -+extern FORM_EXPORT(chtype) field_fore (const FIELD *); -+extern FORM_EXPORT(chtype) field_back (const FIELD *); -+ -+extern FORM_EXPORT(bool) new_page (const FIELD *); -+extern FORM_EXPORT(bool) field_status (const FIELD *); -+ -+extern FORM_EXPORT(void *) field_arg (const FIELD *); -+ -+extern FORM_EXPORT(void *) field_userptr (const FIELD *); -+ -+extern FORM_EXPORT(FIELDTYPE *) field_type (const FIELD *); -+ -+extern FORM_EXPORT(char *) field_buffer (const FIELD *,int); -+ -+extern FORM_EXPORT(Field_Options) field_opts (const FIELD *); - - /****************** - * FORM routines * - ******************/ - --extern NCURSES_EXPORT(FORM *) new_form (FIELD **); -- --extern NCURSES_EXPORT(FIELD **) form_fields (const FORM *); --extern NCURSES_EXPORT(FIELD *) current_field (const FORM *); -- --extern NCURSES_EXPORT(WINDOW *) form_win (const FORM *); --extern NCURSES_EXPORT(WINDOW *) form_sub (const FORM *); -- --extern NCURSES_EXPORT(Form_Hook) form_init (const FORM *); --extern NCURSES_EXPORT(Form_Hook) form_term (const FORM *); --extern NCURSES_EXPORT(Form_Hook) field_init (const FORM *); --extern NCURSES_EXPORT(Form_Hook) field_term (const FORM *); -- --extern NCURSES_EXPORT(int) free_form (FORM *); --extern NCURSES_EXPORT(int) set_form_fields (FORM *,FIELD **); --extern NCURSES_EXPORT(int) field_count (const FORM *); --extern NCURSES_EXPORT(int) set_form_win (FORM *,WINDOW *); --extern NCURSES_EXPORT(int) set_form_sub (FORM *,WINDOW *); --extern NCURSES_EXPORT(int) set_current_field (FORM *,FIELD *); --extern NCURSES_EXPORT(int) unfocus_current_field (FORM *); --extern NCURSES_EXPORT(int) field_index (const FIELD *); --extern NCURSES_EXPORT(int) set_form_page (FORM *,int); --extern NCURSES_EXPORT(int) form_page (const FORM *); --extern NCURSES_EXPORT(int) scale_form (const FORM *,int *,int *); --extern NCURSES_EXPORT(int) set_form_init (FORM *,Form_Hook); --extern NCURSES_EXPORT(int) set_form_term (FORM *,Form_Hook); --extern NCURSES_EXPORT(int) set_field_init (FORM *,Form_Hook); --extern NCURSES_EXPORT(int) set_field_term (FORM *,Form_Hook); --extern NCURSES_EXPORT(int) post_form (FORM *); --extern NCURSES_EXPORT(int) unpost_form (FORM *); --extern NCURSES_EXPORT(int) pos_form_cursor (FORM *); --extern NCURSES_EXPORT(int) form_driver (FORM *,int); -+extern FORM_EXPORT(FORM *) new_form (FIELD **); -+ -+extern FORM_EXPORT(FIELD **) form_fields (const FORM *); -+extern FORM_EXPORT(FIELD *) current_field (const FORM *); -+ -+extern FORM_EXPORT(WINDOW *) form_win (const FORM *); -+extern FORM_EXPORT(WINDOW *) form_sub (const FORM *); -+ -+extern FORM_EXPORT(Form_Hook) form_init (const FORM *); -+extern FORM_EXPORT(Form_Hook) form_term (const FORM *); -+extern FORM_EXPORT(Form_Hook) field_init (const FORM *); -+extern FORM_EXPORT(Form_Hook) field_term (const FORM *); -+ -+extern FORM_EXPORT(int) free_form (FORM *); -+extern FORM_EXPORT(int) set_form_fields (FORM *,FIELD **); -+extern FORM_EXPORT(int) field_count (const FORM *); -+extern FORM_EXPORT(int) set_form_win (FORM *,WINDOW *); -+extern FORM_EXPORT(int) set_form_sub (FORM *,WINDOW *); -+extern FORM_EXPORT(int) set_current_field (FORM *,FIELD *); -+extern FORM_EXPORT(int) unfocus_current_field (FORM *); -+extern FORM_EXPORT(int) field_index (const FIELD *); -+extern FORM_EXPORT(int) set_form_page (FORM *,int); -+extern FORM_EXPORT(int) form_page (const FORM *); -+extern FORM_EXPORT(int) scale_form (const FORM *,int *,int *); -+extern FORM_EXPORT(int) set_form_init (FORM *,Form_Hook); -+extern FORM_EXPORT(int) set_form_term (FORM *,Form_Hook); -+extern FORM_EXPORT(int) set_field_init (FORM *,Form_Hook); -+extern FORM_EXPORT(int) set_field_term (FORM *,Form_Hook); -+extern FORM_EXPORT(int) post_form (FORM *); -+extern FORM_EXPORT(int) unpost_form (FORM *); -+extern FORM_EXPORT(int) pos_form_cursor (FORM *); -+extern FORM_EXPORT(int) form_driver (FORM *,int); - # if NCURSES_WIDECHAR --extern NCURSES_EXPORT(int) form_driver_w (FORM *,int,wchar_t); -+extern FORM_EXPORT(int) form_driver_w (FORM *,int,wchar_t); - # endif --extern NCURSES_EXPORT(int) set_form_userptr (FORM *,void *); --extern NCURSES_EXPORT(int) set_form_opts (FORM *,Form_Options); --extern NCURSES_EXPORT(int) form_opts_on (FORM *,Form_Options); --extern NCURSES_EXPORT(int) form_opts_off (FORM *,Form_Options); --extern NCURSES_EXPORT(int) form_request_by_name (const char *); -+extern FORM_EXPORT(int) set_form_userptr (FORM *,void *); -+extern FORM_EXPORT(int) set_form_opts (FORM *,Form_Options); -+extern FORM_EXPORT(int) form_opts_on (FORM *,Form_Options); -+extern FORM_EXPORT(int) form_opts_off (FORM *,Form_Options); -+extern FORM_EXPORT(int) form_request_by_name (const char *); - --extern NCURSES_EXPORT(const char *) form_request_name (int); -+extern FORM_EXPORT(const char *) form_request_name (int); - --extern NCURSES_EXPORT(void *) form_userptr (const FORM *); -+extern FORM_EXPORT(void *) form_userptr (const FORM *); - --extern NCURSES_EXPORT(Form_Options) form_opts (const FORM *); -+extern FORM_EXPORT(Form_Options) form_opts (const FORM *); - --extern NCURSES_EXPORT(bool) data_ahead (const FORM *); --extern NCURSES_EXPORT(bool) data_behind (const FORM *); -+extern FORM_EXPORT(bool) data_ahead (const FORM *); -+extern FORM_EXPORT(bool) data_behind (const FORM *); - - #if NCURSES_SP_FUNCS --extern NCURSES_EXPORT(FORM *) NCURSES_SP_NAME(new_form) (SCREEN*, FIELD **); -+extern FORM_EXPORT(FORM *) NCURSES_SP_NAME(new_form) (SCREEN*, FIELD **); - #endif - - #ifdef __cplusplus -diff --git a/form/form.priv.h b/form/form.priv.h -index 53c717c6..fe60b91a 100644 ---- a/form/form.priv.h -+++ b/form/form.priv.h -@@ -69,9 +69,9 @@ - /*********************** - * Default objects * - ***********************/ --extern NCURSES_EXPORT_VAR(FORM *) _nc_Default_Form; --extern NCURSES_EXPORT_VAR(FIELD *) _nc_Default_Field; --extern NCURSES_EXPORT_VAR(FIELDTYPE *) _nc_Default_FieldType; -+extern FORM_EXPORT_VAR(FORM *) _nc_Default_Form; -+extern FORM_EXPORT_VAR(FIELD *) _nc_Default_Field; -+extern FORM_EXPORT_VAR(FIELDTYPE *) _nc_Default_FieldType; - - /* form status values */ - #define _OVLMODE (0x04U) /* Form is in overlay mode */ -@@ -176,32 +176,32 @@ TypeArgument; - - #define C_ZEROS '\0' - --extern NCURSES_EXPORT(TypeArgument *) _nc_Make_Argument (const FIELDTYPE*, va_list*, int*); --extern NCURSES_EXPORT(TypeArgument *) _nc_Copy_Argument (const FIELDTYPE*, const TypeArgument*, int*); --extern NCURSES_EXPORT(void) _nc_Free_Argument (const FIELDTYPE*, TypeArgument*); --extern NCURSES_EXPORT(bool) _nc_Copy_Type (FIELD*, FIELD const *); --extern NCURSES_EXPORT(void) _nc_Free_Type (FIELD *); -- --extern NCURSES_EXPORT(int) _nc_Synchronize_Attributes (FIELD*); --extern NCURSES_EXPORT(int) _nc_Synchronize_Options (FIELD*, Field_Options); --extern NCURSES_EXPORT(int) _nc_Set_Form_Page (FORM*, int, FIELD*); --extern NCURSES_EXPORT(int) _nc_Refresh_Current_Field (FORM*); --extern NCURSES_EXPORT(FIELD *) _nc_First_Active_Field (FORM*); --extern NCURSES_EXPORT(bool) _nc_Internal_Validation (FORM*); --extern NCURSES_EXPORT(int) _nc_Set_Current_Field (FORM*, FIELD*); --extern NCURSES_EXPORT(int) _nc_Position_Form_Cursor (FORM*); --extern NCURSES_EXPORT(void) _nc_Unset_Current_Field(FORM *form); -+extern FORM_EXPORT(TypeArgument *) _nc_Make_Argument (const FIELDTYPE*, va_list*, int*); -+extern FORM_EXPORT(TypeArgument *) _nc_Copy_Argument (const FIELDTYPE*, const TypeArgument*, int*); -+extern FORM_EXPORT(void) _nc_Free_Argument (const FIELDTYPE*, TypeArgument*); -+extern FORM_EXPORT(bool) _nc_Copy_Type (FIELD*, FIELD const *); -+extern FORM_EXPORT(void) _nc_Free_Type (FIELD *); -+ -+extern FORM_EXPORT(int) _nc_Synchronize_Attributes (FIELD*); -+extern FORM_EXPORT(int) _nc_Synchronize_Options (FIELD*, Field_Options); -+extern FORM_EXPORT(int) _nc_Set_Form_Page (FORM*, int, FIELD*); -+extern FORM_EXPORT(int) _nc_Refresh_Current_Field (FORM*); -+extern FORM_EXPORT(FIELD *) _nc_First_Active_Field (FORM*); -+extern FORM_EXPORT(bool) _nc_Internal_Validation (FORM*); -+extern FORM_EXPORT(int) _nc_Set_Current_Field (FORM*, FIELD*); -+extern FORM_EXPORT(int) _nc_Position_Form_Cursor (FORM*); -+extern FORM_EXPORT(void) _nc_Unset_Current_Field(FORM *form); - - #if NCURSES_INTEROP_FUNCS --extern NCURSES_EXPORT(FIELDTYPE *) _nc_TYPE_INTEGER(void); --extern NCURSES_EXPORT(FIELDTYPE *) _nc_TYPE_ALNUM(void); --extern NCURSES_EXPORT(FIELDTYPE *) _nc_TYPE_ALPHA(void); --extern NCURSES_EXPORT(FIELDTYPE *) _nc_TYPE_ENUM(void); --extern NCURSES_EXPORT(FIELDTYPE *) _nc_TYPE_NUMERIC(void); --extern NCURSES_EXPORT(FIELDTYPE *) _nc_TYPE_REGEXP(void); --extern NCURSES_EXPORT(FIELDTYPE *) _nc_TYPE_IPV4(void); -- --extern NCURSES_EXPORT(FIELDTYPE *) -+extern FORM_EXPORT(FIELDTYPE *) _nc_TYPE_INTEGER(void); -+extern FORM_EXPORT(FIELDTYPE *) _nc_TYPE_ALNUM(void); -+extern FORM_EXPORT(FIELDTYPE *) _nc_TYPE_ALPHA(void); -+extern FORM_EXPORT(FIELDTYPE *) _nc_TYPE_ENUM(void); -+extern FORM_EXPORT(FIELDTYPE *) _nc_TYPE_NUMERIC(void); -+extern FORM_EXPORT(FIELDTYPE *) _nc_TYPE_REGEXP(void); -+extern FORM_EXPORT(FIELDTYPE *) _nc_TYPE_IPV4(void); -+ -+extern FORM_EXPORT(FIELDTYPE *) - _nc_generic_fieldtype(bool (*const field_check) (FORM*, - FIELD *, - const void *), -@@ -212,18 +212,18 @@ _nc_generic_fieldtype(bool (*const field_check) (FORM*, - bool (*const next)(FORM*,FIELD*,const void*), - bool (*const prev)(FORM*,FIELD*,const void*), - void (*freecallback)(void*)); --extern NCURSES_EXPORT(int) _nc_set_generic_fieldtype(FIELD*, FIELDTYPE*, int (*)(void**)); --extern NCURSES_EXPORT(WINDOW*) _nc_form_cursor(const FORM* , int* , int* ); -+extern FORM_EXPORT(int) _nc_set_generic_fieldtype(FIELD*, FIELDTYPE*, int (*)(void**)); -+extern FORM_EXPORT(WINDOW*) _nc_form_cursor(const FORM* , int* , int* ); - - #define INIT_FT_FUNC(func) {func} - #else - #define INIT_FT_FUNC(func) func - #endif - --extern NCURSES_EXPORT(void) _nc_get_fieldbuffer(FORM*, FIELD*, FIELD_CELL*); -+extern FORM_EXPORT(void) _nc_get_fieldbuffer(FORM*, FIELD*, FIELD_CELL*); - - #if USE_WIDEC_SUPPORT --extern NCURSES_EXPORT(wchar_t *) _nc_Widen_String(char *, int *); -+extern FORM_EXPORT(wchar_t *) _nc_Widen_String(char *, int *); - #endif - - #ifdef TRACE -@@ -234,11 +234,11 @@ extern NCURSES_EXPORT(wchar_t *) _nc_Widen_String(char *, int *); - #define returnFieldType(code) TRACE_RETURN1(code,field_type) - #define returnFormHook(code) TRACE_RETURN1(code,form_hook) - --extern NCURSES_EXPORT(FIELD **) _nc_retrace_field_ptr (FIELD **); --extern NCURSES_EXPORT(FIELD *) _nc_retrace_field (FIELD *); --extern NCURSES_EXPORT(FIELDTYPE *) _nc_retrace_field_type (FIELDTYPE *); --extern NCURSES_EXPORT(FORM *) _nc_retrace_form (FORM *); --extern NCURSES_EXPORT(Form_Hook) _nc_retrace_form_hook (Form_Hook); -+extern FORM_EXPORT(FIELD **) _nc_retrace_field_ptr (FIELD **); -+extern FORM_EXPORT(FIELD *) _nc_retrace_field (FIELD *); -+extern FORM_EXPORT(FIELDTYPE *) _nc_retrace_field_type (FIELDTYPE *); -+extern FORM_EXPORT(FORM *) _nc_retrace_form (FORM *); -+extern FORM_EXPORT(Form_Hook) _nc_retrace_form_hook (Form_Hook); - - #else /* !TRACE */ - -diff --git a/form/frm_cursor.c b/form/frm_cursor.c -index 8ff42bf8..8ec64f73 100644 ---- a/form/frm_cursor.c -+++ b/form/frm_cursor.c -@@ -49,7 +49,7 @@ MODULE_ID("$Id: frm_cursor.c,v 1.11 2020/02/02 23:34:34 tom Exp $") - | E_BAD_ARGUMENT - Invalid form pointer - | E_NOT_POSTED - Form is not posted - +--------------------------------------------------------------------------*/ --NCURSES_EXPORT(int) -+FORM_EXPORT(int) - pos_form_cursor(FORM *form) - { - int res; -diff --git a/form/frm_data.c b/form/frm_data.c -index 5c3b2a04..2860fad7 100644 ---- a/form/frm_data.c -+++ b/form/frm_data.c -@@ -45,7 +45,7 @@ MODULE_ID("$Id: frm_data.c,v 1.17 2020/02/02 23:34:34 tom Exp $") - | Return Values : TRUE - there are off-screen data behind - | FALSE - there are no off-screen data behind - +--------------------------------------------------------------------------*/ --NCURSES_EXPORT(bool) -+FORM_EXPORT(bool) - data_behind(const FORM *form) - { - bool result = FALSE; -@@ -132,7 +132,7 @@ Only_Padding(WINDOW *w, int len, int pad) - | Return Values : TRUE - there are off-screen data ahead - | FALSE - there are no off-screen data ahead - +--------------------------------------------------------------------------*/ --NCURSES_EXPORT(bool) -+FORM_EXPORT(bool) - data_ahead(const FORM *form) - { - bool result = FALSE; -diff --git a/form/frm_def.c b/form/frm_def.c -index 0722d517..273d0441 100644 ---- a/form/frm_def.c -+++ b/form/frm_def.c -@@ -62,7 +62,7 @@ static FORM default_form = - NULL /* fieldterm */ - }; - --NCURSES_EXPORT_VAR(FORM *) _nc_Default_Form = &default_form; -+FORM_EXPORT_VAR(FORM *) _nc_Default_Form = &default_form; - - /*--------------------------------------------------------------------------- - | Facility : libnform -@@ -295,7 +295,7 @@ Associate_Fields(FORM *form, FIELD **fields) - | E_CONNECTED - a field is already connected - | E_SYSTEM_ERROR - not enough memory - +--------------------------------------------------------------------------*/ --NCURSES_EXPORT(FORM *) -+FORM_EXPORT(FORM *) - NCURSES_SP_NAME(new_form) (NCURSES_SP_DCLx FIELD **fields) - { - int err = E_SYSTEM_ERROR; -@@ -344,7 +344,7 @@ NCURSES_SP_NAME(new_form) (NCURSES_SP_DCLx FIELD **fields) - | E_SYSTEM_ERROR - not enough memory - +--------------------------------------------------------------------------*/ - #if NCURSES_SP_FUNCS --NCURSES_EXPORT(FORM *) -+FORM_EXPORT(FORM *) - new_form(FIELD **fields) - { - return NCURSES_SP_NAME(new_form) (CURRENT_SCREEN, fields); -@@ -361,7 +361,7 @@ new_form(FIELD **fields) - | E_BAD_ARGUMENT - invalid form pointer - | E_POSTED - form is posted - +--------------------------------------------------------------------------*/ --NCURSES_EXPORT(int) -+FORM_EXPORT(int) - free_form(FORM *form) - { - T((T_CALLED("free_form(%p)"), (void *)form)); -@@ -392,7 +392,7 @@ free_form(FORM *form) - | E_POSTED - form is posted - | E_SYSTEM_ERROR - not enough memory - +--------------------------------------------------------------------------*/ --NCURSES_EXPORT(int) -+FORM_EXPORT(int) - set_form_fields(FORM *form, FIELD **fields) - { - FIELD **old; -@@ -423,7 +423,7 @@ set_form_fields(FORM *form, FIELD **fields) - | - | Return Values : Pointer to field array - +--------------------------------------------------------------------------*/ --NCURSES_EXPORT(FIELD **) -+FORM_EXPORT(FIELD **) - form_fields(const FORM *form) - { - T((T_CALLED("form_field(%p)"), (const void *)form)); -@@ -438,7 +438,7 @@ form_fields(const FORM *form) - | - | Return Values : Number of fields, -1 if none are defined - +--------------------------------------------------------------------------*/ --NCURSES_EXPORT(int) -+FORM_EXPORT(int) - field_count(const FORM *form) - { - T((T_CALLED("field_count(%p)"), (const void *)form)); -diff --git a/form/frm_driver.c b/form/frm_driver.c -index b9f91e12..7b92a2ad 100644 ---- a/form/frm_driver.c -+++ b/form/frm_driver.c -@@ -548,7 +548,7 @@ Buffer_To_Window(const FIELD *field, WINDOW *win) - | - | Return Values : - - +--------------------------------------------------------------------------*/ --NCURSES_EXPORT(void) -+FORM_EXPORT(void) - _nc_get_fieldbuffer(FORM *form, FIELD *field, FIELD_CELL *buf) - { - int pad; -@@ -826,7 +826,7 @@ Field_encloses(FIELD *field, int ry, int rx) - | E_SYSTEM_ERROR - form has no current field or - | field-window - +--------------------------------------------------------------------------*/ --NCURSES_EXPORT(int) -+FORM_EXPORT(int) - _nc_Position_Form_Cursor(FORM *form) - { - FIELD *field; -@@ -868,7 +868,7 @@ _nc_Position_Form_Cursor(FORM *form) - | E_SYSTEM_ERROR - general error - +--------------------------------------------------------------------------*/ - static bool move_after_insert = TRUE; --NCURSES_EXPORT(int) -+FORM_EXPORT(int) - _nc_Refresh_Current_Field(FORM *form) - { - WINDOW *formwin; -@@ -1271,7 +1271,7 @@ Synchronize_Linked_Fields(FIELD *field) - | E_BAD_ARGUMENT - invalid field pointer - | E_SYSTEM_ERROR - some severe basic error - +--------------------------------------------------------------------------*/ --NCURSES_EXPORT(int) -+FORM_EXPORT(int) - _nc_Synchronize_Attributes(FIELD *field) - { - FORM *form; -@@ -1338,7 +1338,7 @@ _nc_Synchronize_Attributes(FIELD *field) - | E_CURRENT - field is the current one - | E_SYSTEM_ERROR - some severe basic error - +--------------------------------------------------------------------------*/ --NCURSES_EXPORT(int) -+FORM_EXPORT(int) - _nc_Synchronize_Options(FIELD *field, Field_Options newopts) - { - Field_Options oldopts; -@@ -1491,7 +1491,7 @@ _nc_Unset_Current_Field(FORM *form) - | E_SYSTEM_ERROR - some severe basic error - | E_NOT_CONNECTED - no fields are connected to the form - +--------------------------------------------------------------------------*/ --NCURSES_EXPORT(int) -+FORM_EXPORT(int) - _nc_Set_Current_Field(FORM *form, FIELD *newfield) - { - FIELD *field; -@@ -3225,7 +3225,7 @@ Check_Field(FORM *form, FIELDTYPE *typ, FIELD *field, TypeArgument *argp) - | Return Values : TRUE - field is valid - | FALSE - field is invalid - +--------------------------------------------------------------------------*/ --NCURSES_EXPORT(bool) -+FORM_EXPORT(bool) - _nc_Internal_Validation(FORM *form) - { - FIELD *field; -@@ -3319,7 +3319,7 @@ Next_Field_On_Page(FIELD *field) - | - | Return Values : Pointer to calculated field. - +--------------------------------------------------------------------------*/ --NCURSES_EXPORT(FIELD *) -+FORM_EXPORT(FIELD *) - _nc_First_Active_Field(FORM *form) - { - FIELD **last_on_page = &form->field[form->page[form->curpage].pmax]; -@@ -3873,7 +3873,7 @@ FN_Down_Field(FORM *form) - | E_BAD_ARGUMENT - invalid field pointer - | E_SYSTEM_ERROR - some severe basic error - +--------------------------------------------------------------------------*/ --NCURSES_EXPORT(int) -+FORM_EXPORT(int) - _nc_Set_Form_Page(FORM *form, int page, FIELD *field) - { - int res = E_OK; -@@ -4354,7 +4354,7 @@ static const Binding_Info bindings[MAX_FORM_COMMAND - MIN_FORM_COMMAND + 1] = - | E_NOT_CONNECTED - no fields are connected to the form - | E_UNKNOWN_COMMAND - command not known - +--------------------------------------------------------------------------*/ --NCURSES_EXPORT(int) -+FORM_EXPORT(int) - form_driver(FORM *form, int c) - { - const Binding_Info *BI = (Binding_Info *) 0; -@@ -4561,7 +4561,7 @@ form_driver(FORM *form, int c) - | E_NOT_CONNECTED - no fields are connected to the form - | E_UNKNOWN_COMMAND - command not known - +--------------------------------------------------------------------------*/ --NCURSES_EXPORT(int) -+FORM_EXPORT(int) - form_driver_w(FORM *form, int type, wchar_t c) - { - const Binding_Info *BI = (Binding_Info *) 0; -@@ -4743,7 +4743,7 @@ form_driver_w(FORM *form, int type, wchar_t c) - | E_BAD_ARGUMENT - invalid argument - | E_SYSTEM_ERROR - system error - +--------------------------------------------------------------------------*/ --NCURSES_EXPORT(int) -+FORM_EXPORT(int) - set_field_buffer(FIELD *field, int buffer, const char *value) - { - FIELD_CELL *p; -@@ -4860,7 +4860,7 @@ set_field_buffer(FIELD *field, int buffer, const char *value) - | - | Return Values : Pointer to buffer or NULL if arguments were invalid. - +--------------------------------------------------------------------------*/ --NCURSES_EXPORT(char *) -+FORM_EXPORT(char *) - field_buffer(const FIELD *field, int buffer) - { - char *result = 0; -@@ -4928,7 +4928,7 @@ field_buffer(const FIELD *field, int buffer) - | Convert a multibyte string to a wide-character string. The result must be - | freed by the caller. - +--------------------------------------------------------------------------*/ --NCURSES_EXPORT(wchar_t *) -+FORM_EXPORT(wchar_t *) - _nc_Widen_String(char *source, int *lengthp) - { - wchar_t *result = 0; -diff --git a/form/frm_hook.c b/form/frm_hook.c -index 3051cddc..0feb01c2 100644 ---- a/form/frm_hook.c -+++ b/form/frm_hook.c -@@ -37,7 +37,7 @@ MODULE_ID("$Id: frm_hook.c,v 1.19 2020/02/02 23:34:34 tom Exp $") - - /* "Template" macro to generate function to set application specific hook */ - #define GEN_HOOK_SET_FUNCTION( typ, name ) \ --NCURSES_IMPEXP int NCURSES_API set_ ## typ ## _ ## name (FORM *form, Form_Hook func)\ -+FORM_IMPEXP int NCURSES_API set_ ## typ ## _ ## name (FORM *form, Form_Hook func)\ - {\ - TR_FUNC_BFR(1); \ - T((T_CALLED("set_" #typ"_"#name"(%p,%s)"), (void *) form, TR_FUNC_ARG(0, func)));\ -@@ -47,7 +47,7 @@ NCURSES_IMPEXP int NCURSES_API set_ ## typ ## _ ## name (FORM *form, Form_Hook f - - /* "Template" macro to generate function to get application specific hook */ - #define GEN_HOOK_GET_FUNCTION( typ, name ) \ --NCURSES_IMPEXP Form_Hook NCURSES_API typ ## _ ## name ( const FORM *form )\ -+FORM_IMPEXP Form_Hook NCURSES_API typ ## _ ## name ( const FORM *form )\ - {\ - T((T_CALLED(#typ "_" #name "(%p)"), (const void *) form));\ - returnFormHook( Normalize_Form( form ) -> typ ## name );\ -diff --git a/form/frm_opts.c b/form/frm_opts.c -index 18ab2938..c6455466 100644 ---- a/form/frm_opts.c -+++ b/form/frm_opts.c -@@ -45,7 +45,7 @@ MODULE_ID("$Id: frm_opts.c,v 1.18 2020/02/02 23:34:34 tom Exp $") - | Return Values : E_OK - success - | E_BAD_ARGUMENT - invalid options - +--------------------------------------------------------------------------*/ --NCURSES_EXPORT(int) -+FORM_EXPORT(int) - set_form_opts(FORM *form, Form_Options opts) - { - T((T_CALLED("set_form_opts(%p,%d)"), (void *)form, opts)); -@@ -68,7 +68,7 @@ set_form_opts(FORM *form, Form_Options opts) - | - | Return Values : The option flags. - +--------------------------------------------------------------------------*/ --NCURSES_EXPORT(Form_Options) -+FORM_EXPORT(Form_Options) - form_opts(const FORM *form) - { - T((T_CALLED("form_opts(%p)"), (const void *)form)); -@@ -85,7 +85,7 @@ form_opts(const FORM *form) - | Return Values : E_OK - success - | E_BAD_ARGUMENT - invalid options - +--------------------------------------------------------------------------*/ --NCURSES_EXPORT(int) -+FORM_EXPORT(int) - form_opts_on(FORM *form, Form_Options opts) - { - T((T_CALLED("form_opts_on(%p,%d)"), (void *)form, opts)); -@@ -110,7 +110,7 @@ form_opts_on(FORM *form, Form_Options opts) - | Return Values : E_OK - success - | E_BAD_ARGUMENT - invalid options - +--------------------------------------------------------------------------*/ --NCURSES_EXPORT(int) -+FORM_EXPORT(int) - form_opts_off(FORM *form, Form_Options opts) - { - T((T_CALLED("form_opts_off(%p,%d)"), (void *)form, opts)); -diff --git a/form/frm_page.c b/form/frm_page.c -index c8569eef..e07655b7 100644 ---- a/form/frm_page.c -+++ b/form/frm_page.c -@@ -47,7 +47,7 @@ MODULE_ID("$Id: frm_page.c,v 1.13 2020/02/02 23:34:34 tom Exp $") - | E_INVALID_FIELD - current field can't be left - | E_SYSTEM_ERROR - system error - +--------------------------------------------------------------------------*/ --NCURSES_EXPORT(int) -+FORM_EXPORT(int) - set_form_page(FORM *form, int page) - { - int err = E_OK; -@@ -96,7 +96,7 @@ set_form_page(FORM *form, int page) - | Return Values : >= 0 : current page number - | -1 : invalid form pointer - +--------------------------------------------------------------------------*/ --NCURSES_EXPORT(int) -+FORM_EXPORT(int) - form_page(const FORM *form) - { - T((T_CALLED("form_page(%p)"), (const void *)form)); -diff --git a/form/frm_post.c b/form/frm_post.c -index 2f1ad813..894c7c4c 100644 ---- a/form/frm_post.c -+++ b/form/frm_post.c -@@ -48,7 +48,7 @@ MODULE_ID("$Id: frm_post.c,v 1.13 2020/02/02 23:34:34 tom Exp $") - | E_NO_ROOM - form doesn't fit into subwindow - | E_SYSTEM_ERROR - system error - +--------------------------------------------------------------------------*/ --NCURSES_EXPORT(int) -+FORM_EXPORT(int) - post_form(FORM *form) - { - WINDOW *formwin; -@@ -98,7 +98,7 @@ post_form(FORM *form) - | E_NOT_POSTED - form isn't posted - | E_BAD_STATE - called from a hook routine - +--------------------------------------------------------------------------*/ --NCURSES_EXPORT(int) -+FORM_EXPORT(int) - unpost_form(FORM *form) - { - T((T_CALLED("unpost_form(%p)"), (void *)form)); -diff --git a/form/frm_req_name.c b/form/frm_req_name.c -index 1e56c3dc..2f734f18 100644 ---- a/form/frm_req_name.c -+++ b/form/frm_req_name.c -@@ -120,7 +120,7 @@ static const char request_names[MAX_FORM_COMMAND - MIN_FORM_COMMAND + 1][13] = - | Return Values : Pointer to name - on success - | NULL - on invalid request code - +--------------------------------------------------------------------------*/ --NCURSES_EXPORT(const char *) -+FORM_EXPORT(const char *) - form_request_name(int request) - { - T((T_CALLED("form_request_name(%d)"), request)); -@@ -143,7 +143,7 @@ form_request_name(int request) - | Return Values : Request Id - on success - | E_NO_MATCH - request not found - +--------------------------------------------------------------------------*/ --NCURSES_EXPORT(int) -+FORM_EXPORT(int) - form_request_by_name(const char *str) - { - /* because the table is so small, it doesn't really hurt -diff --git a/form/frm_scale.c b/form/frm_scale.c -index 34c3611d..e0e025aa 100644 ---- a/form/frm_scale.c -+++ b/form/frm_scale.c -@@ -45,7 +45,7 @@ MODULE_ID("$Id: frm_scale.c,v 1.11 2020/02/02 23:34:34 tom Exp $") - | E_BAD_ARGUMENT - invalid form pointer - | E_NOT_CONNECTED - no fields connected to form - +--------------------------------------------------------------------------*/ --NCURSES_EXPORT(int) -+FORM_EXPORT(int) - scale_form(const FORM *form, int *rows, int *cols) - { - T((T_CALLED("scale_form(%p,%p,%p)"), -diff --git a/form/frm_sub.c b/form/frm_sub.c -index 9621e302..ebfcb10d 100644 ---- a/form/frm_sub.c -+++ b/form/frm_sub.c -@@ -44,7 +44,7 @@ MODULE_ID("$Id: frm_sub.c,v 1.13 2020/02/02 23:34:34 tom Exp $") - | Return Values : E_OK - success - | E_POSTED - form is posted - +--------------------------------------------------------------------------*/ --NCURSES_EXPORT(int) -+FORM_EXPORT(int) - set_form_sub(FORM *form, WINDOW *win) - { - T((T_CALLED("set_form_sub(%p,%p)"), (void *)form, (void *)win)); -@@ -73,7 +73,7 @@ set_form_sub(FORM *form, WINDOW *win) - | - | Return Values : The pointer to the Subwindow. - +--------------------------------------------------------------------------*/ --NCURSES_EXPORT(WINDOW *) -+FORM_EXPORT(WINDOW *) - form_sub(const FORM *form) - { - const FORM *f; -diff --git a/form/frm_user.c b/form/frm_user.c -index e1210f2d..2a415fbe 100644 ---- a/form/frm_user.c -+++ b/form/frm_user.c -@@ -44,7 +44,7 @@ MODULE_ID("$Id: frm_user.c,v 1.16 2020/02/02 23:34:34 tom Exp $") - | - | Return Values : E_OK - on success - +--------------------------------------------------------------------------*/ --NCURSES_EXPORT(int) -+FORM_EXPORT(int) - set_form_userptr(FORM *form, void *usrptr) - { - T((T_CALLED("set_form_userptr(%p,%p)"), (void *)form, (void *)usrptr)); -@@ -63,7 +63,7 @@ set_form_userptr(FORM *form, void *usrptr) - | Return Values : Value of pointer. If no such pointer has been set, - | NULL is returned - +--------------------------------------------------------------------------*/ --NCURSES_EXPORT(void *) -+FORM_EXPORT(void *) - form_userptr(const FORM *form) - { - T((T_CALLED("form_userptr(%p)"), (const void *)form)); -diff --git a/form/frm_win.c b/form/frm_win.c -index b7d1272d..465ceb3c 100644 ---- a/form/frm_win.c -+++ b/form/frm_win.c -@@ -44,7 +44,7 @@ MODULE_ID("$Id: frm_win.c,v 1.17 2020/02/02 23:34:34 tom Exp $") - | Return Values : E_OK - success - | E_POSTED - form is posted - +--------------------------------------------------------------------------*/ --NCURSES_EXPORT(int) -+FORM_EXPORT(int) - set_form_win(FORM *form, WINDOW *win) - { - T((T_CALLED("set_form_win(%p,%p)"), (void *)form, (void *)win)); -@@ -73,7 +73,7 @@ set_form_win(FORM *form, WINDOW *win) - | - | Return Values : The pointer to the Window or stdscr if there is none. - +--------------------------------------------------------------------------*/ --NCURSES_EXPORT(WINDOW *) -+FORM_EXPORT(WINDOW *) - form_win(const FORM *form) - { - WINDOW *result; -diff --git a/form/fty_alnum.c b/form/fty_alnum.c -index a2ca3514..5504ba98 100644 ---- a/form/fty_alnum.c -+++ b/form/fty_alnum.c -@@ -186,14 +186,14 @@ static FIELDTYPE typeTHIS = - #endif - }; - --NCURSES_EXPORT_VAR(FIELDTYPE*) TYPE_ALNUM = &typeTHIS; -+FORM_EXPORT_VAR(FIELDTYPE*) TYPE_ALNUM = &typeTHIS; - - #if NCURSES_INTEROP_FUNCS - /* The next routines are to simplify the use of ncurses from - programming languages with restictions on interop with C level - constructs (e.g. variable access or va_list + ellipsis constructs) - */ --NCURSES_EXPORT(FIELDTYPE *) -+FORM_EXPORT(FIELDTYPE *) - _nc_TYPE_ALNUM(void) - { - return TYPE_ALNUM; -diff --git a/form/fty_alpha.c b/form/fty_alpha.c -index 7dec23f5..15e27143 100644 ---- a/form/fty_alpha.c -+++ b/form/fty_alpha.c -@@ -186,14 +186,14 @@ static FIELDTYPE typeTHIS = - #endif - }; - --NCURSES_EXPORT_VAR(FIELDTYPE*) TYPE_ALPHA = &typeTHIS; -+FORM_EXPORT_VAR(FIELDTYPE*) TYPE_ALPHA = &typeTHIS; - - #if NCURSES_INTEROP_FUNCS - /* The next routines are to simplify the use of ncurses from - programming languages with restictions on interop with C level - constructs (e.g. variable access or va_list + ellipsis constructs) - */ --NCURSES_EXPORT(FIELDTYPE *) -+FORM_EXPORT(FIELDTYPE *) - _nc_TYPE_ALPHA(void) - { - return TYPE_ALPHA; -diff --git a/form/fty_enum.c b/form/fty_enum.c -index 71978e3a..2633eff4 100644 ---- a/form/fty_enum.c -+++ b/form/fty_enum.c -@@ -425,7 +425,7 @@ static FIELDTYPE typeENUM = - #endif - }; - --NCURSES_EXPORT_VAR(FIELDTYPE *) -+FORM_EXPORT_VAR(FIELDTYPE *) - TYPE_ENUM = &typeENUM; - - #if NCURSES_INTEROP_FUNCS -@@ -433,7 +433,7 @@ TYPE_ENUM = &typeENUM; - programming languages with restictions on interop with C level - constructs (e.g. variable access or va_list + ellipsis constructs) - */ --NCURSES_EXPORT(FIELDTYPE *) -+FORM_EXPORT(FIELDTYPE *) - _nc_TYPE_ENUM(void) - { - return TYPE_ENUM; -diff --git a/form/fty_generic.c b/form/fty_generic.c -index 159d3059..f4332f43 100644 ---- a/form/fty_generic.c -+++ b/form/fty_generic.c -@@ -99,7 +99,7 @@ Generic_This_Type(void *arg) - | - | Return Values : Fieldtype pointer or NULL if error occurred - +--------------------------------------------------------------------------*/ --NCURSES_EXPORT(FIELDTYPE *) -+FORM_EXPORT(FIELDTYPE *) - _nc_generic_fieldtype(bool (*const field_check) (FORM *, FIELD *, const void *), - bool (*const char_check) (int, FORM *, FIELD *, const - void *), -@@ -220,7 +220,7 @@ GenericArgument(const FIELDTYPE *typ, - | Return Values : E_OK if all went well - | E_SYSTEM_ERROR if an error occurred - +--------------------------------------------------------------------------*/ --NCURSES_EXPORT(int) -+FORM_EXPORT(int) - _nc_set_generic_fieldtype(FIELD *field, - FIELDTYPE *ftyp, - int (*argiterator) (void **)) -@@ -275,7 +275,7 @@ _nc_set_generic_fieldtype(FIELD *field, - | - | Return Values : The fields Window or NULL on error - +--------------------------------------------------------------------------*/ --NCURSES_EXPORT(WINDOW *) -+FORM_EXPORT(WINDOW *) - _nc_form_cursor(const FORM *form, int *pRow, int *pCol) - { - int code = E_SYSTEM_ERROR; -diff --git a/form/fty_int.c b/form/fty_int.c -index 71056404..5e619462 100644 ---- a/form/fty_int.c -+++ b/form/fty_int.c -@@ -278,14 +278,14 @@ static FIELDTYPE typeTHIS = - #endif - }; - --NCURSES_EXPORT_VAR(FIELDTYPE*) TYPE_INTEGER = &typeTHIS; -+FORM_EXPORT_VAR(FIELDTYPE*) TYPE_INTEGER = &typeTHIS; - - #if NCURSES_INTEROP_FUNCS - /* The next routines are to simplify the use of ncurses from - programming languages with restictions on interop with C level - constructs (e.g. variable access or va_list + ellipsis constructs) - */ --NCURSES_EXPORT(FIELDTYPE *) -+FORM_EXPORT(FIELDTYPE *) - _nc_TYPE_INTEGER(void) - { - return TYPE_INTEGER; -diff --git a/form/fty_ipv4.c b/form/fty_ipv4.c -index 37133770..6d558668 100644 ---- a/form/fty_ipv4.c -+++ b/form/fty_ipv4.c -@@ -104,14 +104,14 @@ static FIELDTYPE typeIPV4 = - #endif - }; - --NCURSES_EXPORT_VAR(FIELDTYPE*) TYPE_IPV4 = &typeIPV4; -+FORM_EXPORT_VAR(FIELDTYPE*) TYPE_IPV4 = &typeIPV4; - - #if NCURSES_INTEROP_FUNCS - /* The next routines are to simplify the use of ncurses from - programming languages with restictions on interop with C level - constructs (e.g. variable access or va_list + ellipsis constructs) - */ --NCURSES_EXPORT(FIELDTYPE *) -+FORM_EXPORT(FIELDTYPE *) - _nc_TYPE_IPV4(void) - { - return TYPE_IPV4; -diff --git a/form/fty_num.c b/form/fty_num.c -index b4dfeb97..8216cd74 100644 ---- a/form/fty_num.c -+++ b/form/fty_num.c -@@ -324,14 +324,14 @@ static FIELDTYPE typeTHIS = - #endif - }; - --NCURSES_EXPORT_VAR(FIELDTYPE*) TYPE_NUMERIC = &typeTHIS; -+FORM_EXPORT_VAR(FIELDTYPE*) TYPE_NUMERIC = &typeTHIS; - - #if NCURSES_INTEROP_FUNCS - /* The next routines are to simplify the use of ncurses from - programming languages with restictions on interop with C level - constructs (e.g. variable access or va_list + ellipsis constructs) - */ --NCURSES_EXPORT(FIELDTYPE *) -+FORM_EXPORT(FIELDTYPE *) - _nc_TYPE_NUMERIC(void) - { - return TYPE_NUMERIC; -diff --git a/form/fty_regex.c b/form/fty_regex.c -index d1daf714..61378050 100644 ---- a/form/fty_regex.c -+++ b/form/fty_regex.c -@@ -340,14 +340,14 @@ static FIELDTYPE typeREGEXP = - #endif - }; - --NCURSES_EXPORT_VAR(FIELDTYPE*) TYPE_REGEXP = &typeREGEXP; -+FORM_EXPORT_VAR(FIELDTYPE*) TYPE_REGEXP = &typeREGEXP; - - #if NCURSES_INTEROP_FUNCS - /* The next routines are to simplify the use of ncurses from - programming languages with restictions on interop with C level - constructs (e.g. variable access or va_list + ellipsis constructs) - */ --NCURSES_EXPORT(FIELDTYPE *) -+FORM_EXPORT(FIELDTYPE *) - _nc_TYPE_REGEXP(void) - { - return TYPE_REGEXP; -diff --git a/include/ncurses_dll.h.in b/include/ncurses_dll.h.in -index 568112e2..ca1f0749 100644 ---- a/include/ncurses_dll.h.in -+++ b/include/ncurses_dll.h.in -@@ -66,7 +66,6 @@ - * using functions to access them. - */ - #define NCURSES_PUBLIC_VAR(name) @NCURSES_WRAP_PREFIX@##name --#define NCURSES_WRAPPED_VAR(type,name) extern type NCURSES_PUBLIC_VAR(name)(void) - - #include "ncurses_exports.h" - -@@ -76,6 +75,8 @@ - # define NCURSES_IMPEXP NCURSES_EXPORT_GENERAL_IMPORT - #endif - -+#define NCURSES_WRAPPED_VAR(type,name) extern NCURSES_IMPEXP type NCURSES_PUBLIC_VAR(name)(void) -+ - #define NCURSES_EXPORT(type) NCURSES_IMPEXP type NCURSES_API - #define NCURSES_EXPORT_VAR(type) NCURSES_IMPEXP type - ---- include/nc_mingw.h -+++ include/nc_mingw.h -@@ -60,7 +60,9 @@ - #include /* for struct timeval */ - #endif - --extern int _nc_gettimeofday(struct timeval *, void *); -+#include -+ -+NCURSES_EXPORT(int) _nc_gettimeofday(struct timeval *, void *); - - #undef HAVE_GETTIMEOFDAY - #define HAVE_GETTIMEOFDAY 1 -@@ -71,7 +73,7 @@ extern int _nc_gettimeofday(struct timeval *, void *); - - #undef wcwidth - #define wcwidth(ucs) _nc_wcwidth((wchar_t)(ucs)) --extern int _nc_wcwidth(wchar_t); -+NCURSES_EXPORT(int) _nc_wcwidth(wchar_t); - - #endif /* _WIN32 */ - -diff --git a/menu/m_cursor.c b/menu/m_cursor.c -index 3f8e5480..786d9e6c 100644 ---- a/menu/m_cursor.c -+++ b/menu/m_cursor.c -@@ -50,7 +50,7 @@ MODULE_ID("$Id: m_cursor.c,v 1.23 2020/02/02 23:34:34 tom Exp $") - | E_BAD_ARGUMENT - invalid menu - | E_NOT_POSTED - Menu is not posted - +--------------------------------------------------------------------------*/ --NCURSES_EXPORT(int) -+MENU_EXPORT(int) - _nc_menu_cursor_pos(const MENU * menu, const ITEM * item, int *pY, int *pX) - { - if (!menu || !pX || !pY) -@@ -80,7 +80,7 @@ _nc_menu_cursor_pos(const MENU * menu, const ITEM * item, int *pY, int *pX) - | E_BAD_ARGUMENT - invalid menu - | E_NOT_POSTED - Menu is not posted - +--------------------------------------------------------------------------*/ --NCURSES_EXPORT(int) -+MENU_EXPORT(int) - pos_menu_cursor(const MENU * menu) - { - WINDOW *win, *sub; -diff --git a/menu/m_driver.c b/menu/m_driver.c -index e592bab4..98d7fdf1 100644 ---- a/menu/m_driver.c -+++ b/menu/m_driver.c -@@ -115,7 +115,7 @@ Is_Sub_String( - | Return Values : E_OK - an item matching the pattern was found - | E_NO_MATCH - nothing found - +--------------------------------------------------------------------------*/ --NCURSES_EXPORT(int) -+MENU_EXPORT(int) - _nc_Match_Next_Character_In_Item_Name - (MENU * menu, int ch, ITEM ** item) - { -@@ -209,7 +209,7 @@ _nc_Match_Next_Character_In_Item_Name - | E_BAD_STATE - menu is in user hook routine - | E_NOT_POSTED - menu is not posted - +--------------------------------------------------------------------------*/ --NCURSES_EXPORT(int) -+MENU_EXPORT(int) - menu_driver(MENU * menu, int c) - { - #define NAVIGATE(dir) \ -diff --git a/menu/m_format.c b/menu/m_format.c -index 9738dbf2..96d331e4 100644 ---- a/menu/m_format.c -+++ b/menu/m_format.c -@@ -56,7 +56,7 @@ MODULE_ID("$Id: m_format.c,v 1.19 2020/02/02 23:34:34 tom Exp $") - | E_NOT_CONNECTED - there are no items connected - | E_POSTED - the menu is already posted - +--------------------------------------------------------------------------*/ --NCURSES_EXPORT(int) -+MENU_EXPORT(int) - set_menu_format(MENU * menu, int rows, int cols) - { - int total_rows, total_cols; -@@ -120,7 +120,7 @@ set_menu_format(MENU * menu, int rows, int cols) - | - | Return Values : - - +--------------------------------------------------------------------------*/ --NCURSES_EXPORT(void) -+MENU_EXPORT(void) - menu_format(const MENU * menu, int *rows, int *cols) - { - if (rows) -diff --git a/menu/m_global.c b/menu/m_global.c -index 489987fe..f2d6c001 100644 ---- a/menu/m_global.c -+++ b/menu/m_global.c -@@ -42,7 +42,7 @@ MODULE_ID("$Id: m_global.c,v 1.30 2020/02/02 23:34:34 tom Exp $") - - static char mark[] = "-"; - /* *INDENT-OFF* */ --NCURSES_EXPORT_VAR(MENU) _nc_Default_Menu = { -+MENU_EXPORT_VAR(MENU) _nc_Default_Menu = { - 16, /* Nr. of chars high */ - 1, /* Nr. of chars wide */ - 16, /* Nr. of items high */ -@@ -81,7 +81,7 @@ NCURSES_EXPORT_VAR(MENU) _nc_Default_Menu = { - 0 /* status */ - }; - --NCURSES_EXPORT_VAR(ITEM) _nc_Default_Item = { -+MENU_EXPORT_VAR(ITEM) _nc_Default_Item = { - { (char *)0, 0 }, /* name */ - { (char *)0, 0 }, /* description */ - (MENU *)0, /* Pointer to parent menu */ -@@ -171,7 +171,7 @@ ResetConnectionInfo(MENU * menu, ITEM ** items) - | Return Values : TRUE - successful connection - | FALSE - connection failed - +--------------------------------------------------------------------------*/ --NCURSES_EXPORT(bool) -+MENU_EXPORT(bool) - _nc_Connect_Items(MENU * menu, ITEM ** items) - { - ITEM **item; -@@ -233,7 +233,7 @@ _nc_Connect_Items(MENU * menu, ITEM ** items) - | - | Return Values : - - +--------------------------------------------------------------------------*/ --NCURSES_EXPORT(void) -+MENU_EXPORT(void) - _nc_Disconnect_Items(MENU * menu) - { - if (menu && menu->items) -@@ -248,7 +248,7 @@ _nc_Disconnect_Items(MENU * menu) - | - | Return Values : the width - +--------------------------------------------------------------------------*/ --NCURSES_EXPORT(int) -+MENU_EXPORT(int) - _nc_Calculate_Text_Width(const TEXT * item /*FIXME: limit length */ ) - { - #if USE_WIDEC_SUPPORT -@@ -337,7 +337,7 @@ calculate_actual_width(MENU * menu, bool name) - | - | Return Values : - - +--------------------------------------------------------------------------*/ --NCURSES_EXPORT(void) -+MENU_EXPORT(void) - _nc_Calculate_Item_Length_and_Width(MENU * menu) - { - int l; -@@ -376,7 +376,7 @@ _nc_Calculate_Item_Length_and_Width(MENU * menu) - | - | Return Values : - - +--------------------------------------------------------------------------*/ --NCURSES_EXPORT(void) -+MENU_EXPORT(void) - _nc_Link_Items(MENU * menu) - { - if (menu && menu->items && *(menu->items)) -@@ -503,7 +503,7 @@ _nc_Link_Items(MENU * menu) - | - | Return Values : - - +--------------------------------------------------------------------------*/ --NCURSES_EXPORT(void) -+MENU_EXPORT(void) - _nc_Show_Menu(const MENU * menu) - { - WINDOW *win; -@@ -543,7 +543,7 @@ _nc_Show_Menu(const MENU * menu) - | - | Return Values : - - +--------------------------------------------------------------------------*/ --NCURSES_EXPORT(void) -+MENU_EXPORT(void) - _nc_New_TopRow_and_CurrentItem( - MENU * menu, - int new_toprow, -diff --git a/menu/m_item_cur.c b/menu/m_item_cur.c -index c09bf311..10435e7a 100644 ---- a/menu/m_item_cur.c -+++ b/menu/m_item_cur.c -@@ -48,7 +48,7 @@ MODULE_ID("$Id: m_item_cur.c,v 1.19 2020/02/02 23:34:34 tom Exp $") - | - | Return Values : E_OK - success - +--------------------------------------------------------------------------*/ --NCURSES_EXPORT(int) -+MENU_EXPORT(int) - set_current_item(MENU * menu, ITEM * item) - { - T((T_CALLED("set_current_item(%p,%p)"), (void *)menu, (void *)item)); -@@ -89,7 +89,7 @@ set_current_item(MENU * menu, ITEM * item) - | - | Return Values : Item pointer or NULL if failure - +--------------------------------------------------------------------------*/ --NCURSES_EXPORT(ITEM *) -+MENU_EXPORT(ITEM *) - current_item(const MENU * menu) - { - T((T_CALLED("current_item(%p)"), (const void *)menu)); -@@ -104,7 +104,7 @@ current_item(const MENU * menu) - | - | Return Values : The index or ERR if this is an invalid item pointer - +--------------------------------------------------------------------------*/ --NCURSES_EXPORT(int) -+MENU_EXPORT(int) - item_index(const ITEM * item) - { - T((T_CALLED("item_index(%p)"), (const void *)item)); -diff --git a/menu/m_item_nam.c b/menu/m_item_nam.c -index aaf54e0a..dc4d66c6 100644 ---- a/menu/m_item_nam.c -+++ b/menu/m_item_nam.c -@@ -48,7 +48,7 @@ MODULE_ID("$Id: m_item_nam.c,v 1.16 2020/02/02 23:34:34 tom Exp $") - | - | Return Values : See above; returns NULL if item is invalid - +--------------------------------------------------------------------------*/ --NCURSES_EXPORT(const char *) -+MENU_EXPORT(const char *) - item_name(const ITEM * item) - { - T((T_CALLED("item_name(%p)"), (const void *)item)); -@@ -63,7 +63,7 @@ item_name(const ITEM * item) - | - | Return Values : See above; Returns NULL if item is invalid - +--------------------------------------------------------------------------*/ --NCURSES_EXPORT(const char *) -+MENU_EXPORT(const char *) - item_description(const ITEM * item) - { - T((T_CALLED("item_description(%p)"), (const void *)item)); -diff --git a/menu/m_item_new.c b/menu/m_item_new.c -index 1e7950db..493977ad 100644 ---- a/menu/m_item_new.c -+++ b/menu/m_item_new.c -@@ -107,7 +107,7 @@ Is_Printable_String(const char *s) - | - | Return Values : The item pointer or NULL if creation failed. - +--------------------------------------------------------------------------*/ --NCURSES_EXPORT(ITEM *) -+MENU_EXPORT(ITEM *) - new_item(const char *name, const char *description) - { - ITEM *item; -@@ -160,7 +160,7 @@ new_item(const char *name, const char *description) - | E_BAD_ARGUMENT - invalid value has been passed - | E_CONNECTED - item is still connected to a menu - +--------------------------------------------------------------------------*/ --NCURSES_EXPORT(int) -+MENU_EXPORT(int) - free_item(ITEM * item) - { - T((T_CALLED("free_item(%p)"), (void *)item)); -@@ -193,7 +193,7 @@ free_item(ITEM * item) - | E_BAD_ARGUMENT - an invalid value has been passed - | E_SYSTEM_ERROR - no memory to store mark - +--------------------------------------------------------------------------*/ --NCURSES_EXPORT(int) -+MENU_EXPORT(int) - set_menu_mark(MENU * menu, const char *mark) - { - short l; -@@ -265,7 +265,7 @@ set_menu_mark(MENU * menu, const char *mark) - | - | Return Values : The marker string pointer or NULL if no marker defined - +--------------------------------------------------------------------------*/ --NCURSES_EXPORT(const char *) -+MENU_EXPORT(const char *) - menu_mark(const MENU * menu) - { - T((T_CALLED("menu_mark(%p)"), (const void *)menu)); -diff --git a/menu/m_item_opt.c b/menu/m_item_opt.c -index f8df2205..b6a5e151 100644 ---- a/menu/m_item_opt.c -+++ b/menu/m_item_opt.c -@@ -51,7 +51,7 @@ MODULE_ID("$Id: m_item_opt.c,v 1.19 2020/02/02 23:34:34 tom Exp $") - | Return Values : E_OK - success - | E_BAD_ARGUMENT - invalid item options - +--------------------------------------------------------------------------*/ --NCURSES_EXPORT(int) -+MENU_EXPORT(int) - set_item_opts(ITEM * item, Item_Options opts) - { - T((T_CALLED("set_menu_opts(%p,%d)"), (void *)item, opts)); -@@ -94,7 +94,7 @@ set_item_opts(ITEM * item, Item_Options opts) - | Return Values : E_OK - success - | E_BAD_ARGUMENT - invalid options - +--------------------------------------------------------------------------*/ --NCURSES_EXPORT(int) -+MENU_EXPORT(int) - item_opts_off(ITEM * item, Item_Options opts) - { - ITEM *citem = item; /* use a copy because set_item_opts must detect -@@ -122,7 +122,7 @@ item_opts_off(ITEM * item, Item_Options opts) - | Return Values : E_OK - success - | E_BAD_ARGUMENT - invalid options - +--------------------------------------------------------------------------*/ --NCURSES_EXPORT(int) -+MENU_EXPORT(int) - item_opts_on(ITEM * item, Item_Options opts) - { - ITEM *citem = item; /* use a copy because set_item_opts must detect -@@ -150,7 +150,7 @@ item_opts_on(ITEM * item, Item_Options opts) - | - | Return Values : Items options - +--------------------------------------------------------------------------*/ --NCURSES_EXPORT(Item_Options) -+MENU_EXPORT(Item_Options) - item_opts(const ITEM * item) - { - T((T_CALLED("item_opts(%p)"), (const void *)item)); -diff --git a/menu/m_item_top.c b/menu/m_item_top.c -index 9417e72b..ab60e0f9 100644 ---- a/menu/m_item_top.c -+++ b/menu/m_item_top.c -@@ -50,7 +50,7 @@ MODULE_ID("$Id: m_item_top.c,v 1.12 2020/02/02 23:34:34 tom Exp $") - | E_BAD_ARGUMENT - not a menu pointer or invalid row - | E_NOT_CONNECTED - there are no items for the menu - +--------------------------------------------------------------------------*/ --NCURSES_EXPORT(int) -+MENU_EXPORT(int) - set_top_row(MENU * menu, int row) - { - ITEM *item; -@@ -92,7 +92,7 @@ set_top_row(MENU * menu, int row) - | - | Return Values : The row number or ERR if there is no row - +--------------------------------------------------------------------------*/ --NCURSES_EXPORT(int) -+MENU_EXPORT(int) - top_row(const MENU * menu) - { - T((T_CALLED("top_row(%p)"), (const void *)menu)); -diff --git a/menu/m_item_use.c b/menu/m_item_use.c -index 30814327..a2e6cfa6 100644 ---- a/menu/m_item_use.c -+++ b/menu/m_item_use.c -@@ -49,7 +49,7 @@ MODULE_ID("$Id: m_item_use.c,v 1.19 2020/02/02 23:34:34 tom Exp $") - | - | Return Values : E_OK - success - +--------------------------------------------------------------------------*/ --NCURSES_EXPORT(int) -+MENU_EXPORT(int) - set_item_userptr(ITEM * item, void *userptr) - { - T((T_CALLED("set_item_userptr(%p,%p)"), (void *)item, (void *)userptr)); -@@ -67,7 +67,7 @@ set_item_userptr(ITEM * item, void *userptr) - | Return Values : Value of the pointer. If no such pointer has been set, - | NULL is returned. - +--------------------------------------------------------------------------*/ --NCURSES_EXPORT(void *) -+MENU_EXPORT(void *) - item_userptr(const ITEM * item) - { - T((T_CALLED("item_userptr(%p)"), (const void *)item)); -diff --git a/menu/m_item_val.c b/menu/m_item_val.c -index d8d11f21..825c9a2f 100644 ---- a/menu/m_item_val.c -+++ b/menu/m_item_val.c -@@ -53,7 +53,7 @@ MODULE_ID("$Id: m_item_val.c,v 1.16 2020/02/02 23:34:34 tom Exp $") - | Return Values : E_OK - success - | E_REQUEST_DENIED - not selectable or single valued menu - +--------------------------------------------------------------------------*/ --NCURSES_EXPORT(int) -+MENU_EXPORT(int) - set_item_value(ITEM * item, bool value) - { - MENU *menu; -@@ -95,7 +95,7 @@ set_item_value(ITEM * item, bool value) - | Return Values : TRUE - if item is selected - | FALSE - if item is not selected - +--------------------------------------------------------------------------*/ --NCURSES_EXPORT(bool) -+MENU_EXPORT(bool) - item_value(const ITEM * item) - { - T((T_CALLED("item_value(%p)"), (const void *)item)); -diff --git a/menu/m_item_vis.c b/menu/m_item_vis.c -index 8e993413..5959548a 100644 ---- a/menu/m_item_vis.c -+++ b/menu/m_item_vis.c -@@ -50,7 +50,7 @@ MODULE_ID("$Id: m_item_vis.c,v 1.17 2020/02/02 23:34:34 tom Exp $") - | Return Values : TRUE if visible - | FALSE if invisible - +--------------------------------------------------------------------------*/ --NCURSES_EXPORT(bool) -+MENU_EXPORT(bool) - item_visible(const ITEM * item) - { - MENU *menu; -diff --git a/menu/m_items.c b/menu/m_items.c -index 9f46c8be..8c6d4bfc 100644 ---- a/menu/m_items.c -+++ b/menu/m_items.c -@@ -53,7 +53,7 @@ MODULE_ID("$Id: m_items.c,v 1.18 2020/02/02 23:34:34 tom Exp $") - | E_BAD_ARGUMENT - An incorrect menu or item array was - | passed to the function - +--------------------------------------------------------------------------*/ --NCURSES_EXPORT(int) -+MENU_EXPORT(int) - set_menu_items(MENU * menu, ITEM ** items) - { - T((T_CALLED("set_menu_items(%p,%p)"), (void *)menu, (void *)items)); -@@ -85,7 +85,7 @@ set_menu_items(MENU * menu, ITEM ** items) - | - | Return Values : NULL on error - +--------------------------------------------------------------------------*/ --NCURSES_EXPORT(ITEM **) -+MENU_EXPORT(ITEM **) - menu_items(const MENU * menu) - { - T((T_CALLED("menu_items(%p)"), (const void *)menu)); -@@ -101,7 +101,7 @@ menu_items(const MENU * menu) - | - | Return Values : Number of items or -1 to indicate error. - +--------------------------------------------------------------------------*/ --NCURSES_EXPORT(int) -+MENU_EXPORT(int) - item_count(const MENU * menu) - { - T((T_CALLED("item_count(%p)"), (const void *)menu)); -diff --git a/menu/m_new.c b/menu/m_new.c -index cf89196a..f78c702c 100644 ---- a/menu/m_new.c -+++ b/menu/m_new.c -@@ -51,7 +51,7 @@ MODULE_ID("$Id: m_new.c,v 1.22 2020/02/02 23:34:34 tom Exp $") - | - | Return Values : NULL on error - +--------------------------------------------------------------------------*/ --NCURSES_EXPORT(MENU *) -+MENU_EXPORT(MENU *) - NCURSES_SP_NAME(new_menu) (NCURSES_SP_DCLx ITEM ** items) - { - int err = E_SYSTEM_ERROR; -@@ -102,7 +102,7 @@ NCURSES_SP_NAME(new_menu) (NCURSES_SP_DCLx ITEM ** items) - | Return Values : NULL on error - +--------------------------------------------------------------------------*/ - #if NCURSES_SP_FUNCS --NCURSES_EXPORT(MENU *) -+MENU_EXPORT(MENU *) - new_menu(ITEM ** items) - { - return NCURSES_SP_NAME(new_menu) (CURRENT_SCREEN, items); -@@ -120,7 +120,7 @@ new_menu(ITEM ** items) - | E_BAD_ARGUMENT - Invalid menu pointer passed - | E_POSTED - Menu is already posted - +--------------------------------------------------------------------------*/ --NCURSES_EXPORT(int) -+MENU_EXPORT(int) - free_menu(MENU * menu) - { - T((T_CALLED("free_menu(%p)"), (void *)menu)); -diff --git a/menu/m_opts.c b/menu/m_opts.c -index 4c29f333..b8dc653d 100644 ---- a/menu/m_opts.c -+++ b/menu/m_opts.c -@@ -53,7 +53,7 @@ MODULE_ID("$Id: m_opts.c,v 1.21 2020/02/02 23:34:34 tom Exp $") - | E_BAD_ARGUMENT - invalid menu options - | E_POSTED - menu is already posted - +--------------------------------------------------------------------------*/ --NCURSES_EXPORT(int) -+MENU_EXPORT(int) - set_menu_opts(MENU * menu, Menu_Options opts) - { - T((T_CALLED("set_menu_opts(%p,%d)"), (void *)menu, opts)); -@@ -113,7 +113,7 @@ set_menu_opts(MENU * menu, Menu_Options opts) - | E_BAD_ARGUMENT - invalid options - | E_POSTED - menu is already posted - +--------------------------------------------------------------------------*/ --NCURSES_EXPORT(int) -+MENU_EXPORT(int) - menu_opts_off(MENU * menu, Menu_Options opts) - { - MENU *cmenu = menu; /* use a copy because set_menu_opts must detect -@@ -146,7 +146,7 @@ menu_opts_off(MENU * menu, Menu_Options opts) - | E_BAD_ARGUMENT - invalid menu options - | E_POSTED - menu is already posted - +--------------------------------------------------------------------------*/ --NCURSES_EXPORT(int) -+MENU_EXPORT(int) - menu_opts_on(MENU * menu, Menu_Options opts) - { - MENU *cmenu = menu; /* use a copy because set_menu_opts must detect -@@ -174,7 +174,7 @@ menu_opts_on(MENU * menu, Menu_Options opts) - | - | Return Values : Menu options - +--------------------------------------------------------------------------*/ --NCURSES_EXPORT(Menu_Options) -+MENU_EXPORT(Menu_Options) - menu_opts(const MENU * menu) - { - T((T_CALLED("menu_opts(%p)"), (const void *)menu)); -diff --git a/menu/m_pad.c b/menu/m_pad.c -index 3d5702ae..e56d3748 100644 ---- a/menu/m_pad.c -+++ b/menu/m_pad.c -@@ -59,7 +59,7 @@ MODULE_ID("$Id: m_pad.c,v 1.14 2020/02/02 23:34:34 tom Exp $") - | Return Values : E_OK - success - | E_BAD_ARGUMENT - an invalid value has been passed - +--------------------------------------------------------------------------*/ --NCURSES_EXPORT(int) -+MENU_EXPORT(int) - set_menu_pad(MENU * menu, int pad) - { - bool do_refresh = (menu != (MENU *) 0); -@@ -86,7 +86,7 @@ set_menu_pad(MENU * menu, int pad) - | - | Return Values : The pad character - +--------------------------------------------------------------------------*/ --NCURSES_EXPORT(int) -+MENU_EXPORT(int) - menu_pad(const MENU * menu) - { - T((T_CALLED("menu_pad(%p)"), (const void *)menu)); -diff --git a/menu/m_pattern.c b/menu/m_pattern.c -index 9ff02304..f91f3223 100644 ---- a/menu/m_pattern.c -+++ b/menu/m_pattern.c -@@ -51,7 +51,7 @@ MODULE_ID("$Id: m_pattern.c,v 1.17 2020/02/02 23:34:34 tom Exp $") - | pattern is stored - | PatternString - as expected - +--------------------------------------------------------------------------*/ --NCURSES_EXPORT(char *) -+MENU_EXPORT(char *) - menu_pattern(const MENU * menu) - { - static char empty[] = ""; -@@ -73,7 +73,7 @@ menu_pattern(const MENU * menu) - | E_NOT_CONNECTED - no items connected to menu - | E_NO_MATCH - no item matches pattern - +--------------------------------------------------------------------------*/ --NCURSES_EXPORT(int) -+MENU_EXPORT(int) - set_menu_pattern(MENU * menu, const char *p) - { - ITEM *matchitem; -diff --git a/menu/m_post.c b/menu/m_post.c -index 2cc0ea09..6d81b7c9 100644 ---- a/menu/m_post.c -+++ b/menu/m_post.c -@@ -49,7 +49,7 @@ MODULE_ID("$Id: m_post.c,v 1.32 2020/02/02 23:34:34 tom Exp $") - | - | Return Values : - - +--------------------------------------------------------------------------*/ --NCURSES_EXPORT(void) -+MENU_EXPORT(void) - _nc_Post_Item(const MENU * menu, const ITEM * item) - { - int i; -@@ -197,7 +197,7 @@ _nc_Post_Item(const MENU * menu, const ITEM * item) - | - | Return Values : - - +--------------------------------------------------------------------------*/ --NCURSES_EXPORT(void) -+MENU_EXPORT(void) - _nc_Draw_Menu(const MENU * menu) - { - ITEM *item = menu->items[0]; -@@ -267,7 +267,7 @@ _nc_Draw_Menu(const MENU * menu) - | E_BAD_STATE - Menu in userexit routine - | E_POSTED - Menu already posted - +--------------------------------------------------------------------------*/ --NCURSES_EXPORT(int) -+MENU_EXPORT(int) - post_menu(MENU * menu) - { - T((T_CALLED("post_menu(%p)"), (void *)menu)); -@@ -339,7 +339,7 @@ post_menu(MENU * menu) - | E_BAD_STATE - menu in userexit routine - | E_NOT_POSTED - menu is not posted - +--------------------------------------------------------------------------*/ --NCURSES_EXPORT(int) -+MENU_EXPORT(int) - unpost_menu(MENU * menu) - { - WINDOW *win; -diff --git a/menu/m_req_name.c b/menu/m_req_name.c -index d3f04c1d..beeea0f1 100644 ---- a/menu/m_req_name.c -+++ b/menu/m_req_name.c -@@ -74,7 +74,7 @@ static const char request_names[MAX_MENU_COMMAND - MIN_MENU_COMMAND + 1][14] = - | Return Values : Pointer to name - on success - | NULL - on invalid request code - +--------------------------------------------------------------------------*/ --NCURSES_EXPORT(const char *) -+MENU_EXPORT(const char *) - menu_request_name(int request) - { - T((T_CALLED("menu_request_name(%d)"), request)); -@@ -96,7 +96,7 @@ menu_request_name(int request) - | Return Values : Request Id - on success - | E_NO_MATCH - request not found - +--------------------------------------------------------------------------*/ --NCURSES_EXPORT(int) -+MENU_EXPORT(int) - menu_request_by_name(const char *str) - { - /* because the table is so small, it doesn't really hurt -diff --git a/menu/m_scale.c b/menu/m_scale.c -index e013acd8..ba986955 100644 ---- a/menu/m_scale.c -+++ b/menu/m_scale.c -@@ -51,7 +51,7 @@ MODULE_ID("$Id: m_scale.c,v 1.11 2020/02/02 23:34:34 tom Exp $") - | E_BAD_ARGUMENT - invalid menu pointer - | E_NOT_CONNECTED - no items are connected to menu - +--------------------------------------------------------------------------*/ --NCURSES_EXPORT(int) -+MENU_EXPORT(int) - scale_menu(const MENU * menu, int *rows, int *cols) - { - T((T_CALLED("scale_menu(%p,%p,%p)"), -diff --git a/menu/m_spacing.c b/menu/m_spacing.c -index 9bb746a0..6d68e268 100644 ---- a/menu/m_spacing.c -+++ b/menu/m_spacing.c -@@ -52,7 +52,7 @@ MODULE_ID("$Id: m_spacing.c,v 1.20 2020/02/02 23:34:34 tom Exp $") - | - | Return Values : E_OK - on success - +--------------------------------------------------------------------------*/ --NCURSES_EXPORT(int) -+MENU_EXPORT(int) - set_menu_spacing(MENU * menu, int s_desc, int s_row, int s_col) - { - MENU *m; /* split for ATAC workaround */ -@@ -87,7 +87,7 @@ set_menu_spacing(MENU * menu, int s_desc, int s_row, int s_col) - | - | Return Values : E_OK - on success - +--------------------------------------------------------------------------*/ --NCURSES_EXPORT(int) -+MENU_EXPORT(int) - menu_spacing(const MENU * menu, int *s_desc, int *s_row, int *s_col) - { - const MENU *m; /* split for ATAC workaround */ -diff --git a/menu/m_sub.c b/menu/m_sub.c -index 4658e90e..e69994d5 100644 ---- a/menu/m_sub.c -+++ b/menu/m_sub.c -@@ -49,7 +49,7 @@ MODULE_ID("$Id: m_sub.c,v 1.13 2020/02/02 23:34:34 tom Exp $") - | Return Values : E_OK - success - | E_POSTED - menu is already posted - +--------------------------------------------------------------------------*/ --NCURSES_EXPORT(int) -+MENU_EXPORT(int) - set_menu_sub(MENU * menu, WINDOW *win) - { - T((T_CALLED("set_menu_sub(%p,%p)"), (void *)menu, (void *)win)); -@@ -89,7 +89,7 @@ set_menu_sub(MENU * menu, WINDOW *win) - | - | Return Values : NULL on error, otherwise a pointer to the window - +--------------------------------------------------------------------------*/ --NCURSES_EXPORT(WINDOW *) -+MENU_EXPORT(WINDOW *) - menu_sub(const MENU * menu) - { - const MENU *m = Normalize_Menu(menu); -diff --git a/menu/m_trace.c b/menu/m_trace.c -index f5332b18..f4d3373d 100644 ---- a/menu/m_trace.c -+++ b/menu/m_trace.c -@@ -35,35 +35,35 @@ - - MODULE_ID("$Id: m_trace.c,v 1.7 2020/02/02 23:34:34 tom Exp $") - --NCURSES_EXPORT(ITEM *) -+MENU_EXPORT(ITEM *) - _nc_retrace_item(ITEM * code) - { - T((T_RETURN("%p"), (void *)code)); - return code; - } - --NCURSES_EXPORT(ITEM **) -+MENU_EXPORT(ITEM **) - _nc_retrace_item_ptr(ITEM ** code) - { - T((T_RETURN("%p"), (void *)code)); - return code; - } - --NCURSES_EXPORT(Item_Options) -+MENU_EXPORT(Item_Options) - _nc_retrace_item_opts(Item_Options code) - { - T((T_RETURN("%d"), code)); - return code; - } - --NCURSES_EXPORT(MENU *) -+MENU_EXPORT(MENU *) - _nc_retrace_menu(MENU * code) - { - T((T_RETURN("%p"), (void *)code)); - return code; - } - --NCURSES_EXPORT(Menu_Hook) -+MENU_EXPORT(Menu_Hook) - _nc_retrace_menu_hook(Menu_Hook code) - { - TR_FUNC_BFR(1); -@@ -71,7 +71,7 @@ _nc_retrace_menu_hook(Menu_Hook code) - return code; - } - --NCURSES_EXPORT(Menu_Options) -+MENU_EXPORT(Menu_Options) - _nc_retrace_menu_opts(Menu_Options code) - { - T((T_RETURN("%d"), code)); -diff --git a/menu/m_userptr.c b/menu/m_userptr.c -index df3a45f8..6b1ca551 100644 ---- a/menu/m_userptr.c -+++ b/menu/m_userptr.c -@@ -49,7 +49,7 @@ MODULE_ID("$Id: m_userptr.c,v 1.19 2020/02/02 23:34:34 tom Exp $") - | - | Return Values : E_OK - success - +--------------------------------------------------------------------------*/ --NCURSES_EXPORT(int) -+MENU_EXPORT(int) - set_menu_userptr(MENU * menu, void *userptr) - { - T((T_CALLED("set_menu_userptr(%p,%p)"), (void *)menu, (void *)userptr)); -@@ -67,7 +67,7 @@ set_menu_userptr(MENU * menu, void *userptr) - | Return Values : Value of the pointer. If no such pointer has been set, - | NULL is returned - +--------------------------------------------------------------------------*/ --NCURSES_EXPORT(void *) -+MENU_EXPORT(void *) - menu_userptr(const MENU * menu) - { - T((T_CALLED("menu_userptr(%p)"), (const void *)menu)); -diff --git a/menu/m_win.c b/menu/m_win.c -index f06c5808..e67cc92e 100644 ---- a/menu/m_win.c -+++ b/menu/m_win.c -@@ -49,7 +49,7 @@ MODULE_ID("$Id: m_win.c,v 1.18 2020/02/02 23:34:34 tom Exp $") - | Return Values : E_OK - success - | E_POSTED - menu is already posted - +--------------------------------------------------------------------------*/ --NCURSES_EXPORT(int) -+MENU_EXPORT(int) - set_menu_win(MENU * menu, WINDOW *win) - { - T((T_CALLED("set_menu_win(%p,%p)"), (void *)menu, (void *)win)); -@@ -89,7 +89,7 @@ set_menu_win(MENU * menu, WINDOW *win) - | - | Return Values : NULL on error, otherwise pointer to window - +--------------------------------------------------------------------------*/ --NCURSES_EXPORT(WINDOW *) -+MENU_EXPORT(WINDOW *) - menu_win(const MENU * menu) - { - const MENU *m = Normalize_Menu(menu); -diff --git a/menu/menu.h b/menu/menu.h -index b2e845c6..09bc6c0a 100644 ---- a/menu/menu.h -+++ b/menu/menu.h -@@ -47,6 +47,19 @@ - extern "C" { - #endif - -+#include "ncurses_exports.h" -+ -+#if defined(BUILDING_MENU) -+# define MENU_IMPEXP NCURSES_EXPORT_GENERAL_EXPORT -+#else -+# define MENU_IMPEXP NCURSES_EXPORT_GENERAL_IMPORT -+#endif -+ -+#define MENU_WRAPPED_VAR(type,name) extern MENU_IMPEXP type NCURSES_PUBLIC_VAR(name)(void) -+ -+#define MENU_EXPORT(type) MENU_IMPEXP type NCURSES_API -+#define MENU_EXPORT_VAR(type) MENU_IMPEXP type -+ - typedef int Menu_Options; - typedef int Item_Options; - -@@ -183,85 +196,85 @@ MENU; - - /* --------- prototypes for libmenu functions ----------------------------- */ - --extern NCURSES_EXPORT(ITEM **) menu_items (const MENU *); --extern NCURSES_EXPORT(ITEM *) current_item (const MENU *); --extern NCURSES_EXPORT(ITEM *) new_item (const char *,const char *); -- --extern NCURSES_EXPORT(MENU *) new_menu (ITEM **); -- --extern NCURSES_EXPORT(Item_Options) item_opts (const ITEM *); --extern NCURSES_EXPORT(Menu_Options) menu_opts (const MENU *); -- --extern NCURSES_EXPORT(Menu_Hook) item_init (const MENU *); --extern NCURSES_EXPORT(Menu_Hook) item_term (const MENU *); --extern NCURSES_EXPORT(Menu_Hook) menu_init (const MENU *); --extern NCURSES_EXPORT(Menu_Hook) menu_term (const MENU *); -- --extern NCURSES_EXPORT(WINDOW *) menu_sub (const MENU *); --extern NCURSES_EXPORT(WINDOW *) menu_win (const MENU *); -- --extern NCURSES_EXPORT(const char *) item_description (const ITEM *); --extern NCURSES_EXPORT(const char *) item_name (const ITEM *); --extern NCURSES_EXPORT(const char *) menu_mark (const MENU *); --extern NCURSES_EXPORT(const char *) menu_request_name (int); -- --extern NCURSES_EXPORT(char *) menu_pattern (const MENU *); -- --extern NCURSES_EXPORT(void *) menu_userptr (const MENU *); --extern NCURSES_EXPORT(void *) item_userptr (const ITEM *); -- --extern NCURSES_EXPORT(chtype) menu_back (const MENU *); --extern NCURSES_EXPORT(chtype) menu_fore (const MENU *); --extern NCURSES_EXPORT(chtype) menu_grey (const MENU *); -- --extern NCURSES_EXPORT(int) free_item (ITEM *); --extern NCURSES_EXPORT(int) free_menu (MENU *); --extern NCURSES_EXPORT(int) item_count (const MENU *); --extern NCURSES_EXPORT(int) item_index (const ITEM *); --extern NCURSES_EXPORT(int) item_opts_off (ITEM *,Item_Options); --extern NCURSES_EXPORT(int) item_opts_on (ITEM *,Item_Options); --extern NCURSES_EXPORT(int) menu_driver (MENU *,int); --extern NCURSES_EXPORT(int) menu_opts_off (MENU *,Menu_Options); --extern NCURSES_EXPORT(int) menu_opts_on (MENU *,Menu_Options); --extern NCURSES_EXPORT(int) menu_pad (const MENU *); --extern NCURSES_EXPORT(int) pos_menu_cursor (const MENU *); --extern NCURSES_EXPORT(int) post_menu (MENU *); --extern NCURSES_EXPORT(int) scale_menu (const MENU *,int *,int *); --extern NCURSES_EXPORT(int) set_current_item (MENU *menu,ITEM *item); --extern NCURSES_EXPORT(int) set_item_init (MENU *, Menu_Hook); --extern NCURSES_EXPORT(int) set_item_opts (ITEM *,Item_Options); --extern NCURSES_EXPORT(int) set_item_term (MENU *, Menu_Hook); --extern NCURSES_EXPORT(int) set_item_userptr (ITEM *, void *); --extern NCURSES_EXPORT(int) set_item_value (ITEM *,bool); --extern NCURSES_EXPORT(int) set_menu_back (MENU *,chtype); --extern NCURSES_EXPORT(int) set_menu_fore (MENU *,chtype); --extern NCURSES_EXPORT(int) set_menu_format (MENU *,int,int); --extern NCURSES_EXPORT(int) set_menu_grey (MENU *,chtype); --extern NCURSES_EXPORT(int) set_menu_init (MENU *, Menu_Hook); --extern NCURSES_EXPORT(int) set_menu_items (MENU *,ITEM **); --extern NCURSES_EXPORT(int) set_menu_mark (MENU *, const char *); --extern NCURSES_EXPORT(int) set_menu_opts (MENU *,Menu_Options); --extern NCURSES_EXPORT(int) set_menu_pad (MENU *,int); --extern NCURSES_EXPORT(int) set_menu_pattern (MENU *,const char *); --extern NCURSES_EXPORT(int) set_menu_sub (MENU *,WINDOW *); --extern NCURSES_EXPORT(int) set_menu_term (MENU *, Menu_Hook); --extern NCURSES_EXPORT(int) set_menu_userptr (MENU *,void *); --extern NCURSES_EXPORT(int) set_menu_win (MENU *,WINDOW *); --extern NCURSES_EXPORT(int) set_top_row (MENU *,int); --extern NCURSES_EXPORT(int) top_row (const MENU *); --extern NCURSES_EXPORT(int) unpost_menu (MENU *); --extern NCURSES_EXPORT(int) menu_request_by_name (const char *); --extern NCURSES_EXPORT(int) set_menu_spacing (MENU *,int,int,int); --extern NCURSES_EXPORT(int) menu_spacing (const MENU *,int *,int *,int *); -- -- --extern NCURSES_EXPORT(bool) item_value (const ITEM *); --extern NCURSES_EXPORT(bool) item_visible (const ITEM *); -- --extern NCURSES_EXPORT(void) menu_format (const MENU *,int *,int *); -+extern MENU_EXPORT(ITEM **) menu_items (const MENU *); -+extern MENU_EXPORT(ITEM *) current_item (const MENU *); -+extern MENU_EXPORT(ITEM *) new_item (const char *,const char *); -+ -+extern MENU_EXPORT(MENU *) new_menu (ITEM **); -+ -+extern MENU_EXPORT(Item_Options) item_opts (const ITEM *); -+extern MENU_EXPORT(Menu_Options) menu_opts (const MENU *); -+ -+extern MENU_EXPORT(Menu_Hook) item_init (const MENU *); -+extern MENU_EXPORT(Menu_Hook) item_term (const MENU *); -+extern MENU_EXPORT(Menu_Hook) menu_init (const MENU *); -+extern MENU_EXPORT(Menu_Hook) menu_term (const MENU *); -+ -+extern MENU_EXPORT(WINDOW *) menu_sub (const MENU *); -+extern MENU_EXPORT(WINDOW *) menu_win (const MENU *); -+ -+extern MENU_EXPORT(const char *) item_description (const ITEM *); -+extern MENU_EXPORT(const char *) item_name (const ITEM *); -+extern MENU_EXPORT(const char *) menu_mark (const MENU *); -+extern MENU_EXPORT(const char *) menu_request_name (int); -+ -+extern MENU_EXPORT(char *) menu_pattern (const MENU *); -+ -+extern MENU_EXPORT(void *) menu_userptr (const MENU *); -+extern MENU_EXPORT(void *) item_userptr (const ITEM *); -+ -+extern MENU_EXPORT(chtype) menu_back (const MENU *); -+extern MENU_EXPORT(chtype) menu_fore (const MENU *); -+extern MENU_EXPORT(chtype) menu_grey (const MENU *); -+ -+extern MENU_EXPORT(int) free_item (ITEM *); -+extern MENU_EXPORT(int) free_menu (MENU *); -+extern MENU_EXPORT(int) item_count (const MENU *); -+extern MENU_EXPORT(int) item_index (const ITEM *); -+extern MENU_EXPORT(int) item_opts_off (ITEM *,Item_Options); -+extern MENU_EXPORT(int) item_opts_on (ITEM *,Item_Options); -+extern MENU_EXPORT(int) menu_driver (MENU *,int); -+extern MENU_EXPORT(int) menu_opts_off (MENU *,Menu_Options); -+extern MENU_EXPORT(int) menu_opts_on (MENU *,Menu_Options); -+extern MENU_EXPORT(int) menu_pad (const MENU *); -+extern MENU_EXPORT(int) pos_menu_cursor (const MENU *); -+extern MENU_EXPORT(int) post_menu (MENU *); -+extern MENU_EXPORT(int) scale_menu (const MENU *,int *,int *); -+extern MENU_EXPORT(int) set_current_item (MENU *menu,ITEM *item); -+extern MENU_EXPORT(int) set_item_init (MENU *, Menu_Hook); -+extern MENU_EXPORT(int) set_item_opts (ITEM *,Item_Options); -+extern MENU_EXPORT(int) set_item_term (MENU *, Menu_Hook); -+extern MENU_EXPORT(int) set_item_userptr (ITEM *, void *); -+extern MENU_EXPORT(int) set_item_value (ITEM *,bool); -+extern MENU_EXPORT(int) set_menu_back (MENU *,chtype); -+extern MENU_EXPORT(int) set_menu_fore (MENU *,chtype); -+extern MENU_EXPORT(int) set_menu_format (MENU *,int,int); -+extern MENU_EXPORT(int) set_menu_grey (MENU *,chtype); -+extern MENU_EXPORT(int) set_menu_init (MENU *, Menu_Hook); -+extern MENU_EXPORT(int) set_menu_items (MENU *,ITEM **); -+extern MENU_EXPORT(int) set_menu_mark (MENU *, const char *); -+extern MENU_EXPORT(int) set_menu_opts (MENU *,Menu_Options); -+extern MENU_EXPORT(int) set_menu_pad (MENU *,int); -+extern MENU_EXPORT(int) set_menu_pattern (MENU *,const char *); -+extern MENU_EXPORT(int) set_menu_sub (MENU *,WINDOW *); -+extern MENU_EXPORT(int) set_menu_term (MENU *, Menu_Hook); -+extern MENU_EXPORT(int) set_menu_userptr (MENU *,void *); -+extern MENU_EXPORT(int) set_menu_win (MENU *,WINDOW *); -+extern MENU_EXPORT(int) set_top_row (MENU *,int); -+extern MENU_EXPORT(int) top_row (const MENU *); -+extern MENU_EXPORT(int) unpost_menu (MENU *); -+extern MENU_EXPORT(int) menu_request_by_name (const char *); -+extern MENU_EXPORT(int) set_menu_spacing (MENU *,int,int,int); -+extern MENU_EXPORT(int) menu_spacing (const MENU *,int *,int *,int *); -+ -+ -+extern MENU_EXPORT(bool) item_value (const ITEM *); -+extern MENU_EXPORT(bool) item_visible (const ITEM *); -+ -+extern MENU_EXPORT(void) menu_format (const MENU *,int *,int *); - - #if NCURSES_SP_FUNCS --extern NCURSES_EXPORT(MENU *) NCURSES_SP_NAME(new_menu) (SCREEN*, ITEM **); -+extern MENU_EXPORT(MENU *) NCURSES_SP_NAME(new_menu) (SCREEN*, ITEM **); - #endif - - #ifdef __cplusplus -diff --git a/menu/menu.priv.h b/menu/menu.priv.h -index d084565a..eb653ba4 100644 ---- a/menu/menu.priv.h -+++ b/menu/menu.priv.h -@@ -52,8 +52,8 @@ - /* Backspace code */ - #define BS (8) - --extern NCURSES_EXPORT_VAR(ITEM) _nc_Default_Item; --extern NCURSES_EXPORT_VAR(MENU) _nc_Default_Menu; -+extern MENU_EXPORT_VAR(ITEM) _nc_Default_Item; -+extern MENU_EXPORT_VAR(MENU) _nc_Default_Menu; - - /* Normalize item to default if none was given */ - #define Normalize_Item( item ) ((item)=(item)?(item):&_nc_Default_Item) -@@ -120,17 +120,17 @@ extern NCURSES_EXPORT_VAR(MENU) _nc_Default_Menu; - #define UChar(c) ((unsigned char)(c)) - - /* Internal functions. */ --extern NCURSES_EXPORT(void) _nc_Draw_Menu (const MENU *); --extern NCURSES_EXPORT(void) _nc_Show_Menu (const MENU *); --extern NCURSES_EXPORT(void) _nc_Calculate_Item_Length_and_Width (MENU *); --extern NCURSES_EXPORT(int) _nc_Calculate_Text_Width(const TEXT *); --extern NCURSES_EXPORT(void) _nc_Post_Item (const MENU *, const ITEM *); --extern NCURSES_EXPORT(bool) _nc_Connect_Items (MENU *, ITEM **); --extern NCURSES_EXPORT(void) _nc_Disconnect_Items (MENU *); --extern NCURSES_EXPORT(void) _nc_New_TopRow_and_CurrentItem (MENU *,int, ITEM *); --extern NCURSES_EXPORT(void) _nc_Link_Items (MENU *); --extern NCURSES_EXPORT(int) _nc_Match_Next_Character_In_Item_Name (MENU*,int,ITEM**); --extern NCURSES_EXPORT(int) _nc_menu_cursor_pos (const MENU* menu, const ITEM* item, -+extern MENU_EXPORT(void) _nc_Draw_Menu (const MENU *); -+extern MENU_EXPORT(void) _nc_Show_Menu (const MENU *); -+extern MENU_EXPORT(void) _nc_Calculate_Item_Length_and_Width (MENU *); -+extern MENU_EXPORT(int) _nc_Calculate_Text_Width(const TEXT *); -+extern MENU_EXPORT(void) _nc_Post_Item (const MENU *, const ITEM *); -+extern MENU_EXPORT(bool) _nc_Connect_Items (MENU *, ITEM **); -+extern MENU_EXPORT(void) _nc_Disconnect_Items (MENU *); -+extern MENU_EXPORT(void) _nc_New_TopRow_and_CurrentItem (MENU *,int, ITEM *); -+extern MENU_EXPORT(void) _nc_Link_Items (MENU *); -+extern MENU_EXPORT(int) _nc_Match_Next_Character_In_Item_Name (MENU*,int,ITEM**); -+extern MENU_EXPORT(int) _nc_menu_cursor_pos (const MENU* menu, const ITEM* item, - int* pY, int* pX); - - #ifdef TRACE -@@ -142,12 +142,12 @@ extern NCURSES_EXPORT(int) _nc_menu_cursor_pos (const MENU* menu, const ITEM* i - #define returnMenuHook(code) TRACE_RETURN1(code,menu_hook) - #define returnMenuOpts(code) TRACE_RETURN1(code,menu_opts) - --extern NCURSES_EXPORT(ITEM *) _nc_retrace_item (ITEM *); --extern NCURSES_EXPORT(ITEM **) _nc_retrace_item_ptr (ITEM **); --extern NCURSES_EXPORT(Item_Options) _nc_retrace_item_opts (Item_Options); --extern NCURSES_EXPORT(MENU *) _nc_retrace_menu (MENU *); --extern NCURSES_EXPORT(Menu_Hook) _nc_retrace_menu_hook (Menu_Hook); --extern NCURSES_EXPORT(Menu_Options) _nc_retrace_menu_opts (Menu_Options); -+extern MENU_EXPORT(ITEM *) _nc_retrace_item (ITEM *); -+extern MENU_EXPORT(ITEM **) _nc_retrace_item_ptr (ITEM **); -+extern MENU_EXPORT(Item_Options) _nc_retrace_item_opts (Item_Options); -+extern MENU_EXPORT(MENU *) _nc_retrace_menu (MENU *); -+extern MENU_EXPORT(Menu_Hook) _nc_retrace_menu_hook (Menu_Hook); -+extern MENU_EXPORT(Menu_Options) _nc_retrace_menu_opts (Menu_Options); - - #else /* !TRACE */ - -diff --git a/panel/p_above.c b/panel/p_above.c -index 12b5b87b..704863a7 100644 ---- a/panel/p_above.c -+++ b/panel/p_above.c -@@ -40,7 +40,7 @@ - MODULE_ID("$Id: p_above.c,v 1.10 2020/02/02 23:34:34 tom Exp $") - - #if NCURSES_SP_FUNCS --NCURSES_EXPORT(PANEL *) -+PANEL_EXPORT(PANEL *) - ground_panel(SCREEN * sp) - { - T((T_CALLED("ground_panel(%p)"), (void *)sp)); -@@ -63,7 +63,7 @@ ground_panel(SCREEN * sp) - } - #endif - --NCURSES_EXPORT(PANEL *) -+PANEL_EXPORT(PANEL *) - panel_above(const PANEL * pan) - { - PANEL *result; -diff --git a/panel/p_below.c b/panel/p_below.c -index a8b1ef47..972ec836 100644 ---- a/panel/p_below.c -+++ b/panel/p_below.c -@@ -40,7 +40,7 @@ - MODULE_ID("$Id: p_below.c,v 1.10 2020/02/02 23:34:34 tom Exp $") - - #if NCURSES_SP_FUNCS --NCURSES_EXPORT(PANEL *) -+PANEL_EXPORT(PANEL *) - ceiling_panel(SCREEN * sp) - { - T((T_CALLED("ceiling_panel(%p)"), (void *)sp)); -@@ -61,7 +61,7 @@ ceiling_panel(SCREEN * sp) - } - #endif - --NCURSES_EXPORT(PANEL *) -+PANEL_EXPORT(PANEL *) - panel_below(const PANEL * pan) - { - PANEL *result; -diff --git a/panel/p_bottom.c b/panel/p_bottom.c -index a69ac9f4..c4a170ad 100644 ---- a/panel/p_bottom.c -+++ b/panel/p_bottom.c -@@ -40,7 +40,7 @@ - - MODULE_ID("$Id: p_bottom.c,v 1.14 2020/02/02 23:34:34 tom Exp $") - --NCURSES_EXPORT(int) -+PANEL_EXPORT(int) - bottom_panel(PANEL * pan) - { - int err = OK; -diff --git a/panel/p_delete.c b/panel/p_delete.c -index 6b122a6c..e58875b1 100644 ---- a/panel/p_delete.c -+++ b/panel/p_delete.c -@@ -40,7 +40,7 @@ - - MODULE_ID("$Id: p_delete.c,v 1.11 2020/02/02 23:34:34 tom Exp $") - --NCURSES_EXPORT(int) -+PANEL_EXPORT(int) - del_panel(PANEL * pan) - { - int err = OK; -diff --git a/panel/p_hidden.c b/panel/p_hidden.c -index ddb23b13..a43ea481 100644 ---- a/panel/p_hidden.c -+++ b/panel/p_hidden.c -@@ -40,7 +40,7 @@ - - MODULE_ID("$Id: p_hidden.c,v 1.10 2020/02/02 23:34:34 tom Exp $") - --NCURSES_EXPORT(int) -+PANEL_EXPORT(int) - panel_hidden(const PANEL * pan) - { - int rc = ERR; -diff --git a/panel/p_hide.c b/panel/p_hide.c -index fc26f752..35e738e3 100644 ---- a/panel/p_hide.c -+++ b/panel/p_hide.c -@@ -39,7 +39,7 @@ - - MODULE_ID("$Id: p_hide.c,v 1.12 2020/02/02 23:34:34 tom Exp $") - --NCURSES_EXPORT(int) -+PANEL_EXPORT(int) - hide_panel(register PANEL * pan) - { - int err = ERR; -diff --git a/panel/p_move.c b/panel/p_move.c -index 02830bf5..77127be7 100644 ---- a/panel/p_move.c -+++ b/panel/p_move.c -@@ -40,7 +40,7 @@ - - MODULE_ID("$Id: p_move.c,v 1.12 2020/02/02 23:34:34 tom Exp $") - --NCURSES_EXPORT(int) -+PANEL_EXPORT(int) - move_panel(PANEL * pan, int starty, int startx) - { - int rc = ERR; -diff --git a/panel/p_new.c b/panel/p_new.c -index d2f8d036..659bdeb9 100644 ---- a/panel/p_new.c -+++ b/panel/p_new.c -@@ -89,7 +89,7 @@ root_panel(NCURSES_SP_DCL0) - return _nc_stdscr_pseudo_panel; - } - --NCURSES_EXPORT(PANEL *) -+PANEL_EXPORT(PANEL *) - new_panel(WINDOW *win) - { - PANEL *pan = (PANEL *) 0; -diff --git a/panel/p_replace.c b/panel/p_replace.c -index 5acbccf8..362a2ef8 100644 ---- a/panel/p_replace.c -+++ b/panel/p_replace.c -@@ -39,7 +39,7 @@ - - MODULE_ID("$Id: p_replace.c,v 1.12 2020/02/02 23:34:34 tom Exp $") - --NCURSES_EXPORT(int) -+PANEL_EXPORT(int) - replace_panel(PANEL * pan, WINDOW *win) - { - int rc = ERR; -diff --git a/panel/p_show.c b/panel/p_show.c -index 933bf5aa..bfee2cb8 100644 ---- a/panel/p_show.c -+++ b/panel/p_show.c -@@ -39,7 +39,7 @@ - - MODULE_ID("$Id: p_show.c,v 1.14 2020/02/02 23:34:34 tom Exp $") - --NCURSES_EXPORT(int) -+PANEL_EXPORT(int) - show_panel(PANEL * pan) - { - int err = ERR; -diff --git a/panel/p_top.c b/panel/p_top.c -index 09e89fcc..438086c1 100644 ---- a/panel/p_top.c -+++ b/panel/p_top.c -@@ -39,7 +39,7 @@ - - MODULE_ID("$Id: p_top.c,v 1.7 2020/02/02 23:34:34 tom Exp $") - --NCURSES_EXPORT(int) -+PANEL_EXPORT(int) - top_panel(PANEL * pan) - { - T((T_CALLED("top_panel(%p)"), (void *)pan)); -diff --git a/panel/p_update.c b/panel/p_update.c -index 3fe4770b..ca856795 100644 ---- a/panel/p_update.c -+++ b/panel/p_update.c -@@ -40,7 +40,7 @@ - - MODULE_ID("$Id: p_update.c,v 1.12 2020/02/02 23:34:34 tom Exp $") - --NCURSES_EXPORT(void) -+PANEL_EXPORT(void) - NCURSES_SP_NAME(update_panels) (NCURSES_SP_DCL0) - { - PANEL *pan; -@@ -71,7 +71,7 @@ NCURSES_SP_NAME(update_panels) (NCURSES_SP_DCL0) - } - - #if NCURSES_SP_FUNCS --NCURSES_EXPORT(void) -+PANEL_EXPORT(void) - update_panels(void) - { - NCURSES_SP_NAME(update_panels) (CURRENT_SCREEN); -diff --git a/panel/p_user.c b/panel/p_user.c -index 633431ea..e6122d33 100644 ---- a/panel/p_user.c -+++ b/panel/p_user.c -@@ -39,7 +39,7 @@ - - MODULE_ID("$Id: p_user.c,v 1.9 2020/02/02 23:34:34 tom Exp $") - --NCURSES_EXPORT(int) -+PANEL_EXPORT(int) - set_panel_userptr(PANEL * pan, NCURSES_CONST void *uptr) - { - T((T_CALLED("set_panel_userptr(%p,%p)"), (void *)pan, (NCURSES_CONST void *)uptr)); -@@ -49,7 +49,7 @@ set_panel_userptr(PANEL * pan, NCURSES_CONST void *uptr) - returnCode(OK); - } - --NCURSES_EXPORT(NCURSES_CONST void *) -+PANEL_EXPORT(NCURSES_CONST void *) - panel_userptr(const PANEL * pan) - { - T((T_CALLED("panel_userptr(%p)"), (const void *)pan)); -diff --git a/panel/p_win.c b/panel/p_win.c -index 023a71c9..0bc838f5 100644 ---- a/panel/p_win.c -+++ b/panel/p_win.c -@@ -39,7 +39,7 @@ - - MODULE_ID("$Id: p_win.c,v 1.7 2020/02/02 23:34:34 tom Exp $") - --NCURSES_EXPORT(WINDOW *) -+PANEL_EXPORT(WINDOW *) - panel_window(const PANEL * pan) - { - T((T_CALLED("panel_window(%p)"), (const void *)pan)); -diff --git a/panel/panel.c b/panel/panel.c -index a0e632d2..5d66476e 100644 ---- a/panel/panel.c -+++ b/panel/panel.c -@@ -43,7 +43,7 @@ MODULE_ID("$Id: panel.c,v 1.27 2020/02/02 23:34:34 tom Exp $") - _nc_retrace_panel (pan) - --------------------------------------------------------------------------*/ - #ifdef TRACE --NCURSES_EXPORT(PANEL *) -+PANEL_EXPORT(PANEL *) - _nc_retrace_panel(PANEL * pan) - { - T((T_RETURN("%p"), (void *)pan)); -@@ -56,7 +56,7 @@ _nc_retrace_panel(PANEL * pan) - --------------------------------------------------------------------------*/ - #ifdef TRACE - #ifndef TRACE_TXT --NCURSES_EXPORT(const char *) -+PANEL_EXPORT(const char *) - _nc_my_visbuf(const void *ptr) - { - char temp[32]; -@@ -74,7 +74,7 @@ _nc_my_visbuf(const void *ptr) - dPanel(text,pan) - --------------------------------------------------------------------------*/ - #ifdef TRACE --NCURSES_EXPORT(void) -+PANEL_EXPORT(void) - _nc_dPanel(const char *text, const PANEL * pan) - { - _tracef("%s id=%s b=%s a=%s y=%d x=%d", -@@ -89,7 +89,7 @@ _nc_dPanel(const char *text, const PANEL * pan) - dStack(fmt,num,pan) - --------------------------------------------------------------------------*/ - #ifdef TRACE --NCURSES_EXPORT(void) -+PANEL_EXPORT(void) - _nc_dStack(const char *fmt, int num, const PANEL * pan) - { - char s80[80]; -@@ -115,7 +115,7 @@ _nc_dStack(const char *fmt, int num, const PANEL * pan) - Wnoutrefresh(pan) - debugging hook for wnoutrefresh - --------------------------------------------------------------------------*/ - #ifdef TRACE --NCURSES_EXPORT(void) -+PANEL_EXPORT(void) - _nc_Wnoutrefresh(const PANEL * pan) - { - dPanel("wnoutrefresh", pan); -@@ -127,7 +127,7 @@ _nc_Wnoutrefresh(const PANEL * pan) - Touchpan(pan) - --------------------------------------------------------------------------*/ - #ifdef TRACE --NCURSES_EXPORT(void) -+PANEL_EXPORT(void) - _nc_Touchpan(const PANEL * pan) - { - dPanel("Touchpan", pan); -@@ -139,7 +139,7 @@ _nc_Touchpan(const PANEL * pan) - Touchline(pan,start,count) - --------------------------------------------------------------------------*/ - #ifdef TRACE --NCURSES_EXPORT(void) -+PANEL_EXPORT(void) - _nc_Touchline(const PANEL * pan, int start, int count) - { - char s80[80]; -diff --git a/panel/panel.h b/panel/panel.h -index 2eebe178..042cf5d4 100644 ---- a/panel/panel.h -+++ b/panel/panel.h -@@ -57,27 +57,40 @@ PANEL; - extern "C" { - #endif - --extern NCURSES_EXPORT(WINDOW*) panel_window (const PANEL *); --extern NCURSES_EXPORT(void) update_panels (void); --extern NCURSES_EXPORT(int) hide_panel (PANEL *); --extern NCURSES_EXPORT(int) show_panel (PANEL *); --extern NCURSES_EXPORT(int) del_panel (PANEL *); --extern NCURSES_EXPORT(int) top_panel (PANEL *); --extern NCURSES_EXPORT(int) bottom_panel (PANEL *); --extern NCURSES_EXPORT(PANEL*) new_panel (WINDOW *); --extern NCURSES_EXPORT(PANEL*) panel_above (const PANEL *); --extern NCURSES_EXPORT(PANEL*) panel_below (const PANEL *); --extern NCURSES_EXPORT(int) set_panel_userptr (PANEL *, NCURSES_CONST void *); --extern NCURSES_EXPORT(NCURSES_CONST void*) panel_userptr (const PANEL *); --extern NCURSES_EXPORT(int) move_panel (PANEL *, int, int); --extern NCURSES_EXPORT(int) replace_panel (PANEL *,WINDOW *); --extern NCURSES_EXPORT(int) panel_hidden (const PANEL *); -+#include "ncurses_exports.h" -+ -+#if defined(BUILDING_PANEL) -+# define PANEL_IMPEXP NCURSES_EXPORT_GENERAL_EXPORT -+#else -+# define PANEL_IMPEXP NCURSES_EXPORT_GENERAL_IMPORT -+#endif -+ -+#define PANEL_WRAPPED_VAR(type,name) extern PANEL_IMPEXP type NCURSES_PUBLIC_VAR(name)(void) -+ -+#define PANEL_EXPORT(type) PANEL_IMPEXP type NCURSES_API -+#define PANEL_EXPORT_VAR(type) PANEL_IMPEXP type -+ -+extern PANEL_EXPORT(WINDOW*) panel_window (const PANEL *); -+extern PANEL_EXPORT(void) update_panels (void); -+extern PANEL_EXPORT(int) hide_panel (PANEL *); -+extern PANEL_EXPORT(int) show_panel (PANEL *); -+extern PANEL_EXPORT(int) del_panel (PANEL *); -+extern PANEL_EXPORT(int) top_panel (PANEL *); -+extern PANEL_EXPORT(int) bottom_panel (PANEL *); -+extern PANEL_EXPORT(PANEL*) new_panel (WINDOW *); -+extern PANEL_EXPORT(PANEL*) panel_above (const PANEL *); -+extern PANEL_EXPORT(PANEL*) panel_below (const PANEL *); -+extern PANEL_EXPORT(int) set_panel_userptr (PANEL *, NCURSES_CONST void *); -+extern PANEL_EXPORT(NCURSES_CONST void*) panel_userptr (const PANEL *); -+extern PANEL_EXPORT(int) move_panel (PANEL *, int, int); -+extern PANEL_EXPORT(int) replace_panel (PANEL *,WINDOW *); -+extern PANEL_EXPORT(int) panel_hidden (const PANEL *); - - #if NCURSES_SP_FUNCS --extern NCURSES_EXPORT(PANEL *) ground_panel(SCREEN *); --extern NCURSES_EXPORT(PANEL *) ceiling_panel(SCREEN *); -+extern PANEL_EXPORT(PANEL *) ground_panel(SCREEN *); -+extern PANEL_EXPORT(PANEL *) ceiling_panel(SCREEN *); - --extern NCURSES_EXPORT(void) NCURSES_SP_NAME(update_panels) (SCREEN*); -+extern PANEL_EXPORT(void) NCURSES_SP_NAME(update_panels) (SCREEN*); - #endif - - #if defined(__cplusplus) -diff --git a/panel/panel.priv.h b/panel/panel.priv.h -index c8e3ea79..bf9df442 100644 ---- a/panel/panel.priv.h -+++ b/panel/panel.priv.h -@@ -50,7 +50,7 @@ struct screen; /* forward declaration */ - #include "panel.h" - - #ifdef TRACE -- extern NCURSES_EXPORT(const char *) _nc_my_visbuf (const void *); -+ extern PANEL_EXPORT(const char *) _nc_my_visbuf (const void *); - # ifdef TRACE_TXT - # define USER_PTR(ptr) _nc_visbuf((const char *)ptr) - # else -@@ -59,12 +59,12 @@ struct screen; /* forward declaration */ - - # define returnPanel(code) TRACE_RETURN1(code,panel) - -- extern NCURSES_EXPORT(PANEL *) _nc_retrace_panel (PANEL *); -- extern NCURSES_EXPORT(void) _nc_dPanel (const char*, const PANEL*); -- extern NCURSES_EXPORT(void) _nc_dStack (const char*, int, const PANEL*); -- extern NCURSES_EXPORT(void) _nc_Wnoutrefresh (const PANEL*); -- extern NCURSES_EXPORT(void) _nc_Touchpan (const PANEL*); -- extern NCURSES_EXPORT(void) _nc_Touchline (const PANEL*, int, int); -+ extern PANEL_EXPORT(PANEL *) _nc_retrace_panel (PANEL *); -+ extern PANEL_EXPORT(void) _nc_dPanel (const char*, const PANEL*); -+ extern PANEL_EXPORT(void) _nc_dStack (const char*, int, const PANEL*); -+ extern PANEL_EXPORT(void) _nc_Wnoutrefresh (const PANEL*); -+ extern PANEL_EXPORT(void) _nc_Touchpan (const PANEL*); -+ extern PANEL_EXPORT(void) _nc_Touchline (const PANEL*, int, int); - - # define dBug(x) _tracef x - # define dPanel(text,pan) _nc_dPanel(text,pan) -@@ -205,7 +205,7 @@ struct screen; /* forward declaration */ - - #if NCURSES_SP_FUNCS - /* These may become later renamed and part of panel.h and the public API */ --extern NCURSES_EXPORT(void) NCURSES_SP_NAME(_nc_update_panels)(SCREEN*); -+extern PANEL_EXPORT(void) NCURSES_SP_NAME(_nc_update_panels)(SCREEN*); - #endif - /* *INDENT-ON* */ - --- -2.21.1 - diff --git a/recipes/ncurses/all/patches/6.2.0-0012-Learn-configure-about-msvc.patch b/recipes/ncurses/all/patches/6.2.0-0012-Learn-configure-about-msvc.patch deleted file mode 100644 index 1a723cab0cac4..0000000000000 --- a/recipes/ncurses/all/patches/6.2.0-0012-Learn-configure-about-msvc.patch +++ /dev/null @@ -1,423 +0,0 @@ -Upstreamed in 18f51bcf99101e5bf4c737239c44064227f34db8 - -ncurses 6.2 - patch 20200229 - -Upstreamed in 3e37c7d3fa122563a9d88168926f61286ef30cd3 - -ncurses 6.2 - patch 20200523 - -Upstreamed in d61c3c6a831d18ef0ed6f797ac97d60fffc2f158 - -ncurses 6.2 - patch 20200711 - -From 4a4d205735df2634a328c03629435f440cb5dd3c Mon Sep 17 00:00:00 2001 -From: Anonymous Maarten -Date: Tue, 17 Mar 2020 15:38:08 +0100 -Subject: [PATCH 12/15] Learn configure about msvc - ---- - aclocal.m4 | 145 +++++++++++++++++++++++++++++++++++++++++------------ - mk-1st.awk | 25 +++++---- - 2 files changed, 128 insertions(+), 42 deletions(-) - -diff --git a/aclocal.m4 b/aclocal.m4 -index 55c65d1a..3a44d63b 100644 ---- a/aclocal.m4 -+++ b/aclocal.m4 -@@ -453,39 +453,55 @@ AC_DEFUN([CF_AR_FLAGS],[ - AC_REQUIRE([CF_PROG_AR]) - - AC_CACHE_CHECK(for options to update archives, cf_cv_ar_flags,[ -- cf_cv_ar_flags=unknown -- for cf_ar_flags in -curvU -curv curv -crv crv -cqv cqv -rv rv -- do -+ case $cf_cv_system_name in -+ (*-msvc*) -+ cf_cv_ar_flags='' -+ cat >mk_static_lib.sh <<-EOF -+ #!$SHELL -+ MSVC_BIN="[$]AR" -+ out="\[$]1" -+ shift -+ exec \[$]MSVC_BIN -out:"\[$]out" \[$]@ -+ EOF -+ chmod +x mk_static_lib.sh -+ AR=`pwd`/mk_static_lib.sh -+ ;; -+ (*) -+ cf_cv_ar_flags=unknown -+ for cf_ar_flags in -curvU -curv curv -crv crv -cqv cqv -rv rv -+ do - -- # check if $ARFLAGS already contains this choice -- if test "x$ARFLAGS" != "x" ; then -- cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"` -- if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then -- cf_cv_ar_flags= -- break -+ # check if $ARFLAGS already contains this choice -+ if test "x$ARFLAGS" != "x" ; then -+ cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"` -+ if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then -+ cf_cv_ar_flags= -+ break -+ fi - fi -- fi -- -- rm -f conftest.$ac_cv_objext -- rm -f conftest.a - -- cat >conftest.$ac_ext <&AC_FD_CC -- $AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&AC_FD_CC 1>/dev/null -- if test -f conftest.a ; then -- cf_cv_ar_flags=$cf_ar_flags -+ rm -f conftest.$ac_cv_objext -+ rm -f conftest.a -+ -+ cat >conftest.$ac_ext <<-EOF -+ #line __oline__ "configure" -+ int testdata[[3]] = { 123, 456, 789 }; -+ EOF -+ if AC_TRY_EVAL(ac_compile) ; then -+ echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&AC_FD_CC -+ $AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&AC_FD_CC 1>/dev/null -+ if test -f conftest.a ; then -+ cf_cv_ar_flags=$cf_ar_flags -+ break -+ fi -+ else -+ CF_VERBOSE(cannot compile test-program) - break - fi -- else -- CF_VERBOSE(cannot compile test-program) -- break -- fi -- done -- rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext -+ done -+ rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext -+ ;; -+ esac - ]) - - if test -n "$ARFLAGS" ; then -@@ -4008,6 +4024,9 @@ define([CF_LIB_PREFIX], - LIB_PREFIX='' - fi - ;; -+ (*-msvc*) -+ LIB_PREFIX='' -+ ;; - (*) LIB_PREFIX='lib' - ;; - esac -@@ -4036,7 +4055,7 @@ cf_prefix=$LIB_PREFIX - AC_REQUIRE([CF_SUBST_NCURSES_VERSION]) - - case $cf_cv_shlib_version in --(cygdll|msysdll|mingw) -+(cygdll|msysdll|mingw|msvcdll) - TINFO_NAME=$TINFO_ARG_SUFFIX - TINFO_SUFFIX=.dll - ;; -@@ -4159,6 +4178,10 @@ CF_EOF - cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'` - cf_add_lib="../lib/lib${cf_libname}${cf_cygsuf}" - ;; -+ (msvcdll) -+ cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'` -+ cf_add_lib="../lib/${cf_libname}${cf_cygsuf}" -+ ;; - (*) - cf_add_lib= - ;; -@@ -4254,7 +4277,7 @@ CF_EOF - CXX_MODEL=$cf_ITEM - if test "$CXX_MODEL" = SHARED; then - case $cf_cv_shlib_version in -- (cygdll|msysdll|mingw) -+ (cygdll|msysdll|mingw|msvcdll) - test "x$with_shared_cxx" = xno && CF_VERBOSE(overriding CXX_MODEL to SHARED) - with_shared_cxx=yes - ;; -@@ -4649,11 +4672,25 @@ AC_DEFUN([CF_LIB_SUFFIX], - $3=[$]$2 - ;; - (Xdebug) -- $2='_g.a' -+ case $cf_cv_system_name in -+ (*-msvc*) -+ $2='_g.lib' -+ ;; -+ (*) -+ $2='_g.a' -+ ;; -+ esac - $3=[$]$2 - ;; - (Xprofile) -- $2='_p.a' -+ case $cf_cv_system_name in -+ (*-msvc*) -+ $2='_p.lib' -+ ;; -+ (*) -+ $2='_p.a' -+ ;; -+ esac - $3=[$]$2 - ;; - (Xshared) -@@ -4662,6 +4699,10 @@ AC_DEFUN([CF_LIB_SUFFIX], - $2='.so' - $3=[$]$2 - ;; -+ (*-msvc*) -+ $2='.dll' -+ $3='.dll.lib' -+ ;; - (cygwin*|msys*|mingw*) - $2='.dll' - $3='.dll.a' -@@ -4689,7 +4730,14 @@ AC_DEFUN([CF_LIB_SUFFIX], - esac - ;; - (*) -- $2='.a' -+ case $target in -+ (*-msvc*) -+ $2='.lib' -+ ;; -+ (*) -+ $2='.a' -+ ;; -+ esac - $3=[$]$2 - ;; - esac -@@ -6759,6 +6807,110 @@ CF_EOF - CF_SHARED_SONAME - MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $[@]' - ;; -+ (mingw*msvc*) -+ LDFLAGS="$LDFLAGS user32.lib" -+ export LDFLAGS -+ cf_cv_shlib_version=msvcdll -+ cf_cv_shlib_version_infix=msvcdll -+ shlibdir=$bindir -+ MAKE_DLLS= -+ if test "$DFT_LWR_MODEL" = "shared" ; then -+ LOCAL_LDFLAGS="-link -dll" -+ LOCAL_LDFLAGS2="$LOCAL_LDFLAGS" -+ EXTRA_LDFLAGS="-link -dll $EXTRA_LDFLAGS" -+ fi -+ CC_SHARED_OPTS= -+ MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh [$]@ ${LD} [$]{CFLAGS}' -+ RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.lib" -+ cat >mk_shared_lib.sh <<-CF_EOF -+ #!$SHELL -+ SHARED_LIB=\[$]1 -+ IMPORT_LIB=\`echo "\[$]1" | sed -e 's/[[0-9]]*\.dll[$]/.dll.lib/'\` -+ shift -+ my_ld=\[$]1 -+ shift -+ cat <<-EOF -+ Linking shared library -+ ** SHARED LIB \$SHARED_LIB -+ ** IMPORT_LIB \$IMPORT_LIB -+EOF -+ args=\$(echo \[$]* | sed -E "s#-l(\w*)#\1.dll.lib#g" | sed -E "s#-L(\w*)#-LIBPATH:\1#g") -+ exec \$my_ld -DLL -IMPLIB:"\${IMPORT_LIB}" -OUT:"\${SHARED_LIB}" ${LDFLAGS} \$args -+ mv "\${IMPORT_LIB}" "\${IMPORT_LIB}" -+CF_EOF -+ chmod +x mk_shared_lib.sh -+ cat >mk_prog.sh <<-CF_EOF -+ #!$SHELL -+ shift -+ # Ignore first argument (compiler) and use LD (link.exe) unconditionally -+ LD="[$]LD" -+ clopts=() -+ ldopts=("/subsystem:console") -+ libs=() -+ isdll=0 -+ while test \[$]# -gt 0; do -+ case "\[$]1" in -+ -link | -MT | -MD | -MTd | -MDd) -+ # ignore -link argument -+ ;; -+ -dll) -+ isdll=1 -+ ;; -+ -W* | -w*) -+ # ignore warnings -+ ;; -+ -D*) -+ clopts+=("\[$]1") -+ ;; -+ -I*) -+ clopts+=("\[$]1") -+ ;; -+ -l*) -+ libs+=("\`echo \"\[$]1\" | sed \"s/^-l//\"\`") -+ ;; -+ -L*) -+ ldopts+=("\`echo \"\[$]1\" | sed \"s/^-L/-LIBPATH:/\"\`") -+ ;; -+ *.obj | *.o) -+ ldopts+=("\[$]1") -+ ;; -+ -Wl,*) -+ for linkarg in \`echo '\[$]1' | sed -e 's/-Wl,//' -e 's/,/ /'\`; do -+ ldopts+=("\[$]{linkarg}") -+ done -+ ;; -+ *.lib) -+ ldopts+=("\[$]1") -+ ;; -+ -o) -+ shift -+ ldopts+=("-out:\[$]1") -+ ;; -+ *) -+ clopts+=("\[$]1") -+ ldopts+=("\[$]1") -+ ;; -+ esac -+ shift -+ done -+ if [[ "\$isdll" -ne 0 ]]; then -+ for lib in \[$]{libs[[*]]}; do -+ ldopts+=("\[$]lib.dll.lib") -+ done -+ else -+ for lib in \[$]{libs[[*]]}; do -+ ldopts+=("\[$]lib.lib") -+ done -+ fi -+ cat <<-EOF -+ Creating program -+ ** ld options: "\[$]{ldopts[[@]]}" -+EOF -+ exec \[$]LD \[$]{ldopts[[@]]} -+CF_EOF -+ chmod +x mk_prog.sh -+ LINK_PROGS="$SHELL ${rel_builddir}/mk_prog.sh" -+ ;; - (mingw*) - cf_cv_shlib_version=mingw - cf_cv_shlib_version_infix=mingw ---- configure.in -+++ configure.in -@@ -2181,6 +2181,17 @@ fi - fi - WITH_OVERWRITE=$with_overwrite - -+### At least on MinGW a shared library build without libtool -+### requires adding the additional libs to the link list. -+case $cf_cv_system_name in -+(*mingw32*|*mingw64*) -+ if test "$DFT_LWR_MODEL" != "libtool"; then -+ SHLIB_LIST="$SHLIB_LIST ${LIBS}" -+ fi -+ ;; -+*) ;; -+esac -+ - AC_SUBST(WITH_OVERWRITE) - AC_SUBST(TICS_LIST) - AC_SUBST(TINFO_LIST) -diff --git a/mk-1st.awk b/mk-1st.awk -index 480baad6..b6b7b06d 100644 ---- a/mk-1st.awk -+++ b/mk-1st.awk -@@ -75,7 +75,9 @@ function lib_name_of(a_name) { - function imp_name_of(a_name) { - if (ShlibVerInfix == "cygdll" || ShlibVerInfix == "msysdll" || ShlibVerInfix == "mingw") { - result = sprintf("%s%s%s.a", prefix, a_name, suffix); -- } else { -+ } else if (ShlibVerInfix == "msvcdll") { -+ result = sprintf("%s%s%s.lib", prefix, a_name, suffix); -+ } else{ - result = ""; - } - return result; -@@ -86,7 +88,7 @@ function abi_name_of(a_name) { - result = sprintf("%s%s$(ABI_VERSION)%s", "cyg", a_name, suffix); - } else if (ShlibVerInfix == "msysdll") { - result = sprintf("%s%s$(ABI_VERSION)%s", "msys-", a_name, suffix); -- } else if (ShlibVerInfix == "mingw") { -+ } else if (ShlibVerInfix == "mingw" || ShlibVerInfix == "msvcdll") { - result = sprintf("%s%s$(ABI_VERSION)%s", prefix, a_name, suffix); - } else if (ShlibVerInfix == "yes") { - result = sprintf("%s%s.$(ABI_VERSION)%s", prefix, a_name, suffix); -@@ -101,7 +103,7 @@ function rel_name_of(a_name) { - result = sprintf("%s%s$(REL_VERSION)%s", "cyg", a_name, suffix); - } else if (ShlibVerInfix == "msysdll") { - result = sprintf("%s%s$(ABI_VERSION)%s", "msys-", a_name, suffix); -- } else if (ShlibVerInfix == "mingw") { -+ } else if (ShlibVerInfix == "mingw" || ShlibVerInfix == "msvcdll") { - result = sprintf("%s%s$(REL_VERSION)%s", prefix, a_name, suffix); - } else if (ShlibVerInfix == "yes") { - result = sprintf("%s%s.$(REL_VERSION)%s", prefix, a_name, suffix); -@@ -119,7 +121,7 @@ function end_name_of(a_name) { - } else { - if ( ShlibVer == "rel" ) { - result = rel_name_of(a_name); -- } else if ( ShlibVer == "abi" || ShlibVer == "cygdll" || ShlibVer == "msysdll" || ShlibVer == "mingw" ) { -+ } else if ( ShlibVer == "abi" || ShlibVer == "cygdll" || ShlibVer == "msysdll" || ShlibVer == "mingw" || ShlibVer == "msvcdll" ) { - result = abi_name_of(a_name); - } else { - result = lib_name_of(a_name); -@@ -175,7 +177,7 @@ function make_shlib(objs, shlib_list) { - printf "\t$(MK_SHARED_LIB) $(%s_OBJS) $(%s)\n", objs, shlib_list - } - function sharedlinks(directory) { -- if ( ShlibVer != "auto" && ShlibVer != "cygdll" && ShlibVer != "msysdll" && ShlibVer != "mingw" ) { -+ if ( ShlibVer != "auto" && ShlibVer != "cygdll" && ShlibVer != "msysdll" && ShlibVer != "mingw" && ShlibVer != "msvcdll" ) { - printf "\tcd %s && (", directory - if ( DoLinks == "reverse" ) { - if ( ShlibVer == "rel" ) { -@@ -375,7 +377,7 @@ END { - print "install \\" - print "install.libs \\" - -- if ( ShlibVer == "cygdll" || ShlibVer == "msysdll" || ShlibVer == "mingw") { -+ if ( ShlibVer == "cygdll" || ShlibVer == "msysdll" || ShlibVer == "mingw" || ShlibVer == "msvcdll") { - - dst_dirs = "$(DESTDIR)$(bindir) $(DESTDIR)$(libdir)"; - printf "install.%s :: %s $(LIBRARIES)\n", name, dst_dirs -@@ -396,8 +398,13 @@ END { - - if ( overwrite == "yes" && name == "ncurses" ) - { -- if ( ShlibVer == "cygdll" || ShlibVer == "msysdll" || ShlibVer == "mingw") { -- ovr_name = sprintf("libcurses%s.a", suffix) -+ if ( ShlibVer == "cygdll" || ShlibVer == "msysdll" || ShlibVer == "mingw" || SlibVer == "msvcdll") { -+ if (ShlibVer == "msvcdll") { -+ curses_prefix = "" -+ } else { -+ curses_prefix = "lib" -+ } -+ ovr_name = sprintf("%scurses%s.a", curses_prefix, suffix) - printf "\t@echo linking %s to %s\n", imp_name, ovr_name - printf "\tcd $(DESTDIR)$(libdir) && (" - symlink(imp_name, ovr_name) -@@ -417,7 +424,7 @@ END { - print "uninstall \\" - print "uninstall.libs \\" - printf "uninstall.%s ::\n", name -- if ( ShlibVer == "cygdll" || ShlibVer == "msysdll" || ShlibVer == "mingw") { -+ if ( ShlibVer == "cygdll" || ShlibVer == "msysdll" || ShlibVer == "mingw" || ShlibVer == "msvcdll") { - - printf "\t@echo uninstalling $(DESTDIR)$(bindir)/%s\n", end_name - printf "\t-@rm -f $(DESTDIR)$(bindir)/%s\n", end_name --- -2.21.1 - diff --git a/recipes/ncurses/all/patches/6.2.0-0013-Fix-lib_gen.c.patch b/recipes/ncurses/all/patches/6.2.0-0013-Fix-lib_gen.c.patch deleted file mode 100644 index 591da3292bdf0..0000000000000 --- a/recipes/ncurses/all/patches/6.2.0-0013-Fix-lib_gen.c.patch +++ /dev/null @@ -1,45 +0,0 @@ -Upstreamed in 3e37c7d3fa122563a9d88168926f61286ef30cd3 - -ncurses 6.2 - patch 20200523 - -From 2735f43727f8cef9edb406dc361a51014807788c Mon Sep 17 00:00:00 2001 -From: Anonymous Maarten -Date: Wed, 26 Feb 2020 19:24:16 +0100 -Subject: [PATCH 13/15] Fix lib_gen.c - -Fixes these kind of errors on MSVC -../ncurses/lib_gen.c(23): error C2059: syntax error: '(' - -(required for static build) - -../ncurses/lib_gen.c(30): error C2059: syntax error: '(' -../ncurses/lib_gen.c(37): error C2059: syntax error: '(' -../ncurses/lib_gen.c(44): error C2059: syntax error: '(' -../ncurses/lib_gen.c(51): error C2059: syntax error: '(' -../ncurses/lib_gen.c(58): error C2059: syntax error: '(' -../ncurses/lib_gen.c(65): error C2059: syntax error: '(' -../ncurses/lib_gen.c(72): error C2059: syntax error: '(' -../ncurses/lib_gen.c(79): error C2059: syntax error: '(' -../ncurses/lib_gen.c(86): error C2059: syntax error: '(' -(and more) - ---- - ncurses/base/MKlib_gen.sh | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/ncurses/base/MKlib_gen.sh b/ncurses/base/MKlib_gen.sh -index 5a3770e5..5e646e66 100755 ---- a/ncurses/base/MKlib_gen.sh -+++ b/ncurses/base/MKlib_gen.sh -@@ -178,7 +178,7 @@ EOF3 - - if test "$USE" = generated ; then - cat >$ED4 < -Date: Mon, 16 Mar 2020 11:01:28 +0100 -Subject: [PATCH 14/15] avoid macro expansion in args by defining - NCURSES_NOMACROS in ncurses/lib_gen.c - -Macro expansion from macros in curses.h(.in) will lead to: - -spec(dllexport) int __cdecl -waddchnstr(stdscr,(const chtype * z),-1) -{ - ; - return waddchnstr(stdscr,(z),-1); -} - -__declspec(dllexport) int __cdecl -waddnstr(stdscr,(const char * a1),(int z)) -{ - ; - return waddnstr(stdscr,(a1),(z)); -} - -__declspec(dllexport) int __cdecl -waddnstr(stdscr,(const char * z),-1) -{ - ; - return waddnstr(stdscr,(z),-1); -} - ---- - ncurses/base/MKlib_gen.sh | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/ncurses/base/MKlib_gen.sh b/ncurses/base/MKlib_gen.sh -index 5e646e66..f57cd55f 100755 ---- a/ncurses/base/MKlib_gen.sh -+++ b/ncurses/base/MKlib_gen.sh -@@ -432,7 +432,7 @@ BEGIN { - print "#define NCURSES_ATTR_T int" - print "#include " - print "" -- print "#undef NCURSES_NOMACROS /* _this_ file uses macros */" -+ print "#define NCURSES_NOMACROS 1" - print "" - print "#include " - print "" --- -2.21.1 - diff --git a/recipes/ncurses/all/patches/6.2.0-0015-MSVC-access-does-not-support-X_OK.patch b/recipes/ncurses/all/patches/6.2.0-0015-MSVC-access-does-not-support-X_OK.patch deleted file mode 100644 index 76f47d3a9f588..0000000000000 --- a/recipes/ncurses/all/patches/6.2.0-0015-MSVC-access-does-not-support-X_OK.patch +++ /dev/null @@ -1,34 +0,0 @@ ---- ncurses/tinfo/access.c -+++ ncurses/tinfo/access.c -@@ -41,6 +41,13 @@ - - #define LOWERCASE(c) ((isalpha(UChar(c)) && isupper(UChar(c))) ? tolower(UChar(c)) : (c)) - -+#ifdef _MSC_VER -+# define ACCESS(FN, MODE) access((FN), (MODE)&(R_OK|W_OK)) -+#else -+# define ACCESS access -+#endif -+ -+ - NCURSES_EXPORT(char *) - _nc_rootname(char *path) - { -@@ -112,7 +119,7 @@ - - if (path == 0) { - result = -1; -- } else if (access(path, mode) < 0) { -+ } else if (ACCESS(path, mode) < 0) { - if ((mode & W_OK) != 0 - && errno == ENOENT - && strlen(path) < PATH_MAX) { -@@ -127,7 +134,7 @@ _nc_access(const char *path, int mode) - if (head == leaf) - _nc_STRCPY(head, ".", sizeof(head)); - -- result = access(head, R_OK | W_OK | X_OK); -+ result = ACCESS(head, R_OK | W_OK | X_OK); - } else { - result = -1; - } diff --git a/recipes/ncurses/all/patches/6.2.0-0016-msvc-has-wchar-support.patch b/recipes/ncurses/all/patches/6.2.0-0016-msvc-has-wchar-support.patch deleted file mode 100644 index 919d4eb50dbff..0000000000000 --- a/recipes/ncurses/all/patches/6.2.0-0016-msvc-has-wchar-support.patch +++ /dev/null @@ -1,34 +0,0 @@ -d61c3c6a ("ncurses 6.2 - patch 20200711", 2020-07-12) - ---- a/ncurses/curses.priv.h -+++ b/ncurses/curses.priv.h -@@ -2343,7 +2343,7 @@ extern NCURSES_EXPORT(int) _nc_eventlist_timeout(_nc_eventlist *); - */ - #if USE_WIDEC_SUPPORT - --#if defined(_WIN32) -+#if defined(_WIN32) && !defined(_MSC_VER) - /* - * MinGW has wide-character functions, but they do not work correctly. - */ ---- a/ncurses/widechar/lib_cchar.c -+++ b/ncurses/widechar/lib_cchar.c -@@ -35,6 +35,7 @@ - */ - - #include -+#include - - MODULE_ID("$Id: lib_cchar.c,v 1.33 2020/02/02 23:34:34 tom Exp $") - ---- a/ncurses/widechar/widechars.c -+++ b/ncurses/widechar/widechars.c -@@ -33,7 +33,7 @@ - - MODULE_ID("$Id: widechars.c,v 1.7 2020/02/02 23:34:34 tom Exp $") - --#if defined(_WIN32) -+#if defined(_WIN32) && !defined(_MSC_VER) - /* - * MinGW has wide-character functions, but they do not work correctly. - */ diff --git a/recipes/ncurses/all/patches/6.2.0-0017-msvc-fix-tests.patch b/recipes/ncurses/all/patches/6.2.0-0017-msvc-fix-tests.patch deleted file mode 100644 index f5276b3ee5fda..0000000000000 --- a/recipes/ncurses/all/patches/6.2.0-0017-msvc-fix-tests.patch +++ /dev/null @@ -1,50 +0,0 @@ -d61c3c6a ("ncurses 6.2 - patch 20200711", 2020-07-12) - ---- test/picsmap.c -+++ test/picsmap.c -@@ -955,6 +955,20 @@ parse_rgb(char **data) - return result; - } - -+#define LOWERCASE(c) ((isalpha(UChar(c)) && isupper(UChar(c))) ? tolower(UChar(c)) : (c)) -+ -+static int -+CaselessCmp(const char *a, const char *b) -+{ /* strcasecmp isn't portable */ -+ while (*a && *b) { -+ int cmp = LOWERCASE(*a) - LOWERCASE(*b); -+ if (cmp != 0) -+ break; -+ a++, b++; -+ } -+ return LOWERCASE(*a) - LOWERCASE(*b); -+} -+ - static RGB_NAME * - lookup_rgb(const char *name) - { -@@ -962,7 +976,7 @@ lookup_rgb(const char *name) - if (rgb_table != 0) { - int n; - for (n = 0; rgb_table[n].name != 0; ++n) { -- if (!strcasecmp(name, rgb_table[n].name)) { -+ if (!CaselessCmp(name, rgb_table[n].name)) { - result = &rgb_table[n]; - break; - } ---- test/test.priv.h -+++ test/test.priv.h -@@ -437,6 +437,13 @@ extern int optind; - #include - #include - -+#if defined(_MSC_VER) -+#undef popen -+#define popen(s,n) _popen(s,n) -+#undef pclose -+#define pclose(s) _pclose(s) -+#endif -+ - #ifndef GCC_NORETURN - #define GCC_NORETURN /* nothing */ - #endif diff --git a/recipes/ncurses/all/patches/6.2.0-0018-missing-functions-c-linkage.patch b/recipes/ncurses/all/patches/6.2.0-0018-missing-functions-c-linkage.patch deleted file mode 100644 index a47d3777212a3..0000000000000 --- a/recipes/ncurses/all/patches/6.2.0-0018-missing-functions-c-linkage.patch +++ /dev/null @@ -1,25 +0,0 @@ - ---- include/nc_mingw.h -+++ include/nc_mingw.h -@@ -62,6 +62,10 @@ - - #include - -+#ifdef __cplusplus -+extern "C" { -+#endif -+ - NCURSES_EXPORT(int) _nc_gettimeofday(struct timeval *, void *); - - #undef HAVE_GETTIMEOFDAY -@@ -75,6 +79,10 @@ - #define wcwidth(ucs) _nc_wcwidth((wchar_t)(ucs)) - NCURSES_EXPORT(int) _nc_wcwidth(wchar_t); - -+#ifdef __cplusplus -+} -+#endif -+ - #endif /* _WIN32 */ - - #endif /* NC_MINGW_H */ diff --git a/recipes/ncurses/all/patches/6.2.0-0019-Run-autoreconf.patch b/recipes/ncurses/all/patches/6.2.0-0019-Run-autoreconf.patch deleted file mode 100644 index ec7887edfac48..0000000000000 --- a/recipes/ncurses/all/patches/6.2.0-0019-Run-autoreconf.patch +++ /dev/null @@ -1,565 +0,0 @@ ---- configure -+++ configure -@@ -4750,49 +4750,65 @@ - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - -- cf_cv_ar_flags=unknown -- for cf_ar_flags in -curvU -curv curv -crv crv -cqv cqv -rv rv -- do -+ case $cf_cv_system_name in -+ (*-msvc*) -+ cf_cv_ar_flags='' -+ cat >mk_static_lib.sh <<-EOF -+ #!$SHELL -+ MSVC_BIN="$AR" -+ out="\$1" -+ shift -+ exec \$MSVC_BIN -out:"\$out" \$@ -+ EOF -+ chmod +x mk_static_lib.sh -+ AR=`pwd`/mk_static_lib.sh -+ ;; -+ (*) -+ cf_cv_ar_flags=unknown -+ for cf_ar_flags in -curvU -curv curv -crv crv -cqv cqv -rv rv -+ do - -- # check if $ARFLAGS already contains this choice -- if test "x$ARFLAGS" != "x" ; then -- cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"` -- if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then -- cf_cv_ar_flags= -- break -+ # check if $ARFLAGS already contains this choice -+ if test "x$ARFLAGS" != "x" ; then -+ cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"` -+ if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then -+ cf_cv_ar_flags= -+ break -+ fi - fi -- fi - -- rm -f conftest.$ac_cv_objext -- rm -f conftest.a -+ rm -f conftest.$ac_cv_objext -+ rm -f conftest.a - -- cat >conftest.$ac_ext <&5 -+ cat >conftest.$ac_ext <<-EOF -+ #line 4784 "configure" -+ int testdata[3] = { 123, 456, 789 }; -+ EOF -+ if { (eval echo "$as_me:4787: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -- echo "$as_me:4776: \$? = $ac_status" >&5 -+ echo "$as_me:4790: \$? = $ac_status" >&5 - (exit $ac_status); } ; then -- echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5 -- $AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null -- if test -f conftest.a ; then -- cf_cv_ar_flags=$cf_ar_flags -- break -- fi -- else -- test -n "$verbose" && echo " cannot compile test-program" 1>&6 -+ echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5 -+ $AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null -+ if test -f conftest.a ; then -+ cf_cv_ar_flags=$cf_ar_flags -+ break -+ fi -+ else -+ test -n "$verbose" && echo " cannot compile test-program" 1>&6 - --echo "${as_me:-configure}:4787: testing cannot compile test-program ..." 1>&5 -+echo "${as_me:-configure}:4801: testing cannot compile test-program ..." 1>&5 - -- break -- fi -- done -- rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext -+ break -+ fi -+ done -+ rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext -+ ;; -+ esac - - fi --echo "$as_me:4795: result: $cf_cv_ar_flags" >&5 -+echo "$as_me:4811: result: $cf_cv_ar_flags" >&5 - echo "${ECHO_T}$cf_cv_ar_flags" >&6 - - if test -n "$ARFLAGS" ; then -@@ -5474,6 +5490,9 @@ - LIB_PREFIX='' - fi - ;; -+ (*-msvc*) -+ LIB_PREFIX='' -+ ;; - (*) LIB_PREFIX='lib' - ;; - esac -@@ -5961,6 +5980,110 @@ - - MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@' - ;; -+ (mingw*msvc*) -+ LDFLAGS="$LDFLAGS user32.lib" -+ export LDFLAGS -+ cf_cv_shlib_version=msvcdll -+ cf_cv_shlib_version_infix=msvcdll -+ shlibdir=$bindir -+ MAKE_DLLS= -+ if test "$DFT_LWR_MODEL" = "shared" ; then -+ LOCAL_LDFLAGS="-link -dll" -+ LOCAL_LDFLAGS2="$LOCAL_LDFLAGS" -+ EXTRA_LDFLAGS="-link -dll $EXTRA_LDFLAGS" -+ fi -+ CC_SHARED_OPTS= -+ MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${LD} ${CFLAGS}' -+ RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.lib" -+ cat >mk_shared_lib.sh <<-CF_EOF -+ #!$SHELL -+ SHARED_LIB=\$1 -+ IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.lib/'\` -+ shift -+ my_ld=\$1 -+ shift -+ cat <<-EOF -+ Linking shared library -+ ** SHARED LIB \$SHARED_LIB -+ ** IMPORT_LIB \$IMPORT_LIB -+EOF -+ args=\$(echo \$* | sed -E "s#-l(\w*)#\1.dll.lib#g" | sed -E "s#-L(\w*)#-LIBPATH:\1#g") -+ exec \$my_ld -DLL -IMPLIB:"\${IMPORT_LIB}" -OUT:"\${SHARED_LIB}" ${LDFLAGS} \$args -+ mv "\${IMPORT_LIB}" "\${IMPORT_LIB}" -+CF_EOF -+ chmod +x mk_shared_lib.sh -+ cat >mk_prog.sh <<-CF_EOF -+ #!$SHELL -+ shift -+ # Ignore first argument (compiler) and use LD (link.exe) unconditionally -+ LD="$LD" -+ clopts=() -+ ldopts=("/subsystem:console") -+ libs=() -+ isdll=0 -+ while test \$# -gt 0; do -+ case "\$1" in -+ -link | -MT | -MD | -MTd | -MDd) -+ # ignore -link argument -+ ;; -+ -dll) -+ isdll=1 -+ ;; -+ -W* | -w*) -+ # ignore warnings -+ ;; -+ -D*) -+ clopts+=("\$1") -+ ;; -+ -I*) -+ clopts+=("\$1") -+ ;; -+ -l*) -+ libs+=("\`echo \"\$1\" | sed \"s/^-l//\"\`") -+ ;; -+ -L*) -+ ldopts+=("\`echo \"\$1\" | sed \"s/^-L/-LIBPATH:/\"\`") -+ ;; -+ *.obj | *.o) -+ ldopts+=("\$1") -+ ;; -+ -Wl,*) -+ for linkarg in \`echo '\$1' | sed -e 's/-Wl,//' -e 's/,/ /'\`; do -+ ldopts+=("\${linkarg}") -+ done -+ ;; -+ *.lib) -+ ldopts+=("\$1") -+ ;; -+ -o) -+ shift -+ ldopts+=("-out:\$1") -+ ;; -+ *) -+ clopts+=("\$1") -+ ldopts+=("\$1") -+ ;; -+ esac -+ shift -+ done -+ if [ "\$isdll" -ne 0 ]; then -+ for lib in \${libs[*]}; do -+ ldopts+=("\$lib.dll.lib") -+ done -+ else -+ for lib in \${libs[*]}; do -+ ldopts+=("\$lib.lib") -+ done -+ fi -+ cat <<-EOF -+ Creating program -+ ** ld options: "\${ldopts[@]}" -+EOF -+ exec \$LD \${ldopts[@]} -+CF_EOF -+ chmod +x mk_prog.sh -+ LINK_PROGS="$SHELL ${rel_builddir}/mk_prog.sh" -+ ;; - (mingw*) - cf_cv_shlib_version=mingw - cf_cv_shlib_version_infix=mingw -@@ -7516,26 +7639,26 @@ - - # either way, check for the library header files - --for ac_header in pcre2-posix.h pcreposix.h -+for ac_header in pcre2posix.h pcreposix.h - do - as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` --echo "$as_me:7522: checking for $ac_header" >&5 -+echo "$as_me:7643: checking for $ac_header" >&5 - echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 - if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - cat >conftest.$ac_ext <<_ACEOF --#line 7528 "configure" -+#line 7649 "configure" - #include "confdefs.h" - #include <$ac_header> - _ACEOF --if { (eval echo "$as_me:7532: \"$ac_cpp conftest.$ac_ext\"") >&5 -+if { (eval echo "$as_me:7653: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - egrep -v '^ *\+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 -- echo "$as_me:7538: \$? = $ac_status" >&5 -+ echo "$as_me:7659: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag -@@ -9897,7 +10018,7 @@ - rm -f conftest.$ac_objext conftest.$ac_ext - fi - --echo "${as_me:-configure}:9900: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5 -+echo "${as_me:-configure}:10021: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5 - - CFLAGS="$cf_trim_CFLAGS" - CPPFLAGS="$cf_trim_CPPFLAGS" -@@ -25163,11 +25286,25 @@ - DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX - ;; - (Xdebug) -- DFT_LIB_SUFFIX='_g.a' -+ case $cf_cv_system_name in -+ (*-msvc*) -+ DFT_LIB_SUFFIX='_g.lib' -+ ;; -+ (*) -+ DFT_LIB_SUFFIX='_g.a' -+ ;; -+ esac - DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX - ;; - (Xprofile) -- DFT_LIB_SUFFIX='_p.a' -+ case $cf_cv_system_name in -+ (*-msvc*) -+ DFT_LIB_SUFFIX='_p.lib' -+ ;; -+ (*) -+ DFT_LIB_SUFFIX='_p.a' -+ ;; -+ esac - DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX - ;; - (Xshared) -@@ -25176,6 +25313,10 @@ - DFT_LIB_SUFFIX='.so' - DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX - ;; -+ (*-msvc*) -+ DFT_LIB_SUFFIX='.dll' -+ DFT_DEP_SUFFIX='.dll.lib' -+ ;; - (cygwin*|msys*|mingw*) - DFT_LIB_SUFFIX='.dll' - DFT_DEP_SUFFIX='.dll.a' -@@ -25203,7 +25344,14 @@ - esac - ;; - (*) -- DFT_LIB_SUFFIX='.a' -+ case $target in -+ (*-msvc*) -+ DFT_LIB_SUFFIX='.lib' -+ ;; -+ (*) -+ DFT_LIB_SUFFIX='.a' -+ ;; -+ esac - DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX - ;; - esac -@@ -25252,11 +25400,25 @@ - CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX - ;; - (Xdebug) -- CXX_LIB_SUFFIX='_g.a' -+ case $cf_cv_system_name in -+ (*-msvc*) -+ CXX_LIB_SUFFIX='_g.lib' -+ ;; -+ (*) -+ CXX_LIB_SUFFIX='_g.a' -+ ;; -+ esac - CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX - ;; - (Xprofile) -- CXX_LIB_SUFFIX='_p.a' -+ case $cf_cv_system_name in -+ (*-msvc*) -+ CXX_LIB_SUFFIX='_p.lib' -+ ;; -+ (*) -+ CXX_LIB_SUFFIX='_p.a' -+ ;; -+ esac - CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX - ;; - (Xshared) -@@ -25265,6 +25427,10 @@ - CXX_LIB_SUFFIX='.so' - CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX - ;; -+ (*-msvc*) -+ CXX_LIB_SUFFIX='.dll' -+ CXX_DEP_SUFFIX='.dll.lib' -+ ;; - (cygwin*|msys*|mingw*) - CXX_LIB_SUFFIX='.dll' - CXX_DEP_SUFFIX='.dll.a' -@@ -25292,7 +25458,14 @@ - esac - ;; - (*) -- CXX_LIB_SUFFIX='.a' -+ case $target in -+ (*-msvc*) -+ CXX_LIB_SUFFIX='.lib' -+ ;; -+ (*) -+ CXX_LIB_SUFFIX='.a' -+ ;; -+ esac - CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX - ;; - esac -@@ -25586,12 +25759,23 @@ - if test "$with_overwrite" != no ; then - if test "$NCURSES_LIBUTF8" = 1 ; then - NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)' -- { echo "$as_me:25589: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5 -+ { echo "$as_me:25760: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5 - echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;} - fi - fi - WITH_OVERWRITE=$with_overwrite - -+### At least on MinGW a shared library build without libtool -+### requires adding the additional libs to the link list. -+case $cf_cv_system_name in -+(*mingw32*|*mingw64*) -+ if test "$DFT_LWR_MODEL" != "libtool"; then -+ SHLIB_LIST="$SHLIB_LIST ${LIBS}" -+ fi -+ ;; -+*) ;; -+esac -+ - # used to separate tack out of the tree - NCURSES_TREE= - -@@ -26124,7 +26308,7 @@ - #define HAVE_CURSES_DATA_BOOLNAMES 1 - EOF - --ac_config_files="$ac_config_files include/MKterm.h.awk include/curses.head:include/curses.h.in include/ncurses_dll.h include/termcap.h include/unctrl.h $SUB_MAKEFILES Makefile" -+ac_config_files="$ac_config_files include/MKterm.h.awk include/curses.head:include/curses.h.in include/ncurses_dll.h include/ncurses_exports.h include/termcap.h include/unctrl.h $SUB_MAKEFILES Makefile" - ac_config_commands="$ac_config_commands default" - cat >confcache <<\_ACEOF - # This file is a shell script that caches the results of configure -@@ -26513,13 +26697,14 @@ - "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;; - "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;; - "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;; -+ "include/ncurses_exports.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_exports.h" ;; - "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;; - "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;; - "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;; - "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; - "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;; - "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;; -- *) { { echo "$as_me:26522: error: invalid argument: $ac_config_target" >&5 -+ *) { { echo "$as_me:26705: error: invalid argument: $ac_config_target" >&5 - echo "$as_me: error: invalid argument: $ac_config_target" >&2;} - { (exit 1); exit 1; }; };; - esac -@@ -27317,7 +27502,7 @@ - cf_prefix=$LIB_PREFIX - - case $cf_cv_shlib_version in --(cygdll|msysdll|mingw) -+(cygdll|msysdll|mingw|msvcdll) - TINFO_NAME=$TINFO_ARG_SUFFIX - TINFO_SUFFIX=.dll - ;; -@@ -27390,11 +27575,25 @@ - cf_depsuf=$cf_suffix - ;; - (Xdebug) -- cf_suffix='_g.a' -+ case $cf_cv_system_name in -+ (*-msvc*) -+ cf_suffix='_g.lib' -+ ;; -+ (*) -+ cf_suffix='_g.a' -+ ;; -+ esac - cf_depsuf=$cf_suffix - ;; - (Xprofile) -- cf_suffix='_p.a' -+ case $cf_cv_system_name in -+ (*-msvc*) -+ cf_suffix='_p.lib' -+ ;; -+ (*) -+ cf_suffix='_p.a' -+ ;; -+ esac - cf_depsuf=$cf_suffix - ;; - (Xshared) -@@ -27403,6 +27602,10 @@ - cf_suffix='.so' - cf_depsuf=$cf_suffix - ;; -+ (*-msvc*) -+ cf_suffix='.dll' -+ cf_depsuf='.dll.lib' -+ ;; - (cygwin*|msys*|mingw*) - cf_suffix='.dll' - cf_depsuf='.dll.a' -@@ -27430,7 +27633,14 @@ - esac - ;; - (*) -- cf_suffix='.a' -+ case $target in -+ (*-msvc*) -+ cf_suffix='.lib' -+ ;; -+ (*) -+ cf_suffix='.a' -+ ;; -+ esac - cf_depsuf=$cf_suffix - ;; - esac -@@ -27496,6 +27706,10 @@ - cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'` - cf_add_lib="../lib/lib${cf_libname}${cf_cygsuf}" - ;; -+ (msvcdll) -+ cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'` -+ cf_add_lib="../lib/${cf_libname}${cf_cygsuf}" -+ ;; - (*) - cf_add_lib= - ;; -@@ -27592,10 +27806,10 @@ - CXX_MODEL=$cf_ITEM - if test "$CXX_MODEL" = SHARED; then - case $cf_cv_shlib_version in -- (cygdll|msysdll|mingw) -+ (cygdll|msysdll|mingw|msvcdll) - test "x$with_shared_cxx" = xno && test -n "$verbose" && echo " overriding CXX_MODEL to SHARED" 1>&6 - --echo "${as_me:-configure}:27598: testing overriding CXX_MODEL to SHARED ..." 1>&5 -+echo "${as_me:-configure}:27810: testing overriding CXX_MODEL to SHARED ..." 1>&5 - - with_shared_cxx=yes - ;; -@@ -27611,11 +27825,25 @@ - cf_depsuf=$cf_suffix - ;; - (Xdebug) -- cf_suffix='_g.a' -+ case $cf_cv_system_name in -+ (*-msvc*) -+ cf_suffix='_g.lib' -+ ;; -+ (*) -+ cf_suffix='_g.a' -+ ;; -+ esac - cf_depsuf=$cf_suffix - ;; - (Xprofile) -- cf_suffix='_p.a' -+ case $cf_cv_system_name in -+ (*-msvc*) -+ cf_suffix='_p.lib' -+ ;; -+ (*) -+ cf_suffix='_p.a' -+ ;; -+ esac - cf_depsuf=$cf_suffix - ;; - (Xshared) -@@ -27624,6 +27852,10 @@ - cf_suffix='.so' - cf_depsuf=$cf_suffix - ;; -+ (*-msvc*) -+ cf_suffix='.dll' -+ cf_depsuf='.dll.lib' -+ ;; - (cygwin*|msys*|mingw*) - cf_suffix='.dll' - cf_depsuf='.dll.a' -@@ -27651,7 +27883,14 @@ - esac - ;; - (*) -- cf_suffix='.a' -+ case $target in -+ (*-msvc*) -+ cf_suffix='.lib' -+ ;; -+ (*) -+ cf_suffix='.a' -+ ;; -+ esac - cf_depsuf=$cf_suffix - ;; - esac diff --git a/recipes/ncurses/config.yml b/recipes/ncurses/config.yml index 1c6db8931421d..8ccaa404ee598 100644 --- a/recipes/ncurses/config.yml +++ b/recipes/ncurses/config.yml @@ -1,7 +1,7 @@ versions: + "6.5": + folder: all "6.4": folder: all "6.3": folder: all - "6.2": - folder: all diff --git a/recipes/net-snmp/all/conandata.yml b/recipes/net-snmp/all/conandata.yml index 269a227ecf9b0..9ad5ce20f2145 100644 --- a/recipes/net-snmp/all/conandata.yml +++ b/recipes/net-snmp/all/conandata.yml @@ -1,14 +1,13 @@ sources: - "5.9.1": - sha256: "75b59d67e871aaaa31c8cef89ba7d06972782b97736b7e8c3399f36b50a8816f" - url: https://sourceforge.net/projects/net-snmp/files/net-snmp/5.9.1/net-snmp-5.9.1.zip/download + "5.9.4": + url: "https://sourceforge.net/projects/net-snmp/files/net-snmp/5.9.4/net-snmp-5.9.4.zip/download" + sha256: "ceea0c876f23b87731de2073e6a3a683ea610c66a5a67b5cabf4986b7813c22b" patches: - "5.9.1": + "5.9.4": - patch_file: patches/0001-fix-openssl-linking-msvc.patch - base_path: "" + patch_description: "Use Conan OpenSSL when linking on Windows" + patch_source: "https://github.com/net-snmp/net-snmp/commit/99332c80b68248cb60023d12297135dc9c6c8abf" - patch_file: patches/0002-install-only-libnetsnmp.patch - base_path: "" + patch_description: "Avoid install extra helper libraries" - patch_file: patches/0003-fix-perl-scripts-msvc.patch - base_path: "" - - patch_file: patches/0004-fix-apple-arm64-build.patch - base_path: "" + patch_description: "Avoid injecting extra flags when running perl" diff --git a/recipes/net-snmp/all/conanfile.py b/recipes/net-snmp/all/conanfile.py index cf81f5bab247a..68f4965c95152 100644 --- a/recipes/net-snmp/all/conanfile.py +++ b/recipes/net-snmp/all/conanfile.py @@ -1,11 +1,17 @@ -import functools import os import stat -from conans import AutoToolsBuildEnvironment, ConanFile, tools -from conans.errors import ConanInvalidConfiguration +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.build import cross_building +from conan.tools.env import VirtualRunEnv +from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, replace_in_file, rm, rmdir, chdir +from conan.tools.gnu import Autotools, AutotoolsDeps, AutotoolsToolchain, PkgConfigDeps +from conan.tools.layout import basic_layout +from conan.tools.microsoft import is_msvc, msvc_runtime_flag, NMakeToolchain +from conan.tools.apple import is_apple_os, fix_apple_shared_install_name -required_conan_version = ">=1.43.0" +required_conan_version = ">=1.53.0" class NetSnmpConan(ConanFile): @@ -15,10 +21,12 @@ class NetSnmpConan(ConanFile): "for monitoring the health and welfare of network equipment " "(eg. routers), computer equipment and even devices like UPSs." ) + license = "BSD-3-Clause" url = "https://github.com/conan-io/conan-center-index" homepage = "http://www.net-snmp.org/" topics = "snmp" - license = "BSD-3-Clause" + + package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], @@ -30,21 +38,9 @@ class NetSnmpConan(ConanFile): "fPIC": True, "with_ipv6": True, } - requires = "openssl/1.1.1m" - exports_sources = "patches/*" - @property - def _is_msvc(self): - return self.settings.compiler in ("Visual Studio", "msvc") - - def validate(self): - if self.settings.os == "Windows" and not self._is_msvc: - raise ConanInvalidConfiguration( - "net-snmp is setup to build only with MSVC on Windows" - ) - - def source(self): - tools.get(**self.conan_data["sources"][self.version], strip_root=True) + def export_sources(self): + export_conandata_patches(self) def config_options(self): if self.settings.os == "Windows": @@ -52,145 +48,174 @@ def config_options(self): def configure(self): if self.options.shared: - del self.options.fPIC - del self.settings.compiler.libcxx - del self.settings.compiler.cppstd + self.options.rm_safe("fPIC") + self.settings.rm_safe("compiler.libcxx") + self.settings.rm_safe("compiler.cppstd") + + def layout(self): + basic_layout(self, src_folder="src") + + def requirements(self): + self.requires("openssl/[>=1.1 <4]") + self.requires("pcre/8.45") + self.requires("zlib/[>=1.2.11 <2]") + + def validate(self): + if is_msvc(self) and self.options.shared: + # FIXME: Linker errors against third-party dependencies: + # snmp_openssl.obj : error LNK2019: unresolved external symbol CRYPTO_free referenced in function _extract_oname + raise ConanInvalidConfiguration(f"{self.ref} fails when building as shared library, use -o '&:shared=False'. Contributions are welcome!") def build_requirements(self): - if self._is_msvc: - self.build_requires("strawberryperl/5.30.0.1") + if is_msvc(self): + self.tool_requires("strawberryperl/5.32.1.1") + else: + self.tool_requires("gnu-config/cci.20210814") + self.tool_requires("autoconf/2.71") + self.tool_requires("automake/1.16.5") + self.tool_requires("libtool/2.4.7") + if not self.conf.get("tools.gnu:pkg_config", default=False, check_type=str): + self.tool_requires("pkgconf/2.2.0") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) @property def _is_debug(self): return self.settings.build_type == "Debug" + def generate(self): + if is_msvc(self): + tc = NMakeToolchain(self) + tc.generate() + # Workaround for "unresolved external symbol" errors during shared build + env = VirtualRunEnv(self) + env.generate(scope="build") + else: + if not cross_building(self): + env = VirtualRunEnv(self) + env.generate(scope="build") + tc = AutotoolsToolchain(self) + debug_flag = "enable" if self._is_debug else "disable" + ipv6_flag = "enable" if self.options.with_ipv6 else "disable" + openssl_path = self.dependencies["openssl"].package_folder + zlib_path = self.dependencies["zlib"].package_folder + tc.configure_args += [ + f"--with-openssl={openssl_path}", + f"--with-zlib={zlib_path}", + f"--{debug_flag}-debugging", + f"--{ipv6_flag}-ipv6", + "--with-defaults", + "--without-rpm", + "--without-pcre", + "--disable-agent", + "--disable-applications", + "--disable-manuals", + "--disable-scripts", + "--disable-mibs", + "--disable-embedded-perl", + ] + if self.settings.os in ["Linux"]: + tc.extra_ldflags.append("-ldl") + tc.extra_ldflags.append("-lpthread") + tc.generate() + + deps = AutotoolsDeps(self) + deps.generate() + + deps = PkgConfigDeps(self) + deps.generate() + def _patch_msvc(self): - ssl_info = self.deps_cpp_info["openssl"] - openssl_root = ssl_info.rootpath.replace("\\", "/") + ssl_info = self.dependencies["openssl"] + openssl_root = ssl_info.package_folder.replace("\\", "/") search_replace = [ - ( - r'$default_openssldir . "\\include"', - f"'{openssl_root}/include'" - ), + (r'$default_openssldir . "\\include"', f"'{openssl_root}/include'"), (r'$default_openssldir . "\\lib\\VC"', f"'{openssl_root}/lib'"), - ("$openssl = false", "$openssl = true") + ("$openssl = false", "$openssl = true"), ] if self._is_debug: search_replace.append(("$debug = false", "$debug = true")) if self.options.shared: - search_replace.append(( - "$link_dynamic = false", - "$link_dynamic = true" - )) + search_replace.append(("$link_dynamic = false", "$link_dynamic = true")) if self.options.with_ipv6: search_replace.append(("$b_ipv6 = false", "$b_ipv6 = true")) for search, replace in search_replace: - tools.replace_in_file("win32\\build.pl", search, replace) - runtime = self.settings.compiler.runtime - tools.replace_in_file("win32\\Configure", '"/runtime', f'"/{runtime}') + replace_in_file(self, "build.pl", search, replace) + replace_in_file(self, "Configure", '"/runtime', f'"/{msvc_runtime_flag(self)}') link_lines = "\n".join( f'# pragma comment(lib, "{lib}.lib")' - for lib in ssl_info.libs + ssl_info.system_libs + for lib in ssl_info.cpp_info.libs + ssl_info.cpp_info.system_libs ) - config = r"win32\net-snmp\net-snmp-config.h.in" - tools.replace_in_file(config, "/* Conan: system_libs */", link_lines) - - def _build_msvc(self): - if self.should_configure: - self._patch_msvc() - self.run("perl build.pl", cwd="win32") - if self.should_build: - with tools.vcvars(self): - self.run("nmake /nologo libsnmp", cwd="win32") - - @functools.lru_cache(1) - def _configure_autotools(self): - disabled_link_type = "static" if self.options.shared else "shared" - debug_flag = "enable" if self._is_debug else "disable" - ipv6_flag = "enable" if self.options.with_ipv6 else "disable" - ssl_path = self.deps_cpp_info["openssl"].rootpath - args = [ - "--with-defaults", - "--without-rpm", - "--without-pcre", - "--disable-agent", - "--disable-applications", - "--disable-manuals", - "--disable-scripts", - "--disable-mibs", - "--disable-embedded-perl", - f"--disable-{disabled_link_type}", - f"--{debug_flag}-debugging", - f"--{ipv6_flag}-ipv6", - f"--with-openssl={ssl_path}", - ] - autotools = AutoToolsBuildEnvironment(self) - autotools.libs = [] - autotools.configure(args=args) - return autotools + config = r"net-snmp\net-snmp-config.h.in" + replace_in_file(self, config, "/* Conan: system_libs */", link_lines) def _patch_unix(self): - tools.replace_in_file( - "configure", - "-install_name \\$rpath/", - "-install_name @rpath/" - ) - crypto_libs = self.deps_cpp_info["openssl"].system_libs + for gnu_config in [ + self.conf.get("user.gnu-config:config_guess", check_type=str), + self.conf.get("user.gnu-config:config_sub", check_type=str), + ]: + if gnu_config: + copy(self, os.path.basename(gnu_config), src=os.path.dirname(gnu_config), dst=self.source_folder) + configure_path = os.path.join(self.source_folder, "configure") + replace_in_file(self, configure_path, + "-install_name \\$rpath/", + "-install_name @rpath/") + crypto_libs = self.dependencies["openssl"].cpp_info.system_libs if len(crypto_libs) != 0: crypto_link_flags = " -l".join(crypto_libs) - tools.replace_in_file( - "configure", + replace_in_file(self, configure_path, 'LIBCRYPTO="-l${CRYPTO}"', - 'LIBCRYPTO="-l${CRYPTO} -l%s"' % (crypto_link_flags,) - ) - tools.replace_in_file( - "configure", - 'LIBS="-lcrypto $LIBS"', - f'LIBS="-lcrypto -l{crypto_link_flags} $LIBS"' - ) + 'LIBCRYPTO="-l${CRYPTO} -l%s"' % (crypto_link_flags,)) + replace_in_file(self, configure_path, + 'LIBS="-lcrypto $LIBS"', + f'LIBS="-lcrypto -l{crypto_link_flags} $LIBS"') def build(self): - for patch in self.conan_data["patches"][self.version]: - tools.patch(**patch) - if self._is_msvc: - self._build_msvc() + apply_conandata_patches(self) + if is_msvc(self): + with chdir(self, os.path.join(self.source_folder, "win32")): + self._patch_msvc() + self.run("perl build.pl") + self.run("nmake /nologo libsnmp") else: self._patch_unix() - os.chmod("configure", os.stat("configure").st_mode | stat.S_IEXEC) - self._configure_autotools()\ - .make(target="snmplib", args=["NOAUTODEPS=1"]) - - def _package_msvc(self): - cfg = "debug" if self._is_debug else "release" - self.copy("netsnmp.dll", "bin", fr"win32\bin\{cfg}") - self.copy("netsnmp.lib", "lib", fr"win32\lib\{cfg}") - self.copy("include/net-snmp/*.h") - for directory in ["", "agent/", "library/"]: - self.copy(f"net-snmp/{directory}*.h", "include", "win32") - self.copy("COPYING", "licenses") - - def _remove(self, path): - if os.path.isdir(path): - tools.rmdir(path) - else: - os.remove(path) - - def _package_unix(self): - self._configure_autotools().install(args=["NOAUTODEPS=1"]) - tools.remove_files_by_mask(self.package_folder, "README") - tools.rmdir(os.path.join(self.package_folder, "bin")) - lib_dir = os.path.join(self.package_folder, "lib") - for entry in os.listdir(lib_dir): - if not entry.startswith("libnetsnmp.") or entry.endswith(".la"): - self._remove(os.path.join(lib_dir, entry)) - self.copy("COPYING", "licenses") + configure_path = os.path.join(self.source_folder, "configure") + os.chmod(configure_path, os.stat(configure_path).st_mode | stat.S_IEXEC) + autotools = Autotools(self) + autotools.autoreconf() + autotools.configure() + autotools.make(target="snmplib", args=["NOAUTODEPS=1"]) def package(self): - if self._is_msvc: - self._package_msvc() + copy(self, "COPYING", + dst=os.path.join(self.package_folder, "licenses"), + src=self.source_folder) + if is_msvc(self): + cfg = "debug" if self._is_debug else "release" + copy(self, "netsnmp.lib", + dst=os.path.join(self.package_folder, "lib"), + src=os.path.join(self.source_folder, rf"win32\lib\{cfg}")) + copy(self, "include/net-snmp/*.h", + dst=self.package_folder, + src=self.source_folder) + for directory in ["", "agent/", "library/"]: + copy(self, f"net-snmp/{directory}*.h", + dst=os.path.join(self.package_folder, "include"), + src=os.path.join(self.source_folder, "win32")) else: - self._package_unix() + autotools = Autotools(self) + #only install with -j1 as parallel install will break dependencies. Probably a bug in the dependencies + #install specific targets instead of just everything as it will try to do perl stuff on you host machine + autotools.install(args=["-j1"], target="installsubdirs installlibs installprogs installheaders") + rm(self, "README", self.package_folder, recursive=True) + rmdir(self, os.path.join(self.package_folder, "bin")) + rm(self, "*.la", self.package_folder, recursive=True) + fix_apple_shared_install_name(self) def package_info(self): self.cpp_info.libs = ["netsnmp"] - self.cpp_info.requires = ["openssl::openssl"] + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.system_libs.extend(["rt", "pthread", "m"]) + if is_apple_os(self): + self.cpp_info.frameworks.extend(["CoreFoundation", "DiskArbitration", "IOKit"]) diff --git a/recipes/net-snmp/all/patches/0003-fix-perl-scripts-msvc.patch b/recipes/net-snmp/all/patches/0003-fix-perl-scripts-msvc.patch index 992914c1a489c..5d1776394ec89 100644 --- a/recipes/net-snmp/all/patches/0003-fix-perl-scripts-msvc.patch +++ b/recipes/net-snmp/all/patches/0003-fix-perl-scripts-msvc.patch @@ -9,24 +9,25 @@ my $debug = false; my $configOpts; my $link_dynamic = false; -@@ -44,15 +44,7 @@ +@@ -44,7 +44,7 @@ # Path of this script (source tree path + "win32"). my $current_pwd = dirname(abs_path($0)); -if (!defined($ENV{MSVCDir}) && !defined($ENV{VCINSTALLDIR}) && -- !defined($ENV{TARGET_CPU})) { -- print "\nPlease run VCVARS32.BAT first to set up the Visual Studio build\n" . -- "environment.\n\n"; -- system("pause"); -- exit; --} -- ++if (0 && + !defined($ENV{TARGET_CPU})) { + print "\nPlease run VCVARS32.BAT first to set up the Visual Studio build\n" . + "environment.\n\n"; +@@ -52,7 +52,7 @@ + exit; + } + -while (1) { +while (0) { print "\n\nNet-SNMP build and install options\n"; print "==================================\n\n"; print "1. OpenSSL support: " . ($openssl ? "enabled" : "disabled"). "\n"; -@@ -192,6 +184,8 @@ +@@ -188,6 +188,8 @@ print "Running Configure...\n"; system("perl Configure $configOpts --linktype=$linktype --prefix=\"$install_base\"" . ($logging ? " > configure.out 2>&1" : "")) == 0 || die ($logging ? "Build error (see configure.out)" : "Build error (see above)"); @@ -35,6 +36,7 @@ print "Cleaning...\n"; system("nmake /nologo clean" . ($logging ? " > clean.out 2>&1" : "")) == 0 || die ($logging ? "Build error (see clean.out)" : "Build error (see above)"); + --- win32/Configure +++ win32/Configure @@ -6,7 +6,6 @@ @@ -45,16 +47,16 @@ use Getopt::Long; my $version = "unknown"; -@@ -190,8 +189,6 @@ +@@ -190,7 +189,6 @@ my $perl_inc = $opensslincdir ? "/I $opensslincdir" : ""; -my $perl_cflags = ExtUtils::Embed::ccopts(); -- - my %makefile_subs = ( - "app" => [ "^APPS=", "APPS=" . join(" ", @apps) ], - "apc" => [ "^APPS_CLEAN=", "APPS_CLEAN=" . join(" ", @apps_clean)], -@@ -205,29 +202,23 @@ + # Do not use $perl_cflags if these come from a Perl executable built with gcc. +-$perl_cflags = "" if $perl_cflags =~ / -pipe/; ++ + +@@ -207,29 +205,24 @@ "sdk" => [ "^SDK=", $sdk == 1 ? "SDK=true" : "SDK=false" ], "pin" => [ "^PERL_DEFINE=","PERL_DEFINE=$perl_define" ], "pdf" => [ "^PERL_INC=", "PERL_INC=$perl_inc" ], @@ -62,7 +64,7 @@ + "pcf" => [ "^PERL_CFLAGS=","PERL_CFLAGS=" ], "cfl" => [ "^CFLAGS=", "CFLAGS=$perl_define " . "/D WIN32_LEAN_AND_MEAN " . -- "/EHsc " . + "/EHsc " . - "/FD " . - "/FR\$(INTDIR)\\ " . "/Fd\$(INTDIR)\\\$(PROGNAME).pdb " . @@ -89,7 +91,7 @@ ], "rsc" => [ "^RSCFLAGS=", "RSCFLAGS=/l 0x409 " . ($config eq "release" ? "/d NDEBUG" : -@@ -308,9 +299,3 @@ +@@ -310,9 +303,3 @@ print " Blumenthal AES: " . ($blumenthal_aes ? "enabled" : "disabled") . "\n"; print " IPv6 transport: " . ($b_ipv6 == 1 ? "enabled" : "disabled") . "\n"; print " winExtDLL agent: " . ($b_winextdll == 1 ? "enabled" : "disabled") . "\n"; diff --git a/recipes/net-snmp/all/patches/0004-fix-apple-arm64-build.patch b/recipes/net-snmp/all/patches/0004-fix-apple-arm64-build.patch deleted file mode 100644 index 018c49021fc87..0000000000000 --- a/recipes/net-snmp/all/patches/0004-fix-apple-arm64-build.patch +++ /dev/null @@ -1,17 +0,0 @@ -Upstream suggests the just hardcode this value: -https://github.com/net-snmp/net-snmp/issues/295#issuecomment-1002631231 - ---- config.sub -+++ config.sub -@@ -120,6 +120,11 @@ - exit 1;; - esac - -+if [ "$1" = aarch64-apple-darwin ]; then -+ echo arm-apple-darwin -+ exit 0 -+fi -+ - # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). - # Here we must recognize all the valid KERNEL-OS combinations. - maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` diff --git a/recipes/net-snmp/all/test_package/CMakeLists.txt b/recipes/net-snmp/all/test_package/CMakeLists.txt index bed2bf477f616..21569fa32fd1f 100644 --- a/recipes/net-snmp/all/test_package/CMakeLists.txt +++ b/recipes/net-snmp/all/test_package/CMakeLists.txt @@ -1,9 +1,6 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.15) project(test_package C) -include("${CMAKE_BINARY_DIR}/conanbuildinfo.cmake") -conan_basic_setup(TARGETS KEEP_RPATHS) - find_package(net-snmp REQUIRED CONFIG) add_executable(test_package test_package.c) diff --git a/recipes/net-snmp/all/test_package/conanfile.py b/recipes/net-snmp/all/test_package/conanfile.py index 56657365795bd..ef5d7042163ec 100644 --- a/recipes/net-snmp/all/test_package/conanfile.py +++ b/recipes/net-snmp/all/test_package/conanfile.py @@ -1,19 +1,19 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake import os -from conans import ConanFile, CMake, tools - class TestPackageConan(ConanFile): settings = "os", "arch", "compiler", "build_type" - generators = "cmake", "cmake_find_package_multi" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) - def build_requirements(self): - if self.settings.os == "Macos" and self.settings.arch == "armv8": - # Attempting to use @rpath without - # CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG being set. This could be - # because you are using a Mac OS X version less than 10.5 or - # because CMake's platform configuration is corrupt. - self.build_requires("cmake/3.20.1") + def layout(self): + cmake_layout(self) def build(self): cmake = CMake(self) @@ -21,6 +21,6 @@ def build(self): cmake.build() def test(self): - if not tools.cross_building(self): - bin_path = os.path.join("bin", "test_package") - self.run(bin_path, run_environment=True) + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/net-snmp/all/test_package/test_package.c b/recipes/net-snmp/all/test_package/test_package.c index db6d49e73a2f8..dbe79814204fe 100644 --- a/recipes/net-snmp/all/test_package/test_package.c +++ b/recipes/net-snmp/all/test_package/test_package.c @@ -2,12 +2,8 @@ #include #include -int main(int argc, char const* argv[]) +int main() { - (void)argc; - (void)argv; - netsnmp_free(NULL); - return 0; } diff --git a/recipes/net-snmp/all/test_v1_package/CMakeLists.txt b/recipes/net-snmp/all/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..91630d79f4abb --- /dev/null +++ b/recipes/net-snmp/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/net-snmp/all/test_v1_package/conanfile.py b/recipes/net-snmp/all/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..a8c92dea63335 --- /dev/null +++ b/recipes/net-snmp/all/test_v1_package/conanfile.py @@ -0,0 +1,18 @@ +import os + +from conans import ConanFile, CMake, tools + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "cmake", "cmake_find_package_multi" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if not tools.cross_building(self): + bin_path = os.path.join("bin", "test_package") + self.run(bin_path, run_environment=True) diff --git a/recipes/net-snmp/config.yml b/recipes/net-snmp/config.yml index f15097f7b11ab..be87e4ef2a874 100644 --- a/recipes/net-snmp/config.yml +++ b/recipes/net-snmp/config.yml @@ -1,3 +1,3 @@ versions: - "5.9.1": + "5.9.4": folder: all diff --git a/recipes/netcdf/all/conandata.yml b/recipes/netcdf/all/conandata.yml index c96fc1ea18103..e6119be629931 100644 --- a/recipes/netcdf/all/conandata.yml +++ b/recipes/netcdf/all/conandata.yml @@ -10,7 +10,13 @@ patches: - patch_file: "patches/4.7.4-0001-fix-cmake.patch" patch_description: "fixes for cmake target_link_libraries and using deps" patch_type: "conan" + - patch_file: "patches/4.7.4-0002-fix-cross-compile.patch" + patch_description: "fixes 'Unable to find the math library' when cross compiling" + patch_type: "conan" "4.8.1": - patch_file: "patches/4.8.1-0001-fix-cmake.patch" patch_description: "fixes for cmake target_link_libraries and using deps" patch_type: "conan" + - patch_file: "patches/4.8.1-0002-fix-cross-compile.patch" + patch_description: "fixes 'Unable to find the math library' when cross compiling" + patch_type: "conan" diff --git a/recipes/netcdf/all/conanfile.py b/recipes/netcdf/all/conanfile.py index 44608e3405cb8..748b4bb9a8744 100644 --- a/recipes/netcdf/all/conanfile.py +++ b/recipes/netcdf/all/conanfile.py @@ -75,6 +75,7 @@ def requirements(self): def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) + apply_conandata_patches(self) def generate(self): tc = CMakeToolchain(self) @@ -95,7 +96,6 @@ def generate(self): tc.generate() def build(self): - apply_conandata_patches(self) cmake = CMake(self) cmake.configure() cmake.build() diff --git a/recipes/netcdf/all/patches/4.7.4-0002-fix-cross-compile.patch b/recipes/netcdf/all/patches/4.7.4-0002-fix-cross-compile.patch new file mode 100644 index 0000000000000..6c157604fa80f --- /dev/null +++ b/recipes/netcdf/all/patches/4.7.4-0002-fix-cross-compile.patch @@ -0,0 +1,17 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 80a986f..7e398ba 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -864,7 +864,11 @@ ENDIF() + + # Check for the math library so it can be explicitly linked. + IF(NOT WIN32) +- FIND_LIBRARY(HAVE_LIBM NAMES math m libm) ++ INCLUDE(CheckLibraryExists) ++ CHECK_LIBRARY_EXISTS(m log "" CAN_LINK_LIBM) ++ IF(CAN_LINK_LIBM) ++ SET(HAVE_LIBM m) ++ ENDIF() + MESSAGE(STATUS "Found Math library: ${HAVE_LIBM}") + IF(NOT HAVE_LIBM) + MESSAGE(FATAL_ERROR "Unable to find the math library.") diff --git a/recipes/netcdf/all/patches/4.8.1-0002-fix-cross-compile.patch b/recipes/netcdf/all/patches/4.8.1-0002-fix-cross-compile.patch new file mode 100644 index 0000000000000..1b07967b34210 --- /dev/null +++ b/recipes/netcdf/all/patches/4.8.1-0002-fix-cross-compile.patch @@ -0,0 +1,17 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index fd6713d..c6312b2 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -938,7 +938,11 @@ OPTION(ENABLE_BYTERANGE "Enable byte-range access to remote datasets.." OFF) + + # Check for the math library so it can be explicitly linked. + IF(NOT WIN32) +- FIND_LIBRARY(HAVE_LIBM NAMES math m libm) ++ INCLUDE(CheckLibraryExists) ++ CHECK_LIBRARY_EXISTS(m log "" CAN_LINK_LIBM) ++ IF(CAN_LINK_LIBM) ++ SET(HAVE_LIBM m) ++ ENDIF() + MESSAGE(STATUS "Found Math library: ${HAVE_LIBM}") + IF(NOT HAVE_LIBM) + MESSAGE(FATAL_ERROR "Unable to find the math library.") diff --git a/recipes/nghttp3/all/conandata.yml b/recipes/nghttp3/all/conandata.yml index d0fe8bd38465c..9fdcd6c92b130 100644 --- a/recipes/nghttp3/all/conandata.yml +++ b/recipes/nghttp3/all/conandata.yml @@ -1,4 +1,16 @@ sources: + "1.6.0": + url: "https://github.com/ngtcp2/nghttp3/releases/download/v1.6.0/nghttp3-1.6.0.tar.bz2" + sha256: "e49806e1008fe823961616dc61dab7df0f20d3e1f43bc76faecf3e10e541a4b8" + "1.5.0": + url: "https://github.com/ngtcp2/nghttp3/releases/download/v1.5.0/nghttp3-1.5.0.tar.bz2" + sha256: "4d89a3b84dbe2c6e0fe1367a2082f23b3c6e3279536e2436aed1a3785f6716c5" + "1.4.0": + url: "https://github.com/ngtcp2/nghttp3/releases/download/v1.4.0/nghttp3-1.4.0.tar.bz2" + sha256: "bf8fbb4242cff0feb10b3e0d02545a8ad9a71d932f877a57a592bfde62a26019" + "1.3.0": + url: "https://github.com/ngtcp2/nghttp3/releases/download/v1.3.0/nghttp3-1.3.0.tar.bz2" + sha256: "1f6bda74a888bfeb110a660a04b2ea25b756e0774d48143e34374af83d25e4a8" "1.2.0": url: "https://github.com/ngtcp2/nghttp3/releases/download/v1.2.0/nghttp3-1.2.0.tar.bz2" sha256: "da1bc26af1fd8756b59883c256153d2f41064294750454ee4c970fe087a70056" diff --git a/recipes/nghttp3/all/conanfile.py b/recipes/nghttp3/all/conanfile.py index 85e3ee603cc88..9fbb63e061dc5 100644 --- a/recipes/nghttp3/all/conanfile.py +++ b/recipes/nghttp3/all/conanfile.py @@ -56,6 +56,7 @@ def generate(self): if is_apple_os(self): # workaround for: install TARGETS given no BUNDLE DESTINATION for MACOSX_BUNDLE executable tc.cache_variables["CMAKE_MACOSX_BUNDLE"] = False + tc.variables["BUILD_TESTING"] = False tc.generate() tc = VirtualBuildEnv(self) tc.generate(scope="build") @@ -72,6 +73,7 @@ def package(self): cmake.install() rmdir(self, os.path.join(self.package_folder, "share")) rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) + rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) def package_info(self): self.cpp_info.libs = ["nghttp3"] diff --git a/recipes/nghttp3/config.yml b/recipes/nghttp3/config.yml index 3550769ed467e..882e07adca5bd 100644 --- a/recipes/nghttp3/config.yml +++ b/recipes/nghttp3/config.yml @@ -1,4 +1,12 @@ versions: + "1.6.0": + folder: all + "1.5.0": + folder: all + "1.4.0": + folder: all + "1.3.0": + folder: all "1.2.0": folder: all "1.1.0": diff --git a/recipes/nifti_clib/all/conandata.yml b/recipes/nifti_clib/all/conandata.yml new file mode 100644 index 0000000000000..1821fa5866772 --- /dev/null +++ b/recipes/nifti_clib/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "3.0.0": + url: "https://github.com/NIFTI-Imaging/nifti_clib/archive/refs/tags/v3.0.0.tar.gz" + sha256: "fe6cb1076974df01844f3f4dab1aa844953b3bc1d679126c652975158573d03d" diff --git a/recipes/nifti_clib/all/conanfile.py b/recipes/nifti_clib/all/conanfile.py new file mode 100644 index 0000000000000..14e3e3f3e4960 --- /dev/null +++ b/recipes/nifti_clib/all/conanfile.py @@ -0,0 +1,151 @@ +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.files import copy, get, rm, rmdir +from conan.tools.microsoft import is_msvc, is_msvc_static_runtime +import os + + +required_conan_version = ">=1.53.0" + + +class NiftiClibConan(ConanFile): + name = "nifti_clib" + description = "C libraries for NIFTI support" + license = "LicenseRef-LICENSE" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/NIFTI-Imaging/nifti_clib" + topics = ("image") + package_type = "library" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + "use_nifti2": [True, False], + "use_cifti": [True, False], + "use_fslio": [True, False] + } + default_options = { + "shared": False, + "fPIC": True, + "use_nifti2": True, + "use_cifti": False, # seems to be beta? + "use_fslio": False # Note in CMakeLists.txt: "If OFF, The copyright of this code is questionable for inclusion with nifti." + } + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def validate(self): + if is_msvc(self) and self.options.shared: + # not supported due to not having dllexport definitions + raise ConanInvalidConfiguration(f"{self.ref} does not support -o {self.ref}:shared=True with MSVC compiler.") + if not self.options.use_nifti2 and self.options.use_cifti: + raise ConanInvalidConfiguration(f"{self.ref} -o '&:use_cifti=True' requires -o '&:use_nifti2=True'") + + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + self.settings.rm_safe("compiler.cppstd") + self.settings.rm_safe("compiler.libcxx") + + def layout(self): + cmake_layout(self, src_folder="src") + + def requirements(self): + self.requires("zlib/[>=1.2.11 <2]") + if self.options.use_cifti: + self.requires("expat/[>=2.6.2 <3]") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + tc.variables["NIFTI_INSTALL_NO_DOCS"] = True + tc.variables["USE_NIFTI2_CODE"] = self.options.use_nifti2 + tc.variables["USE_CIFTI_CODE"] = self.options.use_cifti + tc.variables["USE_FSL_CODE"] = self.options.use_fslio + tc.variables["NIFTI_BUILD_TESTING"] = False # disable building tests + if is_msvc(self): + tc.variables["USE_MSVC_RUNTIME_LIBRARY_DLL"] = not is_msvc_static_runtime(self) + tc.preprocessor_definitions["_CRT_SECURE_NO_WARNINGS"] = 1 + tc.generate() + tc = CMakeDeps(self) + tc.generate() + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def package(self): + copy(self, "LICENSE", self.source_folder, os.path.join(self.package_folder, "licenses")) + cmake = CMake(self) + cmake.install() + + rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) + rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) + rmdir(self, os.path.join(self.package_folder, "share")) + rm(self, "*.la", os.path.join(self.package_folder, "lib")) + rm(self, "*.pdb", os.path.join(self.package_folder, "lib")) + rm(self, "*.pdb", os.path.join(self.package_folder, "bin")) + + def package_info(self): + self.cpp_info.set_property("cmake_file_name", "nifti") + self.cpp_info.set_property("cmake_target_name", "NIFTI::NIFTI") + self.cpp_info.set_property("pkg_config_name", "nifti") + self.cpp_info.includedirs += [ os.path.join("include", "nifti") ] + + sys_libs = [] + if self.settings.os in ["Linux", "FreeBSD"]: + sys_libs += ["m"] + + self.cpp_info.required_components = ["ZLIB::ZLIB"] + if self.options.use_cifti: + self.cpp_info.required_components += ["EXPAT::EXPAT"] + + self.cpp_info.components["znz"].libs = ["znz"] + self.cpp_info.components["znz"].set_property("pkg_config_name", "znz") + self.cpp_info.components["znz"].set_property("cmake_target_name", "NIFTI::znz") + self.cpp_info.components["znz"].includedirs += [os.path.join("include", "nifti")] + self.cpp_info.components["znz"].system_libs += sys_libs + + # inside the niftilib folder + self.cpp_info.components["niftiio"].libs = ["niftiio"] + self.cpp_info.components["niftiio"].set_property("pkg_config_name", "niftiio") + self.cpp_info.components["niftiio"].set_property("cmake_target_name", "NIFTI::niftiio") + self.cpp_info.components["niftiio"].includedirs += [os.path.join("include", "nifti")] + self.cpp_info.components["niftiio"].system_libs += sys_libs + + self.cpp_info.components["nifticdf"].libs = ["nifticdf"] + self.cpp_info.components["nifticdf"].requires = ["niftiio"] + self.cpp_info.components["nifticdf"].set_property("pkg_config_name", "nifticdf") + self.cpp_info.components["nifticdf"].set_property("cmake_target_name", "NIFTI::nifticdf") + self.cpp_info.components["nifticdf"].includedirs += [os.path.join("include", "nifti")] + self.cpp_info.components["nifticdf"].system_libs += sys_libs + + if self.options.use_nifti2: + self.cpp_info.components["nifti2"].libs = ["nifti2"] + self.cpp_info.components["nifti2"].requires = ["znz"] + self.cpp_info.components["nifti2"].set_property("pkg_config_name", "nifti2") + self.cpp_info.components["nifti2"].set_property("cmake_target_name", "NIFTI::nifti2") + self.cpp_info.components["nifti2"].includedirs += [os.path.join("include", "nifti")] + self.cpp_info.components["nifti2"].system_libs += sys_libs + + if self.options.use_cifti: + self.cpp_info.components["cifti"].libs = ["cifti"] + self.cpp_info.components["cifti"].requires = ["nifti2"] + self.cpp_info.components["cifti"].set_property("pkg_config_name", "cifti") + self.cpp_info.components["cifti"].set_property("cmake_target_name", "NIFTI::cifti") + self.cpp_info.components["cifti"].includedirs += [os.path.join("include", "nifti")] + self.cpp_info.components["cifti"].system_libs += sys_libs + + if self.options.use_fslio: + self.cpp_info.components["fslio"].libs = ["fslio"] + self.cpp_info.components["fslio"].requires = ["nifti2"] + self.cpp_info.components["fslio"].set_property("pkg_config_name", "fslio") + self.cpp_info.components["fslio"].set_property("cmake_target_name", "NIFTI::fslio") + self.cpp_info.components["fslio"].includedirs += [os.path.join("include", "nifti")] + self.cpp_info.components["fslio"].system_libs += sys_libs diff --git a/recipes/nifti_clib/all/test_package/CMakeLists.txt b/recipes/nifti_clib/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..a63a2b6d3fe16 --- /dev/null +++ b/recipes/nifti_clib/all/test_package/CMakeLists.txt @@ -0,0 +1,9 @@ +cmake_minimum_required(VERSION 3.15) + +project(test_package LANGUAGES C) + +find_package(NIFTI 3 REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.c) + +target_link_libraries(${PROJECT_NAME} PRIVATE NIFTI::nifticdf) diff --git a/recipes/nifti_clib/all/test_package/conanfile.py b/recipes/nifti_clib/all/test_package/conanfile.py new file mode 100644 index 0000000000000..ef5d7042163ec --- /dev/null +++ b/recipes/nifti_clib/all/test_package/conanfile.py @@ -0,0 +1,26 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/nifti_clib/all/test_package/test_package.c b/recipes/nifti_clib/all/test_package/test_package.c new file mode 100644 index 0000000000000..c1c849f8faf18 --- /dev/null +++ b/recipes/nifti_clib/all/test_package/test_package.c @@ -0,0 +1,9 @@ +#include "nifticdf.h" + +// taken from nifti_clib/real_easy/minimal_example_of_downstream_usage +int main(void) { + double input= 7.0; + const double output = alnrel(&input); + + return (output > 0.0) ? EXIT_SUCCESS: EXIT_FAILURE ; +} diff --git a/recipes/nifti_clib/config.yml b/recipes/nifti_clib/config.yml new file mode 100644 index 0000000000000..3a44950f9d81d --- /dev/null +++ b/recipes/nifti_clib/config.yml @@ -0,0 +1,4 @@ +versions: + # Newer versions at the top + "3.0.0": + folder: all diff --git a/recipes/ninja/all/conandata.yml b/recipes/ninja/all/conandata.yml index 02891869efb97..36f42c6c69771 100644 --- a/recipes/ninja/all/conandata.yml +++ b/recipes/ninja/all/conandata.yml @@ -1,4 +1,10 @@ sources: + "1.12.1": + url: "https://github.com/ninja-build/ninja/archive/v1.12.1.tar.gz" + sha256: "821bdff48a3f683bc4bb3b6f0b5fe7b2d647cf65d52aeb63328c91a6c6df285a" + "1.12.0": + url: "https://github.com/ninja-build/ninja/archive/v1.12.0.tar.gz" + sha256: "8b2c86cd483dc7fcb7975c5ec7329135d210099a89bc7db0590a07b0bbfe49a5" "1.11.1": url: "https://github.com/ninja-build/ninja/archive/v1.11.1.tar.gz" sha256: "31747ae633213f1eda3842686f83c2aa1412e0f5691d1c14dbbcc67fe7400cea" diff --git a/recipes/ninja/all/conanfile.py b/recipes/ninja/all/conanfile.py index 6fede8df5ba1b..5e97a00b8feff 100644 --- a/recipes/ninja/all/conanfile.py +++ b/recipes/ninja/all/conanfile.py @@ -1,6 +1,6 @@ from conan import ConanFile, conan_version from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout -from conan.tools.files import copy, get +from conan.tools.files import copy, get, replace_in_file from conan.tools.scm import Version import os @@ -25,6 +25,10 @@ def package_id(self): def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) + cmakelists = os.path.join(self.source_folder, "CMakeLists.txt") + + #prevent re2c (which is optional and not needed) from being used + replace_in_file(self, cmakelists, "if(RE2C)", "if(FALSE)") def generate(self): tc = CMakeToolchain(self) diff --git a/recipes/ninja/config.yml b/recipes/ninja/config.yml index 0a0061dfb232d..8d14bc8f88871 100644 --- a/recipes/ninja/config.yml +++ b/recipes/ninja/config.yml @@ -1,4 +1,8 @@ versions: + "1.12.1": + folder: all + "1.12.0": + folder: all "1.11.1": folder: all "1.11.0": diff --git a/recipes/nng/all/conandata.yml b/recipes/nng/all/conandata.yml index c572a0578b71b..2232f4892fec8 100644 --- a/recipes/nng/all/conandata.yml +++ b/recipes/nng/all/conandata.yml @@ -1,4 +1,10 @@ sources: + "1.9.0": + url: "https://github.com/nanomsg/nng/archive/refs/tags/v1.9.0.tar.gz" + sha256: "ff882bda0a854abd184a7c1eb33329e526928ef98e80ef0457dd9a708bb5b0b1" + "1.8.0": + url: "https://github.com/nanomsg/nng/archive/refs/tags/v1.8.0.tar.gz" + sha256: "cfacfdfa35c1618a28bb940e71f774a513dcb91292999696b4346ad8bfb5baff" "1.7.3": url: "https://github.com/nanomsg/nng/archive/refs/tags/v1.7.3.tar.gz" sha256: "035f2c3cad4e45fc0d978c54a338c197d1937527ae6feb82180d428a96b83474" diff --git a/recipes/nng/all/conanfile.py b/recipes/nng/all/conanfile.py index 91bc43507421d..2f960488b2d41 100644 --- a/recipes/nng/all/conanfile.py +++ b/recipes/nng/all/conanfile.py @@ -2,7 +2,7 @@ from conan.errors import ConanInvalidConfiguration from conan.tools.files import apply_conandata_patches, export_conandata_patches, get, copy, rmdir from conan.tools.scm import Version -from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout import os @@ -28,6 +28,7 @@ class NngConan(ConanFile): "max_poller_threads": ["ANY"], "compat": [True, False], "with_ipv6": [True, False], + "tls_engine": ["mbed", "wolf"], } default_options = { "shared": False, @@ -40,6 +41,7 @@ class NngConan(ConanFile): "max_poller_threads": "8", "compat": True, "with_ipv6": True, + "tls_engine": "mbed", } def export_sources(self): @@ -56,6 +58,8 @@ def config_options(self): del self.options.compat if Version(self.version) < "1.7.3": del self.options.with_ipv6 + if Version(self.version) < "1.9.0": + del self.options.tls_engine def configure(self): if self.options.shared: @@ -68,10 +72,14 @@ def layout(self): def requirements(self): if self.options.tls: - if Version(self.version) < "1.5.2": - self.requires("mbedtls/2.25.0") - else: - self.requires("mbedtls/3.5.2") + tls_engine = self.options.get_safe("tls_engine", "mbed") + if tls_engine == "mbed": + if Version(self.version) < "1.5.2": + self.requires("mbedtls/2.25.0") + else: + self.requires("mbedtls/3.5.2") + elif tls_engine == "wolf": + self.requires("wolfssl/5.7.2") def validate(self): compiler_minimum_version = { @@ -108,7 +116,10 @@ def generate(self): tc.variables["NNG_ENABLE_COMPAT"] = self.options.compat if "with_ipv6" in self.options: tc.variables["NNG_ENABLE_IPV6"] = self.options.with_ipv6 + tc.variables["NNG_TLS_ENGINE"] = self.options.get_safe("tls_engine", "mbed") tc.generate() + deps = CMakeDeps(self) + deps.generate() def build(self): apply_conandata_patches(self) diff --git a/recipes/nng/config.yml b/recipes/nng/config.yml index b2f902db3e414..a216ebf04278c 100644 --- a/recipes/nng/config.yml +++ b/recipes/nng/config.yml @@ -1,4 +1,8 @@ versions: + "1.9.0": + folder: all + "1.8.0": + folder: all "1.7.3": folder: all "1.7.2": diff --git a/recipes/nodejs/all/conandata.yml b/recipes/nodejs/all/conandata.yml index 56a1be535ef41..da170c70c328b 100644 --- a/recipes/nodejs/all/conandata.yml +++ b/recipes/nodejs/all/conandata.yml @@ -1,52 +1,51 @@ sources: - "12.14.1": - Windows: - "x86_64": - url: "https://nodejs.org/dist/v12.14.1/node-v12.14.1-win-x64.zip" - sha256: "1f96ccce3ba045ecea3f458e189500adb90b8bc1a34de5d82fc10a5bf66ce7e3" - Linux: - "x86_64": - url: "https://nodejs.org/dist/v12.14.1/node-v12.14.1-linux-x64.tar.xz" - sha256: "07cfcaa0aa9d0fcb6e99725408d9e0b07be03b844701588e3ab5dbc395b98e1b" - Macos: - "x86_64": - url: "https://nodejs.org/dist/v12.14.1/node-v12.14.1-darwin-x64.tar.gz" - sha256: "0be10a28737527a1e5e3784d3ad844d742fe8b0718acd701fd48f718fd3af78f" - "13.6.0": + "20.16.0": Windows: "x86_64": - url: "https://nodejs.org/dist/v13.6.0/node-v13.6.0-win-x64.zip" - sha256: "7fe37b34a4673a071bea52fcaf913ec422cf6fd79fd025bfb22de42ccc77f386" + url: "https://nodejs.org/dist/v20.16.0/node-v20.16.0-win-x64.zip" + sha256: "4e88373ac5ae859ad4d50cc3c5fa86eb3178d089b72e64c4dbe6eeac5d7b5979" + "armv8": + url: "https://nodejs.org/dist/v20.16.0/node-v20.16.0-win-arm64.zip" + sha256: "af5a85ea299fcebd34c3c726a47a926e73171f9b657a6eaa796c011597241bf8" Linux: "x86_64": - url: "https://nodejs.org/dist/v13.6.0/node-v13.6.0-linux-x64.tar.xz" - sha256: "00f01315a867da16d1638f7a02966c608e344ac6c5b7d04d1fdae3138fa9d798" + url: "https://nodejs.org/dist/v20.16.0/node-v20.16.0-linux-x64.tar.xz" + sha256: "c30af7dfea46de7d8b9b370fa33b8b15440bc93f0a686af8601bbb48b82f16c0" + "armv7": + url: "https://nodejs.org/dist/v20.16.0/node-v20.16.0-linux-armv7l.tar.xz" + sha256: "a23a49029e8c7788c701eb3ace553260b7676a5a2ea9965ba92e4817008fbefe" + "armv8": + url: "https://nodejs.org/dist/v20.16.0/node-v20.16.0-linux-arm64.tar.xz" + sha256: "1d9929e72f692179f884cd676b2dfabd879cb77defa7869dc8cfc802619277fb" Macos: "x86_64": - url: "https://nodejs.org/dist/v13.6.0/node-v13.6.0-darwin-x64.tar.gz" - sha256: "da13adb864777b322dda7af20410a9b0c63aa69de4b5574008d1e6910768bf69" - "16.3.0": + url: "https://nodejs.org/dist/v20.16.0/node-v20.16.0-darwin-x64.tar.gz" + sha256: "e18942cd706e4d69a4845ddacee2f1c17a72e853a229e3d2623d2edeb7efde72" + "armv8": + url: "https://nodejs.org/dist/v20.16.0/node-v20.16.0-darwin-arm64.tar.gz" + sha256: "fc7355e778b181575153b7dea4879e8021776eeb376c43c50f65893d2ea70aa3" + "18.15.0": Windows: "x86_64": - url: "https://nodejs.org/dist/v16.3.0/node-v16.3.0-win-x64.zip" - sha256: "3352e58d3603cf58964409d07f39f3816285317d638ddb0a0bf3af5deb2ff364" + url: "https://nodejs.org/dist/v18.15.0/node-v18.15.0-win-x64.zip" + sha256: "118fbcae58bc8c53cbe97a10c019734ed90685da8dda98aa0b0f4aeead42a647" Linux: "x86_64": - url: "https://nodejs.org/dist/v16.3.0/node-v16.3.0-linux-x64.tar.xz" - sha256: "5347ece975747e4d9768d4ed3f8b2220c955ac01f8a695347cd7f71ff5efa318" + url: "https://nodejs.org/dist/v18.15.0/node-v18.15.0-linux-x64.tar.xz" + sha256: "c8c5fa53ce0c0f248e45983e86368e0b1daf84b77e88b310f769c3cfc12682ef" "armv7": - url: "https://nodejs.org/dist/v16.3.0/node-v16.3.0-linux-armv7l.tar.xz" - sha256: "c8817e30fb910476ec1f223de7eedd31f3d157ddf2003a3083d7f5662180e4de" + url: "https://nodejs.org/dist/v18.15.0/node-v18.15.0-linux-armv7l.tar.xz" + sha256: "baad3cdf1365f46bf837635554b10bc3e320799e69ac26e07df1fcde0c1738c7" "armv8": - url: "https://nodejs.org/dist/v16.3.0/node-v16.3.0-linux-arm64.tar.xz" - sha256: "67dd97e41aad1bc11736e99cba119525b4f3472b132c46730ba8cf03f7076e23" + url: "https://nodejs.org/dist/v18.15.0/node-v18.15.0-linux-arm64.tar.xz" + sha256: "98ea6ed0a1ae55334ab2c03c34d5e52c6dc3dee8f236c0afc08ab1c964506633" Macos: "x86_64": - url: "https://nodejs.org/dist/v16.3.0/node-v16.3.0-darwin-x64.tar.gz" - sha256: "3e075bcfb6130dda84bfd04633cb228ec71e72d9a844c57efb7cfff130b4be89" + url: "https://nodejs.org/dist/v18.15.0/node-v18.15.0-darwin-x64.tar.gz" + sha256: "76add174d2d3f98da08907412e82add7352b8cb6f639324d352a65c084b99c7e" "armv8": - url: "https://nodejs.org/dist/v16.3.0/node-v16.3.0-darwin-arm64.tar.gz" - sha256: "aeac294dbe54a4dfd222eedfbae704b185c40702254810e2c5917f6dbc80e017" + url: "https://nodejs.org/dist/v18.15.0/node-v18.15.0-darwin-arm64.tar.gz" + sha256: "bd302a689c3c34e2b61d86b97de66d26a335881a17af09b6a0a4bb1019df56e4" "16.20.2": Windows: "x86_64": @@ -69,25 +68,51 @@ sources: "armv8": url: "https://nodejs.org/dist/v16.20.2/node-v16.20.2-darwin-arm64.tar.gz" sha256: "6a5c4108475871362d742b988566f3fe307f6a67ce14634eb3fbceb4f9eea88c" - "18.15.0": + "16.3.0": Windows: "x86_64": - url: "https://nodejs.org/dist/v18.15.0/node-v18.15.0-win-x64.zip" - sha256: "118fbcae58bc8c53cbe97a10c019734ed90685da8dda98aa0b0f4aeead42a647" + url: "https://nodejs.org/dist/v16.3.0/node-v16.3.0-win-x64.zip" + sha256: "3352e58d3603cf58964409d07f39f3816285317d638ddb0a0bf3af5deb2ff364" Linux: "x86_64": - url: "https://nodejs.org/dist/v18.15.0/node-v18.15.0-linux-x64.tar.xz" - sha256: "c8c5fa53ce0c0f248e45983e86368e0b1daf84b77e88b310f769c3cfc12682ef" + url: "https://nodejs.org/dist/v16.3.0/node-v16.3.0-linux-x64.tar.xz" + sha256: "5347ece975747e4d9768d4ed3f8b2220c955ac01f8a695347cd7f71ff5efa318" "armv7": - url: "https://nodejs.org/dist/v18.15.0/node-v18.15.0-linux-armv7l.tar.xz" - sha256: "baad3cdf1365f46bf837635554b10bc3e320799e69ac26e07df1fcde0c1738c7" + url: "https://nodejs.org/dist/v16.3.0/node-v16.3.0-linux-armv7l.tar.xz" + sha256: "c8817e30fb910476ec1f223de7eedd31f3d157ddf2003a3083d7f5662180e4de" "armv8": - url: "https://nodejs.org/dist/v18.15.0/node-v18.15.0-linux-arm64.tar.xz" - sha256: "98ea6ed0a1ae55334ab2c03c34d5e52c6dc3dee8f236c0afc08ab1c964506633" + url: "https://nodejs.org/dist/v16.3.0/node-v16.3.0-linux-arm64.tar.xz" + sha256: "67dd97e41aad1bc11736e99cba119525b4f3472b132c46730ba8cf03f7076e23" Macos: "x86_64": - url: "https://nodejs.org/dist/v18.15.0/node-v18.15.0-darwin-x64.tar.gz" - sha256: "76add174d2d3f98da08907412e82add7352b8cb6f639324d352a65c084b99c7e" + url: "https://nodejs.org/dist/v16.3.0/node-v16.3.0-darwin-x64.tar.gz" + sha256: "3e075bcfb6130dda84bfd04633cb228ec71e72d9a844c57efb7cfff130b4be89" "armv8": - url: "https://nodejs.org/dist/v18.15.0/node-v18.15.0-darwin-arm64.tar.gz" - sha256: "bd302a689c3c34e2b61d86b97de66d26a335881a17af09b6a0a4bb1019df56e4" + url: "https://nodejs.org/dist/v16.3.0/node-v16.3.0-darwin-arm64.tar.gz" + sha256: "aeac294dbe54a4dfd222eedfbae704b185c40702254810e2c5917f6dbc80e017" + "13.6.0": + Windows: + "x86_64": + url: "https://nodejs.org/dist/v13.6.0/node-v13.6.0-win-x64.zip" + sha256: "7fe37b34a4673a071bea52fcaf913ec422cf6fd79fd025bfb22de42ccc77f386" + Linux: + "x86_64": + url: "https://nodejs.org/dist/v13.6.0/node-v13.6.0-linux-x64.tar.xz" + sha256: "00f01315a867da16d1638f7a02966c608e344ac6c5b7d04d1fdae3138fa9d798" + Macos: + "x86_64": + url: "https://nodejs.org/dist/v13.6.0/node-v13.6.0-darwin-x64.tar.gz" + sha256: "da13adb864777b322dda7af20410a9b0c63aa69de4b5574008d1e6910768bf69" + "12.14.1": + Windows: + "x86_64": + url: "https://nodejs.org/dist/v12.14.1/node-v12.14.1-win-x64.zip" + sha256: "1f96ccce3ba045ecea3f458e189500adb90b8bc1a34de5d82fc10a5bf66ce7e3" + Linux: + "x86_64": + url: "https://nodejs.org/dist/v12.14.1/node-v12.14.1-linux-x64.tar.xz" + sha256: "07cfcaa0aa9d0fcb6e99725408d9e0b07be03b844701588e3ab5dbc395b98e1b" + Macos: + "x86_64": + url: "https://nodejs.org/dist/v12.14.1/node-v12.14.1-darwin-x64.tar.gz" + sha256: "0be10a28737527a1e5e3784d3ad844d742fe8b0718acd701fd48f718fd3af78f" diff --git a/recipes/nodejs/config.yml b/recipes/nodejs/config.yml index 78cc638a90e4d..7f37f049d8acc 100644 --- a/recipes/nodejs/config.yml +++ b/recipes/nodejs/config.yml @@ -1,11 +1,13 @@ versions: - "12.14.1": + "20.16.0": folder: all - "13.6.0": + "18.15.0": + folder: all + "16.20.2": folder: all "16.3.0": folder: all - "16.20.2": + "13.6.0": folder: all - "18.15.0": + "12.14.1": folder: all diff --git a/recipes/norm/all/conanfile.py b/recipes/norm/all/conanfile.py index 06df6975769c2..3d4877a41e642 100644 --- a/recipes/norm/all/conanfile.py +++ b/recipes/norm/all/conanfile.py @@ -39,7 +39,7 @@ def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - self.requires("libxml2/2.12.3") # dependency of protolib actually + self.requires("libxml2/[>=2.12.5 <3]") # dependency of protolib actually def source(self): get(self, **self.conan_data["sources"][self.version]) diff --git a/recipes/nsync/all/conandata.yml b/recipes/nsync/all/conandata.yml index b694103d49b84..2612b48d1ed17 100644 --- a/recipes/nsync/all/conandata.yml +++ b/recipes/nsync/all/conandata.yml @@ -1,4 +1,16 @@ sources: + "1.29.2": + url: "https://github.com/google/nsync/archive/1.29.2.tar.gz" + sha256: "1d63e967973733d2c97e841e3c05fac4d3fa299f01d14c86f2695594c7a4a2ec" + "1.29.1": + url: "https://github.com/google/nsync/archive/1.29.1.tar.gz" + sha256: "3045a8922171430426b695edf794053182d245f6a382ddcc59ef4a6190848e98" + "1.28.0": + url: "https://github.com/google/nsync/archive/1.28.0.tar.gz" + sha256: "1e6a7193bd85d480faaf992cef204c5cf09f9da72766c9987e25b4f88508eed1" + "1.27.0": + url: "https://github.com/google/nsync/archive/1.27.0.tar.gz" + sha256: "e8e552a358f4a28e844207a7c5cb51767e4aeb0b29e22d23ac2a09924130f761" "1.26.0": url: "https://github.com/google/nsync/archive/1.26.0.tar.gz" sha256: "80fc1e605bb3cf5f272811ece39c4fb6761ffcb9b30563301845cc9ff381eb8b" @@ -12,6 +24,14 @@ sources: sha256: "b7e75b17957c62bd02dd73890bde22da3a564903fcaad651b395453d41d3325b" url: "https://github.com/google/nsync/archive/refs/tags/1.23.0.tar.gz" patches: + "1.29.2": + - patch_file: "patches/0001-1.27.0-darwin-exclude_semaphore_mutex_c_from_nsync_cpp_lib.patch" + "1.29.1": + - patch_file: "patches/0001-1.27.0-darwin-exclude_semaphore_mutex_c_from_nsync_cpp_lib.patch" + "1.28.0": + - patch_file: "patches/0001-1.27.0-darwin-exclude_semaphore_mutex_c_from_nsync_cpp_lib.patch" + "1.27.0": + - patch_file: "patches/0001-1.27.0-darwin-exclude_semaphore_mutex_c_from_nsync_cpp_lib.patch" "1.26.0": - patch_file: "patches/0001-darwin-exclude_semaphore_mutex_c_from_nsync_cpp_lib.patch" "1.25.0": diff --git a/recipes/nsync/all/conanfile.py b/recipes/nsync/all/conanfile.py index fd5515ae38c38..0161c97b47851 100644 --- a/recipes/nsync/all/conanfile.py +++ b/recipes/nsync/all/conanfile.py @@ -1,5 +1,5 @@ from conan import ConanFile -from conan.tools.files import apply_conandata_patches, export_conandata_patches, get, copy, replace_in_file +from conan.tools.files import apply_conandata_patches, export_conandata_patches, get, copy, replace_in_file, rmdir from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout import os @@ -84,6 +84,7 @@ def package(self): copy(self, pattern="LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) cmake = CMake(self) cmake.install() + rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) def package_info(self): self.cpp_info.components["nsync_c"].libs = ["nsync"] diff --git a/recipes/nsync/all/patches/0001-1.27.0-darwin-exclude_semaphore_mutex_c_from_nsync_cpp_lib.patch b/recipes/nsync/all/patches/0001-1.27.0-darwin-exclude_semaphore_mutex_c_from_nsync_cpp_lib.patch new file mode 100644 index 0000000000000..1f3fd75999335 --- /dev/null +++ b/recipes/nsync/all/patches/0001-1.27.0-darwin-exclude_semaphore_mutex_c_from_nsync_cpp_lib.patch @@ -0,0 +1,10 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -125,7 +125,6 @@ + ${NSYNC_OS_CPP_SRC} + "platform/c++11/src/nsync_semaphore_mutex.cc" + "platform/posix/src/clock_gettime.c" +- "platform/posix/src/nsync_semaphore_mutex.c" + ) + elseif ("${CMAKE_SYSTEM_NAME}X" STREQUAL "LinuxX") + set (NSYNC_POSIX ON) diff --git a/recipes/nsync/config.yml b/recipes/nsync/config.yml index 960f98574a708..b839a601be83a 100644 --- a/recipes/nsync/config.yml +++ b/recipes/nsync/config.yml @@ -1,4 +1,12 @@ versions: + "1.29.2": + folder: "all" + "1.29.1": + folder: "all" + "1.28.0": + folder: "all" + "1.27.0": + folder: "all" "1.26.0": folder: "all" "1.25.0": diff --git a/recipes/oatpp-openssl/all/conanfile.py b/recipes/oatpp-openssl/all/conanfile.py index b17d50cd83efc..771c7d111c06d 100644 --- a/recipes/oatpp-openssl/all/conanfile.py +++ b/recipes/oatpp-openssl/all/conanfile.py @@ -7,7 +7,7 @@ from conan.tools.scm import Version import os -required_conan_version = ">=1.51.1" +required_conan_version = ">=2.1" class OatppOpenSSLConan(ConanFile): @@ -18,6 +18,7 @@ class OatppOpenSSLConan(ConanFile): description = "Oat++ OpenSSL library" topics = ("oat++", "oatpp", "openssl") + package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], @@ -28,27 +29,19 @@ class OatppOpenSSLConan(ConanFile): "fPIC": True, } - def config_options(self): - if self.settings.os == "Windows": - del self.options.fPIC - - def configure(self): - if self.options.shared: - try: - del self.options.fPIC - except Exception: - pass + implements = ["auto_shared_fpic"] def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - self.requires(f"oatpp/{self.version}") - self.requires("openssl/[>=1.1 <4]") + # Used in oatpp-openssl/oatpp-openssl/Config.hpp public header + self.requires(f"oatpp/{self.version}", transitive_headers=True) + # Used SSL* and SSL_CTX* used in public headers + self.requires("openssl/[>=1.1 <4]", transitive_headers=True) def validate(self): - if self.info.settings.compiler.get_safe("cppstd"): - check_min_cppstd(self, 11) + check_min_cppstd(self, 11) if is_msvc(self) and self.info.options.shared: raise ConanInvalidConfiguration(f"{self.ref} can not be built as shared library with msvc") @@ -57,13 +50,12 @@ def validate(self): raise ConanInvalidConfiguration(f"{self.ref} requires GCC >=5") def source(self): - get(self, **self.conan_data["sources"][self.version], - destination=self.source_folder, strip_root=True) + get(self, **self.conan_data["sources"][self.version], strip_root=True) def generate(self): tc = CMakeToolchain(self) - tc.variables["OATPP_BUILD_TESTS"] = False - tc.variables["OATPP_MODULES_LOCATION"] = "INSTALLED" + tc.cache_variables["OATPP_BUILD_TESTS"] = False + tc.cache_variables["OATPP_MODULES_LOCATION"] = "INSTALLED" # Honor BUILD_SHARED_LIBS from conan_toolchain (see https://github.com/conan-io/conan/issues/11840) tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0077"] = "NEW" tc.generate() @@ -76,7 +68,7 @@ def build(self): cmake.build() def package(self): - copy(self, "LICENSE", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) + copy(self, "LICENSE", self.source_folder, os.path.join(self.package_folder, "licenses")) cmake = CMake(self) cmake.install() rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) @@ -84,6 +76,7 @@ def package(self): def package_info(self): self.cpp_info.set_property("cmake_file_name", "oatpp-openssl") self.cpp_info.set_property("cmake_target_name", "oatpp::oatpp-openssl") + # TODO: back to global scope in conan v2 once legacy generators removed self.cpp_info.components["_oatpp-openssl"].includedirs = [ os.path.join("include", f"oatpp-{self.version}", "oatpp-openssl") @@ -97,12 +90,5 @@ def package_info(self): if self.settings.os in ["Linux", "FreeBSD"]: self.cpp_info.components["_oatpp-openssl"].system_libs = ["pthread"] - # TODO: to remove in conan v2 once legacy generators removed - self.cpp_info.filenames["cmake_find_package"] = "oatpp-openssl" - self.cpp_info.filenames["cmake_find_package_multi"] = "oatpp-openssl" - self.cpp_info.names["cmake_find_package"] = "oatpp" - self.cpp_info.names["cmake_find_package_multi"] = "oatpp" - self.cpp_info.components["_oatpp-openssl"].names["cmake_find_package"] = "oatpp-openssl" - self.cpp_info.components["_oatpp-openssl"].names["cmake_find_package_multi"] = "oatpp-openssl" self.cpp_info.components["_oatpp-openssl"].set_property("cmake_target_name", "oatpp::oatpp-openssl") self.cpp_info.components["_oatpp-openssl"].requires = ["oatpp::oatpp", "openssl::openssl"] diff --git a/recipes/oatpp-openssl/all/test_package/CMakeLists.txt b/recipes/oatpp-openssl/all/test_package/CMakeLists.txt index 716aedd7390f1..5aaf8115d1dba 100644 --- a/recipes/oatpp-openssl/all/test_package/CMakeLists.txt +++ b/recipes/oatpp-openssl/all/test_package/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.8) +cmake_minimum_required(VERSION 3.15) project(test_package LANGUAGES CXX) find_package(oatpp-openssl REQUIRED CONFIG) diff --git a/recipes/oatpp-openssl/all/test_package/test_package.cpp b/recipes/oatpp-openssl/all/test_package/test_package.cpp index 5b43d477e581e..a3e8d635fe6aa 100644 --- a/recipes/oatpp-openssl/all/test_package/test_package.cpp +++ b/recipes/oatpp-openssl/all/test_package/test_package.cpp @@ -2,8 +2,7 @@ #include "oatpp-openssl/Config.hpp" int main() { - - oatpp::openssl::Config config; - + std::shared_ptr config = oatpp::openssl::Config::createShared(); + std::cout << "Test package successful\n"; return 0; } diff --git a/recipes/oatpp-openssl/all/test_v1_package/CMakeLists.txt b/recipes/oatpp-openssl/all/test_v1_package/CMakeLists.txt deleted file mode 100644 index 07d783bdbcaec..0000000000000 --- a/recipes/oatpp-openssl/all/test_v1_package/CMakeLists.txt +++ /dev/null @@ -1,11 +0,0 @@ -cmake_minimum_required(VERSION 3.8) -project(test_package LANGUAGES CXX) - -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) - -find_package(oatpp-openssl REQUIRED CONFIG) - -add_executable(${PROJECT_NAME} ../test_package/test_package.cpp) -target_link_libraries(${PROJECT_NAME} PRIVATE oatpp::oatpp-openssl) -target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) diff --git a/recipes/oatpp-openssl/all/test_v1_package/conanfile.py b/recipes/oatpp-openssl/all/test_v1_package/conanfile.py deleted file mode 100644 index 38f4483872d47..0000000000000 --- a/recipes/oatpp-openssl/all/test_v1_package/conanfile.py +++ /dev/null @@ -1,17 +0,0 @@ -from conans import ConanFile, CMake, tools -import os - - -class TestPackageConan(ConanFile): - settings = "os", "arch", "compiler", "build_type" - generators = "cmake", "cmake_find_package_multi" - - def build(self): - cmake = CMake(self) - cmake.configure() - cmake.build() - - def test(self): - if not tools.cross_building(self): - bin_path = os.path.join("bin", "test_package") - self.run(bin_path, run_environment=True) diff --git a/recipes/oatpp/all/conandata.yml b/recipes/oatpp/all/conandata.yml index d78e0b1d715f8..afae435ea8dae 100644 --- a/recipes/oatpp/all/conandata.yml +++ b/recipes/oatpp/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.3.0.latest": + url: "https://github.com/oatpp/oatpp/archive/1.3.0-latest.tar.gz" + sha256: "adc3b88076532838cd0fb8155872d6a9467ac0cb5df319735a2396ce6945d064" "1.3.0": url: "https://github.com/oatpp/oatpp/archive/1.3.0.tar.gz" sha256: "e1f80fa8fd7a74da6737e7fee1a4db68b4d7085a3f40e7d550752d6ff5714583" diff --git a/recipes/oatpp/all/conanfile.py b/recipes/oatpp/all/conanfile.py index cae12177c9d72..ac27a054d2bc3 100644 --- a/recipes/oatpp/all/conanfile.py +++ b/recipes/oatpp/all/conanfile.py @@ -5,6 +5,7 @@ from conan.tools.files import copy, get, rmdir from conan.tools.microsoft import is_msvc, is_msvc_static_runtime from conan.tools.scm import Version +from conan.tools.env import VirtualBuildEnv import os required_conan_version = ">=1.54.0" @@ -23,12 +24,21 @@ class OatppConan(ConanFile): options = { "shared": [True, False], "fPIC": [True, False], + "with_test_library": [True, False], } default_options = { "shared": False, "fPIC": True, + "with_test_library": False, } + @property + def _version(self): + version = str(self.version) + if version.endswith(".latest"): + version = version[:-len(".latest")] + return version + def config_options(self): if self.settings.os == "Windows": del self.options.fPIC @@ -49,6 +59,10 @@ def validate(self): if self.settings.compiler == "gcc" and Version(self.settings.compiler.version) < "5": raise ConanInvalidConfiguration("oatpp requires GCC >=5") + def build_requirements(self): + if Version(self._version) >= "1.3.0": + self.tool_requires("cmake/[>=3.20 <4]") + def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) @@ -58,7 +72,10 @@ def generate(self): tc.variables["CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS"] = True if is_msvc(self) and Version(self.version) >= "1.3.0": tc.variables["OATPP_MSVC_LINK_STATIC_RUNTIME"] = is_msvc_static_runtime(self) + tc.variables["OATPP_LINK_TEST_LIBRARY"] = self.options.with_test_library tc.generate() + venv = VirtualBuildEnv(self) + venv.generate(scope="build") def build(self): cmake = CMake(self) @@ -74,8 +91,8 @@ def package(self): def package_info(self): self.cpp_info.set_property("cmake_file_name", "oatpp") - include_dir = os.path.join("include", f"oatpp-{self.version}", "oatpp") - lib_dir = os.path.join("lib", f"oatpp-{self.version}") + include_dir = os.path.join("include", f"oatpp-{self._version}", "oatpp") + lib_dir = os.path.join("lib", f"oatpp-{self._version}") # oatpp self.cpp_info.components["_oatpp"].names["cmake_find_package"] = "oatpp" @@ -85,18 +102,19 @@ def package_info(self): self.cpp_info.components["_oatpp"].libdirs = [lib_dir] self.cpp_info.components["_oatpp"].libs = ["oatpp"] if self.settings.os in ["Linux", "FreeBSD"]: - self.cpp_info.components["_oatpp"].system_libs = ["pthread"] + self.cpp_info.components["_oatpp"].system_libs = ["pthread", "m"] elif self.settings.os == "Windows": self.cpp_info.components["_oatpp"].system_libs = ["ws2_32", "wsock32"] # oatpp-test - self.cpp_info.components["oatpp-test"].names["cmake_find_package"] = "oatpp-test" - self.cpp_info.components["oatpp-test"].names["cmake_find_package_multi"] = "oatpp-test" - self.cpp_info.components["oatpp-test"].set_property("cmake_target_name", "oatpp-test::oatpp-test") - self.cpp_info.components["oatpp-test"].includedirs = [include_dir] - self.cpp_info.components["oatpp-test"].libdirs = [lib_dir] - self.cpp_info.components["oatpp-test"].libs = ["oatpp-test"] - self.cpp_info.components["oatpp-test"].requires = ["_oatpp"] + if self.options.with_test_library: + self.cpp_info.components["oatpp-test"].names["cmake_find_package"] = "oatpp-test" + self.cpp_info.components["oatpp-test"].names["cmake_find_package_multi"] = "oatpp-test" + self.cpp_info.components["oatpp-test"].set_property("cmake_target_name", "oatpp-test::oatpp-test") + self.cpp_info.components["oatpp-test"].includedirs = [include_dir] + self.cpp_info.components["oatpp-test"].libdirs = [lib_dir] + self.cpp_info.components["oatpp-test"].libs = ["oatpp-test"] + self.cpp_info.components["oatpp-test"].requires = ["_oatpp"] # workaround to have all components in the global target self.cpp_info.set_property("cmake_target_name", "oatpp::oatpp-test") diff --git a/recipes/oatpp/all/test_package/CMakeLists.txt b/recipes/oatpp/all/test_package/CMakeLists.txt index cffae2f965d2e..9c8af92835a8c 100644 --- a/recipes/oatpp/all/test_package/CMakeLists.txt +++ b/recipes/oatpp/all/test_package/CMakeLists.txt @@ -3,12 +3,6 @@ project(test_package LANGUAGES CXX) find_package(oatpp REQUIRED CONFIG) -if ("${oatpp_VERSION}" VERSION_GREATER_EQUAL "1.3.0") - add_executable(${PROJECT_NAME} test_package.cpp DeserializerTest_1_3_0.cpp) -elseif("${oatpp_VERSION}" VERSION_GREATER_EQUAL "1.1.0") - add_executable(${PROJECT_NAME} test_package.cpp DeserializerTest_1_1_0.cpp) -else() - add_executable(${PROJECT_NAME} test_package.cpp DeserializerTest_1_0_0.cpp) -endif() -target_link_libraries(${PROJECT_NAME} PRIVATE oatpp::oatpp oatpp::oatpp-test) +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE oatpp::oatpp) target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) diff --git a/recipes/oatpp/all/test_package/DeserializerTest.hpp b/recipes/oatpp/all/test_package/DeserializerTest.hpp deleted file mode 100644 index 6c1c0ec06209e..0000000000000 --- a/recipes/oatpp/all/test_package/DeserializerTest.hpp +++ /dev/null @@ -1,18 +0,0 @@ -#ifndef oatpp_test_parser_json_mapping_DeserializerTest_hpp -#define oatpp_test_parser_json_mapping_DeserializerTest_hpp - -#include "oatpp-test/UnitTest.hpp" - -namespace oatpp { namespace test { namespace parser { namespace json { namespace mapping { - -class DeserializerTest : public UnitTest{ -public: - - DeserializerTest():UnitTest("TEST[parser::json::mapping::DeserializerTest]"){} - void onRun() override; - -}; - -}}}}} - -#endif /* oatpp_test_parser_json_mapping_DeserializerTest_hpp */ diff --git a/recipes/oatpp/all/test_package/DeserializerTest_1_0_0.cpp b/recipes/oatpp/all/test_package/DeserializerTest_1_0_0.cpp deleted file mode 100644 index e4cd44ea34920..0000000000000 --- a/recipes/oatpp/all/test_package/DeserializerTest_1_0_0.cpp +++ /dev/null @@ -1,51 +0,0 @@ -#include "DeserializerTest.hpp" - -#include "oatpp/parser/json/mapping/ObjectMapper.hpp" -#include "oatpp/core/macro/codegen.hpp" - -namespace oatpp { namespace test { namespace parser { namespace json { namespace mapping { - -namespace { - -#include OATPP_CODEGEN_BEGIN(DTO) - -typedef oatpp::data::mapping::type::Object DTO; - -class EmptyDto : public DTO { - - DTO_INIT(EmptyDto, DTO) - -}; - -class SampleDto : public DTO { - - DTO_INIT(SampleDto, DTO); - - DTO_FIELD(String, strF); - DTO_FIELD(Int32, int32F); - DTO_FIELD(Float32, float32F); - DTO_FIELD(EmptyDto::ObjectWrapper, object); - DTO_FIELD(List::ObjectWrapper, list); - -}; - -#include OATPP_CODEGEN_END(DTO) - -} - -void DeserializerTest::onRun(){ - - auto mapper = oatpp::parser::json::mapping::ObjectMapper::createShared(); - - auto obj = mapper->readFromString("{ \"strF\": \"value1\", \"int32F\": 30, \"float32F\": 32.4, \"object\": {}\"list\": [] }"); - - OATPP_ASSERT(obj); - OATPP_ASSERT(obj->strF->equals("value1")); - OATPP_ASSERT(obj->int32F->getValue() == 30); - OATPP_ASSERT(obj->float32F); - OATPP_ASSERT(obj->object); - OATPP_ASSERT(obj->list->count() == 0); - -} - -}}}}} diff --git a/recipes/oatpp/all/test_package/DeserializerTest_1_1_0.cpp b/recipes/oatpp/all/test_package/DeserializerTest_1_1_0.cpp deleted file mode 100644 index 93aedbe56f4c3..0000000000000 --- a/recipes/oatpp/all/test_package/DeserializerTest_1_1_0.cpp +++ /dev/null @@ -1,49 +0,0 @@ -#include "DeserializerTest.hpp" - -#include "oatpp/parser/json/mapping/ObjectMapper.hpp" -#include "oatpp/core/macro/codegen.hpp" - -namespace oatpp { namespace test { namespace parser { namespace json { namespace mapping { - -namespace { - -#include OATPP_CODEGEN_BEGIN(DTO) - -class EmptyDto : public oatpp::DTO { - - DTO_INIT(EmptyDto, DTO) - -}; - -class SampleDto : public DTO { - - DTO_INIT(SampleDto, DTO); - - DTO_FIELD(String, strF); - DTO_FIELD(Int32, int32F); - DTO_FIELD(Float32, float32F); - DTO_FIELD(Object, object); - DTO_FIELD(List>, list); - -}; - -#include OATPP_CODEGEN_END(DTO) - -} - -void DeserializerTest::onRun(){ - - auto mapper = oatpp::parser::json::mapping::ObjectMapper::createShared(); - - auto obj = mapper->readFromString>("{ \"strF\": \"value1\", \"int32F\": 30, \"float32F\": 32.4, \"object\": {}\"list\": [] }"); - - OATPP_ASSERT(obj); - OATPP_ASSERT(obj->strF->equals("value1")); - OATPP_ASSERT(obj->int32F == 30); - OATPP_ASSERT(obj->float32F); - OATPP_ASSERT(obj->object); - OATPP_ASSERT(obj->list->size() == 0); - -} - -}}}}} diff --git a/recipes/oatpp/all/test_package/DeserializerTest_1_3_0.cpp b/recipes/oatpp/all/test_package/DeserializerTest_1_3_0.cpp deleted file mode 100644 index 331bb2d27749f..0000000000000 --- a/recipes/oatpp/all/test_package/DeserializerTest_1_3_0.cpp +++ /dev/null @@ -1,49 +0,0 @@ -#include "DeserializerTest.hpp" - -#include "oatpp/parser/json/mapping/ObjectMapper.hpp" -#include "oatpp/core/macro/codegen.hpp" - -namespace oatpp { namespace test { namespace parser { namespace json { namespace mapping { - -namespace { - -#include OATPP_CODEGEN_BEGIN(DTO) - -class EmptyDto : public oatpp::DTO { - - DTO_INIT(EmptyDto, DTO) - -}; - -class SampleDto : public DTO { - - DTO_INIT(SampleDto, DTO); - - DTO_FIELD(String, strF); - DTO_FIELD(Int32, int32F); - DTO_FIELD(Float32, float32F); - DTO_FIELD(Object, object); - DTO_FIELD(List>, list); - -}; - -#include OATPP_CODEGEN_END(DTO) - -} - -void DeserializerTest::onRun(){ - - auto mapper = oatpp::parser::json::mapping::ObjectMapper::createShared(); - - auto obj = mapper->readFromString>("{ \"strF\": \"value1\", \"int32F\": 30, \"float32F\": 32.4, \"object\": {}\"list\": [] }"); - - OATPP_ASSERT(obj); - OATPP_ASSERT(*(obj->strF) == "value1"); - OATPP_ASSERT(obj->int32F == 30); - OATPP_ASSERT(obj->float32F); - OATPP_ASSERT(obj->object); - OATPP_ASSERT(obj->list->size() == 0); - -} - -}}}}} diff --git a/recipes/oatpp/all/test_package/test_package.cpp b/recipes/oatpp/all/test_package/test_package.cpp index b0d824cdfda32..c3c071f43b8a4 100644 --- a/recipes/oatpp/all/test_package/test_package.cpp +++ b/recipes/oatpp/all/test_package/test_package.cpp @@ -1,31 +1,20 @@ -#include "DeserializerTest.hpp" +#include #include "oatpp/core/concurrency/SpinLock.hpp" #include "oatpp/core/base/Environment.hpp" -#include -#include - - -void runTests() { - OATPP_RUN_TEST(oatpp::test::parser::json::mapping::DeserializerTest); -} - int main() { oatpp::base::Environment::init(); - - runTests(); - + /* Print how much objects were created during app running, and what have left-probably leaked */ /* Disable object counting for release builds using '-D OATPP_DISABLE_ENV_OBJECT_COUNTERS' flag for better performance */ std::cout << "\nEnvironment:\n"; std::cout << "objectsCount = " << oatpp::base::Environment::getObjectsCount() << "\n"; std::cout << "objectsCreated = " << oatpp::base::Environment::getObjectsCreated() << "\n\n"; - + OATPP_ASSERT(oatpp::base::Environment::getObjectsCount() == 0); - - oatpp::base::Environment::destroy(); + oatpp::base::Environment::destroy(); return 0; } diff --git a/recipes/oatpp/config.yml b/recipes/oatpp/config.yml index 4fdf83fae05c2..64022fc52f7b5 100644 --- a/recipes/oatpp/config.yml +++ b/recipes/oatpp/config.yml @@ -1,4 +1,6 @@ versions: + "1.3.0.latest": + folder: all "1.3.0": folder: all "1.2.5": diff --git a/recipes/objectbox/all/conandata.yml b/recipes/objectbox/all/conandata.yml deleted file mode 100644 index ca8ae614b9798..0000000000000 --- a/recipes/objectbox/all/conandata.yml +++ /dev/null @@ -1,46 +0,0 @@ -sources: - # The release tarball is invalid, so we need to get the tarball from the v0.20.0 commit. - # https://github.com/objectbox/objectbox-c/issues/38 - "0.21.0": - url: "https://github.com/objectbox/objectbox-c/archive/720559838e78a9fe6252c93ed1a3d46a1025767f.tar.gz" - sha256: "a2e7aa1d455a9703c49661515e820b4b296b6f53da7ab6b467b78776a29b0b93" - "0.20.0": - url: "https://github.com/objectbox/objectbox-c/archive/7e4a5a3ed94aa486acf0737b354726b493fd204c.tar.gz" - sha256: "cb6ec8b7ceaed7963ad582c4519d06ddc887294f0893b3f9bf89e7d0789ce216" - "0.19.0": - url: "https://github.com/objectbox/objectbox-c/archive/v0.19.0.tar.gz" - sha256: "372520a744e9ae135a309ee834e4e936058abb0630fafd70a400546109089a89" - "0.18.1": - url: "https://github.com/objectbox/objectbox-c/archive/v0.18.1.tar.gz" - sha256: "108ac7fac843f2962374a12b361bb57b4d114013d16f7716cfedbc7df52feb2e" - "0.18.0": - url: "https://github.com/objectbox/objectbox-c/archive/v0.18.0.tar.gz" - sha256: "e86e921d59c6c36a4a0c0ddc5a2b641789bfa012e0824506c285feb4e9285ae7" - "0.17.0": - url: "https://github.com/objectbox/objectbox-c/archive/refs/tags/v0.17.0.tar.gz" - sha256: "3b936b3352ae0c8ea3706cc0a1790d2714a415cdce16007c2caca367ead5af8d" -patches: - "0.21.0": - - patch_file: "patches/0.21.0-0001-fix-cmake.patch" - patch_description: "add sync option, disable tests/examples, support max length of windows path" - patch_type: "conan" - "0.20.0": - - patch_file: "patches/0.17.0-0001-fix-cmake.patch" - patch_description: "add sync option, disable tests/examples, support max length of windows path" - patch_type: "conan" - "0.19.0": - - patch_file: "patches/0.17.0-0001-fix-cmake.patch" - patch_description: "add sync option, disable tests/examples, support max length of windows path" - patch_type: "conan" - "0.18.1": - - patch_file: "patches/0.17.0-0001-fix-cmake.patch" - patch_description: "add sync option, disable tests/examples, support max length of windows path" - patch_type: "conan" - "0.18.0": - - patch_file: "patches/0.17.0-0001-fix-cmake.patch" - patch_description: "add sync option, disable tests/examples, support max length of windows path" - patch_type: "conan" - "0.17.0": - - patch_file: "patches/0.17.0-0001-fix-cmake.patch" - patch_description: "add sync option, disable tests/examples, support max length of windows path" - patch_type: "conan" diff --git a/recipes/objectbox/all/conanfile.py b/recipes/objectbox/all/conanfile.py deleted file mode 100644 index ffcc6e09fb17f..0000000000000 --- a/recipes/objectbox/all/conanfile.py +++ /dev/null @@ -1,64 +0,0 @@ -from conan import ConanFile -from conan.errors import ConanInvalidConfiguration -from conan.tools.files import apply_conandata_patches, export_conandata_patches, get, copy -from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout -from conan.tools.scm import Version -import os - -required_conan_version = ">=1.53.0" - -class ObjectboxCConan(ConanFile): - name = "objectbox" - description = "ObjectBox C and C++: super-fast database for objects and structs" - license = "Apache-2.0" - url = "https://github.com/conan-io/conan-center-index" - homepage = "https://github.com/objectbox/objectbox-c" - topics = ("performance", "database", "flatbuffers") - settings = "os", "arch", "compiler", "build_type" - package_type = "shared-library" - options = { - "with_sync": [True, False], - } - default_options = { - "with_sync": False, - } - upload_policy="skip" - - def export_sources(self): - export_conandata_patches(self) - - def layout(self): - cmake_layout(self, src_folder="src") - - def validate(self): - if Version(self.version) >= "0.19.0" and \ - self.settings.compiler == "gcc" and Version(self.settings.compiler.version) <= "5": - raise ConanInvalidConfiguration(f"{self.ref} requires GCC 6 or higher") - - def source(self): - get(self, **self.conan_data["sources"][self.version], strip_root=True) - - def generate(self): - # BUILD_SHARED_LIBS and POSITION_INDEPENDENT_CODE are automatically parsed when self.options.shared or self.options.fPIC exist - tc = CMakeToolchain(self) - tc.variables["OBJECTBOX_WITH_SYNC"] = self.options.with_sync - tc.generate() - - def build(self): - apply_conandata_patches(self) - cmake = CMake(self) - cmake.configure() - cmake.build() - - def package(self): - copy(self, pattern="LICENSE.txt", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) - cmake = CMake(self) - cmake.install() - - def package_info(self): - self.cpp_info.libs = ["objectbox"] - - if self.settings.os in ["Linux", "FreeBSD"]: - self.cpp_info.system_libs.extend(["m", "pthread"]) - if Version(self.version) >= "0.18.0": - self.cpp_info.system_libs.append("dl") diff --git a/recipes/objectbox/all/patches/0.17.0-0001-fix-cmake.patch b/recipes/objectbox/all/patches/0.17.0-0001-fix-cmake.patch deleted file mode 100644 index d22926b57e6c9..0000000000000 --- a/recipes/objectbox/all/patches/0.17.0-0001-fix-cmake.patch +++ /dev/null @@ -1,66 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index e32c84b..c2c535f 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -9,10 +9,17 @@ if (${CMAKE_VERSION} VERSION_LESS "3.11.0") - endif () - link_directories("${CMAKE_CURRENT_SOURCE_DIR}/lib") - else () -+ include(GNUInstallDirs) -+ - function(defineObjectBoxLibForURL VARIANT DL_URL) - include(FetchContent) - project(objectbox${VARIANT}-download) -- FetchContent_Declare(${PROJECT_NAME} URL ${DL_URL}) -+ FetchContent_Declare(${PROJECT_NAME} -+ URL ${DL_URL} -+ # workaround for max path length in Windows (260byte) -+ SUBBUILD_DIR ${CMAKE_CURRENT_SOURCE_DIR}/sub -+ SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/tmp -+ ) - - FetchContent_Populate(${PROJECT_NAME}) - set(DL_DIR "${${PROJECT_NAME}_SOURCE_DIR}") -@@ -27,6 +34,25 @@ else () - IMPORTED_IMPLIB ${DL_DIR}/lib/${CMAKE_IMPORT_LIBRARY_PREFIX}objectbox${CMAKE_IMPORT_LIBRARY_SUFFIX} - INTERFACE_INCLUDE_DIRECTORIES "${objectbox_include_dirs}" - ) -+ -+ if(EXISTS "${DL_DIR}/lib/${CMAKE_SHARED_LIBRARY_PREFIX}objectbox${CMAKE_SHARED_LIBRARY_SUFFIX}") -+ install( -+ FILES ${DL_DIR}/lib/${CMAKE_SHARED_LIBRARY_PREFIX}objectbox${CMAKE_SHARED_LIBRARY_SUFFIX} -+ DESTINATION $,${CMAKE_INSTALL_BINDIR},${CMAKE_INSTALL_LIBDIR}> -+ ) -+ endif() -+ if(EXISTS "${DL_DIR}/lib/${CMAKE_SHARED_LIBRARY_PREFIX}objectbox${CMAKE_IMPORT_LIBRARY_SUFFIX}") -+ install( -+ FILES ${DL_DIR}/lib/${CMAKE_SHARED_LIBRARY_PREFIX}objectbox${CMAKE_IMPORT_LIBRARY_SUFFIX} -+ DESTINATION ${CMAKE_INSTALL_LIBDIR} -+ ) -+ endif() -+ -+ install( -+ DIRECTORY ${DL_DIR}/include/ -+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} -+ ) -+ - endfunction() - - function(defineObjectBoxLib VARIANT) -@@ -72,10 +98,15 @@ else () - defineObjectBoxLibForURL("" "${DL_URL}") - else () - defineObjectBoxLib("") -- defineObjectBoxLib("-sync") -+ if(OBJECTBOX_WITH_SYNC) -+ defineObjectBoxLib("-sync") -+ endif() - endif () - endif () - -+if(0) - add_subdirectory(src-test) - add_subdirectory(src-test-gen) - add_subdirectory(examples) -+endif() -+ diff --git a/recipes/objectbox/all/patches/0.21.0-0001-fix-cmake.patch b/recipes/objectbox/all/patches/0.21.0-0001-fix-cmake.patch deleted file mode 100644 index c5c0e8e9c4a85..0000000000000 --- a/recipes/objectbox/all/patches/0.21.0-0001-fix-cmake.patch +++ /dev/null @@ -1,54 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 8e826e0..d6a2e18 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -20,8 +20,13 @@ else () - function(defineObjectBoxLibForURL VARIANT DL_URL) - include(FetchContent) - project(objectbox${VARIANT}-download) -- FetchContent_Declare(${PROJECT_NAME} URL ${DL_URL}) -- -+ FetchContent_Declare(${PROJECT_NAME} -+ URL ${DL_URL} -+ # workaround for max path length in Windows (260byte) -+ SUBBUILD_DIR ${CMAKE_CURRENT_SOURCE_DIR}/sub -+ SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/tmp -+ ) -+ - FetchContent_Populate(${PROJECT_NAME}) - set(DL_DIR "${${PROJECT_NAME}_SOURCE_DIR}") - message(STATUS "Pre-compiled ObjectBox library is saved in ${DL_DIR}") -@@ -35,6 +40,22 @@ else () - IMPORTED_IMPLIB ${DL_DIR}/lib/${CMAKE_IMPORT_LIBRARY_PREFIX}objectbox${CMAKE_IMPORT_LIBRARY_SUFFIX} - INTERFACE_INCLUDE_DIRECTORIES "${objectbox_include_dirs}" - ) -+ if(EXISTS "${DL_DIR}/lib/${CMAKE_SHARED_LIBRARY_PREFIX}objectbox${CMAKE_SHARED_LIBRARY_SUFFIX}") -+ install( -+ FILES ${DL_DIR}/lib/${CMAKE_SHARED_LIBRARY_PREFIX}objectbox${CMAKE_SHARED_LIBRARY_SUFFIX} -+ DESTINATION $,${CMAKE_INSTALL_BINDIR},${CMAKE_INSTALL_LIBDIR}> -+ ) -+ endif() -+ if(EXISTS "${DL_DIR}/lib/${CMAKE_SHARED_LIBRARY_PREFIX}objectbox${CMAKE_IMPORT_LIBRARY_SUFFIX}") -+ install( -+ FILES ${DL_DIR}/lib/${CMAKE_SHARED_LIBRARY_PREFIX}objectbox${CMAKE_IMPORT_LIBRARY_SUFFIX} -+ DESTINATION ${CMAKE_INSTALL_LIBDIR} -+ ) -+ endif() -+ install( -+ DIRECTORY ${DL_DIR}/include/ -+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} -+ ) - endfunction() - - function(defineObjectBoxLib VARIANT) -@@ -80,7 +101,9 @@ else () - defineObjectBoxLibForURL("" "${DL_URL}") - else () - defineObjectBoxLib("") -- defineObjectBoxLib("-sync") -+ if(OBJECTBOX_WITH_SYNC) -+ defineObjectBoxLib("-sync") -+ endif() - endif () - endif () - diff --git a/recipes/objectbox/all/test_package/CMakeLists.txt b/recipes/objectbox/all/test_package/CMakeLists.txt deleted file mode 100644 index daba6910bb48a..0000000000000 --- a/recipes/objectbox/all/test_package/CMakeLists.txt +++ /dev/null @@ -1,7 +0,0 @@ -cmake_minimum_required(VERSION 3.1) -project(test_package LANGUAGES C) - -find_package(objectbox REQUIRED CONFIG) - -add_executable(${PROJECT_NAME} test_package.c) -target_link_libraries(${PROJECT_NAME} PRIVATE objectbox::objectbox) diff --git a/recipes/objectbox/all/test_package/test_package.c b/recipes/objectbox/all/test_package/test_package.c deleted file mode 100644 index f03f0d6b965c7..0000000000000 --- a/recipes/objectbox/all/test_package/test_package.c +++ /dev/null @@ -1,10 +0,0 @@ -#include - -#include "objectbox.h" - -int main() { - printf("ObjectBox version %s\n", obx_version_string()); - - return 0; -} - diff --git a/recipes/objectbox/all/test_v1_package/CMakeLists.txt b/recipes/objectbox/all/test_v1_package/CMakeLists.txt deleted file mode 100644 index be00a8c7f57c7..0000000000000 --- a/recipes/objectbox/all/test_v1_package/CMakeLists.txt +++ /dev/null @@ -1,8 +0,0 @@ -cmake_minimum_required(VERSION 3.8) -project(test_package) - -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) - -add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ - ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/objectbox/config.yml b/recipes/objectbox/config.yml deleted file mode 100644 index 455f77377fdff..0000000000000 --- a/recipes/objectbox/config.yml +++ /dev/null @@ -1,13 +0,0 @@ -versions: - "0.21.0": - folder: all - "0.20.0": - folder: all - "0.19.0": - folder: all - "0.18.1": - folder: all - "0.18.0": - folder: all - "0.17.0": - folder: all diff --git a/recipes/ocilib/all/conandata.yml b/recipes/ocilib/all/conandata.yml new file mode 100644 index 0000000000000..2f5cc065e7d14 --- /dev/null +++ b/recipes/ocilib/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "4.7.6": + url: "https://github.com/vrogier/ocilib/releases/download/v4.7.6/ocilib-4.7.6-gnu.tar.gz" + sha256: "35657c00b3cfbcff09a398a6566b95b23067b0d15c1155a17615da7780715a85" diff --git a/recipes/ocilib/all/conanfile.py b/recipes/ocilib/all/conanfile.py new file mode 100644 index 0000000000000..6af72058d349a --- /dev/null +++ b/recipes/ocilib/all/conanfile.py @@ -0,0 +1,81 @@ +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.build import check_min_cppstd +from conan.tools.files import copy, get, rm, rmdir, chdir +from conan.tools.gnu import Autotools, AutotoolsDeps, AutotoolsToolchain +from conan.tools.scm import Version +import os + +required_conan_version = ">=1.54.0" + +class OCILIBConan(ConanFile): + name = "ocilib" + description = "An open source and cross platform Oracle Driver that delivers efficient access to Oracle databases." + license = "Apache-2.0" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/vrogier/ocilib" + topics = ("database", "db", "sql", "oracle") + package_type = "library" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + "with_oracle_charset": ["ansi", "wide"], + "with_oracle_import": ["runtime", "linkage"], + } + default_options = { + "shared": False, + "fPIC": True, + "with_oracle_charset": "ansi", + "with_oracle_import": "runtime", + } + + @property + def _min_cppstd(self): + return 11 + + def validate(self): + if self.settings.compiler.get_safe("cppstd"): + check_min_cppstd(self, self._min_cppstd) + if self.settings.os != "Linux": + raise ConanInvalidConfiguration(f"{self.ref} recipe only supports Linux for now. Pull requests to add new configurtations are welcomed.") + # TODO: Check support for other platforms + + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = AutotoolsToolchain(self) + tc.configure_args.extend([ + f"--with-oracle-charset={self.options.with_oracle_charset}", + f"--with-oracle-import={self.options.with_oracle_import}", + ]) + tc.generate() + + def build(self): + with chdir(self, self.source_folder): + autotools = Autotools(self) + autotools.configure() + autotools.make() + + def package(self): + autotools = Autotools(self) + autotools.install() + + copy(self, "COPYING", self.source_folder, os.path.join(self.package_folder, "licenses")) + copy(self, "LICENSE", self.source_folder, os.path.join(self.package_folder, "licenses")) + copy(self, "*", os.path.join(self.source_folder, "include"), os.path.join(self.package_folder, "include")) + copy(self, "*.lib", self.source_folder, os.path.join(self.package_folder, "lib"), keep_path=False) + copy(self, "*.a", self.source_folder, os.path.join(self.package_folder, "lib"), keep_path=False) + rm(self, "*.la", os.path.join(self.package_folder, "lib")) + rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) + rmdir(self, os.path.join(self.package_folder, "share")) + + def package_info(self): + self.cpp_info.libs = ["ocilib"] + self.cpp_info.set_property("pkg_config_name", "ocilib") + self.cpp_info.system_libs.append("dl") diff --git a/recipes/ocilib/all/test_package/CMakeLists.txt b/recipes/ocilib/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..0d33ea642b397 --- /dev/null +++ b/recipes/ocilib/all/test_package/CMakeLists.txt @@ -0,0 +1,9 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) + + +find_package(ocilib REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE ocilib::ocilib) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) diff --git a/recipes/ocilib/all/test_package/conanfile.py b/recipes/ocilib/all/test_package/conanfile.py new file mode 100644 index 0000000000000..0a808db45f245 --- /dev/null +++ b/recipes/ocilib/all/test_package/conanfile.py @@ -0,0 +1,27 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake +import os + + +# It will become the standard on Conan 2.x +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def layout(self): + cmake_layout(self) + + def requirements(self): + self.requires(self.tested_reference_str) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/ocilib/all/test_package/test_package.cpp b/recipes/ocilib/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..e71599957563d --- /dev/null +++ b/recipes/ocilib/all/test_package/test_package.cpp @@ -0,0 +1,26 @@ +#include +#include + +#include "ocilib.hpp" + +using namespace ocilib; + +int main(void) +{ + try + { + std::cout << "OCILIB Version: "; + std::cout << OCILIB_MAJOR_VERSION << "."; + std::cout << OCILIB_MINOR_VERSION << "."; + std::cout << OCILIB_REVISION_VERSION << std::endl; + + Environment::Initialize(); + } + catch (...) + { + } + + Environment::Cleanup(); + + return EXIT_SUCCESS; +} diff --git a/recipes/ocilib/config.yml b/recipes/ocilib/config.yml new file mode 100644 index 0000000000000..947442bf2969b --- /dev/null +++ b/recipes/ocilib/config.yml @@ -0,0 +1,3 @@ +versions: + "4.7.6": + folder: all diff --git a/recipes/octo-keygen-cpp/all/conanfile.py b/recipes/octo-keygen-cpp/all/conanfile.py index b9e37112cb2f5..50c1d18d84986 100644 --- a/recipes/octo-keygen-cpp/all/conanfile.py +++ b/recipes/octo-keygen-cpp/all/conanfile.py @@ -40,7 +40,7 @@ def layout(self): def requirements(self): self.requires("octo-logger-cpp/1.1.0", transitive_headers=True) self.requires("octo-encryption-cpp/1.1.0", transitive_headers=True) - self.requires("fmt/10.1.1") + self.requires("fmt/10.2.1") self.requires("openssl/[>=1.1 <4]") def validate(self): diff --git a/recipes/octo-logger-cpp/all/conandata.yml b/recipes/octo-logger-cpp/all/conandata.yml index da0e55d721a42..5b5d4e7697075 100644 --- a/recipes/octo-logger-cpp/all/conandata.yml +++ b/recipes/octo-logger-cpp/all/conandata.yml @@ -1,4 +1,22 @@ sources: + "2.1.2": + url: "https://github.com/ofiriluz/octo-logger-cpp/archive/v2.1.2.tar.gz" + sha256: "d653dc91d17f33f2e7659126ba408b40f8f421def8190ec2b6991713c6a2accf" + "2.0.2": + url: "https://github.com/ofiriluz/octo-logger-cpp/archive/v2.0.2.tar.gz" + sha256: "6aa8ee80a7f7b84df55fa215f22cdf66cbeece8cc60b2097828795194a1e6a40" + "2.0.0": + url: "https://github.com/ofiriluz/octo-logger-cpp/archive/v2.0.0.tar.gz" + sha256: "2edad6d1cba27019f1f26e562d9d8ff8395fc9ada1e8fb0c226c603ec5e0ed15" + "1.12.0": + url: "https://github.com/ofiriluz/octo-logger-cpp/archive/v1.12.0.tar.gz" + sha256: "77f351ae4cad973ad7836dae7498419692590f2419b5b569c1f00fc6130d8bbb" + "1.11.0": + url: "https://github.com/ofiriluz/octo-logger-cpp/archive/v1.11.0.tar.gz" + sha256: "73c35ca2a2e0c4be2cd85c5ba1f4061bbc22637fe79570107f1123eff30936db" + "1.9.0": + url: "https://github.com/ofiriluz/octo-logger-cpp/archive/v1.9.0.tar.gz" + sha256: "95187b6e9ae5d405b53ecb12ff7cbde847a9824a340ca88922eecd712ce9a138" "1.6.1": url: "https://github.com/ofiriluz/octo-logger-cpp/archive/v1.6.1.tar.gz" sha256: "02c1d5303d8c129cb2527a92d49677229230a5feaec002791f96d47de3bccb5a" diff --git a/recipes/octo-logger-cpp/all/conanfile.py b/recipes/octo-logger-cpp/all/conanfile.py index d8b77698e6f0d..27de74bad7ee2 100644 --- a/recipes/octo-logger-cpp/all/conanfile.py +++ b/recipes/octo-logger-cpp/all/conanfile.py @@ -52,10 +52,13 @@ def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - self.requires("fmt/10.1.1", transitive_headers=True) + self.requires("fmt/10.2.1", transitive_headers=True) if self.options.get_safe("with_aws"): - self.requires("nlohmann_json/3.11.2") - self.requires("aws-sdk-cpp/1.9.234") + self.requires("nlohmann_json/3.11.3") + if Version(self.version) >= "2.0.0": + self.requires("aws-sdk-cpp/1.11.352") + else: + self.requires("aws-sdk-cpp/1.9.234") def validate(self): if self.settings.compiler.get_safe("cppstd"): diff --git a/recipes/octo-logger-cpp/config.yml b/recipes/octo-logger-cpp/config.yml index c67832833d08a..70f417f829406 100644 --- a/recipes/octo-logger-cpp/config.yml +++ b/recipes/octo-logger-cpp/config.yml @@ -1,4 +1,16 @@ versions: + "2.1.2": + folder: "all" + "2.0.2": + folder: "all" + "2.0.0": + folder: "all" + "1.12.0": + folder: "all" + "1.11.0": + folder: "all" + "1.9.0": + folder: "all" "1.6.1": folder: "all" "1.5.0": diff --git a/recipes/ohnet/all/conandata.yml b/recipes/ohnet/all/conandata.yml index 7e45066c8f010..974392dab738f 100644 --- a/recipes/ohnet/all/conandata.yml +++ b/recipes/ohnet/all/conandata.yml @@ -1,8 +1,25 @@ sources: + "1.37.5454": + url: "https://github.com/openhome/ohNet/archive/refs/tags/ohNet_1.37.5454.tar.gz" + sha256: "343c0f6b015e04195f5e7d937fa5e010a4d5a54782387d1c79259d3bb4ead0f0" + "1.36.5344": + url: "https://github.com/openhome/ohNet/archive/refs/tags/ohNet_1.36.5344.tar.gz" + sha256: "4873504f8f98c5fdbd72537392d6e5d97ed0747d3ef0b9c2b7fe77f1a02aaeb6" "1.36.5182": url: "https://github.com/openhome/ohNet/archive/refs/tags/ohNet_1.36.5182.tar.gz" sha256: "1489407b9bae13affa8f933a81fb5a43f16b29f5bf8048b68ea645afc0e53ced" patches: + "1.37.5454": + - patch_file: "patches/0001-makefile-1.37.5454.patch" + patch_description: "Reduce gcc-centricity in Makefile" + patch_type: "conan" + - patch_file: "patches/0001-common.mak-1.37.5454.patch" + patch_description: "Use proper flags for C++ file" + patch_type: "conan" + "1.36.5344": + - patch_file: "patches/0001-makefile-1.36.5344.patch" + patch_description: "Reduce gcc-centricity in Makefile" + patch_type: "conan" "1.36.5182": - patch_file: "patches/0001-makefile-universal.patch" patch_description: "Reduce gcc-centricity in Makefile" diff --git a/recipes/ohnet/all/conanfile.py b/recipes/ohnet/all/conanfile.py index ad2031f5acf6b..e76982e6ef25b 100755 --- a/recipes/ohnet/all/conanfile.py +++ b/recipes/ohnet/all/conanfile.py @@ -29,7 +29,7 @@ class OhNetConan(ConanFile): } short_paths = True - def _get_openhome_architecture(self, args): + def _fill_openhome_architecture(self, args): if is_apple_os(self): if str(self.settings.arch).startswith("armv8"): openhome_architecture = "arm64" @@ -66,43 +66,48 @@ def generate(self): tc.make_args.append("-j1") tc.generate() + def _fill_ohnet_args(self, args): + if self.settings.build_type == "Debug": + args.append("debug=1") + + installlibdir = os.path.join(self.package_folder, "lib") + installincludedir = os.path.join(self.package_folder, "include") + + args.extend([f"prefix={self.package_folder}",f"installdir={self.package_folder}", f"installlibdir={installlibdir}", f"installincludedir={installincludedir}"]) + + if not is_msvc(self): + args = self._fill_openhome_architecture(args) + args.append("rsync=no") + if str(self.settings.compiler.libcxx) == "libc++": + args.extend(["CPPFLAGS=-stdlib=libc++", "LDFLAGS=-stdlib=libc++"]) + return args + def build(self): apply_conandata_patches(self) targets = "ohNetDll TestsNative proxies devices" - additional_options="" + args = [] + self._fill_ohnet_args(args) with chdir(self, self.source_folder): if is_msvc(self): - if self.settings.build_type == "Debug": - additional_options += " debug=1" - self.run(f"nmake /f OhNet.mak {targets} {additional_options}") + self.run(f"nmake /f OhNet.mak {targets} {' '.join(args)}") else: - args = [] - args = self._get_openhome_architecture(args) - args.append("rsync=no") - if str(self.settings.compiler.libcxx) == "libc++": - args.extend(["CPPFLAGS=-stdlib=libc++", "LDFLAGS=-stdlib=libc++"]) autotools = Autotools(self) autotools.make(args=args, target=targets) def package(self): - installlibdir = os.path.join(self.package_folder, "lib") - installincludedir = os.path.join(self.package_folder, "include") - additional_options="" - copy(self, "License.txt", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) copy(self, "*", src=os.path.join(self.source_folder, "OpenHome", "Net", "ServiceGen"), dst=os.path.join(self.package_folder, "lib", "ServiceGen")) mkdir(self, os.path.join(self.package_folder, "lib", "t4")) + args = [] + self._fill_ohnet_args(args) + with chdir(self, self.source_folder): if is_msvc(self): - if self.settings.build_type == "Debug": - additional_options += " debug=1" - self.run(f"nmake /f OhNet.mak install installdir={self.package_folder} installlibdir={installlibdir} installincludedir={installincludedir} {additional_options}") + self.run(f"nmake /f OhNet.mak install {' '.join(args)}") else: - args = [f"prefix={self.package_folder}", f"installlibdir={installlibdir}", f"installincludedir={installincludedir}", "rsync=no"] - args = self._get_openhome_architecture(args) autotools = Autotools(self) autotools.make(args=args, target="install-libs install-includes") if is_apple_os(self): @@ -143,6 +148,7 @@ def package_info(self): self.cpp_info.names["cmake_find_package"] = "ohNet" self.cpp_info.names["cmake_find_package_multi"] = "ohNet" self.cpp_info.names["pkg_config"] = "ohNet" + for component in ["ohNetCore", "OhNetDevices", "ohNetProxies", "TestFramework"]: self.cpp_info.components[component].names["cmake_find_package"] = component self.cpp_info.components[component].names["cmake_find_package_multi"] = component diff --git a/recipes/ohnet/all/patches/0001-common.mak-1.37.5454.patch b/recipes/ohnet/all/patches/0001-common.mak-1.37.5454.patch new file mode 100644 index 0000000000000..9b99e3972d230 --- /dev/null +++ b/recipes/ohnet/all/patches/0001-common.mak-1.37.5454.patch @@ -0,0 +1,27 @@ +diff --git a/Common.mak b/Common.mak +index a25489c2..7189c9dc 100644 +--- a/Common.mak ++++ b/Common.mak +@@ -385,21 +385,21 @@ $(objdir)nsec.$(objext) : $(mDNSdir)/nsec.c $(headers) + $(compiler)nsec.$(objext) -c $(cflags_third_party) $(includes) $(mDNSdir)/nsec.c + $(objdir)nsec3.$(objext) : $(mDNSdir)/nsec3.c $(headers) + $(compiler)nsec3.$(objext) -c $(cflags_third_party) $(includes) $(mDNSdir)/nsec3.c + $(objdir)uDNS.$(objext) : $(mDNSdir)/uDNS.c $(headers) + $(compiler)uDNS.$(objext) -c $(cflags_third_party) $(includes) $(mDNSdir)/uDNS.c + $(objdir)dnssd_clientshim.$(objext) : $(mDNSdir)/dnssd_clientshim.c $(headers) + $(compiler)dnssd_clientshim.$(objext) -c $(cflags_third_party) $(includes) $(mDNSdir)/dnssd_clientshim.c + $(objdir)dnssd_clientlib.$(objext) : $(mDNSdir)/dnssd_clientlib.c $(headers) + $(compiler)dnssd_clientlib.$(objext) -c $(cflags_third_party) $(includes) $(mDNSdir)/dnssd_clientlib.c + $(objdir)MdnsPlatform.$(objext) : OpenHome/Net/Device/Bonjour/MdnsPlatform.cpp $(headers) +- $(compiler)MdnsPlatform.$(objext) -c $(cflags_third_party) $(includes) OpenHome/Net/Device/Bonjour/MdnsPlatform.cpp ++ $(compiler)MdnsPlatform.$(objext) -c $(cflags_third_party) $(cppflags) $(includes) OpenHome/Net/Device/Bonjour/MdnsPlatform.cpp + $(objdir)MdnsProvider.$(objext) : OpenHome/Net/Device/Bonjour/MdnsProvider.cpp $(headers) + $(compiler)MdnsProvider.$(objext) -c $(cppflags) $(includes) OpenHome/Net/Device/Bonjour/MdnsProvider.cpp + $(objdir)Md5.$(objext) : OpenHome/md5.c $(headers) + $(compiler)Md5.$(objext) -c $(cflags_third_party) $(includes) OpenHome/md5.c + $(objdir)NetworkAdapterList.$(objext) : OpenHome/NetworkAdapterList.cpp $(headers) + $(compiler)NetworkAdapterList.$(objext) -c $(cppflags) $(includes) OpenHome/NetworkAdapterList.cpp + $(objdir)DnsChangeNotifier.$(objext) : OpenHome/DnsChangeNotifier.cpp $(headers) + $(compiler)DnsChangeNotifier.$(objext) -c $(cppflags) $(includes) OpenHome/DnsChangeNotifier.cpp + $(objdir)Network.$(objext) : OpenHome/Network.cpp $(headers) + $(compiler)Network.$(objext) -c $(cppflags) $(includes) OpenHome/Network.cpp diff --git a/recipes/ohnet/all/patches/0001-makefile-1.36.5344.patch b/recipes/ohnet/all/patches/0001-makefile-1.36.5344.patch new file mode 100644 index 0000000000000..4422447f1344d --- /dev/null +++ b/recipes/ohnet/all/patches/0001-makefile-1.36.5344.patch @@ -0,0 +1,363 @@ +diff --git a/Common.mak b/Common.mak +index baae7b17..2f058f51 100644 +--- a/Common.mak ++++ b/Common.mak +@@ -381,21 +381,21 @@ $(objdir)nsec.$(objext) : $(mDNSdir)/nsec.c $(headers) + $(compiler)nsec.$(objext) -c $(cflags_third_party) $(includes) $(mDNSdir)/nsec.c + $(objdir)nsec3.$(objext) : $(mDNSdir)/nsec3.c $(headers) + $(compiler)nsec3.$(objext) -c $(cflags_third_party) $(includes) $(mDNSdir)/nsec3.c + $(objdir)uDNS.$(objext) : $(mDNSdir)/uDNS.c $(headers) + $(compiler)uDNS.$(objext) -c $(cflags_third_party) $(includes) $(mDNSdir)/uDNS.c + $(objdir)dnssd_clientshim.$(objext) : $(mDNSdir)/dnssd_clientshim.c $(headers) + $(compiler)dnssd_clientshim.$(objext) -c $(cflags_third_party) $(includes) $(mDNSdir)/dnssd_clientshim.c + $(objdir)dnssd_clientlib.$(objext) : $(mDNSdir)/dnssd_clientlib.c $(headers) + $(compiler)dnssd_clientlib.$(objext) -c $(cflags_third_party) $(includes) $(mDNSdir)/dnssd_clientlib.c + $(objdir)MdnsPlatform.$(objext) : OpenHome/Net/Device/Bonjour/MdnsPlatform.cpp $(headers) +- $(compiler)MdnsPlatform.$(objext) -c $(cflags_third_party) $(includes) OpenHome/Net/Device/Bonjour/MdnsPlatform.cpp ++ $(compiler)MdnsPlatform.$(objext) -c $(cppflags) $(cflags_third_party) $(includes) OpenHome/Net/Device/Bonjour/MdnsPlatform.cpp + $(objdir)MdnsProvider.$(objext) : OpenHome/Net/Device/Bonjour/MdnsProvider.cpp $(headers) + $(compiler)MdnsProvider.$(objext) -c $(cppflags) $(includes) OpenHome/Net/Device/Bonjour/MdnsProvider.cpp + $(objdir)Md5.$(objext) : OpenHome/md5.c $(headers) + $(compiler)Md5.$(objext) -c $(cflags_third_party) $(includes) OpenHome/md5.c + $(objdir)NetworkAdapterList.$(objext) : OpenHome/NetworkAdapterList.cpp $(headers) + $(compiler)NetworkAdapterList.$(objext) -c $(cppflags) $(includes) OpenHome/NetworkAdapterList.cpp + $(objdir)DnsChangeNotifier.$(objext) : OpenHome/DnsChangeNotifier.cpp $(headers) + $(compiler)DnsChangeNotifier.$(objext) -c $(cppflags) $(includes) OpenHome/DnsChangeNotifier.cpp + $(objdir)Network.$(objext) : OpenHome/Network.cpp $(headers) + $(compiler)Network.$(objext) -c $(cppflags) $(includes) OpenHome/Network.cpp +diff --git a/Makefile b/Makefile +index 2f0cb07c..372a6765 100644 +--- a/Makefile ++++ b/Makefile +@@ -1,44 +1,44 @@ + #Makefile for linux + # Could be extended to support Mac in future + + rsync ?= yes + + ifeq ($(rsync),yes) + cp = rsync -u + else +-cp = cp -u ++cp = cp + endif + + ifeq ($(debug),1) + debug_specific_cflags = -g -O0 + debug_csharp = /define:DEBUG /debug+ + build_dir = Debug + openhome_configuration = Debug + android_ndk_debug = 1 + else + debug_specific_cflags = -g -O2 + debug_csharp = /optimize+ /debug:pdbonly + build_dir = Release + openhome_configuration = Release + android_ndk_debug=0 + endif + + + + # Figure out platform, openhome_system and openhome_architecture + +-gcc_machine = $(shell ${CROSS_COMPILE}gcc -dumpmachine) ++cc_machine = $(shell ${CROSS_COMPILE}$(CC) -dumpmachine) + MACHINE = $(shell uname -s) + + $(info CROSS_COMPILE: ${CROSS_COMPILE}) +-$(info Machine reported by compiler is: ${gcc_machine}) ++$(info Machine reported by compiler is: ${cc_machine}) + $(info Machine reported by uname is: ${MACHINE}) + $(info PLATFORM: ${PLATFORM}) + + ifeq ($(MACHINE),Darwin) + ifeq ($(iOs-arm64),1) + platform = iOS + detected_openhome_system = iOs + detected_openhome_architecture = arm64 + else ifeq ($(iOs-x64),1) + platform = iOS +@@ -50,88 +50,88 @@ ifeq ($(MACHINE),Darwin) + detected_openhome_architecture = rpi + else + platform = Mac + detected_openhome_system = Mac + ifeq ($(Mac-arm64),1) + detected_openhome_architecture = arm64 + else + detected_openhome_architecture = x64 + endif + endif +-else ifneq (, $(findstring powerpc, $(gcc_machine))) ++else ifneq (, $(findstring powerpc, $(cc_machine))) + platform = Core-ppc32 + detected_openhome_system = Core + detected_openhome_architecture = ppc32 + else ifeq ($(Android-anycpu), 1) + platform = Android + detected_openhome_system = Android + detected_openhome_architecture = anycpu + else ifeq ($(freebsd), 1) + platform = FreeBSD + detected_openhome_system = FreeBSD + detected_openhome_architecture = x86 +- compiler = gcc -o $(objdir) +- link = ${CROSS_COMPILE}g++ $(platform_linkflags) ++ compiler = $(CC) -o $(objdir) ++ link = ${CROSS_COMPILE}$(CXX) $(platform_linkflags) + ar = ${CROSS_COMPILE}ar rc $(objdir) + else ifneq (,$(findstring Linux-x86,${PLATFORM})) +- ifneq (,$(findstring x86_64,$(gcc_machine))) ++ ifneq (,$(findstring x86_64,$(cc_machine))) + platform = Vanilla + detected_openhome_system = Linux + detected_openhome_architecture = x86 + CFLAGS = -m32 + LDFLAGS = -m32 + endif + else + # At present, platform == Vanilla is used for Kirkwood, x86 and x64 Posix builds. + platform ?= Vanilla + ifneq (,$(findstring Qnap,$(platform))) + detected_openhome_system = Qnap +- else ifneq (,$(findstring linux,$(gcc_machine))) ++ else ifneq (,$(findstring linux,$(cc_machine))) + detected_openhome_system = Linux + endif +- ifneq (,$(findstring arm,$(gcc_machine))) +- ifneq (,$(findstring linux-gnueabihf,$(gcc_machine))) ++ ifneq (,$(findstring arm,$(cc_machine))) ++ ifneq (,$(findstring linux-gnueabihf,$(cc_machine))) + detected_openhome_architecture = armhf + else ifeq (${detected_openhome_system},Qnap) + detected_openhome_architecture = x19 + else + detected_openhome_architecture = armel + endif + endif +- ifneq (,$(findstring i686,$(gcc_machine))) ++ ifneq (,$(findstring i686,$(cc_machine))) + detected_openhome_architecture = x86 + endif +- ifneq (,$(findstring i586,$(gcc_machine))) ++ ifneq (,$(findstring i586,$(cc_machine))) + detected_openhome_architecture = x86 + endif +- ifneq (,$(findstring i486,$(gcc_machine))) ++ ifneq (,$(findstring i486,$(cc_machine))) + detected_openhome_architecture = x86 + endif +- ifneq (,$(findstring i386,$(gcc_machine))) ++ ifneq (,$(findstring i386,$(cc_machine))) + detected_openhome_architecture = x86 + endif +- ifneq (,$(findstring amd64,$(gcc_machine))) ++ ifneq (,$(findstring amd64,$(cc_machine))) + detected_openhome_architecture = x64 + endif +- ifneq (,$(findstring x86_64,$(gcc_machine))) ++ ifneq (,$(findstring x86_64,$(cc_machine))) + detected_openhome_architecture = x64 + endif +- ifneq (,$(findstring mipsel,$(gcc_machine))) ++ ifneq (,$(findstring mipsel,$(cc_machine))) + detected_openhome_architecture = mipsel + endif +- ifneq (,$(findstring mips,$(gcc_machine))) ++ ifneq (,$(findstring mips,$(cc_machine))) + detected_openhome_architecture = mipsel + endif +- ifneq (,$(findstring aarch64,$(gcc_machine))) ++ ifneq (,$(findstring aarch64,$(cc_machine))) + detected_openhome_architecture = arm64 + endif +- ifneq (,$(findstring riscv64,$(gcc_machine))) ++ ifneq (,$(findstring riscv64,$(cc_machine))) + detected_openhome_architecture = riscv64 + endif + endif + + detected_openhome_system ?= Unknown + detected_openhome_architecture ?= Unknown + + ifneq (${openhome_system},) + ifneq (${openhome_system},${detected_openhome_system}) + $(warning Detected compiler is for system ${detected_openhome_system} but expected ${openhome_system}. Build will probably fail.) +@@ -208,83 +208,89 @@ ifeq ($(platform),Mac) + openhome_architecture = x64 + else + # building for arm64 + platform_cflags = -DPLATFORM_MACOSX_GNU -arch arm64 -mmacosx-version-min=11 + platform_linkflags = -arch arm64 -framework CoreFoundation -framework SystemConfiguration -framework IOKit + osbuilddir = Mac-arm64 + openhome_architecture = arm64 + endif + + objdir = Build/Obj/$(osbuilddir)/$(build_dir)/ +- compiler = clang -fPIC -stdlib=libc++ -o $(objdir) ++ compiler = clang -fPIC -Qunused-arguments -stdlib=libc++ -o $(objdir) + link = clang++ -pthread -stdlib=libc++ $(platform_linkflags) + ar = ar rc $(objdir) + openhome_system = Mac + + dotnetRuntime = osx-x64 + endif + + ifeq ($(platform), Core-ppc32) + # platform == Core1 + openhome_system = Core + openhome_architecture = ppc32 + endian = BIG + platform_cflags = -mcpu=405 + platform_linkflags = -mcpu=405 ${CROSS_LINKFLAGS} + linkopts_ohNet = + osdir = Core + osbuilddir = Core-ppc32 + objdir = Build/Obj/$(osbuilddir)/$(build_dir)/ + native_only = yes +- compiler = ${CROSS_COMPILE}gcc -o $(objdir) +- link = ${CROSS_COMPILE}g++ $(platform_linkflags) ++ compiler = ${CROSS_COMPILE}$(CC) -o $(objdir) ++ link = ${CROSS_COMPILE}$(CXX) $(platform_linkflags) + ar = ${CROSS_COMPILE}ar rc $(objdir) + endif + + ifeq ($(platform), Core-armv6) + # platform == Core2 + openhome_system = Core + openhome_architecture = armv6 + endian = LITTLE + platform_cflags = -mcpu=arm926ej-s -Wno-psabi + platform_linkflags = -mcpu=arm926ej-s ${CROSS_LINKFLAGS} + linkopts_ohNet = + osdir = Core + osbuilddir = Core-armv6 + objdir = Build/Obj/$(osbuilddir)/$(build_dir)/ + native_only = yes +- compiler = ${CROSS_COMPILE}gcc -o $(objdir) +- link = ${CROSS_COMPILE}g++ $(platform_linkflags) ++ compiler = ${CROSS_COMPILE}$(CC) -o $(objdir) ++ link = ${CROSS_COMPILE}$(CXX) $(platform_linkflags) + ar = ${CROSS_COMPILE}ar rc $(objdir) + endif + + ifneq (,$(findstring $(platform),Vanilla Qnap-x86 Qnap-x19 Linux-ppc32)) + ifeq ($(gcc4_1), yes) + version_specific_cflags = ${CROSS_COMPILE_CFLAGS} + version_specific_cflags_third_party = -Wno-non-virtual-dtor + version_specific_java_cflags = -Wstrict-aliasing=0 + else +- gcc_min_ver = $(shell ${CROSS_COMPILE}gcc -dumpversion | cut -f2 -d'.') +- version_specific_cflags = $(shell if [ $(gcc_min_ver) -ge 6 ]; then echo '-Wno-psabi'; fi) ++ version_specific_cflags = ++ ifeq ($(CC), gcc) ++ gcc_min_ver = $(shell ${CROSS_COMPILE}gcc -dumpversion | cut -f2 -d'.') ++ gcc_ge_6 = $(shell if [ $(gcc_min_ver) -ge 6 ]; then echo 'yes'; fi) ++ ifeq ($(gcc_ge_6), yes) ++ version_specific_cflags = '-Wno-psabi' ++ endif ++ endif + version_specific_cflags += ${CROSS_COMPILE_CFLAGS} + version_specific_cflags_third_party = + version_specific_java_cflags = + endif + + version_specific_linkflags = ${CROSS_COMPILE_LINKFLAGS} + version_specific_library_path = ${CROSS_COMPILE_LIBRARY_PATH} + version_specific_includes = ${CROSS_COMPILE_INCLUDES} + + # Continuing with the non-Darwin settings... + objdir = Build/Obj/$(osdir)/$(build_dir)/ +- compiler = ${CROSS_COMPILE}gcc -o $(objdir) +- link = $(version_specific_library_path) ${CROSS_COMPILE}g++ $(platform_linkflags) ++ compiler = ${CROSS_COMPILE}$(CC) -o $(objdir) ++ link = $(version_specific_library_path) ${CROSS_COMPILE}$(CXX) $(platform_linkflags) + ar = $(version_specific_library_path) ${CROSS_COMPILE}ar rc $(objdir) + endif + + ifeq ($(platform), FreeBSD) + platform_cflags = $(version_specific_cflags) -fPIC -DPLATFORM_FREEBSD + platform_linkflags = $(version_specific_linkflags) -pthread + linkopts_ohNet = -Wl,-soname,libohNet.so + osbuilddir = Posix + objdir = Build/Obj/$(osbuilddir)/$(build_dir)/ + osdir = Posix +@@ -351,25 +357,25 @@ $(info Building for system ${openhome_system} and architecture ${openhome_archit + + + # Macros used by Common.mak + native_only ?= no + managed_only ?= no + no_shared_objects ?= no + endian ?= LITTLE + cflags_base = $(CFLAGS) -fexceptions -Wall $(version_specific_cflags_third_party) -pipe -D_GNU_SOURCE -D_REENTRANT -DDEFINE_$(endian)_ENDIAN -DDEFINE_TRACE $(debug_specific_cflags) -fvisibility=hidden $(platform_cflags) + cflags_third_party = $(cflags_base) -Wno-int-to-pointer-cast + ifeq ($(nocpp11), yes) +- cppflags = $(cflags_base) -Werror ++ cppflags = $(CPPFLAGS) $(cflags_base) -Werror + else ifeq ($(platform),Mac) +- cppflags = $(cflags_base) -std=c++11 -Werror ++ cppflags = $(CPPFLAGS) $(cflags_base) -std=c++11 -Werror + else +- cppflags = $(cflags_base) -std=c++0x -Werror ++ cppflags = $(CPPFLAGS) $(cflags_base) -std=c++0x -Werror + endif + cflags = $(cflags_base) -Werror + inc_build = Build/Include + includes = -IBuild/Include/ $(version_specific_includes) + bundle_build = Build/Bundles + mDNSdir = Build/mDNS + osdir ?= Posix + objext = o + libprefix = lib + libext = a +@@ -383,21 +389,21 @@ else + endif + exeext = elf + linkoutput = -o + dllprefix = lib + ifeq ($(platform), iOS) + link_dll = $(toolroot)/clang++ -pthread -shared -stdlib=libc++ $(platform_linkflags) + else ifeq ($(MACHINE), Darwin) + link_dll = $(version_specific_library_path) clang++ -pthread $(platform_linkflags) -shared -stdlib=libc++ + else + CROSS_COMPILE_LIBGCC ?= -shared-libgcc +- link_dll = $(version_specific_library_path) ${CROSS_COMPILE}g++ -pthread $(platform_linkflags) -shared ${CROSS_COMPILE_LIBGCC} ++ link_dll = $(version_specific_library_path) ${CROSS_COMPILE}$(CXX) -pthread $(platform_linkflags) -shared ${CROSS_COMPILE_LIBGCC} + endif + + csharp = mcs /nologo $(debug_csharp) + + csharpdefines ?= + publicjavadir = OpenHome/Net/Bindings/Java/ + + ifeq ($(platform), Mac) + platform_java_cflags = -Wno-self-assign + # arm64 builds need JAVA_HOME to be set because the Mac SDK for arm64 doesn't contain Java includes or dylibs +@@ -409,24 +415,24 @@ ifeq ($(platform), Mac) + link_jvm = ${MACOSX_SDK}/System/Library/Frameworks/JavaVM.framework/JavaVM + endif + javac = /usr/bin/javac + jar = /usr/bin/jar + else + platform_java_cflags = + includes_jni = -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/linux + ifeq ($(platform), Linux-ppc32) + libjvm_dir ?= $(JAVA_HOME)/jre/lib/ppc/server + else +- ifneq (,$(findstring arm,$(gcc_machine))) ++ ifneq (,$(findstring arm,$(cc_machine))) + libjvm_dir ?= $(JAVA_HOME)/jre/lib/arm/server + else +- ifneq (,$(findstring x64,$(gcc_machine))) ++ ifneq (,$(findstring x64,$(cc_machine))) + libjvm_dir ?= $(JAVA_HOME)/jre/lib/amd64/server + else + libjvm_dir ?= $(JAVA_HOME)/jre/lib/i386/server + endif + endif + endif + link_jvm = $(libjvm_dir)/libjvm.so + javac = $(JAVA_HOME)/bin/javac + jar = $(JAVA_HOME)/bin/jar + endif diff --git a/recipes/ohnet/all/patches/0001-makefile-1.37.5454.patch b/recipes/ohnet/all/patches/0001-makefile-1.37.5454.patch new file mode 100644 index 0000000000000..b180a57e2d452 --- /dev/null +++ b/recipes/ohnet/all/patches/0001-makefile-1.37.5454.patch @@ -0,0 +1,336 @@ +diff --git a/Makefile b/Makefile +index 2f0cb07c..372a6765 100644 +--- a/Makefile ++++ b/Makefile +@@ -1,44 +1,44 @@ + #Makefile for linux + # Could be extended to support Mac in future + + rsync ?= yes + + ifeq ($(rsync),yes) + cp = rsync -u + else +-cp = cp -u ++cp = cp + endif + + ifeq ($(debug),1) + debug_specific_cflags = -g -O0 + debug_csharp = /define:DEBUG /debug+ + build_dir = Debug + openhome_configuration = Debug + android_ndk_debug = 1 + else + debug_specific_cflags = -g -O2 + debug_csharp = /optimize+ /debug:pdbonly + build_dir = Release + openhome_configuration = Release + android_ndk_debug=0 + endif + + + + # Figure out platform, openhome_system and openhome_architecture + +-gcc_machine = $(shell ${CROSS_COMPILE}gcc -dumpmachine) ++cc_machine = $(shell ${CROSS_COMPILE}$(CC) -dumpmachine) + MACHINE = $(shell uname -s) + + $(info CROSS_COMPILE: ${CROSS_COMPILE}) +-$(info Machine reported by compiler is: ${gcc_machine}) ++$(info Machine reported by compiler is: ${cc_machine}) + $(info Machine reported by uname is: ${MACHINE}) + $(info PLATFORM: ${PLATFORM}) + + ifeq ($(MACHINE),Darwin) + ifeq ($(iOs-arm64),1) + platform = iOS + detected_openhome_system = iOs + detected_openhome_architecture = arm64 + else ifeq ($(iOs-x64),1) + platform = iOS +@@ -50,88 +50,88 @@ ifeq ($(MACHINE),Darwin) + detected_openhome_architecture = rpi + else + platform = Mac + detected_openhome_system = Mac + ifeq ($(Mac-arm64),1) + detected_openhome_architecture = arm64 + else + detected_openhome_architecture = x64 + endif + endif +-else ifneq (, $(findstring powerpc, $(gcc_machine))) ++else ifneq (, $(findstring powerpc, $(cc_machine))) + platform = Core-ppc32 + detected_openhome_system = Core + detected_openhome_architecture = ppc32 + else ifeq ($(Android-anycpu), 1) + platform = Android + detected_openhome_system = Android + detected_openhome_architecture = anycpu + else ifeq ($(freebsd), 1) + platform = FreeBSD + detected_openhome_system = FreeBSD + detected_openhome_architecture = x86 +- compiler = gcc -o $(objdir) +- link = ${CROSS_COMPILE}g++ $(platform_linkflags) ++ compiler = $(CC) -o $(objdir) ++ link = ${CROSS_COMPILE}$(CXX) $(platform_linkflags) + ar = ${CROSS_COMPILE}ar rc $(objdir) + else ifneq (,$(findstring Linux-x86,${PLATFORM})) +- ifneq (,$(findstring x86_64,$(gcc_machine))) ++ ifneq (,$(findstring x86_64,$(cc_machine))) + platform = Vanilla + detected_openhome_system = Linux + detected_openhome_architecture = x86 + CFLAGS = -m32 + LDFLAGS = -m32 + endif + else + # At present, platform == Vanilla is used for Kirkwood, x86 and x64 Posix builds. + platform ?= Vanilla + ifneq (,$(findstring Qnap,$(platform))) + detected_openhome_system = Qnap +- else ifneq (,$(findstring linux,$(gcc_machine))) ++ else ifneq (,$(findstring linux,$(cc_machine))) + detected_openhome_system = Linux + endif +- ifneq (,$(findstring arm,$(gcc_machine))) +- ifneq (,$(findstring linux-gnueabihf,$(gcc_machine))) ++ ifneq (,$(findstring arm,$(cc_machine))) ++ ifneq (,$(findstring linux-gnueabihf,$(cc_machine))) + detected_openhome_architecture = armhf + else ifeq (${detected_openhome_system},Qnap) + detected_openhome_architecture = x19 + else + detected_openhome_architecture = armel + endif + endif +- ifneq (,$(findstring i686,$(gcc_machine))) ++ ifneq (,$(findstring i686,$(cc_machine))) + detected_openhome_architecture = x86 + endif +- ifneq (,$(findstring i586,$(gcc_machine))) ++ ifneq (,$(findstring i586,$(cc_machine))) + detected_openhome_architecture = x86 + endif +- ifneq (,$(findstring i486,$(gcc_machine))) ++ ifneq (,$(findstring i486,$(cc_machine))) + detected_openhome_architecture = x86 + endif +- ifneq (,$(findstring i386,$(gcc_machine))) ++ ifneq (,$(findstring i386,$(cc_machine))) + detected_openhome_architecture = x86 + endif +- ifneq (,$(findstring amd64,$(gcc_machine))) ++ ifneq (,$(findstring amd64,$(cc_machine))) + detected_openhome_architecture = x64 + endif +- ifneq (,$(findstring x86_64,$(gcc_machine))) ++ ifneq (,$(findstring x86_64,$(cc_machine))) + detected_openhome_architecture = x64 + endif +- ifneq (,$(findstring mipsel,$(gcc_machine))) ++ ifneq (,$(findstring mipsel,$(cc_machine))) + detected_openhome_architecture = mipsel + endif +- ifneq (,$(findstring mips,$(gcc_machine))) ++ ifneq (,$(findstring mips,$(cc_machine))) + detected_openhome_architecture = mipsel + endif +- ifneq (,$(findstring aarch64,$(gcc_machine))) ++ ifneq (,$(findstring aarch64,$(cc_machine))) + detected_openhome_architecture = arm64 + endif +- ifneq (,$(findstring riscv64,$(gcc_machine))) ++ ifneq (,$(findstring riscv64,$(cc_machine))) + detected_openhome_architecture = riscv64 + endif + endif + + detected_openhome_system ?= Unknown + detected_openhome_architecture ?= Unknown + + ifneq (${openhome_system},) + ifneq (${openhome_system},${detected_openhome_system}) + $(warning Detected compiler is for system ${detected_openhome_system} but expected ${openhome_system}. Build will probably fail.) +@@ -208,83 +208,89 @@ ifeq ($(platform),Mac) + openhome_architecture = x64 + else + # building for arm64 + platform_cflags = -DPLATFORM_MACOSX_GNU -arch arm64 -mmacosx-version-min=11 + platform_linkflags = -arch arm64 -framework CoreFoundation -framework SystemConfiguration -framework IOKit + osbuilddir = Mac-arm64 + openhome_architecture = arm64 + endif + + objdir = Build/Obj/$(osbuilddir)/$(build_dir)/ +- compiler = clang -fPIC -stdlib=libc++ -o $(objdir) ++ compiler = clang -fPIC -Qunused-arguments -stdlib=libc++ -o $(objdir) + link = clang++ -pthread -stdlib=libc++ $(platform_linkflags) + ar = ar rc $(objdir) + openhome_system = Mac + + dotnetRuntime = osx-x64 + endif + + ifeq ($(platform), Core-ppc32) + # platform == Core1 + openhome_system = Core + openhome_architecture = ppc32 + endian = BIG + platform_cflags = -mcpu=405 + platform_linkflags = -mcpu=405 ${CROSS_LINKFLAGS} + linkopts_ohNet = + osdir = Core + osbuilddir = Core-ppc32 + objdir = Build/Obj/$(osbuilddir)/$(build_dir)/ + native_only = yes +- compiler = ${CROSS_COMPILE}gcc -o $(objdir) +- link = ${CROSS_COMPILE}g++ $(platform_linkflags) ++ compiler = ${CROSS_COMPILE}$(CC) -o $(objdir) ++ link = ${CROSS_COMPILE}$(CXX) $(platform_linkflags) + ar = ${CROSS_COMPILE}ar rc $(objdir) + endif + + ifeq ($(platform), Core-armv6) + # platform == Core2 + openhome_system = Core + openhome_architecture = armv6 + endian = LITTLE + platform_cflags = -mcpu=arm926ej-s -Wno-psabi + platform_linkflags = -mcpu=arm926ej-s ${CROSS_LINKFLAGS} + linkopts_ohNet = + osdir = Core + osbuilddir = Core-armv6 + objdir = Build/Obj/$(osbuilddir)/$(build_dir)/ + native_only = yes +- compiler = ${CROSS_COMPILE}gcc -o $(objdir) +- link = ${CROSS_COMPILE}g++ $(platform_linkflags) ++ compiler = ${CROSS_COMPILE}$(CC) -o $(objdir) ++ link = ${CROSS_COMPILE}$(CXX) $(platform_linkflags) + ar = ${CROSS_COMPILE}ar rc $(objdir) + endif + + ifneq (,$(findstring $(platform),Vanilla Qnap-x86 Qnap-x19 Linux-ppc32)) + ifeq ($(gcc4_1), yes) + version_specific_cflags = ${CROSS_COMPILE_CFLAGS} + version_specific_cflags_third_party = -Wno-non-virtual-dtor + version_specific_java_cflags = -Wstrict-aliasing=0 + else +- gcc_min_ver = $(shell ${CROSS_COMPILE}gcc -dumpversion | cut -f2 -d'.') +- version_specific_cflags = $(shell if [ $(gcc_min_ver) -ge 6 ]; then echo '-Wno-psabi'; fi) ++ version_specific_cflags = ++ ifeq ($(CC), gcc) ++ gcc_min_ver = $(shell ${CROSS_COMPILE}gcc -dumpversion | cut -f2 -d'.') ++ gcc_ge_6 = $(shell if [ $(gcc_min_ver) -ge 6 ]; then echo 'yes'; fi) ++ ifeq ($(gcc_ge_6), yes) ++ version_specific_cflags = '-Wno-psabi' ++ endif ++ endif + version_specific_cflags += ${CROSS_COMPILE_CFLAGS} + version_specific_cflags_third_party = + version_specific_java_cflags = + endif + + version_specific_linkflags = ${CROSS_COMPILE_LINKFLAGS} + version_specific_library_path = ${CROSS_COMPILE_LIBRARY_PATH} + version_specific_includes = ${CROSS_COMPILE_INCLUDES} + + # Continuing with the non-Darwin settings... + objdir = Build/Obj/$(osdir)/$(build_dir)/ +- compiler = ${CROSS_COMPILE}gcc -o $(objdir) +- link = $(version_specific_library_path) ${CROSS_COMPILE}g++ $(platform_linkflags) ++ compiler = ${CROSS_COMPILE}$(CC) -o $(objdir) ++ link = $(version_specific_library_path) ${CROSS_COMPILE}$(CXX) $(platform_linkflags) + ar = $(version_specific_library_path) ${CROSS_COMPILE}ar rc $(objdir) + endif + + ifeq ($(platform), FreeBSD) + platform_cflags = $(version_specific_cflags) -fPIC -DPLATFORM_FREEBSD + platform_linkflags = $(version_specific_linkflags) -pthread + linkopts_ohNet = -Wl,-soname,libohNet.so + osbuilddir = Posix + objdir = Build/Obj/$(osbuilddir)/$(build_dir)/ + osdir = Posix +@@ -351,25 +357,25 @@ $(info Building for system ${openhome_system} and architecture ${openhome_archit + + + # Macros used by Common.mak + native_only ?= no + managed_only ?= no + no_shared_objects ?= no + endian ?= LITTLE + cflags_base = $(CFLAGS) -fexceptions -Wall $(version_specific_cflags_third_party) -pipe -D_GNU_SOURCE -D_REENTRANT -DDEFINE_$(endian)_ENDIAN -DDEFINE_TRACE $(debug_specific_cflags) -fvisibility=hidden $(platform_cflags) + cflags_third_party = $(cflags_base) -Wno-int-to-pointer-cast + ifeq ($(nocpp11), yes) +- cppflags = $(cflags_base) -Werror ++ cppflags = $(CPPFLAGS) $(cflags_base) -Werror + else ifeq ($(platform),Mac) +- cppflags = $(cflags_base) -std=c++11 -Werror ++ cppflags = $(CPPFLAGS) $(cflags_base) -std=c++11 -Werror + else +- cppflags = $(cflags_base) -std=c++0x -Werror ++ cppflags = $(CPPFLAGS) $(cflags_base) -std=c++0x -Werror + endif + cflags = $(cflags_base) -Werror + inc_build = Build/Include + includes = -IBuild/Include/ $(version_specific_includes) + bundle_build = Build/Bundles + mDNSdir = Build/mDNS + osdir ?= Posix + objext = o + libprefix = lib + libext = a +@@ -383,21 +389,21 @@ else + endif + exeext = elf + linkoutput = -o + dllprefix = lib + ifeq ($(platform), iOS) + link_dll = $(toolroot)/clang++ -pthread -shared -stdlib=libc++ $(platform_linkflags) + else ifeq ($(MACHINE), Darwin) + link_dll = $(version_specific_library_path) clang++ -pthread $(platform_linkflags) -shared -stdlib=libc++ + else + CROSS_COMPILE_LIBGCC ?= -shared-libgcc +- link_dll = $(version_specific_library_path) ${CROSS_COMPILE}g++ -pthread $(platform_linkflags) -shared ${CROSS_COMPILE_LIBGCC} ++ link_dll = $(version_specific_library_path) ${CROSS_COMPILE}$(CXX) -pthread $(platform_linkflags) -shared ${CROSS_COMPILE_LIBGCC} + endif + + csharp = mcs /nologo $(debug_csharp) + + csharpdefines ?= + publicjavadir = OpenHome/Net/Bindings/Java/ + + ifeq ($(platform), Mac) + platform_java_cflags = -Wno-self-assign + # arm64 builds need JAVA_HOME to be set because the Mac SDK for arm64 doesn't contain Java includes or dylibs +@@ -409,24 +415,24 @@ ifeq ($(platform), Mac) + link_jvm = ${MACOSX_SDK}/System/Library/Frameworks/JavaVM.framework/JavaVM + endif + javac = /usr/bin/javac + jar = /usr/bin/jar + else + platform_java_cflags = + includes_jni = -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/linux + ifeq ($(platform), Linux-ppc32) + libjvm_dir ?= $(JAVA_HOME)/jre/lib/ppc/server + else +- ifneq (,$(findstring arm,$(gcc_machine))) ++ ifneq (,$(findstring arm,$(cc_machine))) + libjvm_dir ?= $(JAVA_HOME)/jre/lib/arm/server + else +- ifneq (,$(findstring x64,$(gcc_machine))) ++ ifneq (,$(findstring x64,$(cc_machine))) + libjvm_dir ?= $(JAVA_HOME)/jre/lib/amd64/server + else + libjvm_dir ?= $(JAVA_HOME)/jre/lib/i386/server + endif + endif + endif + link_jvm = $(libjvm_dir)/libjvm.so + javac = $(JAVA_HOME)/bin/javac + jar = $(JAVA_HOME)/bin/jar + endif diff --git a/recipes/ohnet/all/test_package/conanfile.py b/recipes/ohnet/all/test_package/conanfile.py index a9fb96656f203..08478d9835129 100644 --- a/recipes/ohnet/all/test_package/conanfile.py +++ b/recipes/ohnet/all/test_package/conanfile.py @@ -9,6 +9,9 @@ class TestPackageConan(ConanFile): generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" test_type = "explicit" + def build_requirements(self): + self.tool_requires("cmake/[>3.23 <4]") + def requirements(self): self.requires(self.tested_reference_str) diff --git a/recipes/ohnet/config.yml b/recipes/ohnet/config.yml index f52e484dea6d6..89da0e2089324 100644 --- a/recipes/ohnet/config.yml +++ b/recipes/ohnet/config.yml @@ -1,3 +1,7 @@ versions: + "1.36.5344": + folder: all "1.36.5182": folder: all + "1.37.5454": + folder: all diff --git a/recipes/ohpipeline/all/conandata.yml b/recipes/ohpipeline/all/conandata.yml new file mode 100644 index 0000000000000..a9fa8d1a7bd8f --- /dev/null +++ b/recipes/ohpipeline/all/conandata.yml @@ -0,0 +1,20 @@ +sources: + "1.139.1000": + source: + url: "https://github.com/openhome/ohPipeline/archive/refs/tags/ohMediaPlayer_1.139.1000.tar.gz" + sha256: "070eac6d974bbe520d0b292df1ca4a72160a2b607a60dabdaa0971c3ef96e5e4" + cmake: + url: "https://raw.githubusercontent.com/merakiacoustic/ohPipeline/ohMediaPlayer_1.139.1000_meraki3/CMakeLists.txt" + sha256: "4ebe83cf0419802f42d9d9c7ff36c666bd1094415eb29c77927273753019a202" + "1.155.1133": + source: + url: "https://github.com/openhome/ohPipeline/archive/refs/tags/ohMediaPlayer_1.155.1133.tar.gz" + sha256: "507bdf70fc6b9bf8e4605546a5c7ae99abbe537cce4b74b3e091764323939fae" + cmake: + url: "https://raw.githubusercontent.com/merakiacoustic/ohPipeline/ohMediaPlayer_1.155.1133_meraki2/CMakeLists.txt" + sha256: "0f8701552c2b3331edeedde4c3a1b8120dc419d493f6a2e05b21c9045729d6ff" +patches: + "1.139.1000": + - patch_file: "patches/0001-missing-include.patch" + patch_type: "portability" + patch_description: "Add a missing stdlib include" diff --git a/recipes/ohpipeline/all/conanfile.py b/recipes/ohpipeline/all/conanfile.py new file mode 100755 index 0000000000000..d2314dfa54789 --- /dev/null +++ b/recipes/ohpipeline/all/conanfile.py @@ -0,0 +1,129 @@ +from conan import ConanFile +from conan.tools.build import check_min_cppstd +from conan.tools.cmake import CMakeDeps, CMakeToolchain, CMake, cmake_layout +from conan.tools.env import VirtualBuildEnv +from conan.tools.files import copy, get, download, export_conandata_patches, apply_conandata_patches +from conan.tools.scm import Version +from conan.errors import ConanInvalidConfiguration +import os + +required_conan_version = ">=1.53.0" + + +class OhPipelineConan(ConanFile): + name = "ohpipeline" + description = "OpenHome audio pipeline" + license = "MIT" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/openhome/ohPipeline" + topics = ("openhome", "ohnet", "ohpipeline", "upnp") + + package_type = "static-library" + settings = "os", "arch", "compiler", "build_type" + options = { + "fPIC": [True, False], + } + default_options = { + "fPIC": True, + } + + @property + def _min_cppstd(self): + return 11 + + @property + def _compilers_minimum_version(self): + return { + "gcc": "7", + } + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def export_sources(self): + export_conandata_patches(self) + + def build_requirements(self): + self.tool_requires("cmake/[>3.23 <4]") + + def requirements(self): + self.requires("ohnet/1.37.5454", transitive_headers=True, transitive_libs=True) + self.requires("openssl/[>=1.1 <4]") + self.requires("libmad/0.15.1b") + self.requires("alac/cci.20121212") + self.requires("libfdk_aac/2.0.3") + self.requires("faac/1.30") + self.requires("flac/1.4.3") + self.requires("ogg/1.3.5") + self.requires("vorbis/1.3.7") + + def layout(self): + cmake_layout(self, src_folder="src") + + def validate(self): + if self.settings.compiler.cppstd: + check_min_cppstd(self, self._min_cppstd) + minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) + if minimum_version and Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration( + f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." + ) + + def generate(self): + venv = VirtualBuildEnv(self) + venv.generate() + tc = CMakeToolchain(self) + tc.generate() + deps = CMakeDeps(self) + deps.generate() + + def source(self): + get(self, **self.conan_data["sources"][self.version]["source"], strip_root=True) + download(self, **self.conan_data["sources"][self.version]["cmake"], filename="CMakeLists.txt") + + def build(self): + apply_conandata_patches(self) + cmake = CMake(self) + cmake.configure() + cmake.build() + + def package(self): + copy(self, "License.txt", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) + cmake = CMake(self) + cmake.install() + + def package_info(self): + self.cpp_info.libs = [ + "ohPipeline", + "ohMediaPlayer", + "Odp", + "SourcePlaylist", + "SourceRadio", + "SourceSongcast", + "SourceScd", + "SourceRaop", + "SourceUpnpAv", + "Podcast", + "ScdSender", + "CodecWav", + "CodecPcm", + "CodecDsdDsf", + "CodecDsdDff", + "CodecDsdRaw", + "CodecAiffBase", + "CodecAifc", + "CodecAiff", + "CodecFlac", + "CodecAlacAppleBase", + "CodecAlacApple", + "CodecAacFdkBase", + "CodecAacFdkMp4", + "CodecAacFdkAdts", + "CodecMp3", + "CodecVorbis", + "WebAppFramework", + "WebAppFrameworkTestUtils", + "ConfigUi", + "ConfigUiTestUtils", + ] diff --git a/recipes/ohpipeline/all/patches/0001-missing-include.patch b/recipes/ohpipeline/all/patches/0001-missing-include.patch new file mode 100644 index 0000000000000..a6ff36f81a9fe --- /dev/null +++ b/recipes/ohpipeline/all/patches/0001-missing-include.patch @@ -0,0 +1,10 @@ +--- a/OpenHome/Media/Protocol/ProtocolHls.cpp ++++ b/OpenHome/Media/Protocol/ProtocolHls.cpp +@@ -18,6 +18,7 @@ + #include + + #include ++#include + + namespace OpenHome { + namespace Media { diff --git a/recipes/ohpipeline/all/test_package/CMakeLists.txt b/recipes/ohpipeline/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..bd868ecdf5a63 --- /dev/null +++ b/recipes/ohpipeline/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) + +project(test_package CXX) + +find_package(ohpipeline REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PUBLIC ohpipeline::ohpipeline) diff --git a/recipes/ohpipeline/all/test_package/conanfile.py b/recipes/ohpipeline/all/test_package/conanfile.py new file mode 100644 index 0000000000000..a9fb96656f203 --- /dev/null +++ b/recipes/ohpipeline/all/test_package/conanfile.py @@ -0,0 +1,26 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/ohpipeline/all/test_package/test_package.cpp b/recipes/ohpipeline/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..dce35f7c92826 --- /dev/null +++ b/recipes/ohpipeline/all/test_package/test_package.cpp @@ -0,0 +1,43 @@ +#include +#include +#include + +using namespace OpenHome; +using namespace OpenHome::Av; + +class RamStore : public IStaticDataSource +{ +public: + RamStore(const Brx& aImageFileName); + virtual ~RamStore(); +private: // from IStaticDataSource + void LoadStaticData(IStoreLoaderStatic& aLoader) override; +private: + Brhz iImageFileName; +}; + +RamStore::RamStore(const Brx& aImageFileName) + : iImageFileName(aImageFileName) +{ +} + +RamStore::~RamStore() {} + +void RamStore::LoadStaticData(IStoreLoaderStatic& aLoader) +{ + aLoader.AddStaticItem(StaticDataKey::kBufManufacturerName, "OpenHome"); + aLoader.AddStaticItem(StaticDataKey::kBufManufacturerInfo, "insert oh info here..."); + aLoader.AddStaticItem(StaticDataKey::kBufManufacturerUrl, "http://www.openhome.org"); + aLoader.AddStaticItem(StaticDataKey::kBufManufacturerImageUrl, "http://wiki.openhome.org/mediawiki/skins/openhome/images/logo.png"); + aLoader.AddStaticItem(StaticDataKey::kBufModelName, "OpenHome Media Player (test)"); + aLoader.AddStaticItem(StaticDataKey::kBufModelInfo, "Test implementation of ohMediaPlayer"); + aLoader.AddStaticItem(StaticDataKey::kBufModelUrl, "http://wiki.openhome.org/wiki/OhMedia"); + aLoader.AddStaticItem(StaticDataKey::kBufModelImageUrl, iImageFileName.CString()); +} + +int main() +{ + RamStore* ramStore = new RamStore(Brx::Empty()); + + delete ramStore; +} diff --git a/recipes/ohpipeline/config.yml b/recipes/ohpipeline/config.yml new file mode 100644 index 0000000000000..12fa634205705 --- /dev/null +++ b/recipes/ohpipeline/config.yml @@ -0,0 +1,5 @@ +versions: + "1.139.1000": + folder: all + "1.155.1133": + folder: all diff --git a/recipes/onetbb/all/conandata.yml b/recipes/onetbb/all/conandata.yml index 4839476518f75..d6288f698e49a 100644 --- a/recipes/onetbb/all/conandata.yml +++ b/recipes/onetbb/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2021.12.0": + url: "https://github.com/oneapi-src/oneTBB/archive/refs/tags/v2021.12.0.tar.gz" + sha256: "c7bb7aa69c254d91b8f0041a71c5bcc3936acb64408a1719aec0b2b7639dd84f" "2021.10.0": url: "https://github.com/oneapi-src/oneTBB/archive/refs/tags/v2021.10.0.tar.gz" sha256: "487023a955e5a3cc6d3a0d5f89179f9b6c0ae7222613a7185b0227ba0c83700b" diff --git a/recipes/onetbb/all/conanfile.py b/recipes/onetbb/all/conanfile.py index b0c66b51e5856..1d40fac290ce1 100644 --- a/recipes/onetbb/all/conanfile.py +++ b/recipes/onetbb/all/conanfile.py @@ -1,9 +1,10 @@ from conan import ConanFile from conan.errors import ConanInvalidConfiguration +from conan.tools.apple import is_apple_os from conan.tools.build import cross_building from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout from conan.tools.env import VirtualBuildEnv -from conan.tools.files import apply_conandata_patches, export_conandata_patches, copy, get, load, rmdir +from conan.tools.files import apply_conandata_patches, export_conandata_patches, copy, get, load, rmdir, rm from conan.tools.gnu import PkgConfigDeps from conan.tools.scm import Version import os @@ -52,7 +53,9 @@ def _tbbbind_hwloc_version(self): @property def _tbbbind_supported(self): - return self.settings.os != "Macos" + if is_apple_os(self): + return self.settings.os == "Macos" and Version(self.version) >= "2021.11.0" + return True @property def _tbbbind_build(self): @@ -120,7 +123,9 @@ def generate(self): toolchain.variables["TBB_DISABLE_HWLOC_AUTOMATIC_SEARCH"] = not self._tbbbind_build if self._tbbbind_explicit_hwloc: hwloc_package_folder = self.dependencies["hwloc"].package_folder - hwloc_lib_name = "hwloc.lib" if self.settings.os == "Windows" else "libhwloc.so" + hwloc_lib_name = ("hwloc.lib" if self.settings.os == "Windows" else + "libhwloc.dylib" if self.settings.os == "Macos" else + "libhwloc.so") toolchain.variables[f"CMAKE_HWLOC_{self._tbbbind_hwloc_version}_LIBRARY_PATH"] = \ os.path.join(hwloc_package_folder, "lib", hwloc_lib_name).replace("\\", "/") toolchain.variables[f"CMAKE_HWLOC_{self._tbbbind_hwloc_version}_INCLUDE_PATH"] = \ @@ -147,6 +152,7 @@ def package(self): rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) rmdir(self, os.path.join(self.package_folder, "share")) + rm(self, "*.pdb", os.path.join(self.package_folder, "bin")) def package_info(self): self.cpp_info.set_property("cmake_file_name", "TBB") diff --git a/recipes/onetbb/config.yml b/recipes/onetbb/config.yml index 39b3726474302..4ef9dafa04d03 100644 --- a/recipes/onetbb/config.yml +++ b/recipes/onetbb/config.yml @@ -1,4 +1,6 @@ versions: + "2021.12.0": + folder: all "2021.10.0": folder: all "2021.9.0": diff --git a/recipes/onnx/all/conandata.yml b/recipes/onnx/all/conandata.yml index f058303147df0..337aa98f505f5 100644 --- a/recipes/onnx/all/conandata.yml +++ b/recipes/onnx/all/conandata.yml @@ -1,4 +1,13 @@ sources: + "1.17.0": + url: "https://github.com/onnx/onnx/archive/v1.17.0.tar.gz" + sha256: "8d5e983c36037003615e5a02d36b18fc286541bf52de1a78f6cf9f32005a820e" + "1.16.2": + url: "https://github.com/onnx/onnx/archive/v1.16.2.tar.gz" + sha256: "84fc1c3d6133417f8a13af6643ed50983c91dacde5ffba16cc8bb39b22c2acbb" + "1.16.1": + url: "https://github.com/onnx/onnx/archive/v1.16.1.tar.gz" + sha256: "0e6aa2c0a59bb2d90858ad0040ea1807117cc2f05b97702170f18e6cd6b66fb3" "1.16.0": url: "https://github.com/onnx/onnx/archive/v1.16.0.tar.gz" sha256: "0ce153e26ce2c00afca01c331a447d86fbf21b166b640551fe04258b4acfc6a4" diff --git a/recipes/onnx/all/conanfile.py b/recipes/onnx/all/conanfile.py index 02c220e3798ce..ccffd47b97dce 100644 --- a/recipes/onnx/all/conanfile.py +++ b/recipes/onnx/all/conanfile.py @@ -32,7 +32,7 @@ class OnnxConan(ConanFile): default_options = { "shared": False, "fPIC": True, - "disable_static_registration": False, + "disable_static_registration": True, } @property @@ -113,7 +113,6 @@ def generate(self): # https://cmake.org/cmake/help/v3.28/module/FindPythonInterp.html # https://github.com/onnx/onnx/blob/1014f41f17ecc778d63e760a994579d96ba471ff/CMakeLists.txt#L119C1-L119C50 tc.variables["PYTHON_EXECUTABLE"] = sys.executable.replace("\\", "/") - tc.variables["ONNX_BUILD_BENCHMARKS"] = False tc.variables["ONNX_USE_PROTOBUF_SHARED_LIBS"] = self.dependencies.host["protobuf"].options.shared tc.variables["BUILD_ONNX_PYTHON"] = False tc.variables["ONNX_GEN_PB_TYPE_STUBS"] = False diff --git a/recipes/onnx/config.yml b/recipes/onnx/config.yml index 075fe1cfd61f0..32a3b9ac351e1 100644 --- a/recipes/onnx/config.yml +++ b/recipes/onnx/config.yml @@ -1,4 +1,10 @@ versions: + "1.17.0": + folder: all + "1.16.2": + folder: all + "1.16.1": + folder: all "1.16.0": folder: all "1.15.0": diff --git a/recipes/onnxruntime/all/cmake/onnxruntime_external_deps.cmake b/recipes/onnxruntime/all/cmake/onnxruntime_external_deps.cmake new file mode 100644 index 0000000000000..8cacf5636fe36 --- /dev/null +++ b/recipes/onnxruntime/all/cmake/onnxruntime_external_deps.cmake @@ -0,0 +1,112 @@ +# Replacement for https://github.com/microsoft/onnxruntime/blob/v1.16.1/cmake/external/onnxruntime_external_deps.cmake + +if(NOT onnxruntime_DISABLE_ABSEIL) + find_package(absl REQUIRED CONFIG) + list(APPEND onnxruntime_EXTERNAL_LIBRARIES abseil::abseil) + include_directories(${absl_INCLUDE_DIRS}) +endif() + +find_package(re2 REQUIRED CONFIG) +list(APPEND onnxruntime_EXTERNAL_LIBRARIES re2::re2) + +#flatbuffers 1.11.0 does not have flatbuffers::IsOutRange, therefore we require 1.12.0+ +find_package(Flatbuffers REQUIRED CONFIG) +list(APPEND onnxruntime_EXTERNAL_LIBRARIES flatbuffers::flatbuffers) + +find_package(Protobuf REQUIRED CONFIG) +list(APPEND onnxruntime_EXTERNAL_LIBRARIES protobuf::libprotobuf) +set(ONNX_CUSTOM_PROTOC_EXECUTABLE protoc) +set(PROTOC_EXECUTABLE protoc) + +find_package(date REQUIRED CONFIG) +list(APPEND onnxruntime_EXTERNAL_LIBRARIES date::date) +include_directories(${date_INCLUDE_DIRS}) +add_library(date_interface INTERFACE) + +find_package(Boost REQUIRED CONFIG) +list(APPEND onnxruntime_EXTERNAL_LIBRARIES Boost::mp11) + +find_package(nlohmann_json REQUIRED CONFIG) +list(APPEND onnxruntime_EXTERNAL_LIBRARIES nlohmann_json::nlohmann_json) + +find_package(cpuinfo REQUIRED CONFIG) +list(APPEND onnxruntime_EXTERNAL_LIBRARIES cpuinfo::cpuinfo) +if (TARGET cpuinfo::clog) + list(APPEND onnxruntime_EXTERNAL_LIBRARIES cpuinfo::clog) +endif() +set(CPUINFO_SUPPORTED ${cpuinfo_FOUND}) +# Add a dummy targets for onnxruntime CMakelists.txt to depend on +add_library(clog INTERFACE) +add_library(cpuinfo INTERFACE) + +if (NOT WIN32) + find_package(nsync REQUIRED CONFIG) + list(APPEND onnxruntime_EXTERNAL_LIBRARIES nsync::nsync_cpp) + include_directories(${nsync_INCLUDE_DIRS}) + add_library(nsync_cpp INTERFACE) +endif() + +find_package(Microsoft.GSL 4.0 REQUIRED CONFIG) +list(APPEND onnxruntime_EXTERNAL_LIBRARIES Microsoft.GSL::GSL) +include_directories(${Microsoft.GSL_INCLUDE_DIRS}) + +find_package(safeint REQUIRED CONFIG) +include_directories(${safeint_INCLUDE_DIRS}) +add_library(safeint_interface INTERFACE) + +find_package(ONNX REQUIRED CONFIG) +list(APPEND onnxruntime_EXTERNAL_LIBRARIES onnx onnx_proto) + +find_package(Eigen3 REQUIRED CONFIG) +list(APPEND onnxruntime_EXTERNAL_LIBRARIES Eigen3::Eigen) +set(eigen_INCLUDE_DIRS ${Eigen3_INCLUDE_DIRS}) + +if(WIN32) + find_package(wil REQUIRED CONFIG) + list(APPEND onnxruntime_EXTERNAL_LIBRARIES WIL::WIL) + include_directories(${wil_INCLUDE_DIRS}) +endif() + +# XNNPACK EP +if (onnxruntime_USE_XNNPACK) + if (onnxruntime_DISABLE_CONTRIB_OPS) + message(FATAL_ERROR "XNNPACK EP requires the internal NHWC contrib ops to be available " + "but onnxruntime_DISABLE_CONTRIB_OPS is ON") + endif() + find_package(xnnpack REQUIRED CONFIG) + list(APPEND onnxruntime_EXTERNAL_LIBRARIES xnnpack::xnnpack) + add_library(XNNPACK INTERFACE) +endif() + +if (onnxruntime_USE_MIMALLOC) + find_package(mimalloc REQUIRED CONFIG) + add_definitions(-DUSE_MIMALLOC) +endif() + +# The source code of onnx_proto is generated, we must build this lib first before starting to compile the other source code that uses ONNX protobuf types. +# The other libs do not have the problem. All the sources are already there. We can compile them in any order. +set(onnxruntime_EXTERNAL_DEPENDENCIES + onnx_proto + flatbuffers::flatbuffers +) + +if (onnxruntime_RUN_ONNX_TESTS) + add_definitions(-DORT_RUN_EXTERNAL_ONNX_TESTS) +endif() + +if(onnxruntime_ENABLE_ATEN) + message("Aten fallback is enabled.") + find_package(dlpack REQUIRED CONFIG) +endif() + +if(onnxruntime_ENABLE_TRAINING OR (onnxruntime_ENABLE_TRAINING_APIS AND onnxruntime_BUILD_UNIT_TESTS)) + find_package(cxxopts REQUIRED CONFIG) +endif() + +if(onnxruntime_USE_SNPE) + include(external/find_snpe.cmake) + list(APPEND onnxruntime_EXTERNAL_LIBRARIES ${SNPE_NN_LIBS}) +endif() + +file(TO_NATIVE_PATH ${CMAKE_BINARY_DIR} ORT_BINARY_DIR) +file(TO_NATIVE_PATH ${PROJECT_SOURCE_DIR} ORT_SOURCE_DIR) diff --git a/recipes/onnxruntime/all/conandata.yml b/recipes/onnxruntime/all/conandata.yml index b051b06768621..5ad665fd49f79 100644 --- a/recipes/onnxruntime/all/conandata.yml +++ b/recipes/onnxruntime/all/conandata.yml @@ -1,16 +1,13 @@ sources: + "1.18.1": + url: "https://github.com/microsoft/onnxruntime/archive/refs/tags/v1.18.1.tar.gz" + sha256: "480ff5d2450ff18d02db48908c9c0c6a602993942cb47866b8effe32d0469a2c" + "1.17.3": + url: "https://github.com/microsoft/onnxruntime/archive/refs/tags/v1.17.3.tar.gz" + sha256: "4112f6552c17216311be013b9a2621a3c1a17ed9e1268a1142599b6a494517c2" "1.16.3": url: "https://github.com/microsoft/onnxruntime/archive/refs/tags/v1.16.3.tar.gz" sha256: "d26b8a7eed1df4440aa3d8eac5049980cbe585514ccedfda809712051a4b1721" - "1.16.2": - url: "https://github.com/microsoft/onnxruntime/archive/refs/tags/v1.16.2.tar.gz" - sha256: "609a9d31fd9445eb2e737cbb6420100fa7d4e1180b594c1a62505b26f730bfd5" - "1.16.1": - url: "https://github.com/microsoft/onnxruntime/archive/refs/tags/v1.16.1.tar.gz" - sha256: "197c6ce4f2de9176402fb8a634c390e757b729ff48a30e8038a0f7d71ff1f1ae" - "1.16.0": - url: "https://github.com/microsoft/onnxruntime/archive/refs/tags/v1.16.0.tar.gz" - sha256: "3a4e57d454bce4349e11e2262fc47728a78b86ef1e0754514bbbc7d709e0a80d" "1.15.1": url: "https://github.com/microsoft/onnxruntime/archive/refs/tags/v1.15.1.tar.gz" sha256: "93a9b6f148639938ccbaa48d0f641d8f33312fdfcc69ee9466e11362b43917c4" @@ -18,49 +15,46 @@ sources: url: "https://github.com/microsoft/onnxruntime/archive/refs/tags/v1.14.1.tar.gz" sha256: "f998352b131bb89fa7dd1f1d87ddbafe647dfaddd11929b6b5168b3f4ef857de" patches: - "1.16.3": - - patch_file: "patches/1.16.0-0001-cmake-dependencies.patch" - patch_description: "CMake: ensure conan dependencies are used" - patch_type: "conan" - - patch_file: "patches/1.14.1-0004-abseil-no-string-view.patch" - patch_description: "allow to build with abseil built without c++17 support" + "1.18.1": + - patch_file: "patches/1.17.3-0002-missing-include.patch" + patch_description: "add missing '' include when abseil is built without c++17 support" patch_type: "portability" - "1.16.2": - - patch_file: "patches/1.16.0-0001-cmake-dependencies.patch" - patch_description: "CMake: ensure conan dependencies are used" - patch_type: "conan" - - patch_file: "patches/1.14.1-0004-abseil-no-string-view.patch" + - patch_file: "patches/1.18.0-0004-abseil-no-string-view.patch" patch_description: "allow to build with abseil built without c++17 support" patch_type: "portability" - "1.16.1": - - patch_file: "patches/1.16.0-0001-cmake-dependencies.patch" - patch_description: "CMake: ensure conan dependencies are used" - patch_type: "conan" + - patch_file: "patches/1.18.1-0005-fix-cutlass-cuda-provider.patch" + patch_description: "use cutlass from Conan" + patch_type: "portability" + "1.17.3": + - patch_file: "patches/1.17.3-0001-patch-macos-cpp20-date-compat.patch" + patch_description: "allow to build with macos c++20 support" + patch_type: "portability" + patch_source: "https://github.com/microsoft/onnxruntime/commit/7303a90f4916dcf6f66236d40b8917344c27420a.patch" + - patch_file: "patches/1.17.3-0002-missing-include.patch" + patch_description: "add missing '' include when abseil is built without c++17 support" + patch_type: "portability" - patch_file: "patches/1.14.1-0004-abseil-no-string-view.patch" patch_description: "allow to build with abseil built without c++17 support" patch_type: "portability" - "1.16.0": - - patch_file: "patches/1.16.0-0001-cmake-dependencies.patch" - patch_description: "CMake: ensure conan dependencies are used" - patch_type: "conan" + - patch_file: "patches/1.17.3-0003-fix-cutlass-cuda-provider.patch" + patch_description: "use cutlass from Conan" + patch_type: "portability" + "1.16.3": - patch_file: "patches/1.14.1-0004-abseil-no-string-view.patch" patch_description: "allow to build with abseil built without c++17 support" patch_type: "portability" "1.15.1": - - patch_file: "patches/1.15.1-0001-cmake-dependencies.patch" - patch_description: "CMake: ensure conan dependencies are used" - patch_type: "conan" - patch_file: "patches/1.14.1-0004-abseil-no-string-view.patch" patch_description: "allow to build with abseil built without c++17 support" patch_type: "portability" + - patch_file: "patches/1.15.1-0002-fix-attention-15983.patch" + patch_description: "Fix attention.cc" + patch_source: "https://github.com/microsoft/onnxruntime/pull/15983" + patch_type: "backport" "1.14.1": - patch_file: "patches/1.14.1-0001-cmake-dependencies.patch" patch_description: "CMake: ensure conan dependencies are used (upstreamed future versions)" patch_type: "conan" - patch_source: "https://github.com/microsoft/onnxruntime/pull/15323" - - patch_file: "patches/1.14.1-0002-cmake-dependencies.patch" - patch_description: "CMake: ensure conan dependencies are used" - patch_type: "conan" - patch_file: "patches/1.14.1-0003-amx-gas-version.patch" patch_description: "Check GNU AS supports AMX before enabling it" patch_type: "portability" @@ -72,3 +66,12 @@ patches: patch_description: "Ensures the forward compatibility with the newest versions of re2 library." patch_type: "portability" patch_source: "https://github.com/microsoft/onnxruntime/commit/126e7bf15fa4af8621814b82a3f7bd0d786f0239.patch" + +# ONNX versions are based on the minor version used at +# https://github.com/microsoft/onnxruntime/tree/main/cmake/external +onnx_version_map: + "1.18.1": "1.16.2" + "1.17.3": "1.15.0" + "1.16.3": "1.14.1" + "1.15.1": "1.14.1" + "1.14.1": "1.13.1" diff --git a/recipes/onnxruntime/all/conanfile.py b/recipes/onnxruntime/all/conanfile.py index 45cbfde117d6f..ce3b31cb93581 100644 --- a/recipes/onnxruntime/all/conanfile.py +++ b/recipes/onnxruntime/all/conanfile.py @@ -2,7 +2,7 @@ from conan.errors import ConanInvalidConfiguration from conan.tools.apple import is_apple_os from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout -from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rmdir +from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rmdir, replace_in_file from conan.tools.build import check_min_cppstd from conan.tools.scm import Version from conan.tools.env import VirtualBuildEnv @@ -27,16 +27,20 @@ class OnnxRuntimeConan(ConanFile): "shared": [True, False], "fPIC": [True, False], "with_xnnpack": [True, False], + "with_cuda": [True, False], } default_options = { "shared": False, "fPIC": True, "with_xnnpack": False, + "with_cuda": False, } short_paths = True @property def _min_cppstd(self): + if is_apple_os(self) and Version(self.version) >= "1.17.0": + return 20 # https://github.com/microsoft/onnxruntime/blob/8f5c79cb63f09ef1302e85081093a3fe4da1bc7d/cmake/CMakeLists.txt#L43-L47 return 17 @property @@ -59,6 +63,7 @@ def _compilers_minimum_version(self): def export_sources(self): export_conandata_patches(self) + copy(self, "cmake/*", src=self.recipe_folder, dst=self.export_sources_folder) def config_options(self): if self.settings.os == "Windows": @@ -67,38 +72,46 @@ def config_options(self): def configure(self): if self.options.shared: self.options.rm_safe("fPIC") + # onnxruntime forces this to be True + # https://github.com/microsoft/onnxruntime/blob/be76e1e1b8e2914e448d12a0cc683c00014c0490/cmake/external/onnxruntime_external_deps.cmake#L542 + self.options["onnx"].disable_static_registration = True def layout(self): cmake_layout(self, src_folder="src") - @property - def _onnx_version(self): - version = Version(self.version) - return { - "1.14": "1.13.1", - "1.15": "1.14.1", - "1.16": "1.14.1", - }[f"{version.major}.{version.minor}"] - def requirements(self): - self.requires("abseil/20230802.1") + required_onnx_version = self.conan_data["onnx_version_map"][self.version] + self.requires(f"onnx/{required_onnx_version}") + self.requires("abseil/20240116.1") self.requires("protobuf/3.21.12") self.requires("date/3.0.1") - self.requires("re2/20230901") - self.requires(f"onnx/{self._onnx_version}") - self.requires("flatbuffers/1.12.0") - self.requires("boost/1.83.0", headers=True, libs=False, run=False) # for mp11, header only, no need for libraries to link/run + self.requires("re2/20231101") + if Version(self.version) >= "1.18": + self.requires("flatbuffers/23.5.26") + else: + # v1.* is required, newer versions are not compatible + self.requires("flatbuffers/1.12.0") + # using 1.84.0+ fails on CCI as it prevents the cpp 17 version to be picked up when building with cpp 20 + self.requires("boost/1.83.0", headers=True, libs=False) # for mp11, header only, no need for libraries self.requires("safeint/3.0.28") self.requires("nlohmann_json/3.11.3") self.requires("eigen/3.4.0") self.requires("ms-gsl/4.0.0") - self.requires("cpuinfo/cci.20220618") + if Version(self.version) >= "1.17.0": + self.requires("cpuinfo/cci.20231129") + else: + self.requires("cpuinfo/cci.20220618") # Newer versions are not compatible if self.settings.os != "Windows": self.requires("nsync/1.26.0") else: - self.requires("wil/1.0.231216.1") + self.requires("wil/1.0.240803.1") if self.options.with_xnnpack: - self.requires("xnnpack/cci.20220801") + if Version(self.version) >= "1.17.0": + self.requires("xnnpack/cci.20230715") + else: + self.requires("xnnpack/cci.20220801") + if self.options.with_cuda: + self.requires("cutlass/3.5.0") def validate(self): if self.settings.compiler.get_safe("cppstd"): @@ -108,17 +121,23 @@ def validate(self): raise ConanInvalidConfiguration( f"{self.ref} requires minimum compiler version {minimum_version}." ) + if not self.dependencies["onnx"].options.disable_static_registration: + raise ConanInvalidConfiguration( + f"{self.ref} requires onnx compiled with `-o onnx:disable_static_registration=True`." + ) def validate_build(self): if self.version >= Version("1.15.0") and self.options.shared and sys.version_info[:2] < (3, 8): # https://github.com/microsoft/onnxruntime/blob/638146b79ea52598ece514704d3f592c10fab2f1/cmake/CMakeLists.txt#LL500C12-L500C12 raise ConanInvalidConfiguration( - f"{self.ref} requires python 3.8+ to be built as shared." + f"{self.ref} requires Python 3.8+ to be built as shared." ) + if self.settings.os == "Windows" and self.dependencies["abseil"].options.shared: + raise ConanInvalidConfiguration("Using abseil shared on Windows leads to link errors.") def build_requirements(self): - # Required by upstream https://github.com/microsoft/onnxruntime/blob/v1.14.1/cmake/CMakeLists.txt#L5 - self.tool_requires("cmake/[>=3.24 <4]") + # Required by upstream https://github.com/microsoft/onnxruntime/blob/v1.16.1/cmake/CMakeLists.txt#L5 + self.tool_requires("cmake/[>=3.26 <4]") def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) @@ -128,102 +147,60 @@ def generate(self): # disable downloading dependencies to ensure conan ones are used tc.variables["FETCHCONTENT_FULLY_DISCONNECTED"] = True if self.version >= Version("1.15.0") and self.options.shared: - # Need to replace windows path seperators with linux path seperators to keep CMake from crashing + # Need to replace windows path separators with linux path separators to keep CMake from crashing tc.variables["Python_EXECUTABLE"] = sys.executable.replace("\\", "/") tc.variables["onnxruntime_BUILD_SHARED_LIB"] = self.options.shared tc.variables["onnxruntime_USE_FULL_PROTOBUF"] = not self.dependencies["protobuf"].options.lite tc.variables["onnxruntime_USE_XNNPACK"] = self.options.with_xnnpack + tc.variables["onnxruntime_USE_CUDA"] = self.options.with_cuda tc.variables["onnxruntime_BUILD_UNIT_TESTS"] = False - tc.variables["onnxruntime_RUN_ONNX_TESTS"] = False - tc.variables["onnxruntime_GENERATE_TEST_REPORTS"] = False - tc.variables["onnxruntime_USE_MIMALLOC"] = False - tc.variables["onnxruntime_ENABLE_PYTHON"] = False - tc.variables["onnxruntime_BUILD_CSHARP"] = False - tc.variables["onnxruntime_BUILD_JAVA"] = False - tc.variables["onnxruntime_BUILD_NODEJS"] = False - tc.variables["onnxruntime_BUILD_OBJC"] = False - tc.variables["onnxruntime_BUILD_APPLE_FRAMEWORK"] = False - tc.variables["onnxruntime_USE_DNNL"] = False - tc.variables["onnxruntime_USE_NNAPI_BUILTIN"] = False - tc.variables["onnxruntime_USE_RKNPU"] = False - tc.variables["onnxruntime_USE_LLVM"] = False - tc.variables["onnxruntime_ENABLE_MICROSOFT_INTERNAL"] = False - tc.variables["onnxruntime_USE_VITISAI"] = False - tc.variables["onnxruntime_USE_TENSORRT"] = False - tc.variables["onnxruntime_SKIP_AND_PERFORM_FILTERED_TENSORRT_TESTS"] = True - tc.variables["onnxruntime_USE_TENSORRT_BUILTIN_PARSER"] = False - tc.variables["onnxruntime_TENSORRT_PLACEHOLDER_BUILDER"] = False - tc.variables["onnxruntime_USE_TVM"] = False - tc.variables["onnxruntime_TVM_CUDA_RUNTIME"] = False - tc.variables["onnxruntime_TVM_USE_HASH"] = False - tc.variables["onnxruntime_CROSS_COMPILING"] = False tc.variables["onnxruntime_DISABLE_CONTRIB_OPS"] = False - tc.variables["onnxruntime_DISABLE_ML_OPS"] = False + tc.variables["onnxruntime_USE_FLASH_ATTENTION"] = False tc.variables["onnxruntime_DISABLE_RTTI"] = False tc.variables["onnxruntime_DISABLE_EXCEPTIONS"] = False - tc.variables["onnxruntime_MINIMAL_BUILD"] = False - tc.variables["onnxruntime_EXTENDED_MINIMAL_BUILD"] = False - tc.variables["onnxruntime_MINIMAL_BUILD_CUSTOM_OPS"] = False - tc.variables["onnxruntime_REDUCED_OPS_BUILD"] = False - tc.variables["onnxruntime_ENABLE_LANGUAGE_INTEROP_OPS"] = False - tc.variables["onnxruntime_USE_DML"] = False - tc.variables["onnxruntime_USE_WINML"] = False - tc.variables["onnxruntime_BUILD_MS_EXPERIMENTAL_OPS"] = False - tc.variables["onnxruntime_USE_TELEMETRY"] = False - tc.variables["onnxruntime_ENABLE_LTO"] = False - tc.variables["onnxruntime_USE_ACL"] = False - tc.variables["onnxruntime_USE_ACL_1902"] = False - tc.variables["onnxruntime_USE_ACL_1905"] = False - tc.variables["onnxruntime_USE_ACL_1908"] = False - tc.variables["onnxruntime_USE_ACL_2002"] = False - tc.variables["onnxruntime_USE_ARMNN"] = False + tc.variables["onnxruntime_ARMNN_RELU_USE_CPU"] = False tc.variables["onnxruntime_ARMNN_BN_USE_CPU"] = False - tc.variables["onnxruntime_ENABLE_NVTX_PROFILE"] = False - tc.variables["onnxruntime_ENABLE_TRAINING"] = False - tc.variables["onnxruntime_ENABLE_TRAINING_OPS"] = False - tc.variables["onnxruntime_ENABLE_TRAINING_APIS"] = False tc.variables["onnxruntime_ENABLE_CPU_FP16_OPS"] = False - tc.variables["onnxruntime_USE_NCCL"] = False - tc.variables["onnxruntime_BUILD_BENCHMARKS"] = False - tc.variables["onnxruntime_USE_ROCM"] = False - tc.variables["onnxruntime_GCOV_COVERAGE"] = False - tc.variables["onnxruntime_USE_MPI"] = False - tc.variables["onnxruntime_ENABLE_MEMORY_PROFILE"] = False - tc.variables["onnxruntime_ENABLE_CUDA_LINE_NUMBER_INFO"] = False - tc.variables["onnxruntime_BUILD_WEBASSEMBLY"] = False - tc.variables["onnxruntime_BUILD_WEBASSEMBLY_STATIC_LIB"] = False - tc.variables["onnxruntime_ENABLE_WEBASSEMBLY_EXCEPTION_CATCHING"] = False - tc.variables["onnxruntime_ENABLE_WEBASSEMBLY_API_EXCEPTION_CATCHING"] = False - tc.variables["onnxruntime_ENABLE_WEBASSEMBLY_EXCEPTION_THROWING"] = False - tc.variables["onnxruntime_ENABLE_WEBASSEMBLY_THREADS"] = False - tc.variables["onnxruntime_ENABLE_WEBASSEMBLY_DEBUG_INFO"] = False - tc.variables["onnxruntime_ENABLE_WEBASSEMBLY_PROFILING"] = False tc.variables["onnxruntime_ENABLE_EAGER_MODE"] = False tc.variables["onnxruntime_ENABLE_LAZY_TENSOR"] = False - tc.variables["onnxruntime_ENABLE_EXTERNAL_CUSTOM_OP_SCHEMAS"] = False - tc.variables["onnxruntime_ENABLE_CUDA_PROFILING"] = False - tc.variables["onnxruntime_ENABLE_ROCM_PROFILING"] = False - tc.variables["onnxruntime_USE_CANN"] = False - tc.generate() - deps = CMakeDeps(self) - if self.dependencies["flatbuffers"].options.shared: - deps.set_property("flatbuffers", "cmake_target_name", "flatbuffers::flatbuffers") + if Version(self.version) >= "1.17": + tc.variables["onnxruntime_ENABLE_CUDA_EP_INTERNAL_TESTS"] = False + tc.variables["onnxruntime_USE_NEURAL_SPEED"] = False + tc.variables["onnxruntime_USE_MEMORY_EFFICIENT_ATTENTION"] = False - deps.set_property("boost::headers", "cmake_target_name", "Boost::mp11") - deps.set_property("date", "cmake_target_name", "date_interface") - deps.set_property("safeint", "cmake_target_name", "safeint_interface") - deps.set_property("xnnpack", "cmake_target_name", "XNNPACK") + # Disable a warning that gets converted to an error + tc.preprocessor_definitions["_SILENCE_ALL_CXX23_DEPRECATION_WARNINGS"] = "1" + tc.generate() + deps = CMakeDeps(self) + deps.set_property("boost::headers", "cmake_target_name", "Boost::mp11") + deps.set_property("flatbuffers", "cmake_target_name", "flatbuffers::flatbuffers") deps.generate() + vbe = VirtualBuildEnv(self) vbe.generate(scope="build") - def build(self): + def _patch_sources(self): apply_conandata_patches(self) + copy(self, "onnxruntime_external_deps.cmake", + src=os.path.join(self.export_sources_folder, "cmake"), + dst=os.path.join(self.source_folder, "cmake", "external")) + # Avoid parsing of git commit info + if Version(self.version) >= "15.0": + replace_in_file(self, os.path.join(self.source_folder, "cmake", "CMakeLists.txt"), + "if (Git_FOUND)", "if (FALSE)") + if Version(self.version) >= "1.17": + # https://github.com/microsoft/onnxruntime/commit/5bfca1dc576720627f3af8f65e25af408271079b + replace_in_file(self, os.path.join(self.source_folder, "cmake", "onnxruntime_providers_cuda.cmake"), + 'option(onnxruntime_NVCC_THREADS "Number of threads that NVCC can use for compilation." 1)', + 'set(onnxruntime_NVCC_THREADS "1" CACHE STRING "Number of threads that NVCC can use for compilation.")') + + def build(self): + self._patch_sources() cmake = CMake(self) # https://github.com/microsoft/onnxruntime/blob/v1.14.1/cmake/CMakeLists.txt#L792 # onnxruntime is builds its targets with COMPILE_WARNING_AS_ERROR ON @@ -293,6 +270,8 @@ def package_info(self): self.cpp_info.requires.append("wil::wil") if self.options.with_xnnpack: self.cpp_info.requires.append("xnnpack::xnnpack") + if self.options.with_cuda: + self.cpp_info.requires.append("cutlass::cutlass") # https://github.com/microsoft/onnxruntime/blob/v1.16.0/cmake/CMakeLists.txt#L1759-L1763 self.cpp_info.set_property("cmake_file_name", "onnxruntime") diff --git a/recipes/onnxruntime/all/patches/1.14.1-0001-cmake-dependencies.patch b/recipes/onnxruntime/all/patches/1.14.1-0001-cmake-dependencies.patch index 4af8aa88fe662..f2d83eacd7844 100644 --- a/recipes/onnxruntime/all/patches/1.14.1-0001-cmake-dependencies.patch +++ b/recipes/onnxruntime/all/patches/1.14.1-0001-cmake-dependencies.patch @@ -1,72 +1,3 @@ ---- a/cmake/CMakeLists.txt -+++ b/cmake/CMakeLists.txt -@@ -753,7 +753,7 @@ endif() - - function(onnxruntime_set_compile_flags target_name) - if (CPUINFO_SUPPORTED) -- onnxruntime_add_include_to_target(${target_name} cpuinfo) -+ onnxruntime_add_include_to_target(${target_name} cpuinfo::cpuinfo) - endif() - if(onnxruntime_ENABLE_EAGER_MODE) - target_compile_definitions(${target_name} PRIVATE ENABLE_EAGER_MODE) -@@ -837,7 +837,7 @@ function(onnxruntime_set_compile_flags target_name) - target_compile_options(${target_name} PRIVATE "-Wno-unused-parameter") - endif() - target_compile_definitions(${target_name} PUBLIC -DNSYNC_ATOMIC_CPP11) -- target_include_directories(${target_name} PRIVATE "${google_nsync_SOURCE_DIR}/public") -+ onnxruntime_add_include_to_target(${target_name} nsync::nsync_cpp) - endif() - foreach(ORT_FLAG ${ORT_PROVIDER_FLAGS}) - target_compile_definitions(${target_name} PRIVATE ${ORT_FLAG}) -@@ -1461,7 +1461,7 @@ if (WIN32) - list(APPEND onnxruntime_EXTERNAL_LIBRARIES ${SYS_PATH_LIB}) - list(APPEND onnxruntime_EXTERNAL_LIBRARIES debug Dbghelp) - else() -- list(APPEND onnxruntime_EXTERNAL_LIBRARIES nsync_cpp) -+ list(APPEND onnxruntime_EXTERNAL_LIBRARIES nsync::nsync_cpp) - list(APPEND onnxruntime_EXTERNAL_LIBRARIES ${CMAKE_DL_LIBS} Threads::Threads) - endif() - ---- a/cmake/external/onnxruntime_external_deps.cmake -+++ b/cmake/external/onnxruntime_external_deps.cmake -@@ -237,7 +237,10 @@ if (NOT WIN32) - #nsync tests failed on Mac Build - set(NSYNC_ENABLE_TESTS OFF CACHE BOOL "" FORCE) - onnxruntime_fetchcontent_makeavailable(google_nsync) -- set(nsync_SOURCE_DIR ${google_nsync_SOURCE_DIR}) -+ if(google_nsync_SOURCE_DIR) -+ add_library(nsync::nsync_cpp ALIAS nsync_cpp) -+ target_include_directories(nsync_cpp PUBLIC ${google_nsync_SOURCE_DIR}/public) -+ endif() - endif() - - if(onnxruntime_USE_CUDA) -@@ -361,6 +364,12 @@ FetchContent_Declare( - - if (CPUINFO_SUPPORTED) - onnxruntime_fetchcontent_makeavailable(pytorch_cpuinfo) -+ if(pytorch_cpuinfo_SOURCE_DIR) -+ # shouldn't need to define these aliases after we use a version of cpuinfo with this commit: -+ # https://github.com/pytorch/cpuinfo/commit/082deffc80ce517f81dc2f3aebe6ba671fcd09c9 -+ add_library(cpuinfo::cpuinfo ALIAS cpuinfo) -+ add_library(cpuinfo::clog ALIAS clog) -+ endif() - endif() - - ---- a/cmake/onnxruntime_common.cmake -+++ b/cmake/onnxruntime_common.cmake -@@ -194,8 +194,8 @@ if (ARM64 OR ARM OR X86 OR X64 OR X86_64) - # Using it mainly in ARM with Android. - # Its functionality in detecting x86 cpu features are lacking, so is support for Windows. - if (CPUINFO_SUPPORTED) -- onnxruntime_add_include_to_target(onnxruntime_common cpuinfo) -- list(APPEND onnxruntime_EXTERNAL_LIBRARIES cpuinfo clog) -+ onnxruntime_add_include_to_target(onnxruntime_common cpuinfo::cpuinfo) -+ list(APPEND onnxruntime_EXTERNAL_LIBRARIES cpuinfo::cpuinfo cpuinfo::clog) - endif() - endif() - endif() --- a/cmake/onnxruntime_flatbuffers.cmake +++ b/cmake/onnxruntime_flatbuffers.cmake @@ -9,7 +9,7 @@ file(GLOB onnxruntime_flatbuffers_srcs CONFIGURE_DEPENDS @@ -78,170 +9,3 @@ if(onnxruntime_ENABLE_INSTRUMENT) target_compile_definitions(onnxruntime_flatbuffers PUBLIC ONNXRUNTIME_ENABLE_INSTRUMENT) endif() ---- a/cmake/onnxruntime_providers.cmake -+++ b/cmake/onnxruntime_providers.cmake -@@ -539,10 +539,10 @@ if (onnxruntime_USE_CUDA) - - if(APPLE) - set_property(TARGET onnxruntime_providers_cuda APPEND_STRING PROPERTY LINK_FLAGS "-Xlinker -exported_symbols_list ${ONNXRUNTIME_ROOT}/core/providers/cuda/exported_symbols.lst") -- target_link_libraries(onnxruntime_providers_cuda PRIVATE nsync_cpp) -+ target_link_libraries(onnxruntime_providers_cuda PRIVATE nsync::nsync_cpp) - elseif(UNIX) - set_property(TARGET onnxruntime_providers_cuda APPEND_STRING PROPERTY LINK_FLAGS "-Xlinker --version-script=${ONNXRUNTIME_ROOT}/core/providers/cuda/version_script.lds -Xlinker --gc-sections") -- target_link_libraries(onnxruntime_providers_cuda PRIVATE nsync_cpp) -+ target_link_libraries(onnxruntime_providers_cuda PRIVATE nsync::nsync_cpp) - elseif(WIN32) - set_property(TARGET onnxruntime_providers_cuda APPEND_STRING PROPERTY LINK_FLAGS "-DEF:${ONNXRUNTIME_ROOT}/core/providers/cuda/symbols.def") - else() -@@ -595,10 +595,10 @@ if (onnxruntime_USE_DNNL) - INSTALL_RPATH "@loader_path" - BUILD_WITH_INSTALL_RPATH TRUE - INSTALL_RPATH_USE_LINK_PATH FALSE) -- target_link_libraries(onnxruntime_providers_dnnl PRIVATE nsync_cpp) -+ target_link_libraries(onnxruntime_providers_dnnl PRIVATE nsync::nsync_cpp) - elseif(UNIX) - set_property(TARGET onnxruntime_providers_dnnl APPEND_STRING PROPERTY LINK_FLAGS "-Xlinker --version-script=${ONNXRUNTIME_ROOT}/core/providers/dnnl/version_script.lds -Xlinker --gc-sections -Xlinker -rpath=\$ORIGIN") -- target_link_libraries(onnxruntime_providers_dnnl PRIVATE nsync_cpp) -+ target_link_libraries(onnxruntime_providers_dnnl PRIVATE nsync::nsync_cpp) - elseif(WIN32) - set_property(TARGET onnxruntime_providers_dnnl APPEND_STRING PROPERTY LINK_FLAGS "-DEF:${ONNXRUNTIME_ROOT}/core/providers/dnnl/symbols.def") - else() -@@ -728,11 +728,11 @@ if (onnxruntime_USE_TENSORRT) - - if(APPLE) - set_property(TARGET onnxruntime_providers_tensorrt APPEND_STRING PROPERTY LINK_FLAGS "-Xlinker -exported_symbols_list ${ONNXRUNTIME_ROOT}/core/providers/tensorrt/exported_symbols.lst") -- target_link_libraries(onnxruntime_providers_tensorrt PRIVATE nsync_cpp) -+ target_link_libraries(onnxruntime_providers_tensorrt PRIVATE nsync::nsync_cpp) - elseif(UNIX) - set_property(TARGET onnxruntime_providers_tensorrt APPEND_STRING PROPERTY COMPILE_FLAGS "-Wno-deprecated-declarations") - set_property(TARGET onnxruntime_providers_tensorrt APPEND_STRING PROPERTY LINK_FLAGS "-Xlinker --version-script=${ONNXRUNTIME_ROOT}/core/providers/tensorrt/version_script.lds -Xlinker --gc-sections") -- target_link_libraries(onnxruntime_providers_tensorrt PRIVATE nsync_cpp stdc++fs) -+ target_link_libraries(onnxruntime_providers_tensorrt PRIVATE nsync::nsync_cpp stdc++fs) - elseif(WIN32) - set_property(TARGET onnxruntime_providers_tensorrt APPEND_STRING PROPERTY LINK_FLAGS "-DEF:${ONNXRUNTIME_ROOT}/core/providers/tensorrt/symbols.def") - else() -@@ -1224,7 +1224,7 @@ if (onnxruntime_USE_MIGRAPHX) - target_compile_options(onnxruntime_providers_migraphx PRIVATE -Wno-error=sign-compare) - set_property(TARGET onnxruntime_providers_migraphx APPEND_STRING PROPERTY COMPILE_FLAGS "-Wno-deprecated-declarations") - set_property(TARGET onnxruntime_providers_migraphx APPEND_STRING PROPERTY LINK_FLAGS "-Xlinker --version-script=${ONNXRUNTIME_ROOT}/core/providers/migraphx/version_script.lds -Xlinker --gc-sections") -- target_link_libraries(onnxruntime_providers_migraphx PRIVATE nsync_cpp stdc++fs) -+ target_link_libraries(onnxruntime_providers_migraphx PRIVATE nsync::nsync_cpp stdc++fs) - - include(CheckLibraryExists) - check_library_exists(migraphx::c "migraphx_program_run_async" "/opt/rocm/migraphx/lib" HAS_STREAM_SYNC) -@@ -1461,7 +1461,7 @@ if (onnxruntime_USE_ROCM) - - if(UNIX) - set_property(TARGET onnxruntime_providers_rocm APPEND_STRING PROPERTY LINK_FLAGS "-Xlinker --version-script=${ONNXRUNTIME_ROOT}/core/providers/rocm/version_script.lds -Xlinker --gc-sections") -- target_link_libraries(onnxruntime_providers_rocm PRIVATE nsync_cpp) -+ target_link_libraries(onnxruntime_providers_rocm PRIVATE nsync::nsync_cpp) - else() - message(FATAL_ERROR "onnxruntime_providers_rocm unknown platform, need to specify shared library exports for it") - endif() -@@ -1597,7 +1597,7 @@ if (onnxruntime_USE_CANN) - onnxruntime_add_include_to_target(onnxruntime_providers_cann onnxruntime_common onnxruntime_framework onnx onnx_proto ${PROTOBUF_LIB} flatbuffers::flatbuffers Boost::mp11 safeint_interface) - - add_dependencies(onnxruntime_providers_cann onnxruntime_providers_shared ${onnxruntime_EXTERNAL_DEPENDENCIES}) -- target_link_libraries(onnxruntime_providers_cann PRIVATE ascendcl acl_op_compiler fmk_onnx_parser nsync_cpp ${ABSEIL_LIBS} ${ONNXRUNTIME_PROVIDERS_SHARED}) -+ target_link_libraries(onnxruntime_providers_cann PRIVATE ascendcl acl_op_compiler fmk_onnx_parser nsync::nsync_cpp ${ABSEIL_LIBS} ${ONNXRUNTIME_PROVIDERS_SHARED}) - target_link_directories(onnxruntime_providers_cann PRIVATE ${onnxruntime_CANN_HOME}/lib64) - target_include_directories(onnxruntime_providers_cann PRIVATE ${ONNXRUNTIME_ROOT} ${CMAKE_CURRENT_BINARY_DIR} ${eigen_INCLUDE_DIRS} ${onnxruntime_CANN_HOME} ${onnxruntime_CANN_HOME}/include) - -@@ -1619,7 +1619,7 @@ if (onnxruntime_USE_AZURE) - source_group(TREE ${ONNXRUNTIME_ROOT}/core FILES ${onnxruntime_providers_azure_src}) - onnxruntime_add_static_library(onnxruntime_providers_azure ${onnxruntime_providers_azure_src}) - add_dependencies(onnxruntime_providers_azure ${onnxruntime_EXTERNAL_DEPENDENCIES}) -- onnxruntime_add_include_to_target(onnxruntime_providers_azure onnxruntime_common onnxruntime_framework onnx onnx_proto ${PROTOBUF_LIB} flatbuffers Boost::mp11) -+ onnxruntime_add_include_to_target(onnxruntime_providers_azure onnxruntime_common onnxruntime_framework onnx onnx_proto ${PROTOBUF_LIB} flatbuffers::flatbuffers Boost::mp11) - target_link_libraries(onnxruntime_providers_azure PRIVATE onnx onnxruntime_common onnxruntime_framework) - set_target_properties(onnxruntime_providers_azure PROPERTIES FOLDER "ONNXRuntime") - set_target_properties(onnxruntime_providers_azure PROPERTIES LINKER_LANGUAGE CXX) ---- a/cmake/onnxruntime_unittests.cmake -+++ b/cmake/onnxruntime_unittests.cmake -@@ -631,8 +631,8 @@ if(MSVC) - "$<$>:/wd6326>") - else() - target_compile_definitions(onnxruntime_test_utils PUBLIC -DNSYNC_ATOMIC_CPP11) -- target_include_directories(onnxruntime_test_utils PRIVATE ${CMAKE_CURRENT_BINARY_DIR} ${ONNXRUNTIME_ROOT} -- ${nsync_SOURCE_DIR}/public) -+ target_include_directories(onnxruntime_test_utils PRIVATE ${CMAKE_CURRENT_BINARY_DIR} ${ONNXRUNTIME_ROOT}) -+ onnxruntime_add_include_to_target(onnxruntime_test_utils nsync::nsync_cpp) - endif() - if (onnxruntime_USE_NCCL) - target_include_directories(onnxruntime_test_utils PRIVATE ${NCCL_INCLUDE_DIRS}) -@@ -665,8 +665,8 @@ if(MSVC) - "$<$>:/utf-8>") - else() - target_compile_definitions(onnx_test_runner_common PUBLIC -DNSYNC_ATOMIC_CPP11) -- target_include_directories(onnx_test_runner_common PRIVATE ${CMAKE_CURRENT_BINARY_DIR} ${ONNXRUNTIME_ROOT} -- ${nsync_SOURCE_DIR}/public) -+ target_include_directories(onnx_test_runner_common PRIVATE ${CMAKE_CURRENT_BINARY_DIR} ${ONNXRUNTIME_ROOT}) -+ onnxruntime_add_include_to_target(onnx_test_runner_common nsync::nsync_cpp) - endif() - if (MSVC AND NOT CMAKE_SIZEOF_VOID_P EQUAL 8) - #TODO: fix the warnings, they are dangerous -@@ -995,7 +995,7 @@ if (NOT onnxruntime_ENABLE_TRAINING_TORCH_INTEROP) - # "Global initializer calls a non-constexpr function." BENCHMARK_CAPTURE macro needs this. - target_compile_options(onnxruntime_mlas_benchmark PRIVATE /wd26426) - else() -- target_link_libraries(onnxruntime_mlas_benchmark PRIVATE nsync_cpp ${CMAKE_DL_LIBS}) -+ target_link_libraries(onnxruntime_mlas_benchmark PRIVATE nsync::nsync_cpp ${CMAKE_DL_LIBS}) - endif() - if (CPUINFO_SUPPORTED AND NOT onnxruntime_BUILD_WEBASSEMBLY) - target_link_libraries(onnxruntime_mlas_benchmark PRIVATE cpuinfo) -@@ -1053,7 +1053,7 @@ if(onnxruntime_ENABLE_EAGER_MODE) - list(APPEND onnxruntime_eager_mode_libs onnxruntime_training tensorboard) - endif() - IF(NOT WIN32) -- list(APPEND onnxruntime_eager_mode_libs nsync_cpp) -+ list(APPEND onnxruntime_eager_mode_libs nsync::nsync_cpp) - endif() - target_link_libraries(onnxruntime_eager_mode_test PRIVATE ${onnxruntime_eager_mode_libs} Threads::Threads ${onnxruntime_EXTERNAL_LIBRARIES}) - if (onnxruntime_ENABLE_TRAINING_TORCH_INTEROP) -@@ -1113,7 +1113,7 @@ if (NOT onnxruntime_ENABLE_TRAINING_TORCH_INTEROP) - ${onnxruntime_EXTERNAL_LIBRARIES} - ${GETOPT_LIB_WIDE} ${SYS_PATH_LIB} ${CMAKE_DL_LIBS}) - if(NOT WIN32) -- list(APPEND onnxruntime_perf_test_libs nsync_cpp) -+ list(APPEND onnxruntime_perf_test_libs nsync::nsync_cpp) - if(onnxruntime_USE_SNPE) - list(APPEND onnxruntime_perf_test_libs onnxruntime_providers_snpe) - endif() -@@ -1157,7 +1157,7 @@ if (NOT onnxruntime_ENABLE_TRAINING_TORCH_INTEROP) - # test inference using shared lib - set(onnxruntime_shared_lib_test_LIBS onnxruntime_mocked_allocator onnxruntime_test_utils onnxruntime_common onnx_proto) - if(NOT WIN32) -- list(APPEND onnxruntime_shared_lib_test_LIBS nsync_cpp) -+ list(APPEND onnxruntime_shared_lib_test_LIBS nsync::nsync_cpp) - if(onnxruntime_USE_SNPE) - list(APPEND onnxruntime_shared_lib_test_LIBS onnxruntime_providers_snpe) - endif() -@@ -1279,7 +1279,7 @@ if (NOT onnxruntime_ENABLE_TRAINING_TORCH_INTEROP) - target_link_libraries(onnxruntime_mlas_test PRIVATE cpuinfo) - endif() - if(NOT WIN32) -- target_link_libraries(onnxruntime_mlas_test PRIVATE nsync_cpp ${CMAKE_DL_LIBS}) -+ target_link_libraries(onnxruntime_mlas_test PRIVATE nsync::nsync_cpp ${CMAKE_DL_LIBS}) - endif() - if (CMAKE_SYSTEM_NAME STREQUAL "Android") - target_link_libraries(onnxruntime_mlas_test PRIVATE ${android_shared_libs}) ---- a/cmake/onnxruntime_webassembly.cmake -+++ b/cmake/onnxruntime_webassembly.cmake -@@ -97,7 +97,7 @@ target_compile_options(onnx PRIVATE -Wno-unused-parameter -Wno-unused-variable) - - if (onnxruntime_BUILD_WEBASSEMBLY_STATIC_LIB) - bundle_static_library(onnxruntime_webassembly -- nsync_cpp -+ nsync::nsync_cpp - ${PROTOBUF_LIB} - onnx - onnx_proto -@@ -172,7 +172,7 @@ else() - endif() - - target_link_libraries(onnxruntime_webassembly PRIVATE -- nsync_cpp -+ nsync::nsync_cpp - ${PROTOBUF_LIB} - onnx - onnx_proto diff --git a/recipes/onnxruntime/all/patches/1.14.1-0002-cmake-dependencies.patch b/recipes/onnxruntime/all/patches/1.14.1-0002-cmake-dependencies.patch deleted file mode 100644 index 6dbbfc4af9df4..0000000000000 --- a/recipes/onnxruntime/all/patches/1.14.1-0002-cmake-dependencies.patch +++ /dev/null @@ -1,166 +0,0 @@ -diff --git a/cmake/external/abseil-cpp.cmake b/cmake/external/abseil-cpp.cmake -index 54d2f9c5c1..3195ef15a0 100644 ---- a/cmake/external/abseil-cpp.cmake -+++ b/cmake/external/abseil-cpp.cmake -@@ -22,6 +22,7 @@ FetchContent_Declare( - URL ${DEP_URL_abseil_cpp} - URL_HASH SHA1=${DEP_SHA1_abseil_cpp} - PATCH_COMMAND ${ABSL_PATCH_COMMAND} -+ FIND_PACKAGE_ARGS REQUIRED CONFIG NAMES absl - ) - - onnxruntime_fetchcontent_makeavailable(abseil_cpp) -diff --git a/cmake/external/eigen.cmake b/cmake/external/eigen.cmake -index 266dd534af..3c7cb77891 100644 ---- a/cmake/external/eigen.cmake -+++ b/cmake/external/eigen.cmake -@@ -14,8 +14,11 @@ else () - FetchContent_Declare( - eigen - URL https://gitlab.com/libeigen/eigen/-/archive/d10b27fe37736d2944630ecd7557cefa95cf87c9/eigen-d10b27fe37736d2944630ecd7557cefa95cf87c9.zip -+ FIND_PACKAGE_ARGS REQUIRED CONFIG NAMES Eigen3 - ) - endif() -- FetchContent_Populate(eigen) -- set(eigen_INCLUDE_DIRS "${eigen_SOURCE_DIR}") -+ # FetchContent_Populate(eigen) -+ # set(eigen_INCLUDE_DIRS "${eigen_SOURCE_DIR}") -+ onnxruntime_fetchcontent_makeavailable(eigen) -+ get_target_property(eigen_INCLUDE_DIRS Eigen3::Eigen INTERFACE_INCLUDE_DIRECTORIES) - endif() -diff --git a/cmake/external/onnxruntime_external_deps.cmake b/cmake/external/onnxruntime_external_deps.cmake -index f85336e8bb..b051ff0be1 100644 ---- a/cmake/external/onnxruntime_external_deps.cmake -+++ b/cmake/external/onnxruntime_external_deps.cmake -@@ -97,7 +97,7 @@ FetchContent_Declare( - flatbuffers - URL ${DEP_URL_flatbuffers} - URL_HASH SHA1=${DEP_SHA1_flatbuffers} -- FIND_PACKAGE_ARGS 1.12.0...<2.0.0 NAMES Flatbuffers -+ FIND_PACKAGE_ARGS NAMES flatbuffers - ) - - #Here we support two build mode: -@@ -136,6 +136,7 @@ FetchContent_Declare( - date - URL ${DEP_URL_date} - URL_HASH SHA1=${DEP_SHA1_date} -+ FIND_PACKAGE_ARGS NAMES date - ) - onnxruntime_fetchcontent_makeavailable(date) - -@@ -145,6 +146,7 @@ FetchContent_Declare( - mp11 - URL ${DEP_URL_mp11} - URL_HASH SHA1=${DEP_SHA1_mp11} -+ FIND_PACKAGE_ARGS NAMES Boost - ) - - set(JSON_BuildTests OFF CACHE INTERNAL "") -@@ -263,6 +265,7 @@ FetchContent_Declare( - safeint - URL ${DEP_URL_safeint} - URL_HASH SHA1=${DEP_SHA1_safeint} -+ FIND_PACKAGE_ARGS NAMES safeint - ) - - # The next line will generate an error message "fatal: not a git repository", but it is ok. It is from flatbuffers -@@ -359,6 +362,7 @@ FetchContent_Declare( - URL ${DEP_URL_onnx} - URL_HASH SHA1=${DEP_SHA1_onnx} - PATCH_COMMAND ${ONNXRUNTIME_ONNX_PATCH_COMMAND} -+ FIND_PACKAGE_ARGS NAMES onnx ONNX - ) - - -@@ -386,8 +390,6 @@ endif() - set(GSL_TARGET "Microsoft.GSL::GSL") - set(GSL_INCLUDE_DIR "$") - --add_library(safeint_interface INTERFACE) --target_include_directories(safeint_interface INTERFACE ${safeint_SOURCE_DIR}) - - # XNNPACK EP - if (onnxruntime_USE_XNNPACK) -@@ -416,9 +418,9 @@ set(onnxruntime_EXTERNAL_LIBRARIES ${onnxruntime_EXTERNAL_LIBRARIES_XNNPACK} WIL - # The other libs do not have the problem. All the sources are already there. We can compile them in any order. - set(onnxruntime_EXTERNAL_DEPENDENCIES onnx_proto flatbuffers::flatbuffers) - --target_compile_definitions(onnx PUBLIC $ PRIVATE "__ONNX_DISABLE_STATIC_REGISTRATION") -+# target_compile_definitions(onnx PUBLIC $ PRIVATE "__ONNX_DISABLE_STATIC_REGISTRATION") - if (NOT onnxruntime_USE_FULL_PROTOBUF) -- target_compile_definitions(onnx PUBLIC "__ONNX_NO_DOC_STRINGS") -+ # target_compile_definitions(onnx PUBLIC "__ONNX_NO_DOC_STRINGS") - endif() - - if (onnxruntime_RUN_ONNX_TESTS) -diff --git a/cmake/external/wil.cmake b/cmake/external/wil.cmake -index d38535c4a1..8b181871f9 100644 ---- a/cmake/external/wil.cmake -+++ b/cmake/external/wil.cmake -@@ -11,12 +11,18 @@ FetchContent_Declare( - ) - #We can not use FetchContent_MakeAvailable(microsoft_wil) at here, since their cmake file - #always executes install command without conditions. --FetchContent_Populate(microsoft_wil) --if(NOT wil_FOUND) -+#FetchContent_Populate(microsoft_wil) -+#if(NOT wil_FOUND) -+# add_library(WIL INTERFACE) -+# add_library(WIL::WIL ALIAS WIL) -+# -+# # The interface's include directory. -+# target_include_directories(WIL INTERFACE -+# $) -+#endif() -+if(WIN32) -+ FetchContent_MakeAvailable(microsoft_wil) -+else() - add_library(WIL INTERFACE) - add_library(WIL::WIL ALIAS WIL) -- -- # The interface's include directory. -- target_include_directories(WIL INTERFACE -- $) --endif() -\ No newline at end of file -+endif() -diff --git a/cmake/external/xnnpack.cmake b/cmake/external/xnnpack.cmake -index 1fc2c6ccdc..a2c28957f9 100644 ---- a/cmake/external/xnnpack.cmake -+++ b/cmake/external/xnnpack.cmake -@@ -25,12 +25,15 @@ set(FXDIV_SOURCE_DIR ${fxdiv_SOURCE_DIR}) - - FetchContent_Declare(pthreadpool URL ${DEP_URL_pthreadpool} URL_HASH SHA1=${DEP_SHA1_pthreadpool}) - onnxruntime_fetchcontent_makeavailable(pthreadpool) --FetchContent_Declare(googlexnnpack URL ${DEP_URL_googlexnnpack} URL_HASH SHA1=${DEP_SHA1_googlexnnpack} --PATCH_COMMAND ${Patch_EXECUTABLE} --binary --ignore-whitespace -p1 < ${PROJECT_SOURCE_DIR}/patches/xnnpack/AddEmscriptenAndIosSupport.patch) -+FetchContent_Declare( -+ googlexnnpack -+ URL ${DEP_URL_googlexnnpack} -+ URL_HASH SHA1=${DEP_SHA1_googlexnnpack} -+ PATCH_COMMAND ${Patch_EXECUTABLE} --binary --ignore-whitespace -p1 < ${PROJECT_SOURCE_DIR}/patches/xnnpack/AddEmscriptenAndIosSupport.patch -+ FIND_PACKAGE_ARGS NAMES xnnpack -+) - - onnxruntime_fetchcontent_makeavailable(googlexnnpack) --set(XNNPACK_DIR ${googlexnnpack_SOURCE_DIR}) --set(XNNPACK_INCLUDE_DIR ${XNNPACK_DIR}/include) - - set(onnxruntime_EXTERNAL_LIBRARIES_XNNPACK XNNPACK pthreadpool) - -diff --git a/cmake/onnxruntime_providers.cmake b/cmake/onnxruntime_providers.cmake -index 7a99bac233..bbf1955494 100644 ---- a/cmake/onnxruntime_providers.cmake -+++ b/cmake/onnxruntime_providers.cmake -@@ -1561,10 +1561,6 @@ if (onnxruntime_USE_XNNPACK) - add_dependencies(onnxruntime_providers_xnnpack onnx ${onnxruntime_EXTERNAL_DEPENDENCIES}) - set_target_properties(onnxruntime_providers_xnnpack PROPERTIES FOLDER "ONNXRuntime") - -- install(DIRECTORY ${ONNXRUNTIME_INCLUDE_DIR}/core/providers/xnnpack -- DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/onnxruntime/core/providers -- ) -- - set_target_properties(onnxruntime_providers_xnnpack PROPERTIES LINKER_LANGUAGE CXX) - - if (NOT onnxruntime_BUILD_SHARED_LIB) diff --git a/recipes/onnxruntime/all/patches/1.15.1-0001-cmake-dependencies.patch b/recipes/onnxruntime/all/patches/1.15.1-0001-cmake-dependencies.patch deleted file mode 100644 index 4ebc87b3a4ddc..0000000000000 --- a/recipes/onnxruntime/all/patches/1.15.1-0001-cmake-dependencies.patch +++ /dev/null @@ -1,150 +0,0 @@ -diff --git a/cmake/external/abseil-cpp.cmake b/cmake/external/abseil-cpp.cmake -index 54d2f9c5c1..3195ef15a0 100644 ---- a/cmake/external/abseil-cpp.cmake -+++ b/cmake/external/abseil-cpp.cmake -@@ -22,6 +22,7 @@ FetchContent_Declare( - URL ${DEP_URL_abseil_cpp} - URL_HASH SHA1=${DEP_SHA1_abseil_cpp} - PATCH_COMMAND ${ABSL_PATCH_COMMAND} -+ FIND_PACKAGE_ARGS REQUIRED CONFIG NAMES absl - ) - - onnxruntime_fetchcontent_makeavailable(abseil_cpp) -diff --git a/cmake/external/eigen.cmake b/cmake/external/eigen.cmake -index 266dd534af..12b1792862 100644 ---- a/cmake/external/eigen.cmake -+++ b/cmake/external/eigen.cmake -@@ -14,8 +14,9 @@ else () - FetchContent_Declare( - eigen - URL https://gitlab.com/libeigen/eigen/-/archive/d10b27fe37736d2944630ecd7557cefa95cf87c9/eigen-d10b27fe37736d2944630ecd7557cefa95cf87c9.zip -+ FIND_PACKAGE_ARGS REQUIRED CONFIG NAMES Eigen3 - ) - endif() -- FetchContent_Populate(eigen) -- set(eigen_INCLUDE_DIRS "${eigen_SOURCE_DIR}") -+ onnxruntime_fetchcontent_makeavailable(eigen) -+ get_target_property(eigen_INCLUDE_DIRS Eigen3::Eigen INTERFACE_INCLUDE_DIRECTORIES) - endif() -diff --git a/cmake/external/onnxruntime_external_deps.cmake b/cmake/external/onnxruntime_external_deps.cmake -index 9effd1a2db..a059c28e36 100644 ---- a/cmake/external/onnxruntime_external_deps.cmake -+++ b/cmake/external/onnxruntime_external_deps.cmake -@@ -173,6 +173,7 @@ FetchContent_Declare( - date - URL ${DEP_URL_date} - URL_HASH SHA1=${DEP_SHA1_date} -+ FIND_PACKAGE_ARGS NAMES date - ) - onnxruntime_fetchcontent_makeavailable(date) - -@@ -182,6 +183,7 @@ FetchContent_Declare( - mp11 - URL ${DEP_URL_mp11} - URL_HASH SHA1=${DEP_SHA1_mp11} -+ FIND_PACKAGE_ARGS NAMES Boost - ) - - set(JSON_BuildTests OFF CACHE INTERNAL "") -@@ -300,6 +302,7 @@ FetchContent_Declare( - safeint - URL ${DEP_URL_safeint} - URL_HASH SHA1=${DEP_SHA1_safeint} -+ FIND_PACKAGE_ARGS NAMES safeint - ) - - # The next line will generate an error message "fatal: not a git repository", but it is ok. It is from flatbuffers -@@ -396,6 +399,7 @@ FetchContent_Declare( - URL ${DEP_URL_onnx} - URL_HASH SHA1=${DEP_SHA1_onnx} - PATCH_COMMAND ${ONNXRUNTIME_ONNX_PATCH_COMMAND} -+ FIND_PACKAGE_ARGS NAMES onnx ONNX - ) - - -@@ -423,9 +427,6 @@ endif() - set(GSL_TARGET "Microsoft.GSL::GSL") - set(GSL_INCLUDE_DIR "$") - --add_library(safeint_interface INTERFACE) --target_include_directories(safeint_interface INTERFACE ${safeint_SOURCE_DIR}) -- - # XNNPACK EP - if (onnxruntime_USE_XNNPACK) - if (onnxruntime_DISABLE_CONTRIB_OPS) -@@ -453,9 +454,9 @@ set(onnxruntime_EXTERNAL_LIBRARIES ${onnxruntime_EXTERNAL_LIBRARIES_XNNPACK} WIL - # The other libs do not have the problem. All the sources are already there. We can compile them in any order. - set(onnxruntime_EXTERNAL_DEPENDENCIES onnx_proto flatbuffers::flatbuffers) - --target_compile_definitions(onnx PUBLIC $ PRIVATE "__ONNX_DISABLE_STATIC_REGISTRATION") -+# target_compile_definitions(onnx PUBLIC $ PRIVATE "__ONNX_DISABLE_STATIC_REGISTRATION") - if (NOT onnxruntime_USE_FULL_PROTOBUF) -- target_compile_definitions(onnx PUBLIC "__ONNX_NO_DOC_STRINGS") -+ # target_compile_definitions(onnx PUBLIC "__ONNX_NO_DOC_STRINGS") - endif() - - if (onnxruntime_RUN_ONNX_TESTS) -diff --git a/cmake/external/wil.cmake b/cmake/external/wil.cmake -index d38535c4a1..02d6dbd85d 100644 ---- a/cmake/external/wil.cmake -+++ b/cmake/external/wil.cmake -@@ -9,14 +9,10 @@ FetchContent_Declare( - URL_HASH SHA1=${DEP_SHA1_microsoft_wil} - FIND_PACKAGE_ARGS NAMES wil - ) --#We can not use FetchContent_MakeAvailable(microsoft_wil) at here, since their cmake file --#always executes install command without conditions. --FetchContent_Populate(microsoft_wil) --if(NOT wil_FOUND) -+ -+if(WIN32) -+ FetchContent_MakeAvailable(microsoft_wil) -+else() - add_library(WIL INTERFACE) - add_library(WIL::WIL ALIAS WIL) -- -- # The interface's include directory. -- target_include_directories(WIL INTERFACE -- $) --endif() -\ No newline at end of file -+endif() -diff --git a/cmake/external/xnnpack.cmake b/cmake/external/xnnpack.cmake -index 1fc2c6ccdc..a2c28957f9 100644 ---- a/cmake/external/xnnpack.cmake -+++ b/cmake/external/xnnpack.cmake -@@ -25,12 +25,15 @@ set(FXDIV_SOURCE_DIR ${fxdiv_SOURCE_DIR}) - - FetchContent_Declare(pthreadpool URL ${DEP_URL_pthreadpool} URL_HASH SHA1=${DEP_SHA1_pthreadpool}) - onnxruntime_fetchcontent_makeavailable(pthreadpool) --FetchContent_Declare(googlexnnpack URL ${DEP_URL_googlexnnpack} URL_HASH SHA1=${DEP_SHA1_googlexnnpack} --PATCH_COMMAND ${Patch_EXECUTABLE} --binary --ignore-whitespace -p1 < ${PROJECT_SOURCE_DIR}/patches/xnnpack/AddEmscriptenAndIosSupport.patch) -+FetchContent_Declare( -+ googlexnnpack -+ URL ${DEP_URL_googlexnnpack} -+ URL_HASH SHA1=${DEP_SHA1_googlexnnpack} -+ PATCH_COMMAND ${Patch_EXECUTABLE} --binary --ignore-whitespace -p1 < ${PROJECT_SOURCE_DIR}/patches/xnnpack/AddEmscriptenAndIosSupport.patch -+ FIND_PACKAGE_ARGS NAMES xnnpack -+) - - onnxruntime_fetchcontent_makeavailable(googlexnnpack) --set(XNNPACK_DIR ${googlexnnpack_SOURCE_DIR}) --set(XNNPACK_INCLUDE_DIR ${XNNPACK_DIR}/include) - - set(onnxruntime_EXTERNAL_LIBRARIES_XNNPACK XNNPACK pthreadpool) - -diff --git a/cmake/onnxruntime_providers.cmake b/cmake/onnxruntime_providers.cmake -index 0daa1b8a3d..1f25467a8c 100644 ---- a/cmake/onnxruntime_providers.cmake -+++ b/cmake/onnxruntime_providers.cmake -@@ -1711,10 +1711,6 @@ if (onnxruntime_USE_XNNPACK) - add_dependencies(onnxruntime_providers_xnnpack onnx ${onnxruntime_EXTERNAL_DEPENDENCIES}) - set_target_properties(onnxruntime_providers_xnnpack PROPERTIES FOLDER "ONNXRuntime") - -- install(DIRECTORY ${ONNXRUNTIME_INCLUDE_DIR}/core/providers/xnnpack -- DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/onnxruntime/core/providers -- ) -- - set_target_properties(onnxruntime_providers_xnnpack PROPERTIES LINKER_LANGUAGE CXX) - - if (NOT onnxruntime_BUILD_SHARED_LIB) diff --git a/recipes/onnxruntime/all/patches/1.15.1-0002-fix-attention-15983.patch b/recipes/onnxruntime/all/patches/1.15.1-0002-fix-attention-15983.patch new file mode 100644 index 0000000000000..512fe43577ad8 --- /dev/null +++ b/recipes/onnxruntime/all/patches/1.15.1-0002-fix-attention-15983.patch @@ -0,0 +1,11 @@ +--- a/onnxruntime/contrib_ops/cuda/bert/attention.cc ++++ b/onnxruntime/contrib_ops/cuda/bert/attention.cc +@@ -164,7 +164,7 @@ + has_memory_efficient_attention(sm, sizeof(T) == 2); + #else + constexpr bool use_memory_efficient_attention = false; +- ORT_UNUSED_VARIABLE(is_mask_1d_key_seq_len_start); ++ ORT_UNUSED_PARAMETER(is_mask_1d_key_seq_len_start); + #endif + + cublasHandle_t cublas = GetCublasHandle(context); diff --git a/recipes/onnxruntime/all/patches/1.16.0-0001-cmake-dependencies.patch b/recipes/onnxruntime/all/patches/1.16.0-0001-cmake-dependencies.patch deleted file mode 100644 index dacb2b9b27a86..0000000000000 --- a/recipes/onnxruntime/all/patches/1.16.0-0001-cmake-dependencies.patch +++ /dev/null @@ -1,129 +0,0 @@ -From a30759bc61768883302290d34efd6d0a5e09dc9f Mon Sep 17 00:00:00 2001 -From: mayeut -Date: Thu, 21 Sep 2023 23:20:46 +0200 -Subject: [PATCH] CMake: ensure conan dependencies are used - ---- - cmake/external/eigen.cmake | 5 +++-- - cmake/external/onnxruntime_external_deps.cmake | 15 ++++++++------- - cmake/external/xnnpack.cmake | 11 +++++++---- - cmake/onnxruntime_mlas.cmake | 2 +- - 4 files changed, 19 insertions(+), 14 deletions(-) - -diff --git a/cmake/external/eigen.cmake b/cmake/external/eigen.cmake -index c0f7ddc50e..a47de64cbd 100644 ---- a/cmake/external/eigen.cmake -+++ b/cmake/external/eigen.cmake -@@ -16,8 +16,9 @@ else () - eigen - URL ${DEP_URL_eigen} - URL_HASH SHA1=${DEP_SHA1_eigen} -+ FIND_PACKAGE_ARGS REQUIRED CONFIG NAMES Eigen3 - ) - endif() -- FetchContent_Populate(eigen) -- set(eigen_INCLUDE_DIRS "${eigen_SOURCE_DIR}") -+ onnxruntime_fetchcontent_makeavailable(eigen) -+ get_target_property(eigen_INCLUDE_DIRS Eigen3::Eigen INTERFACE_INCLUDE_DIRECTORIES) - endif() -diff --git a/cmake/external/onnxruntime_external_deps.cmake b/cmake/external/onnxruntime_external_deps.cmake -index 8e412c7847..0e2482d7de 100644 ---- a/cmake/external/onnxruntime_external_deps.cmake -+++ b/cmake/external/onnxruntime_external_deps.cmake -@@ -187,6 +187,7 @@ FetchContent_Declare( - date - URL ${DEP_URL_date} - URL_HASH SHA1=${DEP_SHA1_date} -+ FIND_PACKAGE_ARGS NAMES date - ) - onnxruntime_fetchcontent_makeavailable(date) - -@@ -196,6 +197,7 @@ FetchContent_Declare( - mp11 - URL ${DEP_URL_mp11} - URL_HASH SHA1=${DEP_SHA1_mp11} -+ FIND_PACKAGE_ARGS NAMES Boost - ) - - set(JSON_BuildTests OFF CACHE INTERNAL "") -@@ -314,6 +316,7 @@ FetchContent_Declare( - safeint - URL ${DEP_URL_safeint} - URL_HASH SHA1=${DEP_SHA1_safeint} -+ FIND_PACKAGE_ARGS NAMES safeint - ) - - # The next line will generate an error message "fatal: not a git repository", but it is ok. It is from flatbuffers -@@ -410,6 +413,7 @@ FetchContent_Declare( - URL ${DEP_URL_onnx} - URL_HASH SHA1=${DEP_SHA1_onnx} - PATCH_COMMAND ${ONNXRUNTIME_ONNX_PATCH_COMMAND} -+ FIND_PACKAGE_ARGS NAMES ONNX - ) - - -@@ -437,9 +441,6 @@ endif() - set(GSL_TARGET "Microsoft.GSL::GSL") - set(GSL_INCLUDE_DIR "$") - --add_library(safeint_interface INTERFACE) --target_include_directories(safeint_interface INTERFACE ${safeint_SOURCE_DIR}) -- - # XNNPACK EP - if (onnxruntime_USE_XNNPACK) - if (onnxruntime_DISABLE_CONTRIB_OPS) -@@ -467,10 +468,10 @@ set(onnxruntime_EXTERNAL_LIBRARIES ${onnxruntime_EXTERNAL_LIBRARIES_XNNPACK} ${W - # The other libs do not have the problem. All the sources are already there. We can compile them in any order. - set(onnxruntime_EXTERNAL_DEPENDENCIES onnx_proto flatbuffers::flatbuffers) - --target_compile_definitions(onnx PUBLIC $ PRIVATE "__ONNX_DISABLE_STATIC_REGISTRATION") --if (NOT onnxruntime_USE_FULL_PROTOBUF) -- target_compile_definitions(onnx PUBLIC "__ONNX_NO_DOC_STRINGS") --endif() -+# target_compile_definitions(onnx PUBLIC $ PRIVATE "__ONNX_DISABLE_STATIC_REGISTRATION") -+# if (NOT onnxruntime_USE_FULL_PROTOBUF) -+# target_compile_definitions(onnx PUBLIC "__ONNX_NO_DOC_STRINGS") -+# endif() - - if (onnxruntime_RUN_ONNX_TESTS) - add_definitions(-DORT_RUN_EXTERNAL_ONNX_TESTS) -diff --git a/cmake/external/xnnpack.cmake b/cmake/external/xnnpack.cmake -index 7455584f1a..85d8177f45 100644 ---- a/cmake/external/xnnpack.cmake -+++ b/cmake/external/xnnpack.cmake -@@ -25,12 +25,15 @@ set(FXDIV_SOURCE_DIR ${fxdiv_SOURCE_DIR}) - - FetchContent_Declare(pthreadpool URL ${DEP_URL_pthreadpool} URL_HASH SHA1=${DEP_SHA1_pthreadpool}) - onnxruntime_fetchcontent_makeavailable(pthreadpool) --FetchContent_Declare(googlexnnpack URL ${DEP_URL_googlexnnpack} URL_HASH SHA1=${DEP_SHA1_googlexnnpack} --PATCH_COMMAND ${Patch_EXECUTABLE} --binary --ignore-whitespace -p1 < ${PROJECT_SOURCE_DIR}/patches/xnnpack/AddEmscriptenAndIosSupport.patch) -+FetchContent_Declare( -+ googlexnnpack -+ URL ${DEP_URL_googlexnnpack} -+ URL_HASH SHA1=${DEP_SHA1_googlexnnpack} -+ PATCH_COMMAND ${Patch_EXECUTABLE} --binary --ignore-whitespace -p1 < ${PROJECT_SOURCE_DIR}/patches/xnnpack/AddEmscriptenAndIosSupport.patch -+ FIND_PACKAGE_ARGS NAMES xnnpack -+) - - onnxruntime_fetchcontent_makeavailable(googlexnnpack) --set(XNNPACK_DIR ${googlexnnpack_SOURCE_DIR}) --set(XNNPACK_INCLUDE_DIR ${XNNPACK_DIR}/include) - - set(onnxruntime_EXTERNAL_LIBRARIES_XNNPACK XNNPACK pthreadpool) - -diff --git a/cmake/onnxruntime_mlas.cmake b/cmake/onnxruntime_mlas.cmake -index e0ccc504d7..819ffba884 100644 ---- a/cmake/onnxruntime_mlas.cmake -+++ b/cmake/onnxruntime_mlas.cmake -@@ -609,7 +609,7 @@ if (NOT onnxruntime_ORT_MINIMAL_BUILD) - - target_link_libraries(onnxruntime_mlas_q4dq PRIVATE ${ONNXRUNTIME_MLAS_LIBS} onnxruntime_common) - if (CPUINFO_SUPPORTED AND NOT CMAKE_SYSTEM_NAME STREQUAL "Emscripten") -- target_link_libraries(onnxruntime_mlas_q4dq PRIVATE cpuinfo) -+ target_link_libraries(onnxruntime_mlas_q4dq PRIVATE cpuinfo::cpuinfo) - endif() - if(NOT WIN32) - target_link_libraries(onnxruntime_mlas_q4dq PRIVATE nsync::nsync_cpp ${CMAKE_DL_LIBS}) --- -2.39.2 (Apple Git-143) - diff --git a/recipes/onnxruntime/all/patches/1.17.3-0001-patch-macos-cpp20-date-compat.patch b/recipes/onnxruntime/all/patches/1.17.3-0001-patch-macos-cpp20-date-compat.patch new file mode 100644 index 0000000000000..4f206c34e7538 --- /dev/null +++ b/recipes/onnxruntime/all/patches/1.17.3-0001-patch-macos-cpp20-date-compat.patch @@ -0,0 +1,142 @@ +From 7303a90f4916dcf6f66236d40b8917344c27420a Mon Sep 17 00:00:00 2001 +From: Andrew Fantino <15876180+afantino951@users.noreply.github.com> +Date: Tue, 2 Apr 2024 22:10:25 -0700 +Subject: [PATCH] Fix build errors from date/date.h C++20 compatibility + (#20139) + +### Description +For C++ standards >= 20, use `std::chrono::operator<<` in place of +`date::operator<<` to fix ambiguous operator compile error. + +### Motivation and Context +The external dependency HowardHinnant/date has a conflict with +std::chrono for >=C++20. +Solves #20137 +--- + cmake/onnxruntime_common.cmake | 2 +- + include/onnxruntime/core/common/logging/logging.h | 11 +++++++++++ + onnxruntime/core/common/logging/sinks/ostream_sink.cc | 3 +-- + .../core/platform/apple/logging/apple_log_sink.mm | 2 +- + onnxruntime/test/common/logging/helpers.h | 3 +-- + onnxruntime/test/util/include/test/capturing_sink.h | 4 +--- + 6 files changed, 16 insertions(+), 9 deletions(-) + +diff --git a/cmake/onnxruntime_common.cmake b/cmake/onnxruntime_common.cmake +index fb56e3f3445d..69d8f5fa138c 100644 +--- a/cmake/onnxruntime_common.cmake ++++ b/cmake/onnxruntime_common.cmake +@@ -129,7 +129,7 @@ target_include_directories(onnxruntime_common + ${OPTIONAL_LITE_INCLUDE_DIR}) + + +-target_link_libraries(onnxruntime_common PUBLIC safeint_interface ${GSL_TARGET} ${ABSEIL_LIBS}) ++target_link_libraries(onnxruntime_common PUBLIC safeint_interface ${GSL_TARGET} ${ABSEIL_LIBS} date::date) + + add_dependencies(onnxruntime_common ${onnxruntime_EXTERNAL_DEPENDENCIES}) + +diff --git a/include/onnxruntime/core/common/logging/logging.h b/include/onnxruntime/core/common/logging/logging.h +index 2b9912ea7738..f62053a5e44a 100644 +--- a/include/onnxruntime/core/common/logging/logging.h ++++ b/include/onnxruntime/core/common/logging/logging.h +@@ -18,6 +18,8 @@ + + #include "core/common/logging/macros.h" + ++#include "date/date.h" ++ + /* + + Logging overview and expected usage: +@@ -56,6 +58,15 @@ namespace logging { + + using Timestamp = std::chrono::time_point; + ++// TODO: When other compilers support std::chrono::operator<<, update this. ++// TODO: Check support for other compilers' version before enable C++20 for other compilers. ++// Xcode added support for C++20's std::chrono::operator<< in SDK version 14.4. ++#if __cplusplus >= 202002L && __MAC_OS_X_VERSION_MAX_ALLOWED >= 140400L ++namespace timestamp_ns = std::chrono; ++#else ++namespace timestamp_ns = ::date; ++#endif ++ + #ifndef NDEBUG + ORT_ATTRIBUTE_UNUSED static bool vlog_enabled = true; // Set directly based on your needs. + #else +diff --git a/onnxruntime/core/common/logging/sinks/ostream_sink.cc b/onnxruntime/core/common/logging/sinks/ostream_sink.cc +index 0db3d8709d48..a120138d1d15 100644 +--- a/onnxruntime/core/common/logging/sinks/ostream_sink.cc ++++ b/onnxruntime/core/common/logging/sinks/ostream_sink.cc +@@ -2,7 +2,6 @@ + // Licensed under the MIT License. + + #include "core/common/logging/sinks/ostream_sink.h" +-#include "date/date.h" + + namespace onnxruntime { + namespace logging { +@@ -24,7 +23,7 @@ struct Color { + + void OStreamSink::SendImpl(const Timestamp& timestamp, const std::string& logger_id, const Capture& message) { + // operator for formatting of timestamp in ISO8601 format including microseconds +- using date::operator<<; ++ using timestamp_ns::operator<<; + + // Two options as there may be multiple calls attempting to write to the same sink at once: + // 1) Use mutex to synchronize access to the stream. +diff --git a/onnxruntime/core/platform/apple/logging/apple_log_sink.mm b/onnxruntime/core/platform/apple/logging/apple_log_sink.mm +index 8dbd8eecd0e7..78614ffd2819 100644 +--- a/onnxruntime/core/platform/apple/logging/apple_log_sink.mm ++++ b/onnxruntime/core/platform/apple/logging/apple_log_sink.mm +@@ -13,7 +13,7 @@ + namespace logging { + + void AppleLogSink::SendImpl(const Timestamp& timestamp, const std::string& logger_id, const Capture& message) { +- using date::operator<<; ++ using timestamp_ns::operator<<; + std::ostringstream msg; + msg << timestamp << " [" << message.SeverityPrefix() << ":" << message.Category() << ":" << logger_id << ", " + << message.Location().ToString() << "] " << message.Message(); +diff --git a/onnxruntime/test/common/logging/helpers.h b/onnxruntime/test/common/logging/helpers.h +index c8d027022850..7fd03b72e53a 100644 +--- a/onnxruntime/test/common/logging/helpers.h ++++ b/onnxruntime/test/common/logging/helpers.h +@@ -5,7 +5,6 @@ + + #include + +-#include "date/date.h" + #include "gmock/gmock.h" + #include "gtest/gtest.h" + +@@ -30,7 +29,7 @@ class MockSink : public ::onnxruntime::logging::ISink { + #endif + + ACTION(PrintArgs) { +- using date::operator<<; ++ using onnxruntime::logging::timestamp_ns::operator<<; + + // const Timestamp ×tamp, const std::string &logger_id, const Message &message + // arg0 arg1 arg2 +diff --git a/onnxruntime/test/util/include/test/capturing_sink.h b/onnxruntime/test/util/include/test/capturing_sink.h +index 39788947602d..7d978d1bd1e5 100644 +--- a/onnxruntime/test/util/include/test/capturing_sink.h ++++ b/onnxruntime/test/util/include/test/capturing_sink.h +@@ -6,8 +6,6 @@ + #include "core/common/logging/logging.h" + #include "core/common/logging/isink.h" + +-#include "date/date.h" +- + namespace onnxruntime { + namespace test { + +@@ -17,7 +15,7 @@ class CapturingSink : public logging::ISink { + public: + void SendImpl(const Timestamp& timestamp, const std::string& logger_id, const Capture& message) override { + // operator for formatting of timestamp in ISO8601 format including microseconds +- using date::operator<<; ++ using timestamp_ns::operator<<; + std::ostringstream msg; + + msg << timestamp << " [" << message.SeverityPrefix() << ":" << message.Category() << ":" << logger_id << ", " diff --git a/recipes/onnxruntime/all/patches/1.17.3-0002-missing-include.patch b/recipes/onnxruntime/all/patches/1.17.3-0002-missing-include.patch new file mode 100644 index 0000000000000..d3555681e4af9 --- /dev/null +++ b/recipes/onnxruntime/all/patches/1.17.3-0002-missing-include.patch @@ -0,0 +1,12 @@ +diff --git a/include/onnxruntime/core/graph/graph.h b/include/onnxruntime/core/graph/graph.h +index 22827d43b2..f9e5fd56d3 100644 +--- a/include/onnxruntime/core/graph/graph.h ++++ b/include/onnxruntime/core/graph/graph.h +@@ -6,6 +6,7 @@ + #include + #include + #include ++#include + #include + #include + #include diff --git a/recipes/onnxruntime/all/patches/1.17.3-0003-fix-cutlass-cuda-provider.patch b/recipes/onnxruntime/all/patches/1.17.3-0003-fix-cutlass-cuda-provider.patch new file mode 100644 index 0000000000000..8ea3d51071e51 --- /dev/null +++ b/recipes/onnxruntime/all/patches/1.17.3-0003-fix-cutlass-cuda-provider.patch @@ -0,0 +1,15 @@ +diff --git a/cmake/onnxruntime_providers_cuda.cmake b/cmake/onnxruntime_providers_cuda.cmake +index b5c3100865..129c4f19f6 100644 +--- a/cmake/onnxruntime_providers_cuda.cmake ++++ b/cmake/onnxruntime_providers_cuda.cmake +@@ -180,8 +180,8 @@ + target_link_libraries(${target} PRIVATE CUDA::cuda_driver) + endif() + +- include(cutlass) +- target_include_directories(${target} PRIVATE ${cutlass_SOURCE_DIR}/include ${cutlass_SOURCE_DIR}/examples) ++ find_package(NvidiaCutlass) ++ target_link_libraries(${target} PRIVATE nvidia::cutlass::cutlass) + + target_include_directories(${target} PRIVATE ${ONNXRUNTIME_ROOT} ${CMAKE_CURRENT_BINARY_DIR} ${eigen_INCLUDE_DIRS} ${TVM_INCLUDES} + PUBLIC ${CUDAToolkit_INCLUDE_DIRS}) diff --git a/recipes/onnxruntime/all/patches/1.18.0-0004-abseil-no-string-view.patch b/recipes/onnxruntime/all/patches/1.18.0-0004-abseil-no-string-view.patch new file mode 100644 index 0000000000000..329024e7245ef --- /dev/null +++ b/recipes/onnxruntime/all/patches/1.18.0-0004-abseil-no-string-view.patch @@ -0,0 +1,22 @@ +--- a/onnxruntime/core/framework/kernel_type_str_resolver.cc ++++ b/onnxruntime/core/framework/kernel_type_str_resolver.cc +@@ -46,7 +46,7 @@ + ORT_RETURN_IF(op_it == op_kernel_type_str_map_.end(), "Failed to find op_id: ", op_id); + const auto& type_str_map = op_it->second; + +-#ifdef DISABLE_ABSEIL ++#ifndef ABSL_USES_STD_STRING_VIEW + // TODO(edgchen1) maybe we can use transparent hash/eq to enable lookup with string_view + const auto type_str_it = type_str_map.find(std::string(kernel_type_str)); + #else +--- a/onnxruntime/core/framework/ort_value_name_idx_map.h ++++ b/onnxruntime/core/framework/ort_value_name_idx_map.h +@@ -33,7 +33,7 @@ class OrtValueNameIdxMap { + common::Status GetIdx(std::string_view name, int& idx) const { + idx = -1; + +-#ifdef DISABLE_ABSEIL ++#ifndef ABSL_USES_STD_STRING_VIEW + auto it = map_.find(std::string(name)); + #else + auto it = map_.find(name); diff --git a/recipes/onnxruntime/all/patches/1.18.1-0005-fix-cutlass-cuda-provider.patch b/recipes/onnxruntime/all/patches/1.18.1-0005-fix-cutlass-cuda-provider.patch new file mode 100644 index 0000000000000..3024bfb1f7bb6 --- /dev/null +++ b/recipes/onnxruntime/all/patches/1.18.1-0005-fix-cutlass-cuda-provider.patch @@ -0,0 +1,15 @@ +diff --git a/cmake/onnxruntime_providers_cuda.cmake b/cmake/onnxruntime_providers_cuda.cmake +index 1346a9ce96..f40661d4bd 100644 +--- a/cmake/onnxruntime_providers_cuda.cmake ++++ b/cmake/onnxruntime_providers_cuda.cmake +@@ -211,8 +211,8 @@ + target_link_libraries(${target} PRIVATE CUDA::cuda_driver) + endif() + +- include(cutlass) +- target_include_directories(${target} PRIVATE ${cutlass_SOURCE_DIR}/include ${cutlass_SOURCE_DIR}/examples ${cutlass_SOURCE_DIR}/tools/util/include) ++ find_package(NvidiaCutlass) ++ target_link_libraries(${target} PRIVATE nvidia::cutlass::cutlass) + + target_include_directories(${target} PRIVATE ${ONNXRUNTIME_ROOT} ${CMAKE_CURRENT_BINARY_DIR} ${eigen_INCLUDE_DIRS} ${TVM_INCLUDES} + PUBLIC ${CUDAToolkit_INCLUDE_DIRS}) diff --git a/recipes/onnxruntime/all/test_package/CMakeLists.txt b/recipes/onnxruntime/all/test_package/CMakeLists.txt index b5d8ccbfcd52c..483ebf5ead1ee 100644 --- a/recipes/onnxruntime/all/test_package/CMakeLists.txt +++ b/recipes/onnxruntime/all/test_package/CMakeLists.txt @@ -5,5 +5,8 @@ project(test_package CXX) find_package(onnxruntime REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) +if(WITH_CUDA) + target_compile_definitions(${PROJECT_NAME} PRIVATE WITH_CUDA) +endif() target_link_libraries(${PROJECT_NAME} PRIVATE onnxruntime::onnxruntime) target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) diff --git a/recipes/onnxruntime/all/test_package/conanfile.py b/recipes/onnxruntime/all/test_package/conanfile.py index 18016812d8c7e..17284808fb050 100644 --- a/recipes/onnxruntime/all/test_package/conanfile.py +++ b/recipes/onnxruntime/all/test_package/conanfile.py @@ -1,13 +1,14 @@ from conan import ConanFile from conan.tools.build import can_run -from conan.tools.cmake import cmake_layout, CMake +from conan.tools.cmake import cmake_layout, CMake, CMakeToolchain +from conan.tools.files import copy import os # It will become the standard on Conan 2.x class TestPackageConan(ConanFile): settings = "os", "arch", "compiler", "build_type" - generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + generators = "CMakeDeps", "VirtualRunEnv" test_type = "explicit" def requirements(self): @@ -15,6 +16,15 @@ def requirements(self): def layout(self): cmake_layout(self, src_folder=".") + + def generate(self): + tc = CMakeToolchain(self) + tc.cache_variables["WITH_CUDA"] = self.dependencies["onnxruntime"].options.with_cuda + tc.generate() + if self.settings.os == "Windows": + # on windows the system dll C:\WINDOWS\system32\onnxruntime.dll may be loaded instead even if the conan lib is first in the PATH, see https://learn.microsoft.com/en-us/windows/win32/dlls/dynamic-link-library-search-order + for bindir in self.dependencies[self.tested_reference_str].cpp_info.bindirs: + copy(self, "*.dll", bindir, os.path.join(self.build_folder, str(self.settings.build_type))) def build(self): cmake = CMake(self) @@ -23,5 +33,5 @@ def build(self): def test(self): if can_run(self): - bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") + bin_path = os.path.join(self.cpp.build.bindir, "test_package") self.run(bin_path, env="conanrun") diff --git a/recipes/onnxruntime/all/test_package/test_package.cpp b/recipes/onnxruntime/all/test_package/test_package.cpp index a9cc6b11cef74..09281241c4ad8 100644 --- a/recipes/onnxruntime/all/test_package/test_package.cpp +++ b/recipes/onnxruntime/all/test_package/test_package.cpp @@ -2,8 +2,22 @@ #include #include +#ifdef WITH_CUDA +#include +#endif + int main() { const auto& api = Ort::GetApi(); - std::cout << OrtGetApiBase()->GetVersionString() << std::endl; + std::cout << "Version: " << OrtGetApiBase()->GetVersionString() << std::endl; + std::cout << "Providers: " << std::endl; + for(const auto& provider: Ort::GetAvailableProviders()) + std::cout << provider << ", " << std::endl; + +#ifdef WITH_CUDA + Ort::SessionOptions session_options; + OrtSessionOptionsAppendExecutionProvider_CUDA(session_options, 1); + std::cout << "with cuda!" << std::endl; +#endif + return 0; } diff --git a/recipes/onnxruntime/all/test_v1_package/CMakeLists.txt b/recipes/onnxruntime/all/test_v1_package/CMakeLists.txt index 0d20897301b68..691d35acd08dc 100644 --- a/recipes/onnxruntime/all/test_v1_package/CMakeLists.txt +++ b/recipes/onnxruntime/all/test_v1_package/CMakeLists.txt @@ -4,5 +4,19 @@ project(test_package) include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) conan_basic_setup(TARGETS) -add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package - ${CMAKE_CURRENT_BINARY_DIR}/test_package) +find_package(onnxruntime REQUIRED CONFIG) +add_executable(${PROJECT_NAME} ${CMAKE_CURRENT_SOURCE_DIR}/../test_package/test_package.cpp) +if(WITH_CUDA) + target_compile_definitions(${PROJECT_NAME} PRIVATE WITH_CUDA) +endif() + +target_link_libraries(${PROJECT_NAME} PRIVATE onnxruntime::onnxruntime) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) + +if(WIN32 AND DEFINED CONAN_BIN_DIRS_ONNXRUNTIME AND EXISTS ${CONAN_BIN_DIRS_ONNXRUNTIME}) + add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD + COMMAND ${CMAKE_COMMAND} -E copy_directory + ${CONAN_BIN_DIRS_ONNXRUNTIME} + $ + ) +endif() diff --git a/recipes/onnxruntime/config.yml b/recipes/onnxruntime/config.yml index 7dfea6fd99cd4..497cb76cea1d7 100644 --- a/recipes/onnxruntime/config.yml +++ b/recipes/onnxruntime/config.yml @@ -1,11 +1,9 @@ versions: - "1.16.3": - folder: all - "1.16.2": + "1.18.1": folder: all - "1.16.1": + "1.17.3": folder: all - "1.16.0": + "1.16.3": folder: all "1.15.1": folder: all diff --git a/recipes/open62541/all/conandata.yml b/recipes/open62541/all/conandata.yml index 8fd6ed73c8578..6237b2ba7aa88 100644 --- a/recipes/open62541/all/conandata.yml +++ b/recipes/open62541/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.4.6": + url: "https://github.com/open62541/open62541/archive/v1.4.6.tar.gz" + sha256: "bc4ad185fec5c257e15fcb813b7fef9607b7aaa5d355de7b665e1f210556d38e" "1.3.9": url: "https://github.com/open62541/open62541/archive/v1.3.9.tar.gz" sha256: "71764d4a060cfa07eae7aaabd176da38b155ef01c63103513339699fd8026e2f" @@ -15,6 +18,13 @@ sources: url: "https://github.com/open62541/open62541/archive/v1.0.6.tar.gz" sha256: "299940025c14929533064abe0044d5805ea50d52b32d05ad9bc0e6996569c2a6" patches: + "1.4.6": + - patch_file: "patches/0001-disable-sanitizers-1_4_x.patch" + patch_description: "Disable static code analysis" + patch_type: "conan" + - patch_file: "patches/0004-include-iphlpapi.patch" + patch_description: "Include iphlpapi.h for SecureZeroMemory" + patch_type: "conan" "1.3.9": - patch_file: "patches/0001-disable-sanitizers-1_3_x.patch" patch_description: "Disable static code analysis" diff --git a/recipes/open62541/all/conanfile.py b/recipes/open62541/all/conanfile.py index 2321b74998973..5d0279142fa98 100644 --- a/recipes/open62541/all/conanfile.py +++ b/recipes/open62541/all/conanfile.py @@ -12,9 +12,6 @@ class Open62541Conan(ConanFile): name = "open62541" - license = ("MPL-2.0", "CC0-1.0") - homepage = "https://open62541.org/" - url = "https://github.com/conan-io/conan-center-index" description = "open62541 is an open source and free implementation of OPC UA " \ "(OPC Unified Architecture) written in the common subset of the " \ "C99 and C++98 languages. The library is usable with all major " \ @@ -23,6 +20,9 @@ class Open62541Conan(ConanFile): "into existing applications. open62541 library is platform independent. " \ "All platform-specific functionality is implemented via exchangeable " \ "plugins. Plugin implementations are provided for the major operating systems." + license = ("MPL-2.0", "CC0-1.0") + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://open62541.org/" topics = ( "opc ua", "sdk", "server/client", "c", "iec-62541", "industrial automation", "tsn", "time sensitive networks", "publish-subscirbe", "pubsub" @@ -161,11 +161,6 @@ def configure(self): self.settings.rm_safe("compiler.libcxx") self.settings.rm_safe("compiler.cppstd") - # Due to https://github.com/open62541/open62541/issues/4687 we cannot build with 1.2.2 + Windows + shared - if Version(self.version) >= "1.2.2" and self.settings.os == "Windows" and self.options.shared: - raise ConanInvalidConfiguration( - f"{self.ref} doesn't properly support shared lib on Windows") - if self.options.subscription == "With Events": # Deprecated in 1.2.2 self.output.warning( @@ -229,17 +224,20 @@ def validate(self): raise ConanInvalidConfiguration( "PubSub over Ethernet is not supported for your OS!") + # Due to https://github.com/open62541/open62541/issues/4687 we cannot build with 1.2.2 + Windows + shared + if Version(self.version) >= "1.2.2" and self.settings.os == "Windows" and self.options.shared: + raise ConanInvalidConfiguration( + f"{self.ref} doesn't properly support shared lib on Windows") + if self.options.web_socket: if self.options["libwebsockets"].with_ssl != self.options.encryption: raise ConanInvalidConfiguration( "When web_socket is enabled, libwebsockets:with_ssl must have the value of open62541:encryption") def source(self): - get(self, **self.conan_data["sources"][self.version], - destination=self.source_folder, strip_root=True) + get(self, **self.conan_data["sources"][self.version], strip_root=True) - submodule_filename = os.path.join( - self.recipe_folder, 'submoduledata.yml') + submodule_filename = os.path.join(self.recipe_folder, 'submoduledata.yml') with open(submodule_filename, 'r') as submodule_stream: submodules_data = yaml.safe_load(submodule_stream) for path, submodule in submodules_data["submodules"][self.version].items(): @@ -327,6 +325,7 @@ def generate(self): tc.variables["UA_ENABLE_ENCRYPTION_OPENSSL"] = True tc.variables["UA_ENABLE_JSON_ENCODING"] = self.options.json_support + tc.variables["UA_ENABLE_PUBSUB_INFORMATIONMODEL"] = self.options.pub_sub != False tc.variables["UA_ENABLE_PUBSUB"] = self.options.pub_sub != False tc.variables["UA_ENABLE_PUBSUB_ENCRYPTION"] = self.options.pub_sub_encryption != False @@ -431,15 +430,18 @@ def package_info(self): else: self.cpp_info.includedirs.append( os.path.join("include", "open62541", "plugin")) - if self.settings.os == "Windows": - self.cpp_info.includedirs.append( - os.path.join("include", "open62541", "win32")) - else: - self.cpp_info.includedirs.append( - os.path.join("include", "open62541", "posix")) + if Version(self.version) < "1.4.0": + if self.settings.os == "Windows": + self.cpp_info.includedirs.append( + os.path.join("include", "open62541", "win32")) + else: + self.cpp_info.includedirs.append( + os.path.join("include", "open62541", "posix")) if self.settings.os == "Windows": self.cpp_info.system_libs.append("ws2_32") + if Version(self.version) >= "1.4.6": + self.cpp_info.system_libs.append("iphlpapi") elif self.settings.os in ("Linux", "FreeBSD"): self.cpp_info.system_libs.extend(["pthread", "m", "rt"]) @@ -451,4 +453,3 @@ def package_info(self): self._module_file_rel_path] self.cpp_info.set_property("cmake_build_modules", [ self._module_file_rel_path]) - diff --git a/recipes/open62541/all/patches/0001-disable-sanitizers-1_4_x.patch b/recipes/open62541/all/patches/0001-disable-sanitizers-1_4_x.patch new file mode 100644 index 0000000000000..841418b28bf86 --- /dev/null +++ b/recipes/open62541/all/patches/0001-disable-sanitizers-1_4_x.patch @@ -0,0 +1,35 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index c18a457..951efe4 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -666,18 +666,18 @@ if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID STREQUAL "Clang") + set(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "") # cmake sets -rdynamic by default + + # Debug +- if(UA_ENABLE_DEBUG_SANITIZER AND BUILD_TYPE_LOWER_CASE STREQUAL "debug" AND UNIX AND NOT UA_BUILD_OSS_FUZZ AND +- CMAKE_C_COMPILER_ID STREQUAL "Clang" AND NOT UA_ENABLE_UNIT_TESTS_MEMCHECK) +- # Add default sanitizer settings when using clang and Debug build. +- # This allows e.g. CLion to find memory locations for SegFaults +- message(STATUS "Sanitizer enabled") +- set(SANITIZER_FLAGS "-g -fno-omit-frame-pointer -gline-tables-only -fsanitize=address -fsanitize-address-use-after-scope -fsanitize=leak -fsanitize=undefined") +- if(CMAKE_CXX_COMPILER_VERSION AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 10.0) +- set(SANITIZER_FLAGS "${SANITIZER_FLAGS} -fsanitize-coverage=trace-pc-guard") +- endif() +- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${SANITIZER_FLAGS}") +- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${SANITIZER_FLAGS}") +- endif() ++ # if(UA_ENABLE_DEBUG_SANITIZER AND BUILD_TYPE_LOWER_CASE STREQUAL "debug" AND UNIX AND NOT UA_BUILD_OSS_FUZZ AND ++ # CMAKE_C_COMPILER_ID STREQUAL "Clang" AND NOT UA_ENABLE_UNIT_TESTS_MEMCHECK) ++ # # Add default sanitizer settings when using clang and Debug build. ++ # # This allows e.g. CLion to find memory locations for SegFaults ++ # message(STATUS "Sanitizer enabled") ++ # set(SANITIZER_FLAGS "-g -fno-omit-frame-pointer -gline-tables-only -fsanitize=address -fsanitize-address-use-after-scope -fsanitize=leak -fsanitize=undefined") ++ # if(CMAKE_CXX_COMPILER_VERSION AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 10.0) ++ # set(SANITIZER_FLAGS "${SANITIZER_FLAGS} -fsanitize-coverage=trace-pc-guard") ++ # endif() ++ # set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${SANITIZER_FLAGS}") ++ # set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${SANITIZER_FLAGS}") ++ # endif() + + if(NOT MINGW AND UA_ENABLE_HARDENING AND ((CMAKE_BUILD_TYPE STREQUAL "Release") OR (CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo"))) + check_add_cc_flag("-D_FORTIFY_SOURCE=2") # run-time buffer overflow detection (needs at least -O1) diff --git a/recipes/open62541/all/patches/0004-include-iphlpapi.patch b/recipes/open62541/all/patches/0004-include-iphlpapi.patch new file mode 100644 index 0000000000000..4af83a9e4709b --- /dev/null +++ b/recipes/open62541/all/patches/0004-include-iphlpapi.patch @@ -0,0 +1,15 @@ +diff --git a/src/ua_util.c b/src/ua_util.c +index 13eb0fb..d832f0a 100644 +--- a/src/ua_util.c ++++ b/src/ua_util.c +@@ -11,6 +11,10 @@ + * unit for the generated code from UA_INLINABLE definitions. */ + #define UA_INLINABLE_IMPL 1 + ++#if defined(_WIN32) ++# include ++# include ++#endif + #include + #include + diff --git a/recipes/open62541/all/submoduledata.yml b/recipes/open62541/all/submoduledata.yml index f60651d6c51ea..ec323bcad9aa0 100644 --- a/recipes/open62541/all/submoduledata.yml +++ b/recipes/open62541/all/submoduledata.yml @@ -1,26 +1,31 @@ submodules: - "1.0.6": + "1.4.6": deps/ua-nodeset: - sha256: c9c0228ce640bf4eead31b9c0b5b7190bc197a2d393a8e90328d14cb45805637 - url: https://github.com/OPCFoundation/UA-Nodeset/archive/UA-1.04.8-2020-11-20.zip + url: "https://github.com/OPCFoundation/UA-Nodeset/archive/Machinery-1.03.0-2023-08-01.zip" + sha256: "b1677e7114004f44103159ae7a2fb220958e6f645177c9d140f6acfe469b8eb8" archive_pattern: "UA-Nodeset-{version}" - "1.1.6": + "1.3.9": + deps/ua-nodeset: + url: "https://github.com/OPCFoundation/UA-Nodeset/archive/Glass=1.0.0-2022-01-01.zip" + sha256: "032c93e3f7c335bbb2d2d699804a804c9cdce2a2ecc3fe7cde552f2130982c26" + archive_pattern: "UA-Nodeset-{version}" + "1.3.8": deps/ua-nodeset: - sha256: a2bcc1cda0154091ecbed25b8c40436c5b75d11bb38df28b35a2ceedb331d562 - url: https://github.com/OPCFoundation/UA-Nodeset/archive/Errata-1.04.5.zip + url: "https://github.com/OPCFoundation/UA-Nodeset/archive/Glass=1.0.0-2022-01-01.zip" + sha256: "032c93e3f7c335bbb2d2d699804a804c9cdce2a2ecc3fe7cde552f2130982c26" archive_pattern: "UA-Nodeset-{version}" "1.2.6": deps/ua-nodeset: - sha256: a2bcc1cda0154091ecbed25b8c40436c5b75d11bb38df28b35a2ceedb331d562 - url: https://github.com/OPCFoundation/UA-Nodeset/archive/Errata-1.04.5.zip + url: "https://github.com/OPCFoundation/UA-Nodeset/archive/Errata-1.04.5.zip" + sha256: "a2bcc1cda0154091ecbed25b8c40436c5b75d11bb38df28b35a2ceedb331d562" archive_pattern: "UA-Nodeset-{version}" - "1.3.8": + "1.1.6": deps/ua-nodeset: - sha256: 032c93e3f7c335bbb2d2d699804a804c9cdce2a2ecc3fe7cde552f2130982c26 - url: https://github.com/OPCFoundation/UA-Nodeset/archive/Glass=1.0.0-2022-01-01.zip + url: "https://github.com/OPCFoundation/UA-Nodeset/archive/Errata-1.04.5.zip" + sha256: "a2bcc1cda0154091ecbed25b8c40436c5b75d11bb38df28b35a2ceedb331d562" archive_pattern: "UA-Nodeset-{version}" - "1.3.9": + "1.0.6": deps/ua-nodeset: - sha256: 032c93e3f7c335bbb2d2d699804a804c9cdce2a2ecc3fe7cde552f2130982c26 - url: https://github.com/OPCFoundation/UA-Nodeset/archive/Glass=1.0.0-2022-01-01.zip + url: "https://github.com/OPCFoundation/UA-Nodeset/archive/UA-1.04.8-2020-11-20.zip" + sha256: "c9c0228ce640bf4eead31b9c0b5b7190bc197a2d393a8e90328d14cb45805637" archive_pattern: "UA-Nodeset-{version}" diff --git a/recipes/open62541/all/test_package/conanfile.py b/recipes/open62541/all/test_package/conanfile.py index c1fe645c77cc3..85d0878ec465b 100644 --- a/recipes/open62541/all/test_package/conanfile.py +++ b/recipes/open62541/all/test_package/conanfile.py @@ -23,6 +23,7 @@ def generate(self): "user.ua-nodeset:nodeset_dir").replace("\\", "/") # sanitize path for windows systems tc.variables["open62541_TOOLS_DIR"] = self.dependencies["open62541"].conf_info.get( "user.open62541:tools_dir") + tc.variables["UA_SCHEMA_DIR"] = os.path.join(self.dependencies["ua-nodeset"].conf_info.get("user.ua-nodeset:nodeset_dir"), "Schema").replace("\\", "/") tc.generate() def build(self): diff --git a/recipes/open62541/all/test_package/test_package.c b/recipes/open62541/all/test_package/test_package.c index 31232fcb703bd..ee2c13af0aa82 100644 --- a/recipes/open62541/all/test_package/test_package.c +++ b/recipes/open62541/all/test_package/test_package.c @@ -4,14 +4,12 @@ #include #include #include -#include #endif /* Files namespace_foo_flt_generated.h and namespace_foo_flt_generated.c are created from FooFlt.NodeSet2.xml in the * /src_generated directory by CMake */ #include "foo_flt_nodeids.h" #include "namespace_foo_flt_generated.h" -#include #include #include @@ -31,13 +29,13 @@ int main(void) { UA_Server_addRepeatedCallback(server, server_stop_callback, NULL, 500., NULL); /* create nodes from nodeset */ - if(namespace_foo_flt_generated(server) != UA_STATUSCODE_GOOD) + if(namespace_foo_flt_generated(server) != UA_STATUSCODE_GOOD) { UA_LOG_ERROR(UA_Log_Stdout, UA_LOGCATEGORY_SERVER, "Could not add the Foo FLT nodeset. " "Check previous output for any error."); return_code = UA_STATUSCODE_BADUNEXPECTEDERROR; - } - else + } + else { // Do some additional stuff with the nodes // this will just get the namespace index, since it is already added to the server @@ -45,29 +43,9 @@ int main(void) { UA_NodeId testInstanceId = UA_NODEID_NUMERIC(nsIdx, UA_FOO_FLTID_APE); UA_LOG_INFO(UA_Log_Stdout, UA_LOGCATEGORY_SERVER, "The Ape has ns=%d;id=%d", testInstanceId.namespaceIndex, testInstanceId.identifier.numeric); - - return_code = UA_Server_run(server, &running); - - while(return_code == UA_STATUSCODE_BADCOMMUNICATIONERROR) - { - running = false; - portNumber = portNumber + 1; - UA_Server_getConfig(server)->networkLayersSize = 0; - UA_ServerConfig_addNetworkLayerTCP(UA_Server_getConfig(server), portNumber, 0, 0); - running = true; - return_code = UA_Server_run(server, &running); - if(return_code == UA_STATUSCODE_GOOD) - { - printf("free port found"); - break; - } - else if(portNumber>4850) - { - printf("ports from 4840 to 4850 are not avilable"); - break; - } - } + // return_code = UA_Server_run(server, &running); + return_code = UA_STATUSCODE_GOOD; } running = false; UA_Server_delete(server); diff --git a/recipes/open62541/all/test_v1_package/CMakeLists.txt b/recipes/open62541/all/test_v1_package/CMakeLists.txt deleted file mode 100644 index 8113fa1875eb6..0000000000000 --- a/recipes/open62541/all/test_v1_package/CMakeLists.txt +++ /dev/null @@ -1,37 +0,0 @@ -cmake_minimum_required(VERSION 3.12) -project(test_package C) - -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) - -find_package(open62541 REQUIRED CONFIG) -find_package(Threads REQUIRED) - -find_package(Python3 REQUIRED) -set(PYTHON_EXECUTABLE ${Python3_EXECUTABLE}) - -# Output directory for Nodeset Compiler -set(GENERATE_OUTPUT_DIR "${CMAKE_BINARY_DIR}/src_generated/") -file(MAKE_DIRECTORY "${GENERATE_OUTPUT_DIR}") -include_directories("${GENERATE_OUTPUT_DIR}") -ua_generate_nodeset_and_datatypes( - NAME "foo_flt" - TARGET_PREFIX "${PROJECT_NAME}" - FILE_CSV "${PROJECT_SOURCE_DIR}/../test_package/FooFltModel.csv" - FILE_BSD "${PROJECT_SOURCE_DIR}/../test_package/FooFlt.Types.bsd" - OUTPUT_DIR "${GENERATE_OUTPUT_DIR}" - NAMESPACE_IDX 2 # This namespace index must match the order in which you are adding the nodeset in the source code - NAMESPACE_MAP "2:https://new.foo.com/zebra-compression/flattening-and-subspacefolding/UA/" - FILE_NS "${PROJECT_SOURCE_DIR}/../test_package/FooFlt.NodeSet2.xml" - INTERNAL -) -# Previous macro automatically sets some variables which hold the generated source code files using the provided NAME -add_executable(${PROJECT_NAME} - ${UA_NODESET_FOO_FLT_SOURCES} - ${UA_TYPES_FOO_FLT_SOURCES} - ../test_package/test_package.c -) - -# Make sure the nodeset compiler is executed before compiling the main file -add_dependencies(${PROJECT_NAME} ${PROJECT_NAME}-ns-foo_flt) -target_link_libraries(${PROJECT_NAME} PRIVATE open62541::open62541) diff --git a/recipes/open62541/all/test_v1_package/conanfile.py b/recipes/open62541/all/test_v1_package/conanfile.py deleted file mode 100644 index 95cab84f3695f..0000000000000 --- a/recipes/open62541/all/test_v1_package/conanfile.py +++ /dev/null @@ -1,24 +0,0 @@ -from conans import ConanFile, CMake -from conan.tools.build import cross_building -import os - - -# legacy validation with Conan 1.x -class TestPackageV1Conan(ConanFile): - settings = "os", "compiler", "build_type", "arch" - generators = "cmake", "cmake_find_package_multi" - - def requirements(self): - self.requires("ua-nodeset/padim-1.02-2021-07-21") - - def build(self): - cmake = CMake(self) - cmake.definitions["open62541_NODESET_DIR"] = self.deps_user_info["ua-nodeset"].nodeset_dir - cmake.definitions["open62541_TOOLS_DIR"] = self.deps_user_info["open62541"].tools_dir - cmake.configure() - cmake.build() - - def test(self): - if not cross_building(self): - bin_path = os.path.join("bin", "test_package") - self.run(bin_path, run_environment=True) diff --git a/recipes/open62541/config.yml b/recipes/open62541/config.yml index 02f8b3e330035..9dae87e5721a3 100644 --- a/recipes/open62541/config.yml +++ b/recipes/open62541/config.yml @@ -1,4 +1,6 @@ versions: + "1.4.6": + folder: all "1.3.9": folder: all "1.3.8": diff --git a/recipes/openapi-generator/all/conandata.yml b/recipes/openapi-generator/all/conandata.yml index e13b56c9de28d..94d684c5ba1bc 100644 --- a/recipes/openapi-generator/all/conandata.yml +++ b/recipes/openapi-generator/all/conandata.yml @@ -1,13 +1,13 @@ sources: + "7.8.0": + url: "https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.8.0/openapi-generator-cli-7.8.0.jar" + sha256: "d1879cf42da31f8cf61cf68798b8ef2418af0c6bd93a5c1870e1ff543fbb9365" + "7.5.0": + url: "https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.5.0/openapi-generator-cli-7.5.0.jar" + sha256: "47ebbd1beddaf7dfbee523e7b87623c6ec1b1d42960fbe15f6cad2f6426c69bf" "7.4.0": url: "https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.4.0/openapi-generator-cli-7.4.0.jar" sha256: "e42769a98fef5634bee0f921e4b90786a6b3292aa11fe8d2f84c045ac435ab29" - "7.3.0": - url: "https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.3.0/openapi-generator-cli-7.3.0.jar" - sha256: "879c15340a75a19a7e720efc242c3223e0e4207b0694d6d1cea5c7dd87cf1cce" - "7.2.0": - url: "https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.2.0/openapi-generator-cli-7.2.0.jar" - sha256: "1cf0c80de12c0fdc8594289c19e414b402108ef10b8dd0bfda1953151341ab5d" "6.6.0": url: "https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/6.6.0/openapi-generator-cli-6.6.0.jar" sha256: "9718ff7844e89462c75dcd9b20a35136f6db257bfe1b874db1e3002e99de4609" diff --git a/recipes/openapi-generator/all/conanfile.py b/recipes/openapi-generator/all/conanfile.py index 369f8d2a3dd64..907abc8f087d1 100644 --- a/recipes/openapi-generator/all/conanfile.py +++ b/recipes/openapi-generator/all/conanfile.py @@ -20,7 +20,7 @@ def layout(self): pass def requirements(self): - self.requires("openjdk/19.0.2") + self.requires("openjdk/21.0.1") def package_id(self): del self.info.settings.arch diff --git a/recipes/openapi-generator/config.yml b/recipes/openapi-generator/config.yml index 949f6537e4806..f7485451c5674 100644 --- a/recipes/openapi-generator/config.yml +++ b/recipes/openapi-generator/config.yml @@ -1,9 +1,9 @@ versions: - "7.4.0": + "7.8.0": folder: all - "7.3.0": + "7.5.0": folder: all - "7.2.0": + "7.4.0": folder: all "6.6.0": folder: all diff --git a/recipes/openblas/all/conandata.yml b/recipes/openblas/all/conandata.yml index d0f076aeb8032..85e4fee5631f1 100644 --- a/recipes/openblas/all/conandata.yml +++ b/recipes/openblas/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.3.27": + url: "https://github.com/xianyi/OpenBLAS/archive/v0.3.27.tar.gz" + sha256: "aa2d68b1564fe2b13bc292672608e9cdeeeb6dc34995512e65c3b10f4599e897" "0.3.26": url: "https://github.com/xianyi/OpenBLAS/archive/v0.3.26.tar.gz" sha256: "4e6e4f5cb14c209262e33e6816d70221a2fe49eb69eaf0a06f065598ac602c68" diff --git a/recipes/openblas/all/conanfile.py b/recipes/openblas/all/conanfile.py index cb78919db63db..6fcc5d83048b9 100644 --- a/recipes/openblas/all/conanfile.py +++ b/recipes/openblas/all/conanfile.py @@ -1,15 +1,63 @@ from conan import ConanFile -from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout -from conan.tools.files import copy, get, replace_in_file, rmdir, collect_libs +from conan.errors import ConanInvalidConfiguration +from conan.tools.apple import fix_apple_shared_install_name from conan.tools.build import cross_building +from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout +from conan.tools.files import copy, get, replace_in_file, rmdir +from conan.tools.microsoft import is_msvc_static_runtime, is_msvc from conan.tools.scm import Version -from conan.tools.apple import fix_apple_shared_install_name -from conan.errors import ConanInvalidConfiguration import os -import functools +import textwrap required_conan_version = ">=1.53.0" +# Maps Conan's settings.arch to the corresponding OpenBLAS TARGET: +conan_arch_to_openblas_target = { + "x86": "SANDYBRIDGE", # Sandy bridge was discontinued in September of 2013, + "x86_64": "SANDYBRIDGE", # supporting older CPUs is a performance trade-off + "ppc32be": None, # TODO: OpenBLAS has POWER4, POWER5, POWER6, POWER7, + "ppc32": None, # POWER8, POWER9, POWER10, PPCG4, PPC970, PPC970MP, + "ppc64le": None, # PPC440, PPC440FP2, CELL + "ppc64": None, + "armv4": None, # Not supported by OpenBLAS + "armv4i": None, # Not supported by OpenBLAS + "armv5el": "ARMV5", + "armv5hf": "ARMV5", + "armv6": "ARMV6", + "armv7": "ARMV7", + "armv7hf": "ARMV7", + "armv7s": "ARMV7", + "armv7k": "ARMV7", + "armv8": "ARMV8", + "armv8_32": "ARMV7", # No 32-bit ARMv8 TARGET in OpenBLAS + "armv8.3": "ARMV8", + "arm64ec": "ARMV8", + "sparc": None, # TODO: OpenBLAS has SPARC, SPARCV7 + "sparcv9": None, + "mips": None, # TODO: OpenBLAS has P5600, MIPS1004K and MIPS24K + "mips64": "MIPS64_GENERIC", + "avr": None, # Not supported by OpenBLAS + "s390": None, # Not supported by OpenBLAS + "s390x": None, # Not supported by OpenBLAS + "asm.js": "GENERIC", # TODO: ? + "wasm": "GENERIC", # TODO: ? + "sh4le": None, # Not supported by OpenBLAS + "e2k-v2": "E2K", + "e2k-v3": "E2K", + "e2k-v4": "E2K", + "e2k-v5": "E2K", + "e2k-v6": "E2K", + "e2k-v7": "E2K", + "riscv64": "RISCV64_GENERIC", + "riscv32": None, # Not supported by OpenBLAS + "xtensalx6": None, # Not supported by OpenBLAS + "xtensalx106": None, # Not supported by OpenBLAS + "xtensalx7": None, # Not supported by OpenBLAS +} + +# Taken from OpenBLAS TargetList.txt +available_openblas_targets = ["P2", "KATMAI", "COPPERMINE", "NORTHWOOD", "PRESCOTT", "BANIAS", "YONAH", "CORE2", "PENRYN", "DUNNINGTON", "NEHALEM", "SANDYBRIDGE", "HASWELL", "SKYLAKEX", "ATOM", "COOPERLAKE", "SAPPHIRERAPIDS", "ATHLON", "OPTERON", "OPTERON_SSE3", "BARCELONA", "SHANGHAI", "ISTANBUL", "BOBCAT", "BULLDOZER", "PILEDRIVER", "STEAMROLLER", "EXCAVATOR", "ZEN", "SSE_GENERIC", "VIAC3", "NANO", "POWER4", "POWER5", "POWER6", "POWER7", "POWER8", "POWER9", "POWER10", "PPCG4", "PPC970", "PPC970MP", "PPC440", "PPC440FP2", "CELL", "P5600", "MIPS1004K", "MIPS24K", "MIPS64_GENERIC", "SICORTEX", "LOONGSON3A", "LOONGSON3B", "I6400", "P6600", "I6500", "ITANIUM2", "SPARC", "SPARCV7", "CORTEXA15", "CORTEXA9", "ARMV7", "ARMV6", "ARMV5", "ARMV8", "CORTEXA53", "CORTEXA57", "CORTEXA72", "CORTEXA73", "CORTEXA76", "CORTEXA510", "CORTEXA710", "CORTEXX1", "CORTEXX2", "NEOVERSEN1", "NEOVERSEV1", "NEOVERSEN2", "CORTEXA55", "EMAG8180", "FALKOR", "THUNDERX", "THUNDERX2T99", "TSV110", "THUNDERX3T110", "VORTEX", "A64FX", "ARMV8SVE", "FT2000", "ZARCH_GENERIC", "Z13", "Z14", "RISCV64_GENERIC", "RISCV64_ZVL128B", "C910V", "x280", "RISCV64_ZVL256B", "LOONGSONGENERIC", "LOONGSON3R5", "LOONGSON2K1000", "E2K", "EV4", "EV5", "EV6", "CSKY", "CK860FV"] + class OpenblasConan(ConanFile): name = "openblas" @@ -18,42 +66,66 @@ class OpenblasConan(ConanFile): url = "https://github.com/conan-io/conan-center-index" homepage = "https://www.openblas.net" topics = ("blas", "lapack") + package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], "fPIC": [True, False], "build_lapack": [True, False], + "build_relapack": [True, False], "use_thread": [True, False], + "use_locking": [True, False], "dynamic_arch": [True, False], + "target": [None] + available_openblas_targets } default_options = { "shared": False, "fPIC": True, - "build_lapack": False, + "build_lapack": True, + "build_relapack": False, "use_thread": True, + "use_locking": True, "dynamic_arch": False, + "target": None, + } + options_description = { + "build_lapack": "Build LAPACK and LAPACKE", + "build_relapack": "Build with ReLAPACK (recursive implementation of several LAPACK functions on top of standard LAPACK)", + "use_thread": "Enable threads support", + "use_locking": "Use locks even in single-threaded builds to make them callable from multiple threads", + "dynamic_arch": "Include support for multiple CPU targets, with automatic selection at runtime (x86/x86_64, aarch64 or ppc only)", + "target": "OpenBLAS TARGET variable (see TargetList.txt)", } short_paths = True - package_type = "library" @property def _fortran_compiler(self): comp_exe = self.conf.get("tools.build:compiler_executables") - if comp_exe and 'fortran' in comp_exe: + if comp_exe and "fortran" in comp_exe: return comp_exe["fortran"] return None def config_options(self): if self.settings.os == "Windows": del self.options.fPIC - if Version(self.version) >= "0.3.21": - # INFO: When no Fortran compiler is available, OpenBLAS builds LAPACK from an f2c-converted copy of LAPACK unless the NO_LAPACK option is specified - self.options.build_lapack = True + # When no Fortran compiler is available, OpenBLAS builds LAPACK from an f2c-converted copy of LAPACK unless the NO_LAPACK option is specified. + # This is not available before v0.3.21. + if Version(self.version) < "0.3.21": + self.options.build_lapack = False + self.options.build_relapack = False def configure(self): if self.options.shared: self.options.rm_safe("fPIC") + # When cross-compiling, OpenBLAS requires explicitly setting TARGET + if cross_building(self, skip_x64_x86=True) and not self.options.target: + # Try inferring the target from settings.arch + target = conan_arch_to_openblas_target.get(str(self.settings.arch)) + if target: + self.output.warning(f'Setting OpenBLAS TARGET={target} based on settings.arch. This may result in suboptimal performance. Set the "{self.name}/*:target=XXX" option to silence this warning.') + self.options.target = target + def validate(self): if Version(self.version) < "0.3.24" and self.settings.arch == "armv8": # OpenBLAS fails to detect the appropriate target architecture for armv8 for versions < 0.3.24, as it matches the 32 bit variant instead of 64. @@ -61,103 +133,122 @@ def validate(self): # This would be a reasonably trivial hotfix to backport. raise ConanInvalidConfiguration("armv8 builds are not currently supported for versions lower than 0.3.24. Contributions to support this are welcome.") - if hasattr(self, "settings_build") and cross_building(self, skip_x64_x86=True): - raise ConanInvalidConfiguration("Cross-building not implemented") + if self.options.build_relapack: + if not self.options.build_lapack: + raise ConanInvalidConfiguration(f'"{self.name}/*:build_relapack=True" option requires "{self.name}/*:build_lapack=True"') + if self.settings.compiler not in ["gcc", "clang"]: + # ld: unknown option: --allow-multiple-definition on apple-clang + raise ConanInvalidConfiguration(f'"{self.name}/*:build_relapack=True" option is only supported for GCC and Clang') - def source(self): - get(self, - **self.conan_data["sources"][self.version], - strip_root=True, - destination=self.source_folder - ) + def validate_build(self): + if Version(self.version) < "0.3.22" and cross_building(self, skip_x64_x86=True): + # OpenBLAS CMake builds did not support some of the cross-compilation targets in 0.3.20/21 and earlier. + # This was fixed in https://github.com/OpenMathLib/OpenBLAS/pull/3714 and https://github.com/OpenMathLib/OpenBLAS/pull/3958 + raise ConanInvalidConfiguration(f"Cross-building is not supported for {self.name}/0.3.21 and earlier.") - if Version(self.version) <= "0.3.15": - replace_in_file(self, os.path.join(self.source_folder, "cmake", "utils.cmake"), - "set(obj_defines ${defines_in})", "set(obj_defines ${defines_in})\r\n\r\n" + - "list(FIND obj_defines \"RC\" def_idx)\r\n" + "if (${def_idx} GREATER -1) \r\n\t" + - "list (REMOVE_ITEM obj_defines \"RC\")\r\n\t" + "list(APPEND obj_defines \"RC=RC\")\r\n" + - "endif ()\r\n" + "list(FIND obj_defines \"CR\" def_idx)\r\n" + - "if (${def_idx} GREATER -1) \r\n\t" + "list (REMOVE_ITEM obj_defines \"CR\")\r\n\t" + - "list(APPEND obj_defines \"CR=CR\")\r\n" + "endif ()") - - @functools.lru_cache(1) - def _configure_cmake(self): - cmake = CMake(self) - cmake.configure() - return cmake + # If we're cross-compiling, and the user didn't provide the target, and + # we couldn't infer the target from settings.arch, fail + if cross_building(self, skip_x64_x86=True) and not self.options.target: + raise ConanInvalidConfiguration(f'Could not determine OpenBLAS TARGET. Please set the "{self.name}/*:target=XXX" option.') + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) def layout(self): cmake_layout(self, src_folder="src") def generate(self): tc = CMakeToolchain(self) + tc.variables["BUILD_STATIC_LIBS"] = not self.options.shared + tc.variables["BUILD_SHARED_LIBS"] = self.options.shared + tc.variables["BUILD_TESTING"] = False - tc.cache_variables["NOFORTRAN"] = not self.options.build_lapack + tc.variables["NOFORTRAN"] = not self.options.build_lapack # This checks explicit user-specified fortran compiler - if self.options.build_lapack: - if not self._fortran_compiler: - if Version(self.version) < "0.3.21": - self.output.warning( - "Building with LAPACK support requires a Fortran compiler.") - else: - tc.cache_variables["C_LAPACK"] = True - tc.cache_variables["NOFORTRAN"] = True - self.output.info( - "Building LAPACK without Fortran compiler") - - tc.cache_variables["BUILD_WITHOUT_LAPACK"] = not self.options.build_lapack - tc.cache_variables["DYNAMIC_ARCH"] = self.options.dynamic_arch - tc.cache_variables["USE_THREAD"] = self.options.use_thread - - # Required for safe concurrent calls to OpenBLAS routines - tc.cache_variables["USE_LOCKING"] = not self.options.use_thread - - # don't, may lie to consumer, /MD or /MT is managed by conan - tc.cache_variables["MSVC_STATIC_CRT"] = False + if self.options.build_lapack and not self._fortran_compiler: + if Version(self.version) < "0.3.21": + self.output.warning("Building with LAPACK support requires a Fortran compiler.") + else: + tc.variables["C_LAPACK"] = True + tc.variables["NOFORTRAN"] = True + self.output.info("Building LAPACK without a Fortran compiler") + + tc.variables["BUILD_WITHOUT_LAPACK"] = not self.options.build_lapack + tc.variables["BUILD_RELAPACK"] = self.options.build_relapack + + tc.variables["DYNAMIC_ARCH"] = self.options.dynamic_arch + tc.variables["USE_THREAD"] = self.options.use_thread + tc.variables["USE_LOCKING"] = self.options.use_locking + + tc.variables["MSVC_STATIC_CRT"] = is_msvc_static_runtime(self) # This is a workaround to add the libm dependency on linux, # which is required to successfully compile on older gcc versions. - tc.cache_variables["ANDROID"] = self.settings.os in ["Linux", "Android"] + tc.variables["ANDROID"] = self.settings.os in ["Linux", "Android"] + if self.options.target: + tc.cache_variables["TARGET"] = self.options.target + + tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0077"] = "NEW" tc.generate() - def build(self): + def _patch_sources(self): + if Version(self.version) <= "0.3.15": + replace_in_file(self, os.path.join(self.source_folder, "cmake", "utils.cmake"), + "set(obj_defines ${defines_in})", textwrap.dedent("""\ + set(obj_defines ${defines_in}) + + list(FIND obj_defines "RC" def_idx) + if (${def_idx} GREATER -1) + list(REMOVE_ITEM obj_defines "RC") + list(APPEND obj_defines "RC=RC") + endif () + list(FIND obj_defines "CR" def_idx) + if (${def_idx} GREATER -1) + list(REMOVE_ITEM obj_defines "CR") + list(APPEND obj_defines "CR=CR") + endif ()""")) if Version(self.version) < "0.3.21": + f_check_cmake = os.path.join(self.source_folder, "cmake", "f_check.cmake") if Version(self.version) >= "0.3.12": - search = """message(STATUS "No Fortran compiler found, can build only BLAS but not LAPACK")""" - replace = ( - """message(FATAL_ERROR "No Fortran compiler found. Cannot build with LAPACK.")""" - ) + replace_in_file(self, f_check_cmake, + 'message(STATUS "No Fortran compiler found, can build only BLAS but not LAPACK")', + 'message(FATAL_ERROR "No Fortran compiler found. Cannot build with LAPACK.")') else: - search = "enable_language(Fortran)" - replace = """include(CheckLanguage) -check_language(Fortran) -if(CMAKE_Fortran_COMPILER) - enable_language(Fortran) -else() - message(FATAL_ERROR "No Fortran compiler found. Cannot build with LAPACK.") - set (NOFORTRAN 1) - set (NO_LAPACK 1) -endif()""" - - replace_in_file( - self, - os.path.join(self.source_folder, self.source_folder, "cmake", "f_check.cmake"), - search, - replace, - ) - cmake = self._configure_cmake() + replace_in_file(self, f_check_cmake, + "enable_language(Fortran)", + textwrap.dedent("""\ + include(CheckLanguage) + check_language(Fortran) + if(CMAKE_Fortran_COMPILER) + enable_language(Fortran) + else() + message(FATAL_ERROR "No Fortran compiler found. Cannot build with LAPACK.") + set (NOFORTRAN 1) + set (NO_LAPACK 1) + endif()""")) + + def build(self): + self._patch_sources() + cmake = CMake(self) + cmake.configure() cmake.build() def package(self): copy(self, "LICENSE", self.source_folder, os.path.join(self.package_folder, "licenses")) - cmake = self._configure_cmake() + cmake = CMake(self) cmake.install() rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) rmdir(self, os.path.join(self.package_folder, "share")) fix_apple_shared_install_name(self) + @property + def _lib_name(self): + if self.options.shared and self.settings.build_type == "Debug" and not is_msvc(self): + return "openblas_d" + return "openblas" + def package_info(self): # CMake config file: # - OpenBLAS always has one and only one of these components: openmp, pthread or serial. @@ -166,14 +257,12 @@ def package_info(self): self.cpp_info.set_property("cmake_file_name", "OpenBLAS") self.cpp_info.set_property("cmake_target_name", "OpenBLAS::OpenBLAS") self.cpp_info.set_property("pkg_config_name", "openblas") + # 'pthread' causes issues without namespace cmake_component_name = "pthread" if self.options.use_thread else "serial" # TODO: how to model this in CMakeDeps? - self.cpp_info.components["openblas_component"].set_property( - "cmake_target_name", "OpenBLAS::" + cmake_component_name) # 'pthread' causes issues without namespace + self.cpp_info.components["openblas_component"].set_property("cmake_target_name", f"OpenBLAS::{cmake_component_name}") self.cpp_info.components["openblas_component"].set_property("pkg_config_name", "openblas") - self.cpp_info.components["openblas_component"].includedirs.append( - os.path.join("include", "openblas") - ) - self.cpp_info.components["openblas_component"].libs = collect_libs(self) + self.cpp_info.components["openblas_component"].includedirs.append(os.path.join("include", "openblas")) + self.cpp_info.components["openblas_component"].libs = [self._lib_name] if self.settings.os in ["Linux", "FreeBSD"]: self.cpp_info.components["openblas_component"].system_libs.append("m") if self.options.use_thread: @@ -181,13 +270,12 @@ def package_info(self): if self.options.build_lapack and self._fortran_compiler: self.cpp_info.components["openblas_component"].system_libs.append("gfortran") - self.output.info( - "Setting OpenBLAS_HOME environment variable: {}".format(self.package_folder) - ) - self.env_info.OpenBLAS_HOME = self.package_folder + self.buildenv_info.define_path("OpenBLAS_HOME", self.package_folder) + self.runenv_info.define_path("OpenBLAS_HOME", self.package_folder) # TODO: to remove in conan v2 once cmake_find_package_* generators removed self.cpp_info.names["cmake_find_package"] = "OpenBLAS" self.cpp_info.names["cmake_find_package_multi"] = "OpenBLAS" self.cpp_info.components["openblas_component"].names["cmake_find_package"] = cmake_component_name self.cpp_info.components["openblas_component"].names["cmake_find_package_multi"] = cmake_component_name + self.env_info.OpenBLAS_HOME = self.package_folder diff --git a/recipes/openblas/config.yml b/recipes/openblas/config.yml index e0275b7ea815a..e0f3014a9fdda 100644 --- a/recipes/openblas/config.yml +++ b/recipes/openblas/config.yml @@ -1,4 +1,6 @@ versions: + "0.3.27": + folder: all "0.3.26": folder: all "0.3.25": diff --git a/recipes/opencolorio/all/conandata.yml b/recipes/opencolorio/all/conandata.yml index 840a3b9147df2..ae6c54820b976 100644 --- a/recipes/opencolorio/all/conandata.yml +++ b/recipes/opencolorio/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.4.0": + url: "https://github.com/AcademySoftwareFoundation/OpenColorIO/archive/v2.4.0.tar.gz" + sha256: "0ff3966b9214da0941b2b1cbdab3975a00a51fc6f3417fa860f98f5358f2c282" "2.3.2": url: "https://github.com/AcademySoftwareFoundation/OpenColorIO/archive/v2.3.2.tar.gz" sha256: "6bbf4e7fa4ea2f743a238cb22aff44890425771a2f57f62cece1574e46ceec2f" @@ -18,6 +21,10 @@ sources: url: "https://github.com/AcademySoftwareFoundation/OpenColorIO/archive/v1.1.1.tar.gz" sha256: "c9b5b9def907e1dafb29e37336b702fff22cc6306d445a13b1621b8a754c14c8" patches: + "2.4.0": + - patch_file: "patches/2.4.0-0001-fix-cmake-source-dir-and-targets.patch" + patch_description: "use cci package, use PROJECT_BINARY_DIR/PROJECT_SOURCE_DIR" + patch_type: "conan" "2.3.2": - patch_file: "patches/2.3.1-0001-fix-cmake-source-dir-and-targets.patch" patch_description: "use cci package, use PROJECT_BINARY_DIR/PROJECT_SOURCE_DIR" diff --git a/recipes/opencolorio/all/conanfile.py b/recipes/opencolorio/all/conanfile.py index 49d9c8b544de8..13b89ccfe1b89 100644 --- a/recipes/opencolorio/all/conanfile.py +++ b/recipes/opencolorio/all/conanfile.py @@ -18,6 +18,7 @@ class OpenColorIOConan(ConanFile): url = "https://github.com/conan-io/conan-center-index" topics = ("colors", "visual", "effects", "animation") settings = "os", "arch", "compiler", "build_type" + package_type = "library" options = { "shared": [True, False], "fPIC": [True, False], @@ -46,11 +47,11 @@ def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - self.requires("expat/2.5.0") + self.requires("expat/[>=2.6.2 <3]") if Version(self.version) < "2.2.0": self.requires("openexr/2.5.7") else: - self.requires("openexr/3.2.1") + self.requires("openexr/3.2.3") self.requires("imath/3.1.9") if Version(self.version) < "2.0.0": @@ -66,7 +67,7 @@ def requirements(self): self.requires("minizip-ng/3.0.9") # for tools only - self.requires("lcms/2.14") + self.requires("lcms/2.16") # TODO: add GLUT (needed for ociodisplay tool) def validate(self): diff --git a/recipes/opencolorio/all/patches/1.1.1.patch b/recipes/opencolorio/all/patches/1.1.1.patch deleted file mode 100644 index 579e529242a44..0000000000000 --- a/recipes/opencolorio/all/patches/1.1.1.patch +++ /dev/null @@ -1,283 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index e4f31196..b73396b4 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -4,11 +4,13 @@ set(OCIO_VERSION_MINOR 1) - set(OCIO_VERSION_PATCH 1) - - cmake_minimum_required(VERSION 2.8) --set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/share/cmake) -+list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/share/cmake) - if(NOT DEFINED CMAKE_FIRST_RUN) - SET(CMAKE_FIRST_RUN 1 CACHE INTERNAL "") - endif() - -+set(CMAKE_CXX_STANDARD 11) -+ - ############################################################################### - ### GLOBAL ### - -@@ -142,11 +144,11 @@ endif(CMAKE_COMPILER_IS_GNUCXX) - ############################################################################### - ### Python ### - --OCIOFindPython() -+#OCIOFindPython() - - # Find Python, used for (possibly) building pyglue, and now to - # construct the external project path --set(EXTDIST_ROOT ${CMAKE_BINARY_DIR}/ext/dist) -+set(EXTDIST_ROOT ${PROJECT_BINARY_DIR}/ext/dist) - set(EXTDIST_BINPATH ${EXTDIST_ROOT}/bin) - if(PYTHON_OK) - set(EXTDIST_PYTHONPATH ${EXTDIST_ROOT}/${PYTHON_VARIANT_PATH}) -@@ -170,7 +172,12 @@ messageonce("Setting EXTDIST_PYTHONPATH: ${EXTDIST_PYTHONPATH}") - - if(USE_EXTERNAL_TINYXML) - set(TINYXML_VERSION_MIN "2.6.1") -- find_package(TinyXML) -+ find_package(TinyXML REQUIRED) -+ set(TINYXML_FOUND ${TinyXML_FOUND}) -+ set(TINYXML_LIBRARIES TinyXML::TinyXML) -+ set(TINYXML_VERSION "${TinyXML_VERSION}") -+ list(APPEND EXTERNAL_LIBRARIES ${TINYXML_LIBRARIES}) -+ - if(TINYXML_FOUND) - if(TINYXML_VERSION VERSION_EQUAL ${TINYXML_VERSION_MIN} OR - TINYXML_VERSION VERSION_GREATER ${TINYXML_VERSION_MIN}) -@@ -251,6 +258,13 @@ endif(USE_EXTERNAL_TINYXML) - if(USE_EXTERNAL_YAML) - # Set minimum yaml version for non-patched sources. - set(YAML_VERSION_MIN "0.3.0") -+ find_package(yaml-cpp REQUIRED) -+ set(YAML_CPP_INCLUDE_DIRS "${CONAN_INCLUDE_DIRS_YAML-CPP}") -+ set(YAML_CPP_LIBRARIES yaml-cpp::yaml-cpp) -+ set(YAML_CPP_VERSION "${yaml-cpp_VERSION}") -+ list(APPEND EXTERNAL_LIBRARIES ${YAML_CPP_LIBRARIES}) -+ -+ if(0) - include(FindPkgConfig) - pkg_check_modules(PC_YAML_CPP REQUIRED QUIET yaml-cpp) - find_path(YAML_CPP_INCLUDE_DIR yaml-cpp/yaml.h -@@ -293,6 +307,7 @@ if(USE_EXTERNAL_YAML) - else(YAML_CPP_FOUND) - message(FATAL_ERROR "ERROR: System yaml-cpp library was not found. Make sure the library is installed and the pkg-config file exists.") - endif(YAML_CPP_FOUND) -+ endif() - else(USE_EXTERNAL_YAML) ## provide 2 ways to build this dependency - set(YAML_CPP_VERSION 0.3.0) - set(YAML_CPP_CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${PROJECT_BINARY_DIR}/ext/dist -DYAML_CPP_BUILD_TOOLS:BOOL=FALSE -DOCIO_INLINES_HIDDEN:BOOL=${OCIO_INLINES_HIDDEN}) -@@ -384,7 +399,7 @@ else() - set(OCIO_INLINES_HIDDEN OFF) - endif() - --set(EXTERNAL_COMPILE_FLAGS "-DTIXML_USE_STL ${YAML_CPP_COMPILE_FLAGS} ${GCC_COMPILE_FLAGS}") -+set(EXTERNAL_COMPILE_FLAGS "${YAML_CPP_COMPILE_FLAGS} ${GCC_COMPILE_FLAGS}") - - set(EXTERNAL_LINK_FLAGS "") - set(EXTERNAL_LIBRARY_DIRS ${PROJECT_BINARY_DIR}/ext/dist/lib) -@@ -460,7 +475,7 @@ endif() - if(OCIO_BUILD_APPS AND (OCIO_BUILD_STATIC OR OCIO_BUILD_SHARED) ) - - # Try to find OpenImageIO (OIIO) and OpenGL stuff -- OCIOFindOpenImageIO() -+ #OCIOFindOpenImageIO() - - if(OIIO_FOUND) - add_subdirectory(src/apps/ocioconvert) -@@ -528,7 +543,7 @@ endif() - - ############################################################################### - ### Configure env script ### --configure_file(${CMAKE_SOURCE_DIR}/share/ocio/setup_ocio.sh.in -+configure_file(${PROJECT_SOURCE_DIR}/share/ocio/setup_ocio.sh.in - ${CMAKE_CURRENT_BINARY_DIR}/share/ocio/setup_ocio.sh @ONLY) - - INSTALL(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/share/ocio/setup_ocio.sh DESTINATION share/ocio/) -@@ -597,7 +612,7 @@ if(TARGET OpenColorIO_STATIC) - endif() - endif() - install(EXPORT OpenColorIO DESTINATION cmake) --file(WRITE "${CMAKE_BINARY_DIR}/OpenColorIOConfig.cmake" -+file(WRITE "${PROJECT_BINARY_DIR}/OpenColorIOConfig.cmake" - " - get_filename_component(OpenColorIO_DIR \"\${CMAKE_CURRENT_LIST_FILE}\" PATH) - -@@ -646,4 +661,4 @@ file(WRITE "${CMAKE_BINARY_DIR}/OpenColorIOConfig.cmake" - message(STATUS OPENCOLORIO_FOUND=\${OPENCOLORIO_FOUND}) - " - ) --install(FILES "${CMAKE_BINARY_DIR}/OpenColorIOConfig.cmake" DESTINATION .) -+install(FILES "${PROJECT_BINARY_DIR}/OpenColorIOConfig.cmake" DESTINATION .) -diff --git a/share/cmake/OCIOMacros.cmake b/share/cmake/OCIOMacros.cmake -index b9fb2393..b1a206e7 100644 ---- a/share/cmake/OCIOMacros.cmake -+++ b/share/cmake/OCIOMacros.cmake -@@ -356,9 +356,9 @@ ENDMACRO() - - MACRO(ExtractRstCPP INFILE OUTFILE) - add_custom_command( -- WORKING_DIRECTORY ${CMAKE_BINARY_DIR} -+ WORKING_DIRECTORY ${PROJECT_BINARY_DIR} - OUTPUT ${OUTFILE} -- COMMAND ${PYTHON} ${CMAKE_SOURCE_DIR}/share/sphinx/ExtractRstFromSourceCPP.py ${INFILE} ${OUTFILE} -+ COMMAND ${PYTHON} ${PROJECT_SOURCE_DIR}/share/sphinx/ExtractRstFromSourceCPP.py ${INFILE} ${OUTFILE} - DEPENDS ${INFILE} - COMMENT "Extracting reStructuredText from ${INFILE} (using old process)" - ) -@@ -366,9 +366,9 @@ ENDMACRO() - - MACRO(ExtractRstSimple INFILE OUTFILE) - add_custom_command( -- WORKING_DIRECTORY ${CMAKE_BINARY_DIR} -+ WORKING_DIRECTORY ${PROJECT_BINARY_DIR} - OUTPUT ${OUTFILE} -- COMMAND ${PYTHON} ${CMAKE_SOURCE_DIR}/share/sphinx/ExtractRstFromSourceSimple.py ${INFILE} ${OUTFILE} -+ COMMAND ${PYTHON} ${PROJECT_SOURCE_DIR}/share/sphinx/ExtractRstFromSourceSimple.py ${INFILE} ${OUTFILE} - DEPENDS ${INFILE} - COMMENT "Extracting reStructuredText from ${INFILE}" - ) -diff --git a/src/apps/ociobakelut/CMakeLists.txt b/src/apps/ociobakelut/CMakeLists.txt -index d31b4e34..4aa1efb2 100644 ---- a/src/apps/ociobakelut/CMakeLists.txt -+++ b/src/apps/ociobakelut/CMakeLists.txt -@@ -1,6 +1,10 @@ - # LCMS --include(FindPkgConfig FindPackageMessage) --pkg_check_modules(LCMS QUIET lcms2) -+find_package(lcms REQUIRED) -+set(LCMS_FOUND ${lcms_FOUND}) -+set(LCMS_VERSION ${lcms_VERSION}) -+set(LCMS_LIBRARIES ${lcms_LIBRARIES}) -+set(LCMS_INCLUDE_DIR ${lcms_INCLUDE_DIR}) -+ - if(LCMS_FOUND AND (LCMS_VERSION VERSION_EQUAL 2.1 OR LCMS_VERSION VERSION_GREATER 2.1)) - FIND_PACKAGE_MESSAGE(LCMS "Found lcms: ${LCMS_LIBRARIES}" - "${LCMS_INCLUDE_DIR}") -@@ -29,12 +33,12 @@ else() - set(LCMS_LIBRARIES ${PROJECT_BINARY_DIR}/ext/dist/lib/${CMAKE_STATIC_LIBRARY_PREFIX}lcms2${CMAKE_STATIC_LIBRARY_SUFFIX}) - endif() - --file(GLOB_RECURSE share_src_files "${CMAKE_SOURCE_DIR}/src/apps/share/*.cpp") -+file(GLOB_RECURSE share_src_files "${PROJECT_SOURCE_DIR}/src/apps/share/*.cpp") - - include_directories( -- ${CMAKE_SOURCE_DIR}/export/ -- ${CMAKE_BINARY_DIR}/export/ -- ${CMAKE_SOURCE_DIR}/src/apps/share/ -+ ${PROJECT_SOURCE_DIR}/export/ -+ ${PROJECT_BINARY_DIR}/export/ -+ ${PROJECT_SOURCE_DIR}/src/apps/share/ - ${LCMS_INCLUDE_DIRS} - ${Boost_INCLUDE_DIR} - ) -diff --git a/src/apps/ociocheck/CMakeLists.txt b/src/apps/ociocheck/CMakeLists.txt -index 4955f4db..14b5017f 100644 ---- a/src/apps/ociocheck/CMakeLists.txt -+++ b/src/apps/ociocheck/CMakeLists.txt -@@ -1,9 +1,9 @@ --file(GLOB_RECURSE share_src_files "${CMAKE_SOURCE_DIR}/src/apps/share/*.cpp") -+file(GLOB_RECURSE share_src_files "${PROJECT_SOURCE_DIR}/src/apps/share/*.cpp") - - include_directories( -- ${CMAKE_SOURCE_DIR}/export/ -- ${CMAKE_BINARY_DIR}/export/ -- ${CMAKE_SOURCE_DIR}/src/apps/share/ -+ ${PROJECT_SOURCE_DIR}/export/ -+ ${PROJECT_BINARY_DIR}/export/ -+ ${PROJECT_SOURCE_DIR}/src/apps/share/ - ${Boost_INCLUDE_DIR} - ) - -diff --git a/src/core/CDLTransform.cpp b/src/core/CDLTransform.cpp -index 8b05debc..a7d6031f 100644 ---- a/src/core/CDLTransform.cpp -+++ b/src/core/CDLTransform.cpp -@@ -126,7 +126,11 @@ OCIO_NAMESPACE_ENTER - TiXmlPrinter printer; - printer.SetStreamPrinting(); - doc.Accept( &printer ); -- return printer.Str(); -+ #ifdef TIXML_USE_STL -+ return printer.Str(); -+ #else -+ return printer.CStr(); -+ #endif - } - } - -diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt -index 1eb691b6..a2f099ab 100644 ---- a/src/core/CMakeLists.txt -+++ b/src/core/CMakeLists.txt -@@ -2,29 +2,29 @@ - ### OCIO CORE ### - - include_directories( -- ${CMAKE_SOURCE_DIR}/export/ -- ${CMAKE_BINARY_DIR}/export/ -- ${CMAKE_SOURCE_DIR}/ext/oiio/src/include -+ ${PROJECT_SOURCE_DIR}/export/ -+ ${PROJECT_BINARY_DIR}/export/ -+ ${PROJECT_SOURCE_DIR}/ext/oiio/src/include - ${EXTERNAL_INCLUDE_DIRS} - ) - --file(GLOB_RECURSE core_src_files "${CMAKE_SOURCE_DIR}/src/core/*.cpp") --file(GLOB_RECURSE core_export_headers "${CMAKE_SOURCE_DIR}/export/OpenColorIO/*.h") -+file(GLOB_RECURSE core_src_files "${PROJECT_SOURCE_DIR}/src/core/*.cpp") -+file(GLOB_RECURSE core_export_headers "${PROJECT_SOURCE_DIR}/export/OpenColorIO/*.h") - - message(STATUS "Create OpenColorABI.h from OpenColorABI.h.in") --configure_file(${CMAKE_SOURCE_DIR}/export/OpenColorIO/OpenColorABI.h.in -- ${CMAKE_BINARY_DIR}/export/OpenColorABI.h @ONLY) --list(APPEND core_export_headers ${CMAKE_BINARY_DIR}/export/OpenColorABI.h) -+configure_file(${PROJECT_SOURCE_DIR}/export/OpenColorIO/OpenColorABI.h.in -+ ${PROJECT_BINARY_DIR}/export/OpenColorABI.h @ONLY) -+list(APPEND core_export_headers ${PROJECT_BINARY_DIR}/export/OpenColorABI.h) - - # Process all warnings as errors - - if(WIN32) - # On debug mode there are other kinds of warning... - if("${CMAKE_BUILD_TYPE}" STREQUAL "Release") -- set(EXTERNAL_COMPILE_FLAGS "${EXTERNAL_COMPILE_FLAGS} /WX") -+ # set(EXTERNAL_COMPILE_FLAGS "${EXTERNAL_COMPILE_FLAGS} /WX") - endif() - else() -- set(EXTERNAL_COMPILE_FLAGS "${EXTERNAL_COMPILE_FLAGS} -Werror") -+ # set(EXTERNAL_COMPILE_FLAGS "${EXTERNAL_COMPILE_FLAGS} -Werror") - endif() - - # SHARED -@@ -75,7 +75,7 @@ endif() - # STATIC - - if(OCIO_BUILD_STATIC) -- list(REMOVE_ITEM core_src_files ${CMAKE_SOURCE_DIR}/src/core/UnitTest.cpp) -+ list(REMOVE_ITEM core_src_files ${PROJECT_SOURCE_DIR}/src/core/UnitTest.cpp) - add_library(OpenColorIO_STATIC STATIC ${EXTERNAL_OBJECTS} ${core_src_files}) - add_dependencies(OpenColorIO_STATIC TINYXML_LIB YAML_CPP_LIB) - if(EXTERNAL_LIBRARIES) -@@ -113,7 +113,7 @@ install(FILES ${core_export_headers} - - # pkg-config - message(STATUS "Create OpenColorIO.pc from OpenColorIO.pc.in") --configure_file(${CMAKE_SOURCE_DIR}/export/pkgconfig/OpenColorIO.pc.in -+configure_file(${PROJECT_SOURCE_DIR}/export/pkgconfig/OpenColorIO.pc.in - ${CMAKE_CURRENT_BINARY_DIR}/OpenColorIO.pc @ONLY) - install(FILES ${CMAKE_CURRENT_BINARY_DIR}/OpenColorIO.pc - DESTINATION ${CMAKE_INSTALL_EXEC_PREFIX}/lib${LIB_SUFFIX}/pkgconfig/) -diff --git a/src/core/OCIOYaml.cpp b/src/core/OCIOYaml.cpp -index 68fcef60..a1c1c1d8 100644 ---- a/src/core/OCIOYaml.cpp -+++ b/src/core/OCIOYaml.cpp -@@ -1442,7 +1442,7 @@ OCIO_NAMESPACE_ENTER - #ifdef OLDYAML - if(node.FindValue("ocio_profile_version") == NULL) - #else -- if(node["ocio_profile_version"] == NULL) -+ if(node["ocio_profile_version"].IsNull()) - #endif - { - std::ostringstream os; diff --git a/recipes/opencolorio/all/patches/2.4.0-0001-fix-cmake-source-dir-and-targets.patch b/recipes/opencolorio/all/patches/2.4.0-0001-fix-cmake-source-dir-and-targets.patch new file mode 100644 index 0000000000000..45fda4ba68528 --- /dev/null +++ b/recipes/opencolorio/all/patches/2.4.0-0001-fix-cmake-source-dir-and-targets.patch @@ -0,0 +1,101 @@ +diff --git CMakeLists.txt CMakeLists.txt +index 0eaec4be..e711295c 100755 +--- CMakeLists.txt ++++ CMakeLists.txt +@@ -511,7 +511,7 @@ install( + FILE ${OCIO_TARGETS_EXPORT_NAME} + ) + +-if (NOT BUILD_SHARED_LIBS) ++if (0) + # Install custom macros used in the find modules. + install(FILES + ${CMAKE_CURRENT_LIST_DIR}/share/cmake/macros/VersionUtils.cmake +diff --git share/cmake/modules/FindExtPackages.cmake share/cmake/modules/FindExtPackages.cmake +index accdecec..945c5edc 100644 +--- share/cmake/modules/FindExtPackages.cmake ++++ share/cmake/modules/FindExtPackages.cmake +@@ -63,7 +63,7 @@ ocio_handle_dependency( expat REQUIRED ALLOW_INSTALL + # https://github.com/jbeder/yaml-cpp + ocio_handle_dependency( yaml-cpp REQUIRED ALLOW_INSTALL + MIN_VERSION 0.6.3 +- RECOMMENDED_VERSION 0.7.0 ++ RECOMMENDED_VERSION 0.8.0 + RECOMMENDED_VERSION_REASON "Latest version tested with OCIO") + + # pystring +@@ -110,9 +110,9 @@ ocio_handle_dependency( ZLIB REQUIRED ALLOW_INSTALL + + # minizip-ng + # https://github.com/zlib-ng/minizip-ng +-ocio_handle_dependency( minizip-ng REQUIRED ALLOW_INSTALL ++ocio_handle_dependency( minizip REQUIRED ALLOW_INSTALL + MIN_VERSION 3.0.6 +- RECOMMENDED_VERSION 3.0.7 ++ RECOMMENDED_VERSION 4.0.1 + RECOMMENDED_VERSION_REASON "Latest version tested with OCIO") + + ############################################################################### +@@ -131,7 +131,7 @@ if(OCIO_BUILD_APPS) + + # lcms2 + # https://github.com/mm2/Little-CMS +- ocio_handle_dependency( lcms2 REQUIRED ALLOW_INSTALL ++ ocio_handle_dependency( lcms REQUIRED ALLOW_INSTALL + MIN_VERSION 2.2 + RECOMMENDED_VERSION 2.2 + RECOMMENDED_VERSION_REASON "Latest version tested with OCIO") +diff --git share/cmake/utils/CppVersion.cmake share/cmake/utils/CppVersion.cmake +index 175d89c2..ac93b87a 100644 +--- share/cmake/utils/CppVersion.cmake ++++ share/cmake/utils/CppVersion.cmake +@@ -16,7 +16,7 @@ elseif(NOT CMAKE_CXX_STANDARD IN_LIST SUPPORTED_CXX_STANDARDS) + "CMAKE_CXX_STANDARD=${CMAKE_CXX_STANDARD} is unsupported. Supported standards are: ${SUPPORTED_CXX_STANDARDS_STR}.") + endif() + +-set_property(CACHE CMAKE_CXX_STANDARD PROPERTY STRINGS "${SUPPORTED_CXX_STANDARDS}") ++# set_property(CACHE CMAKE_CXX_STANDARD PROPERTY STRINGS "${SUPPORTED_CXX_STANDARDS}") + + include(CheckCXXCompilerFlag) + +diff --git src/OpenColorIO/CMakeLists.txt src/OpenColorIO/CMakeLists.txt +index 7d2894da..1e6570b4 100755 +--- src/OpenColorIO/CMakeLists.txt ++++ src/OpenColorIO/CMakeLists.txt +@@ -315,8 +315,8 @@ target_link_libraries(OpenColorIO + "$" + "$" + "$" +- ${YAML_CPP_LIBRARIES} +- MINIZIP::minizip-ng ++ yaml-cpp ++ MINIZIP::minizip + ) + + if(OCIO_USE_SIMD AND OCIO_USE_SSE2NEON AND COMPILER_SUPPORTS_SSE_WITH_SSE2NEON) +diff --git src/apps/ocioarchive/CMakeLists.txt src/apps/ocioarchive/CMakeLists.txt +index 599d706f..efe6cd5a 100644 +--- src/apps/ocioarchive/CMakeLists.txt ++++ src/apps/ocioarchive/CMakeLists.txt +@@ -21,7 +21,7 @@ target_link_libraries(ocioarchive + PRIVATE + apputils + OpenColorIO +- MINIZIP::minizip-ng ++ MINIZIP::minizip + ) + + include(StripUtils) +diff --git src/apps/ociobakelut/CMakeLists.txt src/apps/ociobakelut/CMakeLists.txt +index 3d6e586b..f7069a1f 100755 +--- src/apps/ociobakelut/CMakeLists.txt ++++ src/apps/ociobakelut/CMakeLists.txt +@@ -29,7 +29,7 @@ set_target_properties(ociobakelut + target_link_libraries(ociobakelut + PRIVATE + apputils +- lcms2::lcms2 ++ lcms::lcms + OpenColorIO + ) + diff --git a/recipes/opencolorio/all/patches/fix-cmake-source-dir-and-targets.patch b/recipes/opencolorio/all/patches/fix-cmake-source-dir-and-targets.patch deleted file mode 100644 index c9f1055c82e2c..0000000000000 --- a/recipes/opencolorio/all/patches/fix-cmake-source-dir-and-targets.patch +++ /dev/null @@ -1,86 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index b0840ac2..e4875ab6 100755 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -9,9 +9,9 @@ cmake_minimum_required(VERSION 3.12) - - set(CMAKE_MODULE_PATH - ${CMAKE_MODULE_PATH} -- ${CMAKE_SOURCE_DIR}/share/cmake/utils -- ${CMAKE_SOURCE_DIR}/share/cmake/macros -- ${CMAKE_SOURCE_DIR}/share/cmake/modules -+ ${CMAKE_CURRENT_SOURCE_DIR}/share/cmake/utils -+ ${CMAKE_CURRENT_SOURCE_DIR}/share/cmake/macros -+ ${CMAKE_CURRENT_SOURCE_DIR}/share/cmake/modules - ) - - set(CMAKE_WARN_DEPRECATED ON) -@@ -272,7 +272,7 @@ else() - set(OCIO_SETUP_NAME setup_ocio.sh) - endif() - --configure_file(${CMAKE_SOURCE_DIR}/share/ocio/${OCIO_SETUP_NAME}.in -+configure_file(${PROJECT_SOURCE_DIR}/share/ocio/${OCIO_SETUP_NAME}.in - ${CMAKE_CURRENT_BINARY_DIR}/share/ocio/${OCIO_SETUP_NAME} @ONLY) - - INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/share/ocio/${OCIO_SETUP_NAME} DESTINATION share/ocio/) -diff --git a/share/cmake/modules/FindExtPackages.cmake b/share/cmake/modules/FindExtPackages.cmake -index 86a02258..a8fed622 100644 ---- a/share/cmake/modules/FindExtPackages.cmake -+++ b/share/cmake/modules/FindExtPackages.cmake -@@ -26,7 +26,7 @@ set(CMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY ON CACHE BOOL - - # expat - # https://github.com/libexpat/libexpat --find_package(expat 2.2.8 REQUIRED) -+find_package(EXPAT 2.2.8 REQUIRED) - - # yaml-cpp - # https://github.com/jbeder/yaml-cpp -@@ -50,9 +50,9 @@ else() - - # OpenEXR/IlmBase (<=2.5) - # https://github.com/AcademySoftwareFoundation/openexr -- find_package(Half 2.4.0 REQUIRED) -+ find_package(OpenEXR 2.4.0 REQUIRED) - -- set(OCIO_HALF_LIB IlmBase::Half CACHE STRING "Half library target" FORCE) -+ set(OCIO_HALF_LIB OpenEXR::Half CACHE STRING "Half library target" FORCE) - set(OCIO_USE_IMATH_HALF "0" CACHE STRING "Whether 'half' type will be sourced from the Imath library (>=v3.0)" FORCE) - endif() - -@@ -65,7 +65,7 @@ if(OCIO_BUILD_APPS) - - # lcms2 - # https://github.com/mm2/Little-CMS -- find_package(lcms2 2.2 REQUIRED) -+ find_package(lcms 2.2 REQUIRED) - endif() - - if(OCIO_BUILD_OPENFX) -diff --git a/src/OpenColorIO/CMakeLists.txt b/src/OpenColorIO/CMakeLists.txt -index be50b7b6..8423a099 100755 ---- a/src/OpenColorIO/CMakeLists.txt -+++ b/src/OpenColorIO/CMakeLists.txt -@@ -211,7 +211,7 @@ target_link_libraries(OpenColorIO - PUBLIC - OpenColorIOHeaders - PRIVATE -- expat::expat -+ EXPAT::EXPAT - ${OCIO_HALF_LIB} - pystring::pystring - sampleicc::sampleicc -diff --git a/src/apps/ociobakelut/CMakeLists.txt b/src/apps/ociobakelut/CMakeLists.txt -index 7eb1cd8a..de136073 100755 ---- a/src/apps/ociobakelut/CMakeLists.txt -+++ b/src/apps/ociobakelut/CMakeLists.txt -@@ -35,7 +35,7 @@ set_target_properties(ociobakelut - target_link_libraries(ociobakelut - PRIVATE - apputils -- lcms2::lcms2 -+ lcms::lcms - OpenColorIO - ) - diff --git a/recipes/opencolorio/all/patches/pstring.patch b/recipes/opencolorio/all/patches/pstring.patch deleted file mode 100644 index 38f15d7e20889..0000000000000 --- a/recipes/opencolorio/all/patches/pstring.patch +++ /dev/null @@ -1,117 +0,0 @@ -diff --git a/src/OpenColorIO/Context.cpp b/src/OpenColorIO/Context.cpp -index 26fdcbee..9ddb4522 100644 ---- a/src/OpenColorIO/Context.cpp -+++ b/src/OpenColorIO/Context.cpp -@@ -14,7 +14,7 @@ - #include "Mutex.h" - #include "PathUtils.h" - #include "PrivateTypes.h" --#include "pystring/pystring.h" -+#include "pystring.h" - #include "utils/StringUtils.h" - - -diff --git a/src/OpenColorIO/OCIOYaml.cpp b/src/OpenColorIO/OCIOYaml.cpp -index 67cafdf1..744fb817 100644 ---- a/src/OpenColorIO/OCIOYaml.cpp -+++ b/src/OpenColorIO/OCIOYaml.cpp -@@ -19,7 +19,7 @@ - #include "ParseUtils.h" - #include "PathUtils.h" - #include "Platform.h" --#include "pystring/pystring.h" -+#include "pystring.h" - #include "utils/StringUtils.h" - #include "ViewingRules.h" - #include "yaml-cpp/yaml.h" -diff --git a/src/OpenColorIO/Op.cpp b/src/OpenColorIO/Op.cpp -index ebbba040..08db0f68 100755 ---- a/src/OpenColorIO/Op.cpp -+++ b/src/OpenColorIO/Op.cpp -@@ -20,7 +20,7 @@ - #include "ops/lut1d/Lut1DOp.h" - #include "ops/lut3d/Lut3DOp.h" - #include "ops/range/RangeOp.h" --#include "pystring/pystring.h" -+#include "pystring.h" - - namespace OCIO_NAMESPACE - { -diff --git a/src/OpenColorIO/PathUtils.cpp b/src/OpenColorIO/PathUtils.cpp -index 7ed5e9e8..e71d03d9 100644 ---- a/src/OpenColorIO/PathUtils.cpp -+++ b/src/OpenColorIO/PathUtils.cpp -@@ -10,7 +10,7 @@ - - #include "Mutex.h" - #include "PathUtils.h" --#include "pystring/pystring.h" -+#include "pystring.h" - #include "utils/StringUtils.h" - - #if !defined(_WIN32) -diff --git a/src/OpenColorIO/fileformats/FileFormatCTF.cpp b/src/OpenColorIO/fileformats/FileFormatCTF.cpp -index 89c13066..648aabc0 100644 ---- a/src/OpenColorIO/fileformats/FileFormatCTF.cpp -+++ b/src/OpenColorIO/fileformats/FileFormatCTF.cpp -@@ -22,7 +22,7 @@ - #include "OpBuilders.h" - #include "ops/noop/NoOps.h" - #include "Platform.h" --#include "pystring/pystring.h" -+#include "pystring.h" - #include "TransformBuilder.h" - #include "transforms/FileTransform.h" - #include "utils/StringUtils.h" -diff --git a/src/OpenColorIO/fileformats/FileFormatDiscreet1DL.cpp b/src/OpenColorIO/fileformats/FileFormatDiscreet1DL.cpp -index a52bc728..bd827f06 100755 ---- a/src/OpenColorIO/fileformats/FileFormatDiscreet1DL.cpp -+++ b/src/OpenColorIO/fileformats/FileFormatDiscreet1DL.cpp -@@ -16,7 +16,7 @@ - #include "ops/lut1d/Lut1DOp.h" - #include "ops/lut3d/Lut3DOp.h" - #include "ParseUtils.h" --#include "pystring/pystring.h" -+#include "pystring.h" - #include "Platform.h" - #include "transforms/FileTransform.h" - #include "utils/StringUtils.h" -diff --git a/src/OpenColorIO/fileformats/FileFormatICC.cpp b/src/OpenColorIO/fileformats/FileFormatICC.cpp -index df86206e..b6983cf6 100755 ---- a/src/OpenColorIO/fileformats/FileFormatICC.cpp -+++ b/src/OpenColorIO/fileformats/FileFormatICC.cpp -@@ -12,7 +12,7 @@ - #include "ops/gamma/GammaOp.h" - #include "ops/lut1d/Lut1DOp.h" - #include "ops/matrix/MatrixOp.h" --#include "pystring/pystring.h" -+#include "pystring.h" - #include "transforms/FileTransform.h" - - -diff --git a/src/OpenColorIO/fileformats/FileFormatIridasLook.cpp b/src/OpenColorIO/fileformats/FileFormatIridasLook.cpp -index 0f83f5b3..d6ee59de 100755 ---- a/src/OpenColorIO/fileformats/FileFormatIridasLook.cpp -+++ b/src/OpenColorIO/fileformats/FileFormatIridasLook.cpp -@@ -13,7 +13,7 @@ - #include "ops/lut3d/Lut3DOp.h" - #include "ParseUtils.h" - #include "Platform.h" --#include "pystring/pystring.h" -+#include "pystring.h" - #include "transforms/FileTransform.h" - #include "utils/StringUtils.h" - -diff --git a/src/OpenColorIO/transforms/FileTransform.cpp b/src/OpenColorIO/transforms/FileTransform.cpp -index 4f6ea887..97621959 100755 ---- a/src/OpenColorIO/transforms/FileTransform.cpp -+++ b/src/OpenColorIO/transforms/FileTransform.cpp -@@ -17,7 +17,7 @@ - #include "ops/noop/NoOps.h" - #include "PathUtils.h" - #include "Platform.h" --#include "pystring/pystring.h" -+#include "pystring.h" - #include "utils/StringUtils.h" - - diff --git a/recipes/opencolorio/all/patches/strlen.patch b/recipes/opencolorio/all/patches/strlen.patch deleted file mode 100644 index b90bcdfcf5d57..0000000000000 --- a/recipes/opencolorio/all/patches/strlen.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/src/OpenColorIO/FileRules.cpp b/src/OpenColorIO/FileRules.cpp -index 794dfdbe..94729459 100644 ---- a/src/OpenColorIO/FileRules.cpp -+++ b/src/OpenColorIO/FileRules.cpp -@@ -6,6 +6,7 @@ - #include - #include - #include -+#include - - #include - diff --git a/recipes/opencolorio/config.yml b/recipes/opencolorio/config.yml index fdcf6dcec8972..3a2be0bda0d0a 100644 --- a/recipes/opencolorio/config.yml +++ b/recipes/opencolorio/config.yml @@ -1,4 +1,6 @@ versions: + "2.4.0": + folder: "all" "2.3.2": folder: "all" "2.3.1": diff --git a/recipes/opencv/4.x/conandata.yml b/recipes/opencv/4.x/conandata.yml index d536778d0cf88..8c1ffb58a9492 100644 --- a/recipes/opencv/4.x/conandata.yml +++ b/recipes/opencv/4.x/conandata.yml @@ -1,4 +1,9 @@ sources: + "4.10.0": + - url: "https://github.com/opencv/opencv/archive/refs/tags/4.10.0.tar.gz" + sha256: "b2171af5be6b26f7a06b1229948bbb2bdaa74fcf5cd097e0af6378fce50a6eb9" + - url: "https://github.com/opencv/opencv_contrib/archive/refs/tags/4.10.0.tar.gz" + sha256: "65597f8fb8dc2b876c1b45b928bbcc5f772ddbaf97539bf1b737623d0604cba1" "4.9.0": - url: "https://github.com/opencv/opencv/archive/refs/tags/4.9.0.tar.gz" sha256: "ddf76f9dffd322c7c3cb1f721d0887f62d747b82059342213138dc190f28bc6c" @@ -25,6 +30,28 @@ sources: - url: "https://github.com/opencv/opencv_contrib/archive/refs/tags/4.1.2.tar.gz" sha256: "0f6c3d30baa39e3e7611afb481ee86dea45dafb182cac87d570c95dccd83eb8b" patches: + "4.10.0": + - patch_file: "patches/4.5.5-0001-find-openexr.patch" + patch_description: "Robust discovery & injection of OpenEXR" + patch_type: "conan" + - patch_file: "patches/4.5.5-0003-find-quirc.patch" + patch_description: "Robust discovery & injection of quirc" + patch_type: "conan" + - patch_file: "patches/4.8.1-0001-find-ade.patch" + patch_description: "Robust discovery & injection of ade" + patch_type: "conan" + - patch_file: "patches/4.5.1-0001-tracking-no-plot-deps.patch" + patch_description: "Fix requirements of tracking module" + patch_type: "conan" + - patch_file: "patches/4.1.2-0006-hdf.patch" + patch_description: "Robust discovery of hdf" + patch_type: "conan" + - patch_file: "patches/4.10.0-0001-fix-zlib-static-android.patch" + patch_description: "Fix discovery of zlib static if Android" + patch_type: "conan" + - patch_file: "patches/4.1.2-0007-android-install-layout.patch" + patch_description: "Honor install layout from conan if Android" + patch_type: "conan" "4.9.0": - patch_file: "patches/4.5.5-0001-find-openexr.patch" patch_description: "Robust discovery & injection of OpenEXR" diff --git a/recipes/opencv/4.x/conanfile.py b/recipes/opencv/4.x/conanfile.py index 27d637332f3ab..491ff108378e7 100644 --- a/recipes/opencv/4.x/conanfile.py +++ b/recipes/opencv/4.x/conanfile.py @@ -6,7 +6,7 @@ from conan.tools.env import VirtualBuildEnv, VirtualRunEnv from conan.tools.files import apply_conandata_patches, collect_libs, copy, export_conandata_patches, get, rename, replace_in_file, rmdir, save from conan.tools.gnu import PkgConfigDeps -from conan.tools.microsoft import is_msvc, is_msvc_static_runtime +from conan.tools.microsoft import msvc_runtime_flag from conan.tools.scm import Version import os import re @@ -191,15 +191,15 @@ class OpenCVConan(ConanFile): "with_jpeg": "libjpeg", "with_png": True, "with_tiff": True, - "with_jpeg2000": "jasper", + "with_jpeg2000": "openjpeg", "with_openexr": True, "with_webp": True, "with_gdal": False, "with_gdcm": False, - "with_imgcodec_hdr": False, - "with_imgcodec_pfm": False, - "with_imgcodec_pxm": False, - "with_imgcodec_sunraster": False, + "with_imgcodec_hdr": True, + "with_imgcodec_pfm": True, + "with_imgcodec_pxm": True, + "with_imgcodec_sunraster": True, "with_msmf": True, "with_msmf_dxva": True, # objdetect module options @@ -220,6 +220,14 @@ class OpenCVConan(ConanFile): short_paths = True + @property + def _is_cl_like(self): + return self.settings.compiler.get_safe("runtime") is not None + + @property + def _is_cl_like_static_runtime(self): + return self._is_cl_like and "MT" in msvc_runtime_flag(self) + @property def _is_mingw(self): return self.settings.os == "Windows" and self.settings.compiler == "gcc" @@ -311,10 +319,13 @@ def config_options(self): else: del self.options.with_ffmpeg - if "arm" not in self.settings.arch: - del self.options.neon if not self._has_with_jpeg2000_option: del self.options.with_jpeg2000 + elif Version(self.version) < "4.3.0": + self.options.with_jpeg2000 = "jasper" + + if "arm" not in self.settings.arch: + del self.options.neon if not self._has_with_tiff_option: del self.options.with_tiff if not self._has_superres_option: @@ -1190,8 +1201,8 @@ def validate(self): self._check_mandatory_options(self._opencv_modules) if self.settings.compiler.get_safe("cppstd"): check_min_cppstd(self, 11) - if self.options.shared and is_msvc(self) and is_msvc_static_runtime(self): - raise ConanInvalidConfiguration("Visual Studio with static runtime is not supported for shared library.") + if self.options.shared and self._is_cl_like and self._is_cl_like_static_runtime: + raise ConanInvalidConfiguration("MSVC or clang-cl with static runtime are not supported for shared library.") if self.settings.compiler == "clang" and Version(self.settings.compiler.version) < "4": raise ConanInvalidConfiguration("Clang 3.x can't build OpenCV 4.x due to an internal bug.") if self.options.get_safe("dnn_cuda") and \ @@ -1204,6 +1215,9 @@ def validate(self): raise ConanInvalidConfiguration( "viz module can't be enabled yet. It requires VTK which is not available in conan-center." ) + if self.options.get_safe("with_jpeg2000") == "openjpeg" and Version(self.version) < "4.3.0": + raise ConanInvalidConfiguration("openjpeg is not available for OpenCV before 4.3.0") + def build_requirements(self): if self.options.get_safe("with_protobuf"): @@ -1445,7 +1459,7 @@ def generate(self): tc.variables["WITH_GDAL"] = self.options.get_safe("with_gdal", False) tc.variables["WITH_GDCM"] = self.options.get_safe("with_gdcm", False) tc.variables["WITH_EIGEN"] = self.options.with_eigen - tc.variables["WITH_DSHOW"] = is_msvc(self) + tc.variables["WITH_DSHOW"] = self._is_cl_like tc.variables["WITH_MSMF"] = self.options.get_safe("with_msmf", False) tc.variables["WITH_MSMF_DXVA"] = self.options.get_safe("with_msmf_dxva", False) tc.variables["OPENCV_MODULES_PUBLIC"] = "opencv" @@ -1478,6 +1492,15 @@ def generate(self): tc.variables["WITH_AVIF"] = self.options.get_safe("with_avif", False) tc.variables["WITH_FLATBUFFERS"] = self.options.get_safe("with_flatbuffers", False) + if Version(self.version) >= "4.10.0": + tc.variables["WITH_KLEIDICV"] = False + tc.variables["WITH_NDSRVP"] = False + tc.variables["OBSENSOR_USE_ORBBEC_SDK"] = False + if is_apple_os(self): + # default behavior for 4.9.0 + tc.variables["WITH_OBSENSOR"] = False + tc.variables["WITH_ZLIB_NG"] = False + # Special world option merging all enabled modules into one big library file tc.variables["BUILD_opencv_world"] = self.options.world @@ -1522,8 +1545,8 @@ def generate(self): tc.variables["ENABLE_PIC"] = self.options.get_safe("fPIC", True) tc.variables["ENABLE_CCACHE"] = False - if is_msvc(self): - tc.variables["BUILD_WITH_STATIC_CRT"] = is_msvc_static_runtime(self) + if self._is_cl_like: + tc.variables["BUILD_WITH_STATIC_CRT"] = self._is_cl_like_static_runtime if self.settings.os == "Android": tc.variables["BUILD_ANDROID_EXAMPLES"] = False diff --git a/recipes/opencv/4.x/patches/4.10.0-0001-fix-zlib-static-android.patch b/recipes/opencv/4.x/patches/4.10.0-0001-fix-zlib-static-android.patch new file mode 100644 index 0000000000000..aae16f037e565 --- /dev/null +++ b/recipes/opencv/4.x/patches/4.10.0-0001-fix-zlib-static-android.patch @@ -0,0 +1,17 @@ +--- a/cmake/OpenCVFindLibsGrfmt.cmake ++++ b/cmake/OpenCVFindLibsGrfmt.cmake +@@ -20,12 +20,12 @@ if(BUILD_ZLIB) + ocv_clear_vars(ZLIB_FOUND) + else() + ocv_clear_internal_cache_vars(ZLIB_LIBRARY ZLIB_INCLUDE_DIR) +- if(ANDROID) ++ if(0) + set(_zlib_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES}) + set(CMAKE_FIND_LIBRARY_SUFFIXES .so) + endif() + find_package(ZLIB "${MIN_VER_ZLIB}") +- if(ANDROID) ++ if(0) + set(CMAKE_FIND_LIBRARY_SUFFIXES ${_zlib_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES}) + unset(_zlib_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES) + endif() diff --git a/recipes/opencv/config.yml b/recipes/opencv/config.yml index 42e7008ac9ec0..826190b23d258 100644 --- a/recipes/opencv/config.yml +++ b/recipes/opencv/config.yml @@ -1,4 +1,6 @@ versions: + "4.10.0": + folder: "4.x" "4.9.0": folder: "4.x" "4.8.1": diff --git a/recipes/openexr/2.x/conanfile.py b/recipes/openexr/2.x/conanfile.py index 564b19b00cd64..8cf1e63318981 100644 --- a/recipes/openexr/2.x/conanfile.py +++ b/recipes/openexr/2.x/conanfile.py @@ -141,6 +141,9 @@ def package_info(self): # waiting an implementation of https://github.com/conan-io/conan/issues/9000 self.cpp_info.set_property("cmake_file_name", "OpenEXR") + # Avoid conflict in PkgConfigDeps with OpenEXR.pc file coming from openexr_ilmimf component + self.cpp_info.set_property("pkg_config_name", "openexr_conan_full_package") + lib_suffix = "" if not self.options.shared or self.settings.os == "Windows": openexr_version = Version(self.version) diff --git a/recipes/openexr/2.x/test_package/comp_short_decode_piz.exr b/recipes/openexr/2.x/test_package/comp_short_decode_piz.exr deleted file mode 100644 index 3a16d594b3028..0000000000000 Binary files a/recipes/openexr/2.x/test_package/comp_short_decode_piz.exr and /dev/null differ diff --git a/recipes/openexr/2.x/test_package/conanfile.py b/recipes/openexr/2.x/test_package/conanfile.py index f3a059b562841..3a8c6c5442b33 100644 --- a/recipes/openexr/2.x/test_package/conanfile.py +++ b/recipes/openexr/2.x/test_package/conanfile.py @@ -22,5 +22,4 @@ def build(self): def test(self): if not cross_building(self): bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") - imgfile = os.path.join(self.source_folder, "comp_short_decode_piz.exr") - self.run(f"{bin_path} {imgfile}", env="conanrun") + self.run(bin_path, env="conanrun") diff --git a/recipes/openexr/2.x/test_package/test_package.cpp b/recipes/openexr/2.x/test_package/test_package.cpp index f5c9cab11b69e..d0aa6adf400d6 100644 --- a/recipes/openexr/2.x/test_package/test_package.cpp +++ b/recipes/openexr/2.x/test_package/test_package.cpp @@ -1,18 +1,11 @@ #include #include -#include -#include -#include +#include int main (int argc, char *argv[]) { - if (argc < 2) - return EXIT_FAILURE; - Imf::RgbaInputFile input_file(argv[1]); - const Imf::Header& header = input_file.header(); - size_t width = header.dataWindow().max.x - header.dataWindow().min.x + 1; - size_t height = header.dataWindow().max.y - header.dataWindow().min.y + 1; - std::cout << "OpenEXR images size is " << width << "x" << height << std::endl; + Imf::Header header; + std::cout << "Test: " << header.screenWindowWidth() << std::endl; return EXIT_SUCCESS; } diff --git a/recipes/openexr/3.x/conandata.yml b/recipes/openexr/3.x/conandata.yml index 1d8f995d131a6..f72c754e5eb5b 100644 --- a/recipes/openexr/3.x/conandata.yml +++ b/recipes/openexr/3.x/conandata.yml @@ -1,4 +1,10 @@ sources: + "3.3.1": + url: "https://github.com/AcademySoftwareFoundation/openexr/archive/refs/tags/v3.3.1.tar.gz" + sha256: "58aad2b32c047070a52f1205b309bdae007442e0f983120e4ff57551eb6f10f1" + "3.3.0": + url: "https://github.com/AcademySoftwareFoundation/openexr/archive/refs/tags/v3.3.0.tar.gz" + sha256: "58b00f50d2012f3107573c4b7371f70516d2972c2b301a50925e1b4a60a7be6f" "3.2.4": url: "https://github.com/AcademySoftwareFoundation/openexr/archive/refs/tags/v3.2.4.tar.gz" sha256: "81e6518f2c4656fdeaf18a018f135e96a96e7f66dbe1c1f05860dd94772176cc" diff --git a/recipes/openexr/3.x/conanfile.py b/recipes/openexr/3.x/conanfile.py index 0948ac5e19152..e538cc4469902 100644 --- a/recipes/openexr/3.x/conanfile.py +++ b/recipes/openexr/3.x/conanfile.py @@ -1,4 +1,5 @@ from conan import ConanFile +from conan.errors import ConanInvalidConfiguration from conan.tools.build import check_min_cppstd from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout from conan.tools.files import apply_conandata_patches, export_conandata_patches, copy, get, rmdir, replace_in_file @@ -29,8 +30,18 @@ class OpenEXRConan(ConanFile): @property def _min_cppstd(self): + if Version(self.version) >= "3.3": + return 17 return 11 + @property + def _minimum_compiler_version(self): + return { + "17": { + "gcc": "9" + } + }.get(str(self._min_cppstd), {}) + @property def _with_libdeflate(self): return Version(self.version) >= "3.2" @@ -60,6 +71,10 @@ def validate(self): if self.settings.compiler.get_safe("cppstd"): check_min_cppstd(self, self._min_cppstd) + minimum_version = self._minimum_compiler_version.get(str(self.settings.compiler)) + if minimum_version and Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration(f"{self.ref} requires {self.settings.compiler} >= {minimum_version}") + def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) diff --git a/recipes/openexr/3.x/test_package/comp_short_decode_piz.exr b/recipes/openexr/3.x/test_package/comp_short_decode_piz.exr deleted file mode 100644 index 3a16d594b3028..0000000000000 Binary files a/recipes/openexr/3.x/test_package/comp_short_decode_piz.exr and /dev/null differ diff --git a/recipes/openexr/3.x/test_package/conanfile.py b/recipes/openexr/3.x/test_package/conanfile.py index 96999743e2fb9..8a5bb47f50c4c 100644 --- a/recipes/openexr/3.x/test_package/conanfile.py +++ b/recipes/openexr/3.x/test_package/conanfile.py @@ -23,5 +23,4 @@ def build(self): def test(self): if can_run(self): bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") - imgfile = os.path.join(self.source_folder, "comp_short_decode_piz.exr") - self.run(f"{bin_path} {imgfile}", env="conanrun") + self.run(bin_path, env="conanrun") diff --git a/recipes/openexr/3.x/test_package/test_package.cpp b/recipes/openexr/3.x/test_package/test_package.cpp index f5c9cab11b69e..d0aa6adf400d6 100644 --- a/recipes/openexr/3.x/test_package/test_package.cpp +++ b/recipes/openexr/3.x/test_package/test_package.cpp @@ -1,18 +1,11 @@ #include #include -#include -#include -#include +#include int main (int argc, char *argv[]) { - if (argc < 2) - return EXIT_FAILURE; - Imf::RgbaInputFile input_file(argv[1]); - const Imf::Header& header = input_file.header(); - size_t width = header.dataWindow().max.x - header.dataWindow().min.x + 1; - size_t height = header.dataWindow().max.y - header.dataWindow().min.y + 1; - std::cout << "OpenEXR images size is " << width << "x" << height << std::endl; + Imf::Header header; + std::cout << "Test: " << header.screenWindowWidth() << std::endl; return EXIT_SUCCESS; } diff --git a/recipes/openexr/config.yml b/recipes/openexr/config.yml index 7a8a2874719ef..3021fc4bf95f8 100644 --- a/recipes/openexr/config.yml +++ b/recipes/openexr/config.yml @@ -1,4 +1,8 @@ versions: + "3.3.1": + folder: "3.x" + "3.3.0": + folder: "3.x" "3.2.4": folder: "3.x" "3.2.3": diff --git a/recipes/openfbx/all/test_package/conanfile.py b/recipes/openfbx/all/test_package/conanfile.py index 7635e9e283758..0a6bc68712d90 100644 --- a/recipes/openfbx/all/test_package/conanfile.py +++ b/recipes/openfbx/all/test_package/conanfile.py @@ -23,5 +23,4 @@ def build(self): def test(self): if can_run(self): bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") - fbx_path = os.path.join(self.source_folder, "d.fbx") - self.run(f"{bin_path} {fbx_path}", env="conanrun") + self.run(bin_path, env="conanrun") diff --git a/recipes/openfbx/all/test_package/d.fbx b/recipes/openfbx/all/test_package/d.fbx deleted file mode 100644 index 147ec354d2be2..0000000000000 Binary files a/recipes/openfbx/all/test_package/d.fbx and /dev/null differ diff --git a/recipes/openfbx/all/test_package/test_package.cpp b/recipes/openfbx/all/test_package/test_package.cpp index be802370b1f87..a45770bbd5562 100644 --- a/recipes/openfbx/all/test_package/test_package.cpp +++ b/recipes/openfbx/all/test_package/test_package.cpp @@ -5,17 +5,11 @@ #include int main(int argc, char **argv) { - if (argc < 2) { - std::cerr << "Need at least one argument" << std::endl; - return -1; - } - std::ifstream in_file(argv[1], std::ios::binary); - in_file.seekg(0, std::ios::end); - int file_size = static_cast(in_file.tellg()); - std::vector content(file_size); + std::vector content(13); + ofbx::IScene *g_scene = ofbx::load(&content[0], 13, static_cast(ofbx::LoadFlags::TRIANGULATE)); - ofbx::IScene *g_scene = ofbx::load(&content[0], file_size, static_cast(ofbx::LoadFlags::TRIANGULATE)); + std::cout << "Test: " << g_scene << std::endl; return 0; } diff --git a/recipes/openfbx/all/test_v1_package/conanfile.py b/recipes/openfbx/all/test_v1_package/conanfile.py index fad029416492d..38f4483872d47 100644 --- a/recipes/openfbx/all/test_v1_package/conanfile.py +++ b/recipes/openfbx/all/test_v1_package/conanfile.py @@ -14,5 +14,4 @@ def build(self): def test(self): if not tools.cross_building(self): bin_path = os.path.join("bin", "test_package") - fbx_path = os.path.join(self.source_folder, os.pardir, "test_package", "d.fbx") - self.run(f"{bin_path} {fbx_path}", run_environment=True) + self.run(bin_path, run_environment=True) diff --git a/recipes/openfx/all/conanfile.py b/recipes/openfx/all/conanfile.py index 935c3113a9393..2fa66bbb90d2a 100644 --- a/recipes/openfx/all/conanfile.py +++ b/recipes/openfx/all/conanfile.py @@ -50,7 +50,7 @@ def layout(self): def requirements(self): self.requires("opengl/system") - self.requires("expat/2.5.0") + self.requires("expat/[>=2.6.2 <3]") def validate(self): if self.settings.compiler.get_safe("cppstd"): diff --git a/recipes/opengl-registry/all/conandata.yml b/recipes/opengl-registry/all/conandata.yml index 1fa4f5c98ec9a..fad17557e62be 100644 --- a/recipes/opengl-registry/all/conandata.yml +++ b/recipes/opengl-registry/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "20240721": + url: "https://github.com/KhronosGroup/OpenGL-Registry/archive/d2fe2072a3aecf3e9ef1568976e805531b50d959.tar.gz" + sha256: "0c8295a95e137b0dabd5ad138ad41d96b40e85bcca848b62a3e13378e425a08a" "cci.20220929": url: "https://github.com/KhronosGroup/OpenGL-Registry/archive/5bae8738b23d06968e7c3a41308568120943ae77.tar.gz" sha256: "e69eb5738a517737d91717c4f9bb8da1e1fac7a04afe0fc24532ca92df1da53d" diff --git a/recipes/opengl-registry/all/test_package/test_package.c b/recipes/opengl-registry/all/test_package/test_package.c index a9cb3640b85e1..947465a4a0c1c 100644 --- a/recipes/opengl-registry/all/test_package/test_package.c +++ b/recipes/opengl-registry/all/test_package/test_package.c @@ -4,6 +4,7 @@ #include int main() { + printf("GL_GLEXT_VERSION: %d\n", GL_GLEXT_VERSION); GLenum value = GL_UNSIGNED_BYTE_3_3_2; printf("GL_UNSIGNED_BYTE_3_3_2: %x\n", value); return EXIT_SUCCESS; diff --git a/recipes/opengl-registry/config.yml b/recipes/opengl-registry/config.yml index 0168ee0addf88..07c28129c1bb5 100644 --- a/recipes/opengl-registry/config.yml +++ b/recipes/opengl-registry/config.yml @@ -1,3 +1,5 @@ versions: + "20240721": + folder: all "cci.20220929": folder: all diff --git a/recipes/opengl/all/conanfile.py b/recipes/opengl/all/conanfile.py index 21ba6fcb6a6e6..ca99bbad2e12f 100644 --- a/recipes/opengl/all/conanfile.py +++ b/recipes/opengl/all/conanfile.py @@ -23,6 +23,9 @@ def package_id(self): self.info.clear() def system_requirements(self): + if self.settings.os not in ["Linux", "FreeBSD", "SunOS"]: + return + dnf = package_manager.Dnf(self) dnf.install_substitutes(["libglvnd-devel"], ["mesa-libGL-devel"], update=True, check=True) @@ -36,12 +39,15 @@ def system_requirements(self): pacman.install(["libglvnd"], update=True, check=True) zypper = package_manager.Zypper(self) - zypper.install_substitutes(["Mesa-libGL-devel", "glproto-devel"], + zypper.install_substitutes(["Mesa-libGL-devel", "glproto-devel"], ["Mesa-libGL-devel", "xorgproto-devel"], update=True, check=True) pkg = package_manager.Pkg(self) pkg.install(["libglvnd"], update=True, check=True) + pkg_util = package_manager.PkgUtil(self) + pkg_util.install(["mesalibs"], update=True, check=True) + def package_info(self): # TODO: Workaround for #2311 until a better solution can be found self.cpp_info.filenames["cmake_find_package"] = "opengl_system" @@ -57,6 +63,6 @@ def package_info(self): self.cpp_info.frameworks.append("OpenGL") elif self.settings.os == "Windows": self.cpp_info.system_libs = ["opengl32"] - elif self.settings.os in ["Linux", "FreeBSD"]: + elif self.settings.os in ["Linux", "FreeBSD", "SunOS"]: pkg_config = PkgConfig(self, 'gl') pkg_config.fill_cpp_info(self.cpp_info, is_system=self.settings.os != "FreeBSD") diff --git a/recipes/openh264/all/conandata.yml b/recipes/openh264/all/conandata.yml index 679b1b0e3b70d..952b7e0034b6e 100644 --- a/recipes/openh264/all/conandata.yml +++ b/recipes/openh264/all/conandata.yml @@ -1,38 +1,10 @@ sources: + "2.4.1": + url: "https://github.com/cisco/openh264/archive/refs/tags/v2.4.1.tar.gz" + sha256: "8ffbe944e74043d0d3fb53d4a2a14c94de71f58dbea6a06d0dc92369542958ea" "2.3.1": url: "https://github.com/cisco/openh264/archive/refs/tags/v2.3.1.tar.gz" sha256: "453afa66dacb560bc5fd0468aabee90c483741571bca820a39a1c07f0362dc32" "2.1.1": url: "https://github.com/cisco/openh264/archive/v2.1.1.tar.gz" sha256: "af173e90fce65f80722fa894e1af0d6b07572292e76de7b65273df4c0a8be678" - "1.7.0": - url: "https://github.com/cisco/openh264/archive/v1.7.0.tar.gz" - sha256: "9c07c38d7de00046c9c52b12c76a2af7648b70d05bd5460c8b67f6895738653f" -patches: - "2.3.1": - - patch_file: "patches/2.3.1-0001-platform-android.mk.patch" - patch_type: "portability" - patch_description: "Android Fix" - - patch_file: "patches/2.3.1-0002-macos-relocatable-shared.patch" - patch_type: "portability" - patch_description: "Macos relocatable shared fix" - "2.1.1": - - patch_file: "patches/2.1.1-0001-platform-android.mk.patch" - patch_type: "portability" - patch_description: "Android Fix" - - patch_file: "patches/2.1.1-0002-macos-relocatable-shared.patch" - patch_type: "portability" - patch_description: "Macos relocatable shared fix" - - patch_file: "patches/1.7.0-0004-mingw-override-CC-CXX-AR-from-env.patch" - patch_type: "portability" - patch_description: "Mingw Override CC CXX AR from env Fix" - "1.7.0": - - patch_file: "patches/1.7.0-0001-platform-android.mk.patch" - patch_type: "portability" - patch_description: "Android Fix" - - patch_file: "patches/1.7.0-0002-macos-relocatable-shared.patch" - patch_type: "portability" - patch_description: "Macos relocatable shared fix" - - patch_file: "patches/1.7.0-0004-mingw-override-CC-CXX-AR-from-env.patch" - patch_type: "portability" - patch_description: "Mingw Override CC CXX AR from env Fix" diff --git a/recipes/openh264/all/conanfile.py b/recipes/openh264/all/conanfile.py index 00cb4e7604b28..5b20e84d4fa4c 100644 --- a/recipes/openh264/all/conanfile.py +++ b/recipes/openh264/all/conanfile.py @@ -1,16 +1,18 @@ from conan import ConanFile from conan.tools.build import stdcpp_library from conan.tools.env import VirtualBuildEnv -from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rmdir, replace_in_file, chdir -from conan.tools.gnu import Autotools, AutotoolsToolchain -from conan.tools.apple import is_apple_os, fix_apple_shared_install_name +from conan.tools.files import copy, get, rmdir, rm, rename, replace_in_file from conan.tools.layout import basic_layout -from conan.tools.microsoft import check_min_vs, is_msvc, unix_path, msvc_runtime_flag +from conan.tools.microsoft import is_msvc +from conan.tools.apple import fix_apple_shared_install_name +from conan.tools.scm import Version +from conan.tools.meson import Meson, MesonToolchain +from conan.errors import ConanInvalidConfiguration import os -required_conan_version = ">=1.57.0" +required_conan_version = ">=1.54.0" class OpenH264Conan(ConanFile): @@ -31,16 +33,13 @@ class OpenH264Conan(ConanFile): "fPIC": True, } - @property - def _settings_build(self): - return getattr(self, "settings_build", self.settings) - @property def _is_clang_cl(self): return self.settings.os == 'Windows' and self.settings.compiler == 'clang' - def export_sources(self): - export_conandata_patches(self) + @property + def _preserve_dll_name(self): + return (is_msvc(self) or self._is_clang_cl) and Version(self.version) <= "2.4.1" and self.options.shared def config_options(self): if self.settings.os == "Windows": @@ -54,137 +53,80 @@ def layout(self): basic_layout(self, src_folder="src") def build_requirements(self): - if self.settings.arch in ("x86", "x86_64"): - self.tool_requires("nasm/2.15.05") - if self._settings_build.os == "Windows": - self.win_bash = True - if not self.conf.get("tools.microsoft.bash:path", default=False, check_type=str): - self.tool_requires("msys2/cci.latest") - if is_msvc(self): - self.tool_requires("automake/1.16.5") + self.tool_requires("meson/1.4.1") + if not self.conf.get("tools.gnu:pkg_config", check_type=str): + self.tool_requires("pkgconf/2.2.0") + if self.settings.arch in ["x86", "x86_64"]: + self.tool_requires("nasm/2.16.01") + + def validate(self): + if Version(self.version) <= "2.1.1" and self.settings.os in ["Android", "Macos"]: + # INFO: ../src/meson.build:86:2: ERROR: Problem encountered: FIXME: Unhandled system android + # INFO: ../src/meson.build:86:2: ERROR: Problem encountered: FIXME: Unhandled system darwin + raise ConanInvalidConfiguration(f"{self.ref} does not support {self.settings.os}. Try a newer version.") def source(self): get(self, **self.conan_data["sources"][self.version], destination=self.source_folder, strip_root=True) - def _patch_sources(self): - if is_msvc(self): - replace_in_file(self, os.path.join(self.source_folder, "build", "platform-msvc.mk"), - "CFLAGS_OPT += -MT", - f"CFLAGS_OPT += -{msvc_runtime_flag(self)}") - replace_in_file(self, os.path.join(self.source_folder, "build", "platform-msvc.mk"), - "CFLAGS_DEBUG += -MTd -Gm", - f"CFLAGS_DEBUG += -{msvc_runtime_flag(self)} -Gm") - if self.settings.os == "Android": - replace_in_file(self, os.path.join(self.source_folder, "codec", "build", "android", "dec", "jni", "Application.mk"), - "APP_STL := stlport_shared", - f"APP_STL := {self.settings.compiler.libcxx}") - replace_in_file(self, os.path.join(self.source_folder, "codec", "build", "android", "dec", "jni", "Application.mk"), - "APP_PLATFORM := android-12", - f"APP_PLATFORM := {self._android_target}") - - @property - def _library_filename(self): - prefix = "" if (is_msvc(self) or self._is_clang_cl) else "lib" - if self.options.shared: - if is_apple_os(self): - suffix = ".dylib" - elif self.settings.os == "Windows": - suffix = ".dll" - else: - suffix = ".so" - else: - if is_msvc(self) or self._is_clang_cl: - suffix = ".lib" - else: - suffix = ".a" - return prefix + "openh264" + suffix - - @property - def _make_arch(self): - return { - "armv7": "arm", - "armv8": "arm64", - "x86": "i386", - }.get(str(self.settings.arch), str(self.settings.arch)) - - @property - def _android_target(self): - return f"android-{self.settings.os.api_level}" - - @property - def _make_args(self): - prefix = unix_path(self, os.path.abspath(self.package_folder)) - args = [ - f"ARCH={self._make_arch}", - f"PREFIX={prefix}" - ] - - if is_msvc(self) or self._is_clang_cl: - args.append("OS=msvc") - else: - if self.settings.os == "Windows": - args.append("OS=mingw_nt") - if self.settings.os == "Android": - libcxx = str(self.settings.compiler.libcxx) - stl_lib = f'$(NDKROOT)/sources/cxx-stl/llvm-libc++/libs/$(APP_ABI)/lib{"c++_static.a" if libcxx == "c++_static" else "c++_shared.so"}' \ - + "$(NDKROOT)/sources/cxx-stl/llvm-libc++/libs/$(APP_ABI)/libc++abi.a" - ndk_home = self.conf.get("tools.android:ndk_path") - args.extend([ - f"NDKLEVEL={self.settings.os.api_level}", - f"STL_LIB={stl_lib}", - "OS=android", - f"NDKROOT={ndk_home}", # not NDK_ROOT here - f"TARGET={self._android_target}", - "CCASFLAGS=$(CFLAGS) -fno-integrated-as", - ]) - - return args - def generate(self): env = VirtualBuildEnv(self) env.generate() - tc = AutotoolsToolchain(self) - tc.make_args.extend(self._make_args) - - if is_msvc(self): - tc.extra_cxxflags.append("-nologo") - if check_min_vs(self, "180", raise_invalid=False): - # https://github.com/conan-io/conan/issues/6514 - tc.extra_cxxflags.append("-FS") - # not needed during and after 2.3.1 - elif self.settings.compiler in ("apple-clang",): - if self.settings.arch in ("armv8",): - tc.extra_ldflags.append("-arch arm64") + tc = MesonToolchain(self) + tc.project_options["tests"] = "disabled" tc.generate() + def _patch_sources(self): + if self._preserve_dll_name: + # INFO: When generating with Meson, the library name is openh264-7.dll. This change preserves the old name openh264.dll + replace_in_file(self, os.path.join(self.source_folder, "meson.build"), "soversion: major_version,", "soversion: '',") + def build(self): - apply_conandata_patches(self) self._patch_sources() - autotools = Autotools(self) - with chdir(self, self.source_folder): - autotools.make(target=self._library_filename) + meson = Meson(self) + meson.configure() + meson.build() def package(self): - copy(self, pattern="LICENSE", dst=os.path.join( - self.package_folder, "licenses"), src=self.source_folder) - autotools = Autotools(self) - with chdir(self, self.source_folder): - autotools.make( - target=f'install-{"shared" if self.options.shared else "static-lib"}') + copy(self, pattern="LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) + meson = Meson(self) + meson.install() rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) + # INFO: Version 2.1.1 installs both static and shared libraries using same target name + if Version(self.version) <= "2.1.1": + if self.options.shared: + rm(self, "*.a", os.path.join(self.package_folder, "lib")) + else: + rm(self, "*.so*", os.path.join(self.package_folder, "lib")) + rm(self, "*.dylib*", os.path.join(self.package_folder, "lib")) + rm(self, "*.dll", os.path.join(self.package_folder, "bin")) + rm(self, "openh264.lib", os.path.join(self.package_folder, "lib")) + + if is_msvc(self) or self._is_clang_cl: + rm(self, "*.pdb", os.path.join(self.package_folder, "bin")) + if self._preserve_dll_name: + # INFO: Preserve same old library name as when building with Make on Windows but using Meson + rename(self, os.path.join(self.package_folder, "lib", "openh264.lib"), + os.path.join(self.package_folder, "lib", "openh264_dll.lib")) + else: + rename(self, os.path.join(self.package_folder, "lib", "libopenh264.a"), + os.path.join(self.package_folder, "lib", "openh264.lib")) fix_apple_shared_install_name(self) def package_info(self): - self.cpp_info.set_property("pkg_config_name", "openh264") - suffix = "_dll" if ( - is_msvc(self) or self._is_clang_cl) and self.options.shared else "" + suffix = "_dll" if self._preserve_dll_name else "" self.cpp_info.libs = [f"openh264{suffix}"] if self.settings.os in ("FreeBSD", "Linux"): self.cpp_info.system_libs.extend(["m", "pthread"]) if self.settings.os == "Android": self.cpp_info.system_libs.append("m") - libcxx = stdcpp_library(self) - if libcxx: - self.cpp_info.system_libs.append(libcxx) + if not self.options.shared: + libcxx = stdcpp_library(self) + if libcxx: + if self.settings.os == "Android" and libcxx == "c++_static": + # INFO: When builing for Android, need to link against c++abi too. Otherwise will get linkage errors: + # ld.lld: error: undefined symbol: operator new(unsigned long) + # >>> referenced by welsEncoderExt.cpp + self.cpp_info.system_libs.append("c++abi") + self.cpp_info.system_libs.append(libcxx) diff --git a/recipes/openh264/all/patches/1.7.0-0001-platform-android.mk.patch b/recipes/openh264/all/patches/1.7.0-0001-platform-android.mk.patch deleted file mode 100644 index 512d9a7cdfe3f..0000000000000 --- a/recipes/openh264/all/patches/1.7.0-0001-platform-android.mk.patch +++ /dev/null @@ -1,28 +0,0 @@ ---- build/platform-android.mk -+++ build/platform-android.mk -@@ -38,23 +38,12 @@ - - TOOLCHAINPREFIX = $(shell NDK_PROJECT_PATH=$(SRC_PATH)/codec/build/android/dec make --no-print-dir -f $(NDKROOT)/build/core/build-local.mk DUMP_TOOLCHAIN_PREFIX APP_ABI=$(APP_ABI)) - --SYSROOT = $(NDKROOT)/platforms/android-$(NDKLEVEL)/arch-$(ARCH) --CXX = $(TOOLCHAINPREFIX)g++ --CC = $(TOOLCHAINPREFIX)gcc --AR = $(TOOLCHAINPREFIX)ar --CFLAGS += -DANDROID_NDK -fpic --sysroot=$(SYSROOT) -MMD -MP -+CFLAGS += -DANDROID_NDK -fpic -MMD -MP - CXXFLAGS += -fno-rtti -fno-exceptions --LDFLAGS += --sysroot=$(SYSROOT) - SHLDFLAGS = -Wl,--no-undefined -Wl,-z,relro -Wl,-z,now -Wl,-soname,lib$(PROJECT_NAME).so - --ifneq ($(CXX),$(wildcard $(CXX))) --ifneq ($(CXX).exe,$(wildcard $(CXX).exe)) --$(error Compiler not found, bad NDKROOT or ARCH?) --endif --endif -- - STL_INCLUDES = \ -- -I$(NDKROOT)/sources/cxx-stl/stlport/stlport -+ -I$(NDKROOT)/sources/cxx-stl/llvm-libc++/include - STL_LIB = \ - $(NDKROOT)/sources/cxx-stl/stlport/libs/$(APP_ABI)/libstlport_static.a - diff --git a/recipes/openh264/all/patches/1.7.0-0002-macos-relocatable-shared.patch b/recipes/openh264/all/patches/1.7.0-0002-macos-relocatable-shared.patch deleted file mode 100644 index dc10d42f2255e..0000000000000 --- a/recipes/openh264/all/patches/1.7.0-0002-macos-relocatable-shared.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/build/platform-darwin.mk -+++ b/build/platform-darwin.mk -@@ -7,7 +7,7 @@ CURRENT_VERSION := 1.7.0 - COMPATIBILITY_VERSION := 1.7.0 - SHLDFLAGS = -dynamiclib -twolevel_namespace -undefined dynamic_lookup \ - -fno-common -headerpad_max_install_names -install_name \ -- $(SHAREDLIB_DIR)/$(LIBPREFIX)$(PROJECT_NAME).$(SHAREDLIBSUFFIXMAJORVER) -+ @rpath/$(LIBPREFIX)$(PROJECT_NAME).$(SHAREDLIBSUFFIXMAJORVER) - SHARED = -dynamiclib - SHARED += -current_version $(CURRENT_VERSION) -compatibility_version $(COMPATIBILITY_VERSION) - CFLAGS += -Wall -fPIC -MMD -MP diff --git a/recipes/openh264/all/patches/1.7.0-0004-mingw-override-CC-CXX-AR-from-env.patch b/recipes/openh264/all/patches/1.7.0-0004-mingw-override-CC-CXX-AR-from-env.patch deleted file mode 100644 index fd092924362ea..0000000000000 --- a/recipes/openh264/all/patches/1.7.0-0004-mingw-override-CC-CXX-AR-from-env.patch +++ /dev/null @@ -1,9 +0,0 @@ ---- build/platform-mingw_nt.mk -+++ build/platform-mingw_nt.mk -@@ -13,3 +13,3 @@ --CC = x86_64-w64-mingw32-gcc --CXX = x86_64-w64-mingw32-g++ --AR = x86_64-w64-mingw32-ar -+CC ?= x86_64-w64-mingw32-gcc -+CXX ?= x86_64-w64-mingw32-g++ -+AR ?= x86_64-w64-mingw32-ar diff --git a/recipes/openh264/all/patches/2.1.1-0001-platform-android.mk.patch b/recipes/openh264/all/patches/2.1.1-0001-platform-android.mk.patch deleted file mode 100644 index 2fbaccb65a3c9..0000000000000 --- a/recipes/openh264/all/patches/2.1.1-0001-platform-android.mk.patch +++ /dev/null @@ -1,18 +0,0 @@ ---- build/platform-android.mk -+++ build/platform-android.mk -@@ -40,14 +40,9 @@ - TOOLCHAIN_NAME = $(shell NDK_TOOLCHAIN_VERSION= NDK_PROJECT_PATH=$(SRC_PATH)/codec/build/android/dec make --no-print-dir -f $(NDKROOT)/build/core/build-local.mk DUMP_TOOLCHAIN_NAME APP_ABI=$(APP_ABI)) - GCC_TOOLCHAIN_PATH = $(shell dirname $(TOOLCHAINPREFIX) | xargs dirname ) - --SYSROOT = $(NDKROOT)/platforms/android-$(NDKLEVEL)/arch-$(ARCH) --CXX = $(TOOLCHAINPREFIX)g++ --CC = $(TOOLCHAINPREFIX)gcc --AR = $(TOOLCHAINPREFIX)ar --CFLAGS += -DANDROID_NDK -fpic --sysroot=$(SYSROOT) -MMD -MP -fstack-protector-all -+CFLAGS += -DANDROID_NDK -fpic -MMD -MP -fstack-protector-all - CFLAGS += -isystem $(NDKROOT)/sysroot/usr/include -isystem $(NDKROOT)/sysroot/usr/include/$(TOOLCHAIN_NAME) -D__ANDROID_API__=$(NDKLEVEL) - CXXFLAGS += -fno-rtti -fno-exceptions --LDFLAGS += --sysroot=$(SYSROOT) - SHLDFLAGS = -Wl,--no-undefined -Wl,-z,relro -Wl,-z,now -Wl,-soname,lib$(PROJECT_NAME).so - UTSHLDFLAGS = -Wl,-soname,libut.so - diff --git a/recipes/openh264/all/patches/2.1.1-0002-macos-relocatable-shared.patch b/recipes/openh264/all/patches/2.1.1-0002-macos-relocatable-shared.patch deleted file mode 100644 index ae1867902a4ea..0000000000000 --- a/recipes/openh264/all/patches/2.1.1-0002-macos-relocatable-shared.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/build/platform-darwin.mk -+++ b/build/platform-darwin.mk -@@ -7,7 +7,7 @@ CURRENT_VERSION := 2.1.1 - COMPATIBILITY_VERSION := 2.1.0 - SHLDFLAGS = -dynamiclib -twolevel_namespace -undefined dynamic_lookup \ - -fno-common -headerpad_max_install_names -install_name \ -- $(SHAREDLIB_DIR)/$(LIBPREFIX)$(PROJECT_NAME).$(SHAREDLIBSUFFIXMAJORVER) -+ @rpath/$(LIBPREFIX)$(PROJECT_NAME).$(SHAREDLIBSUFFIXMAJORVER) - SHARED = -dynamiclib - SHARED += -current_version $(CURRENT_VERSION) -compatibility_version $(COMPATIBILITY_VERSION) - CFLAGS += -Wall -fPIC -MMD -MP -fstack-protector-all diff --git a/recipes/openh264/all/patches/2.3.1-0001-platform-android.mk.patch b/recipes/openh264/all/patches/2.3.1-0001-platform-android.mk.patch deleted file mode 100644 index 7b4564ae8dded..0000000000000 --- a/recipes/openh264/all/patches/2.3.1-0001-platform-android.mk.patch +++ /dev/null @@ -1,21 +0,0 @@ ---- build/platform-android.mk -+++ build/platform-android.mk -@@ -40,14 +40,9 @@ - TOOLCHAIN_NAME = $(shell NDK_TOOLCHAIN_VERSION= NDK_PROJECT_PATH=$(SRC_PATH)/codec/build/android/dec make --no-print-dir -f $(NDKROOT)/build/core/build-local.mk DUMP_TOOLCHAIN_NAME APP_ABI=$(APP_ABI)) - GCC_TOOLCHAIN_PATH = $(shell dirname $(TOOLCHAINPREFIX) | xargs dirname ) - --SYSROOT = $(NDKROOT)/platforms/android-$(NDKLEVEL)/arch-$(ARCH) --CXX = $(TOOLCHAINPREFIX)g++ --CC = $(TOOLCHAINPREFIX)gcc --AR = $(TOOLCHAINPREFIX)ar --CFLAGS += -DANDROID_NDK -fpic --sysroot=$(SYSROOT) -MMD -MP -+CFLAGS += -DANDROID_NDK -fpic -MMD -MP - ifeq ($(USE_STACK_PROTECTOR), Yes) - CFLAGS += -fstack-protector-all - endif - CFLAGS += -isystem $(NDKROOT)/sysroot/usr/include -isystem $(NDKROOT)/sysroot/usr/include/$(TOOLCHAIN_NAME) -D__ANDROID_API__=$(NDKLEVEL) - CXXFLAGS += -fno-rtti -fno-exceptions --LDFLAGS += --sysroot=$(SYSROOT) - SHLDFLAGS = -Wl,--no-undefined -Wl,-z,relro -Wl,-z,now -Wl,-soname,lib$(PROJECT_NAME).so - UTSHLDFLAGS = -Wl,-soname,libut.so - diff --git a/recipes/openh264/all/patches/2.3.1-0002-macos-relocatable-shared.patch b/recipes/openh264/all/patches/2.3.1-0002-macos-relocatable-shared.patch deleted file mode 100644 index 7b9b27ea4570a..0000000000000 --- a/recipes/openh264/all/patches/2.3.1-0002-macos-relocatable-shared.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/build/platform-darwin.mk -+++ b/build/platform-darwin.mk -@@ -7,7 +7,7 @@ CURRENT_VERSION := 2.3.1 - COMPATIBILITY_VERSION := 2.3.1 - SHLDFLAGS = -dynamiclib -twolevel_namespace -undefined dynamic_lookup \ - -fno-common -headerpad_max_install_names -install_name \ -- $(SHAREDLIB_DIR)/$(LIBPREFIX)$(PROJECT_NAME).$(SHAREDLIBSUFFIXMAJORVER) -+ @rpath/$(LIBPREFIX)$(PROJECT_NAME).$(SHAREDLIBSUFFIXMAJORVER) - SHARED = -dynamiclib - SHARED += -current_version $(CURRENT_VERSION) -compatibility_version $(COMPATIBILITY_VERSION) - CFLAGS += -Wall -fPIC -MMD -MP -stdlib=libc++ diff --git a/recipes/openh264/all/test_package/conanfile.py b/recipes/openh264/all/test_package/conanfile.py index 1a1d9c4ff58f1..e845ae751a301 100644 --- a/recipes/openh264/all/test_package/conanfile.py +++ b/recipes/openh264/all/test_package/conanfile.py @@ -1,5 +1,5 @@ from conan import ConanFile -from conan.tools.build import cross_building +from conan.tools.build import can_run from conan.tools.cmake import cmake_layout, CMake import os @@ -21,6 +21,6 @@ def build(self): cmake.build() def test(self): - if not cross_building(self, skip_x64_x86=True): + if can_run(self): bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") self.run(bin_path, env="conanrun") diff --git a/recipes/openh264/config.yml b/recipes/openh264/config.yml index 783b155e8bb7a..db64052e6d83c 100644 --- a/recipes/openh264/config.yml +++ b/recipes/openh264/config.yml @@ -1,7 +1,7 @@ versions: + "2.4.1": + folder: all "2.3.1": folder: all "2.1.1": folder: all - "1.7.0": - folder: all diff --git a/recipes/openimageio/all/conandata.yml b/recipes/openimageio/all/conandata.yml index 6c6e729f7e5f6..ec02436b0682d 100644 --- a/recipes/openimageio/all/conandata.yml +++ b/recipes/openimageio/all/conandata.yml @@ -5,15 +5,18 @@ sources: "2.4.17.0": url: "https://github.com/AcademySoftwareFoundation/OpenImageIO/archive/refs/tags/v2.4.17.0.tar.gz" sha256: "7fe81d8e5bce30cc4a212f020ac3cc4344e6b7c1c0842475e3a048515099c65c" - "2.5.6.0": - url: "https://github.com/AcademySoftwareFoundation/OpenImageIO/archive/refs/tags/v2.5.6.0.tar.gz" - sha256: "bcfced40a25ef8576383b44d8bbe3732aa2b8efc7b8614482783d6f90378d307" - "2.5.9.0": - url: "https://github.com/AcademySoftwareFoundation/OpenImageIO/archive/refs/tags/v2.5.9.0.tar.gz" - sha256: "b6a68e369bc475525eb843bdc0cb8adc910cc71000825f8db9b5e136166cdc78" - "2.5.10.1": - url: "https://github.com/AcademySoftwareFoundation/OpenImageIO/archive/refs/tags/v2.5.10.1.tar.gz" - sha256: "8f6a547f6a5d510737ba436f867043db537def65f0fdb14ec30e5a185b619f93" + "2.5.14.0": + url: "https://github.com/AcademySoftwareFoundation/OpenImageIO/archive/refs/tags/v2.5.14.0.tar.gz" + sha256: "0e74372c658f083820872311d126867f10d59b526a856672746de7b2c772034d" + "2.5.15.0": + url: "https://github.com/AcademySoftwareFoundation/OpenImageIO/archive/refs/tags/v2.5.15.0.tar.gz" + sha256: "7779ef2c3d03c5ed95e13ff292de85c3f8cee301cd46baad0d2dc83c93bfe85c" + "2.5.16.0": + url: "https://github.com/AcademySoftwareFoundation/OpenImageIO/archive/refs/tags/v2.5.16.0.tar.gz" + sha256: "e5438e28d34a5b0a09428ed77ec310edd47c141db1b259364859110847e161e7" + "2.5.17.0": + url: "https://github.com/AcademySoftwareFoundation/OpenImageIO/archive/refs/tags/v2.5.17.0.tar.gz" + sha256: "9cf1b98762ce5aa5f3f7cd34672549034f5716da1eba26eb5173c18aa21e6583" patches: "2.4.7.1": - patch_file: "patches/2.4.7.1-cmake-targets.patch" @@ -26,15 +29,19 @@ patches: - patch_file: "patches/2.4.17.0-cmake-targets.patch" patch_description: "Ensure project builds correctly with Conan (don't pick up disabled dependencies from the system, fix different spelling of libraries)" patch_type: "conan" - "2.5.6.0": - - patch_file: "patches/2.5.6.0-cmake-targets.patch" + "2.5.14.0": + - patch_file: "patches/2.5.14.0-cmake-targets.patch" patch_description: "Ensure project builds correctly with Conan (don't pick up disabled dependencies from the system, fix different spelling of libraries)" patch_type: "conan" - "2.5.9.0": - - patch_file: "patches/2.5.9.0-cmake-targets.patch" + "2.5.15.0": + - patch_file: "patches/2.5.14.0-cmake-targets.patch" patch_description: "Ensure project builds correctly with Conan (don't pick up disabled dependencies from the system, fix different spelling of libraries)" patch_type: "conan" - "2.5.10.1": - - patch_file: "patches/2.5.10.1-cmake-targets.patch" + "2.5.16.0": + - patch_file: "patches/2.5.14.0-cmake-targets.patch" + patch_description: "Ensure project builds correctly with Conan (don't pick up disabled dependencies from the system, fix different spelling of libraries)" + patch_type: "conan" + "2.5.17.0": + - patch_file: "patches/2.5.17.0-cmake-targets.patch" patch_description: "Ensure project builds correctly with Conan (don't pick up disabled dependencies from the system, fix different spelling of libraries)" patch_type: "conan" diff --git a/recipes/openimageio/all/conanfile.py b/recipes/openimageio/all/conanfile.py index 16fa1a05a98b9..9c644aaaec97b 100644 --- a/recipes/openimageio/all/conanfile.py +++ b/recipes/openimageio/all/conanfile.py @@ -82,7 +82,7 @@ def requirements(self): self.requires("boost/1.84.0") self.requires("libtiff/4.6.0") self.requires("imath/3.1.9", transitive_headers=True) - self.requires("openexr/3.2.1") + self.requires("openexr/3.2.3") if self.options.with_libjpeg == "libjpeg": self.requires("libjpeg/9e") elif self.options.with_libjpeg == "libjpeg-turbo": @@ -120,7 +120,7 @@ def requirements(self): if self.options.with_raw: self.requires("libraw/0.21.2") if self.options.with_openjpeg: - self.requires("openjpeg/2.5.0") + self.requires("openjpeg/2.5.2") if self.options.with_openvdb: self.requires("openvdb/8.0.1") if self.options.with_ptex: diff --git a/recipes/openimageio/all/patches/2.5.10.1-cmake-targets.patch b/recipes/openimageio/all/patches/2.5.10.1-cmake-targets.patch deleted file mode 100644 index 9aa7dc768cd9b..0000000000000 --- a/recipes/openimageio/all/patches/2.5.10.1-cmake-targets.patch +++ /dev/null @@ -1,518 +0,0 @@ -diff --git CMakeLists.txt CMakeLists.txt -index 8125716a3..dd83c588f 100644 ---- CMakeLists.txt -+++ CMakeLists.txt -@@ -154,7 +154,7 @@ endif () - add_definitions (-DOIIO_INTERNAL=1) - - list (APPEND CMAKE_MODULE_PATH -- "${PROJECT_SOURCE_DIR}/src/cmake/modules" -+ #"${PROJECT_SOURCE_DIR}/src/cmake/modules" - "${PROJECT_SOURCE_DIR}/src/cmake") - - include (GNUInstallDirs) -@@ -233,7 +233,7 @@ if (OIIO_BUILD_TOOLS AND NOT BUILD_OIIOUTIL_ONLY) - add_subdirectory (src/iinfo) - add_subdirectory (src/maketx) - add_subdirectory (src/oiiotool) -- add_subdirectory (src/testtex) -+ #add_subdirectory (src/testtex) - add_subdirectory (src/iv) - endif () - -diff --git src/cmake/externalpackages.cmake src/cmake/externalpackages.cmake -index 3f73cd266..d03c906d1 100644 ---- src/cmake/externalpackages.cmake -+++ src/cmake/externalpackages.cmake -@@ -45,14 +45,14 @@ if (NOT DEFINED Boost_USE_STATIC_LIBS) - set (Boost_USE_STATIC_LIBS "${LINKSTATIC}") - endif () - --if (MSVC) -- # Not linking Boost as static libraries: either an explicit setting or LINKSTATIC is FALSE: -- if (NOT Boost_USE_STATIC_LIBS) -- add_definitions (-DBOOST_ALL_DYN_LINK=1) -- endif () --endif () -- --set (Boost_COMPONENTS thread) -+#if (MSVC) -+# # Not linking Boost as static libraries: either an explicit setting or LINKSTATIC is FALSE: -+# if (NOT Boost_USE_STATIC_LIBS) -+# add_definitions (-DBOOST_ALL_DYN_LINK=1) -+# endif () -+#endif () -+ -+set (Boost_COMPONENTS filesystem system thread container) - if (NOT USE_STD_FILESYSTEM) - list (APPEND Boost_COMPONENTS filesystem) - endif () -@@ -108,9 +108,9 @@ checked_find_package (OpenEXR REQUIRED - # building against Imath/OpenEXR 3.x when there is still a system-level - # install version of 2.x. - include_directories(BEFORE ${IMATH_INCLUDES} ${OPENEXR_INCLUDES}) --if (MSVC AND NOT LINKSTATIC) -- add_definitions (-DOPENEXR_DLL) # Is this needed for new versions? --endif () -+#if (MSVC AND NOT LINKSTATIC) -+# add_definitions (-DOPENEXR_DLL) # Is this needed for new versions? -+#endif () - if (OpenEXR_VERSION VERSION_GREATER_EQUAL 3.0) - set (OIIO_USING_IMATH 3) - else () -@@ -137,11 +137,15 @@ set (OPENIMAGEIO_CONFIG_DO_NOT_FIND_IMATH OFF CACHE BOOL - "Exclude find_dependency(Imath) from the exported OpenImageIOConfig.cmake") - - # JPEG -- prefer JPEG-Turbo to regular libjpeg --checked_find_package (libjpeg-turbo -- VERSION_MIN 2.1 -- DEFINITIONS -DUSE_JPEG_TURBO=1) --if (NOT TARGET libjpeg-turbo::jpeg) # Try to find the non-turbo version -+if (USE_JPEGTURBO) -+ checked_find_package (libjpeg-turbo REQUIRED -+ DEFINITIONS -DUSE_JPEG_TURBO=1 -+ PRINT libjpeg-turbo_INCLUDES libjpeg-turbo_LIBRARIES) -+ add_library(JPEG::JPEG ALIAS libjpeg-turbo::libjpeg-turbo) -+elseif (USE_JPEG) # Try to find the non-turbo version - checked_find_package (JPEG REQUIRED) -+else () -+ message(FATAL_ERROR "JPEG library was not found!") - endif () - - # Pugixml setup. Normally we just use the version bundled with oiio, but -@@ -157,7 +161,7 @@ else () - endif() - - # From pythonutils.cmake --find_python() -+#find_python() - if (USE_PYTHON) - checked_find_package (pybind11 REQUIRED VERSION_MIN 2.4.2) - endif () -@@ -167,110 +171,105 @@ endif () - # Dependencies for optional formats and features. If these are not found, - # we will continue building, but the related functionality will be disabled. - --checked_find_package (PNG) -+if (USE_LIBPNG) -+ checked_find_package (PNG REQUIRED) -+endif() - --checked_find_package (BZip2) # Used by ffmpeg and freetype --if (NOT BZIP2_FOUND) -- set (BZIP2_LIBRARIES "") # TODO: why does it break without this? --endif () -+if (USE_FREETYPE) -+ checked_find_package (Freetype REQUIRED -+ DEFINITIONS -DUSE_FREETYPE=1 ) -+endif() - --checked_find_package (Freetype -- DEFINITIONS -DUSE_FREETYPE=1 ) -- --checked_find_package (OpenColorIO -- DEFINITIONS -DUSE_OCIO=1 -DUSE_OPENCOLORIO=1 -- # PREFER_CONFIG -- ) --if (OpenColorIO_FOUND) -- option (OIIO_DISABLE_BUILTIN_OCIO_CONFIGS -- "For deveoper debugging/testing ONLY! Disable OCIO 2.2 builtin configs." OFF) -- if (OIIO_DISABLE_BUILTIN_OCIO_CONFIGS OR "$ENV{OIIO_DISABLE_BUILTIN_OCIO_CONFIGS}") -- add_compile_definitions(OIIO_DISABLE_BUILTIN_OCIO_CONFIGS) -- endif () --else () -- set (OpenColorIO_FOUND 0) -+if (USE_OPENCOLORIO) -+ checked_find_package (OpenColorIO REQUIRED -+ DEFINITIONS -DUSE_OCIO=1 -DUSE_OPENCOLORIO=1 -+ # PREFER_CONFIG -+ ) - endif () - --checked_find_package (OpenCV 3.0 -- DEFINITIONS -DUSE_OPENCV=1) -+if (USE_OPENCV) -+ checked_find_package (OpenCV REQUIRED 3.0 -+ DEFINITIONS -DUSE_OPENCV=1) -+endif() - - # Intel TBB --set (TBB_USE_DEBUG_BUILD OFF) --checked_find_package (TBB 2017 -- SETVARIABLES OIIO_TBB -- PREFER_CONFIG) -+if (USE_TBB)# Intel TBB -+ set (TBB_USE_DEBUG_BUILD OFF) -+ checked_find_package (TBB 2017 REQUIRED -+ SETVARIABLES OIIO_TBB -+ PREFER_CONFIG) -+endif() - - # DCMTK is used to read DICOM images --checked_find_package (DCMTK VERSION_MIN 3.6.1 -- PREFER_CONFIG) -+if (USE_DCMTK) -+ checked_find_package (DCMTK REQUIRED VERSION_MIN 3.6.1) # For DICOM images -+endif() - --checked_find_package (FFmpeg VERSION_MIN 3.0) --checked_find_package (GIF -- VERSION_MIN 4 -- RECOMMEND_MIN 5.0 -- RECOMMEND_MIN_REASON "for stability and thread safety") -+if (USE_FFMPEG) -+ checked_find_package (ffmpeg REQUIRED VERSION_MIN 3.0) -+endif() -+if (USE_GIF) -+ checked_find_package (GIF REQUIRED -+ VERSION_MIN 4 -+ RECOMMEND_MIN 5.0 -+ RECOMMEND_MIN_REASON "for stability and thread safety") -+endif() - - # For HEIF/HEIC/AVIF formats --checked_find_package (Libheif VERSION_MIN 1.3 -- RECOMMEND_MIN 1.16 -- RECOMMEND_MIN_REASON "for orientation support") --if (APPLE AND LIBHEIF_VERSION VERSION_GREATER_EQUAL 1.10 AND LIBHEIF_VERSION VERSION_LESS 1.11) -- message (WARNING "Libheif 1.10 on Apple is known to be broken, disabling libheif support") -- set (Libheif_FOUND 0) --endif () -+if (USE_LIBHEIF) -+ checked_find_package (libheif REQUIRED VERSION_MIN 1.3 -+ RECOMMEND_MIN 1.7 -+ RECOMMEND_MIN_REASON "for AVIF support") -+endif() - --checked_find_package (LibRaw -- VERSION_MIN 0.18 -- PRINT LibRaw_r_LIBRARIES) --if (LibRaw_FOUND AND LibRaw_VERSION VERSION_LESS 0.20 AND CMAKE_CXX_STANDARD VERSION_GREATER_EQUAL 17) -- message (STATUS "${ColorYellow}WARNING When building for C++17, LibRaw should be 0.20 or higher (found ${LibRaw_VERSION}). You may get errors, depending on the compiler.${ColorReset}") -- # Currently, we issue the above warning and let them take their chances. -- # If we wish to disable the LibRaw<0.20/C++17 combination that may fail, -- # just uncomment the following two lines. -- # set (LibRaw_FOUND 0) -- # set (LIBRAW_FOUND 0) --endif () -+if (USE_LIBRAW) -+ checked_find_package (LibRaw REQUIRED -+ RECOMMEND_MIN 0.18 -+ RECOMMEND_MIN_REASON "for ACES support and better camera metadata" -+ PRINT LibRaw_r_LIBRARIES) -+endif() - --checked_find_package (OpenJPEG VERSION_MIN 2.0 -- RECOMMEND_MIN 2.2 -- RECOMMEND_MIN_REASON "for multithreading support") --# Note: Recent OpenJPEG versions have exported cmake configs, but we don't --# find them reliable at all, so we stick to our FindOpenJPEG.cmake module. -- --checked_find_package (OpenVDB -- VERSION_MIN 5.0 -- DEPS TBB -- DEFINITIONS -DUSE_OPENVDB=1) --if (OpenVDB_FOUND AND OpenVDB_VERSION VERSION_GREATER_EQUAL 10.1 AND CMAKE_CXX_STANDARD VERSION_LESS 17) -- message (WARNING "${ColorYellow}OpenVDB >= 10.1 (we found ${OpenVDB_VERSION}) can only be used when we build with C++17 or higher. Disabling OpenVDB support.${ColorReset}") -- set (OpeVDB_FOUND 0) --endif () -+if (USE_OPENJPEG) -+ checked_find_package (OpenJPEG REQUIRED -+ VERSION_MIN 2.0 -+ RECOMMEND_MIN 2.2 -+ RECOMMEND_MIN_REASON "for multithreading support") -+ # Note: Recent OpenJPEG versions have exported cmake configs, but we don't -+ # find them reliable at all, so we stick to our FindOpenJPEG.cmake module. -+endif() - --checked_find_package (Ptex PREFER_CONFIG) --if (NOT Ptex_FOUND OR NOT Ptex_VERSION) -- # Fallback for inadequate Ptex exported configs. This will eventually -- # disappear when we can 100% trust Ptex's exports. -- unset (Ptex_FOUND) -- checked_find_package (Ptex) --endif () -+if (USE_OPENVDB) -+ checked_find_package (OpenVDB REQUIRED -+ VERSION_MIN 5.0 -+ DEPS TBB -+ DEFINITIONS -DUSE_OPENVDB=1) -+endif() - --checked_find_package (WebP) --# Note: When WebP 1.1 (released late 2019) is our minimum, we can use their --# exported configs and remove our FindWebP.cmake module. -+if (USE_PTEX) -+ checked_find_package (ptex REQUIRED PREFER_CONFIG) -+endif() -+ -+if (USE_LIBWEBP) -+ checked_find_package (WebP REQUIRED) -+endif() - - option (USE_R3DSDK "Enable R3DSDK (RED camera) support" OFF) --checked_find_package (R3DSDK NO_RECORD_NOTFOUND) # RED camera -+if (USE_R3DSDK) -+ checked_find_package (R3DSDK REQUIRED) # RED camera -+endif () - - set (NUKE_VERSION "7.0" CACHE STRING "Nuke version to target") --checked_find_package (Nuke NO_RECORD_NOTFOUND) -+if (USE_NUKE) -+ checked_find_package (Nuke REQUIRED) -+endif () - - - # Qt -- used for iv - option (USE_QT "Use Qt if found" ON) --if (USE_QT) -- checked_find_package (OpenGL) # used for iv -+if (USE_OPENGL) -+ checked_find_package (OpenGL REQUIRED) # used for iv - endif () --if (USE_QT AND OPENGL_FOUND) -+if (USE_QT AND USE_OPENGL) - checked_find_package (Qt6 COMPONENTS Core Gui Widgets OpenGLWidgets) - if (NOT Qt6_FOUND) - checked_find_package (Qt5 COMPONENTS Core Gui Widgets OpenGL) -@@ -294,13 +293,13 @@ macro (find_or_download_robin_map) - # for an installed version. Still prefer a copy that seems to be - # locally installed in this tree. - if (NOT BUILD_ROBINMAP_FORCE) -- find_package (Robinmap QUIET) -+ find_package (tsl-robin-map REQUIRED) - endif () - # If an external copy wasn't found and we requested that missing - # packages be built, or we we are forcing a local copy to be built, then - # download and build it. - # Download the headers from github -- if ((BUILD_MISSING_ROBINMAP AND NOT ROBINMAP_FOUND) OR BUILD_ROBINMAP_FORCE) -+ if ((BUILD_MISSING_ROBINMAP AND NOT tsl-robin-map_FOUND) OR BUILD_ROBINMAP_FORCE) - message (STATUS "Downloading local Tessil/robin-map") - set (ROBINMAP_INSTALL_DIR "${PROJECT_SOURCE_DIR}/ext/robin-map") - set (ROBINMAP_GIT_REPOSITORY "https://github.com/Tessil/robin-map") -@@ -318,7 +317,7 @@ macro (find_or_download_robin_map) - endif () - set (ROBINMAP_INCLUDE_DIR "${ROBINMAP_INSTALL_DIR}/include") - endif () -- checked_find_package (Robinmap REQUIRED) -+ checked_find_package (tsl-robin-map REQUIRED) - endmacro() - - find_or_download_robin_map () -@@ -337,7 +336,7 @@ macro (find_or_download_fmt) - # for an installed version. Still prefer a copy that seems to be - # locally installed in this tree. - if (NOT BUILD_FMT_FORCE) -- find_package (fmt QUIET) -+ find_package (fmt REQUIRED) - endif () - # If an external copy wasn't found and we requested that missing - # packages be built, or we we are forcing a local copy to be built, then -@@ -372,7 +371,7 @@ macro (find_or_download_fmt) - set (fmt_VERSION "${FMT_VERSION_MAJOR}.${FMT_VERSION_MINOR}.${FMT_VERSION_PATCH}") - list (APPEND CFP_ALL_BUILD_DEPS_FOUND "${pkgname} ${${pkgname}_VERSION}") - else () -- get_target_property(FMT_INCLUDE_DIR fmt::fmt-header-only INTERFACE_INCLUDE_DIRECTORIES) -+ get_target_property(FMT_INCLUDE_DIR fmt::fmt INTERFACE_INCLUDE_DIRECTORIES) - set (OIIO_USING_FMT_LOCAL FALSE) - checked_find_package (fmt REQUIRED - VERSION_MIN 7.0) -diff --git src/ffmpeg.imageio/CMakeLists.txt src/ffmpeg.imageio/CMakeLists.txt -index 8e47a8443..900d23101 100644 ---- src/ffmpeg.imageio/CMakeLists.txt -+++ src/ffmpeg.imageio/CMakeLists.txt -@@ -2,7 +2,7 @@ - # SPDX-License-Identifier: Apache-2.0 - # https://github.com/AcademySoftwareFoundation/OpenImageIO - --if (FFmpeg_FOUND) -+if (USE_FFMPEG) - if (LINKSTATIC) - set (_static_suffixes .lib .a) - set (_static_libraries_found 0) -@@ -26,11 +26,9 @@ if (FFmpeg_FOUND) - endif() - - add_oiio_plugin (ffmpeginput.cpp -- INCLUDE_DIRS ${FFMPEG_INCLUDES} -- LINK_LIBRARIES ${FFMPEG_LIBRARIES} -- ${BZIP2_LIBRARIES} -+ LINK_LIBRARIES ffmpeg::avcodec ffmpeg::avformat ffmpeg::swscale - DEFINITIONS "-DUSE_FFMPEG" -- "-DOIIO_FFMPEG_VERSION=\"${FFMPEG_VERSION}\"") -+ "-DOIIO_FFMPEG_VERSION=\"${ffmpeg_VERSION}\"") - else() - message (STATUS "FFmpeg not found: ffmpeg plugin will not be built") - endif() -diff --git src/heif.imageio/CMakeLists.txt src/heif.imageio/CMakeLists.txt -index 5b6c30a85..e5bc55ef1 100644 ---- src/heif.imageio/CMakeLists.txt -+++ src/heif.imageio/CMakeLists.txt -@@ -2,32 +2,31 @@ - # SPDX-License-Identifier: Apache-2.0 - # https://github.com/AcademySoftwareFoundation/OpenImageIO - --if (Libheif_FOUND) -- if (LINKSTATIC) -- set (_static_suffixes .lib .a) -- set (_static_libraries_found 0) -+if (USE_LIBHEIF) -+ # if (LINKSTATIC) -+ # set (_static_suffixes .lib .a) -+ # set (_static_libraries_found 0) - -- foreach (_libeheif_library IN LISTS LIBHEIF_LIBRARIES) -- get_filename_component (_ext ${_libeheif_library} LAST_EXT) -- list (FIND _static_suffixes ${_ext} _index) -- if (${_index} GREATER -1) -- MATH (EXPR _static_libraries_found "${static_libraries_found}+1") -- endif() -- endforeach() -+ # foreach (_libeheif_library IN LISTS LIBHEIF_LIBRARIES) -+ # get_filename_component (_ext ${_libeheif_library} LAST_EXT) -+ # list (FIND _static_suffixes ${_ext} _index) -+ # if (${_index} GREATER -1) -+ # MATH (EXPR _static_libraries_found "${static_libraries_found}+1") -+ # endif() -+ # endforeach() - -- if (${_static_libraries_found} GREATER 0) -- message (STATUS "${ColorYellow}") -- message (STATUS "You are linking OpenImageIO against a static version of libheif, which is LGPL") -- message (STATUS "licensed. If you intend to redistribute this build of OpenImageIO, we recommend") -- message (STATUS "that you review the libheif license terms, or you may wish to switch to using a") -- message (STATUS "dynamically-linked libheif.") -- message ("${ColorReset}") -- endif() -- endif() -+ # if (${_static_libraries_found} GREATER 0) -+ # message (STATUS "${ColorYellow}") -+ # message (STATUS "You are linking OpenImageIO against a static version of libheif, which is LGPL") -+ # message (STATUS "licensed. If you intend to redistribute this build of OpenImageIO, we recommend") -+ # message (STATUS "that you review the libheif license terms, or you may wish to switch to using a") -+ # message (STATUS "dynamically-linked libheif.") -+ # message ("${ColorReset}") -+ # endif() -+ # endif() - - add_oiio_plugin (heifinput.cpp heifoutput.cpp -- INCLUDE_DIRS ${LIBHEIF_INCLUDES} -- LINK_LIBRARIES ${LIBHEIF_LIBRARIES} -+ LINK_LIBRARIES libheif::heif - DEFINITIONS "-DUSE_HEIF=1") - else () - message (WARNING "heif plugin will not be built") -diff --git src/include/CMakeLists.txt src/include/CMakeLists.txt -index 7bec09739..3db17086f 100644 ---- src/include/CMakeLists.txt -+++ src/include/CMakeLists.txt -@@ -64,7 +64,8 @@ install (FILES ${detail_headers} - DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME}/detail - COMPONENT developer) - --if (INTERNALIZE_FMT OR OIIO_USING_FMT_LOCAL) -+if (0) # Don't try to copy fmt libraries to target install folder -+ set(FMT_INCLUDES "${fmt_INCLUDE_DIR}") - set (fmt_headers_base_names) - foreach (header_name core.h format-inl.h format.h ostream.h printf.h - std.h base.h chrono.h) -diff --git src/jpeg2000.imageio/CMakeLists.txt src/jpeg2000.imageio/CMakeLists.txt -index 560e8d486..24348fe66 100644 ---- src/jpeg2000.imageio/CMakeLists.txt -+++ src/jpeg2000.imageio/CMakeLists.txt -@@ -2,10 +2,9 @@ - # SPDX-License-Identifier: Apache-2.0 - # https://github.com/AcademySoftwareFoundation/OpenImageIO - --if (OPENJPEG_FOUND) -+if (USE_OPENJPEG) - add_oiio_plugin (jpeg2000input.cpp jpeg2000output.cpp -- INCLUDE_DIRS ${OPENJPEG_INCLUDES} -- LINK_LIBRARIES ${OPENJPEG_LIBRARIES} -+ LINK_LIBRARIES openjp2 - DEFINITIONS "-DUSE_OPENJPEG") - else() - message (WARNING "Jpeg-2000 plugin will not be built") -diff --git src/libOpenImageIO/CMakeLists.txt src/libOpenImageIO/CMakeLists.txt -index aeb7b7f93..9a32e4cf2 100644 ---- src/libOpenImageIO/CMakeLists.txt -+++ src/libOpenImageIO/CMakeLists.txt -@@ -154,19 +154,27 @@ target_link_libraries (OpenImageIO - ${OPENIMAGEIO_IMATH_TARGETS} - PRIVATE - ${OPENIMAGEIO_OPENEXR_TARGETS} -- ${OpenCV_LIBRARIES} - ${format_plugin_libs} # Add all the target link libraries from the plugins - $ - $ - $ - $ -- $ - ${BZIP2_LIBRARIES} - ZLIB::ZLIB -- $ -+ tsl::robin_map -+ Boost::filesystem Boost::thread Boost::system Boost::container - ${CMAKE_DL_LIBS} - ) - -+if (USE_OPENCV) -+ target_link_libraries (OpenImageIO PRIVATE opencv::opencv_core -+ opencv::opencv_imgproc -+ opencv::opencv_videoio) -+endif () -+if (USE_FREETYPE) -+ target_link_libraries (OpenImageIO PRIVATE Freetype::Freetype) -+endif() -+ - if (WIN32) - target_link_libraries (OpenImageIO PRIVATE psapi) - endif() -diff --git src/libutil/CMakeLists.txt src/libutil/CMakeLists.txt -index f873b3eed..cf5d4e74c 100644 ---- src/libutil/CMakeLists.txt -+++ src/libutil/CMakeLists.txt -@@ -20,20 +20,13 @@ target_link_libraries (OpenImageIO_Util - ${GCC_ATOMIC_LIBRARIES} - ${OPENIMAGEIO_IMATH_DEPENDENCY_VISIBILITY} - ${OPENIMAGEIO_IMATH_TARGETS} -+ fmt::fmt - PRIVATE -- $ -- $ -+ Boost::filesystem Boost::thread Boost::system - $ - ${CMAKE_DL_LIBS} - ) - --if (INTERNALIZE_FMT OR OIIO_USING_FMT_LOCAL) -- add_dependencies(OpenImageIO_Util fmt_internal_target) --else () -- target_link_libraries (OpenImageIO_Util -- PUBLIC fmt::fmt-header-only) --endif () -- - if (WIN32) - add_definitions(-DWIN32_LEAN_AND_MEAN -DNOMINMAX -DNOGDI -DVC_EXTRALEAN) - target_link_libraries (OpenImageIO_Util PRIVATE psapi) -diff --git src/ptex.imageio/CMakeLists.txt src/ptex.imageio/CMakeLists.txt -index 16634fedb..82060ac29 100644 ---- src/ptex.imageio/CMakeLists.txt -+++ src/ptex.imageio/CMakeLists.txt -@@ -2,12 +2,9 @@ - # SPDX-License-Identifier: Apache-2.0 - # https://github.com/AcademySoftwareFoundation/OpenImageIO - --if (Ptex_FOUND) -- set(ptex_target Ptex::Ptex_dynamic) -- if (TARGET Ptex::Ptex_static AND (NOT TARGET Ptex::Ptex_dynamic OR LINKSTATIC)) -- set(ptex_target Ptex::Ptex_static) -- endif() -+if (USE_PTEX) - add_oiio_plugin (ptexinput.cpp -- LINK_LIBRARIES ${ptex_target} ZLIB::ZLIB -+ LINK_LIBRARIES ${ptex_LIBRARIES} ZLIB::ZLIB -+ INCLUDE_DIRS ${ptex_INCLUDE_DIRS} - DEFINITIONS "-DUSE_PTEX") - endif () diff --git a/recipes/openimageio/all/patches/2.5.14.0-cmake-targets.patch b/recipes/openimageio/all/patches/2.5.14.0-cmake-targets.patch new file mode 100644 index 0000000000000..859c8562899a5 --- /dev/null +++ b/recipes/openimageio/all/patches/2.5.14.0-cmake-targets.patch @@ -0,0 +1,521 @@ +diff --git CMakeLists.txt CMakeLists.txt +index 3ff009229..d38941db0 100644 +--- CMakeLists.txt ++++ CMakeLists.txt +@@ -154,7 +154,7 @@ endif () + add_definitions (-DOIIO_INTERNAL=1) + + list (APPEND CMAKE_MODULE_PATH +- "${PROJECT_SOURCE_DIR}/src/cmake/modules" ++ #"${PROJECT_SOURCE_DIR}/src/cmake/modules" + "${PROJECT_SOURCE_DIR}/src/cmake") + + include (GNUInstallDirs) +@@ -233,7 +233,7 @@ if (OIIO_BUILD_TOOLS AND NOT BUILD_OIIOUTIL_ONLY) + add_subdirectory (src/iinfo) + add_subdirectory (src/maketx) + add_subdirectory (src/oiiotool) +- add_subdirectory (src/testtex) ++ #add_subdirectory (src/testtex) + add_subdirectory (src/iv) + endif () + +diff --git src/cmake/externalpackages.cmake src/cmake/externalpackages.cmake +index fe581e723..ab2fbb7f5 100644 +--- src/cmake/externalpackages.cmake ++++ src/cmake/externalpackages.cmake +@@ -48,14 +48,14 @@ if (NOT DEFINED Boost_USE_STATIC_LIBS) + set (Boost_USE_STATIC_LIBS "${LINKSTATIC}") + endif () + +-if (MSVC) +- # Not linking Boost as static libraries: either an explicit setting or LINKSTATIC is FALSE: +- if (NOT Boost_USE_STATIC_LIBS) +- add_definitions (-DBOOST_ALL_DYN_LINK=1) +- endif () +-endif () +- +-set (Boost_COMPONENTS thread) ++#if (MSVC) ++# # Not linking Boost as static libraries: either an explicit setting or LINKSTATIC is FALSE: ++# if (NOT Boost_USE_STATIC_LIBS) ++# add_definitions (-DBOOST_ALL_DYN_LINK=1) ++# endif () ++#endif () ++ ++set (Boost_COMPONENTS filesystem system thread container) + if (NOT USE_STD_FILESYSTEM) + list (APPEND Boost_COMPONENTS filesystem) + endif () +@@ -111,9 +111,9 @@ checked_find_package (OpenEXR REQUIRED + # building against Imath/OpenEXR 3.x when there is still a system-level + # install version of 2.x. + include_directories(BEFORE ${IMATH_INCLUDES} ${OPENEXR_INCLUDES}) +-if (MSVC AND NOT LINKSTATIC) +- add_definitions (-DOPENEXR_DLL) # Is this needed for new versions? +-endif () ++#if (MSVC AND NOT LINKSTATIC) ++# add_definitions (-DOPENEXR_DLL) # Is this needed for new versions? ++#endif () + if (OpenEXR_VERSION VERSION_GREATER_EQUAL 3.0) + set (OIIO_USING_IMATH 3) + else () +@@ -140,11 +140,15 @@ set (OPENIMAGEIO_CONFIG_DO_NOT_FIND_IMATH OFF CACHE BOOL + "Exclude find_dependency(Imath) from the exported OpenImageIOConfig.cmake") + + # JPEG -- prefer JPEG-Turbo to regular libjpeg +-checked_find_package (libjpeg-turbo +- VERSION_MIN 2.1 +- DEFINITIONS -DUSE_JPEG_TURBO=1) +-if (NOT TARGET libjpeg-turbo::jpeg) # Try to find the non-turbo version ++if (USE_JPEGTURBO) ++ checked_find_package (libjpeg-turbo REQUIRED ++ DEFINITIONS -DUSE_JPEG_TURBO=1 ++ PRINT libjpeg-turbo_INCLUDES libjpeg-turbo_LIBRARIES) ++ add_library(JPEG::JPEG ALIAS libjpeg-turbo::libjpeg-turbo) ++elseif (USE_JPEG) # Try to find the non-turbo version + checked_find_package (JPEG REQUIRED) ++else () ++ message(FATAL_ERROR "JPEG library was not found!") + endif () + + # Pugixml setup. Normally we just use the version bundled with oiio, but +@@ -160,7 +164,7 @@ else () + endif() + + # From pythonutils.cmake +-find_python() ++#find_python() + if (USE_PYTHON) + checked_find_package (pybind11 REQUIRED VERSION_MIN 2.4.2) + endif () +@@ -170,111 +174,107 @@ endif () + # Dependencies for optional formats and features. If these are not found, + # we will continue building, but the related functionality will be disabled. + +-checked_find_package (PNG) ++if (USE_LIBPNG) ++ checked_find_package (PNG REQUIRED) ++endif() + +-checked_find_package (BZip2) # Used by ffmpeg and freetype +-if (NOT BZIP2_FOUND) +- set (BZIP2_LIBRARIES "") # TODO: why does it break without this? +-endif () ++if (USE_FREETYPE) ++ checked_find_package (Freetype REQUIRED ++ DEFINITIONS -DUSE_FREETYPE=1 ) ++endif() + +-checked_find_package (Freetype +- DEFINITIONS -DUSE_FREETYPE=1 ) +- +-checked_find_package (OpenColorIO +- DEFINITIONS -DUSE_OCIO=1 -DUSE_OPENCOLORIO=1 +- # PREFER_CONFIG +- ) +-if (OpenColorIO_FOUND) +- option (OIIO_DISABLE_BUILTIN_OCIO_CONFIGS +- "For deveoper debugging/testing ONLY! Disable OCIO 2.2 builtin configs." OFF) +- if (OIIO_DISABLE_BUILTIN_OCIO_CONFIGS OR "$ENV{OIIO_DISABLE_BUILTIN_OCIO_CONFIGS}") +- add_compile_definitions(OIIO_DISABLE_BUILTIN_OCIO_CONFIGS) +- endif () +-else () +- set (OpenColorIO_FOUND 0) ++if (USE_OPENCOLORIO) ++ checked_find_package (OpenColorIO REQUIRED ++ DEFINITIONS -DUSE_OCIO=1 -DUSE_OPENCOLORIO=1 ++ # PREFER_CONFIG ++ ) + endif () + +-checked_find_package (OpenCV 3.0 +- DEFINITIONS -DUSE_OPENCV=1) ++if (USE_OPENCV) ++ checked_find_package (OpenCV REQUIRED 3.0 ++ DEFINITIONS -DUSE_OPENCV=1) ++endif() + + # Intel TBB +-set (TBB_USE_DEBUG_BUILD OFF) +-checked_find_package (TBB 2017 +- SETVARIABLES OIIO_TBB +- PREFER_CONFIG) ++if (USE_TBB)# Intel TBB ++ set (TBB_USE_DEBUG_BUILD OFF) ++ checked_find_package (TBB 2017 REQUIRED ++ SETVARIABLES OIIO_TBB ++ PREFER_CONFIG) ++endif() + + # DCMTK is used to read DICOM images +-checked_find_package (DCMTK VERSION_MIN 3.6.1 +- PREFER_CONFIG) ++if (USE_DCMTK) ++ checked_find_package (DCMTK REQUIRED VERSION_MIN 3.6.1) # For DICOM images ++endif() + +-checked_find_package (FFmpeg VERSION_MIN 3.0) +-checked_find_package (GIF +- VERSION_MIN 4 +- RECOMMEND_MIN 5.0 +- RECOMMEND_MIN_REASON "for stability and thread safety") ++if (USE_FFMPEG) ++ checked_find_package (ffmpeg REQUIRED VERSION_MIN 3.0) ++endif() ++if (USE_GIF) ++ checked_find_package (GIF REQUIRED ++ VERSION_MIN 4 ++ RECOMMEND_MIN 5.0 ++ RECOMMEND_MIN_REASON "for stability and thread safety") ++endif() + + # For HEIF/HEIC/AVIF formats +-checked_find_package (Libheif VERSION_MIN 1.3 +- RECOMMEND_MIN 1.16 +- RECOMMEND_MIN_REASON "for orientation support") +-if (APPLE AND LIBHEIF_VERSION VERSION_GREATER_EQUAL 1.10 AND LIBHEIF_VERSION VERSION_LESS 1.11) +- message (WARNING "Libheif 1.10 on Apple is known to be broken, disabling libheif support") +- set (Libheif_FOUND 0) +-endif () ++if (USE_LIBHEIF) ++ checked_find_package (libheif REQUIRED VERSION_MIN 1.3 ++ RECOMMEND_MIN 1.7 ++ RECOMMEND_MIN_REASON "for AVIF support") ++endif() + +-checked_find_package (LibRaw +- VERSION_MIN 0.18 +- PRINT LibRaw_r_LIBRARIES) +-if (LibRaw_FOUND AND LibRaw_VERSION VERSION_LESS 0.20 AND CMAKE_CXX_STANDARD VERSION_GREATER_EQUAL 17) +- message (STATUS "${ColorYellow}WARNING When building for C++17, LibRaw should be 0.20 or higher (found ${LibRaw_VERSION}). You may get errors, depending on the compiler.${ColorReset}") +- # Currently, we issue the above warning and let them take their chances. +- # If we wish to disable the LibRaw<0.20/C++17 combination that may fail, +- # just uncomment the following two lines. +- # set (LibRaw_FOUND 0) +- # set (LIBRAW_FOUND 0) +-endif () ++if (USE_LIBRAW) ++ checked_find_package (LibRaw REQUIRED ++ RECOMMEND_MIN 0.18 ++ RECOMMEND_MIN_REASON "for ACES support and better camera metadata" ++ PRINT LibRaw_r_LIBRARIES) ++endif() + +-checked_find_package (OpenJPEG VERSION_MIN 2.0 +- RECOMMEND_MIN 2.2 +- RECOMMEND_MIN_REASON "for multithreading support") +-# Note: Recent OpenJPEG versions have exported cmake configs, but we don't +-# find them reliable at all, so we stick to our FindOpenJPEG.cmake module. +- +-checked_find_package (OpenVDB +- VERSION_MIN 5.0 +- DEPS TBB +- DEFINITIONS -DUSE_OPENVDB=1) +-if (OpenVDB_FOUND AND OpenVDB_VERSION VERSION_GREATER_EQUAL 10.1 AND CMAKE_CXX_STANDARD VERSION_LESS 17) +- message (WARNING "${ColorYellow}OpenVDB >= 10.1 (we found ${OpenVDB_VERSION}) can only be used when we build with C++17 or higher. Disabling OpenVDB support.${ColorReset}") +- set (OpenVDB_FOUND 0) +- add_compile_definitions(DISABLE_OPENVDB=1) +-endif () ++if (USE_OPENJPEG) ++ checked_find_package (OpenJPEG REQUIRED ++ VERSION_MIN 2.0 ++ RECOMMEND_MIN 2.2 ++ RECOMMEND_MIN_REASON "for multithreading support") ++ # Note: Recent OpenJPEG versions have exported cmake configs, but we don't ++ # find them reliable at all, so we stick to our FindOpenJPEG.cmake module. ++endif() + +-checked_find_package (Ptex PREFER_CONFIG) +-if (NOT Ptex_FOUND OR NOT Ptex_VERSION) +- # Fallback for inadequate Ptex exported configs. This will eventually +- # disappear when we can 100% trust Ptex's exports. +- unset (Ptex_FOUND) +- checked_find_package (Ptex) +-endif () ++if (USE_OPENVDB) ++ checked_find_package (OpenVDB REQUIRED ++ VERSION_MIN 5.0 ++ DEPS TBB ++ DEFINITIONS -DUSE_OPENVDB=1) ++ # Upstream contains a version check to ensure that CXX 17 or newer is used with ++ # OpenVDB >= 10.1. This is ensured by the conanfile for openvdb ++endif() + +-checked_find_package (WebP) +-# Note: When WebP 1.1 (released late 2019) is our minimum, we can use their +-# exported configs and remove our FindWebP.cmake module. ++if (USE_PTEX) ++ checked_find_package (ptex REQUIRED PREFER_CONFIG) ++endif() ++ ++if (USE_LIBWEBP) ++ checked_find_package (WebP REQUIRED) ++endif() + + option (USE_R3DSDK "Enable R3DSDK (RED camera) support" OFF) +-checked_find_package (R3DSDK NO_RECORD_NOTFOUND) # RED camera ++if (USE_R3DSDK) ++ checked_find_package (R3DSDK REQUIRED) # RED camera ++endif () + + set (NUKE_VERSION "7.0" CACHE STRING "Nuke version to target") +-checked_find_package (Nuke NO_RECORD_NOTFOUND) ++if (USE_NUKE) ++ checked_find_package (Nuke REQUIRED) ++endif () + + + # Qt -- used for iv + option (USE_QT "Use Qt if found" ON) +-if (USE_QT) +- checked_find_package (OpenGL) # used for iv ++if (USE_OPENGL) ++ checked_find_package (OpenGL REQUIRED) # used for iv + endif () +-if (USE_QT AND OPENGL_FOUND) ++if (USE_QT AND USE_OPENGL) + checked_find_package (Qt6 COMPONENTS Core Gui Widgets OpenGLWidgets) + if (NOT Qt6_FOUND) + checked_find_package (Qt5 COMPONENTS Core Gui Widgets OpenGL) +@@ -298,13 +298,13 @@ macro (find_or_download_robin_map) + # for an installed version. Still prefer a copy that seems to be + # locally installed in this tree. + if (NOT BUILD_ROBINMAP_FORCE) +- find_package (Robinmap QUIET) ++ find_package (tsl-robin-map REQUIRED) + endif () + # If an external copy wasn't found and we requested that missing + # packages be built, or we we are forcing a local copy to be built, then + # download and build it. + # Download the headers from github +- if ((BUILD_MISSING_ROBINMAP AND NOT ROBINMAP_FOUND) OR BUILD_ROBINMAP_FORCE) ++ if ((BUILD_MISSING_ROBINMAP AND NOT tsl-robin-map_FOUND) OR BUILD_ROBINMAP_FORCE) + message (STATUS "Downloading local Tessil/robin-map") + set (ROBINMAP_INSTALL_DIR "${PROJECT_SOURCE_DIR}/ext/robin-map") + set (ROBINMAP_GIT_REPOSITORY "https://github.com/Tessil/robin-map") +@@ -322,7 +322,7 @@ macro (find_or_download_robin_map) + endif () + set (ROBINMAP_INCLUDE_DIR "${ROBINMAP_INSTALL_DIR}/include") + endif () +- checked_find_package (Robinmap REQUIRED) ++ checked_find_package (tsl-robin-map REQUIRED) + endmacro() + + find_or_download_robin_map () +@@ -341,7 +341,7 @@ macro (find_or_download_fmt) + # for an installed version. Still prefer a copy that seems to be + # locally installed in this tree. + if (NOT BUILD_FMT_FORCE) +- find_package (fmt QUIET) ++ find_package (fmt REQUIRED) + endif () + # If an external copy wasn't found and we requested that missing + # packages be built, or we we are forcing a local copy to be built, then +@@ -376,7 +376,7 @@ macro (find_or_download_fmt) + set (fmt_VERSION "${FMT_VERSION_MAJOR}.${FMT_VERSION_MINOR}.${FMT_VERSION_PATCH}") + list (APPEND CFP_ALL_BUILD_DEPS_FOUND "${pkgname} ${${pkgname}_VERSION}") + else () +- get_target_property(FMT_INCLUDE_DIR fmt::fmt-header-only INTERFACE_INCLUDE_DIRECTORIES) ++ get_target_property(FMT_INCLUDE_DIR fmt::fmt INTERFACE_INCLUDE_DIRECTORIES) + set (OIIO_USING_FMT_LOCAL FALSE) + checked_find_package (fmt REQUIRED + VERSION_MIN 7.0) +diff --git src/ffmpeg.imageio/CMakeLists.txt src/ffmpeg.imageio/CMakeLists.txt +index 8e47a8443..900d23101 100644 +--- src/ffmpeg.imageio/CMakeLists.txt ++++ src/ffmpeg.imageio/CMakeLists.txt +@@ -2,7 +2,7 @@ + # SPDX-License-Identifier: Apache-2.0 + # https://github.com/AcademySoftwareFoundation/OpenImageIO + +-if (FFmpeg_FOUND) ++if (USE_FFMPEG) + if (LINKSTATIC) + set (_static_suffixes .lib .a) + set (_static_libraries_found 0) +@@ -26,11 +26,9 @@ if (FFmpeg_FOUND) + endif() + + add_oiio_plugin (ffmpeginput.cpp +- INCLUDE_DIRS ${FFMPEG_INCLUDES} +- LINK_LIBRARIES ${FFMPEG_LIBRARIES} +- ${BZIP2_LIBRARIES} ++ LINK_LIBRARIES ffmpeg::avcodec ffmpeg::avformat ffmpeg::swscale + DEFINITIONS "-DUSE_FFMPEG" +- "-DOIIO_FFMPEG_VERSION=\"${FFMPEG_VERSION}\"") ++ "-DOIIO_FFMPEG_VERSION=\"${ffmpeg_VERSION}\"") + else() + message (STATUS "FFmpeg not found: ffmpeg plugin will not be built") + endif() +diff --git src/heif.imageio/CMakeLists.txt src/heif.imageio/CMakeLists.txt +index 5b6c30a85..e5bc55ef1 100644 +--- src/heif.imageio/CMakeLists.txt ++++ src/heif.imageio/CMakeLists.txt +@@ -2,32 +2,31 @@ + # SPDX-License-Identifier: Apache-2.0 + # https://github.com/AcademySoftwareFoundation/OpenImageIO + +-if (Libheif_FOUND) +- if (LINKSTATIC) +- set (_static_suffixes .lib .a) +- set (_static_libraries_found 0) ++if (USE_LIBHEIF) ++ # if (LINKSTATIC) ++ # set (_static_suffixes .lib .a) ++ # set (_static_libraries_found 0) + +- foreach (_libeheif_library IN LISTS LIBHEIF_LIBRARIES) +- get_filename_component (_ext ${_libeheif_library} LAST_EXT) +- list (FIND _static_suffixes ${_ext} _index) +- if (${_index} GREATER -1) +- MATH (EXPR _static_libraries_found "${static_libraries_found}+1") +- endif() +- endforeach() ++ # foreach (_libeheif_library IN LISTS LIBHEIF_LIBRARIES) ++ # get_filename_component (_ext ${_libeheif_library} LAST_EXT) ++ # list (FIND _static_suffixes ${_ext} _index) ++ # if (${_index} GREATER -1) ++ # MATH (EXPR _static_libraries_found "${static_libraries_found}+1") ++ # endif() ++ # endforeach() + +- if (${_static_libraries_found} GREATER 0) +- message (STATUS "${ColorYellow}") +- message (STATUS "You are linking OpenImageIO against a static version of libheif, which is LGPL") +- message (STATUS "licensed. If you intend to redistribute this build of OpenImageIO, we recommend") +- message (STATUS "that you review the libheif license terms, or you may wish to switch to using a") +- message (STATUS "dynamically-linked libheif.") +- message ("${ColorReset}") +- endif() +- endif() ++ # if (${_static_libraries_found} GREATER 0) ++ # message (STATUS "${ColorYellow}") ++ # message (STATUS "You are linking OpenImageIO against a static version of libheif, which is LGPL") ++ # message (STATUS "licensed. If you intend to redistribute this build of OpenImageIO, we recommend") ++ # message (STATUS "that you review the libheif license terms, or you may wish to switch to using a") ++ # message (STATUS "dynamically-linked libheif.") ++ # message ("${ColorReset}") ++ # endif() ++ # endif() + + add_oiio_plugin (heifinput.cpp heifoutput.cpp +- INCLUDE_DIRS ${LIBHEIF_INCLUDES} +- LINK_LIBRARIES ${LIBHEIF_LIBRARIES} ++ LINK_LIBRARIES libheif::heif + DEFINITIONS "-DUSE_HEIF=1") + else () + message (WARNING "heif plugin will not be built") +diff --git src/include/CMakeLists.txt src/include/CMakeLists.txt +index 18b7632a3..c558c4780 100644 +--- src/include/CMakeLists.txt ++++ src/include/CMakeLists.txt +@@ -64,7 +64,8 @@ install (FILES ${detail_headers} + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME}/detail + COMPONENT developer) + +-if (INTERNALIZE_FMT OR OIIO_USING_FMT_LOCAL) ++if (0) # Don't try to copy fmt libraries to target install folder ++ set(FMT_INCLUDES "${fmt_INCLUDE_DIR}") + set (fmt_headers_base_names) + foreach (header_name core.h format-inl.h format.h ostream.h printf.h + std.h base.h chrono.h) +diff --git src/jpeg2000.imageio/CMakeLists.txt src/jpeg2000.imageio/CMakeLists.txt +index 560e8d486..24348fe66 100644 +--- src/jpeg2000.imageio/CMakeLists.txt ++++ src/jpeg2000.imageio/CMakeLists.txt +@@ -2,10 +2,9 @@ + # SPDX-License-Identifier: Apache-2.0 + # https://github.com/AcademySoftwareFoundation/OpenImageIO + +-if (OPENJPEG_FOUND) ++if (USE_OPENJPEG) + add_oiio_plugin (jpeg2000input.cpp jpeg2000output.cpp +- INCLUDE_DIRS ${OPENJPEG_INCLUDES} +- LINK_LIBRARIES ${OPENJPEG_LIBRARIES} ++ LINK_LIBRARIES openjp2 + DEFINITIONS "-DUSE_OPENJPEG") + else() + message (WARNING "Jpeg-2000 plugin will not be built") +diff --git src/libOpenImageIO/CMakeLists.txt src/libOpenImageIO/CMakeLists.txt +index aeb7b7f93..9a32e4cf2 100644 +--- src/libOpenImageIO/CMakeLists.txt ++++ src/libOpenImageIO/CMakeLists.txt +@@ -154,19 +154,27 @@ target_link_libraries (OpenImageIO + ${OPENIMAGEIO_IMATH_TARGETS} + PRIVATE + ${OPENIMAGEIO_OPENEXR_TARGETS} +- ${OpenCV_LIBRARIES} + ${format_plugin_libs} # Add all the target link libraries from the plugins + $ + $ + $ + $ +- $ + ${BZIP2_LIBRARIES} + ZLIB::ZLIB +- $ ++ tsl::robin_map ++ Boost::filesystem Boost::thread Boost::system Boost::container + ${CMAKE_DL_LIBS} + ) + ++if (USE_OPENCV) ++ target_link_libraries (OpenImageIO PRIVATE opencv::opencv_core ++ opencv::opencv_imgproc ++ opencv::opencv_videoio) ++endif () ++if (USE_FREETYPE) ++ target_link_libraries (OpenImageIO PRIVATE Freetype::Freetype) ++endif() ++ + if (WIN32) + target_link_libraries (OpenImageIO PRIVATE psapi) + endif() +diff --git src/libutil/CMakeLists.txt src/libutil/CMakeLists.txt +index f873b3eed..cf5d4e74c 100644 +--- src/libutil/CMakeLists.txt ++++ src/libutil/CMakeLists.txt +@@ -20,20 +20,13 @@ target_link_libraries (OpenImageIO_Util + ${GCC_ATOMIC_LIBRARIES} + ${OPENIMAGEIO_IMATH_DEPENDENCY_VISIBILITY} + ${OPENIMAGEIO_IMATH_TARGETS} ++ fmt::fmt + PRIVATE +- $ +- $ ++ Boost::filesystem Boost::thread Boost::system + $ + ${CMAKE_DL_LIBS} + ) + +-if (INTERNALIZE_FMT OR OIIO_USING_FMT_LOCAL) +- add_dependencies(OpenImageIO_Util fmt_internal_target) +-else () +- target_link_libraries (OpenImageIO_Util +- PUBLIC fmt::fmt-header-only) +-endif () +- + if (WIN32) + add_definitions(-DWIN32_LEAN_AND_MEAN -DNOMINMAX -DNOGDI -DVC_EXTRALEAN) + target_link_libraries (OpenImageIO_Util PRIVATE psapi) +diff --git src/ptex.imageio/CMakeLists.txt src/ptex.imageio/CMakeLists.txt +index 16634fedb..82060ac29 100644 +--- src/ptex.imageio/CMakeLists.txt ++++ src/ptex.imageio/CMakeLists.txt +@@ -2,12 +2,9 @@ + # SPDX-License-Identifier: Apache-2.0 + # https://github.com/AcademySoftwareFoundation/OpenImageIO + +-if (Ptex_FOUND) +- set(ptex_target Ptex::Ptex_dynamic) +- if (TARGET Ptex::Ptex_static AND (NOT TARGET Ptex::Ptex_dynamic OR LINKSTATIC)) +- set(ptex_target Ptex::Ptex_static) +- endif() ++if (USE_PTEX) + add_oiio_plugin (ptexinput.cpp +- LINK_LIBRARIES ${ptex_target} ZLIB::ZLIB ++ LINK_LIBRARIES ${ptex_LIBRARIES} ZLIB::ZLIB ++ INCLUDE_DIRS ${ptex_INCLUDE_DIRS} + DEFINITIONS "-DUSE_PTEX") + endif () diff --git a/recipes/openimageio/all/patches/2.5.17.0-cmake-targets.patch b/recipes/openimageio/all/patches/2.5.17.0-cmake-targets.patch new file mode 100644 index 0000000000000..4b94fb40e8398 --- /dev/null +++ b/recipes/openimageio/all/patches/2.5.17.0-cmake-targets.patch @@ -0,0 +1,540 @@ +diff --git CMakeLists.txt CMakeLists.txt +index d99dd79ac..bfda2778a 100644 +--- CMakeLists.txt ++++ CMakeLists.txt +@@ -156,7 +156,7 @@ endif () + add_definitions (-DOIIO_INTERNAL=1) + + list (APPEND CMAKE_MODULE_PATH +- "${PROJECT_SOURCE_DIR}/src/cmake/modules" ++ #"${PROJECT_SOURCE_DIR}/src/cmake/modules" + "${PROJECT_SOURCE_DIR}/src/cmake") + + include (GNUInstallDirs) +@@ -235,7 +235,7 @@ if (OIIO_BUILD_TOOLS AND NOT BUILD_OIIOUTIL_ONLY) + add_subdirectory (src/iinfo) + add_subdirectory (src/maketx) + add_subdirectory (src/oiiotool) +- add_subdirectory (src/testtex) ++ #add_subdirectory (src/testtex) + add_subdirectory (src/iv) + endif () + +diff --git src/cmake/externalpackages.cmake src/cmake/externalpackages.cmake +index 6556cd2eb..b9c4cd958 100644 +--- src/cmake/externalpackages.cmake ++++ src/cmake/externalpackages.cmake +@@ -48,14 +48,15 @@ if (NOT DEFINED Boost_USE_STATIC_LIBS) + set (Boost_USE_STATIC_LIBS "${LINKSTATIC}") + endif () + +-if (MSVC) +- # Not linking Boost as static libraries: either an explicit setting or LINKSTATIC is FALSE: +- if (NOT Boost_USE_STATIC_LIBS) +- add_definitions (-DBOOST_ALL_DYN_LINK=1) +- endif () +-endif () ++# if (MSVC) ++# # Not linking Boost as static libraries: either an explicit setting or LINKSTATIC is FALSE: ++# if (NOT Boost_USE_STATIC_LIBS) ++# add_definitions (-DBOOST_ALL_DYN_LINK=1) ++# endif () ++# endif () + + set (Boost_COMPONENTS thread) ++# set (Boost_COMPONENTS filesystem system thread container) + if (NOT USE_STD_FILESYSTEM) + list (APPEND Boost_COMPONENTS filesystem) + endif () +@@ -111,9 +112,9 @@ checked_find_package (OpenEXR REQUIRED + # building against Imath/OpenEXR 3.x when there is still a system-level + # install version of 2.x. + include_directories(BEFORE ${IMATH_INCLUDES} ${OPENEXR_INCLUDES}) +-if (MSVC AND NOT LINKSTATIC) +- add_definitions (-DOPENEXR_DLL) # Is this needed for new versions? +-endif () ++# if (MSVC AND NOT LINKSTATIC) ++# add_definitions (-DOPENEXR_DLL) # Is this needed for new versions? ++# endif () + if (OpenEXR_VERSION VERSION_GREATER_EQUAL 3.0) + set (OIIO_USING_IMATH 3) + else () +@@ -140,17 +141,21 @@ set (OPENIMAGEIO_CONFIG_DO_NOT_FIND_IMATH OFF CACHE BOOL + "Exclude find_dependency(Imath) from the exported OpenImageIOConfig.cmake") + + # JPEG -- prefer JPEG-Turbo to regular libjpeg +-checked_find_package (libjpeg-turbo +- VERSION_MIN 2.1 +- DEFINITIONS -DUSE_JPEG_TURBO=1) +-if (NOT TARGET libjpeg-turbo::jpeg) # Try to find the non-turbo version ++if (USE_JPEGTURBO) ++ checked_find_package (libjpeg-turbo REQUIRED ++ DEFINITIONS -DUSE_JPEG_TURBO=1 ++ PRINT libjpeg-turbo_INCLUDES libjpeg-turbo_LIBRARIES) ++ add_library(JPEG::JPEG ALIAS libjpeg-turbo::libjpeg-turbo) ++elseif (USE_JPEG) # Try to find the non-turbo version + checked_find_package (JPEG REQUIRED) ++else () ++ message(FATAL_ERROR "JPEG library was not found!") + endif () + + # Pugixml setup. Normally we just use the version bundled with oiio, but + # some linux distros are quite particular about having separate packages so we + # allow this to be overridden to use the distro-provided package if desired. +-option (USE_EXTERNAL_PUGIXML "Use an externally built shared library version of the pugixml library" OFF) ++option (USE_EXTERNAL_PUGIXML "Use an externally built shared library version of the pugixml library" ON) + if (USE_EXTERNAL_PUGIXML) + checked_find_package (pugixml REQUIRED + VERSION_MIN 1.8 +@@ -160,7 +165,7 @@ else () + endif() + + # From pythonutils.cmake +-find_python() ++#find_python() + if (USE_PYTHON) + checked_find_package (pybind11 REQUIRED VERSION_MIN 2.4.2) + endif () +@@ -170,15 +175,21 @@ endif () + # Dependencies for optional formats and features. If these are not found, + # we will continue building, but the related functionality will be disabled. + +-checked_find_package (PNG) ++if (USE_LIBPNG) ++ checked_find_package (PNG REQUIRED) ++endif() + +-checked_find_package (Freetype +- DEFINITIONS -DUSE_FREETYPE=1 ) ++if (USE_FREETYPE) ++ checked_find_package (Freetype REQUIRED ++ DEFINITIONS -DUSE_FREETYPE=1 ) ++endif() + +-checked_find_package (OpenColorIO +- DEFINITIONS -DUSE_OCIO=1 -DUSE_OPENCOLORIO=1 +- # PREFER_CONFIG +- ) ++if (USE_OPENCOLORIO) ++ checked_find_package (OpenColorIO REQUIRED ++ DEFINITIONS -DUSE_OCIO=1 -DUSE_OPENCOLORIO=1 ++ # PREFER_CONFIG ++ ) ++endif() + if (OpenColorIO_FOUND) + option (OIIO_DISABLE_BUILTIN_OCIO_CONFIGS + "For deveoper debugging/testing ONLY! Disable OCIO 2.2 builtin configs." OFF) +@@ -189,79 +200,104 @@ else () + set (OpenColorIO_FOUND 0) + endif () + +-checked_find_package (OpenCV 3.0 +- DEFINITIONS -DUSE_OPENCV=1) ++if (USE_OPENCV) ++ checked_find_package (OpenCV REQUIRED 3.0 ++ DEFINITIONS -DUSE_OPENCV=1) ++endif() + + # Intel TBB +-set (TBB_USE_DEBUG_BUILD OFF) +-checked_find_package (TBB 2017 +- SETVARIABLES OIIO_TBB +- PREFER_CONFIG) ++if (USE_TBB) ++ set (TBB_USE_DEBUG_BUILD OFF) ++ checked_find_package (TBB 2017 REQUIRED ++ SETVARIABLES OIIO_TBB ++ PREFER_CONFIG) ++endif() + + # DCMTK is used to read DICOM images +-checked_find_package (DCMTK VERSION_MIN 3.6.1 +- PREFER_CONFIG) ++if (USE_DCMTK) ++ checked_find_package (DCMTK REQUIRED VERSION_MIN 3.6.1 ++ PREFER_CONFIG) ++endif() + +-checked_find_package (FFmpeg VERSION_MIN 3.0) +-checked_find_package (GIF +- VERSION_MIN 4 +- RECOMMEND_MIN 5.0 +- RECOMMEND_MIN_REASON "for stability and thread safety") ++if (USE_FFMPEG) ++ checked_find_package (ffmpeg REQUIRED VERSION_MIN 3.0) ++endif() ++if (USE_GIF) ++ checked_find_package (GIF REQUIRED ++ VERSION_MIN 4 ++ RECOMMEND_MIN 5.0 ++ RECOMMEND_MIN_REASON "for stability and thread safety") ++endif() + + # For HEIF/HEIC/AVIF formats +-checked_find_package (Libheif VERSION_MIN 1.3 +- RECOMMEND_MIN 1.16 +- RECOMMEND_MIN_REASON "for orientation support") +-if (APPLE AND LIBHEIF_VERSION VERSION_GREATER_EQUAL 1.10 AND LIBHEIF_VERSION VERSION_LESS 1.11) +- message (WARNING "Libheif 1.10 on Apple is known to be broken, disabling libheif support") +- set (Libheif_FOUND 0) ++if (USE_LIBHEIF) ++ checked_find_package (libheif REQUIRED VERSION_MIN 1.3 ++ RECOMMEND_MIN 1.16 ++ RECOMMEND_MIN_REASON "for orientation support") ++ #if (APPLE AND LIBHEIF_VERSION VERSION_GREATER_EQUAL 1.10 AND LIBHEIF_VERSION VERSION_LESS 1.11) ++ # message (WARNING "Libheif 1.10 on Apple is known to be broken, disabling libheif support") ++ # set (Libheif_FOUND 0) + endif () + +-checked_find_package (LibRaw +- VERSION_MIN 0.18 +- PRINT LibRaw_r_LIBRARIES) +-if (LibRaw_FOUND AND LibRaw_VERSION VERSION_LESS 0.20 AND CMAKE_CXX_STANDARD VERSION_GREATER_EQUAL 17) +- message (STATUS "${ColorYellow}WARNING When building for C++17, LibRaw should be 0.20 or higher (found ${LibRaw_VERSION}). You may get errors, depending on the compiler.${ColorReset}") +- # Currently, we issue the above warning and let them take their chances. +- # If we wish to disable the LibRaw<0.20/C++17 combination that may fail, +- # just uncomment the following two lines. +- # set (LibRaw_FOUND 0) +- # set (LIBRAW_FOUND 0) +-endif () ++if (USE_LIBRAW) ++ checked_find_package (LibRaw REQUIRED ++ VERSION_MIN 0.18 ++ PRINT LibRaw_r_LIBRARIES) ++endif() ++#if (LibRaw_FOUND AND LibRaw_VERSION VERSION_LESS 0.20 AND CMAKE_CXX_STANDARD VERSION_GREATER_EQUAL 17) ++# message (STATUS "${ColorYellow}WARNING When building for C++17, LibRaw should be 0.20 or higher (found ${LibRaw_VERSION}). You may get errors, depending on the compiler.${ColorReset}") ++# # Currently, we issue the above warning and let them take their chances. ++# # If we wish to disable the LibRaw<0.20/C++17 combination that may fail, ++# # just uncomment the following two lines. ++# # set (LibRaw_FOUND 0) ++# # set (LIBRAW_FOUND 0) ++#endif () ++ ++if (USE_OPENJPEG) ++ checked_find_package (OpenJPEG REQUIRED VERSION_MIN 2.0 ++ RECOMMEND_MIN 2.2 ++ RECOMMEND_MIN_REASON "for multithreading support") ++ # Note: Recent OpenJPEG versions have exported cmake configs, but we don't ++ # find them reliable at all, so we stick to our FindOpenJPEG.cmake module. ++endif() + +-checked_find_package (OpenJPEG VERSION_MIN 2.0 +- RECOMMEND_MIN 2.2 +- RECOMMEND_MIN_REASON "for multithreading support") +-# Note: Recent OpenJPEG versions have exported cmake configs, but we don't +-# find them reliable at all, so we stick to our FindOpenJPEG.cmake module. +- +-checked_find_package (OpenVDB +- VERSION_MIN 5.0 +- DEPS TBB +- DEFINITIONS -DUSE_OPENVDB=1) +-if (OpenVDB_FOUND AND OpenVDB_VERSION VERSION_GREATER_EQUAL 10.1 AND CMAKE_CXX_STANDARD VERSION_LESS 17) +- message (WARNING "${ColorYellow}OpenVDB >= 10.1 (we found ${OpenVDB_VERSION}) can only be used when we build with C++17 or higher. Disabling OpenVDB support.${ColorReset}") +- set (OpenVDB_FOUND 0) +- add_compile_definitions(DISABLE_OPENVDB=1) +-endif () ++if (USE_OPENVDB) ++ checked_find_package (OpenVDB REQUIRED ++ VERSION_MIN 5.0 ++ DEPS TBB ++ DEFINITIONS -DUSE_OPENVDB=1) ++ #if (OpenVDB_FOUND AND OpenVDB_VERSION VERSION_GREATER_EQUAL 10.1 AND CMAKE_CXX_STANDARD VERSION_LESS 17) ++ # message (WARNING "${ColorYellow}OpenVDB >= 10.1 (we found ${OpenVDB_VERSION}) can only be used when we build with C++17 or higher. Disabling OpenVDB support.${ColorReset}") ++ # set (OpenVDB_FOUND 0) ++ # add_compile_definitions(DISABLE_OPENVDB=1) ++ #endif () ++endif() + +-checked_find_package (Ptex PREFER_CONFIG) +-if (NOT Ptex_FOUND OR NOT Ptex_VERSION) +- # Fallback for inadequate Ptex exported configs. This will eventually +- # disappear when we can 100% trust Ptex's exports. +- unset (Ptex_FOUND) +- checked_find_package (Ptex) +-endif () ++if (USE_PTEX) ++ checked_find_package (ptex REQUIRED PREFER_CONFIG) ++ # if (NOT Ptex_FOUND OR NOT Ptex_VERSION) ++ # # Fallback for inadequate Ptex exported configs. This will eventually ++ # # disappear when we can 100% trust Ptex's exports. ++ # unset (Ptex_FOUND) ++ # checked_find_package (Ptex) ++ # endif () ++endif() + +-checked_find_package (WebP) +-# Note: When WebP 1.1 (released late 2019) is our minimum, we can use their +-# exported configs and remove our FindWebP.cmake module. ++if (USE_LIBWEBP) ++ checked_find_package (WebP REQUIRED) ++ # Note: When WebP 1.1 (released late 2019) is our minimum, we can use their ++ # exported configs and remove our FindWebP.cmake module. ++endif() + + option (USE_R3DSDK "Enable R3DSDK (RED camera) support" OFF) +-checked_find_package (R3DSDK NO_RECORD_NOTFOUND) # RED camera ++if (USE_R3DSDK) ++ checked_find_package (R3DSDK NO_RECORD_NOTFOUND) # RED camera ++endif() + + set (NUKE_VERSION "7.0" CACHE STRING "Nuke version to target") +-checked_find_package (Nuke NO_RECORD_NOTFOUND) ++if (USE_NUKE) ++ checked_find_package (Nuke NO_RECORD_NOTFOUND) ++endif() + + if (FFmpeg_FOUND OR FREETYPE_FOUND) + checked_find_package (BZip2) # Used by ffmpeg and freetype +@@ -273,8 +309,8 @@ endif() + + # Qt -- used for iv + option (USE_QT "Use Qt if found" ON) +-if (USE_QT) +- checked_find_package (OpenGL) # used for iv ++if (USE_OPENGL) ++ checked_find_package (OpenGL REQUIRED) # used for iv + endif () + if (USE_QT AND OPENGL_FOUND) + checked_find_package (Qt6 COMPONENTS Core Gui Widgets OpenGLWidgets) +@@ -300,13 +336,13 @@ macro (find_or_download_robin_map) + # for an installed version. Still prefer a copy that seems to be + # locally installed in this tree. + if (NOT BUILD_ROBINMAP_FORCE) +- find_package (Robinmap QUIET) ++ find_package (tsl-robin-map REQUIRED) + endif () + # If an external copy wasn't found and we requested that missing + # packages be built, or we we are forcing a local copy to be built, then + # download and build it. + # Download the headers from github +- if ((BUILD_MISSING_ROBINMAP AND NOT ROBINMAP_FOUND) OR BUILD_ROBINMAP_FORCE) ++ if ((BUILD_MISSING_ROBINMAP AND NOT tsl-robin-map_FOUND) OR BUILD_ROBINMAP_FORCE) + message (STATUS "Downloading local Tessil/robin-map") + set (ROBINMAP_INSTALL_DIR "${PROJECT_SOURCE_DIR}/ext/robin-map") + set (ROBINMAP_GIT_REPOSITORY "https://github.com/Tessil/robin-map") +@@ -324,7 +360,7 @@ macro (find_or_download_robin_map) + endif () + set (ROBINMAP_INCLUDE_DIR "${ROBINMAP_INSTALL_DIR}/include") + endif () +- checked_find_package (Robinmap REQUIRED) ++ checked_find_package (tsl-robin-map REQUIRED) + endmacro() + + find_or_download_robin_map () +@@ -343,7 +379,7 @@ macro (find_or_download_fmt) + # for an installed version. Still prefer a copy that seems to be + # locally installed in this tree. + if (NOT BUILD_FMT_FORCE) +- find_package (fmt QUIET) ++ find_package (fmt REQUIRED) + endif () + # If an external copy wasn't found and we requested that missing + # packages be built, or we we are forcing a local copy to be built, then +@@ -378,7 +414,7 @@ macro (find_or_download_fmt) + set (fmt_VERSION "${FMT_VERSION_MAJOR}.${FMT_VERSION_MINOR}.${FMT_VERSION_PATCH}") + list (APPEND CFP_ALL_BUILD_DEPS_FOUND "${pkgname} ${${pkgname}_VERSION}") + else () +- get_target_property(FMT_INCLUDE_DIR fmt::fmt-header-only INTERFACE_INCLUDE_DIRECTORIES) ++ get_target_property(FMT_INCLUDE_DIR fmt::fmt INTERFACE_INCLUDE_DIRECTORIES) + set (OIIO_USING_FMT_LOCAL FALSE) + checked_find_package (fmt REQUIRED + VERSION_MIN 7.0) +diff --git src/ffmpeg.imageio/CMakeLists.txt src/ffmpeg.imageio/CMakeLists.txt +index 8e47a8443..900d23101 100644 +--- src/ffmpeg.imageio/CMakeLists.txt ++++ src/ffmpeg.imageio/CMakeLists.txt +@@ -2,7 +2,7 @@ + # SPDX-License-Identifier: Apache-2.0 + # https://github.com/AcademySoftwareFoundation/OpenImageIO + +-if (FFmpeg_FOUND) ++if (USE_FFMPEG) + if (LINKSTATIC) + set (_static_suffixes .lib .a) + set (_static_libraries_found 0) +@@ -26,11 +26,9 @@ if (FFmpeg_FOUND) + endif() + + add_oiio_plugin (ffmpeginput.cpp +- INCLUDE_DIRS ${FFMPEG_INCLUDES} +- LINK_LIBRARIES ${FFMPEG_LIBRARIES} +- ${BZIP2_LIBRARIES} ++ LINK_LIBRARIES ffmpeg::avcodec ffmpeg::avformat ffmpeg::swscale + DEFINITIONS "-DUSE_FFMPEG" +- "-DOIIO_FFMPEG_VERSION=\"${FFMPEG_VERSION}\"") ++ "-DOIIO_FFMPEG_VERSION=\"${ffmpeg_VERSION}\"") + else() + message (STATUS "FFmpeg not found: ffmpeg plugin will not be built") + endif() +diff --git src/heif.imageio/CMakeLists.txt src/heif.imageio/CMakeLists.txt +index 5b6c30a85..e5bc55ef1 100644 +--- src/heif.imageio/CMakeLists.txt ++++ src/heif.imageio/CMakeLists.txt +@@ -2,32 +2,31 @@ + # SPDX-License-Identifier: Apache-2.0 + # https://github.com/AcademySoftwareFoundation/OpenImageIO + +-if (Libheif_FOUND) +- if (LINKSTATIC) +- set (_static_suffixes .lib .a) +- set (_static_libraries_found 0) ++if (USE_LIBHEIF) ++ # if (LINKSTATIC) ++ # set (_static_suffixes .lib .a) ++ # set (_static_libraries_found 0) + +- foreach (_libeheif_library IN LISTS LIBHEIF_LIBRARIES) +- get_filename_component (_ext ${_libeheif_library} LAST_EXT) +- list (FIND _static_suffixes ${_ext} _index) +- if (${_index} GREATER -1) +- MATH (EXPR _static_libraries_found "${static_libraries_found}+1") +- endif() +- endforeach() ++ # foreach (_libeheif_library IN LISTS LIBHEIF_LIBRARIES) ++ # get_filename_component (_ext ${_libeheif_library} LAST_EXT) ++ # list (FIND _static_suffixes ${_ext} _index) ++ # if (${_index} GREATER -1) ++ # MATH (EXPR _static_libraries_found "${static_libraries_found}+1") ++ # endif() ++ # endforeach() + +- if (${_static_libraries_found} GREATER 0) +- message (STATUS "${ColorYellow}") +- message (STATUS "You are linking OpenImageIO against a static version of libheif, which is LGPL") +- message (STATUS "licensed. If you intend to redistribute this build of OpenImageIO, we recommend") +- message (STATUS "that you review the libheif license terms, or you may wish to switch to using a") +- message (STATUS "dynamically-linked libheif.") +- message ("${ColorReset}") +- endif() +- endif() ++ # if (${_static_libraries_found} GREATER 0) ++ # message (STATUS "${ColorYellow}") ++ # message (STATUS "You are linking OpenImageIO against a static version of libheif, which is LGPL") ++ # message (STATUS "licensed. If you intend to redistribute this build of OpenImageIO, we recommend") ++ # message (STATUS "that you review the libheif license terms, or you may wish to switch to using a") ++ # message (STATUS "dynamically-linked libheif.") ++ # message ("${ColorReset}") ++ # endif() ++ # endif() + + add_oiio_plugin (heifinput.cpp heifoutput.cpp +- INCLUDE_DIRS ${LIBHEIF_INCLUDES} +- LINK_LIBRARIES ${LIBHEIF_LIBRARIES} ++ LINK_LIBRARIES libheif::heif + DEFINITIONS "-DUSE_HEIF=1") + else () + message (WARNING "heif plugin will not be built") +diff --git src/include/CMakeLists.txt src/include/CMakeLists.txt +index 18b7632a3..c558c4780 100644 +--- src/include/CMakeLists.txt ++++ src/include/CMakeLists.txt +@@ -64,7 +64,8 @@ install (FILES ${detail_headers} + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME}/detail + COMPONENT developer) + +-if (INTERNALIZE_FMT OR OIIO_USING_FMT_LOCAL) ++if (0) # Don't try to copy fmt libraries to target install folder ++ set(FMT_INCLUDES "${fmt_INCLUDE_DIR}") + set (fmt_headers_base_names) + foreach (header_name core.h format-inl.h format.h ostream.h printf.h + std.h base.h chrono.h) +diff --git src/jpeg2000.imageio/CMakeLists.txt src/jpeg2000.imageio/CMakeLists.txt +index 560e8d486..24348fe66 100644 +--- src/jpeg2000.imageio/CMakeLists.txt ++++ src/jpeg2000.imageio/CMakeLists.txt +@@ -2,10 +2,9 @@ + # SPDX-License-Identifier: Apache-2.0 + # https://github.com/AcademySoftwareFoundation/OpenImageIO + +-if (OPENJPEG_FOUND) ++if (USE_OPENJPEG) + add_oiio_plugin (jpeg2000input.cpp jpeg2000output.cpp +- INCLUDE_DIRS ${OPENJPEG_INCLUDES} +- LINK_LIBRARIES ${OPENJPEG_LIBRARIES} ++ LINK_LIBRARIES openjp2 + DEFINITIONS "-DUSE_OPENJPEG") + else() + message (WARNING "Jpeg-2000 plugin will not be built") +diff --git src/libOpenImageIO/CMakeLists.txt src/libOpenImageIO/CMakeLists.txt +index aeb7b7f93..9a32e4cf2 100644 +--- src/libOpenImageIO/CMakeLists.txt ++++ src/libOpenImageIO/CMakeLists.txt +@@ -154,19 +154,27 @@ target_link_libraries (OpenImageIO + ${OPENIMAGEIO_IMATH_TARGETS} + PRIVATE + ${OPENIMAGEIO_OPENEXR_TARGETS} +- ${OpenCV_LIBRARIES} + ${format_plugin_libs} # Add all the target link libraries from the plugins + $ + $ + $ + $ +- $ + ${BZIP2_LIBRARIES} + ZLIB::ZLIB +- $ ++ tsl::robin_map ++ Boost::filesystem Boost::thread Boost::system Boost::container + ${CMAKE_DL_LIBS} + ) + ++if (USE_OPENCV) ++ target_link_libraries (OpenImageIO PRIVATE opencv::opencv_core ++ opencv::opencv_imgproc ++ opencv::opencv_videoio) ++endif () ++if (USE_FREETYPE) ++ target_link_libraries (OpenImageIO PRIVATE Freetype::Freetype) ++endif() ++ + if (WIN32) + target_link_libraries (OpenImageIO PRIVATE psapi) + endif() +diff --git src/libutil/CMakeLists.txt src/libutil/CMakeLists.txt +index f873b3eed..cf5d4e74c 100644 +--- src/libutil/CMakeLists.txt ++++ src/libutil/CMakeLists.txt +@@ -20,20 +20,13 @@ target_link_libraries (OpenImageIO_Util + ${GCC_ATOMIC_LIBRARIES} + ${OPENIMAGEIO_IMATH_DEPENDENCY_VISIBILITY} + ${OPENIMAGEIO_IMATH_TARGETS} ++ fmt::fmt + PRIVATE +- $ +- $ ++ Boost::filesystem Boost::thread Boost::system + $ + ${CMAKE_DL_LIBS} + ) + +-if (INTERNALIZE_FMT OR OIIO_USING_FMT_LOCAL) +- add_dependencies(OpenImageIO_Util fmt_internal_target) +-else () +- target_link_libraries (OpenImageIO_Util +- PUBLIC fmt::fmt-header-only) +-endif () +- + if (WIN32) + add_definitions(-DWIN32_LEAN_AND_MEAN -DNOMINMAX -DNOGDI -DVC_EXTRALEAN) + target_link_libraries (OpenImageIO_Util PRIVATE psapi) +diff --git src/ptex.imageio/CMakeLists.txt src/ptex.imageio/CMakeLists.txt +index 16634fedb..82060ac29 100644 +--- src/ptex.imageio/CMakeLists.txt ++++ src/ptex.imageio/CMakeLists.txt +@@ -2,12 +2,9 @@ + # SPDX-License-Identifier: Apache-2.0 + # https://github.com/AcademySoftwareFoundation/OpenImageIO + +-if (Ptex_FOUND) +- set(ptex_target Ptex::Ptex_dynamic) +- if (TARGET Ptex::Ptex_static AND (NOT TARGET Ptex::Ptex_dynamic OR LINKSTATIC)) +- set(ptex_target Ptex::Ptex_static) +- endif() ++if (USE_PTEX) + add_oiio_plugin (ptexinput.cpp +- LINK_LIBRARIES ${ptex_target} ZLIB::ZLIB ++ LINK_LIBRARIES ${ptex_LIBRARIES} ZLIB::ZLIB ++ INCLUDE_DIRS ${ptex_INCLUDE_DIRS} + DEFINITIONS "-DUSE_PTEX") + endif () diff --git a/recipes/openimageio/all/patches/2.5.6.0-cmake-targets.patch b/recipes/openimageio/all/patches/2.5.6.0-cmake-targets.patch deleted file mode 100644 index 7d45a41ba65a6..0000000000000 --- a/recipes/openimageio/all/patches/2.5.6.0-cmake-targets.patch +++ /dev/null @@ -1,515 +0,0 @@ -diff --git CMakeLists.txt CMakeLists.txt -index 1ae61f6ae..5c4202395 100644 ---- CMakeLists.txt -+++ CMakeLists.txt -@@ -154,7 +154,7 @@ endif () - add_definitions (-DOIIO_INTERNAL=1) - - list (APPEND CMAKE_MODULE_PATH -- "${PROJECT_SOURCE_DIR}/src/cmake/modules" -+ #"${PROJECT_SOURCE_DIR}/src/cmake/modules" - "${PROJECT_SOURCE_DIR}/src/cmake") - - include (GNUInstallDirs) -@@ -234,7 +234,7 @@ if (OIIO_BUILD_TOOLS AND NOT BUILD_OIIOUTIL_ONLY) - add_subdirectory (src/iinfo) - add_subdirectory (src/maketx) - add_subdirectory (src/oiiotool) -- add_subdirectory (src/testtex) -+ #add_subdirectory (src/testtex) - add_subdirectory (src/iv) - endif () - -diff --git src/cmake/externalpackages.cmake src/cmake/externalpackages.cmake -index 3cfaedd57..f75fee7a3 100644 ---- src/cmake/externalpackages.cmake -+++ src/cmake/externalpackages.cmake -@@ -45,14 +45,14 @@ if (NOT DEFINED Boost_USE_STATIC_LIBS) - set (Boost_USE_STATIC_LIBS "${LINKSTATIC}") - endif () - --if (MSVC) -- # Not linking Boost as static libraries: either an explicit setting or LINKSTATIC is FALSE: -- if (NOT Boost_USE_STATIC_LIBS) -- add_definitions (-DBOOST_ALL_DYN_LINK=1) -- endif () --endif () -- --set (Boost_COMPONENTS thread) -+#if (MSVC) -+# # Not linking Boost as static libraries: either an explicit setting or LINKSTATIC is FALSE: -+# if (NOT Boost_USE_STATIC_LIBS) -+# add_definitions (-DBOOST_ALL_DYN_LINK=1) -+# endif () -+#endif () -+ -+set (Boost_COMPONENTS filesystem system thread container) - if (NOT USE_STD_FILESYSTEM) - list (APPEND Boost_COMPONENTS filesystem) - endif () -@@ -108,9 +108,9 @@ checked_find_package (OpenEXR REQUIRED - # building against Imath/OpenEXR 3.x when there is still a system-level - # install version of 2.x. - include_directories(BEFORE ${IMATH_INCLUDES} ${OPENEXR_INCLUDES}) --if (MSVC AND NOT LINKSTATIC) -- add_definitions (-DOPENEXR_DLL) # Is this needed for new versions? --endif () -+#if (MSVC AND NOT LINKSTATIC) -+# add_definitions (-DOPENEXR_DLL) # Is this needed for new versions? -+#endif () - if (OpenEXR_VERSION VERSION_GREATER_EQUAL 3.0) - set (OIIO_USING_IMATH 3) - else () -@@ -137,11 +137,15 @@ set (OPENIMAGEIO_CONFIG_DO_NOT_FIND_IMATH OFF CACHE BOOL - "Exclude find_dependency(Imath) from the exported OpenImageIOConfig.cmake") - - # JPEG -- prefer JPEG-Turbo to regular libjpeg --checked_find_package (libjpeg-turbo -- VERSION_MIN 2.1 -- DEFINITIONS -DUSE_JPEG_TURBO=1) --if (NOT TARGET libjpeg-turbo::jpeg) # Try to find the non-turbo version -+if (USE_JPEGTURBO) -+ checked_find_package (libjpeg-turbo REQUIRED -+ DEFINITIONS -DUSE_JPEG_TURBO=1 -+ PRINT libjpeg-turbo_INCLUDES libjpeg-turbo_LIBRARIES) -+ add_library(JPEG::JPEG ALIAS libjpeg-turbo::libjpeg-turbo) -+elseif (USE_JPEG) # Try to find the non-turbo version - checked_find_package (JPEG REQUIRED) -+else () -+ message(FATAL_ERROR "JPEG library was not found!") - endif () - - # Pugixml setup. Normally we just use the version bundled with oiio, but -@@ -157,112 +161,110 @@ else () - endif() - - # From pythonutils.cmake --find_python() -+#find_python() - - - ########################################################################### - # Dependencies for optional formats and features. If these are not found, - # we will continue building, but the related functionality will be disabled. - --checked_find_package (PNG) -+if (USE_LIBPNG) -+ checked_find_package (PNG REQUIRED) -+endif() - --checked_find_package (BZip2) # Used by ffmpeg and freetype --if (NOT BZIP2_FOUND) -- set (BZIP2_LIBRARIES "") # TODO: why does it break without this? --endif () -+if (USE_FREETYPE) -+ checked_find_package (Freetype -+ DEFINITIONS -DUSE_FREETYPE=1 ) -+endif() - --checked_find_package (Freetype -- DEFINITIONS -DUSE_FREETYPE=1 ) -- --checked_find_package (OpenColorIO -- DEFINITIONS -DUSE_OCIO=1 -DUSE_OPENCOLORIO=1 -- # PREFER_CONFIG -- ) --if (OpenColorIO_FOUND) -- option (OIIO_DISABLE_BUILTIN_OCIO_CONFIGS -- "For deveoper debugging/testing ONLY! Disable OCIO 2.2 builtin configs." OFF) -- if (OIIO_DISABLE_BUILTIN_OCIO_CONFIGS OR "$ENV{OIIO_DISABLE_BUILTIN_OCIO_CONFIGS}") -- add_compile_definitions(OIIO_DISABLE_BUILTIN_OCIO_CONFIGS) -+if (USE_OPENCOLORIO) -+ checked_find_package (OpenColorIO -+ DEFINITIONS -DUSE_OCIO=1 -DUSE_OPENCOLORIO=1 -+ # PREFER_CONFIG -+ ) -+ if (NOT OpenColorIO_FOUND) -+ set (OpenColorIO_FOUND 0) - endif () --else () -- set (OpenColorIO_FOUND 0) --endif () -- --checked_find_package (OpenCV 3.0 -- DEFINITIONS -DUSE_OPENCV=1) -+endif() -+if (USE_OPENCV) -+ checked_find_package (OpenCV 3.0 -+ DEFINITIONS -DUSE_OPENCV=1) -+endif() - - # Intel TBB --set (TBB_USE_DEBUG_BUILD OFF) --checked_find_package (TBB 2017 -- SETVARIABLES OIIO_TBB -- PREFER_CONFIG) -- --checked_find_package (DCMTK VERSION_MIN 3.6.1) # For DICOM images --checked_find_package (FFmpeg VERSION_MIN 3.0) --checked_find_package (GIF -- VERSION_MIN 4 -- RECOMMEND_MIN 5.0 -- RECOMMEND_MIN_REASON "for stability and thread safety") -+if (USE_TBB)# Intel TBB -+ set (TBB_USE_DEBUG_BUILD OFF) -+ checked_find_package (TBB 2017 -+ SETVARIABLES OIIO_TBB -+ PREFER_CONFIG) -+endif() -+if (USE_DCMTK) -+ checked_find_package (DCMTK VERSION_MIN 3.6.1) # For DICOM images -+endif() -+if (USE_FFMPEG) -+ checked_find_package (ffmpeg VERSION_MIN 3.0) -+endif() -+if (USE_GIF) -+ checked_find_package (GIF -+ VERSION_MIN 4 -+ RECOMMEND_MIN 5.0 -+ RECOMMEND_MIN_REASON "for stability and thread safety") -+endif() - - # For HEIF/HEIC/AVIF formats --checked_find_package (Libheif VERSION_MIN 1.3 -- RECOMMEND_MIN 1.7 -- RECOMMEND_MIN_REASON "for AVIF support") --if (APPLE AND LIBHEIF_VERSION VERSION_GREATER_EQUAL 1.10 AND LIBHEIF_VERSION VERSION_LESS 1.11) -- message (WARNING "Libheif 1.10 on Apple is known to be broken, disabling libheif support") -- set (Libheif_FOUND 0) --endif () -- --checked_find_package (LibRaw -- VERSION_MIN 0.18 -- PRINT LibRaw_r_LIBRARIES) --if (LibRaw_FOUND AND LibRaw_VERSION VERSION_LESS 0.20 AND CMAKE_CXX_STANDARD VERSION_GREATER_EQUAL 17) -- message (STATUS "${ColorYellow}WARNING When building for C++17, LibRaw should be 0.20 or higher (found ${LibRaw_VERSION}). You may get errors, depending on the compiler.${ColorReset}") -- # Currently, we issue the above warning and let them take their chances. -- # If we wish to disable the LibRaw<0.20/C++17 combination that may fail, -- # just uncomment the following two lines. -- # set (LibRaw_FOUND 0) -- # set (LIBRAW_FOUND 0) --endif () -+if (USE_LIBHEIF) -+ checked_find_package (libheif REQUIRED VERSION_MIN 1.3 -+ RECOMMEND_MIN 1.7 -+ RECOMMEND_MIN_REASON "for AVIF support") -+endif() - --checked_find_package (OpenJPEG VERSION_MIN 2.0 -- RECOMMEND_MIN 2.2 -- RECOMMEND_MIN_REASON "for multithreading support") --# Note: Recent OpenJPEG versions have exported cmake configs, but we don't --# find them reliable at all, so we stick to our FindOpenJPEG.cmake module. -- --checked_find_package (OpenVDB -- VERSION_MIN 5.0 -- DEPS TBB -- DEFINITIONS -DUSE_OPENVDB=1) --if (OpenVDB_FOUND AND OpenVDB_VERSION VERSION_GREATER_EQUAL 10.1 AND CMAKE_CXX_STANDARD VERSION_LESS 17) -- message (WARNING "${ColorYellow}OpenVDB >= 10.1 (we found ${OpenVDB_VERSION}) can only be used when we build with C++17 or higher. Disabling OpenVDB support.${ColorReset}") -- set (OpeVDB_FOUND 0) --endif () -+if (USE_LIBRAW) -+ checked_find_package (LibRaw -+ RECOMMEND_MIN 0.18 -+ RECOMMEND_MIN_REASON "for ACES support and better camera metadata" -+ PRINT LibRaw_r_LIBRARIES) -+endif() - --checked_find_package (Ptex PREFER_CONFIG) --if (NOT Ptex_FOUND OR NOT Ptex_VERSION) -- # Fallback for inadequate Ptex exported configs. This will eventually -- # disappear when we can 100% trust Ptex's exports. -- unset (Ptex_FOUND) -- checked_find_package (Ptex) --endif () -+if (USE_OPENJPEG) -+ checked_find_package (OpenJPEG REQUIRED -+ VERSION_MIN 2.0 -+ RECOMMEND_MIN 2.2 -+ RECOMMEND_MIN_REASON "for multithreading support") -+ # Note: Recent OpenJPEG versions have exported cmake configs, but we don't -+ # find them reliable at all, so we stick to our FindOpenJPEG.cmake module. -+endif() -+if (USE_OPENVDB) -+ checked_find_package (OpenVDB REQUIRED -+ VERSION_MIN 5.0 -+ DEPS TBB -+ DEFINITIONS -DUSE_OPENVDB=1) -+endif() - --checked_find_package (WebP) -+if (USE_PTEX) -+ checked_find_package (ptex PREFER_CONFIG) -+endif() -+ -+if (USE_LIBWEBP) -+ checked_find_package (WebP REQUIRED) -+endif() - - option (USE_R3DSDK "Enable R3DSDK (RED camera) support" OFF) --checked_find_package (R3DSDK) # RED camera -+if (USE_R3DSDK) -+ checked_find_package (R3DSDK REQUIRED) # RED camera -+endif () - - set (NUKE_VERSION "7.0" CACHE STRING "Nuke version to target") --checked_find_package (Nuke) -+if (USE_NUKE) -+ checked_find_package (Nuke REQUIRED) -+endif () - - - # Qt -- used for iv - option (USE_QT "Use Qt if found" ON) --if (USE_QT) -- checked_find_package (OpenGL) # used for iv -+if (USE_OPENGL) -+ checked_find_package (OpenGL REQUIRED) # used for iv - endif () --if (USE_QT AND OPENGL_FOUND) -+if (USE_QT AND USE_OPENGL) - checked_find_package (Qt6 COMPONENTS Core Gui Widgets OpenGLWidgets) - if (NOT Qt6_FOUND) - checked_find_package (Qt5 COMPONENTS Core Gui Widgets OpenGL) -@@ -286,13 +288,13 @@ macro (find_or_download_robin_map) - # for an installed version. Still prefer a copy that seems to be - # locally installed in this tree. - if (NOT BUILD_ROBINMAP_FORCE) -- find_package (Robinmap QUIET) -+ find_package (tsl-robin-map REQUIRED) - endif () - # If an external copy wasn't found and we requested that missing - # packages be built, or we we are forcing a local copy to be built, then - # download and build it. - # Download the headers from github -- if ((BUILD_MISSING_ROBINMAP AND NOT ROBINMAP_FOUND) OR BUILD_ROBINMAP_FORCE) -+ if ((BUILD_MISSING_ROBINMAP AND NOT tsl-robin-map_FOUND) OR BUILD_ROBINMAP_FORCE) - message (STATUS "Downloading local Tessil/robin-map") - set (ROBINMAP_INSTALL_DIR "${PROJECT_SOURCE_DIR}/ext/robin-map") - set (ROBINMAP_GIT_REPOSITORY "https://github.com/Tessil/robin-map") -@@ -310,7 +312,7 @@ macro (find_or_download_robin_map) - endif () - set (ROBINMAP_INCLUDE_DIR "${ROBINMAP_INSTALL_DIR}/include") - endif () -- checked_find_package (Robinmap REQUIRED) -+ checked_find_package (tsl-robin-map REQUIRED) - endmacro() - - -@@ -332,7 +334,7 @@ macro (find_or_download_fmt) - # If an external copy wasn't found and we requested that missing - # packages be built, or we we are forcing a local copy to be built, then - # download and build it. -- if ((BUILD_MISSING_FMT AND NOT FMT_FOUND) OR BUILD_FMT_FORCE) -+ if ((BUILD_MISSING_FMT AND NOT fmt_FOUND) OR BUILD_FMT_FORCE) - message (STATUS "Downloading local fmtlib/fmt") - set (FMT_INSTALL_DIR "${PROJECT_SOURCE_DIR}/ext/fmt") - set (FMT_GIT_REPOSITORY "https://github.com/fmtlib/fmt") -diff --git src/ffmpeg.imageio/CMakeLists.txt src/ffmpeg.imageio/CMakeLists.txt -index 8e47a8443..e1a1987fe 100644 ---- src/ffmpeg.imageio/CMakeLists.txt -+++ src/ffmpeg.imageio/CMakeLists.txt -@@ -2,7 +2,7 @@ - # SPDX-License-Identifier: Apache-2.0 - # https://github.com/AcademySoftwareFoundation/OpenImageIO - --if (FFmpeg_FOUND) -+if (USE_FFMPEG) - if (LINKSTATIC) - set (_static_suffixes .lib .a) - set (_static_libraries_found 0) -@@ -26,11 +26,9 @@ if (FFmpeg_FOUND) - endif() - - add_oiio_plugin (ffmpeginput.cpp -- INCLUDE_DIRS ${FFMPEG_INCLUDES} -- LINK_LIBRARIES ${FFMPEG_LIBRARIES} -- ${BZIP2_LIBRARIES} -+ LINK_LIBRARIES ffmpeg::avcodec ffmpeg::avformat ffmpeg::swscale - DEFINITIONS "-DUSE_FFMPEG" -- "-DOIIO_FFMPEG_VERSION=\"${FFMPEG_VERSION}\"") -+ "-DOIIO_FFMPEG_VERSION=\"${ffmpeg_VERSION}\"") - else() - message (STATUS "FFmpeg not found: ffmpeg plugin will not be built") - endif() -diff --git src/heif.imageio/CMakeLists.txt src/heif.imageio/CMakeLists.txt -index 5b6c30a85..17b0243a1 100644 ---- src/heif.imageio/CMakeLists.txt -+++ src/heif.imageio/CMakeLists.txt -@@ -2,32 +2,32 @@ - # SPDX-License-Identifier: Apache-2.0 - # https://github.com/AcademySoftwareFoundation/OpenImageIO - --if (Libheif_FOUND) -- if (LINKSTATIC) -- set (_static_suffixes .lib .a) -- set (_static_libraries_found 0) -+if (USE_LIBHEIF) -+ # if (LINKSTATIC) -+ # set (_static_suffixes .lib .a) -+ # set (_static_libraries_found 0) - -- foreach (_libeheif_library IN LISTS LIBHEIF_LIBRARIES) -- get_filename_component (_ext ${_libeheif_library} LAST_EXT) -- list (FIND _static_suffixes ${_ext} _index) -- if (${_index} GREATER -1) -- MATH (EXPR _static_libraries_found "${static_libraries_found}+1") -- endif() -- endforeach() -+ # foreach (_libeheif_library IN LISTS LIBHEIF_LIBRARIES) -+ # get_filename_component (_ext ${_libeheif_library} LAST_EXT) -+ # list (FIND _static_suffixes ${_ext} _index) -+ # if (${_index} GREATER -1) -+ # MATH (EXPR _static_libraries_found "${static_libraries_found}+1") -+ # endif() -+ # endforeach() - -- if (${_static_libraries_found} GREATER 0) -- message (STATUS "${ColorYellow}") -- message (STATUS "You are linking OpenImageIO against a static version of libheif, which is LGPL") -- message (STATUS "licensed. If you intend to redistribute this build of OpenImageIO, we recommend") -- message (STATUS "that you review the libheif license terms, or you may wish to switch to using a") -- message (STATUS "dynamically-linked libheif.") -- message ("${ColorReset}") -- endif() -- endif() -+ # if (${_static_libraries_found} GREATER 0) -+ # message (STATUS "${ColorYellow}") -+ # message (STATUS "You are linking OpenImageIO against a static version of libheif, which is LGPL") -+ # message (STATUS "licensed. If you intend to redistribute this build of OpenImageIO, we recommend") -+ # message (STATUS "that you review the libheif license terms, or you may wish to switch to using a") -+ # message (STATUS "dynamically-linked libheif.") -+ # message ("${ColorReset}") -+ # endif() -+ # endif() - - add_oiio_plugin (heifinput.cpp heifoutput.cpp -- INCLUDE_DIRS ${LIBHEIF_INCLUDES} -- LINK_LIBRARIES ${LIBHEIF_LIBRARIES} -+ #INCLUDE_DIRS ${LIBHEIF_INCLUDES} -+ LINK_LIBRARIES libheif::heif - DEFINITIONS "-DUSE_HEIF=1") - else () - message (WARNING "heif plugin will not be built") -diff --git src/include/CMakeLists.txt src/include/CMakeLists.txt -index 006cb65a7..a4ecf23c7 100644 ---- src/include/CMakeLists.txt -+++ src/include/CMakeLists.txt -@@ -65,6 +65,7 @@ install (FILES ${detail_headers} - COMPONENT developer) - - if (INTERNALIZE_FMT OR OIIO_USING_FMT_LOCAL) -+ set(FMT_INCLUDES "${fmt_INCLUDE_DIR}") - set (fmt_headers - ${FMT_INCLUDES}/fmt/core.h - ${FMT_INCLUDES}/fmt/format-inl.h -@@ -74,8 +75,8 @@ if (INTERNALIZE_FMT OR OIIO_USING_FMT_LOCAL) - if (fmt_VERSION VERSION_GREATER_EQUAL 90000) - list (APPEND fmt_headers ${FMT_INCLUDES}/fmt/std.h) - endif () -- file (COPY ${fmt_headers} -- DESTINATION ${CMAKE_BINARY_DIR}/include/OpenImageIO/detail/fmt) -+ #file (COPY ${fmt_headers} -+ # DESTINATION ${CMAKE_BINARY_DIR}/include/OpenImageIO/detail/fmt) - else () - set (fmt_headers - ${CMAKE_BINARY_DIR}/include/OpenImageIO/detail/fmt/format.h -diff --git src/include/OpenImageIO/detail/fmt.h src/include/OpenImageIO/detail/fmt.h -index b4f5e7da4..a990f83d4 100644 ---- src/include/OpenImageIO/detail/fmt.h -+++ src/include/OpenImageIO/detail/fmt.h -@@ -58,9 +58,9 @@ OIIO_PRAGMA_WARNING_PUSH - # pragma GCC diagnostic ignored "-Wtautological-constant-compare" - #endif - --#include --#include --#include -+#include -+#include -+#include - - OIIO_PRAGMA_WARNING_POP - -diff --git src/jpeg2000.imageio/CMakeLists.txt src/jpeg2000.imageio/CMakeLists.txt -index 560e8d486..402d4adad 100644 ---- src/jpeg2000.imageio/CMakeLists.txt -+++ src/jpeg2000.imageio/CMakeLists.txt -@@ -4,8 +4,7 @@ - - if (OPENJPEG_FOUND) - add_oiio_plugin (jpeg2000input.cpp jpeg2000output.cpp -- INCLUDE_DIRS ${OPENJPEG_INCLUDES} -- LINK_LIBRARIES ${OPENJPEG_LIBRARIES} -+ LINK_LIBRARIES openjp2 - DEFINITIONS "-DUSE_OPENJPEG") - else() - message (WARNING "Jpeg-2000 plugin will not be built") -diff --git src/libOpenImageIO/CMakeLists.txt src/libOpenImageIO/CMakeLists.txt -index 9972a7150..683a66238 100644 ---- src/libOpenImageIO/CMakeLists.txt -+++ src/libOpenImageIO/CMakeLists.txt -@@ -145,7 +145,6 @@ target_link_libraries (OpenImageIO - ${OPENIMAGEIO_IMATH_TARGETS} - PRIVATE - ${OPENIMAGEIO_OPENEXR_TARGETS} -- ${OpenCV_LIBRARIES} - ${format_plugin_libs} # Add all the target link libraries from the plugins - $ - $ -@@ -153,12 +152,19 @@ target_link_libraries (OpenImageIO - $ - ${BZIP2_LIBRARIES} - ZLIB::ZLIB -- $ -+ tsl::robin_map -+ Boost::filesystem Boost::thread Boost::system Boost::container - ${CMAKE_DL_LIBS} - ) - --if (FREETYPE_FOUND) -- target_link_libraries (OpenImageIO PRIVATE ${FREETYPE_LIBRARIES}) -+if (USE_OPENCV) -+ target_link_libraries (OpenImageIO PRIVATE opencv::opencv_core -+ opencv::opencv_imgproc -+ opencv::opencv_videoio) -+endif () -+ -+if (USE_FREETYPE) -+ target_link_libraries (OpenImageIO PRIVATE Freetype::Freetype) - endif() - - if (WIN32) -diff --git src/libutil/CMakeLists.txt src/libutil/CMakeLists.txt -index 10cc4b0c4..bb632d99a 100644 ---- src/libutil/CMakeLists.txt -+++ src/libutil/CMakeLists.txt -@@ -20,9 +20,9 @@ target_link_libraries (OpenImageIO_Util - ${GCC_ATOMIC_LIBRARIES} - ${OPENIMAGEIO_IMATH_DEPENDENCY_VISIBILITY} - ${OPENIMAGEIO_IMATH_TARGETS} -+ fmt::fmt - PRIVATE -- $ -- $ -+ Boost::filesystem Boost::thread Boost::system - $ - ${CMAKE_DL_LIBS} - ) -diff --git src/ptex.imageio/CMakeLists.txt src/ptex.imageio/CMakeLists.txt -index ed42f1c94..82d2b9770 100644 ---- src/ptex.imageio/CMakeLists.txt -+++ src/ptex.imageio/CMakeLists.txt -@@ -2,8 +2,9 @@ - # SPDX-License-Identifier: Apache-2.0 - # https://github.com/AcademySoftwareFoundation/OpenImageIO - --if (Ptex_FOUND) -+if (USE_PTEX) - add_oiio_plugin (ptexinput.cpp -- LINK_LIBRARIES Ptex::Ptex_dynamic ZLIB::ZLIB -+ LINK_LIBRARIES ${ptex_LIBRARIES} ZLIB::ZLIB -+ INCLUDE_DIRS ${ptex_INCLUDE_DIRS} - DEFINITIONS "-DUSE_PTEX") - endif () diff --git a/recipes/openimageio/all/patches/2.5.9.0-cmake-targets.patch b/recipes/openimageio/all/patches/2.5.9.0-cmake-targets.patch deleted file mode 100644 index 747b79bc8b544..0000000000000 --- a/recipes/openimageio/all/patches/2.5.9.0-cmake-targets.patch +++ /dev/null @@ -1,518 +0,0 @@ -diff --git CMakeLists.txt CMakeLists.txt -index 8125716a3..dd83c588f 100644 ---- CMakeLists.txt -+++ CMakeLists.txt -@@ -154,7 +154,7 @@ endif () - add_definitions (-DOIIO_INTERNAL=1) - - list (APPEND CMAKE_MODULE_PATH -- "${PROJECT_SOURCE_DIR}/src/cmake/modules" -+ #"${PROJECT_SOURCE_DIR}/src/cmake/modules" - "${PROJECT_SOURCE_DIR}/src/cmake") - - include (GNUInstallDirs) -@@ -233,7 +233,7 @@ if (OIIO_BUILD_TOOLS AND NOT BUILD_OIIOUTIL_ONLY) - add_subdirectory (src/iinfo) - add_subdirectory (src/maketx) - add_subdirectory (src/oiiotool) -- add_subdirectory (src/testtex) -+ #add_subdirectory (src/testtex) - add_subdirectory (src/iv) - endif () - -diff --git src/cmake/externalpackages.cmake src/cmake/externalpackages.cmake -index 3f73cd266..d03c906d1 100644 ---- src/cmake/externalpackages.cmake -+++ src/cmake/externalpackages.cmake -@@ -45,14 +45,14 @@ if (NOT DEFINED Boost_USE_STATIC_LIBS) - set (Boost_USE_STATIC_LIBS "${LINKSTATIC}") - endif () - --if (MSVC) -- # Not linking Boost as static libraries: either an explicit setting or LINKSTATIC is FALSE: -- if (NOT Boost_USE_STATIC_LIBS) -- add_definitions (-DBOOST_ALL_DYN_LINK=1) -- endif () --endif () -- --set (Boost_COMPONENTS thread) -+#if (MSVC) -+# # Not linking Boost as static libraries: either an explicit setting or LINKSTATIC is FALSE: -+# if (NOT Boost_USE_STATIC_LIBS) -+# add_definitions (-DBOOST_ALL_DYN_LINK=1) -+# endif () -+#endif () -+ -+set (Boost_COMPONENTS filesystem system thread container) - if (NOT USE_STD_FILESYSTEM) - list (APPEND Boost_COMPONENTS filesystem) - endif () -@@ -108,9 +108,9 @@ checked_find_package (OpenEXR REQUIRED - # building against Imath/OpenEXR 3.x when there is still a system-level - # install version of 2.x. - include_directories(BEFORE ${IMATH_INCLUDES} ${OPENEXR_INCLUDES}) --if (MSVC AND NOT LINKSTATIC) -- add_definitions (-DOPENEXR_DLL) # Is this needed for new versions? --endif () -+#if (MSVC AND NOT LINKSTATIC) -+# add_definitions (-DOPENEXR_DLL) # Is this needed for new versions? -+#endif () - if (OpenEXR_VERSION VERSION_GREATER_EQUAL 3.0) - set (OIIO_USING_IMATH 3) - else () -@@ -137,11 +137,15 @@ set (OPENIMAGEIO_CONFIG_DO_NOT_FIND_IMATH OFF CACHE BOOL - "Exclude find_dependency(Imath) from the exported OpenImageIOConfig.cmake") - - # JPEG -- prefer JPEG-Turbo to regular libjpeg --checked_find_package (libjpeg-turbo -- VERSION_MIN 2.1 -- DEFINITIONS -DUSE_JPEG_TURBO=1) --if (NOT TARGET libjpeg-turbo::jpeg) # Try to find the non-turbo version -+if (USE_JPEGTURBO) -+ checked_find_package (libjpeg-turbo REQUIRED -+ DEFINITIONS -DUSE_JPEG_TURBO=1 -+ PRINT libjpeg-turbo_INCLUDES libjpeg-turbo_LIBRARIES) -+ add_library(JPEG::JPEG ALIAS libjpeg-turbo::libjpeg-turbo) -+elseif (USE_JPEG) # Try to find the non-turbo version - checked_find_package (JPEG REQUIRED) -+else () -+ message(FATAL_ERROR "JPEG library was not found!") - endif () - - # Pugixml setup. Normally we just use the version bundled with oiio, but -@@ -157,7 +161,7 @@ else () - endif() - - # From pythonutils.cmake --find_python() -+#find_python() - if (USE_PYTHON) - checked_find_package (pybind11 REQUIRED VERSION_MIN 2.4.2) - endif () -@@ -167,110 +171,105 @@ endif () - # Dependencies for optional formats and features. If these are not found, - # we will continue building, but the related functionality will be disabled. - --checked_find_package (PNG) -+if (USE_LIBPNG) -+ checked_find_package (PNG REQUIRED) -+endif() - --checked_find_package (BZip2) # Used by ffmpeg and freetype --if (NOT BZIP2_FOUND) -- set (BZIP2_LIBRARIES "") # TODO: why does it break without this? --endif () -+if (USE_FREETYPE) -+ checked_find_package (Freetype REQUIRED -+ DEFINITIONS -DUSE_FREETYPE=1 ) -+endif() - --checked_find_package (Freetype -- DEFINITIONS -DUSE_FREETYPE=1 ) -- --checked_find_package (OpenColorIO -- DEFINITIONS -DUSE_OCIO=1 -DUSE_OPENCOLORIO=1 -- # PREFER_CONFIG -- ) --if (OpenColorIO_FOUND) -- option (OIIO_DISABLE_BUILTIN_OCIO_CONFIGS -- "For deveoper debugging/testing ONLY! Disable OCIO 2.2 builtin configs." OFF) -- if (OIIO_DISABLE_BUILTIN_OCIO_CONFIGS OR "$ENV{OIIO_DISABLE_BUILTIN_OCIO_CONFIGS}") -- add_compile_definitions(OIIO_DISABLE_BUILTIN_OCIO_CONFIGS) -- endif () --else () -- set (OpenColorIO_FOUND 0) -+if (USE_OPENCOLORIO) -+ checked_find_package (OpenColorIO REQUIRED -+ DEFINITIONS -DUSE_OCIO=1 -DUSE_OPENCOLORIO=1 -+ # PREFER_CONFIG -+ ) - endif () - --checked_find_package (OpenCV 3.0 -- DEFINITIONS -DUSE_OPENCV=1) -+if (USE_OPENCV) -+ checked_find_package (OpenCV REQUIRED 3.0 -+ DEFINITIONS -DUSE_OPENCV=1) -+endif() - - # Intel TBB --set (TBB_USE_DEBUG_BUILD OFF) --checked_find_package (TBB 2017 -- SETVARIABLES OIIO_TBB -- PREFER_CONFIG) -+if (USE_TBB)# Intel TBB -+ set (TBB_USE_DEBUG_BUILD OFF) -+ checked_find_package (TBB 2017 REQUIRED -+ SETVARIABLES OIIO_TBB -+ PREFER_CONFIG) -+endif() - - # DCMTK is used to read DICOM images --checked_find_package (DCMTK VERSION_MIN 3.6.1 -- PREFER_CONFIG) -+if (USE_DCMTK) -+ checked_find_package (DCMTK REQUIRED VERSION_MIN 3.6.1) # For DICOM images -+endif() - --checked_find_package (FFmpeg VERSION_MIN 3.0) --checked_find_package (GIF -- VERSION_MIN 4 -- RECOMMEND_MIN 5.0 -- RECOMMEND_MIN_REASON "for stability and thread safety") -+if (USE_FFMPEG) -+ checked_find_package (ffmpeg REQUIRED VERSION_MIN 3.0) -+endif() -+if (USE_GIF) -+ checked_find_package (GIF REQUIRED -+ VERSION_MIN 4 -+ RECOMMEND_MIN 5.0 -+ RECOMMEND_MIN_REASON "for stability and thread safety") -+endif() - - # For HEIF/HEIC/AVIF formats --checked_find_package (Libheif VERSION_MIN 1.3 -- RECOMMEND_MIN 1.7 -- RECOMMEND_MIN_REASON "for AVIF support") --if (APPLE AND LIBHEIF_VERSION VERSION_GREATER_EQUAL 1.10 AND LIBHEIF_VERSION VERSION_LESS 1.11) -- message (WARNING "Libheif 1.10 on Apple is known to be broken, disabling libheif support") -- set (Libheif_FOUND 0) --endif () -+if (USE_LIBHEIF) -+ checked_find_package (libheif REQUIRED VERSION_MIN 1.3 -+ RECOMMEND_MIN 1.7 -+ RECOMMEND_MIN_REASON "for AVIF support") -+endif() - --checked_find_package (LibRaw -- VERSION_MIN 0.18 -- PRINT LibRaw_r_LIBRARIES) --if (LibRaw_FOUND AND LibRaw_VERSION VERSION_LESS 0.20 AND CMAKE_CXX_STANDARD VERSION_GREATER_EQUAL 17) -- message (STATUS "${ColorYellow}WARNING When building for C++17, LibRaw should be 0.20 or higher (found ${LibRaw_VERSION}). You may get errors, depending on the compiler.${ColorReset}") -- # Currently, we issue the above warning and let them take their chances. -- # If we wish to disable the LibRaw<0.20/C++17 combination that may fail, -- # just uncomment the following two lines. -- # set (LibRaw_FOUND 0) -- # set (LIBRAW_FOUND 0) --endif () -+if (USE_LIBRAW) -+ checked_find_package (LibRaw REQUIRED -+ RECOMMEND_MIN 0.18 -+ RECOMMEND_MIN_REASON "for ACES support and better camera metadata" -+ PRINT LibRaw_r_LIBRARIES) -+endif() - --checked_find_package (OpenJPEG VERSION_MIN 2.0 -- RECOMMEND_MIN 2.2 -- RECOMMEND_MIN_REASON "for multithreading support") --# Note: Recent OpenJPEG versions have exported cmake configs, but we don't --# find them reliable at all, so we stick to our FindOpenJPEG.cmake module. -- --checked_find_package (OpenVDB -- VERSION_MIN 5.0 -- DEPS TBB -- DEFINITIONS -DUSE_OPENVDB=1) --if (OpenVDB_FOUND AND OpenVDB_VERSION VERSION_GREATER_EQUAL 10.1 AND CMAKE_CXX_STANDARD VERSION_LESS 17) -- message (WARNING "${ColorYellow}OpenVDB >= 10.1 (we found ${OpenVDB_VERSION}) can only be used when we build with C++17 or higher. Disabling OpenVDB support.${ColorReset}") -- set (OpeVDB_FOUND 0) --endif () -+if (USE_OPENJPEG) -+ checked_find_package (OpenJPEG REQUIRED -+ VERSION_MIN 2.0 -+ RECOMMEND_MIN 2.2 -+ RECOMMEND_MIN_REASON "for multithreading support") -+ # Note: Recent OpenJPEG versions have exported cmake configs, but we don't -+ # find them reliable at all, so we stick to our FindOpenJPEG.cmake module. -+endif() - --checked_find_package (Ptex PREFER_CONFIG) --if (NOT Ptex_FOUND OR NOT Ptex_VERSION) -- # Fallback for inadequate Ptex exported configs. This will eventually -- # disappear when we can 100% trust Ptex's exports. -- unset (Ptex_FOUND) -- checked_find_package (Ptex) --endif () -+if (USE_OPENVDB) -+ checked_find_package (OpenVDB REQUIRED -+ VERSION_MIN 5.0 -+ DEPS TBB -+ DEFINITIONS -DUSE_OPENVDB=1) -+endif() - --checked_find_package (WebP) --# Note: When WebP 1.1 (released late 2019) is our minimum, we can use their --# exported configs and remove our FindWebP.cmake module. -+if (USE_PTEX) -+ checked_find_package (ptex REQUIRED PREFER_CONFIG) -+endif() -+ -+if (USE_LIBWEBP) -+ checked_find_package (WebP REQUIRED) -+endif() - - option (USE_R3DSDK "Enable R3DSDK (RED camera) support" OFF) --checked_find_package (R3DSDK NO_RECORD_NOTFOUND) # RED camera -+if (USE_R3DSDK) -+ checked_find_package (R3DSDK REQUIRED) # RED camera -+endif () - - set (NUKE_VERSION "7.0" CACHE STRING "Nuke version to target") --checked_find_package (Nuke NO_RECORD_NOTFOUND) -+if (USE_NUKE) -+ checked_find_package (Nuke REQUIRED) -+endif () - - - # Qt -- used for iv - option (USE_QT "Use Qt if found" ON) --if (USE_QT) -- checked_find_package (OpenGL) # used for iv -+if (USE_OPENGL) -+ checked_find_package (OpenGL REQUIRED) # used for iv - endif () --if (USE_QT AND OPENGL_FOUND) -+if (USE_QT AND USE_OPENGL) - checked_find_package (Qt6 COMPONENTS Core Gui Widgets OpenGLWidgets) - if (NOT Qt6_FOUND) - checked_find_package (Qt5 COMPONENTS Core Gui Widgets OpenGL) -@@ -294,13 +293,13 @@ macro (find_or_download_robin_map) - # for an installed version. Still prefer a copy that seems to be - # locally installed in this tree. - if (NOT BUILD_ROBINMAP_FORCE) -- find_package (Robinmap QUIET) -+ find_package (tsl-robin-map REQUIRED) - endif () - # If an external copy wasn't found and we requested that missing - # packages be built, or we we are forcing a local copy to be built, then - # download and build it. - # Download the headers from github -- if ((BUILD_MISSING_ROBINMAP AND NOT ROBINMAP_FOUND) OR BUILD_ROBINMAP_FORCE) -+ if ((BUILD_MISSING_ROBINMAP AND NOT tsl-robin-map_FOUND) OR BUILD_ROBINMAP_FORCE) - message (STATUS "Downloading local Tessil/robin-map") - set (ROBINMAP_INSTALL_DIR "${PROJECT_SOURCE_DIR}/ext/robin-map") - set (ROBINMAP_GIT_REPOSITORY "https://github.com/Tessil/robin-map") -@@ -318,7 +317,7 @@ macro (find_or_download_robin_map) - endif () - set (ROBINMAP_INCLUDE_DIR "${ROBINMAP_INSTALL_DIR}/include") - endif () -- checked_find_package (Robinmap REQUIRED) -+ checked_find_package (tsl-robin-map REQUIRED) - endmacro() - - find_or_download_robin_map () -@@ -337,7 +336,7 @@ macro (find_or_download_fmt) - # for an installed version. Still prefer a copy that seems to be - # locally installed in this tree. - if (NOT BUILD_FMT_FORCE) -- find_package (fmt QUIET) -+ find_package (fmt REQUIRED) - endif () - # If an external copy wasn't found and we requested that missing - # packages be built, or we we are forcing a local copy to be built, then -@@ -372,7 +371,7 @@ macro (find_or_download_fmt) - set (fmt_VERSION "${FMT_VERSION_MAJOR}.${FMT_VERSION_MINOR}.${FMT_VERSION_PATCH}") - list (APPEND CFP_ALL_BUILD_DEPS_FOUND "${pkgname} ${${pkgname}_VERSION}") - else () -- get_target_property(FMT_INCLUDE_DIR fmt::fmt-header-only INTERFACE_INCLUDE_DIRECTORIES) -+ get_target_property(FMT_INCLUDE_DIR fmt::fmt INTERFACE_INCLUDE_DIRECTORIES) - set (OIIO_USING_FMT_LOCAL FALSE) - checked_find_package (fmt REQUIRED - VERSION_MIN 7.0) -diff --git src/ffmpeg.imageio/CMakeLists.txt src/ffmpeg.imageio/CMakeLists.txt -index 8e47a8443..900d23101 100644 ---- src/ffmpeg.imageio/CMakeLists.txt -+++ src/ffmpeg.imageio/CMakeLists.txt -@@ -2,7 +2,7 @@ - # SPDX-License-Identifier: Apache-2.0 - # https://github.com/AcademySoftwareFoundation/OpenImageIO - --if (FFmpeg_FOUND) -+if (USE_FFMPEG) - if (LINKSTATIC) - set (_static_suffixes .lib .a) - set (_static_libraries_found 0) -@@ -26,11 +26,9 @@ if (FFmpeg_FOUND) - endif() - - add_oiio_plugin (ffmpeginput.cpp -- INCLUDE_DIRS ${FFMPEG_INCLUDES} -- LINK_LIBRARIES ${FFMPEG_LIBRARIES} -- ${BZIP2_LIBRARIES} -+ LINK_LIBRARIES ffmpeg::avcodec ffmpeg::avformat ffmpeg::swscale - DEFINITIONS "-DUSE_FFMPEG" -- "-DOIIO_FFMPEG_VERSION=\"${FFMPEG_VERSION}\"") -+ "-DOIIO_FFMPEG_VERSION=\"${ffmpeg_VERSION}\"") - else() - message (STATUS "FFmpeg not found: ffmpeg plugin will not be built") - endif() -diff --git src/heif.imageio/CMakeLists.txt src/heif.imageio/CMakeLists.txt -index 5b6c30a85..e5bc55ef1 100644 ---- src/heif.imageio/CMakeLists.txt -+++ src/heif.imageio/CMakeLists.txt -@@ -2,32 +2,31 @@ - # SPDX-License-Identifier: Apache-2.0 - # https://github.com/AcademySoftwareFoundation/OpenImageIO - --if (Libheif_FOUND) -- if (LINKSTATIC) -- set (_static_suffixes .lib .a) -- set (_static_libraries_found 0) -+if (USE_LIBHEIF) -+ # if (LINKSTATIC) -+ # set (_static_suffixes .lib .a) -+ # set (_static_libraries_found 0) - -- foreach (_libeheif_library IN LISTS LIBHEIF_LIBRARIES) -- get_filename_component (_ext ${_libeheif_library} LAST_EXT) -- list (FIND _static_suffixes ${_ext} _index) -- if (${_index} GREATER -1) -- MATH (EXPR _static_libraries_found "${static_libraries_found}+1") -- endif() -- endforeach() -+ # foreach (_libeheif_library IN LISTS LIBHEIF_LIBRARIES) -+ # get_filename_component (_ext ${_libeheif_library} LAST_EXT) -+ # list (FIND _static_suffixes ${_ext} _index) -+ # if (${_index} GREATER -1) -+ # MATH (EXPR _static_libraries_found "${static_libraries_found}+1") -+ # endif() -+ # endforeach() - -- if (${_static_libraries_found} GREATER 0) -- message (STATUS "${ColorYellow}") -- message (STATUS "You are linking OpenImageIO against a static version of libheif, which is LGPL") -- message (STATUS "licensed. If you intend to redistribute this build of OpenImageIO, we recommend") -- message (STATUS "that you review the libheif license terms, or you may wish to switch to using a") -- message (STATUS "dynamically-linked libheif.") -- message ("${ColorReset}") -- endif() -- endif() -+ # if (${_static_libraries_found} GREATER 0) -+ # message (STATUS "${ColorYellow}") -+ # message (STATUS "You are linking OpenImageIO against a static version of libheif, which is LGPL") -+ # message (STATUS "licensed. If you intend to redistribute this build of OpenImageIO, we recommend") -+ # message (STATUS "that you review the libheif license terms, or you may wish to switch to using a") -+ # message (STATUS "dynamically-linked libheif.") -+ # message ("${ColorReset}") -+ # endif() -+ # endif() - - add_oiio_plugin (heifinput.cpp heifoutput.cpp -- INCLUDE_DIRS ${LIBHEIF_INCLUDES} -- LINK_LIBRARIES ${LIBHEIF_LIBRARIES} -+ LINK_LIBRARIES libheif::heif - DEFINITIONS "-DUSE_HEIF=1") - else () - message (WARNING "heif plugin will not be built") -diff --git src/include/CMakeLists.txt src/include/CMakeLists.txt -index 7bec09739..3db17086f 100644 ---- src/include/CMakeLists.txt -+++ src/include/CMakeLists.txt -@@ -64,7 +64,8 @@ install (FILES ${detail_headers} - DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME}/detail - COMPONENT developer) - --if (INTERNALIZE_FMT OR OIIO_USING_FMT_LOCAL) -+if (0) # Don't try to copy fmt libraries to target install folder -+ set(FMT_INCLUDES "${fmt_INCLUDE_DIR}") - set (fmt_headers_base_names) - foreach (header_name core.h format-inl.h format.h ostream.h printf.h - std.h base.h chrono.h) -diff --git src/jpeg2000.imageio/CMakeLists.txt src/jpeg2000.imageio/CMakeLists.txt -index 560e8d486..24348fe66 100644 ---- src/jpeg2000.imageio/CMakeLists.txt -+++ src/jpeg2000.imageio/CMakeLists.txt -@@ -2,10 +2,9 @@ - # SPDX-License-Identifier: Apache-2.0 - # https://github.com/AcademySoftwareFoundation/OpenImageIO - --if (OPENJPEG_FOUND) -+if (USE_OPENJPEG) - add_oiio_plugin (jpeg2000input.cpp jpeg2000output.cpp -- INCLUDE_DIRS ${OPENJPEG_INCLUDES} -- LINK_LIBRARIES ${OPENJPEG_LIBRARIES} -+ LINK_LIBRARIES openjp2 - DEFINITIONS "-DUSE_OPENJPEG") - else() - message (WARNING "Jpeg-2000 plugin will not be built") -diff --git src/libOpenImageIO/CMakeLists.txt src/libOpenImageIO/CMakeLists.txt -index aeb7b7f93..9a32e4cf2 100644 ---- src/libOpenImageIO/CMakeLists.txt -+++ src/libOpenImageIO/CMakeLists.txt -@@ -154,19 +154,27 @@ target_link_libraries (OpenImageIO - ${OPENIMAGEIO_IMATH_TARGETS} - PRIVATE - ${OPENIMAGEIO_OPENEXR_TARGETS} -- ${OpenCV_LIBRARIES} - ${format_plugin_libs} # Add all the target link libraries from the plugins - $ - $ - $ - $ -- $ - ${BZIP2_LIBRARIES} - ZLIB::ZLIB -- $ -+ tsl::robin_map -+ Boost::filesystem Boost::thread Boost::system Boost::container - ${CMAKE_DL_LIBS} - ) - -+if (USE_OPENCV) -+ target_link_libraries (OpenImageIO PRIVATE opencv::opencv_core -+ opencv::opencv_imgproc -+ opencv::opencv_videoio) -+endif () -+if (USE_FREETYPE) -+ target_link_libraries (OpenImageIO PRIVATE Freetype::Freetype) -+endif() -+ - if (WIN32) - target_link_libraries (OpenImageIO PRIVATE psapi) - endif() -diff --git src/libutil/CMakeLists.txt src/libutil/CMakeLists.txt -index f873b3eed..cf5d4e74c 100644 ---- src/libutil/CMakeLists.txt -+++ src/libutil/CMakeLists.txt -@@ -20,20 +20,13 @@ target_link_libraries (OpenImageIO_Util - ${GCC_ATOMIC_LIBRARIES} - ${OPENIMAGEIO_IMATH_DEPENDENCY_VISIBILITY} - ${OPENIMAGEIO_IMATH_TARGETS} -+ fmt::fmt - PRIVATE -- $ -- $ -+ Boost::filesystem Boost::thread Boost::system - $ - ${CMAKE_DL_LIBS} - ) - --if (INTERNALIZE_FMT OR OIIO_USING_FMT_LOCAL) -- add_dependencies(OpenImageIO_Util fmt_internal_target) --else () -- target_link_libraries (OpenImageIO_Util -- PUBLIC fmt::fmt-header-only) --endif () -- - if (WIN32) - add_definitions(-DWIN32_LEAN_AND_MEAN -DNOMINMAX -DNOGDI -DVC_EXTRALEAN) - target_link_libraries (OpenImageIO_Util PRIVATE psapi) -diff --git src/ptex.imageio/CMakeLists.txt src/ptex.imageio/CMakeLists.txt -index 16634fedb..82060ac29 100644 ---- src/ptex.imageio/CMakeLists.txt -+++ src/ptex.imageio/CMakeLists.txt -@@ -2,12 +2,9 @@ - # SPDX-License-Identifier: Apache-2.0 - # https://github.com/AcademySoftwareFoundation/OpenImageIO - --if (Ptex_FOUND) -- set(ptex_target Ptex::Ptex_dynamic) -- if (TARGET Ptex::Ptex_static AND (NOT TARGET Ptex::Ptex_dynamic OR LINKSTATIC)) -- set(ptex_target Ptex::Ptex_static) -- endif() -+if (USE_PTEX) - add_oiio_plugin (ptexinput.cpp -- LINK_LIBRARIES ${ptex_target} ZLIB::ZLIB -+ LINK_LIBRARIES ${ptex_LIBRARIES} ZLIB::ZLIB -+ INCLUDE_DIRS ${ptex_INCLUDE_DIRS} - DEFINITIONS "-DUSE_PTEX") - endif () diff --git a/recipes/openimageio/config.yml b/recipes/openimageio/config.yml index d8edacc680c4e..3f4b84d6aa425 100644 --- a/recipes/openimageio/config.yml +++ b/recipes/openimageio/config.yml @@ -3,9 +3,11 @@ versions: folder: all "2.4.17.0": folder: all - "2.5.6.0": + "2.5.14.0": folder: all - "2.5.9.0": + "2.5.15.0": folder: all - "2.5.10.1": + "2.5.16.0": + folder: all + "2.5.17.0": folder: all diff --git a/recipes/openjdk/all/conanfile.py b/recipes/openjdk/all/conanfile.py index 9da58ed44e05f..6e6220a975840 100644 --- a/recipes/openjdk/all/conanfile.py +++ b/recipes/openjdk/all/conanfile.py @@ -16,12 +16,16 @@ class OpenJDK(ConanFile): license = "GPL-2.0-only WITH Classpath-exception-2.0", "GPL-2.0-only WITH OpenJDK-assembly-exception-1.0" topics = ("java", "jdk", "openjdk") settings = "os", "arch", "compiler", "build_type" - no_copy_source = True + upload_policy = "skip" + build_policy = "missing" def package_id(self): del self.info.settings.compiler del self.info.settings.build_type + def configure(self): + self.settings.rm_safe("os.version") + def validate(self): if Version(self.version) < "19.0.2" and self.settings.arch != "x86_64": raise ConanInvalidConfiguration("Unsupported Architecture. This package currently only supports x86_64.") @@ -33,35 +37,35 @@ def build(self): if self.settings.os in ["Macos", "Linux"]: key = f"{self.settings.os}_{self.settings.arch}" get(self, **self.conan_data["sources"][self.version][str(key)], - destination=self.source_folder, strip_root=True) + destination=self.build_folder, strip_root=True) def package(self): if self.settings.os == "Macos": - source_folder = os.path.join(self.source_folder, f"jdk-{self.version}.jdk", "Contents", "Home") + build_folder = os.path.join(self.build_folder, f"jdk-{self.version}.jdk", "Contents", "Home") else: - source_folder = self.source_folder - symlinks.remove_broken_symlinks(self, source_folder) + build_folder = self.build_folder + symlinks.remove_broken_symlinks(self, build_folder) copy(self, pattern="*", - src=os.path.join(source_folder, "bin"), + src=os.path.join(build_folder, "bin"), dst=os.path.join(self.package_folder, "bin"), excludes=("msvcp140.dll", "vcruntime140.dll", "vcruntime140_1.dll")) copy(self, pattern="*", - src=os.path.join(source_folder, "include"), + src=os.path.join(build_folder, "include"), dst=os.path.join(self.package_folder, "include")) copy(self, pattern="*", - src=os.path.join(source_folder, "lib"), + src=os.path.join(build_folder, "lib"), dst=os.path.join(self.package_folder, "lib")) copy(self, pattern="*", - src=os.path.join(source_folder, "jmods"), + src=os.path.join(build_folder, "jmods"), dst=os.path.join(self.package_folder, "lib", "jmods")) copy(self, pattern="*", - src=os.path.join(source_folder, "legal"), + src=os.path.join(build_folder, "legal"), dst=os.path.join(self.package_folder, "licenses")) # conf folder is required for security settings, to avoid # java.lang.SecurityException: Can't read cryptographic policy directory: unlimited # https://github.com/conan-io/conan-center-index/pull/4491#issuecomment-774555069 copy(self, pattern="*", - src=os.path.join(source_folder, "conf"), + src=os.path.join(build_folder, "conf"), dst=os.path.join(self.package_folder, "conf")) def package_info(self): diff --git a/recipes/openjph/all/conandata.yml b/recipes/openjph/all/conandata.yml new file mode 100644 index 0000000000000..262763e046361 --- /dev/null +++ b/recipes/openjph/all/conandata.yml @@ -0,0 +1,23 @@ +sources: + "0.18.0": + url: "https://github.com/aous72/OpenJPH/archive/0.18.0.tar.gz" + sha256: "2484908bf5a171cda957643d9bc85c39d58ef939016e2d1a00122b1cefbbd4f8" + "0.17.0": + url: "https://github.com/aous72/OpenJPH/archive/0.17.0.tar.gz" + sha256: "9cd09a5f3a8046b10bded787212afd2410836f9c266964a36f61dc4b63f99b6c" + "0.16.0": + url: "https://github.com/aous72/OpenJPH/archive/0.16.0.tar.gz" + sha256: "94bea4d7057f7a5dcb3f8eee3f854955ce153d98dad99602dd0ba50a560d7cf6" +patches: + "0.18.0": + - patch_file: "patches/0.15.0_cmake-cxx-standard.patch" + patch_description: "Remove setting of CXX standard to a fixed value overriding the toolchain provided by Conan" + patch_type: "conan" + "0.17.0": + - patch_file: "patches/0.15.0_cmake-cxx-standard.patch" + patch_description: "Remove setting of CXX standard to a fixed value overriding the toolchain provided by Conan" + patch_type: "conan" + "0.16.0": + - patch_file: "patches/0.15.0_cmake-cxx-standard.patch" + patch_description: "Remove setting of CXX standard to a fixed value overriding the toolchain provided by Conan" + patch_type: "conan" diff --git a/recipes/openjph/all/conanfile.py b/recipes/openjph/all/conanfile.py new file mode 100644 index 0000000000000..e4c19d07b2f87 --- /dev/null +++ b/recipes/openjph/all/conanfile.py @@ -0,0 +1,120 @@ +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.build import check_min_cppstd +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rmdir +from conan.tools.microsoft import is_msvc +from conan.tools.scm import Version + +import os + +required_conan_version = ">=1.53.0" + +class OpenJPH(ConanFile): + name = "openjph" + description = "Open-source implementation of JPEG2000 Part-15 (or JPH or HTJ2K)" + license = "BSD-2-Clause" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/aous72/OpenJPH" + topics = ("ht-j2k", "jpeg2000", "jp2", "openjph", "image", "multimedia", "format", "graphics") + package_type = "library" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + "with_executables": [True, False], + "with_tiff": [True, False], + "with_stream_expand_tool": [True, False], + "disable_simd": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + "with_executables": True, + "with_tiff": True, + "with_stream_expand_tool": False, + "disable_simd": False, + } + + def export_sources(self): + export_conandata_patches(self) + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + + def layout(self): + cmake_layout(self, src_folder="src") + + def requirements(self): + if self.options.with_executables and self.options.with_tiff: + self.requires("libtiff/4.6.0") + + def validate(self): + if self.settings.compiler.get_safe("cppstd"): + required_cpp_version = 11 + if self.options.with_stream_expand_tool: + required_conan_version = 14 + check_min_cppstd(self, required_cpp_version) + + if self.settings.compiler == "gcc" and \ + Version(self.settings.compiler.version) < "6.0": + raise ConanInvalidConfiguration(f"{self.ref} requires gcc >= 6.0") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + tc.variables["OJPH_BUILD_EXECUTABLES"] = self.options.with_executables + tc.variables["OJPH_ENABLE_TIFF_SUPPORT"] = self.options.with_tiff + tc.variables["OJPH_BUILD_STREAM_EXPAND"] = self.options.with_stream_expand_tool + tc.variables["OJPH_DISABLE_SIMD"] = self.options.disable_simd + + # Workaround for Conan 1 where the CXX standard version isn't set to a fallback to gnu98 happens + if not self.settings.get_safe("compiler.cppstd"): + tc.cache_variables["CMAKE_CXX_STANDARD"] = 14 if self.options.with_stream_expand_tool else 11 + + tc.generate() + + deps = CMakeDeps(self) + deps.generate() + + def _patch_sources(self): + apply_conandata_patches(self) + + def build(self): + self._patch_sources() + + cm = CMake(self) + cm.configure() + cm.build() + + def package(self): + copy(self, "LICENSE", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) + + cm = CMake(self) + cm.install() + + # Cleanup package own pkgconfig + rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) + + def package_info(self): + self.cpp_info.set_property("cmake_file_name", "openjph") + self.cpp_info.set_property("cmake_target_name", "openjph::openjph") + self.cpp_info.set_property("pkg_config_name", "openjph") + + version_suffix = "" + if is_msvc(self): + v = Version(self.version) + version_suffix = f".{v.major}.{v.minor}" + self.cpp_info.libs = ["openjph" + version_suffix] + + # TODO: to remove in conan v2 once cmake_find_package_* & pkg_config generators removed + self.cpp_info.names["cmake_find_package"] = "openjph" + self.cpp_info.names["cmake_find_package_multi"] = "openjph" + self.cpp_info.names["pkg_config"] = "openjph" diff --git a/recipes/openjph/all/patches/0.15.0_cmake-cxx-standard.patch b/recipes/openjph/all/patches/0.15.0_cmake-cxx-standard.patch new file mode 100644 index 0000000000000..336b23fc9542c --- /dev/null +++ b/recipes/openjph/all/patches/0.15.0_cmake-cxx-standard.patch @@ -0,0 +1,26 @@ +diff --git CMakeLists.txt CMakeLists.txt +index cfa70ea..7e761db 100644 +--- CMakeLists.txt ++++ CMakeLists.txt +@@ -93,7 +93,7 @@ message(STATUS "Building ${CMAKE_BUILD_TYPE}") + + ## C++ version and flags + # C++14 is needed for gtest, otherwise, C++11 is sufficient for the library +-set(CMAKE_CXX_STANDARD 14) ++#set(CMAKE_CXX_STANDARD 14) + if (MSVC) + add_compile_definitions(_CRT_SECURE_NO_WARNINGS) + endif() +diff --git src/apps/ojph_stream_expand/CMakeLists.txt src/apps/ojph_stream_expand/CMakeLists.txt +index 5aea342..e21bdd9 100644 +--- src/apps/ojph_stream_expand/CMakeLists.txt ++++ src/apps/ojph_stream_expand/CMakeLists.txt +@@ -5,7 +5,7 @@ if (OJPH_BUILD_STREAM_EXPAND) + + include_directories(../common) + include_directories(../../core/common) +- set(CMAKE_CXX_STANDARD 14) ++ #set(CMAKE_CXX_STANDARD 14) + + file(GLOB OJPH_STREAM_EXPAND "*.cpp" "*.h") + file(GLOB OJPH_SOCKETS "../others/ojph_sockets.cpp") diff --git a/recipes/openjph/all/test_package/CMakeLists.txt b/recipes/openjph/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..f0b6210c6ae20 --- /dev/null +++ b/recipes/openjph/all/test_package/CMakeLists.txt @@ -0,0 +1,7 @@ +cmake_minimum_required(VERSION 3.11) +project(test_package LANGUAGES CXX) + +find_package(openjph REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE openjph::openjph) diff --git a/recipes/openjph/all/test_package/conanfile.py b/recipes/openjph/all/test_package/conanfile.py new file mode 100644 index 0000000000000..0a6bc68712d90 --- /dev/null +++ b/recipes/openjph/all/test_package/conanfile.py @@ -0,0 +1,26 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import CMake, cmake_layout +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeToolchain", "CMakeDeps", "VirtualRunEnv" + test_type = "explicit" + + def layout(self): + cmake_layout(self) + + def requirements(self): + self.requires(self.tested_reference_str) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/openjph/all/test_package/test_package.cpp b/recipes/openjph/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..8ea54e19b7552 --- /dev/null +++ b/recipes/openjph/all/test_package/test_package.cpp @@ -0,0 +1,13 @@ +#include +#include + +#include + + +int main() { + // Print the version number but also do an API call to check the library + std::cout << "OpenJPH Version: " << OPENJPH_VERSION_MAJOR << '.' << OPENJPH_VERSION_MINOR << '.' << OPENJPH_VERSION_PATCH << std::endl; + std::cout << "CPU Extension level: " << ojph::get_cpu_ext_level() << std::endl; + + return EXIT_SUCCESS; +} diff --git a/recipes/openjph/config.yml b/recipes/openjph/config.yml new file mode 100644 index 0000000000000..287a9ed3cd4bc --- /dev/null +++ b/recipes/openjph/config.yml @@ -0,0 +1,7 @@ +versions: + "0.18.0": + folder: all + "0.17.0": + folder: all + "0.16.0": + folder: all diff --git a/recipes/openldap/all/conandata.yml b/recipes/openldap/all/conandata.yml index 9fc035f4ad145..0b8d44649e6e8 100644 --- a/recipes/openldap/all/conandata.yml +++ b/recipes/openldap/all/conandata.yml @@ -1,8 +1,7 @@ sources: + "2.6.7": + url: "https://www.openldap.org/software/download/OpenLDAP/openldap-release/openldap-2.6.7.tgz" + sha256: "cd775f625c944ed78a3da18a03b03b08eea73c8aabc97b41bb336e9a10954930" "2.6.1": - url: https://www.openldap.org/software/download/OpenLDAP/openldap-release/openldap-2.6.1.tgz - sha256: 9d576ea6962d7db8a2e2808574e8c257c15aef55f403a1fb5a0faf35de70e6f3 -patches: - "2.6.1": - - base_path: source_subfolder - patch_file: patches/configure-2.6.1.patch + url: "https://www.openldap.org/software/download/OpenLDAP/openldap-release/openldap-2.6.1.tgz" + sha256: "9d576ea6962d7db8a2e2808574e8c257c15aef55f403a1fb5a0faf35de70e6f3" diff --git a/recipes/openldap/all/conanfile.py b/recipes/openldap/all/conanfile.py index 49a19895302e6..4992bb0b0e23f 100644 --- a/recipes/openldap/all/conanfile.py +++ b/recipes/openldap/all/conanfile.py @@ -1,110 +1,126 @@ import os -from conans import ConanFile, AutoToolsBuildEnvironment, tools -from conans.errors import ConanInvalidConfiguration -required_conan_version = ">=1.43.0" +import shutil + +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.build import cross_building +from conan.tools.env import VirtualRunEnv +from conan.tools.files import chdir, copy, get, rm, rmdir, replace_in_file +from conan.tools.gnu import Autotools, AutotoolsDeps, AutotoolsToolchain +from conan.tools.apple import is_apple_os, fix_apple_shared_install_name +from conan.tools.layout import basic_layout + +required_conan_version = ">=1.53.0" class OpenldapConan(ConanFile): name = "openldap" - description = "OpenLDAP C++ library" + description = "OpenLDAP C library" + license = "OLDAP-2.8" url = "https://github.com/conan-io/conan-center-index" homepage = "https://www.openldap.org/" - license = "OLDAP-2.8" topics = ("ldap", "load-balancer", "directory-access") - exports_sources = ["patches/*"] - settings = settings = "os", "compiler", "build_type", "arch" + + package_type = "library" + settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], "fPIC": [True, False], - "with_cyrus_sasl": [True, False] + "with_cyrus_sasl": [True, False], } default_options = { "shared": False, "fPIC": True, - "with_cyrus_sasl": True - + "with_cyrus_sasl": True, } - _autotools = None - _configure_vars = None - - @property - def _source_subfolder(self): - return "source_subfolder" def configure(self): if self.options.shared: - del self.options.fPIC + self.options.rm_safe("fPIC") + self.settings.rm_safe("compiler.cppstd") + self.settings.rm_safe("compiler.libcxx") - def source(self): - tools.get(**self.conan_data["sources"][self.version], - strip_root=True, destination=self._source_subfolder) + def layout(self): + basic_layout(self, src_folder="src") def requirements(self): - self.requires("openssl/1.1.1q") + self.requires("openssl/[>=1.1 <4]") if self.options.with_cyrus_sasl: - self.requires("cyrus-sasl/2.1.27") + self.requires("cyrus-sasl/2.1.28") def validate(self): - if self.settings.os != "Linux": - raise ConanInvalidConfiguration( - f"{self.name} is only supported on Linux") - - def _configure_autotools(self): - if self._autotools: - return self._autotools - - def yes_no(v): return "yes" if v else "no" - self._autotools = AutoToolsBuildEnvironment(self) - configure_args = [ - "--enable-shared={}".format(yes_no(self.options.shared)), - "--enable-static={}".format(yes_no(not self.options.shared)), + if self.settings.os not in ["Linux", "FreeBSD", "Macos"]: + raise ConanInvalidConfiguration(f"{self.name} is only supported on Unix platforms") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + if not cross_building(self): + env = VirtualRunEnv(self) + env.generate(scope="build") + + def yes_no(v): + return "yes" if v else "no" + + tc = AutotoolsToolchain(self) + tc.configure_args += [ "--with-cyrus_sasl={}".format(yes_no(self.options.with_cyrus_sasl)), - "--with-pic={}".format(yes_no(self.options.get_safe("fPIC", True))), "--without-fetch", "--with-tls=openssl", - "--enable-auditlog"] - self._configure_vars = self._autotools.vars - self._configure_vars["systemdsystemunitdir"] = os.path.join( - self.package_folder, "res") - - # Need to link to -pthread instead of -lpthread for gcc 8 shared=True - # on CI job. Otherwise, linking fails. - self._autotools.libs.remove("pthread") - self._configure_vars["LIBS"] = self._configure_vars["LIBS"].replace( - "-lpthread", "-pthread") - - self._autotools.configure( - args=configure_args, - configure_dir=self._source_subfolder, - vars=self._configure_vars) - return self._autotools + "--enable-auditlog", + "--libexecdir=${prefix}/bin", + f"systemdsystemunitdir={os.path.join(self.package_folder, 'res')}", + ] + if cross_building(self): + # When cross-building, yielding_select should be explicit: + # https://git.openldap.org/openldap/openldap/-/blob/OPENLDAP_REL_ENG_2_5/configure.ac#L1636 + tc.configure_args.append("--with-yielding_select=yes") + # Workaround: https://bugs.openldap.org/show_bug.cgi?id=9228 + tc.configure_args.append("ac_cv_func_memcmp_working=yes") + if is_apple_os(self): + # macOS Ventura does not have soelim, but mandoc_soelim + tc.make_args.append("SOELIM=soelim" if shutil.which("soelim") else "SOELIM=mandoc_soelim") + tc.generate() + tc = AutotoolsDeps(self) + tc.generate() + + def _patch_sources(self): + replace_in_file(self, os.path.join(self.source_folder, "configure"), + "WITH_SYSTEMD=no\nsystemdsystemunitdir=", "WITH_SYSTEMD=no") def build(self): - for patch in self.conan_data["patches"][self.version]: - tools.patch(**patch) - autotools = self._configure_autotools() - - autotools.make(vars=self._configure_vars) + self._patch_sources() + with chdir(self, self.source_folder): + autotools = Autotools(self) + autotools.configure() + autotools.make() def package(self): - autotools = self._configure_autotools() - autotools.install(vars=self._configure_vars) - self.copy("LICENSE", dst="licenses", src=self._source_subfolder) - self.copy("COPYRIGHT", dst="licenses", src=self._source_subfolder) - for folder in ["var", "share", "etc", "lib/pkgconfig", "res"]: - tools.rmdir(os.path.join(self.package_folder, folder)) - tools.remove_files_by_mask( - os.path.join( - self.package_folder, - "lib"), - "*.la") + with chdir(self, self.source_folder): + autotools = Autotools(self) + autotools.install() + copy(self, "LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) + copy(self, "COPYRIGHT", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) + rm(self, "*.la", self.package_folder, recursive=True) + fix_apple_shared_install_name(self) + for folder in ["var", "share", "etc", os.path.join("lib", "pkgconfig"), "home", "Users"]: + rmdir(self, os.path.join(self.package_folder, folder)) def package_info(self): - bin_path = os.path.join(self.package_folder, "bin") - self.env_info.PATH.append(bin_path) - self.output.info( - "Appending PATH environment variable: {}".format(bin_path)) + self.cpp_info.components["ldap"].set_property("pkg_config_name", "ldap") + self.cpp_info.components["ldap"].libs = ["ldap"] + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.components["ldap"].system_libs = ["pthread", "resolv"] + self.cpp_info.components["ldap"].requires = ["lber", "openssl::ssl", "openssl::crypto"] + if self.options.with_cyrus_sasl: + self.cpp_info.components["ldap"].requires.append("cyrus-sasl::cyrus-sasl") - self.cpp_info.libs = ["ldap", "lber"] + self.cpp_info.components["lber"].set_property("pkg_config_name", "lber") + self.cpp_info.components["lber"].libs = ["lber"] if self.settings.os in ["Linux", "FreeBSD"]: - self.cpp_info.system_libs = ["pthread"] + self.cpp_info.components["lber"].system_libs = ["pthread"] + + # TODO: to remove in conan v2 + bin_path = os.path.join(self.package_folder, "bin") + self.env_info.PATH.append(bin_path) diff --git a/recipes/openldap/all/patches/configure-2.6.1.patch b/recipes/openldap/all/patches/configure-2.6.1.patch deleted file mode 100644 index 9fb405dfefc10..0000000000000 --- a/recipes/openldap/all/patches/configure-2.6.1.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/configure b/configure -index 8521174..8ea6133 100755 ---- a/configure -+++ b/configure -@@ -22337,7 +22337,6 @@ $as_echo "$as_me: WARNING: Strong authentication not supported!" >&2;} - fi - - WITH_SYSTEMD=no --systemdsystemunitdir= - ol_link_systemd=no - if test $ol_enable_slapd == no && test $ol_enable_balancer != yes ; then - if test $ol_with_systemd != no ; then diff --git a/recipes/openldap/all/test_package/CMakeLists.txt b/recipes/openldap/all/test_package/CMakeLists.txt index fb813fde0a56b..c77039fd606a9 100644 --- a/recipes/openldap/all/test_package/CMakeLists.txt +++ b/recipes/openldap/all/test_package/CMakeLists.txt @@ -1,8 +1,7 @@ -cmake_minimum_required(VERSION 3.1) -project(test_package) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) -find_package(openldap CONFIG REQUIRED) -add_executable(${PROJECT_NAME} test_package.cpp) +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES C) + +find_package(openldap REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.c) target_link_libraries(${PROJECT_NAME} openldap::openldap) -set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 11) diff --git a/recipes/openldap/all/test_package/conanfile.py b/recipes/openldap/all/test_package/conanfile.py index 49a3a66ea5bad..ef5d7042163ec 100644 --- a/recipes/openldap/all/test_package/conanfile.py +++ b/recipes/openldap/all/test_package/conanfile.py @@ -1,10 +1,19 @@ -from conans import ConanFile, CMake, tools +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake import os class TestPackageConan(ConanFile): - settings = "os", "compiler", "build_type", "arch" - generators = "cmake", "cmake_find_package_multi" + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) def build(self): cmake = CMake(self) @@ -12,6 +21,6 @@ def build(self): cmake.build() def test(self): - if not tools.cross_building(self): - bin_path = os.path.join("bin", "test_package") - self.run(bin_path, run_environment=True) + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/openldap/all/test_package/test_package.c b/recipes/openldap/all/test_package/test_package.c new file mode 100644 index 0000000000000..ca578bf88f1df --- /dev/null +++ b/recipes/openldap/all/test_package/test_package.c @@ -0,0 +1,84 @@ +/* ldapurl -- a tool for generating LDAP URLs */ +/* $OpenLDAP$ */ +/* This work is part of OpenLDAP Software . + * + * Copyright 2008-2021 The OpenLDAP Foundation. + * Portions Copyright 2008 Pierangelo Masarati, SysNet + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted only as authorized by the OpenLDAP + * Public License. + * + * A copy of this license is available in the file LICENSE in the + * top-level directory of the distribution or, alternatively, at + * . + */ +/* Portions Copyright (c) 1992-1996 Regents of the University of Michigan. + * All rights reserved. + * + * Redistribution and use in source and binary forms are permitted + * provided that this notice is preserved and that due credit is given + * to the University of Michigan at Ann Arbor. The name of the + * University may not be used to endorse or promote products derived + * from this software without specific prior written permission. This + * software is provided ``as is'' without express or implied warranty. + */ +/* ACKNOWLEDGEMENTS: + * This work was originally developed by Pierangelo Masarati + * for inclusion in OpenLDAP software. + */ + +#include "openldap.h" + +#include +#include + +static int do_uri_create(LDAPURLDesc *lud) { + char *uri; + + if (lud->lud_scheme == NULL) { + lud->lud_scheme = "ldap"; + } + + if (lud->lud_port == -1) { + if (strcasecmp(lud->lud_scheme, "ldap") == 0) { + lud->lud_port = LDAP_PORT; + + } else if (strcasecmp(lud->lud_scheme, "ldaps") == 0) { + lud->lud_port = LDAPS_PORT; + + } else if (strcasecmp(lud->lud_scheme, "ldapi") == 0) { + lud->lud_port = 0; + + } else { + /* forgiving... */ + lud->lud_port = 0; + } + } + + if (lud->lud_scope == -1) { + lud->lud_scope = LDAP_SCOPE_DEFAULT; + } + + uri = ldap_url_desc2str(lud); + + if (uri == NULL) { + fprintf(stderr, "unable to generate URI\n"); + exit(EXIT_FAILURE); + } + + printf("%s\n", uri); + free(uri); + + return 0; +} + +int main() { + LDAPURLDesc lud = {0}; + + lud.lud_port = -1; + lud.lud_scope = -1; + + return do_uri_create(&lud); +} diff --git a/recipes/openldap/all/test_package/test_package.cpp b/recipes/openldap/all/test_package/test_package.cpp deleted file mode 100644 index ab1267d80b23a..0000000000000 --- a/recipes/openldap/all/test_package/test_package.cpp +++ /dev/null @@ -1,83 +0,0 @@ -/* ldapurl -- a tool for generating LDAP URLs */ -/* $OpenLDAP$ */ -/* This work is part of OpenLDAP Software . - * - * Copyright 2008-2021 The OpenLDAP Foundation. - * Portions Copyright 2008 Pierangelo Masarati, SysNet - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted only as authorized by the OpenLDAP - * Public License. - * - * A copy of this license is available in the file LICENSE in the - * top-level directory of the distribution or, alternatively, at - * . - */ -/* Portions Copyright (c) 1992-1996 Regents of the University of Michigan. - * All rights reserved. - * - * Redistribution and use in source and binary forms are permitted - * provided that this notice is preserved and that due credit is given - * to the University of Michigan at Ann Arbor. The name of the - * University may not be used to endorse or promote products derived - * from this software without specific prior written permission. This - * software is provided ``as is'' without express or implied warranty. - */ -/* ACKNOWLEDGEMENTS: - * This work was originally developed by Pierangelo Masarati - * for inclusion in OpenLDAP software. - */ - -#include -#include -#include "openldap.h" - -static int do_uri_create(LDAPURLDesc *lud) { - char *uri; - - if (lud->lud_scheme == NULL) { - lud->lud_scheme = "ldap"; - } - - if (lud->lud_port == -1) { - if (strcasecmp(lud->lud_scheme, "ldap") == 0) { - lud->lud_port = LDAP_PORT; - - } else if (strcasecmp(lud->lud_scheme, "ldaps") == 0) { - lud->lud_port = LDAPS_PORT; - - } else if (strcasecmp(lud->lud_scheme, "ldapi") == 0) { - lud->lud_port = 0; - - } else { - /* forgiving... */ - lud->lud_port = 0; - } - } - - if (lud->lud_scope == -1) { - lud->lud_scope = LDAP_SCOPE_DEFAULT; - } - - uri = ldap_url_desc2str(lud); - - if (uri == NULL) { - fprintf(stderr, "unable to generate URI\n"); - exit(EXIT_FAILURE); - } - - printf("%s\n", uri); - free(uri); - - return 0; -} - -int main() { - LDAPURLDesc lud = {0}; - - lud.lud_port = -1; - lud.lud_scope = -1; - - return do_uri_create(&lud); -} diff --git a/recipes/openldap/all/test_v1_package/CMakeLists.txt b/recipes/openldap/all/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..91630d79f4abb --- /dev/null +++ b/recipes/openldap/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/openldap/all/test_v1_package/conanfile.py b/recipes/openldap/all/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..49a3a66ea5bad --- /dev/null +++ b/recipes/openldap/all/test_v1_package/conanfile.py @@ -0,0 +1,17 @@ +from conans import ConanFile, CMake, tools +import os + + +class TestPackageConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake", "cmake_find_package_multi" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if not tools.cross_building(self): + bin_path = os.path.join("bin", "test_package") + self.run(bin_path, run_environment=True) diff --git a/recipes/openldap/config.yml b/recipes/openldap/config.yml index 36b28f1209ae7..7177bd469e00d 100644 --- a/recipes/openldap/config.yml +++ b/recipes/openldap/config.yml @@ -1,3 +1,5 @@ versions: + "2.6.7": + folder: all "2.6.1": folder: all diff --git a/recipes/openmesh/all/conandata.yml b/recipes/openmesh/all/conandata.yml index a2b42f64b8c89..118a4fc6160df 100644 --- a/recipes/openmesh/all/conandata.yml +++ b/recipes/openmesh/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "11.0": + url: "https://www.graphics.rwth-aachen.de/media/openmesh_static/Releases/11.0/OpenMesh-11.0.0.tar.bz2" + sha256: "9d22e65bdd6a125ac2043350a019ec4346ea83922cafdf47e125a03c16f6fa07" "10.0": url: "https://www.graphics.rwth-aachen.de/media/openmesh_static/Releases/10.0/OpenMesh-10.0.0.tar.bz2" sha256: "af22520a474bb6a3b355eb0867449c6b995126f97632d1ee5ff9c7ebd322fedb" @@ -9,6 +12,8 @@ sources: url: "https://www.graphics.rwth-aachen.de/media/openmesh_static/Releases/8.1/OpenMesh-8.1.tar.gz" sha256: "0953777f483d47ea9fa00c329838443a7a09dde8be77bf7de188001cb9e768a7" patches: + "11.0": + - patch_file: "patches/cmake-install_9.0.patch" "10.0": - patch_file: "patches/cmake-install_9.0.patch" - patch_file: "patches/restore-cxx11-compatibility.patch" diff --git a/recipes/openmesh/config.yml b/recipes/openmesh/config.yml index a5f8255a5ed2a..bc3b698019ee1 100644 --- a/recipes/openmesh/config.yml +++ b/recipes/openmesh/config.yml @@ -1,4 +1,6 @@ versions: + "11.0": + folder: all "10.0": folder: all "9.0": diff --git a/recipes/openmpi/all/conandata.yml b/recipes/openmpi/all/conandata.yml index 4580e17ba76a3..7211bc311a719 100644 --- a/recipes/openmpi/all/conandata.yml +++ b/recipes/openmpi/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "4.1.6": + url: "https://download.open-mpi.org/release/open-mpi/v4.1/openmpi-4.1.6.tar.bz2" + sha256: "f740994485516deb63b5311af122c265179f5328a0d857a567b85db00b11e415" "4.1.0": - sha256: 73866fb77090819b6a8c85cb8539638d37d6877455825b74e289d647a39fd5b5 - url: https://download.open-mpi.org/release/open-mpi/v4.1/openmpi-4.1.0.tar.bz2 + url: "https://download.open-mpi.org/release/open-mpi/v4.1/openmpi-4.1.0.tar.bz2" + sha256: "73866fb77090819b6a8c85cb8539638d37d6877455825b74e289d647a39fd5b5" diff --git a/recipes/openmpi/all/conanfile.py b/recipes/openmpi/all/conanfile.py index 26cc0e027159c..785217bcba3dc 100644 --- a/recipes/openmpi/all/conanfile.py +++ b/recipes/openmpi/all/conanfile.py @@ -1,97 +1,259 @@ -from conans import ConanFile, tools, AutoToolsBuildEnvironment -from conans.errors import ConanInvalidConfiguration import os -required_conan_version = ">=1.29.1" +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.apple import is_apple_os, fix_apple_shared_install_name +from conan.tools.env import VirtualRunEnv +from conan.tools.files import copy, get, rm, rmdir, save, replace_in_file +from conan.tools.gnu import Autotools, AutotoolsToolchain, AutotoolsDeps +from conan.tools.layout import basic_layout +from conan.tools.microsoft import unix_path + +required_conan_version = ">=1.53.0" class OpenMPIConan(ConanFile): name = "openmpi" - homepage = "https://www.open-mpi.org" - url = "https://github.com/conan-io/conan-center-index" - topics = ("conan", "mpi", "openmpi") description = "A High Performance Message Passing Library" license = "BSD-3-Clause" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://www.open-mpi.org" + topics = ("mpi", "openmpi") + provides = "mpi" + package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], "fPIC": [True, False], - "fortran": ["yes", "mpifh", "usempi", "usempi80", "no"] + "fortran": ["yes", "mpifh", "usempi", "usempi80", "no"], + "enable_cxx": [True, False], + "enable_cxx_exceptions": [True, False], + "with_verbs": [True, False], } default_options = { "shared": False, "fPIC": True, - "fortran": "no" + "fortran": "no", + "enable_cxx": False, + "enable_cxx_exceptions": False, + "with_verbs": False, } - _autotools = None - - @property - def _source_subfolder(self): - return "source_subfolder" + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC def configure(self): if self.options.shared: - del self.options.fPIC - del self.settings.compiler.libcxx - del self.settings.compiler.cppstd + self.options.rm_safe("fPIC") + if not self.options.enable_cxx: + self.settings.rm_safe("compiler.libcxx") + self.settings.rm_safe("compiler.cppstd") + del self.options.enable_cxx_exceptions + if is_apple_os(self): + # Unavailable due to dependency on libnl + del self.options.with_verbs + + def layout(self): + basic_layout(self, src_folder="src") + + def requirements(self): + # OpenMPI public headers don't include anything besides stddef.h. + # transitive_headers=True is not needed for any dependencies. + self.requires("hwloc/2.10.0") + self.requires("zlib/[>=1.2.11 <2]") + if self.settings.os == "Linux": + self.requires("libnl/3.8.0") + if self.options.get_safe("with_verbs"): + self.requires("rdma-core/52.0") + + def validate(self): if self.settings.os == "Windows": + # Requires Cygwin or WSL raise ConanInvalidConfiguration("OpenMPI doesn't support Windows") - def requirements(self): - # FIXME : self.requires("libevent/2.1.12") - try to use libevent from conan - self.requires("zlib/1.2.11") + if self.version == "4.1.0" and is_apple_os(self) and self.settings.arch == "armv8": + # INFO: https://github.com/open-mpi/ompi/issues/8410 + raise ConanInvalidConfiguration(f"{self.ref} is not supported in Mac M1. Use a newer version.") def source(self): - tools.get(**self.conan_data["sources"][self.version]) - extracted_dir = self.name + "-" + self.version - os.rename(extracted_dir, self._source_subfolder) - - def _configure_autotools(self): - if self._autotools: - return self._autotools - self._autotools = AutoToolsBuildEnvironment(self) - args = ["--disable-wrapper-rpath", "--disable-wrapper-runpath"] - if self.settings.build_type == "Debug": - args.append("--enable-debug") - if self.options.shared: - args.extend(["--enable-shared", "--disable-static"]) - else: - args.extend(["--enable-static", "--disable-shared"]) - args.append("--with-pic" if self.options.get_safe("fPIC", True) else "--without-pic") - args.append("--enable-mpi-fortran={}".format(str(self.options.fortran))) - args.append("--with-zlib={}".format(self.deps_cpp_info["zlib"].rootpath)) - args.append("--with-zlib-libdir={}".format(self.deps_cpp_info["zlib"].lib_paths[0])) - args.append("--datarootdir=${prefix}/res") - self._autotools.configure(args=args) - return self._autotools + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + def root(pkg): + return unix_path(self, self.dependencies[pkg].package_folder) + + def yes_no(v): + return "yes" if v else "no" + + tc = AutotoolsToolchain(self) + tc.configure_args += [ + f"--enable-mpi-fortran={self.options.fortran}", + f"--enable-mpi-cxx={yes_no(self.options.enable_cxx)}", + f"--enable-cxx-exceptions={yes_no(self.options.get_safe('enable_cxx_exceptions'))}", + f"--with-hwloc={root('hwloc')}", + f"--with-libnl={root('libnl') if not is_apple_os(self) else 'no'}", + f"--with-verbs={root('rdma-core') if self.options.get_safe('with_verbs') else 'no'}", + f"--with-zlib={root('zlib')}", + "--with-pic" if self.options.get_safe("fPIC", True) else "--without-pic", + "--disable-wrapper-rpath", + "--disable-wrapper-runpath", + "--exec-prefix=/", + "--datarootdir=${prefix}/res", + # Disable other external libraries explicitly + "--with-alps=no", # ALPS + "--with-cuda=no", # CUDA + "--with-fca=no", # FCA + "--with-gpfs=no", # Gpfs + "--with-hcoll=no", # hcoll + "--with-ime=no", # IME + "--with-lsf=no", # LSF + "--with-lustre=no", # Lustre + "--with-memkind=no", # memkind + "--with-moab=no", # Moab + "--with-mxm=no", # Mellanox MXM + "--with-ofi=no", # libfabric, TODO: enable once libfabric is available + "--with-pmi=no", # PMI + "--with-pmix=internal", # PMIx + "--with-portals4=no", # Portals4 + "--with-psm2=no", # PSM2 + "--with-psm=no", # PSM + "--with-pvfs2=no", # Pvfs2 + "--with-treematch=no", # TreeMatch + "--with-ucx=no", # UCX + "--with-valgrind=no", # Valgrind + "--with-x=no", # X11 + "--with-xpmem=no", # XPMEM + ] + if is_apple_os(self): + if self.settings.arch == "armv8": + tc.configure_args.append("--host=aarch64-apple-darwin") + tc.extra_ldflags.append("-arch arm64") + # macOS has no libnl + tc.configure_args.append("--enable-mca-no-build=reachable-netlink") + # libtool's libltdl is not really needed, OpenMPI provides its own equivalent. + # Not adding it as it fails to be detected by ./configure in some cases. + # https://github.com/open-mpi/ompi/blob/v4.1.6/opal/mca/dl/dl.h#L20-L25 + tc.configure_args.append("--with-libltdl=no") + tc.generate() + + deps = AutotoolsDeps(self) + deps.generate() + + # Needed for ./configure to find libhwloc.so and libibnetdisc.so + VirtualRunEnv(self).generate(scope="build") + + # TODO: might want to enable reproducible builds by setting + # $SOURCE_DATE_EPOCH, $USER and $HOSTNAME + + def _patch_sources(self): + # Not needed and fails with v5.0 due to additional Python dependencies + save(self, os.path.join(self.source_folder, "docs", "Makefile.in"), "all:\ninstall:\n") + # Workaround for trying to include VERSION from source dir due to a case-insensitive filesystem on macOS + # Based on https://github.com/macports/macports-ports/blob/22dded99ae76a287f04a9685bbc820ecaa397fea/science/openmpi/files/patch-configure.diff + replace_in_file(self, os.path.join(self.source_folder, "configure"), + "-I$(top_srcdir) ", "-idirafter$(top_srcdir) ") def build(self): - with tools.chdir(self._source_subfolder): - autotools = self._configure_autotools() - autotools.make() + self._patch_sources() + autotools = Autotools(self) + autotools.configure() + autotools.make() def package(self): - self.copy(pattern="LICENSE", src=self._source_subfolder, dst="licenses") - with tools.chdir(self._source_subfolder): - autotools = self._configure_autotools() - autotools.install() - tools.rmdir(os.path.join(self.package_folder, "lib", "pkgconfig")) - tools.rmdir(os.path.join(self.package_folder, "share")) - tools.rmdir(os.path.join(self.package_folder, "etc")) - tools.remove_files_by_mask(os.path.join(self.package_folder, "lib"), "*.la") + copy(self, "LICENSE", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) + autotools = Autotools(self) + autotools.install() + rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) + rmdir(self, os.path.join(self.package_folder, "etc")) + rmdir(self, os.path.join(self.package_folder, "res", "man")) + rm(self, "*.la", self.package_folder, recursive=True) + fix_apple_shared_install_name(self) def package_info(self): - self.cpp_info.libs = ['mpi', 'open-rte', 'open-pal'] + # Based on https://cmake.org/cmake/help/latest/module/FindMPI.html#variables-for-using-mpi + self.cpp_info.set_property("cmake_find_mode", "both") + self.cpp_info.set_property("cmake_file_name", "MPI") + # TODO: Use None when available as Conan feature. + self.cpp_info.set_property("pkg_config_name", "_ompi-do-not-use") + # TODO: export a .cmake module to correctly set all variables set by CMake's FindMPI.cmake + + requires = [ + "hwloc::hwloc", + "zlib::zlib", + ] if self.settings.os == "Linux": - self.cpp_info.system_libs = ["dl", "pthread", "rt", "util"] + requires.append("libnl::libnl") + if self.options.get_safe("with_verbs"): + requires.extend(["rdma-core::libibverbs", "rdma-core::librdmacm"]) + + # The components are modelled based on OpenMPI's pkg-config files - self.output.info("Creating MPI_HOME environment variable: {}".format(self.package_folder)) + # Run-time environment library + self.cpp_info.components["orte"].set_property("pkg_config_name", "orte") + self.cpp_info.components["orte"].libs = ["open-rte", "open-pal"] + self.cpp_info.components["orte"].includedirs.append(os.path.join("include", "openmpi")) + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.components["orte"].system_libs = ["dl", "pthread", "rt", "util"] + self.cpp_info.components["orte"].cflags = ["-pthread"] + if self.options.get_safe("enable_cxx_exceptions"): + self.cpp_info.components["orte"].cflags.append("-fexceptions") + self.cpp_info.components["orte"].requires = requires + + self.cpp_info.components["ompi"].set_property("pkg_config_name", "ompi") + self.cpp_info.components["ompi"].libs = ["mpi"] + self.cpp_info.components["ompi"].requires = ["orte"] + + self.cpp_info.components["ompi-c"].set_property("pkg_config_name", "ompi-c") + self.cpp_info.components["ompi-c"].set_property("cmake_target_name", "MPI::MPI_C") + self.cpp_info.components["ompi-c"].requires = ["ompi"] + + self.cpp_info.components["ompitrace"].set_property("pkg_config_name", "ompitrace") + self.cpp_info.components["ompitrace"].libs = ["ompitrace"] + self.cpp_info.components["ompitrace"].requires = ["ompi"] + + if self.options.enable_cxx: + self.cpp_info.components["ompi-cxx"].set_property("pkg_config_name", "ompi-cxx") + self.cpp_info.components["ompi-cxx"].set_property("cmake_target_name", "MPI::MPI_CXX") + self.cpp_info.components["ompi-cxx"].libs = ["mpi_cxx"] + self.cpp_info.components["ompi-cxx"].requires = ["ompi"] + + if self.options.fortran != "no": + self.cpp_info.components["ompi-fort"].set_property("pkg_config_name", "ompi-fort") + self.cpp_info.components["ompi-fort"].set_property("cmake_target_name", "MPI::MPI_Fortran") + self.cpp_info.components["ompi-fort"].libs = ["mpi_mpifh"] + self.cpp_info.components["ompi-fort"].requires = ["ompi"] + # Aliases + self.cpp_info.components["ompi-f77"].set_property("pkg_config_name", "ompi-f77") + self.cpp_info.components["ompi-f77"].requires = ["ompi-fort"] + self.cpp_info.components["ompi-f90"].set_property("pkg_config_name", "ompi-f90") + self.cpp_info.components["ompi-f90"].requires = ["ompi-fort"] + + bin_folder = os.path.join(self.package_folder, "bin") + # Prepend to PATH to avoid a conflict with system MPI + self.runenv_info.prepend_path("PATH", bin_folder) + self.runenv_info.define_path("MPI_BIN", bin_folder) + self.runenv_info.define_path("MPI_HOME", self.package_folder) + self.runenv_info.define_path("OPAL_PREFIX", self.package_folder) + self.runenv_info.define_path("OPAL_EXEC_PREFIX", self.package_folder) + self.runenv_info.define_path("OPAL_LIBDIR", os.path.join(self.package_folder, "lib")) + self.runenv_info.define_path("OPAL_DATADIR", os.path.join(self.package_folder, "res")) + self.runenv_info.define_path("OPAL_DATAROOTDIR", os.path.join(self.package_folder, "res")) + + # TODO: Legacy, to be removed on Conan 2.0 + self.env_info.PATH.append(bin_folder) + self.env_info.MPI_BIN = bin_folder self.env_info.MPI_HOME = self.package_folder - self.output.info("Creating OPAL_PREFIX environment variable: {}".format(self.package_folder)) self.env_info.OPAL_PREFIX = self.package_folder - mpi_bin = os.path.join(self.package_folder, 'bin') - self.output.info("Creating MPI_BIN environment variable: {}".format(mpi_bin)) - self.env_info.MPI_BIN = mpi_bin - self.output.info("Appending PATH environment variable: {}".format(mpi_bin)) - self.env_info.PATH.append(mpi_bin) + self.env_info.OPAL_EXEC_PREFIX = self.package_folder + self.env_info.OPAL_LIBDIR = os.path.join(self.package_folder, "lib") + self.env_info.OPAL_DATADIR = os.path.join(self.package_folder, "res") + self.env_info.OPAL_DATAROOTDIR = os.path.join(self.package_folder, "res") + + self.cpp_info.names["cmake_find_package"] = "MPI" + self.cpp_info.names["cmake_find_package_multi"] = "MPI" + self.cpp_info.components["ompi-c"].names["cmake_find_package"] = "MPI_C" + if self.options.enable_cxx: + self.cpp_info.components["ompi-cxx"].names["cmake_find_package"] = "MPI_CXX" + if self.options.fortran != "no": + self.cpp_info.components["ompi-fort"].names["cmake_find_package"] = "MPI_Fortran" diff --git a/recipes/openmpi/all/test_package/CMakeLists.txt b/recipes/openmpi/all/test_package/CMakeLists.txt index d61f3c4bef33a..a166065f8b662 100644 --- a/recipes/openmpi/all/test_package/CMakeLists.txt +++ b/recipes/openmpi/all/test_package/CMakeLists.txt @@ -1,10 +1,7 @@ -cmake_minimum_required(VERSION 3.1) -project(test_package) +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES C) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup() +find_package(MPI REQUIRED CONFIG) -find_package(MPI REQUIRED) - -add_executable(${PROJECT_NAME} test_package.cpp) -target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS}) +add_executable(${PROJECT_NAME} test_package.c) +target_link_libraries(${PROJECT_NAME} PRIVATE MPI::MPI_C) diff --git a/recipes/openmpi/all/test_package/conanfile.py b/recipes/openmpi/all/test_package/conanfile.py index c63b947b1cb95..09ff6fcc3cc71 100644 --- a/recipes/openmpi/all/test_package/conanfile.py +++ b/recipes/openmpi/all/test_package/conanfile.py @@ -1,10 +1,20 @@ -from conans import ConanFile, CMake, tools import os +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake + class TestPackageConan(ConanFile): - settings = "os", "compiler", "build_type", "arch" - generators = "cmake" + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) def build(self): cmake = CMake(self) @@ -12,7 +22,7 @@ def build(self): cmake.build() def test(self): - if not tools.cross_building(self.settings): - mpiexec = os.path.join(os.environ['MPI_BIN'], 'mpiexec') - command = '%s -mca plm_rsh_agent yes -np 2 %s' % (mpiexec, os.path.join("bin", "test_package")) - self.run(command, run_environment=True) + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + command = f"mpiexec -mca plm_rsh_agent yes {bin_path}" + self.run(command, env="conanrun") diff --git a/recipes/openmpi/all/test_package/test_package.c b/recipes/openmpi/all/test_package/test_package.c new file mode 100644 index 0000000000000..540ba2f9beacc --- /dev/null +++ b/recipes/openmpi/all/test_package/test_package.c @@ -0,0 +1,13 @@ +#include +#include + +#include + +int main(int argc, char* argv[]) +{ + char version[MPI_MAX_LIBRARY_VERSION_STRING] = {0}; + int len = 0; + MPI_Get_library_version(version, &len); + printf("MPI version: %s\n", version); + return EXIT_SUCCESS; +} diff --git a/recipes/openmpi/all/test_package/test_package.cpp b/recipes/openmpi/all/test_package/test_package.cpp deleted file mode 100644 index d6fa9065fdf2a..0000000000000 --- a/recipes/openmpi/all/test_package/test_package.cpp +++ /dev/null @@ -1,23 +0,0 @@ -#include -#include - -int main(int argc, char* argv[]) -{ - MPI_Init(&argc, &argv); - - int rank; - MPI_Comm_rank(MPI_COMM_WORLD, &rank); - if (rank == 0) { - int value = 17; - int result = MPI_Send(&value, 1, MPI_INT, 1, 0, MPI_COMM_WORLD); - if (result == MPI_SUCCESS) - std::cout << "Rank 0 OK!" << std::endl; - } else if (rank == 1) { - int value; - int result = MPI_Recv(&value, 1, MPI_INT, 0, 0, MPI_COMM_WORLD, MPI_STATUS_IGNORE); - if (result == MPI_SUCCESS && value == 17) - std::cout << "Rank 1 OK!" << std::endl; - } - MPI_Finalize(); - return 0; -} diff --git a/recipes/openmpi/config.yml b/recipes/openmpi/config.yml index 702888c159594..b6ed9888d0176 100644 --- a/recipes/openmpi/config.yml +++ b/recipes/openmpi/config.yml @@ -1,3 +1,5 @@ versions: + "4.1.6": + folder: all "4.1.0": folder: all diff --git a/recipes/openmvg/all/conanfile.py b/recipes/openmvg/all/conanfile.py index 6774e8b893191..29978bb46c7d2 100644 --- a/recipes/openmvg/all/conanfile.py +++ b/recipes/openmvg/all/conanfile.py @@ -65,7 +65,7 @@ def requirements(self): self.requires("coin-clp/1.17.7") self.requires("coin-lemon/1.3.1") self.requires("coin-osi/0.108.7") - self.requires("coin-utils/2.11.6") + self.requires("coin-utils/2.11.9") self.requires("eigen/3.4.0", transitive_headers=True) self.requires("flann/1.9.2", transitive_headers=True, transitive_libs=True) if self.options.with_jpeg == "libjpeg": @@ -120,7 +120,7 @@ def generate(self): # Workaround for: https://github.com/conan-io/conan/issues/13560 libdirs_host = [l for dependency in self.dependencies.host.values() for l in dependency.cpp_info.aggregated_components().libdirs] tc.variables["CMAKE_BUILD_RPATH"] = ";".join(libdirs_host) - + tc.generate() deps = CMakeDeps(self) diff --git a/recipes/openpam/all/conandata.yml b/recipes/openpam/all/conandata.yml index 06219b641cc81..632d89ce6cb2b 100644 --- a/recipes/openpam/all/conandata.yml +++ b/recipes/openpam/all/conandata.yml @@ -1,4 +1,11 @@ sources: + "20230627": + url: + - "https://www.openpam.org/downloads/openpam-20230627.tar.gz" + - "https://sourceforge.net/projects/openpam/files/openpam/Ximenia/openpam-20230627.tar.gz" + sha256: "0d9ac8f5b55a6241f5073f13eff1e95461422c45ac1a30445d7e1068e91db4fd" "20190224": - url: "https://sourceforge.net/projects/openpam/files/openpam/Tabebuia/openpam-20190224.tar.gz" + url: + - "https://www.openpam.org/downloads/openpam-20190224.tar.gz" + - "https://sourceforge.net/projects/openpam/files/openpam/Tabebuia/openpam-20190224.tar.gz" sha256: "31f871f16b6868aef9c849f39aff6c52227977e09eee22b00fb8b7435ddf7105" diff --git a/recipes/openpam/all/conanfile.py b/recipes/openpam/all/conanfile.py index b8d2328964b48..fb8da0b58aff1 100644 --- a/recipes/openpam/all/conanfile.py +++ b/recipes/openpam/all/conanfile.py @@ -1,6 +1,5 @@ from conan import ConanFile from conan.errors import ConanInvalidConfiguration -from conan.tools.build import check_min_cppstd from conan.tools.files import copy, get, rmdir, rm from conan.tools.gnu import Autotools, AutotoolsToolchain from conan.tools.layout import basic_layout @@ -11,11 +10,11 @@ class PackageConan(ConanFile): name = "openpam" - description = "OpenPAM library" + description = "OpenPAM: an open source PAM library that focuses on simplicity, correctness, and cleanliness" license = "BSD-3-Clause" url = "https://github.com/conan-io/conan-center-index" homepage = "https://openpam.org/" - topics = ("pam") + topics = ("pam", "pluggable-authentication-module", "authentication", "security") package_type = "library" settings = "os", "arch", "compiler", "build_type" @@ -35,7 +34,6 @@ def config_options(self): def configure(self): if self.options.shared: self.options.rm_safe("fPIC") - self.settings.rm_safe("compiler.libcxx") self.settings.rm_safe("compiler.cppstd") @@ -43,14 +41,11 @@ def layout(self): basic_layout(self, src_folder="src") def validate(self): - if self.settings.compiler.get_safe("cppstd"): - check_min_cppstd(self, 11) - if self.settings.os not in ["Linux", "FreeBSD", "Neutrino"]: raise ConanInvalidConfiguration(f"{self.ref} is not supported on {self.settings.os}.") def source(self): - get(self, **self.conan_data["sources"][self.version], strip_root=True, filename=f"openpam-{self.version}.tar.gz") + get(self, **self.conan_data["sources"][self.version], strip_root=True) def generate(self): tc = AutotoolsToolchain(self) @@ -64,7 +59,7 @@ def build(self): def package(self): autotools = Autotools(self) autotools.install() - copy(self, "LICENSE", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses"), ignore_case=True) + copy(self, "LICENSE", self.source_folder, os.path.join(self.package_folder, "licenses")) rmdir(self, os.path.join(self.package_folder, "share")) rm(self, "*.la", os.path.join(self.package_folder, "lib")) diff --git a/recipes/openpam/config.yml b/recipes/openpam/config.yml index 1dd1dcdfcdd6f..23de255ba07ec 100644 --- a/recipes/openpam/config.yml +++ b/recipes/openpam/config.yml @@ -1,3 +1,5 @@ versions: + "20230627": + folder: all "20190224": folder: all diff --git a/recipes/openscenegraph/all/CMakeLists.txt b/recipes/openscenegraph/all/CMakeLists.txt index a0749127966c0..5acc346654c57 100644 --- a/recipes/openscenegraph/all/CMakeLists.txt +++ b/recipes/openscenegraph/all/CMakeLists.txt @@ -1,23 +1,44 @@ -cmake_minimum_required(VERSION 3.1.2) +cmake_minimum_required(VERSION 3.15) project(cmake_wrapper) -include(${PROJECT_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(NO_OUTPUT_DIRS) +macro(custom_find_package name variable) + string(TOUPPER ${name} name_upper) + if(${variable}) + find_package(${name} ${ARGN} REQUIRED CONFIG + # Allow only Conan packages + NO_DEFAULT_PATH + PATHS ${CMAKE_PREFIX_PATH} + ) + set(${name_upper}_FOUND TRUE) + set(${name_upper}_VERSION_STRING ${${name}_VERSION_STRING}) + set(${name_upper}_INCLUDE_DIRS ${${name}_INCLUDE_DIRS}) + set(${name_upper}_INCLUDE_DIR ${${name}_INCLUDE_DIR}) + set(${name_upper}_LIBRARIES ${${name}_LIBRARIES}) + set(${name_upper}_DEFINITIONS ${${name}_DEFINITIONS}) + unset(name_upper) + else() + set(${name}_FOUND FALSE) + set(${name_upper}_FOUND FALSE) + endif() +endmacro() -# Hack to insure that conan's copy of these are used, rather than CMake's -# If this isn't here, find_package(X11) will pull in CMake's copy -find_package(Freetype QUIET) -find_package(Fontconfig QUIET) +custom_find_package(Boost OSG_WITH_ASIO) +custom_find_package(Asio OSG_WITH_ASIO) +custom_find_package(CURL OSG_WITH_CURL) +custom_find_package(Fontconfig OSG_TEXT_USE_FONTCONFIG) +custom_find_package(Freetype OSG_WITH_FREETYPE) +custom_find_package(GDAL OSG_WITH_GDAL) +custom_find_package(GIFLIB OSG_WITH_GIFLIB) +custom_find_package(GTA OSG_WITH_GTA) +custom_find_package(JPEG OSG_WITH_JPEG) +custom_find_package(Jasper OSG_WITH_JASPER) +custom_find_package(OpenEXR OSG_WITH_OPENEXR) +custom_find_package(PNG OSG_WITH_PNG) +custom_find_package(TIFF OSG_WITH_TIFF) +custom_find_package(ZLIB OSG_WITH_ZLIB) +custom_find_package(DCMTK OSG_WITH_DCMTK) +# custom_find_package(Poppler) +# custom_find_package(RSVG) +# custom_find_package(SDL2) -# Workaround limitations of the cmake_find_package generator -set(FREETYPE_FOUND ${Freetype_FOUND}) -if(FREETYPE_FOUND) - set(FREETYPE_LIBRARIES ${Freetype_LIBRARIES}) - set(FREETYPE_INCLUDE_DIRS ${Freetype_INCLUDE_DIRS}) -endif() - -if(APPLE) - add_compile_definitions("GL_SILENCE_DEPRECATION") -endif() - -add_subdirectory("source_subfolder") +add_subdirectory(src) diff --git a/recipes/openscenegraph/all/conan-official-osg-variables.cmake b/recipes/openscenegraph/all/conan-official-osg-variables.cmake new file mode 100644 index 0000000000000..636f54b308c40 --- /dev/null +++ b/recipes/openscenegraph/all/conan-official-osg-variables.cmake @@ -0,0 +1,23 @@ +# Reproduce https://github.com/openscenegraph/OpenSceneGraph/blob/master/packaging/cmake/OpenSceneGraphConfig.cmake.in +# Component-specific variables are not created. Use the component targets instead. + +# Only export these for the OpenSceneGraph config file, not FindOSG.cmake +if(NOT DEFINED OSG_LIBRARIES) + set(OPENSCENEGRAPH_FOUND TRUE) + set(OPENSCENEGRAPH_LIBRARIES ${OpenSceneGraph_LIBRARIES}) + set(OPENSCENEGRAPH_INCLUDE_DIR ${OpenSceneGraph_INCLUDE_DIRS}) + set(OPENSCENEGRAPH_INCLUDE_DIRS ${OpenSceneGraph_INCLUDE_DIRS}) + + set(OPENSCENEGRAPH_VERSION ${OpenSceneGraph_VERSION}) + set(OPENSCENEGRAPH_VERSION_STRING ${OpenSceneGraph_VERSION_STRING}) + + set(OSG_LIBRARY ${OpenSceneGraph_LIBRARIES}) + set(OSG_LIBRARIES ${OpenSceneGraph_LIBRARIES}) + set(OSG_INCLUDE_DIR ${OpenSceneGraph_INCLUDE_DIRS}) + set(OSG_INCLUDE_DIRS ${OpenSceneGraph_INCLUDE_DIRS}) +endif() + +# Reproduce https://github.com/openscenegraph/OpenSceneGraph/blob/master/CMakeModules/FindOpenThreads.cmake +set(OPENTHREADS_FOUND TRUE) +set(OPENTHREADS_INCLUDE_DIR ${OpenSceneGraph_INCLUDE_DIRS}) +set(OPENTHREADS_LIBRARY OpenThreads::OpenThreads) diff --git a/recipes/openscenegraph/all/conandata.yml b/recipes/openscenegraph/all/conandata.yml index 0f1b6a2cc4790..094e9853e6fca 100644 --- a/recipes/openscenegraph/all/conandata.yml +++ b/recipes/openscenegraph/all/conandata.yml @@ -1,18 +1,38 @@ sources: 3.6.5: - sha256: aea196550f02974d6d09291c5d83b51ca6a03b3767e234a8c0e21322927d1e12 - url: https://github.com/openscenegraph/OpenSceneGraph/archive/OpenSceneGraph-3.6.5.tar.gz + url: "https://github.com/openscenegraph/OpenSceneGraph/archive/OpenSceneGraph-3.6.5.tar.gz" + sha256: "aea196550f02974d6d09291c5d83b51ca6a03b3767e234a8c0e21322927d1e12" patches: 3.6.5: - patch_file: patches/0001-fix-to_cmake_path-usage.patch - base_path: source_subfolder - - patch_file: patches/0002-Use-standard-CMake-name-for-gif.patch - base_path: source_subfolder - - patch_file: patches/0003-Correct-usage-of-_LIBRARY-to-_LIBRARIES.patch - base_path: source_subfolder - - patch_file: patches/0004-Allow-explicit-control-of-plugins.patch - base_path: source_subfolder + patch_description: Fix cmake paths + patch_type: portability - patch_file: patches/0005-use-JPEG-target-for-plugin.patch - base_path: source_subfolder + patch_description: This fixes building against a static libjpeg on windows + patch_type: portability - patch_file: patches/0006-Declare-result-as-LONG-for-Mingw-build.patch - base_path: source_subfolder + patch_description: Win32's ChangeDisplaySettingsEx() API function is documented as returning `LONG`, which evidently is not always the same as `unsigned int` (Mingw64.) This cause a compile error on Mingw with clang10. + patch_type: official + patch_source: https://github.com/openscenegraph/OpenSceneGraph/commit/67468cce344dd5e503aaa1063845f34720563f79 + - patch_file: patches/0007-fix-msvc-with-std-c++17.patch + patch_description: Fix to be able to build with c++17 on MSVC + patch_type: official + patch_source: https://github.com/openscenegraph/OpenSceneGraph/pull/1055 + - patch_file: patches/0008-replace-mem-fun-ref.patch + patch_description: Replaced std::mem_fun_ref usage to avoid compatiblity with modern compilers + patch_type: official + patch_source: https://github.com/openscenegraph/OpenSceneGraph/commit/8a0114a46a4bad9041297950fe3bfbb2aea6e1da + - patch_file: patches/0009-replace-auto-ptr-in-plugins.patch + patch_description: auto_ptr is removed in C++17. + patch_type: portability + patch_source: https://github.com/openscenegraph/OpenSceneGraph/pull/1246 + - patch_file: patches/0010-replace-ptr-fun-in-obj-plugin.patch + patch_description: ptr_fun is removed in C++17 + patch_type: portability + patch_source: https://github.com/openscenegraph/OpenSceneGraph/pull/1246 + - patch_file: patches/0011-remove-deprecated-register.patch + patch_description: The "register" keyword is deprecated as of C++17 + patch_type: bugfix + patch_source: + - https://github.com/openscenegraph/OpenSceneGraph/pull/1296 + - https://github.com/openscenegraph/OpenSceneGraph/pull/951 diff --git a/recipes/openscenegraph/all/conanfile.py b/recipes/openscenegraph/all/conanfile.py index 5d6b6d3a14882..8ed902063ca31 100644 --- a/recipes/openscenegraph/all/conanfile.py +++ b/recipes/openscenegraph/all/conanfile.py @@ -1,25 +1,27 @@ +import os +import re +from pathlib import Path + from conan import ConanFile -from conan.tools.files import get, rmdir, rm, apply_conandata_patches +from conan.errors import ConanInvalidConfiguration +from conan.tools.apple import is_apple_os from conan.tools.build import cross_building +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rm, rmdir, replace_in_file from conan.tools.scm import Version -from conan.tools.apple import is_apple_os -from conan.errors import ConanInvalidConfiguration -from conans import CMake -import os -import functools - -required_conan_version = ">=1.50.0" +required_conan_version = ">=1.53.0" class OpenSceneGraphConanFile(ConanFile): name = "openscenegraph" description = "OpenSceneGraph is an open source high performance 3D graphics toolkit" - topics = ("openscenegraph", "graphics") + license = ("LGPL-2.1-only", "WxWindows-exception-3.1") url = "https://github.com/conan-io/conan-center-index" homepage = "http://www.openscenegraph.org" - license = "LGPL-2.1-only", "WxWindows-exception-3.1" + topics = ("graphics",) + package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], @@ -42,11 +44,12 @@ class OpenSceneGraphConanFile(ConanFile): "with_gif": [True, False], "with_gta": [True, False], "with_jasper": [True, False], - "with_jpeg": [True, False], + "with_jpeg": ["libjpeg", "libjpeg-turbo", "mozjpeg", False], "with_openexr": [True, False], "with_png": [True, False], "with_tiff": [True, False], "with_zlib": [True, False], + "with_avfoundation": [True, False], "opengl_profile": ["gl1", "gl2", "gl3", "glCore", "gles1", "gles2", "gles3", "gles2+gles3"], } default_options = { @@ -70,21 +73,20 @@ class OpenSceneGraphConanFile(ConanFile): "with_gif": True, "with_gta": False, "with_jasper": False, - "with_jpeg": True, + "with_jpeg": "libjpeg", "with_openexr": False, "with_png": True, "with_tiff": True, "with_zlib": True, "opengl_profile": "gl2", + "with_avfoundation": True, } - short_paths = True - exports_sources = "CMakeLists.txt", "patches/*.patch" - generators = "cmake", "cmake_find_package" - @property - def _source_subfolder(self): - return "source_subfolder" + def export_sources(self): + copy(self, "CMakeLists.txt", self.recipe_folder, self.export_sources_folder) + copy(self, "conan-official-osg-variables.cmake", self.recipe_folder, self.export_sources_folder) + export_conandata_patches(self) def config_options(self): if self.settings.os == "Windows": @@ -102,163 +104,254 @@ def config_options(self): # imageio supports tiff files so the tiff plugin isn't needed on Apple platforms self.options.with_tiff = False + else: + del self.options.with_avfoundation def configure(self): if self.options.shared: - del self.options.fPIC + self.options.rm_safe("fPIC") if not self.options.with_zlib: # These require zlib support - del self.options.with_openexr - del self.options.with_png - del self.options.with_dcmtk + self.options.rm_safe("with_openexr") + self.options.rm_safe("with_png") + self.options.rm_safe("with_dcmtk") - def validate(self): - if self.options.get_safe("with_asio", False): - raise ConanInvalidConfiguration("ASIO support in OSG is broken, see https://github.com/openscenegraph/OpenSceneGraph/issues/921") - if hasattr(self, "settings_build") and cross_building(self): - raise ConanInvalidConfiguration("openscenegraph recipe cannot be cross-built yet. Contributions are welcome.") + def layout(self): + cmake_layout(self, src_folder="src") def requirements(self): - if self.options.enable_windowing_system and self.settings.os == "Linux": + if self.options.enable_windowing_system and self.settings.os in ["Linux", "FreeBSD"]: self.requires("xorg/system") self.requires("opengl/system") if self.options.use_fontconfig: self.requires("fontconfig/2.14.2") - if self.options.get_safe("with_asio", False): + if self.options.get_safe("with_asio"): # Should these be private requires? - self.requires("asio/1.22.1") - self.requires("boost/1.81.0") + self.requires("asio/1.28.1") + self.requires("boost/1.83.0") if self.options.with_curl: - self.requires("libcurl/8.0.1") + self.requires("libcurl/[>=7.78 <9]") if self.options.get_safe("with_dcmtk"): - self.requires("dcmtk/3.6.6") + self.requires("dcmtk/3.6.7") if self.options.with_freetype: - self.requires("freetype/2.13.0") + self.requires("freetype/2.13.2") if self.options.with_gdal: - self.requires("gdal/3.4.3") + self.requires("gdal/3.8.3") if self.options.get_safe("with_gif"): self.requires("giflib/5.2.1") if self.options.with_gta: self.requires("libgta/1.2.1") if self.options.with_jasper: - self.requires("jasper/2.0.33") - if self.options.get_safe("with_jpeg"): + self.requires("jasper/4.2.0") + if self.options.get_safe("with_jpeg") == "libjpeg": self.requires("libjpeg/9e") + elif self.options.get_safe("with_jpeg") == "libjpeg-turbo": + self.requires("libjpeg-turbo/3.0.2") + elif self.options.get_safe("with_jpeg") == "mozjpeg": + self.requires("mozjpeg/4.1.5") if self.options.get_safe("with_openexr"): - self.requires("openexr/3.1.7") + self.requires("openexr/3.2.3") if self.options.get_safe("with_png"): self.requires("libpng/1.6.40") if self.options.with_tiff: - self.requires("libtiff/4.5.1") + self.requires("libtiff/4.6.0") if self.options.with_zlib: - self.requires("zlib/1.2.13") - - def source(self): - get(self, **self.conan_data["sources"][self.version], destination=self._source_subfolder, strip_root=True) + self.requires("zlib/[>=1.2.11 <2]") - def _patch_sources(self): - apply_conandata_patches(self) - - for package in ("Fontconfig", "Freetype", "GDAL", "GIFLIB", "GTA", "Jasper", "OpenEXR"): - # Prefer conan's find package scripts over osg's - os.unlink(os.path.join(self._source_subfolder, "CMakeModules", "Find{}.cmake".format(package))) + def validate(self): + if self.options.get_safe("with_asio"): + raise ConanInvalidConfiguration( + "ASIO support in OSG is broken, " + "see https://github.com/openscenegraph/OpenSceneGraph/issues/921" + ) + if hasattr(self, "settings_build") and cross_building(self): + raise ConanInvalidConfiguration( + "openscenegraph recipe cannot be cross-built yet. " + "Contributions are welcome." + ) - @functools.lru_cache(1) - def _configured_cmake(self): - cmake = CMake(self) + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) - cmake.definitions["USE_3RDPARTY_BIN"] = False + def generate(self): + tc = CMakeToolchain(self) + tc.variables["USE_3RDPARTY_BIN"] = False - cmake.definitions["DYNAMIC_OPENSCENEGRAPH"] = self.options.shared - cmake.definitions["DYNAMIC_OPENTHREADS"] = self.options.shared + tc.variables["DYNAMIC_OPENSCENEGRAPH"] = self.options.shared + tc.variables["DYNAMIC_OPENTHREADS"] = self.options.shared - cmake.definitions["BUILD_OSG_APPLICATIONS"] = self.options.build_applications - cmake.definitions["BUILD_OSG_EXAMPLES"] = False + tc.variables["BUILD_OSG_APPLICATIONS"] = self.options.build_applications + tc.variables["BUILD_OSG_EXAMPLES"] = False - cmake.definitions["OSG_NOTIFY_DISABLED"] = not self.options.enable_notify - cmake.definitions["OSG_USE_DEPRECATED_API"] = self.options.enable_deprecated_api - cmake.definitions["OSG_PROVIDE_READFILE"] = self.options.enable_readfile - cmake.definitions["OSG_USE_REF_PTR_IMPLICIT_OUTPUT_CONVERSION"] = self.options.enable_ref_ptr_implicit_output_conversion - cmake.definitions["OSG_USE_REF_PTR_SAFE_DEREFERENCE"] = self.options.enable_ref_ptr_safe_dereference - cmake.definitions["OSG_ENVVAR_SUPPORTED"] = self.options.enable_envvar_support + tc.variables["OSG_NOTIFY_DISABLED"] = not self.options.enable_notify + tc.variables["OSG_USE_DEPRECATED_API"] = self.options.enable_deprecated_api + tc.variables["OSG_PROVIDE_READFILE"] = self.options.enable_readfile + tc.variables["OSG_USE_REF_PTR_IMPLICIT_OUTPUT_CONVERSION"] = self.options.enable_ref_ptr_implicit_output_conversion + tc.variables["OSG_USE_REF_PTR_SAFE_DEREFERENCE"] = self.options.enable_ref_ptr_safe_dereference + tc.variables["OSG_ENVVAR_SUPPORTED"] = self.options.enable_envvar_support if not self.options.enable_windowing_system: - cmake.definitions["OSG_WINDOWING_SYSTEM"] = None + tc.variables["OSG_WINDOWING_SYSTEM"] = None - cmake.definitions["BUILD_OSG_DEPRECATED_SERIALIZERS"] = self.options.enable_deprecated_serializers + tc.variables["BUILD_OSG_DEPRECATED_SERIALIZERS"] = self.options.enable_deprecated_serializers - cmake.definitions["OSG_TEXT_USE_FONTCONFIG"] = self.options.use_fontconfig + tc.variables["OSG_TEXT_USE_FONTCONFIG"] = self.options.use_fontconfig - cmake.definitions["OPENGL_PROFILE"] = str(self.options.opengl_profile).upper() + tc.variables["OPENGL_PROFILE"] = str(self.options.opengl_profile).upper() # Disable option dependencies unless we have a package for them - cmake.definitions["OSG_WITH_FREETYPE"] = self.options.with_freetype - cmake.definitions["OSG_WITH_OPENEXR"] = self.options.get_safe("with_openexr", False) - cmake.definitions["OSG_WITH_INVENTOR"] = False - cmake.definitions["OSG_WITH_JASPER"] = self.options.with_jasper - cmake.definitions["OSG_WITH_OPENCASCADE"] = False - cmake.definitions["OSG_WITH_FBX"] = False - cmake.definitions["OSG_WITH_ZLIB"] = self.options.with_zlib - cmake.definitions["OSG_WITH_GDAL"] = self.options.with_gdal - cmake.definitions["OSG_WITH_GTA"] = self.options.with_gta - cmake.definitions["OSG_WITH_CURL"] = self.options.with_curl - cmake.definitions["OSG_WITH_LIBVNCSERVER"] = False - cmake.definitions["OSG_WITH_DCMTK"] = self.options.get_safe("with_dcmtk", False) - cmake.definitions["OSG_WITH_FFMPEG"] = False - cmake.definitions["OSG_WITH_DIRECTSHOW"] = False - cmake.definitions["OSG_WITH_SDL"] = False - cmake.definitions["OSG_WITH_POPPLER"] = False - cmake.definitions["OSG_WITH_RSVG"] = False - cmake.definitions["OSG_WITH_NVTT"] = False - cmake.definitions["OSG_WITH_ASIO"] = self.options.get_safe("with_asio", False) - cmake.definitions["OSG_WITH_ZEROCONF"] = False - cmake.definitions["OSG_WITH_LIBLAS"] = False - cmake.definitions["OSG_WITH_GIF"] = self.options.get_safe("with_gif", False) - cmake.definitions["OSG_WITH_JPEG"] = self.options.get_safe("with_jpeg", False) - cmake.definitions["OSG_WITH_PNG"] = self.options.get_safe("with_png", False) - cmake.definitions["OSG_WITH_TIFF"] = self.options.with_tiff + tc.variables["OSG_WITH_FREETYPE"] = self.options.with_freetype + tc.variables["OSG_WITH_OPENEXR"] = self.options.get_safe("with_openexr", False) + tc.variables["OSG_WITH_INVENTOR"] = False + tc.variables["OSG_WITH_JASPER"] = self.options.with_jasper + tc.variables["OSG_WITH_OPENCASCADE"] = False + tc.variables["OSG_WITH_FBX"] = False + tc.variables["OSG_WITH_ZLIB"] = self.options.with_zlib + tc.variables["OSG_WITH_GDAL"] = self.options.with_gdal + tc.variables["OSG_WITH_GTA"] = self.options.with_gta + tc.variables["OSG_WITH_CURL"] = self.options.with_curl + tc.variables["OSG_WITH_LIBVNCSERVER"] = False + tc.variables["OSG_WITH_DCMTK"] = self.options.get_safe("with_dcmtk", False) + tc.variables["OSG_WITH_FFMPEG"] = False + tc.variables["OSG_WITH_DIRECTSHOW"] = False + tc.variables["OSG_WITH_SDL"] = False + tc.variables["OSG_WITH_POPPLER"] = False + tc.variables["OSG_WITH_RSVG"] = False + tc.variables["OSG_WITH_NVTT"] = False + tc.variables["OSG_WITH_ASIO"] = self.options.get_safe("with_asio", False) + tc.variables["OSG_WITH_ZEROCONF"] = False + tc.variables["OSG_WITH_LIBLAS"] = False + tc.variables["OSG_WITH_GIFLIB"] = self.options.get_safe("with_gif", False) + tc.variables["OSG_WITH_JPEG"] = self.options.get_safe("with_jpeg", False) + tc.variables["OSG_WITH_PNG"] = self.options.get_safe("with_png", False) + tc.variables["OSG_WITH_TIFF"] = self.options.with_tiff + + if (self.options.get_safe("with_avfoundation")): + tc.variables["OSG_WITH_AV_FOUNDATION"] = True if self.settings.os == "Windows": # osg has optional quicktime support on Windows - cmake.definitions["CMAKE_DISABLE_FIND_PACKAGE_QuickTime"] = True + tc.variables["CMAKE_DISABLE_FIND_PACKAGE_QuickTime"] = True + + tc.variables["OSG_MSVC_VERSIONED_DLL"] = False - cmake.definitions["OSG_MSVC_VERSIONED_DLL"] = False + if is_apple_os(self): + tc.preprocessor_definitions["GL_SILENCE_DEPRECATION"] = "1" - cmake.configure() + tc.generate() - return cmake + deps = CMakeDeps(self) + deps.set_property("freetype", "cmake_module_file_name", "Freetype") + deps.set_property("giflib", "cmake_file_name", "GIFLIB") + deps.generate() + + def _patch_sources(self): + for package in ["Fontconfig", "Freetype", "GDAL", "GIFLIB", "GTA", "Jasper", "OpenEXR"]: + # Prefer conan's find package scripts over osg's + os.unlink(os.path.join(self.source_folder, "CMakeModules", f"Find{package}.cmake")) + plugins_root = Path(self.source_path.joinpath("src", "osgPlugins")) + for path in plugins_root.rglob("CMakeLists.txt"): + if path.parent == plugins_root: + # Don't replace in the root dir + continue + content = path.read_text() + # Correct usage of *_LIBRARY variables to *_LIBRARIES + content = content.replace("_LIBRARY", "_LIBRARIES") + # Allow explicit control of plugins via OSG_WITH_* variables + # e.g. replace IF(FFMPEG_FOUND) with IF(OSG_WITH_FFMPEG) + content = re.sub(r"\b([A-Z]+)_FOUND\b", r"OSG_WITH_\1", content) + path.write_text(content) + for path in self.source_path.joinpath(self.source_folder, "CMakeModules").rglob("*.cmake"): + content = path.read_text(encoding='utf-8', errors='ignore') + lib_match = re.search(r'FIND_LIBRARY\(([^ ]+)_LIBRARY', content) + if lib_match: + library_name = lib_match.group(1) + new_content = re.sub(rf'\b{library_name}_LIBRARY\b', rf'{library_name}_LIBRARIES', content) + path.write_text(new_content) + + apply_conandata_patches(self) + + # Not sure why, but CMake fails to find the EXPAT::EXPAT target created by Conan when Fontconfig is found as a module. + replace_in_file(self, os.path.join(self.source_folder, "src", "osgText", "CMakeLists.txt"), + "find_package(Fontconfig MODULE)", "find_package(Fontconfig CONFIG REQUIRED)") + replace_in_file(self, os.path.join(self.source_folder, "src", "osgPlugins", "freetype", "CMakeLists.txt"), + "SET(TARGET_EXTERNAL_LIBRARIES ${FREETYPE_LIBRARIES} )", "SET(TARGET_EXTERNAL_LIBRARIES Freetype::Freetype)") + + # osg uses imageio on Apple platforms. PNG_FOUND will be set by `FIND_PACKAGE(Freetype)` + # in the OSG cmake code and without this patch the png plugin will be included even though it shouldn't. + replace_in_file(self, os.path.join(self.source_folder, "src", "osgPlugins", "CMakeLists.txt"), + "PNG_FOUND", "PNG_FOUND AND OSG_WITH_PNG") + + # Only add curl plugin if actually requested. + replace_in_file(self, os.path.join(self.source_folder, "src", "osgPlugins", "CMakeLists.txt"), + "CURL_FOUND", "CURL_FOUND AND OSG_WITH_CURL") def build(self): self._patch_sources() - - self._configured_cmake().build() + cmake = CMake(self) + cmake.configure(build_script_folder=self.source_path.parent) + cmake.build() def package(self): - self._configured_cmake().install() + cmake = CMake(self) + cmake.install() - self.copy(pattern="LICENSE.txt", dst="licenses", src=self._source_subfolder) + copy(self, "LICENSE.txt", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) + copy(self, "conan-official-osg-variables.cmake", + dst=os.path.join(self.package_folder, "lib", "cmake"), + src=os.path.join(self.source_folder, os.pardir)) rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) rm(self, "*.pdb", self.package_folder, True) def package_info(self): - # FindOpenSceneGraph.cmake is shipped with cmake and is a traditional cmake script - # It doesn't setup targets and only provides a few variables: - # - OPENSCENEGRAPH_FOUND - # - OPENSCENEGRAPH_VERSION - # - OPENSCENEGRAPH_INCLUDE_DIRS - # - OPENSCENEGRAPH_LIBRARIES - # Unfortunately, the cmake_find_package generators don't currently allow directly setting variables, - # but it will set the last three of these if the name of the package is OPENSCENEGRAPH (it uses - # the filename for the first, so OpenSceneGraph_FOUND gets set, not OPENSCENEGRAPH_FOUND) - # TODO: set OPENSCENEGRAPH_FOUND in cmake_find_package and cmake_find_package_multi - self.cpp_info.filenames["cmake_find_package"] = "OpenSceneGraph" - self.cpp_info.filenames["cmake_find_package_multi"] = "OpenSceneGraph" - self.cpp_info.names["cmake_find_package"] = "OPENSCENEGRAPH" - self.cpp_info.names["cmake_find_package_multi"] = "OPENSCENEGRAPH" + # https://github.com/openscenegraph/OpenSceneGraph/blob/master/packaging/cmake/OpenSceneGraphConfig.cmake.in + self.cpp_info.set_property("cmake_file_name", "OpenSceneGraph") + # https://github.com/openscenegraph/OpenSceneGraph/blob/master/CMakeModules/FindOSG.cmake + self.cpp_info.set_property("cmake_module_file_name", "OSG") + # Disable the automatically created targets, use the "openscenegraph" component instead + self.cpp_info.set_property("pkg_config_name", None) + self.cpp_info.set_property("cmake_target_name", None) + + # Export CMake variables set by the project + self.cpp_info.builddirs.append(os.path.join("lib", "cmake")) + cmake_vars_module = os.path.join("lib", "cmake", "conan-official-osg-variables.cmake") + self.cpp_info.set_property("cmake_build_modules", [cmake_vars_module]) + + # The main component that depends on all non-plugin components + # https://github.com/openscenegraph/OpenSceneGraph/blob/master/packaging/pkgconfig/openscenegraph.pc.in + openscenegraph = self.cpp_info.components["openscenegraph"] + openscenegraph.set_property("pkg_config_name", "openscenegraph") + # Unofficial CMake target + openscenegraph.set_property("cmake_target_name", "OpenSceneGraph::OpenSceneGraph") + openscenegraph.requires = [ + "osg", + "osgDB", + "osgFX", + "osgGA", + "osgParticle", + "osgSim", + "osgText", + "osgUtil", + "osgTerrain", + "osgManipulator", + "osgViewer", + "osgWidget", + "osgShadow", + "osgAnimation", + "osgVolume", + ] + + # TODO: to remove in conan v2 once cmake_find_package_* generators removed + self.cpp_info.names["cmake_find_package"] = "OpenSceneGraph" + self.cpp_info.names["cmake_find_package_multi"] = "OpenSceneGraph" + openscenegraph.names["cmake_find_package"] = "OpenSceneGraph" + openscenegraph.names["cmake_find_package_multi"] = "OpenSceneGraph" + self.cpp_info.build_modules["cmake_find_package"].append(cmake_vars_module) + self.cpp_info.build_modules["cmake_find_package_multi"].append(cmake_vars_module) if self.settings.build_type == "Debug": postfix = "d" @@ -275,49 +368,52 @@ def setup_plugin(plugin): plugin_library.libs = [] if self.options.shared else [lib + postfix] plugin_library.requires = ["OpenThreads", "osg", "osgDB", "osgUtil"] if not self.options.shared: - plugin_library.libdirs = [os.path.join("lib", "osgPlugins-{}".format(self.version))] + plugin_library.libdirs = [os.path.join("lib", f"osgPlugins-{self.version}")] return plugin_library def setup_serializers(lib): plugins = [] if lib not in ("osgDB", "osgWidget", "osgPresentation"): - plugins.append("serializers_{}".format(lib.lower())) + plugins.append(f"serializers_{lib.lower()}") if self.options.enable_deprecated_serializers: if lib not in ("osgUtil", "osgDB", "osgGA", "osgManipulator", "osgUI", "osgPresentation"): - plugins.append("deprecated_{}".format(lib.lower())) + plugins.append(f"deprecated_{lib.lower()}") for plugin in plugins: setup_plugin(plugin).requires.append(lib) def setup_library(lib): library = self.cpp_info.components[lib] library.libs = [lib + postfix] - library.names["pkg_config"] = "openscenegraph-{}".format(lib) + library.set_property("pkg_config_name", f"openscenegraph-{lib}") setup_serializers(lib) return library # Core libraries # requires obtained from osg's source code - # TODO: FindOpenThreads.cmake is shipped with CMake, so we should generate separate - # files for it with cmake_find_package and cmake_find_package_multi + # The project installs FindOpenThreads.cmake as a separate module. + # Conan cannot recreate that, but let's export it as a component instead. + # https://github.com/openscenegraph/OpenSceneGraph/blob/master/CMakeModules/FindOpenThreads.cmake + # https://github.com/openscenegraph/OpenSceneGraph/blob/master/packaging/pkgconfig/openthreads.pc.in library = self.cpp_info.components["OpenThreads"] library.libs = ["OpenThreads" + postfix] - library.names["pkg_config"] = "openthreads" - if self.settings.os == "Linux": + library.set_property("pkg_config_name", "openthreads") + library.set_property("cmake_target_name", "OpenThreads::OpenThreads") + if self.settings.os in ["Linux", "FreeBSD"]: library.system_libs = ["pthread"] library = setup_library("osg") library.requires = ["OpenThreads", "opengl::opengl"] - if self.settings.os == "Linux": + if self.settings.os in ["Linux", "FreeBSD"]: library.system_libs = ["m", "rt", "dl"] if not self.options.shared: library.defines.append("OSG_LIBRARY_STATIC") library = setup_library("osgDB") library.requires = ["osg", "osgUtil", "OpenThreads"] - if self.settings.os == "Linux": + if self.settings.os in ["Linux", "FreeBSD"]: library.system_libs = ["dl"] - elif self.settings.os == "Macos": + elif is_apple_os(self): library.frameworks = ["Carbon", "Cocoa"] if self.options.with_zlib: library.requires.append("zlib::zlib") @@ -333,7 +429,7 @@ def setup_library(lib): library = setup_library("osgViewer") library.requires = ["osgGA", "osgText", "osgDB", "osgUtil", "osg"] if self.options.enable_windowing_system: - if self.settings.os == "Linux": + if self.settings.os in ["Linux", "FreeBSD"]: library.requires.append("xorg::xorg") elif is_apple_os(self): library.frameworks = ["Cocoa"] @@ -350,7 +446,8 @@ def setup_library(lib): setup_library("osgSim").requires = ["osgText", "osgUtil", "osgDB", "osg", "OpenThreads"] setup_library("osgTerrain").requires = ["osgUtil", "osgDB", "osg", "OpenThreads"] setup_library("osgWidget").requires = ["osgText", "osgViewer", "osgDB", "osg", "OpenThreads"] - setup_library("osgPresentation").requires = ["osgViewer", "osgUI", "osgWidget", "osgManipulator", "osgVolume", "osgFX", "osgText", "osgGA", "osgUtil", "osgDB", "osg", "OpenThreads"] + setup_library("osgPresentation").requires = ["osgViewer", "osgUI", "osgWidget", "osgManipulator", "osgVolume", + "osgFX", "osgText", "osgGA", "osgUtil", "osgDB", "osg", "OpenThreads"] # Start of plugins @@ -369,7 +466,7 @@ def setup_library(lib): setup_plugin("osg") plugin = setup_plugin("ive") - plugin.requires.extend(("osgSim", "osgFX", "osgText", "osgTerrain", "osgVolume")) + plugin.requires.extend(["osgSim", "osgFX", "osgText", "osgTerrain", "osgVolume"]) if self.options.with_zlib: plugin.requires.append("zlib::zlib") @@ -390,8 +487,12 @@ def setup_library(lib): setup_plugin("vtf") setup_plugin("ktx") - if self.options.get_safe("with_jpeg"): + if self.options.get_safe("with_jpeg") == "libjpeg": setup_plugin("jpeg").requires.append("libjpeg::libjpeg") + elif self.options.get_safe("with_jpeg") == "libjpeg-turbo": + setup_plugin("jpeg").requires.append("libjpeg-turbo::jpeg") + elif self.options.get_safe("with_jpeg") == "mozjpeg": + setup_plugin("jpeg").requires.append("mozjpeg::libjpeg") if self.options.with_jasper: setup_plugin("jp2").requires.append("jasper::jasper") @@ -403,13 +504,13 @@ def setup_library(lib): setup_plugin("gif").requires.append("giflib::giflib") if self.options.get_safe("with_png"): - setup_plugin("png").requires.extend(("libpng::libpng", "zlib::zlib")) + setup_plugin("png").requires.extend(["libpng::libpng", "zlib::zlib"]) if self.options.with_tiff: setup_plugin("tiff").requires.append("libtiff::libtiff") if self.options.with_gdal: - setup_plugin("gdal").requires.extend(("osgTerrain", "gdal::gdal")) + setup_plugin("gdal").requires.extend(["osgTerrain", "gdal::gdal"]) setup_plugin("ogr").requires.append("gdal::gdal") if self.options.with_gta: @@ -418,13 +519,13 @@ def setup_library(lib): # 3D Image plugins if self.options.get_safe("with_dcmtk"): plugin = setup_plugin("dicom") - plugin.requires.extend(("osgVolume", "dcmtk::dcmtk")) + plugin.requires.extend(["osgVolume", "dcmtk::dcmtk"]) if self.settings.os == "Windows": plugin.system_libs = ["wsock32", "ws2_32"] # 3rd party 3d plugins setup_plugin("3dc") - setup_plugin("p3d").requires.extend(("osgGA", "osgText", "osgVolume", "osgFX", "osgViewer", "osgPresentation")) + setup_plugin("p3d").requires.extend(["osgGA", "osgText", "osgVolume", "osgFX", "osgViewer", "osgPresentation"]) if self.options.with_curl: plugin = setup_plugin("curl") @@ -462,15 +563,15 @@ def setup_library(lib): setup_plugin("md2") setup_plugin("osgtgz") setup_plugin("tgz") - setup_plugin("shp").requires.extend(("osgSim", "osgTerrain")) + setup_plugin("shp").requires.extend(["osgSim", "osgTerrain"]) setup_plugin("txf").requires.append("osgText") setup_plugin("bsp") setup_plugin("mdl") - setup_plugin("gles").requires.extend(("osgUtil", "osgAnimation")) - setup_plugin("osgjs").requires.extend(("osgAnimation", "osgSim")) + setup_plugin("gles").requires.extend(["osgUtil", "osgAnimation"]) + setup_plugin("osgjs").requires.extend(["osgAnimation", "osgSim"]) setup_plugin("lwo").requires.append("osgFX") setup_plugin("ply") - setup_plugin("txp").requires.extend(("osgSim", "osgText")) + setup_plugin("txp").requires.extend(["osgSim", "osgText"]) # with_ffmpeg # setup_plugin("ffmpeg") @@ -484,16 +585,20 @@ def setup_library(lib): if is_apple_os(self): setup_plugin("imageio").frameworks = ["Accelerate"] - if ((self.settings.os == "Macos" and self.settings.os.version and Version(self.settings.os.version) >= "10.8") - or (self.settings.os == "iOS" and Version(self.settings.os.version) >= "6.0")): + if (self.options.get_safe("with_avfoundation")): plugin = setup_plugin("avfoundation") plugin.requires.append("osgViewer") plugin.frameworks = ["AVFoundation", "Cocoa", "CoreVideo", "CoreMedia", "QuartzCore"] - if self.settings.os == "Macos" and self.settings.os.version and Version(self.settings.os.version) <= "10.6" and self.settings.arch == "x86": + if ( + is_apple_os(self) + and self.settings.os.version + and Version(self.settings.os.version) <= "10.6" + and self.settings.arch == "x86" + ): setup_plugin("qt").frameworks = ["QuickTime"] - if self.settings.os == "Macos" and self.settings.arch == "x86": + if is_apple_os(self) and self.settings.arch == "x86": plugin = setup_plugin("QTKit") plugin.requires.append("osgViewer") plugin.frameworks = ["QTKit", "Cocoa", "QuickTime", "CoreVideo"] @@ -502,7 +607,7 @@ def setup_library(lib): # setup_plugin("nvtt") if self.options.with_freetype: - setup_plugin("freetype").requires.extend(("osgText", "freetype::freetype")) + setup_plugin("freetype").requires.extend(["osgText", "freetype::freetype"]) if self.options.with_zlib: setup_plugin("zip") @@ -535,7 +640,7 @@ def setup_library(lib): # setup_plugin("sdl") if self.options.get_safe("with_asio", False): - setup_plugin("resthttp").requires.extend(("osgPresentation", "asio::asio", "boost::boost")) + setup_plugin("resthttp").requires.extend(["osgPresentation", "asio::asio", "boost::boost"]) # with_zeroconf # setup_plugin("zeroconf") diff --git a/recipes/openscenegraph/all/patches/0002-Use-standard-CMake-name-for-gif.patch b/recipes/openscenegraph/all/patches/0002-Use-standard-CMake-name-for-gif.patch deleted file mode 100644 index 7a75a5c326228..0000000000000 --- a/recipes/openscenegraph/all/patches/0002-Use-standard-CMake-name-for-gif.patch +++ /dev/null @@ -1,54 +0,0 @@ -From 17ad9caac56282e89d0e6a62c9564b99e2736225 Mon Sep 17 00:00:00 2001 -From: "R. Andrew Ohana" -Date: Thu, 17 Sep 2020 16:51:45 -0700 -Subject: [PATCH 2/5] Use standard CMake name for gif - ---- - CMakeLists.txt | 2 +- - src/osgPlugins/CMakeLists.txt | 2 +- - src/osgPlugins/gif/CMakeLists.txt | 4 ++-- - 3 files changed, 4 insertions(+), 4 deletions(-) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 0ef2edd33..5e0c8f349 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -813,7 +813,7 @@ ENDIF(BUILD_OSG_EXAMPLES AND NOT ANDROID) - # can use Quicktime. - IF(NOT ANDROID) - IF(NOT APPLE) -- FIND_PACKAGE(GIFLIB) -+ FIND_PACKAGE(GIF) - FIND_PACKAGE(JPEG) - FIND_PACKAGE(PNG) - FIND_PACKAGE(TIFF) -diff --git a/src/osgPlugins/CMakeLists.txt b/src/osgPlugins/CMakeLists.txt -index 812550412..2a88684b5 100644 ---- a/src/osgPlugins/CMakeLists.txt -+++ b/src/osgPlugins/CMakeLists.txt -@@ -108,7 +108,7 @@ ENDIF() - IF(OPENEXR_FOUND AND ZLIB_FOUND AND OSG_CPP_EXCEPTIONS_AVAILABLE) - ADD_PLUGIN_DIRECTORY(exr) - ENDIF() --IF(GIFLIB_FOUND) -+IF(GIF_FOUND) - ADD_PLUGIN_DIRECTORY(gif) - ENDIF() - IF(PNG_FOUND AND OSG_CPP_EXCEPTIONS_AVAILABLE) -diff --git a/src/osgPlugins/gif/CMakeLists.txt b/src/osgPlugins/gif/CMakeLists.txt -index 642339af1..0db0296cc 100644 ---- a/src/osgPlugins/gif/CMakeLists.txt -+++ b/src/osgPlugins/gif/CMakeLists.txt -@@ -1,7 +1,7 @@ --INCLUDE_DIRECTORIES( ${GIFLIB_INCLUDE_DIR} ) -+INCLUDE_DIRECTORIES( ${GIF_INCLUDE_DIR} ) - - SET(TARGET_SRC ReaderWriterGIF.cpp ) --SET(TARGET_LIBRARIES_VARS GIFLIB_LIBRARY ) -+SET(TARGET_LIBRARIES_VARS GIF_LIBRARY ) - #### end var setup ### - SETUP_PLUGIN(gif) - --- -2.21.0.windows.1 - diff --git a/recipes/openscenegraph/all/patches/0003-Correct-usage-of-_LIBRARY-to-_LIBRARIES.patch b/recipes/openscenegraph/all/patches/0003-Correct-usage-of-_LIBRARY-to-_LIBRARIES.patch deleted file mode 100644 index b3965bd4897eb..0000000000000 --- a/recipes/openscenegraph/all/patches/0003-Correct-usage-of-_LIBRARY-to-_LIBRARIES.patch +++ /dev/null @@ -1,155 +0,0 @@ -From 4925ff028681f79b8c0cb1d8e0772ca026c6e63e Mon Sep 17 00:00:00 2001 -From: "R. Andrew Ohana" -Date: Thu, 17 Sep 2020 17:06:49 -0700 -Subject: [PATCH 3/5] Correct usage of *_LIBRARY to *_LIBRARIES - ---- - src/osgPlugins/curl/CMakeLists.txt | 4 ++-- - src/osgPlugins/gdal/CMakeLists.txt | 2 +- - src/osgPlugins/gif/CMakeLists.txt | 2 +- - src/osgPlugins/gta/CMakeLists.txt | 2 +- - src/osgPlugins/jp2/CMakeLists.txt | 2 +- - src/osgPlugins/jpeg/CMakeLists.txt | 2 +- - src/osgPlugins/ogr/CMakeLists.txt | 2 +- - src/osgPlugins/png/CMakeLists.txt | 2 +- - src/osgPlugins/tiff/CMakeLists.txt | 2 +- - src/osgPlugins/vnc/CMakeLists.txt | 2 +- - 10 files changed, 11 insertions(+), 11 deletions(-) - -diff --git a/src/osgPlugins/curl/CMakeLists.txt b/src/osgPlugins/curl/CMakeLists.txt -index 667631f07..4afb738c7 100644 ---- a/src/osgPlugins/curl/CMakeLists.txt -+++ b/src/osgPlugins/curl/CMakeLists.txt -@@ -23,11 +23,11 @@ SET(TARGET_H - - IF(ZLIB_FOUND) - SET(TARGET_LIBRARIES_VARS -- CURL_LIBRARY -+ CURL_LIBRARIES - ZLIB_LIBRARIES) - ELSE() - SET(TARGET_LIBRARIES_VARS -- CURL_LIBRARY) -+ CURL_LIBRARIES) - ENDIF() - - IF(WIN32 OR MINGW) -diff --git a/src/osgPlugins/gdal/CMakeLists.txt b/src/osgPlugins/gdal/CMakeLists.txt -index f1b670701..353bc9fc6 100644 ---- a/src/osgPlugins/gdal/CMakeLists.txt -+++ b/src/osgPlugins/gdal/CMakeLists.txt -@@ -9,7 +9,7 @@ SET(TARGET_H - DataSetLayer.h - ) - --SET(TARGET_LIBRARIES_VARS GDAL_LIBRARY ) -+SET(TARGET_LIBRARIES_VARS GDAL_LIBRARIES ) - SET(TARGET_ADDED_LIBRARIES osgTerrain ) - - IF(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang") -diff --git a/src/osgPlugins/gif/CMakeLists.txt b/src/osgPlugins/gif/CMakeLists.txt -index 0db0296cc..99d1e26dc 100644 ---- a/src/osgPlugins/gif/CMakeLists.txt -+++ b/src/osgPlugins/gif/CMakeLists.txt -@@ -1,7 +1,7 @@ - INCLUDE_DIRECTORIES( ${GIF_INCLUDE_DIR} ) - - SET(TARGET_SRC ReaderWriterGIF.cpp ) --SET(TARGET_LIBRARIES_VARS GIF_LIBRARY ) -+SET(TARGET_LIBRARIES_VARS GIF_LIBRARIES ) - #### end var setup ### - SETUP_PLUGIN(gif) - -diff --git a/src/osgPlugins/gta/CMakeLists.txt b/src/osgPlugins/gta/CMakeLists.txt -index 2b910a628..16466fefc 100644 ---- a/src/osgPlugins/gta/CMakeLists.txt -+++ b/src/osgPlugins/gta/CMakeLists.txt -@@ -2,7 +2,7 @@ INCLUDE_DIRECTORIES( ${GTA_INCLUDE_DIRS} ) - - SET(TARGET_SRC ReaderWriterGTA.cpp ) - --SET(TARGET_LIBRARIES_VARS GTA_LIBRARY) -+SET(TARGET_LIBRARIES_VARS GTA_LIBRARIES) - - #### end var setup ### - SETUP_PLUGIN(gta) -diff --git a/src/osgPlugins/jp2/CMakeLists.txt b/src/osgPlugins/jp2/CMakeLists.txt -index b95537680..adcd84f64 100644 ---- a/src/osgPlugins/jp2/CMakeLists.txt -+++ b/src/osgPlugins/jp2/CMakeLists.txt -@@ -2,7 +2,7 @@ INCLUDE_DIRECTORIES( ${JASPER_INCLUDE_DIR} ) - - SET(TARGET_SRC ReaderWriterJP2.cpp ) - --SET(TARGET_LIBRARIES_VARS JASPER_LIBRARY ) -+SET(TARGET_LIBRARIES_VARS JASPER_LIBRARIES ) - - IF(WIN32) - ADD_DEFINITIONS(-DJAS_WIN_MSVC_BUILD) -diff --git a/src/osgPlugins/jpeg/CMakeLists.txt b/src/osgPlugins/jpeg/CMakeLists.txt -index 7117713a0..2d290a29d 100644 ---- a/src/osgPlugins/jpeg/CMakeLists.txt -+++ b/src/osgPlugins/jpeg/CMakeLists.txt -@@ -5,6 +5,6 @@ SET(TARGET_SRC - ReaderWriterJPEG.cpp - ) - --SET(TARGET_LIBRARIES_VARS JPEG_LIBRARY ) -+SET(TARGET_LIBRARIES_VARS JPEG_LIBRARIES ) - #### end var setup ### - SETUP_PLUGIN(jpeg) -diff --git a/src/osgPlugins/ogr/CMakeLists.txt b/src/osgPlugins/ogr/CMakeLists.txt -index 01b71e360..ea8b9706a 100644 ---- a/src/osgPlugins/ogr/CMakeLists.txt -+++ b/src/osgPlugins/ogr/CMakeLists.txt -@@ -2,7 +2,7 @@ INCLUDE_DIRECTORIES( ${GDAL_INCLUDE_DIR} ) - - SET(TARGET_SRC ReaderWriterOGR.cpp) - --SET(TARGET_LIBRARIES_VARS GDAL_LIBRARY ) -+SET(TARGET_LIBRARIES_VARS GDAL_LIBRARIES ) - - IF(CMAKE_COMPILER_IS_GNUCXX) - # Remove -Wshadow flag as it barfs on ffmoeg headers -diff --git a/src/osgPlugins/png/CMakeLists.txt b/src/osgPlugins/png/CMakeLists.txt -index 33df903d2..c4a6a2acc 100644 ---- a/src/osgPlugins/png/CMakeLists.txt -+++ b/src/osgPlugins/png/CMakeLists.txt -@@ -5,7 +5,7 @@ IF(OSG_CPP_EXCEPTIONS_AVAILABLE) - ENDIF() - - SET(TARGET_SRC ReaderWriterPNG.cpp ) --SET(TARGET_LIBRARIES_VARS PNG_LIBRARY ZLIB_LIBRARIES ) -+SET(TARGET_LIBRARIES_VARS PNG_LIBRARIES ZLIB_LIBRARIES ) - - - #### end var setup ### -diff --git a/src/osgPlugins/tiff/CMakeLists.txt b/src/osgPlugins/tiff/CMakeLists.txt -index fc945d68e..6b856eab2 100644 ---- a/src/osgPlugins/tiff/CMakeLists.txt -+++ b/src/osgPlugins/tiff/CMakeLists.txt -@@ -2,7 +2,7 @@ INCLUDE_DIRECTORIES( ${TIFF_INCLUDE_DIR} ) - - SET(TARGET_SRC ReaderWriterTIFF.cpp ) - --SET(TARGET_LIBRARIES_VARS TIFF_LIBRARY) -+SET(TARGET_LIBRARIES_VARS TIFF_LIBRARIES) - - #### end var setup ### - SETUP_PLUGIN(tiff) -diff --git a/src/osgPlugins/vnc/CMakeLists.txt b/src/osgPlugins/vnc/CMakeLists.txt -index 9a54b2bf2..49bb2dce4 100644 ---- a/src/osgPlugins/vnc/CMakeLists.txt -+++ b/src/osgPlugins/vnc/CMakeLists.txt -@@ -5,7 +5,7 @@ INCLUDE_DIRECTORIES(${LIBVNCSERVER_INCLUDE_DIR}) - SET(TARGET_EXTERNAL_LIBRARIES - ${LIBVNCCLIENT_LIBRARY} - ${ZLIB_LIBRARIES} -- ${JPEG_LIBRARY} ) -+ ${JPEG_LIBRARIES} ) - - SET(TARGET_ADDED_LIBRARIES osgWidget ) - --- -2.21.0.windows.1 - diff --git a/recipes/openscenegraph/all/patches/0004-Allow-explicit-control-of-plugins.patch b/recipes/openscenegraph/all/patches/0004-Allow-explicit-control-of-plugins.patch deleted file mode 100644 index 19caf4dfed537..0000000000000 --- a/recipes/openscenegraph/all/patches/0004-Allow-explicit-control-of-plugins.patch +++ /dev/null @@ -1,259 +0,0 @@ -From 04859156034c6762338411d5f2c07d02d0a7b814 Mon Sep 17 00:00:00 2001 -From: "R. Andrew Ohana" -Date: Thu, 17 Sep 2020 17:25:12 -0700 -Subject: [PATCH 4/5] Allow explicit control of plugins - ---- - src/osgDB/CMakeLists.txt | 8 ++-- - src/osgPlugins/CMakeLists.txt | 58 ++++++++++++++--------------- - src/osgPlugins/curl/CMakeLists.txt | 4 +- - src/osgPlugins/dicom/CMakeLists.txt | 2 +- - src/osgPlugins/ive/CMakeLists.txt | 2 +- - 5 files changed, 37 insertions(+), 37 deletions(-) - -diff --git a/src/osgDB/CMakeLists.txt b/src/osgDB/CMakeLists.txt -index 340aae095..59b8b3a0d 100644 ---- a/src/osgDB/CMakeLists.txt -+++ b/src/osgDB/CMakeLists.txt -@@ -147,19 +147,19 @@ IF(AV_FOUNDATION_FOUND) - ADD_DEFINITIONS(-DUSE_AV_FOUNDATION) - ENDIF() - --IF(FFMPEG_FOUND) -+IF(OSG_WITH_FFMPEG) - ADD_DEFINITIONS(-DUSE_FFMPEG) - ENDIF() - --IF(INVENTOR_FOUND) -+IF(OSG_WITH_INVENTOR) - ADD_DEFINITIONS(-DUSE_INVENTOR) - ENDIF() - --IF(OPENVRML_FOUND) -+IF(OSG_WITH_OPENVRML) - ADD_DEFINITIONS(-DUSE_VRML) - ENDIF() - --IF( ZLIB_FOUND ) -+IF(OSG_WITH_ZLIB) - ADD_DEFINITIONS( -DUSE_ZLIB ) - INCLUDE_DIRECTORIES( ${ZLIB_INCLUDE_DIR} ) - SET(COMPRESSION_LIBRARIES ZLIB_LIBRARIES) -diff --git a/src/osgPlugins/CMakeLists.txt b/src/osgPlugins/CMakeLists.txt -index 2a88684b5..24dc68667 100644 ---- a/src/osgPlugins/CMakeLists.txt -+++ b/src/osgPlugins/CMakeLists.txt -@@ -99,29 +99,29 @@ ADD_PLUGIN_DIRECTORY(dot) - ADD_PLUGIN_DIRECTORY(vtf) - ADD_PLUGIN_DIRECTORY(ktx) - --IF(JPEG_FOUND) -+IF(OSG_WITH_JPEG) - ADD_PLUGIN_DIRECTORY(jpeg) - ENDIF() --IF(JASPER_FOUND) -+IF(OSG_WITH_JASPER) - ADD_PLUGIN_DIRECTORY(jp2) - ENDIF() --IF(OPENEXR_FOUND AND ZLIB_FOUND AND OSG_CPP_EXCEPTIONS_AVAILABLE) -+IF(OSG_WITH_OPENEXR) - ADD_PLUGIN_DIRECTORY(exr) - ENDIF() --IF(GIF_FOUND) -+IF(OSG_WITH_GIF) - ADD_PLUGIN_DIRECTORY(gif) - ENDIF() --IF(PNG_FOUND AND OSG_CPP_EXCEPTIONS_AVAILABLE) -+IF(OSG_WITH_PNG) - ADD_PLUGIN_DIRECTORY(png) - ENDIF() --IF(TIFF_FOUND AND OSG_CPP_EXCEPTIONS_AVAILABLE) -+IF(OSG_WITH_TIFF) - ADD_PLUGIN_DIRECTORY(tiff) - ENDIF() --IF(GDAL_FOUND) -+IF(OSG_WITH_GDAL) - ADD_PLUGIN_DIRECTORY(gdal) - ADD_PLUGIN_DIRECTORY(ogr) - ENDIF() --IF(GTA_FOUND AND OSG_CPP_EXCEPTIONS_AVAILABLE) -+IF(OSG_WITH_GTA) - ADD_PLUGIN_DIRECTORY(gta) - ENDIF() - -@@ -130,9 +130,9 @@ ENDIF() - # - # 3D Image plugins - # --IF(DCMTK_FOUND AND ZLIB_FOUND) -+IF(OSG_WITH_DCMTK) - ADD_PLUGIN_DIRECTORY(dicom) --ELSE() -+ELSEIF(FALSE) - IF(ITK_FOUND) - ADD_PLUGIN_DIRECTORY(dicom) - ENDIF() -@@ -147,29 +147,29 @@ ADD_PLUGIN_DIRECTORY(3dc) - - ADD_PLUGIN_DIRECTORY(p3d) - --IF(CURL_FOUND) -+IF(OSG_WITH_CURL) - ADD_PLUGIN_DIRECTORY(curl) - ENDIF() - --IF(ZLIB_FOUND) -+IF(OSG_WITH_ZLIB) - ADD_PLUGIN_DIRECTORY(gz) - ENDIF() - - IF(NOT OSG_GLES1_AVAILABLE AND NOT OSG_GLES2_AVAILABLE) -- IF(INVENTOR_FOUND) -+ IF(OSG_WITH_INVENTOR) - ADD_PLUGIN_DIRECTORY(Inventor) - ENDIF() - ENDIF() - --IF(COLLADA_FOUND AND OSG_CPP_EXCEPTIONS_AVAILABLE) -+IF(OSG_WITH_COLLADA) - ADD_PLUGIN_DIRECTORY(dae) - ENDIF() - --IF(FBX_FOUND AND OSG_CPP_EXCEPTIONS_AVAILABLE) -+IF(OSG_WITH_FBX) - ADD_PLUGIN_DIRECTORY(fbx) - ENDIF() - --IF(OPENCASCADE_FOUND) -+IF(OSG_WITH_OPENCASCADE) - ADD_PLUGIN_DIRECTORY(OpenCASCADE) - ENDIF() - -@@ -209,15 +209,15 @@ IF(OSG_CPP_EXCEPTIONS_AVAILABLE) - ADD_PLUGIN_DIRECTORY(txp) - ENDIF() - --IF(FFMPEG_FOUND AND OSG_CPP_EXCEPTIONS_AVAILABLE) -+IF(OSG_WITH_FFMPEG) - ADD_PLUGIN_DIRECTORY(ffmpeg) - ENDIF() - --IF(GSTREAMER_FOUND AND GLIB_FOUND) -+IF(OSG_WITH_GSTREAMER) - ADD_PLUGIN_DIRECTORY(gstreamer) - ENDIF() - --IF(DIRECTSHOW_FOUND) -+IF(OSG_WITH_DIRECTSHOW) - ADD_PLUGIN_DIRECTORY(directshow) - ENDIF() - -@@ -241,28 +241,28 @@ IF(QTKIT_FOUND) - ADD_PLUGIN_DIRECTORY(QTKit) - ENDIF() - --IF(NVTT_FOUND) -+IF(OSG_WITH_NVTT) - ADD_PLUGIN_DIRECTORY(nvtt) - ENDIF() - - --IF(FREETYPE_FOUND) -+IF(OSG_WITH_FREETYPE) - ADD_PLUGIN_DIRECTORY(freetype) - ENDIF() - --IF(ZLIB_FOUND) -+IF(OSG_WITH_ZLIB) - ADD_PLUGIN_DIRECTORY(zip) - ENDIF() - --IF(RSVG_FOUND) -+IF(OSG_WITH_RSVG) - ADD_PLUGIN_DIRECTORY(svg) - ENDIF() - --IF(POPPLER_FOUND) -+IF(OSG_WITH_POPPLER) - ADD_PLUGIN_DIRECTORY(pdf) - ENDIF() - --IF(LIBVNCSERVER_FOUND) -+IF(OSG_WITH_LIBVNCSERVER) - ADD_PLUGIN_DIRECTORY(vnc) - ENDIF() - -@@ -272,7 +272,7 @@ ADD_PLUGIN_DIRECTORY(osc) - ADD_PLUGIN_DIRECTORY(trk) - ADD_PLUGIN_DIRECTORY(tf) - --IF(LIBLAS_FOUND) -+IF(OSG_WITH_LIBLAS) - ADD_PLUGIN_DIRECTORY(las) - ENDIF() - -@@ -299,16 +299,16 @@ ENDIF() - # - # Device integration plugins - # --IF (SDL_FOUND) -+IF(OSG_WITH_SDL) - ADD_PLUGIN_DIRECTORY(sdl) - ENDIF(SDL_FOUND) - --IF(ASIO_FOUND) -+IF(OSG_WITH_ASIO) - ADD_PLUGIN_DIRECTORY(RestHttpDevice) - ENDIF(ASIO_FOUND) - - --IF(ZEROCONF_FOUND) -+IF(OSG_WITH_ZEROCONF) - ADD_PLUGIN_DIRECTORY(ZeroConfDevice) - ENDIF() - -diff --git a/src/osgPlugins/curl/CMakeLists.txt b/src/osgPlugins/curl/CMakeLists.txt -index 4afb738c7..fb5b98498 100644 ---- a/src/osgPlugins/curl/CMakeLists.txt -+++ b/src/osgPlugins/curl/CMakeLists.txt -@@ -5,7 +5,7 @@ IF(WIN32) - SET(CMAKE_SHARED_LINKER_FLAGS_DEBUG "${CMAKE_SHARED_LINKER_FLAGS_DEBUG} /NODEFAULTLIB:MSVCRT") - ENDIF() - --IF(ZLIB_FOUND) -+IF(OSG_WITH_ZLIB) - ADD_DEFINITIONS(-DUSE_ZLIB) - INCLUDE_DIRECTORIES( ${CURL_INCLUDE_DIRS} ${ZLIB_INCLUDE_DIR}) - ELSE() -@@ -21,7 +21,7 @@ SET(TARGET_H - ReaderWriterCURL.h - ) - --IF(ZLIB_FOUND) -+IF(OSG_WITH_ZLIB) - SET(TARGET_LIBRARIES_VARS - CURL_LIBRARIES - ZLIB_LIBRARIES) -diff --git a/src/osgPlugins/dicom/CMakeLists.txt b/src/osgPlugins/dicom/CMakeLists.txt -index 3f159a9c5..06ccd17ed 100644 ---- a/src/osgPlugins/dicom/CMakeLists.txt -+++ b/src/osgPlugins/dicom/CMakeLists.txt -@@ -1,4 +1,4 @@ --IF (DCMTK_FOUND) -+IF (TRUE) - - # note, we have to include a '/' in front of the directory string to prevent a CMake bug from ignoring the directory - INCLUDE_DIRECTORIES(${DCMTK_INCLUDE_DIRS}) -diff --git a/src/osgPlugins/ive/CMakeLists.txt b/src/osgPlugins/ive/CMakeLists.txt -index 784a79c7e..40030b27d 100644 ---- a/src/osgPlugins/ive/CMakeLists.txt -+++ b/src/osgPlugins/ive/CMakeLists.txt -@@ -1,4 +1,4 @@ --IF(ZLIB_FOUND) -+IF(OSG_WITH_ZLIB) - ADD_DEFINITIONS(-DUSE_ZLIB) - INCLUDE_DIRECTORIES( ${ZLIB_INCLUDE_DIR}) - ENDIF() --- -2.21.0.windows.1 - diff --git a/recipes/openscenegraph/all/patches/0007-fix-msvc-with-std-c++17.patch b/recipes/openscenegraph/all/patches/0007-fix-msvc-with-std-c++17.patch new file mode 100644 index 0000000000000..39046ed3994aa --- /dev/null +++ b/recipes/openscenegraph/all/patches/0007-fix-msvc-with-std-c++17.patch @@ -0,0 +1,50 @@ +diff --git a/src/osg/DisplaySettings.cpp b/src/osg/DisplaySettings.cpp +index 5c699c8b0..5c097cf66 100644 +--- a/src/osg/DisplaySettings.cpp ++++ b/src/osg/DisplaySettings.cpp +@@ -22,9 +22,6 @@ + #include + #include + +-using namespace osg; +-using namespace std; +- + #if defined(WIN32) && !defined(__CYGWIN__) + #include + extern "C" { OSG_EXPORT DWORD NvOptimusEnablement=0x00000001; } +@@ -32,6 +29,9 @@ extern "C" { OSG_EXPORT DWORD NvOptimusEnablement=0x00000001; } + extern "C" { int NvOptimusEnablement=0x00000001; } + #endif + ++using namespace osg; ++using namespace std; ++ + void DisplaySettings::setNvOptimusEnablement(int value) + { + NvOptimusEnablement = value; +diff --git a/src/osgPlugins/cfg/ConfigParser.cpp b/src/osgPlugins/cfg/ConfigParser.cpp +index 263c82896..4247cc2af 100644 +--- a/src/osgPlugins/cfg/ConfigParser.cpp ++++ b/src/osgPlugins/cfg/ConfigParser.cpp +@@ -235,7 +235,7 @@ + #include "CameraConfig.h" + + +-using namespace std; ++ + using namespace osgProducer; + + static void ConfigParser_error( const char * ); +diff --git a/src/osgPlugins/cfg/ConfigParser.y b/src/osgPlugins/cfg/ConfigParser.y +index cf9adf507..5221be184 100644 +--- a/src/osgPlugins/cfg/ConfigParser.y ++++ b/src/osgPlugins/cfg/ConfigParser.y +@@ -34,7 +34,7 @@ + #include + + +-using namespace std; ++ + using namespace Producer; + + static void ConfigParser_error( const char * ); diff --git a/recipes/openscenegraph/all/patches/0008-replace-mem-fun-ref.patch b/recipes/openscenegraph/all/patches/0008-replace-mem-fun-ref.patch new file mode 100644 index 0000000000000..5f86f332a80cf --- /dev/null +++ b/recipes/openscenegraph/all/patches/0008-replace-mem-fun-ref.patch @@ -0,0 +1,13 @@ +diff --git a/src/osgUtil/tristripper/include/detail/graph_array.h b/src/osgUtil/tristripper/include/detail/graph_array.h +index dc1f38027..ce7000cc8 100644 +--- a/src/osgUtil/tristripper/include/detail/graph_array.h ++++ b/src/osgUtil/tristripper/include/detail/graph_array.h +@@ -446,7 +446,7 @@ inline void graph_array::swap(graph_type & Right) + template + inline void unmark_nodes(graph_array & G) + { +- std::for_each(G.begin(), G.end(), std::mem_fun_ref(&graph_array::node::unmark)); ++ for(typename graph_array::node_iterator itr = G.begin(); itr != G.end(); ++itr) itr->unmark(); + } + + diff --git a/recipes/openscenegraph/all/patches/0009-replace-auto-ptr-in-plugins.patch b/recipes/openscenegraph/all/patches/0009-replace-auto-ptr-in-plugins.patch new file mode 100644 index 0000000000000..de0f3ee7139ef --- /dev/null +++ b/recipes/openscenegraph/all/patches/0009-replace-auto-ptr-in-plugins.patch @@ -0,0 +1,75 @@ +diff --git a/src/osgPlugins/dae/ReaderWriterDAE.cpp b/src/osgPlugins/dae/ReaderWriterDAE.cpp +index fc1a448d4..3b883f19a 100644 +--- a/src/osgPlugins/dae/ReaderWriterDAE.cpp ++++ b/src/osgPlugins/dae/ReaderWriterDAE.cpp +@@ -32,7 +32,7 @@ + + #define SERIALIZER() OpenThreads::ScopedLock lock(_serializerMutex) + +-#if __cplusplus > 199711L ++#if ((defined(_MSVC_LANG) && _MSVC_LANG > 199711L) || __cplusplus > 199711L) + #define smart_ptr std::unique_ptr + #else + #define smart_ptr std::auto_ptr +diff --git a/src/osgPlugins/ffmpeg/FFmpegImageStream.cpp b/src/osgPlugins/ffmpeg/FFmpegImageStream.cpp +index 69826c456..9bba5532a 100644 +--- a/src/osgPlugins/ffmpeg/FFmpegImageStream.cpp ++++ b/src/osgPlugins/ffmpeg/FFmpegImageStream.cpp +@@ -10,6 +10,11 @@ + + #define STREAM_TIMEOUT_IN_SECONDS_TO_CONSIDER_IT_DEAD 10 + ++#if ((defined(_MSVC_LANG) && _MSVC_LANG > 199711L) || __cplusplus > 199711L) ++ template using smart_ptr = std::unique_ptr; ++#else ++ #define smart_ptr std::auto_ptr ++#endif + + namespace osgFFmpeg { + +@@ -23,8 +28,8 @@ FFmpegImageStream::FFmpegImageStream() : + { + setOrigin(osg::Image::TOP_LEFT); + +- std::auto_ptr decoder(new FFmpegDecoder); +- std::auto_ptr commands(new CommandQueue); ++ smart_ptr decoder(new FFmpegDecoder); ++ smart_ptr commands(new CommandQueue); + + m_decoder = decoder.release(); + m_commands = commands.release(); +diff --git a/src/osgPlugins/gdal/ReaderWriterGDAL.cpp b/src/osgPlugins/gdal/ReaderWriterGDAL.cpp +index 298e02fcc..113c9c45f 100644 +--- a/src/osgPlugins/gdal/ReaderWriterGDAL.cpp ++++ b/src/osgPlugins/gdal/ReaderWriterGDAL.cpp +@@ -34,6 +34,12 @@ + + #define SERIALIZER() OpenThreads::ScopedLock lock(_serializerMutex) + ++#if ((defined(_MSVC_LANG) && _MSVC_LANG > 199711L) || __cplusplus > 199711L) ++ #define smart_ptr std::unique_ptr ++#else ++ #define smart_ptr std::auto_ptr ++#endif ++ + // From easyrgb.com + float Hue_2_RGB( float v1, float v2, float vH ) + { +@@ -123,7 +129,7 @@ class ReaderWriterGDAL : public osgDB::ReaderWriter + + initGDAL(); + +- std::auto_ptr dataset((GDALDataset*)GDALOpen(fileName.c_str(),GA_ReadOnly)); ++ smart_ptr dataset((GDALDataset*)GDALOpen(fileName.c_str(),GA_ReadOnly)); + if (!dataset.get()) return ReadResult::FILE_NOT_HANDLED; + + int dataWidth = dataset->GetRasterXSize(); +@@ -577,7 +583,7 @@ class ReaderWriterGDAL : public osgDB::ReaderWriter + + initGDAL(); + +- std::auto_ptr dataset((GDALDataset*)GDALOpen(fileName.c_str(),GA_ReadOnly)); ++ smart_ptr dataset((GDALDataset*)GDALOpen(fileName.c_str(),GA_ReadOnly)); + if (!dataset.get()) return ReadResult::FILE_NOT_HANDLED; + + int dataWidth = dataset->GetRasterXSize(); diff --git a/recipes/openscenegraph/all/patches/0010-replace-ptr-fun-in-obj-plugin.patch b/recipes/openscenegraph/all/patches/0010-replace-ptr-fun-in-obj-plugin.patch new file mode 100644 index 0000000000000..139031361bc28 --- /dev/null +++ b/recipes/openscenegraph/all/patches/0010-replace-ptr-fun-in-obj-plugin.patch @@ -0,0 +1,24 @@ +diff --git a/src/osgPlugins/obj/obj.cpp b/src/osgPlugins/obj/obj.cpp +index 859add652..3580e5181 100644 +--- a/src/osgPlugins/obj/obj.cpp ++++ b/src/osgPlugins/obj/obj.cpp +@@ -37,10 +37,15 @@ using namespace obj; + + static std::string strip( const std::string& ss ) + { +- std::string result; +- result.assign( std::find_if( ss.begin(), ss.end(), std::not1( std::ptr_fun< int, int >( isspace ) ) ), +- std::find_if( ss.rbegin(), ss.rend(), std::not1( std::ptr_fun< int, int >( isspace ) ) ).base() ); +- return( result ); ++ std::string::const_iterator it = ss.begin(); ++ while (it != ss.end() && isspace(*it)) ++ it++; ++ ++ std::string::const_reverse_iterator rit = ss.rbegin(); ++ while (rit.base() != it && isspace(*rit)) ++ rit++; ++ ++ return std::string(it, rit.base()); + } + + /* diff --git a/recipes/openscenegraph/all/patches/0011-remove-deprecated-register.patch b/recipes/openscenegraph/all/patches/0011-remove-deprecated-register.patch new file mode 100644 index 0000000000000..9a1ea80d16a65 --- /dev/null +++ b/recipes/openscenegraph/all/patches/0011-remove-deprecated-register.patch @@ -0,0 +1,187 @@ +From b9f32bf6df5af101624bb065175097d8d96067c2 Mon Sep 17 00:00:00 2001 +From: czoido +Date: Thu, 25 Jan 2024 09:32:10 +0100 +Subject: [PATCH] remove deprecated register + +--- + src/osgPlugins/cfg/ConfigLexer.cpp | 40 ++++++++++++++--------------- + src/osgPlugins/cfg/ConfigParser.cpp | 16 ++++++------ + 2 files changed, 28 insertions(+), 28 deletions(-) + +diff --git a/src/osgPlugins/cfg/ConfigLexer.cpp b/src/osgPlugins/cfg/ConfigLexer.cpp +index 4e169efe4..cba6d6f9e 100644 +--- a/src/osgPlugins/cfg/ConfigLexer.cpp ++++ b/src/osgPlugins/cfg/ConfigLexer.cpp +@@ -832,9 +832,9 @@ YY_MALLOC_DECL + + YY_DECL + { +- register yy_state_type yy_current_state; +- register char *yy_cp, *yy_bp; +- register int yy_act; ++ yy_state_type yy_current_state; ++ char *yy_cp, *yy_bp; ++ int yy_act; + + #line 35 ".././ConfigLexer.l" + +@@ -881,7 +881,7 @@ YY_DECL + yy_match: + do + { +- register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; ++ YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; + if ( yy_accept[yy_current_state] ) + { + yy_last_accepting_state = yy_current_state; +@@ -1598,9 +1598,9 @@ void yyFlexLexer::LexerOutput( const char* buf, int size ) + + int yyFlexLexer::yy_get_next_buffer() + { +- register char *dest = yy_current_buffer->yy_ch_buf; +- register char *source = yytext_ptr; +- register int number_to_move, i; ++ char *dest = yy_current_buffer->yy_ch_buf; ++ char *source = yytext_ptr; ++ int number_to_move, i; + int ret_val; + + if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] ) +@@ -1730,14 +1730,14 @@ int yyFlexLexer::yy_get_next_buffer() + + yy_state_type yyFlexLexer::yy_get_previous_state() + { +- register yy_state_type yy_current_state; +- register char *yy_cp; ++ yy_state_type yy_current_state; ++ char *yy_cp; + + yy_current_state = yy_start; + + for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp ) + { +- register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); ++ YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); + if ( yy_accept[yy_current_state] ) + { + yy_last_accepting_state = yy_current_state; +@@ -1764,10 +1764,10 @@ yy_state_type yyFlexLexer::yy_get_previous_state() + + yy_state_type yyFlexLexer::yy_try_NUL_trans( yy_state_type yy_current_state ) + { +- register int yy_is_jam; +- register char *yy_cp = yy_c_buf_p; ++ int yy_is_jam; ++ char *yy_cp = yy_c_buf_p; + +- register YY_CHAR yy_c = 1; ++ YY_CHAR yy_c = 1; + if ( yy_accept[yy_current_state] ) + { + yy_last_accepting_state = yy_current_state; +@@ -1786,9 +1786,9 @@ yy_state_type yyFlexLexer::yy_try_NUL_trans( yy_state_type yy_current_state ) + } + + +-void yyFlexLexer::yyunput( int c, register char* yy_bp ) ++void yyFlexLexer::yyunput( int c, char* yy_bp ) + { +- register char *yy_cp = yy_c_buf_p; ++ char *yy_cp = yy_c_buf_p; + + /* undo effects of setting up yytext */ + *yy_cp = yy_hold_char; +@@ -1796,10 +1796,10 @@ void yyFlexLexer::yyunput( int c, register char* yy_bp ) + if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) + { /* need to shift things up to make room */ + /* +2 for EOB chars. */ +- register int number_to_move = yy_n_chars + 2; +- register char *dest = &yy_current_buffer->yy_ch_buf[ ++ int number_to_move = yy_n_chars + 2; ++ char *dest = &yy_current_buffer->yy_ch_buf[ + yy_current_buffer->yy_buf_size + 2]; +- register char *source = ++ char *source = + &yy_current_buffer->yy_ch_buf[number_to_move]; + + while ( source > yy_current_buffer->yy_ch_buf ) +@@ -2119,7 +2119,7 @@ yyconst char *s2; + int n; + #endif + { +- register int i; ++ int i; + for ( i = 0; i < n; ++i ) + s1[i] = s2[i]; + } +@@ -2133,7 +2133,7 @@ static int yy_flex_strlen( s ) + yyconst char *s; + #endif + { +- register int n; ++ int n; + for ( n = 0; s[n]; ++n ) + ; + +diff --git a/src/osgPlugins/cfg/ConfigParser.cpp b/src/osgPlugins/cfg/ConfigParser.cpp +index 263c82896..62d30c3f5 100644 +--- a/src/osgPlugins/cfg/ConfigParser.cpp ++++ b/src/osgPlugins/cfg/ConfigParser.cpp +@@ -351,7 +351,7 @@ union yyalloc + # define YYCOPY(To, From, Count) \ + do \ + { \ +- register YYSIZE_T yyi; \ ++ YYSIZE_T yyi; \ + for (yyi = 0; yyi < (Count); yyi++) \ + (To)[yyi] = (From)[yyi]; \ + } \ +@@ -1025,7 +1025,7 @@ yystrlen (yystr) + const char *yystr; + # endif + { +- register const char *yys = yystr; ++ const char *yys = yystr; + + while (*yys++ != '\0') + continue; +@@ -1050,8 +1050,8 @@ yystpcpy (yydest, yysrc) + const char *yysrc; + # endif + { +- register char *yyd = yydest; +- register const char *yys = yysrc; ++ char *yyd = yydest; ++ const char *yys = yysrc; + + while ((*yyd++ = *yys++) != '\0') + continue; +@@ -1175,8 +1175,8 @@ yyparse () + #endif + { + +- register int yystate; +- register int yyn; ++ int yystate; ++ int yyn; + int yyresult; + /* Number of tokens to shift before error messages enabled. */ + int yyerrstatus; +@@ -1194,12 +1194,12 @@ yyparse () + /* The state stack. */ + short yyssa[YYINITDEPTH]; + short *yyss = yyssa; +- register short *yyssp; ++ short *yyssp; + + /* The semantic value stack. */ + YYSTYPE yyvsa[YYINITDEPTH]; + YYSTYPE *yyvs = yyvsa; +- register YYSTYPE *yyvsp; ++ YYSTYPE *yyvsp; + + + +-- +2.39.3 (Apple Git-145) + diff --git a/recipes/openscenegraph/all/test_package/CMakeLists.txt b/recipes/openscenegraph/all/test_package/CMakeLists.txt index c2aca0be1b70a..fcd48ccf6e39d 100644 --- a/recipes/openscenegraph/all/test_package/CMakeLists.txt +++ b/recipes/openscenegraph/all/test_package/CMakeLists.txt @@ -1,21 +1,58 @@ -cmake_minimum_required(VERSION 3.1.2) -project(test_package) - -include(${PROJECT_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup() - -find_package(OpenSceneGraph REQUIRED) - -include_directories(${OPENSCENEGRAPH_INCLUDE_DIRS}) -link_libraries(${OPENSCENEGRAPH_LIBRARIES}) -add_compile_definitions(${OPENSCENEGRAPH_COMPILE_DEFINITIONS}) +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) +find_package(OpenSceneGraph REQUIRED CONFIG) +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} OpenSceneGraph::OpenSceneGraph) -get_property(cache_variables DIRECTORY PROPERTY CACHE_VARIABLES) -foreach(cache_variable ${cache_variables}) - if("${cache_variable}" MATCHES "^OSG_HAS_(WITH_.+)$") - add_compile_definitions("${CMAKE_MATCH_1}=${${cache_variable}}") - endif() +get_directory_property(compile_definitions DIRECTORY ${CMAKE_SOURCE_DIR} COMPILE_DEFINITIONS) +foreach(compile_definition ${compile_definitions}) + if("${compile_definition}" MATCHES "(WITH_.+)=(1)$") + string(REPLACE "=" ";" definition_list ${compile_definition}) + list(GET definition_list 0 definition_key) + list(GET definition_list 1 definition_value) + message("Defined: ${definition_key}=${definition_value}") + if("${definition_key}" STREQUAL "WITH_BMP") + target_link_libraries(${PROJECT_NAME} openscenegraph::osgdb_bmp) + endif() + if("${definition_key}" STREQUAL "WITH_JPEG") + target_link_libraries(${PROJECT_NAME} openscenegraph::osgdb_jpeg) + endif() + if("${definition_key}" STREQUAL "WITH_JASPER") + target_link_libraries(${PROJECT_NAME} openscenegraph::osgdb_jp2) + endif() + if("${definition_key}" STREQUAL "WITH_OPENEXR") + target_link_libraries(${PROJECT_NAME} openscenegraph::osgdb_exr) + endif() + if("${definition_key}" STREQUAL "WITH_GIF") + target_link_libraries(${PROJECT_NAME} openscenegraph::osgdb_gif) + endif() + if("${definition_key}" STREQUAL "WITH_PNG") + target_link_libraries(${PROJECT_NAME} openscenegraph::osgdb_png) + endif() + if("${definition_key}" STREQUAL "WITH_TIFF") + target_link_libraries(${PROJECT_NAME} openscenegraph::osgdb_tiff) + endif() + if("${definition_key}" STREQUAL "WITH_GDAL") + target_link_libraries(${PROJECT_NAME} openscenegraph::osgdb_gdal) + endif() + if("${definition_key}" STREQUAL "WITH_GTA") + target_link_libraries(${PROJECT_NAME} openscenegraph::osgdb_gta) + endif() + if("${definition_key}" STREQUAL "WITH_DCMTK") + target_link_libraries(${PROJECT_NAME} openscenegraph::osgdb_dicom) + endif() + if("${definition_key}" STREQUAL "WITH_CURL") + target_link_libraries(${PROJECT_NAME} openscenegraph::osgdb_curl) + endif() + if("${definition_key}" STREQUAL "WITH_ZLIB") + target_link_libraries(${PROJECT_NAME} openscenegraph::osgdb_gz) + endif() + if("${definition_key}" STREQUAL "WITH_FREETYPE") + target_link_libraries(${PROJECT_NAME} openscenegraph::osgdb_freetype) + endif() + if("${definition_key}" STREQUAL "WITH_IMAGEIO") + target_link_libraries(${PROJECT_NAME} openscenegraph::osgdb_imageio) + endif() + endif() endforeach() - -add_executable(${PROJECT_NAME} test_package.cpp) diff --git a/recipes/openscenegraph/all/test_package/conanfile.py b/recipes/openscenegraph/all/test_package/conanfile.py index 0e02c2d008408..b27efd09cb3f1 100644 --- a/recipes/openscenegraph/all/test_package/conanfile.py +++ b/recipes/openscenegraph/all/test_package/conanfile.py @@ -1,25 +1,43 @@ -from conans import CMake, ConanFile, tools +from conan import ConanFile +from conan.tools.apple import is_apple_os +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake, CMakeToolchain import os class TestPackageConan(ConanFile): - settings = "os", "compiler", "build_type", "arch" - generators = "cmake", "cmake_find_package" + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "VirtualRunEnv" + test_type = "explicit" - def build(self): - cmake = CMake(self) - for key, value in self.options["openscenegraph"].items(): + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) + + def generate(self): + tc = CMakeToolchain(self) + for key, value in self.dependencies["openscenegraph"].options.items(): if key.startswith("with_"): - cmake.definitions["OSG_HAS_" + key.upper()] = 1 if value else 0 - if self.settings.os == "Macos": - cmake.definitions["OSG_HAS_WITH_GIF"] = 0 - cmake.definitions["OSG_HAS_WITH_JPEG"] = 0 - cmake.definitions["OSG_HAS_WITH_PNG"] = 0 + tc.preprocessor_definitions[key.upper()] = 1 if str(value) != "False" else 0 + #OSG always builds the bmp plugin + tc.preprocessor_definitions["WITH_BMP"] = 1 + if is_apple_os(self): + tc.preprocessor_definitions["WITH_GIF"] = 0 + tc.preprocessor_definitions["WITH_JPEG"] = 0 + tc.preprocessor_definitions["WITH_PNG"] = 0 + # OSG builds the imageio plugin on apple platforms + tc.preprocessor_definitions["WITH_IMAGEIO"] = 1 + tc.generate() + + def build(self): + cmake = CMake(self) cmake.configure() cmake.build() def test(self): - if not tools.cross_building(self): - bin_path = os.path.join("bin", "test_package") - self.run(bin_path, run_environment=True) + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/openscenegraph/all/test_package/test_package.cpp b/recipes/openscenegraph/all/test_package/test_package.cpp index d165af7b34733..c833eb8e3caee 100644 --- a/recipes/openscenegraph/all/test_package/test_package.cpp +++ b/recipes/openscenegraph/all/test_package/test_package.cpp @@ -4,14 +4,8 @@ #include #include -// OSG always builds the bmp plugin -#define WITH_BMP 1 - -// OSG builds the imageio plugin on apple platforms -#ifdef __APPLE__ -# define WITH_IMAGEIO 1 -#else -# define WITH_IMAGEIO 0 +#ifndef WITH_IMAGEIO +#define WITH_IMAGEIO 0 #endif #ifdef OSG_LIBRARY_STATIC diff --git a/recipes/openslide/all/conandata.yml b/recipes/openslide/all/conandata.yml new file mode 100644 index 0000000000000..ca29cdf478653 --- /dev/null +++ b/recipes/openslide/all/conandata.yml @@ -0,0 +1,10 @@ +sources: + "4.0.0": + url: "https://github.com/openslide/openslide/releases/download/v4.0.0/openslide-4.0.0.tar.xz" + sha256: "cc227c44316abb65fb28f1c967706eb7254f91dbfab31e9ae6a48db6cf4ae562" +patches: + "4.0.0": + - patch_file: "patches/0001-no-openslide-poison.patch" + patch_description: "Fix 'error__use__openslide_fclose_instead' compilation error" + patch_type: "backport" + patch_source: "https://github.com/openslide/openslide/commit/048865a3b61e9bc2b61219168d434b61e784d355" diff --git a/recipes/openslide/all/conanfile.py b/recipes/openslide/all/conanfile.py new file mode 100644 index 0000000000000..0557d9913ef70 --- /dev/null +++ b/recipes/openslide/all/conanfile.py @@ -0,0 +1,138 @@ +import os + +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.apple import fix_apple_shared_install_name +from conan.tools.env import VirtualBuildEnv +from conan.tools.files import copy, get, rm, rmdir, export_conandata_patches, apply_conandata_patches +from conan.tools.gnu import PkgConfigDeps +from conan.tools.layout import basic_layout +from conan.tools.meson import Meson, MesonToolchain +from conan.tools.microsoft import is_msvc + +required_conan_version = ">=1.53.0" + + +class OpenSlideConan(ConanFile): + name = "openslide" + description = "OpenSlide is a C library for reading whole slide image files (also known as virtual slides)" + license = "LGPL-2.1" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://openslide.org/" + topics = ("image", "pathology", "whole-slide-imaging", "slide-image", + # supported formats + "bif", "dicom", "dcm", "mrxs", "ndpi", "scn", "svs", "svslide", "tiff", "vms", "vmu") + + package_type = "library" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + "jpeg": ["libjpeg", "libjpeg-turbo", "mozjpeg"], + } + default_options = { + "shared": False, + "fPIC": True, + "jpeg": "libjpeg", + } + + def export_sources(self): + export_conandata_patches(self) + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + self.settings.rm_safe("compiler.cppstd") + self.settings.rm_safe("compiler.libcxx") + + def layout(self): + basic_layout(self, src_folder="src") + + def requirements(self): + self.requires("cairo/1.18.0") + self.requires("gdk-pixbuf/2.42.10") + self.requires("glib/2.78.3") + self.requires("libdicom/1.0.5") + self.requires("libpng/[>=1.6 <2]") + self.requires("libtiff/4.6.0") + self.requires("libxml2/[>=2.12.5 <3]") + self.requires("openjpeg/2.5.2") + self.requires("sqlite3/3.45.3") + self.requires("zlib/[>=1.2.11 <2]") + if self.options.jpeg == "libjpeg": + self.requires("libjpeg/9e") + elif self.options.jpeg == "libjpeg-turbo": + self.requires("libjpeg-turbo/3.0.2") + elif self.options.jpeg == "mozjpeg": + self.requires("mozjpeg/4.1.5") + + def validate(self): + if is_msvc(self): + raise ConanInvalidConfiguration("OpenSlide requires GNU C extensions support and is not compatible with MSVC") + + def build_requirements(self): + self.tool_requires("meson/[>=1.2.3 <2]") + if not self.conf.get("tools.gnu:pkg_config", default=False, check_type=str): + self.tool_requires("pkgconf/[>=2.2 <3]") + self.tool_requires("glib/") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + venv = VirtualBuildEnv(self) + venv.generate() + tc = MesonToolchain(self) + tc.project_options["test"] = "disabled" + tc.project_options["doc"] = "disabled" + tc.generate() + deps = PkgConfigDeps(self) + deps.generate() + + def build(self): + apply_conandata_patches(self) + meson = Meson(self) + meson.configure() + meson.build() + + def package(self): + copy(self, "COPYING.LESSER", self.source_folder, os.path.join(self.package_folder, "licenses")) + meson = Meson(self) + meson.install() + rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) + rmdir(self, os.path.join(self.package_folder, "share")) + rm(self, "*.pdb", os.path.join(self.package_folder, "lib")) + rm(self, "*.pdb", os.path.join(self.package_folder, "bin")) + fix_apple_shared_install_name(self) + + def package_info(self): + self.cpp_info.libs = ["openslide"] + self.cpp_info.includedirs.append(os.path.join("include", "openslide")) + + if self.settings.os == "Macos": + self.cpp_info.frameworks = ["CoreText"] + + self.cpp_info.requires = [ + "cairo::cairo_", + "gdk-pixbuf::gdk-pixbuf", + "glib::gio-2.0", + "glib::glib-2.0", + "glib::gobject-2.0", + "libdicom::libdicom", + "libpng::libpng", + "libtiff::libtiff", + "libxml2::libxml2", + "openjpeg::openjpeg", + "sqlite3::sqlite3", + "zlib::zlib", + ] + if self.options.jpeg == "libjpeg": + self.cpp_info.requires.append("libjpeg::libjpeg") + elif self.options.jpeg == "libjpeg-turbo": + self.cpp_info.requires.append("libjpeg-turbo::jpeg") + elif self.options.jpeg == "mozjpeg": + self.cpp_info.requires.append("mozjpeg::libjpeg") diff --git a/recipes/openslide/all/patches/0001-no-openslide-poison.patch b/recipes/openslide/all/patches/0001-no-openslide-poison.patch new file mode 100644 index 0000000000000..00a38642d6421 --- /dev/null +++ b/recipes/openslide/all/patches/0001-no-openslide-poison.patch @@ -0,0 +1,308 @@ +From 048865a3b61e9bc2b61219168d434b61e784d355 Mon Sep 17 00:00:00 2001 +From: Benjamin Gilbert +Date: Mon, 12 Feb 2024 20:44:45 +0900 +Subject: [PATCH] Replace _OPENSLIDE_POISON() with pre-commit check + +Preprocessor macros are somewhat clunky as a way to prevent use of +forbidden functions. Now that we have pre-commit checks, use those +instead. Allow forbidden function calls in wrapper implementations by +ignoring call sites with "ci-allow" in a comment on the same line. + +Signed-off-by: Benjamin Gilbert +--- + .pre-commit-config.yaml | 29 +++++++++++++++++++++++++++++ + src/openslide-decode-sqlite.c | 10 +++------- + src/openslide-decode-tiff.c | 8 ++------ + src/openslide-file.c | 20 +++++++------------- + src/openslide-jdatasrc.c | 2 +- + src/openslide-private.h | 27 --------------------------- + src/openslide-util.c | 4 +--- + src/openslide-vendor-synthetic.c | 7 +++---- + 8 files changed, 46 insertions(+), 61 deletions(-) + +diff --git a/src/openslide-decode-sqlite.c b/src/openslide-decode-sqlite.c +index f75083df5..119b71b5a 100644 +--- a/src/openslide-decode-sqlite.c ++++ b/src/openslide-decode-sqlite.c +@@ -44,7 +44,6 @@ static int profile_callback(unsigned trace_type G_GNUC_UNUSED, + return 0; + } + +-#undef sqlite3_open_v2 + static sqlite3 *do_open(const char *filename, int flags, GError **err) { + sqlite3 *db; + +@@ -55,7 +54,7 @@ static sqlite3 *do_open(const char *filename, int flags, GError **err) { + return NULL; + } + +- ret = sqlite3_open_v2(filename, &db, flags, NULL); ++ ret = sqlite3_open_v2(filename, &db, flags, NULL); // ci-allow + + if (ret) { + if (db) { +@@ -76,7 +75,6 @@ static sqlite3 *do_open(const char *filename, int flags, GError **err) { + + return db; + } +-#define sqlite3_open_v2 _OPENSLIDE_POISON(_openslide_sqlite_open) + + sqlite3 *_openslide_sqlite_open(const char *filename, GError **err) { + // ":" filename prefix is reserved. +@@ -131,12 +129,10 @@ void _openslide_sqlite_propagate_stmt_error(sqlite3_stmt *stmt, GError **err) { + _openslide_sqlite_propagate_error(sqlite3_db_handle(stmt), err); + } + +-#undef sqlite3_close + void _openslide_sqlite_close(sqlite3 *db) { +- // sqlite3_close() failures indicate a leaked resource, probably a ++ // sqlite3_close failures indicate a leaked resource, probably a + // prepared statement. +- if (sqlite3_close(db)) { ++ if (sqlite3_close(db)) { // ci-allow + g_warning("SQLite error: %s", sqlite3_errmsg(db)); + } + } +-#define sqlite3_close _OPENSLIDE_POISON(_openslide_sqlite_close) +diff --git a/src/openslide-decode-tiff.c b/src/openslide-decode-tiff.c +index 0af196479..ed294f18f 100644 +--- a/src/openslide-decode-tiff.c ++++ b/src/openslide-decode-tiff.c +@@ -74,7 +74,6 @@ struct associated_image { + result = tmp; \ + } while (0) + +-#undef TIFFSetDirectory + bool _openslide_tiff_set_dir(TIFF *tiff, + tdir_t dir, + GError **err) { +@@ -82,14 +81,13 @@ bool _openslide_tiff_set_dir(TIFF *tiff, + // avoid libtiff unnecessarily rereading directory contents + return true; + } +- if (!TIFFSetDirectory(tiff, dir)) { ++ if (!TIFFSetDirectory(tiff, dir)) { // ci-allow + g_set_error(err, OPENSLIDE_ERROR, OPENSLIDE_ERROR_FAILED, + "Cannot set TIFF directory %d", dir); + return false; + } + return true; + } +-#define TIFFSetDirectory _OPENSLIDE_POISON(_openslide_tiff_set_dir) + + bool _openslide_tiff_level_init(TIFF *tiff, + tdir_t dir, +@@ -587,7 +585,6 @@ static toff_t tiff_do_size(thandle_t th) { + return hdl->size; + } + +-#undef TIFFClientOpen + static TIFF *tiff_open(struct _openslide_tiffcache *tc, GError **err) { + // open + g_autoptr(_openslide_file) f = _openslide_fopen(tc->filename, err); +@@ -646,7 +643,7 @@ static TIFF *tiff_open(struct _openslide_tiffcache *tc, GError **err) { + + // TIFFOpen + // mode: m disables mmap to avoid sigbus and other mmap fragility +- TIFF *tiff = TIFFClientOpen(tc->filename, "rm", hdl, ++ TIFF *tiff = TIFFClientOpen(tc->filename, "rm", hdl, // ci-allow + tiff_do_read, tiff_do_write, tiff_do_seek, + tiff_do_close, tiff_do_size, NULL, NULL); + if (tiff == NULL) { +@@ -656,7 +653,6 @@ static TIFF *tiff_open(struct _openslide_tiffcache *tc, GError **err) { + } + return tiff; + } +-#define TIFFClientOpen _OPENSLIDE_POISON(_openslide_tiffcache_get) + + struct _openslide_tiffcache *_openslide_tiffcache_create(const char *filename) { + struct _openslide_tiffcache *tc = g_new0(struct _openslide_tiffcache, 1); +diff --git a/src/openslide-file.c b/src/openslide-file.c +index 2763f3807..9eb9b1039 100644 +--- a/src/openslide-file.c ++++ b/src/openslide-file.c +@@ -22,7 +22,6 @@ + + #include + +-#define NO_POISON_FSEEKO + #include "openslide-private.h" + + #include +@@ -44,13 +43,8 @@ struct _openslide_dir { + GDir *dir; + }; + +-#undef fopen +-#undef fread +-#undef fclose +-#undef g_file_test +- + static void wrap_fclose(FILE *fp) { +- fclose(fp); ++ fclose(fp); // ci-allow + } + G_DEFINE_AUTOPTR_CLEANUP_FUNC(FILE, wrap_fclose) + +@@ -87,7 +81,7 @@ static FILE *do_fopen(const char *path, const char *mode, GError **err) { + io_error(err, "Couldn't open %s", path); + } + #else +- f = fopen(path, mode); ++ f = fopen(path, mode); // ci-allow + if (f == NULL) { + io_error(err, "Couldn't open %s", path); + } +@@ -132,7 +126,7 @@ size_t _openslide_fread(struct _openslide_file *file, void *buf, size_t size) { + char *bufp = buf; + size_t total = 0; + while (total < size) { +- size_t count = fread(bufp + total, 1, size - total, file->fp); ++ size_t count = fread(bufp + total, 1, size - total, file->fp); // ci-allow + if (count == 0) { + return total; + } +@@ -143,7 +137,7 @@ size_t _openslide_fread(struct _openslide_file *file, void *buf, size_t size) { + + bool _openslide_fseek(struct _openslide_file *file, off_t offset, int whence, + GError **err) { +- if (fseeko(file->fp, offset, whence)) { ++ if (fseeko(file->fp, offset, whence)) { // ci-allow + g_set_error(err, G_FILE_ERROR, g_file_error_from_errno(errno), + "%s", g_strerror(errno)); + return false; +@@ -152,7 +146,7 @@ bool _openslide_fseek(struct _openslide_file *file, off_t offset, int whence, + } + + off_t _openslide_ftell(struct _openslide_file *file, GError **err) { +- off_t ret = ftello(file->fp); ++ off_t ret = ftello(file->fp); // ci-allow + if (ret == -1) { + g_set_error(err, G_FILE_ERROR, g_file_error_from_errno(errno), + "%s", g_strerror(errno)); +@@ -179,12 +173,12 @@ off_t _openslide_fsize(struct _openslide_file *file, GError **err) { + } + + void _openslide_fclose(struct _openslide_file *file) { +- fclose(file->fp); ++ fclose(file->fp); // ci-allow + g_free(file); + } + + bool _openslide_fexists(const char *path, GError **err G_GNUC_UNUSED) { +- return g_file_test(path, G_FILE_TEST_EXISTS); ++ return g_file_test(path, G_FILE_TEST_EXISTS); // ci-allow + } + + struct _openslide_dir *_openslide_dir_open(const char *dirname, GError **err) { +diff --git a/src/openslide-jdatasrc.c b/src/openslide-jdatasrc.c +index 2ad068818..4de54eddf 100644 +--- a/src/openslide-jdatasrc.c ++++ b/src/openslide-jdatasrc.c +@@ -158,7 +158,7 @@ static void skip_input_data (j_decompress_ptr cinfo, long num_bytes) + { + struct jpeg_source_mgr * src = cinfo->src; + +- /* Just a dumb implementation for now. Could use fseek() except ++ /* Just a dumb implementation for now. Could use fseek except + * it doesn't work on pipes. Not clear that being smart is worth + * any trouble anyway --- large skips are infrequent. + */ +diff --git a/src/openslide-private.h b/src/openslide-private.h +index 5ae36939b..ed08f5ed7 100644 +--- a/src/openslide-private.h ++++ b/src/openslide-private.h +@@ -383,33 +383,6 @@ extern const int32_t _openslide_G_Cb[256]; + extern const int32_t _openslide_G_Cr[256]; + extern const int16_t _openslide_B_Cb[256]; + +-/* Prevent use of dangerous functions and functions with mandatory wrappers. +- Every @p replacement must be unique to avoid conflicting-type errors. */ +-#define _OPENSLIDE_POISON(replacement) error__use_ ## replacement ## _instead +-#define fopen _OPENSLIDE_POISON(_openslide_fopen) +-#define fread _OPENSLIDE_POISON(_openslide_fread) +-#define fseek _OPENSLIDE_POISON(_openslide_fseek) +-#define ftell _OPENSLIDE_POISON(_openslide_ftell) +-#define fclose _OPENSLIDE_POISON(_openslide_fclose) +-#define g_file_test _OPENSLIDE_POISON(_openslide_fexists) +-#define strtod _OPENSLIDE_POISON(_openslide_parse_double) +-#define g_ascii_strtod _OPENSLIDE_POISON(_openslide_parse_double_) +-#define sqlite3_open _OPENSLIDE_POISON(_openslide_sqlite_open) +-#define sqlite3_open_v2 _OPENSLIDE_POISON(_openslide_sqlite_open_) +-#define sqlite3_close _OPENSLIDE_POISON(_openslide_sqlite_close) +-#define TIFFClientOpen _OPENSLIDE_POISON(_openslide_tiffcache_get) +-#define TIFFFdOpen _OPENSLIDE_POISON(_openslide_tiffcache_get_) +-#define TIFFOpen _OPENSLIDE_POISON(_openslide_tiffcache_get__) +-#define TIFFSetDirectory _OPENSLIDE_POISON(_openslide_tiff_set_dir) +- +-#ifndef NO_POISON_FSEEKO +-// openslide-file.c needs the original macros +-#undef fseeko +-#undef ftello +-#define fseeko _OPENSLIDE_POISON(_openslide_fseek_) +-#define ftello _OPENSLIDE_POISON(_openslide_ftell_) +-#endif +- + #ifdef _WIN32 + // Prevent windows.h from defining the IN/OUT macro + #define _NO_W32_PSEUDO_MODIFIERS +diff --git a/src/openslide-util.c b/src/openslide-util.c +index 719953274..b85f9afa3 100644 +--- a/src/openslide-util.c ++++ b/src/openslide-util.c +@@ -170,7 +170,6 @@ void *_openslide_inflate_buffer(const void *src, int64_t src_len, + return g_steal_pointer(&dst); + } + +-#undef g_ascii_strtod + double _openslide_parse_double(const char *value) { + // Canonicalize comma to decimal point, since the locale of the + // originating system sometimes leaks into slide files. +@@ -180,14 +179,13 @@ double _openslide_parse_double(const char *value) { + + char *endptr; + errno = 0; +- double result = g_ascii_strtod(canonical, &endptr); ++ double result = g_ascii_strtod(canonical, &endptr); // ci-allow + // fail on overflow/underflow + if (canonical[0] == 0 || endptr[0] != 0 || errno == ERANGE) { + return NAN; + } + return result; + } +-#define g_ascii_strtod _OPENSLIDE_POISON(_openslide_parse_double) + + char *_openslide_format_double(double d) { + char buf[G_ASCII_DTOSTR_BUF_SIZE]; +diff --git a/src/openslide-vendor-synthetic.c b/src/openslide-vendor-synthetic.c +index e3a440569..79938a597 100644 +--- a/src/openslide-vendor-synthetic.c ++++ b/src/openslide-vendor-synthetic.c +@@ -204,7 +204,6 @@ static toff_t mem_tiff_size(thandle_t th) { + return mem->size; + } + +-#undef TIFFClientOpen + static bool decode_tiff(const void *data, uint32_t len, + uint32_t *dest, GError **err) { + // there's no reason for OpenSlide as a whole to support reading entire +@@ -216,8 +215,9 @@ static bool decode_tiff(const void *data, uint32_t len, + }; + // mode: m disables mmap to avoid sigbus and other mmap fragility + g_autoptr(TIFF) tiff = +- TIFFClientOpen("tiff", "rm", &mem, mem_tiff_read, mem_tiff_write, +- mem_tiff_seek, mem_tiff_close, mem_tiff_size, NULL, NULL); ++ TIFFClientOpen("tiff", "rm", &mem, mem_tiff_read, // ci-allow ++ mem_tiff_write, mem_tiff_seek, mem_tiff_close, ++ mem_tiff_size, NULL, NULL); + if (tiff == NULL) { + g_set_error(err, OPENSLIDE_ERROR, OPENSLIDE_ERROR_FAILED, + "Couldn't open TIFF"); +@@ -238,7 +238,6 @@ static bool decode_tiff(const void *data, uint32_t len, + + return _openslide_tiff_read_tile(&tiffl, tiff, dest, 0, 0, err); + } +-#define TIFFClientOpen _OPENSLIDE_POISON(_openslide_tiffcache_get) + + static bool decode_xml(const void *data, uint32_t len, + uint32_t *dest, GError **err) { diff --git a/recipes/openslide/all/test_package/conanfile.py b/recipes/openslide/all/test_package/conanfile.py new file mode 100644 index 0000000000000..2e3df45816e5a --- /dev/null +++ b/recipes/openslide/all/test_package/conanfile.py @@ -0,0 +1,32 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.layout import basic_layout +from conan.tools.meson import Meson +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "PkgConfigDeps", "MesonToolchain", "VirtualRunEnv", "VirtualBuildEnv" + test_type = "explicit" + + def layout(self): + basic_layout(self) + + def requirements(self): + self.requires(self.tested_reference_str) + + def build_requirements(self): + self.tool_requires("meson/1.2.3") + if not self.conf.get("tools.gnu:pkg_config", default=False, check_type=str): + self.tool_requires("pkgconf/2.0.3") + + def build(self): + meson = Meson(self) + meson.configure() + meson.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/openslide/all/test_package/meson.build b/recipes/openslide/all/test_package/meson.build new file mode 100644 index 0000000000000..b22a34bfa7460 --- /dev/null +++ b/recipes/openslide/all/test_package/meson.build @@ -0,0 +1,5 @@ +project('test_package', 'c') +package_dep = dependency('openslide') +executable('test_package', + sources : ['test_package.c'], + dependencies : [package_dep]) diff --git a/recipes/openslide/all/test_package/test_package.c b/recipes/openslide/all/test_package/test_package.c new file mode 100644 index 0000000000000..ea806b718030d --- /dev/null +++ b/recipes/openslide/all/test_package/test_package.c @@ -0,0 +1,7 @@ +#include +#include + +int main() { + printf("OpenSlide version: %s\n", openslide_get_version()); + return 0; +} diff --git a/recipes/openslide/config.yml b/recipes/openslide/config.yml new file mode 100644 index 0000000000000..d2be8f453d7c0 --- /dev/null +++ b/recipes/openslide/config.yml @@ -0,0 +1,3 @@ +versions: + "4.0.0": + folder: all diff --git a/recipes/openssh/all/conandata.yml b/recipes/openssh/all/conandata.yml index e3ccaa5b6d5e6..a3e0ea1fc2e6b 100644 --- a/recipes/openssh/all/conandata.yml +++ b/recipes/openssh/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "9.9p1": + url: "https://cdn.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-9.9p1.tar.gz" + sha256: "b343fbcdbff87f15b1986e6e15d6d4fc9a7d36066be6b7fb507087ba8f966c02" "9.6p1": url: "https://cdn.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-9.6p1.tar.gz" sha256: "910211c07255a8c5ad654391b40ee59800710dd8119dd5362de09385aa7a777c" diff --git a/recipes/openssh/all/conanfile.py b/recipes/openssh/all/conanfile.py index 19003f0d0b8c0..193d5c2993c51 100644 --- a/recipes/openssh/all/conanfile.py +++ b/recipes/openssh/all/conanfile.py @@ -4,7 +4,7 @@ from conan.errors import ConanInvalidConfiguration from conan.tools.build import cross_building from conan.tools.env import VirtualBuildEnv, VirtualRunEnv -from conan.tools.files import copy, get, rmdir, export_conandata_patches +from conan.tools.files import copy, get, replace_in_file, rmdir, export_conandata_patches from conan.tools.gnu import Autotools, AutotoolsToolchain, AutotoolsDeps from conan.tools.layout import basic_layout @@ -25,6 +25,7 @@ class PackageConan(ConanFile): "with_pam": [False, "openpam"], # linux-pam and Solaris PAM are also supported "with_selinux": [True, False], "with_libedit": [True, False], + "with_strip": [True, False], "with_sandbox": [False, "auto", "capsicum", "darwin", "rlimit", "seccomp_filter", "systrace", "pledge"] } default_options = { @@ -32,6 +33,7 @@ class PackageConan(ConanFile): "with_pam": False, "with_selinux": False, "with_libedit": False, + "with_strip": True, "with_sandbox": "auto" } @@ -52,7 +54,7 @@ def layout(self): def requirements(self): self.requires("zlib/[>=1.2.11 <2]") if self.options.with_libcrypto == "openssl": - self.requires("openssl/[>=1.1 <=3.1]") + self.requires("openssl/[>=1.1 <4]") elif self.options.with_libcrypto == "libressl": self.requires("libressl/3.9.1") if self.options.with_pam == "openpam": @@ -66,6 +68,10 @@ def validate(self): def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) + if self.version in ["9.1p1", "9.6p1"]: + # Backport configure script fix to accept OpenSSL versions in the 3.x series + # See https://github.com/openssh/openssh-portable/commit/2eded551ba96e66bc3afbbcc883812c2eac02bd7 + replace_in_file(self, join(self.source_folder, "configure"), "300*", "30*") def generate(self): env = VirtualBuildEnv(self) @@ -77,6 +83,9 @@ def generate(self): tc = AutotoolsToolchain(self) tc.configure_args.append("--without-zlib-version-check") + if not self.options.with_strip: + tc.configure_args.append("--disable-strip") + if self.options.with_selinux: tc.configure_args.append("--with-selinux") diff --git a/recipes/openssh/config.yml b/recipes/openssh/config.yml index a033c3a0343f3..4bf3079108d3e 100644 --- a/recipes/openssh/config.yml +++ b/recipes/openssh/config.yml @@ -1,4 +1,6 @@ versions: + "9.9p1": + folder: all "9.6p1": folder: all "9.1p1": diff --git a/recipes/openssl/1.x.x/conandata.yml b/recipes/openssl/1.x.x/conandata.yml index 22aae5e08d56c..26bc447884d03 100644 --- a/recipes/openssl/1.x.x/conandata.yml +++ b/recipes/openssl/1.x.x/conandata.yml @@ -1,10 +1,7 @@ sources: 1.1.1w: sha256: cf3098950cb4d853ad95c0841f1f9c6d3dc102dccfcacd521d93925208b76ac8 - url: - - "https://www.openssl.org/source/openssl-1.1.1w.tar.gz" - - "https://www.openssl.org/source/old/1.1.1/openssl-1.1.1w.tar.gz" - - "https://github.com/openssl/openssl/releases/download/OpenSSL_1_1_1w/openssl-1.1.1w.tar.gz" + url: "https://github.com/openssl/openssl/releases/download/OpenSSL_1_1_1w/openssl-1.1.1w.tar.gz" patches: 1.1.1w: - patch_file: patches/1.1.1-tvos-watchos.patch diff --git a/recipes/openssl/1.x.x/conanfile.py b/recipes/openssl/1.x.x/conanfile.py index 55815e5161b53..424f65ac487e9 100644 --- a/recipes/openssl/1.x.x/conanfile.py +++ b/recipes/openssl/1.x.x/conanfile.py @@ -5,7 +5,7 @@ from conan.tools.env import Environment, VirtualBuildEnv from conan.tools.files import ( apply_conandata_patches, chdir, copy, export_conandata_patches, - get, load, rename, replace_in_file, rm, rmdir, save + get, load, replace_in_file, rm, rmdir, save ) from conan.tools.gnu import Autotools, AutotoolsToolchain, AutotoolsDeps from conan.tools.layout import basic_layout @@ -144,7 +144,7 @@ def validate(self): def build_requirements(self): if self._settings_build.os == "Windows": if not self.options.no_asm: - self.tool_requires("nasm/2.15.05") + self.tool_requires("nasm/2.16.01") if self._use_nmake: self.tool_requires("strawberryperl/5.32.1.1") else: diff --git a/recipes/openssl/3.x.x/conandata.yml b/recipes/openssl/3.x.x/conandata.yml index f693517720dd4..10986e398a3f8 100644 --- a/recipes/openssl/3.x.x/conandata.yml +++ b/recipes/openssl/3.x.x/conandata.yml @@ -1,42 +1,34 @@ sources: + 3.3.2: + url: "https://github.com/openssl/openssl/releases/download/openssl-3.3.2/openssl-3.3.2.tar.gz" + sha256: 2e8a40b01979afe8be0bbfb3de5dc1c6709fedb46d6c89c10da114ab5fc3d281 + 3.3.1: + url: "https://github.com/openssl/openssl/releases/download/openssl-3.3.1/openssl-3.3.1.tar.gz" + sha256: 777cd596284c883375a2a7a11bf5d2786fc5413255efab20c50d6ffe6d020b7e + 3.2.3: + url: "https://github.com/openssl/openssl/releases/download/openssl-3.2.3/openssl-3.2.3.tar.gz" + sha256: 52b5f1c6b8022bc5868c308c54fb77705e702d6c6f4594f99a0df216acf46239 + 3.2.2: + url: "https://github.com/openssl/openssl/releases/download/openssl-3.2.2/openssl-3.2.2.tar.gz" + sha256: 197149c18d9e9f292c43f0400acaba12e5f52cacfe050f3d199277ea738ec2e7 3.2.1: - url: - - "https://www.openssl.org/source/openssl-3.2.1.tar.gz" - - "https://github.com/openssl/openssl/releases/download/openssl-3.2.1/openssl-3.2.1.tar.gz" + url: "https://github.com/openssl/openssl/releases/download/openssl-3.2.1/openssl-3.2.1.tar.gz" sha256: 83c7329fe52c850677d75e5d0b0ca245309b97e8ecbcfdc1dfdc4ab9fac35b39 - 3.2.0: - url: - - "https://www.openssl.org/source/openssl-3.2.0.tar.gz" - - "https://github.com/openssl/openssl/releases/download/openssl-3.2.0/openssl-3.2.0.tar.gz" - sha256: 14c826f07c7e433706fb5c69fa9e25dab95684844b4c962a2cf1bf183eb4690e + 3.1.7: + url: "https://github.com/openssl/openssl/releases/download/openssl-3.1.7/openssl-3.1.7.tar.gz" + sha256: 053a31fa80cf4aebe1068c987d2ef1e44ce418881427c4464751ae800c31d06c + 3.1.6: + url: "https://github.com/openssl/openssl/releases/download/openssl-3.1.6/openssl-3.1.6.tar.gz" + sha256: 5d2be4036b478ef3cb0a854ca9b353072c3a0e26d8a56f8f0ab9fb6ed32d38d7 3.1.5: - url: - - "https://www.openssl.org/source/openssl-3.1.5.tar.gz" - - "https://github.com/openssl/openssl/releases/download/openssl-3.1.5/openssl-3.1.5.tar.gz" + url: "https://github.com/openssl/openssl/releases/download/openssl-3.1.5/openssl-3.1.5.tar.gz" sha256: 6ae015467dabf0469b139ada93319327be24b98251ffaeceda0221848dc09262 - 3.1.4: - url: - - "https://www.openssl.org/source/openssl-3.1.4.tar.gz" - - "https://github.com/openssl/openssl/releases/download/openssl-3.1.4/openssl-3.1.4.tar.gz" - sha256: 840af5366ab9b522bde525826be3ef0fb0af81c6a9ebd84caa600fea1731eee3 - 3.1.3: - url: - - "https://www.openssl.org/source/openssl-3.1.3.tar.gz" - - "https://github.com/openssl/openssl/releases/download/openssl-3.1.3/openssl-3.1.3.tar.gz" - sha256: f0316a2ebd89e7f2352976445458689f80302093788c466692fb2a188b2eacf6 + 3.0.15: + url: "https://github.com/openssl/openssl/releases/download/openssl-3.0.15/openssl-3.0.15.tar.gz" + sha256: 23c666d0edf20f14249b3d8f0368acaee9ab585b09e1de82107c66e1f3ec9533 + 3.0.14: + url: "https://github.com/openssl/openssl/releases/download/openssl-3.0.14/openssl-3.0.14.tar.gz" + sha256: eeca035d4dd4e84fc25846d952da6297484afa0650a6f84c682e39df3a4123ca 3.0.13: - url: - - "https://www.openssl.org/source/openssl-3.0.13.tar.gz" - - "https://github.com/openssl/openssl/releases/download/openssl-3.0.13/openssl-3.0.13.tar.gz" + url: "https://github.com/openssl/openssl/releases/download/openssl-3.0.13/openssl-3.0.13.tar.gz" sha256: 88525753f79d3bec27d2fa7c66aa0b92b3aa9498dafd93d7cfa4b3780cdae313 - 3.0.12: - url: - - "https://www.openssl.org/source/openssl-3.0.12.tar.gz" - - "https://github.com/openssl/openssl/releases/download/openssl-3.0.12/openssl-3.0.12.tar.gz" - sha256: f93c9e8edde5e9166119de31755fc87b4aa34863662f67ddfcba14d0b6b69b61 -patches: - 3.2.0: - - patch_file: "patches/3.2.0-fix-winsock2.patch" - patch_description: "Only include winsock2.h for struct timeval if needed" - patch_type: "bugfix" - patch_source: "https://github.com/openssl/openssl/commit/ba58e9f1e22dd9ee2e37078640dcbe9f520a555d" diff --git a/recipes/openssl/3.x.x/conanfile.py b/recipes/openssl/3.x.x/conanfile.py index c858b3551b71d..711e03e2c27a9 100644 --- a/recipes/openssl/3.x.x/conanfile.py +++ b/recipes/openssl/3.x.x/conanfile.py @@ -2,7 +2,7 @@ from conan.errors import ConanInvalidConfiguration from conan.tools.apple import fix_apple_shared_install_name, is_apple_os, XCRun from conan.tools.build import build_jobs -from conan.tools.files import apply_conandata_patches, chdir, copy, export_conandata_patches, get, rename, replace_in_file, rmdir, save +from conan.tools.files import chdir, copy, get, replace_in_file, rm, rmdir, save from conan.tools.gnu import AutotoolsToolchain from conan.tools.layout import basic_layout from conan.tools.microsoft import is_msvc, msvc_runtime_flag, unix_path @@ -131,9 +131,6 @@ def configure(self): self.settings.rm_safe("compiler.libcxx") self.settings.rm_safe("compiler.cppstd") - def export_sources(self): - export_conandata_patches(self) - def layout(self): basic_layout(self, src_folder="src") @@ -152,7 +149,7 @@ def validate(self): def build_requirements(self): if self._settings_build.os == "Windows": if not self.options.no_asm: - self.tool_requires("nasm/2.15.05") + self.tool_requires("nasm/2.16.01") if self._use_nmake: self.tool_requires("strawberryperl/5.32.1.1") else: @@ -358,20 +355,20 @@ def _configure_args(self): openssldir = self.options.openssldir or self._get_default_openssl_dir() openssldir = unix_path(self, openssldir) if self.win_bash else openssldir args = [ - '"%s"' % (self._target), + f'"{self._target}"', "shared" if self.options.shared else "no-shared", + "--debug" if self.settings.build_type == "Debug" else "--release", "--prefix=/", "--libdir=lib", - "--openssldir=\"%s\"" % openssldir, - "no-unit-test", + f"--openssldir=\"{openssldir}\"", "no-threads" if self.options.no_threads else "threads", - "PERL=%s" % self._perl, + f"PERL={self._perl}", + "no-unit-test", "no-tests", - "--debug" if self.settings.build_type == "Debug" else "--release", ] if self.settings.os == "Android": - args.append(" -D__ANDROID_API__=%s" % str(self.settings.os.api_level)) # see NOTES.ANDROID + args.append(f" -D__ANDROID_API__={str(self.settings.os.api_level)}") # see NOTES.ANDROID if self.settings.os == "Emscripten": args.append("-D__STDC_NO_ATOMICS__=1") if self.settings.os == "Windows": @@ -449,22 +446,22 @@ def _create_targets(self, cflags, cxxflags, defines, ldflags): perlasm_scheme = "" if self._perlasm_scheme: - perlasm_scheme = 'perlasm_scheme => "%s",' % self._perlasm_scheme + perlasm_scheme = f'perlasm_scheme => "{self._perlasm_scheme}",' defines = '", "'.join(defines) defines = 'defines => add("%s"),' % defines if defines else "" targets = "my %targets" if self._asm_target: - ancestor = '[ "%s", asm("%s") ]' % (self._ancestor_target, self._asm_target) + ancestor = f'[ "{self._ancestor_target}", asm("{self._asm_target}") ]' else: - ancestor = '[ "%s" ]' % self._ancestor_target + ancestor = f'[ "{self._ancestor_target}" ]' shared_cflag = "" shared_extension = "" shared_target = "" if self.settings.os == "Neutrino": if self.options.shared: - shared_extension = 'shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)",' + shared_extension = r'shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)",' shared_target = 'shared_target => "gnu-shared",' if self.options.get_safe("fPIC", True): shared_cflag = 'shared_cflag => "-fPIC",' @@ -486,7 +483,7 @@ def _create_targets(self, cflags, cxxflags, defines, ldflags): shared_cflag=shared_cflag, lflags=" ".join(ldflags) ) - self.output.info("using target: %s -> %s" % (self._target, self._ancestor_target)) + self.output.info(f"using target: {self._target} -> {self._ancestor_target}") self.output.info(config) save(self, os.path.join(self.source_folder, "Configurations", "20-conan.conf"), config) @@ -498,7 +495,7 @@ def _run_make(self, targets=None, parallel=True, install=False): if targets: command.extend(targets) if not self._use_nmake: - command.append(("-j%s" % build_jobs(self)) if parallel else "-j1") + command.append(f"-j{build_jobs(self)}" if parallel else "-j1") self.run(" ".join(command), env="conanbuild") @property @@ -509,19 +506,24 @@ def _perl(self): def _make(self): with chdir(self, self.source_folder): - # workaround for clang-cl not producing .pdb files - if self._is_clang_cl: - save(self, "ossl_static.pdb", "") args = " ".join(self._configure_args) if self._use_nmake: self._replace_runtime_in_file(os.path.join("Configurations", "10-main.conf")) - self.run("{perl} ./Configure {args}".format(perl=self._perl, args=args), env="conanbuild") + self.run(f"{self._perl} ./Configure {args}", env="conanbuild") if self._use_nmake: # When `--prefix=/`, the scripts derive `\` without escaping, which # causes issues on Windows replace_in_file(self, "Makefile", "INSTALLTOP_dir=\\", "INSTALLTOP_dir=\\\\") + if Version(self.version) >= "3.3.0": + # replace backslashes in paths with forward slashes + mkinstallvars_pl = os.path.join(self.source_folder, "util", "mkinstallvars.pl") + if Version(self.version) >= "3.3.2": + replace_in_file(self, mkinstallvars_pl, "push @{$values{$k}}, $v;", """$v =~ s|\\\\|/|g; push @{$values{$k}}, $v;""") + replace_in_file(self, mkinstallvars_pl, "$values{$k} = $v;", """$v->[0] =~ s|\\\\|/|g; $values{$k} = $v;""") + else: + replace_in_file(self, mkinstallvars_pl, "$ENV{$k} = $v;", """$v =~ s|\\\\|/|g; $ENV{$k} = $v;""") self._run_make() def _make_install(self): @@ -529,7 +531,6 @@ def _make_install(self): self._run_make(targets=["install_sw"], parallel=False, install=True) def build(self): - apply_conandata_patches(self) self._make() configdata_pm = self._adjust_path(os.path.join(self.source_folder, "configdata.pm")) self.run(f"{self._perl} {configdata_pm} --dump") @@ -550,10 +551,7 @@ def package(self): if is_apple_os(self): fix_apple_shared_install_name(self) - for root, _, files in os.walk(self.package_folder): - for filename in files: - if fnmatch.fnmatch(filename, "*.pdb"): - os.unlink(os.path.join(self.package_folder, root, filename)) + rm(self, "*.pdb", self.package_folder, "lib") if self.options.shared: libdir = os.path.join(self.package_folder, "lib") for file in os.listdir(libdir): @@ -573,6 +571,7 @@ def package(self): copy(self, "fips.so", src=provdir, dst=modules_dir) rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) + rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) self._create_cmake_module_variables( os.path.join(self.package_folder, self._module_file_rel_path) @@ -626,7 +625,7 @@ def _module_subfolder(self): @property def _module_file_rel_path(self): return os.path.join(self._module_subfolder, - "conan-official-{}-variables.cmake".format(self.name)) + f"conan-official-{self.name}-variables.cmake") def package_info(self): self.cpp_info.set_property("cmake_file_name", "OpenSSL") diff --git a/recipes/openssl/3.x.x/patches/3.2.0-fix-winsock2.patch b/recipes/openssl/3.x.x/patches/3.2.0-fix-winsock2.patch deleted file mode 100644 index 6e91678b02dd7..0000000000000 --- a/recipes/openssl/3.x.x/patches/3.2.0-fix-winsock2.patch +++ /dev/null @@ -1,36 +0,0 @@ -From ba58e9f1e22dd9ee2e37078640dcbe9f520a555d Mon Sep 17 00:00:00 2001 -From: Hugo Landau -Date: Fri, 24 Nov 2023 10:03:30 +0000 -Subject: [PATCH] Only include winsock2.h for struct timeval if needed - -Fixes #22811 - -Reviewed-by: Tomas Mraz -Reviewed-by: Matt Caswell -Reviewed-by: Matthias St. Pierre -(Merged from https://github.com/openssl/openssl/pull/22813) ---- - include/openssl/e_ostime.h | 10 +++++++++- - 1 file changed, 9 insertions(+), 1 deletion(-) - -diff --git a/include/openssl/e_ostime.h b/include/openssl/e_ostime.h -index 8a7cc9880fa79..0e17487504992 100644 ---- a/include/openssl/e_ostime.h -+++ b/include/openssl/e_ostime.h -@@ -22,7 +22,15 @@ - */ - - # if defined(OPENSSL_SYS_WINDOWS) --# include -+# if !defined(_WINSOCKAPI_) -+ /* -+ * winsock2.h defines _WINSOCK2API_ and both winsock2.h and winsock.h define -+ * _WINSOCKAPI_. Both of these provide struct timeval. Don't include -+ * winsock2.h if either header has been included to avoid breakage with -+ * applications that prefer to use over . -+ */ -+# include -+# endif - # else - # include - # endif diff --git a/recipes/openssl/config.yml b/recipes/openssl/config.yml index 25589dc6caa23..9ada8cd7b7467 100644 --- a/recipes/openssl/config.yml +++ b/recipes/openssl/config.yml @@ -1,21 +1,25 @@ versions: - # 3.2.x releases - 3.2.1: + "3.3.2": folder: "3.x.x" - 3.2.0: + "3.3.1": folder: "3.x.x" - # 3.1.x releases - 3.1.5: + "3.2.3": folder: "3.x.x" - 3.1.4: + "3.2.2": folder: "3.x.x" - 3.1.3: + "3.2.1": folder: "3.x.x" - # 3.0.x releases - 3.0.13: + "3.1.7": folder: "3.x.x" - 3.0.12: + "3.1.6": folder: "3.x.x" - # 1.1.1x releases - 1.1.1w: + "3.1.5": + folder: "3.x.x" + "3.0.15": + folder: "3.x.x" + "3.0.14": + folder: "3.x.x" + "3.0.13": + folder: "3.x.x" + "1.1.1w": folder: "1.x.x" diff --git a/recipes/opentelemetry-cpp/all/conandata.yml b/recipes/opentelemetry-cpp/all/conandata.yml index f30d3731760b0..ce31f611ba274 100644 --- a/recipes/opentelemetry-cpp/all/conandata.yml +++ b/recipes/opentelemetry-cpp/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.14.2": + url: "https://github.com/open-telemetry/opentelemetry-cpp/archive/v1.14.2.tar.gz" + sha256: "c7e7801c9f6228751cdb9dd4724d0f04777ed53f524c8828e73bf4c9f894e0bd" "1.12.0": url: "https://github.com/open-telemetry/opentelemetry-cpp/archive/v1.12.0.tar.gz" sha256: "09c208a21fb1159d114a3ea15dc1bcc5dee28eb39907ba72a6012d2c7b7564a0" diff --git a/recipes/opentelemetry-cpp/all/conanfile.py b/recipes/opentelemetry-cpp/all/conanfile.py index f96b644388da0..f6be87c9ab207 100644 --- a/recipes/opentelemetry-cpp/all/conanfile.py +++ b/recipes/opentelemetry-cpp/all/conanfile.py @@ -46,11 +46,12 @@ class OpenTelemetryCppConan(ConanFile): "shared": False, "with_no_deprecated_code": False, + # Enabling this causes stack overflow in the test_package "with_stl": False, "with_gsl": False, "with_abseil": True, "with_otlp": "deprecated", - "with_otlp_grpc": True, + "with_otlp_grpc": False, "with_otlp_http": True, "with_zipkin": True, "with_prometheus": False, @@ -90,8 +91,11 @@ def _compilers_minimum_version(self): def config_options(self): if self.settings.os == "Windows": self.options.rm_safe("fPIC") + del self.options.with_etw if Version(self.version) >= "1.10": del self.options.with_jaeger + if Version(self.version) >= "1.11": + del self.options.with_logs_preview def configure(self): if self.options.shared: @@ -103,21 +107,41 @@ def configure(self): def layout(self): cmake_layout(self, src_folder="src") + def _supports_new_proto_grpc_abseil(self): + """Old versions do not support the new proto grpc abseil combo + (Usage of old imports etc) + This is technically only for protobuf, but we take care to + keep abseil range in line, and grpc dependencies in sync so no + conflicts arise if using any of the 3 elsewhere + """ + return Version(self.version) >= "1.12.0" + def requirements(self): if self.options.with_gsl: self.requires("ms-gsl/4.0.0") if self.options.with_abseil: - self.requires("abseil/20230125.3", transitive_headers=True) + if self._supports_new_proto_grpc_abseil(): + self.requires("abseil/[>=20240116.1 <20240117.0]", transitive_headers=True) + else: + self.requires("abseil/[>=20230125.3 <=20230802.1]", transitive_headers=True) + + if self.options.with_otlp_grpc or self.options.with_otlp_http: + if self._supports_new_proto_grpc_abseil(): + self.requires("protobuf/5.27.0", transitive_headers=True, transitive_libs=True) + else: + self.requires("protobuf/3.21.12", transitive_headers=True, transitive_libs=True) if self.options.with_otlp_grpc: - self.requires("protobuf/3.21.12", transitive_headers=True, transitive_libs=True) - self.requires("grpc/1.54.3", transitive_headers=True, transitive_libs=True) + if self._supports_new_proto_grpc_abseil(): + self.requires("grpc/1.67.1", transitive_headers=True, transitive_libs=True) + else: + self.requires("grpc/1.54.3", transitive_headers=True, transitive_libs=True) if (self.options.with_zipkin or self.options.with_elasticsearch or self.options.with_otlp_http or - self.options.with_etw + self.options.get_safe("with_etw") ): self.requires("nlohmann_json/3.11.3") self.requires("openssl/[>=1.1 <4]") @@ -133,7 +157,7 @@ def requirements(self): if self.options.get_safe("with_jaeger"): self.requires("thrift/0.17.0") - self.requires("boost/1.84.0") + self.requires("boost/1.85.0") @property def _required_boost_components(self): @@ -170,9 +194,11 @@ def validate(self): raise ConanInvalidConfiguration("opentelemetry-cpp >= 1.12.0 does not support Apple Clang on Conan v1") def build_requirements(self): - if self.options.with_otlp_grpc: - self.tool_requires("opentelemetry-proto/1.0.0") + if self.options.with_otlp_grpc or self.options.with_otlp_http: + self.tool_requires("opentelemetry-proto/1.3.0") self.tool_requires("protobuf/") + + if self.options.with_otlp_grpc: self.tool_requires("grpc/") def _create_cmake_module_variables(self, module_file): @@ -193,6 +219,20 @@ def package_id(self): def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) + @property + def _stl_value(self): + # From 1.12.0 onwards, the STL can have various values + if Version(self.version) < "1.12.1": + return self.options.with_stl + if self.options.with_stl: + if self.settings.compiler.cppstd: + return "CXX" + str(self.settings.compiler.cppstd).replace("gnu", "") + else: + # ON for autodetection in upstream CML + return True + else: + return False + def generate(self): VirtualBuildEnv(self).generate(scope="build") VirtualRunEnv(self).generate(scope="build") @@ -202,21 +242,26 @@ def generate(self): tc.cache_variables["BUILD_BENCHMARK"] = False tc.cache_variables["WITH_EXAMPLES"] = False tc.cache_variables["WITH_NO_DEPRECATED_CODE"] = self.options.with_no_deprecated_code - tc.cache_variables["WITH_STL"] = self.options.with_stl + tc.cache_variables["WITH_STL"] = self._stl_value tc.cache_variables["WITH_GSL"] = self.options.with_gsl tc.cache_variables["WITH_ABSEIL"] = self.options.with_abseil if Version(self.version) < "1.10": tc.cache_variables["WITH_OTLP"] = self.options.with_otlp_grpc or self.options.with_otlp_http tc.cache_variables["WITH_OTLP_GRPC"] = self.options.with_otlp_grpc tc.cache_variables["WITH_OTLP_HTTP"] = self.options.with_otlp_http + if self.options.with_otlp_grpc or self.options.with_otlp_http: + tc.cache_variables["OTELCPP_PROTO_PATH"] = self.dependencies.build["opentelemetry-proto"].conf_info.get("user.opentelemetry-proto:proto_root").replace("\\", "/") tc.cache_variables["WITH_ZIPKIN"] = self.options.with_zipkin tc.cache_variables["WITH_PROMETHEUS"] = self.options.with_prometheus tc.cache_variables["WITH_ELASTICSEARCH"] = self.options.with_elasticsearch tc.cache_variables["WITH_ZPAGES"] = self.options.with_zpages tc.cache_variables["WITH_JAEGER"] = self.options.get_safe("with_jaeger", False) tc.cache_variables["WITH_NO_GETENV"] = self.options.with_no_getenv - tc.cache_variables["WITH_ETW"] = self.options.with_etw - tc.cache_variables["WITH_LOGS_PREVIEW"] = self.options.with_logs_preview + if self.options.get_safe("with_etw"): + # CMakeLists checks for definition, not value + tc.cache_variables["WITH_ETW"] = True + if Version(self.version) < "1.11": + tc.cache_variables["WITH_LOGS_PREVIEW"] = self.options.with_logs_preview tc.cache_variables["WITH_ASYNC_EXPORT_PREVIEW"] = self.options.with_async_export_preview tc.cache_variables["WITH_METRICS_EXEMPLAR_PREVIEW"] = self.options.with_metrics_exemplar_preview tc.cache_variables["OPENTELEMETRY_INSTALL"] = True @@ -286,6 +331,7 @@ def _otel_libraries(self): "opentelemetry_trace", "opentelemetry_version", ] + if self.options.with_otlp_http or self.options.with_elasticsearch or self.options.get_safe("with_jaeger") or self.options.with_zipkin: # https://github.com/open-telemetry/opentelemetry-cpp/blob/v1.12.0/CMakeLists.txt#L452-L460 libraries.append(self._http_client_name) @@ -298,17 +344,19 @@ def _otel_libraries(self): libraries.append("opentelemetry_exporter_otlp_grpc") libraries.append("opentelemetry_exporter_otlp_grpc_metrics") libraries.append("opentelemetry_exporter_otlp_grpc_client") - if self.options.with_logs_preview: + if Version(self.version) >= "1.9.1": + libraries.append("opentelemetry_proto_grpc") + if Version(self.version) >= "1.11" or self.options.with_logs_preview: libraries.append("opentelemetry_exporter_otlp_grpc_log") if self.options.with_otlp_http: libraries.append("opentelemetry_exporter_otlp_http") libraries.append("opentelemetry_exporter_otlp_http_client") libraries.append("opentelemetry_exporter_otlp_http_metric") - if self.options.with_logs_preview: + if Version(self.version) >= "1.11" or self.options.with_logs_preview: libraries.append("opentelemetry_exporter_otlp_http_log") if self.options.with_prometheus: libraries.append("opentelemetry_exporter_prometheus") - if self.options.with_elasticsearch and self.options.with_logs_preview: + if self.options.with_elasticsearch and (Version(self.version) >= "1.11" or self.options.with_logs_preview): libraries.append("opentelemetry_exporter_elasticsearch_logs") if self.options.with_zipkin: libraries.append("opentelemetry_exporter_zipkin_trace") @@ -316,12 +364,12 @@ def _otel_libraries(self): libraries.append("opentelemetry_exporter_jaeger_trace") libraries.append("opentelemetry_metrics") libraries.append("opentelemetry_exporter_ostream_metrics") - if self.options.with_logs_preview: + if Version(self.version) >= "1.11" or self.options.with_logs_preview: libraries.extend([ "opentelemetry_logs", "opentelemetry_exporter_ostream_logs", ]) - if self.settings.os == "Windows" and self.options.with_etw: + if self.options.get_safe("with_etw"): libraries.append("opentelemetry_exporter_etw") return libraries @@ -347,7 +395,7 @@ def package_info(self): self.cpp_info.components["opentelemetry_exporter_in_memory"].libs = [] - if self.options.with_logs_preview: + if Version(self.version) >= "1.11" or self.options.with_logs_preview: self.cpp_info.components["opentelemetry_logs"].requires.extend([ "opentelemetry_resources", "opentelemetry_common", @@ -360,7 +408,7 @@ def package_info(self): if self.settings.os in ("Linux", "FreeBSD"): self.cpp_info.components["opentelemetry_common"].system_libs.extend(["pthread"]) - if self.options.with_stl: + if self._stl_value: self.cpp_info.components["opentelemetry_common"].defines.append("HAVE_CPP_STDLIB") if self.options.with_gsl: @@ -379,12 +427,20 @@ def package_info(self): "opentelemetry_trace", ]) + if Version(self.version) >= "1.11": + self.cpp_info.components["opentelemetry_otlp_recordable"].requires.extend([ + "opentelemetry_logs", + ]) + if self.options.with_otlp_grpc: self.cpp_info.components["opentelemetry_exporter_otlp_grpc_client"].requires.extend([ "grpc::grpc++", "opentelemetry_proto", ]) + if Version(self.version) >= "1.9.1": + self.cpp_info.components["opentelemetry_exporter_otlp_grpc_client"].requires.append("opentelemetry_proto_grpc") + self.cpp_info.components["opentelemetry_exporter_otlp_grpc"].requires.extend([ "opentelemetry_otlp_recordable", "opentelemetry_exporter_otlp_grpc_client" @@ -395,7 +451,7 @@ def package_info(self): "opentelemetry_exporter_otlp_grpc_client" ]) - if self.options.with_logs_preview: + if Version(self.version) >= "1.11" or self.options.with_logs_preview: self.cpp_info.components["opentelemetry_exporter_otlp_grpc_log"].requires.extend([ "opentelemetry_otlp_recordable", "opentelemetry_exporter_otlp_grpc_client", @@ -425,7 +481,7 @@ def package_info(self): "opentelemetry_exporter_otlp_http_client" ]) - if self.options.with_logs_preview: + if Version(self.version) >= "1.11" or self.options.with_logs_preview: self.cpp_info.components["opentelemetry_exporter_otlp_http_log"].requires.extend([ "opentelemetry_otlp_recordable", "opentelemetry_exporter_otlp_http_client", @@ -450,7 +506,13 @@ def package_info(self): "boost::locale" ) - if self.settings.os == "Windows" and self.options.with_etw: + if self.options.with_prometheus: + self.cpp_info.components["opentelemetry_exporter_prometheus"].requires.extend([ + "prometheus-cpp::prometheus-cpp", + "opentelemetry_trace", + ]) + + if self.options.get_safe("with_etw"): self.cpp_info.components["opentelemetry_exporter_etw"].libs = [] self.cpp_info.components["opentelemetry_exporter_etw"].requires.append( "nlohmann_json::nlohmann_json", diff --git a/recipes/opentelemetry-cpp/config.yml b/recipes/opentelemetry-cpp/config.yml index a678af123ada5..2d959457e4aec 100644 --- a/recipes/opentelemetry-cpp/config.yml +++ b/recipes/opentelemetry-cpp/config.yml @@ -1,4 +1,6 @@ versions: + "1.14.2": + folder: all "1.12.0": folder: all "1.9.1": diff --git a/recipes/opentelemetry-proto/all/conandata.yml b/recipes/opentelemetry-proto/all/conandata.yml index 2b4c67bbf05e0..cd89aeeb2492e 100644 --- a/recipes/opentelemetry-proto/all/conandata.yml +++ b/recipes/opentelemetry-proto/all/conandata.yml @@ -1,4 +1,13 @@ sources: + "1.3.2": + url: "https://github.com/open-telemetry/opentelemetry-proto/archive/v1.3.2.tar.gz" + sha256: "c069c0d96137cf005d34411fa67dd3b6f1f8c64af1e7fb2fe0089a41c425acd7" + "1.3.1": + url: "https://github.com/open-telemetry/opentelemetry-proto/archive/v1.3.1.tar.gz" + sha256: "bed250ceec8e4a83aa5604d7d5595a61945059dc662edd058a9da082283f7a00" + "1.3.0": + url: "https://github.com/open-telemetry/opentelemetry-proto/archive/v1.3.0.tar.gz" + sha256: "73a678b0ff7a29b581381566a2230fe2a00b864608786c99c050a4492e2bbafc" "1.2.0": url: "https://github.com/open-telemetry/opentelemetry-proto/archive/v1.2.0.tar.gz" sha256: "516dc94685dbaa14fb792788f31d2ef2b0c3ad08dfa8a9a8164e3cf60c1ab6f7" diff --git a/recipes/opentelemetry-proto/config.yml b/recipes/opentelemetry-proto/config.yml index 595b08059c4fa..f97817db57e8d 100644 --- a/recipes/opentelemetry-proto/config.yml +++ b/recipes/opentelemetry-proto/config.yml @@ -1,4 +1,10 @@ versions: + "1.3.2": + folder: all + "1.3.1": + folder: all + "1.3.0": + folder: all "1.2.0": folder: all "1.1.0": diff --git a/recipes/openvino/all/conandata.yml b/recipes/openvino/all/conandata.yml index dd23e75ae9252..92d15e83a5401 100644 --- a/recipes/openvino/all/conandata.yml +++ b/recipes/openvino/all/conandata.yml @@ -1,4 +1,68 @@ sources: + "2024.4.0": + "openvino": + url: "https://github.com/openvinotoolkit/openvino/archive/refs/tags/2024.4.0.tar.gz" + sha256: "aeb6297e3e88b4ab7803b27b231a72bd0493b6761ef98f225142146be500f538" + "arm_compute": + url: "https://github.com/ARM-software/ComputeLibrary/archive/refs/tags/v24.08.tar.gz" + sha256: "b3576ffa2a70e7704bdf7febe7109f4cfb416a0178222b58f5ee0fd455980337" + "onednn_cpu": + url: "https://github.com/openvinotoolkit/oneDNN/archive/c8ae8d96e963bd04214858319fa334968e5e73c9.tar.gz" + sha256: "b9c2a53061b4528231ff5fbcee85900d698c329c7977b1f39c5d3d65f29c2caa" + "mlas": + url: "https://github.com/openvinotoolkit/mlas/archive/d1bc25ec4660cddd87804fcf03b2411b5dfb2e94.tar.gz" + sha256: "0a44fbfd4b13e8609d66ddac4b11a27c90c1074cde5244c91ad197901666004c" + "onednn_gpu": + url: "https://github.com/oneapi-src/oneDNN/archive/4ccd07e3a10e1c08075cf824ac14708245fbc334.tar.gz" + sha256: "4782d7cfd06ae6f782f1f99a62b7937e38a0d4b879a4e33f740a0602e610c86c" + "2024.3.0": + "openvino": + url: "https://github.com/openvinotoolkit/openvino/archive/refs/tags/2024.3.0.tar.gz" + sha256: "53fccad05279d0975eca84ec75517a7c360be9b0f7bcd822da29a7949c12ce70" + "arm_compute": + url: "https://github.com/ARM-software/ComputeLibrary/archive/refs/tags/v24.06.tar.gz" + sha256: "68e24589905638e406a98ad48236097ab30112f2849b35e196b7b1efb0ce74e6" + "onednn_cpu": + url: "https://github.com/openvinotoolkit/oneDNN/archive/f0f8defe2dff5058391f2a66e775e20b5de33b08.tar.gz" + sha256: "13bee5b8522177f297e095e3eba5948c1a7ee7a816d19d5a59ce0f717f82cedc" + "mlas": + url: "https://github.com/openvinotoolkit/mlas/archive/d1bc25ec4660cddd87804fcf03b2411b5dfb2e94.tar.gz" + sha256: "0a44fbfd4b13e8609d66ddac4b11a27c90c1074cde5244c91ad197901666004c" + "onednn_gpu": + url: "https://github.com/oneapi-src/oneDNN/archive/7ab8ee9adda866d675edeee7a3a6a29b2d0a1572.tar.gz" + sha256: "66363988363744e49fff55f4fcdb72318ff3f35fba6da68302c1662c837c22ac" + "2024.2.0": + "openvino": + url: "https://github.com/openvinotoolkit/openvino/archive/refs/tags/2024.2.0.tar.gz" + sha256: "b624481efb7814cf2d98a29163c3b914fa2f23c1417289b13561d0b5e32fc67c" + "arm_compute": + url: "https://github.com/ARM-software/ComputeLibrary/archive/refs/tags/v24.04.tar.gz" + sha256: "6d7aebfa9be74d29ecd2dbeb17f69e00c667c36292401f210121bf26a30b38a5" + "onednn_cpu": + url: "https://github.com/openvinotoolkit/oneDNN/archive/373e65b660c0ba274631cf30c422f10606de1618.tar.gz" + sha256: "c205b81f9024952c742e765090556a18c9463fff245753a2afa42c344bd6379d" + "mlas": + url: "https://github.com/openvinotoolkit/mlas/archive/d1bc25ec4660cddd87804fcf03b2411b5dfb2e94.tar.gz" + sha256: "0a44fbfd4b13e8609d66ddac4b11a27c90c1074cde5244c91ad197901666004c" + "onednn_gpu": + url: "https://github.com/oneapi-src/oneDNN/archive/37f48519b87cf8b5e5ef2209340a1948c3e87d72.tar.gz" + sha256: "58131e094408460f88bf941977b5206232dc2bc8dbf227250d1e2236b43153a5" + "2024.1.0": + "openvino": + url: "https://github.com/openvinotoolkit/openvino/archive/refs/tags/2024.1.0.tar.gz" + sha256: "b298a91b5aae252ef9883e0f2017e88677be88a9839b1aa2f6e9f70067d98ce6" + "arm_compute": + url: "https://github.com/ARM-software/ComputeLibrary/archive/refs/tags/v24.02.1.tar.gz" + sha256: "590d5cb710355bce2ddfe7117529c2f492cd253b548f709bbfe84702203d99c8" + "onednn_cpu": + url: "https://github.com/openvinotoolkit/oneDNN/archive/26633ae49edd4353a29b7170d9fcef6b2d79f4b3.tar.gz" + sha256: "3cd4a2aea30cd6ca689e63545cf986f8e83c88333b73d42bb750fcaf08940b17" + "mlas": + url: "https://github.com/openvinotoolkit/mlas/archive/d1bc25ec4660cddd87804fcf03b2411b5dfb2e94.tar.gz" + sha256: "0a44fbfd4b13e8609d66ddac4b11a27c90c1074cde5244c91ad197901666004c" + "onednn_gpu": + url: "https://github.com/oneapi-src/oneDNN/archive/4e6ff043c439652fcf6c400ac4e0c81bbac7c71c.tar.gz" + sha256: "c3543d560fbbb7297df91c191cc9bf682322c5554302e256f1bf4a757424a331" "2024.0.0": "openvino": url: "https://github.com/openvinotoolkit/openvino/archive/refs/tags/2024.0.0.tar.gz" @@ -47,23 +111,12 @@ sources: "onednn_gpu": url: "https://github.com/oneapi-src/oneDNN/archive/284ad4574939fa784e4ddaa1f4aa577b8eb7a017.tar.gz" sha256: "16f36078339cd08b949efea1d863344cb0b742d9f5898937d07a591b0c4da517" - "2023.1.0": - "openvino": - url: "https://github.com/openvinotoolkit/openvino/archive/refs/tags/2023.1.0.tar.gz" - sha256: "ff88596b342440185874ddbe22874b47ad7b923f14671921af760b15c98aacd6" - "arm_compute": - url: "https://github.com/ARM-software/ComputeLibrary/archive/refs/tags/v23.02.1.tar.gz" - sha256: "c3a443e26539f866969242e690cf0651ef629149741ee18732f954c734da6763" - "onednn_cpu": - url: "https://github.com/openvinotoolkit/oneDNN/archive/ae825539bd850d1ad5c83d4bb0d56c65d46d5842.tar.gz" - sha256: "1204df17785c8603f9dfa1f4f91e91e5ffd4391bf7680d2b256de2513490ebee" - "mlas": - url: "https://github.com/openvinotoolkit/mlas/archive/c7c8a631315000f17c650af34431009d2f22129c.tar.gz" - sha256: "7b790dfeef8e1dd612f920c85186c52ad3a3e2245e2a2afd6cc91ce4b1dc64a9" - "onednn_gpu": - url: "https://github.com/oneapi-src/oneDNN/archive/4b82a66ed38ecaa993352e5cc6ed7753656b8a26.tar.gz" - sha256: "cb17c003fe51bc9b4e20189573956b4446468162adf0fc4cea2ee0820cff0cd0" patches: + "2024.1.0": + - patch_file: "patches/2024.1.0/0001-fix-cxxflags.patch" + patch_description: "Fix build failure when explicitly passing different gcc ABI via cxx flags" + patch_type: "portability" + patch_source: "https://github.com/openvinotoolkit/openvino/pull/24274" "2024.0.0": - patch_file: "patches/2024.0.0/0001-Include-mutex-for-std-call_once.patch" patch_description: "Include mutex for std::call_once" @@ -82,40 +135,3 @@ patches: patch_description: "Fixed issue with version on Windows" patch_type: "portability" patch_source: "https://github.com/openvinotoolkit/openvino/pull/19628" - "2023.1.0": - - patch_file: "patches/2023.1.0/0001-cpu-plugin-compilation-c++17.patch" - patch_description: "Fixed CPU plugin compilation with C++17" - patch_type: "portability" - patch_source: "https://github.com/openvinotoolkit/openvino/pull/19628" - - patch_file: "patches/2023.1.0/0002-core-compilation-c++17.patch" - patch_description: "Fixed OpenVINO Core compilation with C++17" - patch_type: "portability" - patch_source: "https://github.com/openvinotoolkit/openvino/pull/19707" - - patch_file: "patches/2023.1.0/0003-fixed-gpu-with-onednn-build.patch" - patch_description: "Fixed Intel GPU plugin with oneDNN" - patch_type: "portability" - # severals PR are merged into a single patch including: - # https://github.com/openvinotoolkit/openvino/pull/19668, - # https://github.com/openvinotoolkit/openvino/pull/19715, - # https://github.com/openvinotoolkit/openvino/pull/19716, - # https://github.com/openvinotoolkit/openvino/pull/19762 and - patch_source: "https://github.com/openvinotoolkit/openvino/pull/19811" - - patch_file: "patches/2023.1.0/0004-fixed-gpu-plugin-with-clang.patch" - patch_description: "Fixed order of initialization of static variables in GPU plugin compiled with clang" - patch_type: "portability" - patch_source: "https://github.com/openvinotoolkit/openvino/pull/19768" - - patch_file: "patches/2023.1.0/0005-dynamic-protobuf.patch" - patch_description: "Added a workaround for OpenVINO to work with dynamic protobuf" - patch_type: "portability" - # severals PR are merged into a single patch including: - # https://github.com/openvinotoolkit/openvino/pull/19599, - # https://github.com/openvinotoolkit/openvino/pull/19758 and - patch_source: "https://github.com/openvinotoolkit/openvino/pull/20612" - - patch_file: "patches/2023.1.0/0006-macos-14.patch" - patch_description: "Support macos 14" - patch_type: "portability" - patch_source: "https://github.com/openvinotoolkit/openvino/pull/19946" - - patch_file: "patches/2023.1.0/0007-compilation-c++23.patch" - patch_description: "Compilation with C++23" - patch_type: "portability" - patch_source: "https://github.com/openvinotoolkit/openvino/pull/20724" diff --git a/recipes/openvino/all/conanfile.py b/recipes/openvino/all/conanfile.py index d5b090836295b..8e6af66ae2c3f 100644 --- a/recipes/openvino/all/conanfile.py +++ b/recipes/openvino/all/conanfile.py @@ -14,7 +14,6 @@ class OpenvinoConan(ConanFile): name = "openvino" - # Optional metadata license = "Apache-2.0" homepage = "https://github.com/openvinotoolkit/openvino" url = "https://github.com/conan-io/conan-center-index" @@ -100,6 +99,10 @@ def _target_x86_64(self): def _gna_option_available(self): return self.settings.os in ["Linux", "Windows"] and self._target_x86_64 and Version(self.version) < "2024.0.0" + @property + def _npu_option_available(self): + return self.settings.os in ["Linux", "Windows"] and self._target_x86_64 and Version(self.version) >= "2024.1.0" + @property def _gpu_option_available(self): return self.settings.os != "Macos" and self._target_x86_64 @@ -202,9 +205,15 @@ def generate(self): toolchain.cache_variables["ENABLE_INTEL_CPU"] = self.options.enable_cpu if self._gpu_option_available: toolchain.cache_variables["ENABLE_INTEL_GPU"] = self.options.enable_gpu - toolchain.cache_variables["ENABLE_ONEDNN_FOR_GPU"] = self.options.shared or not self.options.enable_cpu + toolchain.cache_variables["ENABLE_ONEDNN_FOR_GPU"] = ( + Version(self.version) >= "2024.4.0" and self.options.enable_gpu + or not self.options.enable_cpu + or self.options.shared + ) if self._gna_option_available: toolchain.cache_variables["ENABLE_INTEL_GNA"] = False + if self._npu_option_available: + toolchain.cache_variables["ENABLE_INTEL_NPU"] = False # SW plugins toolchain.cache_variables["ENABLE_AUTO"] = self.options.enable_auto toolchain.cache_variables["ENABLE_MULTI"] = self.options.enable_auto @@ -265,13 +274,13 @@ def validate_build(self): if self.settings.os == "Emscripten": raise ConanInvalidConfiguration(f"{self.ref} does not support Emscripten") - # TODO: resolve it later, since it is not critical for now - # Conan Center CI fails with our of memory error when building OpenVINO - if self.settings.build_type == "Debug": - raise ConanInvalidConfiguration(f"{self.ref} does not support Debug build type") + # Failing on Conan Center CI due to memory usage + if os.getenv("CONAN_CENTER_BUILD_SERVICE") and self.settings.build_type == "Debug": + raise ConanInvalidConfiguration(f"{self.ref} does not support Debug build type on Conan Center CI") def validate(self): - if self.options.get_safe("enable_gpu") and not self.options.shared and self.options.enable_cpu: + if (self.options.get_safe("enable_gpu") and self.options.enable_cpu + and Version(self.version) < "2024.4.0" and not self.options.shared): # GPU and CPU plugins cannot be simultaneously built statically, because they use different oneDNN versions self.output.warning(f"{self.name} recipe builds GPU plugin without oneDNN (dGPU) support during static build, " "because CPU plugin compiled with different oneDNN version may cause ODR violation. " @@ -325,7 +334,7 @@ def package_info(self): if self.options.get_safe("enable_gpu"): openvino_runtime.libs.extend(["openvino_intel_gpu_plugin", "openvino_intel_gpu_graph", "openvino_intel_gpu_runtime", "openvino_intel_gpu_kernels"]) - if not self.options.enable_cpu: + if not self.options.enable_cpu or Version(self.version) >= "2024.4.0": openvino_runtime.libs.append("openvino_onednn_gpu") # SW plugins if self.options.enable_auto: @@ -344,11 +353,13 @@ def package_info(self): openvino_runtime.libs.extend(["openvino_onnx_frontend", "openvino_onnx_common"]) openvino_runtime.requires.extend(["protobuf::libprotobuf", "onnx::onnx"]) if self.options.enable_tf_frontend: - openvino_runtime.libs.extend(["openvino_tensorflow_frontend", "openvino_tensorflow_common"]) + openvino_runtime.libs.extend(["openvino_tensorflow_frontend"]) openvino_runtime.requires.extend(["protobuf::libprotobuf", "snappy::snappy"]) if self.options.enable_tf_lite_frontend: - openvino_runtime.libs.extend(["openvino_tensorflow_lite_frontend", "openvino_tensorflow_common"]) + openvino_runtime.libs.extend(["openvino_tensorflow_lite_frontend"]) openvino_runtime.requires.extend(["flatbuffers::flatbuffers"]) + if self.options.enable_tf_frontend or self.options.enable_tf_lite_frontend: + openvino_runtime.libs.extend(["openvino_tensorflow_common"]) if self.options.enable_paddle_frontend: openvino_runtime.libs.append("openvino_paddle_frontend") openvino_runtime.requires.append("protobuf::libprotobuf") diff --git a/recipes/openvino/all/dependencies/dependencies-2023.1.0.yml b/recipes/openvino/all/dependencies/dependencies-2023.1.0.yml deleted file mode 100644 index fd126ded2ddee..0000000000000 --- a/recipes/openvino/all/dependencies/dependencies-2023.1.0.yml +++ /dev/null @@ -1,2 +0,0 @@ -onnx: "1.13.1" -ade: "0.1.2d" diff --git a/recipes/openvino/all/dependencies/dependencies-2024.1.0.yml b/recipes/openvino/all/dependencies/dependencies-2024.1.0.yml new file mode 100644 index 0000000000000..f99604741682a --- /dev/null +++ b/recipes/openvino/all/dependencies/dependencies-2024.1.0.yml @@ -0,0 +1 @@ +onnx: "1.15.0" diff --git a/recipes/openvino/all/dependencies/dependencies-2024.2.0.yml b/recipes/openvino/all/dependencies/dependencies-2024.2.0.yml new file mode 100644 index 0000000000000..f99604741682a --- /dev/null +++ b/recipes/openvino/all/dependencies/dependencies-2024.2.0.yml @@ -0,0 +1 @@ +onnx: "1.15.0" diff --git a/recipes/openvino/all/dependencies/dependencies-2024.3.0.yml b/recipes/openvino/all/dependencies/dependencies-2024.3.0.yml new file mode 100644 index 0000000000000..f99604741682a --- /dev/null +++ b/recipes/openvino/all/dependencies/dependencies-2024.3.0.yml @@ -0,0 +1 @@ +onnx: "1.15.0" diff --git a/recipes/openvino/all/dependencies/dependencies-2024.4.0.yml b/recipes/openvino/all/dependencies/dependencies-2024.4.0.yml new file mode 100644 index 0000000000000..8cd1d9ccc3564 --- /dev/null +++ b/recipes/openvino/all/dependencies/dependencies-2024.4.0.yml @@ -0,0 +1 @@ +onnx: "1.16.0" diff --git a/recipes/openvino/all/patches/2023.1.0/0001-cpu-plugin-compilation-c++17.patch b/recipes/openvino/all/patches/2023.1.0/0001-cpu-plugin-compilation-c++17.patch deleted file mode 100644 index da6548b7c9115..0000000000000 --- a/recipes/openvino/all/patches/2023.1.0/0001-cpu-plugin-compilation-c++17.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff --git a/src/plugins/intel_cpu/src/cpu_tensor.cpp b/src/plugins/intel_cpu/src/cpu_tensor.cpp -index 48d8fdd4be..815edd9309 100644 ---- a/src/plugins/intel_cpu/src/cpu_tensor.cpp -+++ b/src/plugins/intel_cpu/src/cpu_tensor.cpp -@@ -68,8 +68,9 @@ void Tensor::update_strides() const { - OPENVINO_ASSERT(blocked_desc, "not a valid blocked memory descriptor."); - auto& strides = blocked_desc->getStrides(); - m_strides.resize(strides.size()); -- std::transform(strides.cbegin(), strides.cend(), m_strides.begin(), -- std::bind1st(std::multiplies(), m_element_type.size())); -+ std::transform(strides.cbegin(), strides.cend(), m_strides.begin(), [this] (const size_t stride) { -+ return stride * m_element_type.size(); -+ }); - } - - void* Tensor::data(const element::Type& element_type) const { diff --git a/recipes/openvino/all/patches/2023.1.0/0002-core-compilation-c++17.patch b/recipes/openvino/all/patches/2023.1.0/0002-core-compilation-c++17.patch deleted file mode 100644 index 2df86d8ed0ec6..0000000000000 --- a/recipes/openvino/all/patches/2023.1.0/0002-core-compilation-c++17.patch +++ /dev/null @@ -1,46 +0,0 @@ -diff --git a/src/frontends/common/src/utils.cpp b/src/frontends/common/src/utils.cpp -index 8ef7481551..3a0db585fd 100644 ---- a/src/frontends/common/src/utils.cpp -+++ b/src/frontends/common/src/utils.cpp -@@ -12,10 +12,6 @@ - # include - # include - # include --# ifdef OPENVINO_ENABLE_UNICODE_PATH_SUPPORT --# include --# include --# endif - #else - # if defined(WINAPI_FAMILY) && !WINAPI_PARTITION_DESKTOP - # error "Only WINAPI_PARTITION_DESKTOP is supported, because of GetModuleHandleEx[A|W]" -diff --git a/src/frontends/paddle/src/input_model.cpp b/src/frontends/paddle/src/input_model.cpp -index 6987b3285e..287fa5e54a 100644 ---- a/src/frontends/paddle/src/input_model.cpp -+++ b/src/frontends/paddle/src/input_model.cpp -@@ -13,14 +13,10 @@ - #include "openvino/frontend/paddle/node_context.hpp" - #include "openvino/opsets/opset7.hpp" - #include "openvino/util/common_util.hpp" -+#include "openvino/util/file_util.hpp" - #include "paddle_utils.hpp" - #include "place.hpp" - --#if defined(OPENVINO_ENABLE_UNICODE_PATH_SUPPORT) && defined(_WIN32) --# include --# include --#endif -- - namespace ov { - namespace frontend { - namespace paddle { -@@ -169,9 +165,7 @@ std::basic_string get_const_path(const std::basic_string& folder_with_weig - #if defined(OPENVINO_ENABLE_UNICODE_PATH_SUPPORT) && defined(_WIN32) - template <> - std::basic_string get_const_path(const std::basic_string& folder, const std::string& name) { -- std::wstring_convert> converter; -- std::wstring _name = converter.from_bytes(name); -- return folder + paddle::get_path_sep() + _name; -+ return folder + paddle::get_path_sep() + ov::util::string_to_wstring(name); - } - #endif - diff --git a/recipes/openvino/all/patches/2023.1.0/0003-fixed-gpu-with-onednn-build.patch b/recipes/openvino/all/patches/2023.1.0/0003-fixed-gpu-with-onednn-build.patch deleted file mode 100644 index e5791b37c7a7a..0000000000000 --- a/recipes/openvino/all/patches/2023.1.0/0003-fixed-gpu-with-onednn-build.patch +++ /dev/null @@ -1,684 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 461f1a209c..0b552b3da3 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -47,6 +47,7 @@ message (STATUS "CMAKE_GENERATOR ....................... " ${CMAKE_GENERATOR}) - message (STATUS "CPACK_GENERATOR ....................... " ${CPACK_GENERATOR}) - message (STATUS "CMAKE_C_COMPILER_ID ................... " ${CMAKE_C_COMPILER_ID}) - message (STATUS "CMAKE_CXX_COMPILER_ID ................. " ${CMAKE_CXX_COMPILER_ID}) -+message (STATUS "CMAKE_CXX_STANDARD .................... " ${CMAKE_CXX_STANDARD}) - if(OV_GENERATOR_MULTI_CONFIG) - string(REPLACE ";" " " config_types "${CMAKE_CONFIGURATION_TYPES}") - message (STATUS "CMAKE_CONFIGURATION_TYPES ............. " ${config_types}) -diff --git a/cmake/developer_package/plugins/plugins.cmake b/cmake/developer_package/plugins/plugins.cmake -index 436685355a..ea187411d1 100644 ---- a/cmake/developer_package/plugins/plugins.cmake -+++ b/cmake/developer_package/plugins/plugins.cmake -@@ -117,6 +117,10 @@ function(ov_add_plugin) - # install rules - if(NOT OV_PLUGIN_SKIP_INSTALL OR NOT BUILD_SHARED_LIBS) - string(TOLOWER "${OV_PLUGIN_DEVICE_NAME}" install_component) -+ if(NOT BUILD_SHARED_LIBS) -+ # in case of static libs everything is installed to 'core' -+ set(install_component ${OV_CPACK_COMP_CORE}) -+ endif() - - if(OV_PLUGIN_PSEUDO_DEVICE) - set(plugin_hidden HIDDEN) -diff --git a/cmake/features.cmake b/cmake/features.cmake -index e4b60c89e0..7327b262a2 100644 ---- a/cmake/features.cmake -+++ b/cmake/features.cmake -@@ -23,7 +23,7 @@ endif() - - ie_dependent_option (ENABLE_INTEL_GPU "GPU OpenCL-based plugin for OpenVINO Runtime" ${ENABLE_INTEL_GPU_DEFAULT} "X86_64 OR AARCH64;NOT APPLE;NOT WINDOWS_STORE;NOT WINDOWS_PHONE" OFF) - --if (ANDROID OR (CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 7.0) OR NOT BUILD_SHARED_LIBS) -+if (ANDROID OR MINGW OR (CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 7.0) OR (NOT BUILD_SHARED_LIBS AND ENABLE_INTEL_CPU)) - # oneDNN doesn't support old compilers and android builds for now, so we'll build GPU plugin without oneDNN - # also, in case of static build CPU's and GPU's oneDNNs will conflict, so we are disabling GPU's one in this case - set(ENABLE_ONEDNN_FOR_GPU_DEFAULT OFF) -diff --git a/cmake/templates/OpenVINOConfig.cmake.in b/cmake/templates/OpenVINOConfig.cmake.in -index 9eb1cfdd35..7dda80d8a3 100644 ---- a/cmake/templates/OpenVINOConfig.cmake.in -+++ b/cmake/templates/OpenVINOConfig.cmake.in -@@ -223,6 +223,10 @@ macro(_ov_find_tbb) - PATHS ${_tbb_bind_dir} - NO_CMAKE_FIND_ROOT_PATH - NO_DEFAULT_PATH) -+ if(TARGET TBBbind::tbbbind_2_5) -+ # To solve https://cmake.org/cmake/help/latest/policy/CMP0111.html warnings -+ set_property(TARGET TBBbind::tbbbind_2_5 PROPERTY IMPORTED_CONFIGURATIONS RELEASE DEBUG) -+ endif() - unset(_tbb_bind_dir) - endif() - unset(install_tbbbind) -@@ -343,11 +347,15 @@ endmacro() - macro(_ov_find_intel_cpu_dependencies) - set(_OV_ENABLE_CPU_ACL "@DNNL_USE_ACL@") - if(_OV_ENABLE_CPU_ACL) -- set(_ov_in_install_tree "@PACKAGE_ARM_COMPUTE_LIB_DIR@") -+ set(_ov_in_install_tree "@PACKAGE_OPENVINO_LIB_DIR@") - if(_ov_in_install_tree) -- set_and_check(ARM_COMPUTE_LIB_DIR "@PACKAGE_ARM_COMPUTE_LIB_DIR@") -+ set_and_check(ARM_COMPUTE_LIB_DIR "@PACKAGE_OPENVINO_LIB_DIR@") - set(ACL_DIR "${CMAKE_CURRENT_LIST_DIR}") - else() -+ if(NOT TARGET arm_compute::arm_compute) -+ # for case when build tree is used separately, e.g. OpenVINODeveloperPackageConfig.cmake -+ set_and_check(ARM_COMPUTE_LIB_DIR "@PACKAGE_CMAKE_ARCHIVE_OUTPUT_DIRECTORY@") -+ endif() - set_and_check(ACL_DIR "@PACKAGE_FIND_ACL_PATH@") - endif() - -@@ -363,16 +371,50 @@ macro(_ov_find_intel_gpu_dependencies) - set(_OV_ENABLE_INTEL_GPU "@ENABLE_INTEL_GPU@") - set(_OV_ENABLE_SYSTEM_OPENCL "@ENABLE_SYSTEM_OPENCL@") - if(_OV_ENABLE_INTEL_GPU AND _OV_ENABLE_SYSTEM_OPENCL) -- set(_OV_OpenCLICDLoader_FOUND "@OpenCLICDLoader_FOUND@") -- if(_OV_OpenCLICDLoader_FOUND) -- _ov_find_dependency(OpenCLICDLoader) -- else() -- _ov_find_dependency(OpenCL) -- endif() -- unset(_OV_OpenCLICDLoader_FOUND) -+ _ov_find_dependency(OpenCL) - endif() - unset(_OV_ENABLE_INTEL_GPU) - unset(_OV_ENABLE_SYSTEM_OPENCL) -+ -+ set(_OV_ENABLE_ONEDNN_FOR_GPU "@ENABLE_ONEDNN_FOR_GPU@") -+ if(_OV_ENABLE_ONEDNN_FOR_GPU AND NOT TARGET onednn_gpu_tgt) -+ set(_OV_DNNL_GPU_LIBRARY_NAME "@DNNL_GPU_LIBRARY_NAME@") -+ -+ set(_ov_in_install_tree "@PACKAGE_OPENVINO_LIB_DIR@") -+ if(_ov_in_install_tree) -+ set(onednn_gpu_lib "${CMAKE_STATIC_LIBRARY_PREFIX}${_OV_DNNL_GPU_LIBRARY_NAME}${CMAKE_STATIC_LIBRARY_SUFFIX}") -+ set_and_check(onednn_gpu_lib_root "@PACKAGE_OPENVINO_LIB_DIR@") -+ if(WIN32) -+ if(OV_GENERATOR_MULTI_CONFIG) -+ set(extra_args PATH_SUFFIXES ${CMAKE_CONFIGURATION_TYPES}) -+ else() -+ set(extra_args PATH_SUFFIXES ${CMAKE_BUILD_TYPE}) -+ endif() -+ endif() -+ -+ find_library(onednn_gpu_lib_path -+ NAMES ${_OV_DNNL_GPU_LIBRARY_NAME} -+ PATHS ${onednn_gpu_lib_root} -+ ${extra_args}) -+ -+ if(NOT onednn_gpu_lib_path) -+ message(FATAL_ERROR "Internal error: failed to find '${_OV_DNNL_GPU_LIBRARY_NAME}' in '${onednn_gpu_lib_root}'") -+ endif() -+ -+ unset(extra_args) -+ unset(onednn_gpu_lib) -+ else() -+ set_and_check(onednn_gpu_lib_path "@PACKAGE_ONEDNN_GPU_LIB_PATH@") -+ endif() -+ -+ set_target_properties(openvino::onednn_gpu_tgt PROPERTIES -+ INTERFACE_LINK_LIBRARIES "${onednn_gpu_lib_path}") -+ -+ unset(onednn_gpu_lib_path) -+ unset(_ov_in_install_tree) -+ unset(_OV_DNNL_GPU_LIBRARY_NAME) -+ endif() -+ unset(_OV_ENABLE_ONEDNN_FOR_GPU) - endmacro() - - macro(_ov_find_intel_gna_dependencies) -@@ -455,6 +497,7 @@ set(_OV_ENABLE_OPENVINO_BUILD_SHARED "@BUILD_SHARED_LIBS@") - - if(NOT TARGET openvino) - set(_ov_as_external_package ON) -+ include("${CMAKE_CURRENT_LIST_DIR}/OpenVINOTargets.cmake") - endif() - - if(NOT _OV_ENABLE_OPENVINO_BUILD_SHARED) -@@ -487,8 +530,6 @@ set(_ov_imported_libs openvino::runtime openvino::runtime::c - openvino::frontend::pytorch openvino::frontend::tensorflow_lite) - - if(_ov_as_external_package) -- include("${CMAKE_CURRENT_LIST_DIR}/OpenVINOTargets.cmake") -- - foreach(target IN LISTS _ov_imported_libs) - if(TARGET ${target}) - get_target_property(imported_configs ${target} IMPORTED_CONFIGURATIONS) -diff --git a/src/cmake/openvino.cmake b/src/cmake/openvino.cmake -index eb9a54354e..1d2996482b 100644 ---- a/src/cmake/openvino.cmake -+++ b/src/cmake/openvino.cmake -@@ -157,9 +157,12 @@ if(ENABLE_INTEL_GNA) - list(APPEND PATH_VARS "GNA_PATH") - endif() - if(DNNL_USE_ACL) -- list(APPEND BUILD_PATH_VARS "FIND_ACL_PATH") -+ list(APPEND BUILD_PATH_VARS "FIND_ACL_PATH;CMAKE_ARCHIVE_OUTPUT_DIRECTORY") - set(FIND_ACL_PATH "${intel_cpu_thirdparty_SOURCE_DIR}") - endif() -+if(ENABLE_ONEDNN_FOR_GPU) -+ list(APPEND BUILD_PATH_VARS "ONEDNN_GPU_LIB_PATH") -+endif() - - set(PUBLIC_HEADERS_DIR "${OpenVINO_SOURCE_DIR}/src/inference/include") - set(IE_INCLUDE_DIR "${PUBLIC_HEADERS_DIR}/ie") -@@ -177,12 +180,10 @@ configure_package_config_file("${OpenVINO_SOURCE_DIR}/cmake/templates/OpenVINOCo - - # install tree - --if(DNNL_USE_ACL) -- list(APPEND INSTALL_PATH_VARS "ARM_COMPUTE_LIB_DIR") -- # remove generator expression at the end, because searching in Release / Debug will be -- # done by ACLConfig.cmake itself -- string(REPLACE "$" "" ARM_COMPUTE_LIB_DIR "${OV_CPACK_LIBRARYDIR}") --endif() -+list(APPEND INSTALL_PATH_VARS "OPENVINO_LIB_DIR") -+# remove generator expression at the end, because searching in Release / Debug -+# will be done by inside OpenVINOConfig.cmak / ACLConfig.cmake -+string(REPLACE "$" "" OPENVINO_LIB_DIR "${OV_CPACK_LIBRARYDIR}") - - set(IE_INCLUDE_DIR "${OV_CPACK_INCLUDEDIR}/ie") - set(IE_TBB_DIR "${IE_TBB_DIR_INSTALL}") -diff --git a/src/plugins/intel_cpu/thirdparty/CMakeLists.txt b/src/plugins/intel_cpu/thirdparty/CMakeLists.txt -index 98935a0792..7e8325acef 100644 ---- a/src/plugins/intel_cpu/thirdparty/CMakeLists.txt -+++ b/src/plugins/intel_cpu/thirdparty/CMakeLists.txt -@@ -117,7 +117,7 @@ function(ov_add_onednn) - add_subdirectory(onednn EXCLUDE_FROM_ALL) - - # install static libraries -- ov_install_static_lib(dnnl cpu) -+ ov_install_static_lib(dnnl ${OV_CPACK_COMP_CORE}) - - if(DNNL_USE_ACL AND NOT BUILD_SHARED_LIBS) - # use ACLConfig.cmake in OpenVINOConfig.cmake in case of static build -@@ -125,16 +125,16 @@ function(ov_add_onednn) - # but for this we need to install library files - install(FILES $ - DESTINATION ${OV_CPACK_ARCHIVEDIR} -- COMPONENT cpu) -+ COMPONENT ${OV_CPACK_COMP_CORE}) - install(FILES "${intel_cpu_thirdparty_SOURCE_DIR}/ACLConfig.cmake" - DESTINATION ${OV_CPACK_OPENVINO_CMAKEDIR} -- COMPONENT core_dev) -+ COMPONENT ${OV_CPACK_COMP_CORE_DEV}) - endif() - endfunction() - - if(ENABLE_MLAS_FOR_CPU) - add_subdirectory(mlas) -- ov_install_static_lib(mlas cpu) -+ ov_install_static_lib(mlas ${OV_CPACK_COMP_CORE}) - endif() - - ov_add_onednn() -diff --git a/src/plugins/intel_gpu/CMakeLists.txt b/src/plugins/intel_gpu/CMakeLists.txt -index 1770b34b65..4e8a9d0e68 100644 ---- a/src/plugins/intel_gpu/CMakeLists.txt -+++ b/src/plugins/intel_gpu/CMakeLists.txt -@@ -35,6 +35,7 @@ set(MAIN_DIR "${CMAKE_CURRENT_SOURCE_DIR}") - set(INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/include") - - add_subdirectory(thirdparty) -+include(thirdparty/cmake/rapidjson.cmake) - - if(CMAKE_COMPILER_IS_GNUCXX) - ie_add_compiler_flags(-Werror) -diff --git a/src/plugins/intel_gpu/src/graph/CMakeLists.txt b/src/plugins/intel_gpu/src/graph/CMakeLists.txt -index 0b2093d2a0..fac58ec0fa 100644 ---- a/src/plugins/intel_gpu/src/graph/CMakeLists.txt -+++ b/src/plugins/intel_gpu/src/graph/CMakeLists.txt -@@ -58,7 +58,7 @@ elseif((NOT ANDROID) AND (UNIX)) - target_link_libraries(${TARGET_NAME} PRIVATE pthread) - endif() - --ov_install_static_lib(${TARGET_NAME} gpu) -+ov_install_static_lib(${TARGET_NAME} ${OV_CPACK_COMP_CORE}) - - if(ENABLE_SSE42) - ie_sse42_optimization_flags(sse4_2_flags) -diff --git a/src/plugins/intel_gpu/src/kernel_selector/CMakeLists.txt b/src/plugins/intel_gpu/src/kernel_selector/CMakeLists.txt -index b76d8ee732..99ebf5331a 100644 ---- a/src/plugins/intel_gpu/src/kernel_selector/CMakeLists.txt -+++ b/src/plugins/intel_gpu/src/kernel_selector/CMakeLists.txt -@@ -61,7 +61,8 @@ endif() - target_include_directories(${TARGET_NAME} PUBLIC $ - $ - $ -- $) -+ $ -+ PRIVATE $) - - target_compile_options(${TARGET_NAME} PRIVATE - $<$:$,/Os,-Os>>) -@@ -70,7 +71,7 @@ if(COMMAND add_cpplint_target) - add_cpplint_target(${TARGET_NAME}_cpplint FOR_TARGETS ${TARGET_NAME}) - endif() - --target_link_libraries(${TARGET_NAME} PUBLIC OpenCL::OpenCL rapidjson inference_engine_plugin_api) -+target_link_libraries(${TARGET_NAME} PUBLIC OpenCL::OpenCL inference_engine_plugin_api) - - set_target_properties(${TARGET_NAME} PROPERTIES INTERPROCEDURAL_OPTIMIZATION_RELEASE ${ENABLE_LTO}) - -@@ -90,8 +91,16 @@ add_custom_command( - TARGET ${TARGET_NAME} POST_BUILD - COMMAND "${CMAKE_COMMAND}" -E copy_if_different ${CMAKE_CURRENT_SOURCE_DIR}/cache/cache.json ${TUNING_CACHE_PATH}/cache.json) - -+if(BUILD_SHARED_LIBS) -+ set(CACHE_JSON_INSTALL_DIR ${OV_CPACK_PLUGINSDIR}) -+ set(CACHE_JSON_COMPONENT gpu) -+else() -+ set(CACHE_JSON_INSTALL_DIR ${OV_CPACK_ARCHIVEDIR}) -+ set(CACHE_JSON_COMPONENT ${OV_CPACK_COMP_CORE}) -+endif() -+ - install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/cache/cache.json -- DESTINATION ${OV_CPACK_PLUGINSDIR} -- COMPONENT gpu) -+ DESTINATION ${CACHE_JSON_INSTALL_DIR} -+ COMPONENT ${CACHE_JSON_COMPONENT}) - --ov_install_static_lib(${TARGET_NAME} gpu) -+ov_install_static_lib(${TARGET_NAME} ${OV_CPACK_COMP_CORE}) -diff --git a/src/plugins/intel_gpu/src/kernel_selector/auto_tuner.cpp b/src/plugins/intel_gpu/src/kernel_selector/auto_tuner.cpp -index cfac486cdf..a5d0711f61 100644 ---- a/src/plugins/intel_gpu/src/kernel_selector/auto_tuner.cpp -+++ b/src/plugins/intel_gpu/src/kernel_selector/auto_tuner.cpp -@@ -3,18 +3,21 @@ - // - - #include "auto_tuner.h" -+ - #include - #include - #include - #include - #include --#include "istreamwrapper.h" --#include "stringbuffer.h" --#include "prettywriter.h" - #include - #include - #include - -+#include "rapidjson/istreamwrapper.h" -+#include "rapidjson/stringbuffer.h" -+#include "rapidjson/prettywriter.h" -+#include "rapidjson/document.h" -+ - #ifdef _WIN32 - #ifndef WIN32_LEAN_AND_MEAN - #define WIN32_LEAN_AND_MEAN -@@ -35,32 +38,37 @@ - - namespace kernel_selector { - -+class TuningCache::Impl { -+public: -+ rapidjson::Document cache; -+}; -+ - TuningCache::TuningCache(const std::string& cacheFilePath) -- : cache() { -+ : impl(new Impl()) { - // Read cache file - std::ifstream tuningFile(cacheFilePath); - - if (tuningFile && tuningFile.good()) { - std::stringstream buffer; - buffer << tuningFile.rdbuf(); -- cache.Parse(buffer.str().c_str()); -+ impl->cache.Parse(buffer.str().c_str()); - } else { - throw std::runtime_error("Tuning file: " + cacheFilePath + " could not be read! Must provide a valid cache file in USE_CACHE mode."); - } - -- if (cache.IsNull()) { -- cache.SetObject(); -- } else if (!cache.IsObject()) { -+ if (impl->cache.IsNull()) { -+ impl->cache.SetObject(); -+ } else if (!impl->cache.IsObject()) { - throw std::runtime_error("Tuning file: " + cacheFilePath + " has incorrect format."); - } - -- auto cacheObj = cache.GetObject(); -+ auto cacheObj = impl->cache.GetObject(); - - // Update to new format with version markers - if (!cacheObj.HasMember(version2Marker)) { -- auto newName = rapidjson::Value(version2Marker, cache.GetAllocator()); -+ auto newName = rapidjson::Value(version2Marker, impl->cache.GetAllocator()); - auto newObj = rapidjson::Value(rapidjson::Type::kObjectType); -- cacheObj.AddMember(newName, newObj, cache.GetAllocator()); -+ cacheObj.AddMember(newName, newObj, impl->cache.GetAllocator()); - } - - bool needsV1 = false; -@@ -73,9 +81,9 @@ TuningCache::TuningCache(const std::string& cacheFilePath) - - if (needsV1) { - if (!cacheObj.HasMember(version1Marker)) { -- auto newName = rapidjson::Value(version1Marker, cache.GetAllocator()); -+ auto newName = rapidjson::Value(version1Marker, impl->cache.GetAllocator()); - auto newObj = rapidjson::Value(rapidjson::Type::kObjectType); -- cacheObj.AddMember(newName, newObj, cache.GetAllocator()); -+ cacheObj.AddMember(newName, newObj, impl->cache.GetAllocator()); - } - - for (auto it = cacheObj.begin(); it != cacheObj.end();) { -@@ -86,7 +94,7 @@ TuningCache::TuningCache(const std::string& cacheFilePath) - auto newValue = rapidjson::Value(rapidjson::Type::kObjectType); - newName.Swap(member.name); - newValue.Swap(member.value); -- cache[version1Marker].AddMember(newName, newValue, cache.GetAllocator()); -+ impl->cache[version1Marker].AddMember(newName, newValue, impl->cache.GetAllocator()); - it = cacheObj.EraseMember(it); - } else { - it++; -@@ -96,11 +104,11 @@ TuningCache::TuningCache(const std::string& cacheFilePath) - } - - TuningCache::TuningCache() -- : cache() { -- cache.SetObject(); -- auto v2Name = rapidjson::Value(version2Marker, cache.GetAllocator()); -+ : impl(new Impl()) { -+ impl->cache.SetObject(); -+ auto v2Name = rapidjson::Value(version2Marker, impl->cache.GetAllocator()); - auto v2Obj = rapidjson::Value(rapidjson::Type::kObjectType); -- cache.AddMember(v2Name, v2Obj, cache.GetAllocator()); -+ impl->cache.AddMember(v2Name, v2Obj, impl->cache.GetAllocator()); - } - - TuningCache::Entry TuningCache::LoadKernel(const Params& params) { -@@ -129,8 +137,8 @@ TuningCache::Entry TuningCache::LoadKernel_v1(const Params& params, uint32_t com - auto hashStr = std::to_string(create_hash(params.to_string())); - auto computeUnitsStr = std::to_string(computeUnitsCount); - -- auto v1It = cache.FindMember(version1Marker); -- if (v1It == cache.MemberEnd()) -+ auto v1It = impl->cache.FindMember(version1Marker); -+ if (v1It == impl->cache.MemberEnd()) - return result; - - auto computeUnitsIt = v1It->value.FindMember(computeUnitsStr.c_str()); -@@ -152,8 +160,8 @@ TuningCache::Entry TuningCache::LoadKernel_v2(const Params& params, uint32_t com - auto paramStr = params.to_cache_string_v2(); - auto computeUnitsStr = std::to_string(computeUnitsCount); - -- auto v2It = cache.FindMember(version2Marker); -- if (v2It == cache.MemberEnd()) -+ auto v2It = impl->cache.FindMember(version2Marker); -+ if (v2It == impl->cache.MemberEnd()) - return result; - - auto computeUnitsIt = v2It->value.FindMember(computeUnitsStr.c_str()); -diff --git a/src/plugins/intel_gpu/src/kernel_selector/auto_tuner.h b/src/plugins/intel_gpu/src/kernel_selector/auto_tuner.h -index 1a875b7d4d..8a9da81354 100644 ---- a/src/plugins/intel_gpu/src/kernel_selector/auto_tuner.h -+++ b/src/plugins/intel_gpu/src/kernel_selector/auto_tuner.h -@@ -8,12 +8,12 @@ - #include - #include - #include --#include "kernel_selector_common.h" --#include "kernel_selector_params.h" --#include "document.h" - #include - #include - -+#include "kernel_selector_common.h" -+#include "kernel_selector_params.h" -+ - namespace kernel_selector { - - class TuningCache { -@@ -42,7 +42,8 @@ private: - Entry LoadKernel_v1(const Params& params, uint32_t computeUnitsCount); - Entry LoadKernel_v2(const Params& params, uint32_t computeUnitsCount); - -- rapidjson::Document cache; -+ class Impl; -+ std::shared_ptr impl; - - static constexpr const char* version1Marker = "version_1"; - static constexpr const char* version2Marker = "version_2"; -diff --git a/src/plugins/intel_gpu/src/kernel_selector/jitter.cpp b/src/plugins/intel_gpu/src/kernel_selector/jitter.cpp -index fe6ffe8008..106560f5f1 100644 ---- a/src/plugins/intel_gpu/src/kernel_selector/jitter.cpp -+++ b/src/plugins/intel_gpu/src/kernel_selector/jitter.cpp -@@ -1540,11 +1540,11 @@ JitConstants MakeActivationJitConstants(std::vector(SCHAR_MIN))); -- nl_n = toCodeString(std::min(params[i].n, static_cast(SCHAR_MAX))); -+ nl_m = toCodeString(std::max(params[i].m, std::numeric_limits::min())); -+ nl_n = toCodeString(std::min(params[i].n, std::numeric_limits::max())); - } else if (out_dt == Datatype::UINT8) { - nl_m = toCodeString(std::max(params[i].m, 0.0f)); -- nl_n = toCodeString(std::min(params[i].n, static_cast(UCHAR_MAX))); -+ nl_n = toCodeString(std::min(params[i].n, std::numeric_limits::max())); - } - } - auto jitConstants = JitConstants{MakeJitConstant("NL_M" + activation_suffix, nl_m), -@@ -1949,11 +1949,11 @@ JitConstants FusedOpsCodeGenerator::MakeOpJitConstants(const FusedOpsConfigurati - - if (activation_p.function == ActivationFunction::CLAMP) { - if (out_type == Datatype::INT8) { -- nl_m = toCodeString(std::max(activation_p.m, static_cast(SCHAR_MIN))); -- nl_n = toCodeString(std::min(activation_p.n, static_cast(SCHAR_MAX))); -+ nl_m = toCodeString(std::max(activation_p.m, std::numeric_limits::min())); -+ nl_n = toCodeString(std::min(activation_p.n, std::numeric_limits::max())); - } else if (out_type == Datatype::UINT8) { - nl_m = toCodeString(std::max(activation_p.m, 0.0f)); -- nl_n = toCodeString(std::min(activation_p.n, static_cast(UCHAR_MAX))); -+ nl_n = toCodeString(std::min(activation_p.n, std::numeric_limits::max())); - } - } - -diff --git a/src/plugins/intel_gpu/src/kernel_selector/kernel_selector_params.h b/src/plugins/intel_gpu/src/kernel_selector/kernel_selector_params.h -index 5c71c907b7..76e84e558b 100644 ---- a/src/plugins/intel_gpu/src/kernel_selector/kernel_selector_params.h -+++ b/src/plugins/intel_gpu/src/kernel_selector/kernel_selector_params.h -@@ -10,7 +10,6 @@ - #include - #include "common_types.h" - #include "tensor_type.h" --#include "document.h" - #include - #include - #include -diff --git a/src/plugins/intel_gpu/src/runtime/CMakeLists.txt b/src/plugins/intel_gpu/src/runtime/CMakeLists.txt -index c442f65575..321fc2f1b2 100644 ---- a/src/plugins/intel_gpu/src/runtime/CMakeLists.txt -+++ b/src/plugins/intel_gpu/src/runtime/CMakeLists.txt -@@ -64,4 +64,4 @@ elseif((NOT ANDROID) AND (UNIX)) - target_link_libraries(${TARGET_NAME} PRIVATE pthread) - endif() - --ov_install_static_lib(${TARGET_NAME} gpu) -+ov_install_static_lib(${TARGET_NAME} ${OV_CPACK_COMP_CORE}) -diff --git a/src/plugins/intel_gpu/thirdparty/CMakeLists.txt b/src/plugins/intel_gpu/thirdparty/CMakeLists.txt -index c7c616d0df..b7cc810a75 100644 ---- a/src/plugins/intel_gpu/thirdparty/CMakeLists.txt -+++ b/src/plugins/intel_gpu/thirdparty/CMakeLists.txt -@@ -2,14 +2,6 @@ - # SPDX-License-Identifier: Apache-2.0 - # - --add_library(rapidjson INTERFACE) -- --set_target_properties(rapidjson PROPERTIES -- INTERFACE_INCLUDE_DIRECTORIES $ --) -- --ov_install_static_lib(rapidjson gpu) -- - # - # oneDNN for GPU plugin - # -@@ -17,11 +9,12 @@ ov_install_static_lib(rapidjson gpu) - if(ENABLE_ONEDNN_FOR_GPU) - function(build_onednn_gpu) - include(ExternalProject) -- set(ONEDNN_BUILD_DIR "${CMAKE_CURRENT_BINARY_DIR}/onednn_gpu_build/") -- set(ONEDNN_INSTALL_DIR "${CMAKE_CURRENT_BINARY_DIR}/onednn_gpu_install/") -+ set(ONEDNN_BUILD_DIR "${CMAKE_CURRENT_BINARY_DIR}/onednn_gpu_build") -+ set(ONEDNN_INSTALL_DIR "${CMAKE_CURRENT_BINARY_DIR}/onednn_gpu_install" CACHE PATH "Installation path for oneDNN GPU library") - set(ONEDNN_PREFIX_DIR "${CMAKE_CURRENT_BINARY_DIR}/onednn_gpu_root") - set(ONEDNN_ENABLED_PRIMITIVES "CONCAT;CONVOLUTION;DECONVOLUTION;INNER_PRODUCT;MATMUL;REORDER;POOLING;REDUCTION") - set(ONEDNN_ENABLED_ISA "XEHP;XEHPG;XEHPC") -+ set(DNNL_GPU_LIBRARY_NAME "openvino_onednn_gpu" CACHE STRING "Name of oneDNN library for Intel GPU Plugin") - - if(X86_64) - set(ONEDNN_TARGET_ARCH "X64" CACHE STRING "" FORCE) -@@ -87,18 +80,16 @@ if(ENABLE_ONEDNN_FOR_GPU) - list(APPEND cmake_extra_args "-DOpenCL_INCLUDE_DIR=${OpenCL_INCLUDE_DIR}") - endif() - -+ set(onednn_gpu_lib "${CMAKE_STATIC_LIBRARY_PREFIX}${DNNL_GPU_LIBRARY_NAME}${CMAKE_STATIC_LIBRARY_SUFFIX}") -+ set(ONEDNN_GPU_LIB_PATH ${ONEDNN_INSTALL_DIR}/lib/${onednn_gpu_lib} CACHE FILEPATH "Path to oneDNN GPU library") -+ - ExternalProject_Add(onednn_gpu_build -+ # Directory Options: -+ PREFIX "${ONEDNN_PREFIX_DIR}" - SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/onednn_gpu" - BINARY_DIR "${ONEDNN_BUILD_DIR}" - INSTALL_DIR "${ONEDNN_INSTALL_DIR}" -- PREFIX "${ONEDNN_PREFIX_DIR}" -- EXCLUDE_FROM_ALL ON -- CMAKE_CACHE_ARGS -- # The arguments below requires list to be passed as argument -- # which doesn't work properly when passed to CMAKE_ARGS. -- # Thus we pass it via CMAKE_CACHE_ARGS -- "-DDNNL_ENABLE_PRIMITIVE:STRING=${ONEDNN_ENABLED_PRIMITIVES}" -- "-DDNNL_ENABLE_PRIMITIVE_GPU_ISA:STRING=${ONEDNN_ENABLED_ISA}" -+ # Configure Step Options: - CMAKE_ARGS - ${cmake_extra_args} - "-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}" -@@ -112,9 +103,8 @@ if(ENABLE_ONEDNN_FOR_GPU) - "-DDNNL_TARGET_ARCH=${ONEDNN_TARGET_ARCH}" - "-DDNNL_CPU_RUNTIME=NONE" - "-DDNNL_GPU_RUNTIME=OCL" -- "-DDNNL_LIBRARY_NAME=openvino_onednn_gpu" -+ "-DDNNL_LIBRARY_NAME=${DNNL_GPU_LIBRARY_NAME}" - "-DCMAKE_INSTALL_PREFIX=${ONEDNN_INSTALL_DIR}" -- "-DCMAKE_INSTALL_LIBDIR=lib/$" - "-DDNNL_ENABLE_CONCURRENT_EXEC=ON" - "-DDNNL_ENABLE_PRIMITIVE_CACHE=OFF" - "-DDNNL_ENABLE_WORKLOAD=INFERENCE" -@@ -129,16 +119,38 @@ if(ENABLE_ONEDNN_FOR_GPU) - # specifically for Conan, because it overrides CMAKE_PREFIX_PATH and oneDNN's FindOpenCL.cmake is ignored - # Conan's FindOpenCL.cmake module does not set OpenCL_INCLUDE_DIRS, so we need to set it manually - "-DOpenCL_INCLUDE_DIRS=$" -+ # Conan calls cmake with default value for CMP0091, so we have to bypass it to oneDNN build -+ # because we bypass conan_toolchain.cmake via CMAKE_TOOLCHAIN_FILE -+ "-DCMAKE_POLICY_DEFAULT_CMP0091=NEW" -+ CMAKE_CACHE_ARGS -+ # The arguments below requires list to be passed as argument -+ # which doesn't work properly when passed to CMAKE_ARGS. -+ # Thus we pass it via CMAKE_CACHE_ARGS -+ "-DDNNL_ENABLE_PRIMITIVE:STRING=${ONEDNN_ENABLED_PRIMITIVES}" -+ "-DDNNL_ENABLE_PRIMITIVE_GPU_ISA:STRING=${ONEDNN_ENABLED_ISA}" -+ # Build Step Options: -+ BUILD_BYPRODUCTS ${ONEDNN_GPU_LIB_PATH} -+ # Target Options: -+ EXCLUDE_FROM_ALL ON - ) -+ - add_library(onednn_gpu_tgt INTERFACE) - set_target_properties(onednn_gpu_tgt PROPERTIES -- INTERFACE_LINK_DIRECTORIES "${ONEDNN_INSTALL_DIR}/lib/$" -- INTERFACE_LINK_LIBRARIES "openvino_onednn_gpu" -- INTERFACE_INCLUDE_DIRECTORIES "${ONEDNN_INSTALL_DIR}/include" -+ INTERFACE_LINK_LIBRARIES $ -+ INTERFACE_INCLUDE_DIRECTORIES $ - INTERFACE_COMPILE_DEFINITIONS ENABLE_ONEDNN_FOR_GPU - ) - add_dependencies(onednn_gpu_tgt onednn_gpu_build) -- # TODO: install onednn_gpu in static builds -+ -+ if(NOT BUILD_SHARED_LIBS) -+ ov_install_static_lib(onednn_gpu_tgt ${OV_CPACK_COMP_CORE}) -+ -+ # we need to install library explicitly and set_target_properties in OpenVINOConfig.cmake for 'onednn_gpu_tgt' -+ # to point to installation location of this file -+ install(FILES "${ONEDNN_GPU_LIB_PATH}" -+ DESTINATION ${OV_CPACK_ARCHIVEDIR} -+ COMPONENT ${OV_CPACK_COMP_CORE}) -+ endif() - endfunction() - build_onednn_gpu() - endif() -diff --git a/src/plugins/intel_gpu/thirdparty/cmake/rapidjson.cmake b/src/plugins/intel_gpu/thirdparty/cmake/rapidjson.cmake -new file mode 100644 -index 0000000000..655224dbc1 ---- /dev/null -+++ b/src/plugins/intel_gpu/thirdparty/cmake/rapidjson.cmake -@@ -0,0 +1,22 @@ -+# Copyright (C) 2018-2023 Intel Corporation -+# SPDX-License-Identifier: Apache-2.0 -+# -+ -+find_package(RapidJSON QUIET) -+ -+if(NOT TARGET rapidjson) -+ # sometimes RapidJSONConfig.cmake defines only RAPIDJSON_INCLUDE_DIRS -+ add_library(rapidjson INTERFACE) -+ -+ if(RapidJSON_FOUND) -+ if(TARGET RapidJSON) -+ target_link_libraries(rapidjson INTERFACE RapidJSON) -+ elseif(DEFINED RAPIDJSON_INCLUDE_DIRS) -+ target_include_directories(rapidjson INTERFACE $) -+ else() -+ message(FATAL_ERROR "RapidJSON does not define RAPIDJSON_INCLUDE_DIRS nor RapidJSON / rapidjson targets") -+ endif() -+ else() -+ target_include_directories(rapidjson INTERFACE $) -+ endif() -+endif() -diff --git a/src/plugins/template/backend/CMakeLists.txt b/src/plugins/template/backend/CMakeLists.txt -index 7530dd1688..a451fea900 100644 ---- a/src/plugins/template/backend/CMakeLists.txt -+++ b/src/plugins/template/backend/CMakeLists.txt -@@ -52,4 +52,4 @@ openvino_developer_export_targets(COMPONENT core TARGETS interpreter_backend) - - # install - --ov_install_static_lib(interpreter_backend template) -+ov_install_static_lib(interpreter_backend ${OV_CPACK_COMP_CORE}) -diff --git a/src/plugins/template/src/CMakeLists.txt b/src/plugins/template/src/CMakeLists.txt -index 2409bb10e0..f382f90d11 100644 ---- a/src/plugins/template/src/CMakeLists.txt -+++ b/src/plugins/template/src/CMakeLists.txt -@@ -28,7 +28,7 @@ target_include_directories(${TARGET_NAME} PRIVATE - "${CMAKE_CURRENT_SOURCE_DIR}" - "${TEMPLATE_PLUGIN_SOURCE_DIR}/include") - --# link common Inference Engine libraries -+# link common OpenVINO Runtime libraries - target_link_libraries(${TARGET_NAME} PRIVATE - openvino::interpreter_backend - openvino::reference) -@@ -42,4 +42,4 @@ endif() - # [cmake:plugin] - - install(TARGETS ${TARGET_NAME} -- LIBRARY DESTINATION tests COMPONENT tests EXCLUDE_FROM_ALL) -+ LIBRARY DESTINATION tests COMPONENT tests EXCLUDE_FROM_ALL) -diff --git a/thirdparty/ocl/CMakeLists.txt b/thirdparty/ocl/CMakeLists.txt -index f31519467f..0ebe3fd6d1 100644 ---- a/thirdparty/ocl/CMakeLists.txt -+++ b/thirdparty/ocl/CMakeLists.txt -@@ -58,4 +58,4 @@ set(opencl_root_hints "${OpenCL_INCLUDE_DIR}" PARENT_SCOPE) - - # installation - --ov_install_static_lib(OpenCL gpu) -+ov_install_static_lib(OpenCL ${OV_CPACK_COMP_CORE}) diff --git a/recipes/openvino/all/patches/2023.1.0/0004-fixed-gpu-plugin-with-clang.patch b/recipes/openvino/all/patches/2023.1.0/0004-fixed-gpu-plugin-with-clang.patch deleted file mode 100644 index 7659f10e22501..0000000000000 --- a/recipes/openvino/all/patches/2023.1.0/0004-fixed-gpu-plugin-with-clang.patch +++ /dev/null @@ -1,2836 +0,0 @@ -diff --git a/src/plugins/intel_gpu/include/intel_gpu/graph/serialization/binary_buffer.hpp b/src/plugins/intel_gpu/include/intel_gpu/graph/serialization/binary_buffer.hpp -index 9386e52400..05972d7a97 100644 ---- a/src/plugins/intel_gpu/include/intel_gpu/graph/serialization/binary_buffer.hpp -+++ b/src/plugins/intel_gpu/include/intel_gpu/graph/serialization/binary_buffer.hpp -@@ -104,12 +104,10 @@ public: - - #define ASSIGN_TYPE_NAME(cls_name) \ - namespace cldnn { \ -- const std::string cls_name::type_for_serialization = #cls_name; \ - } - - #define BIND_BINARY_BUFFER_WITH_TYPE(cls_name) \ - namespace cldnn { \ -- const std::string cls_name::type_for_serialization = #cls_name; \ - BIND_TO_BUFFER(BinaryOutputBuffer, cls_name) \ - BIND_TO_BUFFER(BinaryInputBuffer, cls_name) \ - } -diff --git a/src/plugins/intel_gpu/include/intel_gpu/graph/serialization/bind.hpp b/src/plugins/intel_gpu/include/intel_gpu/graph/serialization/bind.hpp -index 85ed3fa803..e2a673f0ba 100644 ---- a/src/plugins/intel_gpu/include/intel_gpu/graph/serialization/bind.hpp -+++ b/src/plugins/intel_gpu/include/intel_gpu/graph/serialization/bind.hpp -@@ -11,9 +11,12 @@ - #include "buffer.hpp" - #include "static_instance.hpp" - --#define DECLARE_OBJECT_TYPE_SERIALIZATION \ -- static const std::string type_for_serialization; \ -- std::string get_type() const override { return type_for_serialization; } -+#define DECLARE_OBJECT_TYPE_SERIALIZATION(cls_name) \ -+ static const std::string& get_type_info_s() { \ -+ static const std::string type_name = #cls_name; \ -+ return type_name; \ -+ } \ -+ const std::string& get_type_info() const override { return get_type_info_s(); } - - #define BIND_TO_BUFFER(buffer, type) \ - template <> \ -@@ -101,7 +104,7 @@ public: - - private: - buffer_binder() { -- saver_storage::instance().set_save_function({T::type_for_serialization, save}); -+ saver_storage::instance().set_save_function({T::get_type_info_s(), save}); - } - - buffer_binder(const buffer_binder&) = delete; -@@ -130,7 +133,7 @@ public: - private: - buffer_binder() { - def::instance().set_load_function( -- {T::type_for_serialization, [](BufferType& buffer, std::unique_ptr>& result_ptr) { -+ {T::get_type_info_s(), [](BufferType& buffer, std::unique_ptr>& result_ptr) { - std::unique_ptr derived_ptr = std::unique_ptr(new T()); - derived_ptr->load(buffer); - result_ptr.reset(derived_ptr.release()); -@@ -153,7 +156,7 @@ public: - private: - buffer_binder() { - dif::instance().set_load_function( -- {T::type_for_serialization, [](BufferType& buffer, std::unique_ptr>& result_ptr, engine& engine) { -+ {T::get_type_info_s(), [](BufferType& buffer, std::unique_ptr>& result_ptr, engine& engine) { - std::unique_ptr derived_ptr = std::unique_ptr(new T(engine)); - derived_ptr->load(buffer); - result_ptr.reset(derived_ptr.release()); -diff --git a/src/plugins/intel_gpu/include/intel_gpu/graph/serialization/polymorphic_serializer.hpp b/src/plugins/intel_gpu/include/intel_gpu/graph/serialization/polymorphic_serializer.hpp -index 023045b9bd..1792f5489c 100644 ---- a/src/plugins/intel_gpu/include/intel_gpu/graph/serialization/polymorphic_serializer.hpp -+++ b/src/plugins/intel_gpu/include/intel_gpu/graph/serialization/polymorphic_serializer.hpp -@@ -18,7 +18,7 @@ template - class Serializer, typename std::enable_if, BufferType>::value>::type> { - public: - static void save(BufferType& buffer, const std::unique_ptr& ptr) { -- const auto& type = ptr->get_type(); -+ const auto& type = ptr->get_type_info(); - buffer << type; - const auto save_func = saver_storage::instance().get_save_function(type); - save_func(buffer, ptr.get()); -@@ -51,7 +51,7 @@ template - class Serializer, typename std::enable_if, BufferType>::value>::type> { - public: - static void save(BufferType& buffer, const std::shared_ptr& ptr) { -- const std::string& type = ptr->get_type(); -+ const std::string& type = ptr->get_type_info(); - buffer << type; - if (type.compare("NONE") != 0) { - const auto save_func = saver_storage::instance().get_save_function(type); -diff --git a/src/plugins/intel_gpu/include/intel_gpu/primitives/activation.hpp b/src/plugins/intel_gpu/include/intel_gpu/primitives/activation.hpp -index 09a3f96a98..771f1b9191 100644 ---- a/src/plugins/intel_gpu/include/intel_gpu/primitives/activation.hpp -+++ b/src/plugins/intel_gpu/include/intel_gpu/primitives/activation.hpp -@@ -82,8 +82,6 @@ struct activation : public primitive_base { - activation_function(activation_func::none), - additional_params({0.f, 0.f}) {} - -- DECLARE_OBJECT_TYPE_SERIALIZATION -- - /// @brief Constructs Relu primitive. - /// @param id This primitive id. - /// @param input Input primitive id. -diff --git a/src/plugins/intel_gpu/include/intel_gpu/primitives/adaptive_pooling.hpp b/src/plugins/intel_gpu/include/intel_gpu/primitives/adaptive_pooling.hpp -index e54b055312..f80d7b3c62 100644 ---- a/src/plugins/intel_gpu/include/intel_gpu/primitives/adaptive_pooling.hpp -+++ b/src/plugins/intel_gpu/include/intel_gpu/primitives/adaptive_pooling.hpp -@@ -20,8 +20,6 @@ struct adaptive_pooling : public primitive_base { - mode{adaptive_pooling_mode::average}, - output_size{} {} - -- DECLARE_OBJECT_TYPE_SERIALIZATION -- - /// @brief Constructs AdaptiveAvgPooling primitive. - /// @param id This primitive id. - /// @param input Input primitive id. -diff --git a/src/plugins/intel_gpu/include/intel_gpu/primitives/arg_max_min.hpp b/src/plugins/intel_gpu/include/intel_gpu/primitives/arg_max_min.hpp -index 16ca38e746..418f8df90d 100644 ---- a/src/plugins/intel_gpu/include/intel_gpu/primitives/arg_max_min.hpp -+++ b/src/plugins/intel_gpu/include/intel_gpu/primitives/arg_max_min.hpp -@@ -27,8 +27,6 @@ struct arg_max_min : public primitive_base { - values_first(false), - stable(false) {} - -- DECLARE_OBJECT_TYPE_SERIALIZATION -- - /// @brief Constructs arg_max_min primitive. - /// @param id This primitive id. - /// @param input Input primitive id. -diff --git a/src/plugins/intel_gpu/include/intel_gpu/primitives/assign.hpp b/src/plugins/intel_gpu/include/intel_gpu/primitives/assign.hpp -index 1c4021a77d..4134614504 100644 ---- a/src/plugins/intel_gpu/include/intel_gpu/primitives/assign.hpp -+++ b/src/plugins/intel_gpu/include/intel_gpu/primitives/assign.hpp -@@ -17,8 +17,6 @@ struct assign : public primitive_base { - - assign() : primitive_base("", {}) {} - -- DECLARE_OBJECT_TYPE_SERIALIZATION -- - /// @brief Constructs Assign primitive. - /// @param id This primitive id - /// @param inputs Input parameters ids -diff --git a/src/plugins/intel_gpu/include/intel_gpu/primitives/batch_to_space.hpp b/src/plugins/intel_gpu/include/intel_gpu/primitives/batch_to_space.hpp -index fab49940fb..246853a5f3 100644 ---- a/src/plugins/intel_gpu/include/intel_gpu/primitives/batch_to_space.hpp -+++ b/src/plugins/intel_gpu/include/intel_gpu/primitives/batch_to_space.hpp -@@ -42,8 +42,6 @@ struct batch_to_space : public primitive_base { - - batch_to_space() : primitive_base("", {}) {} - -- DECLARE_OBJECT_TYPE_SERIALIZATION -- - /// @brief Constructs batch_to_space primitive. - /// @param id This primitive id. - /// @param input Input data primitive id. -diff --git a/src/plugins/intel_gpu/include/intel_gpu/primitives/binary_convolution.hpp b/src/plugins/intel_gpu/include/intel_gpu/primitives/binary_convolution.hpp -index 268f78e73a..5ba028bda7 100644 ---- a/src/plugins/intel_gpu/include/intel_gpu/primitives/binary_convolution.hpp -+++ b/src/plugins/intel_gpu/include/intel_gpu/primitives/binary_convolution.hpp -@@ -16,8 +16,6 @@ struct binary_convolution : public primitive_base { - - binary_convolution() : primitive_base("", {}) {} - -- DECLARE_OBJECT_TYPE_SERIALIZATION -- - /// @brief Constructs binary_convolution primitive. - /// @param id This primitive id. - /// @param input Input primitive id. -diff --git a/src/plugins/intel_gpu/include/intel_gpu/primitives/border.hpp b/src/plugins/intel_gpu/include/intel_gpu/primitives/border.hpp -index def9b956ff..81ad97a196 100644 ---- a/src/plugins/intel_gpu/include/intel_gpu/primitives/border.hpp -+++ b/src/plugins/intel_gpu/include/intel_gpu/primitives/border.hpp -@@ -26,8 +26,6 @@ struct border : public primitive_base { - - border() : primitive_base("", {}) {} - -- DECLARE_OBJECT_TYPE_SERIALIZATION -- - /// @brief whether the input is const or not - enum PAD_NON_CONST_INPUT { - BEGIN = 0x1, -diff --git a/src/plugins/intel_gpu/include/intel_gpu/primitives/broadcast.hpp b/src/plugins/intel_gpu/include/intel_gpu/primitives/broadcast.hpp -index 3b210c7b94..d3b17919a4 100644 ---- a/src/plugins/intel_gpu/include/intel_gpu/primitives/broadcast.hpp -+++ b/src/plugins/intel_gpu/include/intel_gpu/primitives/broadcast.hpp -@@ -56,8 +56,6 @@ struct broadcast : public primitive_base { - - broadcast() : primitive_base("", {}) {} - -- DECLARE_OBJECT_TYPE_SERIALIZATION -- - /// @brief Constructs broadcast primitive / layer. - /// - /// @param id An identifier of new primitive. -diff --git a/src/plugins/intel_gpu/include/intel_gpu/primitives/bucketize.hpp b/src/plugins/intel_gpu/include/intel_gpu/primitives/bucketize.hpp -index 11e7f8752e..dd5b8f3d93 100644 ---- a/src/plugins/intel_gpu/include/intel_gpu/primitives/bucketize.hpp -+++ b/src/plugins/intel_gpu/include/intel_gpu/primitives/bucketize.hpp -@@ -13,8 +13,6 @@ struct bucketize : primitive_base { - - bucketize() : primitive_base("", {}) {} - -- DECLARE_OBJECT_TYPE_SERIALIZATION -- - /// @brief Constructs bucketize primitive. - /// @param id This primitive id. - /// @param inputs Input primitives ids. -diff --git a/src/plugins/intel_gpu/include/intel_gpu/primitives/concatenation.hpp b/src/plugins/intel_gpu/include/intel_gpu/primitives/concatenation.hpp -index 184dbf9ceb..5f187c7422 100644 ---- a/src/plugins/intel_gpu/include/intel_gpu/primitives/concatenation.hpp -+++ b/src/plugins/intel_gpu/include/intel_gpu/primitives/concatenation.hpp -@@ -35,8 +35,6 @@ struct concatenation : public primitive_base { - - concatenation() : primitive_base("", {}) {} - -- DECLARE_OBJECT_TYPE_SERIALIZATION -- - /// @li Constructs concatenation primitive. - /// @param id This primitive id. - /// @param input Vector of input primitives ids. -diff --git a/src/plugins/intel_gpu/include/intel_gpu/primitives/convert_color.hpp b/src/plugins/intel_gpu/include/intel_gpu/primitives/convert_color.hpp -index f1cd6e1934..f71e73310a 100644 ---- a/src/plugins/intel_gpu/include/intel_gpu/primitives/convert_color.hpp -+++ b/src/plugins/intel_gpu/include/intel_gpu/primitives/convert_color.hpp -@@ -14,8 +14,6 @@ struct convert_color : public primitive_base { - - convert_color() : primitive_base("", {}) {} - -- DECLARE_OBJECT_TYPE_SERIALIZATION -- - enum color_format : uint32_t { - RGB, ///< RGB color format - BGR, ///< BGR color format, default in OpenVINO -diff --git a/src/plugins/intel_gpu/include/intel_gpu/primitives/convolution.hpp b/src/plugins/intel_gpu/include/intel_gpu/primitives/convolution.hpp -index 01291816b1..0a15e6a146 100644 ---- a/src/plugins/intel_gpu/include/intel_gpu/primitives/convolution.hpp -+++ b/src/plugins/intel_gpu/include/intel_gpu/primitives/convolution.hpp -@@ -15,8 +15,6 @@ struct convolution : public primitive_base { - - convolution() : primitive_base("", {}) {} - -- DECLARE_OBJECT_TYPE_SERIALIZATION -- - /// @brief Constructs convolution primitive - /// @param id This primitive id. - /// @param input Input primitive id. -@@ -313,8 +311,6 @@ struct deformable_interp : public primitive_base { - - deformable_interp() : primitive_base("", {}) {} - -- DECLARE_OBJECT_TYPE_SERIALIZATION -- - deformable_interp(const primitive_id& id, - const std::vector& inputs, - uint32_t groups, -@@ -430,8 +426,6 @@ struct deformable_conv : public primitive_base { - - deformable_conv() : primitive_base("", {}) {} - -- DECLARE_OBJECT_TYPE_SERIALIZATION -- - deformable_conv(const primitive_id& id, - const input_info& input, - const std::vector& weights, -diff --git a/src/plugins/intel_gpu/include/intel_gpu/primitives/crop.hpp b/src/plugins/intel_gpu/include/intel_gpu/primitives/crop.hpp -index 5c944b75d1..b8935695b2 100644 ---- a/src/plugins/intel_gpu/include/intel_gpu/primitives/crop.hpp -+++ b/src/plugins/intel_gpu/include/intel_gpu/primitives/crop.hpp -@@ -46,8 +46,6 @@ struct crop : public primitive_base { - - crop() : primitive_base("", {}) {} - -- DECLARE_OBJECT_TYPE_SERIALIZATION -- - /// @brief Constructs crop primitive. - /// @param id This primitive id. - /// @param input Input primitive id. -diff --git a/src/plugins/intel_gpu/include/intel_gpu/primitives/ctc_greedy_decoder.hpp b/src/plugins/intel_gpu/include/intel_gpu/primitives/ctc_greedy_decoder.hpp -index 9c911243d5..2cf19ca58c 100644 ---- a/src/plugins/intel_gpu/include/intel_gpu/primitives/ctc_greedy_decoder.hpp -+++ b/src/plugins/intel_gpu/include/intel_gpu/primitives/ctc_greedy_decoder.hpp -@@ -13,8 +13,6 @@ struct ctc_greedy_decoder : public primitive_base { - - ctc_greedy_decoder() : primitive_base("", {}) {} - -- DECLARE_OBJECT_TYPE_SERIALIZATION -- - /// @brief Constructs ctc_greedy_decoder primitive. - /// @param id This primitive id. - /// @param input Input primitive id (input, sequence_indicators, second_output(optional)). -diff --git a/src/plugins/intel_gpu/include/intel_gpu/primitives/ctc_loss.hpp b/src/plugins/intel_gpu/include/intel_gpu/primitives/ctc_loss.hpp -index 0d63027cf7..55cc934195 100644 ---- a/src/plugins/intel_gpu/include/intel_gpu/primitives/ctc_loss.hpp -+++ b/src/plugins/intel_gpu/include/intel_gpu/primitives/ctc_loss.hpp -@@ -15,8 +15,6 @@ struct ctc_loss : primitive_base { - - ctc_loss() : primitive_base("", {}) {} - -- DECLARE_OBJECT_TYPE_SERIALIZATION -- - /// @brief Constructs ctc_loss primitive. - /// @param id This primitive id. - /// @param inputs Input primitives ids. -diff --git a/src/plugins/intel_gpu/include/intel_gpu/primitives/cum_sum.hpp b/src/plugins/intel_gpu/include/intel_gpu/primitives/cum_sum.hpp -index 4a038714d7..11bd653d4c 100644 ---- a/src/plugins/intel_gpu/include/intel_gpu/primitives/cum_sum.hpp -+++ b/src/plugins/intel_gpu/include/intel_gpu/primitives/cum_sum.hpp -@@ -6,15 +6,11 @@ - #include "primitive.hpp" - - namespace cldnn { -- -- - struct cum_sum : public primitive_base { - CLDNN_DECLARE_PRIMITIVE(cum_sum) - - cum_sum() : primitive_base("", {}) {} - -- DECLARE_OBJECT_TYPE_SERIALIZATION -- - /// @brief Constructs cum_sum primitive. - /// @param id This primitive id. - /// @param input Input primitive id. -diff --git a/src/plugins/intel_gpu/include/intel_gpu/primitives/custom_gpu_primitive.hpp b/src/plugins/intel_gpu/include/intel_gpu/primitives/custom_gpu_primitive.hpp -index a938e2c0ff..62dafc4ce4 100644 ---- a/src/plugins/intel_gpu/include/intel_gpu/primitives/custom_gpu_primitive.hpp -+++ b/src/plugins/intel_gpu/include/intel_gpu/primitives/custom_gpu_primitive.hpp -@@ -18,8 +18,6 @@ struct custom_gpu_primitive : public primitive_base { - - custom_gpu_primitive() : primitive_base("", {}) {} - -- DECLARE_OBJECT_TYPE_SERIALIZATION -- - /// @brief Custom primitive kernel argument type - enum arg_type { - arg_input, -diff --git a/src/plugins/intel_gpu/include/intel_gpu/primitives/data.hpp b/src/plugins/intel_gpu/include/intel_gpu/primitives/data.hpp -index 8a89005102..177fbf99b7 100644 ---- a/src/plugins/intel_gpu/include/intel_gpu/primitives/data.hpp -+++ b/src/plugins/intel_gpu/include/intel_gpu/primitives/data.hpp -@@ -17,8 +17,6 @@ struct data : public primitive_base { - - data() : primitive_base("", {}) {} - -- DECLARE_OBJECT_TYPE_SERIALIZATION -- - /// @brief Constructs data primitive. - /// @param id This primitive id. - /// @param mem @ref memory object which contains data. -diff --git a/src/plugins/intel_gpu/include/intel_gpu/primitives/deconvolution.hpp b/src/plugins/intel_gpu/include/intel_gpu/primitives/deconvolution.hpp -index b149539bb6..5c507a2360 100644 ---- a/src/plugins/intel_gpu/include/intel_gpu/primitives/deconvolution.hpp -+++ b/src/plugins/intel_gpu/include/intel_gpu/primitives/deconvolution.hpp -@@ -20,8 +20,6 @@ struct deconvolution : public primitive_base { - - deconvolution() : primitive_base("", {}) {} - -- DECLARE_OBJECT_TYPE_SERIALIZATION -- - /// @brief Constructs deconvolution primitive. - /// @param id This primitive id. - /// @param input Input primitive id. -diff --git a/src/plugins/intel_gpu/include/intel_gpu/primitives/depth_to_space.hpp b/src/plugins/intel_gpu/include/intel_gpu/primitives/depth_to_space.hpp -index 6d1c430d91..577be63765 100644 ---- a/src/plugins/intel_gpu/include/intel_gpu/primitives/depth_to_space.hpp -+++ b/src/plugins/intel_gpu/include/intel_gpu/primitives/depth_to_space.hpp -@@ -22,8 +22,6 @@ struct depth_to_space : public primitive_base { - - depth_to_space() : primitive_base("", {}) {} - -- DECLARE_OBJECT_TYPE_SERIALIZATION -- - /// @brief Constructs depth_to_space primitive. - /// @param id This primitive id. - /// @param input Input dictionary primitive id. -diff --git a/src/plugins/intel_gpu/include/intel_gpu/primitives/detection_output.hpp b/src/plugins/intel_gpu/include/intel_gpu/primitives/detection_output.hpp -index 7437106428..3c39a83963 100644 ---- a/src/plugins/intel_gpu/include/intel_gpu/primitives/detection_output.hpp -+++ b/src/plugins/intel_gpu/include/intel_gpu/primitives/detection_output.hpp -@@ -42,8 +42,6 @@ struct detection_output : public primitive_base { - clip_after_nms(false), - objectness_score(0.0f) {} - -- DECLARE_OBJECT_TYPE_SERIALIZATION -- - /// @brief Constructs detection output primitive. - /// @param id This primitive id. - /// @param inputs Inputs for primitive id. -diff --git a/src/plugins/intel_gpu/include/intel_gpu/primitives/dft.hpp b/src/plugins/intel_gpu/include/intel_gpu/primitives/dft.hpp -index 45042ad94b..329794e088 100644 ---- a/src/plugins/intel_gpu/include/intel_gpu/primitives/dft.hpp -+++ b/src/plugins/intel_gpu/include/intel_gpu/primitives/dft.hpp -@@ -29,8 +29,6 @@ struct dft : public primitive_base { - - dft() : primitive_base("", {}) {} - -- DECLARE_OBJECT_TYPE_SERIALIZATION -- - /// @brief Constructs DFT primitive. - /// @param id This primitive id. - /// @param input Input primitive id. -diff --git a/src/plugins/intel_gpu/include/intel_gpu/primitives/eltwise.hpp b/src/plugins/intel_gpu/include/intel_gpu/primitives/eltwise.hpp -index de1e4138c3..b4b9e8932d 100644 ---- a/src/plugins/intel_gpu/include/intel_gpu/primitives/eltwise.hpp -+++ b/src/plugins/intel_gpu/include/intel_gpu/primitives/eltwise.hpp -@@ -71,8 +71,6 @@ struct eltwise : public primitive_base { - - eltwise() : primitive_base("", {}) {} - -- DECLARE_OBJECT_TYPE_SERIALIZATION -- - /// @brief Constructs eltwise primitive. - /// @param id This primitive id. - /// @param input Input primitive id. -diff --git a/src/plugins/intel_gpu/include/intel_gpu/primitives/embedding_bag.hpp b/src/plugins/intel_gpu/include/intel_gpu/primitives/embedding_bag.hpp -index c749c3b5e2..29b3259b50 100644 ---- a/src/plugins/intel_gpu/include/intel_gpu/primitives/embedding_bag.hpp -+++ b/src/plugins/intel_gpu/include/intel_gpu/primitives/embedding_bag.hpp -@@ -14,8 +14,6 @@ struct embedding_bag : public primitive_base { - - embedding_bag() : primitive_base("", {}) {} - -- DECLARE_OBJECT_TYPE_SERIALIZATION -- - /// @brief Select type of embedding_bag operation - enum embedding_bag_type { - packed_sum, -diff --git a/src/plugins/intel_gpu/include/intel_gpu/primitives/experimental_detectron_detection_output.hpp b/src/plugins/intel_gpu/include/intel_gpu/primitives/experimental_detectron_detection_output.hpp -index cb47ec86f5..f87b161e48 100644 ---- a/src/plugins/intel_gpu/include/intel_gpu/primitives/experimental_detectron_detection_output.hpp -+++ b/src/plugins/intel_gpu/include/intel_gpu/primitives/experimental_detectron_detection_output.hpp -@@ -16,8 +16,6 @@ struct experimental_detectron_detection_output : public primitive_base { -@@ -17,8 +15,6 @@ struct experimental_detectron_prior_grid_generator - - experimental_detectron_prior_grid_generator() : primitive_base("", {}) {} - -- DECLARE_OBJECT_TYPE_SERIALIZATION -- - experimental_detectron_prior_grid_generator(const primitive_id& id, - const std::vector& inputs, - bool flatten, -diff --git a/src/plugins/intel_gpu/include/intel_gpu/primitives/experimental_detectron_roi_feature_extractor.hpp b/src/plugins/intel_gpu/include/intel_gpu/primitives/experimental_detectron_roi_feature_extractor.hpp -index a9b27fd16f..3a1e229171 100644 ---- a/src/plugins/intel_gpu/include/intel_gpu/primitives/experimental_detectron_roi_feature_extractor.hpp -+++ b/src/plugins/intel_gpu/include/intel_gpu/primitives/experimental_detectron_roi_feature_extractor.hpp -@@ -14,8 +14,6 @@ struct experimental_detectron_roi_feature_extractor : public primitive_base { -@@ -19,8 +17,6 @@ struct experimental_detectron_topk_rois : public primitive_base { - - extract_image_patches() : primitive_base("", {}) {} - -- DECLARE_OBJECT_TYPE_SERIALIZATION -- - /// @brief Constructs select primitive. - /// @param id This primitive id. - /// @param input Input primitive id containing input 4-D tensor. -diff --git a/src/plugins/intel_gpu/include/intel_gpu/primitives/eye.hpp b/src/plugins/intel_gpu/include/intel_gpu/primitives/eye.hpp -index 4137aaa2ec..9cc2c9e083 100644 ---- a/src/plugins/intel_gpu/include/intel_gpu/primitives/eye.hpp -+++ b/src/plugins/intel_gpu/include/intel_gpu/primitives/eye.hpp -@@ -14,8 +14,6 @@ struct eye : public primitive_base { - - eye() : primitive_base("", {}) {} - -- DECLARE_OBJECT_TYPE_SERIALIZATION -- - /// @brief Constructs eye primitive. - /// @param id This primitive id. - /// @param inputs List of primitive ids. -diff --git a/src/plugins/intel_gpu/include/intel_gpu/primitives/fully_connected.hpp b/src/plugins/intel_gpu/include/intel_gpu/primitives/fully_connected.hpp -index d71afd76f1..ba05829539 100644 ---- a/src/plugins/intel_gpu/include/intel_gpu/primitives/fully_connected.hpp -+++ b/src/plugins/intel_gpu/include/intel_gpu/primitives/fully_connected.hpp -@@ -35,8 +35,6 @@ struct fully_connected : public primitive_base { - - fully_connected() : primitive_base("", {}) {} - -- DECLARE_OBJECT_TYPE_SERIALIZATION -- - /// @brief Constructs fully connected layer. - /// @param id This primitive id. - /// @param input Input primitive id. -diff --git a/src/plugins/intel_gpu/include/intel_gpu/primitives/gather.hpp b/src/plugins/intel_gpu/include/intel_gpu/primitives/gather.hpp -index f754d47667..2a7dad7fe4 100644 ---- a/src/plugins/intel_gpu/include/intel_gpu/primitives/gather.hpp -+++ b/src/plugins/intel_gpu/include/intel_gpu/primitives/gather.hpp -@@ -16,8 +16,6 @@ struct gather : public primitive_base { - - gather() : primitive_base("", {}) {} - -- DECLARE_OBJECT_TYPE_SERIALIZATION -- - /// @brief Constructs gather primitive. - /// @param id This primitive id. - /// @param dict Input dictionary primitive id. -diff --git a/src/plugins/intel_gpu/include/intel_gpu/primitives/gather_elements.hpp b/src/plugins/intel_gpu/include/intel_gpu/primitives/gather_elements.hpp -index 0287a76877..455a40a9ea 100644 ---- a/src/plugins/intel_gpu/include/intel_gpu/primitives/gather_elements.hpp -+++ b/src/plugins/intel_gpu/include/intel_gpu/primitives/gather_elements.hpp -@@ -14,8 +14,6 @@ struct gather_elements : public primitive_base { - - gather_elements() : primitive_base("", {}), output_format({}) {} - -- DECLARE_OBJECT_TYPE_SERIALIZATION -- - /// @brief Constructs gather_elements primitive. - /// @param id This primitive id. - /// @param data Input data primitive id. -diff --git a/src/plugins/intel_gpu/include/intel_gpu/primitives/gather_nd.hpp b/src/plugins/intel_gpu/include/intel_gpu/primitives/gather_nd.hpp -index 932fe0b167..a2c26b0545 100644 ---- a/src/plugins/intel_gpu/include/intel_gpu/primitives/gather_nd.hpp -+++ b/src/plugins/intel_gpu/include/intel_gpu/primitives/gather_nd.hpp -@@ -14,8 +14,6 @@ struct gather_nd : public primitive_base { - - gather_nd() : primitive_base("", {}) {} - -- DECLARE_OBJECT_TYPE_SERIALIZATION -- - /// @brief Constructs gather_nd primitive. - /// - /// @param id This primitive id. -diff --git a/src/plugins/intel_gpu/include/intel_gpu/primitives/gather_tree.hpp b/src/plugins/intel_gpu/include/intel_gpu/primitives/gather_tree.hpp -index 5ec3339801..082b4113ab 100644 ---- a/src/plugins/intel_gpu/include/intel_gpu/primitives/gather_tree.hpp -+++ b/src/plugins/intel_gpu/include/intel_gpu/primitives/gather_tree.hpp -@@ -15,8 +15,6 @@ struct gather_tree : public primitive_base { - - gather_tree() : primitive_base("", {}) {} - -- DECLARE_OBJECT_TYPE_SERIALIZATION -- - /// @brief Constructs gather tree primitive / layer. - /// - /// @param id An identifier of new primitive. -diff --git a/src/plugins/intel_gpu/include/intel_gpu/primitives/gemm.hpp b/src/plugins/intel_gpu/include/intel_gpu/primitives/gemm.hpp -index 104b92571c..cef11bbb0b 100644 ---- a/src/plugins/intel_gpu/include/intel_gpu/primitives/gemm.hpp -+++ b/src/plugins/intel_gpu/include/intel_gpu/primitives/gemm.hpp -@@ -27,8 +27,6 @@ struct gemm : public primitive_base { - - gemm() : primitive_base("", {}) {} - -- DECLARE_OBJECT_TYPE_SERIALIZATION -- - /// @brief Constructs gemm layer. - /// @brief Primitive id containing first matrix - /// @brief Primitive id containing second matrix -diff --git a/src/plugins/intel_gpu/include/intel_gpu/primitives/generate_proposals.hpp b/src/plugins/intel_gpu/include/intel_gpu/primitives/generate_proposals.hpp -index ab57e07d0d..3524c104fd 100644 ---- a/src/plugins/intel_gpu/include/intel_gpu/primitives/generate_proposals.hpp -+++ b/src/plugins/intel_gpu/include/intel_gpu/primitives/generate_proposals.hpp -@@ -15,8 +15,6 @@ struct generate_proposals - - generate_proposals() : primitive_base("", {}) {} - -- DECLARE_OBJECT_TYPE_SERIALIZATION -- - /// @brief Constructs generate_proposals primitive - /// @param id This primitive id - /// @param input_im_info image size info -diff --git a/src/plugins/intel_gpu/include/intel_gpu/primitives/grid_sample.hpp b/src/plugins/intel_gpu/include/intel_gpu/primitives/grid_sample.hpp -index 700140c9d2..20e308e4aa 100644 ---- a/src/plugins/intel_gpu/include/intel_gpu/primitives/grid_sample.hpp -+++ b/src/plugins/intel_gpu/include/intel_gpu/primitives/grid_sample.hpp -@@ -10,8 +10,6 @@ - #include "primitive.hpp" - - namespace cldnn { -- -- - using GridSampleOp = ov::op::v9::GridSample; - - /// @brief GridSample-9 primitive. -@@ -20,8 +18,6 @@ struct grid_sample : primitive_base { - - grid_sample() : primitive_base("", {}) {} - -- DECLARE_OBJECT_TYPE_SERIALIZATION -- - /// @brief Constructs grid_sample primitive. - /// @param id This primitive id. - /// @param inputs Input primitives ids. -diff --git a/src/plugins/intel_gpu/include/intel_gpu/primitives/grn.hpp b/src/plugins/intel_gpu/include/intel_gpu/primitives/grn.hpp -index cda1ebe160..3b629bad91 100644 ---- a/src/plugins/intel_gpu/include/intel_gpu/primitives/grn.hpp -+++ b/src/plugins/intel_gpu/include/intel_gpu/primitives/grn.hpp -@@ -13,8 +13,6 @@ struct grn : public primitive_base { - - grn() : primitive_base("", {}) {} - -- DECLARE_OBJECT_TYPE_SERIALIZATION -- - /// @brief Constructs grn primitive. - /// @param id This primitive id. - /// @param input Input primitive id. -diff --git a/src/plugins/intel_gpu/include/intel_gpu/primitives/input_layout.hpp b/src/plugins/intel_gpu/include/intel_gpu/primitives/input_layout.hpp -index c13e89a3a5..5cbba06ca4 100644 ---- a/src/plugins/intel_gpu/include/intel_gpu/primitives/input_layout.hpp -+++ b/src/plugins/intel_gpu/include/intel_gpu/primitives/input_layout.hpp -@@ -20,8 +20,6 @@ struct input_layout : public primitive_base { - - input_layout() : primitive_base("", {}) {} - -- DECLARE_OBJECT_TYPE_SERIALIZATION -- - /// @brief Constructs input layout primitive. - /// @param id This primitive id. - /// @param layout Defines layout for the data will be passed to network. -diff --git a/src/plugins/intel_gpu/include/intel_gpu/primitives/loop.hpp b/src/plugins/intel_gpu/include/intel_gpu/primitives/loop.hpp -index 49af132862..c27a88e197 100644 ---- a/src/plugins/intel_gpu/include/intel_gpu/primitives/loop.hpp -+++ b/src/plugins/intel_gpu/include/intel_gpu/primitives/loop.hpp -@@ -55,8 +55,6 @@ struct loop : public primitive_base { - loop() : primitive_base("", {}), - max_iteration(0) {} - -- DECLARE_OBJECT_TYPE_SERIALIZATION -- - struct io_primitive_map { - /// @brief Constructs a mapping from external input/output primitive to input/output primitive in body topology - /// -diff --git a/src/plugins/intel_gpu/include/intel_gpu/primitives/lrn.hpp b/src/plugins/intel_gpu/include/intel_gpu/primitives/lrn.hpp -index 28bcf69147..f8cc1672e7 100644 ---- a/src/plugins/intel_gpu/include/intel_gpu/primitives/lrn.hpp -+++ b/src/plugins/intel_gpu/include/intel_gpu/primitives/lrn.hpp -@@ -6,8 +6,6 @@ - #include "primitive.hpp" - - namespace cldnn { -- -- - typedef enum { /*:int32_t*/ - lrn_norm_region_across_channel, - lrn_norm_region_within_channel -@@ -29,8 +27,6 @@ struct lrn : public primitive_base { - - lrn() : primitive_base("", {}) {} - -- DECLARE_OBJECT_TYPE_SERIALIZATION -- - /// @brief Constructs LRN primitive. - /// @param id This primitive id. - /// @param input Input primitive id. -diff --git a/src/plugins/intel_gpu/include/intel_gpu/primitives/lstm.hpp b/src/plugins/intel_gpu/include/intel_gpu/primitives/lstm.hpp -index 7c601158d8..71922acd21 100644 ---- a/src/plugins/intel_gpu/include/intel_gpu/primitives/lstm.hpp -+++ b/src/plugins/intel_gpu/include/intel_gpu/primitives/lstm.hpp -@@ -53,8 +53,6 @@ struct lstm : public primitive_base { - - lstm() : primitive_base("", {}) {} - -- DECLARE_OBJECT_TYPE_SERIALIZATION -- - /// @brief Constructs lstm layer. - /// @param id This primitive id. - /// @param input Vector of primitive id. -@@ -230,8 +228,6 @@ struct lstm_gemm : public primitive_base { - lstm_gemm() : primitive_base("", {}), - direction(0) {} - -- DECLARE_OBJECT_TYPE_SERIALIZATION -- - /// @brief Constructs lstm layer. - /// @param id This primitive id. - /// @param input input primitive id. -@@ -319,8 +315,6 @@ struct lstm_elt : public primitive_base { - - lstm_elt() : primitive_base("", {}), clip(0), input_forget(0), offset_order(lstm_weights_order::iofz), direction(0) {} - -- DECLARE_OBJECT_TYPE_SERIALIZATION -- - using vec_activation = std::vector; - using vec_activation_param = std::vector; - -diff --git a/src/plugins/intel_gpu/include/intel_gpu/primitives/lstm_dynamic.hpp b/src/plugins/intel_gpu/include/intel_gpu/primitives/lstm_dynamic.hpp -index fd7e7c4a26..d459754ebc 100644 ---- a/src/plugins/intel_gpu/include/intel_gpu/primitives/lstm_dynamic.hpp -+++ b/src/plugins/intel_gpu/include/intel_gpu/primitives/lstm_dynamic.hpp -@@ -22,8 +22,6 @@ struct lstm_dynamic : public primitive_base { - - lstm_dynamic() : primitive_base("", {}) {} - -- DECLARE_OBJECT_TYPE_SERIALIZATION -- - /// @brief Constructs lstm_dynamic layer. - /// @param id This primitive id. - /// @param input Primitive id of input layer. -diff --git a/src/plugins/intel_gpu/include/intel_gpu/primitives/lstm_dynamic_input.hpp b/src/plugins/intel_gpu/include/intel_gpu/primitives/lstm_dynamic_input.hpp -index bf0ddb2d43..6a8e90d9a4 100644 ---- a/src/plugins/intel_gpu/include/intel_gpu/primitives/lstm_dynamic_input.hpp -+++ b/src/plugins/intel_gpu/include/intel_gpu/primitives/lstm_dynamic_input.hpp -@@ -22,8 +22,6 @@ struct lstm_dynamic_input : public primitive_base { - - lstm_dynamic_input() : primitive_base("", {}) {} - -- DECLARE_OBJECT_TYPE_SERIALIZATION -- - /// @brief Constructs lstm_dynamic layer. - /// @param id This primitive id. - /// @param input Primitive id of input layer. -diff --git a/src/plugins/intel_gpu/include/intel_gpu/primitives/lstm_dynamic_timeloop.hpp b/src/plugins/intel_gpu/include/intel_gpu/primitives/lstm_dynamic_timeloop.hpp -index e5b5ea7661..ef184707f9 100644 ---- a/src/plugins/intel_gpu/include/intel_gpu/primitives/lstm_dynamic_timeloop.hpp -+++ b/src/plugins/intel_gpu/include/intel_gpu/primitives/lstm_dynamic_timeloop.hpp -@@ -23,8 +23,6 @@ struct lstm_dynamic_timeloop - - lstm_dynamic_timeloop() : primitive_base("", {}) {} - -- DECLARE_OBJECT_TYPE_SERIALIZATION -- - /// @brief Constructs lstm_dynamic layer. - /// @param id This primitive id. - /// @param input Primitive id of input layer. -diff --git a/src/plugins/intel_gpu/include/intel_gpu/primitives/matrix_nms.hpp b/src/plugins/intel_gpu/include/intel_gpu/primitives/matrix_nms.hpp -index 72c95cae70..d4efea1d59 100644 ---- a/src/plugins/intel_gpu/include/intel_gpu/primitives/matrix_nms.hpp -+++ b/src/plugins/intel_gpu/include/intel_gpu/primitives/matrix_nms.hpp -@@ -16,8 +16,6 @@ struct matrix_nms : public primitive_base { - - matrix_nms() : primitive_base("", {}) {} - -- DECLARE_OBJECT_TYPE_SERIALIZATION -- - enum decay_function { gaussian, linear }; - - enum sort_result_type { -diff --git a/src/plugins/intel_gpu/include/intel_gpu/primitives/multiclass_nms.hpp b/src/plugins/intel_gpu/include/intel_gpu/primitives/multiclass_nms.hpp -index 5218488f1b..92ea0d371b 100644 ---- a/src/plugins/intel_gpu/include/intel_gpu/primitives/multiclass_nms.hpp -+++ b/src/plugins/intel_gpu/include/intel_gpu/primitives/multiclass_nms.hpp -@@ -18,8 +18,6 @@ struct multiclass_nms : public primitive_base { - - multiclass_nms() : primitive_base("", {}) {} - -- DECLARE_OBJECT_TYPE_SERIALIZATION -- - enum class sort_result_type : int32_t { - classid, // sort selected boxes by class id (ascending) in each batch element - score, // sort selected boxes by score (descending) in each batch element -diff --git a/src/plugins/intel_gpu/include/intel_gpu/primitives/mutable_data.hpp b/src/plugins/intel_gpu/include/intel_gpu/primitives/mutable_data.hpp -index 54c46bf785..105711b58d 100644 ---- a/src/plugins/intel_gpu/include/intel_gpu/primitives/mutable_data.hpp -+++ b/src/plugins/intel_gpu/include/intel_gpu/primitives/mutable_data.hpp -@@ -18,8 +18,6 @@ struct mutable_data : public primitive_base { - - mutable_data() : primitive_base("", {}) {} - -- DECLARE_OBJECT_TYPE_SERIALIZATION -- - /// @brief Enum type to specify function for data filling. - enum filler_type { no_fill, zero, one, xavier }; - -diff --git a/src/plugins/intel_gpu/include/intel_gpu/primitives/mvn.hpp b/src/plugins/intel_gpu/include/intel_gpu/primitives/mvn.hpp -index 72daa005b6..72e5cd67d9 100644 ---- a/src/plugins/intel_gpu/include/intel_gpu/primitives/mvn.hpp -+++ b/src/plugins/intel_gpu/include/intel_gpu/primitives/mvn.hpp -@@ -14,8 +14,6 @@ struct mvn : public primitive_base { - - mvn() : primitive_base("", {}) {} - -- DECLARE_OBJECT_TYPE_SERIALIZATION -- - /// @brief Constructs mvn primitive. - /// @param id This primitive id. - /// @param input Input primitive id. -diff --git a/src/plugins/intel_gpu/include/intel_gpu/primitives/non_max_suppression.hpp b/src/plugins/intel_gpu/include/intel_gpu/primitives/non_max_suppression.hpp -index b7aafffb55..b9614cd472 100644 ---- a/src/plugins/intel_gpu/include/intel_gpu/primitives/non_max_suppression.hpp -+++ b/src/plugins/intel_gpu/include/intel_gpu/primitives/non_max_suppression.hpp -@@ -22,8 +22,6 @@ struct non_max_suppression : public primitive_base { - center_point_box(false), - sort_result_descending(false) {} - -- DECLARE_OBJECT_TYPE_SERIALIZATION -- - /// @brief Creates non max suppression primitive. - /// @param id This primitive id. - /// @param boxes_positions Id of primitive with bounding boxes. -diff --git a/src/plugins/intel_gpu/include/intel_gpu/primitives/non_zero.hpp b/src/plugins/intel_gpu/include/intel_gpu/primitives/non_zero.hpp -index d243058bad..0fa4b35ff7 100644 ---- a/src/plugins/intel_gpu/include/intel_gpu/primitives/non_zero.hpp -+++ b/src/plugins/intel_gpu/include/intel_gpu/primitives/non_zero.hpp -@@ -13,8 +13,6 @@ struct count_nonzero : public primitive_base { - - count_nonzero() : primitive_base("", {}) {} - -- DECLARE_OBJECT_TYPE_SERIALIZATION -- - /// @brief Constructs count_nonzero primitive. - /// @param id This primitive id. - /// @param data Input data primitive id. -@@ -33,8 +31,6 @@ struct gather_nonzero : public primitive_base { - - gather_nonzero() : primitive_base("", {}) {} - -- DECLARE_OBJECT_TYPE_SERIALIZATION -- - /// @brief Constructs gather_nonzero primitive. - /// @param id This primitive id. - /// @param data Input data primitive id. -diff --git a/src/plugins/intel_gpu/include/intel_gpu/primitives/normalize.hpp b/src/plugins/intel_gpu/include/intel_gpu/primitives/normalize.hpp -index b17c659d76..0f25272bce 100644 ---- a/src/plugins/intel_gpu/include/intel_gpu/primitives/normalize.hpp -+++ b/src/plugins/intel_gpu/include/intel_gpu/primitives/normalize.hpp -@@ -29,8 +29,6 @@ struct normalize : public primitive_base { - - normalize() : primitive_base("", {}) {} - -- DECLARE_OBJECT_TYPE_SERIALIZATION -- - /// @brief Constructs normalize primitive. - /// @param id This primitive id. - /// @param input Input primitive id. -diff --git a/src/plugins/intel_gpu/include/intel_gpu/primitives/one_hot.hpp b/src/plugins/intel_gpu/include/intel_gpu/primitives/one_hot.hpp -index 3a2958a0fb..b94e069fc2 100644 ---- a/src/plugins/intel_gpu/include/intel_gpu/primitives/one_hot.hpp -+++ b/src/plugins/intel_gpu/include/intel_gpu/primitives/one_hot.hpp -@@ -35,8 +35,6 @@ struct one_hot : public primitive_base { - - one_hot() : primitive_base("", {}) {} - -- DECLARE_OBJECT_TYPE_SERIALIZATION -- - /// @brief Constructs one-hot primitive layer. - /// @param id An identifier of new primitive. - /// @param input An identifier of primitive which is an input for newly created one-hot primitive. -diff --git a/src/plugins/intel_gpu/include/intel_gpu/primitives/permute.hpp b/src/plugins/intel_gpu/include/intel_gpu/primitives/permute.hpp -index 587427e6a8..91bc12df87 100644 ---- a/src/plugins/intel_gpu/include/intel_gpu/primitives/permute.hpp -+++ b/src/plugins/intel_gpu/include/intel_gpu/primitives/permute.hpp -@@ -21,8 +21,6 @@ struct permute : public primitive_base { - - permute() : primitive_base("", {}) {} - -- DECLARE_OBJECT_TYPE_SERIALIZATION -- - /// @brief Constructs permute primitive. - /// @param id This primitive id. - /// @param input Input primitive id. -diff --git a/src/plugins/intel_gpu/include/intel_gpu/primitives/pooling.hpp b/src/plugins/intel_gpu/include/intel_gpu/primitives/pooling.hpp -index 0db15d2278..df49ba46a9 100644 ---- a/src/plugins/intel_gpu/include/intel_gpu/primitives/pooling.hpp -+++ b/src/plugins/intel_gpu/include/intel_gpu/primitives/pooling.hpp -@@ -34,8 +34,6 @@ struct pooling : public primitive_base { - - pooling() : primitive_base("", {}) {} - -- DECLARE_OBJECT_TYPE_SERIALIZATION -- - /// @brief Constructs pooling primitive. - /// @param id This primitive id. - /// @param input Input primitive id. -diff --git a/src/plugins/intel_gpu/include/intel_gpu/primitives/primitive.hpp b/src/plugins/intel_gpu/include/intel_gpu/primitives/primitive.hpp -index f68aa5f6c3..0bbf589b0d 100644 ---- a/src/plugins/intel_gpu/include/intel_gpu/primitives/primitive.hpp -+++ b/src/plugins/intel_gpu/include/intel_gpu/primitives/primitive.hpp -@@ -203,7 +203,7 @@ public: - - size_t num_outputs; - -- virtual std::string get_type() const { return "NONE"; } -+ virtual const std::string& get_type_info() const = 0; - virtual void save(BinaryOutputBuffer& ob) const { - ob << type_string(); - ob << id; -@@ -313,6 +313,7 @@ struct primitive_info { - } - - #define CLDNN_DECLARE_PRIMITIVE(PType) \ -+ DECLARE_OBJECT_TYPE_SERIALIZATION(PType) \ - CLDNN_DEFINE_TYPE_ID(PType) \ - CLDNN_DEFINE_TYPE_STRING(PType) - -diff --git a/src/plugins/intel_gpu/include/intel_gpu/primitives/prior_box.hpp b/src/plugins/intel_gpu/include/intel_gpu/primitives/prior_box.hpp -index 959e6b14f0..3f78605f49 100644 ---- a/src/plugins/intel_gpu/include/intel_gpu/primitives/prior_box.hpp -+++ b/src/plugins/intel_gpu/include/intel_gpu/primitives/prior_box.hpp -@@ -23,8 +23,6 @@ struct prior_box : public primitive_base { - - prior_box() : primitive_base("", {}) {} - -- DECLARE_OBJECT_TYPE_SERIALIZATION -- - using PriorBoxV0Op = ov::op::v0::PriorBox; - using PriorBoxV8Op = ov::op::v8::PriorBox; - using PriorBoxClusteredOp = ov::op::v0::PriorBoxClustered; -diff --git a/src/plugins/intel_gpu/include/intel_gpu/primitives/proposal.hpp b/src/plugins/intel_gpu/include/intel_gpu/primitives/proposal.hpp -index 1278d4ff6f..a1e6768276 100644 ---- a/src/plugins/intel_gpu/include/intel_gpu/primitives/proposal.hpp -+++ b/src/plugins/intel_gpu/include/intel_gpu/primitives/proposal.hpp -@@ -10,8 +10,6 @@ - #include "intel_gpu/graph/serialization/vector_serializer.hpp" - - namespace cldnn { -- -- - #define CLDNN_ROI_VECTOR_SIZE 5 - - struct proposal : public primitive_base { -@@ -37,8 +35,6 @@ struct proposal : public primitive_base { - shift_anchors(false), - normalize(false) {} - -- DECLARE_OBJECT_TYPE_SERIALIZATION -- - proposal(const primitive_id& id, - const input_info& cls_scores, - const input_info& bbox_pred, -diff --git a/src/plugins/intel_gpu/include/intel_gpu/primitives/pyramid_roi_align.hpp b/src/plugins/intel_gpu/include/intel_gpu/primitives/pyramid_roi_align.hpp -index 6d9842227a..123faf83f2 100644 ---- a/src/plugins/intel_gpu/include/intel_gpu/primitives/pyramid_roi_align.hpp -+++ b/src/plugins/intel_gpu/include/intel_gpu/primitives/pyramid_roi_align.hpp -@@ -26,8 +26,6 @@ struct pyramid_roi_align : public primitive_base { - - pyramid_roi_align() : primitive_base("", {}) {} - -- DECLARE_OBJECT_TYPE_SERIALIZATION -- - /// @param id This primitive id. - /// @param rois Input RoI boxes as tuple [x1, y1, x2, y2] describing two opposite corners of the region. - /// @param P2 First level of the image pyramid. -diff --git a/src/plugins/intel_gpu/include/intel_gpu/primitives/quantize.hpp b/src/plugins/intel_gpu/include/intel_gpu/primitives/quantize.hpp -index bb5de80742..a2bb5ae3cf 100644 ---- a/src/plugins/intel_gpu/include/intel_gpu/primitives/quantize.hpp -+++ b/src/plugins/intel_gpu/include/intel_gpu/primitives/quantize.hpp -@@ -38,8 +38,6 @@ struct quantize : public primitive_base { - - quantize() : primitive_base("", {}), levels(0) {} - -- DECLARE_OBJECT_TYPE_SERIALIZATION -- - /// @brief levels The number of quantization levels. - int levels; - -diff --git a/src/plugins/intel_gpu/include/intel_gpu/primitives/random_uniform.hpp b/src/plugins/intel_gpu/include/intel_gpu/primitives/random_uniform.hpp -index 02c86cb80d..598d8171b5 100644 ---- a/src/plugins/intel_gpu/include/intel_gpu/primitives/random_uniform.hpp -+++ b/src/plugins/intel_gpu/include/intel_gpu/primitives/random_uniform.hpp -@@ -10,8 +10,6 @@ - - namespace cldnn { - -- -- - /// @brief RandomUniform-8 primitive - /// @details - struct random_uniform : public primitive_base { -@@ -22,8 +20,6 @@ struct random_uniform : public primitive_base { - op_seed(0), - output_shape{} {} - -- DECLARE_OBJECT_TYPE_SERIALIZATION -- - /** - * Construct Random Uniform privitive. - * @param id primitive id -diff --git a/src/plugins/intel_gpu/include/intel_gpu/primitives/range.hpp b/src/plugins/intel_gpu/include/intel_gpu/primitives/range.hpp -index 005d74a6c8..3d68fd2815 100644 ---- a/src/plugins/intel_gpu/include/intel_gpu/primitives/range.hpp -+++ b/src/plugins/intel_gpu/include/intel_gpu/primitives/range.hpp -@@ -12,8 +12,6 @@ struct range: public primitive_base { - - range() : primitive_base("", {}) {} - -- DECLARE_OBJECT_TYPE_SERIALIZATION -- - /// @brief Constructs range primitive. - /// @param id This primitive id. - /// @param inputs Input primitive id vector. -diff --git a/src/plugins/intel_gpu/include/intel_gpu/primitives/read_value.hpp b/src/plugins/intel_gpu/include/intel_gpu/primitives/read_value.hpp -index 9523b416cd..095c845d07 100644 ---- a/src/plugins/intel_gpu/include/intel_gpu/primitives/read_value.hpp -+++ b/src/plugins/intel_gpu/include/intel_gpu/primitives/read_value.hpp -@@ -17,8 +17,6 @@ struct read_value : public primitive_base { - - read_value() : primitive_base("", {}) {} - -- DECLARE_OBJECT_TYPE_SERIALIZATION -- - /// @brief Constructs ReadValue primitive. - /// @param id This primitive id - /// @param inputs Input parameters ids -diff --git a/src/plugins/intel_gpu/include/intel_gpu/primitives/reduce.hpp b/src/plugins/intel_gpu/include/intel_gpu/primitives/reduce.hpp -index 7af0ad1dd9..c1f687e48a 100644 ---- a/src/plugins/intel_gpu/include/intel_gpu/primitives/reduce.hpp -+++ b/src/plugins/intel_gpu/include/intel_gpu/primitives/reduce.hpp -@@ -44,8 +44,6 @@ struct reduce : public primitive_base { - - reduce() : primitive_base("", {}) {} - -- DECLARE_OBJECT_TYPE_SERIALIZATION -- - /// @brief Constructs reduce primitive - /// @param id This primitive id - /// @param input Input primitive id -diff --git a/src/plugins/intel_gpu/include/intel_gpu/primitives/region_yolo.hpp b/src/plugins/intel_gpu/include/intel_gpu/primitives/region_yolo.hpp -index 7efddc3fb4..d9040d1dc2 100644 ---- a/src/plugins/intel_gpu/include/intel_gpu/primitives/region_yolo.hpp -+++ b/src/plugins/intel_gpu/include/intel_gpu/primitives/region_yolo.hpp -@@ -16,8 +16,6 @@ struct region_yolo : public primitive_base { - - region_yolo() : primitive_base("", {}) {} - -- DECLARE_OBJECT_TYPE_SERIALIZATION -- - /// @brief Constructs region_yolo primitive. - /// @param id This primitive id. - /// @param input Input primitive id. -diff --git a/src/plugins/intel_gpu/include/intel_gpu/primitives/reorder.hpp b/src/plugins/intel_gpu/include/intel_gpu/primitives/reorder.hpp -index 1c59eebe65..7b2ada5d77 100644 ---- a/src/plugins/intel_gpu/include/intel_gpu/primitives/reorder.hpp -+++ b/src/plugins/intel_gpu/include/intel_gpu/primitives/reorder.hpp -@@ -69,8 +69,6 @@ struct reorder : public primitive_base { - output_format(format::any), - mean_mode(reorder_mean_mode::subtract) {} - -- DECLARE_OBJECT_TYPE_SERIALIZATION -- - /// @brief reorder memory types - enum class memory_type { - buffer, -diff --git a/src/plugins/intel_gpu/include/intel_gpu/primitives/reorg_yolo.hpp b/src/plugins/intel_gpu/include/intel_gpu/primitives/reorg_yolo.hpp -index b5d76e9353..96eff0012e 100644 ---- a/src/plugins/intel_gpu/include/intel_gpu/primitives/reorg_yolo.hpp -+++ b/src/plugins/intel_gpu/include/intel_gpu/primitives/reorg_yolo.hpp -@@ -16,8 +16,6 @@ struct reorg_yolo : public primitive_base { - - reorg_yolo() : primitive_base("", {}) {} - -- DECLARE_OBJECT_TYPE_SERIALIZATION -- - /// @brief Constructs region_yolo primitive. - /// @param id This primitive id. - /// @param input Input primitive id. -diff --git a/src/plugins/intel_gpu/include/intel_gpu/primitives/resample.hpp b/src/plugins/intel_gpu/include/intel_gpu/primitives/resample.hpp -index b95ce3c5e0..59f58c986b 100644 ---- a/src/plugins/intel_gpu/include/intel_gpu/primitives/resample.hpp -+++ b/src/plugins/intel_gpu/include/intel_gpu/primitives/resample.hpp -@@ -17,8 +17,6 @@ struct resample : public primitive_base { - - resample() : primitive_base("", {}) {} - -- DECLARE_OBJECT_TYPE_SERIALIZATION -- - using InterpolateOp = ov::op::util::InterpolateBase; - - /// @brief Constructs Resample primitive. -diff --git a/src/plugins/intel_gpu/include/intel_gpu/primitives/reshape.hpp b/src/plugins/intel_gpu/include/intel_gpu/primitives/reshape.hpp -index 0f9869a2f7..00e8d9a093 100644 ---- a/src/plugins/intel_gpu/include/intel_gpu/primitives/reshape.hpp -+++ b/src/plugins/intel_gpu/include/intel_gpu/primitives/reshape.hpp -@@ -17,8 +17,6 @@ struct reshape : public primitive_base { - - reshape() : primitive_base("", {}) {} - -- DECLARE_OBJECT_TYPE_SERIALIZATION -- - enum reshape_mode : uint32_t { - base, - squeeze, -diff --git a/src/plugins/intel_gpu/include/intel_gpu/primitives/reverse.hpp b/src/plugins/intel_gpu/include/intel_gpu/primitives/reverse.hpp -index 0ecb598550..70864a9f1e 100644 ---- a/src/plugins/intel_gpu/include/intel_gpu/primitives/reverse.hpp -+++ b/src/plugins/intel_gpu/include/intel_gpu/primitives/reverse.hpp -@@ -15,8 +15,6 @@ struct reverse : public primitive_base { - - reverse() : primitive_base("", {}) {} - -- DECLARE_OBJECT_TYPE_SERIALIZATION -- - /// @brief Constructs reverse primitive. - /// @param id This primitive id. - /// @param input Input primitive id. -diff --git a/src/plugins/intel_gpu/include/intel_gpu/primitives/reverse_sequence.hpp b/src/plugins/intel_gpu/include/intel_gpu/primitives/reverse_sequence.hpp -index 8058bd3a45..714e0f4a49 100644 ---- a/src/plugins/intel_gpu/include/intel_gpu/primitives/reverse_sequence.hpp -+++ b/src/plugins/intel_gpu/include/intel_gpu/primitives/reverse_sequence.hpp -@@ -15,8 +15,6 @@ struct reverse_sequence : public primitive_base { - - reverse_sequence() : primitive_base("", {}) {} - -- DECLARE_OBJECT_TYPE_SERIALIZATION -- - /// @brief Constructs reverse_sequence primitive. - /// @param id This primitive id. - /// @param input Input primitive id. -diff --git a/src/plugins/intel_gpu/include/intel_gpu/primitives/roi_align.hpp b/src/plugins/intel_gpu/include/intel_gpu/primitives/roi_align.hpp -index 14b031d87f..0813c960f0 100644 ---- a/src/plugins/intel_gpu/include/intel_gpu/primitives/roi_align.hpp -+++ b/src/plugins/intel_gpu/include/intel_gpu/primitives/roi_align.hpp -@@ -15,8 +15,6 @@ struct roi_align : public primitive_base { - - roi_align() : primitive_base("", {}) {} - -- DECLARE_OBJECT_TYPE_SERIALIZATION -- - /// @brief Pooling mode for the @ref roi_align - enum PoolingMode { max, avg }; - -diff --git a/src/plugins/intel_gpu/include/intel_gpu/primitives/roi_pooling.hpp b/src/plugins/intel_gpu/include/intel_gpu/primitives/roi_pooling.hpp -index ef7fc25664..2dd22e52d3 100644 ---- a/src/plugins/intel_gpu/include/intel_gpu/primitives/roi_pooling.hpp -+++ b/src/plugins/intel_gpu/include/intel_gpu/primitives/roi_pooling.hpp -@@ -8,8 +8,6 @@ - #include - - namespace cldnn { -- -- - struct roi_pooling : public primitive_base { - CLDNN_DECLARE_PRIMITIVE(roi_pooling) - -@@ -27,8 +25,6 @@ struct roi_pooling : public primitive_base { - spatial_bins_x(1), - spatial_bins_y(1) {} - -- DECLARE_OBJECT_TYPE_SERIALIZATION -- - roi_pooling(const primitive_id& id, - const input_info& input_data, - const input_info& input_rois, -diff --git a/src/plugins/intel_gpu/include/intel_gpu/primitives/roll.hpp b/src/plugins/intel_gpu/include/intel_gpu/primitives/roll.hpp -index 3ae8fc634e..3db154bf47 100644 ---- a/src/plugins/intel_gpu/include/intel_gpu/primitives/roll.hpp -+++ b/src/plugins/intel_gpu/include/intel_gpu/primitives/roll.hpp -@@ -15,8 +15,6 @@ struct roll : primitive_base { - - roll() : primitive_base("", {}) {} - -- DECLARE_OBJECT_TYPE_SERIALIZATION -- - /// @brief Constructs roll primitive. - /// @param id This primitive id. - /// @param input Input primitive id. -diff --git a/src/plugins/intel_gpu/include/intel_gpu/primitives/scatter_elements_update.hpp b/src/plugins/intel_gpu/include/intel_gpu/primitives/scatter_elements_update.hpp -index fa2cd6e07b..4b823a165c 100644 ---- a/src/plugins/intel_gpu/include/intel_gpu/primitives/scatter_elements_update.hpp -+++ b/src/plugins/intel_gpu/include/intel_gpu/primitives/scatter_elements_update.hpp -@@ -14,8 +14,6 @@ struct scatter_elements_update : public primitive_base - - scatter_elements_update() : primitive_base("", {}) {} - -- DECLARE_OBJECT_TYPE_SERIALIZATION -- - /// @brief Constructs scatter_elements_update primitive. - /// @param id This primitive id. - /// @param dict Input data primitive id. -diff --git a/src/plugins/intel_gpu/include/intel_gpu/primitives/scatter_nd_update.hpp b/src/plugins/intel_gpu/include/intel_gpu/primitives/scatter_nd_update.hpp -index f21691c3c7..1cc8746e9e 100644 ---- a/src/plugins/intel_gpu/include/intel_gpu/primitives/scatter_nd_update.hpp -+++ b/src/plugins/intel_gpu/include/intel_gpu/primitives/scatter_nd_update.hpp -@@ -14,8 +14,6 @@ struct scatter_nd_update : public primitive_base { - - scatter_nd_update() : primitive_base("", {}) {} - -- DECLARE_OBJECT_TYPE_SERIALIZATION -- - /// @brief Constructs scatter_nd_update primitive. - /// @param id This primitive id. - /// @param dict Input data primitive id. -diff --git a/src/plugins/intel_gpu/include/intel_gpu/primitives/scatter_update.hpp b/src/plugins/intel_gpu/include/intel_gpu/primitives/scatter_update.hpp -index 9563fe079e..17c09a8d8e 100644 ---- a/src/plugins/intel_gpu/include/intel_gpu/primitives/scatter_update.hpp -+++ b/src/plugins/intel_gpu/include/intel_gpu/primitives/scatter_update.hpp -@@ -14,8 +14,6 @@ struct scatter_update : public primitive_base { - - scatter_update() : primitive_base("", {}) {} - -- DECLARE_OBJECT_TYPE_SERIALIZATION -- - enum scatter_update_axis { - along_b, - along_f, -diff --git a/src/plugins/intel_gpu/include/intel_gpu/primitives/select.hpp b/src/plugins/intel_gpu/include/intel_gpu/primitives/select.hpp -index 310c5ff2cb..0959fa2709 100644 ---- a/src/plugins/intel_gpu/include/intel_gpu/primitives/select.hpp -+++ b/src/plugins/intel_gpu/include/intel_gpu/primitives/select.hpp -@@ -22,8 +22,6 @@ struct select : public primitive_base { - using kernel_selector_t = kernel_selector::select_kernel_selector; - using kernel_params_t = std::pair; - -- DECLARE_OBJECT_TYPE_SERIALIZATION -+ DECLARE_OBJECT_TYPE_SERIALIZATION(cldnn::ocl::select_impl) - - std::unique_ptr clone() const override { - return make_unique(*this); -diff --git a/src/plugins/intel_gpu/src/graph/impls/ocl/shape_of.cpp b/src/plugins/intel_gpu/src/graph/impls/ocl/shape_of.cpp -index 02efeee00f..b2efd25f67 100644 ---- a/src/plugins/intel_gpu/src/graph/impls/ocl/shape_of.cpp -+++ b/src/plugins/intel_gpu/src/graph/impls/ocl/shape_of.cpp -@@ -17,7 +17,7 @@ struct shape_of_impl : typed_primitive_impl_ocl { - using kernel_selector_t = kernel_selector::shape_of_kernel_selector; - using kernel_params_t = std::pair; - -- DECLARE_OBJECT_TYPE_SERIALIZATION -+ DECLARE_OBJECT_TYPE_SERIALIZATION(cldnn::ocl::shape_of_impl) - - std::unique_ptr clone() const override { - return make_unique(*this); -diff --git a/src/plugins/intel_gpu/src/graph/impls/ocl/shuffle_channels.cpp b/src/plugins/intel_gpu/src/graph/impls/ocl/shuffle_channels.cpp -index 57ac2437f4..e40b1b99b8 100644 ---- a/src/plugins/intel_gpu/src/graph/impls/ocl/shuffle_channels.cpp -+++ b/src/plugins/intel_gpu/src/graph/impls/ocl/shuffle_channels.cpp -@@ -17,7 +17,7 @@ struct shuffle_channels_impl : typed_primitive_impl_ocl { - using kernel_selector_t = kernel_selector::shuffle_channels_kernel_selector; - using kernel_params_t = std::pair; - -- DECLARE_OBJECT_TYPE_SERIALIZATION -+ DECLARE_OBJECT_TYPE_SERIALIZATION(cldnn::ocl::shuffle_channels_impl) - - std::unique_ptr clone() const override { - return make_unique(*this); -diff --git a/src/plugins/intel_gpu/src/graph/impls/ocl/slice.cpp b/src/plugins/intel_gpu/src/graph/impls/ocl/slice.cpp -index 07ea912d06..d7f7f9ba74 100644 ---- a/src/plugins/intel_gpu/src/graph/impls/ocl/slice.cpp -+++ b/src/plugins/intel_gpu/src/graph/impls/ocl/slice.cpp -@@ -72,7 +72,7 @@ struct slice_impl : typed_primitive_impl_ocl { - kInputsNum - }; - -- DECLARE_OBJECT_TYPE_SERIALIZATION -+ DECLARE_OBJECT_TYPE_SERIALIZATION(cldnn::ocl::slice_impl) - - std::unique_ptr clone() const override { - return make_unique(*this); -diff --git a/src/plugins/intel_gpu/src/graph/impls/ocl/softmax.cpp b/src/plugins/intel_gpu/src/graph/impls/ocl/softmax.cpp -index b4029ac3b3..6ad4e1d087 100644 ---- a/src/plugins/intel_gpu/src/graph/impls/ocl/softmax.cpp -+++ b/src/plugins/intel_gpu/src/graph/impls/ocl/softmax.cpp -@@ -39,7 +39,7 @@ struct softmax_impl : typed_primitive_impl_ocl { - using kernel_selector_t = kernel_selector::softmax_kernel_selector; - using kernel_params_t = std::pair; - -- DECLARE_OBJECT_TYPE_SERIALIZATION -+ DECLARE_OBJECT_TYPE_SERIALIZATION(cldnn::ocl::softmax_impl) - - std::unique_ptr clone() const override { - return make_unique(*this); -diff --git a/src/plugins/intel_gpu/src/graph/impls/ocl/space_to_batch.cpp b/src/plugins/intel_gpu/src/graph/impls/ocl/space_to_batch.cpp -index 141116e04b..c9db851175 100644 ---- a/src/plugins/intel_gpu/src/graph/impls/ocl/space_to_batch.cpp -+++ b/src/plugins/intel_gpu/src/graph/impls/ocl/space_to_batch.cpp -@@ -16,7 +16,7 @@ struct space_to_batch_impl : typed_primitive_impl_ocl { - using kernel_selector_t = kernel_selector::space_to_batch_kernel_selector; - using kernel_params_t = std::pair; - -- DECLARE_OBJECT_TYPE_SERIALIZATION -+ DECLARE_OBJECT_TYPE_SERIALIZATION(cldnn::ocl::space_to_batch_impl) - - std::unique_ptr clone() const override { - return make_unique(*this); -diff --git a/src/plugins/intel_gpu/src/graph/impls/ocl/space_to_depth.cpp b/src/plugins/intel_gpu/src/graph/impls/ocl/space_to_depth.cpp -index ec87100f89..5b72a5572c 100644 ---- a/src/plugins/intel_gpu/src/graph/impls/ocl/space_to_depth.cpp -+++ b/src/plugins/intel_gpu/src/graph/impls/ocl/space_to_depth.cpp -@@ -16,7 +16,7 @@ struct space_to_depth_impl : typed_primitive_impl_ocl { - using kernel_selector_t = kernel_selector::space_to_depth_kernel_selector; - using kernel_params_t = std::pair; - -- DECLARE_OBJECT_TYPE_SERIALIZATION -+ DECLARE_OBJECT_TYPE_SERIALIZATION(cldnn::ocl::space_to_depth_impl) - - std::unique_ptr clone() const override { - return make_unique(*this); -diff --git a/src/plugins/intel_gpu/src/graph/impls/ocl/strided_slice.cpp b/src/plugins/intel_gpu/src/graph/impls/ocl/strided_slice.cpp -index f06ae1b72d..e64498f73f 100644 ---- a/src/plugins/intel_gpu/src/graph/impls/ocl/strided_slice.cpp -+++ b/src/plugins/intel_gpu/src/graph/impls/ocl/strided_slice.cpp -@@ -46,7 +46,7 @@ struct strided_slice_impl : typed_primitive_impl_ocl { - using kernel_selector_t = kernel_selector::strided_slice_kernel_selector; - using kernel_params_t = std::pair; - -- DECLARE_OBJECT_TYPE_SERIALIZATION -+ DECLARE_OBJECT_TYPE_SERIALIZATION(cldnn::ocl::strided_slice_impl) - - std::unique_ptr clone() const override { - return make_unique(*this); -diff --git a/src/plugins/intel_gpu/src/graph/impls/ocl/tile.cpp b/src/plugins/intel_gpu/src/graph/impls/ocl/tile.cpp -index 16d2dd91cb..bc95a18f54 100644 ---- a/src/plugins/intel_gpu/src/graph/impls/ocl/tile.cpp -+++ b/src/plugins/intel_gpu/src/graph/impls/ocl/tile.cpp -@@ -17,7 +17,7 @@ struct tile_impl : typed_primitive_impl_ocl { - using kernel_selector_t = kernel_selector::tile_kernel_selector; - using kernel_params_t = std::pair; - -- DECLARE_OBJECT_TYPE_SERIALIZATION -+ DECLARE_OBJECT_TYPE_SERIALIZATION(cldnn::ocl::tile_impl) - - std::unique_ptr clone() const override { - return make_unique(*this); -diff --git a/src/plugins/intel_gpu/src/graph/impls/ocl/unique.cpp b/src/plugins/intel_gpu/src/graph/impls/ocl/unique.cpp -index 7018ae66a2..604619c30b 100644 ---- a/src/plugins/intel_gpu/src/graph/impls/ocl/unique.cpp -+++ b/src/plugins/intel_gpu/src/graph/impls/ocl/unique.cpp -@@ -17,7 +17,7 @@ struct unique_count_impl : typed_primitive_impl_ocl { - using kernel_params_t = - std::pair; - -- DECLARE_OBJECT_TYPE_SERIALIZATION -+ DECLARE_OBJECT_TYPE_SERIALIZATION(cldnn::ocl::unique_count_impl) - - std::unique_ptr clone() const override { - return make_unique(*this); -@@ -88,7 +88,7 @@ struct unique_gather_impl : typed_primitive_impl_ocl { - using kernel_params_t = - std::pair; - -- DECLARE_OBJECT_TYPE_SERIALIZATION -+ DECLARE_OBJECT_TYPE_SERIALIZATION(cldnn::ocl::unique_gather) - - std::unique_ptr clone() const override { - return make_unique(*this); -diff --git a/src/plugins/intel_gpu/src/graph/impls/onednn/concatenation_onednn.cpp b/src/plugins/intel_gpu/src/graph/impls/onednn/concatenation_onednn.cpp -index ed5565504f..325afd5f3c 100644 ---- a/src/plugins/intel_gpu/src/graph/impls/onednn/concatenation_onednn.cpp -+++ b/src/plugins/intel_gpu/src/graph/impls/onednn/concatenation_onednn.cpp -@@ -21,7 +21,7 @@ struct concatenation_onednn : typed_primitive_onednn_impl; - using parent::parent; - -- DECLARE_OBJECT_TYPE_SERIALIZATION -+ DECLARE_OBJECT_TYPE_SERIALIZATION(cldnn::onednn::concatenation_onednn) - - protected: - std::unique_ptr clone() const override { -diff --git a/src/plugins/intel_gpu/src/graph/impls/onednn/convolution_onednn.cpp b/src/plugins/intel_gpu/src/graph/impls/onednn/convolution_onednn.cpp -index 1a27f3ae29..f1d1ab0a6c 100644 ---- a/src/plugins/intel_gpu/src/graph/impls/onednn/convolution_onednn.cpp -+++ b/src/plugins/intel_gpu/src/graph/impls/onednn/convolution_onednn.cpp -@@ -26,7 +26,7 @@ struct convolution_onednn : typed_primitive_onednn_impl { - using parent = typed_primitive_onednn_impl; - using parent::parent; - -- DECLARE_OBJECT_TYPE_SERIALIZATION -+ DECLARE_OBJECT_TYPE_SERIALIZATION(cldnn::onednn::convolution_onednn) - - protected: - std::unique_ptr clone() const override { -diff --git a/src/plugins/intel_gpu/src/graph/impls/onednn/deconvolution_onednn.cpp b/src/plugins/intel_gpu/src/graph/impls/onednn/deconvolution_onednn.cpp -index 439b74feff..1702738598 100644 ---- a/src/plugins/intel_gpu/src/graph/impls/onednn/deconvolution_onednn.cpp -+++ b/src/plugins/intel_gpu/src/graph/impls/onednn/deconvolution_onednn.cpp -@@ -22,7 +22,7 @@ struct deconvolution_onednn : typed_primitive_onednn_impl { - using parent = typed_primitive_onednn_impl; - using parent::parent; - -- DECLARE_OBJECT_TYPE_SERIALIZATION -+ DECLARE_OBJECT_TYPE_SERIALIZATION(cldnn::onednn::deconvolution_onednn) - - protected: - std::unique_ptr clone() const override { -diff --git a/src/plugins/intel_gpu/src/graph/impls/onednn/fully_connected_onednn.cpp b/src/plugins/intel_gpu/src/graph/impls/onednn/fully_connected_onednn.cpp -index 4aacb2ebd5..8ee6979dec 100644 ---- a/src/plugins/intel_gpu/src/graph/impls/onednn/fully_connected_onednn.cpp -+++ b/src/plugins/intel_gpu/src/graph/impls/onednn/fully_connected_onednn.cpp -@@ -19,7 +19,7 @@ struct fully_connected_onednn : typed_primitive_onednn_impl { - using parent = typed_primitive_onednn_impl; - using parent::parent; - -- DECLARE_OBJECT_TYPE_SERIALIZATION -+ DECLARE_OBJECT_TYPE_SERIALIZATION(cldnn::onednn::fully_connected_onednn) - - private: - static std::vector reshape_to_2d(const ov::PartialShape& shape, int64_t feature) { -diff --git a/src/plugins/intel_gpu/src/graph/impls/onednn/gemm_onednn.cpp b/src/plugins/intel_gpu/src/graph/impls/onednn/gemm_onednn.cpp -index 7410f79961..87e7decb34 100644 ---- a/src/plugins/intel_gpu/src/graph/impls/onednn/gemm_onednn.cpp -+++ b/src/plugins/intel_gpu/src/graph/impls/onednn/gemm_onednn.cpp -@@ -19,7 +19,7 @@ struct gemm_onednn : typed_primitive_onednn_impl { - using parent = typed_primitive_onednn_impl; - using parent::parent; - -- DECLARE_OBJECT_TYPE_SERIALIZATION -+ DECLARE_OBJECT_TYPE_SERIALIZATION(cldnn::onednn::gemm_onednn) - - protected: - std::unique_ptr clone() const override { -diff --git a/src/plugins/intel_gpu/src/graph/impls/onednn/pooling_onednn.cpp b/src/plugins/intel_gpu/src/graph/impls/onednn/pooling_onednn.cpp -index 52f0edc797..1dc686331b 100644 ---- a/src/plugins/intel_gpu/src/graph/impls/onednn/pooling_onednn.cpp -+++ b/src/plugins/intel_gpu/src/graph/impls/onednn/pooling_onednn.cpp -@@ -19,7 +19,7 @@ struct pooling_onednn : typed_primitive_onednn_impl { - using parent = typed_primitive_onednn_impl; - using parent::parent; - -- DECLARE_OBJECT_TYPE_SERIALIZATION -+ DECLARE_OBJECT_TYPE_SERIALIZATION(cldnn::onednn::pooling_onednn) - - protected: - std::unique_ptr clone() const override { -diff --git a/src/plugins/intel_gpu/src/graph/impls/onednn/reduction_onednn.cpp b/src/plugins/intel_gpu/src/graph/impls/onednn/reduction_onednn.cpp -index 581c37c015..635d465fc5 100644 ---- a/src/plugins/intel_gpu/src/graph/impls/onednn/reduction_onednn.cpp -+++ b/src/plugins/intel_gpu/src/graph/impls/onednn/reduction_onednn.cpp -@@ -41,7 +41,7 @@ struct reduction_onednn : typed_primitive_onednn_impl { - using parent = typed_primitive_onednn_impl; - using parent::parent; - -- DECLARE_OBJECT_TYPE_SERIALIZATION -+ DECLARE_OBJECT_TYPE_SERIALIZATION(cldnn::onednn::reduction_onednn) - - protected: - std::unique_ptr clone() const override { -diff --git a/src/plugins/intel_gpu/src/graph/impls/onednn/reorder_onednn.cpp b/src/plugins/intel_gpu/src/graph/impls/onednn/reorder_onednn.cpp -index 284dd8b166..433e043067 100644 ---- a/src/plugins/intel_gpu/src/graph/impls/onednn/reorder_onednn.cpp -+++ b/src/plugins/intel_gpu/src/graph/impls/onednn/reorder_onednn.cpp -@@ -19,7 +19,7 @@ struct reorder_onednn : typed_primitive_onednn_impl; - using parent::parent; - -- DECLARE_OBJECT_TYPE_SERIALIZATION -+ DECLARE_OBJECT_TYPE_SERIALIZATION(cldnn::onednn::reorder_onednn) - - protected: - std::unique_ptr clone() const override { -diff --git a/src/plugins/intel_gpu/src/graph/include/primitive_inst.h b/src/plugins/intel_gpu/src/graph/include/primitive_inst.h -index 3244ad20b4..454c92ac97 100644 ---- a/src/plugins/intel_gpu/src/graph/include/primitive_inst.h -+++ b/src/plugins/intel_gpu/src/graph/include/primitive_inst.h -@@ -54,7 +54,7 @@ struct primitive_impl { - - virtual std::vector get_internal_buffer_layouts() const = 0; - virtual void set_node_params(const program_node&) {} -- virtual std::string get_type() const = 0; -+ virtual const std::string& get_type_info() const = 0; - virtual void set_arguments(primitive_inst& instance) = 0; - virtual void set_arguments(primitive_inst& instance, kernel_arguments_data& args) = 0; - virtual kernel_arguments_data get_arguments(const primitive_inst& instance) const = 0; diff --git a/recipes/openvino/all/patches/2023.1.0/0005-dynamic-protobuf.patch b/recipes/openvino/all/patches/2023.1.0/0005-dynamic-protobuf.patch deleted file mode 100644 index 50b087b4268b4..0000000000000 --- a/recipes/openvino/all/patches/2023.1.0/0005-dynamic-protobuf.patch +++ /dev/null @@ -1,218 +0,0 @@ -diff --git a/cmake/developer_package/frontends/frontends.cmake b/cmake/developer_package/frontends/frontends.cmake -index df3586474b..8e50b25ea3 100644 ---- a/cmake/developer_package/frontends/frontends.cmake -+++ b/cmake/developer_package/frontends/frontends.cmake -@@ -130,6 +130,10 @@ macro(ov_add_frontend) - foreach(INFILE IN LISTS proto_files) - get_filename_component(FILE_DIR ${INFILE} DIRECTORY) - get_filename_component(FILE_WE ${INFILE} NAME_WE) -+ if(FILE_WE MATCHES "^(any|wrappers)$") -+ # we need to skip standard protobuf files -+ continue() -+ endif() - set(OUTPUT_PB_SRC ${CMAKE_CURRENT_BINARY_DIR}/${FILE_WE}.pb.cc) - set(OUTPUT_PB_HEADER ${CMAKE_CURRENT_BINARY_DIR}/${FILE_WE}.pb.h) - set(GENERATED_PROTO ${INFILE}) -diff --git a/src/frontends/common/src/manager.cpp b/src/frontends/common/src/manager.cpp -index 2fa59398b1..6194fca758 100644 ---- a/src/frontends/common/src/manager.cpp -+++ b/src/frontends/common/src/manager.cpp -@@ -20,11 +20,6 @@ class FrontEndManager::Impl { - std::mutex m_loading_mutex; - std::vector m_plugins; - -- /// \brief map of shared object per frontend -- static std::unordered_map> m_shared_objects_map; -- /// \brief Mutex to guard access the shared object map -- static std::mutex m_shared_objects_map_mutex; -- - public: - Impl() { - search_all_plugins(); -@@ -36,10 +31,6 @@ public: - auto fe_obj = std::make_shared(); - fe_obj->m_shared_object = std::make_shared(plugin.get_so_pointer()); - fe_obj->m_actual = plugin.get_creator().m_creator(); -- -- std::lock_guard guard(m_shared_objects_map_mutex); -- m_shared_objects_map.emplace(plugin.get_creator().m_name, fe_obj->m_shared_object); -- - return fe_obj; - } - -@@ -49,6 +40,7 @@ public: - {"ir", "ir"}, - {"onnx", "onnx"}, - {"tf", "tensorflow"}, -+ {"tflite", "tensorflow_lite"}, - {"paddle", "paddle"}, - {"pytorch", "pytorch"}, - }; -@@ -127,8 +119,8 @@ public: - } - - static void shutdown() { -- std::lock_guard guard(m_shared_objects_map_mutex); -- m_shared_objects_map.clear(); -+ std::lock_guard guard(get_shared_objects_mutex()); -+ get_shared_objects_map().clear(); - } - - private: -@@ -153,6 +145,7 @@ private: - {".xml", {"ir", "ir"}}, - {".onnx", {"onnx", "onnx"}}, - {".pb", {"tf", "tensorflow"}}, -+ {".pbtxt", {"tf", "tensorflow"}}, - {".tflite", {"tflite", "tensorflow_lite"}}, - {".pdmodel", {"paddle", "paddle"}}, - // {".ts", {"pytorch", "pytorch"}}, -@@ -223,9 +216,6 @@ private: - } - }; - --std::unordered_map> FrontEndManager::Impl::m_shared_objects_map{}; --std::mutex FrontEndManager::Impl::m_shared_objects_map_mutex{}; -- - FrontEndManager::FrontEndManager() : m_impl(new Impl()) {} - - FrontEndManager::FrontEndManager(FrontEndManager&&) noexcept = default; -diff --git a/src/frontends/common/src/plugin_loader.cpp b/src/frontends/common/src/plugin_loader.cpp -index a044152d8d..a98eff766b 100644 ---- a/src/frontends/common/src/plugin_loader.cpp -+++ b/src/frontends/common/src/plugin_loader.cpp -@@ -16,17 +16,32 @@ - - #include - --#include - #include - #include - - #include "openvino/util/file_util.hpp" -+#include "openvino/util/log.hpp" - #include "openvino/util/shared_object.hpp" - #include "plugin_loader.hpp" - - using namespace ov; - using namespace ov::frontend; - -+// Note, static methods below are required to create an order of initialization of static variables -+// e.g. if users (not encouraged) created ov::Model globally, we need to ensure proper order of initialization -+ -+/// \return map of shared object per frontend -+std::unordered_map>& ov::frontend::get_shared_objects_map() { -+ static std::unordered_map> shared_objects_map; -+ return shared_objects_map; -+} -+ -+/// \return Mutex to guard access the shared object map -+std::mutex& ov::frontend::get_shared_objects_mutex() { -+ static std::mutex shared_objects_map_mutex; -+ return shared_objects_map_mutex; -+} -+ - #ifdef OPENVINO_STATIC_LIBRARY - - # include "ov_frontends.hpp" -@@ -131,6 +146,10 @@ bool PluginInfo::load() { - m_load_failed = true; - return false; - } -+ -+ std::lock_guard guard(get_shared_objects_mutex()); -+ get_shared_objects_map().emplace(get_creator().m_name, get_so_pointer()); -+ - return true; - } - -diff --git a/src/frontends/common/src/plugin_loader.hpp b/src/frontends/common/src/plugin_loader.hpp -index 93e6a5cc2e..dccf8ddf7a 100644 ---- a/src/frontends/common/src/plugin_loader.hpp -+++ b/src/frontends/common/src/plugin_loader.hpp -@@ -4,7 +4,12 @@ - - #pragma once - --#include -+#include -+#include -+#include -+#include -+ -+#include "openvino/frontend/manager.hpp" - - #ifdef _WIN32 - static const char PathSeparator[] = ";"; -@@ -15,6 +20,9 @@ static const char PathSeparator[] = ":"; - namespace ov { - namespace frontend { - -+std::unordered_map>& get_shared_objects_map(); -+std::mutex& get_shared_objects_mutex(); -+ - /// \brief Internal data structure holding by each frontend. Includes library handle and extensions. - class FrontEndSharedData { - friend inline void add_extension_to_shared_data(std::shared_ptr& obj, -diff --git a/src/frontends/tensorflow/src/proto/meta_graph.proto b/src/frontends/tensorflow/src/proto/meta_graph.proto -index b6918fa853..c59c0680af 100644 ---- a/src/frontends/tensorflow/src/proto/meta_graph.proto -+++ b/src/frontends/tensorflow/src/proto/meta_graph.proto -@@ -14,7 +14,7 @@ syntax = "proto3"; - - package tensorflow; - --import "any.proto"; -+import "google/protobuf/any.proto"; - import "graph.proto"; - import "op_def.proto"; - import "tensor_shape.proto"; -diff --git a/src/frontends/tensorflow/src/proto/saved_object_graph.proto b/src/frontends/tensorflow/src/proto/saved_object_graph.proto -index 671441075c..3918a4a8d1 100644 ---- a/src/frontends/tensorflow/src/proto/saved_object_graph.proto -+++ b/src/frontends/tensorflow/src/proto/saved_object_graph.proto -@@ -14,7 +14,7 @@ syntax = "proto3"; - - package tensorflow; - --import "any.proto"; -+import "google/protobuf/any.proto"; - import "tensor_shape.proto"; - import "types.proto"; - import "variable.proto"; -diff --git a/src/frontends/tensorflow/src/proto/trackable_object_graph.proto b/src/frontends/tensorflow/src/proto/trackable_object_graph.proto -index f4a8e4da34..f0a9617432 100644 ---- a/src/frontends/tensorflow/src/proto/trackable_object_graph.proto -+++ b/src/frontends/tensorflow/src/proto/trackable_object_graph.proto -@@ -14,7 +14,7 @@ syntax = "proto3"; - - package tensorflow; - --import "wrappers.proto"; -+import "google/protobuf/wrappers.proto"; - - option cc_enable_arenas = true; - option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/protobuf/for_core_protos_go_proto"; -diff --git a/thirdparty/dependencies.cmake b/thirdparty/dependencies.cmake -index 43e0ed671a..10042641e4 100644 ---- a/thirdparty/dependencies.cmake -+++ b/thirdparty/dependencies.cmake -@@ -415,14 +415,14 @@ if(ENABLE_OV_PADDLE_FRONTEND OR ENABLE_OV_ONNX_FRONTEND OR ENABLE_OV_TF_FRONTEND - if(CMAKE_VERBOSE_MAKEFILE) - set(Protobuf_DEBUG ON) - endif() -- if(OV_VCPKG_BUILD) -- set(protobuf_config CONFIG) -- endif() - # try to find newer version first (major is changed) - # see https://protobuf.dev/support/version-support/ and - # https://github.com/protocolbuffers/protobuf/commit/d61f75ff6db36b4f9c0765f131f8edc2f86310fa -- find_package(Protobuf 4.22.0 QUIET ${protobuf_config}) -+ find_package(Protobuf 4.22.0 QUIET CONFIG) - if(NOT Protobuf_FOUND) -+ if(OV_VCPKG_BUILD) -+ set(protobuf_config CONFIG) -+ endif() - # otherwise, fallback to existing default - find_package(Protobuf 3.20.3 REQUIRED ${protobuf_config}) - endif() diff --git a/recipes/openvino/all/patches/2023.1.0/0006-macos-14.patch b/recipes/openvino/all/patches/2023.1.0/0006-macos-14.patch deleted file mode 100644 index 4184c1832cef3..0000000000000 --- a/recipes/openvino/all/patches/2023.1.0/0006-macos-14.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/src/plugins/intel_cpu/src/nodes/mha.cpp b/src/plugins/intel_cpu/src/nodes/mha.cpp -index d4405be5d4..19cf63ac72 100644 ---- a/src/plugins/intel_cpu/src/nodes/mha.cpp -+++ b/src/plugins/intel_cpu/src/nodes/mha.cpp -@@ -16,6 +16,7 @@ - #include "common/cpu_convert.h" - #include "transformations/cpu_opset/x64/op/mha.hpp" - #include "dnnl_extension_utils.h" -+#include "utils/bfloat16.hpp" - #include - - using namespace InferenceEngine; diff --git a/recipes/openvino/all/patches/2023.1.0/0007-compilation-c++23.patch b/recipes/openvino/all/patches/2023.1.0/0007-compilation-c++23.patch deleted file mode 100644 index 552078a68bae7..0000000000000 --- a/recipes/openvino/all/patches/2023.1.0/0007-compilation-c++23.patch +++ /dev/null @@ -1,38 +0,0 @@ -diff --git a/src/core/src/type.cpp b/src/core/src/type.cpp -index 7d6aef2c46..c75d9a7476 100644 ---- a/src/core/src/type.cpp -+++ b/src/core/src/type.cpp -@@ -37,7 +37,7 @@ std::string DiscreteTypeInfo::get_version() const { - if (version_id) { - return std::string(version_id); - } -- return nullptr; -+ return {}; - } - - DiscreteTypeInfo::operator std::string() const { -diff --git a/src/frontends/onnx/frontend/src/ops_bridge.hpp b/src/frontends/onnx/frontend/src/ops_bridge.hpp -index bbd6bfd129..4e2d2edb2b 100644 ---- a/src/frontends/onnx/frontend/src/ops_bridge.hpp -+++ b/src/frontends/onnx/frontend/src/ops_bridge.hpp -@@ -5,6 +5,7 @@ - #pragma once - - #include -+#include - #include - #include - #include -diff --git a/src/inference/src/dev/make_tensor.cpp b/src/inference/src/dev/make_tensor.cpp -index 2e319c04c5..5e3fa241ea 100644 ---- a/src/inference/src/dev/make_tensor.cpp -+++ b/src/inference/src/dev/make_tensor.cpp -@@ -520,7 +520,7 @@ public: - } - - void allocate() noexcept override { -- if (ie::TBlob::buffer() != tensor->data()) { -+ if ((void*)ie::TBlob::buffer() != tensor->data()) { - ie::TBlob::_allocator = - ie::details::make_pre_allocator(static_cast(tensor->data()), tensor->get_byte_size()); - ie::TBlob::allocate(); diff --git a/recipes/openvino/all/patches/2024.1.0/0001-fix-cxxflags.patch b/recipes/openvino/all/patches/2024.1.0/0001-fix-cxxflags.patch new file mode 100644 index 0000000000000..ceabd157b9ce9 --- /dev/null +++ b/recipes/openvino/all/patches/2024.1.0/0001-fix-cxxflags.patch @@ -0,0 +1,25 @@ +diff --git a/cmake/developer_package/target_flags.cmake b/cmake/developer_package/target_flags.cmake +index d047a1aebd..7779b2fcf5 100644 +--- a/cmake/developer_package/target_flags.cmake ++++ b/cmake/developer_package/target_flags.cmake +@@ -118,8 +118,19 @@ function(ov_get_compiler_definition definition var) + message(FATAL_ERROR "Internal error: 'ov_get_definition' must be used only on Linux") + endif() + ++ get_directory_property(_user_defines COMPILE_DEFINITIONS) ++ foreach(_user_define IN LISTS _user_defines) ++ # older cmake versions keep -D at the beginning, trim it ++ string(REPLACE "-D" "" _user_define "${_user_define}") ++ list(APPEND _ov_user_flags "-D${_user_define}") ++ endforeach() ++ string(REPLACE " " ";" _user_cxx_flags "${CMAKE_CXX_FLAGS}") ++ foreach(_user_flag IN LISTS _user_cxx_flags) ++ list(APPEND _ov_user_flags ${_user_flag}) ++ endforeach() ++ + execute_process(COMMAND echo "#include " +- COMMAND "${CMAKE_CXX_COMPILER}" -x c++ - -E -dM ++ COMMAND "${CMAKE_CXX_COMPILER}" ${_ov_user_flags} -x c++ - -E -dM + COMMAND grep -E "^#define ${definition} " + OUTPUT_VARIABLE output_value + ERROR_VARIABLE error_message diff --git a/recipes/openvino/config.yml b/recipes/openvino/config.yml index c055e48da509b..f1172721d416f 100644 --- a/recipes/openvino/config.yml +++ b/recipes/openvino/config.yml @@ -1,9 +1,15 @@ versions: + "2024.4.0": + folder: "all" + "2024.3.0": + folder: "all" + "2024.2.0": + folder: "all" + "2024.1.0": + folder: "all" "2024.0.0": folder: "all" "2023.3.0": folder: "all" "2023.2.0": folder: "all" - "2023.1.0": - folder: "all" diff --git a/recipes/optimlib/all/CMakeLists.txt b/recipes/optimlib/all/CMakeLists.txt new file mode 100644 index 0000000000000..969c489f5660e --- /dev/null +++ b/recipes/optimlib/all/CMakeLists.txt @@ -0,0 +1,49 @@ +# Based on https://github.com/kthohr/optim/blob/5453f48aca695e6fef123677f35cb4d22e356e73/configure +cmake_minimum_required(VERSION 3.15) +project(OptimLib LANGUAGES CXX) + +set(OPTIM_LINEAR_ALG_LIB "eigen" CACHE STRING "Choice of linear algebra library") +set(OPTIM_FPN_TYPE "double" CACHE STRING "Floating-point number type") +option(OPTIM_PARALLEL "Enable OpenMP parallelization features" ON) + +file(GLOB_RECURSE SOURCES src/*.cpp) + +add_library(optim ${SOURCES}) +target_include_directories(optim PUBLIC include) +target_compile_features(optim PUBLIC cxx_std_11) + +target_compile_options(optim PRIVATE -Wall) +if(NOT CMAKE_BUILD_TYPE STREQUAL "Debug") + target_compile_options(optim PRIVATE -O3 -ffp-contract=fast) + target_compile_definitions(optim PRIVATE -DARMA_NO_DEBUG) +endif() + +if(OPTIM_LINEAR_ALG_LIB STREQUAL "eigen") + find_package(Eigen3 REQUIRED) + target_link_libraries(optim PUBLIC Eigen3::Eigen) + target_compile_definitions(optim PRIVATE -DOPTIM_ENABLE_EIGEN_WRAPPERS) +elseif(OPTIM_LINEAR_ALG_LIB STREQUAL "arma") + find_package(Armadillo REQUIRED) + target_link_libraries(optim PUBLIC Armadillo::Armadillo) + target_compile_definitions(optim PRIVATE -DOPTIM_ENABLE_ARMA_WRAPPERS) +else() + message(FATAL_ERROR "OPTIM_LINEAR_ALG_LIB must be either 'eigen' or 'arma'. Got: ${OPTIM_LINEAR_ALG_LIB}") +endif() + +target_compile_definitions(optim PRIVATE -DOPTIM_FPN_TYPE=${OPTIM_FPN_TYPE}) + +if(OPTIM_PARALLEL) + find_package(OpenMP REQUIRED) + target_link_libraries(optim PUBLIC OpenMP::OpenMP_CXX) +endif() + +include(GNUInstallDirs) +install(TARGETS optim + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} +) +install(DIRECTORY include/ + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} + FILES_MATCHING PATTERN "*.hpp" PATTERN "*.ipp" +) diff --git a/recipes/optimlib/all/conandata.yml b/recipes/optimlib/all/conandata.yml new file mode 100644 index 0000000000000..0d0a307dd5d0c --- /dev/null +++ b/recipes/optimlib/all/conandata.yml @@ -0,0 +1,9 @@ +sources: + # The version is defined at https://github.com/kthohr/optim/blob/master/include/misc/optim_options.hpp#L30-L40 + "3.1.3": + source: + url: "https://github.com/kthohr/optim/archive/f9d9357169ce4b497a677faa9ce85e901e77275d.tar.gz" + sha256: "3809f753fc75c007c55ee995264c72487415a22dacc0846ba8ac0c1d1c24b91a" + base_matrix_ops: + url: "https://github.com/kthohr/BaseMatrixOps/archive/9e5beec15d803f0429dadae5e9218ef907271383.zip" + sha256: "f47de48e3814317d3cfa38f986bf847d816fa74dd13d8ccb9bac3ab51a49efd4" diff --git a/recipes/optimlib/all/conanfile.py b/recipes/optimlib/all/conanfile.py new file mode 100644 index 0000000000000..058265aa8ed45 --- /dev/null +++ b/recipes/optimlib/all/conanfile.py @@ -0,0 +1,129 @@ +import os + +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.build import check_min_cppstd +from conan.tools.cmake import CMakeToolchain, CMakeDeps, CMake, cmake_layout +from conan.tools.files import copy, get + +required_conan_version = ">=1.54.0" + + +class OptimLibConan(ConanFile): + name = "optimlib" + description = "OptimLib: a lightweight C++ library of numerical optimization methods for nonlinear functions" + license = "Apache-2.0" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/kthohr/optim" + topics = ("numerical-optimization", "optimization", "automatic-differentiation", "evolutionary-algorithms") + + package_type = "library" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + "header_only": [True, False], + "linear_alg_lib": ["arma", "eigen"], + "floating_point_type": ["float", "double"], + "with_openmp": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + "header_only": False, + "linear_alg_lib": "eigen", + "floating_point_type": "double", + "with_openmp": False, + } + + @property + def _min_cppstd(self): + return 11 + + def export_sources(self): + copy(self, "CMakeLists.txt", self.recipe_folder, os.path.join(self.export_sources_folder, "src")) + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def configure(self): + if self.options.header_only: + self.package_type = "header-library" + self.options.rm_safe("shared") + self.options.rm_safe("fPIC") + elif self.options.shared: + self.options.rm_safe("fPIC") + + def layout(self): + cmake_layout(self, src_folder="src") + + def requirements(self): + if self.options.linear_alg_lib == "arma": + self.requires("armadillo/12.6.4", transitive_headers=True, transitive_libs=True) + elif self.options.linear_alg_lib == "eigen": + self.requires("eigen/3.4.0", transitive_headers=True, transitive_libs=True) + if self.options.with_openmp: + # '#pragma omp' is used in public headers + self.requires("openmp/system", transitive_headers=True, transitive_libs=True) + + def package_id(self): + if self.info.options.header_only: + self.info.clear() + + def validate(self): + if self.settings.os == "Windows": + # "Use of this library with Windows-based systems, with or without MSVC, is not supported." + raise ConanInvalidConfiguration("Windows is not supported") + + if self.settings.compiler.get_safe("cppstd"): + check_min_cppstd(self, self._min_cppstd) + + def source(self): + get(self, **self.conan_data["sources"][self.version]["source"], strip_root=True) + get(self, **self.conan_data["sources"][self.version]["base_matrix_ops"], strip_root=True, + destination=os.path.join(self.source_folder, "include", "BaseMatrixOps")) + + def generate(self): + if not self.options.header_only: + tc = CMakeToolchain(self) + tc.variables["OPTIM_LINEAR_ALG_LIB"] = str(self.options.linear_alg_lib) + tc.variables["OPTIM_PARALLEL"] = self.options.with_openmp + tc.variables["OPTIM_FPN_TYPE"] = str(self.options.floating_point_type) + tc.generate() + deps = CMakeDeps(self) + deps.generate() + + def build(self): + if not self.options.header_only: + cmake = CMake(self) + cmake.configure() + cmake.build() + + def package(self): + copy(self, "LICENSE", self.source_folder, os.path.join(self.package_folder, "licenses")) + copy(self, "NOTICE.txt", self.source_folder, os.path.join(self.package_folder, "licenses")) + if self.options.header_only: + self.run(f"./configure --header-only-version", cwd=self.source_folder) + include_dir = os.path.join(self.source_folder, "header_only_version") + copy(self, "*.hpp", include_dir, os.path.join(self.package_folder, "include")) + copy(self, "*.ipp", include_dir, os.path.join(self.package_folder, "include")) + else: + cmake = CMake(self) + cmake.install() + + def package_info(self): + # Unofficial CMake file and target + self.cpp_info.set_property("cmake_file_name", "OptimLib") + self.cpp_info.set_property("cmake_target_name", "OptimLib::OptimLib") + + if not self.options.header_only: + self.cpp_info.libs = ["optim"] + + if self.options.linear_alg_lib == "arma": + self.cpp_info.defines.append("OPTIM_ENABLE_ARMA_WRAPPERS") + if self.settings.build_type not in ["Debug", "RelWithDebInfo"]: + self.cpp_info.defines.append("ARMA_NO_DEBUG") + elif self.options.linear_alg_lib == "eigen": + self.cpp_info.defines.append("OPTIM_ENABLE_EIGEN_WRAPPERS") + self.cpp_info.defines.append(f"OPTIM_FPN_TYPE={self.options.floating_point_type}") diff --git a/recipes/optimlib/all/test_package/CMakeLists.txt b/recipes/optimlib/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..897ebb983164b --- /dev/null +++ b/recipes/optimlib/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) + +find_package(OptimLib REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE OptimLib::OptimLib) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) diff --git a/recipes/optimlib/all/test_package/conanfile.py b/recipes/optimlib/all/test_package/conanfile.py new file mode 100644 index 0000000000000..3a91c9439218e --- /dev/null +++ b/recipes/optimlib/all/test_package/conanfile.py @@ -0,0 +1,26 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def layout(self): + cmake_layout(self) + + def requirements(self): + self.requires(self.tested_reference_str) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/optimlib/all/test_package/test_package.cpp b/recipes/optimlib/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..c2c8b66e698d0 --- /dev/null +++ b/recipes/optimlib/all/test_package/test_package.cpp @@ -0,0 +1,24 @@ +#include + +struct ll_data_t +{ + optim::ColVec_t Y; + optim::Mat_t X; +}; + +double ll_fn(const optim::ColVec_t& vals_inp, optim::ColVec_t* grad_out, void* opt_data) +{ + return 0.0; +} + +int main() +{ + int n_dim = 5; + int n_samp = 40; + ll_data_t opt_data; + opt_data.Y = optim::ColVec_t(n_samp); + opt_data.X = optim::Mat_t(n_samp, n_dim); + optim::ColVec_t x(n_samp); + optim::algo_settings_t settings; + bool success = optim::gd(x, ll_fn, &opt_data, settings); +} diff --git a/recipes/optimlib/config.yml b/recipes/optimlib/config.yml new file mode 100644 index 0000000000000..71660a79817c5 --- /dev/null +++ b/recipes/optimlib/config.yml @@ -0,0 +1,3 @@ +versions: + "3.1.3": + folder: all diff --git a/recipes/opus/all/conandata.yml b/recipes/opus/all/conandata.yml index 5ac1b419900e1..a7288d00d394f 100644 --- a/recipes/opus/all/conandata.yml +++ b/recipes/opus/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.5.2": + url: "https://gitlab.xiph.org/xiph/opus/-/archive/v1.5.2/opus-v1.5.2.tar.gz" + sha256: "5cf92b5b577d8ed203424f1e0f618f30bc6b6e42a26eae88bdb649ea63961cc9" "1.4": url: "https://github.com/xiph/opus/releases/download/v1.4/opus-1.4.tar.gz" sha256: "c9b32b4253be5ae63d1ff16eea06b94b5f0f2951b7a02aceef58e3a3ce49c51f" @@ -8,3 +11,5 @@ sources: patches: "1.3.1": - patch_file: "patches/1.3.1-add-opus_buildtype-cmake.patch" + patch_description: "Set a default build type if none was specified" + patch_type: "portability" diff --git a/recipes/opus/all/conanfile.py b/recipes/opus/all/conanfile.py index 2dfefae5f4332..f1ca41949ac83 100644 --- a/recipes/opus/all/conanfile.py +++ b/recipes/opus/all/conanfile.py @@ -1,7 +1,10 @@ from conan import ConanFile +from conan.errors import ConanInvalidConfiguration from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rmdir -from conan.tools.microsoft import check_min_vs +from conan.tools.microsoft import check_min_vs, is_msvc, is_msvc_static_runtime +from conan.tools.env import VirtualBuildEnv +from conan.tools.scm import Version import os required_conan_version = ">=1.53.0" @@ -14,7 +17,7 @@ class OpusConan(ConanFile): url = "https://github.com/conan-io/conan-center-index" homepage = "https://opus-codec.org" license = "BSD-3-Clause" - + package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], @@ -29,6 +32,10 @@ class OpusConan(ConanFile): "stack_protector": True, } + def build_requirements(self): + if Version(self.version) >= "1.5.2": + self.tool_requires("cmake/[>=3.16 <4]") + def export_sources(self): export_conandata_patches(self) @@ -47,15 +54,23 @@ def layout(self): def validate(self): check_min_vs(self, 190) + if Version(self.version) >= "1.5.2" and self.settings.compiler == "gcc" and Version(self.settings.compiler.version) < "8": + raise ConanInvalidConfiguration(f"{self.ref} GCC-{self.settings.compiler.version} not supported due to lack of AVX2 support. Use GCC >=8.") def source(self): get(self, **self.conan_data["sources"][self.version], destination=self.source_folder, strip_root=True) def generate(self): + if Version(self.version) >= "1.5.2": + env = VirtualBuildEnv(self) + env.generate() tc = CMakeToolchain(self) - tc.variables["OPUS_FIXED_POINT"] = self.options.fixed_point - tc.variables["OPUS_STACK_PROTECTOR"] = self.options.stack_protector + tc.cache_variables["OPUS_BUILD_SHARED_LIBRARY"] = self.options.shared + tc.cache_variables["OPUS_FIXED_POINT"] = self.options.fixed_point + tc.cache_variables["OPUS_STACK_PROTECTOR"] = self.options.stack_protector + if Version(self.version) >= "1.5.2" and is_msvc(self): + tc.cache_variables["OPUS_STATIC_RUNTIME"] = is_msvc_static_runtime(self) tc.generate() def build(self): diff --git a/recipes/opus/all/test_package/conanfile.py b/recipes/opus/all/test_package/conanfile.py index 642aa7eed877c..0a6bc68712d90 100644 --- a/recipes/opus/all/test_package/conanfile.py +++ b/recipes/opus/all/test_package/conanfile.py @@ -23,5 +23,4 @@ def build(self): def test(self): if can_run(self): bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") - pcm_path = os.path.join(self.source_folder, "test.pcm") - self.run(f"{bin_path} {pcm_path} out.pcm", env="conanrun") + self.run(bin_path, env="conanrun") diff --git a/recipes/opus/all/test_package/test.pcm b/recipes/opus/all/test_package/test.pcm deleted file mode 100644 index f4d71f2770637..0000000000000 Binary files a/recipes/opus/all/test_package/test.pcm and /dev/null differ diff --git a/recipes/opus/all/test_package/test_package.c b/recipes/opus/all/test_package/test_package.c index a39ea4aacd883..3da6fd100efb6 100644 --- a/recipes/opus/all/test_package/test_package.c +++ b/recipes/opus/all/test_package/test_package.c @@ -1,159 +1,13 @@ -/* Copyright (c) 2013 Jean-Marc Valin */ -/* - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - - - Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - - Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER - OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -/* This is meant to be a simple example of encoding and decoding audio - using Opus. It should make it easy to understand how the Opus API - works. For more information, see the full API documentation at: - https://www.opus-codec.org/docs/ */ - -#include -#include -#include -#include #include +#include -/*The frame size is hardcoded for this sample code but it doesn't have to be*/ -#define FRAME_SIZE 960 -#define SAMPLE_RATE 48000 -#define CHANNELS 2 -#define APPLICATION OPUS_APPLICATION_AUDIO -#define BITRATE 64000 - -#define MAX_FRAME_SIZE 6*960 -#define MAX_PACKET_SIZE (3*1276) - -int main(int argc, char **argv) -{ - char *inFile; - FILE *fin; - char *outFile; - FILE *fout; - opus_int16 in[FRAME_SIZE*CHANNELS]; - opus_int16 out[MAX_FRAME_SIZE*CHANNELS]; - unsigned char cbits[MAX_PACKET_SIZE]; - int nbBytes; - /*Holds the state of the encoder and decoder */ - OpusEncoder *encoder; - OpusDecoder *decoder; - int err; - - if (argc != 3) - { - fprintf(stderr, "usage: trivial_example input.pcm output.pcm\n"); - fprintf(stderr, "input and output are 16-bit little-endian raw files\n"); - return EXIT_FAILURE; - } - - /*Create a new encoder state */ - encoder = opus_encoder_create(SAMPLE_RATE, CHANNELS, APPLICATION, &err); - if (err<0) - { - fprintf(stderr, "failed to create an encoder: %s\n", opus_strerror(err)); - return EXIT_FAILURE; - } - /* Set the desired bit-rate. You can also set other parameters if needed. - The Opus library is designed to have good defaults, so only set - parameters you know you need. Doing otherwise is likely to result - in worse quality, but better. */ - err = opus_encoder_ctl(encoder, OPUS_SET_BITRATE(BITRATE)); - if (err<0) - { - fprintf(stderr, "failed to set bitrate: %s\n", opus_strerror(err)); - return EXIT_FAILURE; - } - inFile = argv[1]; - fin = fopen(inFile, "r"); - if (fin==NULL) - { - fprintf(stderr, "failed to open input file: %s\n", strerror(errno)); - return EXIT_FAILURE; - } - - - /* Create a new decoder state. */ - decoder = opus_decoder_create(SAMPLE_RATE, CHANNELS, &err); - if (err<0) - { - fprintf(stderr, "failed to create decoder: %s\n", opus_strerror(err)); - return EXIT_FAILURE; - } - outFile = argv[2]; - fout = fopen(outFile, "w"); - if (fout==NULL) - { - fprintf(stderr, "failed to open output file: %s\n", strerror(errno)); - return EXIT_FAILURE; - } - - while (!feof(fin)) - { - int i; - unsigned char pcm_bytes[MAX_FRAME_SIZE*CHANNELS*2]; - int frame_size; - - /* Read a 16 bits/sample audio frame. */ - fread(pcm_bytes, sizeof(short)*CHANNELS, FRAME_SIZE, fin); - - /* Convert from little-endian ordering. */ - for (i=0;i>8)&0xFF; - } - /* Write the decoded audio to file. */ - fwrite(pcm_bytes, sizeof(short), frame_size*CHANNELS, fout); - } - /*Destroy the encoder state*/ - opus_encoder_destroy(encoder); - opus_decoder_destroy(decoder); - fclose(fin); - fclose(fout); - return EXIT_SUCCESS; + encoder = opus_encoder_create(rate, channels, application, &err); + opus_encoder_destroy(encoder); } diff --git a/recipes/opus/all/test_v1_package/conanfile.py b/recipes/opus/all/test_v1_package/conanfile.py index 9534054c99e3c..38f4483872d47 100644 --- a/recipes/opus/all/test_v1_package/conanfile.py +++ b/recipes/opus/all/test_v1_package/conanfile.py @@ -14,5 +14,4 @@ def build(self): def test(self): if not tools.cross_building(self): bin_path = os.path.join("bin", "test_package") - pcm_path = os.path.join(self.source_folder, os.pardir, "test_package", "test.pcm") - self.run(f"{bin_path} {pcm_path} out.pcm", run_environment=True) + self.run(bin_path, run_environment=True) diff --git a/recipes/opus/config.yml b/recipes/opus/config.yml index 3360afdd0ecab..e9cd861cf2166 100644 --- a/recipes/opus/config.yml +++ b/recipes/opus/config.yml @@ -1,4 +1,6 @@ versions: + "1.5.2": + folder: all "1.4": folder: all "1.3.1": diff --git a/recipes/orc/all/conandata.yml b/recipes/orc/all/conandata.yml index 52fa72322f304..93dd0aef42c8e 100644 --- a/recipes/orc/all/conandata.yml +++ b/recipes/orc/all/conandata.yml @@ -1,13 +1,19 @@ sources: "2.0.0": - url: "https://dlcdn.apache.org/orc/orc-2.0.0/orc-2.0.0.tar.gz" + url: "https://archive.apache.org/dist/orc/orc-2.0.0/orc-2.0.0.tar.gz" sha256: "9107730919c29eb39efaff1b9e36166634d1d4d9477e5fee76bfd6a8fec317df" + "1.9.3": + url: "https://archive.apache.org/dist/orc/orc-1.9.3/orc-1.9.3.tar.gz" + sha256: "f737d005d0c4deb65688ac3c0223ed530b0ba6258552555b2774dcdb77359b0f" "1.9.2": - url: "https://dlcdn.apache.org/orc/orc-1.9.2/orc-1.9.2.tar.gz" + url: "https://archive.apache.org/dist/orc/orc-1.9.2/orc-1.9.2.tar.gz" sha256: "7f46f2c184ecefd6791f1a53fb062286818bd8710c3f08b94dd3cac365e240ee" + "1.8.7": + url: "https://archive.apache.org/dist/orc/orc-1.8.7/orc-1.8.7.tar.gz" + sha256: "57c9d12bf74b2752b1ce1039c15035c3b6f6531d865df962a99b3e079b3dfdb7" "1.8.6": - url: "https://dlcdn.apache.org/orc/orc-1.8.6/orc-1.8.6.tar.gz" + url: "https://archive.apache.org/dist/orc/orc-1.8.6/orc-1.8.6.tar.gz" sha256: "5675b18118df4dd7f86cc6ba859ed75b425ea1b7ddff805e1d671a17fd57d7f7" "1.7.10": - url: "https://dlcdn.apache.org/orc/orc-1.7.10/orc-1.7.10.tar.gz" + url: "https://archive.apache.org/dist/orc/orc-1.7.10/orc-1.7.10.tar.gz" sha256: "85aef9368dc9bcdffaaf10010b66dfe053ce22f30b64854f63852248164686a3" diff --git a/recipes/orc/config.yml b/recipes/orc/config.yml index 956aa2a1d2506..ad011c33e6349 100644 --- a/recipes/orc/config.yml +++ b/recipes/orc/config.yml @@ -1,8 +1,12 @@ versions: "2.0.0": folder: all + "1.9.3": + folder: all "1.9.2": folder: all + "1.8.7": + folder: all "1.8.6": folder: all "1.7.10": diff --git a/recipes/ouster_sdk/all/conandata.yml b/recipes/ouster_sdk/all/conandata.yml index 72736b062686c..47f1fc2c3a180 100644 --- a/recipes/ouster_sdk/all/conandata.yml +++ b/recipes/ouster_sdk/all/conandata.yml @@ -1,11 +1,24 @@ sources: - # The C++ library uses a separate versioning scheme from the overall releases + "0.13.0": + url: "https://github.com/ouster-lidar/ouster-sdk/archive/refs/tags/release-0.13.0.tar.gz" + sha256: "baf65fbf547375fe73fdaee89c6c1246fdf9f0cabe4f4bd16391d3a06d0117a1" + "0.12.0": + url: "https://github.com/ouster-lidar/ouster-sdk/archive/refs/tags/20240703.tar.gz" + sha256: "7edff33451e99fe094aeafc4c10081d77bfe02d2f2ab16da93a44a5e61473af7" + "0.11.0": + url: "https://github.com/ouster-lidar/ouster-sdk/archive/refs/tags/20240425.tar.gz" + sha256: "8141abf4caef8a175a48c35c47bd841b34f8a7d758cb3ad66cf948a7042adbf9" "0.10.0": - url: "https://github.com/ouster-lidar/ouster_example/archive/refs/tags/20231031.tar.gz" - sha256: "150482d28930308ef089233f3d4eb15d1330727a167aad3f9b2190078dcecfbf" + url: "https://github.com/ouster-lidar/ouster-sdk/archive/refs/tags/20231031.tar.gz" + sha256: "c45dfd42ff11e171b605ffd0a98d8094ec88ecbbccb923d396e1e73cba7737f3" patches: + "0.11.0": + - patch_file: "patches/001-579-fix-cpp20-string-error.patch" + patch_type: "portability" + patch_description: "Fix non-const string issue with C++20" + patch_source: "https://github.com/ouster-lidar/ouster-sdk/pull/579" "0.10.0": - patch_file: "patches/001-579-fix-cpp20-string-error.patch" patch_type: "portability" patch_description: "Fix non-const string issue with C++20" - patch_source: "https://github.com/ouster-lidar/ouster_example/pull/579" + patch_source: "https://github.com/ouster-lidar/ouster-sdk/pull/579" diff --git a/recipes/ouster_sdk/all/conanfile.py b/recipes/ouster_sdk/all/conanfile.py index 2c133d0062741..7362559ac775c 100644 --- a/recipes/ouster_sdk/all/conanfile.py +++ b/recipes/ouster_sdk/all/conanfile.py @@ -15,7 +15,7 @@ class OusterSdkConan(ConanFile): description = "Ouster SDK - tools for working with Ouster Lidars" license = "BSD 3-Clause" url = "https://github.com/conan-io/conan-center-index" - homepage = "https://github.com/ouster-lidar/ouster_example" + homepage = "https://github.com/ouster-lidar/ouster-sdk" topics = ("ouster", "lidar", "driver", "hardware", "point cloud", "3d", "robotics", "automotive") package_type = "library" @@ -98,8 +98,6 @@ def requirements(self): if self.options.build_viz: self.requires("glad/0.1.36") self.requires("glfw/3.4") - if self.settings.os != "Windows": - self.requires("xorg/system") def validate(self): if conan_version.major < 2 and self.settings.os == "Windows": @@ -212,8 +210,6 @@ def package_info(self): "glad::glad", "glfw::glfw", ] - if self.settings.os != "Windows": - self.cpp_info.components["ouster_viz"].requires.append("xorg::xorg") # TODO: to remove in conan v2 once cmake_find_package_* generators removed self.cpp_info.filenames["cmake_find_package"] = "OusterSDK" diff --git a/recipes/ouster_sdk/config.yml b/recipes/ouster_sdk/config.yml index 1b582dcf6716b..4f1ab3799faec 100644 --- a/recipes/ouster_sdk/config.yml +++ b/recipes/ouster_sdk/config.yml @@ -1,3 +1,9 @@ versions: + "0.13.0": + folder: all + "0.12.0": + folder: all + "0.11.0": + folder: all "0.10.0": folder: all diff --git a/recipes/outcome/all/conandata.yml b/recipes/outcome/all/conandata.yml index 62d76f92e8327..0b6baa08be3b1 100644 --- a/recipes/outcome/all/conandata.yml +++ b/recipes/outcome/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.2.9": + url: "https://github.com/ned14/outcome/archive/v2.2.9.tar.gz" + sha256: "2840e403b1d7a0d3a75ecc4df574ab0674284bb21d76ac5f817695f2b56905f2" "2.2.8": url: "https://github.com/ned14/outcome/archive/v2.2.8.tar.gz" sha256: "6ef322867aee454792bd71b61950703dd18608670a69a1780cab81be22f78a1e" diff --git a/recipes/outcome/all/conanfile.py b/recipes/outcome/all/conanfile.py index 910063cd4cd17..f1c9aa2601b2d 100644 --- a/recipes/outcome/all/conanfile.py +++ b/recipes/outcome/all/conanfile.py @@ -12,11 +12,11 @@ class OutcomeConan(ConanFile): name = "outcome" - homepage = "https://github.com/ned14/outcome" description = "Provides very lightweight outcome and result" license = "Apache-2.0" url = "https://github.com/conan-io/conan-center-index" - topics = ("result",) + homepage = "https://github.com/ned14/outcome" + topics = ("result", "header-only") package_type = "header-library" settings = "os", "arch", "compiler", "build_type" no_copy_source = True diff --git a/recipes/outcome/config.yml b/recipes/outcome/config.yml index 783025ec22c41..df84211e55ceb 100644 --- a/recipes/outcome/config.yml +++ b/recipes/outcome/config.yml @@ -1,4 +1,6 @@ versions: + "2.2.9": + folder: all "2.2.8": folder: all "2.2.7": diff --git a/recipes/pagmo2/all/CMakeLists.txt b/recipes/pagmo2/all/CMakeLists.txt deleted file mode 100644 index b71c882d9d33f..0000000000000 --- a/recipes/pagmo2/all/CMakeLists.txt +++ /dev/null @@ -1,7 +0,0 @@ -cmake_minimum_required(VERSION 3.1) -project(cmake_wrapper) - -include(conanbuildinfo.cmake) -conan_basic_setup(KEEP_RPATHS) - -add_subdirectory(source_subfolder) diff --git a/recipes/pagmo2/all/conandata.yml b/recipes/pagmo2/all/conandata.yml index a610a9ffc5a7b..26d2bd85a3ccc 100644 --- a/recipes/pagmo2/all/conandata.yml +++ b/recipes/pagmo2/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.19.0": + url: "https://github.com/esa/pagmo2/archive/refs/tags/v2.19.0.tar.gz" + sha256: "701ada528de7d454201e92a5d88903dd1c22ea64f43861d9694195ddfef82a70" "2.17.0": url: "https://github.com/esa/pagmo2/archive/refs/tags/v2.17.0.tar.gz" sha256: "1b95b036f75e6fa0b21082ab228dbd63cd18ca10d9622ac53629245e0f95c35c" diff --git a/recipes/pagmo2/all/conanfile.py b/recipes/pagmo2/all/conanfile.py index 08b268962bb1c..b0c859b99c54f 100644 --- a/recipes/pagmo2/all/conanfile.py +++ b/recipes/pagmo2/all/conanfile.py @@ -1,19 +1,25 @@ -from conans import ConanFile, CMake, tools -from conans.errors import ConanInvalidConfiguration -import functools import os -required_conan_version = ">=1.43.0" +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.build import check_min_cppstd +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.files import copy, get, replace_in_file, rmdir +from conan.tools.microsoft import is_msvc +from conan.tools.scm import Version + +required_conan_version = ">=1.53.0" class Pagmo2Conan(ConanFile): name = "pagmo2" description = "pagmo is a C++ scientific library for massively parallel optimization." license = ("LGPL-3.0-or-later", "GPL-3.0-or-later") - topics = ("pagmo", "optimization", "parallel-computing", "genetic-algorithm", "metaheuristics") - homepage = "https://esa.github.io/pagmo2" url = "https://github.com/conan-io/conan-center-index" + homepage = "https://esa.github.io/pagmo2" + topics = ("pagmo", "optimization", "parallel-computing", "genetic-algorithm", "metaheuristics") + package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], @@ -30,12 +36,15 @@ class Pagmo2Conan(ConanFile): "with_ipopt": False, } - exports_sources = "CMakeLists.txt" - generators = "cmake", "cmake_find_package", "cmake_find_package_multi" - @property - def _source_subfolder(self): - return "source_subfolder" + def _compilers_minimum_version(self): + return { + "Visual Studio": "15.7", + "msvc": "191", + "gcc": "7", + "clang": "5.0", + "apple-clang": "9", + } def config_options(self): if self.settings.os == "Windows": @@ -43,24 +52,18 @@ def config_options(self): def configure(self): if self.options.shared: - del self.options.fPIC + self.options.rm_safe("fPIC") + + def layout(self): + cmake_layout(self, src_folder="src") def requirements(self): - self.requires("boost/1.78.0") - self.requires("onetbb/2020.3") + self.requires("boost/1.85.0", transitive_headers=True) + self.requires("onetbb/2021.12.0") if self.options.with_eigen: - self.requires("eigen/3.4.0") + self.requires("eigen/3.4.0", transitive_headers=True) if self.options.with_nlopt: - self.requires("nlopt/2.7.1") - - @property - def _compilers_minimum_version(self): - return { - "Visual Studio": "15.7", - "gcc": "7", - "clang": "5.0", - "apple-clang": "9.1" - } + self.requires("nlopt/2.7.1", transitive_headers=True, transitive_libs=True) @property def _required_boost_components(self): @@ -68,86 +71,95 @@ def _required_boost_components(self): def validate(self): if self.settings.compiler.get_safe("cppstd"): - tools.check_min_cppstd(self, 17) - - def lazy_lt_semver(v1, v2): - lv1 = [int(v) for v in v1.split(".")] - lv2 = [int(v) for v in v2.split(".")] - min_length = min(len(lv1), len(lv2)) - return lv1[:min_length] < lv2[:min_length] + check_min_cppstd(self, 17) minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) - if not minimum_version: - self.output.warn("{} {} requires C++17. Your compiler is unknown. Assuming it supports C++17.".format(self.name, self.version)) - elif lazy_lt_semver(str(self.settings.compiler.version), minimum_version): - raise ConanInvalidConfiguration("{} {} requires C++17, which your compiler does not support.".format(self.name, self.version)) + if minimum_version and Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration( + f"{self.name} {self.version} requires C++17, which your compiler does not support." + ) # TODO: add ipopt support if self.options.with_ipopt: raise ConanInvalidConfiguration("ipopt recipe not available yet in CCI") - miss_boost_required_comp = any(getattr(self.options["boost"], "without_{}".format(boost_comp), True) for boost_comp in self._required_boost_components) - if self.options["boost"].header_only or miss_boost_required_comp: - raise ConanInvalidConfiguration("{0} requires non header-only boost with these components: {1}".format(self.name, ", ".join(self._required_boost_components))) + miss_boost_required_comp = any( + self.dependencies["boost"].options.get_safe(f"without_{boost_comp}", True) + for boost_comp in self._required_boost_components + ) + if self.dependencies["boost"].options.header_only or miss_boost_required_comp: + raise ConanInvalidConfiguration( + "{0} requires non header-only boost with these components: {1}".format( + self.name, ", ".join(self._required_boost_components) + ) + ) + + if is_msvc(self) and self.options.shared: + # test_package.obj : error LNK2019: unresolved external symbol "public: __cdecl boost::archive::codecvt_null::codecvt_null(unsigned __int64)" + # https://github.com/boostorg/serialization/issues/232 + # https://github.com/conda-forge/scipoptsuite-feedstock/pull/44 + raise ConanInvalidConfiguration("Shared builds are currently broken on MSVC") def source(self): - tools.get(**self.conan_data["sources"][self.version], - destination=self._source_subfolder, strip_root=True) + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + tc.variables["PAGMO_BUILD_TESTS"] = False + tc.variables["PAGMO_BUILD_BENCHMARKS"] = False + tc.variables["PAGMO_BUILD_TUTORIALS"] = False + tc.variables["PAGMO_WITH_EIGEN3"] = self.options.with_eigen + tc.variables["PAGMO_WITH_NLOPT"] = self.options.with_nlopt + tc.variables["PAGMO_WITH_IPOPT"] = self.options.with_ipopt + tc.variables["PAGMO_ENABLE_IPO"] = False + tc.variables["PAGMO_BUILD_STATIC_LIBRARY"] = not self.options.shared + tc.generate() + tc = CMakeDeps(self) + tc.generate() def _patch_sources(self): # do not force MT runtime for static lib - tools.replace_in_file(os.path.join(self._source_subfolder, "CMakeLists.txt"), - "if(YACMA_COMPILER_IS_MSVC AND PAGMO_BUILD_STATIC_LIBRARY)", - "if(0)") + if Version(self.version) < "2.18": + replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), + "if(YACMA_COMPILER_IS_MSVC AND PAGMO_BUILD_STATIC_LIBRARY)", "if(0)") # No warnings as errors - yacma_cmake = os.path.join(self._source_subfolder, "cmake_modules", "yacma", "YACMACompilerLinkerSettings.cmake") - tools.replace_in_file(yacma_cmake, "list(APPEND _YACMA_CXX_FLAGS_DEBUG \"-Werror\")", "") - tools.replace_in_file(yacma_cmake, "_YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(/W4)", "") - tools.replace_in_file(yacma_cmake, "_YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(/WX)", "") - - @functools.lru_cache(1) - def _configure_cmake(self): - cmake = CMake(self) - cmake.definitions["PAGMO_BUILD_TESTS"] = False - cmake.definitions["PAGMO_BUILD_BENCHMARKS"] = False - cmake.definitions["PAGMO_BUILD_TUTORIALS"] = False - cmake.definitions["PAGMO_WITH_EIGEN3"] = self.options.with_eigen - cmake.definitions["PAGMO_WITH_NLOPT"] = self.options.with_nlopt - cmake.definitions["PAGMO_WITH_IPOPT"] = self.options.with_ipopt - cmake.definitions["PAGMO_ENABLE_IPO"] = False - cmake.definitions["PAGMO_BUILD_STATIC_LIBRARY"] = not self.options.shared - cmake.configure() - return cmake + yacma_cmake = os.path.join(self.source_folder, "cmake_modules", "yacma", "YACMACompilerLinkerSettings.cmake") + replace_in_file(self, yacma_cmake, 'list(APPEND _YACMA_CXX_FLAGS_DEBUG "-Werror")', "") + replace_in_file(self, yacma_cmake, "_YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(/W4)", "") + replace_in_file(self, yacma_cmake, "_YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(/WX)", "") def build(self): self._patch_sources() - cmake = self._configure_cmake() + cmake = CMake(self) + cmake.configure() cmake.build() def package(self): - self.copy(pattern="COPYING.*", dst="licenses", src=self._source_subfolder) - cmake = self._configure_cmake() + copy(self, "COPYING.*", + dst=os.path.join(self.package_folder, "licenses"), + src=self.source_folder) + cmake = CMake(self) cmake.install() - tools.rmdir(os.path.join(self.package_folder, "lib", "cmake")) + rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) def package_info(self): - self.cpp_info.set_property("cmake_file_name", "pagmo") + # https://esa.github.io/pagmo2/quickstart.html#using-pagmo-with-cmake + self.cpp_info.set_property("cmake_file_name", "Pagmo") self.cpp_info.set_property("cmake_target_name", "Pagmo::pagmo") - # TODO: back to global scope in conan v2 once cmake_find_package_* generators removed + self.cpp_info.components["_pagmo"].libs = ["pagmo"] - self.cpp_info.components["_pagmo"].requires = ["boost::headers", "boost::serialization", "onetbb::onetbb"] + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.components["_pagmo"].system_libs.append("pthread") + + # TODO: back to global scope in conan v2 once cmake_find_package_* generators removed + self.cpp_info.components["_pagmo"].requires = ["boost::boost", "onetbb::onetbb"] if self.options.with_eigen: self.cpp_info.components["_pagmo"].requires.append("eigen::eigen") if self.options.with_nlopt: self.cpp_info.components["_pagmo"].requires.append("nlopt::nlopt") - if self.settings.os in ["Linux", "FreeBSD"]: - self.cpp_info.components["_pagmo"].system_libs.append("pthread") - - # TODO: to remove in conan v2 once cmake_find_package_* generators removed self.cpp_info.filenames["cmake_find_package"] = "pagmo" self.cpp_info.filenames["cmake_find_package_multi"] = "pagmo" self.cpp_info.names["cmake_find_package"] = "Pagmo" self.cpp_info.names["cmake_find_package_multi"] = "Pagmo" self.cpp_info.components["_pagmo"].names["cmake_find_package"] = "pagmo" self.cpp_info.components["_pagmo"].names["cmake_find_package_multi"] = "pagmo" - self.cpp_info.components["_pagmo"].set_property("cmake_target_name", "Pagmo::pagmo") diff --git a/recipes/pagmo2/all/test_package/CMakeLists.txt b/recipes/pagmo2/all/test_package/CMakeLists.txt index e512e2207b158..73aa85822f44b 100644 --- a/recipes/pagmo2/all/test_package/CMakeLists.txt +++ b/recipes/pagmo2/all/test_package/CMakeLists.txt @@ -1,10 +1,7 @@ -cmake_minimum_required(VERSION 3.8) -project(test_package) +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) - -find_package(pagmo REQUIRED CONFIG) +find_package(Pagmo REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) target_link_libraries(${PROJECT_NAME} Pagmo::pagmo) diff --git a/recipes/pagmo2/all/test_package/conanfile.py b/recipes/pagmo2/all/test_package/conanfile.py index 38f4483872d47..ef5d7042163ec 100644 --- a/recipes/pagmo2/all/test_package/conanfile.py +++ b/recipes/pagmo2/all/test_package/conanfile.py @@ -1,10 +1,19 @@ -from conans import ConanFile, CMake, tools +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake import os class TestPackageConan(ConanFile): settings = "os", "arch", "compiler", "build_type" - generators = "cmake", "cmake_find_package_multi" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) def build(self): cmake = CMake(self) @@ -12,6 +21,6 @@ def build(self): cmake.build() def test(self): - if not tools.cross_building(self): - bin_path = os.path.join("bin", "test_package") - self.run(bin_path, run_environment=True) + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/pagmo2/all/test_v1_package/CMakeLists.txt b/recipes/pagmo2/all/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..91630d79f4abb --- /dev/null +++ b/recipes/pagmo2/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/flecs/all/test_v1_package/conanfile.py b/recipes/pagmo2/all/test_v1_package/conanfile.py similarity index 100% rename from recipes/flecs/all/test_v1_package/conanfile.py rename to recipes/pagmo2/all/test_v1_package/conanfile.py diff --git a/recipes/pagmo2/config.yml b/recipes/pagmo2/config.yml index 0daf1d812658e..4d9124762cc74 100644 --- a/recipes/pagmo2/config.yml +++ b/recipes/pagmo2/config.yml @@ -1,4 +1,6 @@ versions: + "2.19.0": + folder: all "2.17.0": folder: all "2.10": diff --git a/recipes/pagmo2/pre_2.11/CMakeLists.txt b/recipes/pagmo2/pre_2.11/CMakeLists.txt deleted file mode 100644 index 361b35d4c17d9..0000000000000 --- a/recipes/pagmo2/pre_2.11/CMakeLists.txt +++ /dev/null @@ -1,7 +0,0 @@ -cmake_minimum_required(VERSION 2.8.11) -project(cmake_wrapper) - -include(conanbuildinfo.cmake) -conan_basic_setup() - -add_subdirectory(source_subfolder) diff --git a/recipes/pagmo2/pre_2.11/conandata.yml b/recipes/pagmo2/pre_2.11/conandata.yml index fb48c3245b653..9bb70cc4e5a27 100644 --- a/recipes/pagmo2/pre_2.11/conandata.yml +++ b/recipes/pagmo2/pre_2.11/conandata.yml @@ -5,4 +5,3 @@ sources: patches: "2.10": - patch_file: "patches/0001-fix-cmake-module-path-2-10.patch" - base_path: "source_subfolder" diff --git a/recipes/pagmo2/pre_2.11/conanfile.py b/recipes/pagmo2/pre_2.11/conanfile.py index eeacc0b3752d5..485b29614940a 100644 --- a/recipes/pagmo2/pre_2.11/conanfile.py +++ b/recipes/pagmo2/pre_2.11/conanfile.py @@ -1,18 +1,23 @@ -from conans import ConanFile, CMake, tools -from conans.errors import ConanInvalidConfiguration import os -required_conan_version = ">=1.43.0" +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.build import check_min_cppstd +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rmdir + +required_conan_version = ">=1.53.0" class Pagmo2Conan(ConanFile): name = "pagmo2" description = "pagmo is a C++ scientific library for massively parallel optimization." license = ("LGPL-3.0-or-later", "GPL-3.0-or-later") - topics = ("pagmo", "optimization", "parallel-computing", "genetic-algorithm", "metaheuristics") - homepage = "https://esa.github.io/pagmo2" url = "https://github.com/conan-io/conan-center-index" + homepage = "https://esa.github.io/pagmo2" + topics = ("pagmo", "optimization", "parallel-computing", "genetic-algorithm", "metaheuristics", "header-only") + package_type = "header-library" settings = "os", "arch", "compiler", "build_type" options = { "with_eigen": [True, False], @@ -25,25 +30,22 @@ class Pagmo2Conan(ConanFile): "with_ipopt": False, } - generators = "cmake", "cmake_find_package", "cmake_find_package_multi" - _cmake = None - - @property - def _source_subfolder(self): - return "source_subfolder" - def export_sources(self): - self.copy("CMakeLists.txt") - for patch in self.conan_data.get("patches", {}).get(self.version, []): - self.copy(patch["patch_file"]) + export_conandata_patches(self) + + def layout(self): + cmake_layout(self, src_folder="src") def requirements(self): - self.requires("boost/1.78.0") - self.requires("onetbb/2020.3") + self.requires("boost/1.83.0", transitive_headers=True) + self.requires("onetbb/2021.10.0") if self.options.with_eigen: - self.requires("eigen/3.4.0") + self.requires("eigen/3.4.0", transitive_headers=True) if self.options.with_nlopt: - self.requires("nlopt/2.7.1") + self.requires("nlopt/2.7.1", transitive_headers=True, transitive_libs=True) + + def package_id(self): + self.info.settings.clear() @property def _required_boost_components(self): @@ -51,61 +53,69 @@ def _required_boost_components(self): def validate(self): if self.settings.compiler.get_safe("cppstd"): - tools.check_min_cppstd(self, 11) + check_min_cppstd(self, 11) # TODO: add ipopt support if self.options.with_ipopt: raise ConanInvalidConfiguration("ipopt recipe not available yet in CCI") - miss_boost_required_comp = any(getattr(self.options["boost"], "without_{}".format(boost_comp), True) for boost_comp in self._required_boost_components) - if self.options["boost"].header_only or miss_boost_required_comp: - raise ConanInvalidConfiguration("{0} requires non header-only boost with these components: {1}".format(self.name, ", ".join(self._required_boost_components))) - - def package_id(self): - self.info.settings.clear() + miss_boost_required_comp = any( + self.dependencies["boost"].options.get_safe(f"without_{boost_comp}", True) + for boost_comp in self._required_boost_components + ) + if self.dependencies["boost"].options.header_only or miss_boost_required_comp: + raise ConanInvalidConfiguration( + "{0} requires non header-only boost with these components: {1}".format( + self.name, ", ".join(self._required_boost_components) + ) + ) def source(self): - tools.get(**self.conan_data["sources"][self.version], - destination=self._source_subfolder, strip_root=True) - - def _configure_cmake(self): - if self._cmake: - return self._cmake - self._cmake = CMake(self) - self._cmake.definitions["PAGMO_BUILD_TESTS"] = False - self._cmake.definitions["PAGMO_BUILD_TUTORIALS"] = False - self._cmake.definitions["PAGMO_WITH_EIGEN3"] = self.options.with_eigen - self._cmake.definitions["PAGMO_WITH_NLOPT"] = self.options.with_nlopt - self._cmake.definitions["PAGMO_WITH_IPOPT"] = self.options.with_ipopt - self._cmake.configure() - return self._cmake + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + tc.variables["PAGMO_BUILD_TESTS"] = False + tc.variables["PAGMO_BUILD_TUTORIALS"] = False + tc.variables["PAGMO_WITH_EIGEN3"] = self.options.with_eigen + tc.variables["PAGMO_WITH_NLOPT"] = self.options.with_nlopt + tc.variables["PAGMO_WITH_IPOPT"] = self.options.with_ipopt + tc.generate() + tc = CMakeDeps(self) + tc.generate() def build(self): - for patch in self.conan_data.get("patches", {}).get(self.version, []): - tools.patch(**patch) + apply_conandata_patches(self) + cmake = CMake(self) + cmake.configure() + cmake.build() def package(self): - self.copy(pattern="COPYING.*", dst="licenses", src=self._source_subfolder) - cmake = self._configure_cmake() + copy( + self, + pattern="COPYING.*", + dst=os.path.join(self.package_folder, "licenses"), + src=self.source_folder, + ) + cmake = CMake(self) cmake.install() - tools.rmdir(os.path.join(self.package_folder, "lib", "cmake")) + rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) def package_info(self): self.cpp_info.set_property("cmake_file_name", "pagmo") self.cpp_info.set_property("cmake_target_name", "Pagmo::pagmo") + + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.components["_pagmo"].system_libs.append("pthread") + # TODO: back to global scope in conan v2 once cmake_find_package_* generators removed - self.cpp_info.components["_pagmo"].requires = ["boost::headers", "boost::serialization", "onetbb::onetbb"] + self.cpp_info.components["_pagmo"].requires = ["boost::boost", "onetbb::onetbb"] if self.options.with_eigen: self.cpp_info.components["_pagmo"].requires.append("eigen::eigen") if self.options.with_nlopt: self.cpp_info.components["_pagmo"].requires.append("nlopt::nlopt") - if self.settings.os in ["Linux", "FreeBSD"]: - self.cpp_info.components["_pagmo"].system_libs.append("pthread") - - # TODO: to remove in conan v2 once cmake_find_package_* generators removed self.cpp_info.filenames["cmake_find_package"] = "pagmo" self.cpp_info.filenames["cmake_find_package_multi"] = "pagmo" self.cpp_info.names["cmake_find_package"] = "Pagmo" self.cpp_info.names["cmake_find_package_multi"] = "Pagmo" self.cpp_info.components["_pagmo"].names["cmake_find_package"] = "pagmo" self.cpp_info.components["_pagmo"].names["cmake_find_package_multi"] = "pagmo" - self.cpp_info.components["_pagmo"].set_property("cmake_target_name", "Pagmo::pagmo") diff --git a/recipes/pagmo2/pre_2.11/test_package/CMakeLists.txt b/recipes/pagmo2/pre_2.11/test_package/CMakeLists.txt index 7439694a33876..de018735ec0b2 100644 --- a/recipes/pagmo2/pre_2.11/test_package/CMakeLists.txt +++ b/recipes/pagmo2/pre_2.11/test_package/CMakeLists.txt @@ -1,8 +1,5 @@ -cmake_minimum_required(VERSION 3.8) -project(test_package) - -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) find_package(pagmo REQUIRED CONFIG) diff --git a/recipes/pagmo2/pre_2.11/test_package/conanfile.py b/recipes/pagmo2/pre_2.11/test_package/conanfile.py index 38f4483872d47..ef5d7042163ec 100644 --- a/recipes/pagmo2/pre_2.11/test_package/conanfile.py +++ b/recipes/pagmo2/pre_2.11/test_package/conanfile.py @@ -1,10 +1,19 @@ -from conans import ConanFile, CMake, tools +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake import os class TestPackageConan(ConanFile): settings = "os", "arch", "compiler", "build_type" - generators = "cmake", "cmake_find_package_multi" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) def build(self): cmake = CMake(self) @@ -12,6 +21,6 @@ def build(self): cmake.build() def test(self): - if not tools.cross_building(self): - bin_path = os.path.join("bin", "test_package") - self.run(bin_path, run_environment=True) + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/pagmo2/pre_2.11/test_v1_package/CMakeLists.txt b/recipes/pagmo2/pre_2.11/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..91630d79f4abb --- /dev/null +++ b/recipes/pagmo2/pre_2.11/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/libgit2/0.27.x/test_package/conanfile.py b/recipes/pagmo2/pre_2.11/test_v1_package/conanfile.py similarity index 100% rename from recipes/libgit2/0.27.x/test_package/conanfile.py rename to recipes/pagmo2/pre_2.11/test_v1_package/conanfile.py diff --git a/recipes/paho-mqtt-cpp/all/conandata.yml b/recipes/paho-mqtt-cpp/all/conandata.yml index 82fdb49cadc6c..e14c99ec20579 100644 --- a/recipes/paho-mqtt-cpp/all/conandata.yml +++ b/recipes/paho-mqtt-cpp/all/conandata.yml @@ -1,24 +1,30 @@ sources: + "1.4.1": + url: "https://github.com/eclipse/paho.mqtt.cpp/archive/v1.4.1.tar.gz" + sha256: "48e7ba6e1032aa73e4d985a7387e02a77cc5807a8420d16790b84b941d86374e" + "1.4.0": + url: "https://github.com/eclipse/paho.mqtt.cpp/archive/v1.4.0.tar.gz" + sha256: "758c504b585402fbeb47822e52897239bbd53b4236ac3908cc040e09d2a8d8e1" + "1.3.2": + url: "https://github.com/eclipse/paho.mqtt.cpp/archive/v1.3.2.tar.gz" + sha256: "c271d521287f417102b447b3d1e8d17be0e0f6a3b0b653334ebcd2ccd20d1e46" "1.2.0": - sha256: 435e97e4d5b1da13daa26cadd3e83fe9d154930abaa78b8ff1b8c854b5345d8b - url: https://github.com/eclipse/paho.mqtt.cpp/archive/v1.2.0.tar.gz - "1.1": - sha256: cb0343349ed91ef51d0e76ae860d19435a730d3d355e57886bb090014cb70bbe - url: https://github.com/eclipse/paho.mqtt.cpp/archive/v1.1.tar.gz - "1.0.1": - sha256: e97386d159b811e534b98d21e3f6881ab2b43678ec026da7525d5c21ebc292ff - url: https://github.com/eclipse/paho.mqtt.cpp/archive/v1.0.1.tar.gz + url: "https://github.com/eclipse/paho.mqtt.cpp/archive/v1.2.0.tar.gz" + sha256: "435e97e4d5b1da13daa26cadd3e83fe9d154930abaa78b8ff1b8c854b5345d8b" patches: - "1.2.0": - - patch_file: "patches/1.2.0-0001-fix-cmake.patch" - patch_description: "CMake: Honor fPIC option and properly link paho-mqtt-c to object target" + "1.4.1": + - patch_file: "patches/1.4.1-0001-fix-cmake.patch" + patch_description: "CMake: Honor fPIC option" + patch_type: "conan" + "1.4.0": + - patch_file: "patches/1.4.0-0001-fix-cmake.patch" + patch_description: "CMake: Honor fPIC option" patch_type: "conan" - "1.1": - - patch_file: "patches/1.1-0001-fix-cmake.patch" + "1.3.2": + - patch_file: "patches/1.3.2-0001-fix-cmake.patch" patch_description: "CMake: Honor fPIC option and properly link paho-mqtt-c to object target" patch_type: "conan" - - patch_file: "patches/1.1-0002-deadlock_and_remlog-for-1-1.patch" - "1.0.1": - - patch_file: "patches/1.0.1-0001-fix-cmake.patch" - patch_description: "CMake: properly link paho-mqtt-c to object target" + "1.2.0": + - patch_file: "patches/1.2.0-0001-fix-cmake.patch" + patch_description: "CMake: Honor fPIC option and properly link paho-mqtt-c to object target" patch_type: "conan" diff --git a/recipes/paho-mqtt-cpp/all/conanfile.py b/recipes/paho-mqtt-cpp/all/conanfile.py index a2003509d5dc7..29c655cc42b87 100644 --- a/recipes/paho-mqtt-cpp/all/conanfile.py +++ b/recipes/paho-mqtt-cpp/all/conanfile.py @@ -21,12 +21,10 @@ class PahoMqttCppConan(ConanFile): options = { "shared": [True, False], "fPIC": [True, False], - "ssl": [True, False, "deprecated"], # TODO: deprecated option, to remove in few months } default_options = { "shared": False, "fPIC": True, - "ssl": "deprecated", } @property @@ -47,25 +45,13 @@ def configure(self): suffix = "" if Version(conan_version).major < "2" else "/*" self.options[f"paho-mqtt-c{suffix}"].shared = self.options.shared - # TODO: deprecated option, to remove in few months - if self.options.ssl != "deprecated": - self.output.warning("ssl option is deprecated, do not use anymore") - def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - if Version(self.version) >= "1.2.0": - # Headers are exposed https://github.com/conan-io/conan-center-index/pull/16760#issuecomment-1502420549 - # Symbols are exposed "_MQTTProperties_free", referenced from: mqtt::connect_options::~connect_options() in test_package.cpp.o - self.requires("paho-mqtt-c/1.3.9", transitive_headers=True, transitive_libs=True) - else: - # This is the "official tested" version https://github.com/eclipse/paho.mqtt.cpp/releases/tag/v1.1 - self.requires("paho-mqtt-c/1.3.1", transitive_headers=True, transitive_libs=True) - - def package_id(self): - # TODO: deprecated option, to remove in few months - del self.info.options.ssl + # Headers are exposed https://github.com/conan-io/conan-center-index/pull/16760#issuecomment-1502420549 + # Symbols are exposed "_MQTTProperties_free", referenced from: mqtt::connect_options::~connect_options() in test_package.cpp.o + self.requires("paho-mqtt-c/1.3.13", transitive_headers=True, transitive_libs=True) def validate(self): if self.settings.compiler.get_safe("cppstd"): @@ -73,8 +59,6 @@ def validate(self): if self.dependencies["paho-mqtt-c"].options.shared != self.options.shared: raise ConanInvalidConfiguration(f"{self.ref} requires paho-mqtt-c to have a matching 'shared' option.") - if Version(self.version) < "1.2.0" and Version(self.dependencies["paho-mqtt-c"].ref.version) >= "1.3.2": - raise ConanInvalidConfiguration(f"{self.ref} requires paho-mqtt-c =< 1.3.1") def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) @@ -88,8 +72,9 @@ def generate(self): tc.variables["PAHO_WITH_SSL"] = self.dependencies["paho-mqtt-c"].options.ssl tc.generate() deps = CMakeDeps(self) - deps.set_property("paho-mqtt-c", "cmake_file_name", "PahoMqttC") - deps.set_property("paho-mqtt-c", "cmake_target_name", "PahoMqttC::PahoMqttC") + if Version(self.version) < "1.4.0": + deps.set_property("paho-mqtt-c", "cmake_file_name", "PahoMqttC") + deps.set_property("paho-mqtt-c", "cmake_target_name", "PahoMqttC::PahoMqttC") deps.generate() def build(self): diff --git a/recipes/paho-mqtt-cpp/all/patches/1.0.1-0001-fix-cmake.patch b/recipes/paho-mqtt-cpp/all/patches/1.0.1-0001-fix-cmake.patch deleted file mode 100644 index e22c0033d4b91..0000000000000 --- a/recipes/paho-mqtt-cpp/all/patches/1.0.1-0001-fix-cmake.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- a/src/CMakeLists.txt -+++ b/src/CMakeLists.txt -@@ -74,9 +74,9 @@ target_include_directories(paho-cpp-objs - $ - $ - PRIVATE -- ${PAHO_MQTT_C_INCLUDE_DIRS} - src - ) -+target_link_libraries(paho-cpp-objs PUBLIC PahoMqttC::PahoMqttC) - - - ## --- Build the shared library, if requested --- diff --git a/recipes/paho-mqtt-cpp/all/patches/1.1-0001-fix-cmake.patch b/recipes/paho-mqtt-cpp/all/patches/1.1-0001-fix-cmake.patch deleted file mode 100644 index dbcbfa21fd7ce..0000000000000 --- a/recipes/paho-mqtt-cpp/all/patches/1.1-0001-fix-cmake.patch +++ /dev/null @@ -1,26 +0,0 @@ ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -56,7 +56,6 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON) - set(CMAKE_CXX_EXTENSIONS OFF) - - # Generate position-independent code (-fPIC on UNIX) --set(CMAKE_POSITION_INDEPENDENT_CODE ON) - - # --- System Libraries --- - ---- a/src/CMakeLists.txt -+++ b/src/CMakeLists.txt -@@ -72,9 +72,12 @@ target_include_directories(paho-cpp-objs - $ - $ - PRIVATE -- ${PAHO_MQTT_C_INCLUDE_DIRS} - src - ) -+target_link_libraries(paho-cpp-objs PUBLIC PahoMqttC::PahoMqttC) -+if(PAHO_BUILD_SHARED) -+ set_target_properties(paho-cpp-objs PROPERTIES POSITION_INDEPENDENT_CODE ON) -+endif() - - - ## --- Build the shared library, if requested --- diff --git a/recipes/paho-mqtt-cpp/all/patches/1.1-0002-deadlock_and_remlog-for-1-1.patch b/recipes/paho-mqtt-cpp/all/patches/1.1-0002-deadlock_and_remlog-for-1-1.patch deleted file mode 100644 index 4aec911f54ce3..0000000000000 --- a/recipes/paho-mqtt-cpp/all/patches/1.1-0002-deadlock_and_remlog-for-1-1.patch +++ /dev/null @@ -1,360 +0,0 @@ -diff --git a/src/async_client.cpp b/src/async_client.cpp -index c536b77..1a89662 100644 ---- a/src/async_client.cpp -+++ b/src/async_client.cpp -@@ -34,27 +34,6 @@ - #define MQTTAsync_createOptions_initializer5 { {'M', 'Q', 'C', 'O'}, 0, 0, 100, MQTTVERSION_5 } - #endif - --///////////////////////////////////////////////////////////////////////////// --// Paho C logger -- --enum LOG_LEVELS { -- INVALID_LEVEL = -1, -- TRACE_MAX = 1, -- TRACE_MED, -- TRACE_MIN, -- TRACE_PROTOCOL, -- LOG_PROTOCOL = TRACE_PROTOCOL, -- LOG_ERROR, -- LOG_SEVERE, -- LOG_FATAL, --}; -- --extern "C" { -- void Log(enum LOG_LEVELS, int, const char *, ...); --} -- --///////////////////////////////////////////////////////////////////////////// -- - namespace mqtt { - - ///////////////////////////////////////////////////////////////////////////// -@@ -150,8 +129,6 @@ async_client::~async_client() - // is notified of success on a normal connect with callbacks. - void async_client::on_connected(void* context, char* cause) - { -- ::Log(TRACE_MIN, -1, "[cpp] on_connected"); -- - if (context) { - async_client* cli = static_cast(context); - callback* cb = cli->userCallback_; -@@ -172,8 +149,6 @@ void async_client::on_connected(void* context, char* cause) - // MQTTAsync_setCallbacks(). - void async_client::on_connection_lost(void *context, char *cause) - { -- ::Log(TRACE_MIN, -1, "[cpp] on_connection lost"); -- - if (context) { - async_client* cli = static_cast(context); - callback* cb = cli->userCallback_; -@@ -193,6 +168,22 @@ void async_client::on_connection_lost(void *context, char *cause) - } - } - -+// Callback from the C lib for when a disconnect packet is received from -+// the server. -+void async_client::on_disconnected(void* context, MQTTProperties* cprops, -+ MQTTReasonCodes reasonCode) -+{ -+ if (context) { -+ async_client* cli = static_cast(context); -+ auto& disconnectedHandler = cli->disconnectedHandler_; -+ -+ if (disconnectedHandler) { -+ properties props(*cprops); -+ disconnectedHandler(props, ReasonCode(reasonCode)); -+ } -+ } -+} -+ - // Callback for when a subscribed message arrives. - // This is called from the MQTTAsync_messageArrived registered via - // MQTTAsync_setCallbacks(). -@@ -365,6 +356,13 @@ void async_client::set_connection_lost_handler(connection_handler cb) - &async_client::on_connection_lost)); - } - -+void async_client::set_disconnected_handler(disconnected_handler cb) -+{ -+ disconnectedHandler_ = cb; -+ check_ret(::MQTTAsync_setDisconnected(cli_, this, -+ &async_client::on_disconnected)); -+} -+ - void async_client::set_message_callback(message_handler cb) - { - msgHandler_ = cb; -diff --git a/src/mqtt/async_client.h b/src/mqtt/async_client.h -index 4323071..4bbd95c 100644 ---- a/src/mqtt/async_client.h -+++ b/src/mqtt/async_client.h -@@ -32,6 +32,7 @@ - #include "mqtt/delivery_token.h" - #include "mqtt/iclient_persistence.h" - #include "mqtt/iaction_listener.h" -+#include "mqtt/properties.h" - #include "mqtt/exception.h" - #include "mqtt/message.h" - #include "mqtt/callback.h" -@@ -84,6 +85,8 @@ public: - using message_handler = std::function; - /** Handler type for when a connecion is made or lost */ - using connection_handler = std::function; -+ /** Handler type for when a disconnect packet is received */ -+ using disconnected_handler = std::function; - - private: - /** Lock guard type for this class */ -@@ -105,10 +108,12 @@ private: - std::unique_ptr persist_; - /** Callback supplied by the user (if any) */ - callback* userCallback_; -- /** Connection handler */ -+ /** Connection handler */ - connection_handler connHandler_; -- /** Connection lost handler */ -+ /** Connection lost handler */ - connection_handler connLostHandler_; -+ /** Disconnected handler */ -+ disconnected_handler disconnectedHandler_; - /** Message handler (if any) */ - message_handler msgHandler_; - /** Copy of connect token (for re-connects) */ -@@ -120,9 +125,11 @@ private: - /** A queue of messages for consumer API */ - consumer_queue_type que_; - -- /** Callbacks from the C library */ -+ /** Callbacks from the C library */ - static void on_connected(void* context, char* cause); - static void on_connection_lost(void *context, char *cause); -+ static void on_disconnected(void* context, MQTTProperties* cprops, -+ MQTTReasonCodes reasonCode); - static int on_message_arrived(void* context, char* topicName, int topicLen, - MQTTAsync_message* msg); - static void on_delivery_complete(void* context, MQTTAsync_token tok); -@@ -234,6 +241,11 @@ public: - * @param cb Callback functor for when the connection is lost. - */ - void set_connection_lost_handler(connection_handler cb) /*override*/; -+ /** -+ * Callback for when a disconnect packet is received from the server. -+ * @param cb Callback for when the disconnect packet is received. -+ */ -+ void set_disconnected_handler(disconnected_handler cb) /*override*/; - /** - * Sets the callback for when a message arrives from the broker. - * Note that the application can only have one message handler which can -diff --git a/src/mqtt/thread_queue.h b/src/mqtt/thread_queue.h -index 94c3fea..5dafe6e 100644 ---- a/src/mqtt/thread_queue.h -+++ b/src/mqtt/thread_queue.h -@@ -31,6 +31,7 @@ - #include - #include - #include -+#include - - namespace mqtt { - -@@ -102,9 +103,9 @@ public: - /** - * Constructs a queue with the specified capacity. - * @param cap The maximum number of items that can be placed in the -- * queue. -+ * queue. The minimum capacity is 1. - */ -- explicit thread_queue(size_t cap) : cap_(cap) {} -+ explicit thread_queue(size_t cap) : cap_(std::max(cap, 1)) {} - /** - * Determine if the queue is empty. - * @return @em true if there are no elements in the queue, @em false if -@@ -148,11 +149,11 @@ public: - */ - void put(value_type val) { - unique_guard g(lock_); -- size_type n = que_.size(); -- if (n >= cap_) -+ if (que_.size() >= cap_) - notFullCond_.wait(g, [=]{return que_.size() < cap_;}); -+ bool wasEmpty = que_.empty(); - que_.emplace(std::move(val)); -- if (n == 0) { -+ if (wasEmpty) { - g.unlock(); - notEmptyCond_.notify_one(); - } -@@ -187,11 +188,11 @@ public: - template - bool try_put_for(value_type* val, const std::chrono::duration& relTime) { - unique_guard g(lock_); -- size_type n = que_.size(); -- if (n >= cap_ && !notFullCond_.wait_for(g, relTime, [=]{return que_.size() < cap_;})) -+ if (que_.size() >= cap_ && !notFullCond_.wait_for(g, relTime, [=]{return que_.size() < cap_;})) - return false; -+ bool wasEmpty = que_.empty(); - que_.emplace(std::move(val)); -- if (n == 0) { -+ if (wasEmpty) { - g.unlock(); - notEmptyCond_.notify_one(); - } -@@ -210,11 +211,11 @@ public: - template - bool try_put_until(value_type* val, const std::chrono::time_point& absTime) { - unique_guard g(lock_); -- size_type n = que_.size(); -- if (n >= cap_ && !notFullCond_.wait_until(g, absTime, [=]{return que_.size() < cap_;})) -+ if (que_.size() >= cap_ && !notFullCond_.wait_until(g, absTime, [=]{return que_.size() < cap_;})) - return false; -+ bool wasEmpty = que_.empty(); - que_.emplace(std::move(val)); -- if (n == 0) { -+ if (wasEmpty) { - g.unlock(); - notEmptyCond_.notify_one(); - } -@@ -228,12 +229,11 @@ public: - */ - void get(value_type* val) { - unique_guard g(lock_); -- auto n = que_.size(); -- if (n == 0) -+ if (que_.empty()) - notEmptyCond_.wait(g, [=]{return !que_.empty();}); - *val = std::move(que_.front()); - que_.pop(); -- if (n == cap_) { -+ if (que_.size() == cap_-1) { - g.unlock(); - notFullCond_.notify_one(); - } -@@ -246,12 +246,11 @@ public: - */ - value_type get() { - unique_guard g(lock_); -- auto n = que_.size(); -- if (n == 0) -+ if (que_.empty()) - notEmptyCond_.wait(g, [=]{return !que_.empty();}); - value_type val = std::move(que_.front()); - que_.pop(); -- if (n == cap_) { -+ if (que_.size() == cap_-1) { - g.unlock(); - notFullCond_.notify_one(); - } -@@ -267,12 +266,11 @@ public: - */ - bool try_get(value_type* val) { - unique_guard g(lock_); -- auto n = que_.size(); -- if (n == 0) -+ if (que_.empty()) - return false; - *val = std::move(que_.front()); - que_.pop(); -- if (n == cap_) { -+ if (que_.size() == cap_-1) { - g.unlock(); - notFullCond_.notify_one(); - } -@@ -291,12 +289,11 @@ public: - template - bool try_get_for(value_type* val, const std::chrono::duration& relTime) { - unique_guard g(lock_); -- auto n = que_.size(); -- if (n == 0 && !notEmptyCond_.wait_for(g, relTime, [=]{return !que_.empty();})) -+ if (que_.empty() && !notEmptyCond_.wait_for(g, relTime, [=]{return !que_.empty();})) - return false; - *val = std::move(que_.front()); - que_.pop(); -- if (n == cap_) { -+ if (que_.size() == cap_-1) { - g.unlock(); - notFullCond_.notify_one(); - } -@@ -315,12 +312,11 @@ public: - template - bool try_get_until(value_type* val, const std::chrono::time_point& absTime) { - unique_guard g(lock_); -- auto n = que_.size(); -- if (n == 0 && !notEmptyCond_.wait_until(g, absTime, [=]{return !que_.empty();})) -+ if (que_.empty() && !notEmptyCond_.wait_until(g, absTime, [=]{return !que_.empty();})) - return false; - *val = std::move(que_.front()); - que_.pop(); -- if (n == cap_) { -+ if (que_.size() == cap_-1) { - g.unlock(); - notFullCond_.notify_one(); - } -diff --git a/src/token.cpp b/src/token.cpp -index ffbf816..3853cf2 100644 ---- a/src/token.cpp -+++ b/src/token.cpp -@@ -23,27 +23,6 @@ - - #include - --///////////////////////////////////////////////////////////////////////////// --// Paho C logger -- --enum LOG_LEVELS { -- INVALID_LEVEL = -1, -- TRACE_MAX = 1, -- TRACE_MED, -- TRACE_MIN, -- TRACE_PROTOCOL, -- LOG_PROTOCOL = TRACE_PROTOCOL, -- LOG_ERROR, -- LOG_SEVERE, -- LOG_FATAL, --}; -- --extern "C" { -- void Log(enum LOG_LEVELS, int, const char *, ...); --} -- --///////////////////////////////////////////////////////////////////////////// -- - namespace mqtt { - - // -------------------------------------------------------------------------- -@@ -110,8 +89,6 @@ void token::on_failure5(void* context, MQTTAsync_failureData5* rsp) - // - void token::on_success(MQTTAsync_successData* rsp) - { -- ::Log(TRACE_MIN, -1, "[cpp] on_success"); -- - unique_lock g(lock_); - iaction_listener* listener = listener_; - -@@ -154,8 +131,6 @@ void token::on_success(MQTTAsync_successData* rsp) - // - void token::on_success5(MQTTAsync_successData5* rsp) - { -- ::Log(TRACE_MIN, -1, "[cpp] on_success5"); -- - unique_lock g(lock_); - iaction_listener* listener = listener_; - if (rsp) { -@@ -197,8 +172,6 @@ void token::on_success5(MQTTAsync_successData5* rsp) - // - void token::on_failure(MQTTAsync_failureData* rsp) - { -- ::Log(TRACE_MIN, -1, "[cpp] on_failure"); -- - unique_lock g(lock_); - iaction_listener* listener = listener_; - if (rsp) { -@@ -230,8 +203,6 @@ void token::on_failure(MQTTAsync_failureData* rsp) - // - void token::on_failure5(MQTTAsync_failureData5* rsp) - { -- ::Log(TRACE_MIN, -1, "[cpp] on_failure5"); -- - unique_lock g(lock_); - iaction_listener* listener = listener_; - if (rsp) { diff --git a/recipes/paho-mqtt-cpp/all/patches/1.3.2-0001-fix-cmake.patch b/recipes/paho-mqtt-cpp/all/patches/1.3.2-0001-fix-cmake.patch new file mode 100644 index 0000000000000..f2fe425491b50 --- /dev/null +++ b/recipes/paho-mqtt-cpp/all/patches/1.3.2-0001-fix-cmake.patch @@ -0,0 +1,26 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -58,7 +58,6 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON) + set(CMAKE_CXX_EXTENSIONS OFF) + + # Generate position-independent code (-fPIC on UNIX) +-set(CMAKE_POSITION_INDEPENDENT_CODE ON) + + # --- System Libraries --- + +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -82,9 +82,12 @@ target_include_directories(paho-cpp-objs + $ + $ + PRIVATE +- ${PAHO_MQTT_C_INCLUDE_DIRS} + src + ) ++target_link_libraries(paho-cpp-objs PUBLIC PahoMqttC::PahoMqttC) ++if(PAHO_BUILD_SHARED) ++ set_target_properties(paho-cpp-objs PROPERTIES POSITION_INDEPENDENT_CODE ON) ++endif() + + target_compile_definitions(paho-cpp-objs PRIVATE PAHO_MQTTPP_EXPORTS) + diff --git a/recipes/paho-mqtt-cpp/all/patches/1.4.0-0001-fix-cmake.patch b/recipes/paho-mqtt-cpp/all/patches/1.4.0-0001-fix-cmake.patch new file mode 100644 index 0000000000000..3a9eac127ef96 --- /dev/null +++ b/recipes/paho-mqtt-cpp/all/patches/1.4.0-0001-fix-cmake.patch @@ -0,0 +1,25 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 1155844..ace2e61 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -107,7 +107,7 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON) + set(CMAKE_CXX_EXTENSIONS OFF) + + # Generate position-independent code (-fPIC on UNIX) +-set(CMAKE_POSITION_INDEPENDENT_CODE ON) ++# set(CMAKE_POSITION_INDEPENDENT_CODE ON) + + # --- System Details --- + +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index c8b213d..2898972 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -68,6 +68,7 @@ if(PAHO_BUILD_SHARED) + set_target_properties(paho-mqttpp3 PROPERTIES + VERSION ${PROJECT_VERSION} + SOVERSION ${PROJECT_VERSION_MAJOR} ++ POSITION_INDEPENDENT_CODE ON + ) + endif() + diff --git a/recipes/paho-mqtt-cpp/all/patches/1.4.1-0001-fix-cmake.patch b/recipes/paho-mqtt-cpp/all/patches/1.4.1-0001-fix-cmake.patch new file mode 100644 index 0000000000000..2a2ea837355aa --- /dev/null +++ b/recipes/paho-mqtt-cpp/all/patches/1.4.1-0001-fix-cmake.patch @@ -0,0 +1,21 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -107,7 +107,7 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON) + set(CMAKE_CXX_EXTENSIONS OFF) + + # Generate position-independent code (-fPIC on UNIX) +-set(CMAKE_POSITION_INDEPENDENT_CODE ON) ++# set(CMAKE_POSITION_INDEPENDENT_CODE ON) + + # --- System Details --- + +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -68,6 +68,7 @@ if(PAHO_BUILD_SHARED) + set_target_properties(paho-mqttpp3 PROPERTIES + VERSION ${PROJECT_VERSION} + SOVERSION ${PROJECT_VERSION_MAJOR} ++ POSITION_INDEPENDENT_CODE ON + ) + endif() + diff --git a/recipes/paho-mqtt-cpp/all/test_package/CMakeLists.txt b/recipes/paho-mqtt-cpp/all/test_package/CMakeLists.txt index 110f1d17cc392..ff0d0d7fdb39c 100644 --- a/recipes/paho-mqtt-cpp/all/test_package/CMakeLists.txt +++ b/recipes/paho-mqtt-cpp/all/test_package/CMakeLists.txt @@ -1,18 +1,11 @@ -cmake_minimum_required(VERSION 3.8) +cmake_minimum_required(VERSION 3.15) -project(test_package C CXX) +project(test_package LANGUAGES CXX) find_package(PahoMqttCpp REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) - -if(TEST_SSL_OPTION) - target_compile_definitions(${PROJECT_NAME} PRIVATE TEST_SSL_OPTION) -endif() - -if(PAHO_MQTT_CPP_SHARED) - target_link_libraries(${PROJECT_NAME} PahoMqttCpp::paho-mqttpp3) -else() - target_link_libraries(${PROJECT_NAME} PahoMqttCpp::paho-mqttpp3-static) -endif() +target_link_libraries(${PROJECT_NAME} PRIVATE + $<$:PahoMqttCpp::paho-mqttpp3> + $<$>:PahoMqttCpp::paho-mqttpp3-static>) diff --git a/recipes/paho-mqtt-cpp/all/test_package/conanfile.py b/recipes/paho-mqtt-cpp/all/test_package/conanfile.py index 6b882c937645a..a3dc3d0a3dd9f 100644 --- a/recipes/paho-mqtt-cpp/all/test_package/conanfile.py +++ b/recipes/paho-mqtt-cpp/all/test_package/conanfile.py @@ -16,8 +16,6 @@ def layout(self): def generate(self): tc = CMakeToolchain(self) - tc.variables["TEST_SSL_OPTION"] = self.dependencies[self.tested_reference_str].options.ssl - tc.variables["PAHO_MQTT_CPP_SHARED"] = self.dependencies[self.tested_reference_str].options.shared tc.generate() deps = CMakeDeps(self) deps.generate() diff --git a/recipes/paho-mqtt-cpp/all/test_package/test_package.cpp b/recipes/paho-mqtt-cpp/all/test_package/test_package.cpp index 79865e445a31c..59652bb6459ca 100644 --- a/recipes/paho-mqtt-cpp/all/test_package/test_package.cpp +++ b/recipes/paho-mqtt-cpp/all/test_package/test_package.cpp @@ -1,26 +1,10 @@ -#include -#include "mqtt/async_client.h" -#include "mqtt/client.h" +#include +#include "mqtt/message.h" -const std::string SERVER_ADDRESS { "tcp://localhost:1883" }; -const std::string CLIENT_ID { "consume" }; - -int main(int argc, char* argv[]) -{ - mqtt::connect_options connOpts; - connOpts.set_keep_alive_interval(20); - connOpts.set_clean_session(true); - - mqtt::async_client cli_async(SERVER_ADDRESS, CLIENT_ID); - mqtt::client cli(SERVER_ADDRESS, CLIENT_ID); - -#ifdef TEST_SSL_OPTION - // Build the connect options, including SSL and a LWT message. - // auto sslopts = mqtt::ssl_options_builder(); // This was added in v1.2.0 - auto sslopts = mqtt::ssl_options(); -#endif +int main() { + mqtt::message msg("hello", "Hello there", 11, 1, true); + std::cout << "MQTT topic: " << msg.get_topic() << std::endl; return 0; } - diff --git a/recipes/paho-mqtt-cpp/all/test_v1_package/CMakeLists.txt b/recipes/paho-mqtt-cpp/all/test_v1_package/CMakeLists.txt index 925ecbe19e448..91630d79f4abb 100644 --- a/recipes/paho-mqtt-cpp/all/test_v1_package/CMakeLists.txt +++ b/recipes/paho-mqtt-cpp/all/test_v1_package/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.15) project(test_package) include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) diff --git a/recipes/paho-mqtt-cpp/all/test_v1_package/conanfile.py b/recipes/paho-mqtt-cpp/all/test_v1_package/conanfile.py index df31aee370d9b..5a05af3c2dfd2 100644 --- a/recipes/paho-mqtt-cpp/all/test_v1_package/conanfile.py +++ b/recipes/paho-mqtt-cpp/all/test_v1_package/conanfile.py @@ -3,15 +3,12 @@ import os -# legacy validation with Conan 1.x class TestPackageV1Conan(ConanFile): settings = "os", "arch", "compiler", "build_type" generators = "cmake", "cmake_find_package_multi" def build(self): cmake = CMake(self) - cmake.definitions["PAHO_MQTT_CPP_SHARED"] = self.options["paho-mqtt-cpp"].shared - cmake.definitions["TEST_SSL_OPTION"] = self.options["paho-mqtt-cpp"].ssl cmake.configure() cmake.build() diff --git a/recipes/paho-mqtt-cpp/config.yml b/recipes/paho-mqtt-cpp/config.yml index e1306dc2a1d9a..cc08f3a574b59 100644 --- a/recipes/paho-mqtt-cpp/config.yml +++ b/recipes/paho-mqtt-cpp/config.yml @@ -1,7 +1,9 @@ versions: - "1.2.0": + "1.4.1": + folder: "all" + "1.4.0": folder: "all" - "1.1": + "1.3.2": folder: "all" - "1.0.1": + "1.2.0": folder: "all" diff --git a/recipes/pango/all/conandata.yml b/recipes/pango/all/conandata.yml index c28a2cc9181bb..c6a58de488d3e 100644 --- a/recipes/pango/all/conandata.yml +++ b/recipes/pango/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.54.0": + url: "https://download.gnome.org/sources/pango/1.54/pango-1.54.0.tar.xz" + sha256: "8a9eed75021ee734d7fc0fdf3a65c3bba51dfefe4ae51a9b414a60c70b2d1ed8" "1.51.0": url: "https://download.gnome.org/sources/pango/1.51/pango-1.51.0.tar.xz" sha256: "74efc109ae6f903bbe6af77eaa2ac6094b8ee245a2e23f132a7a8f0862d1a9f5" diff --git a/recipes/pango/all/conanfile.py b/recipes/pango/all/conanfile.py index 95d2994e0044e..b822fb21641da 100644 --- a/recipes/pango/all/conanfile.py +++ b/recipes/pango/all/conanfile.py @@ -3,6 +3,7 @@ from conan import ConanFile from conan.errors import ConanInvalidConfiguration +from conan.tools.apple import is_apple_os from conan.tools.env import VirtualBuildEnv from conan.tools.files import chdir, copy, get, rename, replace_in_file, rm, rmdir from conan.tools.gnu import PkgConfigDeps @@ -31,26 +32,32 @@ class PangoConan(ConanFile): "with_xft": [True, False], "with_freetype": [True, False], "with_fontconfig": [True, False], + "with_introspection": [True, False], } default_options = { "shared": False, "fPIC": True, "with_libthai": False, "with_cairo": True, - "with_xft": False, - "with_freetype": False, - "with_fontconfig": False, + "with_xft": True, + # TODO: Currently can't actually disable this in Macos at least, + # it always shows up as detected in meson + "with_freetype": True, + "with_fontconfig": True, + "with_introspection": False, } def config_options(self): if self.settings.os == "Windows": del self.options.fPIC + if self.settings.os not in ["FreeBSD", "Linux"]: + del self.options.with_xft - if self.settings.os in ["FreeBSD", "Linux"]: - self.options.with_xft = True - if not self.settings.os in ["Macos", "Windows"]: - self.options.with_freetype = True - self.options.with_fontconfig = True + # Optional in Windows/Macos but false by default + # https://gitlab.gnome.org/GNOME/pango/-/blob/1.54.0/meson.build#L242 + if self.settings.os in ["Macos", "Windows"]: + self.options.with_fontconfig = False + self.options.with_freetype = False def configure(self): if self.options.shared: @@ -64,21 +71,15 @@ def layout(self): def requirements(self): if self.options.with_freetype: self.requires("freetype/2.13.2") - if self.options.with_fontconfig: - self.requires("fontconfig/2.14.2") - if self.options.with_xft: + self.requires("fontconfig/2.15.0") + if self.options.get_safe("with_xft"): self.requires("libxft/2.3.8") - if ( - self.options.with_xft - and self.options.with_fontconfig - and self.options.with_freetype - ): self.requires("xorg/system") # for xorg::xrender if self.options.with_cairo: # "pango/pangocairo.h" includes "cairo.h" self.requires("cairo/1.18.0", transitive_headers=True) - self.requires("glib/2.78.1", transitive_headers=True, transitive_libs=True) + self.requires("glib/2.78.3", transitive_headers=True, transitive_libs=True) self.requires("fribidi/1.0.13") # "pango/pango-coverage.h" includes "hb.h" self.requires("harfbuzz/8.3.0", transitive_headers=True) @@ -89,19 +90,25 @@ def validate(self): and Version(self.settings.compiler.version) < "5" ): raise ConanInvalidConfiguration(f"{self.name} does not support GCC before version 5. Contributions are welcome.") - if self.options.with_xft and not self.settings.os in ["Linux", "FreeBSD"]: - raise ConanInvalidConfiguration("Xft can only be used on Linux and FreeBSD") - if self.options.with_xft and ( - not self.options.with_freetype or not self.options.with_fontconfig - ): - raise ConanInvalidConfiguration("Xft requires freetype and fontconfig") + if self.options.get_safe("with_xft"): + if not self.options.with_freetype or not self.options.with_fontconfig: + raise ConanInvalidConfiguration(f"-o=&:with_xft=True requires -o=&:with_freetype=True and -o=&:with_fontconfig=True") if self.dependencies["glib"].options.shared and is_msvc_static_runtime(self): raise ConanInvalidConfiguration( "Linking shared glib with the MSVC static runtime is not supported" ) + # Can't be turned off outside Macos/Windows + # https://gitlab.gnome.org/GNOME/pango/-/blob/1.54.0/meson.build#L240 + if self.settings.os not in ["Macos", "Windows"] and not self.options.with_fontconfig: + raise ConanInvalidConfiguration(f"{self.ref} requires -o=&:with_fontconfig=True for {self.settings.os}") + + if (self.options.with_fontconfig and self.options.with_freetype + and not self.dependencies["cairo"].options.with_fontconfig): + raise ConanInvalidConfiguration(f"{self.ref} with -o=&:with_fontconfig=True and -o=&:with_freetype=True requires -o=cairo/*:with_fontconfig=True") + if self.options.shared: if not self.dependencies["glib"].options.shared: raise ConanInvalidConfiguration( @@ -118,33 +125,43 @@ def validate(self): def build_requirements(self): self.tool_requires("glib/") - self.tool_requires("meson/1.3.0") + self.tool_requires("meson/[>=1.2.3 <2]") if not self.conf.get("tools.gnu:pkg_config", default=False, check_type=str): - self.tool_requires("pkgconf/2.0.3") + self.tool_requires("pkgconf/[>=2.2 <3]") + if self.options.with_introspection: + self.tool_requires("gobject-introspection/1.78.1") def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) def generate(self): - virtual_build_env = VirtualBuildEnv(self) - virtual_build_env.generate() - pkg_config_deps = PkgConfigDeps(self) - pkg_config_deps.generate() + VirtualBuildEnv(self).generate() + + deps = PkgConfigDeps(self) + if self.options.with_introspection: + # gnome.generate_gir() in Meson looks for gobject-introspection-1.0.pc + deps.build_context_activated = ["gobject-introspection"] + deps.generate() + + enabled_disabled = lambda opt: "enabled" if opt else "disabled" tc = MesonToolchain(self) - tc.project_options["introspection"] = "disabled" - tc.project_options["libthai"] = "enabled" if self.options.with_libthai else "disabled" - tc.project_options["cairo"] = "enabled" if self.options.with_cairo else "disabled" - tc.project_options["xft"] = "enabled" if self.options.with_xft else "disabled" - tc.project_options["fontconfig"] = "enabled" if self.options.with_fontconfig else "disabled" - tc.project_options["freetype"] = "enabled" if self.options.with_freetype else "disabled" + tc.project_options["introspection"] = enabled_disabled(self.options.with_introspection) + tc.project_options["libthai"] = enabled_disabled(self.options.with_libthai) + tc.project_options["cairo"] = enabled_disabled(self.options.with_cairo) + tc.project_options["xft"] = enabled_disabled(self.options.get_safe("with_xft")) + tc.project_options["fontconfig"] = enabled_disabled(self.options.with_fontconfig) + tc.project_options["freetype"] = enabled_disabled(self.options.with_freetype) tc.generate() - def build(self): + def _patch_sources(self): meson_build = os.path.join(self.source_folder, "meson.build") replace_in_file(self, meson_build, "subdir('tests')", "") replace_in_file(self, meson_build, "subdir('tools')", "") replace_in_file(self, meson_build, "subdir('utils')", "") replace_in_file(self, meson_build, "subdir('examples')", "") + + def build(self): + self._patch_sources() meson = Meson(self) meson.configure() meson.build() @@ -164,6 +181,9 @@ def package(self): self._fix_library_names(os.path.join(self.package_folder, "lib")) rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) rm(self, "*.pdb", self.package_folder, recursive=True) + if self.options.with_introspection: + os.rename(os.path.join(self.package_folder, "share"), + os.path.join(self.package_folder, "res")) def package_info(self): self.cpp_info.components["pango_"].libs = ["pango-1.0"] @@ -178,41 +198,57 @@ def package_info(self): if self.options.with_fontconfig: self.cpp_info.components["pango_"].requires.append("fontconfig::fontconfig") - if self.options.with_xft: - self.cpp_info.components["pango_"].requires.append("libxft::libxft") - # Pango only uses xrender when Xft, fontconfig and freetype are enabled - if self.options.with_fontconfig and self.options.with_freetype: - self.cpp_info.components["pango_"].requires.append("xorg::xrender") + if self.options.get_safe("with_xft"): + # Pango only uses xrender when Xft, fontconfig and freetype are enabled, which if with_xft is true, + # means that the other options are true because they are checked in the validate() method + self.cpp_info.components["pango_"].requires.extend(["libxft::libxft", "xorg::xrender"]) if self.options.with_cairo: self.cpp_info.components["pango_"].requires.append("cairo::cairo_") self.cpp_info.components["pango_"].includedirs = [ os.path.join(self.package_folder, "include", "pango-1.0") ] - if self.options.with_freetype: + if self.options.with_introspection: + self.cpp_info.components["pango_"].resdirs = ["res"] + self.buildenv_info.append_path("GI_GIR_PATH", os.path.join(self.package_folder, "res", "gir-1.0")) + self.buildenv_info.append_path("GI_TYPELIB_PATH", os.path.join(self.package_folder, "lib", "girepository-1.0")) + self.env_info.GI_GIR_PATH.append(os.path.join(self.package_folder, "res", "gir-1.0")) + self.env_info.GI_TYPELIB_PATH.append(os.path.join(self.package_folder, "lib", "girepository-1.0")) + + # From meson.build: "To build pangoft2, we need HarfBuzz, FontConfig and FreeType" + if self.options.with_freetype and self.options.with_fontconfig: self.cpp_info.components["pangoft2"].libs = ["pangoft2-1.0"] self.cpp_info.components["pangoft2"].set_property("pkg_config_name", "pangoft2") self.cpp_info.components["pangoft2"].requires = [ "pango_", "freetype::freetype", + "fontconfig::fontconfig", ] self.cpp_info.components["pangoft2"].includedirs = [ os.path.join(self.package_folder, "include", "pango-1.0") ] + # https://gitlab.gnome.org/GNOME/pango/-/blob/1.54.0/meson.build#L320 + self.cpp_info.components["pango_"].requires.append("freetype::freetype") + if self.options.with_fontconfig: self.cpp_info.components["pangofc"].set_property("pkg_config_name", "pangofc") if self.options.with_freetype: - self.cpp_info.components["pangofc"].requires = ["pangoft2"] + # pangoft2 is always built if pango has fontconfig and freetype support + self.cpp_info.components["pangofc"].requires = ["freetype::freetype", "harfbuzz::harfbuzz", "pangoft2"] + elif self.options.with_freetype: + self.cpp_info.components["pango_"].requires.append("freetype::freetype") if self.settings.os != "Windows": self.cpp_info.components["pangoroot"].set_property("pkg_config_name", "pangoroot") if self.options.with_freetype: self.cpp_info.components["pangoroot"].requires = ["pangoft2"] - if self.options.with_xft: + if self.options.get_safe("with_xft"): self.cpp_info.components["pangoxft"].libs = ["pangoxft-1.0"] self.cpp_info.components["pangoxft"].set_property("pkg_config_name", "pangoxft") + # pangoft2 is always built if pango has fontconfig and freetype support, + # which is always true if pango has xft support enabled self.cpp_info.components["pangoxft"].requires = ["pango_", "pangoft2"] self.cpp_info.components["pangoxft"].includedirs = [ os.path.join(self.package_folder, "include", "pango-1.0") @@ -223,12 +259,19 @@ def package_info(self): self.cpp_info.components["pangowin32"].set_property("pkg_config_name", "pangowin32") self.cpp_info.components["pangowin32"].requires = ["pango_"] self.cpp_info.components["pangowin32"].system_libs.append("gdi32") + if Version(self.version) >= "1.50.12": + self.cpp_info.components["pangowin32"].system_libs.append("dwrite") + + if is_apple_os(self): + # https://gitlab.gnome.org/GNOME/pango/-/blob/1.54.0/meson.build#L333-346 + self.cpp_info.components["pango_"].frameworks.extend(["CoreText", "CoreFoundation", "ApplicationServices"]) if self.options.with_cairo: self.cpp_info.components["pangocairo"].libs = ["pangocairo-1.0"] self.cpp_info.components["pangocairo"].set_property("pkg_config_name", "pangocairo") - self.cpp_info.components["pangocairo"].requires = ["pango_"] - if self.options.with_freetype: + self.cpp_info.components["pangocairo"].requires = ["pango_", "cairo::cairo_"] + if self.options.with_freetype and self.options.with_fontconfig: + # https://gitlab.gnome.org/GNOME/pango/-/blob/1.54.0/meson.build#L506 self.cpp_info.components["pangocairo"].requires.append("pangoft2") if self.settings.os == "Windows": self.cpp_info.components["pangocairo"].requires.append("pangowin32") diff --git a/recipes/pango/config.yml b/recipes/pango/config.yml index 9086309110a6b..2d198a63c6b11 100644 --- a/recipes/pango/config.yml +++ b/recipes/pango/config.yml @@ -1,4 +1,6 @@ versions: + "1.54.0": + folder: all "1.51.0": folder: all "1.50.14": diff --git a/recipes/parallel-hashmap/all/conandata.yml b/recipes/parallel-hashmap/all/conandata.yml index 3e06bdb26e652..1162046b50c49 100644 --- a/recipes/parallel-hashmap/all/conandata.yml +++ b/recipes/parallel-hashmap/all/conandata.yml @@ -1,18 +1,27 @@ sources: + "1.4.1": + url: "https://github.com/greg7mdp/parallel-hashmap/archive/refs/tags/v1.4.1.tar.gz" + sha256: "949874f4207b8735422438b23b884fb1f4b926689bb5eebff38cc4d357d09cd2" + "1.4.0": + url: "https://github.com/greg7mdp/parallel-hashmap/archive/refs/tags/v1.4.0.tar.gz" + sha256: "766e05d19c27d9c09e6f9a627868daf451f4fbdd1b617f1bb875fb9402bfb78b" + "1.3.12": + url: "https://github.com/greg7mdp/parallel-hashmap/archive/refs/tags/v1.3.12.tar.gz" + sha256: "0cc203144321924cfbfcc401f42d8204c0dd24e2760c7a1c091baa16d9777c08" "1.3.11": url: "https://github.com/greg7mdp/parallel-hashmap/archive/refs/tags/v1.3.11.tar.gz" sha256: "0515a681bfb24207013786a7737e9d8561302e656689d8a65ea480bbabab460f" "1.3.8": - url: "https://github.com/greg7mdp/parallel-hashmap/archive/v1.3.8.tar.gz" + url: "https://github.com/greg7mdp/parallel-hashmap/archive/refs/tags/v1.3.8.tar.gz" sha256: "c4562ea360dc1dcaddd96a0494c753400364a52c7aa9750de49d8e6a222d28d3" "1.37": - url: "https://github.com/greg7mdp/parallel-hashmap/archive/1.37.tar.gz" + url: "https://github.com/greg7mdp/parallel-hashmap/archive/refs/tags/1.37.tar.gz" sha256: "2ac652be0552fcb53a1163c08c1f28f29f0756594fcc587eebb4d8b363153709" "1.36": url: "https://github.com/greg7mdp/parallel-hashmap/archive/refs/tags/1.36.tar.gz" sha256: "33acf44158a9661a9d630d13f9250a2aa27a770cb3771df77b1ba1a661c0b766" "1.35": - url: "https://github.com/greg7mdp/parallel-hashmap/archive/1.35.tar.gz" + url: "https://github.com/greg7mdp/parallel-hashmap/archive/refs/tags/1.35.tar.gz" sha256: "308ab6f92e4c6f49304562e352890cf7140de85ce723c097e74fbdec88e0e1ce" "1.34": url: "https://github.com/greg7mdp/parallel-hashmap/archive/refs/tags/1.34.tar.gz" diff --git a/recipes/parallel-hashmap/all/conanfile.py b/recipes/parallel-hashmap/all/conanfile.py index 5f3e3f51ac110..2714a6823c9e0 100644 --- a/recipes/parallel-hashmap/all/conanfile.py +++ b/recipes/parallel-hashmap/all/conanfile.py @@ -12,9 +12,9 @@ class ParallelHashmapConan(ConanFile): name = "parallel-hashmap" description = "A family of header-only, very fast and memory-friendly hashmap and btree containers." license = "Apache-2.0" - topics = ("parallel", "hashmap", "btree") - homepage = "https://github.com/greg7mdp/parallel-hashmap" url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/greg7mdp/parallel-hashmap" + topics = ("parallel", "hashmap", "btree", "header-only") package_type = "header-library" settings = "os", "arch", "compiler", "build_type" no_copy_source = True @@ -32,9 +32,6 @@ def validate(self): def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) - def build(self): - pass - def package(self): copy(self, "LICENSE", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) copy(self, "*.h", src=os.path.join(self.source_folder, "parallel_hashmap"), diff --git a/recipes/parallel-hashmap/config.yml b/recipes/parallel-hashmap/config.yml index a1c1439981d11..82038b86a3657 100644 --- a/recipes/parallel-hashmap/config.yml +++ b/recipes/parallel-hashmap/config.yml @@ -1,4 +1,10 @@ versions: + "1.4.1": + folder: all + "1.4.0": + folder: all + "1.3.12": + folder: all "1.3.11": folder: all "1.3.8": diff --git a/recipes/pbc/all/conandata.yml b/recipes/pbc/all/conandata.yml index af6c41c5d370b..3a82e91b4ea31 100644 --- a/recipes/pbc/all/conandata.yml +++ b/recipes/pbc/all/conandata.yml @@ -5,4 +5,3 @@ sources: patches: "0.5.14": - patch_file: "patches/0.5.14-0001-fix-config-sub-ios.patch" - base_path: "" diff --git a/recipes/pbc/all/conanfile.py b/recipes/pbc/all/conanfile.py index cef849369307b..2de63fee00601 100644 --- a/recipes/pbc/all/conanfile.py +++ b/recipes/pbc/all/conanfile.py @@ -1,22 +1,40 @@ -from conans import ConanFile, AutoToolsBuildEnvironment, tools import os -required_conan_version = ">=1.33.0" +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.apple import XCRun, to_apple_arch, fix_apple_shared_install_name +from conan.tools.build import cross_building +from conan.tools.env import VirtualBuildEnv, VirtualRunEnv +from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rm, rmdir, chdir +from conan.tools.gnu import Autotools, AutotoolsToolchain, AutotoolsDeps +from conan.tools.layout import basic_layout +from conan.tools.microsoft import is_msvc + +required_conan_version = ">=1.53.0" class PbcConan(ConanFile): name = "pbc" - topics = ("pbc", "crypto", "cryptography", "security", "pairings", "cryptographic") + description = ("The PBC (Pairing-Based Crypto) library is a C library providing " + "low-level routines for pairing-based cryptosystems.") + license = "LGPL-3.0" url = "https://github.com/conan-io/conan-center-index" homepage = "https://crypto.stanford.edu/pbc/" - license = "LGPL-3.0" - description = "The PBC (Pairing-Based Crypto) library is a C library providing low-level routines for pairing-based cryptosystems." + topics = ("crypto", "cryptography", "security", "pairings", "cryptographic") + package_type = "library" settings = "os", "arch", "compiler", "build_type" - options = {"shared": [True, False], "fPIC": [True, False]} - default_options = {"shared": False, "fPIC": True} - _autotools = None - exports_sources = "patches/**" + options = { + "shared": [True, False], + "fPIC": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + } + + def export_sources(self): + export_conandata_patches(self) def config_options(self): if self.settings.os == "Windows": @@ -24,75 +42,68 @@ def config_options(self): def configure(self): if self.options.shared: - del self.options.fPIC - del self.settings.compiler.libcxx - del self.settings.compiler.cppstd + self.options.rm_safe("fPIC") + self.settings.rm_safe("compiler.libcxx") + self.settings.rm_safe("compiler.cppstd") + + def layout(self): + basic_layout(self, src_folder="src") def requirements(self): - self.requires("gmp/6.2.1") + self.requires("gmp/6.3.0", transitive_headers=True, transitive_libs=True) - def build_requirements(self): - self.build_requires("bison/3.7.6") - self.build_requires("flex/2.6.4") + def validate(self): + if is_msvc(self): + raise ConanInvalidConfiguration("pbc is not compatible with MSVC due to use of GNU extensions") - @property - def _settings_build(self): - return getattr(self, "settings_build", self.settings) + def build_requirements(self): + self.tool_requires("flex/2.6.4") + self.tool_requires("bison/3.8.2") def source(self): - tools.get(**self.conan_data["sources"][self.version], strip_root=True) - - def _configure_autotools(self): - if self._autotools: - return self._autotools - self._autotools = AutoToolsBuildEnvironment( - self, win_bash=tools.os_info.is_windows - ) - # Need to override environment or configure will fail despite that flex - # is actually available. - args = ["LEX=flex"] - if self.options.shared: - args.extend(["--disable-static", "--enable-shared"]) - else: - args.extend(["--disable-shared", "--enable-static"]) + get(self, **self.conan_data["sources"][self.version], strip_root=True) - # No idea why this is necessary, but if you don't set CC this way, then - # configure complains that it can't find gmp. - if ( - tools.cross_building(self.settings) - and self.settings.compiler == "apple-clang" - ): + def generate(self): + env = VirtualBuildEnv(self) + env.generate() - xcr = tools.XCRun(self.settings) - target = tools.to_apple_arch(self.settings.arch) + "-apple-darwin" + if not cross_building(self): + env = VirtualRunEnv(self) + env.generate(scope="build") + tc = AutotoolsToolchain(self) + tc.configure_args.append("LEX=flex") + # No idea why this is necessary, but if you don't set CC this way, then + # configure complains that it can't find gmp. + if cross_building(self) and self.settings.compiler == "apple-clang": + xcr = XCRun(self) + target = to_apple_arch(self) + "-apple-darwin" min_ios = "" if self.settings.os == "iOS": - min_ios = "-miphoneos-version-min={}".format(self.settings.os.version) - - args.append( - "CC={} -isysroot {} -target {} {}".format( - xcr.cc, xcr.sdk_path, target, min_ios - ) - ) + min_ios = f"-miphoneos-version-min={self.settings.os.version}" + tc.configure_args.append(f"CC={xcr.cc} -isysroot {xcr.sdk_path} -target {target} {min_ios}") + tc.generate() - self._autotools.configure(args=args) - return self._autotools + deps = AutotoolsDeps(self) + deps.generate() def build(self): - for patch in self.conan_data.get("patches", {}).get(self.version, []): - tools.patch(**patch) - autotools = self._configure_autotools() - autotools.make() + apply_conandata_patches(self) + with chdir(self, self.source_folder): + autotools = Autotools(self) + autotools.configure() + autotools.make() def package(self): - self.copy(pattern="COPYING", dst="licenses") - autotools = self._configure_autotools() - autotools.install() - tools.rmdir(os.path.join(self.package_folder, "share")) - tools.remove_files_by_mask(os.path.join(self.package_folder, "lib"), "*.la") + copy(self, "COPYING", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) + with chdir(self, self.source_folder): + autotools = Autotools(self) + autotools.install() + rmdir(self, os.path.join(self.package_folder, "share")) + rm(self, "*.la", self.package_folder, recursive=True) + fix_apple_shared_install_name(self) def package_info(self): self.cpp_info.libs = ["pbc"] - if self.settings.os == "Linux": + if self.settings.os in ["Linux", "FreeBSD"]: self.cpp_info.system_libs = ["m"] diff --git a/recipes/pbc/all/test_package/CMakeLists.txt b/recipes/pbc/all/test_package/CMakeLists.txt index c67cb318985e8..a724a29a8da1f 100644 --- a/recipes/pbc/all/test_package/CMakeLists.txt +++ b/recipes/pbc/all/test_package/CMakeLists.txt @@ -1,10 +1,7 @@ -cmake_minimum_required(VERSION 3.1) -project(test_package) +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES C) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) - -find_package(pbc CONFIG REQUIRED) +find_package(pbc REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.c) target_link_libraries(${PROJECT_NAME} pbc::pbc) diff --git a/recipes/pbc/all/test_package/conanfile.py b/recipes/pbc/all/test_package/conanfile.py index 49a3a66ea5bad..ef5d7042163ec 100644 --- a/recipes/pbc/all/test_package/conanfile.py +++ b/recipes/pbc/all/test_package/conanfile.py @@ -1,10 +1,19 @@ -from conans import ConanFile, CMake, tools +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake import os class TestPackageConan(ConanFile): - settings = "os", "compiler", "build_type", "arch" - generators = "cmake", "cmake_find_package_multi" + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) def build(self): cmake = CMake(self) @@ -12,6 +21,6 @@ def build(self): cmake.build() def test(self): - if not tools.cross_building(self): - bin_path = os.path.join("bin", "test_package") - self.run(bin_path, run_environment=True) + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/pbc/all/test_v1_package/CMakeLists.txt b/recipes/pbc/all/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..91630d79f4abb --- /dev/null +++ b/recipes/pbc/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/pbc/all/test_v1_package/conanfile.py b/recipes/pbc/all/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..49a3a66ea5bad --- /dev/null +++ b/recipes/pbc/all/test_v1_package/conanfile.py @@ -0,0 +1,17 @@ +from conans import ConanFile, CMake, tools +import os + + +class TestPackageConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake", "cmake_find_package_multi" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if not tools.cross_building(self): + bin_path = os.path.join("bin", "test_package") + self.run(bin_path, run_environment=True) diff --git a/recipes/pcapplusplus/cmake/conandata.yml b/recipes/pcapplusplus/cmake/conandata.yml index 26ff7631cb671..ea13a0a560ea1 100644 --- a/recipes/pcapplusplus/cmake/conandata.yml +++ b/recipes/pcapplusplus/cmake/conandata.yml @@ -2,3 +2,6 @@ sources: "23.09": url: "https://github.com/seladb/PcapPlusPlus/archive/v23.09.tar.gz" sha256: "608292f7d2a2e1b7af26adf89347597a6131547eea4e513194bc4f584a40fe74" + "24.09": + url: "https://github.com/seladb/PcapPlusPlus/archive/v24.09.tar.gz" + sha256: "b14998ecf5718c2bfb6f709060e53f7ef67639b98bf2222a3cd23d820d70acdc" diff --git a/recipes/pcapplusplus/cmake/conanfile.py b/recipes/pcapplusplus/cmake/conanfile.py index e1a985494deda..cea459f86eeb8 100644 --- a/recipes/pcapplusplus/cmake/conanfile.py +++ b/recipes/pcapplusplus/cmake/conanfile.py @@ -1,30 +1,39 @@ import os from conan import ConanFile +from conan.tools.build import check_min_cppstd from conan.tools.cmake import CMakeToolchain, CMake, cmake_layout -from conan.tools.files import copy, get, rmdir +from conan.tools.files import copy, get, rmdir, replace_in_file +from conan.tools.scm import Version from conan.errors import ConanInvalidConfiguration required_conan_version = ">=1.52.0" + class PcapplusplusConan(ConanFile): name = "pcapplusplus" - package_type = "static-library" license = "Unlicense" description = "PcapPlusPlus is a multiplatform C++ library for capturing, parsing and crafting of network packets" topics = ("pcap", "network", "security", "packet") url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/seladb/PcapPlusPlus" settings = "os", "arch", "build_type", "compiler" + package_type = "library" options = { - "immediate_mode": [True, False], "fPIC": [True, False], + "shared": [True, False], + "immediate_mode": [True, False], } default_options = { - "immediate_mode": False, "fPIC": True, + "shared": False, + "immediate_mode": False, } + @property + def _min_cppstd(self): + return 11 + def config_options(self): if self.settings.os == "Windows": del self.options.fPIC @@ -34,11 +43,26 @@ def requirements(self): self.requires("npcap/1.70") else: self.requires("libpcap/1.10.1") + + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") def validate(self): + if Version(self.version) <= "24.09" and self.options.shared and self.settings.os == "Windows": + # https://github.com/seladb/PcapPlusPlus/issues/1396 + raise ConanInvalidConfiguration(f"{self.ref} does not support Windows shared builds for now") + if self.settings.compiler.cppstd: + # popen()/pclose() usage + check_min_cppstd(self, self._min_cppstd) if self.settings.os not in ("FreeBSD", "Linux", "Macos", "Windows"): raise ConanInvalidConfiguration(f"{self.settings.os} is not supported") + def validate_build(self): + compiler_version = Version(self.settings.compiler.version) + if self.settings.compiler == "gcc" and compiler_version < "5.1": + raise ConanInvalidConfiguration("PcapPlusPlus requires GCC >= 5.1") + def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) @@ -46,12 +70,25 @@ def generate(self): tc = CMakeToolchain(self) tc.variables["PCAPPP_BUILD_TESTS"] = False tc.variables["PCAPPP_BUILD_EXAMPLES"] = False + tc.variables["BUILD_SHARED_LIBS"] = self.options.shared + if not self.settings.compiler.cppstd: + tc.variables["CMAKE_CXX_STANDARD"] = self._min_cppstd tc.generate() def layout(self): cmake_layout(self, src_folder="src") + def _patch_sources(self): + replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), + "set(CMAKE_CXX_STANDARD 11)", + "") + if Version(self.version) >= "24.09": + replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), + "set(CMAKE_POSITION_INDEPENDENT_CODE ON)", + "") + def build(self): + self._patch_sources() cmake = CMake(self) cmake.configure() cmake.build() @@ -69,5 +106,7 @@ def package_info(self): self.cpp_info.frameworks = ["CoreFoundation", "SystemConfiguration"] elif self.settings.os == "Windows": self.cpp_info.system_libs = ["ws2_32", "iphlpapi"] + elif self.settings.os in ("Linux", "FreeBSD"): + self.cpp_info.system_libs = ["pthread"] self.cpp_info.set_property("cmake_file_name", "PcapPlusPlus") self.cpp_info.set_property("cmake_target_name", "PcapPlusPlus::PcapPlusPlus") diff --git a/recipes/pcapplusplus/config.yml b/recipes/pcapplusplus/config.yml index d89c980a8be55..7a6e7c1c1ffa6 100644 --- a/recipes/pcapplusplus/config.yml +++ b/recipes/pcapplusplus/config.yml @@ -9,3 +9,5 @@ versions: folder: all "23.09": folder: cmake + "24.09": + folder: cmake diff --git a/recipes/pciutils/all/conandata.yml b/recipes/pciutils/all/conandata.yml index de7711b0170fd..8cdf113d7ef73 100644 --- a/recipes/pciutils/all/conandata.yml +++ b/recipes/pciutils/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "3.12.0": + url: "https://github.com/pciutils/pciutils/archive/v3.12.0.tar.gz" + sha256: "3a76ca02581fed03d0470ba822e72ee06e492442a990062f9638dec90018505f" "3.10.0": url: "https://github.com/pciutils/pciutils/archive/v3.10.0.tar.gz" sha256: "e579d87f1afe2196db7db648857023f80adb500e8194c4488c8b47f9a238c1c6" diff --git a/recipes/pciutils/config.yml b/recipes/pciutils/config.yml index 6ece8b7922d9b..358eb13a104b8 100644 --- a/recipes/pciutils/config.yml +++ b/recipes/pciutils/config.yml @@ -1,4 +1,6 @@ versions: + "3.12.0": + folder: all "3.10.0": folder: all "3.7.0": diff --git a/recipes/pcl/all/conandata.yml b/recipes/pcl/all/conandata.yml index 6eea92ef4a761..d2277ffc87cc0 100644 --- a/recipes/pcl/all/conandata.yml +++ b/recipes/pcl/all/conandata.yml @@ -4,16 +4,20 @@ sources: sha256: 8ab98a9db371d822de0859084a375a74bdc7f31c96d674147710cf4101b79621 patches: "1.13.1": - - patch_file: "patches/0001-cmake_use_conan_targets.patch" + - patch_file: "patches/1.13.1-0001-cmake_use_conan_targets.patch" patch_description: "Update PCL CMake files to work with Conan" patch_type: "conan" - - patch_file: "patches/0001-fix-FindOpenNI-bug.patch" + - patch_file: "patches/1.13.1-0002-fix-FindOpenNI-bug.patch" patch_description: "Fix a libusb detection bug in FindOpenNI.cmake" patch_type: "bugfix" - - patch_file: "patches/0001-Add-Eigen3-Eigen-target-in-pcl_common-target.patch" + - patch_file: "patches/1.13.1-0003-Add-Eigen3-Eigen-target-in-pcl_common-target.patch" patch_description: "Add Eigen3::Eigen target to pcl_common target" patch_type: "conan" - - patch_file: "patches/0001-ReportFixAboutMemoryConsumptionDuringBuild.patch" + - patch_file: "patches/1.13.1-0004-ReportFixAboutMemoryConsumptionDuringBuild.patch" patch_description: "MovingLeastSquares: reduce the number of instantiations to reduce compile time" patch_source: "https://github.com/PointCloudLibrary/pcl/pull/5764" patch_type: "conan" + - patch_file: "patches/1.13.1-0005-ply_parser-include-functional.patch" + patch_description: "Fix missing functional include in ply_parser.h" + patch_source: "https://github.com/PointCloudLibrary/pcl/pull/5964" + patch_type: "portability" diff --git a/recipes/pcl/all/patches/0001-cmake_use_conan_targets.patch b/recipes/pcl/all/patches/1.13.1-0001-cmake_use_conan_targets.patch similarity index 100% rename from recipes/pcl/all/patches/0001-cmake_use_conan_targets.patch rename to recipes/pcl/all/patches/1.13.1-0001-cmake_use_conan_targets.patch diff --git a/recipes/pcl/all/patches/0001-fix-FindOpenNI-bug.patch b/recipes/pcl/all/patches/1.13.1-0002-fix-FindOpenNI-bug.patch similarity index 100% rename from recipes/pcl/all/patches/0001-fix-FindOpenNI-bug.patch rename to recipes/pcl/all/patches/1.13.1-0002-fix-FindOpenNI-bug.patch diff --git a/recipes/pcl/all/patches/0001-Add-Eigen3-Eigen-target-in-pcl_common-target.patch b/recipes/pcl/all/patches/1.13.1-0003-Add-Eigen3-Eigen-target-in-pcl_common-target.patch similarity index 100% rename from recipes/pcl/all/patches/0001-Add-Eigen3-Eigen-target-in-pcl_common-target.patch rename to recipes/pcl/all/patches/1.13.1-0003-Add-Eigen3-Eigen-target-in-pcl_common-target.patch diff --git a/recipes/pcl/all/patches/0001-ReportFixAboutMemoryConsumptionDuringBuild.patch b/recipes/pcl/all/patches/1.13.1-0004-ReportFixAboutMemoryConsumptionDuringBuild.patch similarity index 100% rename from recipes/pcl/all/patches/0001-ReportFixAboutMemoryConsumptionDuringBuild.patch rename to recipes/pcl/all/patches/1.13.1-0004-ReportFixAboutMemoryConsumptionDuringBuild.patch diff --git a/recipes/pcl/all/patches/1.13.1-0005-ply_parser-include-functional.patch b/recipes/pcl/all/patches/1.13.1-0005-ply_parser-include-functional.patch new file mode 100644 index 0000000000000..14a4a99db8a78 --- /dev/null +++ b/recipes/pcl/all/patches/1.13.1-0005-ply_parser-include-functional.patch @@ -0,0 +1,21 @@ +From 61b2e8e5336d7d8b0e1ae7c1168035faa083310b Mon Sep 17 00:00:00 2001 +From: Transporter +Date: Sun, 18 Feb 2024 10:38:12 +0100 +Subject: [PATCH] Fix missing include (#5962) + +--- + io/include/pcl/io/ply/ply_parser.h | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/io/include/pcl/io/ply/ply_parser.h b/io/include/pcl/io/ply/ply_parser.h +index 3023d566607..244f3719506 100644 +--- a/io/include/pcl/io/ply/ply_parser.h ++++ b/io/include/pcl/io/ply/ply_parser.h +@@ -49,6 +49,7 @@ + #include + #include + #include ++#include + #include // for lexical_cast + #include // for fold + #include // for inherit diff --git a/recipes/pcre2/all/conandata.yml b/recipes/pcre2/all/conandata.yml index 6dadb108df617..a7d2c38f2c564 100644 --- a/recipes/pcre2/all/conandata.yml +++ b/recipes/pcre2/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "10.44": + url: "https://github.com/PCRE2Project/pcre2/releases/download/pcre2-10.44/pcre2-10.44.tar.bz2" + sha256: "d34f02e113cf7193a1ebf2770d3ac527088d485d4e047ed10e5d217c6ef5de96" "10.43": url: "https://github.com/PCRE2Project/pcre2/releases/download/pcre2-10.43/pcre2-10.43.tar.bz2" sha256: "e2a53984ff0b07dfdb5ae4486bbb9b21cca8e7df2434096cc9bf1b728c350bcb" @@ -37,11 +40,20 @@ sources: - "https://sourceforge.net/projects/pcre/files/pcre2/10.32/pcre2-10.32.tar.bz2" sha256: "f29e89cc5de813f45786580101aaee3984a65818631d4ddbda7b32f699b87c2e" patches: + "10.42": + - patch_file: "patches/0002-fix-cmake-c-std.patch" + patch_description: "make the C99 requirement explicit" + patch_type: "conan" + patch_source: "https://github.com/PCRE2Project/pcre2/pull/193" "10.40": - patch_file: "patches/0001-fix-cmake-1.39.patch" patch_description: "correct the order of cmake_minimum_required() and project()" patch_type: "conan" patch_source: "https://github.com/PCRE2Project/pcre2/pull/142" + - patch_file: "patches/0002-fix-cmake-c-std.patch" + patch_description: "make the C99 requirement explicit" + patch_type: "conan" + patch_source: "https://github.com/PCRE2Project/pcre2/pull/193" "10.39": - patch_file: "patches/0001-fix-cmake-1.39.patch" patch_description: "correct the order of cmake_minimum_required() and project()" diff --git a/recipes/pcre2/all/conanfile.py b/recipes/pcre2/all/conanfile.py index 5c51abac704ec..7f6022b6b9a83 100644 --- a/recipes/pcre2/all/conanfile.py +++ b/recipes/pcre2/all/conanfile.py @@ -29,6 +29,7 @@ class PCRE2Conan(ConanFile): "with_bzip2": [True, False], "support_jit": [True, False], "grep_support_callout_fork": [True, False], + "link_size": [2, 3, 4], } default_options = { "shared": False, @@ -41,6 +42,7 @@ class PCRE2Conan(ConanFile): "with_bzip2": True, "support_jit": False, "grep_support_callout_fork": True, + "link_size": 2, } def export_sources(self): @@ -96,6 +98,7 @@ def generate(self): tc.variables["PCRE2_BUILD_PCRE2_16"] = self.options.build_pcre2_16 tc.variables["PCRE2_BUILD_PCRE2_32"] = self.options.build_pcre2_32 tc.variables["PCRE2_SUPPORT_JIT"] = self.options.support_jit + tc.variables["PCRE2_LINK_SIZE"] = self.options.link_size tc.variables["PCRE2GREP_SUPPORT_CALLOUT_FORK"] = self.options.get_safe("grep_support_callout_fork", False) if Version(self.version) < "10.38": # relocatable shared libs on Macos @@ -118,6 +121,18 @@ def _patch_sources(self): replace_in_file(self, cmakelists, "RUNTIME DESTINATION bin", "RUNTIME DESTINATION bin BUNDLE DESTINATION bin") + # pcre2-config does not correctly include '-static' in static library names + if is_msvc(self): + replace = None + if Version(self.version) > "10.42": + replace = "configure_file(pcre2-config.in" + elif Version(self.version) >= "10.38": + replace = "CONFIGURE_FILE(pcre2-config.in" + postfix = "-static" if not self.options.shared else "" + if replace: + if self.settings.build_type == "Debug": + postfix += "d" + replace_in_file(self, cmakelists, replace, f'set(LIB_POSTFIX "{postfix}")\n{replace}') def build(self): self._patch_sources() @@ -169,7 +184,7 @@ def package_info(self): if self.options.build_pcre2grep: bin_path = os.path.join(self.package_folder, "bin") - self.output.info("Appending PATH environment variable: {}".format(bin_path)) + self.output.info(f"Appending PATH environment variable: {bin_path}") self.env_info.PATH.append(bin_path) # FIXME: This is a workaround to avoid ConanException. zlib and bzip2 # are optional requirements of pcre2grep executable, not of any pcre2 lib. diff --git a/recipes/pcre2/all/patches/0002-fix-cmake-c-std.patch b/recipes/pcre2/all/patches/0002-fix-cmake-c-std.patch new file mode 100644 index 0000000000000..e75faef54f312 --- /dev/null +++ b/recipes/pcre2/all/patches/0002-fix-cmake-c-std.patch @@ -0,0 +1,52 @@ +From 12b0e40ee4556318e5a0da3155f28bdfd7c5bc35 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Carlo=20Marcelo=20Arenas=20Bel=C3=B3n?= +Date: Sun, 15 Jan 2023 14:38:44 -0800 +Subject: [PATCH] build: make the C99 requirement explicit + +Recent code uses C99 syntax (as reported in #163, and therefore it +will fail to build unless C99 (or higher) support is required by the +compiler (gcc >= 5 does it by default). + +For those unfortunate to need an older compiler that does require a +flag to enable that, make sure that both autoconf and cmake make it +explicit. + +While testing the change with the ancient autoconf version listed as +a prerequisite, noticed that the LT_INIT syntax introduced with 91485e5 +(Update configure.ac for latest version of autoconf., 2021-02-02), was +not supported, so update the autoconf minimum as well. +--- + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index cec7dfb4..a8147575 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -107,1 +107,3 @@ + PROJECT(PCRE2 C) ++set(CMAKE_C_STANDARD 99) ++set(CMAKE_C_STANDARD_REQUIRED TRUE) + + # Set policy CMP0026 to avoid warnings for the use of LOCATION in + # GET_TARGET_PROPERTY. This should no longer be required. +diff --git a/configure.ac b/configure.ac +index ce5bda3c..67b2fdce 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -22,7 +22,7 @@ m4_define(libpcre2_posix_version, [3:4:0]) + # NOTE: The CMakeLists.txt file searches for the above variables in the first + # 50 lines of this file. Please update that if the variables above are moved. + +-AC_PREREQ([2.60]) ++AC_PREREQ([2.62]) + AC_INIT([PCRE2],pcre2_major.pcre2_minor[]pcre2_prerelease,[],[pcre2]) + AC_CONFIG_SRCDIR([src/pcre2.h.in]) + AM_INIT_AUTOMAKE([dist-bzip2 dist-zip]) +@@ -42,7 +42,7 @@ AC_CONFIG_MACRO_DIR([m4]) + + remember_set_CFLAGS="$CFLAGS" + +-AC_PROG_CC ++m4_version_prereq(2.70, [AC_PROG_CC], [AC_PROG_CC_C99]) + AM_PROG_CC_C_O + AC_USE_SYSTEM_EXTENSIONS + diff --git a/recipes/pcre2/all/test_package/conanfile.py b/recipes/pcre2/all/test_package/conanfile.py index 0a6bc68712d90..fafba71d30d56 100644 --- a/recipes/pcre2/all/test_package/conanfile.py +++ b/recipes/pcre2/all/test_package/conanfile.py @@ -22,5 +22,5 @@ def build(self): def test(self): if can_run(self): - bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") + bin_path = os.path.join(self.cpp.build.bindir, "test_package") self.run(bin_path, env="conanrun") diff --git a/recipes/pcre2/config.yml b/recipes/pcre2/config.yml index 946dbc4632734..7b719e00064be 100644 --- a/recipes/pcre2/config.yml +++ b/recipes/pcre2/config.yml @@ -1,4 +1,6 @@ versions: + "10.44": + folder: all "10.43": folder: all "10.42": diff --git a/recipes/pdf-writer/all/conandata.yml b/recipes/pdf-writer/all/conandata.yml index b1b2eb4b8f3ff..0d800cc7a7750 100644 --- a/recipes/pdf-writer/all/conandata.yml +++ b/recipes/pdf-writer/all/conandata.yml @@ -1,4 +1,13 @@ sources: + "4.6.7": + url: "https://github.com/galkahana/PDF-Writer/archive/refs/tags/v4.6.7.tar.gz" + sha256: "735c65d4685c5156f0876635f3bc1565700d0f648fbb1f384e46d186796c8bae" + "4.6.6": + url: "https://github.com/galkahana/PDF-Writer/archive/refs/tags/v4.6.6.tar.gz" + sha256: "8343820313e553052df68c75fe2bf35353da2719106e81eb2a8b026ff96c7d7c" + "4.6.4": + url: "https://github.com/galkahana/PDF-Writer/archive/refs/tags/v4.6.4.tar.gz" + sha256: "93b5f1dc88fd67fdebde409e927e828dfbae02efa44936e89728622411c6a047" "4.6.3": url: "https://github.com/galkahana/PDF-Writer/archive/refs/tags/v4.6.3.tar.gz" sha256: "3b5d9ba4b49d0380678e8172f27cdb8eda196ea448e7f1cdd79620066d082ab9" @@ -12,6 +21,18 @@ sources: url: "https://github.com/galkahana/PDF-Writer/archive/refs/tags/v4.5.12.tar.gz" sha256: "40fcbaa66fc46fcb588ceda119ba8839ff6d2c886191ac5e68ed702475c7336e" patches: + "4.6.7": + - patch_file: "patches/4.6.6-0001-fix-cmake.patch" + patch_description: "disable cpack" + patch_type: "conan" + "4.6.6": + - patch_file: "patches/4.6.6-0001-fix-cmake.patch" + patch_description: "disable cpack" + patch_type: "conan" + "4.6.4": + - patch_file: "patches/4.6.2-0001-fix-cmake.patch" + patch_description: "disable cpack" + patch_type: "conan" "4.6.3": - patch_file: "patches/4.6.2-0001-fix-cmake.patch" patch_description: "disable cpack" diff --git a/recipes/pdf-writer/all/patches/4.6.6-0001-fix-cmake.patch b/recipes/pdf-writer/all/patches/4.6.6-0001-fix-cmake.patch new file mode 100644 index 0000000000000..0f818e64d81ab --- /dev/null +++ b/recipes/pdf-writer/all/patches/4.6.6-0001-fix-cmake.patch @@ -0,0 +1,32 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 956c730..a7d809b 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -165,13 +165,13 @@ if(PROJECT_IS_TOP_LEVEL AND EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/PDFWriterTesting) + ADD_SUBDIRECTORY(PDFWriterTesting) + endif() + +-include(InstallRequiredSystemLibraries) +-set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE") +-set(CPACK_PACKAGE_VERSION_MAJOR "${PDFHummus_VERSION_MAJOR}") +-set(CPACK_PACKAGE_VERSION_MINOR "${PDFHummus_VERSION_MINOR}") +-set(CPACK_SOURCE_GENERATOR "ZIP") +-set(CPACK_GENERATOR "ZIP") +-include(CPack) ++# include(InstallRequiredSystemLibraries) ++# set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE") ++# set(CPACK_PACKAGE_VERSION_MAJOR "${PDFHummus_VERSION_MAJOR}") ++# set(CPACK_PACKAGE_VERSION_MINOR "${PDFHummus_VERSION_MINOR}") ++# set(CPACK_SOURCE_GENERATOR "ZIP") ++# set(CPACK_GENERATOR "ZIP") ++# include(CPack) + + install(EXPORT PDFHummusTargets + FILE PDFHummusTargets.cmake +@@ -200,4 +200,4 @@ install(FILES + export(EXPORT PDFHummusTargets + FILE "${CMAKE_CURRENT_BINARY_DIR}/PDFHummusTargets.cmake" + NAMESPACE PDFHummus:: +-) +\ No newline at end of file ++) diff --git a/recipes/pdf-writer/config.yml b/recipes/pdf-writer/config.yml index 44bc3d66897b6..36e4d583c87ad 100644 --- a/recipes/pdf-writer/config.yml +++ b/recipes/pdf-writer/config.yml @@ -1,4 +1,10 @@ versions: + "4.6.7": + folder: all + "4.6.6": + folder: all + "4.6.4": + folder: all "4.6.3": folder: all "4.6.2": diff --git a/recipes/pdfium/all/conanfile.py b/recipes/pdfium/all/conanfile.py index 7a5488384bc9e..4e4268e4ab4a3 100644 --- a/recipes/pdfium/all/conanfile.py +++ b/recipes/pdfium/all/conanfile.py @@ -47,7 +47,7 @@ def layout(self): def requirements(self): self.requires("freetype/2.13.2") self.requires("icu/74.1") - self.requires("lcms/2.14") + self.requires("lcms/2.16") self.requires("openjpeg/2.5.0") self.requires("zlib/[>=1.2.11 <2]") if self.options.with_libjpeg == "libjpeg": diff --git a/recipes/perfetto/all/conandata.yml b/recipes/perfetto/all/conandata.yml index 7ea6229bf24ad..c8178a3bde6b9 100644 --- a/recipes/perfetto/all/conandata.yml +++ b/recipes/perfetto/all/conandata.yml @@ -1,4 +1,16 @@ sources: + "48.1": + url: "https://github.com/google/perfetto/archive/refs/tags/v48.1.tar.gz" + sha256: "8d1c6bf44f1bdb098ab70cd60da3ce6b6e731e4eb21dd52b2527cbdcf85d984d" + "47.0": + url: "https://github.com/google/perfetto/archive/refs/tags/v47.0.tar.gz" + sha256: "9bbd38a0f074038bde6ccbcf5f2ff32587eb60faec254932268ecb6f17f18186" + "45.0": + url: "https://github.com/google/perfetto/archive/refs/tags/v45.0.tar.gz" + sha256: "dcb815fb54370fa20a657552288016cb66e7a98237c1a1d47e7645a4325ac75e" + "44.0": + url: "https://github.com/google/perfetto/archive/refs/tags/v44.0.tar.gz" + sha256: "db4162ee6495b1fcc13ba7aca77d67f9fd1766d184743137a04af8b1e3906b9d" "43.1": url: "https://github.com/google/perfetto/archive/refs/tags/v43.1.tar.gz" sha256: "0f23ba39520c9ec629c48dc36a3a4bb92ed9653ac6694445be22985205a3f4ce" @@ -11,43 +23,3 @@ sources: "40.0": url: "https://github.com/google/perfetto/archive/refs/tags/v40.0.tar.gz" sha256: "bd78f0165e66026c31c8c39221ed2863697a8bba5cd39b12e4b43d0b7f71626f" - "39.0": - url: "https://github.com/google/perfetto/archive/refs/tags/v39.0.tar.gz" - sha256: "241cbaddc9ff4e5d1de2d28497fef40b5510e9ca60808815bf4944d0d2f026db" - "38.0": - url: "https://github.com/google/perfetto/archive/refs/tags/v38.0.tar.gz" - sha256: "92160b0fbeb8c4992cc0690d832dd923cee1dda466f3364ef4ed26a835e55e40" - "37.0": - url: "https://github.com/google/perfetto/archive/refs/tags/v37.0.tar.gz" - sha256: "39d7b3635834398828cfd189bd61afb0657ca2a3a08efbfd9866bfbcd440810b" - "35.0": - url: "https://github.com/google/perfetto/archive/refs/tags/v35.0.tar.gz" - sha256: "224b6552e60ad0fc7c1447bdf719ddd9ceceaf2b6773b71541c21df5890f4166" - "34.0": - url: "https://github.com/google/perfetto/archive/refs/tags/v34.0.tar.gz" - sha256: "81dbf2fac446a0389c80e309b2060dcccd926012ce2a61621a47e3e432aee8c1" - "32.1": - url: "https://github.com/google/perfetto/archive/refs/tags/v32.1.tar.gz" - sha256: "0d1088b4758b3d5f3813178c6de22386329d42407d23aa1479f20dce96e49d78" - "31.0": - url: "https://github.com/google/perfetto/archive/refs/tags/v31.0.tar.gz" - sha256: "544c68293590f53391ea4267d5a9b1a4594e1c8216fc5f5ce9d0f1227797922e" - "30.0": - url: "https://github.com/google/perfetto/archive/refs/tags/v30.0.tar.gz" - sha256: "d1883793a2adb2a4105fc083478bf781badd566d72da45caa99095b61f938a2e" - "27.1": - url: "https://github.com/google/perfetto/archive/refs/tags/v27.1.tar.gz" - sha256: "9edbafd6e2d9feaced4c0153e2f48dbb1da38429c5b1b17dfee70a91fd3101b2" - "27.0": - url: "https://github.com/google/perfetto/archive/refs/tags/v27.0.tar.gz" - sha256: "c22750dd21419cf58132d55d634b88d9947bd0c7244dd98854b0248c7637a98c" - "26.1": - url: "https://github.com/google/perfetto/archive/refs/tags/v26.1.tar.gz" - sha256: "cce387e82e2a137fce2eba927f80f20407764b77637a1a92b9b24065a500ce6d" -patches: - "31.0": - - patch_file: "patches/v31.0/0001-tracing-fix-compile-on-MSVC.patch" - patch_description: "Fix compilation on MSVC" - patch_type: "backport" - patch_source: "https://android-review.googlesource.com/c/platform/external/perfetto/+/2355222" - sha256: "ad253a9bba3941bd8d1f206422d60eb1c06cb6d75d60eff5b5b8ae0f2ec7e15c" diff --git a/recipes/perfetto/all/conanfile.py b/recipes/perfetto/all/conanfile.py index 6c9cecd7c62ef..d311c92822b0a 100644 --- a/recipes/perfetto/all/conanfile.py +++ b/recipes/perfetto/all/conanfile.py @@ -2,7 +2,7 @@ from conan.errors import ConanInvalidConfiguration from conan.tools.build import check_min_cppstd from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout -from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get +from conan.tools.files import copy, get from conan.tools.microsoft import is_msvc from conan.tools.scm import Version import os @@ -33,21 +33,20 @@ class PerfettoConan(ConanFile): @property def _minimum_cpp_standard(self): - return 11 if Version(self.version) < "31.0" else 17 + return 17 @property def _minimum_compilers_version(self): return { - "Visual Studio": "15" if Version(self.version) < "31.0" else "16", + "Visual Studio": "16" if Version(self.version) < "48.0" else "17", "msvc": "190", "gcc": "7", - "clang": "3.3" if Version(self.version) < "31.0" else "5", - "apple-clang": "5.0" if Version(self.version) < "31.0" else "9.1", + "clang": "5", + "apple-clang": "9.1", } def export_sources(self): copy(self, "CMakeLists.txt", src=self.recipe_folder, dst=self.export_sources_folder) - export_conandata_patches(self) def config_options(self): if self.settings.os == "Windows": @@ -88,7 +87,6 @@ def generate(self): tc.generate() def build(self): - apply_conandata_patches(self) cmake = CMake(self) cmake.configure(build_script_folder=os.path.join(self.source_folder, os.pardir)) cmake.build() @@ -101,7 +99,7 @@ def package(self): def package_info(self): self.cpp_info.libs = ["perfetto"] if self.settings.os in ["Linux", "FreeBSD"]: - self.cpp_info.system_libs.append("pthread") + self.cpp_info.system_libs.extend(["pthread", "m"]) if self.settings.os == "Windows": self.cpp_info.system_libs.append("ws2_32") if is_msvc(self): diff --git a/recipes/perfetto/all/test_package/CMakeLists.txt b/recipes/perfetto/all/test_package/CMakeLists.txt index ad42eab5529ea..aa0641bc5d473 100644 --- a/recipes/perfetto/all/test_package/CMakeLists.txt +++ b/recipes/perfetto/all/test_package/CMakeLists.txt @@ -4,9 +4,5 @@ project(test_package LANGUAGES CXX) find_package(perfetto REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) -if(perfetto_VERSION VERSION_LESS "31.0") - target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) -else() - target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) -endif() +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) target_link_libraries(${PROJECT_NAME} PRIVATE perfetto::perfetto) diff --git a/recipes/perfetto/config.yml b/recipes/perfetto/config.yml index e704c3a7bc879..f5d0172738aad 100644 --- a/recipes/perfetto/config.yml +++ b/recipes/perfetto/config.yml @@ -1,31 +1,17 @@ versions: - "43.1": - folder: all - "42.0": - folder: all - "41.0": - folder: all - "40.0": - folder: all - "39.0": + "48.1": folder: all - "38.0": + "47.0": folder: all - "37.0": + "45.0": folder: all - "35.0": + "44.0": folder: all - "34.0": - folder: all - "32.1": - folder: all - "31.0": - folder: all - "30.0": + "43.1": folder: all - "27.1": + "42.0": folder: all - "27.0": + "41.0": folder: all - "26.1": + "40.0": folder: all diff --git a/recipes/pipes/all/conanfile.py b/recipes/pipes/all/conanfile.py index c2e8937d21d4a..879b25bfc8b32 100644 --- a/recipes/pipes/all/conanfile.py +++ b/recipes/pipes/all/conanfile.py @@ -7,7 +7,7 @@ from conan.tools.layout import basic_layout from conan.tools.scm import Version -required_conan_version = ">=1.52.0" +required_conan_version = ">=1.50.0" class PipesConan(ConanFile): @@ -23,37 +23,35 @@ class PipesConan(ConanFile): no_copy_source = True @property - def _minimum_cpp_standard(self): + def _min_cppstd(self): return 14 @property def _minimum_compilers_version(self): return { "Visual Studio": "15", + "msvc": "191", "gcc": "5", "clang": "3.4", "apple-clang": "5.1", } - def configure(self): - if self.settings.compiler.get_safe("cppstd"): - check_min_cppstd(self, self._minimum_cpp_standard) - min_version = self._minimum_compilers_version.get(str(self.settings.compiler)) - if not min_version: - self.output.warning(f"{self.name} recipe lacks information about the {self.settings.compiler} compiler support.") - else: - if Version(self.settings.compiler.version) < min_version: - raise ConanInvalidConfiguration( - f"{self.name} requires C++{self._minimum_cpp_standard} support. The current compiler" - f" {self.settings.compiler} {self.settings.compiler.version} does not support it." - ) - def layout(self): basic_layout(self, src_folder="src") def package_id(self): self.info.clear() + def validate(self): + if self.settings.compiler.get_safe("cppstd"): + check_min_cppstd(self, self._min_cppstd) + + min_version = self._minimum_compilers_version.get(str(self.settings.compiler)) + if min_version and Version(self.settings.compiler.version) < min_version: + raise ConanInvalidConfiguration( + f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." + ) + def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) diff --git a/recipes/pipes/all/test_package/CMakeLists.txt b/recipes/pipes/all/test_package/CMakeLists.txt index 39ba4f454e712..f31e3a93080d6 100644 --- a/recipes/pipes/all/test_package/CMakeLists.txt +++ b/recipes/pipes/all/test_package/CMakeLists.txt @@ -1,8 +1,8 @@ cmake_minimum_required(VERSION 3.15) -project(test_package CXX) +project(test_package LANGUAGES CXX) find_package(pipes REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) -target_link_libraries(${PROJECT_NAME} pipes::pipes) -set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 14) +target_link_libraries(${PROJECT_NAME} PRIVATE pipes::pipes) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_14) diff --git a/recipes/pipes/all/test_package/test_package.cpp b/recipes/pipes/all/test_package/test_package.cpp index 2050756e502b3..16c22b768a986 100644 --- a/recipes/pipes/all/test_package/test_package.cpp +++ b/recipes/pipes/all/test_package/test_package.cpp @@ -1,9 +1,14 @@ // Workaround for pipes not finding size_t #include +#include +#include +// FIXME: https://github.com/joboccara/pipes/pull/73 +#if __cplusplus >= 201703L +#include +#endif #include -#include int main() { auto source = std::vector{0, 1, 2, 3, 4, 5, 6, 7, 8, 9}; @@ -13,8 +18,5 @@ int main() { >>= pipes::transform([](int i){ return i * 2; }) >>= pipes::push_back(destination); - auto expected = std::vector{0, 4, 8, 12, 16}; - bool success = destination == expected; - - return success ? 0 : 1; + return EXIT_SUCCESS; } diff --git a/recipes/pixman/all/conanfile.py b/recipes/pixman/all/conanfile.py index c0b64456bcee2..d2d66d83f8c74 100644 --- a/recipes/pixman/all/conanfile.py +++ b/recipes/pixman/all/conanfile.py @@ -20,7 +20,7 @@ class PixmanConan(ConanFile): topics = ("graphics", "compositing", "rasterization") url = "https://github.com/conan-io/conan-center-index" homepage = "https://gitlab.freedesktop.org/pixman/pixman" - license = ("LGPL-2.1-only", "MPL-1.1") + license = ("MIT") package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { @@ -62,6 +62,13 @@ def generate(self): "libpng": "disabled", "gtk": "disabled" }) + + # Android armv7 build of Pixman makes use of cpu-features functionality, provided in the NDK + if self.settings.os == "Android": + android_ndk_home = self.conf.get("tools.android:ndk_path").replace("\\", "/") + cpu_features_path = os.path.join(android_ndk_home, "sources", "android", "cpufeatures") + tc.project_options.update({'cpu-features-path' : cpu_features_path}) + tc.generate() def _patch_sources(self): diff --git a/recipes/pkgconf/all/conandata.yml b/recipes/pkgconf/all/conandata.yml index 413c62bff29ba..33c2bc45652a3 100644 --- a/recipes/pkgconf/all/conandata.yml +++ b/recipes/pkgconf/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.2.0": + url: "https://distfiles.ariadne.space/pkgconf/pkgconf-2.2.0.tar.xz" + sha256: "b06ff63a83536aa8c2f6422fa80ad45e4833f590266feb14eaddfe1d4c853c69" "2.1.0": url: "https://distfiles.ariadne.space/pkgconf/pkgconf-2.1.0.tar.xz" sha256: "266d5861ee51c52bc710293a1d36622ae16d048d71ec56034a02eb9cf9677761" @@ -21,6 +24,8 @@ sources: url: "https://distfiles.ariadne.space/pkgconf/pkgconf-1.7.3.tar.xz" sha256: "b846aea51cf696c3392a0ae58bef93e2e72f8e7073ca6ad1ed8b01c85871f9c0" patches: + "2.2.0": + - patch_file: "patches/2.2.0-0001-PKG_CONF_PATH-allow-colon+semicolon-separator.patch" "2.1.0": - patch_file: "patches/2.1.0-0001-PKG_CONF_PATH-allow-colon+semicolon-separator.patch" "2.0.3": diff --git a/recipes/pkgconf/all/patches/2.2.0-0001-PKG_CONF_PATH-allow-colon+semicolon-separator.patch b/recipes/pkgconf/all/patches/2.2.0-0001-PKG_CONF_PATH-allow-colon+semicolon-separator.patch new file mode 100644 index 0000000000000..344efd99da6e2 --- /dev/null +++ b/recipes/pkgconf/all/patches/2.2.0-0001-PKG_CONF_PATH-allow-colon+semicolon-separator.patch @@ -0,0 +1,11 @@ +--- libpkgconf/path.c ++++ libpkgconf/path.c +@@ -170,7 +170,7 @@ + return 0; + + iter = workbuf = strdup(text); +- while ((p = strtok(iter, PKG_CONFIG_PATH_SEP_S)) != NULL) ++ while ((p = strtok(iter, ";:")) != NULL) + { + pkgconf_path_add(p, dirlist, filter); + diff --git a/recipes/pkgconf/all/test_package/conanfile.py b/recipes/pkgconf/all/test_package/conanfile.py index bf269283d5b1b..b2de624f38ef9 100644 --- a/recipes/pkgconf/all/test_package/conanfile.py +++ b/recipes/pkgconf/all/test_package/conanfile.py @@ -15,38 +15,24 @@ class TestPackageConan(ConanFile): settings = "os", "arch", "compiler", "build_type" test_type = "explicit" - win_bash = True @property def _settings_build(self): return getattr(self, "settings_build", self.settings) def requirements(self): - self.requires(self.tested_reference_str) # for the library - - def build_requirements(self): - self.tool_requires(self.tested_reference_str) # for the executable - self.tool_requires("automake/1.16.5") - if self._settings_build.os == "Windows" and not self.conf.get("tools.microsoft.bash:path", check_type=str): - self.tool_requires("msys2/cci.latest") + self.requires(self.tested_reference_str, run=True) def layout(self): cmake_layout(self, src_folder="src") def generate(self): - # Autotools project to test integration pkgconfig works - # during an Autotools configure run - at = AutotoolsToolchain(self) - at.generate() # Expose `PKG_CONFIG_PATH` to be able to find libexample1.pc env = Environment() - self.output.warning(f"Source folder: {self.source_folder}") + self.output.info(f"Source folder: {self.source_folder}") env.prepend_path("PKG_CONFIG_PATH", self.source_folder) - env.vars(self, scope="build").save_script("pkgconf-config-path") - - buildenv = VirtualBuildEnv(self) - buildenv.generate() + env.vars(self, scope="run").save_script("pkgconf-config-path") # CMake project to test that we can link against the library, # when the library is built @@ -56,6 +42,14 @@ def generate(self): deps = CMakeDeps(self) deps.generate() + # Check build environment postconditions + buildenv = VirtualBuildEnv(self) + env = buildenv.vars(scope='build') + assert 'PKG_CONFIG' in env.keys() + assert 'ACLOCAL_PATH' in env.keys() + assert 'AUTOMAKE_CONAN_INCLUDES' in env.keys() + buildenv.generate() + @property def _testing_library(self): # Workaround, in Conan >=2.0 we should be able to remove this in favour of: @@ -64,12 +58,6 @@ def _testing_library(self): return has_toolchain def build(self): - # Test that configure doesn't fail, we are not building the - # autotools project - autotools = Autotools(self) - autotools.autoreconf() - autotools.configure() - if self._testing_library: cmake = CMake(self) cmake.configure() @@ -78,14 +66,17 @@ def build(self): def test(self): # Check that we can find pkgconf in build environment # and that it is the expected version - output = StringIO() - self.run("pkgconf --about", output, env="conanbuild") - # TODO: When recipe is Conan 2+ only, this can be simplified - # to: self.dependencies['pkgconf'].ref.version - tokens = re.split('[@#]', self.tested_reference_str) - pkgconf_expected_version = tokens[0].split("/", 1)[1] - assert f"pkgconf {pkgconf_expected_version}" in output.getvalue() - + if can_run(self): + output = StringIO() + self.run("pkgconf --about", output, env="conanrun") + # TODO: When recipe is Conan 2+ only, this can be simplified + # to: self.dependencies['pkgconf'].ref.version + tokens = re.split('[@#]', self.tested_reference_str) + pkgconf_expected_version = tokens[0].split("/", 1)[1] + assert f"pkgconf {pkgconf_expected_version}" in output.getvalue() + + self.run("pkgconf libexample1 -cflags", env="conanrun") + # Test that executable linked against library runs as expected if can_run(self) and self._testing_library: test_executable = unix_path(self, os.path.join(self.cpp.build.bindirs[0], "test_package")) diff --git a/recipes/pkgconf/all/test_package/src/configure.ac b/recipes/pkgconf/all/test_package/src/configure.ac deleted file mode 100644 index 9b58503d96f4d..0000000000000 --- a/recipes/pkgconf/all/test_package/src/configure.ac +++ /dev/null @@ -1,9 +0,0 @@ -AC_INIT([test_package_pkgconf],[1.0]) -AC_PREREQ([2.69]) - -PKG_PREREQ([0.29]) -PKG_PROG_PKG_CONFIG -[echo pkg-config executable found at $PKG_CONFIG!] -PKG_CHECK_EXISTS([libexample1], - [echo "found libexample1 :D"], - [echo "libexample1 not found :("]) diff --git a/recipes/pkgconf/all/test_v1_package/CMakeLists.txt b/recipes/pkgconf/all/test_v1_package/CMakeLists.txt deleted file mode 100644 index f8b971e2db377..0000000000000 --- a/recipes/pkgconf/all/test_v1_package/CMakeLists.txt +++ /dev/null @@ -1,8 +0,0 @@ -cmake_minimum_required(VERSION 3.1) -project(test_package LANGUAGES C) - -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup() - -add_executable(${PROJECT_NAME} test_package.c) -target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS}) diff --git a/recipes/pkgconf/all/test_v1_package/conanfile.py b/recipes/pkgconf/all/test_v1_package/conanfile.py deleted file mode 100644 index b2a27f28edf88..0000000000000 --- a/recipes/pkgconf/all/test_v1_package/conanfile.py +++ /dev/null @@ -1,56 +0,0 @@ -from conans import AutoToolsBuildEnvironment, CMake, ConanFile, tools, RunEnvironment -from conans.errors import ConanException -import os -import shutil - - -class TestPackageConan(ConanFile): - settings = "os", "arch", "compiler", "build_type" - generators = "cmake" - test_type = "explicit" - - @property - def _settings_build(self): - return getattr(self, "settings_build", self.settings) - - def requirements(self): - self.requires(self.tested_reference_str) - - def build_requirements(self): - self.build_requires(self.tested_reference_str) - self.build_requires("automake/1.16.3") - if self._settings_build.os == "Windows" and not tools.get_env("CONAN_BASH_PATH"): - self.build_requires("msys2/cci.latest") - - def build(self): - # Test pkg.m4 integration into automake - shutil.copy(os.path.join(self.source_folder, "configure.ac"), - os.path.join(self.build_folder, "configure.ac")) - self.run("{} -fiv".format(tools.get_env("AUTORECONF")), run_environment=True, win_bash=tools.os_info.is_windows) - autotools = AutoToolsBuildEnvironment(self, win_bash=tools.os_info.is_windows) - with tools.environment_append(RunEnvironment(self).vars): - autotools.configure() - - if self.options["pkgconf"].enable_lib: - cmake = CMake(self) - cmake.configure() - cmake.build() - - def test(self): - if not tools.cross_building(self): - if self.options["pkgconf"].enable_lib: - self.run(os.path.join("bin", "test_package"), run_environment=True) - - pkg_config = tools.get_env("PKG_CONFIG") - self.output.info("Read environment variable PKG_CONFIG='{}'".format(pkg_config)) - if not pkg_config or not pkg_config.startswith(self.deps_cpp_info["pkgconf"].rootpath.replace("\\", "/")): - raise ConanException("PKG_CONFIG variable incorrect") - - pkgconf_path = tools.which("pkgconf").replace("\\", "/") - self.output.info("Found pkgconf at '{}'".format(pkgconf_path)) - if not pkgconf_path or not pkgconf_path.startswith(self.deps_cpp_info["pkgconf"].rootpath.replace("\\", "/")): - raise ConanException("pkgconf executable not found") - - with tools.environment_append({"PKG_CONFIG_PATH": self.source_folder}): - self.run("{} libexample1 --libs".format(os.environ["PKG_CONFIG"]), run_environment=True) - self.run("{} libexample1 --cflags".format(os.environ["PKG_CONFIG"]), run_environment=True) diff --git a/recipes/pkgconf/all/test_v1_package/configure.ac b/recipes/pkgconf/all/test_v1_package/configure.ac deleted file mode 100644 index f9bf1936b8123..0000000000000 --- a/recipes/pkgconf/all/test_v1_package/configure.ac +++ /dev/null @@ -1,9 +0,0 @@ -AC_INIT([test_package_pkgconf],[1.0]) -AC_PREREQ([2.69]) - -PKG_PREREQ([0.29]) -PKG_PROG_PKG_CONFIG -[echo pkg-config executable found at $PKG_CONFIG!] -PKG_CHECK_EXISTS([sdl2], - [echo "found SDL2 :D"], - [echo "SDL2 not found :("]) diff --git a/recipes/pkgconf/all/test_v1_package/libexample1.pc b/recipes/pkgconf/all/test_v1_package/libexample1.pc deleted file mode 100644 index 5fc1beac53aac..0000000000000 --- a/recipes/pkgconf/all/test_v1_package/libexample1.pc +++ /dev/null @@ -1,6 +0,0 @@ -Name: libexample1 -Description: This is a description of libexample1. -Requires: -Version: 0.42 -Libs: -L/usr/lib -lexample1 -Cflags: -I/usr/include/libexample1 -I/usr/include -DEXAMPLE1_STATIC diff --git a/recipes/pkgconf/all/test_v1_package/test_package.c b/recipes/pkgconf/all/test_v1_package/test_package.c deleted file mode 100644 index f8fd8ee550059..0000000000000 --- a/recipes/pkgconf/all/test_v1_package/test_package.c +++ /dev/null @@ -1,24 +0,0 @@ -#include "libpkgconf/libpkgconf.h" - -#include -#include -#include - -bool error_callback(const char *msg, const pkgconf_client_t *client, const void *data) { - printf("error callback: %s\n", msg); - fflush(stdout); - return 1; // 1/true means message handled -} - -int main() { - pkgconf_client_t client; - memset(&client, 0, sizeof(client)); - - pkgconf_client_init(&client, error_callback, NULL, pkgconf_cross_personality_default()); - - pkgconf_error(&client, "%s:%d %s: %s", __FILE__, __LINE__, __FUNCTION__, "test error"); - - pkgconf_client_deinit(&client); - - return 0; -} diff --git a/recipes/pkgconf/config.yml b/recipes/pkgconf/config.yml index f64bc13961492..369e560764ca3 100644 --- a/recipes/pkgconf/config.yml +++ b/recipes/pkgconf/config.yml @@ -1,4 +1,6 @@ versions: + "2.2.0": + folder: "all" "2.1.0": folder: "all" "2.0.3": diff --git a/recipes/platformfolders/all/conandata.yml b/recipes/platformfolders/all/conandata.yml new file mode 100644 index 0000000000000..be79160f2c84f --- /dev/null +++ b/recipes/platformfolders/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "4.2.0": + url: "https://github.com/sago007/PlatformFolders/archive/refs/tags/4.2.0.tar.gz" + sha256: "31bb0f64a27315aec8994f226332aaafe9888d00bb69a2ff2dff9912e2f4ccf4" diff --git a/recipes/platformfolders/all/conanfile.py b/recipes/platformfolders/all/conanfile.py new file mode 100644 index 0000000000000..e9a661cbf1d78 --- /dev/null +++ b/recipes/platformfolders/all/conanfile.py @@ -0,0 +1,82 @@ +from conan import ConanFile +from conan.tools.build import check_min_cppstd +from conan.tools.cmake import CMakeToolchain, CMake, cmake_layout +from conan.tools.files import copy, get, rmdir +from conan.tools.microsoft import is_msvc +from conan.errors import ConanInvalidConfiguration +import os + +required_conan_version = ">=1.53.0" + + +class PlatformFoldersConan(ConanFile): + name = "platformfolders" + license = "MIT" + homepage = "https://github.com/sago007/PlatformFolders" + url = "https://github.com/conan-io/conan-center-index" + description = "A C++ library to look for special directories like My Documents and APPDATA so that you do not need to write Linux, Windows or Mac OS X specific code" + topics = ("multi-platform", "xdg", "standardpaths", "special-folders") + package_type = "library" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + } + + @property + def _minimum_cpp_standard(self): + return 11 + + def validate(self): + if self.settings.compiler.cppstd: + check_min_cppstd(self, self._minimum_cpp_standard) + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + if is_msvc(self): + self.package_type = "static-library" + del self.options.shared + + def layout(self): + cmake_layout(self, src_folder="src") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + tc.variables["PLATFORMFOLDERS_BUILD_TESTING"] = False + tc.variables["PLATFORMFOLDERS_BUILD_SHARED_LIBS"] = self.options.get_safe("shared", default=False) + tc.variables["PLATFORMFOLDERS_ENABLE_INSTALL"] = True + tc.generate() + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def package(self): + copy(self, "LICENSE", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) + cmake = CMake(self) + cmake.install() + + rmdir(self, os.path.join(self.package_folder, "cmake")) + rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) + + def package_info(self): + self.cpp_info.libs = ["platform_folders"] + self.cpp_info.set_property("cmake_file_name", "platform_folders") + self.cpp_info.set_property("cmake_target_name", "sago::platform_folders") + self.cpp_info.set_property("cmake_target_aliases", ["platform_folders"]) + + if self.settings.os in ("Linux", "FreeBSD"): + self.cpp_info.system_libs.append("m") diff --git a/recipes/platformfolders/all/test_package/CMakeLists.txt b/recipes/platformfolders/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..c75dde66e6a67 --- /dev/null +++ b/recipes/platformfolders/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) + +find_package(platform_folders REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE sago::platform_folders) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) diff --git a/recipes/platformfolders/all/test_package/conanfile.py b/recipes/platformfolders/all/test_package/conanfile.py new file mode 100644 index 0000000000000..b8c7713c1ed31 --- /dev/null +++ b/recipes/platformfolders/all/test_package/conanfile.py @@ -0,0 +1,26 @@ +from conan import ConanFile +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import CMake, cmake_layout +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeToolchain", "CMakeDeps", "VirtualRunEnv" + test_type = "explicit" + + def layout(self): + cmake_layout(self) + + def requirements(self): + self.requires(self.tested_reference_str) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + self.run(os.path.join(self.cpp.build.bindirs[0], "test_package"), env="conanrun") diff --git a/recipes/platformfolders/all/test_package/test_package.cpp b/recipes/platformfolders/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..4570e8f5de608 --- /dev/null +++ b/recipes/platformfolders/all/test_package/test_package.cpp @@ -0,0 +1,20 @@ +#include +#include + +#include + +int main() { + std::cout << "Config: " << sago::getConfigHome() << "\n"; + std::cout << "Data: " << sago::getDataHome() << "\n"; + std::cout << "State: " << sago::getStateDir() << "\n"; + std::cout << "Cache: " << sago::getCacheDir() << "\n"; + std::cout << "Documents: " << sago::getDocumentsFolder() << "\n"; + std::cout << "Desktop: " << sago::getDesktopFolder() << "\n"; + std::cout << "Pictures: " << sago::getPicturesFolder() << "\n"; + std::cout << "Music: " << sago::getMusicFolder() << "\n"; + std::cout << "Video: " << sago::getVideoFolder() << "\n"; + std::cout << "Download: " << sago::getDownloadFolder() << "\n"; + std::cout << "Save Games 1: " << sago::getSaveGamesFolder1() << "\n"; + std::cout << "Save Games 2: " << sago::getSaveGamesFolder2() << "\n"; + return 0; +} diff --git a/recipes/platformfolders/config.yml b/recipes/platformfolders/config.yml new file mode 100644 index 0000000000000..1b309b8e878d8 --- /dev/null +++ b/recipes/platformfolders/config.yml @@ -0,0 +1,3 @@ +versions: + "4.2.0": + folder: "all" diff --git a/recipes/plutovg/all/conandata.yml b/recipes/plutovg/all/conandata.yml index caee6f61d4f89..e2c28aa740d01 100644 --- a/recipes/plutovg/all/conandata.yml +++ b/recipes/plutovg/all/conandata.yml @@ -1,10 +1,24 @@ sources: - "cci.20230205": - url: "https://github.com/sammycage/plutovg/archive/ccaa687ac6092ef548b840144820a757c24e718b.tar.gz" - sha256: "e7cb644a76612bcbaeb26f401adf7eff9cc45fbef69aadc7a9d0f84416f0ea98" - "cci.20221030": - url: "https://github.com/sammycage/plutovg/archive/4d0eee77ce7d1850aac4d90e20ddaaa313d83e6a.tar.gz" - sha256: "bb44b1107d1cd41032fecdf3e16cff59a1a06f15a92527029aacb73c5c4d059e" - "cci.20220103": - url: "https://github.com/sammycage/plutovg/archive/51f1a79e04fbb42ec9e93499a18869eea06f3054.tar.gz" - sha256: "c2ce39b8085e0a8795263666f62af15239c36964330865fd54b9db25c67e063b" + "0.0.8": + url: "https://github.com/sammycage/plutovg/archive/refs/tags/v0.0.8.tar.gz" + sha256: "090dd5d38e04e0900bf6843b2b38ce7108cab815c1b5496c934af65c51965618" + "0.0.7": + url: "https://github.com/sammycage/plutovg/archive/refs/tags/v0.0.7.tar.gz" + sha256: "31e264b6f451a0d18335d1596817c2b7f58e2fc6efeb63aac0ff9a7fbfc07c00" + "0.0.6": + url: "https://github.com/sammycage/plutovg/archive/refs/tags/v0.0.6.tar.gz" + sha256: "3be0e0d94ade3e739f60ac075c88c2e40d84a0ac05fc3ff8c7c97d0749e9a82b" + "0.0.5": + url: "https://github.com/sammycage/plutovg/archive/refs/tags/v0.0.5.tar.gz" + sha256: "bcc4301f1591d8b4172b7ca086fb9a2b250727848f5f30af4c625f043512ce10" + "0.0.4": + url: "https://github.com/sammycage/plutovg/archive/refs/tags/v0.0.4.tar.gz" + sha256: "6d7c6ad1ef3cf0085e0a375b770590a8cea79d4754b732e892635639c5546076" + "0.0.1": + url: "https://github.com/sammycage/plutovg/archive/refs/tags/v0.0.1.tar.gz" + sha256: "593653d226dd54dc322bc0874c19bd0a80314b5471ae4da6b9cd9e12211e3261" +patches: + "0.0.1": + - patch_file: "patches/0.0.1-0001-include-stdint.patch" + patch_description: "include stdint.h" + patch_type: "portability" diff --git a/recipes/plutovg/all/conanfile.py b/recipes/plutovg/all/conanfile.py index ac581e3e79204..be43bdb8956f4 100644 --- a/recipes/plutovg/all/conanfile.py +++ b/recipes/plutovg/all/conanfile.py @@ -1,7 +1,11 @@ from conan import ConanFile -from conan.tools.files import get, copy, replace_in_file -from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout - +from conan.tools.apple import fix_apple_shared_install_name +from conan.tools.env import VirtualBuildEnv +from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rm, rmdir, rename +from conan.tools.gnu import PkgConfigDeps +from conan.tools.layout import basic_layout +from conan.tools.meson import Meson, MesonToolchain +from conan.tools.microsoft import is_msvc import os required_conan_version = ">=1.53.0" @@ -24,6 +28,9 @@ class PlutoVGConan(ConanFile): "fPIC": True, } + def export_sources(self): + export_conandata_patches(self) + def config_options(self): if self.settings.os == "Windows": del self.options.fPIC @@ -31,39 +38,55 @@ def config_options(self): def configure(self): if self.options.shared: self.options.rm_safe("fPIC") - self.settings.rm_safe("compiler.libcxx") self.settings.rm_safe("compiler.cppstd") + self.settings.rm_safe("compiler.libcxx") def layout(self): - cmake_layout(self, src_folder="src") + basic_layout(self, src_folder="src") + + def build_requirements(self): + self.tool_requires("meson/[>=1.2.3 <2]") + if not self.conf.get("tools.gnu:pkg_config", default=False, check_type=str): + self.tool_requires("pkgconf/2.0.3") def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) def generate(self): - tc = CMakeToolchain(self) - tc.variables["CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS"] = True + tc = MesonToolchain(self) + tc.project_options["examples"] = "disabled" + tc.project_options["tests"] = "disabled" + tc.generate() + tc = PkgConfigDeps(self) + tc.generate() + tc = VirtualBuildEnv(self) tc.generate() def build(self): - replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), - "add_library(plutovg STATIC)", "add_library(plutovg)") - replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), - "add_subdirectory(example)", "") - cmake = CMake(self) - cmake.configure() - cmake.build() + apply_conandata_patches(self) + meson = Meson(self) + meson.configure() + meson.build() def package(self): - copy(self, pattern="LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) - copy(self, pattern="*.h", dst=os.path.join(self.package_folder, "include"), src=os.path.join(self.source_folder, "include")) - copy(self, pattern="*.a", dst=os.path.join(self.package_folder, "lib"), src=self.build_folder, keep_path=False) - copy(self, pattern="*.so", dst=os.path.join(self.package_folder, "lib"), src=self.build_folder, keep_path=False) - copy(self, pattern="*.lib", dst=os.path.join(self.package_folder, "lib"), src=self.build_folder, keep_path=False) - copy(self, pattern="*.dll", dst=os.path.join(self.package_folder, "bin"), src=self.build_folder, keep_path=False) - copy(self, pattern="*.dylib", dst=os.path.join(self.package_folder, "lib"), src=self.build_folder, keep_path=False) + copy(self, "LICENSE", self.source_folder, os.path.join(self.package_folder, "licenses")) + meson = Meson(self) + meson.install() + + # some files extensions and folders are not allowed. Please, read the FAQs to get informed. + rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) + rmdir(self, os.path.join(self.package_folder, "share")) + rm(self, "*.pdb", os.path.join(self.package_folder, "lib")) + rm(self, "*.pdb", os.path.join(self.package_folder, "bin")) + + fix_apple_shared_install_name(self) + + if is_msvc(self) and not self.options.shared: + rename(self, os.path.join(self.package_folder, "lib", "libplutovg.a"), os.path.join(self.package_folder, "lib", "plutovg.lib")) def package_info(self): self.cpp_info.libs = ["plutovg"] if self.settings.os in ("FreeBSD", "Linux"): self.cpp_info.system_libs = ["m"] + if is_msvc(self) and not self.options.shared: + self.cpp_info.defines.append("PLUTOVG_BUILD_STATIC") diff --git a/recipes/plutovg/all/patches/0.0.1-0001-include-stdint.patch b/recipes/plutovg/all/patches/0.0.1-0001-include-stdint.patch new file mode 100644 index 0000000000000..38089ef589d9a --- /dev/null +++ b/recipes/plutovg/all/patches/0.0.1-0001-include-stdint.patch @@ -0,0 +1,12 @@ +diff --git a/source/plutovg-surface.c b/source/plutovg-surface.c +index f81a51b..70be9e2 100644 +--- a/source/plutovg-surface.c ++++ b/source/plutovg-surface.c +@@ -1,5 +1,7 @@ + #include "plutovg-private.h" + ++#include ++ + #define STB_IMAGE_IMPLEMENTATION + #define STB_IMAGE_WRITE_IMPLEMENTATION + diff --git a/recipes/plutovg/all/test_package/CMakeLists.txt b/recipes/plutovg/all/test_package/CMakeLists.txt deleted file mode 100644 index 05f05dd40b2ba..0000000000000 --- a/recipes/plutovg/all/test_package/CMakeLists.txt +++ /dev/null @@ -1,7 +0,0 @@ -cmake_minimum_required(VERSION 3.1) -project(test_package LANGUAGES C) - -find_package(plutovg REQUIRED CONFIG) - -add_executable(${PROJECT_NAME} test_package.c) -target_link_libraries(${PROJECT_NAME} PRIVATE plutovg::plutovg) diff --git a/recipes/plutovg/all/test_package/conanfile.py b/recipes/plutovg/all/test_package/conanfile.py index a9fbb7f543162..7433710099642 100644 --- a/recipes/plutovg/all/test_package/conanfile.py +++ b/recipes/plutovg/all/test_package/conanfile.py @@ -1,25 +1,31 @@ from conan import ConanFile from conan.tools.build import can_run -from conan.tools.cmake import cmake_layout, CMake +from conan.tools.layout import basic_layout +from conan.tools.meson import Meson import os class TestPackageConan(ConanFile): settings = "os", "arch", "compiler", "build_type" - generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + generators = "PkgConfigDeps", "MesonToolchain", "VirtualRunEnv", "VirtualBuildEnv" test_type = "explicit" + def layout(self): + basic_layout(self) + def requirements(self): self.requires(self.tested_reference_str) - def layout(self): - cmake_layout(self) + def build_requirements(self): + self.tool_requires("meson/1.2.3") + if not self.conf.get("tools.gnu:pkg_config", default=False, check_type=str): + self.tool_requires("pkgconf/2.0.3") def build(self): - cmake = CMake(self) - cmake.configure() - cmake.build() + meson = Meson(self) + meson.configure() + meson.build() def test(self): if can_run(self): - bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") + bin_path = os.path.join(self.cpp.build.bindir, "test_package") self.run(bin_path, env="conanrun") diff --git a/recipes/plutovg/all/test_package/meson.build b/recipes/plutovg/all/test_package/meson.build new file mode 100644 index 0000000000000..af5cd82ec83dc --- /dev/null +++ b/recipes/plutovg/all/test_package/meson.build @@ -0,0 +1,5 @@ +project('test_package', 'c') +package_dep = dependency('plutovg') +executable('test_package', + sources : ['test_package.c'], + dependencies : [package_dep]) diff --git a/recipes/plutovg/all/test_package/test_package.c b/recipes/plutovg/all/test_package/test_package.c index 528e8031367ec..e73c320347491 100644 --- a/recipes/plutovg/all/test_package/test_package.c +++ b/recipes/plutovg/all/test_package/test_package.c @@ -1,14 +1,14 @@ -#include "plutovg.h" +#include -int main(void) { +int main(void) { const int width = 150; const int height = 150; plutovg_surface_t* surface = plutovg_surface_create(width, height); - plutovg_t* pluto = plutovg_create(surface); + plutovg_canvas_t* canvas = plutovg_canvas_create(surface); plutovg_surface_destroy(surface); - plutovg_destroy(pluto); + plutovg_canvas_destroy(canvas); return 0; } diff --git a/recipes/plutovg/all/test_v1_package/CMakeLists.txt b/recipes/plutovg/all/test_v1_package/CMakeLists.txt deleted file mode 100644 index de3b75d9538de..0000000000000 --- a/recipes/plutovg/all/test_v1_package/CMakeLists.txt +++ /dev/null @@ -1,8 +0,0 @@ -cmake_minimum_required(VERSION 3.1) -project(test_package LANGUAGES C) - -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) - -add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ - ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/plutovg/all/test_v1_package/conanfile.py b/recipes/plutovg/all/test_v1_package/conanfile.py deleted file mode 100644 index 20d4d2e28d57e..0000000000000 --- a/recipes/plutovg/all/test_v1_package/conanfile.py +++ /dev/null @@ -1,17 +0,0 @@ -from conans import ConanFile, CMake -from conan.tools.build import cross_building -import os - -class TestPackageV1Conan(ConanFile): - settings = "os", "arch", "compiler", "build_type" - generators = "cmake", "cmake_find_package_multi" - - def build(self): - cmake = CMake(self) - cmake.configure() - cmake.build() - - def test(self): - if not cross_building(self): - bin_path = os.path.join("bin", "test_package") - self.run(bin_path, run_environment=True) diff --git a/recipes/plutovg/config.yml b/recipes/plutovg/config.yml index 2d50305e8506d..e306407899e3b 100644 --- a/recipes/plutovg/config.yml +++ b/recipes/plutovg/config.yml @@ -1,7 +1,13 @@ versions: - "cci.20230205": + "0.0.8": folder: all - "cci.20221030": + "0.0.7": folder: all - "cci.20220103": + "0.0.6": + folder: all + "0.0.5": + folder: all + "0.0.4": + folder: all + "0.0.1": folder: all diff --git a/recipes/pocketfft/all/conandata.yml b/recipes/pocketfft/all/conandata.yml new file mode 100644 index 0000000000000..afc3604e9585d --- /dev/null +++ b/recipes/pocketfft/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "0.0.0.cci.20240801": + url: "https://github.com/mreineck/pocketfft/archive/bb87ca50df0478415a12d9011dc374eeed4e9d93.tar.gz" + sha256: "434d6cfd38613fb17db2c006cd64991947bdf88fb3f750cf6bfbaa86083c5bbd" diff --git a/recipes/pocketfft/all/conanfile.py b/recipes/pocketfft/all/conanfile.py new file mode 100644 index 0000000000000..75e19754616a6 --- /dev/null +++ b/recipes/pocketfft/all/conanfile.py @@ -0,0 +1,82 @@ +import os + +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.build import check_min_cppstd +from conan.tools.files import copy, get +from conan.tools.layout import basic_layout + +required_conan_version = ">=1.52.0" + + +class PocketfftConan(ConanFile): + name = "pocketfft" + description = "PocketFFT: a heavily modified implementation of FFTPack" + license = "BSD-3-Clause" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/mreineck/pocketfft" + topics = ("fft", "fast-fourier-transform", "fftpack", "header-only") + + package_type = "header-library" + settings = "os", "arch", "compiler", "build_type" + no_copy_source = True + options = { + "cache_size": ["ANY"], + "multithreading": [True, False], + "pthread": [True, False], + "vectorization": [True, False], + } + default_options = { + "cache_size": 0, + "multithreading": True, + "pthread": False, + "vectorization": True, + } + + def configure(self): + if not self.options.multithreading: + del self.options.pthread + + def requirements(self): + if self.options.get_safe("pthread") and self.settings.os == "Windows": + self.requires("pthreads4w/3.0.0") + + def layout(self): + basic_layout(self, src_folder="src") + + def package_id(self): + self.info.clear() + + def validate(self): + if self.settings.compiler.get_safe("cppstd"): + check_min_cppstd(self, 11) + + if not str(self.options.cache_size).isdigit() or int(str(self.options.cache_size)) < 0: + raise ConanInvalidConfiguration("cache_size option must be greater or equal to 0") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def package(self): + copy(self, "LICENSE.md", self.source_folder, os.path.join(self.package_folder, "licenses")) + copy(self, "*.h", self.source_folder, os.path.join(self.package_folder, "include")) + + def package_info(self): + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] + + self.cpp_info.defines.append(f"POCKETFFT_CACHE_SIZE={self.options.cache_size}") + if not self.options.multithreading: + self.cpp_info.defines.append("POCKETFFT_NO_MULTITHREADING") + if self.options.get_safe("pthread"): + self.cpp_info.defines.append("POCKETFFT_PTHREADS") + if not self.options.vectorization: + self.cpp_info.defines.append("POCKETFFT_NO_VECTORS") + + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.system_libs.append("m") + if self.options.multithreading: + self.cpp_info.system_libs.append("pthread") + + if self.options.get_safe("pthread") and self.settings.os == "Windows": + self.cpp_info.system_libs.append("pthreads4w::pthreads4w") diff --git a/recipes/pocketfft/all/test_package/CMakeLists.txt b/recipes/pocketfft/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..5d277cd110bf2 --- /dev/null +++ b/recipes/pocketfft/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) + +find_package(pocketfft REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE pocketfft::pocketfft) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) diff --git a/recipes/pocketfft/all/test_package/conanfile.py b/recipes/pocketfft/all/test_package/conanfile.py new file mode 100644 index 0000000000000..3a91c9439218e --- /dev/null +++ b/recipes/pocketfft/all/test_package/conanfile.py @@ -0,0 +1,26 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def layout(self): + cmake_layout(self) + + def requirements(self): + self.requires(self.tested_reference_str) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/pocketfft/all/test_package/test_package.cpp b/recipes/pocketfft/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..04d8a1970ebf2 --- /dev/null +++ b/recipes/pocketfft/all/test_package/test_package.cpp @@ -0,0 +1,15 @@ +#include + +#include +#include + +using namespace pocketfft; + +int main() { + const int len = 16; + shape_t shape{len}; + stride_t stride{sizeof(std::complex)}; + shape_t axes = {0}; + std::vector> data(len), res(len); + c2c(shape, stride, stride, axes, FORWARD, data.data(), res.data(), 1.f); +} diff --git a/recipes/pocketfft/config.yml b/recipes/pocketfft/config.yml new file mode 100644 index 0000000000000..cecbc61c9639e --- /dev/null +++ b/recipes/pocketfft/config.yml @@ -0,0 +1,3 @@ +versions: + "0.0.0.cci.20240801": + folder: all diff --git a/recipes/poco/all/conanfile.py b/recipes/poco/all/conanfile.py index b2d6762eae55d..8223c242f01e0 100644 --- a/recipes/poco/all/conanfile.py +++ b/recipes/poco/all/conanfile.py @@ -157,7 +157,7 @@ def requirements(self): self.requires("pcre2/10.42") self.requires("zlib/[>=1.2.11 <2]", transitive_headers=True) if self.options.enable_xml: - self.requires("expat/2.5.0", transitive_headers=True) + self.requires("expat/[>=2.6.2 <3]", transitive_headers=True) if self.options.enable_data_sqlite: self.requires("sqlite3/3.45.0") if self.options.enable_apacheconnector: diff --git a/recipes/podofo/all/conandata.yml b/recipes/podofo/all/conandata.yml index 2735fdd5d425b..016e63cd90df6 100644 --- a/recipes/podofo/all/conandata.yml +++ b/recipes/podofo/all/conandata.yml @@ -2,15 +2,8 @@ sources: "0.9.7": url: "https://netcologne.dl.sourceforge.net/project/podofo/podofo/0.9.7/podofo-0.9.7.tar.gz" sha256: "7cf2e716daaef89647c54ffcd08940492fd40c385ef040ce7529396bfadc1eb8" - "0.9.6": - url: "https://netcologne.dl.sourceforge.net/project/podofo/podofo/0.9.6/podofo-0.9.6.tar.gz" - sha256: "e9163650955ab8e4b9532e7aa43b841bac45701f7b0f9b793a98c8ca3ef14072" patches: "0.9.7": - patch_file: "patches/0001-fix-cmake-0.9.7.patch" patch_description: "Link to conan libs and allow to build the tools without the tests and the examples" patch_type: "conan" - "0.9.6": - - patch_file: "patches/0001-fix-cmake-0.9.6.patch" - patch_description: "Link to conan libs and allow to build the tools without the tests and the examples" - patch_type: "conan" diff --git a/recipes/podofo/all/conanfile.py b/recipes/podofo/all/conanfile.py index 87fbb60fe26b7..365ade4380f35 100644 --- a/recipes/podofo/all/conanfile.py +++ b/recipes/podofo/all/conanfile.py @@ -1,4 +1,4 @@ -from conan import ConanFile +from conan import ConanFile, conan_version from conan.tools.build import check_min_cppstd, valid_min_cppstd from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rmdir @@ -62,26 +62,33 @@ def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - self.requires("freetype/2.13.0") + self.requires("freetype/2.13.2") self.requires("zlib/[>=1.2.11 <2]") if self.settings.os != "Windows": - self.requires("fontconfig/2.14.2") + self.requires("fontconfig/2.15.0") if self.options.with_openssl: - self.requires("openssl/1.1.1u") + self.requires("openssl/[>=1.1 <4]") if self.options.with_libidn: self.requires("libidn/1.36") if self.options.with_jpeg: self.requires("libjpeg/9e") if self.options.with_tiff: - self.requires("libtiff/4.5.1") + self.requires("libtiff/4.6.0") if self.options.with_png: - self.requires("libpng/1.6.40") + self.requires("libpng/[>=1.6 <2]") if self.options.with_unistring: self.requires("libunistring/0.9.10") def validate(self): if self.info.settings.compiler.get_safe("cppstd") and Version(self.version) >= "0.9.7": check_min_cppstd(self, 11) + if conan_version.major >= 2 and Version(self.version) < "0.9.7": + # FIXME: linter complains, but function is there + # https://docs.conan.io/2.0/reference/tools/build.html?highlight=check_min_cppstd#conan-tools-build-check-max-cppstd + import sys + check_max_cppstd = getattr(sys.modules['conan.tools.build'], 'check_max_cppstd') + # INFO: error: no template named 'auto_ptr' in namespace 'std'. Removed in C++17. + check_max_cppstd(self, 14) def source(self): get(self, **self.conan_data["sources"][self.version], diff --git a/recipes/podofo/config.yml b/recipes/podofo/config.yml index ca2128b57488a..a6cc81e2fb933 100644 --- a/recipes/podofo/config.yml +++ b/recipes/podofo/config.yml @@ -1,5 +1,3 @@ versions: "0.9.7": folder: all - "0.9.6": - folder: all diff --git a/recipes/polylabel/all/conandata.yml b/recipes/polylabel/all/conandata.yml index efb6a522362e3..0857fe72ca3c7 100644 --- a/recipes/polylabel/all/conandata.yml +++ b/recipes/polylabel/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.0.0": + url: "https://github.com/mapbox/polylabel/archive/refs/tags/v2.0.0.tar.gz" + sha256: "9aba4320c6cb5a8e9a8d44feb0d68b79b3127bdcb759a26aca92ac637668d7b9" "1.1.0": url: "https://github.com/mapbox/polylabel/archive/refs/tags/v1.1.0.tar.gz" sha256: "3694a3127954fab760686c825e2e585684934c768b5f9d542b8701e54147f1a8" diff --git a/recipes/polylabel/all/conanfile.py b/recipes/polylabel/all/conanfile.py index 402d5fbafc219..2e5e1eaff3562 100644 --- a/recipes/polylabel/all/conanfile.py +++ b/recipes/polylabel/all/conanfile.py @@ -1,7 +1,9 @@ from conan import ConanFile +from conan.errors import ConanInvalidConfiguration from conan.tools.build import check_min_cppstd from conan.tools.files import copy, get from conan.tools.layout import basic_layout +from conan.tools.scm import Version import os required_conan_version = ">=1.52.0" @@ -10,13 +12,28 @@ class PolylabelConan(ConanFile): name = "polylabel" description = "A fast algorithm for finding the pole of inaccessibility of a polygon." - topics = ("polygon", "pole-of-inaccessibility") license = "ISC" - homepage = "https://github.com/mapbox/polylabel" url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/mapbox/polylabel" + topics = ("polygon", "pole-of-inaccessibility", "header-only") + package_type = "header-library" settings = "os", "arch", "compiler", "build_type" no_copy_source = True + @property + def _min_cppstd(self): + return 14 + + @property + def _compilers_minimum_version(self): + return { + "gcc": "6", + "clang": "5", + "apple-clang": "10", + "Visual Studio": "15", + "msvc": "191", + } + def layout(self): basic_layout(self, src_folder="src") @@ -28,14 +45,15 @@ def package_id(self): def validate(self): if self.settings.compiler.get_safe("cppstd"): - check_min_cppstd(self, 14) + check_min_cppstd(self, self._min_cppstd) + minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) + if minimum_version and Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration( + f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." + ) def source(self): - get(self, **self.conan_data["sources"][self.version], - destination=self.source_folder, strip_root=True) - - def build(self): - pass + get(self, **self.conan_data["sources"][self.version], strip_root=True) def package(self): copy(self, "LICENSE", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) diff --git a/recipes/polylabel/all/test_v1_package/CMakeLists.txt b/recipes/polylabel/all/test_v1_package/CMakeLists.txt deleted file mode 100644 index 0c0d215f97b42..0000000000000 --- a/recipes/polylabel/all/test_v1_package/CMakeLists.txt +++ /dev/null @@ -1,11 +0,0 @@ -cmake_minimum_required(VERSION 3.8) -project(test_package LANGUAGES CXX) - -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) - -find_package(polylabel REQUIRED CONFIG) - -add_executable(${PROJECT_NAME} ../test_package/test_package.cpp) -target_link_libraries(${PROJECT_NAME} PRIVATE polylabel::polylabel) -target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_14) diff --git a/recipes/polylabel/all/test_v1_package/conanfile.py b/recipes/polylabel/all/test_v1_package/conanfile.py deleted file mode 100644 index 38f4483872d47..0000000000000 --- a/recipes/polylabel/all/test_v1_package/conanfile.py +++ /dev/null @@ -1,17 +0,0 @@ -from conans import ConanFile, CMake, tools -import os - - -class TestPackageConan(ConanFile): - settings = "os", "arch", "compiler", "build_type" - generators = "cmake", "cmake_find_package_multi" - - def build(self): - cmake = CMake(self) - cmake.configure() - cmake.build() - - def test(self): - if not tools.cross_building(self): - bin_path = os.path.join("bin", "test_package") - self.run(bin_path, run_environment=True) diff --git a/recipes/polylabel/config.yml b/recipes/polylabel/config.yml index b5c0d3cb2d409..2973f3b50e9e6 100644 --- a/recipes/polylabel/config.yml +++ b/recipes/polylabel/config.yml @@ -1,3 +1,5 @@ versions: + "2.0.0": + folder: all "1.1.0": folder: all diff --git a/recipes/popl/all/conandata.yml b/recipes/popl/all/conandata.yml new file mode 100644 index 0000000000000..ecb4877cc3587 --- /dev/null +++ b/recipes/popl/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "1.3.0": + url: "https://github.com/badaix/popl/archive/refs/tags/v1.3.0.tar.gz" + sha256: "7c59554371da3c6c093bd79c2f403f921c1938bd523f1a48682352e0d92883a6" diff --git a/recipes/popl/all/conanfile.py b/recipes/popl/all/conanfile.py new file mode 100644 index 0000000000000..2d3d23c30b405 --- /dev/null +++ b/recipes/popl/all/conanfile.py @@ -0,0 +1,41 @@ +import os + +from conan import ConanFile +from conan.tools.build import check_min_cppstd +from conan.tools.files import copy, get +from conan.tools.layout import basic_layout + +required_conan_version = ">=1.52.0" + + +class PoplConan(ConanFile): + name = "popl" + description = "Header-only C++ command line arguments parser that supports the same set of options as GNU's getopt." + license = "MIT" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/badaix/popl" + topics = ("cli", "command-line-arguments", "getopt", "header-only") + package_type = "header-library" + settings = "os", "arch", "compiler", "build_type" + no_copy_source = True + + def layout(self): + basic_layout(self, src_folder="src") + + def package_id(self): + self.info.clear() + + def validate(self): + if self.settings.compiler.get_safe("cppstd"): + check_min_cppstd(self, 11) + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def package(self): + copy(self, "LICENSE", self.source_folder, os.path.join(self.package_folder, "licenses")) + copy(self, "popl.hpp", os.path.join(self.source_folder, "include"), os.path.join(self.package_folder, "include")) + + def package_info(self): + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] diff --git a/recipes/popl/all/test_package/CMakeLists.txt b/recipes/popl/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..7fec26ab44c8e --- /dev/null +++ b/recipes/popl/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) + +find_package(popl REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE popl::popl) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) diff --git a/recipes/popl/all/test_package/conanfile.py b/recipes/popl/all/test_package/conanfile.py new file mode 100644 index 0000000000000..3a91c9439218e --- /dev/null +++ b/recipes/popl/all/test_package/conanfile.py @@ -0,0 +1,26 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def layout(self): + cmake_layout(self) + + def requirements(self): + self.requires(self.tested_reference_str) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/popl/all/test_package/test_package.cpp b/recipes/popl/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..3e0ed006d49d2 --- /dev/null +++ b/recipes/popl/all/test_package/test_package.cpp @@ -0,0 +1,12 @@ +#include + +#include + +using namespace popl; + +int main(int argc, char **argv) { + OptionParser op("Allowed options"); + auto help_option = op.add("h", "help", "produce help message"); + op.parse(argc, argv); + std::cout << op << "\n"; +} diff --git a/recipes/popl/config.yml b/recipes/popl/config.yml new file mode 100644 index 0000000000000..426a0e4c79e9b --- /dev/null +++ b/recipes/popl/config.yml @@ -0,0 +1,3 @@ +versions: + "1.3.0": + folder: all diff --git a/recipes/poppler/all/conanfile.py b/recipes/poppler/all/conanfile.py index b7d61c3e69e7e..c798993e27cdd 100644 --- a/recipes/poppler/all/conanfile.py +++ b/recipes/poppler/all/conanfile.py @@ -107,7 +107,7 @@ def requirements(self): if self.options.with_openjpeg: self.requires("openjpeg/2.5.0") if self.options.with_lcms: - self.requires("lcms/2.13.1") + self.requires("lcms/2.16") if self.options.with_libjpeg == "libjpeg": self.requires("libjpeg/9d") if self.options.with_png: diff --git a/recipes/popt/1.19/conanfile.py b/recipes/popt/1.19/conanfile.py index a8a39dc69c064..77c06c30fce86 100755 --- a/recipes/popt/1.19/conanfile.py +++ b/recipes/popt/1.19/conanfile.py @@ -35,7 +35,7 @@ def config_options(self): def requirements(self): if self.settings.os == "Neutrino": - self.requires("libiconv/1.15") + self.requires("libiconv/1.17") def configure(self): if self.options.shared: diff --git a/recipes/poselib/all/conandata.yml b/recipes/poselib/all/conandata.yml new file mode 100644 index 0000000000000..32b5efa0b3081 --- /dev/null +++ b/recipes/poselib/all/conandata.yml @@ -0,0 +1,7 @@ +sources: + "2.0.4": + url: "https://github.com/PoseLib/PoseLib/archive/refs/tags/v2.0.4.tar.gz" + sha256: "caa0c1c9b882f6e36b5ced6f781406ed97d4c1f0f61aa31345ebe54633d67c16" + "2.0.3": + url: "https://github.com/PoseLib/PoseLib/archive/refs/tags/v2.0.3.tar.gz" + sha256: "ec52fe738a803e53c4cedc27f393a38b2dced63da6c73148e98965b338ca0efc" diff --git a/recipes/poselib/all/conanfile.py b/recipes/poselib/all/conanfile.py new file mode 100644 index 0000000000000..0282ec6f8bfdb --- /dev/null +++ b/recipes/poselib/all/conanfile.py @@ -0,0 +1,110 @@ +import os + +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.build import check_min_cppstd +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.files import copy, get, replace_in_file, rmdir +from conan.tools.scm import Version + +required_conan_version = ">=1.53.0" + + +class PoselibConan(ConanFile): + name = "poselib" + description = "PoseLib: minimal solvers for calibrated camera pose estimation" + license = "BSD-3-Clause" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/PoseLib/PoseLib" + topics = ("pose", "camera", "estimation", "solver") + + package_type = "library" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + } + + @property + def _min_cppstd(self): + return 17 + + @property + def _compilers_minimum_version(self): + return { + "gcc": "7", + "clang": "6", + "apple-clang": "10", + "msvc": "192", + "Visual Studio": "16", + } + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + + def layout(self): + cmake_layout(self, src_folder="src") + + def requirements(self): + self.requires("eigen/3.4.0", transitive_headers=True, transitive_libs=True) + + def validate(self): + if self.settings.compiler.cppstd: + check_min_cppstd(self, self._min_cppstd) + minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) + if minimum_version and Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration( + f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." + ) + + if self.settings.os == "Windows" and self.options.shared: + raise ConanInvalidConfiguration( + f"{self.ref} does not export symbols on Windows for a shared library build." + ) + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + tc.cache_variables["MARCH_NATIVE"] = False + tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0077"] = "NEW" + tc.generate() + + deps = CMakeDeps(self) + deps.generate() + + def _patch_sources(self): + cmakelists = os.path.join(self.source_folder, "CMakeLists.txt") + replace_in_file(self, cmakelists, "-march=native -Wall -Werror -fPIC", "") + + def build(self): + self._patch_sources() + cmake = CMake(self) + cmake.configure() + cmake.build() + + def package(self): + copy(self, "LICENSE", self.source_folder, os.path.join(self.package_folder, "licenses")) + cmake = CMake(self) + cmake.install() + rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) + + def package_info(self): + self.cpp_info.set_property("cmake_file_name", "PoseLib") + self.cpp_info.set_property("cmake_target_name", "PoseLib::PoseLib") + + suffix = "d" if self.settings.build_type == "Debug" else "" + self.cpp_info.libs = ["PoseLib" + suffix] + + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.system_libs.append("m") diff --git a/recipes/poselib/all/test_package/CMakeLists.txt b/recipes/poselib/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..ea7248e1ec70c --- /dev/null +++ b/recipes/poselib/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) + +find_package(PoseLib REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE PoseLib::PoseLib) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) diff --git a/recipes/poselib/all/test_package/conanfile.py b/recipes/poselib/all/test_package/conanfile.py new file mode 100644 index 0000000000000..3a91c9439218e --- /dev/null +++ b/recipes/poselib/all/test_package/conanfile.py @@ -0,0 +1,26 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def layout(self): + cmake_layout(self) + + def requirements(self): + self.requires(self.tested_reference_str) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/poselib/all/test_package/test_package.cpp b/recipes/poselib/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..613b02cd52fa4 --- /dev/null +++ b/recipes/poselib/all/test_package/test_package.cpp @@ -0,0 +1,10 @@ +#include + +#include + +int main() { + std::vector x1(10, Eigen::Vector3d{}); + std::vector x2(10, Eigen::Vector3d{}); + Eigen::Matrix3d h; + int res = poselib::homography_4pt(x1, x2, &h); +} diff --git a/recipes/poselib/config.yml b/recipes/poselib/config.yml new file mode 100644 index 0000000000000..7776ab2d30335 --- /dev/null +++ b/recipes/poselib/config.yml @@ -0,0 +1,5 @@ +versions: + "2.0.4": + folder: all + "2.0.3": + folder: all diff --git a/recipes/premake/5.x/conanfile.py b/recipes/premake/5.x/conanfile.py index d4fa461153f3c..0a761c061731a 100644 --- a/recipes/premake/5.x/conanfile.py +++ b/recipes/premake/5.x/conanfile.py @@ -3,7 +3,7 @@ import re import shutil -from conan import ConanFile, conan_version +from conan import ConanFile from conan.errors import ConanInvalidConfiguration from conan.tools.build import cross_building from conan.tools.files import apply_conandata_patches, chdir, copy, export_conandata_patches, get, replace_in_file @@ -55,10 +55,6 @@ def requirements(self): def validate(self): if hasattr(self, "settings_build") and cross_building(self, skip_x64_x86=True): raise ConanInvalidConfiguration("Cross-building not implemented") - if conan_version.major == 1 and self.settings.build_type == "Debug": - # This configuration fails without any error messages in C3I. - # https://c3i.jfrog.io/artifactory/misc/logs/pr/18844/15-linux-clang/premake/5.0.0-alpha15/ - raise ConanInvalidConfiguration("Debug build not supported with Conan 1.x") def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) diff --git a/recipes/premake/5.x/test_package/conanfile.py b/recipes/premake/5.x/test_package/conanfile.py index d2d508976967c..0cbf9e48678a6 100644 --- a/recipes/premake/5.x/test_package/conanfile.py +++ b/recipes/premake/5.x/test_package/conanfile.py @@ -1,5 +1,5 @@ from conan import ConanFile -from conan.tools.cmake import cmake_layout +from conan.tools.build import can_run class TestPackageConan(ConanFile): @@ -10,8 +10,6 @@ class TestPackageConan(ConanFile): def build_requirements(self): self.tool_requires(self.tested_reference_str) - def layout(self): - cmake_layout(self) - def test(self): - self.run("premake5 --version") + if can_run(self): + self.run("premake5 --version") diff --git a/recipes/pro-mdnsd/all/CMakeLists.txt b/recipes/pro-mdnsd/all/CMakeLists.txt deleted file mode 100644 index 361b35d4c17d9..0000000000000 --- a/recipes/pro-mdnsd/all/CMakeLists.txt +++ /dev/null @@ -1,7 +0,0 @@ -cmake_minimum_required(VERSION 2.8.11) -project(cmake_wrapper) - -include(conanbuildinfo.cmake) -conan_basic_setup() - -add_subdirectory(source_subfolder) diff --git a/recipes/pro-mdnsd/all/conandata.yml b/recipes/pro-mdnsd/all/conandata.yml index f4bf0e41133c5..3ab03deb075b4 100644 --- a/recipes/pro-mdnsd/all/conandata.yml +++ b/recipes/pro-mdnsd/all/conandata.yml @@ -5,4 +5,3 @@ sources: patches: "0.8.4": - patch_file: "patches/0001-cmake-install-bundle.patch" - base_path: "source_subfolder" diff --git a/recipes/pro-mdnsd/all/conanfile.py b/recipes/pro-mdnsd/all/conanfile.py index 8d1745ad0e35c..feeeec6738fe1 100644 --- a/recipes/pro-mdnsd/all/conanfile.py +++ b/recipes/pro-mdnsd/all/conanfile.py @@ -1,41 +1,37 @@ -from conans import ConanFile, CMake, tools import os import textwrap -required_conan_version = ">=1.43.0" +from conan import ConanFile +from conan.tools.apple import fix_apple_shared_install_name +from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout +from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rmdir, save, rename + +required_conan_version = ">=1.53.0" class mdnsdConan(ConanFile): name = "pro-mdnsd" + description = "Improved version of Jeremie Miller's MDNS-SD implementation" license = "BSD-3-Clause" - homepage = "https://github.com/Pro/mdnsd" url = "https://github.com/conan-io/conan-center-index" - description = "Improved version of Jeremie Miller's MDNS-SD implementation" + homepage = "https://github.com/Pro/mdnsd" topics = ("dns", "daemon", "multicast", "embedded", "c") - settings = "os", "compiler", "build_type", "arch" + package_type = "library" + settings = "os", "arch", "compiler", "build_type" options = { - "fPIC": [True, False], "shared": [True, False], + "fPIC": [True, False], "compile_as_cpp": [True, False], } default_options = { - "fPIC": True, "shared": False, + "fPIC": True, "compile_as_cpp": False, } - generators = "cmake" - _cmake = None - - @property - def _source_subfolder(self): - return "source_subfolder" - def export_sources(self): - self.copy("CMakeLists.txt") - for patch in self.conan_data.get("patches", {}).get(self.version, []): - self.copy(patch["patch_file"]) + export_conandata_patches(self) def config_options(self): if self.settings.os == "Windows": @@ -43,36 +39,38 @@ def config_options(self): def configure(self): if self.options.shared: - del self.options.fPIC + self.options.rm_safe("fPIC") if not self.options.compile_as_cpp: - del self.settings.compiler.libcxx - del self.settings.compiler.cppstd + self.settings.rm_safe("compiler.libcxx") + self.settings.rm_safe("compiler.cppstd") + + def layout(self): + cmake_layout(self, src_folder="src") def source(self): - tools.get(**self.conan_data["sources"][self.version], - destination=self._source_subfolder, strip_root=True) - - def _configure_cmake(self): - if self._cmake: - return self._cmake - self._cmake = CMake(self) - self._cmake.definitions["MDNSD_ENABLE_SANITIZERS"] = False - self._cmake.definitions["MDNSD_COMPILE_AS_CXX"] = self.options.compile_as_cpp - self._cmake.configure() - return self._cmake + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + tc.variables["MDNSD_ENABLE_SANITIZERS"] = False + tc.variables["MDNSD_COMPILE_AS_CXX"] = self.options.compile_as_cpp + tc.generate() def build(self): - for patch in self.conan_data.get("patches", {}).get(self.version, []): - tools.patch(**patch) - cmake = self._configure_cmake() + apply_conandata_patches(self) + cmake = CMake(self) + cmake.configure() cmake.build() def package(self): - cmake = self._configure_cmake() + copy(self, "LICENSE", + dst=os.path.join(self.package_folder, "licenses"), + src=self.source_folder) + cmake = CMake(self) cmake.install() - tools.rmdir(os.path.join(self.package_folder, "lib", "cmake")) - tools.rmdir(os.path.join(self.package_folder, "share")) - self.copy("LICENSE", dst="licenses", src=self._source_subfolder) + rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) + rmdir(self, os.path.join(self.package_folder, "share")) + fix_apple_shared_install_name(self) # TODO: to remove in conan v2 once cmake_find_package* generators removed self._create_cmake_module_alias_targets( @@ -80,28 +78,28 @@ def package(self): {"libmdnsd": "mdnsd::mdnsd"} ) - @staticmethod - def _create_cmake_module_alias_targets(module_file, targets): + def _create_cmake_module_alias_targets(self, module_file, targets): content = "" for alias, aliased in targets.items(): - content += textwrap.dedent("""\ + content += textwrap.dedent(f"""\ if(TARGET {aliased} AND NOT TARGET {alias}) add_library({alias} INTERFACE IMPORTED) set_property(TARGET {alias} PROPERTY INTERFACE_LINK_LIBRARIES {aliased}) endif() - """.format(alias=alias, aliased=aliased)) - tools.save(module_file, content) + """) + save(self, module_file, content) @property def _module_file_rel_path(self): - return os.path.join("lib", "cmake", "conan-official-{}-targets.cmake".format(self.name)) + return os.path.join("lib", "cmake", f"conan-official-{self.name}-targets.cmake") def package_info(self): self.cpp_info.set_property("cmake_file_name", "mdnsd") - self.cpp_info.set_property("cmake_target_name", "libmdnsd") + self.cpp_info.set_property("cmake_target_name", "libmdnsd") + self.cpp_info.set_property("cmake_target_aliases", ["mdnsd::mdnsd"]) self.cpp_info.libs = ["mdnsd"] if self.settings.os == "Windows": - self.cpp_info.system_libs.append("ws2_32") + self.cpp_info.system_libs = ["ws2_32", "wsock32"] # TODO: to remove in conan v2 once cmake_find_package* generators removed self.cpp_info.names["cmake_find_package"] = "mdnsd" diff --git a/recipes/pro-mdnsd/all/test_package/CMakeLists.txt b/recipes/pro-mdnsd/all/test_package/CMakeLists.txt index ff7f7e8ca3d71..5a773c9696280 100644 --- a/recipes/pro-mdnsd/all/test_package/CMakeLists.txt +++ b/recipes/pro-mdnsd/all/test_package/CMakeLists.txt @@ -1,10 +1,7 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.15) project(test_package C) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) - find_package(mdnsd REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.c) -target_link_libraries(${PROJECT_NAME} libmdnsd) +target_link_libraries(${PROJECT_NAME} mdnsd::mdnsd) diff --git a/recipes/pro-mdnsd/all/test_package/conanfile.py b/recipes/pro-mdnsd/all/test_package/conanfile.py index 38f4483872d47..ef5d7042163ec 100644 --- a/recipes/pro-mdnsd/all/test_package/conanfile.py +++ b/recipes/pro-mdnsd/all/test_package/conanfile.py @@ -1,10 +1,19 @@ -from conans import ConanFile, CMake, tools +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake import os class TestPackageConan(ConanFile): settings = "os", "arch", "compiler", "build_type" - generators = "cmake", "cmake_find_package_multi" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) def build(self): cmake = CMake(self) @@ -12,6 +21,6 @@ def build(self): cmake.build() def test(self): - if not tools.cross_building(self): - bin_path = os.path.join("bin", "test_package") - self.run(bin_path, run_environment=True) + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/pro-mdnsd/all/test_v1_package/CMakeLists.txt b/recipes/pro-mdnsd/all/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..91630d79f4abb --- /dev/null +++ b/recipes/pro-mdnsd/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/libgit2/0.28.x/test_package/conanfile.py b/recipes/pro-mdnsd/all/test_v1_package/conanfile.py similarity index 100% rename from recipes/libgit2/0.28.x/test_package/conanfile.py rename to recipes/pro-mdnsd/all/test_v1_package/conanfile.py diff --git a/recipes/proj/all/conandata.yml b/recipes/proj/all/conandata.yml index 95a7cf689dd27..376bfb62914e2 100644 --- a/recipes/proj/all/conandata.yml +++ b/recipes/proj/all/conandata.yml @@ -1,4 +1,10 @@ sources: + "9.5.0": + url: "https://github.com/OSGeo/PROJ/releases/download/9.5.0/proj-9.5.0.tar.gz" + sha256: "659af0d558f7c5618c322fde2d3392910806faee8684687959339021fa207d99" + "9.4.1": + url: "https://github.com/OSGeo/PROJ/releases/download/9.4.1/proj-9.4.1.tar.gz" + sha256: "ffe20170ee2b952207adf8a195e2141eab12cda181e49fdeb54425d98c7171d7" "9.3.1": url: "https://github.com/OSGeo/PROJ/releases/download/9.3.1/proj-9.3.1.tar.gz" sha256: "b0f919cb9e1f42f803a3e616c2b63a78e4d81ecfaed80978d570d3a5e29d10bc" @@ -8,18 +14,6 @@ sources: "9.2.1": url: "https://github.com/OSGeo/PROJ/releases/download/9.2.1/proj-9.2.1.tar.gz" sha256: "15ebf4afa8744b9e6fccb5d571fc9f338dc3adcf99907d9e62d1af815d4971a1" - "9.1.1": - url: "https://github.com/OSGeo/PROJ/releases/download/9.1.1/proj-9.1.1.tar.gz" - sha256: "003cd4010e52bb5eb8f7de1c143753aa830c8902b6ed01209f294846e40e6d39" - "9.1.0": - url: "https://github.com/OSGeo/PROJ/releases/download/9.1.0/proj-9.1.0.tar.gz" - sha256: "81b2239b94cad0886222cde4f53cb49d34905aad2a1317244a0c30a553db2315" - "9.0.1": - url: "https://github.com/OSGeo/PROJ/releases/download/9.0.1/proj-9.0.1.tar.gz" - sha256: "737eaacbe7906d0d6ff43f0d9ebedc5c734cccc9e6b8d7beefdec3ab22d9a6a3" - "9.0.0": - url: "https://github.com/OSGeo/PROJ/releases/download/9.0.0/proj-9.0.0.tar.gz" - sha256: "0620aa01b812de00b54d6c23e7c5cc843ae2cd129b24fabe411800302172b989" "8.2.1": url: "https://github.com/OSGeo/PROJ/releases/download/8.2.1/proj-8.2.1.tar.gz" sha256: "76ed3d0c3a348a6693dfae535e5658bbfd47f71cb7ff7eb96d9f12f7e068b1cf" @@ -42,26 +36,6 @@ patches: - patch_file: "patches/0001-use-cmake-targets-9.2.1.patch" patch_type: "conan" patch_description: "Use cmake targets" - "9.1.1": - - patch_file: "patches/0001-use-cmake-targets-9.1.0.patch" - patch_type: "conan" - patch_description: "Use cmake targets" - "9.1.0": - - patch_file: "patches/0001-use-cmake-targets-9.1.0.patch" - patch_type: "conan" - patch_description: "Use cmake targets" - "9.0.1": - - patch_file: "patches/0001-use-cmake-targets-9.0.1.patch" - patch_type: "conan" - patch_description: "Use cmake targets" - "9.0.0": - - patch_file: "patches/0001-use-cmake-targets-9.0.0.patch" - patch_type: "conan" - patch_description: "Use cmake targets" - - patch_file: "patches/0002-cmake-configure-proj-pc.patch" - patch_type: "portability" - patch_description: "cmake configure proj pc" - patch_source: "https://github.com/OSGeo/PROJ/pull/3087" "8.2.1": - patch_file: "patches/0001-use-cmake-targets-8.2.0.patch" patch_type: "conan" diff --git a/recipes/proj/all/conanfile.py b/recipes/proj/all/conanfile.py index cc5091962196d..ffa2b47c51958 100644 --- a/recipes/proj/all/conanfile.py +++ b/recipes/proj/all/conanfile.py @@ -8,7 +8,6 @@ from conan.tools.scm import Version import os - required_conan_version = ">=1.60.0 <2 || >=2.0.5" @@ -16,9 +15,9 @@ class ProjConan(ConanFile): name = "proj" description = "Cartographic Projections and Coordinate Transformations Library." license = "MIT" - topics = "dsp", "proj", "proj4", "projections", "gis", "geospatial" - homepage = "https://proj.org" url = "https://github.com/conan-io/conan-center-index" + homepage = "https://proj.org" + topics = ("dsp", "proj", "proj4", "projections", "gis", "geospatial") package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { @@ -68,6 +67,8 @@ def requirements(self): self.requires("libcurl/[>=7.78.0 <9]") def build_requirements(self): + if Version(self.version) >= "9.4.0": + self.tool_requires("cmake/[>=3.16 <4]") if not self._is_legacy_one_profile: self.tool_requires("sqlite3/") @@ -109,6 +110,7 @@ def generate(self): # Workaround for: https://github.com/conan-io/conan/issues/13560 libdirs_host = [l for dependency in self.dependencies.host.values() for l in dependency.cpp_info.aggregated_components().libdirs] tc.variables["CMAKE_BUILD_RPATH"] = ";".join(libdirs_host) + tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0077"] = "NEW" tc.generate() deps = CMakeDeps(self) @@ -118,19 +120,19 @@ def _patch_sources(self): apply_conandata_patches(self) cmakelists = os.path.join(self.source_folder, "CMakeLists.txt") + replace_in_file(self, cmakelists, "/W4", "") # Fix up usage of SQLite3 finder outputs - rm(self, "FindSqlite3.cmake", os.path.join(self.source_folder, "cmake")) - replace_in_file(self, cmakelists, "SQLITE3_FOUND", "SQLite3_FOUND") - replace_in_file(self, cmakelists, "SQLITE3_VERSION", "SQLite3_VERSION") - replace_in_file(self, cmakelists, "find_package(Sqlite3 REQUIRED)", "find_package(SQLite3 REQUIRED)") + if Version(self.version) < "9.4.0": + rm(self, "FindSqlite3.cmake", os.path.join(self.source_folder, "cmake")) + replace_in_file(self, cmakelists, "SQLITE3_FOUND", "SQLite3_FOUND") + replace_in_file(self, cmakelists, "SQLITE3_VERSION", "SQLite3_VERSION") + replace_in_file(self, cmakelists, "find_package(Sqlite3 REQUIRED)", "find_package(SQLite3 REQUIRED)") # Let CMake install shared lib with a clean rpath ! - if Version(self.version) >= "7.1.0" and Version(self.version) < "9.0.0": - replace_in_file(self, cmakelists, - "set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)", - "") + if "7.1.0" <= Version(self.version) < "9.0.0": + replace_in_file(self, cmakelists, "set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)", "") # Aggressive workaround against SIP on macOS, to handle sqlite3 executable # linked to shared sqlite3 lib @@ -155,6 +157,11 @@ def _patch_sources(self): if Version(self.version) < "8.1.0": rmdir(self, os.path.join(self.source_folder, "include", "proj", "internal", "nlohmann")) + # Remove warning flags that are unfamiliar to GCC 5 + if Version(self.version) >= "9.0" and self.settings.compiler == "gcc" and Version(self.settings.compiler.version) < "8.0": + replace_in_file(self, os.path.join(self.source_folder, "src", "CMakeLists.txt"), "${PROJ_C_WARN_FLAGS}", "") + replace_in_file(self, os.path.join(self.source_folder, "src", "CMakeLists.txt"), "${PROJ_CXX_WARN_FLAGS}", "") + def build(self): self._patch_sources() cmake = CMake(self) @@ -174,7 +181,6 @@ def package(self): rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) - def package_info(self): proj_version = Version(self.version) cmake_config_filename = "proj" if proj_version >= "7.0.0" else "proj4" diff --git a/recipes/proj/all/patches/0001-use-cmake-targets-9.0.0.patch b/recipes/proj/all/patches/0001-use-cmake-targets-9.0.0.patch deleted file mode 100644 index c7cf8eab51037..0000000000000 --- a/recipes/proj/all/patches/0001-use-cmake-targets-9.0.0.patch +++ /dev/null @@ -1,31 +0,0 @@ ---- a/src/lib_proj.cmake -+++ b/src/lib_proj.cmake -@@ -444,8 +444,7 @@ if(USE_THREAD AND Threads_FOUND AND CMAKE_USE_PTHREADS_INIT) - target_link_libraries(proj PRIVATE ${CMAKE_THREAD_LIBS_INIT}) - endif() - --target_include_directories(proj PRIVATE ${SQLITE3_INCLUDE_DIR}) --target_link_libraries(proj PRIVATE ${SQLITE3_LIBRARY}) -+target_link_libraries(proj PRIVATE SQLite::SQLite3) - - if(NLOHMANN_JSON STREQUAL "external") - target_compile_definitions(proj PRIVATE EXTERNAL_NLOHMANN_JSON) -@@ -455,16 +454,14 @@ endif() - - if(TIFF_ENABLED) - target_compile_definitions(proj PRIVATE -DTIFF_ENABLED) -- target_include_directories(proj PRIVATE ${TIFF_INCLUDE_DIR}) -- target_link_libraries(proj PRIVATE ${TIFF_LIBRARY}) -+ target_link_libraries(proj PRIVATE TIFF::TIFF) - endif() - - if(CURL_ENABLED) - target_compile_definitions(proj PRIVATE -DCURL_ENABLED) -- target_include_directories(proj PRIVATE ${CURL_INCLUDE_DIR}) - target_link_libraries(proj - PRIVATE -- ${CURL_LIBRARY} -+ CURL::libcurl - $<$:ws2_32> - $<$:wldap32> - $<$:advapi32> diff --git a/recipes/proj/all/patches/0001-use-cmake-targets-9.0.1.patch b/recipes/proj/all/patches/0001-use-cmake-targets-9.0.1.patch deleted file mode 100644 index 6920410551838..0000000000000 --- a/recipes/proj/all/patches/0001-use-cmake-targets-9.0.1.patch +++ /dev/null @@ -1,31 +0,0 @@ ---- a/src/lib_proj.cmake -+++ b/src/lib_proj.cmake -@@ -444,8 +444,7 @@ if(USE_THREAD AND Threads_FOUND AND CMAKE_USE_PTHREADS_INIT) - target_link_libraries(proj PRIVATE ${CMAKE_THREAD_LIBS_INIT}) - endif() - --target_include_directories(proj PRIVATE ${SQLITE3_INCLUDE_DIR}) --target_link_libraries(proj PRIVATE ${SQLITE3_LIBRARY}) -+target_link_libraries(proj PRIVATE SQLite::SQLite3) - - if(NLOHMANN_JSON STREQUAL "external") - target_compile_definitions(proj PRIVATE EXTERNAL_NLOHMANN_JSON) -@@ -455,16 +454,14 @@ endif() - - if(TIFF_ENABLED) - target_compile_definitions(proj PRIVATE -DTIFF_ENABLED) -- target_include_directories(proj PRIVATE ${TIFF_INCLUDE_DIR}) -- target_link_libraries(proj PRIVATE ${TIFF_LIBRARY}) -+ target_link_libraries(proj PRIVATE TIFF::TIFF) - endif() - - if(CURL_ENABLED) - target_compile_definitions(proj PRIVATE -DCURL_ENABLED) -- target_include_directories(proj PRIVATE ${CURL_INCLUDE_DIRS}) - target_link_libraries(proj - PRIVATE -- ${CURL_LIBRARIES} -+ CURL::libcurl - $<$:ws2_32> - $<$:wldap32> - $<$:advapi32> diff --git a/recipes/proj/all/patches/0001-use-cmake-targets-9.1.0.patch b/recipes/proj/all/patches/0001-use-cmake-targets-9.1.0.patch deleted file mode 100644 index ddd144b4ef122..0000000000000 --- a/recipes/proj/all/patches/0001-use-cmake-targets-9.1.0.patch +++ /dev/null @@ -1,31 +0,0 @@ ---- a/src/lib_proj.cmake -+++ b/src/lib_proj.cmake -@@ -447,8 +447,7 @@ if(USE_THREAD AND Threads_FOUND AND CMAKE_USE_PTHREADS_INIT) - target_link_libraries(proj PRIVATE ${CMAKE_THREAD_LIBS_INIT}) - endif() - --target_include_directories(proj PRIVATE ${SQLITE3_INCLUDE_DIR}) --target_link_libraries(proj PRIVATE ${SQLITE3_LIBRARY}) -+target_link_libraries(proj PRIVATE SQLite::SQLite3) - - if(NLOHMANN_JSON STREQUAL "external") - target_compile_definitions(proj PRIVATE EXTERNAL_NLOHMANN_JSON) -@@ -458,16 +457,14 @@ endif() - - if(TIFF_ENABLED) - target_compile_definitions(proj PRIVATE -DTIFF_ENABLED) -- target_include_directories(proj PRIVATE ${TIFF_INCLUDE_DIR}) -- target_link_libraries(proj PRIVATE ${TIFF_LIBRARY}) -+ target_link_libraries(proj PRIVATE TIFF::TIFF) - endif() - - if(CURL_ENABLED) - target_compile_definitions(proj PRIVATE -DCURL_ENABLED) -- target_include_directories(proj PRIVATE ${CURL_INCLUDE_DIRS}) - target_link_libraries(proj - PRIVATE -- ${CURL_LIBRARIES} -+ CURL::libcurl - $<$:ws2_32> - $<$:wldap32> - $<$:advapi32> diff --git a/recipes/proj/all/patches/0002-cmake-configure-proj-pc.patch b/recipes/proj/all/patches/0002-cmake-configure-proj-pc.patch deleted file mode 100644 index e39909dc403a9..0000000000000 --- a/recipes/proj/all/patches/0002-cmake-configure-proj-pc.patch +++ /dev/null @@ -1,13 +0,0 @@ -fixed by https://github.com/OSGeo/PROJ/pull/3087 - ---- a/cmake/ProjUtilities.cmake -+++ b/cmake/ProjUtilities.cmake -@@ -98,7 +98,7 @@ function(configure_proj_pc) - list(APPEND EXTRA_LIBS -lole32 -lshell32) - else() - set(cxx_libs "${CMAKE_CXX_IMPLICIT_LINK_LIBRARIES}") -- list(REMOVE_ITEM cxx_libs ${CMAKE_C_IMPLICIT_LINK_LIBRARIES}) -+ list(REMOVE_ITEM cxx_libs ${CMAKE_C_IMPLICIT_LINK_LIBRARIES} CMake_3.19_quirk) - foreach(lib IN LISTS cxx_libs) - list(APPEND EXTRA_LIBS "-l${lib}") - endforeach() diff --git a/recipes/proj/all/test_package/CMakeLists.txt b/recipes/proj/all/test_package/CMakeLists.txt index 68d47d66efc39..4fa8bd93600fa 100644 --- a/recipes/proj/all/test_package/CMakeLists.txt +++ b/recipes/proj/all/test_package/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.8) -project(test_package C) +project(test_package LANGUAGES C) add_executable(test_package test_package.c) if(PROJ_VERSION_GE_7) diff --git a/recipes/proj/config.yml b/recipes/proj/config.yml index ab5afce9c830c..d52e34a81ac98 100644 --- a/recipes/proj/config.yml +++ b/recipes/proj/config.yml @@ -1,18 +1,14 @@ versions: + "9.5.0": + folder: "all" + "9.4.1": + folder: "all" "9.3.1": folder: "all" "9.3.0": folder: "all" "9.2.1": folder: "all" - "9.1.1": - folder: "all" - "9.1.0": - folder: "all" - "9.0.1": - folder: "all" - "9.0.0": - folder: "all" "8.2.1": folder: "all" "7.2.1": diff --git a/recipes/prometheus-cpp/all/conandata.yml b/recipes/prometheus-cpp/all/conandata.yml index a1e0c249c424c..f087398f73aad 100644 --- a/recipes/prometheus-cpp/all/conandata.yml +++ b/recipes/prometheus-cpp/all/conandata.yml @@ -1,22 +1,13 @@ sources: + "1.3.0": + url: "https://github.com/jupp0r/prometheus-cpp/archive/v1.3.0.tar.gz" + sha256: "ac6e958405a29fbbea9db70b00fa3c420e16ad32e1baf941ab233ba031dd72ee" + "1.2.4": + url: "https://github.com/jupp0r/prometheus-cpp/archive/v1.2.4.tar.gz" + sha256: "48dbad454d314b836cc667ec4def93ec4a6e4255fc8387c20cacb3b8b6faee30" "1.1.0": url: "https://github.com/jupp0r/prometheus-cpp/archive/v1.1.0.tar.gz" sha256: "397544fe91e183029120b4eebcfab24ed9ec833d15850aae78fd5db19062d13a" "1.0.1": url: "https://github.com/jupp0r/prometheus-cpp/archive/v1.0.1.tar.gz" sha256: "593e028d401d3298eada804d252bc38d8cab3ea1c9e88bcd72095281f85e6d16" - "1.0.0": - url: "https://github.com/jupp0r/prometheus-cpp/archive/v1.0.0.tar.gz" - sha256: "07018db604ea3e61f5078583e87c80932ea10c300d979061490ee1b7dc8e3a41" - "0.12.3": - url: "https://github.com/jupp0r/prometheus-cpp/archive/v0.12.3.tar.gz" - sha256: "e021e76e8e933672f1af0d223307282004f585a054354f8d894db39debddff8e" - "0.12.1": - url: "https://github.com/jupp0r/prometheus-cpp/archive/v0.12.1.tar.gz" - sha256: "2102609457f812dbeaaafd55736461fd0538fc7e7568174b1cdec43399dbded4" - "0.11.0": - url: "https://github.com/jupp0r/prometheus-cpp/archive/v0.11.0.tar.gz" - sha256: "aab4ef8342319f631969e01b8c41e355704847cbe76131cb1dd5ea1862000bda" -patches: - "0.11.0": - - patch_file: "patches/0001-include-limits.patch" diff --git a/recipes/prometheus-cpp/all/conanfile.py b/recipes/prometheus-cpp/all/conanfile.py index 10a8edf3a1e5e..06f45f304071f 100644 --- a/recipes/prometheus-cpp/all/conanfile.py +++ b/recipes/prometheus-cpp/all/conanfile.py @@ -1,14 +1,13 @@ from conan import ConanFile from conan.errors import ConanInvalidConfiguration -from conan.tools.files import apply_conandata_patches, export_conandata_patches, get, copy, rmdir +from conan.tools.files import get, copy, rmdir from conan.tools.build import check_min_cppstd, valid_min_cppstd from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout from conan.tools.scm import Version -from conan.tools.microsoft import is_msvc, check_min_vs import os -required_conan_version = ">=1.53.0" +required_conan_version = ">=2.0" class PrometheusCppConan(ConanFile): name = "prometheus-cpp" @@ -36,18 +35,7 @@ class PrometheusCppConan(ConanFile): @property def _min_cppstd(self): - return 11 if Version(self.version) < "1.1.0" else 14 - - @property - def _compilers_minimum_version(self): - return { - "gcc": "7", - "clang": "7", - "apple-clang": "10", - } - - def export_sources(self): - export_conandata_patches(self) + return "14" if Version(self.version) == "1.1.0" else "11" def config_options(self): if self.settings.os == "Windows": @@ -66,25 +54,16 @@ def requirements(self): if self.options.with_pull: self.requires("civetweb/1.16") if self.options.with_push: - self.requires("libcurl/[>=7.78.0 <9]") + self.requires("libcurl/[>=7.78.0 <9]", transitive_headers=True) if self.options.get_safe("with_compression"): self.requires("zlib/[>=1.2.11 <2]") def validate(self): if self.info.settings.compiler.cppstd: check_min_cppstd(self, self._min_cppstd) - if Version(self.version) < "1.1.0": - return - check_min_vs(self, 191) - if not is_msvc(self): - minimum_version = self._compilers_minimum_version.get(str(self.info.settings.compiler), False) - if minimum_version and Version(self.info.settings.compiler.version) < minimum_version: - raise ConanInvalidConfiguration( - f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." - ) def source(self): - get(self, **self.conan_data["sources"][self.version], destination=self.source_folder, strip_root=True) + get(self, **self.conan_data["sources"][self.version], strip_root=True) def generate(self): tc = CMakeToolchain(self) @@ -102,7 +81,6 @@ def generate(self): deps.generate() def build(self): - apply_conandata_patches(self) cmake = CMake(self) cmake.configure() cmake.build() diff --git a/recipes/prometheus-cpp/all/test_package/CMakeLists.txt b/recipes/prometheus-cpp/all/test_package/CMakeLists.txt index 0df7da5ba0a1f..f9aa39a0fc4fd 100644 --- a/recipes/prometheus-cpp/all/test_package/CMakeLists.txt +++ b/recipes/prometheus-cpp/all/test_package/CMakeLists.txt @@ -5,8 +5,8 @@ find_package(prometheus-cpp CONFIG REQUIRED) add_executable(${PROJECT_NAME} test_package.cpp) target_link_libraries(${PROJECT_NAME} PRIVATE prometheus-cpp::push prometheus-cpp::pull) -if(${prometheus-cpp_VERSION} VERSION_LESS "1.1.0") - target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) -else() +if(${prometheus-cpp_VERSION} VERSION_EQUAL "1.1.0") target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_14) +else() + target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) endif() diff --git a/recipes/prometheus-cpp/config.yml b/recipes/prometheus-cpp/config.yml index 3bfa3902dafa5..50ed34cd33932 100644 --- a/recipes/prometheus-cpp/config.yml +++ b/recipes/prometheus-cpp/config.yml @@ -1,13 +1,9 @@ versions: - "1.1.0": - folder: all - "1.0.1": + "1.3.0": folder: all - "1.0.0": + "1.2.4": folder: all - "0.12.3": - folder: all - "0.12.1": + "1.1.0": folder: all - "0.11.0": + "1.0.1": folder: all diff --git a/recipes/proposal/all/conandata.yml b/recipes/proposal/all/conandata.yml index 413be0b0859fb..6fbf698e7992a 100644 --- a/recipes/proposal/all/conandata.yml +++ b/recipes/proposal/all/conandata.yml @@ -2,51 +2,9 @@ sources: "7.6.2": url: "https://github.com/tudo-astroparticlephysics/PROPOSAL/archive/refs/tags/7.6.2.tar.gz" sha256: "52e91807009b8e610deee485ea57523482cf5626a28f3e42b747dc58d9f505d8" - "7.6.1": - url: "https://github.com/tudo-astroparticlephysics/PROPOSAL/archive/refs/tags/7.6.1.tar.gz" - sha256: "ed1621e1b859179672468330c1a5ac7d84a4c0a5b80d6bf826b22ed6ef6967ca" - "7.6.0": - url: "https://github.com/tudo-astroparticlephysics/PROPOSAL/archive/refs/tags/7.6.0.tar.gz" - sha256: "8c0ddd53ac81c2c4959f2425a9d4bf8e40fba55f03407aefc1d3ac9b3d523a62" "7.5.1": url: "https://github.com/tudo-astroparticlephysics/PROPOSAL/archive/refs/tags/7.5.1.tar.gz" sha256: "2a283bfc335c4b6b01d2acc1eea1a5e4c456bd3dd11e41ef24ca3d955c9655a3" - "7.5.0": - url: "https://github.com/tudo-astroparticlephysics/PROPOSAL/archive/refs/tags/7.5.0.tar.gz" - sha256: "ba31bd0a2337f3717a1ad88a3b3f7fefa3f1e4dae4fc922e72144cfecffe5e94" "7.4.2": url: "https://github.com/tudo-astroparticlephysics/PROPOSAL/archive/refs/tags/7.4.2.tar.gz" sha256: "f0db44c96a80a6ce3dda02c598574f5f0209376bd2c6c176797710da8eb3e108" - "7.4.1": - url: "https://github.com/tudo-astroparticlephysics/PROPOSAL/archive/refs/tags/7.4.1.tar.gz" - sha256: "e6ff9749f402dd77f320a2a28b77a45636cbe186f926d9b5a7b54ea6ee631ada" - "7.4.0": - url: "https://github.com/tudo-astroparticlephysics/PROPOSAL/archive/refs/tags/7.4.0.tar.gz" - sha256: "34865a84052c670fbc4554361acef716655906f65f5bba88e3fd73dff92989de" - "7.3.1": - url: "https://github.com/tudo-astroparticlephysics/PROPOSAL/archive/refs/tags/7.3.1.tar.gz" - sha256: "260426f71226c888832a6da47c55c05dab31b8240dbbc67b4b2466af24d962d3" - "7.3.0": - url: "https://github.com/tudo-astroparticlephysics/PROPOSAL/archive/refs/tags/7.3.0.tar.gz" - sha256: "fa3763fee656164e5f3a7d6a11f08771dd70700adb93de9db4625ad981e0defb" - "7.2.1": - url: "https://github.com/tudo-astroparticlephysics/PROPOSAL/archive/refs/tags/7.2.1.tar.gz" - sha256: "279c1b897c8ae426a493ca77e01c8cfd47e8cd313f3e35ed3ddf098dcccdeeda" - "7.1.1": - url: "https://github.com/tudo-astroparticlephysics/PROPOSAL/archive/refs/tags/7.1.1.tar.gz" - sha256: "090e885d6f241b87a98234571cc1bd2ff935933365717e327602ea37f4d3548a" - "7.1.0": - url: "https://github.com/tudo-astroparticlephysics/PROPOSAL/archive/refs/tags/7.1.0.tar.gz" - sha256: "98faba7cd9d743dae2a8bec70b1c4a382339b9fa40b71fda2936c9d7054d7a85" - "7.0.7": - url: "https://github.com/tudo-astroparticlephysics/PROPOSAL/archive/refs/tags/7.0.7.tar.gz" - sha256: "e366e9280fbe99e68bc5b31a74f51610e27ca8a646dff28e883573893572ab75" - "7.0.5": - url: "https://github.com/tudo-astroparticlephysics/PROPOSAL/archive/refs/tags/7.0.5.tar.gz" - sha256: "232f84e410f439e6bc1b721fc65280906e9f6ad5b39490561870d42a1ee1af17" - "7.0.4": - url: "https://github.com/tudo-astroparticlephysics/PROPOSAL/archive/refs/tags/7.0.4.tar.gz" - sha256: "1442b9f5d8824e7794e97a2eca3f5f109e33c423a37714ada9ad98435b4d4b01" - "7.0.2": - url: "https://github.com/tudo-astroparticlephysics/PROPOSAL/archive/refs/tags/7.0.2.tar.gz" - sha256: "8166ffca150abce77cc4254343bb89d3476e17910e96fa4936b87dafcc72d592" diff --git a/recipes/proposal/all/conanfile.py b/recipes/proposal/all/conanfile.py index 99caccadb2b21..8f555fa886660 100644 --- a/recipes/proposal/all/conanfile.py +++ b/recipes/proposal/all/conanfile.py @@ -61,9 +61,9 @@ def requirements(self): # from implementation in headers (templates) self.requires("cubicinterpolation/0.1.5", transitive_headers=True, transitive_libs=True) # spdlog: requires transitive_libs due to direct calls to functionality from headers - self.requires("spdlog/1.11.0", transitive_headers=True, transitive_libs=True) + self.requires("spdlog/[>=1.11 <2]", transitive_headers=True, transitive_libs=True) # nlohmann_json: public headers include json.hpp and json_fwd.hpp - self.requires("nlohmann_json/3.11.2", transitive_headers=True) + self.requires("nlohmann_json/[~3.11]", transitive_headers=True) if self.options.with_python: self.requires("pybind11/2.10.1") diff --git a/recipes/proposal/config.yml b/recipes/proposal/config.yml index 52f45a4a6325f..eeec1942674b6 100644 --- a/recipes/proposal/config.yml +++ b/recipes/proposal/config.yml @@ -1,35 +1,7 @@ versions: "7.6.2": folder: all - "7.6.1": - folder: all - "7.6.0": - folder: all "7.5.1": folder: all - "7.5.0": - folder: all "7.4.2": folder: all - "7.4.1": - folder: all - "7.4.0": - folder: all - "7.3.1": - folder: all - "7.3.0": - folder: all - "7.2.1": - folder: all - "7.1.1": - folder: all - "7.1.0": - folder: all - "7.0.7": - folder: all - "7.0.5": - folder: all - "7.0.4": - folder: all - "7.0.2": - folder: all diff --git a/recipes/protobuf/all/conandata.yml b/recipes/protobuf/all/conandata.yml index 0417c4d805f42..c03c8334c3fff 100644 --- a/recipes/protobuf/all/conandata.yml +++ b/recipes/protobuf/all/conandata.yml @@ -1,62 +1,99 @@ sources: + "5.27.0": + url: "https://github.com/protocolbuffers/protobuf/archive/refs/tags/v5.27.0.tar.gz" + sha256: "1611a03e550c27c526bde1da544c94f7aa65c10687bbc8e570537dfa94069e1a" + "4.25.3": + url: "https://github.com/protocolbuffers/protobuf/archive/refs/tags/v4.25.3.tar.gz" + sha256: "1d6b8d9114cb5b33ce8711729893097a107d4fefff5423528eb1decb5451856c" "3.21.12": url: "https://github.com/protocolbuffers/protobuf/archive/refs/tags/v3.21.12.tar.gz" sha256: "930c2c3b5ecc6c9c12615cf5ad93f1cd6e12d0aba862b572e076259970ac3a53" - "3.21.9": - url: "https://github.com/protocolbuffers/protobuf/archive/refs/tags/v3.21.9.tar.gz" - sha256: "1add10f9bd92775b91f326da259f243881e904dd509367d5031d4c782ba82810" "3.20.3": url: "https://github.com/protocolbuffers/protobuf/archive/v3.20.3.tar.gz" sha256: "9c0fd39c7a08dff543c643f0f4baf081988129a411b977a07c46221793605638" - "3.20.0": - url: "https://github.com/protocolbuffers/protobuf/archive/v3.20.0.tar.gz" - sha256: "b07772d38ab07e55eca4d50f4b53da2d998bb221575c60a4f81100242d4b4889" - "3.19.6": - url: "https://github.com/protocolbuffers/protobuf/archive/v3.19.6.tar.gz" - sha256: "9a301cf94a8ddcb380b901e7aac852780b826595075577bb967004050c835056" - "3.18.3": - url: "https://github.com/protocolbuffers/protobuf/archive/v3.18.3.tar.gz" - sha256: "663b3a6d56605e6ab7888d32a1525c34f34639b25b8996337821591e60c37041" - "3.17.1": - url: "https://github.com/protocolbuffers/protobuf/archive/refs/tags/v3.17.1.tar.gz" - sha256: "036d66d6eec216160dd898cfb162e9d82c1904627642667cc32b104d407bb411" patches: "3.21.12": - patch_file: "patches/protobuf-3.21.12-upstream-macos-macros.patch" patch_description: "Handle case where macOS SDK macros may conflict with protobuf message types" patch_type: "bugfix" patch_source: "https://github.com/protocolbuffers/protobuf/pull/10103" - "3.21.9": - - patch_file: "patches/protobuf-3.21.9-upstream-macos-macros.patch" - patch_description: "Handle case where macOS SDK macros may conflict with protobuf message types" - patch_type: "bugfix" - patch_source: "https://github.com/protocolbuffers/protobuf/pull/10103" "3.20.3": - patch_file: "patches/protobuf-3.20.0-upstream-macos-macros.patch" patch_description: "Handle case where macOS SDK macros may conflict with protobuf message types" patch_type: "bugfix" patch_source: "https://github.com/protocolbuffers/protobuf/pull/10103" - "3.20.0": - - patch_file: "patches/protobuf-3.20.0-upstream-macos-macros.patch" - patch_description: "Handle case where macOS SDK macros may conflict with protobuf message types" - patch_type: "bugfix" - patch_source: "https://github.com/protocolbuffers/protobuf/pull/10103" - "3.19.6": - - patch_file: "patches/upstream-pr-9437-msvc-runtime.patch" - patch_description: "Properly handle CMAKE_MSVC_RUNTIME_LIBRARY when using CMake >= 3.15" - patch_type: "portability" - patch_source: "https://github.com/protocolbuffers/protobuf/pull/9437" - - patch_file: "patches/protobuf-3.19.6-upstream-macos-macros.patch" - patch_description: "Handle case where macOS SDK macros may conflict with protobuf message types" - patch_type: "bugfix" - patch_source: "https://github.com/protocolbuffers/protobuf/pull/10103" - "3.18.3": - - patch_file: "patches/protobuf-3.18.1-upstream-macos-macros.patch" - patch_description: "Handle case where macOS SDK macros may conflict with protobuf message types" - patch_type: "bugfix" - patch_source: "https://github.com/protocolbuffers/protobuf/pull/10103" - "3.17.1": - - patch_file: "patches/protobuf-3.17.1-upstream-macos-macros.patch" - patch_description: "Handle case where macOS SDK macros may conflict with protobuf message types" - patch_type: "bugfix" - patch_source: "https://github.com/protocolbuffers/protobuf/pull/10103" +absl_deps: + "5.27.0": + - absl_absl_check + - absl_absl_log + - absl_algorithm + - absl_base + - absl_bind_front + - absl_bits + - absl_btree + - absl_cleanup + - absl_cord + - absl_core_headers + - absl_debugging + - absl_die_if_null + - absl_dynamic_annotations + - absl_flags + - absl_flat_hash_map + - absl_flat_hash_set + - absl_function_ref + - absl_hash + - absl_if_constexpr + - absl_layout + - absl_log_initialize + - absl_log_globals + - absl_log_severity + - absl_memory + - absl_node_hash_map + - absl_node_hash_set + - absl_optional + - absl_random_distributions + - absl_random_random + - absl_span + - absl_status + - absl_statusor + - absl_strings + - absl_synchronization + - absl_time + - absl_type_traits + - absl_utility + - absl_variant + "4.25.3": + - absl_absl_check + - absl_absl_log + - absl_algorithm + - absl_base + - absl_bind_front + - absl_bits + - absl_btree + - absl_cleanup + - absl_cord + - absl_core_headers + - absl_debugging + - absl_die_if_null + - absl_dynamic_annotations + - absl_flags + - absl_flat_hash_map + - absl_flat_hash_set + - absl_function_ref + - absl_hash + - absl_layout + - absl_log_initialize + - absl_log_severity + - absl_memory + - absl_node_hash_map + - absl_node_hash_set + - absl_optional + - absl_span + - absl_status + - absl_statusor + - absl_strings + - absl_synchronization + - absl_time + - absl_type_traits + - absl_utility + - absl_variant diff --git a/recipes/protobuf/all/conanfile.py b/recipes/protobuf/all/conanfile.py index f696a27880684..d36546a97d0f6 100644 --- a/recipes/protobuf/all/conanfile.py +++ b/recipes/protobuf/all/conanfile.py @@ -1,13 +1,13 @@ from conan import ConanFile from conan.errors import ConanInvalidConfiguration from conan.tools.apple import is_apple_os +from conan.tools.build import check_min_cppstd from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout -from conan.tools.files import copy, rename, get, apply_conandata_patches, export_conandata_patches, replace_in_file, rmdir, rm +from conan.tools.files import copy, rename, get, apply_conandata_patches, export_conandata_patches, replace_in_file, rmdir, rm, save from conan.tools.microsoft import check_min_vs, msvc_runtime_flag, is_msvc, is_msvc_static_runtime from conan.tools.scm import Version import os -import textwrap required_conan_version = ">=1.53" @@ -27,6 +27,7 @@ class ProtobufConan(ConanFile): "with_zlib": [True, False], "with_rtti": [True, False], "lite": [True, False], + "upb": [True, False], "debug_suffix": [True, False], } default_options = { @@ -35,6 +36,7 @@ class ProtobufConan(ConanFile): "with_zlib": True, "with_rtti": True, "lite": False, + "upb": False, "debug_suffix": True, } @@ -47,9 +49,15 @@ def _is_clang_cl(self): @property def _is_clang_x86(self): return self.settings.compiler == "clang" and self.settings.arch == "x86" + + @property + def _protobuf_release(self): + current_ver = Version(self.version) + return Version(f"{current_ver.minor}.{current_ver.patch}") def export_sources(self): export_conandata_patches(self) + copy(self, "protobuf-conan-protoc-target.cmake", self.recipe_folder, os.path.join(self.export_sources_folder, "src")) def config_options(self): if self.settings.os == "Windows": @@ -59,6 +67,9 @@ def configure(self): if self.options.shared: self.options.rm_safe("fPIC") + if self._protobuf_release < "27.0": + self.options.rm_safe("upb") + def layout(self): cmake_layout(self, src_folder="src") @@ -66,10 +77,39 @@ def requirements(self): if self.options.with_zlib: self.requires("zlib/[>=1.2.11 <2]") + if self._protobuf_release >= "22.0": + self.requires("abseil/20240116.2", transitive_headers=True) + + @property + def _compilers_minimum_version(self): + return { + "gcc": "6", + "clang": "5", + "apple-clang": "10", + "Visual Studio": "15", + "msvc": "191", + } + def validate(self): if self.options.shared and is_msvc_static_runtime(self): raise ConanInvalidConfiguration("Protobuf can't be built with shared + MT(d) runtimes") - + + if is_msvc(self) and self._protobuf_release >= "22" and self.options.shared and \ + not self.dependencies["abseil"].options.shared: + raise ConanInvalidConfiguration("When building protobuf as a shared library on Windows, " + "abseil needs to be a shared library too") + + if self._protobuf_release >= "22.0": + if self.settings.compiler.get_safe("cppstd"): + check_min_cppstd(self, 14) + else: + minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), None) + compiler_version = Version(self.settings.compiler.version) + if minimum_version and compiler_version < minimum_version: + raise ConanInvalidConfiguration( + f"{self.ref} requires C++14, which your compiler does not support.", + ) + check_min_vs(self, "190") if self.settings.compiler == "clang": @@ -93,6 +133,11 @@ def generate(self): tc.cache_variables["protobuf_DEBUG_POSTFIX"] = "" tc.cache_variables["protobuf_BUILD_LIBPROTOC"] = self.settings.os != "tvOS" tc.cache_variables["protobuf_DISABLE_RTTI"] = not self.options.with_rtti + tc.cache_variables["protobuf_BUILD_LIBUPB"] = self.options.get_safe("upb") + if self._protobuf_release >= "22.0": + tc.cache_variables["protobuf_ABSL_PROVIDER"] = "package" + if not self.settings.compiler.get_safe("cppstd") and self._protobuf_release >= "22.0": + tc.variables["CMAKE_CXX_STANDARD"] = 14 if is_msvc(self) or self._is_clang_cl: runtime = msvc_runtime_flag(self) if not runtime: @@ -101,6 +146,19 @@ def generate(self): if is_apple_os(self) and self.options.shared: # Workaround against SIP on macOS for consumers while invoking protoc when protobuf lib is shared tc.variables["CMAKE_INSTALL_RPATH"] = "@loader_path/../lib" + + if self.settings.os == "Linux": + # Use RPATH instead of RUNPATH to help with specific case + # in the grpc recipe when grpc_cpp_plugin is run with protoc + # in the same build. RPATH ensures that the rpath in the binary + # is respected for transitive dependencies too + project_include = os.path.join(self.generators_folder, "protobuf_project_include.cmake") + save(self, project_include, "add_link_options(-Wl,--disable-new-dtags)") + tc.variables["CMAKE_PROJECT_INCLUDE"] = project_include + # Note: conan2 only could be: + # tc.extra_exelinkflags.append("-Wl,--disable-new-dtags") + # tc.extra_sharedlinkflags.append("-Wl,--disable-new-dtags") + tc.generate() deps = CMakeDeps(self) @@ -109,53 +167,14 @@ def generate(self): def _patch_sources(self): apply_conandata_patches(self) - # Provide relocatable protobuf::protoc target and Protobuf_PROTOC_EXECUTABLE cache variable - # TODO: some of the following logic might be disabled when conan will - # allow to create executable imported targets in package_info() - protobuf_config_cmake = os.path.join(self.source_folder, "cmake", "protobuf-config.cmake.in") - - replace_in_file(self, - protobuf_config_cmake, - "@_protobuf_FIND_ZLIB@", - "# BEGIN CONAN PATCH\n#_protobuf_FIND_ZLIB@\n# END CONAN PATCH" - ) - - exe_ext = ".exe" if self.settings.os == "Windows" else "" - protoc_filename = "protoc" + exe_ext - module_folder_depth = len(os.path.normpath(self._cmake_install_base_path).split(os.path.sep)) - protoc_rel_path = "{}bin/{}".format("".join(["../"] * module_folder_depth), protoc_filename) - protoc_target = textwrap.dedent(f"""\ - if(NOT TARGET protobuf::protoc) - # Locate protoc executable - ## Workaround for legacy "cmake" generator in case of cross-build - if(CMAKE_CROSSCOMPILING) - find_program(PROTOC_PROGRAM NAMES protoc PATHS ENV PATH NO_DEFAULT_PATH) - endif() - ## And here this will work fine with "CMakeToolchain" (for native & cross-build) - ## and legacy "cmake" generator in case of native build - if(NOT PROTOC_PROGRAM) - find_program(PROTOC_PROGRAM NAMES protoc) - endif() - ## Last resort: we search in package folder directly - if(NOT PROTOC_PROGRAM) - set(PROTOC_PROGRAM \"${{CMAKE_CURRENT_LIST_DIR}}/{protoc_rel_path}\") - endif() - get_filename_component(PROTOC_PROGRAM \"${{PROTOC_PROGRAM}}\" ABSOLUTE) - - # Give opportunity to users to provide an external protoc executable - # (this is a feature of official FindProtobuf.cmake) - set(Protobuf_PROTOC_EXECUTABLE ${{PROTOC_PROGRAM}} CACHE FILEPATH \"The protoc compiler\") - - # Create executable imported target protobuf::protoc - add_executable(protobuf::protoc IMPORTED) - set_property(TARGET protobuf::protoc PROPERTY IMPORTED_LOCATION ${{Protobuf_PROTOC_EXECUTABLE}}) - endif() - """) - replace_in_file(self, - protobuf_config_cmake, - "include(\"${CMAKE_CURRENT_LIST_DIR}/protobuf-targets.cmake\")", - protoc_target - ) + if self._protobuf_release < "22.0": + # In older versions of protobuf, this file defines the `protobuf_generate` function + protobuf_config_cmake = os.path.join(self.source_folder, "cmake", "protobuf-config.cmake.in") + replace_in_file(self, protobuf_config_cmake, "@_protobuf_FIND_ZLIB@", "") + replace_in_file(self, protobuf_config_cmake, + "include(\"${CMAKE_CURRENT_LIST_DIR}/protobuf-targets.cmake\")", + "" + ) # Disable a potential warning in protobuf-module.cmake.in # TODO: remove this patch? Is it really useful? @@ -171,13 +190,6 @@ def _patch_sources(self): "endif()", ) - # https://github.com/protocolbuffers/protobuf/issues/9916 - # it will be solved in protobuf 3.21.0 - if Version(self.version) == "3.20.0": - replace_in_file(self, os.path.join(self.source_folder, "src", "google", "protobuf", "port_def.inc"), - "#elif PROTOBUF_GNUC_MIN(12, 0)", - "#elif PROTOBUF_GNUC_MIN(12, 2)") - def build(self): self._patch_sources() cmake = CMake(self) @@ -190,11 +202,15 @@ def package(self): cmake = CMake(self) cmake.install() rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) - os.unlink(os.path.join(self.package_folder, self._cmake_install_base_path, "protobuf-config-version.cmake")) - os.unlink(os.path.join(self.package_folder, self._cmake_install_base_path, "protobuf-targets.cmake")) - os.unlink(os.path.join(self.package_folder, self._cmake_install_base_path, "protobuf-targets-{}.cmake".format(str(self.settings.build_type).lower()))) - rename(self, os.path.join(self.package_folder, self._cmake_install_base_path, "protobuf-config.cmake"), - os.path.join(self.package_folder, self._cmake_install_base_path, "protobuf-generate.cmake")) + rmdir(self, os.path.join(self.package_folder, "lib", "cmake", "utf8_range")) + if self._protobuf_release < "22.0": + rename(self, os.path.join(self.package_folder, self._cmake_install_base_path, "protobuf-config.cmake"), + os.path.join(self.package_folder, self._cmake_install_base_path, "protobuf-generate.cmake")) + + cmake_config_folder = os.path.join(self.package_folder, self._cmake_install_base_path) + rm(self, "protobuf-config*.cmake", folder=cmake_config_folder) + rm(self, "protobuf-targets*.cmake", folder=cmake_config_folder) + copy(self, "protobuf-conan-protoc-target.cmake", src=self.source_folder, dst=cmake_config_folder) if not self.options.lite: rm(self, "libprotobuf-lite*", os.path.join(self.package_folder, "lib")) @@ -210,12 +226,32 @@ def package_info(self): os.path.join(self._cmake_install_base_path, "protobuf-generate.cmake"), os.path.join(self._cmake_install_base_path, "protobuf-module.cmake"), os.path.join(self._cmake_install_base_path, "protobuf-options.cmake"), + os.path.join(self._cmake_install_base_path, "protobuf-conan-protoc-target.cmake"), ] self.cpp_info.set_property("cmake_build_modules", build_modules) lib_prefix = "lib" if (is_msvc(self) or self._is_clang_cl) else "" lib_suffix = "d" if self.settings.build_type == "Debug" and self.options.debug_suffix else "" + if self._protobuf_release >= "22.0": + absl_deps = [f"abseil::{c}" for c in self.conan_data["absl_deps"][self.version]] + + if self._protobuf_release >= "22.0" and (not self.options.shared or self.options.get_safe("upb")): + # utf8 libraries + # it's a private dependency and unconditionally built as a static library, should only + # be exposed when protobuf itself is static (or if upb is being built) + self.cpp_info.components["utf8_range"].set_property("cmake_target_name", "utf8_range::utf8_range") + self.cpp_info.components["utf8_range"].libs = ["utf8_range"] + self.cpp_info.components["utf8_validity"].set_property("cmake_target_name", "utf8_range::utf8_validity") + self.cpp_info.components["utf8_validity"].libs = ["utf8_validity"] + self.cpp_info.components["utf8_validity"].requires = ["abseil::absl_strings"] + + if self.options.get_safe("upb"): + # upb libraries: note that these are unconditionally static + self.cpp_info.components["upb"].set_property("cmake_target_name", "protobuf::libupb") + self.cpp_info.components["upb"].libs = [lib_prefix + "upb" + lib_suffix] + self.cpp_info.components["upb"].requires = ["utf8_range"] + # libprotobuf self.cpp_info.components["libprotobuf"].set_property("cmake_target_name", "protobuf::libprotobuf") self.cpp_info.components["libprotobuf"].set_property("pkg_config_name", "protobuf") @@ -223,6 +259,11 @@ def package_info(self): self.cpp_info.components["libprotobuf"].libs = [lib_prefix + "protobuf" + lib_suffix] if self.options.with_zlib: self.cpp_info.components["libprotobuf"].requires = ["zlib::zlib"] + if self._protobuf_release >= "22.0": + self.cpp_info.components["libprotobuf"].requires.extend(absl_deps) + if not self.options.shared: + self.cpp_info.components["libprotobuf"].requires.extend(["utf8_validity"]) + if self.settings.os in ["Linux", "FreeBSD"]: self.cpp_info.components["libprotobuf"].system_libs.extend(["m", "pthread"]) if self._is_clang_x86 or "arm" in str(self.settings.arch): @@ -238,6 +279,8 @@ def package_info(self): self.cpp_info.components["libprotoc"].set_property("cmake_target_name", "protobuf::libprotoc") self.cpp_info.components["libprotoc"].libs = [lib_prefix + "protoc" + lib_suffix] self.cpp_info.components["libprotoc"].requires = ["libprotobuf"] + if self._protobuf_release >= "22.0": + self.cpp_info.components["libprotoc"].requires.extend(absl_deps) # libprotobuf-lite if self.options.lite: @@ -254,6 +297,8 @@ def package_info(self): self.cpp_info.components["libprotobuf-lite"].defines = ["PROTOBUF_USE_DLLS"] if self.settings.os == "Android": self.cpp_info.components["libprotobuf-lite"].system_libs.append("log") + if self._protobuf_release >= "22.0": + self.cpp_info.components["libprotobuf-lite"].requires.extend(absl_deps) # TODO: to remove in conan v2 once cmake_find_package* & pkg_config generators removed self.cpp_info.filenames["cmake_find_package"] = "Protobuf" diff --git a/recipes/protobuf/all/patches/protobuf-3.17.1-upstream-macos-macros.patch b/recipes/protobuf/all/patches/protobuf-3.17.1-upstream-macos-macros.patch deleted file mode 100644 index d8f8f14a25361..0000000000000 --- a/recipes/protobuf/all/patches/protobuf-3.17.1-upstream-macos-macros.patch +++ /dev/null @@ -1,46 +0,0 @@ -diff --git a/src/google/protobuf/port_def.inc b/src/google/protobuf/port_def.inc -index 61f0859..d673519 100644 ---- a/src/google/protobuf/port_def.inc -+++ b/src/google/protobuf/port_def.inc -@@ -616,6 +616,22 @@ - #undef timezone - #endif // _MSC_VER - -+#ifdef __APPLE__ -+// Inconvenient macro names from usr/include/math.h in some macOS SDKs. -+#pragma push_macro("DOMAIN") -+#undef DOMAIN -+// Inconvenient macro names from /usr/include/mach/boolean.h in some macOS SDKs. -+#pragma push_macro("TRUE") -+#undef TRUE -+#pragma push_macro("FALSE") -+#undef FALSE -+// Inconvenient macro names from usr/include/sys/syslimits.h in some macOS SDKs. -+#pragma push_macro("UID_MAX") -+#undef UID_MAX -+#pragma push_macro("GID_MAX") -+#undef GID_MAX -+#endif // __APPLE__ -+ - #if defined(__clang__) || PROTOBUF_GNUC_MIN(3, 0) || defined(_MSC_VER) - // Don't let Objective-C Macros interfere with proto identifiers with the same - // name. -diff --git a/src/google/protobuf/port_undef.inc b/src/google/protobuf/port_undef.inc -index 82fe794..dfbbf5b 100644 ---- a/src/google/protobuf/port_undef.inc -+++ b/src/google/protobuf/port_undef.inc -@@ -112,6 +112,14 @@ - #pragma pop_macro("timezone") - #endif - -+#ifdef __APPLE__ -+#pragma pop_macro("DOMAIN") -+#pragma pop_macro("TRUE") -+#pragma pop_macro("FALSE") -+#pragma pop_macro("UID_MAX") -+#pragma pop_macro("GID_MAX") -+#endif // __APPLE__ -+ - #if defined(__clang__) || defined(__GNUC__) || defined(_MSC_VER) - #pragma pop_macro("DEBUG") - #endif // defined(__clang__) || defined(__GNUC__) || defined(_MSC_VER) diff --git a/recipes/protobuf/all/patches/protobuf-3.18.1-upstream-macos-macros.patch b/recipes/protobuf/all/patches/protobuf-3.18.1-upstream-macos-macros.patch deleted file mode 100644 index 4825966e01d9d..0000000000000 --- a/recipes/protobuf/all/patches/protobuf-3.18.1-upstream-macos-macros.patch +++ /dev/null @@ -1,46 +0,0 @@ -diff --git a/src/google/protobuf/port_def.inc b/src/google/protobuf/port_def.inc -index 01384c8..8f8a44d 100644 ---- a/src/google/protobuf/port_def.inc -+++ b/src/google/protobuf/port_def.inc -@@ -736,6 +736,22 @@ - #undef timezone - #endif // _MSC_VER - -+#ifdef __APPLE__ -+// Inconvenient macro names from usr/include/math.h in some macOS SDKs. -+#pragma push_macro("DOMAIN") -+#undef DOMAIN -+// Inconvenient macro names from /usr/include/mach/boolean.h in some macOS SDKs. -+#pragma push_macro("TRUE") -+#undef TRUE -+#pragma push_macro("FALSE") -+#undef FALSE -+// Inconvenient macro names from usr/include/sys/syslimits.h in some macOS SDKs. -+#pragma push_macro("UID_MAX") -+#undef UID_MAX -+#pragma push_macro("GID_MAX") -+#undef GID_MAX -+#endif // __APPLE__ -+ - #if defined(__clang__) || PROTOBUF_GNUC_MIN(3, 0) || defined(_MSC_VER) - // Don't let Objective-C Macros interfere with proto identifiers with the same - // name. -diff --git a/src/google/protobuf/port_undef.inc b/src/google/protobuf/port_undef.inc -index 5fef6e4..9efd5d6 100644 ---- a/src/google/protobuf/port_undef.inc -+++ b/src/google/protobuf/port_undef.inc -@@ -128,6 +128,14 @@ - #pragma pop_macro("timezone") - #endif - -+#ifdef __APPLE__ -+#pragma pop_macro("DOMAIN") -+#pragma pop_macro("TRUE") -+#pragma pop_macro("FALSE") -+#pragma pop_macro("UID_MAX") -+#pragma pop_macro("GID_MAX") -+#endif // __APPLE__ -+ - #if defined(__clang__) || defined(__GNUC__) || defined(_MSC_VER) - #pragma pop_macro("DEBUG") - #endif // defined(__clang__) || defined(__GNUC__) || defined(_MSC_VER) diff --git a/recipes/protobuf/all/patches/protobuf-3.19.6-upstream-macos-macros.patch b/recipes/protobuf/all/patches/protobuf-3.19.6-upstream-macos-macros.patch deleted file mode 100644 index 5aadd2a257043..0000000000000 --- a/recipes/protobuf/all/patches/protobuf-3.19.6-upstream-macos-macros.patch +++ /dev/null @@ -1,46 +0,0 @@ -diff --git a/src/google/protobuf/port_def.inc b/src/google/protobuf/port_def.inc -index 30af1cf..4ddf5dc 100644 ---- a/src/google/protobuf/port_def.inc -+++ b/src/google/protobuf/port_def.inc -@@ -763,6 +763,22 @@ - #undef timezone - #endif // _MSC_VER - -+#ifdef __APPLE__ -+// Inconvenient macro names from usr/include/math.h in some macOS SDKs. -+#pragma push_macro("DOMAIN") -+#undef DOMAIN -+// Inconvenient macro names from /usr/include/mach/boolean.h in some macOS SDKs. -+#pragma push_macro("TRUE") -+#undef TRUE -+#pragma push_macro("FALSE") -+#undef FALSE -+// Inconvenient macro names from usr/include/sys/syslimits.h in some macOS SDKs. -+#pragma push_macro("UID_MAX") -+#undef UID_MAX -+#pragma push_macro("GID_MAX") -+#undef GID_MAX -+#endif // __APPLE__ -+ - #if defined(__clang__) || PROTOBUF_GNUC_MIN(3, 0) || defined(_MSC_VER) - // Don't let Objective-C Macros interfere with proto identifiers with the same - // name. -diff --git a/src/google/protobuf/port_undef.inc b/src/google/protobuf/port_undef.inc -index 579eb41..7a179f9 100644 ---- a/src/google/protobuf/port_undef.inc -+++ b/src/google/protobuf/port_undef.inc -@@ -129,6 +129,14 @@ - #pragma pop_macro("timezone") - #endif - -+#ifdef __APPLE__ -+#pragma pop_macro("DOMAIN") -+#pragma pop_macro("TRUE") -+#pragma pop_macro("FALSE") -+#pragma pop_macro("UID_MAX") -+#pragma pop_macro("GID_MAX") -+#endif // __APPLE__ -+ - #if defined(__clang__) || defined(__GNUC__) || defined(_MSC_VER) - #pragma pop_macro("DEBUG") - #endif // defined(__clang__) || defined(__GNUC__) || defined(_MSC_VER) diff --git a/recipes/protobuf/all/patches/protobuf-3.21.9-upstream-macos-macros.patch b/recipes/protobuf/all/patches/protobuf-3.21.9-upstream-macos-macros.patch deleted file mode 100644 index 3a152f62bca69..0000000000000 --- a/recipes/protobuf/all/patches/protobuf-3.21.9-upstream-macos-macros.patch +++ /dev/null @@ -1,25 +0,0 @@ -diff --git a/src/google/protobuf/port_def.inc b/src/google/protobuf/port_def.inc -index f00daf7..d956db2 100644 ---- a/src/google/protobuf/port_def.inc -+++ b/src/google/protobuf/port_def.inc -@@ -870,6 +870,8 @@ - // Inconvenient macro names from usr/include/sys/syslimits.h in some macOS SDKs. - #pragma push_macro("UID_MAX") - #undef UID_MAX -+#pragma push_macro("GID_MAX") -+#undef GID_MAX - #endif // __APPLE__ - - #if defined(__clang__) || PROTOBUF_GNUC_MIN(3, 0) || defined(_MSC_VER) -diff --git a/src/google/protobuf/port_undef.inc b/src/google/protobuf/port_undef.inc -index e880fa5..f8968d9 100644 ---- a/src/google/protobuf/port_undef.inc -+++ b/src/google/protobuf/port_undef.inc -@@ -144,6 +144,7 @@ - #pragma pop_macro("TRUE") - #pragma pop_macro("FALSE") - #pragma pop_macro("UID_MAX") -+#pragma pop_macro("GID_MAX") - #endif // __APPLE__ - - #if defined(__clang__) || defined(__GNUC__) || defined(_MSC_VER) diff --git a/recipes/protobuf/all/patches/upstream-pr-9437-msvc-runtime.patch b/recipes/protobuf/all/patches/upstream-pr-9437-msvc-runtime.patch deleted file mode 100644 index 06cb0a97681d1..0000000000000 --- a/recipes/protobuf/all/patches/upstream-pr-9437-msvc-runtime.patch +++ /dev/null @@ -1,17 +0,0 @@ -Fix from Protobuf PR: https://github.com/protocolbuffers/protobuf/pull/9437 - ---- a/cmake/CMakeLists.txt -+++ b/cmake/CMakeLists.txt -@@ -182,7 +182,11 @@ else (protobuf_BUILD_SHARED_LIBS) - # making programmatic control difficult. Prefer the functionality in newer - # CMake versions when available. - if(CMAKE_VERSION VERSION_GREATER 3.15 OR CMAKE_VERSION VERSION_EQUAL 3.15) -- set(CMAKE_MSVC_RUNTIME_LIBRARY MultiThreaded$<$:Debug>) -+ if (protobuf_MSVC_STATIC_RUNTIME) -+ set(CMAKE_MSVC_RUNTIME_LIBRARY MultiThreaded$<$:Debug>) -+ else() -+ set(CMAKE_MSVC_RUNTIME_LIBRARY MultiThreaded$<$:Debug>DLL) -+ endif() - else() - # In case we are building static libraries, link also the runtime library statically - # so that MSVCR*.DLL is not required at runtime. diff --git a/recipes/protobuf/all/protobuf-conan-protoc-target.cmake b/recipes/protobuf/all/protobuf-conan-protoc-target.cmake new file mode 100644 index 0000000000000..6165d8f1b731b --- /dev/null +++ b/recipes/protobuf/all/protobuf-conan-protoc-target.cmake @@ -0,0 +1,25 @@ +if(NOT TARGET protobuf::protoc) + # Locate protoc executable + ## Workaround for legacy "cmake" generator in case of cross-build + if(CMAKE_CROSSCOMPILING) + find_program(PROTOC_PROGRAM NAMES protoc PATHS ENV PATH NO_DEFAULT_PATH) + endif() + ## And here this will work fine with "CMakeToolchain" (for native & cross-build) + ## and legacy "cmake" generator in case of native build + if(NOT PROTOC_PROGRAM) + find_program(PROTOC_PROGRAM NAMES protoc) + endif() + ## Last resort: we search in package folder directly + if(NOT PROTOC_PROGRAM) + set(PROTOC_PROGRAM "${CMAKE_CURRENT_LIST_DIR}/../../../bin/protoc${CMAKE_EXECUTABLE_SUFFIX}") + endif() + get_filename_component(PROTOC_PROGRAM "${PROTOC_PROGRAM}" ABSOLUTE) + + # Give opportunity to users to provide an external protoc executable + # (this is a feature of official FindProtobuf.cmake) + set(Protobuf_PROTOC_EXECUTABLE ${PROTOC_PROGRAM} CACHE FILEPATH "The protoc compiler") + + # Create executable imported target protobuf::protoc + add_executable(protobuf::protoc IMPORTED) + set_property(TARGET protobuf::protoc PROPERTY IMPORTED_LOCATION ${Protobuf_PROTOC_EXECUTABLE}) +endif() diff --git a/recipes/protobuf/all/test_package/CMakeLists.txt b/recipes/protobuf/all/test_package/CMakeLists.txt index a5240f3215abb..b19277151deaf 100644 --- a/recipes/protobuf/all/test_package/CMakeLists.txt +++ b/recipes/protobuf/all/test_package/CMakeLists.txt @@ -4,8 +4,12 @@ project(test_package LANGUAGES CXX) find_package(protobuf CONFIG REQUIRED) -add_executable(${PROJECT_NAME} test_package.cpp addressbook.proto) -target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) +add_executable(${PROJECT_NAME} test_package.cpp) +if(CONAN_TEST_USE_CXXSTD_14) + target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_14) +else() + target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) +endif() target_include_directories(${PROJECT_NAME} PRIVATE "${CMAKE_CURRENT_BINARY_DIR}") if (protobuf_LITE) target_link_libraries(${PROJECT_NAME} PRIVATE protobuf::libprotobuf-lite) @@ -17,5 +21,10 @@ if(TARGET protobuf::libprotoc) target_link_libraries(${PROJECT_NAME} PRIVATE protobuf::libprotoc) endif() -protobuf_generate_cpp(PROTO_SRCS PROTO_HDRS TARGET ${PROJECT_NAME}) -protobuf_generate(LANGUAGE cpp TARGET ${PROJECT_NAME} PROTOS addressbook.proto) +if(NOT TARGET protobuf::protoc) + message(FATAL_ERROR "protoc executable should have been defined as part of find_package(protobuf)") +endif() + +if(NOT COMMAND protobuf_generate) + message(FATAL_ERROR "protobuf_generate should have been defined as part of find_package(protobuf)") +endif() diff --git a/recipes/protobuf/all/test_package/conanfile.py b/recipes/protobuf/all/test_package/conanfile.py index 81404c86104a8..880d1f9d7d72e 100644 --- a/recipes/protobuf/all/test_package/conanfile.py +++ b/recipes/protobuf/all/test_package/conanfile.py @@ -1,6 +1,7 @@ from conan import ConanFile from conan.tools.build import can_run from conan.tools.cmake import cmake_layout, CMake, CMakeToolchain +from conan.tools.scm import Version import os @@ -13,14 +14,14 @@ def layout(self): cmake_layout(self) def requirements(self): - self.requires(self.tested_reference_str) - - def build_requirements(self): - self.tool_requires(self.tested_reference_str) + # note `run=True` so that the runenv can find protoc + self.requires(self.tested_reference_str, run=True) def generate(self): tc = CMakeToolchain(self) tc.cache_variables["protobuf_LITE"] = self.dependencies[self.tested_reference_str].options.lite + protobuf_version = Version(self.dependencies[self.tested_reference_str].ref.version) + tc.cache_variables["CONAN_TEST_USE_CXXSTD_14"] = protobuf_version >= "3.22" tc.generate() def build(self): @@ -32,3 +33,8 @@ def test(self): if can_run(self): bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") self.run(bin_path, env="conanrun") + + # Invoke protoc in the same way CMake would + self.run(f"protoc --proto_path={self.source_folder} --cpp_out={self.build_folder} {self.source_folder}/addressbook.proto", env="conanrun") + assert os.path.exists(os.path.join(self.build_folder,"addressbook.pb.cc")) + assert os.path.exists(os.path.join(self.build_folder,"addressbook.pb.h")) diff --git a/recipes/protobuf/all/test_package/test_package.cpp b/recipes/protobuf/all/test_package/test_package.cpp index aee0c47205eed..61cb2bc104cd7 100644 --- a/recipes/protobuf/all/test_package/test_package.cpp +++ b/recipes/protobuf/all/test_package/test_package.cpp @@ -1,17 +1,15 @@ #include #include -#include "addressbook.pb.h" +#include +#include int main() { - std::cout << "Bincrafters\n"; + google::protobuf::Timestamp ts; + google::protobuf::util::TimeUtil::FromString("1972-01-01T10:00:20.021Z", &ts); + const auto nanoseconds = ts.nanos(); - tutorial::Person p; - p.set_id(21); - p.set_name("conan-center-index"); - p.set_email("info@conan.io"); - - std::cout << p.SerializeAsString() << "\n"; + std::cout << "1972-01-01T10:00:20.021Z in nanoseconds: " << nanoseconds << "\n"; return EXIT_SUCCESS; } diff --git a/recipes/protobuf/all/test_v1_package/CMakeLists.txt b/recipes/protobuf/all/test_v1_package/CMakeLists.txt deleted file mode 100644 index f16bc97992e86..0000000000000 --- a/recipes/protobuf/all/test_v1_package/CMakeLists.txt +++ /dev/null @@ -1,8 +0,0 @@ -cmake_minimum_required(VERSION 3.8) -project(test_v1_package LANGUAGES CXX) - -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) - -add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ - ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/protobuf/all/test_v1_package/conanfile.py b/recipes/protobuf/all/test_v1_package/conanfile.py deleted file mode 100644 index f31e33d3b0ff4..0000000000000 --- a/recipes/protobuf/all/test_v1_package/conanfile.py +++ /dev/null @@ -1,27 +0,0 @@ -from conans import ConanFile, CMake, tools -import os - - -class TestPackageConan(ConanFile): - settings = "os", "arch", "compiler", "build_type" - generators = "cmake", "cmake_find_package_multi" - test_type = "explicit" - - def requirements(self): - self.requires(self.tested_reference_str) - - def build_requirements(self): - if hasattr(self, "settings_build"): - self.build_requires(self.tested_reference_str) - - def build(self): - with tools.no_op() if hasattr(self, "settings_build") else tools.run_environment(self): - cmake = CMake(self) - cmake.definitions["protobuf_LITE"] = self.options["protobuf"].lite - cmake.configure() - cmake.build() - - def test(self): - if not tools.cross_building(self): - self.run("protoc --version", run_environment=True) - self.run(os.path.join("bin", "test_package"), run_environment=True) diff --git a/recipes/protobuf/config.yml b/recipes/protobuf/config.yml index 89750d93410cc..cb567195f025d 100644 --- a/recipes/protobuf/config.yml +++ b/recipes/protobuf/config.yml @@ -1,15 +1,9 @@ versions: - "3.21.12": - folder: all - "3.21.9": - folder: all - "3.20.3": + "5.27.0": folder: all - "3.20.0": + "4.25.3": folder: all - "3.19.6": - folder: all - "3.18.3": + "3.21.12": folder: all - "3.17.1": + "3.20.3": folder: all diff --git a/recipes/proxy/all/conandata.yml b/recipes/proxy/all/conandata.yml index ac500679c65c7..cb63d289fe25b 100644 --- a/recipes/proxy/all/conandata.yml +++ b/recipes/proxy/all/conandata.yml @@ -1,4 +1,16 @@ sources: + "3.0.0": + url: "https://github.com/microsoft/proxy/archive/refs/tags/3.0.0.tar.gz" + sha256: "7e073e217e5572bc4c17ed5893273c80ea34c87e1406c853beeb9ca9bdda9733" + "2.4.0": + url: "https://github.com/microsoft/proxy/archive/refs/tags/2.4.0.tar.gz" + sha256: "7eed973655938d681a90dcc0c200e6cc1330ea8611a9c1a9e1b30439514443cb" + "2.3.2": + url: "https://github.com/microsoft/proxy/archive/refs/tags/2.3.2.tar.gz" + sha256: "d592f70b82a452dc9834ac3a953039d4b0136eefc023503d37879aba5ced369f" + "2.3.1": + url: "https://github.com/microsoft/proxy/archive/refs/tags/2.3.1.tar.gz" + sha256: "bfec45ada9cd3dc576df34bbe877c5d03a81906a00759970c0197c3fa041c5c7" "2.3.0": url: "https://github.com/microsoft/proxy/archive/refs/tags/2.3.0.tar.gz" sha256: "ff6f17c5360895776d29ce2b1235de7b42912468b52729810506431e352a78d0" diff --git a/recipes/proxy/all/test_package/CMakeLists.txt b/recipes/proxy/all/test_package/CMakeLists.txt index 7ca64396c7e13..6ed6216423b01 100644 --- a/recipes/proxy/all/test_package/CMakeLists.txt +++ b/recipes/proxy/all/test_package/CMakeLists.txt @@ -6,3 +6,6 @@ find_package(proxy REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) target_link_libraries(${PROJECT_NAME} PRIVATE msft_proxy) target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_20) +if(proxy_VERSION VERSION_GREATER_EQUAL "3.0.0") + target_compile_definitions(${PROJECT_NAME} PRIVATE PROXY_VERSION_3_LATER) +endif() diff --git a/recipes/proxy/all/test_package/test_package.cpp b/recipes/proxy/all/test_package/test_package.cpp index 09afe4defb583..4700fd6cd057e 100644 --- a/recipes/proxy/all/test_package/test_package.cpp +++ b/recipes/proxy/all/test_package/test_package.cpp @@ -26,6 +26,29 @@ #include #include +#ifdef PROXY_VERSION_3_LATER + +PRO_DEF_MEM_DISPATCH(MemAt, at); + +struct Dictionary : pro::facade_builder + ::add_convention + ::build {}; + +// This is a function, rather than a function template +void demo_print(pro::proxy dictionary) { + std::cout << dictionary->at(1) << "\n"; +} + +int main() { + static std::map container1{{1, "hello"}}; + auto container2 = std::make_shared>(); + container2->push_back("hello"); + container2->push_back("world"); + demo_print(&container1); // Prints: "hello" + demo_print(container2); // Prints: "world" +} + +#else namespace poly { @@ -45,3 +68,4 @@ int main() { demo_print(&container2); // print: world\n return 0; } +#endif diff --git a/recipes/proxy/config.yml b/recipes/proxy/config.yml index d65710bdd4972..fd53bc176b690 100644 --- a/recipes/proxy/config.yml +++ b/recipes/proxy/config.yml @@ -1,4 +1,12 @@ versions: + "3.0.0": + folder: all + "2.4.0": + folder: all + "2.3.2": + folder: all + "2.3.1": + folder: all "2.3.0": folder: all "2.2.1": diff --git a/recipes/pulseaudio/all/conanfile.py b/recipes/pulseaudio/all/conanfile.py index d4ada3ef9ee78..002d47cbedf08 100644 --- a/recipes/pulseaudio/all/conanfile.py +++ b/recipes/pulseaudio/all/conanfile.py @@ -1,3 +1,5 @@ +import os + from conan import ConanFile from conan.errors import ConanInvalidConfiguration from conan.tools.build import cross_building @@ -5,7 +7,6 @@ from conan.tools.files import copy, get, rm, rmdir from conan.tools.gnu import Autotools, AutotoolsDeps, AutotoolsToolchain, PkgConfigDeps from conan.tools.layout import basic_layout -import os required_conan_version = ">=1.53.0" @@ -111,6 +112,10 @@ def generate(self): "--with-udev-rules-dir=${prefix}/bin/udev/rules.d", f"--with-systemduserunitdir={os.path.join(self.build_folder, 'ignore')}", ]) + # Workaround for https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=268250 + # clang-15 works, but we need to skip the gnu11 flag check + if self.settings.compiler == "clang" and self.settings.compiler.version == 15: + tc.configure_args.append("ax_cv_check_cflags__pedantic__Werror__std_gnu11=yes") for lib in ["alsa", "x11", "openssl", "dbus"]: tc.configure_args.append(f"--enable-{lib}={yes_no(getattr(self.options, f'with_{lib}'))}") # TODO: to remove when automatically handled by AutotoolsToolchain diff --git a/recipes/pybind11/all/conandata.yml b/recipes/pybind11/all/conandata.yml index ad2c426df1a16..5901aae7c96f6 100644 --- a/recipes/pybind11/all/conandata.yml +++ b/recipes/pybind11/all/conandata.yml @@ -1,28 +1,43 @@ sources: - "2.7.1": - url: "https://github.com/pybind/pybind11/archive/v2.7.1.tar.gz" - sha256: "616d1c42e4cf14fa27b2a4ff759d7d7b33006fdc5ad8fd603bb2c22622f27020" - "2.8.1": - url: "https://github.com/pybind/pybind11/archive/v2.8.1.tar.gz" - sha256: "f1bcc07caa568eb312411dde5308b1e250bd0e1bc020fae855bf9f43209940cc" - "2.9.1": - url: "https://github.com/pybind/pybind11/archive/v2.9.1.tar.gz" - sha256: "c6160321dc98e6e1184cc791fbeadd2907bb4a0ce0e447f2ea4ff8ab56550913" - "2.9.2": - url: "https://github.com/pybind/pybind11/archive/v2.9.2.tar.gz" - sha256: "6bd528c4dbe2276635dc787b6b1f2e5316cf6b49ee3e150264e455a0d68d19c1" - "2.10.0": - url: "https://github.com/pybind/pybind11/archive/v2.10.0.tar.gz" - sha256: "eacf582fa8f696227988d08cfc46121770823839fe9e301a20fbce67e7cd70ec" - "2.10.1": - url: "https://github.com/pybind/pybind11/archive/v2.10.1.tar.gz" - sha256: "111014b516b625083bef701df7880f78c2243835abdb263065b6b59b960b6bad" - "2.10.4": - url: "https://github.com/pybind/pybind11/archive/v2.10.4.tar.gz" - sha256: "832e2f309c57da9c1e6d4542dedd34b24e4192ecb4d62f6f4866a737454c9970" - "2.11.1": - url: "https://github.com/pybind/pybind11/archive/v2.11.1.tar.gz" - sha256: "d475978da0cdc2d43b73f30910786759d593a9d8ee05b1b6846d1eb16c6d2e0c" + "2.13.6": + url: "https://github.com/pybind/pybind11/archive/v2.13.6.tar.gz" + sha256: "e08cb87f4773da97fa7b5f035de8763abc656d87d5773e62f6da0587d1f0ec20" + "2.13.5": + url: "https://github.com/pybind/pybind11/archive/v2.13.5.tar.gz" + sha256: "b1e209c42b3a9ed74da3e0b25a4f4cd478d89d5efbb48f04b277df427faf6252" + "2.13.4": + url: "https://github.com/pybind/pybind11/archive/v2.13.4.tar.gz" + sha256: "efc901aa0aab439a3fea6efeaf930b5a349fb06394bf845c64ce15a9cf8f0240" + "2.13.2": + url: "https://github.com/pybind/pybind11/archive/v2.13.2.tar.gz" + sha256: "50eebef369d28f07ce1fe1797f38149e5928817be8e539239f2aadfd95b227f3" + "2.13.1": + url: "https://github.com/pybind/pybind11/archive/v2.13.1.tar.gz" + sha256: "51631e88960a8856f9c497027f55c9f2f9115cafb08c0005439838a05ba17bfc" "2.12.0": url: "https://github.com/pybind/pybind11/archive/v2.12.0.tar.gz" sha256: "bf8f242abd1abcd375d516a7067490fb71abd79519a282d22b6e4d19282185a7" + "2.11.1": + url: "https://github.com/pybind/pybind11/archive/v2.11.1.tar.gz" + sha256: "d475978da0cdc2d43b73f30910786759d593a9d8ee05b1b6846d1eb16c6d2e0c" + "2.10.4": + url: "https://github.com/pybind/pybind11/archive/v2.10.4.tar.gz" + sha256: "832e2f309c57da9c1e6d4542dedd34b24e4192ecb4d62f6f4866a737454c9970" + "2.10.1": + url: "https://github.com/pybind/pybind11/archive/v2.10.1.tar.gz" + sha256: "111014b516b625083bef701df7880f78c2243835abdb263065b6b59b960b6bad" + "2.10.0": + url: "https://github.com/pybind/pybind11/archive/v2.10.0.tar.gz" + sha256: "eacf582fa8f696227988d08cfc46121770823839fe9e301a20fbce67e7cd70ec" + "2.9.2": + url: "https://github.com/pybind/pybind11/archive/v2.9.2.tar.gz" + sha256: "6bd528c4dbe2276635dc787b6b1f2e5316cf6b49ee3e150264e455a0d68d19c1" + "2.9.1": + url: "https://github.com/pybind/pybind11/archive/v2.9.1.tar.gz" + sha256: "c6160321dc98e6e1184cc791fbeadd2907bb4a0ce0e447f2ea4ff8ab56550913" + "2.8.1": + url: "https://github.com/pybind/pybind11/archive/v2.8.1.tar.gz" + sha256: "f1bcc07caa568eb312411dde5308b1e250bd0e1bc020fae855bf9f43209940cc" + "2.7.1": + url: "https://github.com/pybind/pybind11/archive/v2.7.1.tar.gz" + sha256: "616d1c42e4cf14fa27b2a4ff759d7d7b33006fdc5ad8fd603bb2c22622f27020" diff --git a/recipes/pybind11/all/conanfile.py b/recipes/pybind11/all/conanfile.py index aa098ee90ec20..8dc874bff4b37 100644 --- a/recipes/pybind11/all/conanfile.py +++ b/recipes/pybind11/all/conanfile.py @@ -12,18 +12,22 @@ class PyBind11Conan(ConanFile): name = "pybind11" description = "Seamless operability between C++11 and Python" - topics = "pybind11", "python", "binding" - homepage = "https://github.com/pybind/pybind11" license = "BSD-3-Clause" url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/pybind/pybind11" + topics = ("pybind11", "python", "binding", "header-only") + package_type = "header-library" settings = "os", "arch", "compiler", "build_type" no_copy_source = True def layout(self): basic_layout(self, src_folder="src") + def package_id(self): + self.info.clear() + def source(self): - get(self, **self.conan_data["sources"][self.version], destination=self.source_folder, strip_root=True) + get(self, **self.conan_data["sources"][self.version], strip_root=True) def generate(self): tc = CMakeToolchain(self) @@ -54,9 +58,6 @@ def package(self): "add_library(", "# add_library(") - def package_id(self): - self.info.clear() - def package_info(self): cmake_base_path = os.path.join("lib", "cmake", "pybind11") self.cpp_info.set_property("cmake_target_name", "pybind11_all_do_not_use") diff --git a/recipes/pybind11/all/test_package/CMakeLists.txt b/recipes/pybind11/all/test_package/CMakeLists.txt index e8d17d781285f..a0ddd8851c031 100644 --- a/recipes/pybind11/all/test_package/CMakeLists.txt +++ b/recipes/pybind11/all/test_package/CMakeLists.txt @@ -1,5 +1,7 @@ cmake_minimum_required(VERSION 3.15) -project(test_package CXX) +project(test_package LANGUAGES CXX) + find_package(pybind11 REQUIRED CONFIG) + pybind11_add_module(test_package MODULE test_package.cpp) set_property(TARGET test_package PROPERTY CXX_STANDARD 11) diff --git a/recipes/pybind11/config.yml b/recipes/pybind11/config.yml index adf07a18a08dd..cb2960aa24b66 100644 --- a/recipes/pybind11/config.yml +++ b/recipes/pybind11/config.yml @@ -1,19 +1,29 @@ versions: - "2.7.1": + "2.13.6": folder: all - "2.8.1": + "2.13.5": folder: all - "2.9.1": + "2.13.4": folder: all - "2.9.2": + "2.13.2": folder: all - "2.10.0": + "2.13.1": folder: all - "2.10.1": + "2.12.0": + folder: all + "2.11.1": folder: all "2.10.4": folder: all - "2.11.1": + "2.10.1": folder: all - "2.12.0": + "2.10.0": + folder: all + "2.9.2": + folder: all + "2.9.1": + folder: all + "2.8.1": + folder: all + "2.7.1": folder: all diff --git a/recipes/qarchive/all/conanfile.py b/recipes/qarchive/all/conanfile.py index 320e0e4349c52..e44b758e45244 100644 --- a/recipes/qarchive/all/conanfile.py +++ b/recipes/qarchive/all/conanfile.py @@ -48,8 +48,8 @@ def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - self.requires("libarchive/3.6.2") - self.requires("qt/5.15.10", transitive_headers=True, transitive_libs=True) + self.requires("libarchive/3.7.4") + self.requires("qt/[~5.15]", transitive_headers=True, transitive_libs=True) def build_requirements(self): self.tool_requires("cmake/[>=3.17 <4]") diff --git a/recipes/qcbor/all/conandata.yml b/recipes/qcbor/all/conandata.yml index 5b5b4f359cdd2..073ab369d8103 100644 --- a/recipes/qcbor/all/conandata.yml +++ b/recipes/qcbor/all/conandata.yml @@ -1,4 +1,13 @@ sources: + "1.5": + url: "https://github.com/laurencelundblade/QCBOR/archive/refs/tags/v1.5.tar.gz" + sha256: "fd71c2aa985575ea5e7df1540da54261f04af872fe4c4e76bfe56affc14dcd2a" + "1.4.1": + url: "https://github.com/laurencelundblade/QCBOR/archive/refs/tags/v1.4.1.tar.gz" + sha256: "c7ef031b60b23bf8ede47c66c9713982bba2608668b144280a65665bfcc94470" + "1.3": + url: "https://github.com/laurencelundblade/QCBOR/archive/refs/tags/v1.3.tar.gz" + sha256: "5acd3f3e7b19aad074813736a8776e71859d57c4dec9bfb85cd1dc6c219c8033" "1.2": url: "https://github.com/laurencelundblade/QCBOR/archive/refs/tags/v1.2.tar.gz" sha256: "0f706ad90ada600bd1ddbdf8dc6f2f5910e11de355bb4454b9b4123f0e4ff525" @@ -9,6 +18,18 @@ sources: url: "https://github.com/laurencelundblade/QCBOR/archive/refs/tags/v1.0.tar.gz" sha256: "961a46eb5a599cc040bfce4f4fade4427e046f1748f37ba4ebbc097fb9cdf1d3" patches: + "1.5": + - patch_file: "patches/1.5-0001-fix-cmake.patch" + patch_description: "disable fix fPIC and add installation" + patch_type: "conan" + "1.4.1": + - patch_file: "patches/1.4.1-0001-fix-cmake.patch" + patch_description: "disable fix fPIC and add installation" + patch_type: "conan" + "1.3": + - patch_file: "patches/1.2-0001-fix-cmake.patch" + patch_description: "disable fix fPIC and add installation" + patch_type: "conan" "1.2": - patch_file: "patches/1.2-0001-fix-cmake.patch" patch_description: "disable fix fPIC and add installation" diff --git a/recipes/qcbor/all/conanfile.py b/recipes/qcbor/all/conanfile.py index 7d87de4445169..68b5a4f311351 100644 --- a/recipes/qcbor/all/conanfile.py +++ b/recipes/qcbor/all/conanfile.py @@ -1,5 +1,5 @@ from conan import ConanFile -from conan.tools.files import apply_conandata_patches, export_conandata_patches, get, rmdir, load, save +from conan.tools.files import apply_conandata_patches, export_conandata_patches, get, rmdir, load, save, copy from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout from conan.tools.scm import Version @@ -15,6 +15,7 @@ class QCBORConan(ConanFile): url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/laurencelundblade/QCBOR" topics = ("serialization", "cbor", "rfc-7049", "rfc-8949") + package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], @@ -38,20 +39,23 @@ def config_options(self): del self.options.disable_float def configure(self): - if self.options.shared: + if self.settings.os == "Windows": + self.package_type = "static-library" + del self.options.shared + if self.options.get_safe("shared"): self.options.rm_safe("fPIC") self.settings.rm_safe("compiler.libcxx") self.settings.rm_safe("compiler.cppstd") - def layout(self): cmake_layout(self, src_folder="src") def source(self): - get(self, **self.conan_data["sources"][self.version], destination=self.source_folder, strip_root=True) + get(self, **self.conan_data["sources"][self.version], strip_root=True) def generate(self): tc = CMakeToolchain(self) + tc.variables["BUILD_QCBOR_TEST"] = False if Version(self.version) >= "1.2": tc.variables["QCBOR_OPT_DISABLE_FLOAT_HW_USE"] = self.options.disable_float in ["HW_USE", "PREFERRED", "ALL"] tc.variables["QCBOR_OPT_DISABLE_FLOAT_PREFERRED"] = self.options.disable_float in ["PREFERRED", "ALL"] @@ -70,10 +74,13 @@ def package(self): cmake.install() rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) - # Extract the License/s from README.md to a file - tmp = load(self, os.path.join(self.source_folder, "inc", "qcbor", "qcbor.h")) - license_contents = re.search("( Copyright.*) =====", tmp, re.DOTALL)[1] - save(self, os.path.join(self.package_folder, "licenses", "LICENSE"), license_contents) + if Version(self.version) >= "1.5": + copy(self, "LICENSE", self.source_folder, os.path.join(self.package_folder, "licenses")) + else: + # Extract the License/s from README.md to a file + tmp = load(self, os.path.join(self.source_folder, "inc", "qcbor", "qcbor.h")) + license_contents = re.search("( Copyright.*) =====", tmp, re.DOTALL)[1] + save(self, os.path.join(self.package_folder, "licenses", "LICENSE"), license_contents) def package_info(self): self.cpp_info.libs = ["qcbor"] diff --git a/recipes/qcbor/all/patches/1.0-0001-fix-cmake.patch b/recipes/qcbor/all/patches/1.0-0001-fix-cmake.patch index d5f6fcb7e4dba..87fc6cae3601f 100644 --- a/recipes/qcbor/all/patches/1.0-0001-fix-cmake.patch +++ b/recipes/qcbor/all/patches/1.0-0001-fix-cmake.patch @@ -2,14 +2,10 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt index 8a5bcd0..744662e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -17,3 +17,18 @@ set(SOURCE +@@ -17,3 +17,14 @@ set(SOURCE ) add_library(qcbor ${SOURCE}) -+set_target_properties(qcbor PROPERTIES -+ WINDOWS_EXPORT_ALL_SYMBOLS ON -+) -+ +find_library(LIBM m) +target_link_libraries(qcbor PRIVATE $<$:${LIBM}>) + diff --git a/recipes/qcbor/all/patches/1.1-0001-fix-cmake.patch b/recipes/qcbor/all/patches/1.1-0001-fix-cmake.patch index e5969488c2420..ca95e01302dce 100644 --- a/recipes/qcbor/all/patches/1.1-0001-fix-cmake.patch +++ b/recipes/qcbor/all/patches/1.1-0001-fix-cmake.patch @@ -2,15 +2,10 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt index f0b67b9..4b00b8b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -17,3 +17,19 @@ set(SOURCE +@@ -17,3 +17,14 @@ set(SOURCE add_library(qcbor ${SOURCE}) target_include_directories(qcbor PUBLIC inc) -+ -+set_target_properties(qcbor PROPERTIES -+ WINDOWS_EXPORT_ALL_SYMBOLS ON -+) -+ +find_library(LIBM m) +target_link_libraries(qcbor PRIVATE $<$:${LIBM}>) + diff --git a/recipes/qcbor/all/patches/1.2-0001-fix-cmake.patch b/recipes/qcbor/all/patches/1.2-0001-fix-cmake.patch index 8b659e24ca0a3..f50844b0bec9a 100644 --- a/recipes/qcbor/all/patches/1.2-0001-fix-cmake.patch +++ b/recipes/qcbor/all/patches/1.2-0001-fix-cmake.patch @@ -2,7 +2,7 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt index 486946c..4234a59 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -58,10 +58,14 @@ target_compile_definitions(qcbor +@@ -58,10 +58,10 @@ target_compile_definitions(qcbor $<$:USEFULBUF_DISABLE_ALL_FLOAT> ) @@ -11,14 +11,10 @@ index 486946c..4234a59 100644 target_compile_options(qcbor PRIVATE -Os -fPIC) endif() -+set_target_properties(qcbor PROPERTIES -+ WINDOWS_EXPORT_ALL_SYMBOLS ON -+) -+ # The math library is needed for floating-point support. # To avoid need for it #define QCBOR_DISABLE_FLOAT_HW_USE if (CMAKE_C_COMPILER_ID STREQUAL "GNU") -@@ -75,3 +79,12 @@ endif() +@@ -75,3 +75,12 @@ endif() if (NOT BUILD_QCBOR_TEST STREQUAL "OFF") add_subdirectory(test) endif() diff --git a/recipes/qcbor/all/patches/1.4.1-0001-fix-cmake.patch b/recipes/qcbor/all/patches/1.4.1-0001-fix-cmake.patch new file mode 100644 index 0000000000000..81b3950d82ca7 --- /dev/null +++ b/recipes/qcbor/all/patches/1.4.1-0001-fix-cmake.patch @@ -0,0 +1,26 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index e4aa83f..4878a31 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -58,10 +58,10 @@ target_compile_definitions(qcbor + $<$:USEFULBUF_DISABLE_ALL_FLOAT> + ) + +-if (BUILD_SHARED_LIBS) ++if (0) + target_compile_options(qcbor PRIVATE -Os -fPIC) + endif() + + # The math library is needed for floating-point support. + # To avoid need for it #define QCBOR_DISABLE_FLOAT_HW_USE + if (CMAKE_C_COMPILER_ID STREQUAL "GNU") +@@ -88,6 +88,9 @@ set_target_properties( + include(GNUInstallDirs) + install( + TARGETS qcbor ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} ++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + PUBLIC_HEADER DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/qcbor" + ) + diff --git a/recipes/qcbor/all/patches/1.5-0001-fix-cmake.patch b/recipes/qcbor/all/patches/1.5-0001-fix-cmake.patch new file mode 100644 index 0000000000000..e9e96ba504660 --- /dev/null +++ b/recipes/qcbor/all/patches/1.5-0001-fix-cmake.patch @@ -0,0 +1,23 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 1c7e081..6f4ea4e 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -58,7 +58,7 @@ target_compile_definitions(qcbor + $<$:USEFULBUF_DISABLE_ALL_FLOAT> + ) + +-if (BUILD_SHARED_LIBS) ++if (0) + target_compile_options(qcbor PRIVATE -Os -fPIC) + endif() + +@@ -90,6 +90,9 @@ set_target_properties( + include(GNUInstallDirs) + install( + TARGETS qcbor ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} ++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + PUBLIC_HEADER DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/qcbor" + ) + diff --git a/recipes/qcbor/all/test_v1_package/CMakeLists.txt b/recipes/qcbor/all/test_v1_package/CMakeLists.txt deleted file mode 100644 index 46fc5f986a893..0000000000000 --- a/recipes/qcbor/all/test_v1_package/CMakeLists.txt +++ /dev/null @@ -1,8 +0,0 @@ -cmake_minimum_required(VERSION 3.1) -project(test_packages) - -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) - -add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ - ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/qcbor/all/test_v1_package/conanfile.py b/recipes/qcbor/all/test_v1_package/conanfile.py deleted file mode 100644 index 20d4d2e28d57e..0000000000000 --- a/recipes/qcbor/all/test_v1_package/conanfile.py +++ /dev/null @@ -1,17 +0,0 @@ -from conans import ConanFile, CMake -from conan.tools.build import cross_building -import os - -class TestPackageV1Conan(ConanFile): - settings = "os", "arch", "compiler", "build_type" - generators = "cmake", "cmake_find_package_multi" - - def build(self): - cmake = CMake(self) - cmake.configure() - cmake.build() - - def test(self): - if not cross_building(self): - bin_path = os.path.join("bin", "test_package") - self.run(bin_path, run_environment=True) diff --git a/recipes/qcbor/config.yml b/recipes/qcbor/config.yml index db25e2b16686a..9feea3cfb2036 100644 --- a/recipes/qcbor/config.yml +++ b/recipes/qcbor/config.yml @@ -1,4 +1,10 @@ versions: + "1.5": + folder: all + "1.4.1": + folder: all + "1.3": + folder: all "1.2": folder: all "1.1": diff --git a/recipes/qoi/all/conandata.yml b/recipes/qoi/all/conandata.yml new file mode 100644 index 0000000000000..85f3317442208 --- /dev/null +++ b/recipes/qoi/all/conandata.yml @@ -0,0 +1,5 @@ +sources: + # Newer versions at the top + "0.0.0.cci.20240906": + url: "https://github.com/phoboslab/qoi/archive/019020993ce33bdf56c876004e8b27139a0d011f.zip" + sha256: "b4785ed15a5a9d1084cc1ad72829e7bb16b9a7b597ac8aa8160f2788748614f3" diff --git a/recipes/qoi/all/conanfile.py b/recipes/qoi/all/conanfile.py new file mode 100644 index 0000000000000..8eb9a1ee17305 --- /dev/null +++ b/recipes/qoi/all/conanfile.py @@ -0,0 +1,46 @@ +from conan import ConanFile +from conan.tools.files import copy, get +from conan.tools.layout import basic_layout +import os + + +required_conan_version = ">=1.52.0" + + +class QoiConan(ConanFile): + name = "qoi" + description = "The “Quite OK Image Format†for fast, lossless image compression" + license = "MIT" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://qoiformat.org/" + topics = ("image", "compression", "header-only") + package_type = "header-library" + settings = "os", "arch", "compiler", "build_type" + no_copy_source = True + + def layout(self): + basic_layout(self, src_folder="src") + + # same package ID for any package + def package_id(self): + self.info.clear() + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def build(self): + pass + + def package(self): + copy(self, "LICENSE", self.source_folder, os.path.join(self.package_folder, "licenses")) + copy( + self, + "*.h", + self.source_folder, + os.path.join(self.package_folder, "include"), + ) + + def package_info(self): + # Folders not used for header-only + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] diff --git a/recipes/qoi/all/test_package/CMakeLists.txt b/recipes/qoi/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..f16d6221266fc --- /dev/null +++ b/recipes/qoi/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES C) # if the project is pure C + +find_package(qoi REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.c) +# don't link to ${CONAN_LIBS} or CONAN_PKG::package +target_link_libraries(${PROJECT_NAME} PRIVATE qoi::qoi) diff --git a/recipes/qoi/all/test_package/conanfile.py b/recipes/qoi/all/test_package/conanfile.py new file mode 100644 index 0000000000000..0a808db45f245 --- /dev/null +++ b/recipes/qoi/all/test_package/conanfile.py @@ -0,0 +1,27 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake +import os + + +# It will become the standard on Conan 2.x +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def layout(self): + cmake_layout(self) + + def requirements(self): + self.requires(self.tested_reference_str) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/qoi/all/test_package/test_package.c b/recipes/qoi/all/test_package/test_package.c new file mode 100644 index 0000000000000..aca3fa09d9bc1 --- /dev/null +++ b/recipes/qoi/all/test_package/test_package.c @@ -0,0 +1,10 @@ +#include + +#define QOI_IMPLEMENTATION +#include "qoi.h" + +int main(void) { + printf("qoi_desc size: %d\n", sizeof(qoi_desc)); + + return EXIT_SUCCESS; +} diff --git a/recipes/qoi/config.yml b/recipes/qoi/config.yml new file mode 100644 index 0000000000000..97d1baf6d5919 --- /dev/null +++ b/recipes/qoi/config.yml @@ -0,0 +1,4 @@ +versions: + # Newer versions at the top + "0.0.0.cci.20240906": + folder: all diff --git a/recipes/qr-code-generator/all/CMakeLists.txt b/recipes/qr-code-generator/all/CMakeLists.txt index 60ddaa9f6b380..7629857f9b79e 100644 --- a/recipes/qr-code-generator/all/CMakeLists.txt +++ b/recipes/qr-code-generator/all/CMakeLists.txt @@ -1,9 +1,16 @@ cmake_minimum_required(VERSION 3.15) project(QR-Code-Generator) -include(src/files.cmake) -add_library(${LIBRARY_NAME} ${SRC}) +set(SRC_C ${CMAKE_SOURCE_DIR}/src/c/qrcodegen.c) +set(LIBRARY_NAME_C qrcodegenc) +set(HEADERS_C ${CMAKE_SOURCE_DIR}/src/c/qrcodegen.h) + +add_library(${LIBRARY_NAME_C} ${SRC_C}) +set_target_properties(${LIBRARY_NAME_C} PROPERTIES PUBLIC_HEADER "${HEADERS_C}") +install(TARGETS ${LIBRARY_NAME_C} RUNTIME LIBRARY ARCHIVE PUBLIC_HEADER DESTINATION include/qrcodegenc) +include(src/files.cmake) +add_library(${LIBRARY_NAME} ${SRC}) set_target_properties(${LIBRARY_NAME} PROPERTIES PUBLIC_HEADER "${HEADERS}") install(TARGETS ${LIBRARY_NAME} RUNTIME LIBRARY ARCHIVE PUBLIC_HEADER DESTINATION include/qrcodegen) diff --git a/recipes/qr-code-generator/all/conanfile.py b/recipes/qr-code-generator/all/conanfile.py index 84430d69ae1d0..656603b7ba557 100644 --- a/recipes/qr-code-generator/all/conanfile.py +++ b/recipes/qr-code-generator/all/conanfile.py @@ -101,8 +101,9 @@ def package(self): cmake.install() def package_info(self): - self.cpp_info.libs = [ - "qrcodegen" if Version(self.version) < "1.7.0" else "qrcodegencpp" - ] + self.cpp_info.components["qrcodegencpp"].set_property("cmake_target_name", "qr-code-generator::qrcodegencpp") + self.cpp_info.components["qrcodegencpp"].libs = ["qrcodegen" if Version(self.version) < "1.7.0" else "qrcodegencpp"] + self.cpp_info.components["qrcodegenc"].set_property("cmake_target_name", "qr-code-generator::qrcodegenc") + self.cpp_info.components["qrcodegenc"].libs = ["qrcodegenc"] if self.settings.os in ["Linux", "FreeBSD"]: self.cpp_info.system_libs.append("m") diff --git a/recipes/qt/5.x.x/conandata.yml b/recipes/qt/5.x.x/conandata.yml index a8c2e2c8e2a71..16b0489abd752 100644 --- a/recipes/qt/5.x.x/conandata.yml +++ b/recipes/qt/5.x.x/conandata.yml @@ -1,100 +1,29 @@ sources: - "5.15.13": + "5.15.14": url: - - "https://download.qt.io/official_releases/qt/5.15/5.15.13/single/qt-everywhere-opensource-src-5.15.13.tar.xz" - - "https://download.qt.io/archive/qt/5.15/5.15.13/single/qt-everywhere-opensource-src-5.15.13.tar.xz" - - "https://mirrors.cloud.tencent.com/qt/archive/qt/5.15/5.15.13/single/qt-everywhere-opensource-src-5.15.13.tar.xz" - sha256: "9550ec8fc758d3d8d9090e261329700ddcd712e2dda97e5fcfeabfac22bea2ca" - "5.15.12": - url: - - "https://download.qt.io/official_releases/qt/5.15/5.15.12/single/qt-everywhere-opensource-src-5.15.12.tar.xz" - - "https://download.qt.io/archive/qt/5.15/5.15.12/single/qt-everywhere-opensource-src-5.15.12.tar.xz" - - "https://mirrors.20i.com/pub/qt.io/archive/qt/5.15/5.15.12/single/qt-everywhere-opensource-src-5.15.12.tar.xz" - - "https://mirrors.ukfast.co.uk/sites/qt.io/archive/qt/5.15/5.15.12/single/qt-everywhere-opensource-src-5.15.12.tar.xz" - - "https://ftp.nluug.nl/languages/qt/archive/qt/5.15/5.15.12/single/qt-everywhere-opensource-src-5.15.12.tar.xz" - - "https://mirror.netcologne.de/qtproject/archive/qt/5.15/5.15.12/single/qt-everywhere-opensource-src-5.15.12.tar.xz" - - "https://qt-mirror.dannhauer.de/archive/qt/5.15/5.15.12/single/qt-everywhere-opensource-src-5.15.12.tar.xz" - - "https://ftp.fau.de/qtproject/archive/qt/5.15/5.15.12/single/qt-everywhere-opensource-src-5.15.12.tar.xz" - - "https://mirrors.dotsrc.org/qtproject/archive/qt/5.15/5.15.12/single/qt-everywhere-opensource-src-5.15.12.tar.xz" - - "https://ftp.icm.edu.pl/packages/qt/archive/qt/5.15/5.15.12/single/qt-everywhere-opensource-src-5.15.12.tar.xz" - - "https://ftp.acc.umu.se/mirror/qt.io/qtproject/archive/qt/5.15/5.15.12/single/qt-everywhere-opensource-src-5.15.12.tar.xz" - - "https://www.nic.funet.fi/pub/mirrors/download.qt-project.org/archive/qt/5.15/5.15.12/single/qt-everywhere-opensource-src-5.15.12.tar.xz" - - "https://mirror.web4africa.ng/qt/archive/qt/5.15/5.15.12/single/qt-everywhere-opensource-src-5.15.12.tar.xz" - - "https://qtproject.mirror.liquidtelecom.com/archive/qt/5.15/5.15.12/single/qt-everywhere-opensource-src-5.15.12.tar.xz" - - "https://qt.mirror.constant.com/archive/qt/5.15/5.15.12/single/qt-everywhere-opensource-src-5.15.12.tar.xz" - - "https://mirrors.sau.edu.cn/qt/archive/qt/5.15/5.15.12/single/qt-everywhere-opensource-src-5.15.12.tar.xz" - - "https://mirrors.cloud.tencent.com/qt/archive/qt/5.15/5.15.12/single/qt-everywhere-opensource-src-5.15.12.tar.xz" - - "https://mirror.bjtu.edu.cn/qt/archive/qt/5.15/5.15.12/single/qt-everywhere-opensource-src-5.15.12.tar.xz" - - "https://mirrors.ustc.edu.cn/qtproject/archive/qt/5.15/5.15.12/single/qt-everywhere-opensource-src-5.15.12.tar.xz" - - "https://mirrors.sjtug.sjtu.edu.cn/qt/archive/qt/5.15/5.15.12/single/qt-everywhere-opensource-src-5.15.12.tar.xz" - - "https://ftp.jaist.ac.jp/pub/qtproject/archive/qt/5.15/5.15.12/single/qt-everywhere-opensource-src-5.15.12.tar.xz" - - "https://ftp.yz.yamagata-u.ac.jp/pub/qtproject/archive/qt/5.15/5.15.12/single/qt-everywhere-opensource-src-5.15.12.tar.xz" - sha256: "93f2c0889ee2e9cdf30c170d353c3f829de5f29ba21c119167dee5995e48ccce" - "5.15.11": - url: - - "https://download.qt.io/official_releases/qt/5.15/5.15.11/single/qt-everywhere-opensource-src-5.15.11.tar.xz" - - "https://download.qt.io/archive/qt/5.15/5.15.11/single/qt-everywhere-opensource-src-5.15.11.tar.xz" - - "https://qt.mirror.constant.com/archive/qt/5.15/5.15.11/single/qt-everywhere-opensource-src-5.15.11.tar.xz" - - "https://mirrors.ukfast.co.uk/sites/qt.io/archive/qt/5.15/5.15.11/single/qt-everywhere-opensource-src-5.15.11.tar.xz" - - "https://mirrors.20i.com/pub/qt.io/archive/qt/5.15/5.15.11/single/qt-everywhere-opensource-src-5.15.11.tar.xz" - - "https://ftp.nluug.nl/languages/qt/archive/qt/5.15/5.15.11/single/qt-everywhere-opensource-src-5.15.11.tar.xz" - - "https://mirror.netcologne.de/qtproject/archive/qt/5.15/5.15.11/single/qt-everywhere-opensource-src-5.15.11.tar.xz" - - "https://mirror.web4africa.ng/qt/archive/qt/5.15/5.15.11/single/qt-everywhere-opensource-src-5.15.11.tar.xz" - - "https://qt-mirror.dannhauer.de/archive/qt/5.15/5.15.11/single/qt-everywhere-opensource-src-5.15.11.tar.xz" - - "https://ftp.fau.de/qtproject/archive/qt/5.15/5.15.11/single/qt-everywhere-opensource-src-5.15.11.tar.xz" - - "https://mirrors.dotsrc.org/qtproject/archive/qt/5.15/5.15.11/single/qt-everywhere-opensource-src-5.15.11.tar.xz" - - "https://ftp.icm.edu.pl/packages/qt/archive/qt/5.15/5.15.11/single/qt-everywhere-opensource-src-5.15.11.tar.xz" - - "https://ftp.acc.umu.se/mirror/qt.io/qtproject/archive/qt/5.15/5.15.11/single/qt-everywhere-opensource-src-5.15.11.tar.xz" - - "https://www.nic.funet.fi/pub/mirrors/download.qt-project.org/archive/qt/5.15/5.15.11/single/qt-everywhere-opensource-src-5.15.11.tar.xz" - - "https://qtproject.mirror.liquidtelecom.com/archive/qt/5.15/5.15.11/single/qt-everywhere-opensource-src-5.15.11.tar.xz" - - "https://mirrors.ustc.edu.cn/qtproject/archive/qt/5.15/5.15.11/single/qt-everywhere-opensource-src-5.15.11.tar.xz" - - "https://mirrors.sjtug.sjtu.edu.cn/qt/archive/qt/5.15/5.15.11/single/qt-everywhere-opensource-src-5.15.11.tar.xz" - - "https://ftp.jaist.ac.jp/pub/qtproject/archive/qt/5.15/5.15.11/single/qt-everywhere-opensource-src-5.15.11.tar.xz" - - "https://ftp.yz.yamagata-u.ac.jp/pub/qtproject/archive/qt/5.15/5.15.11/single/qt-everywhere-opensource-src-5.15.11.tar.xz" - sha256: "7426b1eaab52ed169ce53804bdd05dfe364f761468f888a0f15a308dc1dc2951" - "5.15.10": - url: - - "https://download.qt.io/official_releases/qt/5.15/5.15.10/single/qt-everywhere-opensource-src-5.15.10.tar.xz" - - "https://download.qt.io/archive/qt/5.15/5.15.10/single/qt-everywhere-opensource-src-5.15.10.tar.xz" - - "https://mirrors.ukfast.co.uk/sites/qt.io/archive/qt/5.15/5.15.10/single/qt-everywhere-opensource-src-5.15.10.tar.xz" - - "https://ftp1.nluug.nl/languages/qt/archive/qt/5.15/5.15.10/single/qt-everywhere-opensource-src-5.15.10.tar.xz" - - "https://ftp2.nluug.nl/languages/qt/archive/qt/5.15/5.15.10/single/qt-everywhere-opensource-src-5.15.10.tar.xz" - - "https://mirror.netcologne.de/qtproject/archive/qt/5.15/5.15.10/single/qt-everywhere-opensource-src-5.15.10.tar.xz" - - "https://qt-mirror.dannhauer.de/archive/qt/5.15/5.15.10/single/qt-everywhere-opensource-src-5.15.10.tar.xz" - - "https://ftp.fau.de/qtproject/archive/qt/5.15/5.15.10/single/qt-everywhere-opensource-src-5.15.10.tar.xz" - - "https://mirrors.dotsrc.org/qtproject/archive/qt/5.15/5.15.10/single/qt-everywhere-opensource-src-5.15.10.tar.xz" - - "https://ftp.acc.umu.se/mirror/qt.io/qtproject/archive/qt/5.15/5.15.10/single/qt-everywhere-opensource-src-5.15.10.tar.xz" - - "https://master.qt.io/archive/qt/5.15/5.15.10/single/qt-everywhere-opensource-src-5.15.10.tar.xz" - - "https://www.nic.funet.fi/pub/mirrors/download.qt-project.org/archive/qt/5.15/5.15.10/single/qt-everywhere-opensource-src-5.15.10.tar.xz" - - "https://mirror.web4africa.ng/qt/archive/qt/5.15/5.15.10/single/qt-everywhere-opensource-src-5.15.10.tar.xz" - - "https://qtproject.mirror.liquidtelecom.com/archive/qt/5.15/5.15.10/single/qt-everywhere-opensource-src-5.15.10.tar.xz" - - "https://qt.mirror.constant.com/archive/qt/5.15/5.15.10/single/qt-everywhere-opensource-src-5.15.10.tar.xz" - - "https://mirrors.ustc.edu.cn/qtproject/archive/qt/5.15/5.15.10/single/qt-everywhere-opensource-src-5.15.10.tar.xz" - - "https://mirrors.sjtug.sjtu.edu.cn/qt/archive/qt/5.15/5.15.10/single/qt-everywhere-opensource-src-5.15.10.tar.xz" - - "https://ftp.jaist.ac.jp/pub/qtproject/archive/qt/5.15/5.15.10/single/qt-everywhere-opensource-src-5.15.10.tar.xz" - - "https://ftp.yz.yamagata-u.ac.jp/pub/qtproject/archive/qt/5.15/5.15.10/single/qt-everywhere-opensource-src-5.15.10.tar.xz" - sha256: "b545cb83c60934adc9a6bbd27e2af79e5013de77d46f5b9f5bb2a3c762bf55ca" - "5.15.9": - url: - - "https://download.qt.io/official_releases/qt/5.15/5.15.9/single/qt-everywhere-opensource-src-5.15.9.tar.xz" - - "https://download.qt.io/archive/qt/5.15/5.15.9/single/qt-everywhere-opensource-src-5.15.9.tar.xz" - - "https://mirrors.ukfast.co.uk/sites/qt.io/archive/qt/5.15/5.15.9/single/qt-everywhere-opensource-src-5.15.9.tar.xz" - - "https://ftp1.nluug.nl/languages/qt/archive/qt/5.15/5.15.9/single/qt-everywhere-opensource-src-5.15.9.tar.xz" - - "https://ftp2.nluug.nl/languages/qt/archive/qt/5.15/5.15.9/single/qt-everywhere-opensource-src-5.15.9.tar.xz" - - "https://mirror.netcologne.de/qtproject/archive/qt/5.15/5.15.9/single/qt-everywhere-opensource-src-5.15.9.tar.xz" - - "https://qt-mirror.dannhauer.de/archive/qt/5.15/5.15.9/single/qt-everywhere-opensource-src-5.15.9.tar.xz" - - "https://ftp.fau.de/qtproject/archive/qt/5.15/5.15.9/single/qt-everywhere-opensource-src-5.15.9.tar.xz" - - "https://mirrors.dotsrc.org/qtproject/archive/qt/5.15/5.15.9/single/qt-everywhere-opensource-src-5.15.9.tar.xz" - - "https://ftp.acc.umu.se/mirror/qt.io/qtproject/archive/qt/5.15/5.15.9/single/qt-everywhere-opensource-src-5.15.9.tar.xz" - - "https://master.qt.io/archive/qt/5.15/5.15.9/single/qt-everywhere-opensource-src-5.15.9.tar.xz" - - "https://www.nic.funet.fi/pub/mirrors/download.qt-project.org/archive/qt/5.15/5.15.9/single/qt-everywhere-opensource-src-5.15.9.tar.xz" - - "https://qt.mirror.constant.com/archive/qt/5.15/5.15.9/single/qt-everywhere-opensource-src-5.15.9.tar.xz" - - "https://mirrors.sjtug.sjtu.edu.cn/qt/archive/qt/5.15/5.15.9/single/qt-everywhere-opensource-src-5.15.9.tar.xz" - - "https://ftp.jaist.ac.jp/pub/qtproject/archive/qt/5.15/5.15.9/single/qt-everywhere-opensource-src-5.15.9.tar.xz" - - "https://ftp.yz.yamagata-u.ac.jp/pub/qtproject/archive/qt/5.15/5.15.9/single/qt-everywhere-opensource-src-5.15.9.tar.xz" - sha256: "26d5f36134db03abe4a6db794c7570d729c92a3fc1b0bf9b1c8f86d0573cd02f" + - "https://download.qt.io/official_releases/qt/5.15/5.15.14/single/qt-everywhere-opensource-src-5.15.14.tar.xz" + - "https://download.qt.io/archive/qt/5.15/5.15.14/single/qt-everywhere-opensource-src-5.15.14.tar.xz" + - "https://qt-mirror.dannhauer.de/archive/qt/5.15/5.15.14/single/qt-everywhere-opensource-src-5.15.14.tar.xz" + - "https://mirror.netcologne.de/qtproject/archive/qt/5.15/5.15.14/single/qt-everywhere-opensource-src-5.15.14.tar.xz" + - "https://ftp.fau.de/qtproject/archive/qt/5.15/5.15.14/single/qt-everywhere-opensource-src-5.15.14.tar.xz" + - "https://ftp.nluug.nl/languages/qt/archive/qt/5.15/5.15.14/single/qt-everywhere-opensource-src-5.15.14.tar.xz" + - "https://mirrors.dotsrc.org/qtproject/archive/qt/5.15/5.15.14/single/qt-everywhere-opensource-src-5.15.14.tar.xz" + - "https://mirrors.20i.com/pub/qt.io/archive/qt/5.15/5.15.14/single/qt-everywhere-opensource-src-5.15.14.tar.xz" + - "https://mirrors.ukfast.co.uk/sites/qt.io/archive/qt/5.15/5.15.14/single/qt-everywhere-opensource-src-5.15.14.tar.xz" + - "https://ftp.icm.edu.pl/packages/qt/archive/qt/5.15/5.15.14/single/qt-everywhere-opensource-src-5.15.14.tar.xz" + - "https://ftp.acc.umu.se/mirror/qt.io/qtproject/archive/qt/5.15/5.15.14/single/qt-everywhere-opensource-src-5.15.14.tar.xz" + - "https://www.nic.funet.fi/pub/mirrors/download.qt-project.org/archive/qt/5.15/5.15.14/single/qt-everywhere-opensource-src-5.15.14.tar.xz" + - "https://qt.mirror.constant.com/archive/qt/5.15/5.15.14/single/qt-everywhere-opensource-src-5.15.14.tar.xz" + - "https://mirrors.sau.edu.cn/qt/archive/qt/5.15/5.15.14/single/qt-everywhere-opensource-src-5.15.14.tar.xz" + - "https://mirrors.cloud.tencent.com/qt/archive/qt/5.15/5.15.14/single/qt-everywhere-opensource-src-5.15.14.tar.xz" + - "https://mirror.bjtu.edu.cn/qt/archive/qt/5.15/5.15.14/single/qt-everywhere-opensource-src-5.15.14.tar.xz" + - "https://mirrors.sjtug.sjtu.edu.cn/qt/archive/qt/5.15/5.15.14/single/qt-everywhere-opensource-src-5.15.14.tar.xz" + - "https://ftp.jaist.ac.jp/pub/qtproject/archive/qt/5.15/5.15.14/single/qt-everywhere-opensource-src-5.15.14.tar.xz" + - "https://ftp.yz.yamagata-u.ac.jp/pub/qtproject/archive/qt/5.15/5.15.14/single/qt-everywhere-opensource-src-5.15.14.tar.xz" + - "https://mirror.aarnet.edu.au/pub/qtproject/archive/qt/5.15/5.15.14/single/qt-everywhere-opensource-src-5.15.14.tar.xz" + sha256: "fdd3a4f197d2c800ee0085c721f4bef60951cbda9e9c46e525d1412f74264ed7" patches: - "5.15.13": + "5.15.14": - "base_path": "qt5/qtbase" "patch_file": "patches/aa2a39dea5.diff" - "base_path": "qt5/qtwebengine" @@ -103,37 +32,9 @@ patches: "patch_file": "patches/fix-macdeployqt.diff" - "base_path": "qt5/qtwebengine/src/3rdparty" "patch_file": "patches/0001-Find-fontconfig-using-pkg-config.patch" - - "base_path": "qt5/qtbase" - "patch_file": "patches/android-backtrace.diff" - - "base_path": "qt5/qtbase" - "patch_file": "patches/android-openssl.diff" - - "base_path": "qt5/qtbase" - "patch_description": "Fix qmake build with apple-clang>=15" - "patch_file": "patches/5.15.8-fix-qmake-default-libdirs-apple-clang-15.patch" - "patch_source": "https://codereview.qt-project.org/c/qt/qtbase/+/503916" - "patch_type": "portability" - - "base_path": "qt5/qtbase" - "patch_description": "Fix usage of memory_resource with apple-clang>=15 and deployment target of macOS < 14" - "patch_file": "patches/5.15.12-fix-macos-cpp-lib-memory-resource.patch" - "patch_source": "https://codereview.qt-project.org/c/qt/qtbase/+/482392" - "patch_type": "portability" - "5.15.12": - - "base_path": "qt5/qtbase" - "patch_file": "patches/aa2a39dea5.diff" - - "base_path": "qt5/qtwebengine" - "patch_file": "patches/c72097e.diff" - - "base_path": "qt5/qttools" - "patch_file": "patches/fix-macdeployqt.diff" - - "base_path": "qt5/qtwebengine/src/3rdparty/chromium/v8" - "patch_file": "patches/chromium-v8-missing-constexpr.patch" - "base_path": "qt5/qtwebengine/src/3rdparty" - "patch_file": "patches/chromium-skia-missing-iterator-include.patch" - - "base_path": "qt5/qtwebengine/src/3rdparty/chromium/third_party/skia" - "patch_file": "patches/skia-cd397f3.diff" - - "base_path": "qt5/qtwebengine/src/3rdparty" - "patch_file": "patches/0001-Find-fontconfig-using-pkg-config.patch" - - "base_path": "qt5/qtbase" - "patch_file": "patches/android-backtrace.diff" + "patch_file": "patches/Fix-errors-and-warnings-for-perfetto.patch" + "patch_description": "Fix qtwebengine build issues for vs 2022 (backport QTBUG-117073)" - "base_path": "qt5/qtbase" "patch_file": "patches/android-openssl.diff" - "base_path": "qt5/qtbase" @@ -147,100 +48,20 @@ patches: "patch_file": "patches/5.15.12-fix-macos-cpp-lib-memory-resource.patch" "patch_source": "https://codereview.qt-project.org/c/qt/qtbase/+/482392" "patch_type": "portability" - "5.15.11": - - "base_path": "qt5/qtbase" - "patch_file": "patches/aa2a39dea5.diff" - - "base_path": "qt5/qtwebengine" - "patch_file": "patches/c72097e.diff" - - "base_path": "qt5/qttools" - "patch_file": "patches/fix-macdeployqt.diff" - - "base_path": "qt5/qtwebengine/src/3rdparty/chromium/v8" - "patch_file": "patches/chromium-v8-missing-constexpr.patch" - - "base_path": "qt5/qtwebengine/src/3rdparty" - "patch_file": "patches/chromium-skia-missing-iterator-include.patch" - - "base_path": "qt5/qtwebengine/src/3rdparty/chromium/third_party/skia" - "patch_file": "patches/skia-cd397f3.diff" - - "base_path": "qt5/qtwebengine/src/3rdparty" - "patch_file": "patches/0001-Find-fontconfig-using-pkg-config.patch" - - "base_path": "qt5/qtbase" - "patch_file": "patches/android-backtrace.diff" - - "base_path": "qt5/qtbase" - "patch_file": "patches/android-openssl.diff" - - "base_path": "qt5/qtbase" - "patch_file": "patches/android-new-ndk.diff" - - patch_file: "patches/5.15.8-fix-qmake-default-libdirs-apple-clang-15.patch" - base_path: "qt5/qtbase" - patch_description: "Fix qmake build with apple-clang>=15" - patch_type: "portability" - patch_source: "https://codereview.qt-project.org/c/qt/qtbase/+/503916" - - patch_file: "patches/5.15.10-fix-macos-cpp-lib-memory-resource.patch" - base_path: "qt5/qtbase" - patch_description: "Fix usage of memory_resource with apple-clang>=15 and deployment target of macOS < 14" - patch_type: "portability" - patch_source: "https://codereview.qt-project.org/c/qt/qtbase/+/482392" - "5.15.10": - - "base_path": "qt5/qtbase" - "patch_file": "patches/aa2a39dea5.diff" - - "base_path": "qt5/qtwebengine" - "patch_file": "patches/c72097e.diff" - - "base_path": "qt5/qttools" - "patch_file": "patches/fix-macdeployqt.diff" - - "base_path": "qt5/qtwebengine/src/3rdparty/chromium/v8" - "patch_file": "patches/chromium-v8-missing-constexpr.patch" - - "base_path": "qt5/qtwebengine/src/3rdparty" - "patch_file": "patches/chromium-skia-missing-iterator-include.patch" - - "base_path": "qt5/qtwebengine/src/3rdparty/chromium/third_party/skia" - "patch_file": "patches/skia-cd397f3.diff" - - "base_path": "qt5/qtwebengine/src/3rdparty" - "patch_file": "patches/0001-Find-fontconfig-using-pkg-config.patch" - - "base_path": "qt5/qtbase" - "patch_file": "patches/337f28c9ab-5.15.8.patch" - - "base_path": "qt5/qtbase" - "patch_file": "patches/android-backtrace.diff" - - "base_path": "qt5/qtbase" - "patch_file": "patches/android-openssl.diff" - - "base_path": "qt5/qtbase" - "patch_file": "patches/android-new-ndk.diff" - - patch_file: "patches/5.15.8-fix-qmake-default-libdirs-apple-clang-15.patch" - base_path: "qt5/qtbase" - patch_description: "Fix qmake build with apple-clang>=15" - patch_type: "portability" - patch_source: "https://codereview.qt-project.org/c/qt/qtbase/+/503916" - - patch_file: "patches/5.15.10-fix-macos-cpp-lib-memory-resource.patch" - base_path: "qt5/qtbase" - patch_description: "Fix usage of memory_resource with apple-clang>=15 and deployment target of macOS < 14" - patch_type: "portability" - patch_source: "https://codereview.qt-project.org/c/qt/qtbase/+/482392" - "5.15.9": - - "base_path": "qt5/qtbase" - "patch_file": "patches/aa2a39dea5.diff" - "base_path": "qt5/qtwebengine" - "patch_file": "patches/c72097e.diff" - - "base_path": "qt5/qttools" - "patch_file": "patches/fix-macdeployqt.diff" - - "base_path": "qt5/qtwebengine/src/3rdparty/chromium/v8" - "patch_file": "patches/chromium-v8-missing-constexpr.patch" + "patch_description": "qtwebengine don't use rpath-link on macOS" + "patch_file": "patches/5.15.14-macos-qtwebengine-rpath-link.patch" + - "base_path": "qt5/qtlocation" + "patch_description": "qtlocation missing utility header" + "patch_file": "patches/5.15.14-macos-qtlocation-utility-header.patch" - "base_path": "qt5/qtwebengine/src/3rdparty" - "patch_file": "patches/chromium-skia-missing-iterator-include.patch" - - "base_path": "qt5/qtwebengine/src/3rdparty/chromium/third_party/skia" - "patch_file": "patches/skia-cd397f3.diff" + "patch_description": "qtwebengine fix missing headers" + "patch_file": "patches/5.15.14-qtwebengine-missing-deps.patch" - "base_path": "qt5/qtwebengine/src/3rdparty" - "patch_file": "patches/0001-Find-fontconfig-using-pkg-config.patch" - - "base_path": "qt5/qtbase" - "patch_file": "patches/337f28c9ab-5.15.8.patch" - - "base_path": "qt5/qtbase" - "patch_file": "patches/android-backtrace.diff" - - "base_path": "qt5/qtbase" - "patch_file": "patches/android-openssl.diff" - - "base_path": "qt5/qtbase" - "patch_file": "patches/android-new-ndk.diff" - - patch_file: "patches/5.15.8-fix-qmake-default-libdirs-apple-clang-15.patch" - base_path: "qt5/qtbase" - patch_description: "Fix build with apple-clang 15" - patch_type: "portability" - patch_source: "https://codereview.qt-project.org/c/qt/qtbase/+/503916" - - patch_file: "patches/5.15.7-fix-macos-cpp-lib-memory-resource.patch" - base_path: "qt5/qtbase" - patch_description: "Fix usage of memory_resource with apple-clang>=15 and deployment target of macOS < 14" - patch_type: "portability" - patch_source: "https://codereview.qt-project.org/c/qt/qtbase/+/482392" + "patch_description": "macos fix chromium build in newer macos SDKs" + "patch_file": "patches/5.15.14-macos-chromium-newer-sdks.patch" + - "patch_file": "patches/ffmpeg-x86-optimization.patch" + "base_path": "qt5/qtwebengine" + "patch_description": "Fix build error with binutils >= 2.41" + "patch_type": "portability" + "patch_source": "https://packages.ubuntu.com/source/focal-updates/qtwebengine-opensource-src" diff --git a/recipes/qt/5.x.x/conanfile.py b/recipes/qt/5.x.x/conanfile.py index f45348ca816a3..0ad50b6ce723c 100644 --- a/recipes/qt/5.x.x/conanfile.py +++ b/recipes/qt/5.x.x/conanfile.py @@ -1,4 +1,4 @@ -from conan import ConanFile +from conan import ConanFile, conan_version from conan.errors import ConanException, ConanInvalidConfiguration from conan.tools.android import android_abi from conan.tools.apple import is_apple_os @@ -10,6 +10,7 @@ from conan.tools.scm import Version import configparser import glob +from io import StringIO import itertools import os import textwrap @@ -122,9 +123,10 @@ class QtConan(ConanFile): "sysroot": None, "config": None, "multiconfiguration": False, - "essential_modules": not os.getenv('CONAN_CENTER_BUILD_SERVICE') } - default_options.update({f"{status}_modules": False for status in _module_statuses if status != "essential"}) + # essential_modules, addon_modules, deprecated_modules, preview_modules: + # these are only provided for convenience, set to False by default + default_options.update({f"{status}_modules": False for status in _module_statuses}) no_copy_source = True short_paths = True @@ -154,20 +156,17 @@ def validate_build(self): raise ConanInvalidConfiguration(msg) # In any case, check its actual version for compatibility - from six import StringIO # Python 2 and 3 compatible - mybuf = StringIO() - cmd_v = f"\"{python_exe}\" --version" - self.run(cmd_v, mybuf) - verstr = mybuf.getvalue().strip().split("Python ")[1] - if verstr.endswith("+"): - verstr = verstr[:-1] + command_output = StringIO() + cmd_v = f"\"{python_exe}\" -c \"import platform;print(platform.python_version())\"" + self.run(cmd_v, command_output) + verstr = command_output.getvalue().strip() version = Version(verstr) # >= 2.7.5 & < 3 v_min = "2.7.5" v_max = "3.0.0" if (version >= v_min) and (version < v_max): msg = ("Found valid Python 2 required for QtWebengine:" - f" version={mybuf.getvalue()}, path={python_exe}") + f" version={verstr}, path={python_exe}") self.output.success(msg) else: msg = (f"Found Python 2 in path, but with invalid version {verstr}" @@ -209,23 +208,27 @@ def config_options(self): if self.settings.os != "Android": del self.options.android_sdk + def _debug_output(self, message): + if Version(conan_version) >= "2": + self.output.debug(message) + def configure(self): # if self.settings.os != "Linux": # self.options.with_libiconv = False # QTBUG-84708 if not self.options.gui: - del self.options.opengl - del self.options.with_vulkan - del self.options.with_freetype - del self.options.with_fontconfig - del self.options.with_harfbuzz - del self.options.with_libjpeg - del self.options.with_libpng - del self.options.with_md4c - del self.options.with_x11 + self.options.rm_safe("opengl") + self.options.rm_safe("with_vulkan") + self.options.rm_safe("with_freetype") + self.options.rm_safe("with_fontconfig") + self.options.rm_safe("with_harfbuzz") + self.options.rm_safe("with_libjpeg") + self.options.rm_safe("with_libpng") + self.options.rm_safe("with_md4c") + self.options.rm_safe("with_x11") if not self.options.with_dbus: - del self.options.with_atspi + self.options.rm_safe("with_atspi") if self.options.multiconfiguration: del self.settings.build_type @@ -251,25 +254,50 @@ def configure(self): for m in submodules_tree: assert m in ["qtbase", "qtqa", "qtrepotools"] or m in self._submodules, "module %s is not present in recipe options : (%s)" % (m, ",".join(self._submodules)) - for m in self._submodules: - if m not in submodules_tree: - delattr(self.options, m) + for module in self._submodules: + if module not in submodules_tree: + self._debug_output(f"qt5: removing {module} from options as it is not an option for this version, or it is ignored or obsolete") + self.options.rm_safe(module) + + # Requested modules: + # - any module for non-removed options that have 'True' value + # - any enabled via `xxx_modules` that does not have a 'False' value + # Note that at this point, the submodule options dont have a value unless one is given externally + # to the recipe (e.g. via the command line, a profile, or a consumer) + requested_modules = set([module for module in self._submodules if self.options.get_safe(module)]) + for module in [m for m in self._submodules if m in submodules_tree]: + status = submodules_tree[module]['status'] + is_disabled = self.options.get_safe(module) == False + if self.options.get_safe(f"{status}_modules"): + if not is_disabled: + requested_modules.add(module) + else: + self.output.warning(f"qt5: {module} requested because {status}_modules=True" + f" but it has been explicitly disabled with {module}=False") + + self.output.info(f"qt5: requested modules {list(requested_modules)}") - def _enablemodule(mod): - if mod != "qtbase": - setattr(self.options, mod, True) - for req in submodules_tree[mod]["depends"]: - _enablemodule(req) + required_modules = {} + for module in requested_modules: + deps = submodules_tree[module]["depends"] + for dep in deps: + required_modules.setdefault(dep,[]).append(module) - for module in self._submodules: - if self.options.get_safe(module): - _enablemodule(module) - else: - if module in submodules_tree: - for status in self._module_statuses: - if getattr(self.options, f"{status}_modules") and submodules_tree[module]['status'] == status: - _enablemodule(module) - break + required_but_disabled = [m for m in required_modules.keys() if self.options.get_safe(m) == False] + if required_modules: + self._debug_output(f"qt5: required_modules modules {list(required_modules.keys())}") + if required_but_disabled: + required_by = set() + for m in required_but_disabled: + required_by.update(required_modules[m]) + raise ConanInvalidConfiguration(f"Modules {required_but_disabled} are explicitly disabled, " + f"but are required by {list(required_by)}, enabled by other options") + + enabled_modules = requested_modules.union(set(required_modules.keys())) + enabled_modules.discard("qtbase") + + for module in list(enabled_modules): + setattr(self.options, module, True) for module in self._submodules: if module in self.options and not self.options.get_safe(module): @@ -285,6 +313,16 @@ def _enablemodule(mod): if self.options.qtwebengine: self.options.with_fontconfig = True + for status in self._module_statuses: + # These are convenience only, should not affect package_id + option_name = f"{status}_modules" + self._debug_output(f"qt5 removing convenience option: {option_name}," + f" see individual module options") + self.options.rm_safe(option_name) + + for option in self.options.items(): + self._debug_output(f"qt5 option {option[0]}={option[1]}") + def validate(self): if self.settings.compiler.get_safe("cppstd"): check_min_cppstd(self, "11") @@ -377,13 +415,13 @@ def requirements(self): self.requires("harfbuzz/8.3.0") if self.options.get_safe("with_libjpeg", False) and not self.options.multiconfiguration: if self.options.with_libjpeg == "libjpeg-turbo": - self.requires("libjpeg-turbo/3.0.1") + self.requires("libjpeg-turbo/[>=3.0 <3.1]") else: self.requires("libjpeg/9e") if self.options.get_safe("with_libpng", False) and not self.options.multiconfiguration: - self.requires("libpng/1.6.42") + self.requires("libpng/[>=1.6 <2]") if self.options.with_sqlite3 and not self.options.multiconfiguration: - self.requires("sqlite3/3.45.0") + self.requires("sqlite3/[>=3.45.0 <4]") if self.options.get_safe("with_mysql", False): self.requires("libmysqlclient/8.1.0") if self.options.with_pq: @@ -404,7 +442,7 @@ def requirements(self): if self.options.with_zstd: self.requires("zstd/1.5.5") if self.options.qtwebengine and self.settings.os in ["Linux", "FreeBSD"]: - self.requires("expat/2.6.0") + self.requires("expat/[>=2.6.2 <3]") self.requires("opus/1.4") if not self.options.qtwayland: self.requires("xorg-proto/2022.2") @@ -440,14 +478,12 @@ def package_id(self): self.info.settings.compiler.runtime_type = "Release/Debug" if self.info.settings.os == "Android": del self.info.options.android_sdk - for status in self._module_statuses: - delattr(self.info.options, f"{status}_modules") def build_requirements(self): if self._settings_build.os == "Windows" and is_msvc(self): - self.tool_requires("jom/1.1.3") + self.tool_requires("jom/[>=1.1 <2]") if self.options.qtwebengine: - self.tool_requires("ninja/1.11.1") + self.tool_requires("ninja/[>=1.12 <2]") self.tool_requires("nodejs/18.15.0") self.tool_requires("gperf/3.1") # gperf, bison, flex, python >= 2.7.5 & < 3 @@ -613,9 +649,6 @@ def build(self): if cross_building(self): args.append(f"-extprefix {self.package_folder}") args.append("-v") - args.append("-archdatadir %s" % os.path.join(self.package_folder, "bin", "archdatadir")) - args.append("-datadir %s" % os.path.join(self.package_folder, "bin", "datadir")) - args.append("-sysconfdir %s" % os.path.join(self.package_folder, "bin", "sysconfdir")) if self.options.commercial: args.append("-commercial") else: @@ -826,6 +859,13 @@ def _getenvpath(var): # see https://doc.qt.io/qt-5/qmake-variable-reference.html#qmake-rpathdir args += [f"QMAKE_RPATHDIR+=\"{libpath}\""] + if self.settings.compiler == "apple-clang" and self.options.qtmultimedia: + # XCode 14.3 finally removes std::unary_function, so compilation fails + # when using newer SDKs when using C++17 or higher. + # This macro re-enables them. Should be safe to pass this macro even + # in earlier versions, as it would have no effect. + args += ['QMAKE_CXXFLAGS+="-D_LIBCPP_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION=1"'] + if self.options.qtwebengine and self.settings.os in ["Linux", "FreeBSD"]: args += ["-qt-webengine-ffmpeg", "-system-webengine-opus", @@ -854,18 +894,7 @@ def package(self): with chdir(self, "build_folder"): self.run(f"{self._make_program()} install") save(self, os.path.join(self.package_folder, "bin", "qt.conf"), """[Paths] -Prefix = .. -ArchData = bin/archdatadir -HostData = bin/archdatadir -Data = bin/datadir -Sysconf = bin/sysconfdir -LibraryExecutables = bin/archdatadir/bin -Plugins = bin/archdatadir/plugins -Imports = bin/archdatadir/imports -Qml2Imports = bin/archdatadir/qml -Translations = bin/datadir/translations -Documentation = bin/datadir/doc -Examples = bin/datadir/examples""") +Prefix = ..""") copy(self, "*LICENSE*", os.path.join(self.source_folder, "qt5/"), os.path.join(self.package_folder, "licenses"), excludes="qtbase/examples/*") for module in self._submodules: @@ -877,6 +906,7 @@ def package(self): rm(self, "*.la*", os.path.join(self.package_folder, "lib"), recursive=True) rm(self, "*.pdb*", os.path.join(self.package_folder, "lib"), recursive=True) rm(self, "*.pdb", os.path.join(self.package_folder, "bin"), recursive=True) + rm(self, "*.pdb", os.path.join(self.package_folder, "plugins"), recursive=True) # "Qt5Bootstrap" is internal Qt library - removing it to avoid linking error, since it contains # symbols that are also in "Qt5Core.lib". It looks like there is no "Qt5Bootstrap.dll". for fl in glob.glob(os.path.join(self.package_folder, "lib", "*Qt5Bootstrap*")): @@ -977,6 +1007,8 @@ def _create_private_module(module, dependencies=[]): if self.options.qtdeclarative: _create_private_module("Qml", ["CorePrivate", "Qml"]) + if self.options.gui: + _create_private_module("Quick", ["CorePrivate", "GuiPrivate", "QmlPrivate", "Quick"]) def package_info(self): self.cpp_info.set_property("cmake_file_name", "Qt5") @@ -1049,7 +1081,7 @@ def _create_plugin(pluginname, libname, plugintype, requires): self.cpp_info.components[componentname].names["cmake_find_package_multi"] = pluginname if not self.options.shared: self.cpp_info.components[componentname].libs = [libname + libsuffix] - self.cpp_info.components[componentname].libdirs = [os.path.join("bin", "archdatadir", "plugins", plugintype)] + self.cpp_info.components[componentname].libdirs = [os.path.join("plugins", plugintype)] self.cpp_info.components[componentname].includedirs = [] if "Core" not in requires: requires.append("Core") @@ -1246,6 +1278,7 @@ def _create_plugin(pluginname, libname, plugintype, requires): self.cpp_info.components["qtQmlImportScanner"].requires = _get_corrected_reqs(["Qml"]) if self.options.gui: _create_module("Quick", ["Gui", "Qml", "QmlModels"]) + _add_build_module("qtQuick", self._cmake_qt5_private_file("Quick")) if self.options.widgets: _create_module("QuickWidgets", ["Gui", "Qml", "Quick", "Widgets"]) _create_module("QuickShapes", ["Gui", "Qml", "Quick"]) @@ -1391,8 +1424,10 @@ def _create_plugin(pluginname, libname, plugintype, requires): _create_plugin("QGstreamerCaptureServicePlugin", "gstmediacapture", "mediaservice", []) _create_plugin("QGstreamerPlayerServicePlugin", "gstmediaplayer", "mediaservice", []) if self.settings.os == "Linux": - _create_plugin("CameraBinServicePlugin", "gstcamerabin", "mediaservice", []) - _create_plugin("QAlsaPlugin", "qtaudio_alsa", "audio", []) + if self.options.with_gstreamer: + _create_plugin("CameraBinServicePlugin", "gstcamerabin", "mediaservice", []) + if self.options.get_safe("with_libalsa", False): + _create_plugin("QAlsaPlugin", "qtaudio_alsa", "audio", []) if self.settings.os == "Windows": _create_plugin("AudioCaptureServicePlugin", "qtmedia_audioengine", "mediaservice", []) _create_plugin("DSServicePlugin", "dsengine", "mediaservice", []) @@ -1491,7 +1526,7 @@ def _create_plugin(pluginname, libname, plugintype, requires): self.cpp_info.components["qtCore"].frameworks.append("Cocoa") # qtcore requires "_OBJC_CLASS_$_NSApplication" and more, which are in "Cocoa" framework self.cpp_info.components["qtCore"].frameworks.append("Security") # qtcore requires "_SecRequirementCreateWithString" and more, which are in "Security" framework - self.cpp_info.components["qtCore"].builddirs.append(os.path.join("bin","archdatadir","bin")) + self.cpp_info.components["qtCore"].builddirs.append(os.path.join("bin")) _add_build_module("qtCore", self._cmake_core_extras_file) _add_build_module("qtCore", self._cmake_qt5_private_file("Core")) @@ -1506,8 +1541,7 @@ def _create_plugin(pluginname, libname, plugintype, requires): os.path.join("lib", "cmake", "Qt5Core", "Qt5CoreConfigExtrasMkspecDir.cmake")) mkspecs_dir_begin = qt5core_config_extras_mkspec_dir_cmake.find("mkspecs/") mkspecs_dir_end = qt5core_config_extras_mkspec_dir_cmake.find("\"", mkspecs_dir_begin) - mkspecs_dir = qt5core_config_extras_mkspec_dir_cmake[mkspecs_dir_begin:mkspecs_dir_end].split('/') - mkspecs_path = os.path.join("bin", "archdatadir", *mkspecs_dir) + mkspecs_path = qt5core_config_extras_mkspec_dir_cmake[mkspecs_dir_begin:mkspecs_dir_end] assert os.path.exists(mkspecs_path) self.cpp_info.components["qtCore"].includedirs.append(mkspecs_path) diff --git a/recipes/qt/5.x.x/patches/5.15.14-macos-chromium-newer-sdks.patch b/recipes/qt/5.x.x/patches/5.15.14-macos-chromium-newer-sdks.patch new file mode 100644 index 0000000000000..cb5ec1fca2189 --- /dev/null +++ b/recipes/qt/5.x.x/patches/5.15.14-macos-chromium-newer-sdks.patch @@ -0,0 +1,13 @@ +diff --git a/chromium/base/strings/utf_string_conversions.cc b/chromium/base/strings/utf_string_conversions.cc +index 12ed1f3e0..004ac6855 100644 +--- a/chromium/base/strings/utf_string_conversions.cc ++++ b/chromium/base/strings/utf_string_conversions.cc +@@ -15,7 +15,7 @@ + #include "base/third_party/icu/icu_utf.h" + #include "build/build_config.h" + +-#if defined(OS_MAC) ++#if defined(OS_MAC) && __MAC_OS_X_VERSION_MAX_ALLOWED < 120300 + namespace std { + inline namespace __1 { + template class basic_string; diff --git a/recipes/qt/5.x.x/patches/5.15.14-macos-qtlocation-utility-header.patch b/recipes/qt/5.x.x/patches/5.15.14-macos-qtlocation-utility-header.patch new file mode 100644 index 0000000000000..000965fda4346 --- /dev/null +++ b/recipes/qt/5.x.x/patches/5.15.14-macos-qtlocation-utility-header.patch @@ -0,0 +1,13 @@ +diff --git a/src/3rdparty/mapbox-gl-native/include/mbgl/util/unique_any.hpp b/src/3rdparty/mapbox-gl-native/include/mbgl/util/unique_any.hpp +index c7dc8b38e..d9e3709b1 100644 +--- a/src/3rdparty/mapbox-gl-native/include/mbgl/util/unique_any.hpp ++++ b/src/3rdparty/mapbox-gl-native/include/mbgl/util/unique_any.hpp +@@ -3,6 +3,8 @@ + #include + #include + #include ++#include ++ + namespace mbgl { + namespace util { + \ No newline at end of file diff --git a/recipes/qt/5.x.x/patches/5.15.14-macos-qtwebengine-rpath-link.patch b/recipes/qt/5.x.x/patches/5.15.14-macos-qtwebengine-rpath-link.patch new file mode 100644 index 0000000000000..2fb28c93ca411 --- /dev/null +++ b/recipes/qt/5.x.x/patches/5.15.14-macos-qtwebengine-rpath-link.patch @@ -0,0 +1,13 @@ +diff --git a/mkspecs/features/gn_generator.prf b/mkspecs/features/gn_generator.prf +index 306e58db1..a42059e82 100644 +--- a/mkspecs/features/gn_generator.prf ++++ b/mkspecs/features/gn_generator.prf +@@ -166,7 +166,7 @@ for (flag, GN_FLAGS): GN_CONTENTS += " \"$$flag\"," + unix:!macos: GN_CONTENTS += " \"-Wl,-rpath=$${rpath}\"," + } + } +-!isEmpty(QMAKE_RPATHLINKDIR): GN_CONTENTS += " \"-Wl,-rpath-link=$${QMAKE_RPATHLINKDIR}\"," ++!isEmpty(QMAKE_LFLAGS_RPATHLINK):!isEmpty(QMAKE_RPATHLINKDIR): GN_CONTENTS += " \"-Wl,-rpath-link=$${QMAKE_RPATHLINKDIR}\"," + GN_CONTENTS += " ]" + + GN_CONTENTS += " lib_dirs = [" diff --git a/recipes/qt/5.x.x/patches/5.15.14-qtwebengine-missing-deps.patch b/recipes/qt/5.x.x/patches/5.15.14-qtwebengine-missing-deps.patch new file mode 100644 index 0000000000000..fafd46513f4b8 --- /dev/null +++ b/recipes/qt/5.x.x/patches/5.15.14-qtwebengine-missing-deps.patch @@ -0,0 +1,12 @@ +diff --git a/chromium/content/public/browser/BUILD.gn b/chromium/content/public/browser/BUILD.gn +index 7cf82a4..0e0dda2 100644 +--- a/chromium/content/public/browser/BUILD.gn ++++ b/chromium/content/public/browser/BUILD.gn +@@ -469,6 +469,7 @@ jumbo_source_set("browser_sources") { + "//build:chromeos_buildflags", + "//cc", + "//components/viz/host", ++ "//components/spellcheck:buildflags", + "//content/browser", # Must not be public_deps! + "//device/fido", + "//gpu", diff --git a/recipes/qt/5.x.x/patches/Fix-errors-and-warnings-for-perfetto.patch b/recipes/qt/5.x.x/patches/Fix-errors-and-warnings-for-perfetto.patch new file mode 100644 index 0000000000000..abd82e1674e40 --- /dev/null +++ b/recipes/qt/5.x.x/patches/Fix-errors-and-warnings-for-perfetto.patch @@ -0,0 +1,101 @@ +From 851cd7c7a079fa5da63770c49724036e8338e813 Mon Sep 17 00:00:00 2001 +From: Michal Klocek +Date: Wed, 20 Sep 2023 07:45:29 +0200 +Subject: [PATCH] Fix errors and warnings for perfetto +MIME-Version: 1.0 +Content-Type: text/plain; charset=utf8 +Content-Transfer-Encoding: 8bit + +It seems newest msvc compiler does not like perfetto circualar queue +const iterator, which ends in issues with std::swap of std::sort. +Make sure it is non const. + +Fix warnings. + +Deals with: "error C2672: 'swap': no matching overloaded function +found." + +Fixes: QTBUG-117073 +Change-Id: I02901e61a1bb8863d72ca02a0ccd841e54309d6e +Reviewed-on: https://codereview.qt-project.org/c/qt/qtwebengine-chromium/+/505412 +Reviewed-by: Martin Negyokru +Reviewed-by: Michael Brüning +--- + .../perfetto/include/perfetto/ext/base/circular_queue.h | 9 ++------- + .../third_party/perfetto/src/trace_processor/storage/metadata.h | 2 ++ + .../third_party/perfetto/src/trace_processor/storage/stats.h | 2 ++ + .../perfetto/src/trace_processor/tables/macros_internal.h | 2 ++ + 4 files changed, 8 insertions(+), 7 deletions(-) + +diff --git a/chromium/third_party/perfetto/include/perfetto/ext/base/circular_queue.h b/chromium/third_party/perfetto/include/perfetto/ext/base/circular_queue.h +index 18ca7702614..ec46e69f817 100644 +--- a/chromium/third_party/perfetto/include/perfetto/ext/base/circular_queue.h ++++ b/chromium/third_party/perfetto/include/perfetto/ext/base/circular_queue.h +@@ -67,19 +67,14 @@ class CircularQueue { + ignore_result(generation); + } + +- T* operator->() { ++ T* operator->() const { + #if PERFETTO_DCHECK_IS_ON() + PERFETTO_DCHECK(generation_ == queue_->generation()); + #endif + return queue_->Get(pos_); + } + +- const T* operator->() const { +- return const_cast::Iterator*>(this)->operator->(); +- } +- +- T& operator*() { return *(operator->()); } +- const T& operator*() const { return *(operator->()); } ++ T& operator*() const { return *(operator->()); } + + value_type& operator[](difference_type i) { return *(*this + i); } + +diff --git a/chromium/third_party/perfetto/src/trace_processor/storage/metadata.h b/chromium/third_party/perfetto/src/trace_processor/storage/metadata.h +index 4796ae4edcd..30e534b216b 100644 +--- a/chromium/third_party/perfetto/src/trace_processor/storage/metadata.h ++++ b/chromium/third_party/perfetto/src/trace_processor/storage/metadata.h +@@ -59,8 +59,10 @@ namespace metadata { + F(kMulti, "multi") + // clang-format + ++#if PERFETTO_BUILDFLAG(PERFETTO_COMPILER_GCC) + // Ignore GCC warning about a missing argument for a variadic macro parameter. + #pragma GCC system_header ++#endif + + #define PERFETTO_TP_META_TYPE_ENUM(varname, ...) varname + enum class KeyType : size_t { +diff --git a/chromium/third_party/perfetto/src/trace_processor/storage/stats.h b/chromium/third_party/perfetto/src/trace_processor/storage/stats.h +index 7f14803244e..30b56c62544 100644 +--- a/chromium/third_party/perfetto/src/trace_processor/storage/stats.h ++++ b/chromium/third_party/perfetto/src/trace_processor/storage/stats.h +@@ -189,7 +189,9 @@ enum Source { + }; + + // Ignore GCC warning about a missing argument for a variadic macro parameter. ++#if PERFETTO_BUILDFLAG(PERFETTO_COMPILER_GCC) + #pragma GCC system_header ++#endif + + // Declares an enum of literals (one for each stat). The enum values of each + // literal corresponds to the string index in the arrays below. +diff --git a/chromium/third_party/perfetto/src/trace_processor/tables/macros_internal.h b/chromium/third_party/perfetto/src/trace_processor/tables/macros_internal.h +index 875efd62e0d..1ca5068cc32 100644 +--- a/chromium/third_party/perfetto/src/trace_processor/tables/macros_internal.h ++++ b/chromium/third_party/perfetto/src/trace_processor/tables/macros_internal.h +@@ -140,7 +140,9 @@ class MacroTable : public Table { + } // namespace macros_internal + + // Ignore GCC warning about a missing argument for a variadic macro parameter. ++#if PERFETTO_BUILDFLAG(PERFETTO_COMPILER_GCC) + #pragma GCC system_header ++#endif + + // Basic helper macros. + #define PERFETTO_TP_NOOP(...) +-- +2.16.3 + diff --git a/recipes/qt/5.x.x/patches/ffmpeg-x86-optimization.patch b/recipes/qt/5.x.x/patches/ffmpeg-x86-optimization.patch new file mode 100644 index 0000000000000..cff8df9a43395 --- /dev/null +++ b/recipes/qt/5.x.x/patches/ffmpeg-x86-optimization.patch @@ -0,0 +1,64 @@ +Description: avcodec/x86/mathops: clip constants used with shift instructions within inline assembly + Fixes assembling with gas from binutils >= 2.41. +Origin: upstream, https://git.ffmpeg.org/gitweb/ffmpeg.git/commit/effadce6c756247e +Bug: https://bugs.debian.org/1038132 +Last-Update: 2023-07-21 + +--- a/src/3rdparty/chromium/third_party/ffmpeg/libavcodec/x86/mathops.h ++++ b/src/3rdparty/chromium/third_party/ffmpeg/libavcodec/x86/mathops.h +@@ -35,12 +35,20 @@ + static av_always_inline av_const int MULL(int a, int b, unsigned shift) + { + int rt, dummy; ++ if (__builtin_constant_p(shift)) + __asm__ ( + "imull %3 \n\t" + "shrdl %4, %%edx, %%eax \n\t" + :"=a"(rt), "=d"(dummy) +- :"a"(a), "rm"(b), "ci"((uint8_t)shift) ++ :"a"(a), "rm"(b), "i"(shift & 0x1F) + ); ++ else ++ __asm__ ( ++ "imull %3 \n\t" ++ "shrdl %4, %%edx, %%eax \n\t" ++ :"=a"(rt), "=d"(dummy) ++ :"a"(a), "rm"(b), "c"((uint8_t)shift) ++ ); + return rt; + } + +@@ -113,19 +121,31 @@ __asm__ volatile(\ + // avoid +32 for shift optimization (gcc should do that ...) + #define NEG_SSR32 NEG_SSR32 + static inline int32_t NEG_SSR32( int32_t a, int8_t s){ ++ if (__builtin_constant_p(s)) + __asm__ ("sarl %1, %0\n\t" + : "+r" (a) +- : "ic" ((uint8_t)(-s)) ++ : "i" (-s & 0x1F) + ); ++ else ++ __asm__ ("sarl %1, %0\n\t" ++ : "+r" (a) ++ : "c" ((uint8_t)(-s)) ++ ); + return a; + } + + #define NEG_USR32 NEG_USR32 + static inline uint32_t NEG_USR32(uint32_t a, int8_t s){ ++ if (__builtin_constant_p(s)) + __asm__ ("shrl %1, %0\n\t" + : "+r" (a) +- : "ic" ((uint8_t)(-s)) ++ : "i" (-s & 0x1F) + ); ++ else ++ __asm__ ("shrl %1, %0\n\t" ++ : "+r" (a) ++ : "c" ((uint8_t)(-s)) ++ ); + return a; + } + diff --git a/recipes/qt/5.x.x/qtmodules5.15.14.conf b/recipes/qt/5.x.x/qtmodules5.15.14.conf new file mode 100644 index 0000000000000..452233655f279 --- /dev/null +++ b/recipes/qt/5.x.x/qtmodules5.15.14.conf @@ -0,0 +1,326 @@ +[submodule "qtbase"] + path = qtbase + url = ../qtbase.git + branch = 5.15 + status = essential +[submodule "qtsvg"] + depends = qtbase + path = qtsvg + url = ../qtsvg.git + branch = 5.15 + status = addon +[submodule "qtdeclarative"] + depends = qtbase + recommends = qtsvg + path = qtdeclarative + url = ../qtdeclarative.git + branch = 5.15 + status = essential +[submodule "qtactiveqt"] + depends = qtbase + path = qtactiveqt + url = ../qtactiveqt.git + branch = 5.15 + status = addon +[submodule "qtscript"] + depends = qtbase + recommends = qttools + path = qtscript + url = ../qtscript.git + branch = 5.15 + status = deprecated +[submodule "qtmultimedia"] + depends = qtbase + recommends = qtdeclarative + path = qtmultimedia + url = ../qtmultimedia.git + branch = 5.15 + status = essential +[submodule "qttools"] + depends = qtbase + recommends = qtdeclarative qtactiveqt + path = qttools + url = ../qttools.git + branch = 5.15 + status = essential +[submodule "qtxmlpatterns"] + depends = qtbase + recommends = qtdeclarative + path = qtxmlpatterns + url = ../qtxmlpatterns.git + branch = 5.15 + status = deprecated +[submodule "qttranslations"] + depends = qttools + path = qttranslations + url = ../qttranslations.git + branch = 5.15 + status = essential + priority = 30 +[submodule "qtdoc"] + depends = qtdeclarative qttools + recommends = qtmultimedia qtquickcontrols qtquickcontrols2 + path = qtdoc + url = ../qtdoc.git + branch = 5.15 + status = essential + priority = 40 +[submodule "qtrepotools"] + path = qtrepotools + url = ../qtrepotools.git + branch = master + status = essential + project = - +[submodule "qtqa"] + depends = qtbase + path = qtqa + url = ../qtqa.git + branch = master + status = essential + priority = 50 +[submodule "qtlocation"] + depends = qtbase + recommends = qtdeclarative qtquickcontrols qtquickcontrols2 qtserialport + path = qtlocation + url = ../qtlocation.git + branch = 5.15 + status = addon +[submodule "qtsensors"] + depends = qtbase + recommends = qtdeclarative + path = qtsensors + url = ../qtsensors.git + branch = 5.15 + status = addon +[submodule "qtsystems"] + depends = qtbase + recommends = qtdeclarative + path = qtsystems + url = ../qtsystems.git + branch = dev + status = ignore +[submodule "qtfeedback"] + depends = qtdeclarative + recommends = qtmultimedia + path = qtfeedback + url = ../qtfeedback.git + branch = master + status = ignore +[submodule "qtdocgallery"] + depends = qtdeclarative + path = qtdocgallery + url = ../qtdocgallery.git + branch = master + status = ignore +[submodule "qtpim"] + depends = qtdeclarative + path = qtpim + url = ../qtpim.git + branch = dev + status = ignore +[submodule "qtconnectivity"] + depends = qtbase + recommends = qtdeclarative qtandroidextras + path = qtconnectivity + url = ../qtconnectivity.git + branch = 5.15 + status = addon +[submodule "qtwayland"] + depends = qtbase + recommends = qtdeclarative + path = qtwayland + url = ../qtwayland.git + branch = 5.15 + status = addon +[submodule "qt3d"] + depends = qtbase + recommends = qtdeclarative qtimageformats qtgamepad + path = qt3d + url = ../qt3d.git + branch = 5.15 + status = addon +[submodule "qtimageformats"] + depends = qtbase + path = qtimageformats + url = ../qtimageformats.git + branch = 5.15 + status = addon +[submodule "qtgraphicaleffects"] + depends = qtdeclarative + path = qtgraphicaleffects + url = ../qtgraphicaleffects.git + branch = 5.15 + status = essential +[submodule "qtquickcontrols"] + depends = qtdeclarative + recommends = qtgraphicaleffects + path = qtquickcontrols + url = ../qtquickcontrols.git + branch = 5.15 + status = addon +[submodule "qtserialbus"] + depends = qtbase + recommends = qtserialport + path = qtserialbus + url = ../qtserialbus.git + branch = 5.15 + status = addon +[submodule "qtserialport"] + depends = qtbase + path = qtserialport + url = ../qtserialport.git + branch = 5.15 + status = addon +[submodule "qtx11extras"] + depends = qtbase + path = qtx11extras + url = ../qtx11extras.git + branch = 5.15 + status = addon +[submodule "qtmacextras"] + depends = qtbase + path = qtmacextras + url = ../qtmacextras.git + branch = 5.15 + status = addon +[submodule "qtwinextras"] + depends = qtbase + recommends = qtdeclarative qtmultimedia + path = qtwinextras + url = ../qtwinextras.git + branch = 5.15 + status = addon +[submodule "qtandroidextras"] + depends = qtbase + path = qtandroidextras + url = ../qtandroidextras.git + branch = 5.15 + status = addon +[submodule "qtwebsockets"] + depends = qtbase + recommends = qtdeclarative + path = qtwebsockets + url = ../qtwebsockets.git + branch = 5.15 + status = addon +[submodule "qtwebchannel"] + depends = qtbase + recommends = qtdeclarative qtwebsockets + path = qtwebchannel + url = ../qtwebchannel.git + branch = 5.15 + status = addon +[submodule "qtwebengine"] + depends = qtdeclarative + recommends = qtquickcontrols qtquickcontrols2 qtlocation qtwebchannel qttools + path = qtwebengine + url = ../qtwebengine.git + branch = 5.15 + status = addon + priority = 10 +[submodule "qtcanvas3d"] + depends = qtdeclarative + path = qtcanvas3d + url = ../qtcanvas3d.git + branch = dev + status = ignore +[submodule "qtwebview"] + depends = qtdeclarative + recommends = qtwebengine + path = qtwebview + url = ../qtwebview.git + branch = 5.15 + status = addon +[submodule "qtquickcontrols2"] + depends = qtgraphicaleffects + recommends = qtimageformats + path = qtquickcontrols2 + url = ../qtquickcontrols2.git + branch = 5.15 + status = essential +[submodule "qtpurchasing"] + depends = qtbase + recommends = qtdeclarative qtandroidextras + path = qtpurchasing + url = ../qtpurchasing.git + branch = 5.15 + status = addon +[submodule "qtcharts"] + depends = qtbase + recommends = qtdeclarative qtmultimedia + path = qtcharts + url = ../qtcharts.git + branch = 5.15 + status = addon +[submodule "qtdatavis3d"] + depends = qtbase + recommends = qtdeclarative qtmultimedia + path = qtdatavis3d + url = ../qtdatavis3d.git + branch = 5.15 + status = addon +[submodule "qtvirtualkeyboard"] + depends = qtbase qtdeclarative qtsvg + recommends = qtmultimedia qtquickcontrols + path = qtvirtualkeyboard + url = ../qtvirtualkeyboard.git + branch = 5.15 + status = addon +[submodule "qtgamepad"] + depends = qtbase + recommends = qtdeclarative + path = qtgamepad + url = ../qtgamepad.git + branch = 5.15 + status = addon +[submodule "qtscxml"] + depends = qtbase qtdeclarative + path = qtscxml + url = ../qtscxml.git + branch = 5.15 + status = addon +[submodule "qtspeech"] + depends = qtbase + recommends = qtdeclarative qtmultimedia + path = qtspeech + url = ../qtspeech.git + branch = 5.15 + status = addon +[submodule "qtnetworkauth"] + depends = qtbase + path = qtnetworkauth + url = ../qtnetworkauth.git + branch = 5.15 + status = addon +[submodule "qtremoteobjects"] + depends = qtbase + recommends = qtdeclarative + path = qtremoteobjects + url = ../qtremoteobjects.git + branch = 5.15 + status = addon +[submodule "qtwebglplugin"] + depends = qtbase qtwebsockets + recommends = qtdeclarative + path = qtwebglplugin + url = ../qtwebglplugin.git + branch = 5.15 + status = addon +[submodule "qtlottie"] + depends = qtbase qtdeclarative + path = qtlottie + url = ../qtlottie.git + branch = 5.15 + status = addon +[submodule "qtquicktimeline"] + depends = qtbase qtdeclarative + path = qtquicktimeline + url = ../qtquicktimeline + branch = 5.15 + status = addon +[submodule "qtquick3d"] + depends = qtbase qtdeclarative + path = qtquick3d + url = ../qtquick3d.git + branch = 5.15 + status = addon diff --git a/recipes/qt/5.x.x/test_package/CMakeLists.txt b/recipes/qt/5.x.x/test_package/CMakeLists.txt index 0d11db68fc293..6c9a4ef2b991c 100644 --- a/recipes/qt/5.x.x/test_package/CMakeLists.txt +++ b/recipes/qt/5.x.x/test_package/CMakeLists.txt @@ -3,7 +3,7 @@ project(test_package LANGUAGES CXX) find_package(Qt5 COMPONENTS Core Network Sql Concurrent Xml REQUIRED CONFIG) -add_executable(${PROJECT_NAME} WIN32 test_package.cpp greeter.h example.qrc) +add_executable(${PROJECT_NAME} test_package.cpp greeter.h example.qrc) target_link_libraries(${PROJECT_NAME} PRIVATE Qt5::Core Qt5::Network Qt5::Sql Qt5::Concurrent Qt5::Xml) target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) set_target_properties(${PROJECT_NAME} PROPERTIES AUTOMOC ON AUTORCC ON) diff --git a/recipes/qt/5.x.x/test_package/conanfile.py b/recipes/qt/5.x.x/test_package/conanfile.py index 5a7b088d4aa41..9146ff6c3fbe3 100644 --- a/recipes/qt/5.x.x/test_package/conanfile.py +++ b/recipes/qt/5.x.x/test_package/conanfile.py @@ -28,17 +28,6 @@ def generate(self): qt_conf = textwrap.dedent(f"""\ [Paths] Prefix = {qt_install_prefix} - ArchData = bin/archdatadir - HostData = bin/archdatadir - Data = bin/datadir - Sysconf = bin/sysconfdir - LibraryExecutables = bin/archdatadir/bin - Plugins = bin/archdatadir/plugins - Imports = bin/archdatadir/imports - Qml2Imports = bin/archdatadir/qml - Translations = bin/datadir/translations - Documentation = bin/datadir/doc - Examples = bin/datadir/examples """) save(self, "qt.conf", qt_conf) diff --git a/recipes/qt/5.x.x/test_v1_package/CMakeLists.txt b/recipes/qt/5.x.x/test_v1_package/CMakeLists.txt index d5866335fec6a..a56d8c5c4fe51 100644 --- a/recipes/qt/5.x.x/test_v1_package/CMakeLists.txt +++ b/recipes/qt/5.x.x/test_v1_package/CMakeLists.txt @@ -18,6 +18,6 @@ set(CMAKE_AUTORCC ON) set(SOURCES ../test_package/test_package.cpp ../test_package/greeter.h ../test_package/example.qrc) -add_executable(${PROJECT_NAME} WIN32 ${SOURCES}) +add_executable(${PROJECT_NAME} ${SOURCES}) target_link_libraries(${PROJECT_NAME} Qt5::Core Qt5::Network Qt5::Sql Qt5::Concurrent Qt5::Xml) diff --git a/recipes/qt/5.x.x/test_v1_package/conanfile.py b/recipes/qt/5.x.x/test_v1_package/conanfile.py index 5cb2041d25d7d..45d17b452e41f 100644 --- a/recipes/qt/5.x.x/test_v1_package/conanfile.py +++ b/recipes/qt/5.x.x/test_v1_package/conanfile.py @@ -25,18 +25,7 @@ def build_requirements(self): def generate(self): save(self, "qt.conf", """[Paths] -Prefix = {} -ArchData = bin/archdatadir -HostData = bin/archdatadir -Data = bin/datadir -Sysconf = bin/sysconfdir -LibraryExecutables = bin/archdatadir/bin -Plugins = bin/archdatadir/plugins -Imports = bin/archdatadir/imports -Qml2Imports = bin/archdatadir/qml -Translations = bin/datadir/translations -Documentation = bin/datadir/doc -Examples = bin/datadir/examples""".format(self.dependencies["qt"].package_folder.replace('\\', '/'))) +Prefix = {}""".format(self.dependencies["qt"].package_folder.replace('\\', '/'))) def _is_mingw(self): return self.settings.os == "Windows" and self.settings.compiler == "gcc" diff --git a/recipes/qt/6.x.x/conandata.yml b/recipes/qt/6.x.x/conandata.yml index 4481994aa27ca..13ed2f886559f 100644 --- a/recipes/qt/6.x.x/conandata.yml +++ b/recipes/qt/6.x.x/conandata.yml @@ -1,19 +1,26 @@ sources: - "6.7.0": + "6.7.3": url: - - "https://download.qt.io/official_releases/qt/6.7/6.7.0/single/qt-everywhere-src-6.7.0.tar.xz" - - "https://download.qt.io/archive/qt/6.7/6.7.0/single/qt-everywhere-src-6.7.0.tar.xz" - - "https://qt.mirror.constant.com/archive/qt/6.7/6.7.0/single/qt-everywhere-src-6.7.0.tar.xz" - - "https://mirrors.ukfast.co.uk/sites/qt.io/archive/qt/6.7/6.7.0/single/qt-everywhere-src-6.7.0.tar.xz" - - "https://mirrors.20i.com/pub/qt.io/archive/qt/6.7/6.7.0/single/qt-everywhere-src-6.7.0.tar.xz" - - "https://ftp.nluug.nl/languages/qt/archive/qt/6.7/6.7.0/single/qt-everywhere-src-6.7.0.tar.xz" - - "https://mirror.netcologne.de/qtproject/archive/qt/6.7/6.7.0/single/qt-everywhere-src-6.7.0.tar.xz" - - "https://qt-mirror.dannhauer.de/archive/qt/6.7/6.7.0/single/qt-everywhere-src-6.7.0.tar.xz" - - "https://ftp.fau.de/qtproject/archive/qt/6.7/6.7.0/single/qt-everywhere-src-6.7.0.tar.xz" - - "https://ftp.acc.umu.se/mirror/qt.io/qtproject/archive/qt/6.7/6.7.0/single/qt-everywhere-src-6.7.0.tar.xz" - - "https://qtproject.mirror.liquidtelecom.com/archive/qt/6.7/6.7.0/single/qt-everywhere-src-6.7.0.tar.xz" - - "https://mirrors.sjtug.sjtu.edu.cn/qt/archive/qt/6.7/6.7.0/single/qt-everywhere-src-6.7.0.tar.xz" - sha256: "bf5089912364f99cf9baf6c109de76a3172eec6267f148c69800575c47f90087" + - "https://download.qt.io/official_releases/qt/6.7/6.7.3/single/qt-everywhere-src-6.7.3.tar.xz" + - "https://download.qt.io/archive/qt/6.7/6.7.3/single/qt-everywhere-src-6.7.3.tar.xz" + - "https://mirrors.ukfast.co.uk/sites/qt.io/archive/qt/6.7/6.7.3/single/qt-everywhere-src-6.7.3.tar.xz" + - "https://mirrors.20i.com/pub/qt.io/archive/qt/6.7/6.7.3/single/qt-everywhere-src-6.7.3.tar.xz" + - "https://ftp.nluug.nl/languages/qt/archive/qt/6.7/6.7.3/single/qt-everywhere-src-6.7.3.tar.xz" + - "https://mirror.netcologne.de/qtproject/archive/qt/6.7/6.7.3/single/qt-everywhere-src-6.7.3.tar.xz" + - "https://qt-mirror.dannhauer.de/archive/qt/6.7/6.7.3/single/qt-everywhere-src-6.7.3.tar.xz" + - "https://ftp.fau.de/qtproject/archive/qt/6.7/6.7.3/single/qt-everywhere-src-6.7.3.tar.xz" + - "https://mirrors.dotsrc.org/qtproject/archive/qt/6.7/6.7.3/single/qt-everywhere-src-6.7.3.tar.xz" + - "https://ftp.icm.edu.pl/packages/qt/archive/qt/6.7/6.7.3/single/qt-everywhere-src-6.7.3.tar.xz" + - "https://ftp.acc.umu.se/mirror/qt.io/qtproject/archive/qt/6.7/6.7.3/single/qt-everywhere-src-6.7.3.tar.xz" + - "https://www.nic.funet.fi/pub/mirrors/download.qt-project.org/archive/qt/6.7/6.7.3/single/qt-everywhere-src-6.7.3.tar.xz" + - "https://qt.mirror.constant.com/archive/qt/6.7/6.7.3/single/qt-everywhere-src-6.7.3.tar.xz" + - "https://mirrors.sau.edu.cn/qt/archive/qt/6.7/6.7.3/single/qt-everywhere-src-6.7.3.tar.xz" + - "https://mirrors.cloud.tencent.com/qt/archive/qt/6.7/6.7.3/single/qt-everywhere-src-6.7.3.tar.xz" + - "https://mirror.bjtu.edu.cn/qt/archive/qt/6.7/6.7.3/single/qt-everywhere-src-6.7.3.tar.xz" + - "https://mirrors.sjtug.sjtu.edu.cn/qt/archive/qt/6.7/6.7.3/single/qt-everywhere-src-6.7.3.tar.xz" + - "https://ftp.jaist.ac.jp/pub/qtproject/archive/qt/6.7/6.7.3/single/qt-everywhere-src-6.7.3.tar.xz" + - "https://ftp.yz.yamagata-u.ac.jp/pub/qtproject/archive/qt/6.7/6.7.3/single/qt-everywhere-src-6.7.3.tar.xz" + sha256: "a3f1d257cbb14c6536585ffccf7c203ce7017418e1a0c2ed7c316c20c729c801" "6.6.3": url: - "https://download.qt.io/official_releases/qt/6.6/6.6.3/single/qt-everywhere-src-6.6.3.tar.xz" @@ -37,55 +44,6 @@ sources: - "https://ftp.jaist.ac.jp/pub/qtproject/archive/qt/6.6/6.6.3/single/qt-everywhere-src-6.6.3.tar.xz" - "https://ftp.yz.yamagata-u.ac.jp/pub/qtproject/archive/qt/6.6/6.6.3/single/qt-everywhere-src-6.6.3.tar.xz" sha256: "69d0348fef415da98aa890a34651e9cfb232f1bffcee289b7b4e21386bf36104" - "6.6.2": - url: - - "https://download.qt.io/official_releases/qt/6.6/6.6.2/single/qt-everywhere-src-6.6.2.tar.xz" - - "https://download.qt.io/archive/qt/6.6/6.6.2/single/qt-everywhere-src-6.6.2.tar.xz" - - "https://mirrors.20i.com/pub/qt.io/archive/qt/6.6/6.6.2/single/qt-everywhere-src-6.6.2.tar.xz" - - "https://mirrors.ukfast.co.uk/sites/qt.io/archive/qt/6.6/6.6.2/single/qt-everywhere-src-6.6.2.tar.xz" - - "https://ftp.nluug.nl/languages/qt/archive/qt/6.6/6.6.2/single/qt-everywhere-src-6.6.2.tar.xz" - - "https://mirror.netcologne.de/qtproject/archive/qt/6.6/6.6.2/single/qt-everywhere-src-6.6.2.tar.xz" - - "https://qt-mirror.dannhauer.de/archive/qt/6.6/6.6.2/single/qt-everywhere-src-6.6.2.tar.xz" - - "https://ftp.fau.de/qtproject/archive/qt/6.6/6.6.2/single/qt-everywhere-src-6.6.2.tar.xz" - - "https://mirrors.dotsrc.org/qtproject/archive/qt/6.6/6.6.2/single/qt-everywhere-src-6.6.2.tar.xz" - - "https://ftp.acc.umu.se/mirror/qt.io/qtproject/archive/qt/6.6/6.6.2/single/qt-everywhere-src-6.6.2.tar.xz" - - "https://www.nic.funet.fi/pub/mirrors/download.qt-project.org/archive/qt/6.6/6.6.2/single/qt-everywhere-src-6.6.2.tar.xz" - - "https://qtproject.mirror.liquidtelecom.com/archive/qt/6.6/6.6.2/single/qt-everywhere-src-6.6.2.tar.xz" - - "https://qt.mirror.constant.com/archive/qt/6.6/6.6.2/single/qt-everywhere-src-6.6.2.tar.xz" - - "https://mirrors.sau.edu.cn/qt/archive/qt/6.6/6.6.2/single/qt-everywhere-src-6.6.2.tar.xz" - - "https://mirrors.cloud.tencent.com/qt/archive/qt/6.6/6.6.2/single/qt-everywhere-src-6.6.2.tar.xz" - - "https://mirrors.ustc.edu.cn/qtproject/archive/qt/6.6/6.6.2/single/qt-everywhere-src-6.6.2.tar.xz" - - "https://mirrors.sjtug.sjtu.edu.cn/qt/archive/qt/6.6/6.6.2/single/qt-everywhere-src-6.6.2.tar.xz" - - "https://ftp.jaist.ac.jp/pub/qtproject/archive/qt/6.6/6.6.2/single/qt-everywhere-src-6.6.2.tar.xz" - - "https://ftp.yz.yamagata-u.ac.jp/pub/qtproject/archive/qt/6.6/6.6.2/single/qt-everywhere-src-6.6.2.tar.xz" - sha256: "3c1e42b3073ade1f7adbf06863c01e2c59521b7cc2349df2f74ecd7ebfcb922d" - "6.6.1": - url: - - "https://download.qt.io/official_releases/qt/6.6/6.6.1/single/qt-everywhere-src-6.6.1.tar.xz" - - "https://download.qt.io/archive/qt/6.6/6.6.1/single/qt-everywhere-src-6.6.1.tar.xz" - - "https://mirrors.sjtug.sjtu.edu.cn/qt/archive/qt/6.6/6.6.1/single/qt-everywhere-src-6.6.1.tar.xz" - sha256: "dd3668f65645fe270bc615d748bd4dc048bd17b9dc297025106e6ecc419ab95d" - "6.6.0": - url: - - "https://download.qt.io/official_releases/qt/6.6/6.6.0/single/qt-everywhere-src-6.6.0.tar.xz" - - "https://download.qt.io/archive/qt/6.6/6.6.0/single/qt-everywhere-src-6.6.0.tar.xz" - - "https://qt.mirror.constant.com/archive/qt/6.6/6.6.0/single/qt-everywhere-src-6.6.0.tar.xz" - - "https://mirrors.ukfast.co.uk/sites/qt.io/archive/qt/6.6/6.6.0/single/qt-everywhere-src-6.6.0.tar.xz" - - "https://mirrors.20i.com/pub/qt.io/archive/qt/6.6/6.6.0/single/qt-everywhere-src-6.6.0.tar.xz" - - "https://ftp.nluug.nl/languages/qt/archive/qt/6.6/6.6.0/single/qt-everywhere-src-6.6.0.tar.xz" - - "https://mirror.netcologne.de/qtproject/archive/qt/6.6/6.6.0/single/qt-everywhere-src-6.6.0.tar.xz" - - "https://mirror.web4africa.ng/qt/archive/qt/6.6/6.6.0/single/qt-everywhere-src-6.6.0.tar.xz" - - "https://qt-mirror.dannhauer.de/archive/qt/6.6/6.6.0/single/qt-everywhere-src-6.6.0.tar.xz" - - "https://ftp.fau.de/qtproject/archive/qt/6.6/6.6.0/single/qt-everywhere-src-6.6.0.tar.xz" - - "https://mirrors.dotsrc.org/qtproject/archive/qt/6.6/6.6.0/single/qt-everywhere-src-6.6.0.tar.xz" - - "https://ftp.icm.edu.pl/packages/qt/archive/qt/6.6/6.6.0/single/qt-everywhere-src-6.6.0.tar.xz" - - "https://ftp.acc.umu.se/mirror/qt.io/qtproject/archive/qt/6.6/6.6.0/single/qt-everywhere-src-6.6.0.tar.xz" - - "https://www.nic.funet.fi/pub/mirrors/download.qt-project.org/archive/qt/6.6/6.6.0/single/qt-everywhere-src-6.6.0.tar.xz" - - "https://qtproject.mirror.liquidtelecom.com/archive/qt/6.6/6.6.0/single/qt-everywhere-src-6.6.0.tar.xz" - - "https://mirrors.sjtug.sjtu.edu.cn/qt/archive/qt/6.6/6.6.0/single/qt-everywhere-src-6.6.0.tar.xz" - - "https://ftp.jaist.ac.jp/pub/qtproject/archive/qt/6.6/6.6.0/single/qt-everywhere-src-6.6.0.tar.xz" - - "https://ftp.yz.yamagata-u.ac.jp/pub/qtproject/archive/qt/6.6/6.6.0/single/qt-everywhere-src-6.6.0.tar.xz" - sha256: "652538fcb5d175d8f8176c84c847b79177c87847b7273dccaec1897d80b50002" "6.5.3": url: - "https://download.qt.io/official_releases/qt/6.5/6.5.3/single/qt-everywhere-src-6.5.3.tar.xz" @@ -106,24 +64,8 @@ sources: - "https://ftp.jaist.ac.jp/pub/qtproject/archive/qt/6.5/6.5.3/single/qt-everywhere-src-6.5.3.tar.xz" - "https://ftp.yz.yamagata-u.ac.jp/pub/qtproject/archive/qt/6.5/6.5.3/single/qt-everywhere-src-6.5.3.tar.xz" sha256: "7cda4d119aad27a3887329cfc285f2aba5da85601212bcb0aea27bd6b7b544cb" - "6.4.2": - url: - - "https://download.qt.io/archive/qt/6.4/6.4.2/single/qt-everywhere-src-6.4.2.tar.xz" - - "https://qt-mirror.dannhauer.de/archive/qt/6.4/6.4.2/single/qt-everywhere-src-6.4.2.tar.xz" - - "https://www.funet.fi/pub/mirrors/download.qt-project.org/archive/qt/6.4/6.4.2/single/qt-everywhere-src-6.4.2.tar.xz" - - "https://ftp.fau.de/qtproject/archive/qt/6.4/6.4.2/single/qt-everywhere-src-6.4.2.tar.xz" - - "https://mirrors.ustc.edu.cn/qtproject/archive/qt/6.4/6.4.2/single/qt-everywhere-src-6.4.2.tar.xz" - sha256: "689f53e6652da82fccf7c2ab58066787487339f28d1ec66a8765ad357f4976be" - "6.3.2": - url: - - "https://download.qt.io/archive/qt/6.3/6.3.2/single/qt-everywhere-src-6.3.2.tar.xz" - - "https://qt-mirror.dannhauer.de/archive/qt/6.3/6.3.2/single/qt-everywhere-src-6.3.2.tar.xz" - - "https://www.funet.fi/pub/mirrors/download.qt-project.org/archive/qt/6.3/6.3.2/single/qt-everywhere-src-6.3.2.tar.xz" - - "https://ftp.fau.de/qtproject/archive/qt/6.3/6.3.2/single/qt-everywhere-src-6.3.2.tar.xz" - - "https://mirrors.ustc.edu.cn/qtproject/archive/qt/6.3/6.3.2/single/qt-everywhere-src-6.3.2.tar.xz" - sha256: "b90524f686224a0e5a945c1d65307e16a375348dbe275c9ac11de171fe31374a" patches: - "6.7.0": + "6.7.3": - "base_path": "qtwebengine" "patch_description": "Workaround for too long .rps file name" "patch_file": "patches/c72097e_6.6.0.diff" @@ -135,44 +77,6 @@ patches: "patch_file": "patches/c72097e_6.6.0.diff" "patch_source": "https://codereview.qt-project.org/c/yocto/meta-qt5/+/192172" "patch_type": "bugfix" - "6.6.2": - - "base_path": "qtwebengine" - "patch_description": "Workaround for too long .rps file name" - "patch_file": "patches/c72097e_6.6.0.diff" - "patch_source": "https://codereview.qt-project.org/c/yocto/meta-qt5/+/192172" - "patch_type": "bugfix" - "6.6.1": - - "base_path": "qtwebengine" - "patch_description": "Workaround for too long .rps file name" - "patch_file": "patches/c72097e_6.6.0.diff" - "patch_type": "bugfix" - "patch_source": "https://codereview.qt-project.org/c/yocto/meta-qt5/+/192172" - - "base_path": "qtbase" - "patch_description": "Fix build error with lambda on GCC 9.2" - "patch_file": "patches/32fa63f.patch" - "patch_type": "bugfix" - "patch_source": "https://bugreports.qt.io/browse/QTBUG-112920" - - "base_path": "qtbase" - "patch_description": "Use absolute path in the generated header files to avoid relative path longer than 250 characters (not supported on by msvc compiler)" - "patch_file": "patches/fix-long-path-on-windows_6.6.1.patch" - "patch_type": "bugfix" - "patch_source": "https://code.qt.io/cgit/qt/qtbase.git/commit/?id=b4246a5c28472de3c4b6a85a3daf4a1d578894ab" - "6.6.0": - - "base_path": "qtwebengine" - "patch_description": "Workaround for too long .rps file name" - "patch_file": "patches/c72097e_6.6.0.diff" - "patch_type": "bugfix" - "patch_source": "https://codereview.qt-project.org/c/yocto/meta-qt5/+/192172" - - "base_path": "qtbase" - "patch_description": "Fix build error with lambda on GCC 9.2" - "patch_file": "patches/32fa63f.patch" - "patch_type": "bugfix" - "patch_source": "https://bugreports.qt.io/browse/QTBUG-112920" - - "base_path": "qtbase" - "patch_description": "Use absolute path in the generated header files to avoid relative path longer than 250 characters (not supported on by msvc compiler)" - "patch_file": "patches/fix-long-path-on-windows_6.6.0.patch" - "patch_type": "bugfix" - "patch_source": "https://code.qt.io/cgit/qt/qtbase.git/commit/?id=b4246a5c28472de3c4b6a85a3daf4a1d578894ab" "6.5.3": - "base_path": "qtwebengine" "patch_description": "Workaround for too long .rps file name" @@ -189,45 +93,3 @@ patches: "patch_file": "patches/fix-long-path-on-windows_6.5.3.patch" "patch_type": "bugfix" "patch_source": "https://code.qt.io/cgit/qt/qtbase.git/commit/?id=b4246a5c28472de3c4b6a85a3daf4a1d578894ab" - "6.4.2": - - base_path: "qtbase/cmake" - patch_description: "Fix pri helpers" - patch_file: "patches/qt6-pri-helpers-fix.diff" - patch_type: "bugfix" - patch_source: "https://bugreports.qt.io/browse/QTBUG-95569" - - patch_file: "patches/c72097e.diff" - base_path: "qtwebengine" - patch_description: "Workaround for too long .rps file name" - patch_type: "bugfix" - patch_source: "https://codereview.qt-project.org/c/yocto/meta-qt5/+/192172" - - patch_file: "patches/d13958d.diff" - base_path: "qtbase" - patch_description: "Fix PCRE2 detection" - patch_type: "bugfix" - patch_source: "https://codereview.qt-project.org/c/qt/qtbase/+/445885" - - patch_file: "patches/fix_cmake3.28.patch" - base_path: "qtbase" - patch_description: "CMake: Fix build with CMake 3.28 on macOS" - patch_source: "https://github.com/qt/qtbase/commit/0efea8020c1d221635aaa0a71529edb392cfe3cc" - patch_type: "bugfix" - "6.3.2": - - base_path: "qtbase/cmake" - patch_description: "Fix pri helpers" - patch_file: "patches/qt6-pri-helpers-fix.diff" - patch_type: "bugfix" - patch_source: "https://bugreports.qt.io/browse/QTBUG-95569" - - patch_file: "patches/c72097e.diff" - base_path: "qtwebengine" - patch_description: "Workaround for too long .rps file name" - patch_type: "bugfix" - patch_source: "https://codereview.qt-project.org/c/yocto/meta-qt5/+/192172" - - patch_file: "patches/d13958d.diff" - base_path: "qtbase" - patch_description: "Fix PCRE2 detection" - patch_source: "https://codereview.qt-project.org/c/qt/qtbase/+/445885" - patch_type: "bugfix" - - patch_file: "patches/fix_cmake3.28.patch" - base_path: "qtbase" - patch_description: "CMake: Fix build with CMake 3.28 on macOS" - patch_source: "https://github.com/qt/qtbase/commit/0efea8020c1d221635aaa0a71529edb392cfe3cc" - patch_type: "bugfix" diff --git a/recipes/qt/6.x.x/conanfile.py b/recipes/qt/6.x.x/conanfile.py index 4a2fb7512fa85..508b43c683f44 100644 --- a/recipes/qt/6.x.x/conanfile.py +++ b/recipes/qt/6.x.x/conanfile.py @@ -1,9 +1,10 @@ import configparser import glob import os +import platform import textwrap -from conan import ConanFile +from conan import ConanFile, conan_version from conan.tools.apple import is_apple_os from conan.tools.build import cross_building, check_min_cppstd, default_cppstd from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout @@ -121,9 +122,10 @@ class QtConan(ConanFile): "sysroot": None, "multiconfiguration": False, "disabled_features": "", - "essential_modules": not os.getenv('CONAN_CENTER_BUILD_SERVICE') } - default_options.update({f"{status}_modules": False for status in _module_statuses if status != "essential"}) + # essential_modules, addon_modules, deprecated_modules, preview_modules: + # these are only provided for convenience, set to False by default + default_options.update({f"{status}_modules": False for status in _module_statuses}) short_paths = True @@ -181,9 +183,10 @@ def config_options(self): if self.settings.os != "Linux": self.options.qtwayland = False - for m in self._submodules: - if m not in self._get_module_tree: - delattr(self.options, m) + for submodule in self._submodules: + if submodule not in self._get_module_tree: + self._debug_output(f"Qt6: Removing {submodule} option as it is not in the module tree for this version, or is marked as obsolete or ignore") + self.options.rm_safe(submodule) @property def _minimum_compilers_version(self): @@ -196,6 +199,10 @@ def _minimum_compilers_version(self): "apple-clang": "12" if Version(self.version) >= "6.5.0" else "11" } + def _debug_output(self, message): + if Version(conan_version) >= "2": + self.output.debug(message) + def configure(self): if not self.options.gui: del self.options.opengl @@ -212,28 +219,48 @@ def configure(self): if self.options.multiconfiguration: del self.settings.build_type - def _enablemodule(mod): - if mod != "qtbase": - setattr(self.options, mod, True) - for req in self._get_module_tree[mod]["depends"]: - _enablemodule(req) - - # enable all modules which are - # - required by a module explicitely enabled by the consumer - for module_name, module in self._get_module_tree.items(): - if getattr(self.options, module_name): - _enablemodule(module_name) - else: - for status in self._module_statuses: - if getattr(self.options, f"{status}_modules") and module['status'] == status: - _enablemodule(module_name) - break - - # disable all modules which are: - # - not explicitely enabled by the consumer and - # - not required by a module explicitely enabled by the consumer - for module in self._get_module_tree: - if getattr(self.options, module).value is None: + # Requested modules: + # - any module for non-removed options that have 'True' value + # - any enabled via `xxx_modules` that does not have a 'False' value + # Note that at this point, the submodule options dont have a value unless one is given externally + # to the recipe (e.g. via the command line, a profile, or a consumer) + requested_modules = set([module for module in self._submodules if self.options.get_safe(module)]) + for module in [m for m in self._submodules if m in self._get_module_tree]: + status = self._get_module_tree[module]['status'] + is_disabled = self.options.get_safe(module) == False + if self.options.get_safe(f"{status}_modules"): + if not is_disabled: + requested_modules.add(module) + else: + self.output.warning(f"qt6: {module} requested because {status}_modules=True" + f" but it has been explicitly disabled with {module}=False") + + self.output.info(f"qt6: requested modules {list(requested_modules)}") + + required_modules = {} + for module in requested_modules: + deps = self._get_module_tree[module]["depends"] + for dep in deps: + required_modules.setdefault(dep,[]).append(module) + + required_but_disabled = [m for m in required_modules.keys() if self.options.get_safe(m) == False] + if required_modules: + self._debug_output(f"qt6: required_modules modules {list(required_modules.keys())}") + if required_but_disabled: + required_by = set() + for m in required_but_disabled: + required_by.update(required_modules[m]) + raise ConanInvalidConfiguration(f"Modules {required_but_disabled} are explicitly disabled, " + f"but are required by {list(required_by)}, enabled by other options") + + enabled_modules = requested_modules.union(set(required_modules.keys())) + enabled_modules.discard("qtbase") + + for module in list(enabled_modules): + setattr(self.options, module, True) + + for module in self._submodules: + if module in self.options and not self.options.get_safe(module): setattr(self.options, module, False) if not self.options.get_safe("qtmultimedia"): @@ -246,6 +273,16 @@ def _enablemodule(mod): if self.options.get_safe("qtwebengine"): self.options.with_fontconfig = True + for status in self._module_statuses: + # These are convenience only, should not affect package_id + option_name = f"{status}_modules" + self._debug_output(f"qt6 removing convenience option: {option_name}," + f" see individual module options") + self.options.rm_safe(option_name) + + for option in self.options.items(): + self._debug_output(f"qt6 option: {option}") + def validate(self): if os.getenv('CONAN_CENTER_BUILD_SERVICE') is not None: if self.info.settings.compiler == "gcc" and Version(self.info.settings.compiler.version) >= "11" or \ @@ -267,9 +304,6 @@ def validate(self): if Version(self.version) >= "6.6.1" and self.settings.compiler == "apple-clang" and Version(self.settings.compiler.version) < "13.1": raise ConanInvalidConfiguration("apple-clang >= 13.1 is required by qt >= 6.6.1 cf QTBUG-119490") - if self.settings.os == "Macos" and self.dependencies["double-conversion"].options.shared: - raise ConanInvalidConfiguration("Test recipe fails because of Macos' SIP. Contributions are welcome.") - if self.options.get_safe("qtwebengine"): if not self.options.shared: raise ConanInvalidConfiguration("Static builds of Qt WebEngine are not supported") @@ -329,7 +363,12 @@ def requirements(self): if self.options.with_pcre2: self.requires("pcre2/10.42") if self.options.get_safe("with_vulkan"): - self.requires("vulkan-loader/1.3.268.0") + # Note: the versions of vulkan-loader and moltenvk + # must be exactly part of the same Vulkan SDK version + # do not update either without checking both + # require exactly the same version of vulkan-headers + self.requires("vulkan-loader/1.3.239.0") + self.requires("vulkan-headers/1.3.239.0", transitive_headers=True) if is_apple_os(self): self.requires("moltenvk/1.2.2") if self.options.with_glib: @@ -346,13 +385,13 @@ def requirements(self): self.requires("harfbuzz/8.3.0") if self.options.get_safe("with_libjpeg", False) and not self.options.multiconfiguration: if self.options.with_libjpeg == "libjpeg-turbo": - self.requires("libjpeg-turbo/3.0.1") + self.requires("libjpeg-turbo/[>=3.0 <3.1]") else: self.requires("libjpeg/9e") if self.options.get_safe("with_libpng", False) and not self.options.multiconfiguration: - self.requires("libpng/1.6.42") + self.requires("libpng/[>=1.6 <2]") if self.options.with_sqlite3 and not self.options.multiconfiguration: - self.requires("sqlite3/3.45.0") + self.requires("sqlite3/[>=3.45.0 <4]") if self.options.get_safe("with_mysql", False): self.requires("libmysqlclient/8.1.0") if self.options.with_pq: @@ -379,7 +418,7 @@ def requirements(self): if self.options.with_brotli: self.requires("brotli/1.1.0") if self.options.get_safe("qtwebengine") and self.settings.os == "Linux": - self.requires("expat/2.6.0") + self.requires("expat/[>=2.6.2 <3]") self.requires("opus/1.4") self.requires("xorg-proto/2022.2") self.requires("libxshmfence/1.3") @@ -399,9 +438,9 @@ def requirements(self): def build_requirements(self): self.tool_requires("cmake/[>=3.21.1 <4]") - self.tool_requires("ninja/1.11.1") + self.tool_requires("ninja/[>=1.12 <2]") if not self.conf.get("tools.gnu:pkg_config", check_type=str): - self.tool_requires("pkgconf/2.1.0") + self.tool_requires("pkgconf/[>=2.2 <3]") if self.settings.os == "Windows": self.tool_requires('strawberryperl/5.32.1.1') @@ -477,12 +516,7 @@ def generate(self): tc = CMakeToolchain(self, generator="Ninja") - package_folder = self.package_folder.replace('\\', '/') - tc.variables["INSTALL_MKSPECSDIR"] = f"{package_folder}/res/archdatadir/mkspecs" - tc.variables["INSTALL_ARCHDATADIR"] = f"{package_folder}/res/archdatadir" - tc.variables["INSTALL_LIBEXECDIR"] = f"{package_folder}/bin" - tc.variables["INSTALL_DATADIR"] = f"{package_folder}/res/datadir" - tc.variables["INSTALL_SYSCONFDIR"] = f"{package_folder}/res/sysconfdir" + tc.absolute_paths = True tc.variables["QT_BUILD_TESTS"] = "OFF" tc.variables["QT_BUILD_EXAMPLES"] = "OFF" @@ -525,6 +559,16 @@ def generate(self): tc.variables["FEATURE_dbus"] = "OFF" tc.variables["CMAKE_FIND_DEBUG_MODE"] = "FALSE" + if not self.options.with_zstd: + tc.variables["CMAKE_DISABLE_FIND_PACKAGE_WrapZSTD"] = "ON" + + if not self.options.get_safe("with_vulkan"): + tc.variables["CMAKE_DISABLE_FIND_PACKAGE_WrapVulkanHeaders"] = "ON" + + # Prevent finding LibClang from the system + # this is needed by the QDoc tool inside Qt Tools + # See: https://github.com/conan-io/conan-center-index/issues/24729#issuecomment-2255291495 + tc.variables["CMAKE_DISABLE_FIND_PACKAGE_WrapLibClang"] = "ON" for opt, conf_arg in [("with_glib", "glib"), ("with_icu", "icu"), @@ -646,12 +690,10 @@ def package_id(self): self.info.settings.compiler.runtime_type = "Release/Debug" if self.info.settings.os == "Android": del self.info.options.android_sdk - for status in self._module_statuses: - delattr(self.info.options, f"{status}_modules") def source(self): destination = self.source_folder - if self.info.settings.os == "Windows": + if platform.system() == "Windows": # Don't use os.path.join, or it removes the \\?\ prefix, which enables long paths destination = rf"\\?\{self.source_folder}" get(self, **self.conan_data["sources"][self.version], @@ -684,6 +726,13 @@ def source(self): "qt_auto_detect_vcpkg()", "# qt_auto_detect_vcpkg()") + # Handle locating moltenvk headers when vulkan is enabled on macOS + replace_in_file(self, os.path.join(self.source_folder, "qtbase", "cmake", "FindWrapVulkanHeaders.cmake"), + "if(APPLE)", "if(APPLE)\n" + " find_package(moltenvk REQUIRED QUIET)\n" + " target_include_directories(WrapVulkanHeaders::WrapVulkanHeaders INTERFACE ${moltenvk_INCLUDE_DIR})" + ) + def _xplatform(self): if self.settings.os == "Linux": if self.settings.compiler == "gcc": @@ -818,7 +867,7 @@ def package(self): rm(self, "*.la*", os.path.join(self.package_folder, "lib"), recursive=True) rm(self, "*.pdb*", self.package_folder, recursive=True) rm(self, "ensure_pro_file.cmake", self.package_folder, recursive=True) - os.remove(os.path.join(self.package_folder, "bin", "qt-cmake-private-install.cmake")) + os.remove(os.path.join(self.package_folder, "libexec" if Version(self.version) >= "6.5.0" and self.settings.os != "Windows" else "bin", "qt-cmake-private-install.cmake")) for m in os.listdir(os.path.join(self.package_folder, "lib", "cmake")): if os.path.isfile(os.path.join(self.package_folder, "lib", "cmake", m, f"{m}Macros.cmake")): @@ -839,6 +888,8 @@ def package(self): filecontents += f"set(QT_VERSION_MAJOR {ver.major})\n" filecontents += f"set(QT_VERSION_MINOR {ver.minor})\n" filecontents += f"set(QT_VERSION_PATCH {ver.patch})\n" + if self.settings.os == "Macos": + filecontents += 'set(__qt_internal_cmake_apple_support_files_path "${CMAKE_CURRENT_LIST_DIR}/../../../lib/cmake/Qt6/macos")\n' targets = ["moc", "rcc", "tracegen", "cmake_automoc_parser", "qlalr", "qmake"] if self.options.with_dbus: targets.extend(["qdbuscpp2xml", "qdbusxml2cpp"]) @@ -857,7 +908,8 @@ def package(self): targets.append("qsb") if self.options.qtdeclarative: targets.extend(["qmltyperegistrar", "qmlcachegen", "qmllint", "qmlimportscanner"]) - targets.extend(["qmlformat", "qml", "qmlprofiler", "qmlpreview", "qmltestrunner"]) + targets.extend(["qmlformat", "qml", "qmlprofiler", "qmlpreview"]) + # Note: consider "qmltestrunner", see https://github.com/conan-io/conan-center-index/issues/24276 if self.options.get_safe("qtremoteobjects"): targets.append("repc") if self.options.get_safe("qtscxml"): @@ -865,10 +917,13 @@ def package(self): for target in targets: exe_path = None for path_ in [f"bin/{target}{extension}", - f"lib/{target}{extension}"]: + f"lib/{target}{extension}", + f"libexec/{target}{extension}"]: if os.path.isfile(os.path.join(self.package_folder, path_)): exe_path = path_ break + else: + assert False, f"Could not find executable {target}{extension} in {self.package_folder}" if not exe_path: self.output.warning(f"Could not find path to {target}{extension}") filecontents += textwrap.dedent(f"""\ @@ -919,6 +974,8 @@ def _create_private_module(module, dependencies): save(self, os.path.join(self.package_folder, "lib", "cmake", "Qt6Qml", "conan_qt_qt6_policies.cmake"), textwrap.dedent("""\ set(QT_KNOWN_POLICY_QTP0001 TRUE) """)) + if self.options.gui and self.options.qtshadertools: + _create_private_module("Quick", ["CorePrivate", "GuiPrivate", "QmlPrivate", "Quick"]) if self.settings.os in ["Windows", "iOS"]: contents = textwrap.dedent("""\ @@ -943,8 +1000,8 @@ def package_info(self): self.cpp_info.names["cmake_find_package_multi"] = "Qt6" # consumers will need the QT_PLUGIN_PATH defined in runenv - self.runenv_info.define("QT_PLUGIN_PATH", os.path.join(self.package_folder, "res", "archdatadir", "plugins")) - self.buildenv_info.define("QT_PLUGIN_PATH", os.path.join(self.package_folder, "res", "archdatadir", "plugins")) + self.runenv_info.define("QT_PLUGIN_PATH", os.path.join(self.package_folder, "plugins")) + self.buildenv_info.define("QT_PLUGIN_PATH", os.path.join(self.package_folder, "plugins")) self.buildenv_info.define("QT_HOST_PATH", self.package_folder) @@ -1001,7 +1058,7 @@ def _create_plugin(pluginname, libname, plugintype, requires): self.cpp_info.components[componentname].names["cmake_find_package_multi"] = pluginname if not self.options.shared: self.cpp_info.components[componentname].libs = [libname + libsuffix] - self.cpp_info.components[componentname].libdirs = [os.path.join("res", "archdatadir", "plugins", plugintype)] + self.cpp_info.components[componentname].libdirs = [os.path.join("plugins", plugintype)] self.cpp_info.components[componentname].includedirs = [] if "Core" not in requires: requires.append("Core") @@ -1024,7 +1081,7 @@ def _create_plugin(pluginname, libname, plugintype, requires): _create_module("Core", core_reqs) pkg_config_vars = [ "bindir=${prefix}/bin", - "libexecdir=${prefix}/bin", + "libexecdir=${prefix}/libexec", "exec_prefix=${prefix}", ] self.cpp_info.components["qtCore"].set_property("pkg_config_custom_content", "\n".join(pkg_config_vars)) @@ -1041,7 +1098,7 @@ def _create_plugin(pluginname, libname, plugintype, requires): self.cpp_info.components["qtPlatform"].set_property("cmake_target_name", "Qt6::Platform") self.cpp_info.components["qtPlatform"].names["cmake_find_package"] = "Platform" self.cpp_info.components["qtPlatform"].names["cmake_find_package_multi"] = "Platform" - self.cpp_info.components["qtPlatform"].includedirs = [os.path.join("res", "archdatadir", "mkspecs", self._xplatform())] + self.cpp_info.components["qtPlatform"].includedirs = [os.path.join("mkspecs", self._xplatform())] if self.options.with_dbus: _create_module("DBus", ["dbus::dbus"]) if self.settings.os == "Windows": @@ -1071,6 +1128,7 @@ def _create_plugin(pluginname, libname, plugintype, requires): gui_reqs.append("opengl::opengl") if self.options.get_safe("with_vulkan", False): gui_reqs.append("vulkan-loader::vulkan-loader") + gui_reqs.append("vulkan-headers::vulkan-headers") if is_apple_os(self): gui_reqs.append("moltenvk::moltenvk") if self.options.with_harfbuzz: @@ -1220,6 +1278,7 @@ def _create_plugin(pluginname, libname, plugintype, requires): self.cpp_info.components["qtQmlImportScanner"].requires = _get_corrected_reqs(["Qml"]) if qt_quick_enabled: _create_module("Quick", ["Gui", "Qml", "QmlModels"]) + _add_build_module("qtQuick", self._cmake_qt6_private_file("Quick")) if self.options.widgets: _create_module("QuickWidgets", ["Gui", "Qml", "Quick", "Widgets"]) _create_module("QuickShapes", ["Gui", "Qml", "Quick"]) @@ -1501,7 +1560,7 @@ def _create_plugin(pluginname, libname, plugintype, requires): # https://github.com/qt/qtbase/blob/v6.6.1/src/corelib/CMakeLists.txt#L1079-L1082 self.cpp_info.components["qtCore"].frameworks.append("WatchKit") - self.cpp_info.components["qtCore"].builddirs.append(os.path.join("res", "archdatadir", "bin")) + self.cpp_info.components["qtCore"].builddirs.append(os.path.join("bin")) _add_build_module("qtCore", self._cmake_executables_file) _add_build_module("qtCore", self._cmake_qt6_private_file("Core")) if self.settings.os in ["Windows", "iOS"]: @@ -1537,10 +1596,8 @@ def _create_plugin(pluginname, libname, plugintype, requires): component = "qt" + m[:m.find("_")] if component not in self.cpp_info.components: continue - submodules_dir = os.path.join(object_dir, m) - for sub_dir in os.listdir(submodules_dir): - submodule_dir = os.path.join(submodules_dir, sub_dir) - obj_files = [os.path.join(submodule_dir, file) for file in os.listdir(submodule_dir)] + for root, _, files in os.walk(os.path.join(object_dir, m)): + obj_files = [os.path.join(root, file) for file in files] self.cpp_info.components[component].exelinkflags.extend(obj_files) self.cpp_info.components[component].sharedlinkflags.extend(obj_files) diff --git a/recipes/qt/6.x.x/qtmodules6.3.2.conf b/recipes/qt/6.x.x/qtmodules6.3.2.conf deleted file mode 100644 index b0e0878e68e97..0000000000000 --- a/recipes/qt/6.x.x/qtmodules6.3.2.conf +++ /dev/null @@ -1,305 +0,0 @@ -[submodule "qtbase"] - path = qtbase - url = ../qtbase.git - branch = 6.3.2 - status = essential -[submodule "qtsvg"] - depends = qtbase - path = qtsvg - url = ../qtsvg.git - branch = 6.3.2 - status = addon -[submodule "qtdeclarative"] - depends = qtbase - recommends = qtimageformats qtshadertools qtsvg qtlanguageserver - path = qtdeclarative - url = ../qtdeclarative.git - branch = 6.3.2 - status = essential -[submodule "qtactiveqt"] - depends = qtbase - path = qtactiveqt - url = ../qtactiveqt.git - branch = 6.3.2 - status = addon -[submodule "qtmultimedia"] - depends = qtbase qtshadertools - recommends = qtdeclarative - path = qtmultimedia - url = ../qtmultimedia.git - branch = 6.3.2 - status = addon -[submodule "qttools"] - depends = qtbase - recommends = qtdeclarative qtactiveqt - path = qttools - url = ../qttools.git - branch = 6.3.2 - status = essential -[submodule "qtxmlpatterns"] - depends = qtbase - recommends = qtdeclarative - path = qtxmlpatterns - url = ../qtxmlpatterns.git - branch = 6.3 - status = ignore -[submodule "qttranslations"] - depends = qttools - path = qttranslations - url = ../qttranslations.git - branch = 6.3.2 - status = essential - priority = 30 -[submodule "qtdoc"] - depends = qtdeclarative qttools - recommends = qtmultimedia - path = qtdoc - url = ../qtdoc.git - branch = 6.3.2 - status = essential - priority = 40 -[submodule "qtrepotools"] - path = qtrepotools - url = ../qtrepotools.git - branch = master - status = essential - project = - -[submodule "qtqa"] - depends = qtbase - path = qtqa - url = ../qtqa.git - branch = dev - status = essential - priority = 50 -[submodule "qtlocation"] - depends = qtbase qtpositioning - recommends = qtdeclarative - path = qtlocation - url = ../qtlocation.git - branch = 6.3 - status = ignore -[submodule "qtpositioning"] - depends = qtbase - recommends = qtdeclarative qtserialport - path = qtpositioning - url = ../qtpositioning.git - branch = 6.3.2 - status = addon -[submodule "qtsensors"] - depends = qtbase - recommends = qtdeclarative - path = qtsensors - url = ../qtsensors.git - branch = 6.3.2 - status = addon -[submodule "qtsystems"] - depends = qtbase - recommends = qtdeclarative - path = qtsystems - url = ../qtsystems.git - branch = dev - status = ignore -[submodule "qtfeedback"] - depends = qtdeclarative - recommends = qtmultimedia - path = qtfeedback - url = ../qtfeedback.git - branch = master - status = ignore -[submodule "qtpim"] - depends = qtdeclarative - path = qtpim - url = ../qtpim.git - branch = dev - status = ignore -[submodule "qtconnectivity"] - depends = qtbase - recommends = qtdeclarative - path = qtconnectivity - url = ../qtconnectivity.git - branch = 6.3.2 - status = addon -[submodule "qtwayland"] - depends = qtbase - recommends = qtdeclarative - path = qtwayland - url = ../qtwayland.git - branch = 6.3.2 - status = addon -[submodule "qt3d"] - depends = qtbase - recommends = qtdeclarative qtshadertools - path = qt3d - url = ../qt3d.git - branch = 6.3.2 - status = addon -[submodule "qtimageformats"] - depends = qtbase - path = qtimageformats - url = ../qtimageformats.git - branch = 6.3.2 - status = addon -[submodule "qtserialbus"] - depends = qtbase - recommends = qtserialport - path = qtserialbus - url = ../qtserialbus.git - branch = 6.3.2 - status = addon -[submodule "qtserialport"] - depends = qtbase - path = qtserialport - url = ../qtserialport.git - branch = 6.3.2 - status = addon -[submodule "qtwebsockets"] - depends = qtbase - recommends = qtdeclarative - path = qtwebsockets - url = ../qtwebsockets.git - branch = 6.3.2 - status = addon -[submodule "qtwebchannel"] - depends = qtbase - recommends = qtdeclarative qtwebsockets - path = qtwebchannel - url = ../qtwebchannel.git - branch = 6.3.2 - status = addon -[submodule "qtwebengine"] - depends = qtdeclarative - recommends = qtwebchannel qttools qtpositioning - path = qtwebengine - url = ../qtwebengine.git - branch = 6.3.2 - status = addon - priority = 10 -[submodule "qtcanvas3d"] - depends = qtdeclarative - path = qtcanvas3d - url = ../qtcanvas3d.git - branch = 6.3 - status = ignore -[submodule "qtwebview"] - depends = qtdeclarative - recommends = qtwebengine - path = qtwebview - url = ../qtwebview.git - branch = 6.3.2 - status = addon -[submodule "qtcharts"] - depends = qtbase - recommends = qtdeclarative qtmultimedia - path = qtcharts - url = ../qtcharts.git - branch = 6.3.2 - status = addon -[submodule "qtdatavis3d"] - depends = qtbase - recommends = qtdeclarative qtmultimedia - path = qtdatavis3d - url = ../qtdatavis3d.git - branch = 6.3.2 - status = addon -[submodule "qtvirtualkeyboard"] - depends = qtbase qtdeclarative qtsvg - recommends = qtmultimedia - path = qtvirtualkeyboard - url = ../qtvirtualkeyboard.git - branch = 6.3.2 - status = addon -[submodule "qtgamepad"] - depends = qtbase - recommends = qtdeclarative - path = qtgamepad - url = ../qtgamepad.git - branch = 6.3 - status = ignore -[submodule "qtscxml"] - depends = qtbase qtdeclarative - path = qtscxml - url = ../qtscxml.git - branch = 6.3.2 - status = addon -[submodule "qtspeech"] - depends = qtbase - recommends = qtdeclarative qtmultimedia - path = qtspeech - url = ../qtspeech.git - branch = 6.3.2 - status = ignore -[submodule "qtnetworkauth"] - depends = qtbase - path = qtnetworkauth - url = ../qtnetworkauth.git - branch = 6.3.2 - status = addon -[submodule "qtremoteobjects"] - depends = qtbase - recommends = qtdeclarative - path = qtremoteobjects - url = ../qtremoteobjects.git - branch = 6.3.2 - status = addon -[submodule "qtwebglplugin"] - depends = qtbase qtwebsockets - recommends = qtdeclarative - path = qtwebglplugin - url = ../qtwebglplugin.git - branch = 6.3 - status = ignore -[submodule "qtlottie"] - depends = qtbase qtdeclarative - path = qtlottie - url = ../qtlottie.git - branch = 6.3.2 - status = addon -[submodule "qtquicktimeline"] - depends = qtbase qtdeclarative - path = qtquicktimeline - url = ../qtquicktimeline - branch = 6.3.2 - status = addon -[submodule "qtquick3d"] - depends = qtbase qtdeclarative qtshadertools - recommends = qtquicktimeline - path = qtquick3d - url = ../qtquick3d.git - branch = 6.3.2 - status = addon -[submodule "qtshadertools"] - depends = qtbase - path = qtshadertools - url = ../qtshadertools.git - branch = 6.3.2 - status = addon -[submodule "qt5compat"] - depends = qtbase qtdeclarative - path = qt5compat - url = ../qt5compat.git - branch = 6.3.2 - status = deprecated -[submodule "qtcoap"] - depends = qtbase - path = qtcoap - url = ../qtcoap.git - branch = 6.3.2 - status = addon -[submodule "qtmqtt"] - depends = qtbase qtdeclarative - path = qtmqtt - url = ../qtmqtt.git - branch = 6.3.2 - status = addon -[submodule "qtopcua"] - depends = qtbase qtdeclarative - path = qtopcua - url = ../qtopcua.git - branch = 6.3.2 - status = addon -[submodule "qtlanguageserver"] - depends = qtbase - path = qtlanguageserver - url = ../qtlanguageserver.git - branch = 6.3.2 - status = preview diff --git a/recipes/qt/6.x.x/qtmodules6.4.2.conf b/recipes/qt/6.x.x/qtmodules6.4.2.conf deleted file mode 100644 index 10324ecab234b..0000000000000 --- a/recipes/qt/6.x.x/qtmodules6.4.2.conf +++ /dev/null @@ -1,318 +0,0 @@ -[submodule "qtbase"] - path = qtbase - url = ../qtbase.git - branch = 6.4.2 - status = essential -[submodule "qtsvg"] - depends = qtbase - path = qtsvg - url = ../qtsvg.git - branch = 6.4.2 - status = addon -[submodule "qtdeclarative"] - depends = qtbase - recommends = qtimageformats qtshadertools qtsvg qtlanguageserver - path = qtdeclarative - url = ../qtdeclarative.git - branch = 6.4.2 - status = essential -[submodule "qtactiveqt"] - depends = qtbase - path = qtactiveqt - url = ../qtactiveqt.git - branch = 6.4.2 - status = addon -[submodule "qtmultimedia"] - depends = qtbase qtshadertools - recommends = qtdeclarative qtquick3d - path = qtmultimedia - url = ../qtmultimedia.git - branch = 6.4.2 - status = addon -[submodule "qttools"] - depends = qtbase - recommends = qtdeclarative qtactiveqt - path = qttools - url = ../qttools.git - branch = 6.4.2 - status = essential -[submodule "qtxmlpatterns"] - depends = qtbase - recommends = qtdeclarative - path = qtxmlpatterns - url = ../qtxmlpatterns.git - branch = dev - status = ignore -[submodule "qttranslations"] - depends = qttools - path = qttranslations - url = ../qttranslations.git - branch = 6.4.2 - status = essential - priority = 30 -[submodule "qtdoc"] - depends = qtdeclarative qttools - recommends = qtmultimedia - path = qtdoc - url = ../qtdoc.git - branch = 6.4.2 - status = essential - priority = 40 -[submodule "qtrepotools"] - path = qtrepotools - url = ../qtrepotools.git - branch = master - status = essential - project = - -[submodule "qtqa"] - depends = qtbase - path = qtqa - url = ../qtqa.git - branch = dev - status = essential - priority = 50 -[submodule "qtlocation"] - depends = qtbase qtpositioning - recommends = qtdeclarative - path = qtlocation - url = ../qtlocation.git - branch = dev - status = ignore -[submodule "qtpositioning"] - depends = qtbase - recommends = qtdeclarative qtserialport - path = qtpositioning - url = ../qtpositioning.git - branch = 6.4.2 - status = addon -[submodule "qtsensors"] - depends = qtbase - recommends = qtdeclarative - path = qtsensors - url = ../qtsensors.git - branch = 6.4.2 - status = addon -[submodule "qtsystems"] - depends = qtbase - recommends = qtdeclarative - path = qtsystems - url = ../qtsystems.git - branch = dev - status = ignore -[submodule "qtfeedback"] - depends = qtdeclarative - recommends = qtmultimedia - path = qtfeedback - url = ../qtfeedback.git - branch = master - status = ignore -[submodule "qtpim"] - depends = qtdeclarative - path = qtpim - url = ../qtpim.git - branch = dev - status = ignore -[submodule "qtconnectivity"] - depends = qtbase - recommends = qtdeclarative - path = qtconnectivity - url = ../qtconnectivity.git - branch = 6.4.2 - status = addon -[submodule "qtwayland"] - depends = qtbase - recommends = qtdeclarative - path = qtwayland - url = ../qtwayland.git - branch = 6.4.2 - status = addon -[submodule "qt3d"] - depends = qtbase - recommends = qtdeclarative qtshadertools - path = qt3d - url = ../qt3d.git - branch = 6.4.2 - status = addon -[submodule "qtimageformats"] - depends = qtbase - path = qtimageformats - url = ../qtimageformats.git - branch = 6.4.2 - status = addon -[submodule "qtserialbus"] - depends = qtbase - recommends = qtserialport - path = qtserialbus - url = ../qtserialbus.git - branch = 6.4.2 - status = addon -[submodule "qtserialport"] - depends = qtbase - path = qtserialport - url = ../qtserialport.git - branch = 6.4.2 - status = addon -[submodule "qtwebsockets"] - depends = qtbase - recommends = qtdeclarative - path = qtwebsockets - url = ../qtwebsockets.git - branch = 6.4.2 - status = addon -[submodule "qtwebchannel"] - depends = qtbase - recommends = qtdeclarative qtwebsockets - path = qtwebchannel - url = ../qtwebchannel.git - branch = 6.4.2 - status = addon -[submodule "qtwebengine"] - depends = qtdeclarative - recommends = qtwebchannel qttools qtpositioning - path = qtwebengine - url = ../qtwebengine.git - branch = 6.4.2 - status = addon - priority = 10 -[submodule "qtcanvas3d"] - depends = qtdeclarative - path = qtcanvas3d - url = ../qtcanvas3d.git - branch = dev - status = ignore -[submodule "qtwebview"] - depends = qtdeclarative - recommends = qtwebengine - path = qtwebview - url = ../qtwebview.git - branch = 6.4.2 - status = addon -[submodule "qtcharts"] - depends = qtbase - recommends = qtdeclarative qtmultimedia - path = qtcharts - url = ../qtcharts.git - branch = 6.4.2 - status = addon -[submodule "qtdatavis3d"] - depends = qtbase - recommends = qtdeclarative qtmultimedia - path = qtdatavis3d - url = ../qtdatavis3d.git - branch = 6.4.2 - status = addon -[submodule "qtvirtualkeyboard"] - depends = qtbase qtdeclarative qtsvg - recommends = qtmultimedia - path = qtvirtualkeyboard - url = ../qtvirtualkeyboard.git - branch = 6.4.2 - status = addon -[submodule "qtgamepad"] - depends = qtbase - recommends = qtdeclarative - path = qtgamepad - url = ../qtgamepad.git - branch = dev - status = ignore -[submodule "qtscxml"] - depends = qtbase qtdeclarative - path = qtscxml - url = ../qtscxml.git - branch = 6.4.2 - status = addon -[submodule "qtspeech"] - depends = qtbase - recommends = qtdeclarative qtmultimedia - path = qtspeech - url = ../qtspeech.git - branch = 6.4.2 - status = addon -[submodule "qtnetworkauth"] - depends = qtbase - path = qtnetworkauth - url = ../qtnetworkauth.git - branch = 6.4.2 - status = addon -[submodule "qtremoteobjects"] - depends = qtbase - recommends = qtdeclarative - path = qtremoteobjects - url = ../qtremoteobjects.git - branch = 6.4.2 - status = addon -[submodule "qtwebglplugin"] - depends = qtbase qtwebsockets - recommends = qtdeclarative - path = qtwebglplugin - url = ../qtwebglplugin.git - branch = dev - status = ignore -[submodule "qtlottie"] - depends = qtbase qtdeclarative - path = qtlottie - url = ../qtlottie.git - branch = 6.4.2 - status = addon -[submodule "qtquicktimeline"] - depends = qtbase qtdeclarative - path = qtquicktimeline - url = ../qtquicktimeline - branch = 6.4.2 - status = addon -[submodule "qtquick3d"] - depends = qtbase qtdeclarative qtshadertools - recommends = qtquicktimeline - path = qtquick3d - url = ../qtquick3d.git - branch = 6.4.2 - status = addon -[submodule "qtshadertools"] - depends = qtbase - path = qtshadertools - url = ../qtshadertools.git - branch = 6.4.2 - status = addon -[submodule "qt5compat"] - depends = qtbase qtdeclarative - path = qt5compat - url = ../qt5compat.git - branch = 6.4.2 - status = deprecated -[submodule "qtcoap"] - depends = qtbase - path = qtcoap - url = ../qtcoap.git - branch = 6.4.2 - status = addon -[submodule "qtmqtt"] - depends = qtbase qtdeclarative - path = qtmqtt - url = ../qtmqtt.git - branch = 6.4.2 - status = addon -[submodule "qtopcua"] - depends = qtbase qtdeclarative - path = qtopcua - url = ../qtopcua.git - branch = 6.4.2 - status = addon -[submodule "qtlanguageserver"] - depends = qtbase - path = qtlanguageserver - url = ../qtlanguageserver.git - branch = 6.4.2 - status = preview -[submodule "qthttpserver"] - depends = qtbase - recommends = qtwebsockets - path = qthttpserver - url = ../qthttpserver.git - branch = 6.4.2 - status = preview -[submodule "qtquick3dphysics"] - depends = qtbase qtdeclarative qtquick3d qtshadertools - path = qtquick3dphysics - url = ../qtquick3dphysics.git - branch = 6.4.2 - status = preview diff --git a/recipes/qt/6.x.x/qtmodules6.6.0.conf b/recipes/qt/6.x.x/qtmodules6.6.0.conf deleted file mode 100644 index e3853727b0712..0000000000000 --- a/recipes/qt/6.x.x/qtmodules6.6.0.conf +++ /dev/null @@ -1,338 +0,0 @@ -[submodule "qtbase"] - path = qtbase - url = ../qtbase.git - branch = 6.6.0 - status = essential -[submodule "qtsvg"] - depends = qtbase - path = qtsvg - url = ../qtsvg.git - branch = 6.6.0 - status = addon -[submodule "qtdeclarative"] - depends = qtbase - recommends = qtimageformats qtshadertools qtsvg qtlanguageserver - path = qtdeclarative - url = ../qtdeclarative.git - branch = 6.6.0 - status = essential -[submodule "qtactiveqt"] - depends = qtbase - path = qtactiveqt - url = ../qtactiveqt.git - branch = 6.6.0 - status = addon -[submodule "qtmultimedia"] - depends = qtbase qtshadertools - recommends = qtdeclarative qtquick3d - path = qtmultimedia - url = ../qtmultimedia.git - branch = 6.6.0 - status = addon -[submodule "qttools"] - depends = qtbase - recommends = qtdeclarative qtactiveqt - path = qttools - url = ../qttools.git - branch = 6.6.0 - status = essential -[submodule "qtxmlpatterns"] - depends = qtbase - recommends = qtdeclarative - path = qtxmlpatterns - url = ../qtxmlpatterns.git - branch = dev - status = ignore -[submodule "qttranslations"] - depends = qttools - path = qttranslations - url = ../qttranslations.git - branch = 6.6.0 - status = essential - priority = 30 -[submodule "qtdoc"] - depends = qtdeclarative qttools - recommends = qtmultimedia qtshadertools qtwebengine - path = qtdoc - url = ../qtdoc.git - branch = 6.6.0 - status = essential - priority = 40 -[submodule "qtrepotools"] - path = qtrepotools - url = ../qtrepotools.git - branch = master - status = essential - project = - -[submodule "qtqa"] - depends = qtbase - path = qtqa - url = ../qtqa.git - branch = dev - status = essential - priority = 50 -[submodule "qtlocation"] - depends = qtbase qtpositioning - recommends = qtdeclarative - path = qtlocation - url = ../qtlocation.git - branch = 6.6.0 - status = preview -[submodule "qtpositioning"] - depends = qtbase - recommends = qtdeclarative qtserialport - path = qtpositioning - url = ../qtpositioning.git - branch = 6.6.0 - status = addon -[submodule "qtsensors"] - depends = qtbase - recommends = qtdeclarative - path = qtsensors - url = ../qtsensors.git - branch = 6.6.0 - status = addon -[submodule "qtsystems"] - depends = qtbase - recommends = qtdeclarative - path = qtsystems - url = ../qtsystems.git - branch = dev - status = ignore -[submodule "qtfeedback"] - depends = qtdeclarative - recommends = qtmultimedia - path = qtfeedback - url = ../qtfeedback.git - branch = master - status = ignore -[submodule "qtpim"] - depends = qtdeclarative - path = qtpim - url = ../qtpim.git - branch = dev - status = ignore -[submodule "qtconnectivity"] - depends = qtbase - recommends = qtdeclarative - path = qtconnectivity - url = ../qtconnectivity.git - branch = 6.6.0 - status = addon -[submodule "qtwayland"] - depends = qtbase - recommends = qtdeclarative - path = qtwayland - url = ../qtwayland.git - branch = 6.6.0 - status = addon -[submodule "qt3d"] - depends = qtbase - recommends = qtdeclarative qtshadertools qtmultimedia - path = qt3d - url = ../qt3d.git - branch = 6.6.0 - status = addon -[submodule "qtimageformats"] - depends = qtbase - path = qtimageformats - url = ../qtimageformats.git - branch = 6.6.0 - status = addon -[submodule "qtserialbus"] - depends = qtbase - recommends = qtserialport - path = qtserialbus - url = ../qtserialbus.git - branch = 6.6.0 - status = addon -[submodule "qtserialport"] - depends = qtbase - path = qtserialport - url = ../qtserialport.git - branch = 6.6.0 - status = addon -[submodule "qtwebsockets"] - depends = qtbase - recommends = qtdeclarative - path = qtwebsockets - url = ../qtwebsockets.git - branch = 6.6.0 - status = addon -[submodule "qtwebchannel"] - depends = qtbase - recommends = qtdeclarative qtwebsockets - path = qtwebchannel - url = ../qtwebchannel.git - branch = 6.6.0 - status = addon -[submodule "qtwebengine"] - depends = qtdeclarative - recommends = qtwebchannel qttools qtpositioning - path = qtwebengine - url = ../qtwebengine.git - branch = 6.6.0 - status = addon - priority = 10 -[submodule "qtcanvas3d"] - depends = qtdeclarative - path = qtcanvas3d - url = ../qtcanvas3d.git - branch = dev - status = ignore -[submodule "qtwebview"] - depends = qtdeclarative - recommends = qtwebengine - path = qtwebview - url = ../qtwebview.git - branch = 6.6.0 - status = addon -[submodule "qtcharts"] - depends = qtbase - recommends = qtdeclarative qtmultimedia - path = qtcharts - url = ../qtcharts.git - branch = 6.6.0 - status = addon -[submodule "qtdatavis3d"] - depends = qtbase - recommends = qtdeclarative qtmultimedia - path = qtdatavis3d - url = ../qtdatavis3d.git - branch = 6.6.0 - status = addon -[submodule "qtvirtualkeyboard"] - depends = qtbase qtdeclarative qtsvg - recommends = qtmultimedia - path = qtvirtualkeyboard - url = ../qtvirtualkeyboard.git - branch = 6.6.0 - status = addon -[submodule "qtgamepad"] - depends = qtbase - recommends = qtdeclarative - path = qtgamepad - url = ../qtgamepad.git - branch = dev - status = ignore -[submodule "qtscxml"] - depends = qtbase qtdeclarative - path = qtscxml - url = ../qtscxml.git - branch = 6.6.0 - status = addon -[submodule "qtspeech"] - depends = qtbase - recommends = qtdeclarative qtmultimedia - path = qtspeech - url = ../qtspeech.git - branch = 6.6.0 - status = addon -[submodule "qtnetworkauth"] - depends = qtbase - path = qtnetworkauth - url = ../qtnetworkauth.git - branch = 6.6.0 - status = addon -[submodule "qtremoteobjects"] - depends = qtbase - recommends = qtdeclarative - path = qtremoteobjects - url = ../qtremoteobjects.git - branch = 6.6.0 - status = addon -[submodule "qtwebglplugin"] - depends = qtbase qtwebsockets - recommends = qtdeclarative - path = qtwebglplugin - url = ../qtwebglplugin.git - branch = dev - status = ignore -[submodule "qtlottie"] - depends = qtbase qtdeclarative - path = qtlottie - url = ../qtlottie.git - branch = 6.6.0 - status = addon -[submodule "qtquicktimeline"] - depends = qtbase qtdeclarative - path = qtquicktimeline - url = ../qtquicktimeline - branch = 6.6.0 - status = addon -[submodule "qtquick3d"] - depends = qtbase qtdeclarative qtshadertools - recommends = qtquicktimeline - path = qtquick3d - url = ../qtquick3d.git - branch = 6.6.0 - status = addon -[submodule "qtshadertools"] - depends = qtbase - path = qtshadertools - url = ../qtshadertools.git - branch = 6.6.0 - status = addon -[submodule "qt5compat"] - depends = qtbase qtdeclarative - path = qt5compat - url = ../qt5compat.git - branch = 6.6.0 - status = deprecated -[submodule "qtcoap"] - depends = qtbase - path = qtcoap - url = ../qtcoap.git - branch = 6.6.0 - status = addon -[submodule "qtmqtt"] - depends = qtbase qtdeclarative - path = qtmqtt - url = ../qtmqtt.git - branch = 6.6.0 - status = addon -[submodule "qtopcua"] - depends = qtbase qtdeclarative - path = qtopcua - url = ../qtopcua.git - branch = 6.6.0 - status = addon -[submodule "qtlanguageserver"] - depends = qtbase - path = qtlanguageserver - url = ../qtlanguageserver.git - branch = 6.6.0 - status = preview -[submodule "qthttpserver"] - depends = qtbase - recommends = qtwebsockets - path = qthttpserver - url = ../qthttpserver.git - branch = 6.6.0 - status = preview -[submodule "qtquick3dphysics"] - depends = qtbase qtdeclarative qtquick3d qtshadertools - path = qtquick3dphysics - url = ../qtquick3dphysics.git - branch = 6.6.0 - status = addon -[submodule "qtgrpc"] - depends = qtbase - recommends = qtdeclarative - path = qtgrpc - url = ../qtgrpc.git - branch = 6.6.0 - status = preview -[submodule "qtquickeffectmaker"] - depends = qtbase qtdeclarative qtshadertools - recommends = qtquick3d - path = qtquickeffectmaker - url = ../qtquickeffectmaker.git - branch = 6.6.0 - status = addon -[submodule "qtgraphs"] - depends = qtbase qtdeclarative qtquick3d - path = qtgraphs - url = ../qtgraphs.git - branch = 6.6.0 - status = preview diff --git a/recipes/qt/6.x.x/qtmodules6.6.1.conf b/recipes/qt/6.x.x/qtmodules6.6.1.conf deleted file mode 100644 index 3d1fa112d7390..0000000000000 --- a/recipes/qt/6.x.x/qtmodules6.6.1.conf +++ /dev/null @@ -1,338 +0,0 @@ -[submodule "qtbase"] - path = qtbase - url = ../qtbase.git - branch = 6.6.1 - status = essential -[submodule "qtsvg"] - depends = qtbase - path = qtsvg - url = ../qtsvg.git - branch = 6.6.1 - status = addon -[submodule "qtdeclarative"] - depends = qtbase - recommends = qtimageformats qtshadertools qtsvg qtlanguageserver - path = qtdeclarative - url = ../qtdeclarative.git - branch = 6.6.1 - status = essential -[submodule "qtactiveqt"] - depends = qtbase - path = qtactiveqt - url = ../qtactiveqt.git - branch = 6.6.1 - status = addon -[submodule "qtmultimedia"] - depends = qtbase qtshadertools - recommends = qtdeclarative qtquick3d - path = qtmultimedia - url = ../qtmultimedia.git - branch = 6.6.1 - status = addon -[submodule "qttools"] - depends = qtbase - recommends = qtdeclarative qtactiveqt - path = qttools - url = ../qttools.git - branch = 6.6.1 - status = essential -[submodule "qtxmlpatterns"] - depends = qtbase - recommends = qtdeclarative - path = qtxmlpatterns - url = ../qtxmlpatterns.git - branch = dev - status = ignore -[submodule "qttranslations"] - depends = qttools - path = qttranslations - url = ../qttranslations.git - branch = 6.6.1 - status = essential - priority = 30 -[submodule "qtdoc"] - depends = qtdeclarative qttools - recommends = qtmultimedia qtshadertools qtwebengine - path = qtdoc - url = ../qtdoc.git - branch = 6.6.1 - status = essential - priority = 40 -[submodule "qtrepotools"] - path = qtrepotools - url = ../qtrepotools.git - branch = master - status = essential - project = - -[submodule "qtqa"] - depends = qtbase - path = qtqa - url = ../qtqa.git - branch = dev - status = essential - priority = 50 -[submodule "qtlocation"] - depends = qtbase qtpositioning - recommends = qtdeclarative - path = qtlocation - url = ../qtlocation.git - branch = 6.6.1 - status = preview -[submodule "qtpositioning"] - depends = qtbase - recommends = qtdeclarative qtserialport - path = qtpositioning - url = ../qtpositioning.git - branch = 6.6.1 - status = addon -[submodule "qtsensors"] - depends = qtbase - recommends = qtdeclarative - path = qtsensors - url = ../qtsensors.git - branch = 6.6.1 - status = addon -[submodule "qtsystems"] - depends = qtbase - recommends = qtdeclarative - path = qtsystems - url = ../qtsystems.git - branch = dev - status = ignore -[submodule "qtfeedback"] - depends = qtdeclarative - recommends = qtmultimedia - path = qtfeedback - url = ../qtfeedback.git - branch = master - status = ignore -[submodule "qtpim"] - depends = qtdeclarative - path = qtpim - url = ../qtpim.git - branch = dev - status = ignore -[submodule "qtconnectivity"] - depends = qtbase - recommends = qtdeclarative - path = qtconnectivity - url = ../qtconnectivity.git - branch = 6.6.1 - status = addon -[submodule "qtwayland"] - depends = qtbase - recommends = qtdeclarative - path = qtwayland - url = ../qtwayland.git - branch = 6.6.1 - status = addon -[submodule "qt3d"] - depends = qtbase - recommends = qtdeclarative qtshadertools qtmultimedia - path = qt3d - url = ../qt3d.git - branch = 6.6.1 - status = addon -[submodule "qtimageformats"] - depends = qtbase - path = qtimageformats - url = ../qtimageformats.git - branch = 6.6.1 - status = addon -[submodule "qtserialbus"] - depends = qtbase - recommends = qtserialport - path = qtserialbus - url = ../qtserialbus.git - branch = 6.6.1 - status = addon -[submodule "qtserialport"] - depends = qtbase - path = qtserialport - url = ../qtserialport.git - branch = 6.6.1 - status = addon -[submodule "qtwebsockets"] - depends = qtbase - recommends = qtdeclarative - path = qtwebsockets - url = ../qtwebsockets.git - branch = 6.6.1 - status = addon -[submodule "qtwebchannel"] - depends = qtbase - recommends = qtdeclarative qtwebsockets - path = qtwebchannel - url = ../qtwebchannel.git - branch = 6.6.1 - status = addon -[submodule "qtwebengine"] - depends = qtdeclarative - recommends = qtwebchannel qttools qtpositioning - path = qtwebengine - url = ../qtwebengine.git - branch = 6.6.1 - status = addon - priority = 10 -[submodule "qtcanvas3d"] - depends = qtdeclarative - path = qtcanvas3d - url = ../qtcanvas3d.git - branch = dev - status = ignore -[submodule "qtwebview"] - depends = qtdeclarative - recommends = qtwebengine - path = qtwebview - url = ../qtwebview.git - branch = 6.6.1 - status = addon -[submodule "qtcharts"] - depends = qtbase - recommends = qtdeclarative qtmultimedia - path = qtcharts - url = ../qtcharts.git - branch = 6.6.1 - status = addon -[submodule "qtdatavis3d"] - depends = qtbase - recommends = qtdeclarative qtmultimedia - path = qtdatavis3d - url = ../qtdatavis3d.git - branch = 6.6.1 - status = addon -[submodule "qtvirtualkeyboard"] - depends = qtbase qtdeclarative qtsvg - recommends = qtmultimedia - path = qtvirtualkeyboard - url = ../qtvirtualkeyboard.git - branch = 6.6.1 - status = addon -[submodule "qtgamepad"] - depends = qtbase - recommends = qtdeclarative - path = qtgamepad - url = ../qtgamepad.git - branch = dev - status = ignore -[submodule "qtscxml"] - depends = qtbase qtdeclarative - path = qtscxml - url = ../qtscxml.git - branch = 6.6.1 - status = addon -[submodule "qtspeech"] - depends = qtbase - recommends = qtdeclarative qtmultimedia - path = qtspeech - url = ../qtspeech.git - branch = 6.6.1 - status = addon -[submodule "qtnetworkauth"] - depends = qtbase - path = qtnetworkauth - url = ../qtnetworkauth.git - branch = 6.6.1 - status = addon -[submodule "qtremoteobjects"] - depends = qtbase - recommends = qtdeclarative - path = qtremoteobjects - url = ../qtremoteobjects.git - branch = 6.6.1 - status = addon -[submodule "qtwebglplugin"] - depends = qtbase qtwebsockets - recommends = qtdeclarative - path = qtwebglplugin - url = ../qtwebglplugin.git - branch = dev - status = ignore -[submodule "qtlottie"] - depends = qtbase qtdeclarative - path = qtlottie - url = ../qtlottie.git - branch = 6.6.1 - status = addon -[submodule "qtquicktimeline"] - depends = qtbase qtdeclarative - path = qtquicktimeline - url = ../qtquicktimeline - branch = 6.6.1 - status = addon -[submodule "qtquick3d"] - depends = qtbase qtdeclarative qtshadertools - recommends = qtquicktimeline - path = qtquick3d - url = ../qtquick3d.git - branch = 6.6.1 - status = addon -[submodule "qtshadertools"] - depends = qtbase - path = qtshadertools - url = ../qtshadertools.git - branch = 6.6.1 - status = addon -[submodule "qt5compat"] - depends = qtbase qtdeclarative - path = qt5compat - url = ../qt5compat.git - branch = 6.6.1 - status = deprecated -[submodule "qtcoap"] - depends = qtbase - path = qtcoap - url = ../qtcoap.git - branch = 6.6.1 - status = addon -[submodule "qtmqtt"] - depends = qtbase qtdeclarative - path = qtmqtt - url = ../qtmqtt.git - branch = 6.6.1 - status = addon -[submodule "qtopcua"] - depends = qtbase qtdeclarative - path = qtopcua - url = ../qtopcua.git - branch = 6.6.1 - status = addon -[submodule "qtlanguageserver"] - depends = qtbase - path = qtlanguageserver - url = ../qtlanguageserver.git - branch = 6.6.1 - status = preview -[submodule "qthttpserver"] - depends = qtbase - recommends = qtwebsockets - path = qthttpserver - url = ../qthttpserver.git - branch = 6.6.1 - status = preview -[submodule "qtquick3dphysics"] - depends = qtbase qtdeclarative qtquick3d qtshadertools - path = qtquick3dphysics - url = ../qtquick3dphysics.git - branch = 6.6.1 - status = addon -[submodule "qtgrpc"] - depends = qtbase - recommends = qtdeclarative - path = qtgrpc - url = ../qtgrpc.git - branch = 6.6.1 - status = preview -[submodule "qtquickeffectmaker"] - depends = qtbase qtdeclarative qtshadertools - recommends = qtquick3d - path = qtquickeffectmaker - url = ../qtquickeffectmaker.git - branch = 6.6.1 - status = addon -[submodule "qtgraphs"] - depends = qtbase qtdeclarative qtquick3d - path = qtgraphs - url = ../qtgraphs.git - branch = 6.6.1 - status = preview diff --git a/recipes/qt/6.x.x/qtmodules6.6.2.conf b/recipes/qt/6.x.x/qtmodules6.6.2.conf deleted file mode 100644 index 1ad0f474e5053..0000000000000 --- a/recipes/qt/6.x.x/qtmodules6.6.2.conf +++ /dev/null @@ -1,338 +0,0 @@ -[submodule "qtbase"] - path = qtbase - url = ../qtbase.git - branch = 6.6.2 - status = essential -[submodule "qtsvg"] - depends = qtbase - path = qtsvg - url = ../qtsvg.git - branch = 6.6.2 - status = addon -[submodule "qtdeclarative"] - depends = qtbase - recommends = qtimageformats qtshadertools qtsvg qtlanguageserver - path = qtdeclarative - url = ../qtdeclarative.git - branch = 6.6.2 - status = essential -[submodule "qtactiveqt"] - depends = qtbase - path = qtactiveqt - url = ../qtactiveqt.git - branch = 6.6.2 - status = addon -[submodule "qtmultimedia"] - depends = qtbase qtshadertools - recommends = qtdeclarative qtquick3d - path = qtmultimedia - url = ../qtmultimedia.git - branch = 6.6.2 - status = addon -[submodule "qttools"] - depends = qtbase - recommends = qtdeclarative qtactiveqt - path = qttools - url = ../qttools.git - branch = 6.6.2 - status = essential -[submodule "qtxmlpatterns"] - depends = qtbase - recommends = qtdeclarative - path = qtxmlpatterns - url = ../qtxmlpatterns.git - branch = dev - status = ignore -[submodule "qttranslations"] - depends = qttools - path = qttranslations - url = ../qttranslations.git - branch = 6.6.2 - status = essential - priority = 30 -[submodule "qtdoc"] - depends = qtdeclarative qttools - recommends = qtmultimedia qtshadertools qtwebengine - path = qtdoc - url = ../qtdoc.git - branch = 6.6.2 - status = essential - priority = 40 -[submodule "qtrepotools"] - path = qtrepotools - url = ../qtrepotools.git - branch = master - status = essential - project = - -[submodule "qtqa"] - depends = qtbase - path = qtqa - url = ../qtqa.git - branch = dev - status = essential - priority = 50 -[submodule "qtlocation"] - depends = qtbase qtpositioning - recommends = qtdeclarative - path = qtlocation - url = ../qtlocation.git - branch = 6.6.2 - status = preview -[submodule "qtpositioning"] - depends = qtbase - recommends = qtdeclarative qtserialport - path = qtpositioning - url = ../qtpositioning.git - branch = 6.6.2 - status = addon -[submodule "qtsensors"] - depends = qtbase - recommends = qtdeclarative - path = qtsensors - url = ../qtsensors.git - branch = 6.6.2 - status = addon -[submodule "qtsystems"] - depends = qtbase - recommends = qtdeclarative - path = qtsystems - url = ../qtsystems.git - branch = dev - status = ignore -[submodule "qtfeedback"] - depends = qtdeclarative - recommends = qtmultimedia - path = qtfeedback - url = ../qtfeedback.git - branch = master - status = ignore -[submodule "qtpim"] - depends = qtdeclarative - path = qtpim - url = ../qtpim.git - branch = dev - status = ignore -[submodule "qtconnectivity"] - depends = qtbase - recommends = qtdeclarative - path = qtconnectivity - url = ../qtconnectivity.git - branch = 6.6.2 - status = addon -[submodule "qtwayland"] - depends = qtbase - recommends = qtdeclarative - path = qtwayland - url = ../qtwayland.git - branch = 6.6.2 - status = addon -[submodule "qt3d"] - depends = qtbase - recommends = qtdeclarative qtshadertools qtmultimedia - path = qt3d - url = ../qt3d.git - branch = 6.6.2 - status = addon -[submodule "qtimageformats"] - depends = qtbase - path = qtimageformats - url = ../qtimageformats.git - branch = 6.6.2 - status = addon -[submodule "qtserialbus"] - depends = qtbase - recommends = qtserialport - path = qtserialbus - url = ../qtserialbus.git - branch = 6.6.2 - status = addon -[submodule "qtserialport"] - depends = qtbase - path = qtserialport - url = ../qtserialport.git - branch = 6.6.2 - status = addon -[submodule "qtwebsockets"] - depends = qtbase - recommends = qtdeclarative - path = qtwebsockets - url = ../qtwebsockets.git - branch = 6.6.2 - status = addon -[submodule "qtwebchannel"] - depends = qtbase - recommends = qtdeclarative qtwebsockets - path = qtwebchannel - url = ../qtwebchannel.git - branch = 6.6.2 - status = addon -[submodule "qtwebengine"] - depends = qtdeclarative - recommends = qtwebchannel qttools qtpositioning - path = qtwebengine - url = ../qtwebengine.git - branch = 6.6.2 - status = addon - priority = 10 -[submodule "qtcanvas3d"] - depends = qtdeclarative - path = qtcanvas3d - url = ../qtcanvas3d.git - branch = dev - status = ignore -[submodule "qtwebview"] - depends = qtdeclarative - recommends = qtwebengine - path = qtwebview - url = ../qtwebview.git - branch = 6.6.2 - status = addon -[submodule "qtcharts"] - depends = qtbase - recommends = qtdeclarative qtmultimedia - path = qtcharts - url = ../qtcharts.git - branch = 6.6.2 - status = addon -[submodule "qtdatavis3d"] - depends = qtbase - recommends = qtdeclarative qtmultimedia - path = qtdatavis3d - url = ../qtdatavis3d.git - branch = 6.6.2 - status = addon -[submodule "qtvirtualkeyboard"] - depends = qtbase qtdeclarative qtsvg - recommends = qtmultimedia - path = qtvirtualkeyboard - url = ../qtvirtualkeyboard.git - branch = 6.6.2 - status = addon -[submodule "qtgamepad"] - depends = qtbase - recommends = qtdeclarative - path = qtgamepad - url = ../qtgamepad.git - branch = dev - status = ignore -[submodule "qtscxml"] - depends = qtbase qtdeclarative - path = qtscxml - url = ../qtscxml.git - branch = 6.6.2 - status = addon -[submodule "qtspeech"] - depends = qtbase - recommends = qtdeclarative qtmultimedia - path = qtspeech - url = ../qtspeech.git - branch = 6.6.2 - status = addon -[submodule "qtnetworkauth"] - depends = qtbase - path = qtnetworkauth - url = ../qtnetworkauth.git - branch = 6.6.2 - status = addon -[submodule "qtremoteobjects"] - depends = qtbase - recommends = qtdeclarative - path = qtremoteobjects - url = ../qtremoteobjects.git - branch = 6.6.2 - status = addon -[submodule "qtwebglplugin"] - depends = qtbase qtwebsockets - recommends = qtdeclarative - path = qtwebglplugin - url = ../qtwebglplugin.git - branch = dev - status = ignore -[submodule "qtlottie"] - depends = qtbase qtdeclarative - path = qtlottie - url = ../qtlottie.git - branch = 6.6.2 - status = addon -[submodule "qtquicktimeline"] - depends = qtbase qtdeclarative - path = qtquicktimeline - url = ../qtquicktimeline - branch = 6.6.2 - status = addon -[submodule "qtquick3d"] - depends = qtbase qtdeclarative qtshadertools - recommends = qtquicktimeline - path = qtquick3d - url = ../qtquick3d.git - branch = 6.6.2 - status = addon -[submodule "qtshadertools"] - depends = qtbase - path = qtshadertools - url = ../qtshadertools.git - branch = 6.6.2 - status = addon -[submodule "qt5compat"] - depends = qtbase qtdeclarative - path = qt5compat - url = ../qt5compat.git - branch = 6.6.2 - status = deprecated -[submodule "qtcoap"] - depends = qtbase - path = qtcoap - url = ../qtcoap.git - branch = 6.6.2 - status = addon -[submodule "qtmqtt"] - depends = qtbase qtdeclarative - path = qtmqtt - url = ../qtmqtt.git - branch = 6.6.2 - status = addon -[submodule "qtopcua"] - depends = qtbase qtdeclarative - path = qtopcua - url = ../qtopcua.git - branch = 6.6.2 - status = addon -[submodule "qtlanguageserver"] - depends = qtbase - path = qtlanguageserver - url = ../qtlanguageserver.git - branch = 6.6.2 - status = preview -[submodule "qthttpserver"] - depends = qtbase - recommends = qtwebsockets - path = qthttpserver - url = ../qthttpserver.git - branch = 6.6.2 - status = preview -[submodule "qtquick3dphysics"] - depends = qtbase qtdeclarative qtquick3d qtshadertools - path = qtquick3dphysics - url = ../qtquick3dphysics.git - branch = 6.6.2 - status = addon -[submodule "qtgrpc"] - depends = qtbase - recommends = qtdeclarative - path = qtgrpc - url = ../qtgrpc.git - branch = 6.6.2 - status = preview -[submodule "qtquickeffectmaker"] - depends = qtbase qtdeclarative qtshadertools - recommends = qtquick3d - path = qtquickeffectmaker - url = ../qtquickeffectmaker.git - branch = 6.6.2 - status = addon -[submodule "qtgraphs"] - depends = qtbase qtdeclarative qtquick3d - path = qtgraphs - url = ../qtgraphs.git - branch = 6.6.2 - status = preview diff --git a/recipes/qt/6.x.x/qtmodules6.7.0.conf b/recipes/qt/6.x.x/qtmodules6.7.0.conf deleted file mode 100644 index 648d154057232..0000000000000 --- a/recipes/qt/6.x.x/qtmodules6.7.0.conf +++ /dev/null @@ -1,338 +0,0 @@ -[submodule "qtbase"] - path = qtbase - url = ../qtbase.git - branch = 6.7.0 - status = essential -[submodule "qtsvg"] - depends = qtbase - path = qtsvg - url = ../qtsvg.git - branch = 6.7.0 - status = addon -[submodule "qtdeclarative"] - depends = qtbase - recommends = qtimageformats qtshadertools qtsvg qtlanguageserver - path = qtdeclarative - url = ../qtdeclarative.git - branch = 6.7.0 - status = essential -[submodule "qtactiveqt"] - depends = qtbase - path = qtactiveqt - url = ../qtactiveqt.git - branch = 6.7.0 - status = addon -[submodule "qtmultimedia"] - depends = qtbase qtshadertools - recommends = qtdeclarative qtquick3d - path = qtmultimedia - url = ../qtmultimedia.git - branch = 6.7.0 - status = addon -[submodule "qttools"] - depends = qtbase - recommends = qtdeclarative qtactiveqt - path = qttools - url = ../qttools.git - branch = 6.7.0 - status = essential -[submodule "qtxmlpatterns"] - depends = qtbase - recommends = qtdeclarative - path = qtxmlpatterns - url = ../qtxmlpatterns.git - branch = dev - status = ignore -[submodule "qttranslations"] - depends = qttools - path = qttranslations - url = ../qttranslations.git - branch = 6.7.0 - status = essential - priority = 30 -[submodule "qtdoc"] - depends = qtdeclarative qttools - recommends = qtmultimedia qtshadertools qtwebengine - path = qtdoc - url = ../qtdoc.git - branch = 6.7.0 - status = essential - priority = 40 -[submodule "qtrepotools"] - path = qtrepotools - url = ../qtrepotools.git - branch = master - status = essential - project = - -[submodule "qtqa"] - depends = qtbase - path = qtqa - url = ../qtqa.git - branch = dev - status = essential - priority = 50 -[submodule "qtlocation"] - depends = qtbase qtpositioning - recommends = qtdeclarative - path = qtlocation - url = ../qtlocation.git - branch = 6.7.0 - status = preview -[submodule "qtpositioning"] - depends = qtbase - recommends = qtdeclarative qtserialport - path = qtpositioning - url = ../qtpositioning.git - branch = 6.7.0 - status = addon -[submodule "qtsensors"] - depends = qtbase - recommends = qtdeclarative - path = qtsensors - url = ../qtsensors.git - branch = 6.7.0 - status = addon -[submodule "qtsystems"] - depends = qtbase - recommends = qtdeclarative - path = qtsystems - url = ../qtsystems.git - branch = dev - status = ignore -[submodule "qtfeedback"] - depends = qtdeclarative - recommends = qtmultimedia - path = qtfeedback - url = ../qtfeedback.git - branch = master - status = ignore -[submodule "qtpim"] - depends = qtdeclarative - path = qtpim - url = ../qtpim.git - branch = dev - status = ignore -[submodule "qtconnectivity"] - depends = qtbase - recommends = qtdeclarative - path = qtconnectivity - url = ../qtconnectivity.git - branch = 6.7.0 - status = addon -[submodule "qtwayland"] - depends = qtbase - recommends = qtdeclarative - path = qtwayland - url = ../qtwayland.git - branch = 6.7.0 - status = addon -[submodule "qt3d"] - depends = qtbase - recommends = qtdeclarative qtshadertools qtmultimedia - path = qt3d - url = ../qt3d.git - branch = 6.7.0 - status = addon -[submodule "qtimageformats"] - depends = qtbase - path = qtimageformats - url = ../qtimageformats.git - branch = 6.7.0 - status = addon -[submodule "qtserialbus"] - depends = qtbase - recommends = qtserialport - path = qtserialbus - url = ../qtserialbus.git - branch = 6.7.0 - status = addon -[submodule "qtserialport"] - depends = qtbase - path = qtserialport - url = ../qtserialport.git - branch = 6.7.0 - status = addon -[submodule "qtwebsockets"] - depends = qtbase - recommends = qtdeclarative - path = qtwebsockets - url = ../qtwebsockets.git - branch = 6.7.0 - status = addon -[submodule "qtwebchannel"] - depends = qtbase - recommends = qtdeclarative qtwebsockets - path = qtwebchannel - url = ../qtwebchannel.git - branch = 6.7.0 - status = addon -[submodule "qtwebengine"] - depends = qtdeclarative - recommends = qtwebchannel qttools qtpositioning - path = qtwebengine - url = ../qtwebengine.git - branch = 6.7.0 - status = addon - priority = 10 -[submodule "qtcanvas3d"] - depends = qtdeclarative - path = qtcanvas3d - url = ../qtcanvas3d.git - branch = dev - status = ignore -[submodule "qtwebview"] - depends = qtdeclarative - recommends = qtwebengine - path = qtwebview - url = ../qtwebview.git - branch = 6.7.0 - status = addon -[submodule "qtcharts"] - depends = qtbase - recommends = qtdeclarative qtmultimedia - path = qtcharts - url = ../qtcharts.git - branch = 6.7.0 - status = addon -[submodule "qtdatavis3d"] - depends = qtbase - recommends = qtdeclarative qtmultimedia - path = qtdatavis3d - url = ../qtdatavis3d.git - branch = 6.7.0 - status = addon -[submodule "qtvirtualkeyboard"] - depends = qtbase qtdeclarative qtsvg - recommends = qtmultimedia - path = qtvirtualkeyboard - url = ../qtvirtualkeyboard.git - branch = 6.7.0 - status = addon -[submodule "qtgamepad"] - depends = qtbase - recommends = qtdeclarative - path = qtgamepad - url = ../qtgamepad.git - branch = dev - status = ignore -[submodule "qtscxml"] - depends = qtbase qtdeclarative - path = qtscxml - url = ../qtscxml.git - branch = 6.7.0 - status = addon -[submodule "qtspeech"] - depends = qtbase qtmultimedia - recommends = qtdeclarative - path = qtspeech - url = ../qtspeech.git - branch = 6.7.0 - status = addon -[submodule "qtnetworkauth"] - depends = qtbase - path = qtnetworkauth - url = ../qtnetworkauth.git - branch = 6.7.0 - status = addon -[submodule "qtremoteobjects"] - depends = qtbase - recommends = qtdeclarative - path = qtremoteobjects - url = ../qtremoteobjects.git - branch = 6.7.0 - status = addon -[submodule "qtwebglplugin"] - depends = qtbase qtwebsockets - recommends = qtdeclarative - path = qtwebglplugin - url = ../qtwebglplugin.git - branch = dev - status = ignore -[submodule "qtlottie"] - depends = qtbase qtdeclarative - path = qtlottie - url = ../qtlottie.git - branch = 6.7.0 - status = addon -[submodule "qtquicktimeline"] - depends = qtbase qtdeclarative - path = qtquicktimeline - url = ../qtquicktimeline - branch = 6.7.0 - status = addon -[submodule "qtquick3d"] - depends = qtbase qtdeclarative qtshadertools - recommends = qtquicktimeline - path = qtquick3d - url = ../qtquick3d.git - branch = 6.7.0 - status = addon -[submodule "qtshadertools"] - depends = qtbase - path = qtshadertools - url = ../qtshadertools.git - branch = 6.7.0 - status = addon -[submodule "qt5compat"] - depends = qtbase qtdeclarative - path = qt5compat - url = ../qt5compat.git - branch = 6.7.0 - status = deprecated -[submodule "qtcoap"] - depends = qtbase - path = qtcoap - url = ../qtcoap.git - branch = 6.7 - status = addon -[submodule "qtmqtt"] - depends = qtbase qtdeclarative - path = qtmqtt - url = ../qtmqtt.git - branch = 6.7 - status = addon -[submodule "qtopcua"] - depends = qtbase qtdeclarative - path = qtopcua - url = ../qtopcua.git - branch = 6.7 - status = addon -[submodule "qtlanguageserver"] - depends = qtbase - path = qtlanguageserver - url = ../qtlanguageserver.git - branch = 6.7.0 - status = preview -[submodule "qthttpserver"] - depends = qtbase - recommends = qtwebsockets - path = qthttpserver - url = ../qthttpserver.git - branch = 6.7.0 - status = preview -[submodule "qtquick3dphysics"] - depends = qtbase qtdeclarative qtquick3d qtshadertools - path = qtquick3dphysics - url = ../qtquick3dphysics.git - branch = 6.7.0 - status = addon -[submodule "qtgrpc"] - depends = qtbase - recommends = qtdeclarative - path = qtgrpc - url = ../qtgrpc.git - branch = 6.7.0 - status = preview -[submodule "qtquickeffectmaker"] - depends = qtbase qtdeclarative qtshadertools - recommends = qtquick3d - path = qtquickeffectmaker - url = ../qtquickeffectmaker.git - branch = 6.7.0 - status = addon -[submodule "qtgraphs"] - depends = qtbase qtdeclarative qtquick3d - path = qtgraphs - url = ../qtgraphs.git - branch = 6.7.0 - status = preview diff --git a/recipes/qt/6.x.x/qtmodules6.7.3.conf b/recipes/qt/6.x.x/qtmodules6.7.3.conf new file mode 100644 index 0000000000000..416cfaa7ace55 --- /dev/null +++ b/recipes/qt/6.x.x/qtmodules6.7.3.conf @@ -0,0 +1,338 @@ +[submodule "qtbase"] + path = qtbase + url = ../qtbase.git + branch = 6.7.3 + status = essential +[submodule "qtsvg"] + depends = qtbase + path = qtsvg + url = ../qtsvg.git + branch = 6.7.3 + status = addon +[submodule "qtdeclarative"] + depends = qtbase + recommends = qtimageformats qtshadertools qtsvg qtlanguageserver + path = qtdeclarative + url = ../qtdeclarative.git + branch = 6.7.3 + status = essential +[submodule "qtactiveqt"] + depends = qtbase + path = qtactiveqt + url = ../qtactiveqt.git + branch = 6.7.3 + status = addon +[submodule "qtmultimedia"] + depends = qtbase qtshadertools + recommends = qtdeclarative qtquick3d + path = qtmultimedia + url = ../qtmultimedia.git + branch = 6.7.3 + status = addon +[submodule "qttools"] + depends = qtbase + recommends = qtdeclarative qtactiveqt + path = qttools + url = ../qttools.git + branch = 6.7.3 + status = essential +[submodule "qtxmlpatterns"] + depends = qtbase + recommends = qtdeclarative + path = qtxmlpatterns + url = ../qtxmlpatterns.git + branch = dev + status = ignore +[submodule "qttranslations"] + depends = qttools + path = qttranslations + url = ../qttranslations.git + branch = 6.7.3 + status = essential + priority = 30 +[submodule "qtdoc"] + depends = qtdeclarative qttools + recommends = qtmultimedia qtshadertools qtwebengine + path = qtdoc + url = ../qtdoc.git + branch = 6.7.3 + status = essential + priority = 40 +[submodule "qtrepotools"] + path = qtrepotools + url = ../qtrepotools.git + branch = master + status = essential + project = - +[submodule "qtqa"] + depends = qtbase + path = qtqa + url = ../qtqa.git + branch = dev + status = essential + priority = 50 +[submodule "qtlocation"] + depends = qtbase qtpositioning + recommends = qtdeclarative + path = qtlocation + url = ../qtlocation.git + branch = 6.7.3 + status = preview +[submodule "qtpositioning"] + depends = qtbase + recommends = qtdeclarative qtserialport + path = qtpositioning + url = ../qtpositioning.git + branch = 6.7.3 + status = addon +[submodule "qtsensors"] + depends = qtbase + recommends = qtdeclarative + path = qtsensors + url = ../qtsensors.git + branch = 6.7.3 + status = addon +[submodule "qtsystems"] + depends = qtbase + recommends = qtdeclarative + path = qtsystems + url = ../qtsystems.git + branch = dev + status = ignore +[submodule "qtfeedback"] + depends = qtdeclarative + recommends = qtmultimedia + path = qtfeedback + url = ../qtfeedback.git + branch = master + status = ignore +[submodule "qtpim"] + depends = qtdeclarative + path = qtpim + url = ../qtpim.git + branch = dev + status = ignore +[submodule "qtconnectivity"] + depends = qtbase + recommends = qtdeclarative + path = qtconnectivity + url = ../qtconnectivity.git + branch = 6.7.3 + status = addon +[submodule "qtwayland"] + depends = qtbase + recommends = qtdeclarative + path = qtwayland + url = ../qtwayland.git + branch = 6.7.3 + status = addon +[submodule "qt3d"] + depends = qtbase + recommends = qtdeclarative qtshadertools qtmultimedia + path = qt3d + url = ../qt3d.git + branch = 6.7.3 + status = addon +[submodule "qtimageformats"] + depends = qtbase + path = qtimageformats + url = ../qtimageformats.git + branch = 6.7.3 + status = addon +[submodule "qtserialbus"] + depends = qtbase + recommends = qtserialport + path = qtserialbus + url = ../qtserialbus.git + branch = 6.7.3 + status = addon +[submodule "qtserialport"] + depends = qtbase + path = qtserialport + url = ../qtserialport.git + branch = 6.7.3 + status = addon +[submodule "qtwebsockets"] + depends = qtbase + recommends = qtdeclarative + path = qtwebsockets + url = ../qtwebsockets.git + branch = 6.7.3 + status = addon +[submodule "qtwebchannel"] + depends = qtbase + recommends = qtdeclarative qtwebsockets + path = qtwebchannel + url = ../qtwebchannel.git + branch = 6.7.3 + status = addon +[submodule "qtwebengine"] + depends = qtdeclarative + recommends = qtwebchannel qttools qtpositioning + path = qtwebengine + url = ../qtwebengine.git + branch = 6.7.3 + status = addon + priority = 10 +[submodule "qtcanvas3d"] + depends = qtdeclarative + path = qtcanvas3d + url = ../qtcanvas3d.git + branch = dev + status = ignore +[submodule "qtwebview"] + depends = qtdeclarative + recommends = qtwebengine + path = qtwebview + url = ../qtwebview.git + branch = 6.7.3 + status = addon +[submodule "qtcharts"] + depends = qtbase + recommends = qtdeclarative qtmultimedia + path = qtcharts + url = ../qtcharts.git + branch = 6.7.3 + status = addon +[submodule "qtdatavis3d"] + depends = qtbase + recommends = qtdeclarative qtmultimedia + path = qtdatavis3d + url = ../qtdatavis3d.git + branch = 6.7.3 + status = addon +[submodule "qtvirtualkeyboard"] + depends = qtbase qtdeclarative qtsvg + recommends = qtmultimedia + path = qtvirtualkeyboard + url = ../qtvirtualkeyboard.git + branch = 6.7.3 + status = addon +[submodule "qtgamepad"] + depends = qtbase + recommends = qtdeclarative + path = qtgamepad + url = ../qtgamepad.git + branch = dev + status = ignore +[submodule "qtscxml"] + depends = qtbase qtdeclarative + path = qtscxml + url = ../qtscxml.git + branch = 6.7.3 + status = addon +[submodule "qtspeech"] + depends = qtbase qtmultimedia + recommends = qtdeclarative + path = qtspeech + url = ../qtspeech.git + branch = 6.7.3 + status = addon +[submodule "qtnetworkauth"] + depends = qtbase + path = qtnetworkauth + url = ../qtnetworkauth.git + branch = 6.7.3 + status = addon +[submodule "qtremoteobjects"] + depends = qtbase + recommends = qtdeclarative + path = qtremoteobjects + url = ../qtremoteobjects.git + branch = 6.7.3 + status = addon +[submodule "qtwebglplugin"] + depends = qtbase qtwebsockets + recommends = qtdeclarative + path = qtwebglplugin + url = ../qtwebglplugin.git + branch = dev + status = ignore +[submodule "qtlottie"] + depends = qtbase qtdeclarative + path = qtlottie + url = ../qtlottie.git + branch = 6.7.3 + status = addon +[submodule "qtquicktimeline"] + depends = qtbase qtdeclarative + path = qtquicktimeline + url = ../qtquicktimeline + branch = 6.7.3 + status = addon +[submodule "qtquick3d"] + depends = qtbase qtdeclarative qtshadertools + recommends = qtquicktimeline + path = qtquick3d + url = ../qtquick3d.git + branch = 6.7.3 + status = addon +[submodule "qtshadertools"] + depends = qtbase + path = qtshadertools + url = ../qtshadertools.git + branch = 6.7.3 + status = addon +[submodule "qt5compat"] + depends = qtbase qtdeclarative + path = qt5compat + url = ../qt5compat.git + branch = 6.7.3 + status = deprecated +[submodule "qtcoap"] + depends = qtbase + path = qtcoap + url = ../qtcoap.git + branch = 6.7.3 + status = addon +[submodule "qtmqtt"] + depends = qtbase qtdeclarative + path = qtmqtt + url = ../qtmqtt.git + branch = 6.7.3 + status = addon +[submodule "qtopcua"] + depends = qtbase qtdeclarative + path = qtopcua + url = ../qtopcua.git + branch = 6.7.3 + status = addon +[submodule "qtlanguageserver"] + depends = qtbase + path = qtlanguageserver + url = ../qtlanguageserver.git + branch = 6.7.3 + status = preview +[submodule "qthttpserver"] + depends = qtbase + recommends = qtwebsockets + path = qthttpserver + url = ../qthttpserver.git + branch = 6.7.3 + status = preview +[submodule "qtquick3dphysics"] + depends = qtbase qtdeclarative qtquick3d qtshadertools + path = qtquick3dphysics + url = ../qtquick3dphysics.git + branch = 6.7.3 + status = addon +[submodule "qtgrpc"] + depends = qtbase + recommends = qtdeclarative + path = qtgrpc + url = ../qtgrpc.git + branch = 6.7.3 + status = preview +[submodule "qtquickeffectmaker"] + depends = qtbase qtdeclarative qtshadertools + recommends = qtquick3d + path = qtquickeffectmaker + url = ../qtquickeffectmaker.git + branch = 6.7.3 + status = addon +[submodule "qtgraphs"] + depends = qtbase qtdeclarative qtquick3d + path = qtgraphs + url = ../qtgraphs.git + branch = 6.7.3 + status = preview diff --git a/recipes/qt/6.x.x/test_package/CMakeLists.txt b/recipes/qt/6.x.x/test_package/CMakeLists.txt index 337604f1af6ee..45e4bb9ec9ab7 100644 --- a/recipes/qt/6.x.x/test_package/CMakeLists.txt +++ b/recipes/qt/6.x.x/test_package/CMakeLists.txt @@ -3,7 +3,16 @@ project(test_package LANGUAGES CXX) find_package(Qt6 COMPONENTS Core Network Sql Concurrent Xml REQUIRED CONFIG) -add_executable(${PROJECT_NAME} WIN32 test_package.cpp greeter.h example.qrc) -target_link_libraries(${PROJECT_NAME} PRIVATE Qt6::Core Qt6::Network Qt6::Sql Qt6::Concurrent Qt6::Xml) +add_executable(${PROJECT_NAME} test_package.cpp greeter.h example.qrc) +target_link_libraries(${PROJECT_NAME} PRIVATE Qt6::Core Qt6::Network Qt6::Sql Qt6::Concurrent Qt6::Xml Qt6::Widgets) target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) set_target_properties(${PROJECT_NAME} PROPERTIES AUTOMOC ON AUTORCC ON) + +# Only running this Qt macros in macOS +if (APPLE) + # Related to https://github.com/conan-io/conan-center-index/issues/20574 + qt_standard_project_setup() + qt_add_executable(test_macos_bundle MACOSX_BUNDLE test_macos_bundle.cpp) + target_link_libraries(test_macos_bundle PRIVATE Qt6::Core) + target_compile_features(test_macos_bundle PRIVATE cxx_std_17) +endif() diff --git a/recipes/qt/6.x.x/test_package/conanfile.py b/recipes/qt/6.x.x/test_package/conanfile.py index 1153f37c5a877..11efc3f08b07a 100644 --- a/recipes/qt/6.x.x/test_package/conanfile.py +++ b/recipes/qt/6.x.x/test_package/conanfile.py @@ -24,22 +24,8 @@ def build_requirements(self): def generate(self): path = self.dependencies["qt"].package_folder.replace("\\", "/") - folder = os.path.join(path, "bin") - bin_folder = "bin" if self.settings.os == "Windows" else "libexec" save(self, "qt.conf", f"""[Paths] -Prefix = {path} -ArchData = {folder}/archdatadir -HostData = {folder}/archdatadir -Data = {folder}/datadir -Sysconf = {folder}/sysconfdir -LibraryExecutables = {folder}/archdatadir/{bin_folder} -HostLibraryExecutables = bin -Plugins = {folder}/archdatadir/plugins -Imports = {folder}/archdatadir/imports -Qml2Imports = {folder}/archdatadir/qml -Translations = {folder}/datadir/translations -Documentation = {folder}/datadir/doc -Examples = {folder}/datadir/examples""") +Prefix = {path}""") VirtualRunEnv(self).generate() if can_run(self): @@ -55,3 +41,7 @@ def test(self): copy(self, "qt.conf", src=self.generators_folder, dst=os.path.join(self.cpp.build.bindirs[0])) bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") self.run(bin_path, env="conanrun") + # Related to https://github.com/conan-io/conan-center-index/issues/20574 + if self.settings.os == "Macos": + bin_macos_path = os.path.join(self.cpp.build.bindirs[0], "test_macos_bundle.app", "Contents", "MacOS", "test_macos_bundle") + self.run(bin_macos_path, env="conanrun") diff --git a/recipes/qt/6.x.x/test_package/test_macos_bundle.cpp b/recipes/qt/6.x.x/test_package/test_macos_bundle.cpp new file mode 100644 index 0000000000000..fb10bbf49cdff --- /dev/null +++ b/recipes/qt/6.x.x/test_package/test_macos_bundle.cpp @@ -0,0 +1,7 @@ +#include + +int main(int argc, char *argv[]) +{ + QCoreApplication app(argc, argv); + return 0; + } diff --git a/recipes/qt/6.x.x/test_v1_package/conanfile.py b/recipes/qt/6.x.x/test_v1_package/conanfile.py index 85db60ab1408b..a586ad3bd4cbc 100644 --- a/recipes/qt/6.x.x/test_v1_package/conanfile.py +++ b/recipes/qt/6.x.x/test_v1_package/conanfile.py @@ -22,18 +22,7 @@ def build_requirements(self): def generate(self): save(self, "qt.conf", """[Paths] -Prefix = {} -ArchData = bin/archdatadir -HostData = bin/archdatadir -Data = bin/datadir -Sysconf = bin/sysconfdir -LibraryExecutables = bin/archdatadir/bin -Plugins = bin/archdatadir/plugins -Imports = bin/archdatadir/imports -Qml2Imports = bin/archdatadir/qml -Translations = bin/datadir/translations -Documentation = bin/datadir/doc -Examples = bin/datadir/examples""".format(self.dependencies["qt"].package_folder.replace('\\', '/'))) +Prefix = {}""".format(self.dependencies["qt"].package_folder.replace('\\', '/'))) def _is_mingw(self): return self.settings.os == "Windows" and self.settings.compiler == "gcc" diff --git a/recipes/qt/config.yml b/recipes/qt/config.yml index 238dd7a439c7d..9272ecb61ec93 100644 --- a/recipes/qt/config.yml +++ b/recipes/qt/config.yml @@ -1,27 +1,9 @@ versions: - "6.7.0": + "6.7.3": folder: 6.x.x "6.6.3": folder: 6.x.x - "6.6.2": - folder: 6.x.x - "6.6.1": - folder: 6.x.x - "6.6.0": - folder: 6.x.x "6.5.3": folder: 6.x.x - "6.4.2": - folder: 6.x.x - "6.3.2": - folder: 6.x.x - "5.15.13": - folder: 5.x.x - "5.15.12": - folder: 5.x.x - "5.15.11": - folder: 5.x.x - "5.15.10": - folder: 5.x.x - "5.15.9": + "5.15.14": folder: 5.x.x diff --git a/recipes/qtxlsxwriter/all/conanfile.py b/recipes/qtxlsxwriter/all/conanfile.py index 6acde10a92b2e..e8b849d77cbf6 100644 --- a/recipes/qtxlsxwriter/all/conanfile.py +++ b/recipes/qtxlsxwriter/all/conanfile.py @@ -7,7 +7,7 @@ from conan.tools.scm import Version import os -required_conan_version = ">=1.53.0" +required_conan_version = ">=1.63.0" class QtXlsxWriterConan(ConanFile): @@ -45,7 +45,7 @@ def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - self.requires("qt/5.15.13", transitive_headers=True, transitive_libs=True) + self.requires("qt/[~5.15]", transitive_headers=True, transitive_libs=True) def validate(self): if not self.dependencies["qt"].options.gui: @@ -56,7 +56,7 @@ def validate(self): def build_requirements(self): if hasattr(self, "settings_build") and cross_building(self): - self.tool_requires("qt/5.15.7") + self.tool_requires("qt/") def source(self): get(self, **self.conan_data["sources"][self.version]["source"], diff --git a/recipes/quazip/all/conandata.yml b/recipes/quazip/all/conandata.yml index e1e86960ccb10..9ffb2b7d9ce95 100644 --- a/recipes/quazip/all/conandata.yml +++ b/recipes/quazip/all/conandata.yml @@ -8,9 +8,6 @@ sources: "1.2": url: "https://github.com/stachenov/quazip/archive/v1.2.tar.gz" sha256: "2dfb911d6b27545de0b98798d967c40430312377e6ade57096d6ec80c720cb61" - "1.1": - url: "https://github.com/stachenov/quazip/archive/v1.1.tar.gz" - sha256: "54edce9c11371762bd4f0003c2937b5d8806a2752dd9c0fd9085e90792612ad0" patches: "1.3": - patch_file: "patches/1.3-0001-use-cpp17-for-qt6.patch" diff --git a/recipes/quazip/all/conanfile.py b/recipes/quazip/all/conanfile.py index 6e40033d8025b..0d9d896af6cc1 100644 --- a/recipes/quazip/all/conanfile.py +++ b/recipes/quazip/all/conanfile.py @@ -48,7 +48,7 @@ def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - self.requires("qt/5.15.9", transitive_headers=True, transitive_libs=True) + self.requires("qt/[~5.15]", transitive_headers=True, transitive_libs=True) self.requires("zlib/[>=1.2.11 <2]", transitive_headers=True) if Version(self.version) >= "1.4": self.requires("bzip2/1.0.8") diff --git a/recipes/quazip/config.yml b/recipes/quazip/config.yml index 889c86eb7e377..f55a2df2807c5 100644 --- a/recipes/quazip/config.yml +++ b/recipes/quazip/config.yml @@ -5,5 +5,3 @@ versions: folder: all "1.2": folder: all - "1.1": - folder: all diff --git a/recipes/quickfast/all/CMakeLists.txt b/recipes/quickfast/all/CMakeLists.txt index 99facf34f7dda..69448bef01a75 100644 --- a/recipes/quickfast/all/CMakeLists.txt +++ b/recipes/quickfast/all/CMakeLists.txt @@ -1,75 +1,58 @@ -# based on: https://github.com/microsoft/vcpkg/blob/master/ports/quickfast/CMakeLists.txt - -# Copyright (c) Microsoft Corporation - -# All rights reserved. - -# MIT License - -# Permission is hereby granted, free of charge, to any person obtaining a copy of -# this software and associated documentation files (the "Software"), to deal in -# the Software without restriction, including without limitation the rights to -# use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -# of the Software, and to permit persons to whom the Software is furnished to do -# so, subject to the following conditions: - -# The above copyright notice and this permission notice shall be included in all -# copies or substantial portions of the Software. - -# THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# SOFTWARE. - -cmake_minimum_required(VERSION 3.13) +cmake_minimum_required(VERSION 3.15) project(quickfast CXX) -include(${PROJECT_BINARY_DIR}/../conanbuildinfo.cmake) -conan_basic_setup() +find_package(Boost REQUIRED CONFIG) +find_package(XercesC REQUIRED CONFIG) file(GLOB SOURCES - source_subfolder/src/Application/*.cpp - source_subfolder/src/Common/*.cpp - source_subfolder/src/Codecs/*.cpp - source_subfolder/src/Communication/*.cpp - source_subfolder/src/Messages/*.cpp + src/Application/*.cpp + src/Common/*.cpp + src/Codecs/*.cpp + src/Communication/*.cpp + src/Messages/*.cpp ) -file(GLOB HEADERS RELATIVE ${PROJECT_SOURCE_DIR} - source_subfolder/src/Application/*.h - source_subfolder/src/Common/*.h - source_subfolder/src/Codecs/*.h - source_subfolder/src/Communication/*.h - source_subfolder/src/Messages/*.h +file(GLOB HEADERS + src/Application/*.h + src/Common/*.h + src/Codecs/*.h + src/Communication/*.h + src/Messages/*.h ) add_library(quickfast ${HEADERS} ${SOURCES}) +# Needed to keep support for deprecated placeholders in boost::bind +target_compile_definitions(quickfast PRIVATE -DBOOST_BIND_GLOBAL_PLACEHOLDERS) + if(BUILD_SHARED_LIBS) - target_compile_definitions(quickfast PRIVATE -DQUICKFAST_BUILD_DLL) + target_compile_definitions(quickfast PUBLIC QUICKFAST_BUILD_DLL) else() - target_compile_definitions(quickfast PUBLIC -DQUICKFAST_HAS_DLL=0) + target_compile_definitions(quickfast PUBLIC QUICKFAST_HAS_DLL=0) endif() target_compile_features(quickfast PUBLIC cxx_std_11) - -target_include_directories(quickfast PUBLIC - source_subfolder/src +target_include_directories(quickfast PRIVATE src) +target_link_libraries(${PROJECT_NAME} + Boost::boost + Boost::thread + Boost::system + Boost::filesystem + XercesC::XercesC +) +set_target_properties(quickfast PROPERTIES + PUBLIC_HEADER "${HEADERS}" ) - -target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS}) install(TARGETS quickfast - RUNTIME DESTINATION bin - ARCHIVE DESTINATION lib - LIBRARY DESTINATION lib + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME} ) foreach (HEADER ${HEADERS}) - file(RELATIVE_PATH HEADER_REL ${PROJECT_SOURCE_DIR}/source_subfolder/src ${PROJECT_SOURCE_DIR}/${HEADER}) - get_filename_component(HEADER_DIR ${HEADER_REL} DIRECTORY) - install(FILES ${HEADER} DESTINATION include/quickfast/${HEADER_DIR}) + file(RELATIVE_PATH HEADER_REL ${PROJECT_SOURCE_DIR}/src ${HEADER}) + get_filename_component(HEADER_DIR ${HEADER_REL} DIRECTORY) + install(FILES ${HEADER} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME}/${HEADER_DIR}) endforeach() diff --git a/recipes/quickfast/all/conandata.yml b/recipes/quickfast/all/conandata.yml index f9690b9e48e93..be365a50cf527 100644 --- a/recipes/quickfast/all/conandata.yml +++ b/recipes/quickfast/all/conandata.yml @@ -1,14 +1,16 @@ sources: - "1.5": - url: "https://github.com/objectcomputing/quickfast/archive/V1_5.tar.gz" - sha256: "7ae22d28cc13967a2815c09bec027ce01f2f3e30b6ed752bea00649581e728df" "cci.20170314": url: "https://github.com/objectcomputing/quickfast/archive/f9403cfb20ae5383a04772112728d233502e31c0.tar.gz" sha256: "29f40fa383643bfa381315148c6c985fe41159342706f0d0a274fcf45cf36f49" -patches: "1.5": - - patch_file: "patches/00001-fix-boost-asio.patch" - base_path: "source_subfolder" + url: "https://github.com/objectcomputing/quickfast/archive/V1_5.tar.gz" + sha256: "7ae22d28cc13967a2815c09bec027ce01f2f3e30b6ed752bea00649581e728df" +patches: "cci.20170314": - - patch_file: "patches/00002-fix-boost-asio.patch" - base_path: "source_subfolder" + - patch_file: "patches/0001-cci.20170314-fix-boost-asio.patch" + patch_type: "portability" + patch_description: "Fix compilation issues with newer Boost.Asio" + "1.5": + - patch_file: "patches/0001-1.5-fix-boost-asio.patch" + patch_type: "portability" + patch_description: "Fix compilation issues with newer Boost.Asio" diff --git a/recipes/quickfast/all/conanfile.py b/recipes/quickfast/all/conanfile.py index c5aa454e68422..29ce60d7e04be 100644 --- a/recipes/quickfast/all/conanfile.py +++ b/recipes/quickfast/all/conanfile.py @@ -1,70 +1,83 @@ -from conans import ConanFile, CMake, tools import os -import shutil -import glob + +from conan import ConanFile +from conan.tools.build import check_min_cppstd +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get +from conan.tools.microsoft import is_msvc + +required_conan_version = ">=1.53.0" class QuickfastConan(ConanFile): name = "quickfast" + description = "QuickFAST is an Open Source native C++ implementation of the FAST Protocol" license = "BSD-3-Clause" url = "https://github.com/conan-io/conan-center-index" - homepage = "https://objectcomputing.com/" - description = "QuickFAST is an Open Source native C++ implementation of the FAST Protocol" - topics = ("conan", "QuickFAST", "FAST", "FIX", "Fix Adapted for STreaming", "Financial Information Exchange", - "libraries", "cpp") - settings = "os", "compiler", "build_type", "arch" - options = {"fPIC": [True, False], - "shared": [True, False]} - default_options = {"fPIC": True, - "shared": False} - requires = ["boost/1.75.0", "xerces-c/3.2.3"] - generators = "cmake" - exports_sources = "CMakeLists.txt", "patches/**" - _cmake = None - - @property - def _source_subfolder(self): - return "source_subfolder" - - @property - def _build_subfolder(self): - return "build_subfolder" - - def _configure_cmake(self): - if not self._cmake: - self._cmake = CMake(self) - self._cmake.configure(build_folder=self._build_subfolder) - return self._cmake + homepage = "https://github.com/objectcomputing/quickfast" + topics = ("fast-protocol", "fast", "fix-adapted-for-streaming", "fpl", "fix-protocol-limited") - def source(self): - tools.get(**self.conan_data["sources"][self.version]) - extracted_dir = glob.glob("quickfast-*")[0] - os.rename(extracted_dir, self._source_subfolder) + package_type = "library" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + } + + def export_sources(self): + copy(self, "CMakeLists.txt", self.recipe_folder, os.path.join(self.export_sources_folder, "src")) + export_conandata_patches(self) def config_options(self): if self.settings.os == "Windows": del self.options.fPIC def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + + def layout(self): + cmake_layout(self, src_folder="src") + + def requirements(self): + # Uses Boost.Asio transitively + self.requires("boost/1.85.0", transitive_headers=True, transitive_libs=True) + self.requires("xerces-c/3.2.5") + + def validate(self): if self.settings.compiler.cppstd: - tools.check_min_cppstd(self, "11") + check_min_cppstd(self, 11) - def build(self): - patches = self.conan_data["patches"][self.version] - for patch in patches: - tools.patch(**patch) + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) - cmake = self._configure_cmake() - cmake.build(target="quickfast") + def generate(self): + tc = CMakeToolchain(self) + tc.generate() + tc = CMakeDeps(self) + tc.generate() + + def build(self): + apply_conandata_patches(self) + cmake = CMake(self) + cmake.configure() + cmake.build() def package(self): - cmake = self._configure_cmake() + copy(self, "license.txt", self.source_folder, os.path.join(self.package_folder, "licenses")) + cmake = CMake(self) cmake.install() - self.copy("license.txt", dst="licenses", src=self._source_subfolder) def package_info(self): - self.cpp_info.libs = tools.collect_libs(self) + self.cpp_info.libs = ["quickfast"] self.cpp_info.includedirs.append(os.path.join("include", "quickfast")) - if not self.options.shared: + # Needed to keep support for deprecated placeholders in boost::bind + self.cpp_info.defines.append("BOOST_BIND_GLOBAL_PLACEHOLDERS") + + if is_msvc(self) and not self.options.shared: self.cpp_info.defines.append("QUICKFAST_HAS_DLL=0") diff --git a/recipes/quickfast/all/patches/00001-fix-boost-asio.patch b/recipes/quickfast/all/patches/00001-fix-boost-asio.patch deleted file mode 100644 index 02dcc3611cf5c..0000000000000 --- a/recipes/quickfast/all/patches/00001-fix-boost-asio.patch +++ /dev/null @@ -1,42 +0,0 @@ -Patch taken from: -https://raw.githubusercontent.com/microsoft/vcpkg/master/ports/quickfast/00001-fix-boost-asio.patch - -diff --git a/src/Common/QuickFASTPch.h b/src/Common/QuickFASTPch.h -index 3574df8..c4ef4e1 100644 ---- a/src/Common/QuickFASTPch.h -+++ b/src/Common/QuickFASTPch.h -@@ -32,7 +32,7 @@ - #include - - // If building for .NET, must link boost threads dynamically --#define BOOST_THREAD_USE_DLL -+// #define BOOST_THREAD_USE_DLL - // This reports at compile time which boost libraries will be used - // #define BOOST_LIB_DIAGNOSTIC - -diff --git a/src/Communication/AsioService.h b/src/Communication/AsioService.h -index 4f61915..96f2198 100644 ---- a/src/Communication/AsioService.h -+++ b/src/Communication/AsioService.h -@@ -99,6 +99,7 @@ namespace QuickFAST - { - return ioService_; - } -+ boost::asio::io_service::executor_type get_executor() BOOST_ASIO_NOEXCEPT { return ioService_.get_executor();} - - ///@brief Post a completion handler for later processing (usually in a different thread) - /// @param handler is the handler to be posted -diff --git a/src/Communication/AsioService_fwd.h b/src/Communication/AsioService_fwd.h -index dc2f235..6ad5e68 100644 ---- a/src/Communication/AsioService_fwd.h -+++ b/src/Communication/AsioService_fwd.h -@@ -17,7 +17,8 @@ namespace boost - { - namespace asio - { -- class io_service; -+ class io_context; -+ typedef io_context io_service; - } - } - diff --git a/recipes/quickfast/all/patches/00002-fix-boost-asio.patch b/recipes/quickfast/all/patches/00002-fix-boost-asio.patch deleted file mode 100644 index 62dc10d507afe..0000000000000 --- a/recipes/quickfast/all/patches/00002-fix-boost-asio.patch +++ /dev/null @@ -1,42 +0,0 @@ -Patch adapted from: -https://raw.githubusercontent.com/microsoft/vcpkg/master/ports/quickfast/00001-fix-boost-asio.patch - -diff --git a/src/Common/QuickFASTPch.h b/src/Common/QuickFASTPch.h -index 381f846..e6f6b13 100644 ---- a/src/Common/QuickFASTPch.h -+++ b/src/Common/QuickFASTPch.h -@@ -36,7 +36,7 @@ - #include - - // If building for .NET, must link boost threads dynamically --#define BOOST_THREAD_USE_DLL -+// #define BOOST_THREAD_USE_DLL - // This reports at compile time which boost libraries will be used - // #define BOOST_LIB_DIAGNOSTIC - -diff --git a/src/Communication/AsioService.h b/src/Communication/AsioService.h -index 4f61915..54f92ed 100644 ---- a/src/Communication/AsioService.h -+++ b/src/Communication/AsioService.h -@@ -58,6 +58,7 @@ namespace QuickFAST - { - return ioService_.poll(); - } -+ boost::asio::io_service::executor_type get_executor() BOOST_ASIO_NOEXCEPT { return ioService_.get_executor();} - - /// @brief execute at most one ready event handler than return. - size_t poll_one() -diff --git a/src/Communication/AsioService_fwd.h b/src/Communication/AsioService_fwd.h -index dc2f235..6ad5e68 100644 ---- a/src/Communication/AsioService_fwd.h -+++ b/src/Communication/AsioService_fwd.h -@@ -17,7 +17,8 @@ namespace boost - { - namespace asio - { -- class io_service; -+ class io_context; -+ typedef io_context io_service; - } - } - diff --git a/recipes/quickfast/all/patches/0001-1.5-fix-boost-asio.patch b/recipes/quickfast/all/patches/0001-1.5-fix-boost-asio.patch new file mode 100644 index 0000000000000..379f2376249fb --- /dev/null +++ b/recipes/quickfast/all/patches/0001-1.5-fix-boost-asio.patch @@ -0,0 +1,44 @@ +diff --git a/src/Common/QuickFASTPch.h b/src/Common/QuickFASTPch.h +index 3574df8..5e21e89 100644 +--- a/src/Common/QuickFASTPch.h ++++ b/src/Common/QuickFASTPch.h +@@ -32,7 +32,6 @@ + #include + + // If building for .NET, must link boost threads dynamically +-#define BOOST_THREAD_USE_DLL + // This reports at compile time which boost libraries will be used + // #define BOOST_LIB_DIAGNOSTIC + +diff --git a/src/Communication/AsioService.h b/src/Communication/AsioService.h +index 4f61915..b5fa821 100644 +--- a/src/Communication/AsioService.h ++++ b/src/Communication/AsioService.h +@@ -24,7 +24,7 @@ namespace QuickFAST + /// Normal case is for all classes derived from AsioService to share + /// the same boost::io_service. The alternate constructor gives the + /// application more control if it is needed. +- class QuickFAST_Export AsioService ++ class QuickFAST_Export AsioService : public boost::asio::io_service + { + public: + /// @brief Construct using the internal, common io service +diff --git a/src/Communication/AsioService_fwd.h b/src/Communication/AsioService_fwd.h +index dc2f235..8d9be19 100644 +--- a/src/Communication/AsioService_fwd.h ++++ b/src/Communication/AsioService_fwd.h +@@ -13,13 +13,7 @@ + + // forward declare io_service without including + // boost header +-namespace boost +-{ +- namespace asio +- { +- class io_service; +- } +-} ++#include + + namespace QuickFAST + { diff --git a/recipes/quickfast/all/patches/0001-cci.20170314-fix-boost-asio.patch b/recipes/quickfast/all/patches/0001-cci.20170314-fix-boost-asio.patch new file mode 100644 index 0000000000000..c18362970703c --- /dev/null +++ b/recipes/quickfast/all/patches/0001-cci.20170314-fix-boost-asio.patch @@ -0,0 +1,44 @@ +diff --git a/src/Common/QuickFASTPch.h b/src/Common/QuickFASTPch.h +index 381f846..d3016bd 100644 +--- a/src/Common/QuickFASTPch.h ++++ b/src/Common/QuickFASTPch.h +@@ -36,7 +36,6 @@ + #include + + // If building for .NET, must link boost threads dynamically +-#define BOOST_THREAD_USE_DLL + // This reports at compile time which boost libraries will be used + // #define BOOST_LIB_DIAGNOSTIC + +diff --git a/src/Communication/AsioService.h b/src/Communication/AsioService.h +index 4f61915..b5fa821 100644 +--- a/src/Communication/AsioService.h ++++ b/src/Communication/AsioService.h +@@ -24,7 +24,7 @@ namespace QuickFAST + /// Normal case is for all classes derived from AsioService to share + /// the same boost::io_service. The alternate constructor gives the + /// application more control if it is needed. +- class QuickFAST_Export AsioService ++ class QuickFAST_Export AsioService : public boost::asio::io_service + { + public: + /// @brief Construct using the internal, common io service +diff --git a/src/Communication/AsioService_fwd.h b/src/Communication/AsioService_fwd.h +index dc2f235..8d9be19 100644 +--- a/src/Communication/AsioService_fwd.h ++++ b/src/Communication/AsioService_fwd.h +@@ -13,13 +13,7 @@ + + // forward declare io_service without including + // boost header +-namespace boost +-{ +- namespace asio +- { +- class io_service; +- } +-} ++#include + + namespace QuickFAST + { diff --git a/recipes/quickfast/all/test_package/CMakeLists.txt b/recipes/quickfast/all/test_package/CMakeLists.txt index 05ee1b02f3e86..de906d5745a41 100644 --- a/recipes/quickfast/all/test_package/CMakeLists.txt +++ b/recipes/quickfast/all/test_package/CMakeLists.txt @@ -1,11 +1,8 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.15) project(PackageTest CXX) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup() +find_package(quickfast REQUIRED CONFIG) add_executable(test ${PROJECT_SOURCE_DIR}/main.cpp) - -target_link_libraries(test ${CONAN_LIBS}) - -set_property(TARGET test PROPERTY CXX_STANDARD 11) +target_link_libraries(test PRIVATE quickfast::quickfast) +target_compile_features(test PRIVATE cxx_std_11) diff --git a/recipes/quickfast/all/test_package/conanfile.py b/recipes/quickfast/all/test_package/conanfile.py index 9f2cb9b06805b..ab9a844efa050 100644 --- a/recipes/quickfast/all/test_package/conanfile.py +++ b/recipes/quickfast/all/test_package/conanfile.py @@ -1,11 +1,19 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake import os -from conans import ConanFile, CMake, tools +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" -class QuickfastTestConan(ConanFile): - settings = "os", "compiler", "build_type", "arch" - generators = "cmake" + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) def build(self): cmake = CMake(self) @@ -13,6 +21,6 @@ def build(self): cmake.build() def test(self): - if not tools.cross_building(self): - bin_path = os.path.join("bin", "test") - self.run(bin_path, run_environment=True) + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test") + self.run(bin_path, env="conanrun") diff --git a/recipes/quickfast/all/test_package/main.cpp b/recipes/quickfast/all/test_package/main.cpp index 5adcb1b48cd8f..035eaf9d16cd3 100644 --- a/recipes/quickfast/all/test_package/main.cpp +++ b/recipes/quickfast/all/test_package/main.cpp @@ -1,37 +1,12 @@ -#include "Application/QuickFAST.h" -#include "Codecs/MessageConsumer.h" -#include "Codecs/GenericMessageBuilder.h" +#include +#include -using namespace QuickFAST; +#include +#include -class MessageInterpreter : public Codecs::MessageConsumer -{ -public: - MessageInterpreter(std::ostream & out, bool silent = false){ }; - virtual ~MessageInterpreter(){ }; - void setLogLevel(Common::Logger::LogLevel level){ }; - virtual bool consumeMessage(Messages::Message & message){return true;} - virtual bool wantLog(unsigned short level){return true;} - virtual bool logMessage(unsigned short level, const std::string & logMessage){return true;} - virtual bool reportDecodingError(const std::string & errorMessage){return true;} - virtual bool reportCommunicationError(const std::string & errorMessage){return true;} - virtual void decodingStarted(){ } - virtual void decodingStopped(){ } -}; +int main() { + const auto field = QuickFAST::Messages::FieldAscii::create("Hello, World!"); + std::cout << field->toAscii() << std::endl; -int main(int argc, char* argv[]) -{ - Application::DecoderConfiguration configuration_; - Application::DecoderConnection connection_; - - try - { - MessageInterpreter handler(std::cout); - Codecs::GenericMessageBuilder builder(handler); - connection_.configure(builder, configuration_); - connection_.run(); - } - catch (std::exception &) - { - } + return EXIT_SUCCESS; } diff --git a/recipes/quickfast/all/test_v1_package/CMakeLists.txt b/recipes/quickfast/all/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..91630d79f4abb --- /dev/null +++ b/recipes/quickfast/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/quickfast/all/test_v1_package/conanfile.py b/recipes/quickfast/all/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..600f82de3b940 --- /dev/null +++ b/recipes/quickfast/all/test_v1_package/conanfile.py @@ -0,0 +1,18 @@ +import os + +from conans import ConanFile, CMake, tools + + +class QuickfastTestConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake", "cmake_find_package_multi" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if not tools.cross_building(self): + bin_path = os.path.join("bin", "test") + self.run(bin_path, run_environment=True) diff --git a/recipes/quickfast/config.yml b/recipes/quickfast/config.yml index 4aad8295800a6..aafc5449a0ecd 100644 --- a/recipes/quickfast/config.yml +++ b/recipes/quickfast/config.yml @@ -1,5 +1,5 @@ versions: - "1.5": - folder: all "cci.20170314": folder: all + "1.5": + folder: all diff --git a/recipes/quill/all/conandata.yml b/recipes/quill/all/conandata.yml index 0be2d4ac0fc31..a55a5abd1655a 100644 --- a/recipes/quill/all/conandata.yml +++ b/recipes/quill/all/conandata.yml @@ -1,55 +1,28 @@ sources: - "3.8.0": - url: "https://github.com/odygrd/quill/archive/v3.8.0.tar.gz" - sha256: "d3e1b349c5d6904c9644e5b79ec65f21692e8094a3d75241a7fe071076eef4dd" - "3.7.0": - url: "https://github.com/odygrd/quill/archive/v3.7.0.tar.gz" - sha256: "53afe555c32b4263c9d31ec11bd0d858983374af7a5e79eb26124f803b192515" - "3.6.0": - url: "https://github.com/odygrd/quill/archive/v3.6.0.tar.gz" - sha256: "ba9dc3df262f2e65c57904580cc8407eba9a462001340c17bab7ae1dccddb4bd" - "3.5.1": - url: "https://github.com/odygrd/quill/archive/v3.5.1.tar.gz" - sha256: "9fa4ebe594c66ce2a409630c304724fa7a2ada0d842ba9c9aaf05f0a90b461f9" - "3.5.0": - url: "https://github.com/odygrd/quill/archive/v3.5.0.tar.gz" - sha256: "47a69465cddeb05645745bed0b3099b49cb627464782f765ce9545723ff1fe84" - "3.4.1": - url: "https://github.com/odygrd/quill/archive/v3.4.1.tar.gz" - sha256: "99f6497b8ba37c30c871fab89f14cd7bc989f3eaa921ccd940a521ee60a6a1c5" - "3.4.0": - url: "https://github.com/odygrd/quill/archive/v3.4.0.tar.gz" - sha256: "16a6cfadc288953f07d128bb51e8ebd4ca6bb8ce4175b5a8af53ce7dde324d8d" - "3.3.1": - url: "https://github.com/odygrd/quill/archive/v3.3.1.tar.gz" - sha256: "f929d54a115b45c32dd2acd1a9810336d35c31fde9f5581c51ad2b80f980d0d1" - "3.2.0": - url: "https://github.com/odygrd/quill/archive/v3.2.0.tar.gz" - sha256: "9745ad83b285bbd0481bd14c1b866b7e6121a981dd211b914f5d55955040fd00" - "3.1.0": - url: "https://github.com/odygrd/quill/archive/v3.1.0.tar.gz" - sha256: "9e7aa64c4f8101ed2b59d1cf3156b1c6bdd712ca89a2ec7aa7166905edc3e621" - "3.0.2": - url: "https://github.com/odygrd/quill/archive/v3.0.2.tar.gz" - sha256: "76e9f607168f71cf1028ae7374fbe91225e400c11b5a51a6ebc992c85d012eed" - "2.9.2": - url: "https://github.com/odygrd/quill/archive/v2.9.2.tar.gz" - sha256: "5b5b502f33277d1ebdb39d57898b1ca25affef4819d390927499f368dd562d91" - "2.9.1": - url: "https://github.com/odygrd/quill/archive/v2.9.1.tar.gz" - sha256: "921e053118136f63cebb2ca1d7e42456fd0bf9626facb755884709092753c054" - "2.9.0": - url: "https://github.com/odygrd/quill/archive/v2.9.0.tar.gz" - sha256: "dec64c0fbb4bfbafe28fdeeeefac10206285bf2be4a42ec5dfb7987ca4ccb372" - "2.8.0": - url: "https://github.com/odygrd/quill/archive/v2.8.0.tar.gz" - sha256: "0461a6c314e3d882f3b9ada487ef1bf558925272509ee41a9fd25f7776db6075" - "2.7.0": - url: "https://github.com/odygrd/quill/archive/v2.7.0.tar.gz" - sha256: "10b8912e4c463a3a86b809076b95bec49aa08393d9ae6b92196cd46314236b87" - "2.6.0": - url: "https://github.com/odygrd/quill/archive/v2.6.0.tar.gz" - sha256: "d72fd5a01bf8d3e59ed93a789a8f103bc31efe0fb3c09182c74036a2e3a8451b" - "1.7.3": - url: "https://github.com/odygrd/quill/archive/v1.7.3.tar.gz" - sha256: "3fff0c5ffb19bbde5429369079741f84a6acce3a781b504cec5e677b05461208" + "7.4.0": + url: "https://github.com/odygrd/quill/releases/download/v7.4.0/quill-7.4.0.zip" + sha256: "298820c6e18e87070e01d0d11cb35de2d5007718e2a81f9ec9533b75d6233eac" + "7.3.0": + url: "https://github.com/odygrd/quill/releases/download/v7.3.0/quill-7.3.0.zip" + sha256: "ec58fadeecae50a331018ac0893d9d5d4dec7726cc213f9a343e12bb3fd4e50a" + "7.2.2": + url: "https://github.com/odygrd/quill/releases/download/v7.2.2/quill-7.2.2.zip" + sha256: "3b908f498e1a04b5bf2098108461ff2fab9c3350fccae62c96e54c0f868c00be" + "7.2.1": + url: "https://github.com/odygrd/quill/releases/download/v7.2.1/quill-7.2.1.zip" + sha256: "5ca27bbb8866489a9c2fb1da628d9ddfed423cbba1dd1d07c793d7a8237cfaab" + "7.1.0": + url: "https://github.com/odygrd/quill/releases/download/v7.1.0/quill-7.1.0.zip" + sha256: "3edd1e142ae1a5b6d548c8af5bcf4339bf5889e49ade0806a4269c9587b954ae" + "6.1.0": + url: "https://github.com/odygrd/quill/releases/download/v6.1.0/quill-6.1.0.zip" + sha256: "114bea9d3e4f1ef06a3c48c4e5554a1a3cba182731495e229f2d28f8aef04467" + "6.0.0": + url: "https://github.com/odygrd/quill/releases/download/v6.0.0/quill-6.0.0.zip" + sha256: "912de8486ce781d06e3f03c4267d112a0c7f20f93f0470f6ac66a52774c08283" + "4.5.0": + url: "https://github.com/odygrd/quill/releases/download/v4.5.0/quill-4.5.0.zip" + sha256: "cfd579e58c71f884835079287fb0212278de56c0fbbb1484a8e8b26a5e73642e" + "4.4.1": + url: "https://github.com/odygrd/quill/releases/download/v4.4.1/quill-v4.4.1.zip" + sha256: "56587af304f152445bc3594c328521666e04e580200f7a4bbc5e842fc0d7868f" diff --git a/recipes/quill/all/conanfile.py b/recipes/quill/all/conanfile.py index 96693e04b9fe8..beadc3d51e802 100644 --- a/recipes/quill/all/conanfile.py +++ b/recipes/quill/all/conanfile.py @@ -1,10 +1,9 @@ from conan import ConanFile from conan.errors import ConanInvalidConfiguration -from conan.tools.files import get, copy, rmdir, replace_in_file +from conan.tools.files import get, copy, rmdir from conan.tools.build import check_min_cppstd from conan.tools.scm import Version -from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout -from conan.tools.microsoft import is_msvc +from conan.tools.layout import basic_layout import os @@ -16,60 +15,28 @@ class QuillConan(ConanFile): license = "MIT" url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/odygrd/quill/" - topics = ("logging", "log", "async") - package_type = "static-library" + topics = ("logging", "log", "async", "header-only") + package_type = "header-library" settings = "os", "arch", "compiler", "build_type" - options = { - "fPIC": [True, False], - "with_bounded_queue": [True, False], - "with_no_exceptions": [True, False], - "with_x86_arch": [True, False], - "with_bounded_blocking_queue": [True, False], - } - default_options = { - "fPIC": True, - "with_bounded_queue": False, - "with_no_exceptions": False, - "with_x86_arch": False, - "with_bounded_blocking_queue": False, - } @property def _min_cppstd(self): - return "17" if Version(self.version) >= "2.0.0" else "14" + return "17" @property def _compilers_minimum_versions(self): return { - "14": - { - "gcc": "5", - "Visual Studio": "15", - "clang": "5", - "apple-clang": "10", - }, - "17": - { - "gcc": "8", - "Visual Studio": "16", - "clang": "7", - "apple-clang": "12", - }, + "gcc": "8", + "Visual Studio": "16", + "clang": "7", + "apple-clang": "12", } - def config_options(self): - if self.settings.os == "Windows": - del self.options.fPIC - - def configure(self): - if Version(self.version) < "2.8.0": - del self.options.with_bounded_blocking_queue - def layout(self): - cmake_layout(self, src_folder="src") + basic_layout(self, src_folder="src") - def requirements(self): - self.requires("fmt/10.2.1", transitive_headers=True) + def package_id(self): + self.info.clear() def validate(self): supported_archs = ["x86", "x86_64", "armv6", "armv7", "armv7hf", "armv8"] @@ -80,95 +47,49 @@ def validate(self): if self.settings.compiler.get_safe("cppstd"): check_min_cppstd(self, self._min_cppstd) - compilers_minimum_version = self._compilers_minimum_versions[self._min_cppstd] + compilers_minimum_version = self._compilers_minimum_versions minimum_version = compilers_minimum_version.get(str(self.settings.compiler), False) if minimum_version: if Version(self.settings.compiler.version) < minimum_version: raise ConanInvalidConfiguration(f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support.") - else: - self.output.warning(f"{self.ref} requires C++{self._min_cppstd}. Your compiler is unknown. Assuming it supports C++{self._min_cppstd}.") - if Version(self.version) >= "2.0.0" and \ - self.settings.compiler== "clang" and Version(self.settings.compiler.version).major == "11" and \ + if self.settings.compiler== "clang" and Version(self.settings.compiler.version).major == "11" and \ self.settings.compiler.libcxx == "libstdc++": raise ConanInvalidConfiguration(f"{self.ref} requires C++ filesystem library, which your compiler doesn't support.") def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) - def is_quilll_x86_arch(self): - if not self.options.with_x86_arch: - return False - if Version(self.version) < "2.7.0": - return False - if self.settings.arch not in ("x86", "x86_64"): - return False - if self.settings.compiler == "clang" and self.settings.compiler.libcxx == "libc++": - return False - if is_msvc(self): - return False - return True - - def generate(self): - tc = CMakeToolchain(self) - tc.variables["QUILL_FMT_EXTERNAL"] = True - tc.variables["QUILL_ENABLE_INSTALL"] = True - if Version(self.version) < "2.8.0": - tc.variables["QUILL_USE_BOUNDED_QUEUE"] = self.options.with_bounded_queue - else: - if self.options.with_bounded_queue: - tc.preprocessor_definitions["QUILL_USE_BOUNDED_QUEUE"] = 1 - tc.variables["QUILL_NO_EXCEPTIONS"] = self.options.with_no_exceptions - tc.variables["CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS"] = True - if self.is_quilll_x86_arch(): - if Version(self.version) < "2.8.0": - tc.variables["QUILL_X86ARCH"] = True - else: - tc.preprocessor_definitions["QUILL_X86ARCH"] = 1 - tc.variables["CMAKE_CXX_FLAGS"] = "-mclflushopt" - if Version(self.version) >= "2.8.0" and self.options.get_safe("with_bounded_blocking_queue"): - tc.preprocessor_definitions["QUILL_USE_BOUNDED_BLOCKING_QUEUE"] = 1 - if Version(self.version) >= "3.2.0": - tc.variables["QUILL_DISABLE_POSITION_INDEPENDENT_CODE"] = not self.options.get_safe("fPIC") - tc.generate() - - deps = CMakeDeps(self) - deps.generate() - def _patch_sources(self): # remove bundled fmt rmdir(self, os.path.join(self.source_folder, "quill", "quill", "include", "quill", "bundled", "fmt")) - rmdir(self, os.path.join(self.source_folder, "quill", "quill", "src", "bundled", "fmt")) - - if "2.0.0" <= Version(self.version) < "2.9.1": - replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), - """set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_LIST_DIR}/quill/cmake" CACHE STRING "Modules for CMake" FORCE)""", - """set(CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH};${CMAKE_CURRENT_LIST_DIR}/quill/cmake")""" - ) def build(self): self._patch_sources() - cmake = CMake(self) - cmake.configure() - cmake.build() def package(self): copy(self, pattern="LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) - cmake = CMake(self) - cmake.install() - - rmdir(self, os.path.join(self.package_folder, "pkgconfig")) - rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) + if Version(self.version) < "7.0.0": + copy( + self, + "*.h", + os.path.join(self.source_folder, "quill", "include"), + os.path.join(self.package_folder, "include"), + ) + else: + copy( + self, + "*.h", + os.path.join(self.source_folder, "include"), + os.path.join(self.package_folder, "include"), + ) def package_info(self): - self.cpp_info.libs = ["quill"] - self.cpp_info.defines.append("QUILL_FMT_EXTERNAL") - if self.is_quilll_x86_arch(): - self.cpp_info.defines.append("QUILL_X86ARCH") - self.cpp_info.cxxflags.append("-mclflushopt") + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] if self.settings.os in ["Linux", "FreeBSD"]: self.cpp_info.system_libs.append("pthread") - if Version(self.version) >= "2.0.0" and \ - self.settings.compiler == "gcc" and Version(self.settings.compiler.version).major == "8": + self.cpp_info.system_libs.append("rt") + if self.settings.compiler == "gcc" and Version(self.settings.compiler.version).major == "8": self.cpp_info.system_libs.append("stdc++fs") diff --git a/recipes/quill/all/test_package/CMakeLists.txt b/recipes/quill/all/test_package/CMakeLists.txt index b6b657d776df5..a6b5b0e801c6c 100644 --- a/recipes/quill/all/test_package/CMakeLists.txt +++ b/recipes/quill/all/test_package/CMakeLists.txt @@ -4,13 +4,7 @@ project(test_package LANGUAGES CXX) find_package(quill REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) -target_link_libraries(${PROJECT_NAME} PRIVATE quill::quill) -if(quill_VERSION VERSION_GREATER_EQUAL "2.0.0") - target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) -else() - target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_14) -endif() -if(quill_VERSION VERSION_GREATER_EQUAL "3.3.0") - target_compile_definitions(${PROJECT_NAME} PRIVATE QUILL_FILE_HANDLERS_API_V3_3) -endif() +target_link_libraries(${PROJECT_NAME} PRIVATE quill::quill) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) +target_compile_definitions(${PROJECT_NAME} PRIVATE QUILL_FILE_HANDLERS_API_V3_3) diff --git a/recipes/quill/all/test_package/test_package.cpp b/recipes/quill/all/test_package/test_package.cpp index b02a6dd344b06..f3e9e28471bde 100644 --- a/recipes/quill/all/test_package/test_package.cpp +++ b/recipes/quill/all/test_package/test_package.cpp @@ -1,19 +1,45 @@ -#include "quill/Quill.h" +#include "quill/Backend.h" +#include "quill/Frontend.h" +#include "quill/LogMacros.h" +#include "quill/Logger.h" +#include "quill/sinks/ConsoleSink.h" + +#include +#include + +/** + * Trivial logging example to console + */ int main() { - quill::start(); -#ifdef QUILL_FILE_HANDLERS_API_V3_3 - auto file_handler = quill::file_handler("logfile.log", []() { - quill::FileHandlerConfig cfg; - cfg.set_open_mode('w'); - return cfg; - }()); -#else - auto file_handler = quill::file_handler("logfile.log", "w"); -#endif - auto my_logger = quill::create_logger("my_logger", std::move(file_handler)); - - LOG_INFO(my_logger, "Hello from {}", "Quill"); - LOG_CRITICAL(my_logger, "This is a conan example {}", 1234); + // Start the backend thread + quill::BackendOptions backend_options; + quill::Backend::start(backend_options); + + // Frontend + auto console_sink = quill::Frontend::create_or_get_sink("sink_id_1"); + quill::Logger* logger = quill::Frontend::create_or_get_logger("root", std::move(console_sink)); + + // Change the LogLevel to print everything + logger->set_log_level(quill::LogLevel::TraceL3); + + LOG_TRACE_L3(logger, "This is a log trace l3 example {}", 1); + LOG_TRACE_L2(logger, "This is a log trace l2 example {} {}", 2, 2.3); + LOG_TRACE_L1(logger, "This is a log trace l1 {} example", "string"); + LOG_DEBUG(logger, "This is a log debug example {}", 4); + LOG_INFO(logger, "This is a log info example {}", sizeof(std::string)); + LOG_WARNING(logger, "This is a log warning example {}", sizeof(std::string)); + LOG_ERROR(logger, "This is a log error example {}", sizeof(std::string)); + LOG_CRITICAL(logger, "This is a log critical example {}", sizeof(std::string)); + + // libfmt format specification mini language is supported + // note: named arguments are not supported + LOG_INFO(logger, "Support for int: {0:d}; hex: {0:x}; oct: {0:o}; bin: {0:b}", 42); + LOG_INFO(logger, "Easy padding in numbers like {:08d}", 12); + LOG_INFO(logger, "{:>30}", "right aligned"); + LOG_INFO(logger, "Positional arguments {1} {2} {0} ", "too", "are", "supported"); + LOG_INFO(logger, "Support for precision {:.4f}", 1.23456); + + return 0; } diff --git a/recipes/quill/all/test_v1_package/CMakeLists.txt b/recipes/quill/all/test_v1_package/CMakeLists.txt deleted file mode 100644 index 925ecbe19e448..0000000000000 --- a/recipes/quill/all/test_v1_package/CMakeLists.txt +++ /dev/null @@ -1,8 +0,0 @@ -cmake_minimum_required(VERSION 3.1) -project(test_package) - -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) - -add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ - ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/quill/all/test_v1_package/conanfile.py b/recipes/quill/all/test_v1_package/conanfile.py deleted file mode 100644 index 5a05af3c2dfd2..0000000000000 --- a/recipes/quill/all/test_v1_package/conanfile.py +++ /dev/null @@ -1,18 +0,0 @@ -from conans import ConanFile, CMake -from conan.tools.build import cross_building -import os - - -class TestPackageV1Conan(ConanFile): - settings = "os", "arch", "compiler", "build_type" - generators = "cmake", "cmake_find_package_multi" - - def build(self): - cmake = CMake(self) - cmake.configure() - cmake.build() - - def test(self): - if not cross_building(self): - bin_path = os.path.join("bin", "test_package") - self.run(bin_path, run_environment=True) diff --git a/recipes/quill/config.yml b/recipes/quill/config.yml index fb0f6417a4780..600732bcc296b 100644 --- a/recipes/quill/config.yml +++ b/recipes/quill/config.yml @@ -1,37 +1,19 @@ versions: - "3.8.0": + "7.4.0": folder: "all" - "3.7.0": + "7.3.0": folder: "all" - "3.6.0": + "7.2.2": folder: "all" - "3.5.1": + "7.2.1": folder: "all" - "3.5.0": + "7.1.0": folder: "all" - "3.4.1": + "6.1.0": folder: "all" - "3.4.0": + "6.0.0": folder: "all" - "3.3.1": + "4.5.0": folder: "all" - "3.2.0": - folder: "all" - "3.1.0": - folder: "all" - "3.0.2": - folder: "all" - "2.9.2": - folder: "all" - "2.9.1": - folder: "all" - "2.9.0": - folder: "all" - "2.8.0": - folder: "all" - "2.7.0": - folder: "all" - "2.6.0": - folder: "all" - "1.7.3": + "4.4.1": folder: "all" diff --git a/recipes/qwt/all/conanfile.py b/recipes/qwt/all/conanfile.py index 8cc76b47a4e49..631bed2233c8a 100644 --- a/recipes/qwt/all/conanfile.py +++ b/recipes/qwt/all/conanfile.py @@ -63,7 +63,7 @@ def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - self.requires("qt/5.15.11", transitive_headers=True, transitive_libs=True) + self.requires("qt/[~5.15]", transitive_headers=True, transitive_libs=True) def validate(self): if hasattr(self, "settings_build") and cross_building(self): diff --git a/recipes/qxlsx/all/conandata.yml b/recipes/qxlsx/all/conandata.yml index 68d91ea6c0831..afceaea58d857 100644 --- a/recipes/qxlsx/all/conandata.yml +++ b/recipes/qxlsx/all/conandata.yml @@ -5,14 +5,3 @@ sources: "1.4.4": url: "https://github.com/QtExcel/QXlsx/archive/refs/tags/v1.4.4.zip" sha256: "3efbd6f63a1ffd521c535dce7b5a5a7e9ebd23db51e6ae8e3e2eb89796e57675" - "1.4.3": - url: "https://github.com/QtExcel/QXlsx/archive/refs/tags/v1.4.3.zip" - sha256: "d2f7c6aff71f2f30ade8d8020682e36a3d63f422a5d2f1c5831b55573241bd4a" -patches: - "1.4.3": - - patch_file: "patches/1.4.3/0001-allow-shared.patch" - patch_type: "conan" - patch_source: "https://github.com/QtExcel/QXlsx/pull/197" - - patch_file: "patches/1.4.3/0002-add-install-target.patch" - patch_type: "conan" - patch_source: "https://github.com/QtExcel/QXlsx/pull/197" diff --git a/recipes/qxlsx/all/conanfile.py b/recipes/qxlsx/all/conanfile.py index 28fac77f7f2b5..8ec88efb7ec9f 100644 --- a/recipes/qxlsx/all/conanfile.py +++ b/recipes/qxlsx/all/conanfile.py @@ -1,8 +1,10 @@ from conan import ConanFile from conan.tools.cmake import CMake, CMakeToolchain, CMakeDeps, cmake_layout from conan.tools.env import VirtualBuildEnv -from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rmdir +from conan.tools.files import copy, get, rmdir from conan.tools.scm import Version +from conan.tools.microsoft import is_msvc +from conan.errors import ConanInvalidConfiguration import os required_conan_version = ">=1.53.0" @@ -28,10 +30,7 @@ class QXlsxConan(ConanFile): @property def _qt_version(self): - return Version(self.dependencies["qt"].ref.version).major - - def export_sources(self): - export_conandata_patches(self) + return str(Version(self.dependencies["qt"].ref.version).major) def config_options(self): if self.settings.os == "Windows": @@ -45,7 +44,16 @@ def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - self.requires("qt/5.15.9") + # INFO: QXlsx/xlsxdocument.h includes QtGlobal + # INFO: transitive libs: undefined reference to symbol '_ZN10QArrayData10deallocateEPS_mm@@Qt_5' + self.requires("qt/[~5.15]", transitive_headers=True, transitive_libs=True) + + def validate(self): + if not self.dependencies["qt"].options.gui: + raise ConanInvalidConfiguration(f"{self.ref} requires Qt with gui component. Use '-o qt/*:gui=True'") + if Version(self.version) == "1.4.4" and is_msvc(self) and self.options.shared: + # FIXME: xlsxworksheet.cpp.obj : error LNK2019: unresolved external symbol " __cdecl QVector::begin( + raise ConanInvalidConfiguration(f"{self.ref} Conan recipe does not support shared library with MSVC. Use version 1.4.5 or later.") def build_requirements(self): if Version(self.version) >= "1.4.4": @@ -58,38 +66,32 @@ def generate(self): tc = VirtualBuildEnv(self) tc.generate() tc = CMakeToolchain(self) - tc.variables["QT_VERSION_MAJOR"] = self._qt_version + tc.cache_variables["QT_VERSION_MAJOR"] = self._qt_version tc.generate() tc = CMakeDeps(self) tc.generate() def build(self): - apply_conandata_patches(self) cmake = CMake(self) - cmake.configure(build_script_folder="QXlsx") + cmake.configure(build_script_folder=os.path.join(self.source_folder, "QXlsx")) cmake.build() def package(self): copy(self, "LICENSE", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) cmake = CMake(self) - cmake.configure(build_script_folder="QXlsx") cmake.install() rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) def package_info(self): - self.cpp_info.set_property("cmake_file_name", "QXlsx") - self.cpp_info.set_property("cmake_target_name", "QXlsx::Core") - # TODO: back to global scope in conan v2 once cmake_find_package* generators removed - if Version(self.version) <= "1.4.4": - self.cpp_info.components["qxlsx_core"].libs = ["QXlsx"] - else: - self.cpp_info.components["qxlsx_core"].libs = [f"QXlsxQt{self._qt_version}"] - self.cpp_info.components["qxlsx_core"].includedirs = [os.path.join("include", "QXlsx")] - self.cpp_info.components["qxlsx_core"].requires = ["qt::qtCore", "qt::qtGui"] + cmake_name = f"QXlsxQt{self._qt_version}" if Version(self.version) >= "1.4.5" else "QXlsx" + self.cpp_info.set_property("cmake_file_name", cmake_name) + self.cpp_info.set_property("cmake_target_name", "QXlsx::QXlsx") + self.cpp_info.libs = [cmake_name] + self.cpp_info.includedirs = ["include", os.path.join("include", "QXlsx")] + self.cpp_info.requires = ["qt::qtCore", "qt::qtGui"] # TODO: to remove in conan v2 once cmake_find_package* generators removed + self.cpp_info.filenames["cmake_find_package"] = cmake_name + self.cpp_info.filenames["cmake_find_package_multi"] = cmake_name + self.cpp_info.names["cmake_find_package"] = "QXlsx" self.cpp_info.names["cmake_find_package"] = "QXlsx" - self.cpp_info.names["cmake_find_package_multi"] = "QXlsx" - self.cpp_info.components["qxlsx_core"].names["cmake_find_package"] = "Core" - self.cpp_info.components["qxlsx_core"].names["cmake_find_package_multi"] = "Core" - self.cpp_info.components["qxlsx_core"].set_property("cmake_target_name", "QXlsx::Core") diff --git a/recipes/qxlsx/all/patches/1.4.3/0001-allow-shared.patch b/recipes/qxlsx/all/patches/1.4.3/0001-allow-shared.patch deleted file mode 100644 index b640cac70894b..0000000000000 --- a/recipes/qxlsx/all/patches/1.4.3/0001-allow-shared.patch +++ /dev/null @@ -1,218 +0,0 @@ ---- a/QXlsx/CMakeLists.txt -+++ b/QXlsx/CMakeLists.txt -@@ -39,7 +39,7 @@ file(GLOB QXLSX_H "${QXLSX_HEADERPATH}/*.h") - set(SRC_FILES ${QXLSX_CPP}) - list(APPEND SRC_FILES ${QXLSX_H}) - --add_library(QXlsx STATIC -+add_library(QXlsx - ${SRC_FILES} ) - - target_include_directories(QXlsx PRIVATE ${QXLSX_HEADERPATH}) -@@ -50,3 +50,6 @@ target_link_libraries(${PROJECT_NAME} - ) - - target_compile_definitions(QXlsx PRIVATE QXLSX_LIBRARY) -+if (BUILD_SHARED_LIBS) -+ target_compile_definitions(QXlsx PRIVATE QXLSX_SHARED) -+endif() ---- a/QXlsx/header/xlsxabstractooxmlfile.h -+++ b/QXlsx/header/xlsxabstractooxmlfile.h -@@ -10,7 +10,7 @@ QT_BEGIN_NAMESPACE_XLSX - class Relationships; - class AbstractOOXmlFilePrivate; - --class AbstractOOXmlFile -+class QXLSX_EXPORT AbstractOOXmlFile - { - Q_DECLARE_PRIVATE(AbstractOOXmlFile) - ---- a/QXlsx/header/xlsxabstractsheet.h -+++ b/QXlsx/header/xlsxabstractsheet.h -@@ -12,7 +12,7 @@ class Workbook; - class Drawing; - class AbstractSheetPrivate; - --class AbstractSheet : public AbstractOOXmlFile -+class QXLSX_EXPORT AbstractSheet : public AbstractOOXmlFile - { - Q_DECLARE_PRIVATE(AbstractSheet) - ---- a/QXlsx/header/xlsxcell.h -+++ b/QXlsx/header/xlsxcell.h -@@ -24,7 +24,7 @@ class CellFormula; - class CellPrivate; - class WorksheetPrivate; - --class Cell -+class QXLSX_EXPORT Cell - { - Q_DECLARE_PRIVATE(Cell) - ---- a/QXlsx/header/xlsxcellformula.h -+++ b/QXlsx/header/xlsxcellformula.h -@@ -17,7 +17,7 @@ class CellRange; - class Worksheet; - class WorksheetPrivate; - --class CellFormula -+class QXLSX_EXPORT CellFormula - { - public: - enum FormulaType { NormalType, ArrayType, DataTableType, SharedType }; ---- a/QXlsx/header/xlsxcelllocation.h -+++ b/QXlsx/header/xlsxcelllocation.h -@@ -17,7 +17,7 @@ QT_BEGIN_NAMESPACE_XLSX - - class Cell; - --class CellLocation -+class QXLSX_EXPORT CellLocation - { - public: - CellLocation(); ---- a/QXlsx/header/xlsxcellrange.h -+++ b/QXlsx/header/xlsxcellrange.h -@@ -12,7 +12,7 @@ - QT_BEGIN_NAMESPACE_XLSX - - // dev57 --class CellRange -+class QXLSX_EXPORT CellRange - { - public: - CellRange(); ---- a/QXlsx/header/xlsxcellreference.h -+++ b/QXlsx/header/xlsxcellreference.h -@@ -9,7 +9,7 @@ - - QT_BEGIN_NAMESPACE_XLSX - --class CellReference -+class QXLSX_EXPORT CellReference - { - public: - CellReference(); ---- a/QXlsx/header/xlsxchart.h -+++ b/QXlsx/header/xlsxchart.h -@@ -18,7 +18,7 @@ class ChartPrivate; - class CellRange; - class DrawingAnchor; - --class Chart : public AbstractOOXmlFile -+class QXLSX_EXPORT Chart : public AbstractOOXmlFile - { - Q_DECLARE_PRIVATE(Chart) - public: ---- a/QXlsx/header/xlsxchartsheet.h -+++ b/QXlsx/header/xlsxchartsheet.h -@@ -16,7 +16,7 @@ class DocumentPrivate; - class ChartsheetPrivate; - class Chart; - --class Chartsheet : public AbstractSheet -+class QXLSX_EXPORT Chartsheet : public AbstractSheet - { - Q_DECLARE_PRIVATE(Chartsheet) - ---- a/QXlsx/header/xlsxconditionalformatting.h -+++ b/QXlsx/header/xlsxconditionalformatting.h -@@ -24,7 +24,7 @@ class Worksheet; - class Styles; - class ConditionalFormattingPrivate; - --class ConditionalFormatting -+class QXLSX_EXPORT ConditionalFormatting - { - public: - enum HighlightRuleType { ---- a/QXlsx/header/xlsxdatavalidation.h -+++ b/QXlsx/header/xlsxdatavalidation.h -@@ -22,7 +22,7 @@ class CellRange; - class CellReference; - - class DataValidationPrivate; --class DataValidation -+class QXLSX_EXPORT DataValidation - { - public: - enum ValidationType ---- a/QXlsx/header/xlsxdatetype.h -+++ b/QXlsx/header/xlsxdatetype.h -@@ -15,7 +15,7 @@ - - QT_BEGIN_NAMESPACE_XLSX - --class DateType -+class QXLSX_EXPORT DateType - { - public: - DateType(); ---- a/QXlsx/header/xlsxdocument.h -+++ b/QXlsx/header/xlsxdocument.h -@@ -24,7 +24,7 @@ class Chart; - class CellReference; - class DocumentPrivate; - --class Document : public QObject -+class QXLSX_EXPORT Document : public QObject - { - Q_OBJECT - Q_DECLARE_PRIVATE(Document) // D-Pointer. Qt classes have a Q_DECLARE_PRIVATE ---- a/QXlsx/header/xlsxformat.h -+++ b/QXlsx/header/xlsxformat.h -@@ -24,7 +24,7 @@ class SharedStrings; - - class FormatPrivate; - --class Format -+class QXLSX_EXPORT Format - { - public: - enum FontScript ---- a/QXlsx/header/xlsxglobal.h -+++ b/QXlsx/header/xlsxglobal.h -@@ -30,4 +30,10 @@ - #define Q_DECL_NOTHROW - #endif - -+#ifdef QXLSX_SHARED -+#define QXLSX_EXPORT Q_DECL_EXPORT -+#else -+#define QXLSX_EXPORT -+#endif -+ - #endif // XLSXGLOBAL_H ---- a/QXlsx/header/xlsxrichstring.h -+++ b/QXlsx/header/xlsxrichstring.h -@@ -37,7 +37,7 @@ class RichString; - // qHash is a friend, but we can't use default arguments for friends (§8.3.6.4) - uint qHash(const RichString &rs, uint seed = 0) Q_DECL_NOTHROW; - --class RichString -+class QXLSX_EXPORT RichString - { - public: - RichString(); ---- a/QXlsx/header/xlsxworkbook.h -+++ b/QXlsx/header/xlsxworkbook.h -@@ -28,7 +28,7 @@ class Chartsheet; - class Worksheet; - class WorkbookPrivate; - --class Workbook : public AbstractOOXmlFile -+class QXLSX_EXPORT Workbook : public AbstractOOXmlFile - { - Q_DECLARE_PRIVATE(Workbook) - public: ---- a/QXlsx/header/xlsxworksheet.h -+++ b/QXlsx/header/xlsxworksheet.h -@@ -37,7 +37,7 @@ class Relationships; - class Chart; - - class WorksheetPrivate; --class Worksheet : public AbstractSheet -+class QXLSX_EXPORT Worksheet : public AbstractSheet - { - Q_DECLARE_PRIVATE(Worksheet) - diff --git a/recipes/qxlsx/all/patches/1.4.3/0002-add-install-target.patch b/recipes/qxlsx/all/patches/1.4.3/0002-add-install-target.patch deleted file mode 100644 index 48125aa4d3f43..0000000000000 --- a/recipes/qxlsx/all/patches/1.4.3/0002-add-install-target.patch +++ /dev/null @@ -1,37 +0,0 @@ ---- a/QXlsx/CMakeLists.txt -+++ b/QXlsx/CMakeLists.txt -@@ -53,3 +53,34 @@ target_compile_definitions(QXlsx PRIVATE QXLSX_LIBRARY) - if (BUILD_SHARED_LIBS) - target_compile_definitions(QXlsx PRIVATE QXLSX_SHARED) - endif() -+ -+set(QXLSX_PUBLIC_HEADERS -+ header/xlsxdocument.h -+ header/xlsxabstractooxmlfile.h -+ header/xlsxabstractsheet.h -+ header/xlsxabstractsheet_p.h -+ header/xlsxcellformula.h -+ header/xlsxcell.h -+ header/xlsxcelllocation.h -+ header/xlsxcellrange.h -+ header/xlsxcellreference.h -+ header/xlsxchart.h -+ header/xlsxchartsheet.h -+ header/xlsxconditionalformatting.h -+ header/xlsxdatavalidation.h -+ header/xlsxdatetype.h -+ header/xlsxdocument.h -+ header/xlsxformat.h -+ header/xlsxglobal.h -+ header/xlsxrichstring.h -+ header/xlsxworkbook.h -+ header/xlsxworksheet.h -+) -+set_property(TARGET QXlsx PROPERTY PUBLIC_HEADER ${QXLSX_PUBLIC_HEADERS}) -+include(GNUInstallDirs) -+install(TARGETS QXlsx -+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} -+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} -+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} -+ PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/QXlsx -+) diff --git a/recipes/qxlsx/all/test_package/CMakeLists.txt b/recipes/qxlsx/all/test_package/CMakeLists.txt index d57016937dd42..90e52caff7985 100644 --- a/recipes/qxlsx/all/test_package/CMakeLists.txt +++ b/recipes/qxlsx/all/test_package/CMakeLists.txt @@ -1,8 +1,9 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.15) project(test_package LANGUAGES CXX) -find_package(QXlsx REQUIRED CONFIG) +find_package(QXlsx QUIET CONFIG) +find_package(QXlsxQt5 QUIET CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) -target_link_libraries(${PROJECT_NAME} PRIVATE QXlsx::Core) -set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 17) +target_link_libraries(${PROJECT_NAME} PRIVATE QXlsx::QXlsx) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) diff --git a/recipes/qxlsx/all/test_package/conanfile.py b/recipes/qxlsx/all/test_package/conanfile.py index 6d529581ba2f5..40f70f535b209 100644 --- a/recipes/qxlsx/all/test_package/conanfile.py +++ b/recipes/qxlsx/all/test_package/conanfile.py @@ -7,6 +7,7 @@ class TestPackageConan(ConanFile): settings = "os", "arch", "compiler", "build_type" generators = "CMakeDeps", "VirtualRunEnv" + test_type = "explicit" def requirements(self): self.requires(self.tested_reference_str) diff --git a/recipes/qxlsx/all/test_package/test_package.cpp b/recipes/qxlsx/all/test_package/test_package.cpp index ec71d1106e960..14f8874944818 100644 --- a/recipes/qxlsx/all/test_package/test_package.cpp +++ b/recipes/qxlsx/all/test_package/test_package.cpp @@ -1,15 +1,9 @@ -#include -#include #include int main() { - QBuffer device; - device.open(QIODevice::WriteOnly); - - QXlsx::Document xlsx1; - xlsx1.write("A1", true); - xlsx1.write("A2", false); - xlsx1.saveAs(&device); + // INFO: Document does not exist. Only for test package purposes. + QXlsx::Document xlsxR("Test.xlsx"); + xlsxR.load(); return 0; } diff --git a/recipes/qxlsx/all/test_v1_package/CMakeLists.txt b/recipes/qxlsx/all/test_v1_package/CMakeLists.txt deleted file mode 100644 index 0d20897301b68..0000000000000 --- a/recipes/qxlsx/all/test_v1_package/CMakeLists.txt +++ /dev/null @@ -1,8 +0,0 @@ -cmake_minimum_required(VERSION 3.1) -project(test_package) - -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) - -add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package - ${CMAKE_CURRENT_BINARY_DIR}/test_package) diff --git a/recipes/qxlsx/all/test_v1_package/conanfile.py b/recipes/qxlsx/all/test_v1_package/conanfile.py deleted file mode 100644 index 38f4483872d47..0000000000000 --- a/recipes/qxlsx/all/test_v1_package/conanfile.py +++ /dev/null @@ -1,17 +0,0 @@ -from conans import ConanFile, CMake, tools -import os - - -class TestPackageConan(ConanFile): - settings = "os", "arch", "compiler", "build_type" - generators = "cmake", "cmake_find_package_multi" - - def build(self): - cmake = CMake(self) - cmake.configure() - cmake.build() - - def test(self): - if not tools.cross_building(self): - bin_path = os.path.join("bin", "test_package") - self.run(bin_path, run_environment=True) diff --git a/recipes/qxlsx/config.yml b/recipes/qxlsx/config.yml index c1105e1540729..bcda68af0d12d 100644 --- a/recipes/qxlsx/config.yml +++ b/recipes/qxlsx/config.yml @@ -3,5 +3,3 @@ versions: folder: "all" "1.4.4": folder: "all" - "1.4.3": - folder: "all" diff --git a/recipes/qxmpp/all/CMakeLists.txt b/recipes/qxmpp/all/CMakeLists.txt deleted file mode 100644 index 59052ada070a2..0000000000000 --- a/recipes/qxmpp/all/CMakeLists.txt +++ /dev/null @@ -1,9 +0,0 @@ -cmake_minimum_required(VERSION 3.4) -project(cmake_wrapper) - -include(conanbuildinfo.cmake) -conan_basic_setup(TARGETS KEEP_RPATHS) - -set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) - -add_subdirectory(source_subfolder) diff --git a/recipes/qxmpp/all/conandata.yml b/recipes/qxmpp/all/conandata.yml index 57b44e43f1da6..d54578ee2ca20 100644 --- a/recipes/qxmpp/all/conandata.yml +++ b/recipes/qxmpp/all/conandata.yml @@ -4,7 +4,9 @@ sources: sha256: "2148162138eaf4b431a6ee94104f87877b85a589da803dff9433c698b4cf4f19" patches: "1.4.0": - - patch_file: "patches/001-add_conan_1.4.0.patch" - base_path: "source_subfolder" - - patch_file: "patches/002-add_gstreamer_1.4.0.patch" - base_path: "source_subfolder" + - patch_file: "patches/001-skip-module-path.patch" + patch_description: "Do not use module path provided by the upstream" + patch_type: "conan" + - patch_file: "patches/002-use-conan-gstreamer.patch" + patch_description: "Adapt to consume gstreamer from Conan" + patch_type: "conan" diff --git a/recipes/qxmpp/all/conanfile.py b/recipes/qxmpp/all/conanfile.py index b89c7627065d2..e57f163a543f8 100644 --- a/recipes/qxmpp/all/conanfile.py +++ b/recipes/qxmpp/all/conanfile.py @@ -1,20 +1,27 @@ -from conan import ConanFile -from conan.tools import files -from conans import CMake -import functools import os -required_conan_version = ">=1.43.0" +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.build import check_min_cppstd +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rmdir, rename, mkdir +from conan.tools.microsoft import is_msvc +from conan.tools.env import VirtualBuildEnv, VirtualRunEnv +from conan.tools.scm import Version + +required_conan_version = ">=1.60.0 <2 || >=2.0.5" class QxmppConan(ConanFile): name = "qxmpp" + description = ("Cross-platform C++ XMPP client and server library. " + "It is written in C++ and uses Qt framework.") license = "LGPL-2.1" - homepage = "https://github.com/qxmpp-project/qxmpp" url = "https://github.com/conan-io/conan-center-index" - description = "Cross-platform C++ XMPP client and server library. It is written in C++ and uses Qt framework." - topics = "qt", "qt6", "xmpp", "xmpp-library", "xmpp-server", "xmpp-client" + homepage = "https://github.com/qxmpp-project/qxmpp" + topics = ("qt", "qt6", "xmpp", "xmpp-library", "xmpp-server", "xmpp-client") + package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], @@ -27,62 +34,84 @@ class QxmppConan(ConanFile): "with_gstreamer": False, } - generators = "cmake", "cmake_find_package_multi" + @property + def _min_cppstd(self): + return 17 @property - def _source_subfolder(self): - return "source_subfolder" + def _compilers_minimum_version(self): + return { + "gcc": "10", + "Visual Studio": "17", + "msvc": "192", + "clang": "8", + "apple-clang": "13", + } def export_sources(self): - self.copy("CMakeLists.txt") - for patch in self.conan_data.get("patches", {}).get(self.version, []): - self.copy(patch["patch_file"]) + export_conandata_patches(self) def config_options(self): if self.settings.os == "Windows": del self.options.fPIC def configure(self): - if self.options.shared: - del self.options.fPIC + if self.options.get_safe("shared"): + self.options.rm_safe("fPIC") + + def layout(self): + cmake_layout(self, src_folder="src") def requirements(self): - self.requires("qt/6.2.4") + self.requires("qt/[>=5.15 <7]", transitive_headers=True, transitive_libs=True) if self.options.with_gstreamer: - self.requires("gstreamer/1.19.2") - self.requires("glib/2.70.1") + self.requires("gstreamer/1.22.6") + self.requires("glib/2.78.3") + + def validate(self): + if self.settings.compiler.cppstd: + check_min_cppstd(self, self._min_cppstd) + minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) + if minimum_version and Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration(f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support.") + + def build_requirements(self): + self.tool_requires("qt/") def source(self): - files.get(self, **self.conan_data["sources"][self.version], strip_root=True, destination=self._source_subfolder) + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + venv = VirtualBuildEnv(self) + venv.generate() + venv = VirtualRunEnv(self) + venv.generate(scope="build") + tc = CMakeToolchain(self) + tc.variables["BUILD_DOCUMENTATION"] = False + tc.variables["BUILD_TESTS"] = False + tc.variables["BUILD_EXAMPLES"] = False + tc.variables["WITH_GSTREAMER"] = self.options.with_gstreamer + tc.variables["BUILD_SHARED"] = self.options.get_safe("shared") + tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0077"] = "NEW" + tc.generate() + tc = CMakeDeps(self) + tc.generate() - @functools.lru_cache(1) - def _configure_cmake(self): + def build(self): + apply_conandata_patches(self) cmake = CMake(self) - cmake.definitions["BUILD_DOCUMENTATION"] = "OFF" - cmake.definitions["BUILD_TESTS"] = "OFF" - cmake.definitions["BUILD_EXAMPLES"] = "OFF" - cmake.definitions["WITH_GSTREAMER"] = self.options.with_gstreamer - cmake.definitions["BUILD_SHARED"] = self.options.shared cmake.configure() - return cmake - - def build(self): - for patch in self.conan_data.get("patches", {}).get(self.version, []): - files.patch(self, **patch) - cmake = self._configure_cmake() cmake.build() def package(self): - self.copy("LICENSE.LGPL", dst="licenses", src=self._source_subfolder) - cmake = self._configure_cmake() + copy(self, "LICENSE.LGPL", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) + cmake = CMake(self) cmake.install() - files.rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) - files.rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) - - if self.options.shared and self.settings.os == "Windows": - files.mkdir(self, os.path.join(self.package_folder, "bin")) - files.rename(self, os.path.join(self.package_folder, "lib", "qxmpp.dll"), - os.path.join(self.package_folder, "bin", "qxmpp.dll")) + rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) + rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) + if is_msvc(self) and self.options.shared: + mkdir(self, os.path.join(self.package_folder, "bin")) + rename(self, os.path.join(self.package_folder, "lib", "qxmpp.dll"), os.path.join(self.package_folder, "bin", "qxmpp.dll")) def package_info(self): self.cpp_info.set_property("cmake_file_name", "QXmpp") @@ -91,7 +120,5 @@ def package_info(self): self.cpp_info.libs = ["qxmpp"] self.cpp_info.includedirs.append(os.path.join("include", "qxmpp")) self.cpp_info.requires = ["qt::qtCore", "qt::qtNetwork", "qt::qtXml"] - - # TODO: to remove in conan v2 once cmake_find_package* generators removed - self.cpp_info.names["cmake_find_package"] = "QXmpp" - self.cpp_info.names["cmake_find_package_multi"] = "QXmpp" + if self.options.with_gstreamer: + self.cpp_info.requires.extend(["gstreamer::gstreamer", "glib::glib"]) diff --git a/recipes/qxmpp/all/patches/001-add_conan_1.4.0.patch b/recipes/qxmpp/all/patches/001-add_conan_1.4.0.patch deleted file mode 100644 index da7431faa740a..0000000000000 --- a/recipes/qxmpp/all/patches/001-add_conan_1.4.0.patch +++ /dev/null @@ -1,20 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 550ea39a..9ed4d825 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -8,10 +8,12 @@ set(CMAKE_CXX_STANDARD 17) - set(CMAKE_CXX_STANDARD_REQUIRED ON) - set(CMAKE_CXX_EXTENSIONS OFF) - --set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PROJECT_SOURCE_DIR}/cmake/modules") - --find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Core Network Xml) --find_package(Qt${QT_VERSION_MAJOR} 5.7.0 REQUIRED COMPONENTS Core Network Xml) -+list(APPEND CMAKE_MODULE_PATH ${CMAKE_BINARY_DIR}) -+list(APPEND CMAKE_PREFIX_PATH ${CMAKE_BINARY_DIR}) -+ -+find_package(Qt6 COMPONENTS Core Network Xml REQUIRED) -+set(QT_VERSION_MAJOR 6) - - set(CMAKE_AUTOMOC ON) - set(CMAKE_AUTORCC ON) diff --git a/recipes/qxmpp/all/patches/001-skip-module-path.patch b/recipes/qxmpp/all/patches/001-skip-module-path.patch new file mode 100644 index 0000000000000..d499e412b3ef3 --- /dev/null +++ b/recipes/qxmpp/all/patches/001-skip-module-path.patch @@ -0,0 +1,15 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 550ea39..e550959 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -8,10 +8,8 @@ set(CMAKE_CXX_STANDARD 17) + set(CMAKE_CXX_STANDARD_REQUIRED ON) + set(CMAKE_CXX_EXTENSIONS OFF) + +-set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PROJECT_SOURCE_DIR}/cmake/modules") + + find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Core Network Xml) +-find_package(Qt${QT_VERSION_MAJOR} 5.7.0 REQUIRED COMPONENTS Core Network Xml) + + set(CMAKE_AUTOMOC ON) + set(CMAKE_AUTORCC ON) diff --git a/recipes/qxmpp/all/patches/002-add_gstreamer_1.4.0.patch b/recipes/qxmpp/all/patches/002-use-conan-gstreamer.patch similarity index 100% rename from recipes/qxmpp/all/patches/002-add_gstreamer_1.4.0.patch rename to recipes/qxmpp/all/patches/002-use-conan-gstreamer.patch diff --git a/recipes/qxmpp/all/test_package/CMakeLists.txt b/recipes/qxmpp/all/test_package/CMakeLists.txt index 4398033dd2797..d6ea9ec68f7ad 100644 --- a/recipes/qxmpp/all/test_package/CMakeLists.txt +++ b/recipes/qxmpp/all/test_package/CMakeLists.txt @@ -1,12 +1,8 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.15) project(test_package CXX) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) - find_package(QXmpp REQUIRED CONFIG) -set(CMAKE_CXX_STANDARD 17) - add_executable(${PROJECT_NAME} test_package.cpp) target_link_libraries(${PROJECT_NAME} QXmpp::QXmpp) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) diff --git a/recipes/qxmpp/all/test_package/conanfile.py b/recipes/qxmpp/all/test_package/conanfile.py index 1bf1c7e26255d..ef5d7042163ec 100644 --- a/recipes/qxmpp/all/test_package/conanfile.py +++ b/recipes/qxmpp/all/test_package/conanfile.py @@ -1,9 +1,19 @@ -from conans import ConanFile, CMake, tools +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake import os + class TestPackageConan(ConanFile): - settings = "os", "compiler", "build_type", "arch" - generators = "cmake", "cmake_find_package_multi" + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) def build(self): cmake = CMake(self) @@ -11,6 +21,6 @@ def build(self): cmake.build() def test(self): - if not tools.cross_building(self): - bin_path = os.path.join("bin", "test_package") - self.run(bin_path, run_environment=True) + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/qxmpp/all/test_package/test_package.cpp b/recipes/qxmpp/all/test_package/test_package.cpp index dabb1c214e126..213a59473e7a4 100644 --- a/recipes/qxmpp/all/test_package/test_package.cpp +++ b/recipes/qxmpp/all/test_package/test_package.cpp @@ -1,7 +1,9 @@ +#include #include #include int main() { QXmppClient client; client.logger()->setLoggingType(QXmppLogger::StdoutLogging); + return EXIT_SUCCESS; } diff --git a/recipes/range-v3/all/conandata.yml b/recipes/range-v3/all/conandata.yml index 1e7ea8c024212..0b45a37f14d0e 100644 --- a/recipes/range-v3/all/conandata.yml +++ b/recipes/range-v3/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "cci.20240905": + url: https://github.com/ericniebler/range-v3/archive/a33616bfdb642744acaa937a3f258fba384b7fd4.tar.gz + sha256: d5cc3bf42825097c55c1c6a1f0158eb8fbceb0653935f2f7d2b5286c827dd834 "0.12.0": url: https://github.com/ericniebler/range-v3/archive/refs/tags/0.12.0.tar.gz sha256: 015adb2300a98edfceaf0725beec3337f542af4915cec4d0b89fa0886f4ba9cb diff --git a/recipes/range-v3/config.yml b/recipes/range-v3/config.yml index 5ed235c09031b..8df94b876518b 100644 --- a/recipes/range-v3/config.yml +++ b/recipes/range-v3/config.yml @@ -1,4 +1,6 @@ versions: + "cci.20240905": + folder: all "0.12.0": folder: all "0.11.0": diff --git a/recipes/rapidcsv/all/conandata.yml b/recipes/rapidcsv/all/conandata.yml index 350384694edeb..12ca9bb815fc4 100644 --- a/recipes/rapidcsv/all/conandata.yml +++ b/recipes/rapidcsv/all/conandata.yml @@ -1,4 +1,10 @@ sources: + "8.84": + url: "https://github.com/d99kris/rapidcsv/archive/refs/tags/v8.84.tar.gz" + sha256: "213699f46a2a29fc2f45c2f9f66ccbe5383aebe6061445d91ac196e3cf7029c8" + "8.83": + url: "https://github.com/d99kris/rapidcsv/archive/refs/tags/v8.83.tar.gz" + sha256: "9342eeb0ce37e30b778c4c030129d03e99f44a66d4710ac19627187bee774097" "8.82": url: "https://github.com/d99kris/rapidcsv/archive/refs/tags/v8.82.tar.gz" sha256: "4f1f57ca9db0f5447416acbef4e059cbd7cb03f6eb39fec1301732bbedaac927" diff --git a/recipes/rapidcsv/config.yml b/recipes/rapidcsv/config.yml index a48e9cfb7dba1..0085f337a09cb 100644 --- a/recipes/rapidcsv/config.yml +++ b/recipes/rapidcsv/config.yml @@ -1,4 +1,8 @@ versions: + "8.84": + folder: "all" + "8.83": + folder: "all" "8.82": folder: "all" "8.80": diff --git a/recipes/rapidfuzz/all/conandata.yml b/recipes/rapidfuzz/all/conandata.yml index 2504b2040c796..ad858e9a9155c 100644 --- a/recipes/rapidfuzz/all/conandata.yml +++ b/recipes/rapidfuzz/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "3.1.1": + url: "https://github.com/rapidfuzz/rapidfuzz-cpp/archive/refs/tags/v3.1.1.tar.gz" + sha256: "5a72811a9f5a890c69cb479551c19517426fb793a10780f136eb482c426ec3c8" "3.0.4": url: "https://github.com/rapidfuzz/rapidfuzz-cpp/archive/refs/tags/v3.0.4.tar.gz" sha256: "18d1c41575ceddd6308587da8befc98c85d3b5bc2179d418daffed6d46b8cb0a" diff --git a/recipes/rapidfuzz/config.yml b/recipes/rapidfuzz/config.yml index 7af7ecd804cb2..a9e82dc805840 100644 --- a/recipes/rapidfuzz/config.yml +++ b/recipes/rapidfuzz/config.yml @@ -1,4 +1,6 @@ versions: + "3.1.1": + folder: "all" "3.0.4": folder: "all" "3.0.2": diff --git a/recipes/rapidhash/all/conandata.yml b/recipes/rapidhash/all/conandata.yml new file mode 100644 index 0000000000000..88a70b679bdb8 --- /dev/null +++ b/recipes/rapidhash/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "1.0": + url: "https://github.com/Nicoshev/rapidhash/archive/refs/tags/rapidhash_v1.0.tar.gz" + sha256: "d295e66eec6745cc0e0c8c65fb8b5edf08ab3af83b0a503c54c6705144b53848" diff --git a/recipes/rapidhash/all/conanfile.py b/recipes/rapidhash/all/conanfile.py new file mode 100644 index 0000000000000..1678dff3fea60 --- /dev/null +++ b/recipes/rapidhash/all/conanfile.py @@ -0,0 +1,49 @@ +from conan import ConanFile + +from conan.tools.build import check_min_cppstd +from conan.tools.files import copy, get +from conan.tools.layout import basic_layout +import os + +required_conan_version = ">=1.52.0" + +class RapidHashConan(ConanFile): + name = "rapidhash" + description = "Very fast, high quality, platform-independent hashing algorithm" + license = "BSD-2-Clause" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/Nicoshev/rapidhash" + topics = ("hash", "wyhash", "header-only") + package_type = "header-library" + settings = "os", "arch", "compiler", "build_type" + no_copy_source = True + + @property + def _min_cppstd(self): + return 11 + + def layout(self): + basic_layout(self, src_folder="src") + + def package_id(self): + self.info.clear() + + def validate(self): + if self.settings.compiler.get_safe("cppstd"): + check_min_cppstd(self, self._min_cppstd) + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def package(self): + copy(self, "LICENSE", self.source_folder, os.path.join(self.package_folder, "licenses")) + copy( + self, + "rapidhash.h", + self.source_folder, + os.path.join(self.package_folder, "include"), + ) + + def package_info(self): + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] diff --git a/recipes/rapidhash/all/test_package/CMakeLists.txt b/recipes/rapidhash/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..e07f48f4eb8f3 --- /dev/null +++ b/recipes/rapidhash/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) + +find_package(rapidhash REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE rapidhash::rapidhash) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) diff --git a/recipes/rapidhash/all/test_package/conanfile.py b/recipes/rapidhash/all/test_package/conanfile.py new file mode 100644 index 0000000000000..3a91c9439218e --- /dev/null +++ b/recipes/rapidhash/all/test_package/conanfile.py @@ -0,0 +1,26 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def layout(self): + cmake_layout(self) + + def requirements(self): + self.requires(self.tested_reference_str) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/rapidhash/all/test_package/test_package.cpp b/recipes/rapidhash/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..5bbba469ee0d5 --- /dev/null +++ b/recipes/rapidhash/all/test_package/test_package.cpp @@ -0,0 +1,12 @@ +#include +#include + +#include "rapidhash.h" + +int main() { + std::string text = "Hello, rapidhash."; + + std::cout << rapidhash(text.data(), text.size()) << '\n'; + + return 0; +} diff --git a/recipes/rapidhash/config.yml b/recipes/rapidhash/config.yml new file mode 100644 index 0000000000000..edab1ee152d36 --- /dev/null +++ b/recipes/rapidhash/config.yml @@ -0,0 +1,3 @@ +versions: + "1.0": + folder: all diff --git a/recipes/rapidyaml/all/conandata.yml b/recipes/rapidyaml/all/conandata.yml index dd5074af2a9b9..42ba70633e2ac 100644 --- a/recipes/rapidyaml/all/conandata.yml +++ b/recipes/rapidyaml/all/conandata.yml @@ -1,4 +1,10 @@ sources: + "0.7.1": + url: "https://github.com/biojppm/rapidyaml/releases/download/v0.7.1/rapidyaml-0.7.1-src.tgz" + sha256: "9f7c0df2117c09ea409afef38f27605f79f4455dd73b6b9d6afaed099a627c8a" + "0.7.0": + url: "https://github.com/biojppm/rapidyaml/releases/download/v0.7.0/rapidyaml-0.7.0-src.tgz" + sha256: "ef9f89b68de711c561720f1e70d1594e953356a07d297d36b8ccd3ded0589715" "0.5.0": url: "https://github.com/biojppm/rapidyaml/releases/download/v0.5.0/rapidyaml-0.5.0-src.tgz" sha256: "6493557778791a3a2375510ce6c0ecd70163fc8ce4f8ed683acc36e3e55ee881" @@ -12,6 +18,14 @@ sources: url: "https://github.com/biojppm/rapidyaml/releases/download/v0.3.0/rapidyaml-0.3.0-src.tgz" sha256: "38854b8359eaf42cc27352f4b7321f509f6775445a3e2746cc8cd1e468a52aa9" patches: + "0.7.1": + - patch_file: "patches/0.7.1-001-remove-internal-c4core.patch" + patch_description: "disable using internal c4core" + patch_type: "conan" + "0.7.0": + - patch_file: "patches/0.7.0-001-remove-internal-c4core.patch" + patch_description: "disable using internal c4core" + patch_type: "conan" "0.5.0": - patch_file: "patches/0.5.0-001-remove-internal-c4core.patch" patch_description: "disable using internal c4core" diff --git a/recipes/rapidyaml/all/conanfile.py b/recipes/rapidyaml/all/conanfile.py index 5e12ce14eb4bb..01c81be0b90ae 100644 --- a/recipes/rapidyaml/all/conanfile.py +++ b/recipes/rapidyaml/all/conanfile.py @@ -21,12 +21,16 @@ class RapidYAMLConan(ConanFile): "fPIC": [True, False], "with_default_callbacks": [True, False], "with_tab_tokens": [True, False], + "with_default_callback_uses_exceptions": [True, False], + "with_assert": [True, False], } default_options = { "shared": False, "fPIC": True, "with_default_callbacks": True, "with_tab_tokens": False, + "with_default_callback_uses_exceptions": False, + "with_assert": False, } @property @@ -41,16 +45,25 @@ def config_options(self): del self.options.fPIC if Version(self.version) < "0.4.0": del self.options.with_tab_tokens + if Version(self.version) < "0.6.0": + del self.options.with_default_callback_uses_exceptions + del self.options.with_assert def configure(self): if self.options.shared: self.options.rm_safe("fPIC") + # with_default_callback_uses_exceptions should only be valid if with_default_callbacks is true + if not self.options.with_default_callbacks: + self.options.rm_safe("with_default_callback_uses_exceptions") def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - self.requires("c4core/0.1.11", transitive_headers=True) + if Version(self.version) < "0.6.0": + self.requires("c4core/0.1.11", transitive_headers=True) + else: + self.requires("c4core/0.2.0", transitive_headers=True) def validate(self): if self.info.settings.compiler.cppstd: @@ -65,6 +78,9 @@ def generate(self): tc.variables["RYML_DEFAULT_CALLBACKS"] = self.options.with_default_callbacks if Version(self.version) >= "0.4.0": tc.variables["RYML_WITH_TAB_TOKENS"] = self.options.with_tab_tokens + if Version(self.version) >= "0.6.0": + tc.variables["RYML_DEFAULT_CALLBACK_USES_EXCEPTIONS"] = self.options.with_default_callback_uses_exceptions + tc.variables["RYML_USE_ASSERT"] = self.options.with_assert tc.generate() deps = CMakeDeps(self) diff --git a/recipes/rapidyaml/all/patches/0.7.0-001-remove-internal-c4core.patch b/recipes/rapidyaml/all/patches/0.7.0-001-remove-internal-c4core.patch new file mode 100644 index 0000000000000..00f7a998b45ee --- /dev/null +++ b/recipes/rapidyaml/all/patches/0.7.0-001-remove-internal-c4core.patch @@ -0,0 +1,53 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 762bb97..d1bc8a7 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -6,7 +6,7 @@ project(ryml + LANGUAGES CXX) + include(./compat.cmake) + +-c4_project(VERSION 0.7.0 STANDALONE ++c4_project(VERSION 0.7.0 + AUTHOR "Joao Paulo Magalhaes ") + + +@@ -27,11 +27,11 @@ option(RYML_INSTALL "Enable install target" ON) + + #------------------------------------------------------- + +-c4_require_subproject(c4core INCORPORATE +- SUBDIRECTORY ${RYML_EXT_DIR}/c4core +- OVERRIDE C4CORE_INSTALL ${RYML_INSTALL} +-) +- ++# c4_require_subproject(c4core INCORPORATE ++# SUBDIRECTORY ${RYML_EXT_DIR}/c4core ++# OVERRIDE C4CORE_INSTALL ${RYML_INSTALL} ++# ) ++find_package(c4core REQUIRED CONFIG) + c4_add_library(ryml + SOURCES + ryml.hpp +@@ -77,10 +77,10 @@ c4_add_library(ryml + INC_DIRS + $ + $ +- LIBS c4core +- INCORPORATE c4core ++ # LIBS c4core ++ LIBS c4core::c4core ++ # INCORPORATE c4core + ) +- + if(RYML_WITH_TAB_TOKENS) + target_compile_definitions(ryml PUBLIC RYML_WITH_TAB_TOKENS) + endif() +@@ -113,7 +113,7 @@ endif() + + if(RYML_INSTALL) + c4_install_target(ryml) +- c4_install_exports(DEPENDENCIES c4core) ++# c4_install_exports(DEPENDENCIES c4core) + c4_pack_project() + endif() + diff --git a/recipes/rapidyaml/all/patches/0.7.1-001-remove-internal-c4core.patch b/recipes/rapidyaml/all/patches/0.7.1-001-remove-internal-c4core.patch new file mode 100644 index 0000000000000..e110ab49f9654 --- /dev/null +++ b/recipes/rapidyaml/all/patches/0.7.1-001-remove-internal-c4core.patch @@ -0,0 +1,50 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index c3841a2..affaa56 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -6,7 +6,7 @@ project(ryml + LANGUAGES CXX) + include(./compat.cmake) + +-c4_project(VERSION 0.7.1 STANDALONE ++c4_project(VERSION 0.7.1 + AUTHOR "Joao Paulo Magalhaes ") + + +@@ -27,11 +27,11 @@ option(RYML_INSTALL "Enable install target" ON) + + #------------------------------------------------------- + +-c4_require_subproject(c4core INCORPORATE +- SUBDIRECTORY ${RYML_EXT_DIR}/c4core +- OVERRIDE C4CORE_INSTALL ${RYML_INSTALL} +-) +- ++# c4_require_subproject(c4core INCORPORATE ++# SUBDIRECTORY ${RYML_EXT_DIR}/c4core ++# OVERRIDE C4CORE_INSTALL ${RYML_INSTALL} ++# ) ++find_package(c4core REQUIRED CONFIG) + c4_add_library(ryml + SOURCES + ryml.hpp +@@ -77,8 +77,8 @@ c4_add_library(ryml + INC_DIRS + $ + $ +- LIBS c4core +- INCORPORATE c4core ++ LIBS c4core::c4core ++# INCORPORATE c4core + ) + + if(RYML_WITH_TAB_TOKENS) +@@ -113,7 +113,7 @@ endif() + + if(RYML_INSTALL) + c4_install_target(ryml) +- c4_install_exports(DEPENDENCIES c4core) ++# c4_install_exports(DEPENDENCIES c4core) + c4_pack_project() + endif() + diff --git a/recipes/rapidyaml/config.yml b/recipes/rapidyaml/config.yml index a10a27debb1f0..5345cf4f908f1 100644 --- a/recipes/rapidyaml/config.yml +++ b/recipes/rapidyaml/config.yml @@ -1,4 +1,8 @@ versions: + "0.7.1": + folder: all + "0.7.0": + folder: all "0.5.0": folder: all "0.4.1": diff --git a/recipes/raylib/all/conanfile.py b/recipes/raylib/all/conanfile.py index b00589d9af8ba..26644f7b9bb79 100644 --- a/recipes/raylib/all/conanfile.py +++ b/recipes/raylib/all/conanfile.py @@ -22,13 +22,41 @@ class RaylibConan(ConanFile): "shared": [True, False], "fPIC": [True, False], "opengl_version": [None, "4.3", "3.3", "2.1", "1.1", "ES-2.0"], + + "customize_build": [True, False], + "module_raudio": [True, False], + "camera_system": [True, False], + "gestures_system": [True, False], + "rprand_generator": [True, False], + "events_waiting": [True, False], + "custom_frame_control": [True, False] } default_options = { "shared": False, "fPIC": True, "opengl_version": None, + + "customize_build": False, + "module_raudio": True, + "camera_system": True, + "gestures_system": True, + "rprand_generator": True, + "events_waiting": False, + "custom_frame_control": False } + @property + def _support_custom_modules(self): + return Version(self.version) >= "4.2.0" + + @property + def _support_rprand_generator(self): + return Version(self.version) >= "5.0" + + @property + def _support_frame_control(self): + return Version(self.version) >= "4.6" + def export_sources(self): export_conandata_patches(self) @@ -37,6 +65,12 @@ def config_options(self): del self.options.fPIC if self.settings.os == "Android": del self.options.opengl_version + if not self._support_custom_modules: + del self.options.module_raudio + if not self._support_rprand_generator: + del self.options.rprand_generator + if not self._support_frame_control: + del self.options.custom_frame_control def configure(self): if self.options.shared: @@ -44,12 +78,20 @@ def configure(self): self.settings.rm_safe("compiler.cppstd") self.settings.rm_safe("compiler.libcxx") + if not self.options.customize_build: + self.options.rm_safe("module_raudio") + del self.options.camera_system + del self.options.gestures_system + self.options.rm_safe("rprand_generator") + del self.options.events_waiting + self.options.rm_safe("custom_frame_control") + def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - if self.settings.os != "Android": - self.requires("glfw/3.3.8") + if self.settings.os not in ["Android", "Emscripten"]: + self.requires("glfw/3.4") self.requires("opengl/system") if self.settings.os == "Linux": self.requires("xorg/system") @@ -57,9 +99,14 @@ def requirements(self): def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) + def generate(self): tc = CMakeToolchain(self) tc.variables["BUILD_EXAMPLES"] = False + if self.settings.os == "Emscripten": + tc.variables["PLATFORM"] = "Web" + tc.variables["USE_EXTERNAL_GLFW"] = "ON" + tc.variables["OPENGL_VERSION"] = "ES 2.0" if self.settings.os == "Android": tc.variables["PLATFORM"] = "Android" tc.variables["USE_EXTERNAL_GLFW"] = "OFF" @@ -68,8 +115,24 @@ def generate(self): tc.variables["USE_EXTERNAL_GLFW"] = "ON" tc.variables["OPENGL_VERSION"] = "OFF" if not self.options.opengl_version else self.options.opengl_version tc.variables["WITH_PIC"] = self.options.get_safe("fPIC", True) + + tc.variables["CUSTOMIZE_BUILD"] = self.options.customize_build + if self.options.customize_build: + if self._support_custom_modules: + tc.variables["SUPPORT_MODULE_RAUDIO"] = self.options.module_raudio + tc.variables["SUPPORT_EVENTS_WAITING"] = self.options.events_waiting + if self._support_frame_control: + tc.variables["SUPPORT_CUSTOM_FRAME_CONTROL"] = self.options.custom_frame_control + + # this makes it include the headers rcamera.h, rgesture.h and rprand.h + tc.variables["SUPPORT_CAMERA_SYSTEM"] = self.options.camera_system + tc.variables["SUPPORT_GESTURES_SYSTEM"] = self.options.gestures_system + if self._support_rprand_generator: + tc.variables["SUPPORT_RPRAND_GENERATOR"] = self.options.rprand_generator + # Due to a specific logic of cmakedeps_macros.cmake used by CMakeDeps to try to locate shared libs on Windows tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0054"] = "NEW" + tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0091"] = "NEW" tc.generate() deps = CMakeDeps(self) deps.generate() @@ -93,6 +156,15 @@ def package(self): {"raylib": "raylib::raylib"} ) + # INFO: Custom modules are enabled by default but need to copy the headers manually + include_path = os.path.join(self.package_folder, "include") + if self.options.get_safe("camera_system", True): + copy(self, pattern="*camera.h", dst=include_path, src=os.path.join(self.source_folder, "src")) + if self.options.get_safe("gestures_system", True): + copy(self, pattern="*gestures.h", dst=include_path, src=os.path.join(self.source_folder, "src")) + if self._support_rprand_generator and self.options.get_safe("rprand_generator", True): + copy(self, pattern="rprand.h", dst=include_path, src=os.path.join(self.source_folder, "src", "external")) + def _create_cmake_module_alias_targets(self, module_file, targets): content = "" for alias, aliased in targets.items(): diff --git a/recipes/raylib/all/test_package/test_package.c b/recipes/raylib/all/test_package/test_package.c index 97c33c55b19d9..30f0b1d640db4 100644 --- a/recipes/raylib/all/test_package/test_package.c +++ b/recipes/raylib/all/test_package/test_package.c @@ -8,5 +8,6 @@ int main(void) { if (CheckCollisionSpheres(center, r, center, r)) { printf("unit sphere collides with itself!\n"); } + return 0; } diff --git a/recipes/rc_ptr/all/conandata.yml b/recipes/rc_ptr/all/conandata.yml new file mode 100644 index 0000000000000..64179a15ea35b --- /dev/null +++ b/recipes/rc_ptr/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "0.0.2": + url: "https://github.com/Chylynsky/rc_ptr/archive/refs/tags/v0.0.2.tar.gz" + sha256: "4682e0235b6def843b52e9327c7f1f87c98998b58c1b39a27cbf13dae27f7977" diff --git a/recipes/rc_ptr/all/conanfile.py b/recipes/rc_ptr/all/conanfile.py new file mode 100644 index 0000000000000..4325cec38cda1 --- /dev/null +++ b/recipes/rc_ptr/all/conanfile.py @@ -0,0 +1,65 @@ +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.build import check_min_cppstd +from conan.tools.files import copy, get +from conan.tools.layout import basic_layout +from conan.tools.scm import Version +import os + +required_conan_version = ">=1.52.0" + +class RcPtrConan(ConanFile): + name = "rc_ptr" + description = "Reference counted smart pointer for single-threaded environments" + license = "BSL-1.0" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/Chylynsky/rc_ptr" + topics = ("memory", "smart-pointer", "header-only") + package_type = "header-library" + settings = "os", "arch", "compiler", "build_type" + no_copy_source = True + + @property + def _min_cppstd(self): + return 17 + + @property + def _compilers_minimum_version(self): + return { + "gcc": "8", + "clang": "7", + "apple-clang": "12", + "Visual Studio": "16", + "msvc": "192", + } + + def layout(self): + basic_layout(self, src_folder="src") + + def package_id(self): + self.info.clear() + + def validate(self): + if self.settings.compiler.get_safe("cppstd"): + check_min_cppstd(self, self._min_cppstd) + minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) + if minimum_version and Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration( + f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." + ) + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def package(self): + copy(self, "LICENSE_1_0.txt", self.source_folder, os.path.join(self.package_folder, "licenses")) + copy( + self, + "*.hpp", + os.path.join(self.source_folder, "include"), + os.path.join(self.package_folder, "include"), + ) + + def package_info(self): + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] diff --git a/recipes/rc_ptr/all/test_package/CMakeLists.txt b/recipes/rc_ptr/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..06ceb32987cf9 --- /dev/null +++ b/recipes/rc_ptr/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) + +find_package(rc_ptr REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE rc_ptr::rc_ptr) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) diff --git a/recipes/rc_ptr/all/test_package/conanfile.py b/recipes/rc_ptr/all/test_package/conanfile.py new file mode 100644 index 0000000000000..3a91c9439218e --- /dev/null +++ b/recipes/rc_ptr/all/test_package/conanfile.py @@ -0,0 +1,26 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def layout(self): + cmake_layout(self) + + def requirements(self): + self.requires(self.tested_reference_str) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/rc_ptr/all/test_package/test_package.cpp b/recipes/rc_ptr/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..1ecc4ab4aea91 --- /dev/null +++ b/recipes/rc_ptr/all/test_package/test_package.cpp @@ -0,0 +1,6 @@ +#include "rc_ptr/rc_ptr.hpp" + +int main() { + auto first = memory::rc_ptr{new int{24}}; + auto second = first; +} diff --git a/recipes/rc_ptr/config.yml b/recipes/rc_ptr/config.yml new file mode 100644 index 0000000000000..8c82b1d025a67 --- /dev/null +++ b/recipes/rc_ptr/config.yml @@ -0,0 +1,3 @@ +versions: + "0.0.2": + folder: all diff --git a/recipes/rdma-core/all/conandata.yml b/recipes/rdma-core/all/conandata.yml index 4d08bc2892211..2871466545995 100644 --- a/recipes/rdma-core/all/conandata.yml +++ b/recipes/rdma-core/all/conandata.yml @@ -1,4 +1,10 @@ sources: + "52.0": + url: "https://github.com/linux-rdma/rdma-core/releases/download/v52.0/rdma-core-52.0.tar.gz" + sha256: "1f0ce5f2462c982b20d21156707076278807a7adf4d10e9142f3be4bec1b2b83" + "51.0": + url: "https://github.com/linux-rdma/rdma-core/releases/download/v51.0/rdma-core-51.0.tar.gz" + sha256: "0a4a55b1351356c2750f26ec9010e8c7370402a13c95799cb8b447cf0134dd61" "49.0": url: "https://github.com/linux-rdma/rdma-core/releases/download/v49.0/rdma-core-49.0.tar.gz" sha256: "953546ad2b179f9ce68dc21eb1eb26003098ea1bf0f87a4baed45bcea134b2b4" diff --git a/recipes/rdma-core/all/conanfile.py b/recipes/rdma-core/all/conanfile.py index 99a8017855d89..b7c0f7ab5ef82 100644 --- a/recipes/rdma-core/all/conanfile.py +++ b/recipes/rdma-core/all/conanfile.py @@ -36,8 +36,8 @@ class PackageConan(ConanFile): "build_libibnetdisc": True, "build_libmana": True, "build_libmlx4": True, - "build_libmlx5": False, - "build_librdmacm": False, + "build_libmlx5": True, + "build_librdmacm": True, } def configure(self): @@ -49,8 +49,7 @@ def layout(self): def requirements(self): self.requires("libnl/3.8.0") - if self.settings.os in ["Linux", "FreeBSD"]: - self.requires("libudev/system") + self.requires("libudev/system") def validate(self): if self.settings.os not in ["Linux", "FreeBSD"]: @@ -59,7 +58,7 @@ def validate(self): def build_requirements(self): if not self.conf.get("tools.gnu:pkg_config", default=False, check_type=str): - self.tool_requires("pkgconf/2.1.0") + self.tool_requires("pkgconf/2.2.0") def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) @@ -73,6 +72,11 @@ def generate(self): # tc.variables["ENABLE_STATIC"] = not self.options.shared tc.variables["NO_PYVERBS"] = True tc.variables["NO_MAN_PAGES"] = True + # Otherwise get set to ${install_prefix}/car/run and the paths in + # https://github.com/linux-rdma/rdma-core/blob/v52.0/buildlib/config.h.in + # can exceed the 108-character limit for socket paths on Linux + if "CMAKE_INSTALL_RUNDIR" not in self.conf.get("tools.cmake.cmaketoolchain:extra_variables", check_type=dict, default={}): + tc.variables["CMAKE_INSTALL_RUNDIR"] = "/var/run" tc.generate() deps = CMakeDeps(self) deps.generate() diff --git a/recipes/rdma-core/config.yml b/recipes/rdma-core/config.yml index 14360fc69dbd2..4e3149e77dd3c 100644 --- a/recipes/rdma-core/config.yml +++ b/recipes/rdma-core/config.yml @@ -1,3 +1,7 @@ versions: + "52.0": + folder: all + "51.0": + folder: all "49.0": folder: all diff --git a/recipes/re2/all/conandata.yml b/recipes/re2/all/conandata.yml index c28d8dfdd5d72..718ca942e6960 100644 --- a/recipes/re2/all/conandata.yml +++ b/recipes/re2/all/conandata.yml @@ -1,4 +1,10 @@ sources: + "20240702": + url: "https://github.com/google/re2/releases/download/2024-07-02/re2-2024-07-02.tar.gz" + sha256: "eb2df807c781601c14a260a507a5bb4509be1ee626024cb45acbd57cb9d4032b" + "20240301": + url: "https://github.com/google/re2/releases/download/2024-03-01/re2-2024-03-01.tar.gz" + sha256: "7b2b3aa8241eac25f674e5b5b2e23d4ac4f0a8891418a2661869f736f03f57f4" "20231101": url: "https://github.com/google/re2/releases/download/2023-11-01/re2-2023-11-01.tar.gz" sha256: "4e6593ac3c71de1c0f322735bc8b0492a72f66ffccfad76e259fa21c41d27d8a" diff --git a/recipes/re2/all/conanfile.py b/recipes/re2/all/conanfile.py index 8d2e83b161ad9..caa9278099d00 100644 --- a/recipes/re2/all/conanfile.py +++ b/recipes/re2/all/conanfile.py @@ -62,7 +62,7 @@ def requirements(self): if self.options.get_safe("with_icu"): self.requires("icu/73.2") if Version(self.version) >= "20230601": - self.requires("abseil/20230802.1", transitive_headers=True) + self.requires("abseil/20240116.1", transitive_headers=True) def validate(self): if self.settings.compiler.get_safe("cppstd"): diff --git a/recipes/re2/config.yml b/recipes/re2/config.yml index 56ae3dda8367b..bfce54f7e636d 100644 --- a/recipes/re2/config.yml +++ b/recipes/re2/config.yml @@ -1,4 +1,8 @@ versions: + "20240702": + folder: all + "20240301": + folder: all "20231101": folder: all "20230901": diff --git a/recipes/read-excel/all/test_package/conanfile.py b/recipes/read-excel/all/test_package/conanfile.py index bddb5e263d5d6..8a5bb47f50c4c 100644 --- a/recipes/read-excel/all/test_package/conanfile.py +++ b/recipes/read-excel/all/test_package/conanfile.py @@ -23,5 +23,4 @@ def build(self): def test(self): if can_run(self): bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") - xls_path = os.path.join(self.source_folder, "sample.xls") - self.run("{} \"{}\"".format(bin_path, xls_path), env="conanrun") + self.run(bin_path, env="conanrun") diff --git a/recipes/read-excel/all/test_package/sample.xls b/recipes/read-excel/all/test_package/sample.xls deleted file mode 100644 index ecf08ebffbbb9..0000000000000 Binary files a/recipes/read-excel/all/test_package/sample.xls and /dev/null differ diff --git a/recipes/read-excel/all/test_package/test_package.cpp b/recipes/read-excel/all/test_package/test_package.cpp index 847cfd34b125e..f8edcee4eecf3 100644 --- a/recipes/read-excel/all/test_package/test_package.cpp +++ b/recipes/read-excel/all/test_package/test_package.cpp @@ -6,31 +6,11 @@ int main(int argc, char ** argv) { - if (argc < 2) { - std::cerr << "Need an argument\n"; - return 1; - } - try { - Excel::Book book( argv[1] ); - - Excel::Sheet * sheet = book.sheet( 0 ); - - if(sheet->cell( 0, 0 ).getString() == L"This is a string.") - return 0; - - return 1; + Excel::Book book( "non-real-file.xls" ); } catch(const Excel::Exception &) { - return 1; - } - catch(const CompoundFile::Exception &) - { - return 1; - } - catch(const std::exception &) - { - return 1; + printf("Test\n"); } } diff --git a/recipes/read-excel/all/test_v1_package/conanfile.py b/recipes/read-excel/all/test_v1_package/conanfile.py index 3524db189d6f0..38f4483872d47 100644 --- a/recipes/read-excel/all/test_v1_package/conanfile.py +++ b/recipes/read-excel/all/test_v1_package/conanfile.py @@ -14,5 +14,4 @@ def build(self): def test(self): if not tools.cross_building(self): bin_path = os.path.join("bin", "test_package") - xls_path = os.path.join(self.source_folder, os.pardir, "test_package", "sample.xls") - self.run("{} \"{}\"".format(bin_path, xls_path), run_environment=True) + self.run(bin_path, run_environment=True) diff --git a/recipes/readline/all/conanfile.py b/recipes/readline/all/conanfile.py index 0c46be5b31c24..d5b233744c63a 100644 --- a/recipes/readline/all/conanfile.py +++ b/recipes/readline/all/conanfile.py @@ -11,6 +11,7 @@ required_conan_version = ">=1.53.0" + class ReadLineConan(ConanFile): name = "readline" description = "A set of functions for use by applications that allow users to edit command lines as they are typed in" @@ -18,6 +19,8 @@ class ReadLineConan(ConanFile): license = "GPL-3.0-only" homepage = "https://tiswww.case.edu/php/chet/readline/rltop.html" url = "https://github.com/conan-io/conan-center-index" + + package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], @@ -69,6 +72,9 @@ def generate(self): ]) if cross_building(self): tc.configure_args.append("bash_cv_wcwidth_broken=yes") + + tc.configure_args.append("--disable-install-examples") + tc.generate() deps = AutotoolsDeps(self) deps.generate() diff --git a/recipes/readosm/all/conanfile.py b/recipes/readosm/all/conanfile.py index b9c849a552887..8a9b5054afef4 100644 --- a/recipes/readosm/all/conanfile.py +++ b/recipes/readosm/all/conanfile.py @@ -54,7 +54,7 @@ def layout(self): basic_layout(self, src_folder="src") def requirements(self): - self.requires("expat/2.5.0") + self.requires("expat/[>=2.6.2 <3]") self.requires("zlib/[>=1.2.11 <2]") def build_requirements(self): diff --git a/recipes/rebound/all/conandata.yml b/recipes/rebound/all/conandata.yml new file mode 100644 index 0000000000000..9c806c1b5b5a5 --- /dev/null +++ b/recipes/rebound/all/conandata.yml @@ -0,0 +1,10 @@ +sources: + "4.4.1": + url: "https://github.com/hannorein/rebound/archive/refs/tags/4.4.1.tar.gz" + sha256: "0ae7bdf20750cd0a83c4905a66c3cde211f09ac732ffb4cba9887e68aba5273b" +patches: + "4.4.1": + - patch_file: "patches/0001-4.4.1-stdio-legacy-fix.patch" + patch_description: "Link to legacy_stdio only when MSVC" + patch_type: "backport" + patch_source: "https://github.com/hannorein/rebound/pull/777" diff --git a/recipes/rebound/all/conanfile.py b/recipes/rebound/all/conanfile.py new file mode 100644 index 0000000000000..eb8767e10950a --- /dev/null +++ b/recipes/rebound/all/conanfile.py @@ -0,0 +1,78 @@ +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.apple import fix_apple_shared_install_name +from conan.tools.build import cross_building +from conan.tools.files import chdir, copy, get, rm, rmdir, export_conandata_patches, apply_conandata_patches +from conan.tools.gnu import Autotools, AutotoolsToolchain +from conan.tools.layout import basic_layout +import os + + +required_conan_version = ">=1.54.0" + + +class ReboundConan(ConanFile): + name = "rebound" + description = "REBOUND is an N-body integrator, i.e. a software package that can integrate the motion of particles under the influence of gravity." + license = "GPL-3.0" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/hannorein/rebound" + topics = ("physics", "simulation", "n-body", "gravity", "integrator") + package_type = "shared-library" + # Scripts always compile with optimizations enabled + settings = "os", "arch", "compiler" + + @property + def _settings_build(self): + return getattr(self, "settings_build", self.settings) + + def export_sources(self): + export_conandata_patches(self) + + def configure(self): + self.settings.rm_safe("compiler.cppstd") + self.settings.rm_safe("compiler.libcxx") + + def layout(self): + basic_layout(self, src_folder="src") + + def validate(self): + if self.settings.os in ["Windows", "Macos"]: + raise ConanInvalidConfiguration(f"{self.ref} recipe does not support {self.settings.os}, contributions welcomed!") + + def validate_build(self): + if cross_building(self): + raise ConanInvalidConfiguration(f"{self.ref} cross-building is not supported yet, contributions welcomed!") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = AutotoolsToolchain(self) + tc.generate() + + def build(self): + apply_conandata_patches(self) + with chdir(self, self.source_folder): + autotools = Autotools(self) + autotools.make(target="librebound") + + def package(self): + copy(self, "LICENSE", self.source_folder, os.path.join(self.package_folder, "licenses")) + copy(self, "librebound.so", os.path.join(self.source_folder, "src"), os.path.join(self.package_folder, "lib")) + + copy(self, "*.h", os.path.join(self.source_folder, "src"), os.path.join(self.package_folder, "include")) + + # some files extensions and folders are not allowed. Please, read the FAQs to get informed. + rm(self, "*.la", os.path.join(self.package_folder, "lib")) + rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) + rmdir(self, os.path.join(self.package_folder, "share")) + + # In shared lib/executable files, autotools set install_name (macOS) to lib dir absolute path instead of @rpath, it's not relocatable, so fix it + fix_apple_shared_install_name(self) + + def package_info(self): + self.cpp_info.libs = ["rebound"] + + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.system_libs.append("pthread") diff --git a/recipes/rebound/all/patches/0001-4.4.1-stdio-legacy-fix.patch b/recipes/rebound/all/patches/0001-4.4.1-stdio-legacy-fix.patch new file mode 100644 index 0000000000000..9fe5511878c30 --- /dev/null +++ b/recipes/rebound/all/patches/0001-4.4.1-stdio-legacy-fix.patch @@ -0,0 +1,24 @@ +From e775c5c070093facb17a732c3b509bfe0ca8ade7 Mon Sep 17 00:00:00 2001 +From: Uilian Ries +Date: Tue, 18 Jun 2024 11:39:22 +0200 +Subject: [PATCH] Link to legacy_stdio only when MSVC + +Signed-off-by: Uilian Ries +--- + src/rebound.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/src/rebound.c b/src/rebound.c +index 18267206b..40afe76f4 100644 +--- a/src/rebound.c ++++ b/src/rebound.c +@@ -23,7 +23,9 @@ + * + */ + #define _NO_CRT_STDIO_INLINE // WIN32 to use _vsprintf_s ++#if defined(_WIN32) && defined(_MSC_VER) + #pragma comment(lib, "legacy_stdio_definitions.lib") ++#endif + #include + #include + #include // for offsetof() diff --git a/recipes/rebound/all/test_package/CMakeLists.txt b/recipes/rebound/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..f16f7cf26d671 --- /dev/null +++ b/recipes/rebound/all/test_package/CMakeLists.txt @@ -0,0 +1,7 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES C) + +find_package(rebound REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.c) +target_link_libraries(${PROJECT_NAME} PRIVATE rebound::rebound) diff --git a/recipes/rebound/all/test_package/conanfile.py b/recipes/rebound/all/test_package/conanfile.py new file mode 100644 index 0000000000000..0a808db45f245 --- /dev/null +++ b/recipes/rebound/all/test_package/conanfile.py @@ -0,0 +1,27 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake +import os + + +# It will become the standard on Conan 2.x +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def layout(self): + cmake_layout(self) + + def requirements(self): + self.requires(self.tested_reference_str) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/rebound/all/test_package/test_package.c b/recipes/rebound/all/test_package/test_package.c new file mode 100644 index 0000000000000..1cf6ab75b9e69 --- /dev/null +++ b/recipes/rebound/all/test_package/test_package.c @@ -0,0 +1,31 @@ +#include "rebound.h" +#include +#include + + +// Simplified from the simplest.c example in the REBOUND source code. +int main(int argc, char* argv[]) { + struct reb_simulation* r = reb_simulation_create(); + + reb_simulation_add_fmt(r, "m", 1.); // Central object + reb_simulation_add_fmt(r, "m a e", 1e-3, 1., 0.1); // Jupiter mass planet + reb_simulation_add_fmt(r, "a e", 1.4, 0.1); // Massless test particle + + // First integrate for 1 time units. + reb_simulation_integrate(r, 1.); + + // Then output some coordinates and orbital elements. + for (int i=0; iN; i++){ + struct reb_particle p = r->particles[i]; + printf("%f %f %f\n", p.x, p.y, p.z); + } + struct reb_particle primary = r->particles[0]; + for (int i=1; iN; i++){ + struct reb_particle p = r->particles[i]; + struct reb_orbit o = reb_orbit_from_particle(r->G, p, primary); + printf("%f %f %f\n", o.a, o.e, o.f); + } + + // Cleanup + reb_simulation_free(r); +} diff --git a/recipes/rebound/config.yml b/recipes/rebound/config.yml new file mode 100644 index 0000000000000..695144f0acbc9 --- /dev/null +++ b/recipes/rebound/config.yml @@ -0,0 +1,3 @@ +versions: + "4.4.1": + folder: "all" diff --git a/recipes/rectanglebinpack/all/conandata.yml b/recipes/rectanglebinpack/all/conandata.yml index e93b6ba1b6012..d50cf8d87d51a 100644 --- a/recipes/rectanglebinpack/all/conandata.yml +++ b/recipes/rectanglebinpack/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "cci.20230923": + - url: "https://github.com/juj/RectangleBinPack/archive/83e7e1132d93777e3732dfaae26b0f3703be2036.zip" + sha256: "ec8f20227fc79467cf7c5b5656e3e520712ee446fb9e449d42e1e5b4565f6bdc" "cci.20210901": - url: "https://github.com/juj/RectangleBinPack/archive/a40fcaf3871da57b0f6a080655b3387374840877.zip" sha256: "88cec105ca8d90d09e9e81f9862caa0cc1cdb851560fb701555eb58b29515748" diff --git a/recipes/rectanglebinpack/config.yml b/recipes/rectanglebinpack/config.yml index 610b8f5b3b81f..b499d3b7e32dc 100644 --- a/recipes/rectanglebinpack/config.yml +++ b/recipes/rectanglebinpack/config.yml @@ -1,3 +1,5 @@ versions: + "cci.20230923": + folder: "all" "cci.20210901": folder: "all" diff --git a/recipes/redis-plus-plus/all/conandata.yml b/recipes/redis-plus-plus/all/conandata.yml index 39cad834c3b22..87ed20e99676e 100644 --- a/recipes/redis-plus-plus/all/conandata.yml +++ b/recipes/redis-plus-plus/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.3.13": + url: "https://github.com/sewenew/redis-plus-plus/archive/1.3.13.tar.gz" + sha256: "678a61898ed72f0c692102c7ce103a1bcae1e6ff85a4ad03e6002c1ba8fe1e08" "1.3.12": url: "https://github.com/sewenew/redis-plus-plus/archive/1.3.12.tar.gz" sha256: "26c1e45cdbafe1af4d2cf756957b2268baab6f802b53bcdd435864620e2c03c7" @@ -24,6 +27,10 @@ sources: url: "https://github.com/sewenew/redis-plus-plus/archive/1.2.3.tar.gz" sha256: "1a3336752133019c963e06c28667b96690d6395b804e5e326671777ff88982ea" patches: + "1.3.13": + - patch_file: "patches/1.3.13-0001-fix-dependencies-injection.patch" + patch_description: "Robust discovery & injection of dependencies, and handle missing hiredis_ssl-config.cmake" + patch_type: "conan" "1.3.12": - patch_file: "patches/1.3.8-0001-fix-dependencies-injection.patch" patch_description: "Robust discovery & injection of dependencies, and handle missing hiredis_ssl-config.cmake" diff --git a/recipes/redis-plus-plus/all/patches/1.3.13-0001-fix-dependencies-injection.patch b/recipes/redis-plus-plus/all/patches/1.3.13-0001-fix-dependencies-injection.patch new file mode 100644 index 0000000000000..ab8824faf6a00 --- /dev/null +++ b/recipes/redis-plus-plus/all/patches/1.3.13-0001-fix-dependencies-injection.patch @@ -0,0 +1,59 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index ae2507e..8ef058b 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -45,8 +45,7 @@ if(REDIS_PLUS_PLUS_BUILD_ASYNC) + message(STATUS "redis-plus-plus build async interface with libuv") + + # libuv dependency +- find_path(REDIS_PLUS_PLUS_ASYNC_LIB_HEADER NAMES uv.h) +- find_library(REDIS_PLUS_PLUS_ASYNC_LIB uv) ++ find_package(libuv REQUIRED CONFIG) + else() + message(FATAL_ERROR "invalid REDIS_PLUS_PLUS_BUILD_ASYNC") + endif() +@@ -144,7 +143,6 @@ if(hiredis_FOUND) + list(APPEND REDIS_PLUS_PLUS_HIREDIS_LIBS hiredis::hiredis) + + if(REDIS_PLUS_PLUS_USE_TLS) +- find_package(hiredis_ssl REQUIRED) + list(APPEND REDIS_PLUS_PLUS_HIREDIS_LIBS hiredis::hiredis_ssl) + find_package(OpenSSL REQUIRED) + list(APPEND REDIS_PLUS_PLUS_HIREDIS_LIBS ${OPENSSL_LIBRARIES}) +@@ -174,17 +172,12 @@ endif() + set(HIREDIS_FEATURE_TEST_HEADER "${HIREDIS_FEATURE_TEST_INCLUDE}/hiredis/hiredis.h") + + include(CheckSymbolExists) +-set(CMAKE_REQUIRED_LIBRARIES_BACK ${CMAKE_REQUIRED_LIBRARIES}) +-set(CMAKE_REQUIRED_LIBRARIES ${HIREDIS_FEATURE_TEST_LIB}) + + CHECK_SYMBOL_EXISTS(redisEnableKeepAliveWithInterval ${HIREDIS_FEATURE_TEST_HEADER} REDIS_PLUS_PLUS_HAS_redisEnableKeepAliveWithInterval) + + set(REDIS_PLUS_PLUS_GENERATED_HEADER_DIR ${CMAKE_CURRENT_BINARY_DIR}/${REDIS_PLUS_PLUS_HEADER_DIR}) + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/hiredis_features.h.in ${CMAKE_CURRENT_BINARY_DIR}/${REDIS_PLUS_PLUS_SOURCE_DIR}/hiredis_features.h) + +-# Restore CMAKE_REQUIRED_LIBRARIES +-set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES_BACK}) +- + # Build static library + option(REDIS_PLUS_PLUS_BUILD_STATIC "Build static library" ON) + message(STATUS "redis-plus-plus build static library: ${REDIS_PLUS_PLUS_BUILD_STATIC}") +@@ -228,7 +221,7 @@ if(REDIS_PLUS_PLUS_BUILD_STATIC) + + if(REDIS_PLUS_PLUS_BUILD_ASYNC) + target_include_directories(${STATIC_LIB} PUBLIC $) +- target_include_directories(${STATIC_LIB} PUBLIC $) ++ target_link_libraries(${STATIC_LIB} PUBLIC $,uv,uv_a>) + if(REDIS_PLUS_PLUS_ASYNC_FUTURE STREQUAL "boost") + target_include_directories(${STATIC_LIB} SYSTEM PUBLIC $) + endif() +@@ -283,8 +276,7 @@ if(REDIS_PLUS_PLUS_BUILD_SHARED) + + if(REDIS_PLUS_PLUS_BUILD_ASYNC) + target_include_directories(${SHARED_LIB} PUBLIC $) +- target_include_directories(${SHARED_LIB} PUBLIC $) +- target_link_libraries(${SHARED_LIB} PUBLIC ${REDIS_PLUS_PLUS_ASYNC_LIB}) ++ target_link_libraries(${SHARED_LIB} PUBLIC $,uv,uv_a>) + if(REDIS_PLUS_PLUS_ASYNC_FUTURE STREQUAL "boost") + target_include_directories(${SHARED_LIB} SYSTEM PUBLIC $) + endif() diff --git a/recipes/redis-plus-plus/config.yml b/recipes/redis-plus-plus/config.yml index b0578160cf5b2..e058f2167283c 100644 --- a/recipes/redis-plus-plus/config.yml +++ b/recipes/redis-plus-plus/config.yml @@ -1,4 +1,6 @@ versions: + "1.3.13": + folder: all "1.3.12": folder: all "1.3.11": diff --git a/recipes/reflect-cpp/all/conandata.yml b/recipes/reflect-cpp/all/conandata.yml index e8f0dda436088..ad65b35cf4e50 100644 --- a/recipes/reflect-cpp/all/conandata.yml +++ b/recipes/reflect-cpp/all/conandata.yml @@ -1,4 +1,13 @@ sources: + "0.11.1": + url: "https://github.com/getml/reflect-cpp/archive/v0.11.1.tar.gz" + sha256: "e45f112fb3f14507a4aa53b99ae2d4ab6a4e7b2d5f04dd06fec00bf7faa7bbdc" + "0.11.0": + url: "https://github.com/getml/reflect-cpp/archive/v0.11.0.tar.gz" + sha256: "85f66939608acacf66dc782529af0c5a36b7d695c55b310b10c49700251b6221" + "0.10.0": + url: "https://github.com/getml/reflect-cpp/archive/v0.10.0.tar.gz" + sha256: "d2c8876d993ddc8c57c5804e767786bdb46a2bdf1a6cd81f4b14f57b1552dfd7" "0.6.0": url: "https://github.com/getml/reflect-cpp/archive/v0.6.0.tar.gz" sha256: "D8231B91989397A67E841B56A0673FDCDF969DBE956D54BB629F14100B030664" diff --git a/recipes/reflect-cpp/all/conanfile.py b/recipes/reflect-cpp/all/conanfile.py index 4952fc02f03a6..30e94da61ba89 100644 --- a/recipes/reflect-cpp/all/conanfile.py +++ b/recipes/reflect-cpp/all/conanfile.py @@ -1,6 +1,6 @@ from conan import ConanFile from conan.errors import ConanInvalidConfiguration -from conan.tools.files import get, copy, export_conandata_patches, apply_conandata_patches +from conan.tools.files import get, copy from conan.tools.build import check_min_cppstd from conan.tools.scm import Version from conan.tools.layout import basic_layout @@ -14,7 +14,7 @@ class ReflectCppConan(ConanFile): license = "MIT" url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/getml/reflect-cpp" - topics = ("reflection", "serialization", "memory", "json", "xml", "flatbuffers", "header-only") + topics = ("reflection", "serialization", "memory", "json", "xml", "flatbuffers", "yaml", "toml", "msgpack", "header-only") package_type = "header-library" settings = "os", "arch", "compiler", "build_type" options = { @@ -22,12 +22,14 @@ class ReflectCppConan(ConanFile): "with_xml" : [True, False], "with_flatbuffers" : [True, False], "with_yaml": [True, False], + "with_msgpack": [True, False], } default_options = { "with_json" : False, "with_xml" : False, "with_flatbuffers" : False, "with_yaml" : False, + "with_msgpack": False, } @property @@ -44,9 +46,6 @@ def _compilers_minimum_version(self): "apple-clang": "15", } - def export_sources(self): - export_conandata_patches(self) - def layout(self): basic_layout(self, src_folder="src") @@ -59,7 +58,12 @@ def requirements(self): self.requires("flatbuffers/23.5.26", transitive_headers=True) if self.options.with_yaml: self.requires("yaml-cpp/0.8.0", transitive_headers=True) - + if self.options.with_msgpack: + self.requires("msgpack-c/6.0.0", transitive_headers=True) + + if Version(self.version) >= "0.11.1": + self.requires("ctre/3.9.0", transitive_headers=True) + def package_id(self): self.info.clear() @@ -75,9 +79,6 @@ def validate(self): def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) - def build(self): - apply_conandata_patches(self) - def package(self): copy(self, pattern="LICENSE*", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) copy( @@ -90,3 +91,5 @@ def package(self): def package_info(self): self.cpp_info.bindirs = [] self.cpp_info.libdirs = [] + if Version(self.version) >= "0.11.1": + self.cpp_info.defines.append("REFLECTCPP_NO_BUNDLED_DEPENDENCIES") diff --git a/recipes/reflect-cpp/all/test_package/CMakeLists.txt b/recipes/reflect-cpp/all/test_package/CMakeLists.txt index 66b58d7b20ff5..767315c296e76 100644 --- a/recipes/reflect-cpp/all/test_package/CMakeLists.txt +++ b/recipes/reflect-cpp/all/test_package/CMakeLists.txt @@ -6,3 +6,7 @@ find_package(reflect-cpp REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) target_link_libraries(${PROJECT_NAME} PRIVATE reflect-cpp::reflect-cpp) target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_20) + +if(CONAN_TEST_WITH_MSGPACK) + target_compile_definitions(${PROJECT_NAME} PRIVATE CONAN_TEST_WITH_MSGPACK) +endif() diff --git a/recipes/reflect-cpp/all/test_package/conanfile.py b/recipes/reflect-cpp/all/test_package/conanfile.py index a9fb96656f203..c0ce5c17be896 100644 --- a/recipes/reflect-cpp/all/test_package/conanfile.py +++ b/recipes/reflect-cpp/all/test_package/conanfile.py @@ -1,12 +1,12 @@ from conan import ConanFile from conan.tools.build import can_run -from conan.tools.cmake import cmake_layout, CMake +from conan.tools.cmake import cmake_layout, CMake, CMakeToolchain import os class TestPackageConan(ConanFile): settings = "os", "arch", "compiler", "build_type" - generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + generators = "CMakeDeps", "VirtualRunEnv" test_type = "explicit" def requirements(self): @@ -14,6 +14,12 @@ def requirements(self): def layout(self): cmake_layout(self) + + def generate(self): + tc = CMakeToolchain(self) + if self.dependencies[self.tested_reference_str].options.with_msgpack: + tc.cache_variables["CONAN_TEST_WITH_MSGPACK"] = True + tc.generate() def build(self): cmake = CMake(self) diff --git a/recipes/reflect-cpp/all/test_package/test_package.cpp b/recipes/reflect-cpp/all/test_package/test_package.cpp index 04e4309cba5ea..ed7b54690e256 100644 --- a/recipes/reflect-cpp/all/test_package/test_package.cpp +++ b/recipes/reflect-cpp/all/test_package/test_package.cpp @@ -1,6 +1,11 @@ #include +#include #include +#if defined(CONAN_TEST_WITH_MSGPACK) + #include +#endif + struct TestStruct { int x; std::string name; @@ -11,5 +16,14 @@ int main(void) { (void) f.name(); (void) f.type(); } + +#if defined(CONAN_TEST_WITH_MSGPACK) + const auto test = TestStruct{.x = 15, .name = "test_package"}; + std::cout << "msgpack test: "; + rfl::msgpack::write(test, std::cout) << std::endl; +#endif + + std::cout << "reflect-cpp test successful\n"; + return 0; } diff --git a/recipes/reflect-cpp/all/test_v1_package/CMakeLists.txt b/recipes/reflect-cpp/all/test_v1_package/CMakeLists.txt deleted file mode 100644 index 9652e22fc19d5..0000000000000 --- a/recipes/reflect-cpp/all/test_v1_package/CMakeLists.txt +++ /dev/null @@ -1,9 +0,0 @@ -cmake_minimum_required(VERSION 3.12) - -project(test_package) - -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) - -add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ - ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/reflect-cpp/all/test_v1_package/conanfile.py b/recipes/reflect-cpp/all/test_v1_package/conanfile.py deleted file mode 100644 index 5a05af3c2dfd2..0000000000000 --- a/recipes/reflect-cpp/all/test_v1_package/conanfile.py +++ /dev/null @@ -1,18 +0,0 @@ -from conans import ConanFile, CMake -from conan.tools.build import cross_building -import os - - -class TestPackageV1Conan(ConanFile): - settings = "os", "arch", "compiler", "build_type" - generators = "cmake", "cmake_find_package_multi" - - def build(self): - cmake = CMake(self) - cmake.configure() - cmake.build() - - def test(self): - if not cross_building(self): - bin_path = os.path.join("bin", "test_package") - self.run(bin_path, run_environment=True) diff --git a/recipes/reflect-cpp/config.yml b/recipes/reflect-cpp/config.yml index 7d9ba9dbc8ac9..1fd3a60496588 100644 --- a/recipes/reflect-cpp/config.yml +++ b/recipes/reflect-cpp/config.yml @@ -1,3 +1,9 @@ versions: + "0.11.1": + folder: all + "0.11.0": + folder: all + "0.10.0": + folder: all "0.6.0": folder: all diff --git a/recipes/resiprocate/all/conandata.yml b/recipes/resiprocate/all/conandata.yml index 30a690c6f981a..3c5856f5a74a9 100644 --- a/recipes/resiprocate/all/conandata.yml +++ b/recipes/resiprocate/all/conandata.yml @@ -1,4 +1,4 @@ sources: "1.12.0": - url: https://www.resiprocate.org/files/pub/reSIProcate/releases/resiprocate-1.12.0.tar.gz - sha256: 046826503d3c8682ae0e42101b28f903c5f988235f1ff4a98dbfb9066d0d3d49 + url: "https://github.com/resiprocate/resiprocate/archive/refs/tags/resiprocate-1.12.0.tar.gz" + sha256: "aa8906082e4221bffbfab3210df68a6ba1f57ba1532d89ea4572b4fa9877914f" diff --git a/recipes/resiprocate/all/conanfile.py b/recipes/resiprocate/all/conanfile.py index 54400194c9ba3..65f010b869c78 100644 --- a/recipes/resiprocate/all/conanfile.py +++ b/recipes/resiprocate/all/conanfile.py @@ -1,94 +1,106 @@ import os -from conans import ConanFile, AutoToolsBuildEnvironment, tools -from conans.errors import ConanInvalidConfiguration +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.apple import is_apple_os +from conan.tools.build import cross_building +from conan.tools.env import VirtualRunEnv +from conan.tools.files import copy, get, rm, rmdir, chdir +from conan.tools.gnu import Autotools, AutotoolsToolchain, AutotoolsDeps +from conan.tools.layout import basic_layout + +required_conan_version = ">=1.53.0" -required_conan_version = ">=1.29.1" class ResiprocateConan(ConanFile): name = "resiprocate" - description = "The project is dedicated to maintaining a complete, correct, and commercially usable implementation of SIP and a few related protocols. " - topics = ("sip", "voip", "communication", "signaling") - url = "https://github.com/conan-io/conan-center-index" - homepage = "http://www.resiprocate.org" + description = ( + "The project is dedicated to maintaining a complete, correct, " + "and commercially usable implementation of SIP and a few related protocols." + ) license = "VSL-1.0" - settings = "os", "compiler", "build_type", "arch" - options = {"fPIC": [True, False], - "shared": [True, False], - "with_ssl": [True, False], - "with_postgresql": [True, False], - "with_mysql": [True, False]} - default_options = {"fPIC": True, - "shared": False, - "with_ssl": True, - "with_postgresql": True, - "with_mysql": True} - _autotools = None + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/resiprocate/resiprocate/wiki/" + topics = ("sip", "voip", "communication", "signaling") - @property - def _source_subfolder(self): - return "source_subfolder" + package_type = "library" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + "with_ssl": [True, False], + "with_postgresql": [True, False], + "with_mysql": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + "with_ssl": True, + "with_postgresql": True, + "with_mysql": False, + } def config_options(self): - if self.settings.os == 'Windows': + if self.settings.os == "Windows": del self.options.fPIC def configure(self): - if self.settings.os in ("Windows", "Macos"): - # FIXME: Visual Studio project & Mac support seems available in resiprocate - raise ConanInvalidConfiguration("reSIProcate recipe does not currently support {}.".format(self.settings.os)) + if self.settings.os == "Windows" or is_apple_os(self): + # FIXME: unreleased versions of resiprocate use CMake and should support Windows and macOS + raise ConanInvalidConfiguration(f"reSIProcate recipe does not currently support {self.settings.os}.") if self.options.shared: - del self.options.fPIC + self.options.rm_safe("fPIC") + + def layout(self): + basic_layout(self, src_folder="src") def requirements(self): if self.options.with_ssl: - self.requires("openssl/1.1.1q") + self.requires("openssl/1.1.1w") # OpenSSL 3.x is not supported if self.options.with_postgresql: - self.requires("libpq/14.2") + self.requires("libpq/15.4") if self.options.with_mysql: - self.requires("libmysqlclient/8.0.29") + self.requires("libmysqlclient/8.1.0") def source(self): - tools.get(**self.conan_data["sources"][self.version]) - os.rename("{}-{}".format(self.name, self.version), self._source_subfolder) - - def _configure_autotools(self): - if self._autotools: - return self._autotools - self._autotools = AutoToolsBuildEnvironment(self) - yes_no = lambda v: "yes" if v else "no" - configure_args = [ - "--enable-shared={}".format(yes_no(self.options.shared)), - "--enable-static={}".format(yes_no(not self.options.shared)), - "--with-pic={}".format(yes_no(self.options.get_safe("fPIC", True))) - ] + get(self, **self.conan_data["sources"][self.version], strip_root=True) + def generate(self): + if not cross_building(self): + venv = VirtualRunEnv(self) + venv.generate(scope="build") + tc = AutotoolsToolchain(self) # These options do not support yes/no if self.options.with_ssl: - configure_args.append("--with-ssl") + tc.configure_args.append("--with-ssl") if self.options.with_mysql: - configure_args.append("--with-mysql") + tc.configure_args.append("--with-mysql") if self.options.with_postgresql: - configure_args.append("--with-postgresql") - - self._autotools.configure(configure_dir=self._source_subfolder, args=configure_args) - return self._autotools + tc.configure_args.append("--with-postgresql") + tc.generate() + deps = AutotoolsDeps(self) + deps.generate() def build(self): - autotools = self._configure_autotools() - autotools.make() + with chdir(self, self.source_folder): + autotools = Autotools(self) + autotools.autoreconf() + autotools.configure() + autotools.make() def package(self): - self.copy("COPYING", src=self._source_subfolder, dst="licenses") - autotools = self._configure_autotools() - autotools.install() - tools.rmdir(os.path.join(os.path.join(self.package_folder, "share"))) - tools.remove_files_by_mask(os.path.join(self.package_folder), "*.la") + copy(self, "COPYING", self.source_folder, os.path.join(self.package_folder, "licenses")) + with chdir(self, self.source_folder): + autotools = Autotools(self) + autotools.install() + rmdir(self, os.path.join(os.path.join(self.package_folder, "share"))) + rm(self, "*.la", os.path.join(self.package_folder), recursive=True) def package_info(self): self.cpp_info.libs = ["resip", "rutil", "dum", "resipares"] if self.settings.os in ("Linux", "FreeBSD"): self.cpp_info.system_libs = ["pthread"] + + # TODO: Legacy, to be removed on Conan 2.0 bin_path = os.path.join(self.package_folder, "bin") - self.output.info("Appending PATH environment variable: {}".format(bin_path)) - self.env_info.PATH.append(os.path.join(self.package_folder, "bin")) + self.env_info.PATH.append(bin_path) diff --git a/recipes/resiprocate/all/test_package/CMakeLists.txt b/recipes/resiprocate/all/test_package/CMakeLists.txt index 33ae887aa6aea..9a3b67fc7fe91 100644 --- a/recipes/resiprocate/all/test_package/CMakeLists.txt +++ b/recipes/resiprocate/all/test_package/CMakeLists.txt @@ -1,9 +1,8 @@ -cmake_minimum_required(VERSION 3.1) -project(test_package) +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup() +find_package(resiprocate REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) -target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS}) +target_link_libraries(${PROJECT_NAME} PRIVATE resiprocate::resiprocate) set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 11) diff --git a/recipes/resiprocate/all/test_package/conanfile.py b/recipes/resiprocate/all/test_package/conanfile.py index ea57a464900be..ef5d7042163ec 100644 --- a/recipes/resiprocate/all/test_package/conanfile.py +++ b/recipes/resiprocate/all/test_package/conanfile.py @@ -1,10 +1,19 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake import os -from conans import ConanFile, CMake, tools class TestPackageConan(ConanFile): - settings = "os", "compiler", "build_type", "arch" - generators = "cmake" + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) def build(self): cmake = CMake(self) @@ -12,6 +21,6 @@ def build(self): cmake.build() def test(self): - if not tools.cross_building(self.settings): - bin_path = os.path.join("bin", "test_package") - self.run(bin_path, run_environment=True) + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/resiprocate/all/test_v1_package/CMakeLists.txt b/recipes/resiprocate/all/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..91630d79f4abb --- /dev/null +++ b/recipes/resiprocate/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/resiprocate/all/test_v1_package/conanfile.py b/recipes/resiprocate/all/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..84ee68733e516 --- /dev/null +++ b/recipes/resiprocate/all/test_v1_package/conanfile.py @@ -0,0 +1,17 @@ +import os + +from conans import ConanFile, CMake, tools + +class TestPackageConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake", "cmake_find_package_multi" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if not tools.cross_building(self.settings): + bin_path = os.path.join("bin", "test_package") + self.run(bin_path, run_environment=True) diff --git a/recipes/ring-span-lite/all/conandata.yml b/recipes/ring-span-lite/all/conandata.yml index ecb24a4b876e4..4919bacb7f2d0 100644 --- a/recipes/ring-span-lite/all/conandata.yml +++ b/recipes/ring-span-lite/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.7.0": + url: "https://github.com/martinmoene/ring-span-lite/archive/v0.7.0.tar.gz" + sha256: "7650bb1bcf76cb0f7ac75240c5346203cbe7eb7027c0843c60253f6db08a93c1" "0.6.0": url: "https://github.com/martinmoene/ring-span-lite/archive/v0.6.0.tar.gz" sha256: "3248ee40a3147e6ba3cee051a838f727770654ade0c9852b1640f0f40d2e0573" diff --git a/recipes/ring-span-lite/all/conanfile.py b/recipes/ring-span-lite/all/conanfile.py index 91e2240703f2a..fa9939f4bd005 100644 --- a/recipes/ring-span-lite/all/conanfile.py +++ b/recipes/ring-span-lite/all/conanfile.py @@ -8,12 +8,13 @@ class RingSpanLiteConan(ConanFile): name = "ring-span-lite" - url = "https://github.com/conan-io/conan-center-index" - homepage = "https://github.com/martinmoene/ring-span-lite" description = ( "ring-span lite - A ring_span type for C++98, C++11 and later in a single-file header-only library ") - topics = ("cpp98", "cpp11", "cpp14", "cpp17", "ring-span") license = "BSL-1.0" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/martinmoene/ring-span-lite" + topics = ("cpp98", "cpp11", "cpp14", "cpp17", "ring-span", "header-only") + package_type = "header-library" settings = "os", "arch", "compiler", "build_type" no_copy_source = True @@ -24,11 +25,7 @@ def layout(self): basic_layout(self, src_folder="src") def source(self): - get(self, **self.conan_data["sources"][self.version], - destination=self.source_folder, strip_root=True) - - def build(self): - pass + get(self, **self.conan_data["sources"][self.version], strip_root=True) def package(self): copy(self, "*.hpp", src=os.path.join(self.source_folder, "include"), diff --git a/recipes/ring-span-lite/all/test_package/conanfile.py b/recipes/ring-span-lite/all/test_package/conanfile.py index d120a992c06a6..8a5bb47f50c4c 100644 --- a/recipes/ring-span-lite/all/test_package/conanfile.py +++ b/recipes/ring-span-lite/all/test_package/conanfile.py @@ -7,6 +7,7 @@ class TestPackageConan(ConanFile): settings = "os", "arch", "compiler", "build_type" generators = "CMakeToolchain", "CMakeDeps", "VirtualRunEnv" + test_type = "explicit" def requirements(self): self.requires(self.tested_reference_str) diff --git a/recipes/ring-span-lite/config.yml b/recipes/ring-span-lite/config.yml index babcbfb79d964..a0804c43130f1 100644 --- a/recipes/ring-span-lite/config.yml +++ b/recipes/ring-span-lite/config.yml @@ -1,4 +1,6 @@ versions: + "0.7.0": + folder: all "0.6.0": folder: all "0.5.0": diff --git a/recipes/rmm/all/conandata.yml b/recipes/rmm/all/conandata.yml index 67683994d5b6f..31ecfbfa6c6ef 100644 --- a/recipes/rmm/all/conandata.yml +++ b/recipes/rmm/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "24.04.00": + url: "https://github.com/rapidsai/rmm/archive/v24.04.00a.tar.gz" + sha256: "47a5d28a99165fc6e1f02399e0cc8b304f5bbc9aaf2071288ae92638ecdf516c" "23.10.00": url: "https://github.com/rapidsai/rmm/archive/v23.10.00.tar.gz" sha256: "4e2408073662fdfd92ca21d87f7d2afc64d2595fd5a1e3fa321d3472cfbd7f7a" diff --git a/recipes/rmm/all/conanfile.py b/recipes/rmm/all/conanfile.py index ca0e3861927c1..91388dbe02f58 100644 --- a/recipes/rmm/all/conanfile.py +++ b/recipes/rmm/all/conanfile.py @@ -42,8 +42,8 @@ def layout(self): def requirements(self): self.requires("thrust/1.17.2") - self.requires("spdlog/1.12.0") - self.requires("fmt/10.1.1") + self.requires("spdlog/1.13.0") + self.requires("fmt/10.2.1") def package_id(self): self.info.clear() diff --git a/recipes/rmm/config.yml b/recipes/rmm/config.yml index 20cd4f56dc99f..396bbc9cfd497 100644 --- a/recipes/rmm/config.yml +++ b/recipes/rmm/config.yml @@ -1,4 +1,6 @@ versions: + "24.04.00": + folder: all "23.10.00": folder: all "23.06.00": diff --git a/recipes/roaring/all/conandata.yml b/recipes/roaring/all/conandata.yml index afaf790313c5a..1cf5a2a6090e4 100644 --- a/recipes/roaring/all/conandata.yml +++ b/recipes/roaring/all/conandata.yml @@ -1,43 +1,28 @@ sources: + "4.2.1": + url: "https://github.com/RoaringBitmap/CRoaring/archive/refs/tags/v4.2.1.tar.gz" + sha256: "3514728e9eb8c90dbc00a9e337302eb458c65be2f9501a3e882d051599c4a74c" + "4.2.0": + url: "https://github.com/RoaringBitmap/CRoaring/archive/refs/tags/v4.2.0.tar.gz" + sha256: "b5f2d184b0872f57dce911cb520925539cfa851deda516d1239e8e06aff96439" + "4.1.7": + url: "https://github.com/RoaringBitmap/CRoaring/archive/refs/tags/v4.1.7.tar.gz" + sha256: "ea235796c074c3a8a8c3e5c84bb5f09619723b8e4913cf99cc349f626c193569" + "4.1.2": + url: "https://github.com/RoaringBitmap/CRoaring/archive/refs/tags/v4.1.2.tar.gz" + sha256: "dd9e9d9a28dcf9ba1622fb4a3a7b4d7f5e12732bb35e99a7cb028b7512731a7b" + "4.1.1": + url: "https://github.com/RoaringBitmap/CRoaring/archive/refs/tags/v4.1.1.tar.gz" + sha256: "42804cc2bb5c9279ec4fcaa56d2d6b389da934634abcce8dbc4e4c1d60e1468d" + "4.1.0": + url: "https://github.com/RoaringBitmap/CRoaring/archive/refs/tags/v4.1.0.tar.gz" + sha256: "0596c6e22bcccb56f38260142b435f1f72aef7721fa370fd9f2b88380245fc1d" + "4.0.0": + url: "https://github.com/RoaringBitmap/CRoaring/archive/refs/tags/v4.0.0.tar.gz" + sha256: "a8b98db3800cd10979561a1388e4e970886a24015bd6cfabb08ba7917f541b0d" "3.0.0": url: "https://github.com/RoaringBitmap/CRoaring/archive/refs/tags/v3.0.0.tar.gz" sha256: "25183bc54ab650d964256d547869a34573a13d06f7e6a369b79e77f5c1feb8ba" "2.1.2": url: "https://github.com/RoaringBitmap/CRoaring/archive/refs/tags/v2.1.2.tar.gz" sha256: "a53d2f540f78ddae31e30c573b1b7fd41d7257d6a090507ba35d9c398712e5ad" - "2.1.1": - url: "https://github.com/RoaringBitmap/CRoaring/archive/refs/tags/v2.1.1.tar.gz" - sha256: "40a1c04e220bb2305c3adb5347f42b6b435c4bb4ac89dd0047ba8e73a7388dfb" - "2.1.0": - url: "https://github.com/RoaringBitmap/CRoaring/archive/refs/tags/v2.1.0.tar.gz" - sha256: "75e2c106bf3c035f92560017b56b01602744b643a3fef08d69255c138c6c6f5c" - "2.0.4": - url: "https://github.com/RoaringBitmap/CRoaring/archive/refs/tags/v2.0.4.tar.gz" - sha256: "3c962c196ba28abf2639067f2e2fd25879744ba98152a4e0e74556ca515eda33" - "2.0.2": - url: "https://github.com/RoaringBitmap/CRoaring/archive/v2.0.2.tar.gz" - sha256: "92636a931f8a7bf36ce5a96d3039db128afd0e075f5aa7936fa1685dd2bbc75b" - "1.3.0": - url: "https://github.com/RoaringBitmap/CRoaring/archive/v1.3.0.tar.gz" - sha256: "c4fccf6a8cfa6f15f47d0e6f6b202940c2305e3078eb745d25fe9e2739ae5278" - "1.1.5": - url: "https://github.com/RoaringBitmap/CRoaring/archive/v1.1.5.tar.gz" - sha256: "5210a277ce83c3099dfee41d494c28aec61bdbc9160b3b124cb5afeab49cd123" - "1.1.2": - url: "https://github.com/RoaringBitmap/CRoaring/archive/v1.1.2.tar.gz" - sha256: "545fab4f00d946000743c563b3c315c1a11cee1f19c6ba4fb9493824a4e68b9a" - "1.1.0": - url: "https://github.com/RoaringBitmap/CRoaring/archive/v1.1.0.tar.gz" - sha256: "b59495578e3e4790a216420ce70578d22c1b6d1987232fc2bf46463a03fb1c06" - "1.0.0": - url: "https://github.com/RoaringBitmap/CRoaring/archive/v1.0.0.tar.gz" - sha256: "08f884cd2790fcfba69b63443442034702f5d4865514fb09ac6ff05e048bf230" - "0.9.9": - url: "https://github.com/RoaringBitmap/CRoaring/archive/v0.9.9.tar.gz" - sha256: "3083bcbc37e43403111c482ddf317a710972256c23bc83abc8925803a02bdf60" - "0.8.1": - url: "https://github.com/RoaringBitmap/CRoaring/archive/v0.8.1.tar.gz" - sha256: "5359f2a051f10e42cea5edc3cb3650fd272e9125e6a0538901cf30619939d4f8" - "0.7.3": - url: "https://github.com/RoaringBitmap/CRoaring/archive/v0.7.3.tar.gz" - sha256: "e3f8115ba44ef0e1eb7b982dc3c3233f08f5f95ec1260169c2ad0ca50e56b656" diff --git a/recipes/roaring/all/conanfile.py b/recipes/roaring/all/conanfile.py index f0d51742149de..beeff0a3255bd 100644 --- a/recipes/roaring/all/conanfile.py +++ b/recipes/roaring/all/conanfile.py @@ -2,7 +2,7 @@ from conan.errors import ConanInvalidConfiguration from conan.tools.build import check_min_cppstd from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout -from conan.tools.files import copy, get, replace_in_file, rmdir +from conan.tools.files import copy, get, rmdir from conan.tools.scm import Version import os @@ -45,8 +45,6 @@ def config_options(self): if self.settings.arch not in ("x86", "x86_64"): del self.options.with_avx del self.options.with_avx512 - elif Version(self.version) < "1.1.0": - del self.options.with_avx512 if not str(self.settings.arch).startswith("arm"): del self.options.with_neon @@ -82,8 +80,6 @@ def generate(self): tc.generate() def build(self): - if Version(self.version) < "2.0.0": - replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), "set(CMAKE_MACOSX_RPATH OFF)", "") cmake = CMake(self) cmake.configure() cmake.build() diff --git a/recipes/roaring/config.yml b/recipes/roaring/config.yml index 6437564275dee..589d7841508de 100644 --- a/recipes/roaring/config.yml +++ b/recipes/roaring/config.yml @@ -1,29 +1,19 @@ versions: - "3.0.0": - folder: all - "2.1.2": - folder: all - "2.1.1": - folder: all - "2.1.0": + "4.2.1": folder: all - "2.0.4": + "4.2.0": folder: all - "2.0.2": + "4.1.7": folder: all - "1.3.0": + "4.1.2": folder: all - "1.1.5": + "4.1.1": folder: all - "1.1.2": + "4.1.0": folder: all - "1.1.0": + "4.0.0": folder: all - "1.0.0": - folder: all - "0.9.9": - folder: all - "0.8.1": + "3.0.0": folder: all - "0.7.3": + "2.1.2": folder: all diff --git a/recipes/rocket/all/conandata.yml b/recipes/rocket/all/conandata.yml new file mode 100644 index 0000000000000..03683863693df --- /dev/null +++ b/recipes/rocket/all/conandata.yml @@ -0,0 +1,10 @@ +sources: + "cci.20200603": + url: "https://github.com/tripleslash/rocket/archive/348869fcda83f8b8b521c7654f83fea07ebe7a0a.tar.gz" + sha256: "de03b9c7f9b9478cfaa60683f95a7b0773dc0929d14e510c23f53b3804cc921f" +patches: + "cci.20200603": + - patch_file: "patches/0001-fix-thread_id.patch" + patch_description: "Fix compilation on different C++ std versions" + patch_type: "backport" + patch_source: "https://github.com/tripleslash/rocket/issues/10" diff --git a/recipes/rocket/all/conanfile.py b/recipes/rocket/all/conanfile.py new file mode 100644 index 0000000000000..7e395c84d11ae --- /dev/null +++ b/recipes/rocket/all/conanfile.py @@ -0,0 +1,72 @@ +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.build import check_min_cppstd +from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, load, save +from conan.tools.scm import Version +import os + +required_conan_version = ">=1.53.0" + + +class RocketConan(ConanFile): + name = "rocket" + description = "Fast single header signal/slots library for C++" + license = "DocumentRef-README.md:LicenseRef-Rocket-public-domain" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/tripleslash/rocket" + topics = ("signal-slots", "observer-pattern", "header-only") + package_type = "header-library" + settings = "os", "compiler", "build_type", "arch" + + @property + def _min_cppstd(self): + return 17 + + @property + def _compilers_minimum_version(self): + return { + "gcc": "7", + "clang": "6", + "apple-clang": "10", + "Visual Studio": "15", + "msvc": "191", + } + + def export_sources(self): + export_conandata_patches(self) + + def validate(self): + if self.settings.compiler.cppstd: + check_min_cppstd(self, self._min_cppstd) + minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) + if minimum_version and Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration( + f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." + ) + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def package_id(self): + self.info.clear() + + def build(self): + apply_conandata_patches(self) + + def _extract_license(self): + readme_content = load(self, os.path.join(self.source_folder, "README.md")) + first = readme_content.find("# rocket") + last = readme_content.find("signals2).") + license_content = readme_content[first:last+len("signals2).")] + # Make sure the extracted text from README has the license type + assert license_content.find("public-domain") != -1 + save(self, os.path.join(self.package_folder, "licenses", "LICENSE"), license_content) + + def package(self): + self._extract_license() + copy(self, "rocket.hpp", self.build_folder, os.path.join(self.package_folder, "include")) + + def package_info(self): + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] + diff --git a/recipes/rocket/all/patches/0001-fix-thread_id.patch b/recipes/rocket/all/patches/0001-fix-thread_id.patch new file mode 100644 index 0000000000000..793c870ed12dc --- /dev/null +++ b/recipes/rocket/all/patches/0001-fix-thread_id.patch @@ -0,0 +1,16 @@ +diff --git a/rocket.hpp b/rocket.hpp +index 8c4e539..47d650a 100644 +--- a/rocket.hpp ++++ b/rocket.hpp +@@ -2082,8 +2082,8 @@ namespace rocket + + bool is_queued() const ROCKET_NOEXCEPT + { +- return thread_id != std::thread::id{} +- && thread_id != std::this_thread::get_id(); ++ return !(thread_id == std::thread::id{}) ++ && !(thread_id == std::this_thread::get_id()); + } + + #ifndef ROCKET_NO_BLOCKING_CONNECTIONS + diff --git a/recipes/rocket/all/test_package/CMakeLists.txt b/recipes/rocket/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..6555535f21daa --- /dev/null +++ b/recipes/rocket/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) + +find_package(rocket REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE rocket::rocket) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) diff --git a/recipes/rocket/all/test_package/conanfile.py b/recipes/rocket/all/test_package/conanfile.py new file mode 100644 index 0000000000000..b4c8de77c89d8 --- /dev/null +++ b/recipes/rocket/all/test_package/conanfile.py @@ -0,0 +1,26 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import CMake, cmake_layout +import os + + +class RocketTestConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeToolchain", "CMakeDeps", "VirtualRunEnv" + test_type = "explicit" + + def layout(self): + cmake_layout(self) + + def requirements(self): + self.requires(self.tested_reference_str) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/rocket/all/test_package/test_package.cpp b/recipes/rocket/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..33702a87e060d --- /dev/null +++ b/recipes/rocket/all/test_package/test_package.cpp @@ -0,0 +1,16 @@ +#include +#include +#include + +int main() +{ + rocket::signal test; + test.connect([](int x) + { return x * 3; }); + + constexpr int value = 2; + + const auto result{test(value) == value * 3}; + std::cout << "Rocket test success: " << std::boolalpha << result << '\n'; + return result? EXIT_SUCCESS : EXIT_FAILURE; +} diff --git a/recipes/rocket/config.yml b/recipes/rocket/config.yml new file mode 100644 index 0000000000000..0496cb4bde798 --- /dev/null +++ b/recipes/rocket/config.yml @@ -0,0 +1,3 @@ +versions: + "cci.20200603": + folder: "all" diff --git a/recipes/rocksdb/all/conandata.yml b/recipes/rocksdb/all/conandata.yml index d4cc95fcc067b..70ddc35c65853 100644 --- a/recipes/rocksdb/all/conandata.yml +++ b/recipes/rocksdb/all/conandata.yml @@ -1,4 +1,31 @@ sources: + "9.7.4": + url: "https://github.com/facebook/rocksdb/archive/refs/tags/v9.7.4.tar.gz" + sha256: "9b810c81731835fda0d4bbdb51d3199d901fa4395733ab63752d297da84c5a47" + "9.7.3": + url: "https://github.com/facebook/rocksdb/archive/refs/tags/v9.7.3.tar.gz" + sha256: "acfabb989cbfb5b5c4d23214819b059638193ec33dad2d88373c46448d16d38b" + "9.7.2": + url: "https://github.com/facebook/rocksdb/archive/refs/tags/v9.7.2.tar.gz" + sha256: "13e9c41d290199ee0185590d4fa9d327422aaf75765b3193945303c3c314e07d" + "9.5.2": + url: "https://github.com/facebook/rocksdb/archive/refs/tags/v9.5.2.tar.gz" + sha256: "B20780586D3DF4A3C5BCBDE341A2C1946B03D18237960BDA5BC5E9538F42AF40" + "9.4.0": + url: "https://github.com/facebook/rocksdb/archive/refs/tags/v9.4.0.tar.gz" + sha256: "1f829976aa24b8ba432e156f52c9e0f0bd89c46dc0cc5a9a628ea70571c1551c" + "9.2.1": + url: "https://github.com/facebook/rocksdb/archive/refs/tags/v9.2.1.tar.gz" + sha256: "bb20fd9a07624e0dc1849a8e65833e5421960184f9c469d508b58ed8f40a780f" + "9.1.0": + url: "https://github.com/facebook/rocksdb/archive/refs/tags/v9.1.0.tar.gz" + sha256: "3c225e45bf6f6367cf5a4413f71abc4a3427627790e6d58c57adc2daa4b6309d" + "9.0.0": + url: "https://github.com/facebook/rocksdb/archive/refs/tags/v9.0.0.tar.gz" + sha256: "013aac178aa12837cbfa3b1e20e9e91ff87962ab7fdd044fd820e859f8964f9b" + "8.8.1": + url: "https://github.com/facebook/rocksdb/archive/refs/tags/v8.8.1.tar.gz" + sha256: "056c7e21ad8ae36b026ac3b94b9d6e0fcc60e1d937fc80330921e4181be5c36e" "6.29.5": url: "https://github.com/facebook/rocksdb/archive/refs/tags/v6.29.5.tar.gz" sha256: "ddbf84791f0980c0bbce3902feb93a2c7006f6f53bfd798926143e31d4d756f0" @@ -8,9 +35,6 @@ sources: "6.20.3": url: "https://github.com/facebook/rocksdb/archive/refs/tags/v6.20.3.tar.gz" sha256: "c6502c7aae641b7e20fafa6c2b92273d935d2b7b2707135ebd9a67b092169dca" - "8.8.1": - url: "https://github.com/facebook/rocksdb/archive/refs/tags/v8.8.1.tar.gz" - sha256: "056c7e21ad8ae36b026ac3b94b9d6e0fcc60e1d937fc80330921e4181be5c36e" patches: "6.29.5": - patch_file: "patches/6.29.5-0001-add-include-cstdint-for-gcc-13.patch" diff --git a/recipes/rocksdb/all/conanfile.py b/recipes/rocksdb/all/conanfile.py index 09425b9f86390..605a6adf2d073 100644 --- a/recipes/rocksdb/all/conanfile.py +++ b/recipes/rocksdb/all/conanfile.py @@ -15,10 +15,10 @@ class RocksDBConan(ConanFile): name = "rocksdb" - homepage = "https://github.com/facebook/rocksdb" + description = "A library that provides an embeddable, persistent key-value store for fast storage" license = ("GPL-2.0-only", "Apache-2.0") url = "https://github.com/conan-io/conan-center-index" - description = "A library that provides an embeddable, persistent key-value store for fast storage" + homepage = "https://github.com/facebook/rocksdb" topics = ("database", "leveldb", "facebook", "key-value") package_type = "library" settings = "os", "arch", "compiler", "build_type" @@ -163,6 +163,8 @@ def generate(self): if self.options.with_jemalloc: deps.set_property("jemalloc", "cmake_file_name", "JeMalloc") deps.set_property("jemalloc", "cmake_target_name", "JeMalloc::JeMalloc") + if self.options.with_zstd: + deps.set_property("zstd", "cmake_target_name", "zstd::zstd") deps.generate() def build(self): diff --git a/recipes/rocksdb/config.yml b/recipes/rocksdb/config.yml index 3691365f4f4a3..3c64e7f6cc7e8 100644 --- a/recipes/rocksdb/config.yml +++ b/recipes/rocksdb/config.yml @@ -1,9 +1,25 @@ versions: + "9.7.4": + folder: all + "9.7.3": + folder: all + "9.7.2": + folder: all + "9.5.2": + folder: all + "9.4.0": + folder: all + "9.2.1": + folder: all + "9.1.0": + folder: all + "9.0.0": + folder: all + "8.8.1": + folder: all "6.29.5": folder: all "6.27.3": folder: all "6.20.3": folder: all - "8.8.1": - folder: all diff --git a/recipes/rotor/all/conandata.yml b/recipes/rotor/all/conandata.yml index 1b4efa7d91b72..216ceff141b71 100644 --- a/recipes/rotor/all/conandata.yml +++ b/recipes/rotor/all/conandata.yml @@ -1,19 +1,25 @@ sources: - "0.21": - url: "https://github.com/basiliscos/cpp-rotor/archive/refs/tags/v0.21.tar.gz" - sha256: "1a5bc1919fe1052c8ad148707708b19fad903ff3db33015710cfb4f89baab8fa" - "0.23": - url: "https://github.com/basiliscos/cpp-rotor/archive/refs/tags/v0.23.tar.gz" - sha256: "8f89f9d0a561ab7cc90253cc761d8b5a78887c99ef488e75ae4c49abb44ddac4" - "0.24": - url: "https://github.com/basiliscos/cpp-rotor/archive/refs/tags/v0.24.tar.gz" - sha256: "3a360d6ce7c743b740b9c6c4063493f67298690fc51e29efa19811bb3d11fa86" - "0.25": - url: "https://github.com/basiliscos/cpp-rotor/archive/refs/tags/v0.25.tar.gz" - sha256: "b1de95937adb8d7a9beb93bc4956d8e28ff64a6c0a898e7ce12b22a224bb8f6f" - "0.28": - url: "https://github.com/basiliscos/cpp-rotor/archive/refs/tags/v0.28.tar.gz" - sha256: "9fc7d1721379adca228ca45d0240b5a0060c993de984f0288c9e4b9cf667b971" + "0.31": + url: "https://github.com/basiliscos/cpp-rotor/archive/refs/tags/v0.31.tar.gz" + sha256: "c8d9b28083c7a9c32af2cbff1d90fe1e62def989f0f89baba1244c44fb8ec9e4" + "0.30": + url: "https://github.com/basiliscos/cpp-rotor/archive/refs/tags/v0.30.tar.gz" + sha256: "d143bfce1d18d42ab0f072acfe239d1cc07a495411537579e02260673cbe8121" "0.29": url: "https://github.com/basiliscos/cpp-rotor/archive/refs/tags/v0.29.tar.gz" sha256: "e17e25f2d6402389e8fde07a158ca952b815666f0a2b5e07748dfc062834c522" + "0.28": + url: "https://github.com/basiliscos/cpp-rotor/archive/refs/tags/v0.28.tar.gz" + sha256: "9fc7d1721379adca228ca45d0240b5a0060c993de984f0288c9e4b9cf667b971" + "0.25": + url: "https://github.com/basiliscos/cpp-rotor/archive/refs/tags/v0.25.tar.gz" + sha256: "b1de95937adb8d7a9beb93bc4956d8e28ff64a6c0a898e7ce12b22a224bb8f6f" + "0.24": + url: "https://github.com/basiliscos/cpp-rotor/archive/refs/tags/v0.24.tar.gz" + sha256: "3a360d6ce7c743b740b9c6c4063493f67298690fc51e29efa19811bb3d11fa86" + "0.23": + url: "https://github.com/basiliscos/cpp-rotor/archive/refs/tags/v0.23.tar.gz" + sha256: "8f89f9d0a561ab7cc90253cc761d8b5a78887c99ef488e75ae4c49abb44ddac4" + "0.21": + url: "https://github.com/basiliscos/cpp-rotor/archive/refs/tags/v0.21.tar.gz" + sha256: "1a5bc1919fe1052c8ad148707708b19fad903ff3db33015710cfb4f89baab8fa" diff --git a/recipes/rotor/all/conanfile.py b/recipes/rotor/all/conanfile.py index ab2f66e84b836..e7aca39a8475a 100644 --- a/recipes/rotor/all/conanfile.py +++ b/recipes/rotor/all/conanfile.py @@ -24,6 +24,7 @@ class RotorConan(ConanFile): "enable_thread": [True, False], "multithreading": [True, False], # enables multithreading support "enable_ev": [True, False], + "enable_fltk": [True, False], } default_options = { "fPIC": True, @@ -32,6 +33,7 @@ class RotorConan(ConanFile): "enable_thread": False, "multithreading": True, "enable_ev": False, + "enable_fltk": False, } @property @@ -56,6 +58,8 @@ def config_options(self): del self.options.fPIC if Version(self.version) < "0.26": del self.options.enable_ev + if Version(self.version) < "0.30": + del self.options.enable_fltk def configure(self): if self.options.shared: @@ -65,6 +69,8 @@ def requirements(self): self.requires("boost/1.84.0", transitive_headers=True) if self.options.get_safe("enable_ev", False): self.requires("libev/4.33") + if self.options.get_safe("enable_fltk", False): + self.requires("fltk/1.3.9") def layout(self): cmake_layout(self, src_folder="src") @@ -77,6 +83,8 @@ def generate(self): tc.variables["BUILD_TESTING"] = False if Version(self.version) >= "0.26": tc.variables["BUILD_EV"] = self.options.enable_ev + if Version(self.version) >= "0.30": + tc.variables["BUILD_FLTK"] = self.options.enable_fltk tc.generate() tc = CMakeDeps(self) tc.generate() @@ -126,3 +134,10 @@ def package_info(self): if self.options.get_safe("enable_ev", False): self.cpp_info.components["ev"].libs = ["rotor_ev"] self.cpp_info.components["ev"].requires = ["core", "libev::libev"] + + if self.options.get_safe("enable_fltk", False): + self.cpp_info.components["fltk"].libs = ["rotor_fltk"] + self.cpp_info.components["fltk"].requires = ["core", "fltk::fltk"] + + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.components["core"].system_libs.append("m") diff --git a/recipes/rotor/config.yml b/recipes/rotor/config.yml index b66cf5d118ce8..b97b8fdf6c94f 100644 --- a/recipes/rotor/config.yml +++ b/recipes/rotor/config.yml @@ -1,13 +1,17 @@ versions: - "0.21": + "0.31": folder: all - "0.23": + "0.30": folder: all - "0.24": + "0.29": + folder: all + "0.28": folder: all "0.25": folder: all - "0.28": + "0.24": folder: all - "0.29": + "0.23": + folder: all + "0.21": folder: all diff --git a/recipes/s2let/all/CMakeLists.txt b/recipes/s2let/all/CMakeLists.txt deleted file mode 100644 index 0496b29838549..0000000000000 --- a/recipes/s2let/all/CMakeLists.txt +++ /dev/null @@ -1,7 +0,0 @@ -cmake_minimum_required(VERSION 3.0) -project(cmake_wrapper) - -include(conanbuildinfo.cmake) -conan_basic_setup() - -add_subdirectory(source_subfolder) diff --git a/recipes/s2let/all/conandata.yml b/recipes/s2let/all/conandata.yml index 93e1e80ecc199..9a04386d3631c 100644 --- a/recipes/s2let/all/conandata.yml +++ b/recipes/s2let/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.2.6": + url: "https://github.com/astro-informatics/s2let/archive/v2.2.6.tar.gz" + sha256: "0ce214e110305fdd3729875add515ca00c23dde3329af43d1fff763514607381" "2.2.3": url: "https://github.com/astro-informatics/s2let/archive/refs/tags/v2.2.3.tar.gz" sha256: "1321e1bc96ba200e4cd4056843cd4075de1c05be20e64185f065f48b9cefe3f8" diff --git a/recipes/s2let/all/conanfile.py b/recipes/s2let/all/conanfile.py index 1fc2aa8dc0cd5..a68602d8d89c3 100644 --- a/recipes/s2let/all/conanfile.py +++ b/recipes/s2let/all/conanfile.py @@ -1,17 +1,24 @@ -from conans import CMake, ConanFile, tools -from conans.errors import ConanInvalidConfiguration +import os -required_conan_version = ">=1.33.0" +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.files import copy, get, rm +from conan.tools.microsoft import is_msvc + +required_conan_version = ">=1.53.0" class S2let(ConanFile): name = "s2let" + description = "Fast wavelets on the sphere" license = "GPL-3.0-or-later" url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/astro-informatics/s2let" - description = "Fast wavelets on the sphere" - settings = "os", "arch", "compiler", "build_type" topics = ("physics", "astrophysics", "radio interferometry") + + package_type = "static-library" + settings = "os", "arch", "compiler", "build_type" options = { "fPIC": [True, False], "with_cfitsio": [True, False], @@ -20,62 +27,50 @@ class S2let(ConanFile): "fPIC": True, "with_cfitsio": False, } - generators = "cmake", "cmake_find_package" - exports_sources = ["CMakeLists.txt"] - - @property - def _source_subfolder(self): - return "source_subfolder" - - @property - def _build_subfolder(self): - return "build_subfolder" def config_options(self): if self.settings.os == "Windows": del self.options.fPIC def configure(self): - del self.settings.compiler.cppstd - del self.settings.compiler.libcxx + self.settings.rm_safe("compiler.cppstd") + self.settings.rm_safe("compiler.libcxx") + + def layout(self): + cmake_layout(self, src_folder="src") def requirements(self): - self.requires("astro-informatics-so3/1.3.4") + self.requires("astro-informatics-so3/1.3.6", transitive_headers=True, transitive_libs=True) if self.options.with_cfitsio: - self.requires("cfitsio/3.490") + self.requires("cfitsio/4.3.1") def validate(self): - if self.settings.compiler == "Visual Studio": - raise ConanInvalidConfiguration( - "S2LET requires C99 support for complex numbers." - ) + if is_msvc(self): + raise ConanInvalidConfiguration("S2LET requires C99 support for complex numbers.") def source(self): - tools.get( - **self.conan_data["sources"][self.version], - strip_root=True, - destination=self._source_subfolder - ) + get(self, **self.conan_data["sources"][self.version], strip_root=True) - @property - def _cmake(self): - if not hasattr(self, "_cmake_instance"): - self._cmake_instance = CMake(self) - self._cmake_instance.definitions["BUILD_TESTING"] = False - self._cmake_instance.definitions["cfitsio"] = self.options.with_cfitsio - self._cmake_instance.configure(build_folder=self._build_subfolder) - return self._cmake_instance + def generate(self): + tc = CMakeToolchain(self) + tc.variables["BUILD_TESTING"] = False + tc.variables["cfitsio"] = self.options.with_cfitsio + tc.generate() + tc = CMakeDeps(self) + tc.generate() def build(self): - self._cmake.build() + cmake = CMake(self) + cmake.configure() + cmake.build() def package(self): - self.copy("LICENSE", dst="licenses", src=self._source_subfolder) - self._cmake.install() + copy(self, "LICENSE", self.source_folder, os.path.join(self.package_folder, "licenses")) + cmake = CMake(self) + cmake.install() + rm(self, "*.cmake", self.package_folder, recursive=True) def package_info(self): - self.cpp_info.names["cmake_find_package"] = "s2let" - self.cpp_info.names["cmake_find_package_multi"] = "s2let" self.cpp_info.libs = ["s2let"] - if self.settings.os == "Linux": + if self.settings.os in ["Linux", "FreeBSD"]: self.cpp_info.system_libs = ["m"] diff --git a/recipes/s2let/all/test_package/CMakeLists.txt b/recipes/s2let/all/test_package/CMakeLists.txt index 87839a22ea4e7..d0ee79e2b9187 100644 --- a/recipes/s2let/all/test_package/CMakeLists.txt +++ b/recipes/s2let/all/test_package/CMakeLists.txt @@ -1,10 +1,7 @@ -cmake_minimum_required(VERSION 3.8) +cmake_minimum_required(VERSION 3.15) project(test_package C) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) - -find_package(s2let REQUIRED NO_MODULE) +find_package(s2let REQUIRED CONFIG) add_executable(${PROJECT_NAME} example.c) target_compile_features(${PROJECT_NAME} PUBLIC c_std_99) diff --git a/recipes/s2let/all/test_package/conanfile.py b/recipes/s2let/all/test_package/conanfile.py index abcaeed3f89b6..ef5d7042163ec 100644 --- a/recipes/s2let/all/test_package/conanfile.py +++ b/recipes/s2let/all/test_package/conanfile.py @@ -1,10 +1,19 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake import os -from conans import ConanFile, CMake, tools class TestPackageConan(ConanFile): - settings = "os", "compiler", "build_type", "arch" - generators = "cmake", "cmake_find_package_multi" + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) def build(self): cmake = CMake(self) @@ -12,6 +21,6 @@ def build(self): cmake.build() def test(self): - if not tools.cross_building(self.settings): - bin_path = os.path.join("bin", "test_package") - self.run(bin_path, run_environment=True) + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/s2let/all/test_v1_package/CMakeLists.txt b/recipes/s2let/all/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..91630d79f4abb --- /dev/null +++ b/recipes/s2let/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/s2let/all/test_v1_package/conanfile.py b/recipes/s2let/all/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..abcaeed3f89b6 --- /dev/null +++ b/recipes/s2let/all/test_v1_package/conanfile.py @@ -0,0 +1,17 @@ +import os +from conans import ConanFile, CMake, tools + + +class TestPackageConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake", "cmake_find_package_multi" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if not tools.cross_building(self.settings): + bin_path = os.path.join("bin", "test_package") + self.run(bin_path, run_environment=True) diff --git a/recipes/s2let/config.yml b/recipes/s2let/config.yml index a0d8538280848..880dc7c80ba70 100644 --- a/recipes/s2let/config.yml +++ b/recipes/s2let/config.yml @@ -1,3 +1,5 @@ versions: + "2.2.6": + folder: all "2.2.3": folder: all diff --git a/recipes/s2n/all/conandata.yml b/recipes/s2n/all/conandata.yml index 23e77bed0050e..15f9995438330 100644 --- a/recipes/s2n/all/conandata.yml +++ b/recipes/s2n/all/conandata.yml @@ -1,48 +1,28 @@ sources: - "1.4.1": - url: "https://github.com/aws/s2n-tls/archive/refs/tags/v1.4.1.tar.gz" - sha256: "d8c1d8e1142441412434feacb4947ce6430a244dcd8f58921af79b29bd901731" - "1.4.0": - url: "https://github.com/aws/s2n-tls/archive/refs/tags/v1.4.0.tar.gz" - sha256: "3f786cb2f35e0551e120e1747e7b510a8228cd852073afa241313939672046cb" - "1.3.56": - url: "https://github.com/aws/s2n-tls/archive/refs/tags/v1.3.56.tar.gz" - sha256: "5d7bab81357a564453bc453469b4ae02936f1f35225ad297b8d846d2ecdda521" - "1.3.55": - url: "https://github.com/aws/s2n-tls/archive/refs/tags/v1.3.55.tar.gz" - sha256: "3b4d51d08326757440a7a134dd4d73c904b700d64837aa7fec0aca908b70fd9b" - "1.3.52": - url: "https://github.com/aws/s2n-tls/archive/refs/tags/v1.3.52.tar.gz" - sha256: "c8ae02ae427763dcffe10d211ed7a2433803affd9aa5836951ef972c53db0120" - "1.3.50": - url: "https://github.com/aws/s2n-tls/archive/refs/tags/v1.3.50.tar.gz" - sha256: "19c9a7e9e0ce14aae3fc0c55995759f4eadd5b55f5353de69f82c62ccb3693f8" - "1.3.49": - url: "https://github.com/aws/s2n-tls/archive/refs/tags/v1.3.49.tar.gz" - sha256: "2bc7b170a750a435ad02ab8e696c3ad6e9bb7a585c02899472793f87670184dd" - "1.3.31": - url: "https://github.com/aws/s2n-tls/archive/v1.3.31.tar.gz" - sha256: "23cfb42f82cbe1ce94b59f3b1c1c8eb9d24af2a1ae4c8f854209ff88fddd3900" + "1.5.7": + url: "https://github.com/aws/s2n-tls/archive/refs/tags/v1.5.7.tar.gz" + sha256: "c30b97c8bcccc0557331dd1a043010a70984c9cff11b0bbd769651db68f8b91d" + "1.5.6": + url: "https://github.com/aws/s2n-tls/archive/refs/tags/v1.5.6.tar.gz" + sha256: "85602d0ad672cb233052504624dec23b47fc6d324bb82bd6eaff13b8f652dec3" + "1.5.5": + url: "https://github.com/aws/s2n-tls/archive/refs/tags/v1.5.5.tar.gz" + sha256: "6316e1ad2c8ef5807519758bb159d314b9fef31d79ae27bc8f809104b978bb04" + "1.5.3": + url: "https://github.com/aws/s2n-tls/archive/refs/tags/v1.5.3.tar.gz" + sha256: "609d4ab5747e592a8749f2db7ff6422ea2e0aff3d2790b6d36defe276f422a71" + "1.5.2": + url: "https://github.com/aws/s2n-tls/archive/refs/tags/v1.5.2.tar.gz" + sha256: "896d9f8f8e9bd2fdcb9a21b18aede4f7afc65bde279afabc60abf97fa5069dd1" + "1.5.1": + url: "https://github.com/aws/s2n-tls/archive/refs/tags/v1.5.1.tar.gz" + sha256: "d79710d6ef089097a3b84fc1e5cec2f08d1ec46e93b1d400df59fcfc859e15a3" + "1.5.0": + url: "https://github.com/aws/s2n-tls/archive/refs/tags/v1.5.0.tar.gz" + sha256: "5e86d97d8f24653ef3dff3abe6165169f0ba59cdf52b5264987125bba070174d" + "1.4.16": + url: "https://github.com/aws/s2n-tls/archive/refs/tags/v1.4.16.tar.gz" + sha256: "84fdbaa894c722bf13cac87b8579f494c1c2d66de642e5e6104638fddea76ad9" "1.3.15": url: "https://github.com/aws/s2n-tls/archive/v1.3.15.tar.gz" sha256: "e3fc3405bb56334cbec90c35cbdf0e8a0f53199749a3f4b8fddb8d8a41e6db8b" - "1.3.9": - url: "https://github.com/aws/s2n-tls/archive/refs/tags/v1.3.9.tar.gz" - sha256: "09f03600d45cac99b8495f9c7aa5f70a83b5c02867a3018a1ba9975d53184658" - "1.2.0": - url: "https://github.com/aws/s2n-tls/archive/refs/tags/v1.2.0.tar.gz" - sha256: "90c1b5f4ac2c46774c8f100cac4f2a951715ae0bf2661799b9aaa891e6fb1f30" - "1.1.1": - url: "https://github.com/aws/s2n-tls/archive/refs/tags/v1.1.1.tar.gz" - sha256: "a17ef1e55b0a6c3d422b8b857bcfd26af7d2f8b33628a540854a6c17b8bed4d8" - "1.1.0": - url: "https://github.com/aws/s2n-tls/archive/refs/tags/v1.1.0.tar.gz" - sha256: "e094fd1f2044cfaeedb534ef1d7e4fd8745d8c07a247ce383cd8a6a5288e195c" - "1.0.11": - url: "https://github.com/aws/s2n-tls/archive/refs/tags/v1.0.11.tar.gz" - sha256: "dbe886cf8cd6658cce571cdaba81e9a93d8c914fd1eba0d3233fec64ed53224b" -patches: - "1.1.0": - - patch_file: "patches/1.1.0/001-try-compile.patch" - "1.0.11": - - patch_file: "patches/1.0.11/001-try-compile.patch" diff --git a/recipes/s2n/all/conanfile.py b/recipes/s2n/all/conanfile.py index 34d4cbcae2b9f..6fc1e08a65355 100644 --- a/recipes/s2n/all/conanfile.py +++ b/recipes/s2n/all/conanfile.py @@ -1,7 +1,7 @@ from conan import ConanFile from conan.errors import ConanInvalidConfiguration from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout -from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rmdir, save +from conan.tools.files import copy, get, rmdir, save import os import textwrap @@ -11,10 +11,10 @@ class S2nConan(ConanFile): name = "s2n" description = "An implementation of the TLS/SSL protocols" - topics = ("aws", "amazon", "cloud", ) + license = "Apache-2.0" url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/aws/s2n-tls" - license = "Apache-2.0" + topics = ("aws", "amazon", "cloud", ) package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { @@ -28,7 +28,6 @@ class S2nConan(ConanFile): def export_sources(self): copy(self, "CMakeLists.txt", src=self.recipe_folder, dst=self.export_sources_folder) - export_conandata_patches(self) def configure(self): if self.options.shared: @@ -59,7 +58,6 @@ def generate(self): deps.generate() def build(self): - apply_conandata_patches(self) cmake = CMake(self) cmake.configure(build_script_folder=os.path.join(self.source_folder, os.pardir)) cmake.build() diff --git a/recipes/s2n/config.yml b/recipes/s2n/config.yml index 516ed15f07d2b..32caa1c5d08da 100644 --- a/recipes/s2n/config.yml +++ b/recipes/s2n/config.yml @@ -1,29 +1,21 @@ versions: - "1.4.1": + "1.5.7": folder: all - "1.4.0": + "1.5.6": folder: all - "1.3.56": + "1.5.5": folder: all - "1.3.55": + "1.5.3": folder: all - "1.3.52": + "1.5.2": folder: all - "1.3.50": + "1.5.1": folder: all - "1.3.49": + "1.5.0": folder: all - "1.3.31": + # keep 1.4.16 for aws-sdk-cpp, aws-c-io + "1.4.16": folder: all + # keep 1.3.15 for aws-sdk-cpp, aws-c-io "1.3.15": folder: all - "1.3.9": - folder: all - "1.2.0": - folder: all - "1.1.1": - folder: all - "1.1.0": - folder: all - "1.0.11": - folder: all diff --git a/recipes/safe/all/conandata.yml b/recipes/safe/all/conandata.yml index 31c393ec6520f..fb5bd5ef42e56 100644 --- a/recipes/safe/all/conandata.yml +++ b/recipes/safe/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.0.0": + url: "https://github.com/LouisCharlesC/safe/archive/v2.0.0.tar.gz" + sha256: "1684c61212d01d1b20db77d17ddd795badc7c1b9feb06ef93ef453c6cb4a1642" "1.1.1": url: "https://github.com/LouisCharlesC/safe/archive/v1.1.1.tar.gz" sha256: "A6E161EAFC32AA522CD2CE1A5F95A3DF963C51263053089FC8F7A9765D054F00" diff --git a/recipes/safe/config.yml b/recipes/safe/config.yml index 60d31991f5141..eb4c9584b610a 100644 --- a/recipes/safe/config.yml +++ b/recipes/safe/config.yml @@ -1,3 +1,5 @@ versions: + "2.0.0": + folder: all "1.1.1": folder: all diff --git a/recipes/sail/all/conandata.yml b/recipes/sail/all/conandata.yml index 999f5e67c9331..028d8d21524f6 100644 --- a/recipes/sail/all/conandata.yml +++ b/recipes/sail/all/conandata.yml @@ -1,4 +1,13 @@ sources: + "0.9.6": + url: "https://github.com/HappySeaFox/sail/archive/v0.9.6.tar.gz" + sha256: "4e46b1a5cd0e23f78fbeef085340779c9d4a7d5dd731ffd1df8fdfb343befbc4" + "0.9.5": + url: "https://github.com/HappySeaFox/sail/archive/v0.9.5.tar.gz" + sha256: "28c601c0399be1940710afc150b5836f8b3f5f6a35b98d7ac1467e62bc568e20" + "0.9.4": + url: "https://github.com/HappySeaFox/sail/archive/v0.9.4.tar.gz" + sha256: "9a8b93c15c4a1afe07c760d2087895a18626034f55917f333aaabe9c9704438f" "0.9.1": url: "https://github.com/HappySeaFox/sail/archive/v0.9.1.tar.gz" sha256: "d02ce889b70d9e237b64806df26b044753e3edf3e87c8af42c32ec9968133a88" diff --git a/recipes/sail/all/conanfile.py b/recipes/sail/all/conanfile.py index 7651e9b295a4e..8afbd6f8c8980 100644 --- a/recipes/sail/all/conanfile.py +++ b/recipes/sail/all/conanfile.py @@ -1,6 +1,6 @@ from conan import ConanFile from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout -from conan.tools.files import apply_conandata_patches, export_conandata_patches, copy, get, rename, rmdir +from conan.tools.files import copy, get, rename, rmdir from conan.tools.microsoft import is_msvc from conan.tools.scm import Version import os @@ -9,6 +9,7 @@ class SAILConan(ConanFile): name = "sail" + package_type = "library" description = "The missing small and fast image decoding library for humans (not for machines)" url = "https://github.com/conan-io/conan-center-index" homepage = "https://sail.software" @@ -43,9 +44,6 @@ class SAILConan(ConanFile): "with_lowest_priority_codecs": "Enable codecs: WAL, XBM", } - def export_sources(self): - export_conandata_patches(self) - def config_options(self): if self.settings.os == "Windows": self.options.rm_safe("fPIC") @@ -56,7 +54,7 @@ def configure(self): def requirements(self): if self.options.with_highest_priority_codecs: - self.requires("giflib/5.2.1") + self.requires("giflib/5.2.2") self.requires("libjpeg/9e") self.requires("libpng/[>=1.6 <2]") self.requires("libtiff/4.6.0") @@ -64,12 +62,9 @@ def requirements(self): if Version(self.version) >= "0.9.1": self.requires("nanosvg/cci.20231025") if self.options.with_medium_priority_codecs: - self.requires("libavif/1.0.3") - self.requires("jasper/4.1.1") - # TODO Re-enable JPEG XL after merging either of the following: - # - https://github.com/conan-io/conan-center-index/pull/13898 - # - https://github.com/conan-io/conan-center-index/pull/18812 - # self.requires("libjxl/0.6.1") + self.requires("libavif/1.0.4") + self.requires("jasper/4.2.0") + self.requires("libjxl/0.8.2") self.requires("libwebp/1.3.2") def layout(self): @@ -100,25 +95,19 @@ def generate(self): tc.variables["SAIL_COMBINE_CODECS"] = True tc.variables["SAIL_ENABLE_OPENMP"] = False tc.variables["SAIL_ONLY_CODECS"] = ";".join(only_codecs) - # JPEGXL needs porting to Conan2 # SVG with nanosvg is supported in >= 0.9.1 - if Version(self.version) >= "0.9.1": - tc.variables["SAIL_DISABLE_CODECS"] = "jpegxl" - else: - tc.variables["SAIL_DISABLE_CODECS"] = "jpegxl;svg" + if Version(self.version) < "0.9.1": + tc.variables["SAIL_DISABLE_CODECS"] = "svg" tc.variables["SAIL_INSTALL_PDB"] = False tc.variables["SAIL_THREAD_SAFE"] = self.options.thread_safe # TODO: Remove after fixing https://github.com/conan-io/conan/issues/12012 - if is_msvc(self): - tc.cache_variables["CMAKE_TRY_COMPILE_CONFIGURATION"] = str(self.settings.build_type) + tc.cache_variables["CMAKE_TRY_COMPILE_CONFIGURATION"] = str(self.settings.build_type) tc.generate() deps = CMakeDeps(self) deps.generate() def build(self): - apply_conandata_patches(self) - cmake = CMake(self) cmake.configure() cmake.build() @@ -169,7 +158,7 @@ def package_info(self): if self.options.with_medium_priority_codecs: self.cpp_info.components["sail-codecs"].requires.append("libavif::libavif") self.cpp_info.components["sail-codecs"].requires.append("jasper::jasper") - # self.cpp_info.components["sail-codecs"].requires.append("libjxl::libjxl") + self.cpp_info.components["sail-codecs"].requires.append("libjxl::libjxl") self.cpp_info.components["sail-codecs"].requires.append("libwebp::libwebp") self.cpp_info.components["libsail"].set_property("cmake_target_name", "SAIL::Sail") diff --git a/recipes/sail/all/test_package/CMakeLists.txt b/recipes/sail/all/test_package/CMakeLists.txt index 79614592c76dc..cb86fe79928de 100644 --- a/recipes/sail/all/test_package/CMakeLists.txt +++ b/recipes/sail/all/test_package/CMakeLists.txt @@ -11,10 +11,8 @@ find_package(Sail REQUIRED CONFIG) # C API add_executable(test_package_c test_package.c) -target_compile_definitions(test_package_c PRIVATE SAIL_DEMO_FILE_PATH="${CMAKE_CURRENT_SOURCE_DIR}/bmp.bmp") target_link_libraries(test_package_c PRIVATE SAIL::Sail) # C++ API add_executable(test_package_cxx test_package.cpp) -target_compile_definitions(test_package_cxx PRIVATE SAIL_DEMO_FILE_PATH="${CMAKE_CURRENT_SOURCE_DIR}/bmp.bmp") target_link_libraries(test_package_cxx PRIVATE SAIL::SailC++) diff --git a/recipes/sail/all/test_package/bmp.bmp b/recipes/sail/all/test_package/bmp.bmp deleted file mode 100644 index 74d4973a3b13c..0000000000000 Binary files a/recipes/sail/all/test_package/bmp.bmp and /dev/null differ diff --git a/recipes/sail/all/test_package/conanfile.py b/recipes/sail/all/test_package/conanfile.py index 00e3064a021c0..fb321506e5e83 100644 --- a/recipes/sail/all/test_package/conanfile.py +++ b/recipes/sail/all/test_package/conanfile.py @@ -3,6 +3,7 @@ from conan.tools.cmake import CMake, cmake_layout import os + class TestPackageConan(ConanFile): settings = "os", "compiler", "build_type", "arch" generators = "CMakeToolchain", "CMakeDeps", "VirtualRunEnv" diff --git a/recipes/sail/all/test_package/test_package.c b/recipes/sail/all/test_package/test_package.c index eba9d786722c4..59c23fda941fb 100644 --- a/recipes/sail/all/test_package/test_package.c +++ b/recipes/sail/all/test_package/test_package.c @@ -1,26 +1,9 @@ #include - +#include #include -int main(int argc, char *argv[]) -{ - (void)argc; - (void)argv; - +int main() { struct sail_image *image; - - SAIL_TRY_OR_EXECUTE(sail_load_from_file(SAIL_DEMO_FILE_PATH, &image), - /* on error */ return 1); - - printf("Size: %ux%u, bytes per line: %u, " - "pixel format: %s, pixels: %p\n", - image->width, - image->height, - image->bytes_per_line, - sail_pixel_format_to_string(image->pixel_format), - image->pixels); - - sail_destroy_image(image); - - return 0; + sail_status_t status = sail_load_from_file("binary-file.bmp", &image); + printf("Error - file not found generate: status %d\n", status); } diff --git a/recipes/sail/all/test_package/test_package.cpp b/recipes/sail/all/test_package/test_package.cpp index efad1f9a8c2e3..918cafc9fb33d 100644 --- a/recipes/sail/all/test_package/test_package.cpp +++ b/recipes/sail/all/test_package/test_package.cpp @@ -4,25 +4,13 @@ int main(int argc, char *argv[]) { - (void)argc; - (void)argv; - - const sail::image image(SAIL_DEMO_FILE_PATH); - - if (!image.is_valid()) { - return 1; + const char* filename = "my-binary.bmp"; + try { + const sail::image image(filename); + std::cout << "Size: " << image.width() << std::endl; // Never reached + } catch (const std::exception& e) { + std::cerr << "Error - file not found generate: " << e.what() << std::endl; } - std::cout - << "Size: " - << image.width() << 'x' << image.height() - << ", bytes per line: " - << image.bytes_per_line() - << ", pixel format: " - << sail::image::pixel_format_to_string(image.pixel_format()) - << ", pixels: " - << image.pixels() - << std::endl; - return 0; } diff --git a/recipes/sail/all/test_v1_package/bmp.bmp b/recipes/sail/all/test_v1_package/bmp.bmp deleted file mode 100644 index 74d4973a3b13c..0000000000000 Binary files a/recipes/sail/all/test_v1_package/bmp.bmp and /dev/null differ diff --git a/recipes/sail/config.yml b/recipes/sail/config.yml index 4f3643b98f32b..750e4f96fe594 100644 --- a/recipes/sail/config.yml +++ b/recipes/sail/config.yml @@ -1,4 +1,10 @@ versions: + "0.9.6": + folder: all + "0.9.5": + folder: all + "0.9.4": + folder: all "0.9.1": folder: all "0.9.0": diff --git a/recipes/samurai/all/conandata.yml b/recipes/samurai/all/conandata.yml index b4ff07102a673..39739edcf25df 100644 --- a/recipes/samurai/all/conandata.yml +++ b/recipes/samurai/all/conandata.yml @@ -1,4 +1,10 @@ sources: + "0.16.0": + url: "https://github.com/hpc-maths/samurai/archive/v0.16.0.tar.gz" + sha256: "61616de42557e5cd5e9483103fd640f94f3235354e42a22a0ec76520196059a5" + "0.13.0": + url: "https://github.com/hpc-maths/samurai/archive/v0.13.0.tar.gz" + sha256: "f38e379218b1206fc5c5e157ee5e80687721a896f70b892623d9f30280529448" "0.9.0": url: "https://github.com/hpc-maths/samurai/archive/v0.9.0.tar.gz" sha256: "49f94a7451b1b50cab335a62e294e612fea27cbf5b131827eb69a8e228ad8010" diff --git a/recipes/samurai/all/conanfile.py b/recipes/samurai/all/conanfile.py index 9bbf83edd6985..3667d0c5edfed 100644 --- a/recipes/samurai/all/conanfile.py +++ b/recipes/samurai/all/conanfile.py @@ -43,8 +43,8 @@ def requirements(self): self.requires("fmt/10.1.1") self.requires("highfive/2.7.1") self.requires("pugixml/1.14") - self.requires("xsimd/11.1.0") - self.requires("xtensor/0.24.6") + self.requires("xsimd/13.0.0") + self.requires("xtensor/0.24.7") def package_id(self): self.info.clear() diff --git a/recipes/samurai/config.yml b/recipes/samurai/config.yml index b54c9224b6c19..87628f14bd6dd 100644 --- a/recipes/samurai/config.yml +++ b/recipes/samurai/config.yml @@ -1,4 +1,8 @@ versions: + "0.16.0": + folder: all + "0.13.0": + folder: all "0.9.0": folder: all "0.8.0": diff --git a/recipes/sbepp/all/conandata.yml b/recipes/sbepp/all/conandata.yml index 2993d854f596e..7006e2b3c44d3 100644 --- a/recipes/sbepp/all/conandata.yml +++ b/recipes/sbepp/all/conandata.yml @@ -1,4 +1,16 @@ sources: + "1.4.2": + url: "https://github.com/OleksandrKvl/sbepp/archive/refs/tags/1.4.2.tar.gz" + sha256: "4af544262cd447f0fad45db850ab82b3318ff75e47dbdbdd5150437ca7d523c5" + "1.4.1": + url: "https://github.com/OleksandrKvl/sbepp/archive/refs/tags/1.4.1.tar.gz" + sha256: "1e5913372e3f4871a7aa3d8ac94759cdcc9df61a3865ce99944f74cc0672795d" + "1.4.0": + url: "https://github.com/OleksandrKvl/sbepp/archive/refs/tags/1.4.0.tar.gz" + sha256: "64112ed22d6c82debc70a4c097f3fcd05a4bd280dca7e2013edbd6bebfd1da56" + "1.3.0": + url: "https://github.com/OleksandrKvl/sbepp/archive/refs/tags/1.3.0.tar.gz" + sha256: "44caa61681c7f94c840a2f2a247a0385e9e61c6e8639b9f7561c9d62125f9486" "1.2.0": url: "https://github.com/OleksandrKvl/sbepp/archive/refs/tags/1.2.0.tar.gz" sha256: "068cb8bc940316f8817af8da5c8de577ab49281308b2125c30f2f4e00431a68a" diff --git a/recipes/sbepp/config.yml b/recipes/sbepp/config.yml index be97eb7c8428b..548ae00c17fa2 100644 --- a/recipes/sbepp/config.yml +++ b/recipes/sbepp/config.yml @@ -1,4 +1,12 @@ versions: + "1.4.2": + folder: all + "1.4.1": + folder: all + "1.4.0": + folder: all + "1.3.0": + folder: all "1.2.0": folder: all "1.1.0": diff --git a/recipes/scc/all/CMakeLists.txt b/recipes/scc/all/CMakeLists.txt deleted file mode 100644 index 19bdb7e7f5fb7..0000000000000 --- a/recipes/scc/all/CMakeLists.txt +++ /dev/null @@ -1,7 +0,0 @@ -cmake_minimum_required(VERSION 3.1) -project(scc C) - -include(conanbuildinfo.cmake) -conan_basic_setup(TARGETS KEEP_RPATHS) - -add_subdirectory(source_subfolder) diff --git a/recipes/scc/all/conandata.yml b/recipes/scc/all/conandata.yml index bd7433056072d..a492e239a4b1c 100644 --- a/recipes/scc/all/conandata.yml +++ b/recipes/scc/all/conandata.yml @@ -1,4 +1,13 @@ sources: - "2022.08": - url: "https://github.com/Minres/SystemC-Components/releases/download/2022.08/systemc-components.tar.gz" - sha256: "825dfc38e7b00df34330f01ba38f5913e1a88c5002344e433b972faf0e6c4501" + "2023.06": + url: "https://github.com/Minres/SystemC-Components/releases/download/2023.06/SCC-2023.06-full.tar.gz" + sha256: "6d1a842f474daa512030d61526e83182f9289b977a3a7cb88ed151050c33c4e9" +patches: + "2023.06": + - patch_file: "patches/2023.06-fix-conan-targets.patch" + patch_description: "add find_package()-s and disable automatic Conan setup" + patch_type: "conan" + - patch_file: "patches/2023.06-add-fmt-10-support.patch" + patch_description: "fix incompatibility with fmt 10.x and newer" + patch_type: "portability" + patch_source: "https://github.com/Minres/SystemC-Components/pull/51" diff --git a/recipes/scc/all/conanfile.py b/recipes/scc/all/conanfile.py index c95474718f1dd..5f82f6e023588 100644 --- a/recipes/scc/all/conanfile.py +++ b/recipes/scc/all/conanfile.py @@ -1,89 +1,166 @@ +import os + from conan import ConanFile -from conan.tools.scm import Version -from conan.tools.files import get -from conans import tools, CMake from conan.errors import ConanInvalidConfiguration -import functools +from conan.tools.apple import is_apple_os +from conan.tools.build import check_min_cppstd +from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout, CMakeDeps +from conan.tools.files import copy, get, export_conandata_patches, apply_conandata_patches, replace_in_file, rmdir +from conan.tools.microsoft import is_msvc +from conan.tools.scm import Version + +required_conan_version = ">=1.53.0" -required_conan_version = ">=1.50.0" class SystemcComponentsConan(ConanFile): name = "scc" - description = """A light weight productivity library for SystemC and TLM 2.0""" - homepage = "https://minres.github.io/SystemC-Components" - url = "https://github.com/conan-io/conan-center-index" + description = "A light-weight productivity library for SystemC and TLM 2.0" license = "Apache-2.0" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://minres.github.io/SystemC-Components" topics = ("systemc", "modeling", "tlm", "scc") - settings = "os", "compiler", "build_type", "arch" + + package_type = "static-library" + settings = "os", "arch", "compiler", "build_type" options = { "fPIC": [True, False], "enable_phase_callbacks": [True, False], - "enable_phase_callbacks_tracing": [True, False] + "enable_phase_callbacks_tracing": [True, False], } default_options = { "fPIC": True, "enable_phase_callbacks": False, - "enable_phase_callbacks_tracing": False + "enable_phase_callbacks_tracing": False, } - generators = "cmake" - - @property - def _source_subfolder(self): - return "source_subfolder" - @property - def _build_subfolder(self): - return "build_subfolder" - - # no exports_sources attribute, but export_sources(self) method instead - # this allows finer grain exportation of patches per version def export_sources(self): - self.copy("CMakeLists.txt") - + export_conandata_patches(self) + def config_options(self): if self.settings.os == "Windows": del self.options.fPIC - + + def layout(self): + cmake_layout(self, src_folder="src") + + def requirements(self): + # https://github.com/Minres/SystemC-Components/blob/2023.06/src/sysc/scc/perf_estimator.h#L20 + self.requires("boost/1.83.0", transitive_headers=True, transitive_libs=True) + # https://github.com/Minres/SystemC-Components/blob/2023.06/src/sysc/scc/trace/vcd_trace.hh#L28 + self.requires("fmt/10.2.1", transitive_headers=True, transitive_libs=True) + # https://github.com/Minres/SystemC-Components/blob/2023.06/src/common/util/lz4_streambuf.h#L13 + self.requires("lz4/1.9.4", transitive_headers=True, transitive_libs=True) + self.requires("rapidjson/cci.20220822") + self.requires("spdlog/1.13.0") + # https://github.com/Minres/SystemC-Components/blob/2023.06/src/sysc/tlm/scc/lwtr/tlm2_lwtr.h + self.requires("systemc-cci/1.0.0", transitive_headers=True, transitive_libs=True) + self.requires("systemc/2.3.4", transitive_headers=True, transitive_libs=True) + # https://github.com/Minres/SystemC-Components/blob/2023.06/src/sysc/scc/trace/gz_writer.hh#L18 + self.requires("zlib/[>=1.2.11 <2]", transitive_headers=True, transitive_libs=True) + self.requires("yaml-cpp/0.8.0") + def validate(self): + if is_apple_os(self): + raise ConanInvalidConfiguration(f"{self.name} is not supported on {self.settings.os}.") + if is_msvc(self): + # Fails with + # src\sysc\tlm\scc\tlm_mm.h(116,114): error C2259: 'tlm::scc::tlm_gp_mm_t<16,false>': cannot instantiate abstract class + # (compiling source file '../../../src/src/sysc/tlm/scc/lwtr/tlm2_lwtr.cpp') + # src\sysc\tlm\scc\tlm_mm.h(116,48): + # see declaration of 'tlm::scc::tlm_gp_mm_t<16,false>' + # src\sysc\tlm\scc\tlm_mm.h(116,114): + # due to following members: + # src\sysc\tlm\scc\tlm_mm.h(116,114): + # 'void tlm::tlm_extension::copy_from(const tlm::tlm_extension_base &)': is abstract + # systemc-2.3.4\p\include\tlm_core\tlm_2\tlm_generic_payload\tlm_gp.h(78,18): + # see declaration of 'tlm::tlm_extension::copy_from' + # and + # src\sysc\tlm\scc\tlm_mm.h(31,20): error C2061: syntax error: identifier '__attribute__' + raise ConanInvalidConfiguration(f"{self.ref} recipe is not supported on MSVC. Contributions are welcome!") if self.settings.compiler.get_safe("cppstd"): - tools.check_min_cppstd(self, 11) - if self.settings.os == "Macos": - raise ConanInvalidConfiguration(f"{self.name} is not suppported on {self.settings.os}.") + check_min_cppstd(self, 11) if self.settings.compiler == "gcc" and Version(self.settings.compiler.version) < "7": raise ConanInvalidConfiguration("GCC < version 7 is not supported") - def source(self): - get(self, **self.conan_data["sources"][self.version], - destination=self._source_subfolder, strip_root=True) - def build_requirements(self): - self.tool_requires("cmake/3.24.0") + self.tool_requires("cmake/[>=3.24 <4]") - @functools.lru_cache(1) - def _configure_cmake(self): - cmake = CMake(self) - cmake.definitions["SC_WITH_PHASE_CALLBACKS"] = self.options.enable_phase_callbacks - cmake.definitions["SC_WITH_PHASE_CALLBACK_TRACING"] = self.options.enable_phase_callbacks_tracing - cmake.definitions["BUILD_SCC_DOCUMENTATION"] = False - cmake.definitions["SCC_LIB_ONLY"] = True + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + tc.cache_variables["SC_WITH_PHASE_CALLBACKS"] = self.options.enable_phase_callbacks + tc.cache_variables["SC_WITH_PHASE_CALLBACK_TRACING"] = self.options.enable_phase_callbacks_tracing + tc.cache_variables["BUILD_SCC_DOCUMENTATION"] = False + tc.cache_variables["SCC_LIB_ONLY"] = True + tc.cache_variables["ENABLE_CONAN"] = False if self.settings.os == "Windows": - cmake.definitions["SCC_LIMIT_TRACE_TYPE_LIST"] = True - cmake.configure(build_folder=self._build_subfolder) - return cmake + tc.cache_variables["SCC_LIMIT_TRACE_TYPE_LIST"] = True + # Used at https://github.com/Minres/SystemC-Components/blob/2023.06/src/common/util/pool_allocator.h#L110 + # but is not set anywhere + tc.preprocessor_definitions["_GLIBCXX_USE_NOEXCEPT"] = "noexcept" + tc.generate() + + deps = CMakeDeps(self) + deps.set_property("systemc", "cmake_file_name", "SystemC") + deps.set_property("systemc-cci", "cmake_target_name", "systemc-cci::systemc-cci") + deps.set_property("yaml-cpp", "cmake_target_name", "yaml-cpp::yaml-cpp") + deps.generate() + + def _patch_sources(self): + apply_conandata_patches(self) + replace_in_file(self, os.path.join(self.source_folder, "third_party", "axi_chi", "CMakeLists.txt"), + " STATIC", "") def build(self): - cmake = self._configure_cmake() + self._patch_sources() + cmake = CMake(self) + cmake.configure() cmake.build() def package(self): - self.copy(pattern="LICENSE", dst="licenses", - src=self._source_subfolder) - cmake = self._configure_cmake() + copy(self, "LICENSE", + dst=os.path.join(self.package_folder, "licenses"), + src=self.source_folder) + cmake = CMake(self) cmake.install() + rmdir(self, os.path.join(self.package_folder, "share")) def package_info(self): - self.cpp_info.components["busses"].libs = ["busses"] self.cpp_info.components["scc-sysc"].libs = ["scc-sysc"] + self.cpp_info.components["scc-sysc"].requires = [ + "fstapi", + "lwtr", + "scc-util", + "scv-tr", + "boost::date_time", + "fmt::fmt", + "lz4::lz4", + "rapidjson::rapidjson", + "spdlog::spdlog", + "systemc-cci::systemc-cci", + "systemc::systemc", + "yaml-cpp::yaml-cpp", + "zlib::zlib", + ] + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.components["scc-sysc"].system_libs = ["pthread", "dl"] + + self.cpp_info.components["busses"].libs = ["busses"] + self.cpp_info.components["busses"].requires = ["tlm-interfaces", "scc-sysc"] + + self.cpp_info.components["fstapi"].libs = ["fstapi"] + self.cpp_info.components["fstapi"].requires = ["zlib::zlib", "lz4::lz4"] + + self.cpp_info.components["lwtr"].libs = ["lwtr"] + self.cpp_info.components["lwtr"].requires = ["zlib::zlib", "lz4::lz4", "systemc::systemc", "fmt::fmt"] + self.cpp_info.components["scc-util"].libs = ["scc-util"] + self.cpp_info.components["scc-util"].requires = ["lz4::lz4"] + self.cpp_info.components["scv-tr"].libs = ["scv-tr"] + self.cpp_info.components["scv-tr"].requires = ["fmt::fmt", "systemc::systemc"] + self.cpp_info.components["tlm-interfaces"].libs = ["tlm-interfaces"] + self.cpp_info.components["tlm-interfaces"].requires = ["scc-sysc", "systemc::systemc"] diff --git a/recipes/scc/all/patches/2023.06-add-fmt-10-support.patch b/recipes/scc/all/patches/2023.06-add-fmt-10-support.patch new file mode 100644 index 0000000000000..e07a125098cc9 --- /dev/null +++ b/recipes/scc/all/patches/2023.06-add-fmt-10-support.patch @@ -0,0 +1,11 @@ +--- src/sysc/scc/trace/vcd_trace.hh ++++ src/sysc/scc/trace/vcd_trace.hh +@@ -53,7 +53,7 @@ + + template + inline void vcdEmitValueChangeReal(FPTR os, std::string const& handle, unsigned bits, T val){ +- auto buf = fmt::format("r{:.16g} {}\n", val, handle); ++ auto buf = fmt::format("r{:.16g} {}\n", static_cast(val), handle); + FWRITE(buf.c_str(), 1, buf.size(), os); + } + diff --git a/recipes/scc/all/patches/2023.06-fix-conan-targets.patch b/recipes/scc/all/patches/2023.06-fix-conan-targets.patch new file mode 100644 index 0000000000000..052ef97ffbc9f --- /dev/null +++ b/recipes/scc/all/patches/2023.06-fix-conan-targets.patch @@ -0,0 +1,17 @@ +--- CMakeLists.txt ++++ CMakeLists.txt +@@ -24,5 +24,13 @@ + include(Common) + +-if(CMAKE_PROJECT_NAME STREQUAL "scc") ++find_package(SystemC REQUIRED CONFIG) ++find_package(systemc-cci REQUIRED CONFIG) ++find_package(fmt REQUIRED CONFIG) ++find_package(spdlog REQUIRED CONFIG) ++find_package(Boost REQUIRED CONFIG) ++find_package(yaml-cpp REQUIRED CONFIG) ++find_package(lz4 REQUIRED CONFIG) ++if(TRUE) ++elseif(CMAKE_PROJECT_NAME STREQUAL "scc") + message(STATUS "Building SCC in standalone mode") + include(GNUInstallDirs) diff --git a/recipes/scc/all/test_package/CMakeLists.txt b/recipes/scc/all/test_package/CMakeLists.txt index b74b2d8e566a6..32a369fbfeb6a 100644 --- a/recipes/scc/all/test_package/CMakeLists.txt +++ b/recipes/scc/all/test_package/CMakeLists.txt @@ -1,9 +1,6 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.15) project(test_package LANGUAGES CXX) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) - find_package(scc REQUIRED CONFIG) add_executable(${PROJECT_NAME} example.cpp) diff --git a/recipes/scc/all/test_package/conanfile.py b/recipes/scc/all/test_package/conanfile.py index 48f7a8523a636..ef5d7042163ec 100644 --- a/recipes/scc/all/test_package/conanfile.py +++ b/recipes/scc/all/test_package/conanfile.py @@ -1,18 +1,26 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake import os -from conans import ConanFile, CMake -from conan.tools.build import cross_building -class SystemcComponentsTestConan(ConanFile): - settings = "os", "compiler", "build_type", "arch" - generators = "cmake", "cmake_find_package_multi" - +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) + def build(self): cmake = CMake(self) cmake.configure() cmake.build() def test(self): - if not cross_building(self): - bin_path = os.path.join("bin", "test_package") - self.run(bin_path, run_environment=True) + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/scc/all/test_package/example.cpp b/recipes/scc/all/test_package/example.cpp index 2de9f26d9f75d..4f5ccf21b1e5c 100644 --- a/recipes/scc/all/test_package/example.cpp +++ b/recipes/scc/all/test_package/example.cpp @@ -1,7 +1,9 @@ +#include #include #include -int main(int argc, char* argv[]) { +int main() { + util::IoRedirector::get(); std::cout << "scc loaded successfully. Mini test: util::ilog2(32) = " << util::ilog2(32) << std::endl; return 0; } diff --git a/recipes/scc/config.yml b/recipes/scc/config.yml index f8b19962361c1..f334fc74322ea 100644 --- a/recipes/scc/config.yml +++ b/recipes/scc/config.yml @@ -1,3 +1,3 @@ versions: - "2022.08": - folder: "all" + "2023.06": + folder: all diff --git a/recipes/scip/all/conandata.yml b/recipes/scip/all/conandata.yml index aacd6d1a319fe..3da148cb520bd 100644 --- a/recipes/scip/all/conandata.yml +++ b/recipes/scip/all/conandata.yml @@ -1,4 +1,10 @@ sources: + "9.2.0": + url: "https://github.com/scipopt/scip/archive/refs/tags/v920.tar.gz" + sha256: "a22dc20f44e99bfec071889fd5af2bfc57c4af14b76d777d1312006616346f7c" + "9.0.1": + url: "https://github.com/scipopt/scip/archive/refs/tags/v901.tar.gz" + sha256: "08ad3e7ad6f84f457d95bb70ab21fa7fc648dd43103099359ef8a8f30fcce32e" "8.1.0": url: "https://github.com/scipopt/scip/archive/refs/tags/v810.tar.gz" sha256: "b6daf54c37d02564b12fb32ec3bb7a105710eb0026adeafc602af4435fa94685" @@ -8,3 +14,24 @@ sources: "8.0.3": url: "https://github.com/scipopt/scip/archive/refs/tags/v803.tar.gz" sha256: "fe7636f8165a8c9298ff55ed3220d084d4ea31ba9b69d2733beec53e0e4335d6" +patches: + "9.2.0": + - patch_file: "patches/0001-bliss-include-dir.patch" + patch_description: "Change hard-coded paths to conan includes" + patch_type: "conan" +version_mappings: + "9.2.0": + soplex: "7.1.2" + default_sym: "snauty" + "9.0.1": + soplex: "7.0.1" + default_sym: "bliss" + "8.1.0": + soplex: "6.0.4" + default_sym: "bliss" + "8.0.4": + soplex: "6.0.4" + default_sym: "bliss" + "8.0.3": + soplex: "6.0.3" + default_sym: "bliss" diff --git a/recipes/scip/all/conanfile.py b/recipes/scip/all/conanfile.py index 30a113fa5330e..0c642f80cc866 100644 --- a/recipes/scip/all/conanfile.py +++ b/recipes/scip/all/conanfile.py @@ -3,7 +3,7 @@ from conan.tools.build import check_min_cppstd from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout from conan.errors import ConanInvalidConfiguration -from conan.tools.files import copy, get +from conan.tools.files import apply_conandata_patches, export_conandata_patches, copy, get from conan.tools.microsoft import check_min_vs, is_msvc from conan.tools.scm import Version from os.path import join @@ -25,19 +25,13 @@ class SCIPConan(ConanFile): "fPIC": [True, False], "with_gmp": [True, False], "with_tpi": [False, "omp", "tny"], - "with_sym": [False, "bliss"], + "with_sym": [False, "bliss", "snauty"], } default_options = { "shared": False, "fPIC": True, "with_gmp": True, - "with_tpi": False, - "with_sym": "bliss", - } - soplex_version_belonging_to_me = { - "8.1.0": "6.0.4", - "8.0.4": "6.0.4", - "8.0.3": "6.0.3" + "with_tpi": False } @property @@ -52,6 +46,9 @@ def _compilers_minimum_version(self): "apple-clang": "7", } + def export_sources(self): + export_conandata_patches(self) + def validate(self): if self.settings.compiler.cppstd: check_min_cppstd(self, self._min_cppstd) @@ -71,22 +68,31 @@ def validate(self): raise ConanInvalidConfiguration("Bliss does not support libc++.") if self.dependencies["soplex"].options.with_gmp and not self.options.with_gmp: raise ConanInvalidConfiguration("The options 'with_gmp' should be aligned with 'soplex:with_gmp' too.") + if Version(self.version) >= "9.0.1" and is_msvc(self) and self.settings.build_type == "Debug": + # lpi_spx2.cpp : error C1128: number of sections exceeded object file format limit: compile with /bigobj + raise ConanInvalidConfiguration(f"{self.ref} can not be build in Debug with MSVC.") def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) - def config_options(self): - if self.settings.os == "Windows": - del self.options.fPIC - def requirements(self): + def _mapping_requires(dep, **kwargs): + required_version = self.conan_data["version_mappings"][self.version][dep] + self.requires(f"{dep}/{required_version}", **kwargs) + if self.options.with_gmp: self.requires("gmp/6.3.0") if self.options.with_sym == "bliss": self.requires("bliss/0.77") - self.requires(f"soplex/{self.soplex_version_belonging_to_me[self.version]}") + _mapping_requires("soplex") self.requires("zlib/[>=1.2.11 <2]") + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + if self.options.with_sym == None: + self.options.with_sym = self.conan_data["version_mappings"][self.version]["default_sym"] + def configure(self): self.options["soplex"].with_gmp = self.options.with_gmp if self.options.shared: @@ -100,6 +106,7 @@ def _to_cmake(*arrays): return ";".join(item.replace("\\", "/") for sublist in arrays for item in sublist) def generate(self): + apply_conandata_patches(self) tc = CMakeToolchain(self) tc.variables["SHARED"] = self.options.shared tc.variables["READLINE"] = False # required for interactive stuff @@ -120,6 +127,7 @@ def generate(self): tc.variables["PAPILO"] = False # LGPL tc.variables["ZIMPL"] = False # LPGL tc.variables["IPOPT"] = False # no such coin package on conan center yet + tc.variables["BUILD_TESTING"] = False # do not build documentation and examples tc.generate() deps = CMakeDeps(self) deps.set_property("sopex", "cmake_file_name", "SOPEX") diff --git a/recipes/scip/all/patches/0001-bliss-include-dir.patch b/recipes/scip/all/patches/0001-bliss-include-dir.patch new file mode 100644 index 0000000000000..c47daafc7bbb7 --- /dev/null +++ b/recipes/scip/all/patches/0001-bliss-include-dir.patch @@ -0,0 +1,20 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index c23a1a85c9..f288b2b89d 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -133,11 +133,10 @@ if(SYM STREQUAL "bliss" OR SYM STREQUAL "sbliss") + + find_package(Bliss CONFIG HINTS ${BLISS_DIR}) + if(Bliss_FOUND) +- get_filename_component(BLISS_ABSOLUTE_PATH ${Bliss_DIR}/../../.. REALPATH) +- include_directories(${BLISS_ABSOLUTE_PATH}/include) +- set(SYM_LIBRARIES ${BLISS_ABSOLUTE_PATH}/lib/libbliss.a) +- set(SYM_PIC_LIBRARIES ${BLISS_ABSOLUTE_PATH}/lib/libbliss.a) +- message(STATUS "Found Bliss: ${BLISS_ABSOLUTE_PATH}") ++ include_directories("${bliss_INCLUDE_DIRS}") ++ set(SYM_LIBRARIES "bliss::bliss") ++ set(SYM_PIC_LIBRARIES "bliss::bliss") ++ message(STATUS "Found Bliss via Conan") + else() + # Utilities to automatically download missing dependencies + include(cmake/Dependencies.cmake) diff --git a/recipes/scip/config.yml b/recipes/scip/config.yml index f70b85bc6cf44..73c7b80b6ca0b 100644 --- a/recipes/scip/config.yml +++ b/recipes/scip/config.yml @@ -1,4 +1,8 @@ versions: + "9.2.0": + folder: all + "9.0.1": + folder: all "8.1.0": folder: all "8.0.4": diff --git a/recipes/scippp/all/conandata.yml b/recipes/scippp/all/conandata.yml index 88b2816d64354..39c343801470f 100644 --- a/recipes/scippp/all/conandata.yml +++ b/recipes/scippp/all/conandata.yml @@ -1,7 +1,14 @@ sources: + "1.2.0": + url: "https://github.com/scipopt/SCIPpp/archive/refs/tags/1.2.0.tar.gz" + sha256: "8fa4b819734b9841eda1ec1c9266fb07144be490c3f24be46271c538ab18da61" "1.1.0": url: "https://github.com/scipopt/SCIPpp/archive/refs/tags/1.1.0.tar.gz" sha256: "808b58e8ddd873ec403c021f9255004120e58d7ec6fb4b7d99ff6f21950ff8fb" "1.0.2": url: "https://github.com/scipopt/SCIPpp/archive/refs/tags/1.0.2.tar.gz" sha256: "d51dfd0f1ca1b57619f7c82e32d5390d99d5cdaee98ae1ace99ec05a394dcee3" +scip_mapping: + "1.2.0": "9.0.1" + "1.1.0": "8.0.4" + "1.0.2": "8.0.4" diff --git a/recipes/scippp/all/conanfile.py b/recipes/scippp/all/conanfile.py index 77b8d49bdb43c..55ee8105f9224 100644 --- a/recipes/scippp/all/conanfile.py +++ b/recipes/scippp/all/conanfile.py @@ -76,7 +76,7 @@ def configure(self): def requirements(self): # see https://github.com/scipopt/SCIPpp/blob/1.0.0/conanfile.py#L25 - self.requires("scip/8.0.4", transitive_headers=True) + self.requires(f"scip/{self.conan_data['scip_mapping'][self.version]}", transitive_headers=True) def generate(self): tc = CMakeToolchain(self) diff --git a/recipes/scippp/config.yml b/recipes/scippp/config.yml index a59308932f1d8..eb9a4f6036cd3 100644 --- a/recipes/scippp/config.yml +++ b/recipes/scippp/config.yml @@ -1,4 +1,6 @@ versions: + "1.2.0": + folder: all "1.1.0": folder: all "1.0.2": diff --git a/recipes/scnlib/all/conandata.yml b/recipes/scnlib/all/conandata.yml index 6655f8d077d01..14fe174ba433a 100644 --- a/recipes/scnlib/all/conandata.yml +++ b/recipes/scnlib/all/conandata.yml @@ -1,62 +1,13 @@ sources: - "2.0.2": - url: "https://github.com/eliaskosunen/scnlib/archive/refs/tags/v2.0.2.tar.gz" - sha256: "a485076b8710576cf05fbc086d39499d16804575c0660b0dfaeeaf7823660a17" - "2.0.1": - url: "https://github.com/eliaskosunen/scnlib/archive/refs/tags/v2.0.1.tar.gz" - sha256: "f399d1b1f36f5d53a2d63fd2974797ab8f3f7e69c424d9661253830cb793b72e" - "2.0.0": - url: "https://github.com/eliaskosunen/scnlib/archive/refs/tags/v2.0.0.tar.gz" - sha256: "2a35356a3a7485fdf97f28cfbea52db077cf4e7bab0a5a0fc3b04e89630334cd" - "1.1.3": - url: "https://github.com/eliaskosunen/scnlib/archive/refs/tags/v1.1.3.tar.gz" - sha256: "32ca1baed2da5d86aa03273c87580ef32e95925697d252138507ec0545d86ab2" - "1.1.2": - url: "https://github.com/eliaskosunen/scnlib/archive/refs/tags/v1.1.2.tar.gz" - sha256: "5ed3ec742302c7304bf188bde9c4012a65dc8124ff4e1a69b598480d664250e6" - "1.0": - url: "https://github.com/eliaskosunen/scnlib/archive/refs/tags/v1.0.tar.gz" - sha256: "5b8333e522206c2a74e57a9c9544c4fe4e7858cfe93e216905b463eaf91af5fe" -patches: - "2.0.2": - - patch_file: "patches/2.0.0-0001-remove-re2-version.patch" - patch_description: "remove re2 version on find_package" - patch_type: "portability" - "2.0.1": - - patch_file: "patches/2.0.0-0001-remove-re2-version.patch" - patch_description: "remove re2 version on find_package" - patch_type: "portability" - "2.0.0": - - patch_file: "patches/2.0.0-0001-remove-re2-version.patch" - patch_description: "remove re2 version on find_package" - patch_type: "portability" - "1.1.3": - - patch_file: "patches/1.1.3-0001-install-dll-windows.patch" - patch_description: "add runtime destination path on install" - patch_type: "portability" - - patch_file: "patches/1.1.3-0002-remove-header-only-target.patch" - patch_description: "prevent to generate header only target for conan package" - patch_type: "conan" - - patch_file: "patches/1.1.3-0003-fix-link-keyword.patch" - patch_description: "use PRIVATE instead of INTERFACE" - patch_type: "conan" - "1.1.2": - - patch_file: "patches/1.1.2-0001-install-dll-windows.patch" - patch_description: "add runtime destination path on install" - patch_type: "portability" - - patch_file: "patches/1.1.2-0002-remove-header-only-target.patch" - patch_description: "prevent to generate header only target for conan package" - patch_type: "conan" - - patch_file: "patches/1.1.2-0003-fix-link-keyword.patch" - patch_description: "use PRIVATE instead of INTERFACE" - patch_type: "conan" - "1.0": - - patch_file: "patches/1.0-0001-install-dll-windows.patch" - patch_description: "add runtime destination path on install" - patch_type: "portability" - - patch_file: "patches/1.0-0002-remove-header-only-target.patch" - patch_description: "prevent to generate header only target for conan package" - patch_type: "conan" - - patch_file: "patches/1.0-0003-use-conan-package.patch" - patch_description: "use conan package of fast-float" - patch_type: "conan" + "4.0.1": + url: "https://github.com/eliaskosunen/scnlib/archive/refs/tags/v4.0.1.tar.gz" + sha256: "ece17b26840894cc57a7127138fe4540929adcb297524dec02c490c233ff46a7" + "3.0.2": + url: "https://github.com/eliaskosunen/scnlib/archive/refs/tags/v3.0.2.tar.gz" + sha256: "27f17420ddad6971339e6d5db0d915204181c31f5cb0e92a63b9998d98e2852b" + "3.0.1": + url: "https://github.com/eliaskosunen/scnlib/archive/refs/tags/v3.0.1.tar.gz" + sha256: "bc8a668873601d00cce6841c2d0f2c93f836f63f0fbc77997834dea12e951eb1" + "2.0.3": + url: "https://github.com/eliaskosunen/scnlib/archive/refs/tags/v2.0.3.tar.gz" + sha256: "507ed0e988f1d9460a9c921fc21f5a5244185a4015942f235522fbe5c21e6a51" diff --git a/recipes/scnlib/all/conanfile.py b/recipes/scnlib/all/conanfile.py index c08cd042027e8..14a3e596b4a2a 100644 --- a/recipes/scnlib/all/conanfile.py +++ b/recipes/scnlib/all/conanfile.py @@ -1,5 +1,5 @@ from conan import ConanFile -from conan.tools.files import apply_conandata_patches, export_conandata_patches, get, copy, rm, rmdir +from conan.tools.files import get, copy, rm, rmdir from conan.tools.build import check_min_cppstd from conan.tools.scm import Version from conan.tools.layout import basic_layout @@ -9,7 +9,7 @@ import os -required_conan_version = ">=1.53.0" +required_conan_version = ">=2.0" class ScnlibConan(ConanFile): name = "scnlib" @@ -35,38 +35,15 @@ class ScnlibConan(ConanFile): @property def _min_cppstd(self): - if Version(self.version) < "2.0.0": - return "11" - else: - # scn/2.0.0 has complation error on MSVC c++17 - # we have to use versions which support c++20 - # https://github.com/eliaskosunen/scnlib/issues/97 - # https://github.com/conan-io/conan-center-index/pull/22455#issuecomment-1924444193 - return "20" if is_msvc(self) else "17" - - @property - def _compilers_minimum_version(self): - return { - "17": { - "gcc": "8", - "clang": "7", - # scn/2.0.0 requires std::regex_constants::multiline - "apple-clang": "14", - }, - "20": { - "Visual Studio": "17", - "msvc": "193", - } - }.get(self._min_cppstd, {}) - - def export_sources(self): - export_conandata_patches(self) + # scn/2.0.0 has complation error on MSVC c++17 + # we have to use versions which support c++20 + # https://github.com/eliaskosunen/scnlib/issues/97 + # https://github.com/conan-io/conan-center-index/pull/22455#issuecomment-1924444193 + return "20" if is_msvc(self) else "17" def config_options(self): if self.settings.os == "Windows": del self.options.fPIC - if Version(self.version) < "2.0": - del self.options.regex_backend def configure(self): if self.options.get_safe("header_only") or self.options.shared: @@ -83,7 +60,7 @@ def layout(self): def requirements(self): self.requires("fast_float/6.1.0") - if Version(self.version) >= "2.0": + if Version(self.version) < "3.0": self.requires("simdutf/4.0.5") if self.options.get_safe("regex_backend") in ["boost", "boost_icu"]: self.requires("boost/1.83.0") @@ -95,21 +72,17 @@ def package_id(self): self.info.clear() def validate(self): - if self.settings.compiler.get_safe("cppstd"): - check_min_cppstd(self, self._min_cppstd) - minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) - if minimum_version and Version(self.settings.compiler.version) < minimum_version: - raise ConanInvalidConfiguration( - f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." - ) + check_min_cppstd(self, self._min_cppstd) + if self.options.get_safe("regex_backend") == "boost_icu" and \ not self.dependencies["boost"].options.get_safe("i18n_backend_icu"): raise ConanInvalidConfiguration( f"{self.ref} with regex_backend=Boost_icu option requires boost::i18n_backend_icu to be enabled." ) - if Version(self.version) >= "2.0.0" and self.options.header_only: + # TODO: This should probably be a del self.options.header_only in config_options once the CI supports it + if self.options.header_only: raise ConanInvalidConfiguration(f"{self.ref} doesn't support header only mode.") - if Version(self.version) >= "2.0.0" and self.settings.compiler == "gcc" and Version(self.settings.compiler.version).major == "11": + if self.settings.compiler == "gcc" and Version(self.settings.compiler.version).major == "11": raise ConanInvalidConfiguration(f"{self.ref} doesn't support gcc 11.x due to std::regex_constants::multiline is not defined.") def build_requirements(self): @@ -129,24 +102,21 @@ def generate(self): tc.variables["SCN_DOCS"] = False tc.variables["SCN_INSTALL"] = True tc.variables["CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS"] = True - if Version(self.version) < "2.0": - tc.variables["SCN_USE_BUNDLED_FAST_FLOAT"] = False - else: - tc.variables["SCN_USE_EXTERNAL_SIMDUTF"] = True - tc.variables["SCN_USE_EXTERNAL_FAST_FLOAT"] = True - tc.variables["SCN_BENCHMARKS_BUILDTIME"] = False - tc.variables["SCN_BENCHMARKS_BINARYSIZE"] = False - tc.variables["SCN_DISABLE_REGEX"] = self.options.regex_backend is None - if self.options.regex_backend is not None: - tc.variables["SCN_REGEX_BACKEND"] = self.options.regex_backend - tc.variables["SCN_USE_EXTERNAL_REGEX_BACKEND"] = True + + tc.variables["SCN_USE_EXTERNAL_SIMDUTF"] = True + tc.variables["SCN_USE_EXTERNAL_FAST_FLOAT"] = True + tc.variables["SCN_BENCHMARKS_BUILDTIME"] = False + tc.variables["SCN_BENCHMARKS_BINARYSIZE"] = False + tc.variables["SCN_DISABLE_REGEX"] = self.options.regex_backend is None + if self.options.regex_backend is not None: + tc.variables["SCN_REGEX_BACKEND"] = self.options.regex_backend + tc.variables["SCN_USE_EXTERNAL_REGEX_BACKEND"] = True tc.generate() deps = CMakeDeps(self) deps.generate() def build(self): - apply_conandata_patches(self) if not self.options.get_safe("header_only"): cmake = CMake(self) cmake.configure() @@ -157,13 +127,10 @@ def package(self): if self.options.get_safe("header_only"): copy(self, "*", dst=os.path.join(self.package_folder, "include"), src=os.path.join(self.source_folder, "include")) src_folder = os.path.join(self.source_folder, "src") - if Version(self.version) >= "1.0": - copy(self, "reader_*.cpp", src=src_folder, dst=os.path.join(self.package_folder, "include", "scn", "reader")) - copy(self, "vscan.cpp", src=src_folder, dst=os.path.join(self.package_folder, "include", "scn", "scan")) - copy(self, "locale.cpp", src=src_folder, dst=os.path.join(self.package_folder, "include", "scn", "detail")) - copy(self, "file.cpp", src=src_folder, dst=os.path.join(self.package_folder, "include", "scn", "detail")) - else: - copy(self, "*.cpp", src=src_folder, dst=os.path.join(self.package_folder, "include", "scn", "detail")) + copy(self, "reader_*.cpp", src=src_folder, dst=os.path.join(self.package_folder, "include", "scn", "reader")) + copy(self, "vscan.cpp", src=src_folder, dst=os.path.join(self.package_folder, "include", "scn", "scan")) + copy(self, "locale.cpp", src=src_folder, dst=os.path.join(self.package_folder, "include", "scn", "detail")) + copy(self, "file.cpp", src=src_folder, dst=os.path.join(self.package_folder, "include", "scn", "detail")) else: cmake = CMake(self) cmake.install() @@ -184,12 +151,8 @@ def package_info(self): self.cpp_info.components["_scnlib"].defines = ["SCN_HEADER_ONLY=0"] self.cpp_info.components["_scnlib"].libs = ["scn"] self.cpp_info.components["_scnlib"].requires.append("fast_float::fast_float") - if Version(self.version) >= "2.0": + if Version(self.version) < "3.0": self.cpp_info.components["_scnlib"].requires.append("simdutf::simdutf") - if self.options.get_safe("regex_backend") in ["boost", "boost_icu"]: - self.cpp_info.components["_scnlib"].requires.append("boost::regex") - elif self.options.get_safe("regex_backend") == "re2": - self.cpp_info.components["_scnlib"].requires.append("re2::re2") if self.settings.os in ["Linux", "FreeBSD"]: self.cpp_info.components["_scnlib"].system_libs.append("m") diff --git a/recipes/scnlib/all/patches/1.0-0001-install-dll-windows.patch b/recipes/scnlib/all/patches/1.0-0001-install-dll-windows.patch deleted file mode 100644 index c2d5fe9c223ea..0000000000000 --- a/recipes/scnlib/all/patches/1.0-0001-install-dll-windows.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index d960eb9..c914832 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -167,6 +167,7 @@ if (SCN_INSTALL) - - install(TARGETS ${SCN_EXPORT_TARGETS_LIST} - EXPORT scnTargets -+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} - INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) diff --git a/recipes/scnlib/all/patches/1.0-0002-remove-header-only-target.patch b/recipes/scnlib/all/patches/1.0-0002-remove-header-only-target.patch deleted file mode 100644 index 6c35d57c4ca41..0000000000000 --- a/recipes/scnlib/all/patches/1.0-0002-remove-header-only-target.patch +++ /dev/null @@ -1,18 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index c914832..1aba404 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -106,12 +106,10 @@ function(generate_header_only_target target_name) - endfunction() - - generate_library_target(scn) --generate_header_only_target(scn-header-only) - - set(SCN_EXPORT_TARGETS_LIST -- scn scn-header-only) -+ scn) - add_library(scn::scn ALIAS scn) --add_library(scn::scn-header-only ALIAS scn-header-only) - - set_property(TARGET scn PROPERTY SOVERSION 0) - diff --git a/recipes/scnlib/all/patches/1.0-0003-use-conan-package.patch b/recipes/scnlib/all/patches/1.0-0003-use-conan-package.patch deleted file mode 100644 index 5b5354a04f783..0000000000000 --- a/recipes/scnlib/all/patches/1.0-0003-use-conan-package.patch +++ /dev/null @@ -1,35 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 1aba404..f0c4b94 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -48,6 +48,8 @@ if (NOT (${CMAKE_VERSION} VERSION_LESS "3.9.0")) - cmake_policy(SET CMP0069 NEW) - endif () - -+find_package(FastFloat REQUIRED) -+ - include(sanitizers) - include(flags) - -@@ -83,8 +85,8 @@ function(generate_library_target target_name) - target_include_directories(${target_name} PRIVATE - $) - else () -- target_link_libraries(${target_name} INTERFACE -- fast_float) -+ target_link_libraries(${target_name} PRIVATE -+ FastFloat::fast_float) - endif () - endfunction() - function(generate_header_only_target target_name) -@@ -100,8 +102,8 @@ function(generate_header_only_target target_name) - target_include_directories(${target_name} INTERFACE - $) - else () -- target_link_libraries(${target_name} INTERFACE -- fast_float) -+ target_link_libraries(${target_name} PRIVATE -+ FastFloat::fast_float) - endif () - endfunction() - diff --git a/recipes/scnlib/all/patches/1.1.2-0001-install-dll-windows.patch b/recipes/scnlib/all/patches/1.1.2-0001-install-dll-windows.patch deleted file mode 100644 index ee64fa9407251..0000000000000 --- a/recipes/scnlib/all/patches/1.1.2-0001-install-dll-windows.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index f1864c6..b42736e 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -171,6 +171,7 @@ if (SCN_INSTALL) - - install(TARGETS ${SCN_EXPORT_TARGETS_LIST} - EXPORT scnTargets -+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} - INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) diff --git a/recipes/scnlib/all/patches/1.1.2-0002-remove-header-only-target.patch b/recipes/scnlib/all/patches/1.1.2-0002-remove-header-only-target.patch deleted file mode 100644 index 08f98586c6b5b..0000000000000 --- a/recipes/scnlib/all/patches/1.1.2-0002-remove-header-only-target.patch +++ /dev/null @@ -1,18 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index b42736e..87cb1f7 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -110,12 +110,10 @@ function(generate_header_only_target target_name) - endfunction() - - generate_library_target(scn) --generate_header_only_target(scn-header-only) - - set(SCN_EXPORT_TARGETS_LIST -- scn scn-header-only) -+ scn) - add_library(scn::scn ALIAS scn) --add_library(scn::scn-header-only ALIAS scn-header-only) - - set_property(TARGET scn PROPERTY SOVERSION 0) - diff --git a/recipes/scnlib/all/patches/1.1.2-0003-fix-link-keyword.patch b/recipes/scnlib/all/patches/1.1.2-0003-fix-link-keyword.patch deleted file mode 100644 index 9fedf6c33071c..0000000000000 --- a/recipes/scnlib/all/patches/1.1.2-0003-fix-link-keyword.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 87cb1f7..4524490 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -87,7 +87,7 @@ function(generate_library_target target_name) - target_include_directories(${target_name} PRIVATE - $) - else () -- target_link_libraries(${target_name} INTERFACE -+ target_link_libraries(${target_name} PRIVATE - FastFloat::fast_float) - endif () - endfunction() -@@ -104,7 +104,7 @@ function(generate_header_only_target target_name) - target_include_directories(${target_name} INTERFACE - $) - else () -- target_link_libraries(${target_name} INTERFACE -+ target_link_libraries(${target_name} PRIVATE - FastFloat::fast_float) - endif () - endfunction() diff --git a/recipes/scnlib/all/patches/1.1.3-0001-install-dll-windows.patch b/recipes/scnlib/all/patches/1.1.3-0001-install-dll-windows.patch deleted file mode 100644 index 97cf567063d67..0000000000000 --- a/recipes/scnlib/all/patches/1.1.3-0001-install-dll-windows.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 7caf642..05bbf4a 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -205,6 +205,7 @@ if (SCN_INSTALL) - install(TARGETS ${SCN_EXPORT_TARGETS_LIST} - COMPONENT scnlib_Development - EXPORT scnTargets -+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} - INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) diff --git a/recipes/scnlib/all/patches/1.1.3-0002-remove-header-only-target.patch b/recipes/scnlib/all/patches/1.1.3-0002-remove-header-only-target.patch deleted file mode 100644 index 5a50483b54c0f..0000000000000 --- a/recipes/scnlib/all/patches/1.1.3-0002-remove-header-only-target.patch +++ /dev/null @@ -1,20 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 05bbf4a..fe6647b 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -135,12 +135,12 @@ function(generate_header_only_target target_name) - endfunction() - - generate_library_target(scn) --generate_header_only_target(scn-header-only) -+# generate_header_only_target(scn-header-only) - - set(SCN_EXPORT_TARGETS_LIST -- scn scn-header-only) -+ scn) - add_library(scn::scn ALIAS scn) --add_library(scn::scn-header-only ALIAS scn-header-only) -+# add_library(scn::scn-header-only ALIAS scn-header-only) - - set_property(TARGET scn PROPERTY SOVERSION 0) - diff --git a/recipes/scnlib/all/patches/1.1.3-0003-fix-link-keyword.patch b/recipes/scnlib/all/patches/1.1.3-0003-fix-link-keyword.patch deleted file mode 100644 index 1b34af4ceeb25..0000000000000 --- a/recipes/scnlib/all/patches/1.1.3-0003-fix-link-keyword.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index fe6647b..6f34c67 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -112,7 +112,7 @@ function(generate_library_target target_name) - target_include_directories(${target_name} PRIVATE - $) - else () -- target_link_libraries(${target_name} INTERFACE -+ target_link_libraries(${target_name} PRIVATE - FastFloat::fast_float) - endif () - endfunction() -@@ -129,7 +129,7 @@ function(generate_header_only_target target_name) - target_include_directories(${target_name} INTERFACE - $) - else () -- target_link_libraries(${target_name} INTERFACE -+ target_link_libraries(${target_name} PRIVATE - FastFloat::fast_float) - endif () - endfunction() diff --git a/recipes/scnlib/all/patches/2.0.0-0001-remove-re2-version.patch b/recipes/scnlib/all/patches/2.0.0-0001-remove-re2-version.patch deleted file mode 100644 index a256652f48c41..0000000000000 --- a/recipes/scnlib/all/patches/2.0.0-0001-remove-re2-version.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/cmake/dependencies.cmake b/cmake/dependencies.cmake -index ae2832b..fec6359 100644 ---- a/cmake/dependencies.cmake -+++ b/cmake/dependencies.cmake -@@ -154,7 +154,7 @@ if (SCN_REGEX_BACKEND STREQUAL "re2") - message(FATAL_ERROR "SCN_REGEX_BOOST_USE_ICU isn't supported when SCN_REGEX_BACKEND is re2") - endif () - -- find_package(re2 11.0.0 REQUIRED) -+ find_package(re2 REQUIRED) - set(SCN_REGEX_BACKEND_TARGET re2::re2) - endif () - diff --git a/recipes/scnlib/config.yml b/recipes/scnlib/config.yml index 9f31088bdf1c3..a66959b861c3f 100644 --- a/recipes/scnlib/config.yml +++ b/recipes/scnlib/config.yml @@ -1,13 +1,9 @@ versions: - "2.0.2": + "4.0.1": folder: all - "2.0.1": + "3.0.2": folder: all - "2.0.0": + "3.0.1": folder: all - "1.1.3": - folder: all - "1.1.2": - folder: all - "1.0": + "2.0.3": folder: all diff --git a/recipes/sdbus-cpp/all/conandata.yml b/recipes/sdbus-cpp/all/conandata.yml index 6379706780143..597865c12dd7d 100644 --- a/recipes/sdbus-cpp/all/conandata.yml +++ b/recipes/sdbus-cpp/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.0.0": + url: "https://github.com/Kistler-Group/sdbus-cpp/archive/v2.0.0.tar.gz" + sha256: "88af4569161a0d0192f0f4a94582a1af4e75722499d06984fb7f91f638f5afb3" "1.5.0": url: "https://github.com/Kistler-Group/sdbus-cpp/archive/v1.5.0.tar.gz" sha256: "577986929f911320fb9ef6a3e2badd464dc38411ebc25d2966f5cb85c39f0897" @@ -20,15 +23,3 @@ sources: "0.8.3": url: "https://github.com/Kistler-Group/sdbus-cpp/archive/v0.8.3.tar.gz" sha256: "0fd575ae0f463773dd9141242d1133731e2b780fd6526650ce992ba711d88628" - -patches: - "1.0.0": - - patch_file: "patches/0002-correct-readme-cpack-resource-path.patch" - patch_description: "fix out of tree build by using proper paths in cmake file" - patch_type: "bugfix" - patch_source: "https://github.com/Kistler-Group/sdbus-cpp/commit/0b8f2d97524f354bcaf816b27b6139a5b0c480ba" - "0.8.3": - - patch_file: "patches/0001-xml2cpp-Add-missing-EXPAT-include-dirs-136.patch" - patch_description: "fix build error by adding missing headers" - patch_type: "bugfix" - patch_source: "https://github.com/Kistler-Group/sdbus-cpp/commit/fb008445b15b452f461c34667f4991f5ce06e481" diff --git a/recipes/sdbus-cpp/all/conanfile.py b/recipes/sdbus-cpp/all/conanfile.py index b466198f4d0ea..18ebec3e55883 100644 --- a/recipes/sdbus-cpp/all/conanfile.py +++ b/recipes/sdbus-cpp/all/conanfile.py @@ -3,11 +3,13 @@ from conan import ConanFile from conan.errors import ConanInvalidConfiguration from conan.tools.build import check_min_cppstd -from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout -from conan.tools.files import apply_conandata_patches, copy, get, rmdir +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.env import VirtualBuildEnv +from conan.tools.files import copy, get, rmdir +from conan.tools.gnu import PkgConfigDeps from conan.tools.scm import Version -required_conan_version = ">=1.51.0" +required_conan_version = ">=1.55.0" class SdbusCppConan(ConanFile): @@ -24,13 +26,14 @@ class SdbusCppConan(ConanFile): "shared": [True, False], "fPIC": [True, False], "with_code_gen": [True, False], + "with_sdbus": ["systemd", "basu"], } default_options = { "shared": False, "fPIC": True, "with_code_gen": False, + "with_sdbus": "systemd", } - generators = "PkgConfigDeps", "VirtualBuildEnv" @property def _minimum_cpp_standard(self): @@ -38,15 +41,26 @@ def _minimum_cpp_standard(self): @property def _minimum_compilers_version(self): + # non-trivial designated initializers are not supported in gcc < 8 + # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55606 return { - "gcc": "7", + "gcc": "7" if Version(self.version) < "2.0.0" else "8", "clang": "6", } - def export_sources(self): - for p in self.conan_data.get("patches", {}).get(self.version, []): - copy(self, p["patch_file"], self.recipe_folder, - self.export_sources_folder) + @property + def _supported_os(self): + return (["Linux"] if Version(self.version) < "1.4.0" + else ["Linux", "FreeBSD"]) + + @property + def _with_sdbus(self): + return ("basu" if self.settings.os == "FreeBSD" + else self.options.get_safe("with_sdbus", "systemd")) + + def config_options(self): + if Version(self.version) < "1.4.0" or self.settings.os != "Linux": + del self.options.with_sdbus def configure(self): if Version(self.version) < "0.9.0": @@ -55,49 +69,63 @@ def configure(self): if self.options.shared: del self.options.fPIC + def layout(self): + cmake_layout(self, src_folder="src") + def requirements(self): - self.requires("libsystemd/255.2") + if self._with_sdbus == "systemd": + self.requires("libsystemd/255.2") + elif self._with_sdbus == "basu": + self.requires("basu/0.2.1") + if self.options.with_code_gen: + # Trick: always force transitive_libs=False, in order to not propagate expat lib + # transitively even when sdbus-cpp is static, since expat is a dependency of the executable, not the lib + self.requires("expat/[>=2.6.2 <3]", transitive_libs=False) def validate(self): - if self.info.settings.os != "Linux": - raise ConanInvalidConfiguration(f"{self.name} only supports Linux") + if self.settings.os not in self._supported_os: + raise ConanInvalidConfiguration( + f"{self.ref} does not support {self.settings.os}") - if self.info.settings.compiler.get_safe("cppstd"): + if self.settings.compiler.get_safe("cppstd"): check_min_cppstd(self, self._minimum_cpp_standard) - min_version = self._minimum_compilers_version.get(str(self.info.settings.compiler)) - if not min_version: - self.output.warning("{} recipe lacks information about the {} compiler support.".format( - self.name, self.info.settings.compiler)) - else: - if Version(self.info.settings.compiler.version) < min_version: - raise ConanInvalidConfiguration("{} requires C++{} support. The current compiler {} {} does not support it.".format( - self.name, self._minimum_cpp_standard, self.info.settings.compiler, self.info.settings.compiler.version)) + min_version = self._minimum_compilers_version.get(str(self.settings.compiler)) + if min_version and Version(self.settings.compiler.version) < min_version: + raise ConanInvalidConfiguration("{} requires C++{} support. The current compiler {} {} does not support it.".format( + self.name, self._minimum_cpp_standard, self.settings.compiler, self.settings.compiler.version)) def build_requirements(self): - self.tool_requires("pkgconf/2.1.0") - if self.options.with_code_gen: - self.tool_requires("expat/2.6.0") - - def layout(self): - cmake_layout(self, src_folder="src") + if not self.conf.get("tools.gnu:pkg_config", check_type=str): + self.tool_requires("pkgconf/[>=2.2 <3]") def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) def generate(self): + env = VirtualBuildEnv(self) + env.generate() + tc = CMakeToolchain(self) - tc.variables["BUILD_CODE_GEN"] = self.options.with_code_gen + if Version(self.version) >= "2.0.0": + tc.variables["SDBUSCPP_BUILD_CODEGEN"] = self.options.with_code_gen + else: + tc.variables["BUILD_CODE_GEN"] = self.options.with_code_gen tc.variables["BUILD_DOC"] = False tc.variables["BUILD_TESTS"] = False tc.variables["BUILD_LIBSYSTEMD"] = False + tc.variables["SDBUSCPP_BUILD_DOCS"] = False + tc.variables["SDBUSCPP_SDBUS_LIB"] = self._with_sdbus tc.generate() - # workaround for https://gitlab.kitware.com/cmake/cmake/-/issues/18150 - copy(self, "*.pc", self.generators_folder, - os.path.join(self.generators_folder, "lib", "pkgconfig")) + deps = PkgConfigDeps(self) + deps.generate() + + if self.options.with_code_gen: + deps = CMakeDeps(self) + deps.set_property("expat", "cmake_file_name", "EXPAT") + deps.generate() def build(self): - apply_conandata_patches(self) cmake = CMake(self) cmake.configure() cmake.build() @@ -131,9 +159,16 @@ def package_info(self): "cmake_target_name", "SDBusCpp::sdbus-c++") self.cpp_info.components["sdbus-c++"].set_property( "pkg_config_name", "sdbus-c++") - self.cpp_info.components["sdbus-c++"].requires.append( - "libsystemd::libsystemd") + if self._with_sdbus == "systemd": + self.cpp_info.components["sdbus-c++"].requires.append( + "libsystemd::libsystemd") + elif self._with_sdbus == "basu": + self.cpp_info.components["sdbus-c++"].requires.append( + "basu::basu") + if self.options.with_code_gen: + # Not a dependency of the lib, only of executable, but there is no way to modelize this + # with conan + self.cpp_info.components["sdbus-c++"].requires.append("expat::expat") if self.options.with_code_gen: bin_path = os.path.join(self.package_folder, "bin") - self.output.info(f"Appending PATH env var with : {bin_path}") self.env_info.PATH.append(bin_path) diff --git a/recipes/sdbus-cpp/all/patches/0001-xml2cpp-Add-missing-EXPAT-include-dirs-136.patch b/recipes/sdbus-cpp/all/patches/0001-xml2cpp-Add-missing-EXPAT-include-dirs-136.patch deleted file mode 100644 index 3d0422bc85f54..0000000000000 --- a/recipes/sdbus-cpp/all/patches/0001-xml2cpp-Add-missing-EXPAT-include-dirs-136.patch +++ /dev/null @@ -1,35 +0,0 @@ -From fb008445b15b452f461c34667f4991f5ce06e481 Mon Sep 17 00:00:00 2001 -From: bobrofon -Date: Fri, 12 Mar 2021 19:17:55 +0700 -Subject: [PATCH] xml2cpp: Add missing EXPAT include dirs (#136) - -This patch is required if EXPAT library is installed in non-standard location. -Without 'target_include_directories' cmake will find EXPAT library: - ... - -- Found EXPAT: .../lib/libexpat.a (found version "2.2.10") - ... - -But 'xml.cpp' compilation will fail with error: - ... - tools/xml2cpp-codegen/xml.cpp:7:10: fatal error: expat.h: No such file or directory - 7 | #include - ... ---- - tools/CMakeLists.txt | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt -index 375c379..8d7a3d0 100644 ---- a/tools/CMakeLists.txt -+++ b/tools/CMakeLists.txt -@@ -43,6 +43,7 @@ set(CMAKE_CXX_STANDARD 14) - - add_executable(sdbus-c++-xml2cpp ${SDBUSCPP_XML2CPP_SRCS}) - target_link_libraries (sdbus-c++-xml2cpp ${EXPAT_LIBRARIES}) -+target_include_directories(sdbus-c++-xml2cpp PRIVATE ${EXPAT_INCLUDE_DIRS}) - - #---------------------------------- - # INSTALLATION --- -2.31.1 - diff --git a/recipes/sdbus-cpp/all/patches/0002-correct-readme-cpack-resource-path.patch b/recipes/sdbus-cpp/all/patches/0002-correct-readme-cpack-resource-path.patch deleted file mode 100644 index 5b37424cc3112..0000000000000 --- a/recipes/sdbus-cpp/all/patches/0002-correct-readme-cpack-resource-path.patch +++ /dev/null @@ -1,20 +0,0 @@ -diff --color -Naur --label a/CMakeLists.txt --label b/CMakeLists.txt a/CMakeLists.txt b/CMakeLists.txt ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -180,7 +180,6 @@ - #---------------------------------- - - option(BUILD_DOC "Build documentation for sdbus-c++" ON) -- - if(BUILD_DOC) - message(STATUS "Building with documentation") - option(BUILD_DOXYGEN_DOC "Build doxygen documentation for sdbus-c++ API" OFF) -@@ -217,7 +216,7 @@ - set(CPACK_PACKAGE_VENDOR "Kistler") - set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "high-level C++ D-Bus library") - set(CPACK_PACKAGE_CONTACT "info@kistler.com") --set(CPACK_RESOURCE_FILE_README "${CMAKE_SOURCE_DIR}/README.md") -+set(CPACK_RESOURCE_FILE_README "${CMAKE_CURRENT_SOURCE_DIR}/README.md") - set(CPACK_COMPONENTS_ALL runtime dev doc) - set(CPACK_COMPONENT_DEV_DEPENDS "runtime") - diff --git a/recipes/sdbus-cpp/all/test_pkgconf/conanfile.py b/recipes/sdbus-cpp/all/test_pkgconf/conanfile.py index 591a984b8692f..3b0485074eb5d 100644 --- a/recipes/sdbus-cpp/all/test_pkgconf/conanfile.py +++ b/recipes/sdbus-cpp/all/test_pkgconf/conanfile.py @@ -3,7 +3,6 @@ from conan import ConanFile from conan.tools.build import can_run from conan.tools.cmake import CMake, cmake_layout -from conan.tools.files import copy class SdbusCppTestConan(ConanFile): @@ -11,19 +10,14 @@ class SdbusCppTestConan(ConanFile): generators = "CMakeToolchain", "PkgConfigDeps", "VirtualBuildEnv", "VirtualRunEnv" test_type = "explicit" + def layout(self): + cmake_layout(self) + def requirements(self): self.requires(self.tested_reference_str) def build_requirements(self): - self.tool_requires("pkgconf/2.1.0") - - def layout(self): - cmake_layout(self) - - def generate(self): - # workaround for https://gitlab.kitware.com/cmake/cmake/-/issues/18150 - copy(self, "*.pc", self.generators_folder, - os.path.join(self.generators_folder, "lib", "pkgconfig")) + self.tool_requires("pkgconf/[>=2.2 <3]") def build(self): cmake = CMake(self) diff --git a/recipes/sdbus-cpp/all/test_v1_pkgconf/conanfile.py b/recipes/sdbus-cpp/all/test_v1_pkgconf/conanfile.py index 29f2d7295e0f4..710a613734954 100644 --- a/recipes/sdbus-cpp/all/test_v1_pkgconf/conanfile.py +++ b/recipes/sdbus-cpp/all/test_v1_pkgconf/conanfile.py @@ -11,7 +11,7 @@ class SdbusCppTestConan(ConanFile): generators = ("cmake", "pkg_config") def build_requirements(self): - self.tool_requires("pkgconf/2.1.0") + self.tool_requires("pkgconf/[>=2.2 <3]") def build(self): cmake = CMake(self) diff --git a/recipes/sdbus-cpp/config.yml b/recipes/sdbus-cpp/config.yml index 16a0828c0e1fc..b633474143962 100644 --- a/recipes/sdbus-cpp/config.yml +++ b/recipes/sdbus-cpp/config.yml @@ -1,4 +1,6 @@ versions: + "2.0.0": + folder: all "1.5.0": folder: all "1.4.0": diff --git a/recipes/sdf/all/test_package/CMakeLists.txt b/recipes/sdf/all/test_package/CMakeLists.txt index afcf11bbd8776..0e0a1b879f436 100644 --- a/recipes/sdf/all/test_package/CMakeLists.txt +++ b/recipes/sdf/all/test_package/CMakeLists.txt @@ -2,7 +2,6 @@ cmake_minimum_required(VERSION 3.1) project(test_package LANGUAGES C) find_package(sdf REQUIRED CONFIG) -find_package(stb REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.c) -target_link_libraries(${PROJECT_NAME} PRIVATE sdf::sdf stb::stb) +target_link_libraries(${PROJECT_NAME} PRIVATE sdf::sdf) diff --git a/recipes/sdf/all/test_package/conanfile.py b/recipes/sdf/all/test_package/conanfile.py index ad5b8f9465ed6..0a6bc68712d90 100644 --- a/recipes/sdf/all/test_package/conanfile.py +++ b/recipes/sdf/all/test_package/conanfile.py @@ -14,7 +14,6 @@ def layout(self): def requirements(self): self.requires(self.tested_reference_str) - self.requires("stb/cci.20210910") def build(self): cmake = CMake(self) @@ -24,5 +23,4 @@ def build(self): def test(self): if can_run(self): bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") - img_path = os.path.join(self.source_folder, "test.png") - self.run(f"{bin_path} {img_path}", env="conanrun") + self.run(bin_path, env="conanrun") diff --git a/recipes/sdf/all/test_package/test.png b/recipes/sdf/all/test_package/test.png deleted file mode 100644 index 568aa3449320a..0000000000000 Binary files a/recipes/sdf/all/test_package/test.png and /dev/null differ diff --git a/recipes/sdf/all/test_package/test_package.c b/recipes/sdf/all/test_package/test_package.c index 808fd873709a9..01f233e85fca3 100644 --- a/recipes/sdf/all/test_package/test_package.c +++ b/recipes/sdf/all/test_package/test_package.c @@ -3,35 +3,14 @@ #define SDF_IMPLEMENTATION #include "sdf.h" -#define STB_IMAGE_IMPLEMENTATION -#include "stb_image.h" - int main(int argc, char **argv) { - if (argc < 2) { - fprintf(stderr, "Need at least one argument\n"); - return 1; - } - - int width, height, bpp; - unsigned char* img_data = stbi_load(argv[1], &width, &height, &bpp, 0); - if(img_data == NULL) - { - fprintf(stderr, "Could not load image: %s\n", stbi_failure_reason()); - return 1; - } - - unsigned char* dest_data = malloc(width * height * bpp); - if(dest_data == NULL) - { - stbi_image_free(img_data); - return 1; - } - - sdfBuildDistanceField(dest_data, width, 2.0f, img_data, width, height, width); + unsigned char* dest_data = malloc(0); + int result = sdfBuildDistanceField(dest_data, 0, 2.0f, NULL, 0, 0, 0); + printf("Result: %d\n", result); + printf("Test"); free(dest_data); - stbi_image_free(img_data); return 0; } diff --git a/recipes/sdf/all/test_v1_package/CMakeLists.txt b/recipes/sdf/all/test_v1_package/CMakeLists.txt index ee4e3e06a56c5..a27e3332baf0d 100644 --- a/recipes/sdf/all/test_v1_package/CMakeLists.txt +++ b/recipes/sdf/all/test_v1_package/CMakeLists.txt @@ -5,7 +5,6 @@ include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) conan_basic_setup(TARGETS) find_package(sdf REQUIRED CONFIG) -find_package(stb REQUIRED CONFIG) add_executable(${PROJECT_NAME} ../test_package/test_package.c) -target_link_libraries(${PROJECT_NAME} PRIVATE sdf::sdf stb::stb) +target_link_libraries(${PROJECT_NAME} PRIVATE sdf::sdf) diff --git a/recipes/sdf/all/test_v1_package/conanfile.py b/recipes/sdf/all/test_v1_package/conanfile.py index 855f0ca3462a1..38f4483872d47 100644 --- a/recipes/sdf/all/test_v1_package/conanfile.py +++ b/recipes/sdf/all/test_v1_package/conanfile.py @@ -6,9 +6,6 @@ class TestPackageConan(ConanFile): settings = "os", "arch", "compiler", "build_type" generators = "cmake", "cmake_find_package_multi" - def requirements(self): - self.requires("stb/cci.20210910") - def build(self): cmake = CMake(self) cmake.configure() @@ -17,5 +14,4 @@ def build(self): def test(self): if not tools.cross_building(self): bin_path = os.path.join("bin", "test_package") - img_path = os.path.join(self.source_folder, os.pardir, "test_package", "test.png") - self.run(f"{bin_path} {img_path}", run_environment=True) + self.run(bin_path, run_environment=True) diff --git a/recipes/sdl/all/conandata.yml b/recipes/sdl/all/conandata.yml index 75e83f8bc9b12..a225ab98d3530 100644 --- a/recipes/sdl/all/conandata.yml +++ b/recipes/sdl/all/conandata.yml @@ -1,34 +1,28 @@ sources: - "2.30.2": - url: "https://www.libsdl.org/release/SDL2-2.30.2.tar.gz" - sha256: "891d66ac8cae51361d3229e3336ebec1c407a8a2a063b61df14f5fdf3ab5ac31" - "2.30.1": - url: "https://www.libsdl.org/release/SDL2-2.30.1.tar.gz" - sha256: "01215ffbc8cfc4ad165ba7573750f15ddda1f971d5a66e9dcaffd37c587f473a" + "2.30.9": + url: "https://www.libsdl.org/release/SDL2-2.30.9.tar.gz" + sha256: "24b574f71c87a763f50704bbb630cbe38298d544a1f890f099a4696b1d6beba4" + "2.30.8": + url: "https://www.libsdl.org/release/SDL2-2.30.8.tar.gz" + sha256: "380c295ea76b9bd72d90075793971c8bcb232ba0a69a9b14da4ae8f603350058" + "2.30.7": + url: "https://www.libsdl.org/release/SDL2-2.30.7.tar.gz" + sha256: "2508c80438cd5ff3bbeb8fe36b8f3ce7805018ff30303010b61b03bb83ab9694" + "2.30.6": + url: "https://www.libsdl.org/release/SDL2-2.30.6.tar.gz" + sha256: "c6ef64ca18a19d13df6eb22df9aff19fb0db65610a74cc81dae33a82235cacd4" + "2.30.5": + url: "https://www.libsdl.org/release/SDL2-2.30.5.tar.gz" + sha256: "f374f3fa29c37dfcc20822d4a7d7dc57e58924d1a5f2ad511bfab4c8193de63b" + "2.30.4": + url: "https://www.libsdl.org/release/SDL2-2.30.4.tar.gz" + sha256: "59c89d0ed40d4efb23b7318aa29fe7039dbbc098334b14f17f1e7e561da31a26" "2.28.5": url: "https://www.libsdl.org/release/SDL2-2.28.5.tar.gz" sha256: "332cb37d0be20cb9541739c61f79bae5a477427d79ae85e352089afdaf6666e4" "2.28.3": url: "https://www.libsdl.org/release/SDL2-2.28.3.tar.gz" sha256: "7acb8679652701a2504d734e2ba7543ec1a83e310498ddd22fd44bf965eb5518" - "2.28.2": - url: "https://www.libsdl.org/release/SDL2-2.28.2.tar.gz" - sha256: "64b1102fa22093515b02ef33dd8739dee1ba57e9dbba6a092942b8bbed1a1c5e" - "2.26.5": - url: "https://www.libsdl.org/release/SDL2-2.26.5.tar.gz" - sha256: "ad8fea3da1be64c83c45b1d363a6b4ba8fd60f5bde3b23ec73855709ec5eabf7" - "2.26.1": - url: "https://www.libsdl.org/release/SDL2-2.26.1.tar.gz" - sha256: "02537cc7ebd74071631038b237ec4bfbb3f4830ba019e569434da33f42373e04" - "2.26.0": - url: "https://www.libsdl.org/release/SDL2-2.26.0.tar.gz" - sha256: "8000d7169febce93c84b6bdf376631f8179132fd69f7015d4dadb8b9c2bdb295" - "2.24.1": - url: "https://www.libsdl.org/release/SDL2-2.24.1.tar.gz" - sha256: "bc121588b1105065598ce38078026a414c28ea95e66ed2adab4c44d80b309e1b" - "2.24.0": - url: "https://www.libsdl.org/release/SDL2-2.24.0.tar.gz" - sha256: "91e4c34b1768f92d399b078e171448c6af18cafda743987ed2064a28954d6d97" "2.0.20": url: "https://www.libsdl.org/release/SDL2-2.0.20.tar.gz" sha256: "c56aba1d7b5b0e7e999e4a7698c70b63a3394ff9704b5f6e1c57e0c16f04dd06" diff --git a/recipes/sdl/all/conanfile.py b/recipes/sdl/all/conanfile.py index cd55e0ceb1b78..c6575cb729918 100644 --- a/recipes/sdl/all/conanfile.py +++ b/recipes/sdl/all/conanfile.py @@ -15,10 +15,10 @@ class SDLConan(ConanFile): name = "sdl" description = "Access to audio, keyboard, mouse, joystick, and graphics hardware via OpenGL, Direct3D and Vulkan" - topics = ("sdl2", "audio", "keyboard", "graphics", "opengl") + license = "Zlib" url = "https://github.com/conan-io/conan-center-index" homepage = "https://www.libsdl.org" - license = "Zlib" + topics = ("sdl2", "audio", "keyboard", "graphics", "opengl") package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { @@ -186,8 +186,7 @@ def build_requirements(self): self.build_requires("wayland/1.22.0") # Provides wayland-scanner def source(self): - get(self, **self.conan_data["sources"][self.version], strip_root=True, - destination=self.source_folder) + get(self, **self.conan_data["sources"][self.version], strip_root=True) def _patch_sources(self): apply_conandata_patches(self) @@ -217,6 +216,8 @@ def _patch_sources(self): "find_program(WAYLAND_SCANNER NAMES wayland-scanner REQUIRED)", 'find_program(WAYLAND_SCANNER NAMES wayland-scanner REQUIRED PATHS "${WAYLAND_BIN_DIR}" NO_DEFAULT_PATH)', ) + if Version(self.version) >= "2.30.6" and not self.options.shared: + replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), "list(APPEND targets SDL2-static)", "set(targets SDL2-static)") def define_toolchain(self): tc = CMakeToolchain(self) @@ -414,7 +415,15 @@ def package_info(self): "AVFoundation", "Foundation", "QuartzCore", ] if self.settings.os == "Macos": - self.cpp_info.components["libsdl2"].frameworks.extend(["Cocoa", "Carbon", "IOKit", "ForceFeedback"]) + self.cpp_info.components["libsdl2"].frameworks.extend([ + "Cocoa", + "Carbon", + "IOKit", + "ForceFeedback", + "CoreFoundation", + "CoreServices", + "AppKit" + ]) self.cpp_info.components["libsdl2"].frameworks.append("GameController") elif self.settings.os in ["iOS", "tvOS", "watchOS"]: self.cpp_info.components["libsdl2"].frameworks.extend([ diff --git a/recipes/sdl/all/test_package/conanfile.py b/recipes/sdl/all/test_package/conanfile.py index 956346bb80854..c21bd201e65b8 100644 --- a/recipes/sdl/all/test_package/conanfile.py +++ b/recipes/sdl/all/test_package/conanfile.py @@ -4,7 +4,6 @@ import os -# It will become the standard on Conan 2.x class TestPackageConan(ConanFile): settings = "os", "arch", "compiler", "build_type" generators = "CMakeDeps", "VirtualRunEnv" diff --git a/recipes/sdl/config.yml b/recipes/sdl/config.yml index fe208cfd7ffb2..dab026397aa4f 100644 --- a/recipes/sdl/config.yml +++ b/recipes/sdl/config.yml @@ -1,23 +1,23 @@ versions: - "2.30.2": + "2.30.9": folder: all - "2.30.1": + "2.30.8": folder: all - "2.28.5": - folder: all - "2.28.3": + "2.30.7": folder: all - "2.28.2": + "2.30.6": folder: all - "2.26.5": + # keep 2.30.5 for sdl_mixer + "2.30.5": folder: all - "2.26.1": + "2.30.4": folder: all - "2.26.0": - folder: all - "2.24.1": + # keep 2.28.5 for pdcurses, ffmpeg, sdl_net, sdl_mixer + "2.28.5": folder: all - "2.24.0": + # keep 2.28.3 for sdl_image, sdl_ttf + "2.28.3": folder: all + # keep 2.0.20 for magnum, ogre "2.0.20": folder: all diff --git a/recipes/sdl_image/all/conanfile.py b/recipes/sdl_image/all/conanfile.py index bca15363d987d..15095b9589cff 100644 --- a/recipes/sdl_image/all/conanfile.py +++ b/recipes/sdl_image/all/conanfile.py @@ -102,7 +102,7 @@ def requirements(self): if self.options.with_libjpeg: self.requires("libjpeg/9e") if self.options.with_libpng: - self.requires("libpng/1.6.40") + self.requires("libpng/[>=1.6 <2]") if self.options.with_libwebp: self.requires("libwebp/1.3.2") if self.options.get_safe("with_avif"): diff --git a/recipes/sdl_mixer/all/CMakeLists.txt b/recipes/sdl_mixer/all/CMakeLists.txt index fa206e6c5d5c7..2dfb3ecfdb114 100644 --- a/recipes/sdl_mixer/all/CMakeLists.txt +++ b/recipes/sdl_mixer/all/CMakeLists.txt @@ -1,19 +1,13 @@ -cmake_minimum_required(VERSION 2.8.12) +cmake_minimum_required(VERSION 3.15) project(sdl2_mixer) -include(conanbuildinfo.cmake) -conan_basic_setup(TARGETS) - include(CheckTypeSize) macro(add_music_option type) option(${type} "${type} music support" OFF) message(STATUS "${type} ${${type}}") - if(${${type}}) + if(${type}) add_definitions("-DMUSIC_${type}") - if(${${type}_DYNAMIC}) - add_definitions("-D${type}_DYNAMIC") - endif() endif() endmacro() @@ -30,73 +24,78 @@ add_music_option(MID_NATIVE) add_music_option(MID_FLUIDSYNTH) add_music_option(MID_TINYMIDI) -if(${MID_NATIVE}) - -set(NATIVE_MIDI_SOURCES -source_subfolder/native_midi/native_midi_common.c -source_subfolder/native_midi/native_midi_common.h -source_subfolder/native_midi/native_midi_haiku.cpp -source_subfolder/native_midi/native_midi_mac.c -source_subfolder/native_midi/native_midi_macosx.c -source_subfolder/native_midi/native_midi_win32.c -) - -set(NATIVE_MIDI_HEADERS -source_subfolder/native_midi/native_midi.h -) - +if(MIDI_NATIVE) + set(NATIVE_MIDI_SOURCES + src/native_midi/native_midi_common.c + src/native_midi/native_midi_common.h + src/native_midi/native_midi_haiku.cpp + src/native_midi/native_midi_mac.c + src/native_midi/native_midi_macosx.c + src/native_midi/native_midi_win32.c + ) + + set(NATIVE_MIDI_HEADERS + src/native_midi/native_midi.h + ) endif() set(SOURCES -source_subfolder/effect_position.c -source_subfolder/effect_stereoreverse.c -source_subfolder/effects_internal.c -source_subfolder/load_aiff.c -source_subfolder/load_voc.c -source_subfolder/mixer.c -source_subfolder/music.c -source_subfolder/music_cmd.c -source_subfolder/music_flac.c -source_subfolder/music_fluidsynth.c -source_subfolder/music_mad.c -source_subfolder/music_mikmod.c -source_subfolder/music_modplug.c -source_subfolder/music_mpg123.c -source_subfolder/music_nativemidi.c -source_subfolder/music_ogg.c -source_subfolder/music_opus.c -source_subfolder/music_timidity.c -source_subfolder/music_wav.c -${NATIVE_MIDI_SOURCES} + src/effect_position.c + src/effect_stereoreverse.c + src/effects_internal.c + src/load_aiff.c + src/load_voc.c + src/mixer.c + src/music.c + src/music_cmd.c + src/music_flac.c + src/music_fluidsynth.c + src/music_mad.c + src/music_mikmod.c + src/music_modplug.c + src/music_mpg123.c + src/music_nativemidi.c + src/music_ogg.c + src/music_opus.c + src/music_timidity.c + src/music_wav.c + ${NATIVE_MIDI_SOURCES} ) set(HEADERS -source_subfolder/effects_internal.h -source_subfolder/load_aiff.h -source_subfolder/load_voc.h -source_subfolder/mixer.h -source_subfolder/music.h -source_subfolder/music_cmd.h -source_subfolder/music_flac.h -source_subfolder/music_fluidsynth.h -source_subfolder/music_mad.h -source_subfolder/music_mikmod.h -source_subfolder/music_modplug.h -source_subfolder/music_mpg123.h -source_subfolder/music_nativemidi.h -source_subfolder/music_ogg.h -source_subfolder/music_opus.h -source_subfolder/music_timidity.h -source_subfolder/music_wav.h -${NATIVE_MIDI_HEADERS} + src/effects_internal.h + src/load_aiff.h + src/load_voc.h + src/mixer.h + src/music.h + src/music_cmd.h + src/music_flac.h + src/music_fluidsynth.h + src/music_mad.h + src/music_mikmod.h + src/music_modplug.h + src/music_mpg123.h + src/music_nativemidi.h + src/music_ogg.h + src/music_opus.h + src/music_timidity.h + src/music_wav.h + ${NATIVE_MIDI_HEADERS} ) add_library(${PROJECT_NAME} ${SOURCES} ${HEADERS}) -target_include_directories(${PROJECT_NAME} PRIVATE "source_subfolder") +target_include_directories(${PROJECT_NAME} PRIVATE "src") -if(${MID_NATIVE}) - target_include_directories(${PROJECT_NAME} PRIVATE "source_subfolder/native_midi") +if(MIDI_NATIVE) + target_include_directories(${PROJECT_NAME} PRIVATE "src/native_midi") + if(APPLE) + # https://github.com/libsdl-org/SDL_mixer/blob/release-2.0.4/configure.in#L380 + target_link_libraries(${PROJECT_NAME} PRIVATE "-framework AudioToolbox" "-framework AudioUnit" "-framework CoreServices") + elseif(WIN32) + # https://github.com/libsdl-org/SDL_mixer/blob/release-2.0.4/configure.in#L376 + target_link_libraries(${PROJECT_NAME} PRIVATE winmm) + endif() endif() find_package(SDL2 CONFIG REQUIRED) @@ -146,9 +145,9 @@ if(MID_TINYMIDI) target_link_libraries(${PROJECT_NAME} PRIVATE tinymidi::tinymidi) endif() -set_target_properties(${PROJECT_NAME} PROPERTIES PUBLIC_HEADER source_subfolder/SDL_mixer.h) +set_target_properties(${PROJECT_NAME} PROPERTIES PUBLIC_HEADER src/SDL_mixer.h) -if(${BUILD_SHARED_LIBS}) +if(BUILD_SHARED_LIBS) target_compile_definitions(${PROJECT_NAME} PRIVATE DLL_EXPORT) endif() @@ -160,8 +159,8 @@ if(SSIZE_T STREQUAL "") endif() install(TARGETS ${PROJECT_NAME} - ARCHIVE DESTINATION "lib" - LIBRARY DESTINATION "lib" - RUNTIME DESTINATION "bin" - PUBLIC_HEADER DESTINATION "include/SDL2" + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib + RUNTIME DESTINATION bin + PUBLIC_HEADER DESTINATION include/SDL2 ) diff --git a/recipes/sdl_mixer/all/conanfile.py b/recipes/sdl_mixer/all/conanfile.py index 7139d07a2b4ea..d2133052c545d 100644 --- a/recipes/sdl_mixer/all/conanfile.py +++ b/recipes/sdl_mixer/all/conanfile.py @@ -1,144 +1,155 @@ -from conans import CMake, tools +import os + from conan import ConanFile +from conan.tools.apple import is_apple_os +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.files import copy from conan.tools.files import get, rmdir -import os -import functools + +required_conan_version = ">=1.57.0" class SDLMixerConan(ConanFile): name = "sdl_mixer" description = "SDL_mixer is a sample multi-channel audio mixer library" - topics = ("sdl_mixer", "sdl2", "sdl", "mixer", "audio", "multimedia", "sound", "music") + license = "Zlib" url = "https://github.com/conan-io/conan-center-index" homepage = "https://www.libsdl.org/projects/SDL_mixer/" - license = "Zlib" - exports_sources = ["CMakeLists.txt"] - generators = "cmake", "cmake_find_package_multi" + topics = ("sdl2", "sdl", "mixer", "audio", "multimedia", "sound", "music") + + package_type = "library" settings = "os", "arch", "compiler", "build_type" - options = {"shared": [True, False], - "fPIC": [True, False], - "cmd": [True, False], - "wav": [True, False], - "flac": [True, False], - "mpg123": [True, False], - "mad": [True, False], - "ogg": [True, False], - "opus": [True, False], - "mikmod": [True, False], - "modplug": [True, False], - "fluidsynth": [True, False], - "nativemidi": [True, False], - "tinymidi": [True, False]} - default_options = {"shared": False, - "fPIC": True, - "cmd": False, # needs sys/wait.h - "wav": True, - "flac": True, - "mpg123": True, - "mad": True, - "ogg": True, - "opus": True, - "mikmod": True, - "modplug": True, - "fluidsynth": False, # TODO: add fluidsynth to Conan Center - "nativemidi": True, - "tinymidi": True} - _source_subfolder = "source_subfolder" - _build_subfolder = "build_subfolder" + options = { + "shared": [True, False], + "fPIC": [True, False], + "cmd": [True, False], + "wav": [True, False], + "flac": [True, False], + "mpg123": [True, False], + "mad": [True, False], + "ogg": [True, False], + "opus": [True, False], + "mikmod": [True, False], + "modplug": [True, False], + "nativemidi": [True, False], + "tinymidi": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + "cmd": False, + "wav": True, + "flac": True, + "mpg123": True, + "mad": True, + "ogg": True, + "opus": True, + "mikmod": True, + "modplug": True, + "nativemidi": True, + "tinymidi": True, + } + + def export_sources(self): + copy(self, "CMakeLists.txt", src=self.recipe_folder, dst=self.export_sources_folder) def config_options(self): if self.settings.os == "Windows": del self.options.fPIC - if self.settings.os != "Linux": - del self.options.tinymidi + if self.settings.os in ["Linux", "FreeBSD"]: + self.options.rm_safe("nativemidi") else: - del self.options.nativemidi + self.options.rm_safe("tinymidi") def configure(self): if self.options.shared: - del self.options.fPIC + self.options.rm_safe("fPIC") if self.options.shared: - del self.options.fPIC - del self.settings.compiler.libcxx - del self.settings.compiler.cppstd + self.options.rm_safe("fPIC") + self.settings.rm_safe("compiler.libcxx") + self.settings.rm_safe("compiler.cppstd") + + def layout(self): + cmake_layout(self, src_folder="src") def requirements(self): - self.requires("sdl/2.0.20") + self.requires("sdl/2.30.5", transitive_headers=True, transitive_libs=True) if self.options.flac: - self.requires("flac/1.3.3") + self.requires("flac/1.4.2") if self.options.mpg123: - self.requires("mpg123/1.29.3") + self.requires("mpg123/1.31.2") if self.options.mad: self.requires("libmad/0.15.1b") if self.options.ogg: self.requires("ogg/1.3.5") self.requires("vorbis/1.3.7") if self.options.opus: - self.requires("openssl/1.1.1q") - self.requires("opus/1.3.1") + self.requires("openssl/[>=1.1 <4]") + self.requires("opus/1.4") self.requires("opusfile/0.12") if self.options.mikmod: self.requires("libmikmod/3.3.11.1") if self.options.modplug: self.requires("libmodplug/0.8.9.0") - if self.options.fluidsynth: - self.requires("fluidsynth/2.2") # TODO: this package is missing on the conan-center-index - if self.settings.os == "Linux": + if self.settings.os in ["Linux", "FreeBSD"]: if self.options.tinymidi: self.requires("tinymidi/cci.20130325") def source(self): - get(self, **self.conan_data["sources"][self.version], strip_root=True, destination=self._source_subfolder) + get(self, **self.conan_data["sources"][self.version], strip_root=True) + rmdir(self, os.path.join(self.source_folder, "external")) - rmdir(self, os.path.join(self._source_subfolder, "external")) - - @functools.lru_cache(1) - def _configure_cmake(self): - cmake = CMake(self) - cmake.definitions["CMD"] = self.options.cmd - cmake.definitions["WAV"] = self.options.wav - cmake.definitions["FLAC"] = self.options.flac - cmake.definitions["MP3_MPG123"] = self.options.mpg123 - cmake.definitions["MP3_MAD"] = self.options.mad - cmake.definitions["OGG"] = self.options.ogg - cmake.definitions["OPUS"] = self.options.opus - cmake.definitions["MOD_MIKMOD"] = self.options.mikmod - cmake.definitions["MOD_MODPLUG"] = self.options.modplug - cmake.definitions["MID_FLUIDSYNTH"] = self.options.fluidsynth - if self.settings.os == "Linux": - cmake.definitions["MID_TINYMIDI"] = self.options.tinymidi - cmake.definitions["MID_NATIVE"] = False + def generate(self): + tc = CMakeToolchain(self) + tc.variables["CMD"] = self.options.cmd + tc.variables["WAV"] = self.options.wav + tc.variables["FLAC"] = self.options.flac + tc.variables["MP3_MPG123"] = self.options.mpg123 + tc.variables["MP3_MAD"] = self.options.mad + tc.variables["OGG"] = self.options.ogg + tc.variables["OPUS"] = self.options.opus + tc.variables["MOD_MIKMOD"] = self.options.mikmod + tc.variables["MOD_MODPLUG"] = self.options.modplug + tc.variables["MID_FLUIDSYNTH"] = False + if self.settings.os in ["Linux", "FreeBSD"]: + tc.variables["MID_TINYMIDI"] = self.options.tinymidi + tc.variables["MIDI_NATIVE"] = False else: - cmake.definitions["MID_TINYMIDI"] = False - cmake.definitions["MID_NATIVE"] = self.options.nativemidi - - cmake.definitions["FLAC_DYNAMIC"] = self.options["flac"].shared if self.options.flac else False - cmake.definitions["MP3_MPG123_DYNAMIC"] = self.options["mpg123"].shared if self.options.mpg123 else False - cmake.definitions["OGG_DYNAMIC"] = self.options["ogg"].shared if self.options.ogg else False - cmake.definitions["OPUS_DYNAMIC"] = self.options["opus"].shared if self.options.opus else False - cmake.definitions["MOD_MIKMOD_DYNAMIC"] = self.options["libmikmod"].shared if self.options.mikmod else False - cmake.definitions["MOD_MODPLUG_DYNAMIC"] = self.options["libmodplug"].shared if self.options.modplug else False - - cmake.configure(build_folder=self._build_subfolder) - - return cmake + tc.variables["MID_TINYMIDI"] = False + tc.variables["MIDI_NATIVE"] = self.options.nativemidi + tc.generate() + tc = CMakeDeps(self) + tc.generate() def build(self): - cmake = self._configure_cmake() + cmake = CMake(self) + cmake.configure(build_script_folder=self.source_path.parent) cmake.build() def package(self): - self.copy(pattern="COPYING.txt", dst="licenses", src=self._source_subfolder) - cmake = self._configure_cmake() + copy(self, "COPYING.txt", + dst=os.path.join(self.package_folder, "licenses"), + src=self.source_folder) + cmake = CMake(self) cmake.install() def package_info(self): - self.cpp_info.set_property("pkg_config_name", "SDL2_mixer") self.cpp_info.set_property("cmake_file_name", "SDL2_mixer") self.cpp_info.set_property("cmake_target_name", "SDL2_mixer::SDL2_mixer") self.cpp_info.set_property("pkg_config_name", "SDL2_mixer") + self.cpp_info.libs = ["SDL2_mixer"] self.cpp_info.includedirs.append(os.path.join("include", "SDL2")) + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.system_libs = ["m"] + + if self.options.get_safe("nativemidi"): + if is_apple_os(self): + # https://github.com/libsdl-org/SDL_mixer/blob/release-2.0.4/configure.in#L380 + self.cpp_info.frameworks.extend(["AudioToolbox", "AudioUnit", "CoreServices"]) + elif self.settings.os == "Windows": + # https://github.com/libsdl-org/SDL_mixer/blob/release-2.0.4/configure.in#L376 + self.cpp_info.system_libs.extend(["winmm"]) self.cpp_info.names["cmake_find_package"] = "SDL2_mixer" self.cpp_info.names["cmake_find_package_multi"] = "SDL2_mixer" diff --git a/recipes/sdl_mixer/all/test_package/CMakeLists.txt b/recipes/sdl_mixer/all/test_package/CMakeLists.txt index cbb6dbc11043a..d1c846300657f 100644 --- a/recipes/sdl_mixer/all/test_package/CMakeLists.txt +++ b/recipes/sdl_mixer/all/test_package/CMakeLists.txt @@ -1,11 +1,7 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.15) project(test_package LANGUAGES C) - -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) - -find_package(SDL2_mixer CONFIG REQUIRED) +find_package(SDL2_mixer REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.c) target_link_libraries(${PROJECT_NAME} PRIVATE SDL2_mixer::SDL2_mixer) diff --git a/recipes/sdl_mixer/all/test_package/conanfile.py b/recipes/sdl_mixer/all/test_package/conanfile.py index 49a3a66ea5bad..ef5d7042163ec 100644 --- a/recipes/sdl_mixer/all/test_package/conanfile.py +++ b/recipes/sdl_mixer/all/test_package/conanfile.py @@ -1,10 +1,19 @@ -from conans import ConanFile, CMake, tools +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake import os class TestPackageConan(ConanFile): - settings = "os", "compiler", "build_type", "arch" - generators = "cmake", "cmake_find_package_multi" + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) def build(self): cmake = CMake(self) @@ -12,6 +21,6 @@ def build(self): cmake.build() def test(self): - if not tools.cross_building(self): - bin_path = os.path.join("bin", "test_package") - self.run(bin_path, run_environment=True) + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/sdl_mixer/all/test_v1_package/CMakeLists.txt b/recipes/sdl_mixer/all/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..91630d79f4abb --- /dev/null +++ b/recipes/sdl_mixer/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/sdl_mixer/all/test_v1_package/conanfile.py b/recipes/sdl_mixer/all/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..49a3a66ea5bad --- /dev/null +++ b/recipes/sdl_mixer/all/test_v1_package/conanfile.py @@ -0,0 +1,17 @@ +from conans import ConanFile, CMake, tools +import os + + +class TestPackageConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake", "cmake_find_package_multi" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if not tools.cross_building(self): + bin_path = os.path.join("bin", "test_package") + self.run(bin_path, run_environment=True) diff --git a/recipes/sdl_net/all/conandata.yml b/recipes/sdl_net/all/conandata.yml index d051057513001..941ee319ca346 100644 --- a/recipes/sdl_net/all/conandata.yml +++ b/recipes/sdl_net/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.2.0": + url: "https://github.com/libsdl-org/SDL_net/releases/download/release-2.2.0/SDL2_net-2.2.0.tar.gz" + sha256: "4e4a891988316271974ff4e9585ed1ef729a123d22c08bd473129179dc857feb" "2.0.1": url: "https://www.libsdl.org/projects/SDL_net/release/SDL2_net-2.0.1.tar.gz" sha256: "15ce8a7e5a23dafe8177c8df6e6c79b6749a03fff1e8196742d3571657609d21" diff --git a/recipes/sdl_net/all/conanfile.py b/recipes/sdl_net/all/conanfile.py index ce2f6091ea9cd..6a4d6d8994d74 100644 --- a/recipes/sdl_net/all/conanfile.py +++ b/recipes/sdl_net/all/conanfile.py @@ -43,7 +43,7 @@ def layout(self): def requirements(self): # SDL_net.h includes SDL.h, SDL_endian.h and SDL_version.h - self.requires("sdl/2.28.2", transitive_headers=True) + self.requires("sdl/2.28.5", transitive_headers=True) def validate(self): if Version(self.version).major != Version(self.dependencies["sdl"].ref.version).major: @@ -65,7 +65,8 @@ def build(self): cmake.build() def package(self): - copy(self, "COPYING.txt", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) + license_file = "COPYING.txt" if Version(self.version) < "2.2.0" else "LICENSE.txt" + copy(self, license_file, self.source_folder, os.path.join(self.package_folder, "licenses")) cmake = CMake(self) cmake.install() diff --git a/recipes/sdl_net/all/test_package/conanfile.py b/recipes/sdl_net/all/test_package/conanfile.py index 3a507f665d331..4c58e9c67e01f 100644 --- a/recipes/sdl_net/all/test_package/conanfile.py +++ b/recipes/sdl_net/all/test_package/conanfile.py @@ -14,7 +14,7 @@ def layout(self): def requirements(self): self.requires(self.tested_reference_str) - self.requires("sdl/2.28.2") + self.requires("sdl/2.28.5") def build(self): cmake = CMake(self) diff --git a/recipes/sdl_net/config.yml b/recipes/sdl_net/config.yml index bb7eb85dfac49..0323e9f109615 100644 --- a/recipes/sdl_net/config.yml +++ b/recipes/sdl_net/config.yml @@ -1,3 +1,5 @@ versions: + "2.2.0": + folder: all "2.0.1": folder: all diff --git a/recipes/sdl_ttf/all/test_package/OpenSans-Bold.ttf b/recipes/sdl_ttf/all/test_package/OpenSans-Bold.ttf deleted file mode 100644 index fd79d43bea029..0000000000000 Binary files a/recipes/sdl_ttf/all/test_package/OpenSans-Bold.ttf and /dev/null differ diff --git a/recipes/sdl_ttf/all/test_package/conanfile.py b/recipes/sdl_ttf/all/test_package/conanfile.py index c4fdfb4dbdc98..0a6bc68712d90 100644 --- a/recipes/sdl_ttf/all/test_package/conanfile.py +++ b/recipes/sdl_ttf/all/test_package/conanfile.py @@ -23,5 +23,4 @@ def build(self): def test(self): if can_run(self): bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") - ttf_path = os.path.join(self.source_folder, "OpenSans-Bold.ttf") - self.run(f"{bin_path} {ttf_path}", env="conanrun") + self.run(bin_path, env="conanrun") diff --git a/recipes/sdl_ttf/all/test_package/test_package.c b/recipes/sdl_ttf/all/test_package/test_package.c index 2050bc43e4215..20d9fde4b5f07 100644 --- a/recipes/sdl_ttf/all/test_package/test_package.c +++ b/recipes/sdl_ttf/all/test_package/test_package.c @@ -4,23 +4,11 @@ #include int main(int argc, char **argv) { - if (argc < 2) { - fprintf(stderr, "Need at least one argument\n"); - return 1; - } - if (TTF_Init() == -1) { fprintf(stderr, "Failed to initialize TTF: %s\n", SDL_GetError()); return 1; } - TTF_Font *font = TTF_OpenFont(argv[1], 16); - - if (font == NULL) { - fprintf(stderr, "Failed to load font: %s\n", SDL_GetError()); - return 1; - } - printf("SDL2_ttf is working!\n"); return 0; diff --git a/recipes/sdl_ttf/all/test_v1_package/conanfile.py b/recipes/sdl_ttf/all/test_v1_package/conanfile.py index 7b775db727c08..38f4483872d47 100644 --- a/recipes/sdl_ttf/all/test_v1_package/conanfile.py +++ b/recipes/sdl_ttf/all/test_v1_package/conanfile.py @@ -14,5 +14,4 @@ def build(self): def test(self): if not tools.cross_building(self): bin_path = os.path.join("bin", "test_package") - ttf_path = os.path.join(self.source_folder, os.pardir, "test_package", "OpenSans-Bold.ttf") - self.run(f"{bin_path} {ttf_path}", run_environment=True) + self.run(bin_path, run_environment=True) diff --git a/recipes/sentry-native/all/conandata.yml b/recipes/sentry-native/all/conandata.yml index f41e33dbbde14..724d5f3222de5 100644 --- a/recipes/sentry-native/all/conandata.yml +++ b/recipes/sentry-native/all/conandata.yml @@ -1,13 +1,13 @@ sources: - "0.7.2": - url: "https://github.com/getsentry/sentry-native/releases/download/0.7.2/sentry-native.zip" - sha256: "afb44d5cc4e0ec5f2e8068132c68256959188f6bf015e1837e7cc687014b9c70" - "0.7.1": - url: "https://github.com/getsentry/sentry-native/releases/download/0.7.1/sentry-native.zip" - sha256: "c450a064b0dbb1883a355455db2b6469abef59c04686a53719384bbc7ff507d3" - "0.7.0": - url: "https://github.com/getsentry/sentry-native/releases/download/0.7.0/sentry-native.zip" - sha256: "4dfccc879a81771b9da1c335947ffc9e5987ca3d16b3035efa2c66a06f727543" + "0.7.12": + url: "https://github.com/getsentry/sentry-native/releases/download/0.7.12/sentry-native.zip" + sha256: "03c99ef84992fddd37f79c63ae78a69ec49b1b1d7598c7a7c5d8e6742b97ea0a" + "0.7.11": + url: "https://github.com/getsentry/sentry-native/releases/download/0.7.11/sentry-native.zip" + sha256: "7fb41a8e5270168958d867504f503beb014035f382edaa07132be65348df27e0" + "0.7.10": + url: "https://github.com/getsentry/sentry-native/releases/download/0.7.10/sentry-native.zip" + sha256: "b7f7b5002cf7a4c614736ac294351da499db4f7fe155a452d527e69badc672bc" "0.6.6": url: "https://github.com/getsentry/sentry-native/releases/download/0.6.6/sentry-native.zip" sha256: "7a98467c0b2571380a3afc5e681cb13aa406a709529be12d74610b0015ccde0c" diff --git a/recipes/sentry-native/all/conanfile.py b/recipes/sentry-native/all/conanfile.py index 2f31f5efdc35b..8c7c36679a563 100644 --- a/recipes/sentry-native/all/conanfile.py +++ b/recipes/sentry-native/all/conanfile.py @@ -1,3 +1,5 @@ +import os + from conan import ConanFile from conan.errors import ConanInvalidConfiguration from conan.tools.apple import is_apple_os @@ -5,11 +7,9 @@ from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout from conan.tools.env import VirtualBuildEnv from conan.tools.files import copy, get, rm, rmdir -from conan.tools.microsoft import is_msvc from conan.tools.scm import Version -import os -required_conan_version = ">=1.55.0" +required_conan_version = ">=2.1" class SentryNativeConan(ConanFile): @@ -35,7 +35,7 @@ class SentryNativeConan(ConanFile): "with_crashpad": ["google", "sentry"], "crashpad_with_tls": ["openssl", False], "with_breakpad": ["google", "sentry"], - "wer" : [True, False], + "wer": [True, False], } default_options = { "shared": False, @@ -46,15 +46,28 @@ class SentryNativeConan(ConanFile): "with_crashpad": "sentry", "crashpad_with_tls": "openssl", "with_breakpad": "sentry", - "wer": False + "wer": False, } @property def _min_cppstd(self): - return "17" + if Version(self.version) >= "0.7.8" and self.options.get_safe("with_crashpad") == "sentry": + return "20" + else: + return "17" @property def _minimum_compilers_version(self): + if Version(self.version) >= "0.7.8" and self.options.get_safe("with_crashpad") == "sentry": + # Sentry-native 0.7.8 requires C++20: Concepts and bit_cast + # https://github.com/chromium/mini_chromium/blob/e49947ad445c4ed4bc1bb4ed60bbe0fe17efe6ec/base/numerics/byte_conversions.h#L88 + return { + "Visual Studio": "16", + "msvc": "192", + "gcc": "11", + "clang": "14", + "apple-clang": "14", + } minimum_gcc_version = "5" if self.options.get_safe("backend") == "breakpad" or self.options.get_safe("backend") == "crashpad": minimum_gcc_version = "7" @@ -118,8 +131,7 @@ def requirements(self): self.requires("openssl/[>=1.1 <4]") def validate(self): - if self.settings.compiler.get_safe("cppstd"): - check_min_cppstd(self, self._min_cppstd) + check_min_cppstd(self, self._min_cppstd) minimum_version = self._minimum_compilers_version.get(str(self.settings.compiler), False) if minimum_version and Version(self.settings.compiler.version) < minimum_version: @@ -289,30 +301,3 @@ def package_info(self): bin_path = os.path.join(self.package_folder, "bin") self.output.info(f"Appending PATH environment variable: {bin_path}") self.env_info.PATH.append(bin_path) - - # TODO: to remove in conan v2 once cmake_find_package* generators removed - self.cpp_info.names["cmake_find_package"] = "crashpad" - self.cpp_info.names["cmake_find_package_multi"] = "crashpad" - self.cpp_info.components["crashpad_mini_chromium"].names["cmake_find_package"] = "mini_chromium" - self.cpp_info.components["crashpad_mini_chromium"].names["cmake_find_package_multi"] = "mini_chromium" - self.cpp_info.components["crashpad_compat"].names["cmake_find_package"] = "compat" - self.cpp_info.components["crashpad_compat"].names["cmake_find_package_multi"] = "compat" - self.cpp_info.components["crashpad_util"].names["cmake_find_package"] = "util" - self.cpp_info.components["crashpad_util"].names["cmake_find_package_multi"] = "util" - self.cpp_info.components["crashpad_client"].names["cmake_find_package"] = "client" - self.cpp_info.components["crashpad_client"].names["cmake_find_package_multi"] = "client" - self.cpp_info.components["crashpad_snapshot"].names["cmake_find_package"] = "snapshot" - self.cpp_info.components["crashpad_snapshot"].names["cmake_find_package_multi"] = "snapshot" - self.cpp_info.components["crashpad_minidump"].names["cmake_find_package"] = "minidump" - self.cpp_info.components["crashpad_minidump"].names["cmake_find_package_multi"] = "minidump" - if self.settings.os == "Windows": - self.cpp_info.components["crashpad_getopt"].names["cmake_find_package"] = "getopt" - self.cpp_info.components["crashpad_getopt"].names["cmake_find_package_multi"] = "getopt" - self.cpp_info.components["crashpad_handler"].names["cmake_find_package"] = "handler" - self.cpp_info.components["crashpad_handler"].names["cmake_find_package_multi"] = "handler" - self.cpp_info.components["crashpad_tools"].names["cmake_find_package"] = "tools" - self.cpp_info.components["crashpad_tools"].names["cmake_find_package_multi"] = "tools" - - # TODO: to remove in conan v2 once cmake_find_package* generators removed - self.cpp_info.names["cmake_find_package"] = "sentry" - self.cpp_info.names["cmake_find_package_multi"] = "sentry" diff --git a/recipes/sentry-native/config.yml b/recipes/sentry-native/config.yml index a18579e4a1c1e..9c5f541fd3675 100644 --- a/recipes/sentry-native/config.yml +++ b/recipes/sentry-native/config.yml @@ -1,9 +1,9 @@ versions: - "0.7.2": + "0.7.12": folder: all - "0.7.1": + "0.7.11": folder: all - "0.7.0": + "0.7.10": folder: all "0.6.6": folder: all diff --git a/recipes/seqan3/all/conandata.yml b/recipes/seqan3/all/conandata.yml index 7b4ddfdc76fc6..ee19f74eeca81 100644 --- a/recipes/seqan3/all/conandata.yml +++ b/recipes/seqan3/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "3.3.0": + url: "https://github.com/seqan/seqan3/releases/download/3.3.0/seqan3-3.3.0-Source.tar.xz" + sha256: "da2fb621268ebc52b9cc26087e96f4a94109db1f4f28d363d19c7c9cdbd788b1" "3.1.0": - url: https://github.com/seqan/seqan3/releases/download/3.1.0/seqan3-3.1.0-Source.tar.xz - sha256: 0b37b1c3450e19c0ebe42c052c3f87babb8074bd772f10a553949c312c285726 + url: "https://github.com/seqan/seqan3/releases/download/3.1.0/seqan3-3.1.0-Source.tar.xz" + sha256: "0b37b1c3450e19c0ebe42c052c3f87babb8074bd772f10a553949c312c285726" diff --git a/recipes/seqan3/all/conanfile.py b/recipes/seqan3/all/conanfile.py index 10b57ed42fdf7..9ea0680d5bf45 100644 --- a/recipes/seqan3/all/conanfile.py +++ b/recipes/seqan3/all/conanfile.py @@ -28,7 +28,9 @@ def _min_cppstd(self): @property def _compilers_minimum_version(self): - return {"gcc": "10"} + if Version(self.version) < "3.3.0": + return {"gcc": "10"} + return {"gcc": "11"} def layout(self): basic_layout(self, src_folder="src") @@ -44,11 +46,8 @@ def validate(self): check_min_cppstd(self, self._min_cppstd) minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) - if minimum_version: - if Version(self.settings.compiler.version) < minimum_version: - raise ConanInvalidConfiguration("SeqAn3 requires C++20, which your compiler does not fully support.") - else: - self.output.warning("SeqAn3 requires C++20. Your compiler is unknown. Assuming it supports C++20.") + if minimum_version and Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration("SeqAn3 requires C++20, which your compiler does not fully support.") if self.settings.compiler == "gcc" and self.settings.compiler.libcxx != "libstdc++11": self.output.warning("SeqAn3 does not actively support libstdc++, consider using libstdc++11 instead.") diff --git a/recipes/seqan3/config.yml b/recipes/seqan3/config.yml index 9370babb6565a..8d4de7c167625 100644 --- a/recipes/seqan3/config.yml +++ b/recipes/seqan3/config.yml @@ -1,3 +1,5 @@ versions: + "3.3.0": + folder: "all" "3.1.0": folder: "all" diff --git a/recipes/sfl/all/conandata.yml b/recipes/sfl/all/conandata.yml index 121900e615afb..93608ba5ad222 100644 --- a/recipes/sfl/all/conandata.yml +++ b/recipes/sfl/all/conandata.yml @@ -1,4 +1,19 @@ sources: + "1.8.0": + url: "https://github.com/slavenf/sfl-library/archive/refs/tags/1.8.0.tar.gz" + sha256: "bb473a8e0b46ecff957c06112593b9a4104e0d1ec8e9d5840ff33c20ad3a243e" + "1.7.0": + url: "https://github.com/slavenf/sfl-library/archive/refs/tags/1.7.0.tar.gz" + sha256: "9e09bacc51cfb085c4a6030f90cbea45685de608900d6b7b3c0a9f4971682652" + "1.6.0": + url: "https://github.com/slavenf/sfl-library/archive/refs/tags/1.6.0.tar.gz" + sha256: "f5121d95c2f3922da4f1cec9bb6045d8733892ddc55ee3c47c99e761e5df5ec4" + "1.5.0": + url: "https://github.com/slavenf/sfl-library/archive/refs/tags/1.5.0.tar.gz" + sha256: "767d9b3627540071d2a80f18f034d80d6e9eaffc027876c7898c51aeebd3bf37" + "1.4.0": + url: "https://github.com/slavenf/sfl-library/archive/refs/tags/1.4.0.tar.gz" + sha256: "dcdc6c40a60116075910e3321fe12065142d78f4947826aac263ade1d84d449a" "1.3.1": url: "https://github.com/slavenf/sfl-library/archive/refs/tags/1.3.1.tar.gz" sha256: "e541857067ae3e6c8d9933736e70ef92c1ce0a0e374872497328edd2e4e47ae9" diff --git a/recipes/sfl/config.yml b/recipes/sfl/config.yml index 6afe808172f22..e2decd2fe802d 100644 --- a/recipes/sfl/config.yml +++ b/recipes/sfl/config.yml @@ -1,4 +1,14 @@ versions: + "1.8.0": + folder: "all" + "1.7.0": + folder: "all" + "1.6.0": + folder: "all" + "1.5.0": + folder: "all" + "1.4.0": + folder: "all" "1.3.1": folder: "all" "1.3.0": diff --git a/recipes/shaderc/all/CMakeLists.txt b/recipes/shaderc/all/CMakeLists.txt deleted file mode 100644 index 4d393c7a86c09..0000000000000 --- a/recipes/shaderc/all/CMakeLists.txt +++ /dev/null @@ -1,7 +0,0 @@ -cmake_minimum_required(VERSION 3.1.2) -project(cmake_wrapper) - -include(conanbuildinfo.cmake) -conan_basic_setup(TARGETS) - -add_subdirectory("source_subfolder") diff --git a/recipes/shaderc/all/conandata.yml b/recipes/shaderc/all/conandata.yml index 36e3a9f3b6b76..25858ddef7954 100644 --- a/recipes/shaderc/all/conandata.yml +++ b/recipes/shaderc/all/conandata.yml @@ -1,16 +1,47 @@ sources: + "2024.1": + url: "https://github.com/google/shaderc/archive/refs/tags/v2024.1.tar.gz" + sha256: "eb3b5f0c16313d34f208d90c2fa1e588a23283eed63b101edd5422be6165d528" + "2023.6": + url: "https://github.com/google/shaderc/archive/refs/tags/v2023.6.tar.gz" + sha256: "e40fd4a87a56f6610e223122179f086d5c4f11a7e0e2aa461f0325c3a0acc6ae" "2021.1": url: "https://github.com/google/shaderc/archive/v2021.1.tar.gz" sha256: "047113bc4628da164a3cb845efc20d442728873f6054a68ab56d04a053f2c32b" - "2019.0": - url: "https://github.com/google/shaderc/archive/v2019.0.tar.gz" - sha256: "1018cd02be52295272fdbffa056ee24b881be277c83d039ad554d91230f4e11b" patches: + "2024.1": + - patch_file: "patches/2023.6/use-conan-dependencies.patch" + patch_description: "Replace third_party with Conan dependencies" + patch_type: "conan" + - patch_file: "patches/2021.1/adapt-update_build_version.py.patch" + patch_description: "Adapt update_build_version.py for Conan" + patch_type: "conan" + - patch_file: "patches/2021.1/install-shaderc_util.patch" + patch_description: "install() shaderc_util" + patch_type: "conan" + "2023.6": + - patch_file: "patches/2023.6/use-conan-dependencies.patch" + patch_description: "Replace third_party with Conan dependencies" + patch_type: "conan" + - patch_file: "patches/2021.1/adapt-update_build_version.py.patch" + patch_description: "Adapt update_build_version.py for Conan" + patch_type: "conan" + - patch_file: "patches/2021.1/install-shaderc_util.patch" + patch_description: "install() shaderc_util" + patch_type: "conan" "2021.1": - - patch_file: "patches/2021.1/fix-cmake.patch" - base_path: "source_subfolder" - "2019.0": - - patch_file: "patches/2019.0/fix-cmake.patch" - base_path: "source_subfolder" - - patch_file: "patches/2019.0/fix-spvc.patch" - base_path: "source_subfolder" + - patch_file: "patches/2021.1/use-conan-dependencies.patch" + patch_description: "Replace third_party with Conan dependencies" + patch_type: "conan" + - patch_file: "patches/2021.1/adapt-update_build_version.py.patch" + patch_description: "Adapt update_build_version.py for Conan" + patch_type: "conan" + - patch_file: "patches/2021.1/install-shaderc_util.patch" + patch_description: "install() shaderc_util" + patch_type: "conan" +siprv_mapping: + # TODO: bump me once newer versions are available on CCI + "2024.1": "1.3.261.1" + # "2023.6": "1.3.261.1" + "2023.6": "1.3.239.0" + "2021.1": "1.3.224.0" diff --git a/recipes/shaderc/all/conanfile.py b/recipes/shaderc/all/conanfile.py index 431f1292c6d2f..309b53f6cb235 100644 --- a/recipes/shaderc/all/conanfile.py +++ b/recipes/shaderc/all/conanfile.py @@ -1,131 +1,133 @@ -from conans import ConanFile, CMake, tools import os -required_conan_version = ">=1.36.0" +from conan import ConanFile +from conan.tools.build import check_min_cppstd, stdcpp_library +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.env import VirtualBuildEnv +from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rmdir +from conan.tools.microsoft import is_msvc, is_msvc_static_runtime +from conan.tools.apple import fix_apple_shared_install_name + +required_conan_version = ">=1.53.0" class ShadercConan(ConanFile): name = "shaderc" description = "A collection of tools, libraries and tests for shader compilation." license = "Apache-2.0" - topics = ("glsl", "hlsl", "msl", "spirv", "spir-v", "glslc", "spvc") - homepage = "https://github.com/google/shaderc" url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/google/shaderc" + topics = ("glsl", "hlsl", "msl", "spirv", "spir-v", "glslc") + package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], "fPIC": [True, False], - "spvc": [True, False], } default_options = { "shared": False, "fPIC": True, - "spvc": False, } - generators = "cmake" - _cmake = None - - @property - def _source_subfolder(self): - return "source_subfolder" - - @property - def _build_subfolder(self): - return "build_subfolder" - def export_sources(self): - self.copy("CMakeLists.txt") - for patch in self.conan_data.get("patches", {}).get(self.version, []): - self.copy(patch["patch_file"]) + export_conandata_patches(self) def config_options(self): if self.settings.os == "Windows": del self.options.fPIC - if tools.Version(self.version) >= "2020.4": - del self.options.spvc def configure(self): if self.options.shared: - del self.options.fPIC + self.options.rm_safe("fPIC") - @property - def _get_compatible_spirv_tools_version(self): - return { - "2021.1": "2021.2", - "2019.0": "2020.5" - }.get(str(self.version), False) + def layout(self): + cmake_layout(self, src_folder="src") @property - def _get_compatible_glslang_version(self): - return { - "2021.1": "11.5.0", - "2019.0": "8.13.3559" - }.get(str(self.version), False) + def _spirv_version(self): + return self.conan_data.get("siprv_mapping")[self.version] def requirements(self): - self.requires("glslang/{}".format(self._get_compatible_glslang_version)) - self.requires("spirv-tools/{}".format(self._get_compatible_spirv_tools_version)) - if self.options.get_safe("spvc", False): - self.requires("spirv-cross/20210115") + # transitive_headers=True is not required for any of the dependencies + self.requires(f"glslang/{self._spirv_version}") + self.requires(f"spirv-tools/{self._spirv_version}") + self.requires(f"spirv-headers/{self._spirv_version}") def validate(self): if self.settings.compiler.get_safe("cppstd"): - tools.check_min_cppstd(self, 11) + check_min_cppstd(self, 11) + + def build_requirements(self): + self.tool_requires("cmake/[>=3.17.2 <4]") def source(self): - tools.get(**self.conan_data["sources"][self.version], destination=self._source_subfolder, strip_root=True) + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + venv = VirtualBuildEnv(self) + venv.generate() + + tc = CMakeToolchain(self) + tc.cache_variables["SHADERC_SKIP_INSTALL"] = False + tc.cache_variables["SHADERC_SKIP_EXAMPLES"] = True + tc.cache_variables["SHADERC_SKIP_TESTS"] = True + tc.cache_variables["ENABLE_CODE_COVERAGE"] = False + tc.cache_variables["SHADERC_ENABLE_WERROR_COMPILE"] = False + if is_msvc(self): + tc.cache_variables["SHADERC_ENABLE_SHARED_CRT"] = not is_msvc_static_runtime(self) + tc.generate() + + self.dependencies["glslang"].cpp_info.components["glslang-core"].includedirs.append( + os.path.join(self.dependencies["glslang"].package_folder, "include", "glslang") + ) + + deps = CMakeDeps(self) + deps.set_property("glslang::glslang-core", "cmake_target_name", "glslang") + deps.set_property("glslang::osdependent", "cmake_target_name", "OSDependent") + deps.set_property("glslang::oglcompiler", "cmake_target_name", "OGLCompiler") + deps.set_property("glslang::hlsl", "cmake_target_name", "HLSL") + deps.set_property("glslang::spirv", "cmake_target_name", "SPIRV") + deps.generate() def build(self): - for patch in self.conan_data.get("patches", {}).get(self.version, []): - tools.patch(**patch) - cmake = self._configure_cmake() + apply_conandata_patches(self) + cmake = CMake(self) + cmake.configure() cmake.build() - def _configure_cmake(self): - if self._cmake: - return self._cmake - self._cmake = CMake(self) - self._cmake.definitions["CMAKE_POSITION_INDEPENDENT_CODE"] = self.options.get_safe("fPIC", True) - self._cmake.definitions["SHADERC_ENABLE_SPVC"] = self.options.get_safe("spvc", False) - self._cmake.definitions["SHADERC_SKIP_INSTALL"] = False - self._cmake.definitions["SHADERC_SKIP_TESTS"] = True - self._cmake.definitions["SHADERC_SPVC_ENABLE_DIRECT_LOGGING"] = False - self._cmake.definitions["SHADERC_SPVC_DISABLE_CONTEXT_LOGGING"] = False - self._cmake.definitions["SHADERC_ENABLE_WERROR_COMPILE"] = False - if self.settings.compiler == "Visual Studio": - self._cmake.definitions["SHADERC_ENABLE_SHARED_CRT"] = str(self.settings.compiler.runtime).startswith("MD") - self._cmake.definitions["ENABLE_CODE_COVERAGE"] = False - if tools.is_apple_os(self.settings.os): - self._cmake.definitions["CMAKE_MACOSX_BUNDLE"] = False - self._cmake.configure(build_folder=self._build_subfolder) - return self._cmake - def package(self): - self.copy("LICENSE", dst="licenses", src=self._source_subfolder) - cmake = self._configure_cmake() + copy(self, "LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) + cmake = CMake(self) cmake.install() - tools.rmdir(os.path.join(self.package_folder, "lib", "pkgconfig")) + fix_apple_shared_install_name(self) + rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) def package_info(self): - self.cpp_info.set_property("pkg_config_name", "shaderc" if self.options.shared else "shaderc_static") - self.cpp_info.libs = self._get_ordered_libs() - if self.settings.os in ["Linux", "FreeBSD"]: - self.cpp_info.system_libs.append("pthread") - if not self.options.shared and tools.stdcpp_library(self): - self.cpp_info.system_libs.append(tools.stdcpp_library(self)) if self.options.shared: + self.cpp_info.set_property("pkg_config_name", "shaderc") + self.cpp_info.libs = ["shaderc_shared"] self.cpp_info.defines.append("SHADERC_SHAREDLIB") + else: + self.cpp_info.set_property("pkg_config_name", "shaderc_static") + self.cpp_info.libs = ["shaderc", "shaderc_util"] + if stdcpp_library(self): + self.cpp_info.system_libs.append(stdcpp_library(self)) + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.system_libs.append("pthread") + + self.cpp_info.requires = [ + "glslang::glslang-core", + "glslang::osdependent", + "glslang::oglcompiler", + "glslang::hlsl", + "glslang::spirv", + "spirv-tools::spirv-tools-core", + "spirv-tools::spirv-tools-opt", + "spirv-headers::spirv-headers" + ] + + # TODO: to remove in conan v2 bin_path = os.path.join(self.package_folder, "bin") - self.output.info("Appending PATH environment variable: {}".format(bin_path)) self.env_info.PATH.append(bin_path) - - def _get_ordered_libs(self): - libs = ["shaderc_shared" if self.options.shared else "shaderc"] - if not self.options.shared: - libs.append("shaderc_util") - if self.options.get_safe("spvc", False): - libs.append("shaderc_spvc_shared" if self.options.shared else "shaderc_spvc") - return libs diff --git a/recipes/shaderc/all/patches/2019.0/fix-cmake.patch b/recipes/shaderc/all/patches/2019.0/fix-cmake.patch deleted file mode 100644 index 1fee3bf35ecf3..0000000000000 --- a/recipes/shaderc/all/patches/2019.0/fix-cmake.patch +++ /dev/null @@ -1,402 +0,0 @@ ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -70,7 +70,6 @@ endif(MSVC) - - # Configure subdirectories. - # We depend on these for later projects, so they should come first. --add_subdirectory(third_party) - - if(SHADERC_ENABLE_SPVC) - add_subdirectory(libshaderc_spvc) -@@ -79,12 +78,11 @@ endif() - add_subdirectory(libshaderc_util) - add_subdirectory(libshaderc) - add_subdirectory(glslc) --add_subdirectory(examples) - - add_custom_target(build-version - ${PYTHON_EXECUTABLE} - ${CMAKE_CURRENT_SOURCE_DIR}/utils/update_build_version.py -- ${shaderc_SOURCE_DIR} ${spirv-tools_SOURCE_DIR} ${glslang_SOURCE_DIR} -+ ${shaderc_SOURCE_DIR} - COMMENT "Update build-version.inc in the Shaderc build directory (if necessary).") - - function(define_pkg_config_file NAME LIBS) ---- a/cmake/utils.cmake -+++ b/cmake/utils.cmake -@@ -11,7 +11,6 @@ function(shaderc_default_c_compile_options TARGET) - if (NOT "${MSVC}") - target_compile_options(${TARGET} PRIVATE -Wall -Werror -fvisibility=hidden) - if (NOT "${MINGW}") -- target_compile_options(${TARGET} PRIVATE -fPIC) - endif() - if (ENABLE_CODE_COVERAGE) - # The --coverage option is a synonym for -fprofile-arcs -ftest-coverage -@@ -24,10 +23,6 @@ function(shaderc_default_c_compile_options TARGET) - endif() - if (NOT SHADERC_ENABLE_SHARED_CRT) - if (WIN32) -- # For MinGW cross compile, statically link to the libgcc runtime. -- # But it still depends on MSVCRT.dll. -- set_target_properties(${TARGET} PROPERTIES -- LINK_FLAGS "-static -static-libgcc") - endif(WIN32) - endif(NOT SHADERC_ENABLE_SHARED_CRT) - else() -@@ -40,13 +35,8 @@ endfunction(shaderc_default_c_compile_options) - function(shaderc_default_compile_options TARGET) - shaderc_default_c_compile_options(${TARGET}) - if (NOT "${MSVC}") -- target_compile_options(${TARGET} PRIVATE -std=c++11) - if (NOT SHADERC_ENABLE_SHARED_CRT) - if (WIN32) -- # For MinGW cross compile, statically link to the C++ runtime. -- # But it still depends on MSVCRT.dll. -- set_target_properties(${TARGET} PROPERTIES -- LINK_FLAGS "-static -static-libgcc -static-libstdc++") - endif(WIN32) - endif(NOT SHADERC_ENABLE_SHARED_CRT) - endif() ---- a/glslc/CMakeLists.txt -+++ b/glslc/CMakeLists.txt -@@ -16,31 +16,19 @@ add_library(glslc STATIC - ) - - shaderc_default_compile_options(glslc) --target_include_directories(glslc PUBLIC ${glslang_SOURCE_DIR}) --target_link_libraries(glslc PRIVATE glslang OSDependent OGLCompiler -- HLSL glslang SPIRV ${CMAKE_THREAD_LIBS_INIT}) --target_link_libraries(glslc PRIVATE shaderc_util shaderc) -+target_link_libraries(glslc PRIVATE ${CMAKE_THREAD_LIBS_INIT}) -+target_link_libraries(glslc PUBLIC shaderc_util shaderc) - - add_executable(glslc_exe src/main.cc) - shaderc_default_compile_options(glslc_exe) --target_include_directories(glslc_exe PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/.. ${spirv-tools_SOURCE_DIR}/include) -+target_include_directories(glslc_exe PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/..) - set_target_properties(glslc_exe PROPERTIES OUTPUT_NAME glslc) --target_link_libraries(glslc_exe PRIVATE glslc shaderc_util shaderc) -+target_link_libraries(glslc_exe PRIVATE glslc shaderc_util shaderc CONAN_PKG::spirv-tools) - add_dependencies(glslc_exe build-version) - --shaderc_add_tests( -- TEST_PREFIX glslc -- LINK_LIBS glslc shaderc_util shaderc -- TEST_NAMES -- file -- resource_parse -- stage) -- - shaderc_add_asciidoc(glslc_doc_README README) - - if(SHADERC_ENABLE_INSTALL) - install(TARGETS glslc_exe - RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) - endif(SHADERC_ENABLE_INSTALL) -- --add_subdirectory(test) ---- a/libshaderc/CMakeLists.txt -+++ b/libshaderc/CMakeLists.txt -@@ -10,18 +10,16 @@ set(SHADERC_SOURCES - src/shaderc_private.h - ) - --add_library(shaderc STATIC ${SHADERC_SOURCES}) -+add_library(shaderc ${SHADERC_SOURCES}) - shaderc_default_compile_options(shaderc) --target_include_directories(shaderc PUBLIC include PRIVATE ${glslang_SOURCE_DIR}) -- --add_library(shaderc_shared SHARED ${SHADERC_SOURCES}) --shaderc_default_compile_options(shaderc_shared) --target_include_directories(shaderc_shared PUBLIC include PRIVATE ${glslang_SOURCE_DIR}) --target_compile_definitions(shaderc_shared -- PRIVATE SHADERC_IMPLEMENTATION -- PUBLIC SHADERC_SHAREDLIB --) --set_target_properties(shaderc_shared PROPERTIES SOVERSION 1) -+target_include_directories(shaderc PUBLIC include) -+if(BUILD_SHARED_LIBS) -+ target_compile_definitions(shaderc -+ PRIVATE SHADERC_IMPLEMENTATION -+ PUBLIC SHADERC_SHAREDLIB -+ ) -+ set_target_properties(shaderc PROPERTIES OUTPUT_NAME "shaderc_shared" SOVERSION 1) -+endif() - - if(SHADERC_ENABLE_INSTALL) - install( -@@ -34,70 +32,19 @@ if(SHADERC_ENABLE_INSTALL) - DESTINATION - ${CMAKE_INSTALL_INCLUDEDIR}/shaderc) - -- install(TARGETS shaderc shaderc_shared -+ install(TARGETS shaderc - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} - RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) - endif(SHADERC_ENABLE_INSTALL) - --find_package(Threads) - set(SHADERC_LIBS -- glslang OSDependent OGLCompiler glslang ${CMAKE_THREAD_LIBS_INIT} - shaderc_util -- SPIRV # from glslang -- SPIRV-Tools -+ "CONAN_PKG::glslang" -+ "CONAN_PKG::spirv-tools" - ) - - target_link_libraries(shaderc PRIVATE ${SHADERC_LIBS}) --target_link_libraries(shaderc_shared PRIVATE ${SHADERC_LIBS}) -- --shaderc_add_tests( -- TEST_PREFIX shaderc -- LINK_LIBS shaderc -- INCLUDE_DIRS include ${shaderc_SOURCE_DIR}/libshaderc_util/include ${glslang_SOURCE_DIR} -- ${spirv-tools_SOURCE_DIR}/include -- TEST_NAMES -- shaderc -- shaderc_cpp -- shaderc_private) -- --shaderc_add_tests( -- TEST_PREFIX shaderc_shared -- LINK_LIBS shaderc_shared SPIRV-Tools -- INCLUDE_DIRS include ${shaderc_SOURCE_DIR}/libshaderc_util/include ${glslang_SOURCE_DIR} -- ${spirv-tools_SOURCE_DIR}/include -- TEST_NAMES -- shaderc -- shaderc_cpp -- shaderc_private) -- --shaderc_combine_static_lib(shaderc_combined shaderc) -- --if(SHADERC_ENABLE_INSTALL) -- # Since shaderc_combined is defined as an imported library, we cannot use the -- # install() directive to install it. Install it like a normal file. -- get_target_property(generated_location shaderc_combined LOCATION) -- string(REGEX MATCH "Visual Studio .*" vs_generator "${CMAKE_GENERATOR}") -- if (NOT "${vs_generator}" STREQUAL "") -- # With Visual Studio generators, the LOCATION property is not properly -- # expanded according to the current build configuration. We need to work -- # around this problem by manually substitution. -- string(REPLACE "$(Configuration)" "\${CMAKE_INSTALL_CONFIG_NAME}" -- install_location "${generated_location}") -- install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${install_location} DESTINATION ${CMAKE_INSTALL_LIBDIR}) -- else() -- install(FILES ${generated_location} DESTINATION ${CMAKE_INSTALL_LIBDIR}) -- endif() --endif(SHADERC_ENABLE_INSTALL) -- --shaderc_add_tests( -- TEST_PREFIX shaderc_combined -- LINK_LIBS shaderc_combined ${CMAKE_THREAD_LIBS_INIT} -- INCLUDE_DIRS include ${shaderc_SOURCE_DIR}/libshaderc_util/include ${glslang_SOURCE_DIR} -- ${spirv-tools_SOURCE_DIR}/include -- TEST_NAMES -- shaderc -- shaderc_cpp) - - if(${SHADERC_ENABLE_TESTS}) - add_executable(shaderc_c_smoke_test ./src/shaderc_c_smoke_test.c) ---- a/libshaderc_spvc/CMakeLists.txt -+++ b/libshaderc_spvc/CMakeLists.txt -@@ -9,26 +9,22 @@ set(SPVC_SOURCES - src/spvc.cc - ) - --add_library(shaderc_spvc STATIC ${SPVC_SOURCES}) -+add_library(shaderc_spvc ${SPVC_SOURCES}) - shaderc_default_compile_options(shaderc_spvc) --target_include_directories(shaderc_spvc PUBLIC include PRIVATE ${shaderc_SOURCE_DIR}/libshaderc/include ${shaderc_SOURCE_DIR}/libshaderc_util/include ${spirv-tools_SOURCE_DIR}/include ${SPIRV-Cross_SOURCE_DIR}/..) -- --add_library(shaderc_spvc_shared SHARED ${SPVC_SOURCES}) --shaderc_default_compile_options(shaderc_spvc_shared) --target_include_directories(shaderc_spvc_shared PUBLIC include PRIVATE ${shaderc_SOURCE_DIR}/libshaderc/include ${shaderc_SOURCE_DIR}/libshaderc_util/include ${spirv-tools_SOURCE_DIR}/include ${SPIRV-Cross_SOURCE_DIR}/..) -- --target_compile_definitions(shaderc_spvc_shared -- PRIVATE SHADERC_IMPLEMENTATION -- PUBLIC SHADERC_SHAREDLIB --) -+target_include_directories(shaderc_spvc -+ PUBLIC include ${shaderc_SOURCE_DIR}/libshaderc/include PRIVATE ${shaderc_SOURCE_DIR}/libshaderc_util/include) -+if(BUILD_SHARED_LIBS) -+ target_compile_definitions(shaderc_spvc -+ PRIVATE SHADERC_IMPLEMENTATION -+ PUBLIC SHADERC_SHAREDLIB -+ ) -+ set_target_properties(shaderc_spvc PROPERTIES OUTPUT_NAME "shaderc_spvc_shared" SOVERSION 1) -+endif() - - if (DISABLE_EXCEPTIONS) - target_compile_definitions(shaderc_spvc PRIVATE SPIRV_CROSS_EXCEPTIONS_TO_ASSERTIONS) -- target_compile_definitions(shaderc_spvc_shared PRIVATE SPIRV_CROSS_EXCEPTIONS_TO_ASSERTIONS) - endif (DISABLE_EXCEPTIONS) - --set_target_properties(shaderc_spvc_shared PROPERTIES SOVERSION 1) -- - if(SHADERC_ENABLE_INSTALL) - install( - FILES -@@ -37,71 +33,18 @@ if(SHADERC_ENABLE_INSTALL) - DESTINATION - ${CMAKE_INSTALL_INCLUDEDIR}/shaderc) - -- install(TARGETS shaderc_spvc shaderc_spvc_shared -+ install(TARGETS shaderc_spvc - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} - RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) - endif(SHADERC_ENABLE_INSTALL) - --find_package(Threads) - set(SPVC_LIBS -- ${CMAKE_THREAD_LIBS_INIT} -- SPIRV-Tools -- SPIRV-Tools-opt -- spirv-cross-glsl -- spirv-cross-hlsl -- spirv-cross-msl -+ "CONAN_PKG::spirv-cross" -+ "CONAN_PKG::spirv-tools" - ) - - target_link_libraries(shaderc_spvc PRIVATE ${SPVC_LIBS}) --target_link_libraries(shaderc_spvc_shared PRIVATE ${SPVC_LIBS}) -- --shaderc_add_tests( -- TEST_PREFIX shaderc -- LINK_LIBS shaderc_spvc -- INCLUDE_DIRS include ${shaderc_SOURCE_DIR}/libshaderc/include ${SPIRV-Cross_SOURCE_DIR}/.. -- TEST_NAMES -- spvc -- spvc_cpp -- spvc_webgpu -- spvc_webgpu_cpp) -- --shaderc_add_tests( -- TEST_PREFIX shaderc_shared -- LINK_LIBS shaderc_spvc_shared SPIRV-Tools SPIRV-Tools-opt -- INCLUDE_DIRS include ${shaderc_SOURCE_DIR}/libshaderc/include ${SPIRV-Cross_SOURCE_DIR}/.. -- TEST_NAMES -- spvc -- spvc_cpp -- spvc_webgpu -- spvc_webgpu_cpp) -- --shaderc_combine_static_lib(shaderc_spvc_combined shaderc_spvc) -- --if(SHADERC_ENABLE_INSTALL) -- # Since shaderc_combined is defined as an imported library, we cannot use the -- # install() directive to install it. Install it like a normal file. -- get_target_property(generated_location shaderc_spvc_combined LOCATION) -- string(REGEX MATCH "Visual Studio .*" vs_generator "${CMAKE_GENERATOR}") -- if (NOT "${vs_generator}" STREQUAL "") -- # With Visual Studio generators, the LOCATION property is not properly -- # expanded according to the current build configuration. We need to work -- # around this problem by manually substitution. -- string(REPLACE "$(Configuration)" "\${CMAKE_INSTALL_CONFIG_NAME}" -- install_location "${generated_location}") -- install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${install_location} DESTINATION ${CMAKE_INSTALL_LIBDIR}) -- else() -- install(FILES ${generated_location} DESTINATION ${CMAKE_INSTALL_LIBDIR}) -- endif() --endif(SHADERC_ENABLE_INSTALL) -- --shaderc_add_tests( -- TEST_PREFIX shaderc_spvc_combined -- LINK_LIBS shaderc_spvc_combined ${CMAKE_THREAD_LIBS_INIT} shaderc_util -- INCLUDE_DIRS include ${shaderc_SOURCE_DIR}/libshaderc/include ${spirv-tools_SOURCE_DIR}/include -- TEST_NAMES -- spvc -- spvc_cpp) - - if(${SHADERC_ENABLE_TESTS}) - add_executable(spvc_c_smoke_test ./src/spvc_smoke_test_util.c ./src/spvc_c_smoke_test.c) ---- a/libshaderc_util/CMakeLists.txt -+++ b/libshaderc_util/CMakeLists.txt -@@ -24,25 +24,20 @@ add_library(shaderc_util STATIC - - shaderc_default_compile_options(shaderc_util) - target_include_directories(shaderc_util -- PUBLIC include PRIVATE ${glslang_SOURCE_DIR}) -+ PUBLIC include) - - find_package(Threads) --target_link_libraries(shaderc_util PRIVATE -- glslang OSDependent OGLCompiler HLSL glslang SPIRV -- SPIRV-Tools-opt ${CMAKE_THREAD_LIBS_INIT}) -- --shaderc_add_tests( -- TEST_PREFIX shaderc_util -- LINK_LIBS shaderc_util -- TEST_NAMES -- counting_includer -- string_piece -- format -- file_finder -- io -- message -- mutex -- version_profile) -+target_link_libraries(shaderc_util PUBLIC -+ CONAN_PKG::glslang -+ CONAN_PKG::spirv-tools -+ ${CMAKE_THREAD_LIBS_INIT}) -+ -+if(SHADERC_ENABLE_INSTALL AND NOT BUILD_SHARED_LIBS) -+ install(TARGETS shaderc_util -+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} -+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} -+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) -+endif(SHADERC_ENABLE_INSTALL) - - if(${SHADERC_ENABLE_TESTS}) - target_include_directories(shaderc_util_counting_includer_test -@@ -51,15 +46,6 @@ if(${SHADERC_ENABLE_TESTS}) - PRIVATE ${glslang_SOURCE_DIR}) - endif() - --shaderc_add_tests( -- TEST_PREFIX shaderc_util -- LINK_LIBS shaderc_util -- INCLUDE_DIRS -- ${glslang_SOURCE_DIR} -- ${spirv-tools_SOURCE_DIR}/include -- TEST_NAMES -- compiler) -- - # This target copies content of testdata into the build directory. - add_custom_target(testdata COMMAND - ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_SOURCE_DIR}/testdata/copy-to-build.cmake ---- a/spvc/CMakeLists.txt -+++ b/spvc/CMakeLists.txt -@@ -1,8 +1,8 @@ - add_executable(spvc_exe src/main.cc) - shaderc_default_compile_options(spvc_exe) --target_include_directories(spvc_exe PRIVATE ${shaderc_SOURCE_DIR}/libshaderc/include ${spirv-tools_SOURCE_DIR}/include) -+target_include_directories(spvc_exe PRIVATE ${shaderc_SOURCE_DIR}/libshaderc/include) - set_target_properties(spvc_exe PROPERTIES OUTPUT_NAME spvc) --target_link_libraries(spvc_exe PRIVATE shaderc_spvc shaderc_util) -+target_link_libraries(spvc_exe PRIVATE shaderc_spvc shaderc_util CONAN_PKG::spirv-tools) - add_dependencies(spvc_exe build-version) - - shaderc_add_asciidoc(spvc_doc_README README) ---- a/utils/update_build_version.py -+++ b/utils/update_build_version.py -@@ -114,12 +114,12 @@ def get_version_string(project, directory): - - - def main(): -- if len(sys.argv) != 4: -- print('usage: {} '.format( -+ if len(sys.argv) != 2: -+ print('usage: {} '.format( - sys.argv[0])) - sys.exit(1) - -- projects = ['shaderc', 'spirv-tools', 'glslang'] -+ projects = ['shaderc'] - new_content = ''.join([ - '"{}\\n"\n'.format(get_version_string(p, d)) - for (p, d) in zip(projects, sys.argv[1:]) diff --git a/recipes/shaderc/all/patches/2019.0/fix-spvc.patch b/recipes/shaderc/all/patches/2019.0/fix-spvc.patch deleted file mode 100644 index 682a95ac5deb9..0000000000000 --- a/recipes/shaderc/all/patches/2019.0/fix-spvc.patch +++ /dev/null @@ -1,24 +0,0 @@ ---- a/libshaderc_spvc/src/spvc.cc -+++ b/libshaderc_spvc/src/spvc.cc -@@ -15,9 +15,9 @@ - #include "shaderc/spvc.h" - - #include "libshaderc_util/exceptions.h" --#include "spirv-cross/spirv_glsl.hpp" --#include "spirv-cross/spirv_hlsl.hpp" --#include "spirv-cross/spirv_msl.hpp" -+#include "spirv_glsl.hpp" -+#include "spirv_hlsl.hpp" -+#include "spirv_msl.hpp" - #include "spirv-tools/libspirv.hpp" - #include "spirv-tools/optimizer.hpp" - -@@ -169,7 +169,7 @@ size_t shaderc_spvc_compile_options_set_for_fuzzing( - shaderc_spvc_compile_options_t options, const uint8_t* data, size_t size) { - if (!data || size < sizeof(*options)) return 0; - -- memcpy(options, data, sizeof(*options)); -+ memcpy(static_cast(options), data, sizeof(*options)); - return sizeof(*options); - } - diff --git a/recipes/shaderc/all/patches/2021.1/adapt-update_build_version.py.patch b/recipes/shaderc/all/patches/2021.1/adapt-update_build_version.py.patch new file mode 100644 index 0000000000000..a53d4b7300f53 --- /dev/null +++ b/recipes/shaderc/all/patches/2021.1/adapt-update_build_version.py.patch @@ -0,0 +1,25 @@ +diff --git a/utils/update_build_version.py b/utils/update_build_version.py +--- a/utils/update_build_version.py ++++ b/utils/update_build_version.py +@@ -128,18 +128,18 @@ + + + def main(): +- if len(sys.argv) != 5: ++ if len(sys.argv) < 5: + print(('usage: {} '.format( + sys.argv[0]))) + sys.exit(1) + +- projects = ['shaderc', 'spirv-tools', 'glslang'] ++ projects = ['shaderc'] + new_content = ''.join([ + '"{}\\n"\n'.format(get_version_string(p, d)) + for (p, d) in zip(projects, sys.argv[1:]) + ]) + +- output_file = sys.argv[4] ++ output_file = sys.argv[-1] + mkdir_p(os.path.dirname(output_file)) + + if os.path.isfile(output_file): diff --git a/recipes/shaderc/all/patches/2021.1/fix-cmake.patch b/recipes/shaderc/all/patches/2021.1/fix-cmake.patch deleted file mode 100644 index ac2fd7ef1015f..0000000000000 --- a/recipes/shaderc/all/patches/2021.1/fix-cmake.patch +++ /dev/null @@ -1,324 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 0c8d1ae..4f4e6e0 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -112,19 +112,16 @@ endif(MSVC) - - # Configure subdirectories. - # We depend on these for later projects, so they should come first. --add_subdirectory(third_party) -+ - - add_subdirectory(libshaderc_util) - add_subdirectory(libshaderc) - add_subdirectory(glslc) --if(${SHADERC_ENABLE_EXAMPLES}) -- add_subdirectory(examples) --endif() - - add_custom_target(build-version - ${PYTHON_EXECUTABLE} - ${CMAKE_CURRENT_SOURCE_DIR}/utils/update_build_version.py -- ${shaderc_SOURCE_DIR} ${spirv-tools_SOURCE_DIR} ${glslang_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}/build-version.inc -+ ${shaderc_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}/build-version.inc - COMMENT "Update build-version.inc in the Shaderc build directory (if necessary).") - - function(define_pkg_config_file NAME LIBS) -diff --git a/cmake/utils.cmake b/cmake/utils.cmake -index d64757d..0adc008 100644 ---- a/cmake/utils.cmake -+++ b/cmake/utils.cmake -@@ -41,14 +41,6 @@ function(shaderc_default_c_compile_options TARGET) - # requires clang to be built with compiler-rt. - target_link_libraries(${TARGET} PRIVATE --coverage) - endif() -- if (NOT SHADERC_ENABLE_SHARED_CRT) -- if (WIN32) -- # For MinGW cross compile, statically link to the libgcc runtime. -- # But it still depends on MSVCRT.dll. -- set_target_properties(${TARGET} PROPERTIES -- LINK_FLAGS "-static -static-libgcc") -- endif(WIN32) -- endif(NOT SHADERC_ENABLE_SHARED_CRT) - else() - # disable warning C4800: 'int' : forcing value to bool 'true' or 'false' - # (performance warning) -@@ -58,17 +50,6 @@ endfunction(shaderc_default_c_compile_options) - - function(shaderc_default_compile_options TARGET) - shaderc_default_c_compile_options(${TARGET}) -- if (NOT "${MSVC}") -- target_compile_options(${TARGET} PRIVATE -std=c++11) -- if (NOT SHADERC_ENABLE_SHARED_CRT) -- if (WIN32) -- # For MinGW cross compile, statically link to the C++ runtime. -- # But it still depends on MSVCRT.dll. -- set_target_properties(${TARGET} PROPERTIES -- LINK_FLAGS "-static -static-libgcc -static-libstdc++") -- endif(WIN32) -- endif(NOT SHADERC_ENABLE_SHARED_CRT) -- endif() - endfunction(shaderc_default_compile_options) - - # Build an asciidoc file; additional arguments past the base filename specify -diff --git a/glslc/CMakeLists.txt b/glslc/CMakeLists.txt -index 31664d1..a962c2e 100644 ---- a/glslc/CMakeLists.txt -+++ b/glslc/CMakeLists.txt -@@ -30,7 +30,6 @@ add_library(glslc STATIC - ) - - shaderc_default_compile_options(glslc) --target_include_directories(glslc PUBLIC ${glslang_SOURCE_DIR}) - - if (SHADERC_ENABLE_WGSL_OUTPUT) - if (IS_DIRECTORY "${tint_SOURCE_DIR}/include") -@@ -43,26 +42,17 @@ if (SHADERC_ENABLE_WGSL_OUTPUT) - endif(SHADERC_ENABLE_WGSL_OUTPUT) - - target_link_libraries(glslc PRIVATE -- glslang OSDependent OGLCompiler HLSL glslang SPIRV # Glslang libraries - $<$:libtint> # Tint libraries, optional - shaderc_util shaderc # internal Shaderc libraries - ${CMAKE_THREAD_LIBS_INIT}) - - add_executable(glslc_exe src/main.cc) - shaderc_default_compile_options(glslc_exe) --target_include_directories(glslc_exe PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/.. ${spirv-tools_SOURCE_DIR}/include) -+target_include_directories(glslc_exe PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/.. ${CONAN_INCLUDE_DIRS}) - set_target_properties(glslc_exe PROPERTIES OUTPUT_NAME glslc) --target_link_libraries(glslc_exe PRIVATE glslc shaderc_util shaderc) -+target_link_libraries(glslc_exe PRIVATE glslc shaderc_util shaderc CONAN_PKG::spirv-tools) - add_dependencies(glslc_exe build-version) - --shaderc_add_tests( -- TEST_PREFIX glslc -- LINK_LIBS glslc shaderc_util shaderc -- TEST_NAMES -- file -- resource_parse -- stage) -- - shaderc_add_asciidoc(glslc_doc_README README) - - if(SHADERC_ENABLE_INSTALL) -@@ -70,4 +60,3 @@ if(SHADERC_ENABLE_INSTALL) - RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) - endif(SHADERC_ENABLE_INSTALL) - --add_subdirectory(test) -diff --git a/libshaderc/CMakeLists.txt b/libshaderc/CMakeLists.txt -index 3ada419..08cf265 100644 ---- a/libshaderc/CMakeLists.txt -+++ b/libshaderc/CMakeLists.txt -@@ -24,24 +24,19 @@ set(SHADERC_SOURCES - src/shaderc_private.h - ) - --add_library(shaderc STATIC ${SHADERC_SOURCES}) -+add_library(shaderc ${SHADERC_SOURCES}) - shaderc_default_compile_options(shaderc) - target_include_directories(shaderc -- PUBLIC include -- PRIVATE ${glslang_SOURCE_DIR} -- ${SPIRV-Headers_SOURCE_DIR}/include) -+ PUBLIC include) - --add_library(shaderc_shared SHARED ${SHADERC_SOURCES}) --shaderc_default_compile_options(shaderc_shared) --target_include_directories(shaderc_shared -- PUBLIC include -- PRIVATE ${glslang_SOURCE_DIR} -- ${SPIRV-Headers_SOURCE_DIR}/include) --target_compile_definitions(shaderc_shared -- PRIVATE SHADERC_IMPLEMENTATION -- PUBLIC SHADERC_SHAREDLIB --) --set_target_properties(shaderc_shared PROPERTIES SOVERSION 1) -+target_include_directories(shaderc PUBLIC include) -+if(BUILD_SHARED_LIBS) -+ target_compile_definitions(shaderc -+ PRIVATE SHADERC_IMPLEMENTATION -+ PUBLIC SHADERC_SHAREDLIB -+ ) -+ set_target_properties(shaderc PROPERTIES OUTPUT_NAME "shaderc_shared" SOVERSION 1) -+endif() - - if(SHADERC_ENABLE_INSTALL) - install( -@@ -54,73 +49,21 @@ if(SHADERC_ENABLE_INSTALL) - DESTINATION - ${CMAKE_INSTALL_INCLUDEDIR}/shaderc) - -- install(TARGETS shaderc shaderc_shared -+ install(TARGETS shaderc - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} - RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) - endif(SHADERC_ENABLE_INSTALL) - --find_package(Threads) - set(SHADERC_LIBS -- glslang OSDependent OGLCompiler glslang ${CMAKE_THREAD_LIBS_INIT} - shaderc_util -- SPIRV # from glslang -- SPIRV-Tools -+ "CONAN_PKG::glslang" -+ "CONAN_PKG::spirv-tools" - ) - - target_link_libraries(shaderc PRIVATE ${SHADERC_LIBS}) --target_link_libraries(shaderc_shared PRIVATE ${SHADERC_LIBS}) -- --shaderc_add_tests( -- TEST_PREFIX shaderc -- LINK_LIBS shaderc -- INCLUDE_DIRS include ${shaderc_SOURCE_DIR}/libshaderc_util/include ${glslang_SOURCE_DIR} -- ${spirv-tools_SOURCE_DIR}/include -- ${SPIRV-Headers_SOURCE_DIR}/include -- TEST_NAMES -- shaderc -- shaderc_cpp -- shaderc_private) -- --shaderc_add_tests( -- TEST_PREFIX shaderc_shared -- LINK_LIBS shaderc_shared SPIRV-Tools -- INCLUDE_DIRS include ${shaderc_SOURCE_DIR}/libshaderc_util/include ${glslang_SOURCE_DIR} -- ${spirv-tools_SOURCE_DIR}/include -- ${SPIRV-Headers_SOURCE_DIR}/include -- TEST_NAMES -- shaderc -- shaderc_cpp -- shaderc_private) - --shaderc_combine_static_lib(shaderc_combined shaderc) -- --if(SHADERC_ENABLE_INSTALL) -- # Since shaderc_combined is defined as an imported library, we cannot use the -- # install() directive to install it. Install it like a normal file. -- get_target_property(generated_location shaderc_combined LOCATION) -- string(REGEX MATCH "Visual Studio .*" vs_generator "${CMAKE_GENERATOR}") -- if (NOT "${vs_generator}" STREQUAL "") -- # With Visual Studio generators, the LOCATION property is not properly -- # expanded according to the current build configuration. We need to work -- # around this problem by manually substitution. -- string(REPLACE "$(Configuration)" "\${CMAKE_INSTALL_CONFIG_NAME}" -- install_location "${generated_location}") -- install(FILES ${install_location} DESTINATION ${CMAKE_INSTALL_LIBDIR}) -- else() -- install(FILES ${generated_location} DESTINATION ${CMAKE_INSTALL_LIBDIR}) -- endif() --endif(SHADERC_ENABLE_INSTALL) - --shaderc_add_tests( -- TEST_PREFIX shaderc_combined -- LINK_LIBS shaderc_combined ${CMAKE_THREAD_LIBS_INIT} -- INCLUDE_DIRS include ${shaderc_SOURCE_DIR}/libshaderc_util/include ${glslang_SOURCE_DIR} -- ${spirv-tools_SOURCE_DIR}/include -- ${SPIRV-Headers_SOURCE_DIR}/include -- TEST_NAMES -- shaderc -- shaderc_cpp) - - if(${SHADERC_ENABLE_TESTS}) - add_executable(shaderc_c_smoke_test ./src/shaderc_c_smoke_test.c) -diff --git a/libshaderc_util/CMakeLists.txt b/libshaderc_util/CMakeLists.txt -index 99ce3c4..3eb57d5 100644 ---- a/libshaderc_util/CMakeLists.txt -+++ b/libshaderc_util/CMakeLists.txt -@@ -39,28 +39,23 @@ add_library(shaderc_util STATIC - - shaderc_default_compile_options(shaderc_util) - target_include_directories(shaderc_util -- PUBLIC include PRIVATE ${glslang_SOURCE_DIR}) -+ PUBLIC include) - # We use parts of Glslang's HLSL compilation interface, which - # now requires this preprocessor definition. - add_definitions(-DENABLE_HLSL) - - find_package(Threads) - target_link_libraries(shaderc_util PRIVATE -- glslang OSDependent OGLCompiler HLSL glslang SPIRV -- SPIRV-Tools-opt ${CMAKE_THREAD_LIBS_INIT}) -+ CONAN_PKG::glslang -+ CONAN_PKG::spirv-tools -+ ${CMAKE_THREAD_LIBS_INIT}) - --shaderc_add_tests( -- TEST_PREFIX shaderc_util -- LINK_LIBS shaderc_util -- TEST_NAMES -- counting_includer -- string_piece -- format -- file_finder -- io_shaderc -- message -- mutex -- version_profile) -+if(SHADERC_ENABLE_INSTALL AND NOT BUILD_SHARED_LIBS) -+ install(TARGETS shaderc_util -+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} -+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} -+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) -+endif(SHADERC_ENABLE_INSTALL) - - if(${SHADERC_ENABLE_TESTS}) - target_include_directories(shaderc_util_counting_includer_test -@@ -69,15 +64,6 @@ if(${SHADERC_ENABLE_TESTS}) - PRIVATE ${glslang_SOURCE_DIR}) - endif() - --shaderc_add_tests( -- TEST_PREFIX shaderc_util -- LINK_LIBS shaderc_util -- INCLUDE_DIRS -- ${glslang_SOURCE_DIR} -- ${spirv-tools_SOURCE_DIR}/include -- TEST_NAMES -- compiler) -- - # This target copies content of testdata into the build directory. - add_custom_target(testdata COMMAND - ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_SOURCE_DIR}/testdata/copy-to-build.cmake -diff --git a/libshaderc_util/src/compiler.cc b/libshaderc_util/src/compiler.cc -index 8a8d12b..92d8279 100644 ---- a/libshaderc_util/src/compiler.cc -+++ b/libshaderc_util/src/compiler.cc -@@ -20,7 +20,7 @@ - #include - #include - --#include "SPIRV/GlslangToSpv.h" -+#include "glslang/SPIRV/GlslangToSpv.h" - #include "libshaderc_util/format.h" - #include "libshaderc_util/io_shaderc.h" - #include "libshaderc_util/message.h" -diff --git a/utils/update_build_version.py b/utils/update_build_version.py -index 5785390..7801a02 100755 ---- a/utils/update_build_version.py -+++ b/utils/update_build_version.py -@@ -128,18 +128,18 @@ def get_version_string(project, directory): - - - def main(): -- if len(sys.argv) != 5: -- print(('usage: {} '.format( -+ if len(sys.argv) != 3: -+ print(('usage: {} '.format( - sys.argv[0]))) - sys.exit(1) - -- projects = ['shaderc', 'spirv-tools', 'glslang'] -+ projects = ['shaderc'] - new_content = ''.join([ - '"{}\\n"\n'.format(get_version_string(p, d)) - for (p, d) in zip(projects, sys.argv[1:]) - ]) - -- output_file = sys.argv[4] -+ output_file = sys.argv[2] - mkdir_p(os.path.dirname(output_file)) - - if os.path.isfile(output_file): diff --git a/recipes/shaderc/all/patches/2021.1/install-shaderc_util.patch b/recipes/shaderc/all/patches/2021.1/install-shaderc_util.patch new file mode 100644 index 0000000000000..c2806270e883d --- /dev/null +++ b/recipes/shaderc/all/patches/2021.1/install-shaderc_util.patch @@ -0,0 +1,14 @@ +diff --git a/libshaderc_util/CMakeLists.txt b/libshaderc_util/CMakeLists.txt +--- a/libshaderc_util/CMakeLists.txt ++++ b/libshaderc_util/CMakeLists.txt +@@ -87,3 +87,10 @@ + add_dependencies(shaderc_util_file_finder_test testdata) + add_dependencies(shaderc_util_io_shaderc_test testdata) + endif() ++ ++if(SHADERC_ENABLE_INSTALL AND NOT BUILD_SHARED_LIBS) ++ install(TARGETS shaderc_util ++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) ++endif() diff --git a/recipes/shaderc/all/patches/2021.1/use-conan-dependencies.patch b/recipes/shaderc/all/patches/2021.1/use-conan-dependencies.patch new file mode 100644 index 0000000000000..667cfb6d0a4fb --- /dev/null +++ b/recipes/shaderc/all/patches/2021.1/use-conan-dependencies.patch @@ -0,0 +1,17 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -112,7 +112,12 @@ + + # Configure subdirectories. + # We depend on these for later projects, so they should come first. +-add_subdirectory(third_party) ++find_package(glslang REQUIRED CONFIG) ++find_package(SPIRV-Headers REQUIRED CONFIG) ++find_package(SPIRV-Tools REQUIRED CONFIG) ++set(glslang_SOURCE_DIR ${glslang_INCLUDE_DIRS}) ++set(SPIRV-Headers_SOURCE_DIR ${SPIRV-Headers_INCLUDE_DIR}/..) ++set(spirv-tools_SOURCE_DIR ${SPIRV-Tools_INCLUDE_DIR}/..) + + add_subdirectory(libshaderc_util) + add_subdirectory(libshaderc) diff --git a/recipes/shaderc/all/patches/2023.6/use-conan-dependencies.patch b/recipes/shaderc/all/patches/2023.6/use-conan-dependencies.patch new file mode 100644 index 0000000000000..b28517493c7a8 --- /dev/null +++ b/recipes/shaderc/all/patches/2023.6/use-conan-dependencies.patch @@ -0,0 +1,17 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -120,7 +120,12 @@ + + # Configure subdirectories. + # We depend on these for later projects, so they should come first. +-add_subdirectory(third_party) ++find_package(glslang REQUIRED CONFIG) ++find_package(SPIRV-Headers REQUIRED CONFIG) ++find_package(SPIRV-Tools REQUIRED CONFIG) ++set(glslang_SOURCE_DIR ${glslang_INCLUDE_DIRS}) ++set(SPIRV-Headers_SOURCE_DIR ${SPIRV-Headers_INCLUDE_DIR}/..) ++set(spirv-tools_SOURCE_DIR ${SPIRV-Tools_INCLUDE_DIR}/..) + + add_subdirectory(libshaderc_util) + add_subdirectory(libshaderc) diff --git a/recipes/shaderc/all/test_package/CMakeLists.txt b/recipes/shaderc/all/test_package/CMakeLists.txt index 492695489b31c..e88a76ff2e432 100644 --- a/recipes/shaderc/all/test_package/CMakeLists.txt +++ b/recipes/shaderc/all/test_package/CMakeLists.txt @@ -1,21 +1,11 @@ -cmake_minimum_required(VERSION 3.1) -project(test_package) +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX C) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup() +find_package(shaderc REQUIRED CONFIG) add_executable(${PROJECT_NAME}_shaderc_c test_package_shaderc.c) -target_link_libraries(${PROJECT_NAME}_shaderc_c ${CONAN_LIBS}) +target_link_libraries(${PROJECT_NAME}_shaderc_c PRIVATE shaderc::shaderc) add_executable(${PROJECT_NAME}_shaderc_cpp test_package_shaderc.cpp) -target_link_libraries(${PROJECT_NAME}_shaderc_cpp ${CONAN_LIBS}) +target_link_libraries(${PROJECT_NAME}_shaderc_cpp PRIVATE shaderc::shaderc) set_property(TARGET ${PROJECT_NAME}_shaderc_cpp PROPERTY CXX_STANDARD 11) - -if(SHADERC_WITH_SPVC) - add_executable(${PROJECT_NAME}_spvc_c test_package_spvc.c) - target_link_libraries(${PROJECT_NAME}_spvc_c ${CONAN_LIBS}) - - add_executable(${PROJECT_NAME}_spvc_cpp test_package_spvc.cpp) - target_link_libraries(${PROJECT_NAME}_spvc_cpp ${CONAN_LIBS}) - set_property(TARGET ${PROJECT_NAME}_spvc_cpp PROPERTY CXX_STANDARD 11) -endif() diff --git a/recipes/shaderc/all/test_package/conanfile.py b/recipes/shaderc/all/test_package/conanfile.py index e6ac9a4c93682..4613db3f59c9f 100644 --- a/recipes/shaderc/all/test_package/conanfile.py +++ b/recipes/shaderc/all/test_package/conanfile.py @@ -1,32 +1,34 @@ -from conans import ConanFile, CMake, tools import os +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake + class TestPackageConan(ConanFile): settings = "os", "arch", "compiler", "build_type" - generators = "cmake" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str, run=True) + + def layout(self): + cmake_layout(self) def build(self): cmake = CMake(self) - cmake.definitions["SHADERC_WITH_SPVC"] = self.options["shaderc"].spvc if "spvc" in self.options["shaderc"] else False cmake.configure() cmake.build() def test(self): - if not tools.cross_building(self): + if can_run(self): # Test programs consuming shaderc lib - bin_path_shaderc_c = os.path.join("bin", "test_package_shaderc_c") - self.run(bin_path_shaderc_c, run_environment=True) - bin_path_shaderc_cpp = os.path.join("bin", "test_package_shaderc_cpp") - self.run(bin_path_shaderc_cpp, run_environment=True) + bin_path_shaderc_c = os.path.join(self.cpp.build.bindir, "test_package_shaderc_c") + self.run(bin_path_shaderc_c, env="conanrun") + + bin_path_shaderc_cpp = os.path.join(self.cpp.build.bindir, "test_package_shaderc_cpp") + self.run(bin_path_shaderc_cpp, env="conanrun") + # Test glslc executable - in_glsl_name = os.path.join(self.source_folder, "test_package.vert") - spv_name = "test_package.spv" - self.run("glslc \"{0}\" -o {1}".format(in_glsl_name, spv_name), run_environment=True) - - if "spvc" in self.options["shaderc"] and self.options["shaderc"].spvc: - # Test programs consuming shaderc_spvc lib - bin_path_spvc_c = os.path.join("bin", "test_package_spvc_c") - self.run(bin_path_spvc_c, run_environment=True) - bin_path_spvc_cpp = os.path.join("bin", "test_package_spvc_cpp") - self.run(bin_path_spvc_cpp, run_environment=True) + self.run(f"glslc -h", env="conanrun") diff --git a/recipes/shaderc/all/test_package/test_package.vert b/recipes/shaderc/all/test_package/test_package.vert deleted file mode 100644 index 8f349eebab57e..0000000000000 --- a/recipes/shaderc/all/test_package/test_package.vert +++ /dev/null @@ -1,8 +0,0 @@ -#version 450 -#extension GL_ARB_separate_shader_objects : enable - -layout(location = 0) in vec2 inPosition; - -void main() { - gl_Position = vec4(inPosition, 0.0, 1.0); -} diff --git a/recipes/shaderc/all/test_package/test_package_spvc.c b/recipes/shaderc/all/test_package/test_package_spvc.c deleted file mode 100644 index c9fc709f30096..0000000000000 --- a/recipes/shaderc/all/test_package/test_package_spvc.c +++ /dev/null @@ -1,8 +0,0 @@ -#include - -int main() { - shaderc_spvc_compiler_t shaderc_spvc_compiler = shaderc_spvc_compiler_initialize(); - shaderc_spvc_compiler_release(shaderc_spvc_compiler); - - return 0; -} diff --git a/recipes/shaderc/all/test_package/test_package_spvc.cpp b/recipes/shaderc/all/test_package/test_package_spvc.cpp deleted file mode 100644 index 40978d50d1c6c..0000000000000 --- a/recipes/shaderc/all/test_package/test_package_spvc.cpp +++ /dev/null @@ -1,8 +0,0 @@ -#include - -int main() { - shaderc_spvc::Compiler compiler; - shaderc_spvc::CompileOptions compile_options; - - return 0; -} diff --git a/recipes/shaderc/all/test_v1_package/CMakeLists.txt b/recipes/shaderc/all/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..91630d79f4abb --- /dev/null +++ b/recipes/shaderc/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/shaderc/all/test_v1_package/conanfile.py b/recipes/shaderc/all/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..fdb8622025dbc --- /dev/null +++ b/recipes/shaderc/all/test_v1_package/conanfile.py @@ -0,0 +1,22 @@ +from conans import ConanFile, CMake, tools +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "cmake", "cmake_find_package_multi" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if not tools.cross_building(self): + # Test programs consuming shaderc lib + bin_path_shaderc_c = os.path.join("bin", "test_package_shaderc_c") + self.run(bin_path_shaderc_c, run_environment=True) + bin_path_shaderc_cpp = os.path.join("bin", "test_package_shaderc_cpp") + self.run(bin_path_shaderc_cpp, run_environment=True) + + self.run(f"glslc -h", run_environment=True) diff --git a/recipes/shaderc/config.yml b/recipes/shaderc/config.yml index 15d431909e594..7b4ff24649925 100644 --- a/recipes/shaderc/config.yml +++ b/recipes/shaderc/config.yml @@ -1,5 +1,7 @@ versions: - "2021.1": + "2024.1": + folder: all + "2023.6": folder: all - "2019.0": + "2021.1": folder: all diff --git a/recipes/shapelib/all/conandata.yml b/recipes/shapelib/all/conandata.yml index 1c122519c5ede..b4cae11fb3a97 100644 --- a/recipes/shapelib/all/conandata.yml +++ b/recipes/shapelib/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.6.1": + url: "https://github.com/OSGeo/shapelib/archive/v1.6.1.tar.gz" + sha256: "72a30ed408edee0dc9eaa81255e634af6706f9192b5ed5b536013f1cc4b327c4" "1.6.0": url: "https://github.com/OSGeo/shapelib/archive/v1.6.0.tar.gz" sha256: "0bfd1eab9616ca3c420a5ad674b0d07c7c5018620d6ab6ae43917daa18ff0d1e" diff --git a/recipes/shapelib/all/conanfile.py b/recipes/shapelib/all/conanfile.py index e4deabe7afba9..56012aa251125 100644 --- a/recipes/shapelib/all/conanfile.py +++ b/recipes/shapelib/all/conanfile.py @@ -63,6 +63,7 @@ def package(self): cmake.install() rm(self, "*.exe", os.path.join(self.package_folder, "bin")) rmdir(self, os.path.join(self.package_folder, "share")) + rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) def package_info(self): self.cpp_info.set_property("cmake_file_name", "shapelib") diff --git a/recipes/shapelib/config.yml b/recipes/shapelib/config.yml index 04ffd79e144a1..7da8bd84259cd 100644 --- a/recipes/shapelib/config.yml +++ b/recipes/shapelib/config.yml @@ -1,4 +1,6 @@ versions: + "1.6.1": + folder: all "1.6.0": folder: all "1.5.0": diff --git a/recipes/shield/all/conandata.yml b/recipes/shield/all/conandata.yml index 76d8f2a0a392d..7719bd88959d1 100644 --- a/recipes/shield/all/conandata.yml +++ b/recipes/shield/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.6": + url: "https://github.com/holoplot/shield/archive/0.6.tar.gz" + sha256: "9ed05e2be8268dc634367ce87aff8b4878b481353eacfdbd8d1f303888c9e3bb" "0.5": url: "https://github.com/holoplot/shield/archive/0.5.tar.gz" sha256: "f6494b1c95aeddb23fe507ab8da17234ecd7ca6aff97a92112e1e6459b343ff3" diff --git a/recipes/shield/config.yml b/recipes/shield/config.yml index ab08cd3e58a8c..0afee7e4b4830 100644 --- a/recipes/shield/config.yml +++ b/recipes/shield/config.yml @@ -1,4 +1,6 @@ versions: + "0.6": + folder: all "0.5": folder: all "0.4": diff --git a/recipes/simd/all/conandata.yml b/recipes/simd/all/conandata.yml new file mode 100644 index 0000000000000..4806772037748 --- /dev/null +++ b/recipes/simd/all/conandata.yml @@ -0,0 +1,10 @@ +sources: + "6.1.143": + url: "https://github.com/ermig1979/Simd/archive/refs/tags/v6.1.143.tar.gz" + sha256: "f6cd1031eddc8f1f2bd0140a766e242ab2a9f8e38f133748187fe2cd51ac94cb" + "6.1.142": + url: "https://github.com/ermig1979/Simd/archive/refs/tags/v6.1.142.tar.gz" + sha256: "e9b83b91d38d0c1b1e50e1cee51314f036f6f96efc3f035314cb59ff6345c393" + "6.1.138": + url: "https://github.com/ermig1979/Simd/archive/refs/tags/v6.1.138.tar.gz" + sha256: "5090e4879d48851d5d7d9605485f517dea9a27d9431ec2d54a74a6f04cf3ba00" diff --git a/recipes/simd/all/conanfile.py b/recipes/simd/all/conanfile.py new file mode 100644 index 0000000000000..37b86bba68c29 --- /dev/null +++ b/recipes/simd/all/conanfile.py @@ -0,0 +1,130 @@ +import os + +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.build import check_min_cppstd +from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout +from conan.tools.files import get, copy, rmdir, replace_in_file, collect_libs +from conan.tools.microsoft import is_msvc, MSBuild, MSBuildToolchain, is_msvc_static_runtime, msvs_toolset +from conan.tools.scm import Version + +required_conan_version = ">=1.59.0" + + +class SimdConan(ConanFile): + name = "simd" + description = "C++ image processing and machine learning library with SIMD" + license = "MIT" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/ermig1979/Simd" + topics = ("sse", "avx", "avx-512", "amx", "vmx", "vsx", "neon") + package_type = "library" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False] + } + default_options = { + "shared": False, + "fPIC": True + } + + @property + def _min_cppstd(self): + return 11 + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + + def layout(self): + cmake_layout(self, src_folder="src") + + def validate(self): + if self.settings.compiler.get_safe("cppstd"): + check_min_cppstd(self, self._min_cppstd) + if self.settings.os == "Windows" and self.settings.arch not in ["x86", "x86_64"]: + raise ConanInvalidConfiguration("Windows only supports x86/x64 architectures.") + if is_msvc(self) and self.settings.arch == "armv8": + raise ConanInvalidConfiguration("ARM64 building with MSVC is not supported.") + if Version(self.version) >= "6.1.142" and \ + self.settings.arch in ["x86", "x86_64"] and \ + self.settings.compiler == "gcc" and Version(self.settings.compiler.version) < "9": + raise ConanInvalidConfiguration("${self.ref} requires GCC >= 9") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + if is_msvc(self): + tc = MSBuildToolchain(self) + tc.generate() + else: + tc = CMakeToolchain(self) + tc.variables["SIMD_TEST"] = False + tc.variables["SIMD_SHARED"] = self.options.shared + tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0077"] = "NEW" + tc.generate() + + @property + def vs_proj_folder(self): + """Return the vsXXXX/ folder given the MSVC compiler version""" + toolset = msvs_toolset(self) + # By default, v2022 folder + return {"v140": "vs2015", + "v141": "vs2017", + "v142": "vs2019"}.get(toolset, "vs2022") + + def _patch_sources(self): + if is_msvc(self): + if not self.options.shared: + replace_in_file(self, os.path.join(self.source_folder, "src", "Simd", "SimdConfig.h"), "//#define SIMD_STATIC", "#define SIMD_STATIC") + replace_in_file(self, os.path.join(self.source_folder, "prj", self.vs_proj_folder, "Simd.vcxproj"), + "DynamicLibrary", + "StaticLibrary") + for prj in ("AmxBf16", "Avx2", "Avx512bw", "Avx512vnni", "Base", "Neon", "Simd", "Sse41"): + replace_in_file(self, os.path.join(self.source_folder, "prj", self.vs_proj_folder, f"{prj}.vcxproj"), + " ", + " OldStyle\n ") + + if not is_msvc_static_runtime(self): + for prj in ("AmxBf16", "Avx2", "Avx512bw", "Avx512vnni", "Base", "Neon", "Simd", "Sse41"): + replace_in_file(self, os.path.join(self.source_folder, "prj", self.vs_proj_folder, f"{prj}.vcxproj"), + " ", + " MultiThreadedDebugDLL\n" + " MultiThreadedDLL\n" + " ") + + def build(self): + self._patch_sources() + if is_msvc(self): + msbuild = MSBuild(self) + msbuild.build(os.path.join(self.source_folder, "prj", self.vs_proj_folder, "Simd.vcxproj")) + else: + cmake = CMake(self) + cmake.configure(build_script_folder=os.path.join(self.source_folder, "prj", "cmake")) + cmake.build() + + def package(self): + copy(self, pattern="LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) + if is_msvc(self): + copy(self, pattern="*.h*", dst=os.path.join(self.package_folder, "include", "Simd"), src=os.path.join(self.source_folder, "src", "Simd"), keep_path=True) + copy(self, pattern="*.lib", dst=os.path.join(self.package_folder, "lib"), src=self.source_folder, keep_path=False) + copy(self, pattern="*.dll", dst=os.path.join(self.package_folder, "bin"), src=self.source_folder, keep_path=False) + else: + cmake = CMake(self) + cmake.install() + rmdir(self, os.path.join(self.package_folder, "share")) + + def package_info(self): + self.cpp_info.libs = collect_libs(self) + self.cpp_info.set_property("cmake_file_name", "Simd") + self.cpp_info.set_property("cmake_target_name", "Simd::Simd") + if not self.options.shared and is_msvc(self): + self.cpp_info.defines.append("SIMD_STATIC") + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.system_libs.extend(["pthread", "m"]) diff --git a/recipes/simd/all/test_package/CMakeLists.txt b/recipes/simd/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..eef0ed5180fa2 --- /dev/null +++ b/recipes/simd/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) + +find_package(Simd REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE Simd::Simd) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) diff --git a/recipes/simd/all/test_package/conanfile.py b/recipes/simd/all/test_package/conanfile.py new file mode 100644 index 0000000000000..d7de1f914ce42 --- /dev/null +++ b/recipes/simd/all/test_package/conanfile.py @@ -0,0 +1,27 @@ +import os + +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/simd/all/test_package/test_package.cpp b/recipes/simd/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..9618b4bc617e4 --- /dev/null +++ b/recipes/simd/all/test_package/test_package.cpp @@ -0,0 +1,6 @@ +#include +#include "Simd/SimdLib.hpp" + +int main(void) { + Simd::PrintInfo(std::cout); +} diff --git a/recipes/simd/config.yml b/recipes/simd/config.yml new file mode 100644 index 0000000000000..27fd4dbf8a73a --- /dev/null +++ b/recipes/simd/config.yml @@ -0,0 +1,7 @@ +versions: + "6.1.143": + folder: all + "6.1.142": + folder: all + "6.1.138": + folder: all diff --git a/recipes/simde/all/conandata.yml b/recipes/simde/all/conandata.yml index 2710ad3ab19c8..4819243883706 100644 --- a/recipes/simde/all/conandata.yml +++ b/recipes/simde/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.8.2": + url: "https://github.com/simd-everywhere/simde/archive/refs/tags/v0.8.2.tar.gz" + sha256: "ed2a3268658f2f2a9b5367628a85ccd4cf9516460ed8604eed369653d49b25fb" "0.8.0": # same as 0.7.6 url: "https://github.com/simd-everywhere/simde/archive/refs/tags/v0.8.0.tar.gz" diff --git a/recipes/simde/config.yml b/recipes/simde/config.yml index 82cc9014779ef..63dd232920b7f 100644 --- a/recipes/simde/config.yml +++ b/recipes/simde/config.yml @@ -1,4 +1,6 @@ versions: + "0.8.2": + folder: all "0.8.0": folder: all "0.7.6": diff --git a/recipes/simdjson/all/conandata.yml b/recipes/simdjson/all/conandata.yml index ec78f3228deaa..9697453b1dc9f 100644 --- a/recipes/simdjson/all/conandata.yml +++ b/recipes/simdjson/all/conandata.yml @@ -1,4 +1,16 @@ sources: + "3.10.1": + url: "https://github.com/simdjson/simdjson/archive/v3.10.1.tar.gz" + sha256: "1e8f881cb2c0f626c56cd3665832f1e97b9d4ffc648ad9e1067c134862bba060" + "3.10.0": + url: "https://github.com/simdjson/simdjson/archive/v3.10.0.tar.gz" + sha256: "9c30552f1dd0ee3d0832bb1c6b7b97d813b18d5ef294c10dcb6fc242e5947de8" + "3.9.3": + url: "https://github.com/simdjson/simdjson/archive/v3.9.3.tar.gz" + sha256: "2e3d10abcde543d3dd8eba9297522cafdcebdd1db4f51b28f3bc95bf1d6ad23c" + "3.9.2": + url: "https://github.com/simdjson/simdjson/archive/v3.9.2.tar.gz" + sha256: "79fbe700f4ac3dd69c4f08275af58399daabd612bca0c0465aea959c60256651" "3.9.1": url: "https://github.com/simdjson/simdjson/archive/v3.9.1.tar.gz" sha256: "a4b6e7cd83176e0ccb107ce38521da40a8df41c2d3c90566f2a0af05b0cd05c4" @@ -11,36 +23,12 @@ sources: "3.6.4": url: "https://github.com/simdjson/simdjson/archive/v3.6.4.tar.gz" sha256: "7e93d5094a47180a3d451cb261ba29ac66f3f6ceb7c2a0884955e9a2bb06d818" - "3.6.1": - url: "https://github.com/simdjson/simdjson/archive/v3.6.1.tar.gz" - sha256: "76601d1701232a212b62d25d3a6518219b2504ff84e8073c6df7393b2ead3176" - "3.6.0": - url: "https://github.com/simdjson/simdjson/archive/v3.6.0.tar.gz" - sha256: "9eab3197231382b8b99d14d8ca647d6ab6bea1b40008df086d25e6f687309bf6" "3.5.0": url: "https://github.com/simdjson/simdjson/archive/v3.5.0.tar.gz" sha256: "942c9462b3c046e12b898cbf5e198f31a377ab40bb2bde5be98440d1f9212ee0" "3.3.0": url: "https://github.com/simdjson/simdjson/archive/v3.3.0.tar.gz" sha256: "a8c9feff2f19c3ff281d42f0b6b4b18f02236513b99229756fa9a1b14787a58a" - "3.2.3": - url: "https://github.com/simdjson/simdjson/archive/v3.2.3.tar.gz" - sha256: "ab72701b8560c4f93a5de525657b3bf34094f99a1e63bd9db3195d1bcb90aa09" - "3.2.2": - url: "https://github.com/simdjson/simdjson/archive/v3.2.2.tar.gz" - sha256: "13a702536e051db612cdca82bf8585f2c69d9c6fd156ef291b170f13202c1b4c" - "3.2.1": - url: "https://github.com/simdjson/simdjson/archive/v3.2.1.tar.gz" - sha256: "121206c9bfe972a2202a74d4cddb8cb0561932427f96d6c4b70fb49a2a74560e" "3.2.0": url: "https://github.com/simdjson/simdjson/archive/v3.2.0.tar.gz" sha256: "75a684dbbe38cf72b8b3bdbdc430764813f3615899a6029931c26ddd89812da4" - "3.1.8": - url: "https://github.com/simdjson/simdjson/archive/v3.1.8.tar.gz" - sha256: "99e7eeb0a0038e0213da68f099e6a8b67bcaeea1586385ec5f752bea85d902d8" - "3.0.1": - url: "https://github.com/simdjson/simdjson/archive/v3.0.1.tar.gz" - sha256: "156b1bc5eb0561b2bd166b46d191fd3d95a3e709cc63761477d3b7aec2b6e9ed" - "2.2.3": - url: "https://github.com/simdjson/simdjson/archive/v2.2.3.tar.gz" - sha256: "4c62f2d82edec3dbc63650c10453dc471de9f1be689eb5b4bde89efed89db5d8" diff --git a/recipes/simdjson/all/conanfile.py b/recipes/simdjson/all/conanfile.py index 7b42a92cdbbc8..2f8062c7b4ea4 100644 --- a/recipes/simdjson/all/conanfile.py +++ b/recipes/simdjson/all/conanfile.py @@ -72,13 +72,6 @@ def loose_lt_semver(v1, v2): f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not fully support." ) - if self.settings.compiler == "gcc" and \ - Version(self.settings.compiler.version).major == "9": - if self.settings.compiler.get_safe("libcxx") == "libstdc++11": - raise ConanInvalidConfiguration(f"{self.ref} doesn't support GCC 9 with libstdc++11.") - if self.settings.build_type == "Debug": - raise ConanInvalidConfiguration(f"{self.ref} doesn't support GCC 9 with Debug build type.") - def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) diff --git a/recipes/simdjson/config.yml b/recipes/simdjson/config.yml index 433aafc3da9ca..8dc9180fc8813 100644 --- a/recipes/simdjson/config.yml +++ b/recipes/simdjson/config.yml @@ -1,4 +1,12 @@ versions: + "3.10.1": + folder: all + "3.10.0": + folder: all + "3.9.3": + folder: all + "3.9.2": + folder: all "3.9.1": folder: all "3.8.0": @@ -7,25 +15,10 @@ versions: folder: all "3.6.4": folder: all - "3.6.1": - folder: all - "3.6.0": - folder: all "3.5.0": folder: all "3.3.0": folder: all - "3.2.3": - folder: all - "3.2.2": - folder: all - "3.2.1": - folder: all + # fastgltf requires simdjson/3.2.0 "3.2.0": folder: all - "3.1.8": - folder: all - "3.0.1": - folder: all - "2.2.3": - folder: all diff --git a/recipes/simdutf/all/conandata.yml b/recipes/simdutf/all/conandata.yml index 2a8f8d281bcc9..e8d70776dbf03 100644 --- a/recipes/simdutf/all/conandata.yml +++ b/recipes/simdutf/all/conandata.yml @@ -1,79 +1,26 @@ sources: - "5.2.3": - url: "https://github.com/simdutf/simdutf/archive/v5.2.3.tar.gz" - sha256: "dfa55d85c3ee51e9b52e55c02701b16f83dcf1921e1075b67f99b1036df5adb8" - "5.2.2": - url: "https://github.com/simdutf/simdutf/archive/v5.2.2.tar.gz" - sha256: "6cd905ac7fcf6293e34d7acaa9d5af901d85f182f82ec6ec3ee9f9273881791d" - "5.0.0": - url: "https://github.com/simdutf/simdutf/archive/v5.0.0.tar.gz" - sha256: "088d750466bf3487117cce7f828eb94a0a3474d7e76b45d4902c99a2387212b7" - "4.0.9": - url: "https://github.com/simdutf/simdutf/archive/v4.0.9.tar.gz" - sha256: "599E6558FC8D06F8346E5F210564F8B18751C93D83BCE1A40A0E6A326C57B61E" + "5.6.0": + url: "https://github.com/simdutf/simdutf/archive/v5.6.0.tar.gz" + sha256: "98cc5761b638642b018a628b1609f1b2df489b555836fa88706055bb56a4d6fe" + "5.5.0": + url: "https://github.com/simdutf/simdutf/archive/v5.5.0.tar.gz" + sha256: "47090a770b8eecf610ac4d1fafadde60bb7ba3c9d576d2a3a545aba989a3d749" + "5.4.15": + url: "https://github.com/simdutf/simdutf/archive/v5.4.15.tar.gz" + sha256: "188a9516ee208659cab9a1e5063c1b8385d63d171c2381e9ce18af97936d9879" + "5.3.7": + url: "https://github.com/simdutf/simdutf/archive/v5.3.7.tar.gz" + sha256: "731fb29c8c0b05c77b0a29dc37ab8eabe09533f000864a7c55e1ed2e1d33d1e7" + "5.3.5": + url: "https://github.com/simdutf/simdutf/archive/v5.3.5.tar.gz" + sha256: "e6706d7fc68f6e1541414dcf45abe6190d591505d08bff3cc53f55642568f28d" + "5.3.2": + url: "https://github.com/simdutf/simdutf/archive/v5.3.2.tar.gz" + sha256: "3c146fb80d775b869ae9b132f41981dc3266f616f589b5f45045d6a22fdabdca" + "5.3.1": + url: "https://github.com/simdutf/simdutf/archive/v5.3.1.tar.gz" + sha256: "373e1e66a1c245817f0aa08ae8693b71d1703f9355d364e0d9d002929738ddcc" + # 4.0.5 is required by scnlib "4.0.5": url: "https://github.com/simdutf/simdutf/archive/v4.0.5.tar.gz" sha256: "040d80ff4321f89ea9739ccc7f468ece9c4bc2630f3d4762b6d829000d2ec625" - "4.0.4": - url: "https://github.com/simdutf/simdutf/archive/v4.0.4.tar.gz" - sha256: "fd24bab9754e24f42e6cd2c9d336accb2674c306f9221c00fb095fe95cfe9247" - "4.0.3": - url: "https://github.com/simdutf/simdutf/archive/v4.0.3.tar.gz" - sha256: "00429eca296f00d9b93939d2561538bad601602ad02fd01ba9ad366268773751" - "3.2.17": - url: "https://github.com/simdutf/simdutf/archive/v3.2.17.tar.gz" - sha256: "c24e3eec1e08522a09b33e603352e574f26d367a7701bf069a65881f64acd519" - "3.2.15": - url: "https://github.com/simdutf/simdutf/archive/v3.2.15.tar.gz" - sha256: "c26d2e2e9124e1c20335d3880d74c8b0d74a5e247ba82ef82d15df4ccc413bcd" - "3.2.14": - url: "https://github.com/simdutf/simdutf/archive/v3.2.14.tar.gz" - sha256: "6bd6cd41e0e588312c3ae24adb297454bd9bd9622ed7443f41300d7201f233a1" - "3.2.2": - url: "https://github.com/simdutf/simdutf/archive/v3.2.2.tar.gz" - sha256: "5a5c84c05bf30d681126d1dcbde903615f2c927e201e0c6d489f74a91b7f506f" - "3.2.0": - url: "https://github.com/simdutf/simdutf/archive/v3.2.0.tar.gz" - sha256: "0d9f63e2f308b6b54f399ebbe3a02776b902a2670c88c28de2d75ea2197dc4e9" - "3.1.0": - url: "https://github.com/simdutf/simdutf/archive/v3.1.0.tar.gz" - sha256: "9757a04085ad3ebab9fe933d9198ec6b84a857632a540418b6cfeb7b889a8017" - "3.0.0": - url: "https://github.com/simdutf/simdutf/archive/v3.0.0.tar.gz" - sha256: "cc23b47fd0caf9018fc0dcf49ebeff2676654fff997f9f6ce50fa93cd36f661f" - "2.2.0": - url: "https://github.com/simdutf/simdutf/archive/v2.2.0.tar.gz" - sha256: "b0b8527e194700363cc47e75a7b8d58c88798b0dc31671f5ae5c8803d8678fe6" -patches: - "3.2.17": - - patch_file: "patches/3.2.17-0001-fix-cmake.patch" - patch_description: "remove static build, enable rpath on macOS" - patch_type: "conan" - "3.2.15": - - patch_file: "patches/3.2.14-0001-fix-cmake.patch" - patch_description: "remove static build, enable rpath on macOS" - patch_type: "conan" - "3.2.14": - - patch_file: "patches/3.2.14-0001-fix-cmake.patch" - patch_description: "remove static build, enable rpath on macOS" - patch_type: "conan" - "3.2.2": - - patch_file: "patches/2.0.3-0001-fix-cmake.patch" - patch_description: "remove static build, enable rpath on macOS" - patch_type: "conan" - "3.2.0": - - patch_file: "patches/2.0.3-0001-fix-cmake.patch" - patch_description: "remove static build, enable rpath on macOS" - patch_type: "conan" - "3.1.0": - - patch_file: "patches/2.0.3-0001-fix-cmake.patch" - patch_description: "remove static build, enable rpath on macOS" - patch_type: "conan" - "3.0.0": - - patch_file: "patches/2.0.3-0001-fix-cmake.patch" - patch_description: "remove static build, enable rpath on macOS" - patch_type: "conan" - "2.2.0": - - patch_file: "patches/2.0.3-0001-fix-cmake.patch" - patch_description: "remove static build, enable rpath on macOS" - patch_type: "conan" diff --git a/recipes/simdutf/all/conanfile.py b/recipes/simdutf/all/conanfile.py index 6e0a2cc78bceb..7f4c06e0624c0 100644 --- a/recipes/simdutf/all/conanfile.py +++ b/recipes/simdutf/all/conanfile.py @@ -1,6 +1,6 @@ from conan import ConanFile from conan.errors import ConanInvalidConfiguration -from conan.tools.files import apply_conandata_patches, export_conandata_patches, get, copy, rmdir +from conan.tools.files import get, copy, rmdir from conan.tools.build import check_min_cppstd from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout from conan.tools.scm import Version @@ -31,9 +31,6 @@ class SimdutfConan(ConanFile): def _min_cppstd(self): return 11 - def export_sources(self): - export_conandata_patches(self) - def config_options(self): if self.settings.os == "Windows": del self.options.fPIC @@ -48,13 +45,11 @@ def layout(self): def validate(self): if self.info.settings.compiler.get_safe("cppstd"): check_min_cppstd(self, self._min_cppstd) - ## simdutf >= 4.0.0 requires _mm_storeu_si64 - if Version(self.version) >= "4.0.0": - if self.settings.compiler == "gcc" and Version(self.settings.compiler.version) < "9.0": - raise ConanInvalidConfiguration(f"{self.ref} doesn't support gcc < 9.") - if self.settings.compiler == "gcc" and self.settings.build_type == "Debug" and \ - Version(self.settings.compiler.version) < "10.0": - raise ConanInvalidConfiguration(f"{self.ref} doesn't support gcc < 10 with debug build") + if self.settings.compiler == "gcc" and Version(self.settings.compiler.version) < "9.0": + raise ConanInvalidConfiguration(f"{self.ref} doesn't support gcc < 9.") + if self.settings.compiler == "gcc" and self.settings.build_type == "Debug" and \ + Version(self.settings.compiler.version) < "10.0": + raise ConanInvalidConfiguration(f"{self.ref} doesn't support gcc < 10 with debug build") def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) @@ -62,10 +57,7 @@ def source(self): def generate(self): tc = CMakeToolchain(self) tc.variables["SIMDUTF_BENCHMARKS"] = False - if Version(self.version) >= "3.2.3": - tc.variables["SIMDUTF_TESTS"] = False - else: - tc.variables["BUILD_TESTING"] = False + tc.variables["SIMDUTF_TESTS"] = False if self.settings.compiler == "gcc" and Version(self.settings.compiler.version) == "8": tc.variables["CMAKE_CXX_FLAGS"] = " -mavx512f" tc.variables["SIMDUTF_TOOLS"] = False @@ -74,7 +66,6 @@ def generate(self): deps.generate() def build(self): - apply_conandata_patches(self) cmake = CMake(self) cmake.configure() cmake.build() diff --git a/recipes/simdutf/all/patches/2.0.3-0001-fix-cmake.patch b/recipes/simdutf/all/patches/2.0.3-0001-fix-cmake.patch deleted file mode 100644 index 6bedd6c48eb5d..0000000000000 --- a/recipes/simdutf/all/patches/2.0.3-0001-fix-cmake.patch +++ /dev/null @@ -1,23 +0,0 @@ -diff --git a/cmake/simdutf-flags.cmake b/cmake/simdutf-flags.cmake -index 9263a7f..39f5a8c 100644 ---- a/cmake/simdutf-flags.cmake -+++ b/cmake/simdutf-flags.cmake -@@ -16,4 +16,4 @@ set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/tools/cmake") - set(CMAKE_CXX_STANDARD 11) - set(CMAKE_CXX_STANDARD_REQUIRED ON) - set(CMAKE_CXX_EXTENSIONS OFF) --set(CMAKE_MACOSX_RPATH OFF) -+set(CMAKE_MACOSX_RPATH ON) -diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt -index f3ede1e..91a1bdd 100644 ---- a/src/CMakeLists.txt -+++ b/src/CMakeLists.txt -@@ -3,6 +3,6 @@ target_include_directories(simdutf-include-source INTERFACE $/simdutf.cpp) - target_link_libraries(simdutf-source INTERFACE simdutf-include-source) --add_library(simdutf STATIC simdutf.cpp) -+add_library(simdutf simdutf.cpp) - target_include_directories(simdutf PRIVATE $ ) - target_include_directories(simdutf PUBLIC "$") - diff --git a/recipes/simdutf/all/patches/3.2.14-0001-fix-cmake.patch b/recipes/simdutf/all/patches/3.2.14-0001-fix-cmake.patch deleted file mode 100644 index 2fa471fee1dfb..0000000000000 --- a/recipes/simdutf/all/patches/3.2.14-0001-fix-cmake.patch +++ /dev/null @@ -1,30 +0,0 @@ -diff --git a/cmake/simdutf-flags.cmake b/cmake/simdutf-flags.cmake -index 4844fa0..801e2b3 100644 ---- a/cmake/simdutf-flags.cmake -+++ b/cmake/simdutf-flags.cmake -@@ -24,4 +24,4 @@ set(SIMDUTF_CXX_STANDARD 11 CACHE STRING "the C++ standard to use for simdutf") - set(CMAKE_CXX_STANDARD ${SIMDUTF_CXX_STANDARD}) - set(CMAKE_CXX_STANDARD_REQUIRED ON) - set(CMAKE_CXX_EXTENSIONS OFF) --set(CMAKE_MACOSX_RPATH OFF) -+set(CMAKE_MACOSX_RPATH ON) -diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt -index f42e310..80ce35c 100644 ---- a/src/CMakeLists.txt -+++ b/src/CMakeLists.txt -@@ -3,7 +3,7 @@ target_include_directories(simdutf-include-source INTERFACE $/simdutf.cpp) - target_link_libraries(simdutf-source INTERFACE simdutf-include-source) --add_library(simdutf STATIC simdutf.cpp) -+add_library(simdutf simdutf.cpp) - target_include_directories(simdutf PRIVATE $ ) - target_include_directories(simdutf PUBLIC "$") - -@@ -38,4 +38,4 @@ if(SIMDUTF_SANITIZE_UNDEFINED) - endif() - if(MSVC AND BUILD_SHARED_LIBS) - set(SIMDUTF_WINDOWS_DLL TRUE) --endif() -\ No newline at end of file -+endif() diff --git a/recipes/simdutf/all/patches/3.2.17-0001-fix-cmake.patch b/recipes/simdutf/all/patches/3.2.17-0001-fix-cmake.patch deleted file mode 100644 index 6f1f0aa23c231..0000000000000 --- a/recipes/simdutf/all/patches/3.2.17-0001-fix-cmake.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff --git a/cmake/simdutf-flags.cmake b/cmake/simdutf-flags.cmake -index d1e9bcd..2ff37c0 100644 ---- a/cmake/simdutf-flags.cmake -+++ b/cmake/simdutf-flags.cmake -@@ -22,4 +22,3 @@ set(SIMDUTF_CXX_STANDARD 11 CACHE STRING "the C++ standard to use for simdutf") - set(CMAKE_CXX_STANDARD ${SIMDUTF_CXX_STANDARD}) - set(CMAKE_CXX_STANDARD_REQUIRED ON) - set(CMAKE_CXX_EXTENSIONS OFF) --set(CMAKE_MACOSX_RPATH OFF) -diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt -index ed6be55..0b649c6 100644 ---- a/src/CMakeLists.txt -+++ b/src/CMakeLists.txt -@@ -3,7 +3,7 @@ target_include_directories(simdutf-include-source INTERFACE $/simdutf.cpp) - target_link_libraries(simdutf-source INTERFACE simdutf-include-source) --add_library(simdutf STATIC simdutf.cpp) -+add_library(simdutf simdutf.cpp) - target_include_directories(simdutf PRIVATE $ ) - target_include_directories(simdutf PUBLIC "$") - diff --git a/recipes/simdutf/config.yml b/recipes/simdutf/config.yml index dc1781664daf2..006cd141f15e7 100644 --- a/recipes/simdutf/config.yml +++ b/recipes/simdutf/config.yml @@ -1,31 +1,17 @@ versions: - "5.2.3": + "5.6.0": folder: all - "5.2.2": + "5.5.0": folder: all - "5.0.0": + "5.4.15": folder: all - "4.0.9": + "5.3.7": folder: all - "4.0.5": - folder: all - "4.0.4": - folder: all - "4.0.3": - folder: all - "3.2.17": - folder: all - "3.2.15": + "5.3.5": folder: all - "3.2.14": + "5.3.2": folder: all - "3.2.2": + "5.3.1": folder: all - "3.2.0": - folder: all - "3.1.0": - folder: all - "3.0.0": - folder: all - "2.2.0": + "4.0.5": folder: all diff --git a/recipes/simfil/all/conandata.yml b/recipes/simfil/all/conandata.yml index 4fa19c86dbd8c..ee332d47a6410 100644 --- a/recipes/simfil/all/conandata.yml +++ b/recipes/simfil/all/conandata.yml @@ -1,4 +1,22 @@ sources: + "0.3.3": + url: "https://github.com/Klebert-Engineering/simfil/archive/refs/tags/v0.3.3.tar.gz" + sha256: "1e09c3785dc14e0a9a6c2c64962debd6ab1c7f7750a2de49dbb5dea18a461973" + "0.3.2": + url: "https://github.com/Klebert-Engineering/simfil/archive/refs/tags/v0.3.2.tar.gz" + sha256: "b8357db1d46058bb5b02eee4945801fc96cf06736c15195235a4b35da72e2ac2" + "0.3.1": + url: "https://github.com/Klebert-Engineering/simfil/archive/refs/tags/v0.3.1.tar.gz" + sha256: "caddee2e338041ae5ec56c6a92f14e79ee3d5a0f7eaf327d6b8418fe06dd484e" + "0.3.0": + url: "https://github.com/Klebert-Engineering/simfil/archive/refs/tags/v0.3.0.tar.gz" + sha256: "dea7b063f3f062772fcb49b368954814fc04d66c55db327a53ea008d698cd171" + "0.2.1": + url: "https://github.com/Klebert-Engineering/simfil/archive/refs/tags/v0.2.1.tar.gz" + sha256: "d3114900f121013cbffe42b0a70c66a47846c9326f6327d2ce0dd2e841919fd9" + "0.1.3": + url: "https://github.com/Klebert-Engineering/simfil/archive/refs/tags/v0.1.3.tar.gz" + sha256: "e42004b46118950e95b22430e4580fb89d1e6d2a1399e209d1aa4310944962e5" "0.1.2": url: "https://github.com/Klebert-Engineering/simfil/archive/refs/tags/v0.1.2.tar.gz" sha256: "a903658ff37fa304dc6d8cb65e7923b6857b825ce2ac205522b84e4785d80e8d" diff --git a/recipes/simfil/all/conanfile.py b/recipes/simfil/all/conanfile.py index 66a16c329cfe6..55dad5c2c07b1 100644 --- a/recipes/simfil/all/conanfile.py +++ b/recipes/simfil/all/conanfile.py @@ -65,7 +65,7 @@ def requirements(self): self.requires("fmt/10.0.0", transitive_headers=True) self.requires("bitsery/5.2.3", transitive_headers=True) if self.options.with_json: - self.requires("nlohmann_json/3.11.2") + self.requires("nlohmann_json/3.11.2", transitive_headers=True) def config_options(self): if self.settings.os == "Windows": @@ -102,3 +102,5 @@ def package(self): def package_info(self): self.cpp_info.libs = ["simfil"] + if self.options.with_json: + self.cpp_info.defines = ["SIMFIL_WITH_MODEL_JSON=1"] diff --git a/recipes/simfil/config.yml b/recipes/simfil/config.yml index eb8addc0ca6d3..c35577e608344 100644 --- a/recipes/simfil/config.yml +++ b/recipes/simfil/config.yml @@ -1,4 +1,16 @@ versions: + "0.3.3": + folder: all + "0.3.2": + folder: all + "0.3.1": + folder: all + "0.3.0": + folder: all + "0.2.1": + folder: all + "0.1.3": + folder: all "0.1.2": folder: all "0.1.1": diff --git a/recipes/simple_enum/all/conandata.yml b/recipes/simple_enum/all/conandata.yml new file mode 100644 index 0000000000000..6c936b9324135 --- /dev/null +++ b/recipes/simple_enum/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "0.8.0": + url: "https://github.com/arturbac/simple_enum/archive/refs/tags/v0.8.0.tar.gz" + sha256: "b32e723ddb29b6cb2ab93f2376157ee6fd7a4f3c170edddb6a3fb7186068e6ee" diff --git a/recipes/simple_enum/all/conanfile.py b/recipes/simple_enum/all/conanfile.py new file mode 100644 index 0000000000000..6be80c9e19d4d --- /dev/null +++ b/recipes/simple_enum/all/conanfile.py @@ -0,0 +1,74 @@ +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.build import check_min_cppstd +from conan.tools.files import copy, export_conandata_patches, get +from conan.tools.layout import basic_layout +from conan.tools.scm import Version +import os + +required_conan_version = ">=1.52.0" + +class SimpleEnumConan(ConanFile): + name = "simple_enum" + description = "An Fast, Intuitive and Type-Safe C++ Enumeration Support Library" + license = "BSL-1.0" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/arturbac/simple_enum" + topics = ("serialization", "type-safe", "header-only") + package_type = "header-library" + settings = "os", "arch", "compiler", "build_type" + no_copy_source = True + + @property + def _min_cppstd(self): + return 20 + + @property + def _compilers_minimum_version(self): + return { + "gcc": "11", + "clang": "12", + "apple-clang": "14", # apple-clang/13 doesn't support std::convertible_to + "Visual Studio": "16", + "msvc": "192", + } + + def export_sources(self): + export_conandata_patches(self) + + def layout(self): + basic_layout(self, src_folder="src") + + def package_id(self): + self.info.clear() + + def validate(self): + if self.settings.compiler.get_safe("cppstd"): + check_min_cppstd(self, self._min_cppstd) + minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) + if minimum_version and Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration( + f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." + ) + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def package(self): + copy(self, "LICENSE", self.source_folder, os.path.join(self.package_folder, "licenses")) + copy( + self, + "*.hpp", + os.path.join(self.source_folder, "include"), + os.path.join(self.package_folder, "include"), + ) + copy( + self, + "*.h", + os.path.join(self.source_folder, "include"), + os.path.join(self.package_folder, "include"), + ) + + def package_info(self): + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] diff --git a/recipes/simple_enum/all/test_package/CMakeLists.txt b/recipes/simple_enum/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..6835a49d78e83 --- /dev/null +++ b/recipes/simple_enum/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) + +find_package(simple_enum REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE simple_enum::simple_enum) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_20) diff --git a/recipes/simple_enum/all/test_package/conanfile.py b/recipes/simple_enum/all/test_package/conanfile.py new file mode 100644 index 0000000000000..3a91c9439218e --- /dev/null +++ b/recipes/simple_enum/all/test_package/conanfile.py @@ -0,0 +1,26 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def layout(self): + cmake_layout(self) + + def requirements(self): + self.requires(self.tested_reference_str) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/simple_enum/all/test_package/test_package.cpp b/recipes/simple_enum/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..694699608c7ba --- /dev/null +++ b/recipes/simple_enum/all/test_package/test_package.cpp @@ -0,0 +1,8 @@ +#include + +int main() { + enum struct enum_bounded { v1 = 1, v2, v3, first = v1, last = v3 }; + static_assert(simple_enum::enum_name(enum_bounded::v2) == "v2"); + + return 0; +} diff --git a/recipes/simple_enum/config.yml b/recipes/simple_enum/config.yml new file mode 100644 index 0000000000000..675f954f2770e --- /dev/null +++ b/recipes/simple_enum/config.yml @@ -0,0 +1,3 @@ +versions: + "0.8.0": + folder: all diff --git a/recipes/sioclient/all/conandata.yml b/recipes/sioclient/all/conandata.yml new file mode 100644 index 0000000000000..ae83b98849ee1 --- /dev/null +++ b/recipes/sioclient/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "cci.20240405": + url: "https://github.com/socketio/socket.io-client-cpp/archive/c6be96b226f0fe3853beaeaa99c06834342a78db.zip" + sha256: "7c68117185dbc49579bba09a3e877f2a716cc331c28b3d8b6d3f867c4346b639" diff --git a/recipes/sioclient/all/conanfile.py b/recipes/sioclient/all/conanfile.py new file mode 100644 index 0000000000000..28f6a1a4ad91a --- /dev/null +++ b/recipes/sioclient/all/conanfile.py @@ -0,0 +1,112 @@ +import os + +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.build import check_min_cppstd +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.env import VirtualBuildEnv +from conan.tools.microsoft import is_msvc +from conan.tools.files import copy, get, replace_in_file, rm, rmdir, save + +required_conan_version = ">=1.53.0" + + +class SioclientConan(ConanFile): + name = "sioclient" + description = "C++11 implementation of Socket.IO client" + license = "MIT" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/socketio/socket.io-client-cpp" + topics = ("websocket", "client") + + package_type = "library" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + "with_openssl": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + "with_openssl": True, + } + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + if is_msvc(self): + self.options.rm_safe("shared") + self.package_type = "static-library" + + def layout(self): + cmake_layout(self, src_folder="src") + + def requirements(self): + self.requires("websocketpp/0.8.2") + self.requires("asio/1.30.2") + self.requires("rapidjson/cci.20230929") + if self.options.with_openssl: + self.requires("openssl/[>=1.1 <4]") + + def validate(self): + if self.settings.compiler.cppstd: + check_min_cppstd(self, 11) + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + tc.variables["USE_SUBMODULES"] = False + tc.variables["BUILD_UNIT_TESTS"] = False + tc.variables["BUILD_TESTING"] = False + tc.generate() + + deps = CMakeDeps(self) + deps.generate() + + def _patch_sources(self): + replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), + "asio asio::asio", "asio::asio") + + def build(self): + self._patch_sources() + cmake = CMake(self) + cmake.configure() + cmake.build() + + def package(self): + copy(self, "LICENSE", self.source_folder, os.path.join(self.package_folder, "licenses")) + cmake = CMake(self) + cmake.install() + rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) + + def package_info(self): + self.cpp_info.set_property("cmake_file_name", "sioclient") + + self.cpp_info.components["sioclient_"].set_property("cmake_target_name", "sioclient::sioclient") + self.cpp_info.components["sioclient_"].libs = ["sioclient"] + self.cpp_info.components["sioclient_"].requires = [ + "websocketpp::websocketpp", + "asio::asio", + "rapidjson::rapidjson", + ] + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.components["sioclient_"].system_libs.extend(["m", "pthread"]) + + if self.options.with_openssl: + self.cpp_info.components["sioclient_tls"].set_property("cmake_target_name", "sioclient::sioclient_tls") + self.cpp_info.components["sioclient_tls"].libs = ["sioclient_tls"] + self.cpp_info.components["sioclient_tls"].requires = [ + "websocketpp::websocketpp", + "asio::asio", + "rapidjson::rapidjson", + "openssl::openssl", + ] + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.components["sioclient_tls"].system_libs.extend(["m", "pthread"]) diff --git a/recipes/sioclient/all/test_package/CMakeLists.txt b/recipes/sioclient/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..4985d53cb13ca --- /dev/null +++ b/recipes/sioclient/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) + +find_package(sioclient REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE sioclient::sioclient) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) diff --git a/recipes/sioclient/all/test_package/conanfile.py b/recipes/sioclient/all/test_package/conanfile.py new file mode 100644 index 0000000000000..3a91c9439218e --- /dev/null +++ b/recipes/sioclient/all/test_package/conanfile.py @@ -0,0 +1,26 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def layout(self): + cmake_layout(self) + + def requirements(self): + self.requires(self.tested_reference_str) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/sioclient/all/test_package/test_package.cpp b/recipes/sioclient/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..646e232b2bda0 --- /dev/null +++ b/recipes/sioclient/all/test_package/test_package.cpp @@ -0,0 +1,6 @@ +#include + +int main() { + sio::client h; + h.socket(); +} diff --git a/recipes/sioclient/config.yml b/recipes/sioclient/config.yml new file mode 100644 index 0000000000000..f1cb71fea7cad --- /dev/null +++ b/recipes/sioclient/config.yml @@ -0,0 +1,3 @@ +versions: + "cci.20240405": + folder: all diff --git a/recipes/snappy/all/conandata.yml b/recipes/snappy/all/conandata.yml index 4e4827d413453..501018a1c4174 100644 --- a/recipes/snappy/all/conandata.yml +++ b/recipes/snappy/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.2.1": + url: "https://github.com/google/snappy/archive/1.2.1.tar.gz" + sha256: "736aeb64d86566d2236ddffa2865ee5d7a82d26c9016b36218fcc27ea4f09f86" "1.2.0": url: "https://github.com/google/snappy/archive/1.2.0.tar.gz" sha256: "9b8f10fbb5e3bc112f2e5e64f813cb73faea42ec9c533a5023b5ae08aedef42e" @@ -15,6 +18,19 @@ sources: url: "https://github.com/google/snappy/archive/1.1.7.tar.gz" sha256: "3dfa02e873ff51a11ee02b9ca391807f0c8ea0529a4924afa645fbf97163f9d4" patches: + "1.2.1": + - patch_file: "patches/1.1.10-0001-fix-inlining-failure.patch" + patch_description: "disable inlining for compilation error" + patch_type: "portability" + - patch_file: "patches/1.1.9-0002-no-Werror.patch" + patch_description: "disable 'warning as error' options" + patch_type: "portability" + - patch_file: "patches/1.2.0-0003-fix-clobber-list-older-llvm.patch" + patch_description: "disable inline asm on apple-clang" + patch_type: "portability" + - patch_file: "patches/1.2.0-0004-rtti-by-default.patch" + patch_description: "remove 'disable rtti'" + patch_type: "conan" "1.2.0": - patch_file: "patches/1.1.10-0001-fix-inlining-failure.patch" patch_description: "disable inlining for compilation error" diff --git a/recipes/snappy/config.yml b/recipes/snappy/config.yml index 063d5899e0fa9..4059143be6e19 100644 --- a/recipes/snappy/config.yml +++ b/recipes/snappy/config.yml @@ -1,4 +1,6 @@ versions: + "1.2.1": + folder: all "1.2.0": folder: all "1.1.10": diff --git a/recipes/sobjectizer/all/conandata.yml b/recipes/sobjectizer/all/conandata.yml index 9867b85e58972..e7e112967920a 100644 --- a/recipes/sobjectizer/all/conandata.yml +++ b/recipes/sobjectizer/all/conandata.yml @@ -1,41 +1,13 @@ sources: - "5.7.2.2": - url: "https://github.com/Stiffstream/sobjectizer/archive/v.5.7.2.2.tar.gz" - sha256: "85f6cdd10bc4b05b8e7eeff7cd6eb76cc0338810114ba6d517163f143676054f" - "5.7.2.3": - url: "https://github.com/Stiffstream/sobjectizer/archive/v.5.7.2.3.tar.gz" - sha256: "3dd3936fdd5443056fb0698477ad2b299c11b90ff6f551fa2dfb031a17930ee2" - "5.7.2.4": - url: "https://github.com/Stiffstream/sobjectizer/archive/v.5.7.2.4.tar.gz" - sha256: "1ab370e430a1621c7f3ec8a530c3933efed1c5718953fbea214c1694fecc7128" - "5.7.2.5": - url: "https://github.com/Stiffstream/sobjectizer/archive/v.5.7.2.5.tar.gz" - sha256: "0bf87f9a4ec631b2dd53033cbb9a8b84a09a8e499f4edf6504121c6a7d1ef459" - "5.7.2.6": - url: "https://github.com/Stiffstream/sobjectizer/archive/v.5.7.2.6.tar.gz" - sha256: "62f1cfca8181bd60af2fb31b295471d0494b7ba72ab23e5a749bd70c9aa9e7b2" - "5.7.3": - url: "https://github.com/Stiffstream/sobjectizer/archive/v.5.7.3.tar.gz" - sha256: "15ddaa69861e2853fb8888faf70766e7c56c3cf66a6293f72848e0909875a4c3" "5.7.4": url: "https://github.com/Stiffstream/sobjectizer/archive/v.5.7.4.tar.gz" sha256: "f032d071579d80fb423171d411ae0e33af0da46776ca0db7eb1d933c69fb0726" - - "5.7.4.1": - url: "https://github.com/Stiffstream/sobjectizer/archive/v.5.7.4.1.tar.gz" - sha256: "9f5fb9d0be46d427be17f1c47cfa3d332dfe40877d1f9fafd38bcc05c46ff013" - "5.7.4.2": - url: "https://github.com/Stiffstream/sobjectizer/archive/v.5.7.4.2.tar.gz" - sha256: "defaec29e135a21b1b279b1db8eb56993099a7368baae93e7ea1f3f79909f3d8" - "5.7.4.3": - url: "https://github.com/Stiffstream/sobjectizer/archive/v.5.7.4.3.tar.gz" - sha256: "ef54ec1c8c5c05a415e44a67ef02e95550b480594e459ccedab5a49d8c909a56" "5.7.5": url: "https://github.com/Stiffstream/sobjectizer/archive/v.5.7.5.tar.gz" sha256: "282b7c72f6a6ee30b9c08b5339c3e327452903e1b246a163a7c8e57b3e37932f" - "5.8.0": - url: "https://github.com/Stiffstream/sobjectizer/archive/v.5.8.0.tar.gz" - sha256: "de2b4ae0e817a108dae6d6787c79ed84c33bd447842b5fdcb780f6697b4c2d49" "5.8.1": url: "https://github.com/Stiffstream/sobjectizer/archive/v.5.8.1.tar.gz" sha256: "2d6a1d57ecb1263d00460fd2dbf386e7323ab8643d10667d1646c3bbc91ef764" + "5.8.3": + url: "https://github.com/Stiffstream/sobjectizer/archive/v.5.8.3.tar.gz" + sha256: "c76661771c7a0a272ff2cefc62cf3100e9530ec670f225c0e11c6bfa2cc6974e" diff --git a/recipes/sobjectizer/config.yml b/recipes/sobjectizer/config.yml index 648b2e28b68fb..0ebef8a63c5ee 100644 --- a/recipes/sobjectizer/config.yml +++ b/recipes/sobjectizer/config.yml @@ -1,27 +1,9 @@ versions: - "5.7.2.2": - folder: all - "5.7.2.3": - folder: all - "5.7.2.4": - folder: all - "5.7.2.5": - folder: all - "5.7.2.6": - folder: all - "5.7.3": - folder: all - "5.7.4": - folder: all - "5.7.4.1": - folder: all - "5.7.4.2": - folder: all - "5.7.4.3": + "5.7.4": # Used in so5extra folder: all "5.7.5": folder: all - "5.8.0": + "5.8.1": # Used in so5extra folder: all - "5.8.1": + "5.8.3": folder: all diff --git a/recipes/sonic-cpp/all/conandata.yml b/recipes/sonic-cpp/all/conandata.yml index d309d05a897b8..1b94133aa026e 100644 --- a/recipes/sonic-cpp/all/conandata.yml +++ b/recipes/sonic-cpp/all/conandata.yml @@ -1,8 +1,15 @@ sources: + "1.0.1": + url: "https://github.com/bytedance/sonic-cpp/archive/refs/tags/v1.0.1.tar.gz" + sha256: "c78fb90c56ba235e8867888c0b1af0e96d7b0b86829381b3cca94f61f83d41e5" "1.0.0": url: "https://github.com/bytedance/sonic-cpp/archive/refs/tags/v1.0.0.tar.gz" sha256: "78af626fa070a2702fe9586d90617292b421d97d7ab1fe27a02cc20434467a80" patches: + "1.0.1": + - patch_file: "patches/1.0.0-0001-use-cci.patch" + patch_description: "use cci recipes" + patch_type: "conan" "1.0.0": - patch_file: "patches/1.0.0-0001-use-cci.patch" patch_description: "use cci recipes" diff --git a/recipes/sonic-cpp/all/conanfile.py b/recipes/sonic-cpp/all/conanfile.py index 8490a3d80c51b..533e9e8146a77 100644 --- a/recipes/sonic-cpp/all/conanfile.py +++ b/recipes/sonic-cpp/all/conanfile.py @@ -4,6 +4,7 @@ from conan.tools.files import apply_conandata_patches, export_conandata_patches, get, copy from conan.tools.layout import basic_layout from conan.tools.microsoft import is_msvc +from conan.tools.scm import Version import os required_conan_version = ">=1.53.0" @@ -50,8 +51,11 @@ def validate(self): if self.settings.compiler.cppstd: check_min_cppstd(self, self._min_cppstd) - if self.settings.arch not in ["x86", "x86_64"]: - raise ConanInvalidConfiguration(f"{self.ref} support x86, x86_64 only.") + supported_archs = ["x86", "x86_64"] + if Version(self.version) >= "1.0.1": + supported_archs.extend(["armv8", "armv8.3"]) + if self.settings.arch not in supported_archs: + raise ConanInvalidConfiguration(f"{self.ref} doesn't support {self.settings.arch}.") if is_msvc(self): raise ConanInvalidConfiguration(f"{self.ref} doesn't support MSVC now.") diff --git a/recipes/sonic-cpp/config.yml b/recipes/sonic-cpp/config.yml index 40341aa3db6cd..af3bb0714e65c 100644 --- a/recipes/sonic-cpp/config.yml +++ b/recipes/sonic-cpp/config.yml @@ -1,3 +1,5 @@ versions: + "1.0.1": + folder: all "1.0.0": folder: all diff --git a/recipes/soplex/all/conandata.yml b/recipes/soplex/all/conandata.yml index b034a63a75693..aa0fdcefcf969 100644 --- a/recipes/soplex/all/conandata.yml +++ b/recipes/soplex/all/conandata.yml @@ -1,4 +1,19 @@ sources: + "7.1.2": + url: "https://github.com/scipopt/soplex/archive/refs/tags/release-712.tar.gz" + sha256: "a1a7d7f7e30d1db65548b32f75d6f2ed9bd0bf289f639eb4481d3d141c67a332" + "7.1.1": + url: "https://github.com/scipopt/soplex/archive/refs/tags/release-711.tar.gz" + sha256: "75752dca395e219e350f3b462f1f4c08e9d3c2deb2782414862f546a9489cdeb" + "7.1.0": + url: "https://github.com/scipopt/soplex/archive/refs/tags/release-710.tar.gz" + sha256: "ec177fdb688346287d5f211dd7ec4a0195c8ec9b3a5314d38aca383b6fa1418e" + "7.0.1": + url: "https://github.com/scipopt/soplex/archive/refs/tags/release-701.tar.gz" + sha256: "80cce994dcbe45fd52b60e31a3aeb5d2c60a7ddbaae495e0ce6bf58481675696" + "7.0.0": + url: "https://github.com/scipopt/soplex/archive/refs/tags/release-700.tar.gz" + sha256: "ab1906d3afb1793a6f129a5baef9dd8eee929ee945aade427cb9f0b17888239c" "6.0.4": url: "https://github.com/scipopt/soplex/archive/refs/tags/release-604.tar.gz" sha256: "691f5b593cb85c2586522d5de5a5a7692958d22ff1ddffb4fc395f4696590b6f" diff --git a/recipes/soplex/all/conanfile.py b/recipes/soplex/all/conanfile.py index 047f359f2bb4b..9dc99e1409055 100644 --- a/recipes/soplex/all/conanfile.py +++ b/recipes/soplex/all/conanfile.py @@ -73,7 +73,7 @@ def requirements(self): # see https://github.com/conan-io/conan-center-index/pull/16017#issuecomment-1495688452 self.requires("gmp/6.3.0", transitive_headers=True, transitive_libs=True) if self.options.with_boost: - self.requires("boost/1.83.0", transitive_headers=True) # also update Boost_VERSION_MACRO below! + self.requires("boost/1.84.0", transitive_headers=True) # also update Boost_VERSION_MACRO below! def validate(self): if self.settings.compiler.cppstd: @@ -90,9 +90,11 @@ def source(self): def generate(self): tc = CMakeToolchain(self) + tc.variables["MPFR"] = False tc.variables["GMP"] = self.options.with_gmp tc.variables["BOOST"] = self.options.with_boost - tc.variables["Boost_VERSION_MACRO"] = "108300" + tc.variables["Boost_VERSION_MACRO"] = "108400" + tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0077"] = "NEW" tc.generate() deps = CMakeDeps(self) if self.options.with_gmp: diff --git a/recipes/soplex/all/test_package/CMakeLists.txt b/recipes/soplex/all/test_package/CMakeLists.txt index e74edd1950d7a..f734804072478 100644 --- a/recipes/soplex/all/test_package/CMakeLists.txt +++ b/recipes/soplex/all/test_package/CMakeLists.txt @@ -9,5 +9,9 @@ if(TARGET soplex::soplex) set_target_properties(soplex PROPERTIES INTERFACE_LINK_LIBRARIES soplex::soplex) endif() +if (MSVC) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /bigobj") +endif () + add_executable(${PROJECT_NAME} main.cpp) target_link_libraries(${PROJECT_NAME} PRIVATE soplex) diff --git a/recipes/soplex/config.yml b/recipes/soplex/config.yml index 73bcf839da618..7c8e24f77726a 100644 --- a/recipes/soplex/config.yml +++ b/recipes/soplex/config.yml @@ -1,4 +1,14 @@ versions: + "7.1.2": + folder: all + "7.1.1": + folder: all + "7.1.0": + folder: all + "7.0.1": + folder: all + "7.0.0": + folder: all "6.0.4": folder: all "6.0.3": diff --git a/recipes/spdlog/all/conandata.yml b/recipes/spdlog/all/conandata.yml index be20cdd979110..e6248ae597ba5 100644 --- a/recipes/spdlog/all/conandata.yml +++ b/recipes/spdlog/all/conandata.yml @@ -1,4 +1,13 @@ sources: + "1.15.0": + url: "https://github.com/gabime/spdlog/archive/v1.15.0.tar.gz" + sha256: "9962648c9b4f1a7bbc76fd8d9172555bad1871fdb14ff4f842ef87949682caa5" + "1.14.1": + url: "https://github.com/gabime/spdlog/archive/v1.14.1.tar.gz" + sha256: "1586508029a7d0670dfcb2d97575dcdc242d3868a259742b69f100801ab4e16b" + "1.14.0": + url: "https://github.com/gabime/spdlog/archive/v1.14.0.tar.gz" + sha256: "429a6b73ade8285cb21f83bacf89e2821dd1720ea7faa3cb518ffe04b4e00efc" "1.13.0": url: "https://github.com/gabime/spdlog/archive/v1.13.0.tar.gz" sha256: "534f2ee1a4dcbeb22249856edfb2be76a1cf4f708a20b0ac2ed090ee24cfdbc9" @@ -26,3 +35,15 @@ patches: patch_description: "Fix fmt 10.0.0 build" patch_type: "conan" patch_source: "https://github.com/gabime/spdlog/pull/2694" +# Each release is intended to work with some specific versions +fmt_version_mapping: + "1.15.0": "11.0.2" + "1.14.1": "10.2.1" + "1.14.0": "10.2.1" + "1.13.0": "10.2.1" + "1.12.0": "10.2.1" + "1.11.0": "10.0.0" + "1.10.0": "8.1.1" + "1.9.2": "8.0.1" + "1.9.1": "8.0.1" + "1.8.5": "7.1.3" diff --git a/recipes/spdlog/all/conanfile.py b/recipes/spdlog/all/conanfile.py index b0c1ca14504e0..26289fe3fbce1 100644 --- a/recipes/spdlog/all/conanfile.py +++ b/recipes/spdlog/all/conanfile.py @@ -25,6 +25,7 @@ class SpdlogConan(ConanFile): "header_only": [True, False], "wchar_support": [True, False], "wchar_filenames": [True, False], + "wchar_console": [True, False], "no_exceptions": [True, False], "use_std_fmt": [True, False], } @@ -34,6 +35,7 @@ class SpdlogConan(ConanFile): "header_only": False, "wchar_support": False, "wchar_filenames": False, + "wchar_console": False, "no_exceptions": False, "use_std_fmt": False, } @@ -44,8 +46,14 @@ def export_sources(self): def config_options(self): if self.settings.os == "Windows": del self.options.fPIC + else: + del self.options.wchar_support + del self.options.wchar_filenames + del self.options.wchar_console if Version(self.version) < "1.10.0": del self.options.use_std_fmt + if Version(self.version) < "1.15.0": + self.options.rm_safe("wchar_console") def configure(self): if self.options.get_safe("shared") or self.options.header_only: @@ -58,20 +66,7 @@ def layout(self): def requirements(self): if not self.options.get_safe("use_std_fmt"): - self_version = Version(self.version) - fmt_version = "7.1.3" - - if self_version >= "1.12.0": - fmt_version = "10.2.1" - elif self_version >= "1.11.0": - fmt_version = "10.0.0" - elif self_version >= "1.10.0": - fmt_version = "8.1.1" - elif self_version >= "1.9.0": - fmt_version = "8.0.1" - elif self_version >= "1.7.0": - fmt_version = "7.1.3" - + fmt_version = self.conan_data["fmt_version_mapping"][self.version] self.requires(f"fmt/{fmt_version}", transitive_headers=True, transitive_libs=True) def package_id(self): @@ -89,27 +84,22 @@ def _std_fmt_compilers_minimum_version(self): } def validate(self): - if self.settings.get_safe("compiler.cppstd"): - if self.options.get_safe("use_std_fmt"): - check_min_cppstd(self, 20) - else: - check_min_cppstd(self, 11) - if self.settings.os != "Windows" and (self.options.wchar_support or self.options.wchar_filenames): - raise ConanInvalidConfiguration("wchar is only supported under windows") + if self.options.get_safe("use_std_fmt"): + check_min_cppstd(self, 20) + else: + check_min_cppstd(self, 11) if self.options.get_safe("shared") and is_msvc_static_runtime(self): raise ConanInvalidConfiguration("Visual Studio build for shared library with MT runtime is not supported") if self.options.get_safe("use_std_fmt"): - check_min_vs(self, self._std_fmt_compilers_minimum_version["msvc"]) - if not is_msvc(self): - compiler_name = str(self.settings.compiler) - minimum_version = self._std_fmt_compilers_minimum_version.get(compiler_name, False) - if not minimum_version: - self.output.warning(f"{self.name} recipe lacks information about the {compiler_name} compiler support.") - elif Version(self.settings.compiler.version) < minimum_version: - raise ConanInvalidConfiguration( - f"{self.ref} using std::fmt requires std::fmt, which your compiler does not support." - ) + compiler_name = str(self.settings.compiler) + minimum_version = self._std_fmt_compilers_minimum_version.get(compiler_name, False) + if not minimum_version: + self.output.warning(f"{self.name} recipe lacks information about the {compiler_name} compiler support.") + elif Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration( + f"{self.ref} using std::fmt requires std::fmt, which your compiler does not support." + ) def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) @@ -127,8 +117,10 @@ def generate(self): tc.variables["SPDLOG_FMT_EXTERNAL"] = not fmt.options.header_only tc.variables["SPDLOG_FMT_EXTERNAL_HO"] = fmt.options.header_only tc.variables["SPDLOG_BUILD_SHARED"] = not self.options.header_only and self.options.shared - tc.variables["SPDLOG_WCHAR_SUPPORT"] = self.options.wchar_support - tc.variables["SPDLOG_WCHAR_FILENAMES"] = self.options.wchar_filenames + tc.variables["SPDLOG_WCHAR_SUPPORT"] = self.options.get_safe("wchar_support", False) + tc.variables["SPDLOG_WCHAR_FILENAMES"] = self.options.get_safe("wchar_filenames", False) + if Version(self.version) >= "1.15.0": + tc.variables["SDPLOG_WCHAR_CONSOLE"] = self.options.get_safe("wchar_console", False) tc.variables["SPDLOG_INSTALL"] = True tc.variables["SPDLOG_NO_EXCEPTIONS"] = self.options.no_exceptions tc.variables["SPDLOG_USE_STD_FORMAT"] = self.options.get_safe("use_std_fmt") @@ -139,19 +131,17 @@ def generate(self): cmake_deps = CMakeDeps(self) cmake_deps.generate() - def _disable_werror(self): - replace_in_file(self, os.path.join(self.source_folder, "cmake", "utils.cmake"), "/WX", "") - def _use_cpp20_for_std_format(self): + def _patch_sources(self): + apply_conandata_patches(self) + replace_in_file(self, os.path.join(self.source_folder, "cmake", "utils.cmake"), "/WX", "") # This is properly set in later versions if self.options.get_safe("use_std_fmt") and Version(self.version) < "1.12": replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), "CMAKE_CXX_STANDARD 11", "CMAKE_CXX_STANDARD 20") def build(self): - apply_conandata_patches(self) - self._disable_werror() - self._use_cpp20_for_std_format() + self._patch_sources() if not self.options.header_only: cmake = CMake(self) cmake.configure() @@ -192,18 +182,15 @@ def package_info(self): suffix = "d" if self.settings.build_type == "Debug" else "" self.cpp_info.components["libspdlog"].libs = [f"spdlog{suffix}"] self.cpp_info.components["libspdlog"].defines.append("SPDLOG_COMPILED_LIB") - if self.options.wchar_support: + if self.options.get_safe("wchar_support"): self.cpp_info.components["libspdlog"].defines.append("SPDLOG_WCHAR_TO_UTF8_SUPPORT") - if self.options.wchar_filenames: + if self.options.get_safe("wchar_filenames"): self.cpp_info.components["libspdlog"].defines.append("SPDLOG_WCHAR_FILENAMES") + if self.options.get_safe("wchar_console"): + self.cpp_info.components["libspdlog"].defines.append("SPDLOG_UTF8_TO_WCHAR_CONSOLE") if self.options.no_exceptions: self.cpp_info.components["libspdlog"].defines.append("SPDLOG_NO_EXCEPTIONS") if self.settings.os in ["Linux", "FreeBSD"]: self.cpp_info.components["libspdlog"].system_libs = ["pthread"] if self.options.header_only and self.settings.os in ("iOS", "tvOS", "watchOS"): self.cpp_info.components["libspdlog"].defines.append("SPDLOG_NO_TLS") - - self.cpp_info.names["cmake_find_package"] = "spdlog" - self.cpp_info.names["cmake_find_package_multi"] = "spdlog" - self.cpp_info.components["libspdlog"].names["cmake_find_package"] = target - self.cpp_info.components["libspdlog"].names["cmake_find_package_multi"] = target diff --git a/recipes/spdlog/all/test_v1_package/CMakeLists.txt b/recipes/spdlog/all/test_v1_package/CMakeLists.txt deleted file mode 100644 index 0d20897301b68..0000000000000 --- a/recipes/spdlog/all/test_v1_package/CMakeLists.txt +++ /dev/null @@ -1,8 +0,0 @@ -cmake_minimum_required(VERSION 3.1) -project(test_package) - -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) - -add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package - ${CMAKE_CURRENT_BINARY_DIR}/test_package) diff --git a/recipes/spdlog/all/test_v1_package/conanfile.py b/recipes/spdlog/all/test_v1_package/conanfile.py deleted file mode 100644 index 30ca1d12b0933..0000000000000 --- a/recipes/spdlog/all/test_v1_package/conanfile.py +++ /dev/null @@ -1,18 +0,0 @@ -from conans import ConanFile, CMake, tools -import os - - -class TestPackageConan(ConanFile): - settings = "os", "arch", "compiler", "build_type" - generators = "cmake", "cmake_find_package_multi" - - def build(self): - cmake = CMake(self) - cmake.configure() - cmake.build() - - def test(self): - if not tools.cross_building(self): - tools.mkdir("logs/") - bin_path = os.path.join("bin", "test_package") - self.run(bin_path, run_environment=True) diff --git a/recipes/spdlog/config.yml b/recipes/spdlog/config.yml index 86f1d33d1c720..8eb73c576f53e 100644 --- a/recipes/spdlog/config.yml +++ b/recipes/spdlog/config.yml @@ -1,4 +1,10 @@ versions: + "1.15.0": + folder: "all" + "1.14.1": + folder: "all" + "1.14.0": + folder: "all" "1.13.0": folder: "all" "1.12.0": diff --git a/recipes/spirv-cross/all/conandata.yml b/recipes/spirv-cross/all/conandata.yml index 124af978201fc..40968efaae61f 100644 --- a/recipes/spirv-cross/all/conandata.yml +++ b/recipes/spirv-cross/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.3.296.0": + url: "https://github.com/KhronosGroup/SPIRV-Cross/archive/refs/tags/vulkan-sdk-1.3.296.0.tar.gz" + sha256: "4f7f9a8a643e6694f155712016b9b572c13a9444e65b3f43b27bb464c0ab76e0" "1.3.268.0": url: "https://github.com/KhronosGroup/SPIRV-Cross/archive/refs/tags/vulkan-sdk-1.3.268.0.tar.gz" sha256: "dd656a51ba4c229c1a0bb220b7470723e8fd4b68abb7f2cf2ca4027df824f4a0" diff --git a/recipes/spirv-cross/config.yml b/recipes/spirv-cross/config.yml index fee2421b06ee6..b8b365f369ae0 100644 --- a/recipes/spirv-cross/config.yml +++ b/recipes/spirv-cross/config.yml @@ -1,4 +1,6 @@ versions: + "1.3.296.0": + folder: all "1.3.268.0": folder: all "1.3.261.1": diff --git a/recipes/spirv-headers/all/conandata.yml b/recipes/spirv-headers/all/conandata.yml index 44f2fdcf490ab..20f89cd355d4d 100644 --- a/recipes/spirv-headers/all/conandata.yml +++ b/recipes/spirv-headers/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.3.296.0": + url: "https://github.com/KhronosGroup/SPIRV-Headers/archive/refs/tags/vulkan-sdk-1.3.296.0.tar.gz" + sha256: "1423d58a1171611d5aba2bf6f8c69c72ef9c38a0aca12c3493e4fda64c9b2dc6" "1.3.268.0": url: "https://github.com/KhronosGroup/SPIRV-Headers/archive/refs/tags/vulkan-sdk-1.3.268.0.tar.gz" sha256: "1022379e5b920ae21ccfb5cb41e07b1c59352a18c3d3fdcbf38d6ae7733384d4" diff --git a/recipes/spirv-headers/all/conanfile.py b/recipes/spirv-headers/all/conanfile.py index 854ef17328263..0d28680817678 100644 --- a/recipes/spirv-headers/all/conanfile.py +++ b/recipes/spirv-headers/all/conanfile.py @@ -1,6 +1,7 @@ from conan import ConanFile from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout from conan.tools.files import copy, get, rmdir +from conan.tools.scm import Version import os required_conan_version = ">=1.50.0" @@ -28,6 +29,8 @@ def source(self): def generate(self): tc = CMakeToolchain(self) tc.variables["SPIRV_HEADERS_SKIP_EXAMPLES"] = True + if Version(self.version) > "1.3.275.0": + tc.variables["SPIRV_HEADERS_ENABLE_TESTS"] = False tc.generate() def build(self): diff --git a/recipes/spirv-headers/config.yml b/recipes/spirv-headers/config.yml index f615fa9738359..7154e9cb262ce 100644 --- a/recipes/spirv-headers/config.yml +++ b/recipes/spirv-headers/config.yml @@ -1,4 +1,6 @@ versions: + "1.3.296.0": + folder: all "1.3.268.0": folder: all "1.3.261.1": diff --git a/recipes/splunk-opentelemetry-cpp/all/CMakeLists.txt b/recipes/splunk-opentelemetry-cpp/all/CMakeLists.txt deleted file mode 100644 index c0238c83236f9..0000000000000 --- a/recipes/splunk-opentelemetry-cpp/all/CMakeLists.txt +++ /dev/null @@ -1,7 +0,0 @@ -cmake_minimum_required(VERSION 3.5.1) -project(cmake_wrapper) - -include(conanbuildinfo.cmake) -conan_basic_setup() - -add_subdirectory("source_subfolder") diff --git a/recipes/splunk-opentelemetry-cpp/all/conandata.yml b/recipes/splunk-opentelemetry-cpp/all/conandata.yml index d5ceac8af92c2..abbaf169e8c5c 100644 --- a/recipes/splunk-opentelemetry-cpp/all/conandata.yml +++ b/recipes/splunk-opentelemetry-cpp/all/conandata.yml @@ -2,3 +2,8 @@ sources: 0.4.0: url: "https://github.com/signalfx/splunk-otel-cpp/archive/refs/tags/v0.4.0.tar.gz" sha256: "e44f3167cecfea6d1fb0fa3060cc479a0873ab6d481b9b9f57629cbc7d17bfd4" +patches: + "0.4.0": + - patch_file: "patches/0.4.0-001-fix-cmake.patch" + patch_description: "Make CMakeLists.txt compatible with Conan" + patch_type: "conan" diff --git a/recipes/splunk-opentelemetry-cpp/all/conanfile.py b/recipes/splunk-opentelemetry-cpp/all/conanfile.py index 96d1153587973..45da1f403d709 100644 --- a/recipes/splunk-opentelemetry-cpp/all/conanfile.py +++ b/recipes/splunk-opentelemetry-cpp/all/conanfile.py @@ -1,83 +1,115 @@ -from conans import ConanFile, CMake, tools -from conans.errors import ConanInvalidConfiguration import os -import glob + +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.build import check_min_cppstd +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.files import copy, get, rmdir, export_conandata_patches, apply_conandata_patches +from conan.tools.scm import Version + +required_conan_version = ">=1.53.0" class SplunkOpentelemetryConan(ConanFile): name = "splunk-opentelemetry-cpp" + description = "Splunk's distribution of OpenTelemetry C++" license = "Apache-2.0" url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/signalfx/splunk-otel-cpp" - description = "Splunk's distribution of OpenTelemetry C++" topics = ("opentelemetry", "observability", "tracing") - settings = "os", "compiler", "build_type", "arch" + + package_type = "library" + settings = "os", "arch", "compiler", "build_type" options = { - "fPIC": [True, False], "shared": [True, False], + "fPIC": [True, False], + "build_jaeger_exporter": [True, False], } default_options = { - "fPIC": True, "shared": False, + "fPIC": True, + "build_jaeger_exporter": True, } - generators = "cmake", "cmake_find_package_multi" - requires = "opentelemetry-cpp/1.0.1" - exports_sources = "CMakeLists.txt" - short_paths = True - _cmake = None - def validate(self): - if self.settings.arch != "x86_64": - raise ConanInvalidConfiguration("Architecture not supported") + @property + def _min_cppstd(self): + return 14 - def configure(self): - if self.options.shared: - del self.options.fPIC + @property + def _compilers_minimum_version(self): + return { + "gcc": "6", + "clang": "5", + "apple-clang": "10", + "Visual Studio": "16", + "msvc": "192", + } + + def export_sources(self): + export_conandata_patches(self) def config_options(self): if self.settings.os == "Windows": del self.options.fPIC - @property - def _source_subfolder(self): - return "source_subfolder" + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") - @property - def _build_subfolder(self): - return "build_subfolder" + def layout(self): + cmake_layout(self, src_folder="src") - def _remove_unnecessary_package_files(self): - tools.rmdir(os.path.join(self.package_folder, "lib", "cmake")) + def requirements(self): + self.requires("opentelemetry-cpp/1.8.3", transitive_headers=True) # v1.12 is not compatible + self.requires("grpc/1.54.3") + self.requires("nlohmann_json/3.11.3") + if self.options.build_jaeger_exporter: + self.requires("thrift/0.17.0") + self.requires("libcurl/[>=7.78.0 <9]") + + def validate(self): + if self.settings.arch != "x86_64": + raise ConanInvalidConfiguration(f"{self.settings.arch} architecture not supported") + if self.options.build_jaeger_exporter and not self.dependencies["opentelemetry-cpp"].options.get_safe("with_jaeger"): + raise ConanInvalidConfiguration("Cannot build Jaeger exporter without with_jaeger=True in opentelemetry-cpp") + + if self.settings.compiler.cppstd: + check_min_cppstd(self, self._min_cppstd) + minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) + if minimum_version and Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration( + f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." + ) def source(self): - tools.get( - **self.conan_data["sources"][self.version], - strip_root=True, - destination=self._source_subfolder - ) - - def _configure_cmake(self): - if self._cmake: - return self._cmake - - self._cmake = CMake(self) - defs = { - "SPLUNK_CPP_EXAMPLES": False - } - self._cmake.configure(defs=defs, build_folder=self._build_subfolder) - return self._cmake + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + tc.variables["SPLUNK_CPP_TESTS"] = False + tc.variables["SPLUNK_CPP_EXAMPLES"] = False + tc.variables["SPLUNK_CPP_WITH_JAEGER_EXPORTER"] = self.options.build_jaeger_exporter + tc.generate() + tc = CMakeDeps(self) + tc.generate() def build(self): - cmake = self._configure_cmake() + apply_conandata_patches(self) + cmake = CMake(self) + cmake.configure() cmake.build() def package(self): - self.copy(pattern="LICENSE", dst="licenses", src=self._source_subfolder) - cmake = self._configure_cmake() + copy(self, "LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) + cmake = CMake(self) cmake.install() - self._remove_unnecessary_package_files() + rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) def package_info(self): + self.cpp_info.set_property("cmake_file_name", "SplunkOpenTelemetry") + self.cpp_info.set_property("cmake_target_name", "SplunkOpenTelemetry::SplunkOpenTelemetry") + self.cpp_info.libs = ["SplunkOpenTelemetry"] + + # TODO: to remove in conan v2 once cmake_find_package_* generators removed self.cpp_info.names["cmake_find_package"] = "SplunkOpenTelemetry" self.cpp_info.names["cmake_find_package_multi"] = "SplunkOpenTelemetry" - self.cpp_info.libs = ["SplunkOpenTelemetry"] diff --git a/recipes/splunk-opentelemetry-cpp/all/patches/0.4.0-001-fix-cmake.patch b/recipes/splunk-opentelemetry-cpp/all/patches/0.4.0-001-fix-cmake.patch new file mode 100644 index 0000000000000..c4db3358cce46 --- /dev/null +++ b/recipes/splunk-opentelemetry-cpp/all/patches/0.4.0-001-fix-cmake.patch @@ -0,0 +1,26 @@ +--- CMakeLists.txt ++++ CMakeLists.txt +@@ -1,4 +1,4 @@ +-cmake_minimum_required(VERSION 3.5.1) ++cmake_minimum_required(VERSION 3.15) + + project(SplunkOpenTelemetry CXX) + +@@ -6,8 +6,6 @@ + include(GenerateExportHeader) + + set(PACKAGE_VERSION "0.1.0") +- +-set(CMAKE_CXX_STANDARD 11) + + option(SPLUNK_CPP_TESTS "Enable building of tests" OFF) + option(SPLUNK_CPP_EXAMPLES "Enable building of examples" ON) +@@ -36,7 +34,7 @@ + + target_link_libraries(SplunkOpenTelemetry + PUBLIC +- ${OPENTELEMETRY_CPP_LIBRARIES} ++ opentelemetry-cpp::opentelemetry-cpp + gRPC::grpc++ + protobuf::libprotobuf + ${SPLUNK_CPP_JAEGER_EXPORTER_LIBS} diff --git a/recipes/splunk-opentelemetry-cpp/all/test_package/CMakeLists.txt b/recipes/splunk-opentelemetry-cpp/all/test_package/CMakeLists.txt index 66cd3ac3bbc17..a7bd5843a1ba9 100644 --- a/recipes/splunk-opentelemetry-cpp/all/test_package/CMakeLists.txt +++ b/recipes/splunk-opentelemetry-cpp/all/test_package/CMakeLists.txt @@ -1,13 +1,8 @@ -cmake_minimum_required(VERSION 3.12) - +cmake_minimum_required(VERSION 3.15) project(test_package CXX) -set(CMAKE_CXX_STANDARD 11) - -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) find_package(SplunkOpenTelemetry CONFIG REQUIRED) add_executable(test_package test_package.cpp) - target_link_libraries(test_package SplunkOpenTelemetry::SplunkOpenTelemetry) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_14) diff --git a/recipes/splunk-opentelemetry-cpp/all/test_package/conanfile.py b/recipes/splunk-opentelemetry-cpp/all/test_package/conanfile.py index 49a3a66ea5bad..ef5d7042163ec 100644 --- a/recipes/splunk-opentelemetry-cpp/all/test_package/conanfile.py +++ b/recipes/splunk-opentelemetry-cpp/all/test_package/conanfile.py @@ -1,10 +1,19 @@ -from conans import ConanFile, CMake, tools +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake import os class TestPackageConan(ConanFile): - settings = "os", "compiler", "build_type", "arch" - generators = "cmake", "cmake_find_package_multi" + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) def build(self): cmake = CMake(self) @@ -12,6 +21,6 @@ def build(self): cmake.build() def test(self): - if not tools.cross_building(self): - bin_path = os.path.join("bin", "test_package") - self.run(bin_path, run_environment=True) + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/splunk-opentelemetry-cpp/all/test_package/test_package.cpp b/recipes/splunk-opentelemetry-cpp/all/test_package/test_package.cpp index c32b8e88e812f..5b8740706dcc0 100644 --- a/recipes/splunk-opentelemetry-cpp/all/test_package/test_package.cpp +++ b/recipes/splunk-opentelemetry-cpp/all/test_package/test_package.cpp @@ -1,22 +1,8 @@ -#include #include -#include - -int main(int argc, char** argv) { +int main() { splunk::OpenTelemetryOptions otelOptions = splunk::OpenTelemetryOptions() .WithServiceName("my-service") .WithServiceVersion("1.0") - .WithExporter(splunk::ExporterType_JaegerThriftHttp) .WithDeploymentEnvironment("test"); - auto provider = splunk::InitOpentelemetry(otelOptions); - auto span = opentelemetry::trace::Tracer::GetCurrentSpan(); - - char traceId[32] = {0}; - char spanId[16] = {0}; - span->GetContext().trace_id().ToLowerBase16(traceId); - span->GetContext().span_id().ToLowerBase16(spanId); - printf("current span: %.*s:%.*s\n", 32, traceId, 16, spanId); - - return 0; } diff --git a/recipes/splunk-opentelemetry-cpp/all/test_v1_package/CMakeLists.txt b/recipes/splunk-opentelemetry-cpp/all/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..91630d79f4abb --- /dev/null +++ b/recipes/splunk-opentelemetry-cpp/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/splunk-opentelemetry-cpp/all/test_v1_package/conanfile.py b/recipes/splunk-opentelemetry-cpp/all/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..49a3a66ea5bad --- /dev/null +++ b/recipes/splunk-opentelemetry-cpp/all/test_v1_package/conanfile.py @@ -0,0 +1,17 @@ +from conans import ConanFile, CMake, tools +import os + + +class TestPackageConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake", "cmake_find_package_multi" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if not tools.cross_building(self): + bin_path = os.path.join("bin", "test_package") + self.run(bin_path, run_environment=True) diff --git a/recipes/spy/all/conandata.yml b/recipes/spy/all/conandata.yml index a03c066af9192..a6f3a70ed4537 100644 --- a/recipes/spy/all/conandata.yml +++ b/recipes/spy/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.1.0": + url: "https://github.com/jfalcou/spy/archive/1.1.0.tar.gz" + sha256: "35e15dfe7bebcb03fb28c249d2c2c4ed302dadafbfd5f81e71c31b95d1e3b2dd" "1.0.0": url: "https://github.com/jfalcou/spy/archive/1.0.0.tar.gz" sha256: "ae2f508460b3b21436a652e281e1cf44370da5871a9d13086daa04a9e2bd7d1b" diff --git a/recipes/spy/all/conanfile.py b/recipes/spy/all/conanfile.py index 4e3adabd43a05..5d68cfa807921 100644 --- a/recipes/spy/all/conanfile.py +++ b/recipes/spy/all/conanfile.py @@ -10,11 +10,12 @@ class SpyConan(ConanFile): name = "spy" + description = "C++ 17 for constexpr-proof detection and classification of informations about OS, compiler, etc..." license = "MIT" url = "https://github.com/conan-io/conan-center-index" homepage = "https://jfalcou.github.io/spy/" - description = "C++ 17 for constexpr-proof detection and classification of informations about OS, compiler, etc..." - topics = ("c++17", "config", "metaprogramming") + topics = ("config", "metaprogramming", "header-only") + package_type = "header-library" settings = "os", "arch", "compiler", "build_type" no_copy_source = True @@ -27,6 +28,7 @@ def _compilers_minimum_version(self): return { "gcc": "7.4", "Visual Studio": "15.7", + "msvc": "191", "clang": "6", "apple-clang": "10", } @@ -54,11 +56,7 @@ def layout(self): basic_layout(self, src_folder="src") def source(self): - get(self, **self.conan_data["sources"][self.version], - destination=self.source_folder, strip_root=True) - - def build(self): - pass + get(self, **self.conan_data["sources"][self.version], strip_root=True) def package(self): copy(self, "LICENSE.md", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) @@ -66,6 +64,4 @@ def package(self): def package_info(self): self.cpp_info.bindirs = [] - self.cpp_info.frameworkdirs = [] self.cpp_info.libdirs = [] - self.cpp_info.resdirs = [] diff --git a/recipes/spy/all/test_package/conanfile.py b/recipes/spy/all/test_package/conanfile.py index d120a992c06a6..8a5bb47f50c4c 100644 --- a/recipes/spy/all/test_package/conanfile.py +++ b/recipes/spy/all/test_package/conanfile.py @@ -7,6 +7,7 @@ class TestPackageConan(ConanFile): settings = "os", "arch", "compiler", "build_type" generators = "CMakeToolchain", "CMakeDeps", "VirtualRunEnv" + test_type = "explicit" def requirements(self): self.requires(self.tested_reference_str) diff --git a/recipes/spy/config.yml b/recipes/spy/config.yml index 1d92b70b7b274..cab874d2d97fa 100644 --- a/recipes/spy/config.yml +++ b/recipes/spy/config.yml @@ -1,4 +1,6 @@ versions: + "1.1.0": + folder: all "1.0.0": folder: all "0.0.4": diff --git a/recipes/sqlcipher/all/conandata.yml b/recipes/sqlcipher/all/conandata.yml index b9d316e874757..5d877e92e6fb1 100644 --- a/recipes/sqlcipher/all/conandata.yml +++ b/recipes/sqlcipher/all/conandata.yml @@ -1,4 +1,13 @@ sources: + "4.6.1": + url: "https://github.com/sqlcipher/sqlcipher/archive/v4.6.1.zip" + sha256: "93a7475183d47e2d33f85aefa7518e8730796f103612d36ae191ae56209104e0" + "4.6.0": + url: "https://github.com/sqlcipher/sqlcipher/archive/v4.6.0.zip" + sha256: "2d41ba2bf09c74a488f546551f65f0fa8517413307a0509dd2c87d66df6bff95" + "4.5.7": + url: "https://github.com/sqlcipher/sqlcipher/archive/v4.5.7.zip" + sha256: "4f7e00e4b485d162d638094daba354d04aabb0ca68b72cc1826f082b40c9fd7d" "4.5.6": url: "https://github.com/sqlcipher/sqlcipher/archive/v4.5.6.zip" sha256: "5d269166c33c39c4dc6fc14be4ac8cd78b022f8bd59b0775becf0c896331a539" @@ -21,6 +30,18 @@ sources: url: "https://github.com/sqlcipher/sqlcipher/archive/v4.3.0.zip" sha256: "41e1408465488e9c478ca5b7c5f8410405a10caa73b82db60ac115a76c563c05" patches: + "4.6.1": + - patch_file: patches/Makefile.in-v4.6.1.patch + - patch_file: patches/Makefile.msc-v4.6.1.patch + - patch_file: patches/fix_configure-v4.5.7.patch + "4.6.0": + - patch_file: patches/Makefile.in-v4.5.7.patch + - patch_file: patches/Makefile.msc-v4.5.7.patch + - patch_file: patches/fix_configure-v4.5.7.patch + "4.5.7": + - patch_file: patches/Makefile.in-v4.5.7.patch + - patch_file: patches/Makefile.msc-v4.5.7.patch + - patch_file: patches/fix_configure-v4.5.7.patch "4.5.6": - patch_file: patches/Makefile.in-v4.5.6.patch - patch_file: patches/Makefile.msc-v4.5.6.patch diff --git a/recipes/sqlcipher/all/patches/Makefile.in-v4.5.7.patch b/recipes/sqlcipher/all/patches/Makefile.in-v4.5.7.patch new file mode 100644 index 0000000000000..8c0ff8f52c2da --- /dev/null +++ b/recipes/sqlcipher/all/patches/Makefile.in-v4.5.7.patch @@ -0,0 +1,25 @@ +diff --git a/Makefile.in b/Makefile.in +index ce2617c..77242fc 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -677,8 +677,7 @@ SQLITE3_SHELL_TARGET = $(SQLITE3_SHELL_TARGET_@HAVE_WASI_SDK@) + # This is the default Makefile target. The objects listed here + # are what get build when you type just "make" with no arguments. + # +-all: sqlite3.h libsqlcipher.la $(SQLITE3_SHELL_TARGET) \ +- $(HAVE_TCL:1=libtclsqlite3.la) ++all: sqlite3.h libsqlcipher.la + + Makefile: $(TOP)/Makefile.in + ./config.status +@@ -1579,9 +1578,8 @@ lib_install: libsqlcipher.la + $(INSTALL) -d $(DESTDIR)$(libdir) + $(LTINSTALL) libsqlcipher.la $(DESTDIR)$(libdir) + +-install: sqlcipher$(TEXE) lib_install sqlite3.h sqlcipher.pc ${HAVE_TCL:1=tcl_install} ++install: lib_install sqlite3.h sqlcipher.pc + $(INSTALL) -d $(DESTDIR)$(bindir) +- $(LTINSTALL) sqlcipher$(TEXE) $(DESTDIR)$(bindir) + $(INSTALL) -d $(DESTDIR)$(includedir) + $(INSTALL) -m 0644 sqlite3.h $(DESTDIR)$(includedir) + $(INSTALL) -m 0644 $(TOP)/src/sqlite3ext.h $(DESTDIR)$(includedir) diff --git a/recipes/sqlcipher/all/patches/Makefile.in-v4.6.1.patch b/recipes/sqlcipher/all/patches/Makefile.in-v4.6.1.patch new file mode 100644 index 0000000000000..318c717c81e5a --- /dev/null +++ b/recipes/sqlcipher/all/patches/Makefile.in-v4.6.1.patch @@ -0,0 +1,27 @@ +diff --git a/Makefile.in b/Makefile.in +index 8431c25..2c1d4fd 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -676,8 +676,8 @@ SQLITE3_SHELL_TARGET = $(SQLITE3_SHELL_TARGET_@HAVE_WASI_SDK@) + # This is the default Makefile target. The objects listed here + # are what get build when you type just "make" with no arguments. + # +-all: sqlite3.h libsqlcipher.la $(SQLITE3_SHELL_TARGET) \ +- $(HAVE_TCL:1=libtclsqlite3.la) ++all: sqlite3.h libsqlcipher.la ++ + + Makefile: $(TOP)/Makefile.in + ./config.status +@@ -1578,9 +1578,9 @@ lib_install: libsqlcipher.la + $(INSTALL) -d $(DESTDIR)$(libdir) + $(LTINSTALL) libsqlcipher.la $(DESTDIR)$(libdir) + +-install: sqlcipher$(TEXE) lib_install sqlite3.h sqlcipher.pc ${HAVE_TCL:1=tcl_install} ++install: lib_install sqlite3.h sqlcipher.pc + $(INSTALL) -d $(DESTDIR)$(bindir) +- $(LTINSTALL) sqlcipher$(TEXE) $(DESTDIR)$(bindir) ++# $(LTINSTALL) sqlcipher$(TEXE) $(DESTDIR)$(bindir) + $(INSTALL) -d $(DESTDIR)$(includedir) + $(INSTALL) -m 0644 sqlite3.h $(DESTDIR)$(includedir) + $(INSTALL) -m 0644 $(TOP)/src/sqlite3ext.h $(DESTDIR)$(includedir) diff --git a/recipes/sqlcipher/all/patches/Makefile.msc-v4.5.7.patch b/recipes/sqlcipher/all/patches/Makefile.msc-v4.5.7.patch new file mode 100644 index 0000000000000..78ff7f03e70eb --- /dev/null +++ b/recipes/sqlcipher/all/patches/Makefile.msc-v4.5.7.patch @@ -0,0 +1,170 @@ +diff --git a/Makefile.msc b/Makefile.msc +index eb6461c..0e8907b 100644 +--- a/Makefile.msc ++++ b/Makefile.msc +@@ -299,9 +299,9 @@ SQLITE3H = sqlite3.h + # + !IFNDEF SQLITE3DLL + !IF $(FOR_WIN10)!=0 +-SQLITE3DLL = winsqlite3.dll ++SQLITE3DLL = sqlcipher.dll + !ELSE +-SQLITE3DLL = sqlite3.dll ++SQLITE3DLL = sqlcipher.dll + !ENDIF + !ENDIF + +@@ -309,9 +309,9 @@ SQLITE3DLL = sqlite3.dll + # + !IFNDEF SQLITE3LIB + !IF $(FOR_WIN10)!=0 +-SQLITE3LIB = winsqlite3.lib ++SQLITE3LIB = sqlcipher.lib + !ELSE +-SQLITE3LIB = sqlite3.lib ++SQLITE3LIB = sqlcipher.lib + !ENDIF + !ENDIF + +@@ -696,7 +696,7 @@ SHELL_CORE_SRC = $(SQLITE3C) + SHELL_CORE_DEP = $(SQLITE3DLL) + # <> + !ELSEIF $(USE_AMALGAMATION)==0 +-SHELL_CORE_DEP = libsqlite3.lib ++SHELL_CORE_DEP = sqlcipher.lib + # <> + !ELSE + SHELL_CORE_DEP = +@@ -719,7 +719,7 @@ TESTFIXTURE_DEP = zlib $(TESTFIXTURE_DEP) + SHELL_CORE_LIB = $(SQLITE3LIB) + # <> + !ELSEIF $(USE_AMALGAMATION)==0 +-SHELL_CORE_LIB = libsqlite3.lib ++SHELL_CORE_LIB = sqlcipher.lib + # <> + !ELSE + SHELL_CORE_LIB = +@@ -754,8 +754,9 @@ RCC = $(RCC) -DWINAPI_FAMILY=WINAPI_FAMILY_APP + # C compiler options for the Windows 10 platform (needs MSVC 2015). + # + !IF $(FOR_WIN10)!=0 +-TCC = $(TCC) /d2guard4 -D_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE +-BCC = $(BCC) /d2guard4 -D_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE ++# /d2guard4 requires /guard:cf to be present as well, but it doesn't work with /Zi (Debug builds) ++TCC = $(TCC) -D_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE ++BCC = $(BCC) -D_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE + !ENDIF + + # Also, we need to dynamically link to the correct MSVC runtime +@@ -1039,8 +1040,9 @@ TLIBS = + # default to file, 2 to default to memory, and 3 to force temporary + # tables to always be in memory. + # +-TCC = $(TCC) -DSQLITE_TEMP_STORE=1 +-RCC = $(RCC) -DSQLITE_TEMP_STORE=1 ++# Allow overriding the value ++TCC = $(TCC) -DSQLITE_TEMP_STORE=$(SQLITE_TEMP_STORE) ++RCC = $(RCC) -DSQLITE_TEMP_STORE=$(SQLITE_TEMP_STORE) + + # Enable/disable loadable extensions, and other optional features + # based on configuration. (-DSQLITE_OMIT*, -DSQLITE_ENABLE*). +@@ -1206,14 +1208,15 @@ LTLINKOPTS = $(LTLINKOPTS) "/LIBPATH:$(WP81LIBPATH)" + !ENDIF + LTLINKOPTS = $(LTLINKOPTS) /DYNAMICBASE + LTLINKOPTS = $(LTLINKOPTS) WindowsPhoneCore.lib RuntimeObject.lib PhoneAppModelHost.lib +-LTLINKOPTS = $(LTLINKOPTS) /NODEFAULTLIB:kernel32.lib /NODEFAULTLIB:ole32.lib ++# Remove /NODEFAULTLIB:kernel32.lib, required by OpenSSL + !ENDIF + + # When compiling for UWP or the Windows 10 platform, some extra linker + # options are also required. + # + !IF $(FOR_UWP)!=0 || $(FOR_WIN10)!=0 +-LTLINKOPTS = $(LTLINKOPTS) /DYNAMICBASE /NODEFAULTLIB:kernel32.lib ++# Remove /NODEFAULTLIB:kernel32.lib, required by OpenSSL ++LTLINKOPTS = $(LTLINKOPTS) /DYNAMICBASE + LTLINKOPTS = $(LTLINKOPTS) mincore.lib + !IFDEF PSDKLIBPATH + LTLINKOPTS = $(LTLINKOPTS) "/LIBPATH:$(PSDKLIBPATH)" +@@ -1268,7 +1271,7 @@ LTLIBS = $(LTLIBS) $(LIBICU) + # + LIBOBJS0 = vdbe.lo parse.lo alter.lo analyze.lo attach.lo auth.lo \ + backup.lo bitvec.lo btmutex.lo btree.lo build.lo \ +- callback.lo complete.lo ctime.lo \ ++ callback.lo complete.lo crypto.lo crypto_impl.lo crypto_openssl.lo ctime.lo \ + date.lo dbpage.lo dbstat.lo delete.lo \ + expr.lo fault.lo fkey.lo \ + fts3.lo fts3_aux.lo fts3_expr.lo fts3_hash.lo fts3_icu.lo \ +@@ -1603,7 +1606,7 @@ TESTEXT = \ + $(TOP)\ext\rtree\test_rtreedoc.c \ + $(TOP)\ext\recover\sqlite3recover.c \ + $(TOP)\ext\recover\test_recover.c \ +- $(TOP)\ext\recover\dbdata.c ++ $(TOP)\ext\recover\dbdata.c + + # If use of zlib is enabled, add the "zipfile.c" source file. + # +@@ -1779,7 +1782,7 @@ ALL_TCL_TARGETS = + # This is the default Makefile target. The objects listed here + # are what get build when you type just "make" with no arguments. + # +-core: dll libsqlite3.lib shell ++core: dll sqlcipher.lib shell + + # Targets that require the Tcl library. + # +@@ -1798,11 +1801,13 @@ dll: $(SQLITE3DLL) + shell: $(SQLITE3EXE) + + # <> +-libsqlite3.lib: $(LIBOBJ) +- $(LTLIB) $(LTLIBOPTS) /OUT:$@ $(LIBOBJ) $(TLIBS) ++# LTLIBPATHS is required to find the openssl/libressl libs ++sqlcipher.lib: $(LIBOBJ) ++ $(LTLIB) $(LTLIBPATHS) $(LTLIBOPTS) /OUT:$@ $(LIBOBJ) $(TLIBS) ++ ++libtclsqlite3.lib: tclsqlite.lo sqlcipher.lib ++ $(LTLIB) $(LTLIBOPTS) $(TCLLIBPATHS) $(LTLIBPATHS) /OUT:$@ tclsqlite.lo sqlcipher.lib $(LIBTCLSTUB) $(TLIBS) + +-libtclsqlite3.lib: tclsqlite.lo libsqlite3.lib +- $(LTLIB) $(LTLIBOPTS) $(TCLLIBPATHS) $(LTLIBPATHS) /OUT:$@ tclsqlite.lo libsqlite3.lib $(LIBTCLSTUB) $(TLIBS) + + tclsqlite3.def: tclsqlite.lo + echo EXPORTS > tclsqlite3.def +@@ -1824,9 +1829,9 @@ $(SQLITE3DLL): $(LIBOBJ) $(LIBRESOBJS) $(CORE_LINK_DEP) + $(LD) $(LDFLAGS) $(LTLINKOPTS) $(LTLIBPATHS) /DLL $(CORE_LINK_OPTS) /OUT:$@ $(LIBOBJ) $(LIBRESOBJS) $(LTLIBS) $(TLIBS) + + # <> +-sqlite3.def: libsqlite3.lib ++sqlite3.def: sqlcipher.lib + echo EXPORTS > sqlite3.def +- dumpbin /all libsqlite3.lib \ ++ dumpbin /all sqlcipher.lib \ + | $(TCLSH_CMD) $(TOP)\tool\replace.tcl include "^\s+1 _?(sqlite3(?:session|changeset|changegroup|rebaser|rbu)?_[^@]*)(?:@\d+)?$$" \1 \ + | sort >> sqlite3.def + # <> +@@ -2013,6 +2018,15 @@ callback.lo: $(TOP)\src\callback.c $(HDR) + complete.lo: $(TOP)\src\complete.c $(HDR) + $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\complete.c + ++crypto.lo: $(TOP)\src\crypto.c $(HDR) ++ $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\crypto.c ++ ++crypto_impl.lo: $(TOP)\src\crypto_impl.c $(HDR) ++ $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\crypto_impl.c ++ ++crypto_openssl.lo: $(TOP)\src\crypto_openssl.c $(HDR) ++ $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\crypto_openssl.c ++ + ctime.lo: $(TOP)\src\ctime.c $(HDR) + $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\ctime.c + +@@ -2432,7 +2446,7 @@ sqlite3rbu.lo: $(TOP)\ext\rbu\sqlite3rbu.c $(HDR) $(EXTHDR) + # Rules to build the 'testfixture' application. + # + # If using the amalgamation, use sqlite3.c directly to build the test +-# fixture. Otherwise link against libsqlite3.lib. (This distinction is ++# fixture. Otherwise link against sqlcipher.lib. (This distinction is + # necessary because the test fixture requires non-API symbols which are + # hidden when the library is built via the amalgamation). + # diff --git a/recipes/sqlcipher/all/patches/Makefile.msc-v4.6.1.patch b/recipes/sqlcipher/all/patches/Makefile.msc-v4.6.1.patch new file mode 100644 index 0000000000000..7edea48493167 --- /dev/null +++ b/recipes/sqlcipher/all/patches/Makefile.msc-v4.6.1.patch @@ -0,0 +1,160 @@ +diff --git a/Makefile.msc b/Makefile.msc +index d46cee1..899ce6a 100644 +--- a/Makefile.msc ++++ b/Makefile.msc +@@ -306,9 +306,9 @@ SQLITE3H = sqlite3.h + # + !IFNDEF SQLITE3DLL + !IF $(FOR_WIN10)!=0 +-SQLITE3DLL = winsqlite3.dll ++SQLITE3DLL = sqlcipher.dll + !ELSE +-SQLITE3DLL = sqlite3.dll ++SQLITE3DLL = sqlcipher.dll + !ENDIF + !ENDIF + +@@ -316,9 +316,9 @@ SQLITE3DLL = sqlite3.dll + # + !IFNDEF SQLITE3LIB + !IF $(FOR_WIN10)!=0 +-SQLITE3LIB = winsqlite3.lib ++SQLITE3LIB = sqlcipher.lib + !ELSE +-SQLITE3LIB = sqlite3.lib ++SQLITE3LIB = sqlcipher.lib + !ENDIF + !ENDIF + +@@ -703,7 +703,7 @@ SHELL_CORE_SRC = $(SQLITE3C) + SHELL_CORE_DEP = $(SQLITE3DLL) + # <> + !ELSEIF $(USE_AMALGAMATION)==0 +-SHELL_CORE_DEP = libsqlite3.lib ++SHELL_CORE_DEP = sqlcipher.lib + # <> + !ELSE + SHELL_CORE_DEP = +@@ -726,7 +726,7 @@ TESTFIXTURE_DEP = zlib $(TESTFIXTURE_DEP) + SHELL_CORE_LIB = $(SQLITE3LIB) + # <> + !ELSEIF $(USE_AMALGAMATION)==0 +-SHELL_CORE_LIB = libsqlite3.lib ++SHELL_CORE_LIB = sqlcipher.lib + # <> + !ELSE + SHELL_CORE_LIB = +@@ -761,8 +761,9 @@ RCC = $(RCC) -DWINAPI_FAMILY=WINAPI_FAMILY_APP + # C compiler options for the Windows 10 platform (needs MSVC 2015). + # + !IF $(FOR_WIN10)!=0 +-TCC = $(TCC) /d2guard4 -D_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE +-BCC = $(BCC) /d2guard4 -D_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE ++# /d2guard4 requires /guard:cf to be present as well, but it doesn't work with /Zi (Debug builds) ++TCC = $(TCC) -D_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE ++BCC = $(BCC) -D_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE + !ENDIF + + # Also, we need to dynamically link to the correct MSVC runtime +@@ -1046,8 +1047,9 @@ TLIBS = + # default to file, 2 to default to memory, and 3 to force temporary + # tables to always be in memory. + # +-TCC = $(TCC) -DSQLITE_TEMP_STORE=1 +-RCC = $(RCC) -DSQLITE_TEMP_STORE=1 ++# Allow overriding the value ++TCC = $(TCC) -DSQLITE_TEMP_STORE=$(SQLITE_TEMP_STORE) ++RCC = $(RCC) -DSQLITE_TEMP_STORE=$(SQLITE_TEMP_STORE) + + # Enable/disable loadable extensions, and other optional features + # based on configuration. (-DSQLITE_OMIT*, -DSQLITE_ENABLE*). +@@ -1213,14 +1215,15 @@ LTLINKOPTS = $(LTLINKOPTS) "/LIBPATH:$(WP81LIBPATH)" + !ENDIF + LTLINKOPTS = $(LTLINKOPTS) /DYNAMICBASE + LTLINKOPTS = $(LTLINKOPTS) WindowsPhoneCore.lib RuntimeObject.lib PhoneAppModelHost.lib +-LTLINKOPTS = $(LTLINKOPTS) /NODEFAULTLIB:kernel32.lib /NODEFAULTLIB:ole32.lib ++# Remove /NODEFAULTLIB:kernel32.lib, required by OpenSSL + !ENDIF + + # When compiling for UWP or the Windows 10 platform, some extra linker + # options are also required. + # + !IF $(FOR_UWP)!=0 || $(FOR_WIN10)!=0 +-LTLINKOPTS = $(LTLINKOPTS) /DYNAMICBASE /NODEFAULTLIB:kernel32.lib ++# Remove /NODEFAULTLIB:kernel32.lib, required by OpenSSL ++LTLINKOPTS = $(LTLINKOPTS) /DYNAMICBASE + LTLINKOPTS = $(LTLINKOPTS) mincore.lib + !IFDEF PSDKLIBPATH + LTLINKOPTS = $(LTLINKOPTS) "/LIBPATH:$(PSDKLIBPATH)" +@@ -1275,7 +1278,7 @@ LTLIBS = $(LTLIBS) $(LIBICU) + # + LIBOBJS0 = vdbe.lo parse.lo alter.lo analyze.lo attach.lo auth.lo \ + backup.lo bitvec.lo btmutex.lo btree.lo build.lo \ +- callback.lo complete.lo ctime.lo \ ++ callback.lo complete.lo crypto.lo crypto_impl.lo crypto_openssl.lo ctime.lo \ + date.lo dbpage.lo dbstat.lo delete.lo \ + expr.lo fault.lo fkey.lo \ + fts3.lo fts3_aux.lo fts3_expr.lo fts3_hash.lo fts3_icu.lo \ +@@ -1786,7 +1789,7 @@ ALL_TCL_TARGETS = + # This is the default Makefile target. The objects listed here + # are what get build when you type just "make" with no arguments. + # +-core: dll libsqlite3.lib shell ++core: dll sqlcipher.lib shell + + # Targets that require the Tcl library. + # +@@ -1805,11 +1808,12 @@ dll: $(SQLITE3DLL) + shell: $(SQLITE3EXE) + + # <> +-libsqlite3.lib: $(LIBOBJ) +- $(LTLIB) $(LTLIBOPTS) /OUT:$@ $(LIBOBJ) $(TLIBS) ++# LTLIBPATHS is required to find the openssl/libressl libs ++sqlcipher.lib: $(LIBOBJ) ++ $(LTLIB) $(LTLIBPATHS) $(LTLIBOPTS) /OUT:$@ $(LIBOBJ) $(TLIBS) + +-libtclsqlite3.lib: tclsqlite.lo libsqlite3.lib +- $(LTLIB) $(LTLIBOPTS) $(TCLLIBPATHS) $(LTLIBPATHS) /OUT:$@ tclsqlite.lo libsqlite3.lib $(LIBTCLSTUB) $(TLIBS) ++libtclsqlite3.lib: tclsqlite.lo sqlcipher.lib ++ $(LTLIB) $(LTLIBOPTS) $(TCLLIBPATHS) $(LTLIBPATHS) /OUT:$@ tclsqlite.lo sqlcipher.lib $(LIBTCLSTUB) $(TLIBS) + + tclsqlite3.def: tclsqlite.lo + echo EXPORTS > tclsqlite3.def +@@ -1831,9 +1835,9 @@ $(SQLITE3DLL): $(LIBOBJ) $(LIBRESOBJS) $(CORE_LINK_DEP) + $(LD) $(LDFLAGS) $(LTLINKOPTS) $(LTLIBPATHS) /DLL $(CORE_LINK_OPTS) /OUT:$@ $(LIBOBJ) $(LIBRESOBJS) $(LTLIBS) $(TLIBS) + + # <> +-sqlite3.def: libsqlite3.lib ++sqlite3.def: sqlcipher.lib + echo EXPORTS > sqlite3.def +- dumpbin /all libsqlite3.lib \ ++ dumpbin /all sqlcipher.lib \ + | $(TCLSH_CMD) $(TOP)\tool\replace.tcl include "^\s+1 _?(sqlite3(?:session|changeset|changegroup|rebaser|rbu)?_[^@]*)(?:@\d+)?$$" \1 \ + | sort >> sqlite3.def + # <> +@@ -2020,6 +2024,15 @@ callback.lo: $(TOP)\src\callback.c $(HDR) + complete.lo: $(TOP)\src\complete.c $(HDR) + $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\complete.c + ++crypto.lo: $(TOP)\src\crypto.c $(HDR) ++ $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\crypto.c ++ ++crypto_impl.lo: $(TOP)\src\crypto_impl.c $(HDR) ++ $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\crypto_impl.c ++ ++crypto_openssl.lo: $(TOP)\src\crypto_openssl.c $(HDR) ++ $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\crypto_openssl.c ++ + ctime.lo: $(TOP)\src\ctime.c $(HDR) + $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\ctime.c + +@@ -2444,7 +2457,7 @@ sqlite3rbu.lo: $(TOP)\ext\rbu\sqlite3rbu.c $(HDR) $(EXTHDR) + # Rules to build the 'testfixture' application. + # + # If using the amalgamation, use sqlite3.c directly to build the test +-# fixture. Otherwise link against libsqlite3.lib. (This distinction is ++# fixture. Otherwise link against sqlcipher.lib. (This distinction is + # necessary because the test fixture requires non-API symbols which are + # hidden when the library is built via the amalgamation). + # diff --git a/recipes/sqlcipher/all/patches/fix_configure-v4.5.7.patch b/recipes/sqlcipher/all/patches/fix_configure-v4.5.7.patch new file mode 100644 index 0000000000000..902782af36686 --- /dev/null +++ b/recipes/sqlcipher/all/patches/fix_configure-v4.5.7.patch @@ -0,0 +1,20 @@ +diff --git a/configure b/configure +index 2ee4143..753e9b1 100755 +--- a/configure ++++ b/configure +@@ -12732,7 +12732,6 @@ then : + printf %s "(cached) " >&6 + else $as_nop + ac_check_lib_save_LIBS=$LIBS +-LIBS="-lcrypto $LIBS" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + +@@ -12764,7 +12763,6 @@ if test "x$ac_cv_lib_crypto_HMAC_Init_ex" = xyes + then : + printf "%s\n" "#define HAVE_LIBCRYPTO 1" >>confdefs.h + +- LIBS="-lcrypto $LIBS" + + else $as_nop + as_fn_error $? "Library crypto not found. Install openssl!\"" "$LINENO" 5 diff --git a/recipes/sqlcipher/config.yml b/recipes/sqlcipher/config.yml index e679e5bd0c0e9..b3abcbf305759 100644 --- a/recipes/sqlcipher/config.yml +++ b/recipes/sqlcipher/config.yml @@ -1,4 +1,10 @@ versions: + "4.6.1": + folder: all + "4.6.0": + folder: all + "4.5.7": + folder: all "4.5.6": folder: all "4.5.1": diff --git a/recipes/sqlite3/all/conandata.yml b/recipes/sqlite3/all/conandata.yml index 1f5bb786d1767..09dedceb22aa0 100644 --- a/recipes/sqlite3/all/conandata.yml +++ b/recipes/sqlite3/all/conandata.yml @@ -1,4 +1,16 @@ sources: + "3.47.0": + url: "https://sqlite.org/2024/sqlite-amalgamation-3470000.zip" + sha256: "2842fddbb1cc33f66c7da998a57535f14a6bfee159676a07bb4bf3e59375d93e" + "3.46.1": + url: "https://sqlite.org/2024/sqlite-amalgamation-3460100.zip" + sha256: "77823cb110929c2bcb0f5d48e4833b5c59a8a6e40cdea3936b99e199dbbe5784" + "3.46.0": + url: "https://sqlite.org/2024/sqlite-amalgamation-3460000.zip" + sha256: "712a7d09d2a22652fb06a49af516e051979a3984adb067da86760e60ed51a7f5" + "3.45.3": + url: "https://sqlite.org/2024/sqlite-amalgamation-3450300.zip" + sha256: "ea170e73e447703e8359308ca2e4366a3ae0c4304a8665896f068c736781c651" "3.45.2": url: "https://sqlite.org/2024/sqlite-amalgamation-3450200.zip" sha256: "65230414820d43a6d1445d1d98cfe57e8eb9f7ac0d6a96ad6932e0647cce51db" diff --git a/recipes/sqlite3/config.yml b/recipes/sqlite3/config.yml index 97c45a94fa443..f5054a322bf3f 100644 --- a/recipes/sqlite3/config.yml +++ b/recipes/sqlite3/config.yml @@ -1,4 +1,12 @@ versions: + "3.47.0": + folder: all + "3.46.1": + folder: all + "3.46.0": + folder: all + "3.45.3": + folder: all "3.45.2": folder: all "3.45.1": diff --git a/recipes/sqlite3mc/all/conandata.yml b/recipes/sqlite3mc/all/conandata.yml index 462228eb46b29..41db86853d2fd 100644 --- a/recipes/sqlite3mc/all/conandata.yml +++ b/recipes/sqlite3mc/all/conandata.yml @@ -1,4 +1,13 @@ sources: + "1.9.0": + url: "https://github.com/utelle/SQLite3MultipleCiphers/archive/refs/tags/v1.9.0.tar.gz" + sha256: "b30dcf695ad3a53b32b8907a3920ab2b38670c7d37232839d0fb3148c41166da" + "1.8.6": + url: "https://github.com/utelle/SQLite3MultipleCiphers/archive/refs/tags/v1.8.6.tar.gz" + sha256: "7250e3d9ca4368df00d0ebfaa744add66b458a5de318728b95369d621ebf2028" + "1.8.4": + url: "https://github.com/utelle/SQLite3MultipleCiphers/archive/refs/tags/v1.8.4.tar.gz" + sha256: "453e1938a02c91796a013169d56f746f153d7c7a77b59894bf8462b341a343ca" "1.8.0": url: "https://github.com/utelle/SQLite3MultipleCiphers/archive/refs/tags/v1.8.0.tar.gz" sha256: "13D9B939BEF7C7371D58A3874F83B18CF330EB2171205B3680ACDDB2215BE0E5" diff --git a/recipes/sqlite3mc/all/conanfile.py b/recipes/sqlite3mc/all/conanfile.py index eddb5a88de890..f99b4eebdebe5 100644 --- a/recipes/sqlite3mc/all/conanfile.py +++ b/recipes/sqlite3mc/all/conanfile.py @@ -2,6 +2,7 @@ from conan import ConanFile from conan.tools.cmake import cmake_layout, CMakeDeps, CMakeToolchain, CMake from conan.tools.files import get, copy +from conan.tools.scm import Version required_conan_version = ">=1.53.0" @@ -84,7 +85,7 @@ class sqlite3mc(ConanFile): "enable_rtree": True, "enable_uuid": True, "use_uri": True, - "user_authentication": True, + "user_authentication": False, "enable_preupdate_hook": False, "enable_session": False, "shell_is_utf8": True, @@ -114,6 +115,9 @@ def build_requirements(self): def config_options(self): if self.settings.os == "Windows": del self.options.fPIC + if Version(self.version) < "1.8.4": + # INFO: https://github.com/utelle/SQLite3MultipleCiphers/commit/3bb033956816b3301f026abb5e83087799de5bee + self.options.user_authentication = True def configure(self): if self.options.shared: diff --git a/recipes/sqlite3mc/config.yml b/recipes/sqlite3mc/config.yml index 4d72270a88048..6ebdf822191fc 100644 --- a/recipes/sqlite3mc/config.yml +++ b/recipes/sqlite3mc/config.yml @@ -1,3 +1,9 @@ versions: + "1.9.0": + folder: all + "1.8.6": + folder: all + "1.8.4": + folder: all "1.8.0": folder: all diff --git a/recipes/sqlite_orm/all/conandata.yml b/recipes/sqlite_orm/all/conandata.yml index b99589eb8062e..a5275f45fe034 100644 --- a/recipes/sqlite_orm/all/conandata.yml +++ b/recipes/sqlite_orm/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.9": + url: "https://github.com/fnc12/sqlite_orm/archive/refs/tags/v1.9.tar.gz" + sha256: "a2fa433e24f6873a9e8cd9dd7e49d2d12640b458f3f6f941163cf60f6673b8a2" "1.8.2": url: "https://github.com/fnc12/sqlite_orm/archive/refs/tags/v1.8.2.tar.gz" sha256: "56e0c7729800637a8061658d0fdad4424d2cdde77b063d23cc1b76aa20339072" diff --git a/recipes/sqlite_orm/all/conanfile.py b/recipes/sqlite_orm/all/conanfile.py index 056b8b5414928..4c411ee943206 100644 --- a/recipes/sqlite_orm/all/conanfile.py +++ b/recipes/sqlite_orm/all/conanfile.py @@ -3,6 +3,7 @@ from conan.tools.build import check_min_cppstd from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get from conan.tools.layout import basic_layout +from conan.tools.scm import Version import os required_conan_version = ">=1.52.0" @@ -12,9 +13,9 @@ class SqliteOrmConan(ConanFile): name = "sqlite_orm" description = "SQLite ORM light header only library for modern C++." license = "BSD-3-Clause" - topics = ("sqlite", "sql", "database", "orm") - homepage = "https://github.com/fnc12/sqlite_orm" url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/fnc12/sqlite_orm" + topics = ("sqlite", "sql", "database", "orm", "header-only") package_type = "header-library" settings = "os", "arch", "compiler", "build_type" @@ -25,7 +26,7 @@ def _min_cppstd(self): @property def _compilers_minimum_version(self): return { - "gcc": "5", + "gcc": "5" if Version(self.version) < "1.9" else "8", "Visual Studio": "14", "msvc": "190", "clang": "3.4", diff --git a/recipes/sqlite_orm/config.yml b/recipes/sqlite_orm/config.yml index ab20df18e03f0..62ef26b962237 100644 --- a/recipes/sqlite_orm/config.yml +++ b/recipes/sqlite_orm/config.yml @@ -1,4 +1,6 @@ versions: + "1.9": + folder: all "1.8.2": folder: all "1.8.1": diff --git a/recipes/sqlitecpp/all/conandata.yml b/recipes/sqlitecpp/all/conandata.yml index a10675f041108..d52b243030764 100644 --- a/recipes/sqlitecpp/all/conandata.yml +++ b/recipes/sqlitecpp/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "3.3.2": + url: "https://github.com/SRombauts/SQLiteCpp/archive/3.3.2.tar.gz" + sha256: "5aa8eda130d0689bd5ed9b2074714c2dbc610f710483c61ba6cf944cebfe03af" "3.3.1": url: "https://github.com/SRombauts/SQLiteCpp/archive/3.3.1.tar.gz" sha256: "71f990f9fb4b004533b6859ce40729af823b87fe691dd99ca084a7fd40db54b9" diff --git a/recipes/sqlitecpp/config.yml b/recipes/sqlitecpp/config.yml index b3381f7005ac8..98605ec73a785 100644 --- a/recipes/sqlitecpp/config.yml +++ b/recipes/sqlitecpp/config.yml @@ -1,4 +1,6 @@ versions: + "3.3.2": + folder: all "3.3.1": folder: all "3.3.0": diff --git a/recipes/statistic/all/conandata.yml b/recipes/statistic/all/conandata.yml new file mode 100644 index 0000000000000..c9f570c26cbed --- /dev/null +++ b/recipes/statistic/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "1.0.8": + url: "https://github.com/RobTillaart/Statistic/archive/refs/tags/1.0.8.tar.gz" + sha256: "44ed39d05fb9280ad88e88d732805a228a69110fac6d1377bcf64cc84a363241" diff --git a/recipes/statistic/all/conanfile.py b/recipes/statistic/all/conanfile.py new file mode 100644 index 0000000000000..612fd3e02ff8c --- /dev/null +++ b/recipes/statistic/all/conanfile.py @@ -0,0 +1,52 @@ +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.files import copy, get +from conan.tools.layout import basic_layout +from conan.tools.build import check_min_cppstd +from conan.tools.microsoft import is_msvc +import os + +required_conan_version = ">=1.52.0" + +class StatisticConan(ConanFile): + name = "statistic" + description = "Statistic library for Arduino includes sum, average, variance and std deviation" + license = "MIT" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/RobTillaart/Statistic" + topics = ("arduino", "statistics", "header-only") + package_type = "header-library" + settings = "os", "arch", "compiler", "build_type" + no_copy_source = True + + @property + def _min_cppstd(self): + return 11 + + def layout(self): + basic_layout(self, src_folder="src") + + def package_id(self): + self.info.clear() + + def validate(self): + if is_msvc(self): + raise ConanInvalidConfiguration(f"{self.ref} does not support Visual Studio") + if self.settings.compiler.get_safe("cppstd"): + check_min_cppstd(self, self._min_cppstd) + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def package(self): + copy(self, "LICENSE", self.source_folder, os.path.join(self.package_folder, "licenses")) + copy( + self, + "Statistic.h", + self.source_folder, + os.path.join(self.package_folder, "include"), + ) + + def package_info(self): + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] diff --git a/recipes/statistic/all/test_package/CMakeLists.txt b/recipes/statistic/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..9b9900a401fc1 --- /dev/null +++ b/recipes/statistic/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) + +find_package(statistic REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE statistic::statistic) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) diff --git a/recipes/statistic/all/test_package/conanfile.py b/recipes/statistic/all/test_package/conanfile.py new file mode 100644 index 0000000000000..3a91c9439218e --- /dev/null +++ b/recipes/statistic/all/test_package/conanfile.py @@ -0,0 +1,26 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def layout(self): + cmake_layout(self) + + def requirements(self): + self.requires(self.tested_reference_str) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/statistic/all/test_package/test_package.cpp b/recipes/statistic/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..185ea7dc94706 --- /dev/null +++ b/recipes/statistic/all/test_package/test_package.cpp @@ -0,0 +1,20 @@ +#include +#if defined __has_include && __has_include() +# define HAVE_STDCXX_LIMITS 1 +#endif +#include "Statistic.h" + +int main(void) { + statistic::Statistic myStats; + + for (int i = 0; i < 10; i++) { + myStats.add(i); + } + std::cout << myStats.count() << std::endl; + std::cout << myStats.average() << std::endl; + std::cout << myStats.variance() << std::endl; + std::cout << myStats.minimum() << std::endl; + std::cout << myStats.maximum() << std::endl; + + return 0; +} diff --git a/recipes/statistic/config.yml b/recipes/statistic/config.yml new file mode 100644 index 0000000000000..28e3ee22ca8ac --- /dev/null +++ b/recipes/statistic/config.yml @@ -0,0 +1,3 @@ +versions: + "1.0.8": + folder: all diff --git a/recipes/status-code/all/conandata.yml b/recipes/status-code/all/conandata.yml index 49b0985bc39b6..70939803c28aa 100644 --- a/recipes/status-code/all/conandata.yml +++ b/recipes/status-code/all/conandata.yml @@ -2,3 +2,6 @@ sources: "cci.20220616": url: "https://github.com/ned14/status-code/archive/38e1e862386cb38d577664fd681ef829b0e03fba.tar.gz" sha256: "faf112df1633a1ee1f58c8b056130154b7c0dbf12e7f006a04dc376500d271c3" + "cci.20240614": + url: "https://github.com/ned14/status-code/archive/a6689afceb19ed127ec4a828dcf1597102e6c02d.tar.gz" + sha256: "f9725675f9d124d2223f9554f11a7f9dcb4893ea2b8a73bd3f7b182f23ba26ca" diff --git a/recipes/status-code/all/conanfile.py b/recipes/status-code/all/conanfile.py index ba9f0306e38c0..9e9d6e1e369a2 100644 --- a/recipes/status-code/all/conanfile.py +++ b/recipes/status-code/all/conanfile.py @@ -53,3 +53,7 @@ def package_info(self): # See https://github.com/ned14/status-code/blob/38e1e862386cb38d577664fd681ef829b0e03fba/CMakeLists.txt#L126 self.cpp_info.set_property("cmake_file_name", "status-code") self.cpp_info.set_property("cmake_target_name", "status-code::hl") + + # TODO: to remove in conan v2 once cmake_find_package_* generators removed + self.cpp_info.components["hl"].names["cmake_find_package"] = "hl" + self.cpp_info.components["hl"].names["cmake_find_package_multi"] = "hl" diff --git a/recipes/status-code/all/test_package/test_package.cpp b/recipes/status-code/all/test_package/test_package.cpp index a2a617bc7f941..ac3726f0591c8 100644 --- a/recipes/status-code/all/test_package/test_package.cpp +++ b/recipes/status-code/all/test_package/test_package.cpp @@ -1,4 +1,8 @@ -#include +#if __has_include() +# include +#else +# include +#endif int main() { system_error2::system_code sc; diff --git a/recipes/status-code/all/test_v1_package/CMakeLists.txt b/recipes/status-code/all/test_v1_package/CMakeLists.txt index 378dd67690afd..54d2c07bb9d41 100644 --- a/recipes/status-code/all/test_v1_package/CMakeLists.txt +++ b/recipes/status-code/all/test_v1_package/CMakeLists.txt @@ -4,9 +4,5 @@ project(test_package LANGUAGES CXX) include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) conan_basic_setup(TARGETS) -# Just a workaround to not supprt the deprecated generators while passing the 1.x hooks -find_package(status-code CONFIG REQUIRED) -add_library(status-code::hl ALIAS status-code::status-code) - add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/status-code/config.yml b/recipes/status-code/config.yml index 484ac289f9edf..9cd6d00352fb6 100644 --- a/recipes/status-code/config.yml +++ b/recipes/status-code/config.yml @@ -1,3 +1,5 @@ versions: "cci.20220616": folder: all + "cci.20240614": + folder: all diff --git a/recipes/stb/all/conandata.yml b/recipes/stb/all/conandata.yml index c0c0739831fe0..1fad76276ca33 100644 --- a/recipes/stb/all/conandata.yml +++ b/recipes/stb/all/conandata.yml @@ -1,16 +1,13 @@ sources: + "cci.20240531": + url: "https://github.com/nothings/stb/archive/013ac3beddff3dbffafd5177e7972067cd2b5083.zip" + sha256: "b7f476902bbef1b30f8ecc2d9d95c459c32302c8b559d09b589b5955463b7af8" + "cci.20240213": + url: "https://github.com/nothings/stb/archive/ae721c50eaf761660b4f90cc590453cdb0c2acd0.zip" + sha256: "5d075769721e676746d0c25b698a0f00741f68252f9ab4b7ee245c513aeec3de" "cci.20230920": url: "https://github.com/nothings/stb/archive/5736b15f7ea0ffb08dd38af21067c314d6a3aae9.zip" sha256: "b6601f182fa4bc04dd0f135e38231e8a2c6c9e7901c66a942871f03285713b05" "cci.20220909": url: "https://github.com/nothings/stb/archive/8b5f1f37b5b75829fc72d38e7b5d4bcbf8a26d55.zip" sha256: "93a16ee3e866e719feec459f6f132cce932c5ec751eb38e3ec1975f911353d2e" - "cci.20210910": - url: "https://github.com/nothings/stb/archive/af1a5bc352164740c1cc1354942b1c6b72eacb8a.zip" - sha256: "e3d0edbecd356506d3d69b87419de2f9d180a98099134c6343177885f6c2cbef" - "cci.20210713": - url: "https://github.com/nothings/stb/archive/3a1174060a7dd4eb652d4e6854bc4cd98c159200.zip" - sha256: "9313f6871195b97771ce7da1feae0b3d92c7936456f13099edb54a78096ca93c" - "cci.20200203": - url: "https://github.com/nothings/stb/archive/0224a44a10564a214595797b4c88323f79a5f934.zip" - sha256: "5dd9cf8a9a8c0f253fad3e9904923b2dfc740eddbc86415c3f76152bd534f23a" diff --git a/recipes/stb/all/conanfile.py b/recipes/stb/all/conanfile.py index 7c777ca96ad4c..c1669e45a6c47 100644 --- a/recipes/stb/all/conanfile.py +++ b/recipes/stb/all/conanfile.py @@ -10,10 +10,10 @@ class StbConan(ConanFile): name = "stb" description = "single-file public domain libraries for C/C++" - topics = ("stb", "single-file") + license = ("Unlicense", "MIT") url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/nothings/stb" - license = ("Unlicense", "MIT") + topics = ("stb", "single-file", "header-only") package_type = "header-library" settings = "os", "arch", "compiler", "build_type" no_copy_source = True @@ -51,9 +51,6 @@ def package_id(self): def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) - def build(self): - pass - def package(self): copy(self, "LICENSE", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) copy(self, "*.h", src=self.source_folder, dst=os.path.join(self.package_folder, "include")) diff --git a/recipes/stb/config.yml b/recipes/stb/config.yml index a0248de0acece..ea0f41f79734d 100644 --- a/recipes/stb/config.yml +++ b/recipes/stb/config.yml @@ -1,11 +1,9 @@ versions: - "cci.20230920": - folder: all - "cci.20220909": + "cci.20240531": folder: all - "cci.20210910": + "cci.20240213": folder: all - "cci.20210713": + "cci.20230920": folder: all - "cci.20200203": + "cci.20220909": folder: all diff --git a/recipes/stella-cv-fbow/all/conandata.yml b/recipes/stella-cv-fbow/all/conandata.yml new file mode 100644 index 0000000000000..54c56ba718ab0 --- /dev/null +++ b/recipes/stella-cv-fbow/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "cci.20240508": + url: "https://github.com/stella-cv/FBoW/archive/c6e3c29e3332a0b0834021797e2aa4e8eb66a3c1.zip" + sha256: "23d866d86eaca6a85da8fe3e542b94324d5f6be4b37691cf82cd74a6cfd838bd" diff --git a/recipes/stella-cv-fbow/all/conanfile.py b/recipes/stella-cv-fbow/all/conanfile.py new file mode 100644 index 0000000000000..14eb8529d8c92 --- /dev/null +++ b/recipes/stella-cv-fbow/all/conanfile.py @@ -0,0 +1,127 @@ +import os + +from conan import ConanFile +from conan.tools.build import check_min_cppstd +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.files import copy, get, rm, rmdir, replace_in_file + +required_conan_version = ">=1.53.0" + + +class StellaCvFbowConan(ConanFile): + name = "stella-cv-fbow" + description = "FBoW (Fast Bag of Words) is an extremely optimized version of the DBoW2/DBoW3 libraries." + license = "MIT" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/stella-cv/FBoW" + topics = ("bag-of-words", "computer-vision", "visual-slam", "dbow") + + package_type = "library" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + "fast_math": [True, False], + "avx": [True, False], + "mmx": [True, False], + "sse": [True, False], + "sse2": [True, False], + "sse3": [True, False], + "sse4": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + "fast_math": True, + "avx": True, + "mmx": True, + "sse": True, + "sse2": True, + "sse3": True, + "sse4": True, + } + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + if self.settings.arch not in ["x86", "x86_64"] or self.settings.compiler not in ["gcc", "clang", "apple-clang"]: + del self.options.avx + del self.options.mmx + del self.options.sse + del self.options.sse2 + del self.options.sse3 + del self.options.sse4 + + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + + def layout(self): + cmake_layout(self, src_folder="src") + + def requirements(self): + # https://github.com/stella-cv/FBoW/blob/master/include/fbow/vocabulary.h#L35 + self.requires("opencv/4.9.0", transitive_headers=True, transitive_libs=True) + self.requires("llvm-openmp/17.0.6") + + def validate(self): + if self.settings.compiler.cppstd: + check_min_cppstd(self, 11) + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + tc.variables["USE_FAST_MATH"] = self.options.fast_math + tc.variables["USE_AVX"] = self.options.get_safe("avx", False) + tc.variables["USE_MMX"] = self.options.get_safe("mmx", False) + tc.variables["USE_SSE"] = self.options.get_safe("sse", False) + tc.variables["USE_SSE2"] = self.options.get_safe("sse2", False) + tc.variables["USE_SSE3"] = self.options.get_safe("sse3", False) + tc.variables["USE_SSE4"] = self.options.get_safe("sse4", False) + tc.variables["BUILD_UTILS"] = False + tc.variables["BUILD_TESTS"] = False + tc.variables["USE_CONTRIB"] = self.dependencies["opencv"].options.xfeatures2d + tc.generate() + + tc = CMakeDeps(self) + tc.generate() + + def _patch_sources(self): + # Let Conan set the C++ standard + if self.settings.compiler.cppstd: + replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), + "set(CMAKE_CXX_STANDARD 11)", "") + + def build(self): + self._patch_sources() + cmake = CMake(self) + cmake.configure() + cmake.build() + + def package(self): + copy(self, "LICENSE", self.source_folder, os.path.join(self.package_folder, "licenses")) + cmake = CMake(self) + cmake.install() + rmdir(self, os.path.join(self.package_folder, "share")) + rm(self, "*.pdb", self.package_folder, recursive=True) + + def package_info(self): + self.cpp_info.set_property("cmake_file_name", "fbow") + self.cpp_info.set_property("cmake_target_name", "fbow::fbow") + # unofficial + self.cpp_info.set_property("pkg_config_name", "fbow") + + self.cpp_info.libs = ["fbow"] + self.cpp_info.requires = [ + "opencv::opencv_core", + "opencv::opencv_features2d", + "opencv::opencv_highgui", + "llvm-openmp::llvm-openmp", + ] + if self.dependencies["opencv"].options.xfeatures2d: + self.cpp_info.requires.append("opencv::opencv_xfeatures2d") + + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.system_libs.extend(["m", "pthread"]) diff --git a/recipes/stella-cv-fbow/all/test_package/CMakeLists.txt b/recipes/stella-cv-fbow/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..825104df78ead --- /dev/null +++ b/recipes/stella-cv-fbow/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) + +find_package(fbow REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE fbow::fbow) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) diff --git a/recipes/stella-cv-fbow/all/test_package/conanfile.py b/recipes/stella-cv-fbow/all/test_package/conanfile.py new file mode 100644 index 0000000000000..ef5d7042163ec --- /dev/null +++ b/recipes/stella-cv-fbow/all/test_package/conanfile.py @@ -0,0 +1,26 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/stella-cv-fbow/all/test_package/test_package.cpp b/recipes/stella-cv-fbow/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..f51d557796902 --- /dev/null +++ b/recipes/stella-cv-fbow/all/test_package/test_package.cpp @@ -0,0 +1,10 @@ +#include +#include +#include + +int main() { + auto features = fbow::cpu(); + features.detect_host(); + std::cout << "CPU Vendor String: " << fbow::cpu::get_vendor_string() << '\n'; + std::cout << "64-bit = " << features.OS_x64 << '\n'; +} diff --git a/recipes/stella-cv-fbow/config.yml b/recipes/stella-cv-fbow/config.yml new file mode 100644 index 0000000000000..ea26172cf981e --- /dev/null +++ b/recipes/stella-cv-fbow/config.yml @@ -0,0 +1,3 @@ +versions: + "cci.20240508": + folder: all diff --git a/recipes/strawberryperl/all/conanfile.py b/recipes/strawberryperl/all/conanfile.py index e5d600869e82f..f6b47f3dd18e0 100644 --- a/recipes/strawberryperl/all/conanfile.py +++ b/recipes/strawberryperl/all/conanfile.py @@ -14,6 +14,7 @@ class StrawberryPerlConan(ConanFile): homepage = "http://strawberryperl.com" url = "https://github.com/conan-io/conan-center-index" topics = ("perl", "interpreter", "windows") + package_type = "application" settings = "os", "arch", "compiler", "build_type" def layout(self): @@ -24,8 +25,10 @@ def package_id(self): del self.info.settings.build_type def validate(self): - if self.info.settings.os != "Windows": - raise ConanInvalidConfiguration("Strawberry Perl is only intended to be used on Windows.") + if self.settings.os != "Windows": + raise ConanInvalidConfiguration(f"{self.ref} is only intended to be used on Windows.") + if self.settings.arch not in ("x86", "x86_64"): + raise ConanInvalidConfiguration(f"{self.ref} is only available for x86 and x86_64 architectures.") def source(self): pass diff --git a/recipes/streaming-percentiles/all/conandata.yml b/recipes/streaming-percentiles/all/conandata.yml new file mode 100644 index 0000000000000..475aaed46b221 --- /dev/null +++ b/recipes/streaming-percentiles/all/conandata.yml @@ -0,0 +1,10 @@ +sources: + "3.1.0": + url: "https://github.com/sengelha/streaming-percentiles/archive/refs/tags/v3.1.0.tar.gz" + sha256: "196d76a7d7ce1bcdb6f720b1c2d8feb1cda62ac18cc6412f8bd907e4eafbab6c" +patches: + "3.1.0": + - patch_file: "patches/3.1.0-0001-add-includes.patch" + patch_description: "include missing headers (already applied to upstream)" + patch_type: "backport" + patch_source: "https://github.com/sengelha/streaming-percentiles/commit/058037eca3e05fafa1b53071137f3c168a9fdd92" diff --git a/recipes/streaming-percentiles/all/conanfile.py b/recipes/streaming-percentiles/all/conanfile.py new file mode 100644 index 0000000000000..6b5b0813aa365 --- /dev/null +++ b/recipes/streaming-percentiles/all/conanfile.py @@ -0,0 +1,54 @@ +from conan import ConanFile +from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get +from conan.tools.layout import basic_layout +from conan.tools.build import check_min_cppstd +import os + +required_conan_version = ">=1.52.0" + +class StreamingPercentilesConan(ConanFile): + name = "streaming-percentiles" + description = "Cross-platform, multi-language implementation of multiple streaming percentile algorithms" + license = "MIT" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/sengelha/streaming-percentiles" + topics = ("streaming", "percentiles", "header-only") + package_type = "header-library" + settings = "os", "arch", "compiler", "build_type" + no_copy_source = True + + @property + def _min_cppstd(self): + return 11 + + def export_sources(self): + export_conandata_patches(self) + + def layout(self): + basic_layout(self, src_folder="src") + + def package_id(self): + self.info.clear() + + def validate(self): + if self.settings.compiler.cppstd: + check_min_cppstd(self, self._min_cppstd) + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def build(self): + apply_conandata_patches(self) + + def package(self): + copy(self, "LICENSE", self.source_folder, os.path.join(self.package_folder, "licenses")) + copy( + self, + "*.hpp", + os.path.join(self.source_folder, "cpp", "src"), + self.package_folder, + ) + + def package_info(self): + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] diff --git a/recipes/streaming-percentiles/all/patches/3.1.0-0001-add-includes.patch b/recipes/streaming-percentiles/all/patches/3.1.0-0001-add-includes.patch new file mode 100644 index 0000000000000..8c015b7b047b4 --- /dev/null +++ b/recipes/streaming-percentiles/all/patches/3.1.0-0001-add-includes.patch @@ -0,0 +1,62 @@ +diff --git a/cpp/src/include/stmpct/ckms_hbq.hpp b/cpp/src/include/stmpct/ckms_hbq.hpp +index 87cf860..850d527 100644 +--- a/cpp/src/include/stmpct/ckms_hbq.hpp ++++ b/cpp/src/include/stmpct/ckms_hbq.hpp +@@ -4,6 +4,7 @@ + // quantiles as defined in the paper _Effective Computation of Biased + // Quantiles over Data Streams_ + ++#include + #include "ckms_impl.hpp" + + namespace stmpct { +diff --git a/cpp/src/include/stmpct/ckms_lbq.hpp b/cpp/src/include/stmpct/ckms_lbq.hpp +index fb932af..c62d61d 100644 +--- a/cpp/src/include/stmpct/ckms_lbq.hpp ++++ b/cpp/src/include/stmpct/ckms_lbq.hpp +@@ -4,6 +4,7 @@ + // quantiles as defined in the paper _Effective Computation of Biased + // Quantiles over Data Streams_ + ++#include + #include "ckms_impl.hpp" + + namespace stmpct { +diff --git a/cpp/src/include/stmpct/ckms_tq.hpp b/cpp/src/include/stmpct/ckms_tq.hpp +index ac9dde8..5d1f093 100644 +--- a/cpp/src/include/stmpct/ckms_tq.hpp ++++ b/cpp/src/include/stmpct/ckms_tq.hpp +@@ -4,6 +4,8 @@ + // quantiles as defined in the paper _Effective Computation of Biased + // Quantiles over Data Streams_ + ++#include ++#include + #include "ckms_impl.hpp" + #include "targeted_quantile.hpp" + +diff --git a/cpp/src/include/stmpct/ckms_uq.hpp b/cpp/src/include/stmpct/ckms_uq.hpp +index d0d3837..c417ddc 100644 +--- a/cpp/src/include/stmpct/ckms_uq.hpp ++++ b/cpp/src/include/stmpct/ckms_uq.hpp +@@ -5,6 +5,7 @@ + // Quantiles over Data Streams_. Conceptually nearly equivalent to + // the GK algorithm. + ++#include + #include "ckms_impl.hpp" + + namespace stmpct { +diff --git a/cpp/src/include/stmpct/gk.hpp b/cpp/src/include/stmpct/gk.hpp +index 6b7a1c6..bf4e163 100644 +--- a/cpp/src/include/stmpct/gk.hpp ++++ b/cpp/src/include/stmpct/gk.hpp +@@ -1,6 +1,8 @@ + #pragma once + ++#include + #include ++#include + + // The Greenwald-Khanna algorithm as defined in the paper + // Space-Efficient Online Computation of Quantile Summaries diff --git a/recipes/streaming-percentiles/all/test_package/CMakeLists.txt b/recipes/streaming-percentiles/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..0259c93280ffb --- /dev/null +++ b/recipes/streaming-percentiles/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) + +find_package(streaming-percentiles REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE streaming-percentiles::streaming-percentiles) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) diff --git a/recipes/streaming-percentiles/all/test_package/conanfile.py b/recipes/streaming-percentiles/all/test_package/conanfile.py new file mode 100644 index 0000000000000..3a91c9439218e --- /dev/null +++ b/recipes/streaming-percentiles/all/test_package/conanfile.py @@ -0,0 +1,26 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def layout(self): + cmake_layout(self) + + def requirements(self): + self.requires(self.tested_reference_str) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/streaming-percentiles/all/test_package/test_package.cpp b/recipes/streaming-percentiles/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..6bead07a3dd0f --- /dev/null +++ b/recipes/streaming-percentiles/all/test_package/test_package.cpp @@ -0,0 +1,16 @@ +#include +#include + +#include "stmpct/gk.hpp" +int main(int argc, char* argv[]) { + double epsilon = 0.1; + stmpct::gk g(epsilon); + for (int i = 0; i < 1000; ++i) + g.insert(rand()); + double p50 = g.quantile(0.5); // Approx. median + double p95 = g.quantile(0.95); // Approx. 95th percentile + + std::cout << "median : " << p50 << " 95th percentile : " << p95 << std::endl; + + return 0; +} diff --git a/recipes/streaming-percentiles/config.yml b/recipes/streaming-percentiles/config.yml new file mode 100644 index 0000000000000..baa80af0c4b7d --- /dev/null +++ b/recipes/streaming-percentiles/config.yml @@ -0,0 +1,3 @@ +versions: + "3.1.0": + folder: all diff --git a/recipes/string-view-lite/all/conandata.yml b/recipes/string-view-lite/all/conandata.yml index 84f246b4d8a4d..49123d0095698 100644 --- a/recipes/string-view-lite/all/conandata.yml +++ b/recipes/string-view-lite/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.8.0": + url: "https://github.com/martinmoene/string-view-lite/archive/v1.8.0.tar.gz" + sha256: "9b38c32621eb1a81a7fa59427144309225c414a7bae522ab3a2d9ae239dd35be" "1.7.0": url: "https://github.com/martinmoene/string-view-lite/archive/v1.7.0.tar.gz" sha256: "265eaec08c4555259b46f5b03004dbc0f7206384edfac1cd5a837efaa642e01c" diff --git a/recipes/string-view-lite/all/conanfile.py b/recipes/string-view-lite/all/conanfile.py index 3306dff001e24..05850dbb27134 100644 --- a/recipes/string-view-lite/all/conanfile.py +++ b/recipes/string-view-lite/all/conanfile.py @@ -8,11 +8,11 @@ class StringViewLite(ConanFile): name = "string-view-lite" - url = "https://github.com/conan-io/conan-center-index" - homepage = "https://github.com/martinmoene/string-view-lite" description = "string-view lite - A C++17-like string_view for C++98, C++11 and later in a single-file header-only library" - topics = ("cpp98", "cpp11", "cpp14", "cpp17", "string-view", "string-view-implementations") license = "BSL-1.0" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/martinmoene/string-view-lite" + topics = ("cpp98", "cpp11", "cpp14", "cpp17", "string-view", "string-view-implementations", "header-only") package_type = "header-library" settings = "os", "arch", "compiler", "build_type" no_copy_source = True diff --git a/recipes/string-view-lite/config.yml b/recipes/string-view-lite/config.yml index f05245374fbdd..4a0cc99434665 100644 --- a/recipes/string-view-lite/config.yml +++ b/recipes/string-view-lite/config.yml @@ -1,4 +1,6 @@ versions: + "1.8.0": + folder: all "1.7.0": folder: all "1.6.0": diff --git a/recipes/stringzilla/all/conandata.yml b/recipes/stringzilla/all/conandata.yml index 182ba818238f7..eb0fe1d568743 100644 --- a/recipes/stringzilla/all/conandata.yml +++ b/recipes/stringzilla/all/conandata.yml @@ -1,4 +1,22 @@ sources: + "3.10.3": + url: "https://github.com/ashvardanian/StringZilla/archive/refs/tags/v3.10.3.tar.gz" + sha256: "8a19b5a8e24f4160dc8d00e77a308a75462c3d211c0879ac218887bb41d26ce6" + "3.10.0": + url: "https://github.com/ashvardanian/StringZilla/archive/refs/tags/v3.10.0.tar.gz" + sha256: "69729a1403c4609256f861a0221e5331f836b4945f6848472e81183726e436e6" + "3.9.6": + url: "https://github.com/ashvardanian/StringZilla/archive/refs/tags/v3.9.6.tar.gz" + sha256: "21577e967d79155f5bcbe9bfd885dd817a79666f384fb2a955c0ac5dbf0657a3" + "3.9.3": + url: "https://github.com/ashvardanian/StringZilla/archive/refs/tags/v3.9.3.tar.gz" + sha256: "7d24a2fc0e426a85eac0a2be965f64e0eee794d89a895c2b5dcb614b038af580" + "3.9.0": + url: "https://github.com/ashvardanian/StringZilla/archive/refs/tags/v3.9.0.tar.gz" + sha256: "26d282b7d5ba307de7fa80c41821526babf6c6cb8e808253af8bff7664275d5c" + "3.8.4": + url: "https://github.com/ashvardanian/StringZilla/archive/refs/tags/v3.8.4.tar.gz" + sha256: "4132957633d28ce2651e587f2ab736cdf174e61b8ab1bcef453b21d40a2d872e" "2.0.4": url: "https://github.com/ashvardanian/StringZilla/archive/refs/tags/v2.0.4.tar.gz" sha256: "440d3d586f8cfe96bc7648f01f2d3c514c4e2dc22446caeb50599383d1970ed2" diff --git a/recipes/stringzilla/all/conanfile.py b/recipes/stringzilla/all/conanfile.py index bded9fa3b6426..af7a34cd5d72b 100644 --- a/recipes/stringzilla/all/conanfile.py +++ b/recipes/stringzilla/all/conanfile.py @@ -2,6 +2,7 @@ from conan.tools.files import get, copy from conan.tools.layout import basic_layout from conan.tools.build import check_min_cppstd +from conan.tools.scm import Version import os required_conan_version = ">=1.52.0" @@ -36,12 +37,26 @@ def source(self): def package(self): copy(self, pattern="LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) - copy( - self, - pattern="*.h", - dst=os.path.join(self.package_folder, "include"), - src=os.path.join(self.source_folder, "stringzilla"), - ) + if Version(self.version) < "3.0.0": + copy( + self, + pattern="*.h", + dst=os.path.join(self.package_folder, "include"), + src=os.path.join(self.source_folder, "stringzilla"), + ) + else: + copy( + self, + pattern="*.h", + dst=os.path.join(self.package_folder, "include"), + src=os.path.join(self.source_folder, "include"), + ) + copy( + self, + pattern="*.hpp", + dst=os.path.join(self.package_folder, "include"), + src=os.path.join(self.source_folder, "include"), + ) def package_info(self): self.cpp_info.bindirs = [] diff --git a/recipes/stringzilla/all/test_package/CMakeLists.txt b/recipes/stringzilla/all/test_package/CMakeLists.txt index 6769ff716eab8..5bcb77f146e86 100644 --- a/recipes/stringzilla/all/test_package/CMakeLists.txt +++ b/recipes/stringzilla/all/test_package/CMakeLists.txt @@ -3,9 +3,12 @@ project(test_package LANGUAGES CXX) find_package(stringzilla REQUIRED CONFIG) -add_executable(${PROJECT_NAME} test_package.cpp) +if (stringzilla_VERSION VERSION_LESS 2.0) + add_executable(${PROJECT_NAME} test_package.cpp) +elseif(stringzilla_VERSION VERSION_LESS 3.0) + add_executable(${PROJECT_NAME} test_package_2_0.cpp) +else() + add_executable(${PROJECT_NAME} test_package_3_0.cpp) +endif() target_link_libraries(${PROJECT_NAME} PRIVATE stringzilla::stringzilla) target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) -if(stringzilla_VERSION VERSION_LESS 2.0) - target_compile_definitions(${PROJECT_NAME} PRIVATE STRINGZILLA_LESS_2_0) -endif() diff --git a/recipes/stringzilla/all/test_package/conanfile.py b/recipes/stringzilla/all/test_package/conanfile.py index 3a91c9439218e..dd09e74d7fe14 100644 --- a/recipes/stringzilla/all/test_package/conanfile.py +++ b/recipes/stringzilla/all/test_package/conanfile.py @@ -1,6 +1,6 @@ from conan import ConanFile from conan.tools.build import can_run -from conan.tools.cmake import cmake_layout, CMake +from conan.tools.cmake import CMake, cmake_layout import os diff --git a/recipes/stringzilla/all/test_package/test_package.cpp b/recipes/stringzilla/all/test_package/test_package.cpp index c5ffe699dbc06..6829d24ab3783 100644 --- a/recipes/stringzilla/all/test_package/test_package.cpp +++ b/recipes/stringzilla/all/test_package/test_package.cpp @@ -1,8 +1,7 @@ #include #include -#include "stringzilla.h" -#ifdef STRINGZILLA_LESS_2_0 +#include "stringzilla.h" int main(void) { // Initialize your haystack and needle @@ -24,29 +23,3 @@ int main(void) { return EXIT_SUCCESS; } - -#else - -int main(void) { - // Initialize your haystack and needle - sz_string_view_t haystack = { - "Fastest string sort, search, split, " - "and shuffle for long strings and multi-gigabyte files in Python and C, " - "leveraging SIMD with Arm Neon and x86 AVX2 & AVX-512 intrinsics.", - 171}; - sz_string_view_t needle = {"SIMD", 4}; - - // Perform string-level operations - sz_size_t character_count = sz_count_char(haystack.start, haystack.length, "a"); - sz_string_start_t substring_position = sz_find_substring( - haystack.start, haystack.length, - needle.start, needle.length - ); - - // Hash strings - sz_u32_t crc32 = sz_hash_crc32(haystack.start, haystack.length); - - return EXIT_SUCCESS; -} - -#endif diff --git a/recipes/stringzilla/all/test_package/test_package_2_0.cpp b/recipes/stringzilla/all/test_package/test_package_2_0.cpp new file mode 100644 index 0000000000000..c165ef341d114 --- /dev/null +++ b/recipes/stringzilla/all/test_package/test_package_2_0.cpp @@ -0,0 +1,26 @@ +#include +#include + +#include "stringzilla.h" + +int main(void) { + // Initialize your haystack and needle + sz_string_view_t haystack = { + "Fastest string sort, search, split, " + "and shuffle for long strings and multi-gigabyte files in Python and C, " + "leveraging SIMD with Arm Neon and x86 AVX2 & AVX-512 intrinsics.", + 171}; + sz_string_view_t needle = {"SIMD", 4}; + + // Perform string-level operations + sz_size_t character_count = sz_count_char(haystack.start, haystack.length, "a"); + sz_string_start_t substring_position = sz_find_substring( + haystack.start, haystack.length, + needle.start, needle.length + ); + + // Hash strings + sz_u32_t crc32 = sz_hash_crc32(haystack.start, haystack.length); + + return EXIT_SUCCESS; +} diff --git a/recipes/stringzilla/all/test_package/test_package_3_0.cpp b/recipes/stringzilla/all/test_package/test_package_3_0.cpp new file mode 100644 index 0000000000000..04385a3492e0c --- /dev/null +++ b/recipes/stringzilla/all/test_package/test_package_3_0.cpp @@ -0,0 +1,20 @@ +#include +#include + +#include "stringzilla/stringzilla.hpp" + +namespace sz = ashvardanian::stringzilla; + +int main(void) { + sz::string haystack = "some string"; + sz::string_view needle = sz::string_view(haystack).substr(0, 4); + + auto substring_position = haystack.find(needle); // Or `rfind` + + haystack.end() - haystack.begin() == haystack.size(); // Or `rbegin`, `rend` + haystack.find_first_of(" \v\t") == 4; // Or `find_last_of`, `find_first_not_of`, `find_last_not_of` + haystack.starts_with(needle) == true; // Or `ends_with` + haystack.remove_prefix(needle.size()); // Why is this operation in-place?! + + return EXIT_SUCCESS; +} diff --git a/recipes/stringzilla/config.yml b/recipes/stringzilla/config.yml index c0ea771b63446..1bc4b692fbdb2 100644 --- a/recipes/stringzilla/config.yml +++ b/recipes/stringzilla/config.yml @@ -1,4 +1,16 @@ versions: + "3.10.3": + folder: all + "3.10.0": + folder: all + "3.9.6": + folder: all + "3.9.3": + folder: all + "3.9.0": + folder: all + "3.8.4": + folder: all "2.0.4": folder: all "2.0.3": diff --git a/recipes/strong_type/all/conandata.yml b/recipes/strong_type/all/conandata.yml index 33e85e480c828..f9c56ef18c867 100644 --- a/recipes/strong_type/all/conandata.yml +++ b/recipes/strong_type/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "v15": + url: "https://github.com/rollbear/strong_type/archive/refs/tags/v15.tar.gz" + sha256: "d445398d4c4d6795060ac2b60be146b3cd7e6039985244b2d56f9bc333f20bae" "v14": url: "https://github.com/rollbear/strong_type/archive/refs/tags/v14.tar.gz" sha256: "6cc5a6f8de5b52e6c9e4c8b246b6052b5943d6de9b314660009e092af522d2fc" diff --git a/recipes/strong_type/config.yml b/recipes/strong_type/config.yml index 5469ad726c024..b91eac17af3a4 100644 --- a/recipes/strong_type/config.yml +++ b/recipes/strong_type/config.yml @@ -1,4 +1,6 @@ versions: + "v15": + folder: all "v14": folder: all "v13": diff --git a/recipes/swig/all/cmake/conan-official-swig-targets.cmake b/recipes/swig/all/cmake/conan-official-swig-targets.cmake deleted file mode 100644 index 8740b23580975..0000000000000 --- a/recipes/swig/all/cmake/conan-official-swig-targets.cmake +++ /dev/null @@ -1,7 +0,0 @@ -find_program(SWIG_EXECUTABLE swig) -if(NOT SWIG_DIR) - execute_process(COMMAND ${SWIG_EXECUTABLE} -swiglib - OUTPUT_VARIABLE SWIG_lib_output OUTPUT_STRIP_TRAILING_WHITESPACE) - set(SWIG_DIR ${SWIG_lib_output} CACHE STRING "Location of SWIG library" FORCE) -endif() -mark_as_advanced(SWIG_DIR SWIG_EXECUTABLE) diff --git a/recipes/swig/all/cmake/conan-swig-variables.cmake b/recipes/swig/all/cmake/conan-swig-variables.cmake new file mode 100644 index 0000000000000..3421127d0076f --- /dev/null +++ b/recipes/swig/all/cmake/conan-swig-variables.cmake @@ -0,0 +1,3 @@ +find_program(SWIG_EXECUTABLE swig) +# CMakeDeps sets SWIG_DIR to the generators folder, override it to the correct value +get_filename_component(SWIG_DIR "${SWIG_EXECUTABLE}/../swiglib" ABSOLUTE) diff --git a/recipes/swig/all/conandata.yml b/recipes/swig/all/conandata.yml index 7c4f531b134a3..dbb625e2ee27c 100644 --- a/recipes/swig/all/conandata.yml +++ b/recipes/swig/all/conandata.yml @@ -1,4 +1,10 @@ sources: + "4.2.1": + url: "https://github.com/swig/swig/archive/refs/tags/v4.2.1.tar.gz" + sha256: "8895878b9215612e73611203dc8f5232c626e4d07ffc4532922f375518f067ca" + "4.1.1": + url: "https://github.com/swig/swig/archive/refs/tags/v4.1.1.tar.gz" + sha256: "4d97f9528dda8ced8b762e405dff2da38cc4603ef5f868f7287c94872f693265" "4.1.0": url: "https://github.com/swig/swig/archive/refs/tags/v4.1.0.tar.gz" sha256: "5b9313b1af5edfcea158a389520be266f013bc9be4ce933d79a30c5659ba99fe" @@ -9,18 +15,38 @@ sources: url: "https://github.com/swig/swig/archive/rel-4.0.1.tar.gz" sha256: "2eaf6fb89d071d1be280bf995c63360b3729860c0da64948123b5d7e4cfb6cb7" patches: + "4.2.1": + - patch_file: "patches/0001-4.2.1-swig-linux-library-path.patch" + patch_type: "portability" + patch_description: "swig -swiglib should return the correct path next to the binary even when relocated" + - patch_file: "patches/0002-4.2.1-do-not-define-SWIG_LIB_WIN_UNIX.patch" + patch_type: "portability" + patch_description: "swig -swiglib should return the correct path next to the binary even when relocated" + "4.1.1": + - patch_file: "patches/0001-4.1.0-swig-linux-library-path.patch" + patch_type: "portability" + patch_description: "swig -swiglib should return the correct path next to the binary even when relocated" + - patch_file: "patches/0002-4.1.0-do-not-define-SWIG_LIB_WIN_UNIX.patch" + patch_type: "portability" + patch_description: "swig -swiglib should return the correct path next to the binary even when relocated" "4.1.0": - - base_path: "source_subfolder" - patch_file: "patches/0001-4.1.0-swig-linux-library-path.patch" - - base_path: "source_subfolder" - patch_file: "patches/0002-4.1.0-do-not-define-SWIG_LIB_WIN_UNIX.patch" + - patch_file: "patches/0001-4.1.0-swig-linux-library-path.patch" + patch_type: "portability" + patch_description: "swig -swiglib should return the correct path next to the binary even when relocated" + - patch_file: "patches/0002-4.1.0-do-not-define-SWIG_LIB_WIN_UNIX.patch" + patch_type: "portability" + patch_description: "swig -swiglib should return the correct path next to the binary even when relocated" "4.0.2": - - base_path: "source_subfolder" - patch_file: "patches/0001-swig-linux-library-path.patch" - - base_path: "source_subfolder" - patch_file: "patches/0002-4.0.2-do-not-define-SWIG_LIB_WIN_UNIX.patch" + - patch_file: "patches/0001-swig-linux-library-path.patch" + patch_type: "portability" + patch_description: "swig -swiglib should return the correct path next to the binary even when relocated" + - patch_file: "patches/0002-4.0.2-do-not-define-SWIG_LIB_WIN_UNIX.patch" + patch_type: "portability" + patch_description: "swig -swiglib should return the correct path next to the binary even when relocated" "4.0.1": - - base_path: "source_subfolder" - patch_file: "patches/0001-swig-linux-library-path.patch" - - base_path: "source_subfolder" - patch_file: "patches/0002-4.0.1-do-not-define-SWIG_LIB_WIN_UNIX.patch" + - patch_file: "patches/0001-swig-linux-library-path.patch" + patch_type: "portability" + patch_description: "swig -swiglib should return the correct path next to the binary even when relocated" + - patch_file: "patches/0002-4.0.1-do-not-define-SWIG_LIB_WIN_UNIX.patch" + patch_type: "portability" + patch_description: "swig -swiglib should return the correct path next to the binary even when relocated" diff --git a/recipes/swig/all/conanfile.py b/recipes/swig/all/conanfile.py index 432bfb37aeca5..fc0ddef14c147 100644 --- a/recipes/swig/all/conanfile.py +++ b/recipes/swig/all/conanfile.py @@ -1,170 +1,199 @@ -from conan import ConanFile -from conan.tools.files import get -from conans import AutoToolsBuildEnvironment, tools -import contextlib -import functools import os -required_conan_version = ">=1.33.0" +from conan import ConanFile +from conan.tools.apple import is_apple_os, to_apple_arch +from conan.tools.env import VirtualBuildEnv, Environment +from conan.tools.files import apply_conandata_patches, chdir, copy, export_conandata_patches, get, rmdir, replace_in_file +from conan.tools.gnu import Autotools, AutotoolsDeps, AutotoolsToolchain +from conan.tools.layout import basic_layout +from conan.tools.microsoft import is_msvc, unix_path +from conan.tools.scm import Version + +required_conan_version = ">=1.53.0" class SwigConan(ConanFile): name = "swig" description = "SWIG is a software development tool that connects programs written in C and C++ with a variety of high-level programming languages." + license = "GPL-3.0-or-later" url = "https://github.com/conan-io/conan-center-index" homepage = "http://www.swig.org" - license = "GPL-3.0-or-later" - topics = ("swig", "python", "java", "wrapper") - exports_sources = "patches/**", "cmake/*" - settings = "os", "arch", "compiler", "build_type" + topics = ("python", "java", "wrapper") - @property - def _source_subfolder(self): - return "source_subfolder" + package_type = "static-library" + settings = "os", "arch", "compiler", "build_type" @property def _settings_build(self): return getattr(self, "settings_build", self.settings) + def configure(self): + # SWIG prefers static linking + self.options["pcre"].shared = False + self.options["pcre2"].shared = False + self.options["libgettext"].shared = False + + def export_sources(self): + copy(self, "cmake/*", src=self.recipe_folder, dst=self.export_sources_folder) + export_conandata_patches(self) + + def layout(self): + basic_layout(self, src_folder="src") + @property def _use_pcre2(self): - return self.version not in ['4.0.1', '4.0.2'] - + return Version(self.version) >= "4.1" def requirements(self): if self._use_pcre2: - self.requires("pcre2/10.40") + self.requires("pcre2/10.43") else: self.requires("pcre/8.45") - - def build_requirements(self): - if self._settings_build.os == "Windows" and not tools.get_env("CONAN_BASH_PATH"): - self.build_requires("msys2/cci.latest") - if self.settings.compiler == "Visual Studio": - self.build_requires("winflexbison/2.5.24") - else: - self.build_requires("bison/3.8.2") - self.build_requires("automake/1.16.5") + if is_apple_os(self): + self.requires("libgettext/0.22") def package_id(self): del self.info.settings.compiler - def source(self): - get(self, **self.conan_data["sources"][self.version], - destination=self._source_subfolder, strip_root=True) - - @property - def _user_info_build(self): - # If using the experimental feature with different context for host and - # build, the 'user_info' attributes of the 'build_requires' packages - # will be located into the 'user_info_build' object. In other cases they - # will be located into the 'deps_user_info' object. - return getattr(self, "user_info_build", self.deps_user_info) - - @contextlib.contextmanager - def _build_context(self): - env = {} - if self.settings.compiler != "Visual Studio": - env["YACC"] = self._user_info_build["bison"].YACC - if self.settings.compiler == "Visual Studio": - with tools.vcvars(self): - env.update({ - "CC": "{} cl -nologo".format(tools.unix_path(self._user_info_build["automake"].compile)), - "CXX": "{} cl -nologo".format(tools.unix_path(self._user_info_build["automake"].compile)), - "AR": "{} link".format(self._user_info_build["automake"].ar_lib), - "LD": "link", - }) - with tools.environment_append(env): - yield + def build_requirements(self): + if self._settings_build.os == "Windows": + self.win_bash = True + if not self.conf.get("tools.microsoft.bash:path", check_type=str): + self.tool_requires("msys2/cci.latest") + if is_msvc(self): + self.tool_requires("cccl/1.3") + if Version(self.version) >= "4.2": + if is_msvc(self): + # bison 3.8.2 is not ready for msvc + self.tool_requires("bison/3.7.6") + else: + self.tool_requires("bison/3.8.2") else: - with tools.environment_append(env): - yield - - @functools.lru_cache(1) - def _configure_autotools(self): - autotools = AutoToolsBuildEnvironment(self, win_bash=tools.os_info.is_windows) - deps_libpaths = autotools.library_paths - deps_libs = autotools.libs - deps_defines = autotools.defines - if self.settings.os == "Windows" and self.settings.compiler != "Visual Studio": - autotools.link_flags.append("-static") - - libargs = list("-L\"{}\"".format(p) for p in deps_libpaths) + list("-l\"{}\"".format(l) for l in deps_libs) - args = [ - "{}_LIBS={}".format("PCRE2" if self._use_pcre2 else "PCRE", " ".join(libargs)), - "{}_CPPFLAGS={}".format("PCRE2" if self._use_pcre2 else "PCRE", " ".join("-D{}".format(define) for define in deps_defines)), - "--host={}".format(self.settings.arch), - "--with-swiglibdir={}".format(self._swiglibdir), - ] - if self.settings.os == "Linux": - args.append("LIBS=-ldl") - - host, build = None, None + if is_msvc(self): + self.tool_requires("winflexbison/2.5.25") + else: + self.tool_requires("bison/3.8.2") + self.tool_requires("automake/1.16.5") - if self.settings.compiler == "Visual Studio": - self.output.warn("Visual Studio compiler cannot create ccache-swig. Disabling ccache-swig.") - args.append("--disable-ccache") - autotools.flags.append("-FS") - # MSVC canonical names aren't understood - host, build = False, False - - if self.settings.os == "Macos" and self.settings.arch == "armv8": - # FIXME: Apple ARM should be handled by build helpers - autotools.flags.append("-arch arm64") - autotools.link_flags.append("-arch arm64") + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) - autotools.libs = [] - autotools.library_paths = [] + def generate(self): + build_env = VirtualBuildEnv(self) + build_env.generate() - if self.settings.os == "Windows" and self.settings.compiler != "Visual Studio": - autotools.libs.extend(["mingwex", "ssp"]) + tc = AutotoolsToolchain(self) + env = tc.environment() - autotools.configure(args=args, configure_dir=self._source_subfolder, - host=host, build=build) - return autotools + pcre = "pcre2" if self._use_pcre2 else "pcre" + tc.configure_args += [ + f"--host={self.settings.arch}", + "--with-swiglibdir=${prefix}/bin/swiglib", + f"--with-{pcre}-prefix={self.dependencies[pcre].package_folder}", + ] + tc.extra_cflags.append("-DHAVE_PCRE=1") + if self._use_pcre2: + env.define("PCRE2_LIBS", " ".join("-l" + lib for lib in self.dependencies["pcre2"].cpp_info.libs)) + + if self.settings.os in ["Linux", "FreeBSD"]: + tc.configure_args.append("LIBS=-ldl") + tc.extra_defines.append("HAVE_UNISTD_H=1") + elif self.settings.os == "Windows": + if is_msvc(self): + env.define("CC", "cccl -FS") + env.define("CXX", "cccl -FS") + tc.configure_args.append("--disable-ccache") + else: + tc.extra_ldflags.append("-static") + tc.configure_args.append("LIBS=-lmingwex -lssp") + elif is_apple_os(self): + tc.extra_cflags.append(f"-arch {to_apple_arch(self)}") + tc.extra_cxxflags.append(f"-arch {to_apple_arch(self)}") + tc.extra_ldflags.append(f"-arch {to_apple_arch(self)}") + tc.generate(env) + + if is_msvc(self): + # Custom AutotoolsDeps for cl-like compilers + # workaround for https://github.com/conan-io/conan/issues/12784 + includedirs = [] + defines = [] + libs = [] + libdirs = [] + linkflags = [] + cxxflags = [] + cflags = [] + for dependency in self.dependencies.values(): + deps_cpp_info = dependency.cpp_info.aggregated_components() + includedirs.extend(deps_cpp_info.includedirs) + defines.extend(deps_cpp_info.defines) + libs.extend(deps_cpp_info.libs + deps_cpp_info.system_libs) + libdirs.extend(deps_cpp_info.libdirs) + linkflags.extend(deps_cpp_info.sharedlinkflags + deps_cpp_info.exelinkflags) + cxxflags.extend(deps_cpp_info.cxxflags) + cflags.extend(deps_cpp_info.cflags) + + env = Environment() + env.append("CPPFLAGS", [f"-I{unix_path(self, p)}" for p in includedirs] + [f"-D{d}" for d in defines]) + env.append("_LINK_", [lib if lib.endswith(".lib") else f"{lib}.lib" for lib in libs]) + env.append("LDFLAGS", [f"-L{unix_path(self, p)}" for p in libdirs] + linkflags) + env.append("CXXFLAGS", cxxflags) + env.append("CFLAGS", cflags) + env.vars(self).save_script("conanautotoolsdeps_cl_workaround") + else: + deps = AutotoolsDeps(self) + deps.generate() def _patch_sources(self): - for patch in self.conan_data.get("patches", {}).get(self.version, []): - tools.patch(**patch) + apply_conandata_patches(self) + # Rely on AutotoolsDeps instead of pcre2-config + # https://github.com/swig/swig/blob/v4.1.1/configure.ac#L70-L92 + # https://github.com/swig/swig/blob/v4.0.2/configure.ac#L65-L86 + replace_in_file(self, os.path.join(self.source_folder, "configure.ac"), + 'AS_IF([test "x$with_pcre" != xno],', 'AS_IF([false],') def build(self): self._patch_sources() - with tools.chdir(os.path.join(self._source_subfolder)): - self.run("./autogen.sh", win_bash=tools.os_info.is_windows) - with self._build_context(): - autotools = self._configure_autotools() + with chdir(self, self.source_folder): + autotools = Autotools(self) + self.run("./autogen.sh") + autotools.configure() autotools.make() def package(self): - self.copy(pattern="LICENSE*", dst="licenses", src=self._source_subfolder) - self.copy(pattern="COPYRIGHT", dst="licenses", src=self._source_subfolder) - self.copy("*", src="cmake", dst=self._module_subfolder) - with self._build_context(): - autotools = self._configure_autotools() + copy(self, "LICENSE*", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) + copy(self, "COPYRIGHT", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) + copy(self, "*.cmake", + dst=os.path.join(self.package_folder, self._module_subfolder), + src=os.path.join(self.export_sources_folder, "cmake")) + with chdir(self, self.source_folder): + autotools = Autotools(self) autotools.install() - - @property - def _swiglibdir(self): - return os.path.join(self.package_folder, "bin", "swiglib").replace("\\", "/") + for path in self.package_path.iterdir(): + if path.is_dir() and path.name not in ["bin", "lib", "licenses"]: + rmdir(self, path) @property def _module_subfolder(self): return os.path.join("lib", "cmake") @property - def _module_file(self): - return "conan-official-{}-targets.cmake".format(self.name) + def _cmake_module_rel_path(self): + return os.path.join(self._module_subfolder, "conan-swig-variables.cmake") def package_info(self): - self.cpp_info.includedirs=[] + self.cpp_info.includedirs = [] + self.cpp_info.set_property("cmake_file_name", "SWIG") + self.cpp_info.set_property("cmake_target_name", "SWIG::SWIG") + self.cpp_info.set_property("cmake_build_modules", [self._cmake_module_rel_path]) + + self.buildenv_info.define_path("SWIG_LIB", os.path.join(self.package_folder, "bin", "swiglib")) + + # TODO: to remove in conan v2 once cmake_find_package_* generators removed self.cpp_info.names["cmake_find_package"] = "SWIG" self.cpp_info.names["cmake_find_package_multi"] = "SWIG" - self.cpp_info.builddirs = [self._module_subfolder] - self.cpp_info.build_modules["cmake_find_package"] = \ - [os.path.join(self._module_subfolder, self._module_file)] - self.cpp_info.build_modules["cmake_find_package_multi"] = \ - [os.path.join(self._module_subfolder, self._module_file)] + self.cpp_info.build_modules["cmake_find_package"] = [self._cmake_module_rel_path] + self.cpp_info.build_modules["cmake_find_package_multi"] = [self._cmake_module_rel_path] bindir = os.path.join(self.package_folder, "bin") - self.output.info("Appending PATH environment variable: {}".format(bindir)) self.env_info.PATH.append(bindir) + self.env_info.SWIG_LIB = os.path.join(self.package_folder, "bin", "swiglib") diff --git a/recipes/swig/all/patches/0001-4.2.1-swig-linux-library-path.patch b/recipes/swig/all/patches/0001-4.2.1-swig-linux-library-path.patch new file mode 100644 index 0000000000000..f3c40eb7eab79 --- /dev/null +++ b/recipes/swig/all/patches/0001-4.2.1-swig-linux-library-path.patch @@ -0,0 +1,51 @@ +--- Source/Modules/main.cxx ++++ Source/Modules/main.cxx +@@ -861,6 +861,32 @@ + + static void SWIG_exit_handler(int status); + ++#if defined(HAVE_UNISTD_H) && !defined(_WIN32) ++#include ++#include ++#include ++ ++static String *get_exe_path(void) { ++ Dl_info info; ++ if (dladdr("main", &info)) { ++ char realp_buffer[PATH_MAX]; ++ char* res = NULL; ++ ++ res = realpath(info.dli_fname, realp_buffer); ++ if (!res) { ++ return NewString(SWIG_LIB); ++ } ++ ++ const char* dir = dirname(realp_buffer); ++ char dest_buf[PATH_MAX]; ++ strcpy(dest_buf, dir); ++ strcat(dest_buf, "/swiglib"); ++ return NewStringWithSize(dest_buf, strlen(dest_buf)); ++ } ++ return NewString(SWIG_LIB); ++} ++#endif ++ + int SWIG_main(int argc, char *argv[], const TargetLanguageModule *tlm) { + char *c; + +@@ -900,12 +926,14 @@ + char *p; + if (!(GetModuleFileName(0, buf, MAX_PATH) == 0 || (p = strrchr(buf, '\\')) == 0)) { + *(p + 1) = '\0'; +- SwigLib = NewStringf("%sLib", buf); // Native windows installation path ++ SwigLib = NewStringf("%sswiglib", buf); // Native windows installation path + } else { + SwigLib = NewStringf(""); // Unexpected error + } + if (Len(SWIG_LIB_WIN_UNIX) > 0) + SwigLibWinUnix = NewString(SWIG_LIB_WIN_UNIX); // Unix installation path using a drive letter (for msys/mingw) ++#elif defined(HAVE_UNISTD_H) && !defined(_WIN32) ++ SwigLib = get_exe_path(); + #else + SwigLib = NewString(SWIG_LIB); + #endif diff --git a/recipes/swig/all/patches/0002-4.2.1-do-not-define-SWIG_LIB_WIN_UNIX.patch b/recipes/swig/all/patches/0002-4.2.1-do-not-define-SWIG_LIB_WIN_UNIX.patch new file mode 100644 index 0000000000000..a58da257a1aef --- /dev/null +++ b/recipes/swig/all/patches/0002-4.2.1-do-not-define-SWIG_LIB_WIN_UNIX.patch @@ -0,0 +1,11 @@ +--- configure.ac ++++ configure.ac +@@ -2803,7 +2803,7 @@ + *-*-cygwin*) SWIG_LIB_WIN_UNIX=`cygpath --mixed "$SWIG_LIB"`;; + *) SWIG_LIB_WIN_UNIX="";; + esac +-AC_DEFINE_UNQUOTED(SWIG_LIB_WIN_UNIX, ["$SWIG_LIB_WIN_UNIX"], [Directory for SWIG system-independent libraries (Unix install on native Windows)]) ++AC_DEFINE_UNQUOTED(SWIG_LIB_WIN_UNIX, [""], [Directory for SWIG system-independent libraries (Unix install on native Windows)]) + + SWIG_LIB_PREINST=$ABS_SRCDIR/Lib + AC_SUBST(SWIG_LIB_PREINST) diff --git a/recipes/swig/all/test_package/CMakeLists.txt b/recipes/swig/all/test_package/CMakeLists.txt index 3f3a1aa9d1821..767943c116cee 100644 --- a/recipes/swig/all/test_package/CMakeLists.txt +++ b/recipes/swig/all/test_package/CMakeLists.txt @@ -1,51 +1,20 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.15) project(PackageTest C) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS NO_OUTPUT_DIRS) - -set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY $<1:${CMAKE_BINARY_DIR}>) -set(CMAKE_LIBRARY_OUTPUT_DIRECTORY $<1:${CMAKE_BINARY_DIR}>) -set(CMAKE_RUNTIME_OUTPUT_DIRECTORY $<1:${CMAKE_BINARY_DIR}>) - -find_package(SWIG REQUIRED) +find_package(SWIG REQUIRED CONFIG) include(UseSWIG) -set(Python_ADDITIONAL_VERSIONS 3) -find_package(PythonInterp) -find_package(PythonLibs 3) - -enable_testing() - -if(PYTHONINTERP_FOUND AND PYTHONLIBS_FOUND) - swig_add_library(${PROJECT_NAME} - LANGUAGE python - SOURCES - test.i - test_package.c - ) - - get_filename_component(PYTHON_LIBRARY_DIR "${PYTHON_LIBRARIES}" DIRECTORY) - - message(STATUS "PYTHON_INCLUDE_DIRS: ${PYTHON_INCLUDE_DIRS}") - message(STATUS "PYTHON_LIBRARIES: ${PYTHON_LIBRARIES}") - message(STATUS "PYTHON_LIBRARY_DIR: ${PYTHON_LIBRARY_DIR}") +find_package(Python REQUIRED COMPONENTS Interpreter Development) - #target_compile_definitions(_${PROJECT_NAME} PRIVATE MS_NO_COREDLL) - target_include_directories(_${PROJECT_NAME} PRIVATE ${PYTHON_INCLUDE_DIRS}) - target_link_directories(_${PROJECT_NAME} PRIVATE ${PYTHON_LIBRARY_DIR}) - target_link_libraries(_${PROJECT_NAME} PRIVATE ${PYTHON_LIBRARIES}) +swig_add_library(${PROJECT_NAME} + LANGUAGE python + SOURCES test.i test_package.c + OUTPUT_DIR ${CMAKE_BINARY_DIR} +) +target_link_libraries(${PROJECT_NAME} PRIVATE Python::Python) - add_test( - NAME gcd_test - COMMAND ${PYTHON_EXECUTABLE} -c "import PackageTest; assert PackageTest.gcd(12, 16) == 4" - WORKING_DIRECTORY "${CMAKE_BINARY_DIR}" - ) - add_test( - NAME foo_test - COMMAND ${PYTHON_EXECUTABLE} -c "import PackageTest; assert PackageTest.cvar.foo == 3.14159265359" - WORKING_DIRECTORY "${CMAKE_BINARY_DIR}" - ) -else() - message(STATUS "Not building swig python module") -endif() +# Note: this does not copy the generated *.py file +install(TARGETS ${PROJECT_NAME} + LIBRARY DESTINATION ${CMAKE_BINARY_DIR} + RUNTIME DESTINATION ${CMAKE_BINARY_DIR} +) diff --git a/recipes/swig/all/test_package/conanfile.py b/recipes/swig/all/test_package/conanfile.py index 5059612e70e16..f305f9b713d22 100644 --- a/recipes/swig/all/test_package/conanfile.py +++ b/recipes/swig/all/test_package/conanfile.py @@ -1,27 +1,73 @@ -from conans import CMake, ConanFile, tools +import importlib +import os +import sys +from pathlib import PurePath + +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake, CMakeToolchain, CMakeDeps +from conan.tools.env import VirtualRunEnv +from conan.tools.microsoft import is_msvc class TestPackageConan(ConanFile): settings = "os", "arch", "compiler", "build_type" - generators = "cmake", "cmake_find_package" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str, visible=False, run=True) + + def layout(self): + cmake_layout(self) @property def _can_build(self): # FIXME: Python does not distribute debug libraries (use cci CPython recipe) - return not (self.settings.compiler == "Visual Studio" and self.settings.build_type == "Debug") + if is_msvc(self) and self.settings.build_type == "Debug": + return False + # FIXME: apple-clang fails with 'ld: library not found for -lintl' in CI, despite working ok locally + if self.settings.compiler == "apple-clang": + return False + return True + + @property + def _python_interpreter(self): + if getattr(sys, "frozen", False): + return "python" + return sys.executable + + def generate(self): + venv = VirtualRunEnv(self) + venv.generate(scope="build") + venv.generate(scope="run") + tc = CMakeToolchain(self) + tc.variables["Python_EXECUTABLE"] = PurePath(self._python_interpreter).as_posix() + tc.generate() + deps = CMakeDeps(self) + deps.generate() def build(self): - if not tools.cross_building(self, skip_x64_x86=True): - self.run("swig -swiglib", run_environment=True) + if can_run(self): + self.run("swig -swiglib") if self._can_build: cmake = CMake(self) - cmake.verbose = True cmake.configure() cmake.build() + def _test_swig_module(self): + sys.path.append(self.build_folder) + sys.path.append(os.path.join(self.build_folder, str(self.settings.build_type))) + # Could also simply use 'import PackageTest' but this makes pylint angry + PackageTest = importlib.import_module("PackageTest") + assert PackageTest.gcd(12, 16) == 4 + self.output.info("PackageTest.gcd(12, 16) ran successfully") + assert PackageTest.cvar.foo == 3.14159265359 + self.output.info("PackageTest.cvar.foo == 3.14159265359 ran successfully") + sys.path.pop() + def test(self): - if not tools.cross_building(self): + if can_run(self): if self._can_build: - cmake = CMake(self) - cmake.test(output_on_failure=True) - self.run("swig -version", run_environment=True) + self._test_swig_module() + self.run("swig -version") + self.run("swig -swiglib") diff --git a/recipes/swig/all/test_v1_package/CMakeLists.txt b/recipes/swig/all/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..91630d79f4abb --- /dev/null +++ b/recipes/swig/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/swig/all/test_v1_package/conanfile.py b/recipes/swig/all/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..e7dbf9e47271c --- /dev/null +++ b/recipes/swig/all/test_v1_package/conanfile.py @@ -0,0 +1,53 @@ +import importlib +import sys +from pathlib import PurePath + +from conans import CMake, ConanFile, tools + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "cmake", "cmake_find_package_multi" + + @property + def _can_build(self): + # FIXME: Python does not distribute debug libraries (use cci CPython recipe) + if self.settings.compiler == "Visual Studio" and self.settings.build_type == "Debug": + return False + # FIXME: apple-clang fails with 'ld: library not found for -lintl' in CI, despite working ok locally + if self.settings.compiler == "apple-clang": + return False + return True + + @property + def _python_interpreter(self): + if getattr(sys, "frozen", False): + return "python" + return sys.executable + + def build(self): + if not tools.cross_building(self, skip_x64_x86=True): + self.run("swig -swiglib", run_environment=True) + if self._can_build: + cmake = CMake(self) + cmake.verbose = True + cmake.definitions["Python_EXECUTABLE"] = PurePath(self._python_interpreter).as_posix() + cmake.configure() + cmake.build() + cmake.install() + + def _test_swig_module(self): + sys.path.append(self.build_folder) + # Could also simply use 'import PackageTest' but this makes pylint angry + PackageTest = importlib.import_module("PackageTest") + assert PackageTest.gcd(12, 16) == 4 + self.output.info("PackageTest.gcd(12, 16) ran successfully") + assert PackageTest.cvar.foo == 3.14159265359 + self.output.info("PackageTest.cvar.foo == 3.14159265359 ran successfully") + sys.path.pop() + + def test(self): + if not tools.cross_building(self): + if self._can_build: + self._test_swig_module() + self.run("swig -version", run_environment=True) diff --git a/recipes/swig/config.yml b/recipes/swig/config.yml index 543f01b80f536..5a11eaadfdc07 100644 --- a/recipes/swig/config.yml +++ b/recipes/swig/config.yml @@ -1,4 +1,8 @@ versions: + "4.2.1": + folder: "all" + "4.1.1": + folder: "all" "4.1.0": folder: "all" "4.0.2": diff --git a/recipes/symengine/all/conandata.yml b/recipes/symengine/all/conandata.yml index c52591b647475..6cba7bfe87f6a 100644 --- a/recipes/symengine/all/conandata.yml +++ b/recipes/symengine/all/conandata.yml @@ -14,3 +14,9 @@ sources: "0.11.2": url: "https://github.com/symengine/symengine/releases/download/v0.11.2/symengine-0.11.2.tar.gz" sha256: "f6972acd6a65354f6414e69460d2e175729470632bdac05919bc2f7f32e48cbd" + "0.12.0": + url: "https://github.com/symengine/symengine/archive/refs/tags/v0.12.0.tar.gz" + sha256: "1b5c3b0bc6a9f187635f93585649f24a18e9c7f2167cebcd885edeaaf211d956" + "0.13.0": + url: "https://github.com/symengine/symengine/archive/refs/tags/v0.13.0.tar.gz" + sha256: "f46bcf037529cd1a422369327bf360ad4c7d2b02d0f607a62a5b09c74a55bb59" diff --git a/recipes/symengine/all/conanfile.py b/recipes/symengine/all/conanfile.py index c6d7a378b2e21..270776ba7fe08 100644 --- a/recipes/symengine/all/conanfile.py +++ b/recipes/symengine/all/conanfile.py @@ -1,16 +1,21 @@ from conan import ConanFile -from conan.tools.cmake import CMake, CMakeToolchain +from conan.errors import ConanInvalidConfiguration +from conan.tools.build import check_min_cppstd +from conan.tools.cmake import CMake, CMakeToolchain, CMakeDeps from conan.tools.files import ( - apply_conandata_patches, collect_libs, copy, get, rm, rmdir, + replace_in_file, ) -import os +from conan.tools.layout import basic_layout +from conan.tools.microsoft import is_msvc_static_runtime +from conan.tools.scm import Version -required_conan_version = ">=1.54.0" +import os +required_conan_version = ">=2.1" class SymengineConan(ConanFile): @@ -20,8 +25,8 @@ class SymengineConan(ConanFile): topics = ("symbolic", "algebra") homepage = "https://symengine.org/" url = "https://github.com/conan-io/conan-center-index" - exports_sources = ["CMakeLists.txt", "patches/**"] settings = "os", "compiler", "build_type", "arch" + package_type = "library" options = { "shared": [True, False], "fPIC": [True, False], @@ -34,11 +39,36 @@ class SymengineConan(ConanFile): } short_paths = True + def layout(self): + basic_layout(self, src_folder="src") + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + + def validate(self): + min_cppstd = "11" + check_min_cppstd(self, min_cppstd) + + if self.settings.compiler == "gcc" and Version(self.settings.compiler.version) < "7": + raise ConanInvalidConfiguration(f"{self.ref} requires GCC >= 7") + + @property + def _needs_fast_float(self): + return Version(self.version) >= "0.13.0" + def requirements(self): if self.options.integer_class == "boostmp": - self.requires("boost/1.83.0") + # symengine/mp_class.h:12 + self.requires("boost/1.86.0", transitive_headers=True) else: self.requires("gmp/6.3.0", transitive_headers=True, transitive_libs=True) + if self._needs_fast_float: + self.requires("fast_float/6.1.5") def source(self): get( @@ -48,24 +78,42 @@ def source(self): destination=self.source_folder, ) - def config_options(self): - if self.settings.os == "Windows": - del self.options.fPIC - - def configure(self): - if self.options.shared: - self.options.rm_safe("fPIC") - def generate(self): tc = CMakeToolchain(self) tc.variables["BUILD_TESTS"] = False tc.variables["BUILD_BENCHMARKS"] = False tc.variables["INTEGER_CLASS"] = self.options.integer_class - tc.variables["MSVC_USE_MT"] = False + tc.variables["MSVC_USE_MT"] = is_msvc_static_runtime(self) + if self._needs_fast_float: + tc.variables["WITH_SYSTEM_FASTFLOAT"] = True + tc.generate() + deps = CMakeDeps(self) + if self.options.integer_class == "gmp": + deps.set_property("gmp", "cmake_file_name", "GMP") + # If we ever add support for gmpxx, we should set this property + # if self.dependencies["gmp"].options.enable_cxx: + # deps.set_property("gmp::gmpxx", "cmake_target_name", "gmpxx") + if self._needs_fast_float: + deps.set_property("fast_float", "cmake_file_name", "FASTFLOAT") + deps.generate() + + def _patch_sources(self): + # Disable hardcoded C++11 + replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), + 'set(CMAKE_CXX_FLAGS "${CXX11_OPTIONS} ${CMAKE_CXX_FLAGS}")', + '') + # Let Conan choose fPIC + replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), + 'set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${common}")', + '') + # cmake_target_name not working? + replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), + "set(LIBS ${LIBS} ${GMP_TARGETS})", + "set(LIBS ${LIBS} gmp::gmp)") def build(self): - apply_conandata_patches(self) + self._patch_sources() cmake = CMake(self) cmake.configure() cmake.build() @@ -90,6 +138,5 @@ def package_info(self): self.cpp_info.libs.append("teuchos") if self.settings.os == "Linux": self.cpp_info.system_libs.append("m") - self.cpp_info.names["cmake_find_package"] = "symengine" - # FIXME: symengine exports a non-namespaced `symengine` target. - self.cpp_info.names["cmake_find_package_multi"] = "symengine" + + self.cpp_info.set_property("cmake_target_name", "symengine") diff --git a/recipes/symengine/all/test_package/CMakeLists.txt b/recipes/symengine/all/test_package/CMakeLists.txt index 7b0ebad6adca2..db1bcb5e287ec 100644 --- a/recipes/symengine/all/test_package/CMakeLists.txt +++ b/recipes/symengine/all/test_package/CMakeLists.txt @@ -1,7 +1,8 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.15) project(test_package CXX) find_package(symengine REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) -target_link_libraries(${PROJECT_NAME} PRIVATE symengine::symengine) # FIXME: Replace `symengine::symengine` with `symengine` +target_link_libraries(${PROJECT_NAME} PRIVATE symengine) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) diff --git a/recipes/symengine/all/test_package/conanfile.py b/recipes/symengine/all/test_package/conanfile.py index 8a86f655664c1..f72d1f660e19f 100644 --- a/recipes/symengine/all/test_package/conanfile.py +++ b/recipes/symengine/all/test_package/conanfile.py @@ -17,7 +17,6 @@ def requirements(self): def generate(self): tc = CMakeToolchain(self) - tc.variables["CMAKE_CXX_STANDARD"] = "11" tc.generate() def build(self): diff --git a/recipes/symengine/all/test_package/test_package.cpp b/recipes/symengine/all/test_package/test_package.cpp index 62249dac49da7..da10361cc19de 100644 --- a/recipes/symengine/all/test_package/test_package.cpp +++ b/recipes/symengine/all/test_package/test_package.cpp @@ -2,12 +2,19 @@ #include #include #include +#include +#include +#include #include int main() { SymEngine::Expression pi_by_12 = SymEngine::div(SymEngine::pi, SymEngine::integer(12)); std::cout << pi_by_12 << std::endl; + std::cout << SymEngine::mp_perfect_power_p(SymEngine::integer_class("9")) << std::endl; + std::string input = "123.0"; + auto parsed_value = SymEngine::parse(input, true); + return 0; } diff --git a/recipes/symengine/all/test_v1_package/CMakeLists.txt b/recipes/symengine/all/test_v1_package/CMakeLists.txt deleted file mode 100644 index 62739795b7eca..0000000000000 --- a/recipes/symengine/all/test_v1_package/CMakeLists.txt +++ /dev/null @@ -1,10 +0,0 @@ -cmake_minimum_required(VERSION 3.1) -project(test_package CXX) - -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) - -find_package(symengine REQUIRED CONFIG) - -add_executable(${PROJECT_NAME} test_package.cpp) -target_link_libraries(${PROJECT_NAME} PRIVATE symengine::symengine) # FIXME: Replace `symengine::symengine` with `symengine` diff --git a/recipes/symengine/all/test_v1_package/conanfile.py b/recipes/symengine/all/test_v1_package/conanfile.py deleted file mode 100644 index 7e1802f4cdc24..0000000000000 --- a/recipes/symengine/all/test_v1_package/conanfile.py +++ /dev/null @@ -1,18 +0,0 @@ -from conans import ConanFile, CMake, tools -import os - - -class TestPackageConan(ConanFile): - settings = "os", "compiler", "build_type", "arch" - generators = "cmake", "cmake_find_package_multi" - - def build(self): - cmake = CMake(self) - cmake.definitions["CMAKE_CXX_STANDARD"] = "11" - cmake.configure() - cmake.build() - - def test(self): - if not tools.cross_building(self): - bin_path = os.path.join("bin", "test_package") - self.run(bin_path, run_environment=True) diff --git a/recipes/symengine/all/test_v1_package/test_package.cpp b/recipes/symengine/all/test_v1_package/test_package.cpp deleted file mode 100644 index 62249dac49da7..0000000000000 --- a/recipes/symengine/all/test_v1_package/test_package.cpp +++ /dev/null @@ -1,13 +0,0 @@ -#include -#include -#include -#include - -#include - -int main() { - SymEngine::Expression pi_by_12 = - SymEngine::div(SymEngine::pi, SymEngine::integer(12)); - std::cout << pi_by_12 << std::endl; - return 0; -} diff --git a/recipes/symengine/config.yml b/recipes/symengine/config.yml index b47e71fe86741..5536e9803e451 100644 --- a/recipes/symengine/config.yml +++ b/recipes/symengine/config.yml @@ -9,3 +9,7 @@ versions: folder: all "0.11.2": folder: all + "0.12.0": + folder: all + "0.13.0": + folder: all diff --git a/recipes/systemc/all/conanfile.py b/recipes/systemc/all/conanfile.py index 60fb8e631adf2..a6161b53eeb5f 100644 --- a/recipes/systemc/all/conanfile.py +++ b/recipes/systemc/all/conanfile.py @@ -1,10 +1,9 @@ -from conan import ConanFile, conan_version +from conan import ConanFile from conan.errors import ConanInvalidConfiguration from conan.tools.apple import is_apple_os from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rmdir from conan.tools.microsoft import is_msvc -from conan.tools.scm import Version import os required_conan_version = ">=1.53.0" @@ -70,15 +69,6 @@ def validate(self): "Building SystemC as a shared library on Windows is currently not supported" ) - if ( - conan_version.major == 1 - and self.settings.compiler == "gcc" - and Version(self.settings.compiler.version) <= "5" - ): - raise ConanInvalidConfiguration( - f"GCC {self.settings.compiler.version} is not supported by SystemC on Conan v1" - ) - def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) diff --git a/recipes/taocpp-pegtl/3.x.x/conandata.yml b/recipes/taocpp-pegtl/3.x.x/conandata.yml index 95cbe48c372b0..686f1e476aeff 100644 --- a/recipes/taocpp-pegtl/3.x.x/conandata.yml +++ b/recipes/taocpp-pegtl/3.x.x/conandata.yml @@ -1,4 +1,7 @@ sources: + "3.2.8": + url: "https://github.com/taocpp/PEGTL/archive/3.2.8.tar.gz" + sha256: "319e8238daebc3a163f60c88c78922a8012772076fdd64a8dafaf5619cd64773" "3.2.7": url: "https://github.com/taocpp/PEGTL/archive/3.2.7.tar.gz" sha256: "d6cd113d8bd14e98bcbe7b7f8fc1e1e33448dc359e8cd4cca30e034ec2f0642d" diff --git a/recipes/taocpp-pegtl/3.x.x/conanfile.py b/recipes/taocpp-pegtl/3.x.x/conanfile.py index 367752744a1f1..5ddd704b5c07c 100644 --- a/recipes/taocpp-pegtl/3.x.x/conanfile.py +++ b/recipes/taocpp-pegtl/3.x.x/conanfile.py @@ -11,13 +11,13 @@ class TaoCPPPEGTLConan(ConanFile): name = "taocpp-pegtl" + description = "Parsing Expression Grammar Template Library" license = "MIT" url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/taocpp/pegtl" - description = "Parsing Expression Grammar Template Library" topics = ("peg", "header-only", "cpp", "parsing", "cpp17", "cpp11", "grammar") - no_copy_source = True + package_type = "header-library" settings = "os", "arch", "compiler", "build_type" options = { "boost_filesystem": [True, False], @@ -25,6 +25,7 @@ class TaoCPPPEGTLConan(ConanFile): default_options = { "boost_filesystem": False, } + no_copy_source = True def requirements(self): if self.options.boost_filesystem: @@ -75,6 +76,9 @@ def package(self): copy(self, "*", dst=os.path.join(self.package_folder, "include"), src=os.path.join(self.source_folder, "include")) def package_info(self): + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] + self.cpp_info.set_property("cmake_file_name", "pegtl") self.cpp_info.set_property("cmake_target_name", "taocpp::pegtl") # TODO: back to global scope in conan v2 once cmake_find_package_* generators removed diff --git a/recipes/taocpp-pegtl/config.yml b/recipes/taocpp-pegtl/config.yml index 768412ab23d94..10a10cf7e0ee7 100644 --- a/recipes/taocpp-pegtl/config.yml +++ b/recipes/taocpp-pegtl/config.yml @@ -1,4 +1,6 @@ versions: + "3.2.8": + folder: "3.x.x" "3.2.7": folder: "3.x.x" "3.2.6": diff --git a/recipes/tar/all/conandata.yml b/recipes/tar/all/conandata.yml index 7df28f6d96e37..ab2017a8f4ca5 100644 --- a/recipes/tar/all/conandata.yml +++ b/recipes/tar/all/conandata.yml @@ -1,4 +1,13 @@ sources: + "1.35": + url: "https://ftp.gnu.org/gnu/tar/tar-1.35.tar.xz" + sha256: "4d62ff37342ec7aed748535323930c7cf94acf71c3591882b26a7ea50f3edc16" "1.32.90": url: "https://alpha.gnu.org/gnu/tar/tar-1.32.90.tar.gz" sha256: "641fe07b7403c8eb801e7bfb91d1b7e5800ab15df524e22e0b2e89501280b6d7" +patches: + "1.35": + - patch_file: "patches/1.35-001-fix-iconv-link.patch" + patch_description: "Fix iconv link" + patch_type: "portability" + patch_source: "http://git.savannah.gnu.org/cgit/tar.git/patch/?id=8632df398b2f548465ebe68b8f494c0d6f8d913d" diff --git a/recipes/tar/all/conanfile.py b/recipes/tar/all/conanfile.py index 96d4365b7ea60..9f5cf868bef7f 100644 --- a/recipes/tar/all/conanfile.py +++ b/recipes/tar/all/conanfile.py @@ -3,10 +3,11 @@ from conan import ConanFile from conan.errors import ConanInvalidConfiguration from conan.tools.env import VirtualBuildEnv -from conan.tools.files import apply_conandata_patches, copy, get, replace_in_file, rmdir +from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, replace_in_file, rmdir from conan.tools.gnu import Autotools, AutotoolsToolchain from conan.tools.layout import basic_layout from conan.tools.microsoft import is_msvc +from conan.tools.scm import Version required_conan_version = ">=1.53.0" @@ -26,6 +27,9 @@ class TarConan(ConanFile): def _settings_build(self): return getattr(self, "settings_build", self.settings) + def export_sources(self): + export_conandata_patches(self) + def configure(self): self.settings.rm_safe("compiler.libcxx") self.settings.rm_safe("compiler.cppstd") @@ -39,10 +43,15 @@ def package_id(self): def requirements(self): self.requires("bzip2/1.0.8", run=True, headers=False, libs=False) self.requires("lzip/1.23", run=True, headers=False, libs=False) - self.requires("xz_utils/5.4.4", run=True, headers=False, libs=False) + self.requires("xz_utils/5.4.5", run=True, headers=False, libs=False) self.requires("zstd/1.5.5", run=True, headers=False, libs=False) # self.requires("lzo/2.10", run=True, headers=False, libs=False) + def build_requirements(self): + if Version(self.version) == "1.35": + self.build_requires("automake/1.16.5") + self.build_requires("gettext/0.22.5") + def validate(self): if self.settings.os == "Windows": raise ConanInvalidConfiguration("This recipe does not support Windows builds of tar") # FIXME: fails on MSVC and mingw-w64 @@ -86,6 +95,8 @@ def _patch_sources(self): def build(self): self._patch_sources() autotools = Autotools(self) + if Version(self.version) == "1.35": + autotools.autoreconf() # autoreconf needed after patching autotools.configure() autotools.make() diff --git a/recipes/tar/all/patches/1.35-001-fix-iconv-link.patch b/recipes/tar/all/patches/1.35-001-fix-iconv-link.patch new file mode 100644 index 0000000000000..e433aa6ead2da --- /dev/null +++ b/recipes/tar/all/patches/1.35-001-fix-iconv-link.patch @@ -0,0 +1,24 @@ +From 8632df398b2f548465ebe68b8f494c0d6f8d913d Mon Sep 17 00:00:00 2001 +From: Sergey Poznyakoff +Date: Tue, 18 Jul 2023 17:02:23 +0300 +Subject: Fix savannah bug #64441 + +* src/Makefile.am (tar_LDADD): Add libiconv libraries. +--- + src/Makefile.am | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/src/Makefile.am b/src/Makefile.am +index 36c9543..e2ec58d 100644 +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -52,4 +52,5 @@ AM_CFLAGS = $(WARN_CFLAGS) $(WERROR_CFLAGS) + tar_LDADD = $(LIBS) ../lib/libtar.a ../gnu/libgnu.a\ + $(LIB_ACL) $(LIB_CLOCK_GETTIME) $(LIB_EACCESS)\ + $(LIB_GETRANDOM) $(LIB_HARD_LOCALE) $(FILE_HAS_ACL_LIB) $(LIB_MBRTOWC)\ +- $(LIB_SELINUX) $(LIB_SETLOCALE_NULL) ++ $(LIB_SELINUX) $(LIB_SETLOCALE_NULL) \ ++ $(LIBINTL) $(LIBICONV) +-- +cgit v1.1 + diff --git a/recipes/tar/config.yml b/recipes/tar/config.yml index b21f806d0621e..65088c19d5771 100644 --- a/recipes/tar/config.yml +++ b/recipes/tar/config.yml @@ -1,3 +1,5 @@ versions: + "1.35": + folder: "all" "1.32.90": folder: "all" diff --git a/recipes/taskflow/all/conandata.yml b/recipes/taskflow/all/conandata.yml index d4e7661550418..8d29a2455eda0 100644 --- a/recipes/taskflow/all/conandata.yml +++ b/recipes/taskflow/all/conandata.yml @@ -1,4 +1,10 @@ sources: + "3.8.0": + url: "https://github.com/taskflow/taskflow/archive/v3.8.0.tar.gz" + sha256: "51316ee5fbf0c8f8f4638eb7428430cadfe6e8910756593884710e99129fa0ab" + "3.7.0": + url: "https://github.com/taskflow/taskflow/archive/v3.7.0.tar.gz" + sha256: "788b88093fb3788329ebbf7c7ee05d1f8960d974985a301798df01e77e04233b" "3.6.0": url: "https://github.com/taskflow/taskflow/archive/v3.6.0.tar.gz" sha256: "5a1cd9cf89f93a97fcace58fd73ed2fc8ee2053bcb43e047acb6bc121c3edf4c" @@ -17,18 +23,6 @@ sources: "3.1.0": url: "https://github.com/taskflow/taskflow/archive/v3.1.0.tar.gz" sha256: "B83E9A78C254D831B8401D0F8A766E3C5B60D8D20BE5AF6E2D2FAD4AA4A8B980" - "3.0.0": - url: "https://github.com/taskflow/taskflow/archive/v3.0.0.tar.gz" - sha256: "553C88A6E56E115D29AC1520B8A0FEA4557A5FCDA1AF1427BD3BA454926D03A2" - "2.7.0": - url: "https://github.com/taskflow/taskflow/archive/v2.7.0.tar.gz" - sha256: "BC2227DCABEC86ABEBA1FEE56BB357D9D3C0EF0184F7C2275D7008E8758DFC3E" - "2.6.0": - url: "https://github.com/taskflow/taskflow/archive/v2.6.0.tar.gz" - sha256: "2F511F4291653D759AF12A7854BABCEBF57CFBB8B49BF6CD3EB0DD98A1A4039C" - "2.5.0": - url: "https://github.com/taskflow/taskflow/archive/v2.5.0.tar.gz" - sha256: "B7016EE3486458AE401D521EA6BC0403DDE975828038B9734621A6A325ACAC1A" patches: "3.3.0": - patch_file: "patches/3.3.0-immintrin-guard.patch" diff --git a/recipes/taskflow/all/conanfile.py b/recipes/taskflow/all/conanfile.py index 7d914d16abb83..b7c01ed9815d0 100644 --- a/recipes/taskflow/all/conanfile.py +++ b/recipes/taskflow/all/conanfile.py @@ -26,26 +26,17 @@ class TaskflowConan(ConanFile): @property def _min_cppstd(self): - if Version(self.version) >= "3.0.0": - return "17" - return "14" + return "17" @property def _compilers_minimum_version(self): return { - "17": { - "Visual Studio": "16", - "gcc": "7.3", - "clang": "6.0", - "apple-clang": "10.0", - }, - "14": { - "Visual Studio": "15", - "gcc": "5", - "clang": "4.0", - "apple-clang": "8.0", - }, - }[self._min_cppstd] + "Visual Studio": "16", + "msvc": "192", + "gcc": "7.3" if Version(self.version) < "3.7.0" else "8.4", + "clang": "6.0", + "apple-clang": "10.0", + } def export_sources(self): export_conandata_patches(self) diff --git a/recipes/taskflow/config.yml b/recipes/taskflow/config.yml index 36b5f1772375b..94741c12af489 100644 --- a/recipes/taskflow/config.yml +++ b/recipes/taskflow/config.yml @@ -1,4 +1,8 @@ versions: + "3.8.0": + folder: all + "3.7.0": + folder: all "3.6.0": folder: all "3.5.0": @@ -11,11 +15,3 @@ versions: folder: all "3.1.0": folder: all - "3.0.0": - folder: all - "2.7.0": - folder: all - "2.6.0": - folder: all - "2.5.0": - folder: all diff --git a/recipes/tensorflow-lite/all/conandata.yml b/recipes/tensorflow-lite/all/conandata.yml index c5076017657c5..ab25e5805cf91 100644 --- a/recipes/tensorflow-lite/all/conandata.yml +++ b/recipes/tensorflow-lite/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.15.0": + url: "https://github.com/tensorflow/tensorflow/archive/refs/tags/v2.15.0.tar.gz" + sha256: "9cec5acb0ecf2d47b16891f8bc5bc6fbfdffe1700bdadc0d9ebe27ea34f0c220" "2.12.0": url: "https://github.com/tensorflow/tensorflow/archive/refs/tags/v2.12.0.tar.gz" sha256: "c030cb1905bff1d2446615992aad8d8d85cbe90c4fb625cee458c63bf466bc8e" @@ -6,6 +9,17 @@ sources: url: "https://github.com/tensorflow/tensorflow/archive/refs/tags/v2.10.0.tar.gz" sha256: "b5a1bb04c84b6fe1538377e5a1f649bb5d5f0b2e3625a3c526ff3a8af88633e8" patches: + "2.15.0": + - patch_file: "patches/2.15.0-0001-disable-fetch-content.patch" + patch_description: "Fail if the CMake build script tries to fetch external dependencies" + patch_type: "conan" + - patch_file: "patches/2.15.0-0002-windows-mmap.patch" + patch_description: "Disable mmap on Windows." + patch_type: "bugfix" + patch_source: "https://github.com/tensorflow/tensorflow/pull/62636" + - patch_file: "patches/2.15.0-0003-use-cci-dependencies.patch" + patch_description: "Dependency compatibility: Patch CMakeLists.txt, updating package names, target names, etc" + patch_type: "conan" "2.12.0": - patch_file: "patches/2.12.0-0001-remove_simple_memory_arena_debug_dump.patch" patch_description: "Shared build fails on Windows with error LNK2005. Resolve the conflict by removing the conflicting implementation for now." @@ -16,6 +30,10 @@ patches: - patch_file: "patches/2.12.0-0003-use-cci-dependencies.patch" patch_description: "Dependency compatibility: Patch CMakeLists.txt, updating package names, target names, etc" patch_type: "conan" + - patch_file: "patches/2.12.0-0004-use-add-stdint-for-int-types.patch" + patch_description: "Add stdint.h for int types in internal::Spectrogram" + patch_type: "bugfix" + patch_source: "https://github.com/tensorflow/tensorflow/pull/60299" "2.10.0": - patch_file: "patches/2.10.0-0001-remove_simple_memory_arena_debug_dump.patch" patch_description: "Shared build fails on Windows with error LNK2005. Resolve the conflict by removing the conflicting implementation for now." @@ -25,3 +43,7 @@ patches: - patch_file: "patches/2.10.0-0003-use-cci-dependencies.patch" patch_description: "Dependency compatibility: Patch CMakeLists.txt, updating package names, target names, etc" patch_type: "conan" + - patch_file: "patches/2.10.0-0004-use-add-stdint-for-int-types.patch" + patch_description: "Add stdint.h for int types in internal::Spectrogram" + patch_type: "bugfix" + patch_source: "https://github.com/tensorflow/tensorflow/pull/60299" diff --git a/recipes/tensorflow-lite/all/conanfile.py b/recipes/tensorflow-lite/all/conanfile.py index 0ad39bb09b0e6..dd383c7b99b3e 100644 --- a/recipes/tensorflow-lite/all/conanfile.py +++ b/recipes/tensorflow-lite/all/conanfile.py @@ -1,10 +1,9 @@ -import os from conan import ConanFile from conan.errors import ConanInvalidConfiguration from conan.tools.build import check_min_cppstd from conan.tools.cmake import CMake, CMakeToolchain, CMakeDeps, cmake_layout from conan.tools.env import VirtualBuildEnv -from conan.tools.files import get, save, copy, export_conandata_patches, apply_conandata_patches, replace_in_file +from conan.tools.files import get, save, copy, export_conandata_patches, apply_conandata_patches from conan.tools.scm import Version from os.path import join import textwrap @@ -82,14 +81,17 @@ def requirements(self): self.requires("eigen/3.4.0") self.requires("farmhash/cci.20190513") self.requires("fft/cci.20061228") - self.requires("flatbuffers/23.3.3", transitive_headers=True) + if Version(self.version) < "2.15.0": + self.requires("flatbuffers/23.3.3", transitive_headers=True) + else: + self.requires("flatbuffers/23.5.26", transitive_headers=True) self.requires("gemmlowp/cci.20210928") - self.requires("ruy/cci.20220628") + self.requires("ruy/cci.20231129") if self.settings.arch in ("x86", "x86_64"): self.requires("intel-neon2sse/cci.20210225") if self.options.with_xnnpack: self.requires("xnnpack/cci.20231026") - # https://github.com/tensorflow/tensorflow/blob/359c3cdfc5fabac82b3c70b3b6de2b0a8c16874f/tensorflow/lite/delegates/xnnpack/xnnpack_delegate.cc#L165 + if Version(self.version) >= "2.12.0" or self.options.with_xnnpack: self.requires("pthreadpool/cci.20231129") if self.options.with_xnnpack or self.options.get_safe("with_nnapi", False): self.requires("fp16/cci.20210320") @@ -124,6 +126,7 @@ def generate(self): "TFLITE_ENABLE_XNNPACK": self.options.with_xnnpack, "TFLITE_ENABLE_MMAP": self.options.get_safe("with_mmap", False), "FETCHCONTENT_FULLY_DISCONNECTED": True, + "SYSTEM_PTHREADPOOL": True, "clog_POPULATED": True, }) if self.settings.arch == "armv8": @@ -159,9 +162,9 @@ def package(self): copy(self, "LICENSE", self.source_folder, join(self.package_folder, "licenses")) copy(self, "*.h", join(self.source_folder, "tensorflow", "lite"), join(self.package_folder, "include", "tensorflow", "lite")) copy(self, "version.h", join(self.source_folder, "tensorflow", "core", "public"), join(self.package_folder, "include", "tensorflow", "core", "public")) - copy(self, "*.a", self.build_folder, join(self.package_folder, "lib")) - copy(self, "*.so", self.build_folder, join(self.package_folder, "lib")) - copy(self, "*.dylib", self.build_folder, join(self.package_folder, "lib")) + copy(self, "*.a", self.build_folder, join(self.package_folder, "lib"), keep_path=False) + copy(self, "*.so", self.build_folder, join(self.package_folder, "lib"), keep_path=False) + copy(self, "*.dylib", self.build_folder, join(self.package_folder, "lib"), keep_path=False) copy(self, "*.lib", self.build_folder, join(self.package_folder, "lib"), keep_path=False) copy(self, "*.dll", self.build_folder, join(self.package_folder, "bin"), keep_path=False) self._create_cmake_module_alias_target(self, join(self.package_folder, self._module_file)) diff --git a/recipes/tensorflow-lite/all/patches/2.10.0-0004-use-add-stdint-for-int-types.patch b/recipes/tensorflow-lite/all/patches/2.10.0-0004-use-add-stdint-for-int-types.patch new file mode 100644 index 0000000000000..b57b09d18bd58 --- /dev/null +++ b/recipes/tensorflow-lite/all/patches/2.10.0-0004-use-add-stdint-for-int-types.patch @@ -0,0 +1,12 @@ +diff --git a/tensorflow/lite/kernels/internal/spectrogram.cc b/tensorflow/lite/kernels/internal/spectrogram.cc +index a832962a..919eebeb 100644 +--- a/tensorflow/lite/kernels/internal/spectrogram.cc ++++ b/tensorflow/lite/kernels/internal/spectrogram.cc +@@ -17,6 +17,7 @@ limitations under the License. + + #include + #include ++#include + + #include "third_party/fft2d/fft.h" + diff --git a/recipes/tensorflow-lite/all/patches/2.12.0-0001-remove_simple_memory_arena_debug_dump.patch b/recipes/tensorflow-lite/all/patches/2.12.0-0001-remove_simple_memory_arena_debug_dump.patch index 7347da947b777..4753a3d1bac63 100644 --- a/recipes/tensorflow-lite/all/patches/2.12.0-0001-remove_simple_memory_arena_debug_dump.patch +++ b/recipes/tensorflow-lite/all/patches/2.12.0-0001-remove_simple_memory_arena_debug_dump.patch @@ -12,10 +12,3 @@ index c71a392..7260efe 100644 # This particular file is excluded because the more explicit approach to enable # XNNPACK delegate is preferred to the weak-symbol one. -@@ -654,4 +657,4 @@ target_link_libraries(_pywrap_tensorflow_interpreter_wrapper - target_compile_options(_pywrap_tensorflow_interpreter_wrapper - PUBLIC ${TFLITE_TARGET_PUBLIC_OPTIONS} - PRIVATE ${TFLITE_TARGET_PRIVATE_OPTIONS} --) -\ No newline at end of file -+) diff --git a/recipes/tensorflow-lite/all/patches/2.12.0-0002-disable-fetch-content.patch b/recipes/tensorflow-lite/all/patches/2.12.0-0002-disable-fetch-content.patch index 3e5227f425d87..d3bfdf275681e 100644 --- a/recipes/tensorflow-lite/all/patches/2.12.0-0002-disable-fetch-content.patch +++ b/recipes/tensorflow-lite/all/patches/2.12.0-0002-disable-fetch-content.patch @@ -1,14 +1,3 @@ -diff --git a/tensorflow/lite/CMakeLists.txt b/tensorflow/lite/CMakeLists.txt -index 24b8265..7260efe 100644 ---- a/tensorflow/lite/CMakeLists.txt -+++ b/tensorflow/lite/CMakeLists.txt -@@ -657,4 +657,4 @@ target_link_libraries(_pywrap_tensorflow_interpreter_wrapper - target_compile_options(_pywrap_tensorflow_interpreter_wrapper - PUBLIC ${TFLITE_TARGET_PUBLIC_OPTIONS} - PRIVATE ${TFLITE_TARGET_PRIVATE_OPTIONS} --) -\ No newline at end of file -+) diff --git a/tensorflow/lite/tools/cmake/modules/OverridableFetchContent.cmake b/tensorflow/lite/tools/cmake/modules/OverridableFetchContent.cmake index 9ed9510..4a6a45d 100644 --- a/tensorflow/lite/tools/cmake/modules/OverridableFetchContent.cmake diff --git a/recipes/tensorflow-lite/all/patches/2.12.0-0003-use-cci-dependencies.patch b/recipes/tensorflow-lite/all/patches/2.12.0-0003-use-cci-dependencies.patch index 669ae2418a34e..be146c5e56c09 100644 --- a/recipes/tensorflow-lite/all/patches/2.12.0-0003-use-cci-dependencies.patch +++ b/recipes/tensorflow-lite/all/patches/2.12.0-0003-use-cci-dependencies.patch @@ -1,8 +1,8 @@ diff --git a/tensorflow/lite/CMakeLists.txt b/tensorflow/lite/CMakeLists.txt -index 24b8265..9e0d1e0 100644 +index 24b8265..d95c0ae 100644 --- a/tensorflow/lite/CMakeLists.txt +++ b/tensorflow/lite/CMakeLists.txt -@@ -142,31 +142,16 @@ +@@ -142,31 +142,17 @@ endmacro() find_package(absl REQUIRED) find_package(Eigen3 REQUIRED) find_package(farmhash REQUIRED) @@ -32,6 +32,7 @@ index 24b8265..9e0d1e0 100644 - add_subdirectory( - "${PTHREADPOOL_SOURCE_DIR}" - "${CMAKE_BINARY_DIR}/pthreadpool") ++find_package(pthreadpool REQUIRED) + +if(TARGET flatbuffers::flatbuffers_shared) + set(FLATBUFFERS_TARGET flatbuffers::flatbuffers_shared) @@ -40,7 +41,7 @@ index 24b8265..9e0d1e0 100644 endif() set(TF_TARGET_PRIVATE_OPTIONS "") if(CMAKE_CXX_COMPILER_ID MATCHES "Clang$") -@@ -180,6 +165,10 @@ +@@ -180,6 +166,10 @@ set(TFLITE_TARGET_PRIVATE_OPTIONS "") set(TFLITE_TARGET_PRIVATE_DEFINITIONS "") # Additional library dependencies based upon enabled features. set(TFLITE_TARGET_DEPENDENCIES "") @@ -51,13 +52,12 @@ index 24b8265..9e0d1e0 100644 if(CMAKE_CXX_COMPILER_ID MATCHES "Clang$") # TFLite uses deprecated methods in neon2sse which generates a huge number of # warnings so surpress these until they're fixed. -@@ -429,13 +418,14 @@ +@@ -429,13 +419,13 @@ else() endif() if(TFLITE_ENABLE_XNNPACK) find_package(fp16_headers REQUIRED) - find_package(XNNPACK REQUIRED) + find_package(xnnpack REQUIRED) -+ find_package(pthreadpool REQUIRED) populate_tflite_source_vars("delegates/xnnpack" TFLITE_DELEGATES_XNNPACK_SRCS FILTER ".*(_test|_tester)\\.(cc|h)" @@ -68,7 +68,7 @@ index 24b8265..9e0d1e0 100644 ) list(APPEND TFLITE_TARGET_PUBLIC_OPTIONS "-DTFLITE_BUILD_WITH_XNNPACK_DELEGATE") endif() -@@ -492,6 +482,7 @@ +@@ -492,6 +482,7 @@ populate_tflite_source_vars("kernels/internal/reference/sparse_ops" TFLITE_KERNEL_INTERNAL_REF_SPARSE_OPS_SRCS ) set(TFLITE_PROFILER_SRCS @@ -76,7 +76,7 @@ index 24b8265..9e0d1e0 100644 ${TFLITE_SOURCE_DIR}/profiling/platform_profiler.cc ${TFLITE_SOURCE_DIR}/profiling/root_profiler.h ${TFLITE_SOURCE_DIR}/profiling/root_profiler.cc -@@ -555,19 +546,18 @@ +@@ -555,19 +546,18 @@ target_include_directories(tensorflow-lite target_link_libraries(tensorflow-lite PUBLIC Eigen3::Eigen diff --git a/recipes/tensorflow-lite/all/patches/2.12.0-0004-use-add-stdint-for-int-types.patch b/recipes/tensorflow-lite/all/patches/2.12.0-0004-use-add-stdint-for-int-types.patch new file mode 100644 index 0000000000000..b57b09d18bd58 --- /dev/null +++ b/recipes/tensorflow-lite/all/patches/2.12.0-0004-use-add-stdint-for-int-types.patch @@ -0,0 +1,12 @@ +diff --git a/tensorflow/lite/kernels/internal/spectrogram.cc b/tensorflow/lite/kernels/internal/spectrogram.cc +index a832962a..919eebeb 100644 +--- a/tensorflow/lite/kernels/internal/spectrogram.cc ++++ b/tensorflow/lite/kernels/internal/spectrogram.cc +@@ -17,6 +17,7 @@ limitations under the License. + + #include + #include ++#include + + #include "third_party/fft2d/fft.h" + diff --git a/recipes/tensorflow-lite/all/patches/2.15.0-0001-disable-fetch-content.patch b/recipes/tensorflow-lite/all/patches/2.15.0-0001-disable-fetch-content.patch new file mode 100644 index 0000000000000..adc6f0561afef --- /dev/null +++ b/recipes/tensorflow-lite/all/patches/2.15.0-0001-disable-fetch-content.patch @@ -0,0 +1,12 @@ +diff --git a/tensorflow/lite/tools/cmake/modules/OverridableFetchContent.cmake b/tensorflow/lite/tools/cmake/modules/OverridableFetchContent.cmake +index 9ed95109ba9..4ddf322b95f 100644 +--- a/tensorflow/lite/tools/cmake/modules/OverridableFetchContent.cmake ++++ b/tensorflow/lite/tools/cmake/modules/OverridableFetchContent.cmake +@@ -244,6 +244,7 @@ endfunction() + # All content names passed to this method are added to the global property + # OVERRIDABLE_FETCH_CONTENT_LIST. + function(OverridableFetchContent_Declare CONTENT_NAME) ++ message(FATAL_ERROR "OverridableFetchContent_Declare called by ${CONTENT_NAME}! Failing build.") + set(OVERRIDABLE_ARGS + GIT_REPOSITORY + GIT_TAG diff --git a/recipes/tensorflow-lite/all/patches/2.15.0-0002-windows-mmap.patch b/recipes/tensorflow-lite/all/patches/2.15.0-0002-windows-mmap.patch new file mode 100644 index 0000000000000..1305e34c37c6d --- /dev/null +++ b/recipes/tensorflow-lite/all/patches/2.15.0-0002-windows-mmap.patch @@ -0,0 +1,20 @@ +commit 77056b1ab930c36c8066446615577be4d121e3ea +Author: talyz +Date: Thu Dec 14 11:43:16 2023 +0100 + + cmake: Disable the use of mmap on Windows + +diff --git a/tensorflow/lite/CMakeLists.txt b/tensorflow/lite/CMakeLists.txt +index 83bc7629004..0958ed1b9ce 100644 +--- a/tensorflow/lite/CMakeLists.txt ++++ b/tensorflow/lite/CMakeLists.txt +@@ -202,7 +202,8 @@ if(CMAKE_SYSTEM_NAME MATCHES "Windows") + # Use NOMINMAX to disable the min / max macros in windows.h as they break + # use of std::min std::max. + # Use NOGDI to ERROR macro which breaks TensorFlow logging. +- list(APPEND TFLITE_TARGET_PRIVATE_OPTIONS "-DNOMINMAX" "-DNOGDI") ++ # Disable mmap, which is not available on Windows. ++ list(APPEND TFLITE_TARGET_PRIVATE_OPTIONS "-DNOMINMAX" "-DNOGDI" "-DTFLITE_MMAP_DISABLED") + # lite/kernels/conv.cc has more than 64k sections so enable /bigobj to + # support compilation with MSVC2015. + if(MSVC) diff --git a/recipes/tensorflow-lite/all/patches/2.15.0-0003-use-cci-dependencies.patch b/recipes/tensorflow-lite/all/patches/2.15.0-0003-use-cci-dependencies.patch new file mode 100644 index 0000000000000..2c7c5965e2927 --- /dev/null +++ b/recipes/tensorflow-lite/all/patches/2.15.0-0003-use-cci-dependencies.patch @@ -0,0 +1,68 @@ +diff --git a/tensorflow/lite/CMakeLists.txt b/tensorflow/lite/CMakeLists.txt +index 0958ed1b9ce..13d06f12ca6 100644 +--- a/tensorflow/lite/CMakeLists.txt ++++ b/tensorflow/lite/CMakeLists.txt +@@ -147,7 +147,7 @@ set(TFLITE_TARGET_DEPENDENCIES "") + find_package(absl REQUIRED) + find_package(Eigen3 REQUIRED) + find_package(farmhash REQUIRED) +-find_package(fft2d REQUIRED) ++find_package(fft REQUIRED) + find_package(FlatBuffers REQUIRED) + find_package(gemmlowp REQUIRED) + if (NOT CMAKE_SYSTEM_PROCESSOR OR CMAKE_SYSTEM_PROCESSOR MATCHES "x86") +@@ -155,7 +155,6 @@ if (NOT CMAKE_SYSTEM_PROCESSOR OR CMAKE_SYSTEM_PROCESSOR MATCHES "x86") + list(APPEND TFLITE_TARGET_DEPENDENCIES NEON_2_SSE::NEON_2_SSE) + endif() + find_package(cpuinfo REQUIRED) #CPUINFO is used by XNNPACK and RUY library +-find_package(ml_dtypes REQUIRED) + find_package(ruy REQUIRED) + # Include TSL, which is in tensorflow/third_party + include_directories( +@@ -183,6 +182,11 @@ if(NOT SYSTEM_PTHREADPOOL AND NOT TARGET pthreadpool) + "${PTHREADPOOL_SOURCE_DIR}" + "${CMAKE_BINARY_DIR}/pthreadpool") + endif() ++if(TARGET flatbuffers::flatbuffers_shared) ++ set(FLATBUFFERS_TARGET flatbuffers::flatbuffers_shared) ++else() ++ set(FLATBUFFERS_TARGET flatbuffers::flatbuffers) ++endif() + set(TF_TARGET_PRIVATE_OPTIONS "") + if(CMAKE_CXX_COMPILER_ID MATCHES "Clang$") + # TensorFlow uses a heap of deprecated proto fields so surpress these +@@ -483,13 +487,13 @@ else() + endif() + if(TFLITE_ENABLE_XNNPACK) + find_package(fp16_headers REQUIRED) +- find_package(XNNPACK REQUIRED) ++ find_package(xnnpack REQUIRED) + populate_tflite_source_vars("delegates/xnnpack" + TFLITE_DELEGATES_XNNPACK_SRCS + FILTER ".*(_test|_tester)\\.(cc|h)" + ) + list(APPEND TFLITE_TARGET_DEPENDENCIES +- XNNPACK ++ xnnpack::xnnpack + ) + list(APPEND TFLITE_TARGET_PUBLIC_OPTIONS "-DTFLITE_BUILD_WITH_XNNPACK_DELEGATE") + endif() +@@ -633,13 +637,12 @@ target_link_libraries(tensorflow-lite + absl::strings + absl::synchronization + absl::variant +- farmhash +- fft2d_fftsg2d +- flatbuffers::flatbuffers +- gemmlowp::gemmlowp +- ml_dtypes ++ farmhash::farmhash ++ fft::fft ++ ${FLATBUFFERS_TARGET} ++ gemmlowp::eight_bit_int_gemm + ruy::ruy +- pthreadpool ++ pthreadpool::pthreadpool + ${CMAKE_DL_LIBS} + ${TFLITE_TARGET_DEPENDENCIES} + ) diff --git a/recipes/tensorflow-lite/all/test_package/conanfile.py b/recipes/tensorflow-lite/all/test_package/conanfile.py index 841a097747d32..8321ed4e2de49 100644 --- a/recipes/tensorflow-lite/all/test_package/conanfile.py +++ b/recipes/tensorflow-lite/all/test_package/conanfile.py @@ -22,6 +22,5 @@ def build(self): def test(self): if can_run(self): - model_path = os.path.join(self.source_folder, "model.tflite") command = os.path.join(self.cpp.build.bindirs[0], "test_package") - self.run(f"{command} {model_path}", env="conanrun") + self.run(command, env="conanrun") diff --git a/recipes/tensorflow-lite/all/test_package/model.tflite b/recipes/tensorflow-lite/all/test_package/model.tflite deleted file mode 100644 index 281cb988ba465..0000000000000 Binary files a/recipes/tensorflow-lite/all/test_package/model.tflite and /dev/null differ diff --git a/recipes/tensorflow-lite/all/test_package/test_package.cpp b/recipes/tensorflow-lite/all/test_package/test_package.cpp index 954d81537da3f..21834b32a2984 100644 --- a/recipes/tensorflow-lite/all/test_package/test_package.cpp +++ b/recipes/tensorflow-lite/all/test_package/test_package.cpp @@ -1,42 +1,15 @@ -#include -#include #include #include -#include - #include -#include int main(int argc, char * argv[]) { - if ( argc != 2) { - std::cerr << "Pass model file path as argument" << std::endl; - return -1; - } - std::cout << "Using TensorFlow Lite version " << TFLITE_VERSION_STRING << std::endl; - auto model = tflite::FlatBufferModel::BuildFromFile(argv[1]); - if (!model) { - throw std::runtime_error("Failed to load TFLite model"); - } - - tflite::ops::builtin::BuiltinOpResolver resolver; - tflite::InterpreterBuilder builder(*model, resolver); std::unique_ptr interpreter; - builder(&interpreter); + interpreter = std::make_unique(); - if (interpreter->AllocateTensors() != kTfLiteOk) { - throw std::runtime_error("Failed to allocate tensors"); - } + const int num_tensors = interpreter->tensors_size(); + std::cout << "Number of tensors in the interpreter: " << num_tensors << std::endl; - tflite::PrintInterpreterState(interpreter.get()); - auto input = interpreter->typed_input_tensor(0); - *input = 42.0F; - std::cout << "==== Running SQUARE(x) Model ====\n\n"; - if (interpreter->Invoke() != kTfLiteOk) { - throw std::runtime_error("Failed to execute model"); - } - auto output = interpreter->typed_output_tensor(0); - std::cout << "SQUARE(" << *input << ") = " << *output << std::endl; return 0; } diff --git a/recipes/tensorflow-lite/all/test_v1_package/conanfile.py b/recipes/tensorflow-lite/all/test_v1_package/conanfile.py index 17a163fae24bd..b6d768011ed00 100644 --- a/recipes/tensorflow-lite/all/test_v1_package/conanfile.py +++ b/recipes/tensorflow-lite/all/test_v1_package/conanfile.py @@ -14,6 +14,5 @@ def build(self): def test(self): if not cross_building(self): - model_path = os.path.join(self.source_folder, os.pardir, "test_package", "model.tflite") command = os.path.join("bin", "test_package") - self.run(f"{command} {model_path}", run_environment=True) + self.run(command, run_environment=True) diff --git a/recipes/tensorflow-lite/config.yml b/recipes/tensorflow-lite/config.yml index cabc9e91cd30c..7e71186249830 100644 --- a/recipes/tensorflow-lite/config.yml +++ b/recipes/tensorflow-lite/config.yml @@ -1,4 +1,6 @@ versions: + "2.15.0": + folder: all "2.12.0": folder: all "2.10.0": diff --git a/recipes/tesseract/all/conandata.yml b/recipes/tesseract/all/conandata.yml index 00a8d11156c81..dde624ec73438 100644 --- a/recipes/tesseract/all/conandata.yml +++ b/recipes/tesseract/all/conandata.yml @@ -1,4 +1,13 @@ sources: + "5.4.1": + url: "https://github.com/tesseract-ocr/tesseract/archive/5.4.0.tar.gz" + sha256: "30ceffd9b86780f01cbf4eaf9b7fc59abddfcbaf5bbd52f9a633c6528cb183fd" + "5.4.0": + url: "https://github.com/tesseract-ocr/tesseract/archive/5.4.0.tar.gz" + sha256: "30ceffd9b86780f01cbf4eaf9b7fc59abddfcbaf5bbd52f9a633c6528cb183fd" + "5.3.4": + url: "https://github.com/tesseract-ocr/tesseract/archive/5.3.4.tar.gz" + sha256: "141afc12b34a14bb691a939b4b122db0d51bd38feda7f41696822bacea7710c7" "5.3.3": url: "https://github.com/tesseract-ocr/tesseract/archive/5.3.3.tar.gz" sha256: "dc4329f85f41191b2d813b71b528ba6047745813474e583ccce8795ff2ff5681" @@ -18,6 +27,18 @@ sources: url: "https://github.com/tesseract-ocr/tesseract/archive/4.1.1.tar.gz" sha256: "2a66ff0d8595bff8f04032165e6c936389b1e5727c3ce5a27b3e059d218db1cb" patches: + "5.4.1": + - patch_file: "patches/0004-control-optimizations-5.4.0.patch" + patch_description: "fix condition for cpu optimizations" + patch_type: "portability" + "5.4.0": + - patch_file: "patches/0004-control-optimizations-5.4.0.patch" + patch_description: "fix condition for cpu optimizations" + patch_type: "portability" + "5.3.4": + - patch_file: "patches/0004-control-optimizations-5.3.3.patch" + patch_description: "fix condition for cpu optimizations" + patch_type: "portability" "5.3.3": - patch_file: "patches/0004-control-optimizations-5.3.3.patch" patch_description: "fix condition for cpu optimizations" diff --git a/recipes/tesseract/all/conanfile.py b/recipes/tesseract/all/conanfile.py index 861e7b6b85384..f4748d7b4ec1b 100644 --- a/recipes/tesseract/all/conanfile.py +++ b/recipes/tesseract/all/conanfile.py @@ -2,7 +2,7 @@ from conan.errors import ConanInvalidConfiguration from conan.tools.build import check_min_cppstd from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout -from conan.tools.files import apply_conandata_patches, export_conandata_patches, get, copy, rmdir, save +from conan.tools.files import apply_conandata_patches, export_conandata_patches, get, copy, rmdir, rm, save from conan.tools.scm import Version import os @@ -155,6 +155,7 @@ def package(self): rmdir(self, os.path.join(self.package_folder, "cmake")) rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) + rm(self, "*.pdb", os.path.join(self.package_folder, "bin")) # TODO: to remove in conan v2 once cmake_find_package* generators removed self._create_cmake_module_alias_targets( diff --git a/recipes/tesseract/all/patches/0004-control-optimizations-5.4.0.patch b/recipes/tesseract/all/patches/0004-control-optimizations-5.4.0.patch new file mode 100644 index 0000000000000..5f979a5a3b6c0 --- /dev/null +++ b/recipes/tesseract/all/patches/0004-control-optimizations-5.4.0.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 85af2df..aff97da 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -165,7 +165,7 @@ endif(ENABLE_NATIVE) + + message(STATUS "CMAKE_SYSTEM_PROCESSOR=<${CMAKE_SYSTEM_PROCESSOR}>") + +-if(CMAKE_SYSTEM_PROCESSOR MATCHES "x86|x86_64|AMD64|amd64|i386|i686") ++if(ENABLE_OPTIMIZATIONS AND CMAKE_SYSTEM_PROCESSOR MATCHES "x86|x86_64|AMD64|amd64|i386|i686") + + set(HAVE_NEON FALSE) + if(MSVC) diff --git a/recipes/tesseract/config.yml b/recipes/tesseract/config.yml index f1f981966776b..2a1c379104746 100644 --- a/recipes/tesseract/config.yml +++ b/recipes/tesseract/config.yml @@ -1,4 +1,10 @@ versions: + "5.4.1": + folder: all + "5.4.0": + folder: all + "5.3.4": + folder: all "5.3.3": folder: all "5.3.0": diff --git a/recipes/tgbot/all/conandata.yml b/recipes/tgbot/all/conandata.yml index 1279fcb4b2148..c1de261e9fcc7 100644 --- a/recipes/tgbot/all/conandata.yml +++ b/recipes/tgbot/all/conandata.yml @@ -1,4 +1,8 @@ sources: + "1.8": + url: "https://github.com/reo7sp/tgbot-cpp/archive/v1.8.tar.gz" + sha256: "43ff1a359b8db026e58e517703e616accaae33e01ebc7e87613632b7e4653467" + # This is the last version for C++11. "1.7.2": url: "https://github.com/reo7sp/tgbot-cpp/archive/v1.7.2.tar.gz" sha256: "3a41c25c5e4b60bda3f278550a380f1c7c382fd50ea1ab1801edc837d1535462" diff --git a/recipes/tgbot/all/conanfile.py b/recipes/tgbot/all/conanfile.py index 1fb99e68206f6..9d54fa2902dee 100644 --- a/recipes/tgbot/all/conanfile.py +++ b/recipes/tgbot/all/conanfile.py @@ -5,7 +5,8 @@ from conan.tools.apple import fix_apple_shared_install_name from conan.tools.build import check_min_cppstd from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout -from conan.tools.files import copy, get, replace_in_file +from conan.tools.files import copy, get, replace_in_file, rmdir +from conan.tools.scm import Version required_conan_version = ">=1.53.0" @@ -29,6 +30,32 @@ class TgbotConan(ConanFile): "fPIC": True, } + @property + def _min_cppstd(self): + # tgbot requiroes C++17 since 1.7.3 + return "14" if Version(self.version) < "1.7.3" else "17" + + @property + def _compilers_minimum_version(self): + return { + "17": { + # tgbot/>= 1.7.3 require C++17 filesystem + "gcc": "9", + "clang": "9", + "apple-clang": "13", + "Visual Studio": "16", + "msvc": "192", + }, + "14": { + "gcc": "5", + "clang": "3", + "apple-clang": "10", + "Visual Studio": "15", + "msvc": "191", + } + }.get(self._min_cppstd, {}) + + def config_options(self): if self.settings.os == "Windows": del self.options.fPIC @@ -53,7 +80,13 @@ def _required_boost_components(self): def validate(self): if self.settings.compiler.cppstd: - check_min_cppstd(self, 11) + check_min_cppstd(self, self._min_cppstd) + minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) + if minimum_version and Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration( + f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." + ) + miss_boost_required_comp = any( self.dependencies["boost"].options.get_safe(f"without_{boost_comp}", True) for boost_comp in self._required_boost_components @@ -70,6 +103,8 @@ def source(self): def generate(self): tc = CMakeToolchain(self) tc.variables["ENABLE_TESTS"] = False + if not self.settings.compiler.cppstd: + tc.cache_variables["CMAKE_CXX_STANDARD"] = self._min_cppstd tc.generate() tc = CMakeDeps(self) tc.generate() @@ -82,6 +117,11 @@ def _patch_sources(self): "set_property(TARGET ${PROJECT_NAME} PROPERTY POSITION_INDEPENDENT_CODE ON)", "", ) + # Don't force CMAKE_CXX_STANDARD + replace_in_file(self, + os.path.join(self.source_folder, "CMakeLists.txt"), + "set(CMAKE_CXX_STANDARD", + "#") def build(self): self._patch_sources() @@ -96,7 +136,11 @@ def package(self): dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) fix_apple_shared_install_name(self) + rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) def package_info(self): self.cpp_info.libs = ["TgBot"] self.cpp_info.defines = ["HAVE_CURL=1"] + + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.system_libs.append("m") diff --git a/recipes/tgbot/all/test_package/CMakeLists.txt b/recipes/tgbot/all/test_package/CMakeLists.txt index ebe398c29035c..766207d11a696 100644 --- a/recipes/tgbot/all/test_package/CMakeLists.txt +++ b/recipes/tgbot/all/test_package/CMakeLists.txt @@ -1,8 +1,12 @@ cmake_minimum_required(VERSION 3.15) -project(test_package CXX) +project(test_package LANGUAGES CXX) find_package(tgbot REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) -set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 11) -target_link_libraries(${PROJECT_NAME} tgbot::tgbot) +target_link_libraries(${PROJECT_NAME} PRIVATE tgbot::tgbot) +if(tvbot_VERSION VERSION_LESS "1.7.3") + target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_14) +else() + target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) +endif() diff --git a/recipes/tgbot/config.yml b/recipes/tgbot/config.yml index 02741b3fbce3e..e9249e18493da 100644 --- a/recipes/tgbot/config.yml +++ b/recipes/tgbot/config.yml @@ -1,4 +1,6 @@ versions: + "1.8": + folder: all "1.7.2": folder: all "1.5": diff --git a/recipes/thorvg/all/conandata.yml b/recipes/thorvg/all/conandata.yml new file mode 100644 index 0000000000000..7d2bb56cec65a --- /dev/null +++ b/recipes/thorvg/all/conandata.yml @@ -0,0 +1,37 @@ +sources: + "0.15.3": + url: "https://github.com/thorvg/thorvg/archive/refs/tags/v0.15.3.tar.gz" + sha256: "c3d57167a54f0ecc3ead8bb33340593acc00bcd8477e784287307bc4e2c82b38" + "0.15.2": + url: "https://github.com/thorvg/thorvg/archive/refs/tags/v0.15.2.tar.gz" + sha256: "98fcd73567c003a33fad766a7dbb9244c61e9b4721397d42e7fa04fc2e499dce" + "0.15.1": + url: "https://github.com/thorvg/thorvg/archive/refs/tags/v0.15.1.tar.gz" + sha256: "4935228bb11e1a5303fc98d2a4b355c94eb82bff10cff581821b0b3c41368049" + "0.14.10": + url: "https://github.com/thorvg/thorvg/archive/refs/tags/v0.14.10.tar.gz" + sha256: "e11e2e27ef26ed018807e828cce3bca1fb9a7f25683a152c9cd1f7aac9f3b67a" + "0.14.6": + url: "https://github.com/thorvg/thorvg/archive/refs/tags/v0.14.6.tar.gz" + sha256: "13d7778968ce10f4f7dd1ea1f66861d4ee8ff22f669566992b4ac00e050496cf" + "0.14.5": + url: "https://github.com/thorvg/thorvg/archive/refs/tags/v0.14.5.tar.gz" + sha256: "a007c548e39b0fad5d66ce9cf71244d3d219d9188fd80ccc049a5fa1b7f7aac2" + "0.14.4": + url: "https://github.com/thorvg/thorvg/archive/refs/tags/v0.14.4.tar.gz" + sha256: "0adabdb61395d9ad126c49ac80aa9c971ad7a37268a77a9712790a556df32838" + "0.14.2": + url: "https://github.com/thorvg/thorvg/archive/refs/tags/v0.14.2.tar.gz" + sha256: "04202e8f5e17b427c3b16ae3b3d4be5d3f3cdac96d5c64ed3efd7b6db3ad731f" + "0.14.1": + url: "https://github.com/thorvg/thorvg/archive/refs/tags/v0.14.1.tar.gz" + sha256: "9c0346fda8b62a3b13a764dda5784e0465c8cab54fb5342d0240c7fb40e415bd" + "0.14.0": + url: "https://github.com/thorvg/thorvg/archive/refs/tags/v0.14.0.tar.gz" + sha256: "6f186b53be3a0bd971dabde7a58022f43303467794e89e3641c774f38cdc2664" + "0.13.8": + url: "https://github.com/thorvg/thorvg/archive/refs/tags/v0.13.8.tar.gz" + sha256: "ce49929a94d1686d4f1436da6ef5fa7a8439901c22b5fa0879d7d5879b8ba2bd" + "0.13.7": + url: "https://github.com/thorvg/thorvg/archive/refs/tags/v0.13.7.tar.gz" + sha256: "972c84e5670a7138eec24062d4ccc243d161158ecd9c53788300a8ca6aaf3426" diff --git a/recipes/thorvg/all/conanfile.py b/recipes/thorvg/all/conanfile.py new file mode 100644 index 0000000000000..f5807d200b459 --- /dev/null +++ b/recipes/thorvg/all/conanfile.py @@ -0,0 +1,198 @@ +import os + +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.apple import fix_apple_shared_install_name +from conan.tools.build import check_min_cppstd +from conan.tools.env import VirtualBuildEnv +from conan.tools.files import copy, get, rmdir, rename, replace_in_file, rm +from conan.tools.gnu import PkgConfigDeps +from conan.tools.layout import basic_layout +from conan.tools.meson import Meson, MesonToolchain +from conan.tools.microsoft import is_msvc +from conan.tools.scm import Version + +required_conan_version = ">=1.64.0 <2 || >=2.2.0" + + +class ThorvgConan(ConanFile): + name = "thorvg" + description = "ThorVG is a platform-independent portable library that allows for drawing vector-based scenes and animations." + license = "MIT" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/thorvg/thorvg" + topics = ("svg", "lottie", "animation", "graphics", "rendering") + package_type = "library" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + "with_engines": ['sw', 'gl_beta', 'wg_beta', "gl"], + "with_loaders": [False, 'tvg', 'svg', 'png', 'jpg', 'lottie', 'ttf', 'webp', 'all'], + "with_savers": [False, 'tvg', 'gif', 'all'], + "with_bindings": [False, 'capi', 'wasm_beta'], + "with_tools": [False, 'svg2tvg', 'svg2png', 'lottie2gif', 'all'], + "with_threads": [True, False], + "with_simd": [True, False], + "with_examples": [True, False], + "with_extra": [False, 'lottie_expressions'], + } + default_options = { + "shared": False, + "fPIC": True, + "with_engines": 'sw', + "with_loaders": 'all', + "with_savers": False, + "with_bindings": 'capi', + "with_tools": False, + "with_threads": True, + "with_simd": False, + "with_examples": False, + "with_extra": 'lottie_expressions', + } + # See more here: https://github.com/thorvg/thorvg/blob/main/meson_options.txt + options_description = { + "with_engines": "Enable Rasterizer Engine in thorvg", + "with_loaders": "Enable File Loaders in thorvg", + "with_savers": "Enable File Savers in thorvg", + "with_threads": "Enable the multi-threading task scheduler in thorvg", + "with_simd": "Enable CPU Vectorization(SIMD) in thorvg", + "with_bindings": "Enable API bindings", + "with_tools": "Enable building thorvg tools", + "with_examples": "Enable building examples", + "with_extra": "Enable support for exceptionally advanced features", + } + short_paths = True + + @property + def _min_cppstd(self): + return 14 + + @property + def _compilers_minimum_version(self): + return { + "gcc": "6", + "clang": "5", + "apple-clang": "10", + "Visual Studio": "15", + "msvc": "191", + } + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + + def layout(self): + basic_layout(self, src_folder="src") + + def validate(self): + if self.settings.compiler.get_safe("cppstd"): + check_min_cppstd(self, self._min_cppstd) + minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) + if minimum_version and Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration( + f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." + ) + + if is_msvc(self) and self.settings.build_type == "Debug": + raise ConanInvalidConfiguration( + f"{self.ref} doesn't support debug build on MSVC." + ) + + if Version(self.version) < "0.14.0" and self.options.with_engines in ["gl"]: + raise ConanInvalidConfiguration(f"{self.ref} doesn't support with_engines=gl, use with_engines=gl_beta instead") + if Version(self.version) >= "0.14.0" and self.options.with_engines in ["gl_beta"]: + raise ConanInvalidConfiguration(f"{self.ref} doesn't support with_engines=gl_beta, use with_engines=gl instead") + + def requirements(self): + loaders_opt = str(self.options.with_loaders) + if loaders_opt in ("all", "jpg"): + self.requires("libjpeg-turbo/3.0.2") + if loaders_opt in ("all", "png"): + self.requires("libpng/1.6.43") + if loaders_opt in ("all", "webp"): + self.requires("libwebp/1.4.0") + if self.settings.os == "Linux": + if self.options.with_engines in ["gl", "gl_beta"]: + self.requires("opengl/system") + + def build_requirements(self): + self.tool_requires("meson/[>=1.2.3 <2]") + if not self.conf.get("tools.gnu:pkg_config", default=False, check_type=str): + self.tool_requires("pkgconf/[>=2.2 <3]") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = MesonToolchain(self, backend=("vs" if is_msvc(self) else None)) + is_debug = self.settings.get_safe("build_type") == "Debug" + tc.project_options.update({ + "engines": str(self.options.with_engines), + "loaders": str(self.options.with_loaders) if self.options.with_loaders else '', + "savers": str(self.options.with_savers) if self.options.with_savers else '', + "bindings": str(self.options.with_bindings) if self.options.with_bindings else '', + "tools": str(self.options.with_tools )if self.options.with_tools else '', + "threads": bool(self.options.with_threads), + "examples": bool(self.options.with_examples), + "tests": False, + "log": is_debug, + }) + # Workaround to avoid: error D8016: '/O1' and '/RTC1' command-line options are incompatible + if is_msvc(self) and is_debug: + tc.project_options["optimization"] = "plain" + tc.project_options["simd"] = bool(self.options.with_simd) + if self.options.with_extra: + tc.project_options["extra"] = str(self.options.with_extra) + tc.generate() + tc = PkgConfigDeps(self) + tc.generate() + venv = VirtualBuildEnv(self) + venv.generate() + + def _patch_sources(self): + # Workaround to avoid: Stripping target 'src\\thorvg-0.dll'. + if is_msvc(self) and self.options.shared: + replace_in_file(self, os.path.join(self.source_folder, "meson.build"), ", 'strip=true'", "") + + # TODO: As OpenMP is tagged as "required: false", let's disable it for now to avoid extra flags and requirements injections. + if Version(self.version) >= "0.15.1" and self.options.with_threads: + # Notice that the use of disabler() is not working here. If it's used, there is no targets to build. + replace_in_file(self, os.path.join(self.source_folder, "src", "renderer", "sw_engine", "meson.build"), + "omp_dep = dependency('openmp', required: false)", + "omp_dep = []") + replace_in_file(self, os.path.join(self.source_folder, "src", "renderer", "sw_engine", "meson.build"), + "omp_dep.found()", + "false") + + def build(self): + self._patch_sources() + meson = Meson(self) + meson.configure() + meson.build() + + def package(self): + copy(self, pattern="LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) + meson = Meson(self) + meson.install() + rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) + rm(self, "*.pdb", os.path.join(self.package_folder, "bin")) + fix_apple_shared_install_name(self) + + if is_msvc(self) and not self.options.shared: + rename(self, os.path.join(self.package_folder, "lib", "libthorvg.a"), os.path.join(self.package_folder, "lib", "thorvg.lib")) + + def package_info(self): + self.cpp_info.libs = ["thorvg"] + + self.cpp_info.set_property("pkg_config_name", "libthorvg") + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.system_libs.extend(["pthread", "m"]) + if not self.options.shared: + self.cpp_info.defines = ["TVG_STATIC"] + else: + self.cpp_info.defines = ["TVG_EXPORT", "TVG_BUILD"] diff --git a/recipes/thorvg/all/test_package/CMakeLists.txt b/recipes/thorvg/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..f35032cc2fe13 --- /dev/null +++ b/recipes/thorvg/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) + +find_package(thorvg REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE thorvg::thorvg) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_14) diff --git a/recipes/thorvg/all/test_package/conanfile.py b/recipes/thorvg/all/test_package/conanfile.py new file mode 100644 index 0000000000000..ef5d7042163ec --- /dev/null +++ b/recipes/thorvg/all/test_package/conanfile.py @@ -0,0 +1,26 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/thorvg/all/test_package/test_package.cpp b/recipes/thorvg/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..9953a7b6e75e3 --- /dev/null +++ b/recipes/thorvg/all/test_package/test_package.cpp @@ -0,0 +1,32 @@ +#include "thorvg.h" + +int main() { + const int WIDTH = 800; + const int HEIGHT = 600; + + tvg::Initializer::init(tvg::CanvasEngine::Sw, 0); + + static uint32_t buffer[WIDTH * HEIGHT]; // canvas target buffer + + auto canvas = tvg::SwCanvas::gen(); // generate a canvas + canvas->target(buffer, WIDTH, WIDTH, HEIGHT, tvg::SwCanvas::ARGB8888); // buffer, stride, w, h, Colorspace + + auto rect = tvg::Shape::gen(); // generate a shape + rect->appendRect(50, 50, 200, 200, 20, 20); // define it as a rounded rectangle (x, y, w, h, rx, ry) + rect->fill(100, 100, 100, 255); // set its color (r, g, b, a) + canvas->push(std::move(rect)); // push the rectangle into the canvas + + auto circle = tvg::Shape::gen(); // generate a shape + circle->appendCircle(400, 400, 100, 100); // define it as a circle (cx, cy, rx, ry) + + auto fill = tvg::RadialGradient::gen(); // generate a radial gradient + fill->radial(400, 400, 150); // set the radial gradient geometry info (cx, cy, radius) + + tvg::Fill::ColorStop colorStops[2]; // gradient colors + colorStops[0] = {0.0, 255, 255, 255, 255}; // 1st color values (offset, r, g, b, a) + colorStops[1] = {1.0, 0, 0, 0, 255}; // 2nd color values (offset, r, g, b, a) + fill->colorStops(colorStops, 2); // set the gradient colors info + + circle->fill(std::move(fill)); // set the circle fill + canvas->push(std::move(circle)); // push the circle into the canvas +} diff --git a/recipes/thorvg/config.yml b/recipes/thorvg/config.yml new file mode 100644 index 0000000000000..664bb7f882f8e --- /dev/null +++ b/recipes/thorvg/config.yml @@ -0,0 +1,25 @@ +versions: + "0.15.3": + folder: all + "0.15.2": + folder: all + "0.15.1": + folder: all + "0.14.10": + folder: all + "0.14.6": + folder: all + "0.14.5": + folder: all + "0.14.4": + folder: all + "0.14.2": + folder: all + "0.14.1": + folder: all + "0.14.0": + folder: all + "0.13.8": + folder: all + "0.13.7": + folder: all diff --git a/recipes/thrift/all/conandata.yml b/recipes/thrift/all/conandata.yml index 57ad35a140baa..6ddf0c58f5a00 100644 --- a/recipes/thrift/all/conandata.yml +++ b/recipes/thrift/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.20.0": + url: "http://archive.apache.org/dist/thrift/0.20.0/thrift-0.20.0.tar.gz" + sha256: "b5d8311a779470e1502c027f428a1db542f5c051c8e1280ccd2163fa935ff2d6" "0.18.1": url: "http://archive.apache.org/dist/thrift/0.18.1/thrift-0.18.1.tar.gz" sha256: "04c6f10e5d788ca78e13ee2ef0d2152c7b070c0af55483d6b942e29cff296726" @@ -18,6 +21,10 @@ sources: url: "http://archive.apache.org/dist/thrift/0.14.1/thrift-0.14.1.tar.gz" sha256: "13da5e1cd9c8a3bb89778c0337cc57eb0c29b08f3090b41cf6ab78594b410ca5" patches: + "0.20.0": + - patch_file: "patches/cmake-0.16.0.patch" + patch_description: "use cci packages" + patch_type: "conan" "0.18.1": - patch_file: "patches/cmake-0.16.0.patch" patch_description: "use cci packages" diff --git a/recipes/thrift/all/conanfile.py b/recipes/thrift/all/conanfile.py index 7b6885cf89f45..97debbded3cd9 100644 --- a/recipes/thrift/all/conanfile.py +++ b/recipes/thrift/all/conanfile.py @@ -67,7 +67,7 @@ def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - self.requires("boost/1.84.0", transitive_headers=True) + self.requires("boost/1.85.0", transitive_headers=True) if self.options.with_openssl: self.requires("openssl/[>=1.1 <4]") if self.options.with_zlib: @@ -75,7 +75,7 @@ def requirements(self): if self.options.with_libevent: self.requires("libevent/2.1.12") if self.options.with_qt5: - self.requires("qt/5.15.12") + self.requires("qt/5.15.13") def build_requirements(self): if self._settings_build.os == "Windows": @@ -175,7 +175,6 @@ def package_info(self): self.cpp_info.components["libthrift"].set_property("pkg_config_name", "thrift") self.cpp_info.components["libthrift"].libs = [f"thrift{libsuffix}"] if self.settings.os == "Windows": - self.cpp_info.components["libthrift"].defines.append("NOMINMAX") if Version(self.version) >= "0.15.0": self.cpp_info.components["libthrift"].system_libs.append("shlwapi") elif self.settings.os in ["Linux", "FreeBSD"]: diff --git a/recipes/thrift/config.yml b/recipes/thrift/config.yml index 8ce3e9b3821f4..f54d46190d9d2 100644 --- a/recipes/thrift/config.yml +++ b/recipes/thrift/config.yml @@ -1,4 +1,6 @@ versions: + "0.20.0": + folder: all "0.18.1": folder: all "0.17.0": diff --git a/recipes/tidwall-neco/all/CMakeLists.txt b/recipes/tidwall-neco/all/CMakeLists.txt new file mode 100644 index 0000000000000..ee8e2e4c821d7 --- /dev/null +++ b/recipes/tidwall-neco/all/CMakeLists.txt @@ -0,0 +1,20 @@ +cmake_minimum_required(VERSION 3.15) +project(neco LANGUAGES C) + +include(GNUInstallDirs) + +add_library(neco ${TIDWALL_NECO_SRC_DIR}/neco.c) +target_include_directories(neco PRIVATE ${TIDWALL_NECO_SRC_DIR}) +set_target_properties(neco PROPERTIES + PUBLIC_HEADER ${TIDWALL_NECO_SRC_DIR}/neco.h + WINDOWS_EXPORT_ALL_SYMBOLS ON +) +target_compile_features(neco PRIVATE c_std_11) + +install( + TARGETS neco + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} +) diff --git a/recipes/tidwall-neco/all/conandata.yml b/recipes/tidwall-neco/all/conandata.yml new file mode 100644 index 0000000000000..683bfe9e9152a --- /dev/null +++ b/recipes/tidwall-neco/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "0.3.2": + url: "https://github.com/tidwall/neco/archive/refs/tags/v0.3.2.tar.gz" + sha256: "ae3cefa6217428e992da0b30f254502b9974079dd9973eee9c482ea89df3fcef" diff --git a/recipes/tidwall-neco/all/conanfile.py b/recipes/tidwall-neco/all/conanfile.py new file mode 100644 index 0000000000000..5aea18d3be4d2 --- /dev/null +++ b/recipes/tidwall-neco/all/conanfile.py @@ -0,0 +1,69 @@ +from conan import ConanFile +from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout +from conan.tools.files import copy, get +from conan.tools.microsoft import is_msvc +from conan.errors import ConanInvalidConfiguration +import os + +required_conan_version = ">=1.53.0" + +class TidwallNecoConan(ConanFile): + name = "tidwall-neco" + description = "Concurrency library for C (coroutines)" + license = "MIT" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/tidwall/neco" + topics = ("coroutine", "concurrency", "network") + package_type = "library" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + } + + def export_sources(self): + copy(self, "CMakeLists.txt", src=self.recipe_folder, dst=self.export_sources_folder) + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + self.settings.rm_safe("compiler.cppstd") + self.settings.rm_safe("compiler.libcxx") + + def layout(self): + cmake_layout(self, src_folder="src") + + def validate(self): + if is_msvc(self): + raise ConanInvalidConfiguration(f"{self.ref} does not support Visual Studio (yet).") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + tc.variables["TIDWALL_NECO_SRC_DIR"] = self.source_folder.replace("\\", "/") + tc.generate() + + def build(self): + cmake = CMake(self) + cmake.configure(build_script_folder=os.path.join(self.source_folder, os.pardir)) + cmake.build() + + def package(self): + copy(self, "LICENSE", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) + cmake = CMake(self) + cmake.install() + + def package_info(self): + self.cpp_info.libs = ["neco"] + if self.settings.os in ("FreeBSD", "Linux"): + self.cpp_info.system_libs = ["pthread", "dl"] diff --git a/recipes/tidwall-neco/all/test_package/CMakeLists.txt b/recipes/tidwall-neco/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..a57d060daf586 --- /dev/null +++ b/recipes/tidwall-neco/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES C) + +find_package(tidwall-neco REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.c) +target_link_libraries(${PROJECT_NAME} PRIVATE tidwall-neco::tidwall-neco) +target_compile_features(${PROJECT_NAME} PRIVATE c_std_11) diff --git a/recipes/tidwall-neco/all/test_package/conanfile.py b/recipes/tidwall-neco/all/test_package/conanfile.py new file mode 100644 index 0000000000000..fafba71d30d56 --- /dev/null +++ b/recipes/tidwall-neco/all/test_package/conanfile.py @@ -0,0 +1,26 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import CMake, cmake_layout +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeToolchain", "CMakeDeps", "VirtualRunEnv" + test_type = "explicit" + + def layout(self): + cmake_layout(self) + + def requirements(self): + self.requires(self.tested_reference_str) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/tidwall-neco/all/test_package/test_package.c b/recipes/tidwall-neco/all/test_package/test_package.c new file mode 100644 index 0000000000000..463b07f3d9439 --- /dev/null +++ b/recipes/tidwall-neco/all/test_package/test_package.c @@ -0,0 +1,13 @@ +#include + +// #define _GNU_SOURCE +#include "neco.h" + +void coroutine(int argc, void *argv[]) { + printf("main coroutine started\n"); +} + +int main(int argc, char *argv[]) { + neco_start(coroutine, 0); + return 0; +} diff --git a/recipes/tidwall-neco/config.yml b/recipes/tidwall-neco/config.yml new file mode 100644 index 0000000000000..f2fc85b835922 --- /dev/null +++ b/recipes/tidwall-neco/config.yml @@ -0,0 +1,3 @@ +versions: + "0.3.2": + folder: all diff --git a/recipes/tiledb/all/conandata.yml b/recipes/tiledb/all/conandata.yml new file mode 100644 index 0000000000000..9683a1cfcc4e0 --- /dev/null +++ b/recipes/tiledb/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "2.26.1": + url: "https://github.com/TileDB-Inc/TileDB/archive/refs/tags/2.26.1.tar.gz" + sha256: "f90461850c6f87f63fe77788d7932fd53a4d1de7e2ba7263f5e8f2fd1df23e38" diff --git a/recipes/tiledb/all/conanfile.py b/recipes/tiledb/all/conanfile.py new file mode 100644 index 0000000000000..3a434ad427fa5 --- /dev/null +++ b/recipes/tiledb/all/conanfile.py @@ -0,0 +1,275 @@ +import os + +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.build import check_min_cppstd, stdcpp_library +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.files import get, copy, rmdir, replace_in_file, save +from conan.tools.gnu import PkgConfigDeps +from conan.tools.scm import Version + +required_conan_version = ">=1.53.0" + +class TileDBConan(ConanFile): + name = "tiledb" + description = ("TileDB is a powerful engine for storing and accessing dense and sparse multi-dimensional arrays, " + "which can help you model any complex data efficiently.") + license = "MIT" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/TileDB-Inc/TileDB" + topics = ("data-science", "storage-engine", "s3", "sparse-data", "scientific-computing", "s3-storage", + "arrays", "data-analysis", "dataframes", "dense-data", "sparse-arrays") + + package_type = "library" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + "cpp_api": [True, False], + "s3": [True, False], + "azure": [True, False], + "gcs": [True, False], + "serialization": [True, False], + "webp": [True, False], + "tools": [True, False], + "remove_deprecations": [True, False], + "verbose": [True, False], + "stats": [True, False], + "experimental_features": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + "cpp_api": True, + "s3": False, + "azure": False, + "gcs": False, + "serialization": False, + "webp": True, + "tools": False, + "remove_deprecations": False, + "verbose": False, + "stats": True, + "experimental_features": False, + } + options_description = { + "cpp_api": "Enable building of the TileDB C++ API", + "s3": "Support AWS S3 Storage", + "azure": "Support Azure Blob Storage", + "gcs": "Support Google Cloud Storage", + "serialization": "Enable TileDB Cloud support by building with support for query serialization.", + "webp": "Support WebP compression", + "tools": "Build tiledb command-line tool", + "remove_deprecations": "Do not build deprecated APIs", + "verbose": "Print TileDB errors with verbosity", + "stats": "Enable internal TileDB statistics gathering", + "experimental_features": "Build and include experimental features", + } + + @property + def _min_cppstd(self): + return 20 + + @property + def _compilers_minimum_version(self): + # https://github.com/TileDB-Inc/TileDB/blob/2.21.0/doc/dev/BUILD.md#prerequisites + return { + "gcc": "10", + "clang": "10", + "apple-clang": "14", + "msvc": "192", + "Visual Studio": "16", + } + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + if self.options.serialization: + self.options["libcurl"].with_zstd = True + if self.options.azure: + self.options["azure-sdk-for-cpp"]["azure-storage-blobs"] = True + if self.options.s3: + self.options["aws-sdk-cpp"].s3 = True + self.options["aws-sdk-cpp"]["identity-management"] = True + self.options["aws-sdk-cpp"].sts = True + + def layout(self): + cmake_layout(self, src_folder="src") + + def requirements(self): + # TileDB has no transitive header deps + self.requires("bzip2/1.0.8") + self.requires("libxml2/[>=2.12.5 <3]") + self.requires("lz4/1.9.4") + self.requires("spdlog/1.14.1") + self.requires("xz_utils/[>=5.4.5 <6]") + self.requires("zlib/[>=1.2.11 <2]") + self.requires("zstd/[^1.5]") + if self.settings.os != "Windows": + self.requires("openssl/[>=1.1 <4]") + self.requires("libmagic/5.45") + if self.options.azure: + self.requires("azure-sdk-for-cpp/1.11.3") + if self.options.gcs: + self.requires("google-cloud-cpp/2.28.0") + if self.options.serialization: + self.requires("capnproto/1.0.2") + self.requires("libcurl/[>=7.78 <9]") + if self.options.s3: + self.requires("aws-sdk-cpp/1.11.352") + if self.options.tools: + self.requires("clipp/1.2.3") + if self.options.webp: + self.requires("libwebp/1.4.0") + + # TODO: unvendor + # - bitshuffle + # - blosc + # - boost::interprocess + # - nlohmann_json + # - tcb-span + + def validate(self): + if self.settings.compiler.cppstd: + check_min_cppstd(self, self._min_cppstd) + minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) + if minimum_version and Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration( + f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." + ) + + if self.options.serialization and not self.dependencies["libcurl"].options.with_zstd: + raise ConanInvalidConfiguration("TileDB serialization requires libcurl with with_zstd option enabled.") + if self.options.s3: + aws_opts = self.dependencies["aws-sdk-cpp"].options + if not (aws_opts.get_safe("s3") and aws_opts.get_safe("identity-management") and aws_opts.get_safe("sts")): + raise ConanInvalidConfiguration( + f"TileDB S3 support requires aws-sdk-cpp with 's3', 'identity-management' and 'sts' options enabled." + ) + + def build_requirements(self): + self.tool_requires("cmake/[>=3.21 <4]") + if not self.conf.get("tools.gnu:pkg_config", default=False, check_type=str): + self.tool_requires("pkgconf/[>=2.2 <3]") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + # https://github.com/TileDB-Inc/TileDB/blob/2.26.1/cmake/Options/BuildOptions.cmake + tc.cache_variables["BUILD_SHARED_LIBS"] = self.options.shared + tc.cache_variables["TILEDB_AZURE"] = self.options.azure + tc.cache_variables["TILEDB_CPP_API"] = self.options.cpp_api + tc.cache_variables["TILEDB_DISABLE_AUTO_VCPKG"] = True + tc.cache_variables["TILEDB_EXPERIMENTAL_FEATURES"] = self.options.experimental_features + tc.cache_variables["TILEDB_GCS"] = self.options.gcs + tc.cache_variables["TILEDB_INSTALL_LIBDIR"] = os.path.join(self.package_folder, "lib") + tc.cache_variables["TILEDB_REMOVE_DEPRECATIONS"] = self.options.remove_deprecations + tc.cache_variables["TILEDB_S3"] = self.options.s3 + tc.cache_variables["TILEDB_SERIALIZATION"] = self.options.serialization + tc.cache_variables["TILEDB_STATS"] = self.options.stats + tc.cache_variables["TILEDB_TESTS"] = False + tc.cache_variables["TILEDB_TOOLS"] = self.options.tools + tc.cache_variables["TILEDB_VERBOSE"] = self.options.verbose + tc.cache_variables["TILEDB_WEBP"] = self.options.webp + tc.cache_variables["TILEDB_WERROR"] = False + # Disable ExternalProject just in case + tc.cache_variables["FETCHCONTENT_FULLY_DISCONNECTED"] = True + tc.cache_variables["libmagic_DICTIONARY"] = os.path.join(self.dependencies["libmagic"].package_folder, "res", "magic.mgc").replace("\\", "/") + tc.generate() + + deps = CMakeDeps(self) + conan_to_cmake_name = { + "aws-sdk-cpp": "AWSSDK", + "azure-sdk-for-cpp": "azure-storage-blobs-cpp", + "bzip2": "BZip2", + "capnproto": "CapnProto", + "clipp": "clipp", + "google-cloud-cpp": "google_cloud_cpp_storage", + "libcurl": "CURL", + "libmagic": "unofficial-libmagic", + "libwebp": "WebP", + "libxml2": "LibXml2", + "lz4": "lz4", + "openssl": "OpenSSL", + "spdlog": "spdlog", + "zlib": "ZLIB", + "zstd": "zstd", + } + for conan_name, cmake_name in conan_to_cmake_name.items(): + deps.set_property(conan_name, "cmake_file_name", cmake_name) + + renamed_targets = { + "azure-sdk-for-cpp::azure-storage-blobs": "Azure::azure-storage-blobs", + "bzip2": "BZip2::BZip2", + "clipp": "clipp::clipp", + "google-cloud-cpp::storage": "google-cloud-cpp::storage", + "libmagic": "unofficial::libmagic::libmagic", + "libwebp::webp": "WebP::webp", + "libwebp::webpdecoder": "WebP::webpdecoder", + "libwebp::webpdemux": "WebP::webpdemux", + "libwebp::webpmux": "WebP::libwebpmux", + "lz4": "LZ4::LZ4", + "zlib": "ZLIB::ZLIB", + "zstd": "Zstd::Zstd", + } + for component, new_target_name in renamed_targets.items(): + deps.set_property(component, "cmake_target_name", new_target_name) + + deps.generate() + + deps = PkgConfigDeps(self) + deps.generate() + + def _patch_sources(self): + # Disable examples + replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), + "add_subdirectory(examples)", "") + replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), + "add_subdirectory(experimental/experimental_examples)", "") + # Don't actually run vcpkg + save(self, os.path.join(self.source_folder, "cmake", "Options", "TileDBToolchain.cmake"), "") + # No such target defined in CCI + if self.options.serialization: + capnproto_bindir = self.dependencies['capnproto'].cpp_info.bindir + replace_in_file(self, os.path.join(self.source_folder, "tiledb", "CMakeLists.txt"), + "set(CAPNP_PLUGIN_DIR $)", + f'set(CAPNP_PLUGIN_DIR "{capnproto_bindir}")') + + def build(self): + self._patch_sources() + cmake = CMake(self) + cmake.configure() + cmake.build() + + def package(self): + copy(self, "LICENSE", self.source_folder, os.path.join(self.package_folder, "licenses")) + cmake = CMake(self) + cmake.install() + # tools are not installed by CMake + if self.options.tools: + suffix = ".exe" if self.settings.os == "Windows" else "" + copy(self, f"tiledb{suffix}", + src=os.path.join(self.build_folder, "tools"), + dst=os.path.join(self.package_folder, "bin"), + keep_path=False) + rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) + rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) + + def package_info(self): + self.cpp_info.set_property("cmake_file_name", "TileDB") + suffix = "shared" if self.options.shared else "static" + self.cpp_info.set_property("cmake_target_name", f"TileDB::tiledb_{suffix}") + self.cpp_info.set_property("cmake_target_aliases", ["TileDB::tiledb"]) + self.cpp_info.set_property("pkg_config_name", "tiledb") + + self.cpp_info.libs = ["tiledb"] + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.system_libs.extend(["m", "pthread", "dl"]) + if stdcpp_library(self): + self.cpp_info.system_libs.append(stdcpp_library(self)) diff --git a/recipes/tiledb/all/test_package/CMakeLists.txt b/recipes/tiledb/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..6de1a132987e0 --- /dev/null +++ b/recipes/tiledb/all/test_package/CMakeLists.txt @@ -0,0 +1,14 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package CXX C) + +find_package(TileDB REQUIRED CONFIG) + +if (TILEDB_CPP_API) + add_executable(${PROJECT_NAME}_cpp test_package.cpp) + target_link_libraries(${PROJECT_NAME}_cpp PRIVATE TileDB::tiledb) + target_compile_features(${PROJECT_NAME}_cpp PRIVATE cxx_std_17) +endif() + +add_executable(${PROJECT_NAME}_c test_package.c) +target_link_libraries(${PROJECT_NAME}_c PRIVATE TileDB::tiledb) +target_compile_features(${PROJECT_NAME}_c PRIVATE c_std_99) diff --git a/recipes/tiledb/all/test_package/conanfile.py b/recipes/tiledb/all/test_package/conanfile.py new file mode 100644 index 0000000000000..e12ef4e9a27cb --- /dev/null +++ b/recipes/tiledb/all/test_package/conanfile.py @@ -0,0 +1,42 @@ +import os + +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake, CMakeToolchain +from conan.tools.files import save, load + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str, run=True) + + def layout(self): + cmake_layout(self) + + def generate(self): + tc = CMakeToolchain(self) + tc.variables["TILEDB_CPP_API"] = self.dependencies["tiledb"].options.cpp_api + tc.generate() + save(self, os.path.join(self.build_folder, "have_tools"), str(self.dependencies["tiledb"].options.tools)) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package_cpp") + if os.path.exists(bin_path): + self.run(bin_path, env="conanrun") + + bin_path = os.path.join(self.cpp.build.bindir, "test_package_c") + self.run(bin_path, env="conanrun") + + have_tools = load(self, os.path.join(self.build_folder, "have_tools")) == "True" + if have_tools: + self.run("tiledb help info", env="conanrun") diff --git a/recipes/tiledb/all/test_package/test_package.c b/recipes/tiledb/all/test_package/test_package.c new file mode 100644 index 0000000000000..399f427b0fe86 --- /dev/null +++ b/recipes/tiledb/all/test_package/test_package.c @@ -0,0 +1,15 @@ +#include + +#include + +int main() { + tiledb_ctx_t* ctx; + tiledb_ctx_alloc(NULL, &ctx); + tiledb_ctx_free(&ctx); + + int32_t major, minor, rev; + tiledb_version(&major, &minor, &rev); + printf("TileDB version: %d.%d.%d\n", major, minor, rev); + + return 0; +} diff --git a/recipes/tiledb/all/test_package/test_package.cpp b/recipes/tiledb/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..a8b39dd993dc1 --- /dev/null +++ b/recipes/tiledb/all/test_package/test_package.cpp @@ -0,0 +1,14 @@ +#include + +#include + +int main() { + tiledb::Context ctx; + + auto version = tiledb::version(); + std::cout << "TileDB version: " + << std::get<0>(version) << "." << std::get<1>(version) << "." << std::get<2>(version) + << std::endl; + + return 0; +} diff --git a/recipes/tiledb/config.yml b/recipes/tiledb/config.yml new file mode 100644 index 0000000000000..a6f63ba7f5ece --- /dev/null +++ b/recipes/tiledb/config.yml @@ -0,0 +1,3 @@ +versions: + "2.26.1": + folder: all diff --git a/recipes/tinyad/all/conandata.yml b/recipes/tinyad/all/conandata.yml new file mode 100644 index 0000000000000..a2c45fe6ad86b --- /dev/null +++ b/recipes/tinyad/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "cci.20240718": + url: "https://github.com/patr-schm/TinyAD/archive/29417031c185b6dc27b6d4b684550d844459b735.tar.gz" + sha256: "0458b9aabd31bff079aa5e9e559bd4753744c29f9ffce9d06a6510409c92e221" \ No newline at end of file diff --git a/recipes/tinyad/all/conanfile.py b/recipes/tinyad/all/conanfile.py new file mode 100644 index 0000000000000..a71ac5080cf3f --- /dev/null +++ b/recipes/tinyad/all/conanfile.py @@ -0,0 +1,68 @@ +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.build import check_min_cppstd +from conan.tools.files import copy, get +from conan.tools.microsoft import is_msvc +from conan.tools.scm import Version +import os + +required_conan_version = ">=1.52.0" + + +class TinyADConan(ConanFile): + name = "tinyad" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/patr-schm/TinyAD" + description = "TinyAD is a C++ header-only library for second-order automatic differentiation" + topics = ("algebra", "linear-algebra", "optimization", "autodiff", "numerical", "header-only") + package_type = "header-library" + license = ("MIT") + settings = "os", "arch", "compiler", "build_type" + + def requirements(self): + self.requires("eigen/3.4.0") + + @property + def _compilers_minimum_version(self): + return { + "gcc": "7", + "clang": "7", + "apple-clang": "12.0", + "Visual Studio": "15", + "msvc": "191", + } + + def validate(self): + required_min_cppstd = "17" + if self.settings.compiler.get_safe("cppstd"): + check_min_cppstd(self, required_min_cppstd) + + minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) + if minimum_version and Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration( + f"{self.ref} requires C++{required_min_cppstd}, which your compiler does not support." + ) + + def package_id(self): + self.info.clear() + + def source(self): + get(self, **self.conan_data["sources"][self.version], + destination=self.source_folder, strip_root=True) + + def package(self): + # The project has a CMakelists.txt file, but it doesn't have "install" logic + # so we just copy the headers to the package folder + copy(self, "include/**", src=self.source_folder, dst=self.package_folder) + copy(self, "LICENSE", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) + + def package_info(self): + self.cpp_info.set_property("cmake_file_name", "TinyAD") + self.cpp_info.set_property("cmake_target_name", "TinyAD") + + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] + + if is_msvc(self): + # https://github.com/patr-schm/TinyAD/blob/29417031c185b6dc27b6d4b684550d844459b735/CMakeLists.txt#L35 + self.cpp_info.cxxflags.append("/bigobj") diff --git a/recipes/tinyad/all/test_package/CMakeLists.txt b/recipes/tinyad/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..3deb656633e62 --- /dev/null +++ b/recipes/tinyad/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.1) +project(test_package LANGUAGES CXX) + +find_package(TinyAD REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE TinyAD) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) diff --git a/recipes/tinyad/all/test_package/conanfile.py b/recipes/tinyad/all/test_package/conanfile.py new file mode 100644 index 0000000000000..c0ba081cf41ea --- /dev/null +++ b/recipes/tinyad/all/test_package/conanfile.py @@ -0,0 +1,25 @@ +import os + +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import CMake, cmake_layout + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + self.run(os.path.join(self.cpp.build.bindirs[0], "test_package"), env="conanrun") diff --git a/recipes/tinyad/all/test_package/test_package.cpp b/recipes/tinyad/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..2b49f0bdc7ad9 --- /dev/null +++ b/recipes/tinyad/all/test_package/test_package.cpp @@ -0,0 +1,21 @@ +#include +#include +#include + +int main(void) { + // Choose autodiff scalar type for 3 variables + using ADouble = TinyAD::Double<3>; + + // Init a 3D vector of active variables and a 3D vector of passive variables + Eigen::Vector3 x = ADouble::make_active({0.0, -1.0, 1.0}); + Eigen::Vector3 y(2.0, 3.0, 5.0); + + // Compute angle using Eigen functions and retrieve gradient and Hessian w.r.t. x + ADouble angle = acos(x.dot(y) / (x.norm() * y.norm())); + Eigen::Vector3d g = angle.grad; + Eigen::Matrix3d H = angle.Hess; + + std::cout << "TinyAD test package successful \n"; + + return 0; +} diff --git a/recipes/tinyad/config.yml b/recipes/tinyad/config.yml new file mode 100644 index 0000000000000..ade632d071b81 --- /dev/null +++ b/recipes/tinyad/config.yml @@ -0,0 +1,3 @@ +versions: + "cci.20240718": + folder: all diff --git a/recipes/tinycolormap/all/conandata.yml b/recipes/tinycolormap/all/conandata.yml new file mode 100644 index 0000000000000..771edaa798dc0 --- /dev/null +++ b/recipes/tinycolormap/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "cci.20230223": + url: "https://github.com/yuki-koyama/tinycolormap/archive/0f62abbc269d9677829083d4d563643830ac7fb9.zip" + sha256: "f736d7b76ea07e43da6c6905d891bc58ef512a794bbc0ef3ba9b593b4c1e2d63" diff --git a/recipes/tinycolormap/all/conanfile.py b/recipes/tinycolormap/all/conanfile.py new file mode 100644 index 0000000000000..be4fc0dfc05d4 --- /dev/null +++ b/recipes/tinycolormap/all/conanfile.py @@ -0,0 +1,64 @@ +import os + +from conan import ConanFile +from conan.tools.build import check_min_cppstd +from conan.tools.files import copy, get +from conan.tools.layout import basic_layout + +required_conan_version = ">=1.52.0" + + +class TinycolormapConan(ConanFile): + name = "tinycolormap" + description = "A header-only, single-file library for colormaps written in C++11" + license = "MIT" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/yuki-koyama/tinycolormap" + topics = ("color", "colormap", "visualization", "header-only") + package_type = "header-library" + + settings = "os", "arch", "compiler", "build_type" + no_copy_source = True + options = { + "with_eigen": [True, False], + "with_qt": [True, False], + } + default_options = { + "with_eigen": False, + "with_qt": False, + } + + def layout(self): + basic_layout(self, src_folder="src") + + def package_id(self): + self.info.clear() + + def requirements(self): + if self.options.with_eigen: + self.requires("eigen/3.4.0") + if self.options.with_qt: + # Only Qt5 is supported + self.requires("qt/5.15.13") + + def validate(self): + if self.settings.compiler.get_safe("cppstd"): + check_min_cppstd(self, 11) + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def package(self): + copy(self, "LICENSE", self.source_folder, os.path.join(self.package_folder, "licenses")) + copy(self, "*.hpp", os.path.join(self.source_folder, "include"), os.path.join(self.package_folder, "include")) + + def package_info(self): + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] + + if self.options.with_eigen: + self.cpp_info.defines.append("TINYCOLORMAP_WITH_EIGEN") + self.cpp_info.requires.append("eigen::eigen") + if self.options.with_qt: + self.cpp_info.defines.append("TINYCOLORMAP_WITH_QT5") + self.cpp_info.requires.append("qt::qtGui") diff --git a/recipes/tinycolormap/all/test_package/CMakeLists.txt b/recipes/tinycolormap/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..cafa69c0c2ce2 --- /dev/null +++ b/recipes/tinycolormap/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) + +find_package(tinycolormap REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE tinycolormap::tinycolormap) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) diff --git a/recipes/tinycolormap/all/test_package/conanfile.py b/recipes/tinycolormap/all/test_package/conanfile.py new file mode 100644 index 0000000000000..0a808db45f245 --- /dev/null +++ b/recipes/tinycolormap/all/test_package/conanfile.py @@ -0,0 +1,27 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake +import os + + +# It will become the standard on Conan 2.x +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def layout(self): + cmake_layout(self) + + def requirements(self): + self.requires(self.tested_reference_str) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/tinycolormap/all/test_package/test_package.cpp b/recipes/tinycolormap/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..fdc0a6b320ab7 --- /dev/null +++ b/recipes/tinycolormap/all/test_package/test_package.cpp @@ -0,0 +1,10 @@ +#include + +#include + +int main() { + double value = 0.75; + auto color = tinycolormap::GetColor(value, tinycolormap::ColormapType::Viridis); + std::cout << "Viridis RGB values at " << value << ": " + << (int)color.ri() << " " << (int)color.gi() << " " << (int)color.bi() << std::endl; +} diff --git a/recipes/tinycolormap/config.yml b/recipes/tinycolormap/config.yml new file mode 100644 index 0000000000000..5ebaf8fdf738e --- /dev/null +++ b/recipes/tinycolormap/config.yml @@ -0,0 +1,3 @@ +versions: + "cci.20230223": + folder: all diff --git a/recipes/tinyexr/all/test_package/conanfile.py b/recipes/tinyexr/all/test_package/conanfile.py index 5a5dc0862d479..e845ae751a301 100644 --- a/recipes/tinyexr/all/test_package/conanfile.py +++ b/recipes/tinyexr/all/test_package/conanfile.py @@ -23,5 +23,4 @@ def build(self): def test(self): if can_run(self): bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") - img_path = os.path.join(self.source_folder, "test.exr") - self.run(f"{bin_path} {img_path}", env="conanrun") + self.run(bin_path, env="conanrun") diff --git a/recipes/tinyexr/all/test_package/test.exr b/recipes/tinyexr/all/test_package/test.exr deleted file mode 100644 index 5cc69a90c12ce..0000000000000 Binary files a/recipes/tinyexr/all/test_package/test.exr and /dev/null differ diff --git a/recipes/tinyexr/all/test_package/test_package.cpp b/recipes/tinyexr/all/test_package/test_package.cpp index 2cd0713e457c8..b1d9264dbf3c1 100644 --- a/recipes/tinyexr/all/test_package/test_package.cpp +++ b/recipes/tinyexr/all/test_package/test_package.cpp @@ -11,25 +11,15 @@ int main(int argc, const char *argv[]) { - if (argc < 2) { - std::cerr << "Need at least one argument\n"; - } - float* out; int width; int height; const char* err = nullptr; - int ret = LoadEXR(&out, &width, &height, argv[1], &err); + int ret = LoadEXR(&out, &width, &height, "non-real-file.exr", &err); - if (ret == TINYEXR_SUCCESS) { - free(out); - } else { - if(err) { - std::cerr << err << std::endl; - } else { - std::cerr << "Unknown error." << std::endl; - } + if (ret != TINYEXR_SUCCESS) { + std::cout << "Test message\n"; // Always prints } return 0; diff --git a/recipes/tinyexr/all/test_v1_package/conanfile.py b/recipes/tinyexr/all/test_v1_package/conanfile.py index bd607d6c6515a..20d4d2e28d57e 100644 --- a/recipes/tinyexr/all/test_v1_package/conanfile.py +++ b/recipes/tinyexr/all/test_v1_package/conanfile.py @@ -14,5 +14,4 @@ def build(self): def test(self): if not cross_building(self): bin_path = os.path.join("bin", "test_package") - img_path = os.path.join(self.source_folder, os.pardir, "test_package", "test.exr") - self.run(f"{bin_path} {img_path}", run_environment=True) + self.run(bin_path, run_environment=True) diff --git a/recipes/tinygltf/all/conandata.yml b/recipes/tinygltf/all/conandata.yml index fb20b704f6ed3..105809b76f50e 100644 --- a/recipes/tinygltf/all/conandata.yml +++ b/recipes/tinygltf/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.9.0": + url: "https://github.com/syoyo/tinygltf/archive/v2.9.0.tar.gz" + sha256: "76c4da3fcd664ccf1b3d35f1d934dd19820141c8705c4966d841176c4c10a2e9" "2.8.19": url: "https://github.com/syoyo/tinygltf/archive/v2.8.19.tar.gz" sha256: "9e3f6206c6e922c7482e1b4612b62c5cddb7e053b6690fa20edfa5d97805053b" diff --git a/recipes/tinygltf/all/test_package/box01.glb b/recipes/tinygltf/all/test_package/box01.glb deleted file mode 100644 index 7477e897f06a5..0000000000000 Binary files a/recipes/tinygltf/all/test_package/box01.glb and /dev/null differ diff --git a/recipes/tinygltf/all/test_package/conanfile.py b/recipes/tinygltf/all/test_package/conanfile.py index 0708ee77c3850..0a6bc68712d90 100644 --- a/recipes/tinygltf/all/test_package/conanfile.py +++ b/recipes/tinygltf/all/test_package/conanfile.py @@ -23,5 +23,4 @@ def build(self): def test(self): if can_run(self): bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") - glb_path = os.path.join(self.source_folder, "box01.glb") - self.run(f"{bin_path} {glb_path}", env="conanrun") + self.run(bin_path, env="conanrun") diff --git a/recipes/tinygltf/all/test_package/test_package.cpp b/recipes/tinygltf/all/test_package/test_package.cpp index ade21796f6efe..0dd78b403c96f 100644 --- a/recipes/tinygltf/all/test_package/test_package.cpp +++ b/recipes/tinygltf/all/test_package/test_package.cpp @@ -8,29 +8,13 @@ #include int main(int argc, char **argv) { - if (argc < 2) { - std::cerr << "Need at least one argument\n"; - return 1; - } tinygltf::Model model; tinygltf::TinyGLTF loader; std::string err; std::string warn; - bool ret = loader.LoadBinaryFromFile(&model, &err, &warn, argv[1]); - - if (!warn.empty()) { - printf("Warn: %s\n", warn.c_str()); - } - - if (!err.empty()) { - printf("Err: %s\n", err.c_str()); - } - - if (!ret) { - printf("Failed to parse glTF\n"); - return -1; - } + bool ret = loader.LoadBinaryFromFile(&model, &err, &warn, "non_existent_file.glb"); + printf("Test %d\n", ret); return 0; } diff --git a/recipes/tinygltf/all/test_v1_package/conanfile.py b/recipes/tinygltf/all/test_v1_package/conanfile.py index 6d85d0b397c56..38f4483872d47 100644 --- a/recipes/tinygltf/all/test_v1_package/conanfile.py +++ b/recipes/tinygltf/all/test_v1_package/conanfile.py @@ -14,5 +14,4 @@ def build(self): def test(self): if not tools.cross_building(self): bin_path = os.path.join("bin", "test_package") - glb_path = os.path.join(self.source_folder, os.pardir, "test_package", "box01.glb") - self.run(f"{bin_path} {glb_path}", run_environment=True) + self.run(bin_path, run_environment=True) diff --git a/recipes/tinygltf/config.yml b/recipes/tinygltf/config.yml index 0589bcf5301f7..3eba51a5b7276 100644 --- a/recipes/tinygltf/config.yml +++ b/recipes/tinygltf/config.yml @@ -1,4 +1,6 @@ versions: + "2.9.0": + folder: all "2.8.19": folder: all "2.8.13": diff --git a/recipes/tixi3/all/conandata.yml b/recipes/tixi3/all/conandata.yml index 2336f6ccbdc16..0af8f2d8ae5cf 100644 --- a/recipes/tixi3/all/conandata.yml +++ b/recipes/tixi3/all/conandata.yml @@ -4,6 +4,10 @@ sources: url: "https://github.com/DLR-SC/tixi/archive/refs/tags/v3.3.0.tar.gz" patches: "3.3.0": + - patch_file: "patches/0001-missing-stdlib-include.patch" + patch_description: "fix missing stdlib include" + patch_type: "bugfix" + patch_source: "https://github.com/DLR-SC/tixi/pull/225" - patch_file: "patches/link_curl.patch" patch_description: "Fix CMake target name for libcurl" patch_type: "conan" diff --git a/recipes/tixi3/all/conanfile.py b/recipes/tixi3/all/conanfile.py index 9ec42f58000e7..d67da63a2bb15 100644 --- a/recipes/tixi3/all/conanfile.py +++ b/recipes/tixi3/all/conanfile.py @@ -33,8 +33,8 @@ def generate(self): deps.generate() def requirements(self): - self.requires("libxml2/2.11.6") - self.requires("libxslt/1.1.37") + self.requires("libxml2/[>=2.12.5 <3]") + self.requires("libxslt/1.1.42") self.requires("libcurl/[>=7.78.0 <9]") def layout(self): diff --git a/recipes/tixi3/all/patches/0001-missing-stdlib-include.patch b/recipes/tixi3/all/patches/0001-missing-stdlib-include.patch new file mode 100644 index 0000000000000..1c8e8d048f4f9 --- /dev/null +++ b/recipes/tixi3/all/patches/0001-missing-stdlib-include.patch @@ -0,0 +1,88 @@ +From 53b324c41133ac72b36f2bcda0b75c2bf2f3bff0 Mon Sep 17 00:00:00 2001 +From: mayeut +Date: Sat, 20 Apr 2024 13:10:18 +0200 +Subject: [PATCH] fix issues with latest version of libxml2 + +--- + src/tixiImpl.c | 1 + + src/tixiInternal.c | 2 +- + src/tixiUtils.c | 1 + + src/uidHelper.c | 1 + + src/webMethods.c | 2 ++ + src/xpathFunctions.c | 1 + + 6 files changed, 7 insertions(+), 1 deletion(-) + +diff --git a/src/tixiImpl.c b/src/tixiImpl.c +index f9e08b9..aa306d1 100644 +--- a/src/tixiImpl.c ++++ b/src/tixiImpl.c +@@ -27,6 +27,7 @@ + #include + #include + #include ++#include + + #include "libxml/parser.h" + #include "libxml/xpath.h" +diff --git a/src/tixiInternal.c b/src/tixiInternal.c +index 5bf0712..b399b4d 100644 +--- a/src/tixiInternal.c ++++ b/src/tixiInternal.c +@@ -46,7 +46,7 @@ + + extern void printMsg(MessageType type, const char* message, ...); + +-void xmlStructuredErrorHandler(void * userData, xmlErrorPtr error) { ++void xmlStructuredErrorHandler(void * userData, xmlError const* error) { + printMsg(MESSAGETYPE_ERROR, "%s:%i: %s", error->file, error->line, error->message); + } + +diff --git a/src/tixiUtils.c b/src/tixiUtils.c +index 834be5d..bd42fc8 100644 +--- a/src/tixiUtils.c ++++ b/src/tixiUtils.c +@@ -32,6 +32,7 @@ + #include + #include + #endif ++#include + + extern void printMsg(MessageType type, const char* message, ...); + +diff --git a/src/uidHelper.c b/src/uidHelper.c +index 9c7a7bd..841774d 100644 +--- a/src/uidHelper.c ++++ b/src/uidHelper.c +@@ -17,6 +17,7 @@ + */ + #include "uidHelper.h" + #include "tixiInternal.h" ++#include + + extern void printMsg(MessageType type, const char* message, ...); + +diff --git a/src/webMethods.c b/src/webMethods.c +index f8372e9..16e6411 100644 +--- a/src/webMethods.c ++++ b/src/webMethods.c +@@ -25,6 +25,8 @@ + #include + #include + ++#include ++ + extern void printMsg(MessageType type, const char* message, ...); + + void* myrealloc(void* ptr, size_t size) +diff --git a/src/xpathFunctions.c b/src/xpathFunctions.c +index 25442f6..69ce60e 100644 +--- a/src/xpathFunctions.c ++++ b/src/xpathFunctions.c +@@ -21,6 +21,7 @@ + #include "libxml/xpathInternals.h" + + #include ++#include + + extern void printMsg(MessageType type, const char* message, ...); + diff --git a/recipes/tl-ranges/all/conandata.yml b/recipes/tl-ranges/all/conandata.yml new file mode 100644 index 0000000000000..52e4715a40621 --- /dev/null +++ b/recipes/tl-ranges/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "cci.20221207": + url: "https://github.com/TartanLlama/ranges/archive/361dae81e48ea9d0099e8783b56b903c2a6cd01c.tar.gz" + sha256: "9174e368d1f6e89d2ab5b059454dc402e68afdfe6d9bf5376d6634dab7aa2a36" diff --git a/recipes/tl-ranges/all/conanfile.py b/recipes/tl-ranges/all/conanfile.py new file mode 100644 index 0000000000000..a6ce8136be512 --- /dev/null +++ b/recipes/tl-ranges/all/conanfile.py @@ -0,0 +1,65 @@ +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.build import check_min_cppstd +from conan.tools.files import copy, get +from conan.tools.layout import basic_layout +from conan.tools.scm import Version +import os + +required_conan_version = ">=1.52.0" + +class TLRangesConan(ConanFile): + name = "tl-ranges" + description = "Ranges that didn't make C++20" + license = "CC0-1.0" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/TartanLlama/ranges" + topics = ("ranges", "views", "header-only") + package_type = "header-library" + settings = "os", "arch", "compiler", "build_type" + no_copy_source = True + + @property + def _min_cppstd(self): + return 20 + + @property + def _compilers_minimum_version(self): + return { + "gcc": "11", + "clang": "15", + "apple-clang": "14", + "Visual Studio": "16", + "msvc": "192", + } + + def layout(self): + basic_layout(self, src_folder="src") + + def package_id(self): + self.info.clear() + + def validate(self): + if self.settings.compiler.get_safe("cppstd"): + check_min_cppstd(self, self._min_cppstd) + minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) + if minimum_version and Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration( + f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." + ) + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def package(self): + copy(self, "COPYING", self.source_folder, os.path.join(self.package_folder, "licenses")) + copy( + self, + "*.hpp", + os.path.join(self.source_folder, "include"), + os.path.join(self.package_folder, "include"), + ) + + def package_info(self): + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] diff --git a/recipes/tl-ranges/all/test_package/CMakeLists.txt b/recipes/tl-ranges/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..03b4aa241a9d0 --- /dev/null +++ b/recipes/tl-ranges/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) + +find_package(tl-ranges REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE tl-ranges::tl-ranges) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_20) diff --git a/recipes/tl-ranges/all/test_package/conanfile.py b/recipes/tl-ranges/all/test_package/conanfile.py new file mode 100644 index 0000000000000..3a91c9439218e --- /dev/null +++ b/recipes/tl-ranges/all/test_package/conanfile.py @@ -0,0 +1,26 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def layout(self): + cmake_layout(self) + + def requirements(self): + self.requires(self.tested_reference_str) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/tl-ranges/all/test_package/test_package.cpp b/recipes/tl-ranges/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..76c10d34a8bc4 --- /dev/null +++ b/recipes/tl-ranges/all/test_package/test_package.cpp @@ -0,0 +1,12 @@ +#include +#include + +#include "tl/enumerate.hpp" + +int main() { + std::vector data = {1, 2, 3, 4, 5}; + + for (auto&& [index, element] : data | tl::views::enumerate) { + std::cout << index << " " << element << '\n'; + } +} diff --git a/recipes/tl-ranges/config.yml b/recipes/tl-ranges/config.yml new file mode 100644 index 0000000000000..676cc76a125dc --- /dev/null +++ b/recipes/tl-ranges/config.yml @@ -0,0 +1,3 @@ +versions: + "cci.20221207": + folder: all diff --git a/recipes/tmx/all/conandata.yml b/recipes/tmx/all/conandata.yml index 015638445fd3e..8a82786790fb4 100644 --- a/recipes/tmx/all/conandata.yml +++ b/recipes/tmx/all/conandata.yml @@ -1,4 +1,13 @@ sources: + "1.10.0": + url: "https://github.com/baylej/tmx/archive/refs/tags/tmx_1.10.0.tar.gz" + sha256: "8ee42d1728c567d6047a58b2624c39c8844aaf675c470f9f284c4ed17e94188f" "1.4.0": url: "https://github.com/baylej/tmx/archive/refs/tags/tmx_1.4.0.tar.gz" sha256: "5ab52e72976141260edd1b15ea34e1626c0f4ba9b8d2afe7f4d68b51fc9fedf7" +patches: + "1.4.0": + - patch_file: "patches/0001-missing-stdlib-include.patch" + patch_description: "fix missing stdlib include" + patch_type: "bugfix" + patch_source: "https://github.com/baylej/tmx/commit/2d20ed631618f5e9ca89d90147aab8157989f5da.patch" diff --git a/recipes/tmx/all/conanfile.py b/recipes/tmx/all/conanfile.py index a45d56f04f970..30a73f62e1cfe 100644 --- a/recipes/tmx/all/conanfile.py +++ b/recipes/tmx/all/conanfile.py @@ -1,10 +1,10 @@ from conan import ConanFile from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout -from conan.tools.files import copy, get, rmdir, save +from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rmdir, save import os import textwrap -required_conan_version = ">=1.51.1" +required_conan_version = ">=1.53.0" class TmxConan(ConanFile): @@ -15,6 +15,7 @@ class TmxConan(ConanFile): homepage = "https://github.com/baylej/tmx" url = "https://github.com/conan-io/conan-center-index" + package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], @@ -29,30 +30,24 @@ class TmxConan(ConanFile): "with_zstd": False, } + def export_sources(self): + export_conandata_patches(self) + def config_options(self): if self.settings.os == "Windows": del self.options.fPIC def configure(self): if self.options.shared: - try: - del self.options.fPIC - except Exception: - pass - try: - del self.settings.compiler.libcxx - except Exception: - pass - try: - del self.settings.compiler.cppstd - except Exception: - pass + self.options.rm_safe("fPIC") + self.settings.rm_safe("compiler.libcxx") + self.settings.rm_safe("compiler.cppstd") def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - self.requires("libxml2/2.11.6") + self.requires("libxml2/[>=2.12.5 <3]") if self.options.with_zlib: self.requires("zlib/[>=1.2.11 <2]") if self.options.with_zstd: @@ -75,6 +70,7 @@ def generate(self): deps.generate() def build(self): + apply_conandata_patches(self) cmake = CMake(self) cmake.configure() cmake.build() diff --git a/recipes/tmx/all/patches/0001-missing-stdlib-include.patch b/recipes/tmx/all/patches/0001-missing-stdlib-include.patch new file mode 100644 index 0000000000000..9c45635658dfa --- /dev/null +++ b/recipes/tmx/all/patches/0001-missing-stdlib-include.patch @@ -0,0 +1,22 @@ +From 2d20ed631618f5e9ca89d90147aab8157989f5da Mon Sep 17 00:00:00 2001 +From: Connor Rigby +Date: Thu, 18 Jan 2024 18:40:53 -0700 +Subject: [PATCH] tmx_mem: add stdlib.h for free and realloc + +Signed-off-by: Connor Rigby +--- + src/tmx_mem.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/tmx_mem.c b/src/tmx_mem.c +index 5ff31c9..b421af6 100644 +--- a/src/tmx_mem.c ++++ b/src/tmx_mem.c +@@ -2,6 +2,7 @@ + Node allocation + */ + ++#include + #include + + #include diff --git a/recipes/tmx/config.yml b/recipes/tmx/config.yml index c957e4bc2d3c7..2403f62fecbf1 100644 --- a/recipes/tmx/config.yml +++ b/recipes/tmx/config.yml @@ -1,3 +1,5 @@ versions: + "1.10.0": + folder: all "1.4.0": folder: all diff --git a/recipes/toml11/all/conandata.yml b/recipes/toml11/all/conandata.yml index 4af534aa325d5..20b0be495cd07 100644 --- a/recipes/toml11/all/conandata.yml +++ b/recipes/toml11/all/conandata.yml @@ -1,28 +1,16 @@ sources: + "4.2.0": + url: "https://github.com/ToruNiina/toml11/archive/refs/tags/v4.2.0.tar.gz" + sha256: "9287971cd4a1a3992ef37e7b95a3972d1ae56410e7f8e3f300727ab1d6c79c2c" + "4.1.0": + url: "https://github.com/ToruNiina/toml11/archive/refs/tags/v4.1.0.tar.gz" + sha256: "fb4c02cc708ae28e6fc3496514e3625e4b6738ed4ce40897710ca4d7a29de4f7" + "4.0.3": + url: "https://github.com/ToruNiina/toml11/archive/refs/tags/v4.0.3.tar.gz" + sha256: "c8cbc7839cb3f235153045ce550e559f55a04554dfcab8743ba8a1e8ef6a54bf" + "4.0.1": + url: "https://github.com/ToruNiina/toml11/archive/refs/tags/v4.0.1.tar.gz" + sha256: "96965cb00ca7757c611c169cd5a6fb15736eab1cd1c1a88aaa62ad9851d926aa" "3.8.1": url: "https://github.com/ToruNiina/toml11/archive/refs/tags/v3.8.1.tar.gz" sha256: "6a3d20080ecca5ea42102c078d3415bef80920f6c4ea2258e87572876af77849" - "3.8.0": - url: "https://github.com/ToruNiina/toml11/archive/refs/tags/v3.8.0.tar.gz" - sha256: "36ce64b09f9151b57ba1970f12a591006fcae17b751ba011314c1f5518e77bc7" - "3.7.1": - url: "https://github.com/ToruNiina/toml11/archive/refs/tags/v3.7.1.tar.gz" - sha256: "afeaa9aa0416d4b6b2cd3897ca55d9317084103077b32a852247d8efd4cf6068" - "3.7.0": - url: "https://github.com/ToruNiina/toml11/archive/v3.7.0.tar.gz" - sha256: "a0b6bec77c0e418eea7d270a4437510884f2fe8f61e7ab121729624f04c4b58e" - "3.6.1": - url: "https://github.com/ToruNiina/toml11/archive/refs/tags/v3.6.1.tar.gz" - sha256: "ca4c390ed8da0d77ae6eca30e70ab0bf5cc92adfc1bc2f71a2066bc5656d8d96" - "3.6.0": - url: "https://github.com/ToruNiina/toml11/archive/v3.6.0.tar.gz" - sha256: "39e8d651db346ae8c7e3b39d6338a37232b9af3bba36ade45b241bf105c2226c" - "3.5.0": - url: "https://github.com/ToruNiina/toml11/archive/v3.5.0.tar.gz" - sha256: "fc613874c6e80dc740134a7353cf23c7f834b59cd601af84ab535ee16a53b1c3" - "3.4.0": - url: "https://github.com/ToruNiina/toml11/archive/v3.4.0.tar.gz" - sha256: "bc6d733efd9216af8c119d8ac64a805578c79cc82b813e4d1d880ca128bd154d" - "3.1.0": - url: "https://github.com/ToruNiina/toml11/archive/v3.1.0.tar.gz" - sha256: "3a118f32e5343998f37be9807c72fd11c3168fe12a5b1abfdc0f1e60de6380a4" diff --git a/recipes/toml11/all/conanfile.py b/recipes/toml11/all/conanfile.py index 7d770d91572aa..a610df26ea139 100644 --- a/recipes/toml11/all/conanfile.py +++ b/recipes/toml11/all/conanfile.py @@ -2,6 +2,7 @@ from conan.tools.build import check_min_cppstd from conan.tools.files import copy, get from conan.tools.layout import basic_layout +from conan.tools.scm import Version import os required_conan_version = ">=1.50.0" @@ -32,13 +33,19 @@ def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) def package(self): - copy(self, "toml.hpp", src=self.source_folder, dst=os.path.join(self.package_folder, "include", "toml11")) - copy(self, "*.hpp", src=os.path.join(self.source_folder, "toml"), dst=os.path.join(self.package_folder, "include", "toml11", "toml")) + if Version(self.version) < "4.0.0": + copy(self, "toml.hpp", src=self.source_folder, dst=os.path.join(self.package_folder, "include", "toml11")) + copy(self, "*.hpp", src=os.path.join(self.source_folder, "toml"), dst=os.path.join(self.package_folder, "include", "toml11", "toml")) + else: + copy(self, "*.hpp", src=os.path.join(self.source_folder, "include"), dst=os.path.join(self.package_folder, "include")) + copy(self, "LICENSE", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) def package_info(self): + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] + self.cpp_info.set_property("cmake_file_name", "toml11") self.cpp_info.set_property("cmake_target_name", "toml11::toml11") - self.cpp_info.bindirs = [] + self.cpp_info.includedirs.append(os.path.join("include", "toml11")) - self.cpp_info.libdirs = [] diff --git a/recipes/toml11/config.yml b/recipes/toml11/config.yml index cc2a74e6a20e3..43dd6c9456dcb 100644 --- a/recipes/toml11/config.yml +++ b/recipes/toml11/config.yml @@ -1,19 +1,11 @@ versions: - "3.8.1": - folder: all - "3.8.0": - folder: all - "3.7.1": + "4.2.0": folder: all - "3.7.0": + "4.1.0": folder: all - "3.6.1": + "4.0.3": folder: all - "3.6.0": + "4.0.1": folder: all - "3.5.0": - folder: all - "3.4.0": - folder: all - "3.1.0": + "3.8.1": folder: all diff --git a/recipes/tomlplusplus/all/conanfile.py b/recipes/tomlplusplus/all/conanfile.py index c7d9d9ea44bf5..4743d8a6d4255 100644 --- a/recipes/tomlplusplus/all/conanfile.py +++ b/recipes/tomlplusplus/all/conanfile.py @@ -21,6 +21,12 @@ class TomlPlusPlusConan(ConanFile): license = "MIT" package_type = "header-library" settings = "os", "arch", "compiler", "build_type" + options = { + "exceptions": [True, False, None] + } + default_options = { + "exceptions": None + } no_copy_source = True @property @@ -73,3 +79,8 @@ def package_info(self): self.cpp_info.set_property("cmake_target_name", "tomlplusplus::tomlplusplus") self.cpp_info.bindirs = [] self.cpp_info.libdirs = [] + # Casting as a String because None value would not be properly handled, this is a PackageOption, not the value itself + # which `is` never None + if str(self.options.exceptions) != "None": + define_value = "1" if self.options.exceptions is True else "0" + self.cpp_info.defines.append(f"TOML_EXCEPTIONS={define_value}") diff --git a/recipes/tomlplusplus/all/test_package/test_package.cpp b/recipes/tomlplusplus/all/test_package/test_package.cpp index d50b3c6469741..96107c1712ae1 100644 --- a/recipes/tomlplusplus/all/test_package/test_package.cpp +++ b/recipes/tomlplusplus/all/test_package/test_package.cpp @@ -7,21 +7,25 @@ using namespace std::string_view_literals; int main(int argc, char* argv[]) { auto config = toml::parse_file(argv[1]); + // Important: this cast will convert from parse_result which is sometimes defined as a table + // and sometimes defined as it's own class that is castable to a table&. + auto& table = static_cast(config); // get key-value pairs - std::string_view library_name = config["library"]["name"].value_or(""sv); - std::string_view library_author = config["library"]["authors"][0].value_or(""sv); - int64_t depends_on_cpp_version = config["dependencies"]["cpp"].value_or(0); + std::string_view library_name = table["library"]["name"].value_or(""sv); + std::string_view library_author = table["library"]["authors"][0].value_or(""sv); + int64_t depends_on_cpp_version = table["dependencies"]["cpp"].value_or(0); // modify the data - config.insert_or_assign("alternatives", toml::array{ + table.insert_or_assign("alternatives", toml::array{ "cpptoml", "toml11", "Boost.TOML" }); + table.insert_or_assign("exceptions", TOML_EXCEPTIONS==1); // iterate & visit over the data - for (auto&& [k, v] : config) + for (auto&& [k, v] : table) { v.visit([](auto& node) noexcept { @@ -30,9 +34,9 @@ int main(int argc, char* argv[]) { } // re-serialize as TOML - std::cout << config << std::endl; + std::cout << table << std::endl; // re-serialize as JSON - std::cout << toml::json_formatter{ config } << std::endl; + std::cout << toml::json_formatter{ table } << std::endl; return 0; } diff --git a/recipes/tomlplusplus/all/test_package/test_package_multi.cpp b/recipes/tomlplusplus/all/test_package/test_package_multi.cpp index df195938cfdee..436a7391f96b1 100644 --- a/recipes/tomlplusplus/all/test_package/test_package_multi.cpp +++ b/recipes/tomlplusplus/all/test_package/test_package_multi.cpp @@ -7,21 +7,25 @@ using namespace std::string_view_literals; int main(int argc, char* argv[]) { auto config = toml::parse_file(argv[1]); + // Important: this cast will convert from parse_result which is sometimes defined as a table + // and sometimes defined as it's own class that is castable to a table&. + auto& table = static_cast(config); // get key-value pairs - std::string_view library_name = config["library"]["name"].value_or(""sv); - std::string_view library_author = config["library"]["authors"][0].value_or(""sv); - int64_t depends_on_cpp_version = config["dependencies"]["cpp"].value_or(0); + std::string_view library_name = table["library"]["name"].value_or(""sv); + std::string_view library_author = table["library"]["authors"][0].value_or(""sv); + int64_t depends_on_cpp_version = table["dependencies"]["cpp"].value_or(0); // modify the data - config.insert_or_assign("alternatives", toml::array{ + table.insert_or_assign("alternatives", toml::array{ "cpptoml", "toml11", "Boost.TOML" }); + table.insert_or_assign("exceptions", TOML_EXCEPTIONS==1); // iterate & visit over the data - for (auto&& [k, v] : config) + for (auto&& [k, v] : table) { v.visit([](auto& node) noexcept { @@ -30,9 +34,9 @@ int main(int argc, char* argv[]) { } // re-serialize as TOML - std::cout << config << std::endl; + std::cout << table << std::endl; // re-serialize as JSON - std::cout << toml::json_formatter{ config } << std::endl; + std::cout << toml::json_formatter{ table } << std::endl; return 0; } diff --git a/recipes/toon/all/conanfile.py b/recipes/toon/all/conanfile.py index 49e7347dc80b4..6756336186e83 100644 --- a/recipes/toon/all/conanfile.py +++ b/recipes/toon/all/conanfile.py @@ -3,7 +3,7 @@ from conan import ConanFile from conan.errors import ConanInvalidConfiguration from conan.tools.build import check_min_cppstd -from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get +from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, replace_in_file from conan.tools.layout import basic_layout from conan.tools.scm import Version @@ -22,6 +22,13 @@ class ToonConan(ConanFile): settings = "os", "arch", "compiler", "build_type" exports_sources = ["config.hh"] + options = { + "with_lapack": [True, False] + } + default_options = { + "with_lapack": True + } + @property def _min_cppstd(self): return 14 @@ -43,7 +50,8 @@ def layout(self): basic_layout(self, src_folder="src") def requirements(self): - self.requires("openblas/0.3.26", options={"build_lapack": True}) + if self.options.with_lapack: + self.requires("openblas/0.3.26", options={"build_lapack": True}) def package_id(self): self.info.clear() @@ -57,8 +65,8 @@ def validate(self): f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." ) - if not self.dependencies["openblas"].options.build_lapack: - raise ConanInvalidConfiguration("TooN requires LAPACK support in OpenBLAS") + if self.options.with_lapack and not self.dependencies["openblas"].options.build_lapack: + raise ConanInvalidConfiguration(f"{self.ref} requires LAPACK support in OpenBLAS with -o='openblas/*:build_lapack=True'") def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) @@ -74,6 +82,14 @@ def package(self): copy(self, "config.hh", self.export_sources_folder, os.path.join(self.package_folder, "include", "TooN", "internal")) + if not self.options.with_lapack: + replace_in_file( + self, + os.path.join(self.package_folder, "include", "TooN", "internal", "config.hh"), + "define TOON_USE_LAPACK", + "undef TOON_USE_LAPACK" + ) + def package_info(self): self.cpp_info.set_property("pkg_config_name", "TooN") diff --git a/recipes/toon/all/test_package/CMakeLists.txt b/recipes/toon/all/test_package/CMakeLists.txt index d0e7f8aeeb811..28a1d29b7ba57 100644 --- a/recipes/toon/all/test_package/CMakeLists.txt +++ b/recipes/toon/all/test_package/CMakeLists.txt @@ -6,4 +6,7 @@ pkg_check_modules(TooN REQUIRED IMPORTED_TARGET TooN) add_executable(${PROJECT_NAME} test_package.cpp) target_link_libraries(${PROJECT_NAME} PRIVATE PkgConfig::TooN) +if (WITH_LAPACK) + target_compile_definitions(${PROJECT_NAME} PRIVATE "WITH_LAPACK") +endif () target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_14) diff --git a/recipes/toon/all/test_package/conanfile.py b/recipes/toon/all/test_package/conanfile.py index 0ded7848c2ace..cfe5e425874fc 100644 --- a/recipes/toon/all/test_package/conanfile.py +++ b/recipes/toon/all/test_package/conanfile.py @@ -1,12 +1,12 @@ from conan import ConanFile from conan.tools.build import can_run -from conan.tools.cmake import cmake_layout, CMake +from conan.tools.cmake import cmake_layout, CMake, CMakeToolchain import os class TestPackageConan(ConanFile): settings = "os", "arch", "compiler", "build_type" - generators = "PkgConfigDeps", "CMakeToolchain", "VirtualRunEnv" + generators = "PkgConfigDeps", "VirtualRunEnv" test_type = "explicit" def layout(self): @@ -19,6 +19,11 @@ def build_requirements(self): if not self.conf.get("tools.gnu:pkg_config", default=False, check_type=str): self.tool_requires("pkgconf/2.1.0") + def generate(self): + tc = CMakeToolchain(self) + tc.variables["WITH_LAPACK"] = self.dependencies[self.tested_reference_str].options.with_lapack + tc.generate() + def build(self): cmake = CMake(self) cmake.configure() diff --git a/recipes/toon/all/test_package/test_package.cpp b/recipes/toon/all/test_package/test_package.cpp index ac702cc9b641d..da2c3199f9737 100644 --- a/recipes/toon/all/test_package/test_package.cpp +++ b/recipes/toon/all/test_package/test_package.cpp @@ -1,15 +1,38 @@ +#include +#include + +#ifdef USE_LAPACK #include +#endif #include #include using namespace TooN; -int main() { +void test_determinant() { Matrix<3> t = Data( 1, 0.5, 0.5, 0.5, 2, 0.7, 0.5, 0.7, 3); - Lapack_Cholesky<3> chol(t); - std::cout << chol.determinant() << std::endl; + std::cout << "determinant: " << determinant(t) << std::endl; +} + +#ifdef USE_LAPACK +void test_lapack() { + Matrix<3> t = Data( + 1, 0.5, 0.5, + 0.5, 2, 0.7, + 0.5, 0.7, 3); + Lapack_Cholesky<3> chol(t); + std::cout << "Lapack_Cholesky determinat: " << chol.determinant() << std::endl; +} +#endif + +int main() { + test_determinant(); + +#ifdef USE_LAPACK + test_lapack(); +#endif } diff --git a/recipes/tracy/all/conandata.yml b/recipes/tracy/all/conandata.yml index de70002df8416..b98d6d618bb5d 100644 --- a/recipes/tracy/all/conandata.yml +++ b/recipes/tracy/all/conandata.yml @@ -1,4 +1,10 @@ sources: + "0.11.1": + url: "https://github.com/wolfpld/tracy/archive/refs/tags/v0.11.1.tar.gz" + sha256: "2c11ca816f2b756be2730f86b0092920419f3dabc7a7173829ffd897d91888a1" + "0.11.0": + url: "https://github.com/wolfpld/tracy/archive/refs/tags/v0.11.0.tar.gz" + sha256: "b591ef2820c5575ccbf17e2e7a1dc1f6b9a2708f65bfd00f4ebefad2a1ccf830" "0.10": url: "https://github.com/wolfpld/tracy/archive/refs/tags/v0.10.tar.gz" sha256: "a76017d928f3f2727540fb950edd3b736caa97b12dbb4e5edce66542cbea6600" diff --git a/recipes/tracy/all/conanfile.py b/recipes/tracy/all/conanfile.py index a056814ff0165..a83ee515f3fc9 100644 --- a/recipes/tracy/all/conanfile.py +++ b/recipes/tracy/all/conanfile.py @@ -1,8 +1,10 @@ from conan import ConanFile from conan.tools.build import check_min_cppstd from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout -from conan.tools.files import copy, get, rmdir +from conan.tools.gnu import PkgConfigDeps +from conan.tools.files import copy, get, rmdir, replace_in_file from conan.tools.scm import Version +from conan.errors import ConanInvalidConfiguration import os required_conan_version = ">=1.53.0" @@ -11,10 +13,11 @@ class TracyConan(ConanFile): name = "tracy" description = "C++ frame profiler" - topics = ("profiler", "performance", "gamedev") - homepage = "https://github.com/wolfpld/tracy" - url = "https://github.com/conan-io/conan-center-index" license = ["BSD-3-Clause"] + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/wolfpld/tracy" + topics = ("profiler", "performance", "gamedev") + package_type = "library" settings = "os", "arch", "compiler", "build_type" # Existing CMake tracy options with default value @@ -40,6 +43,10 @@ class TracyConan(ConanFile): "fibers": ([True, False], False), "no_crash_handler": ([True, False], False), "timer_fallback": ([True, False], False), + "libunwind_backtrace": ([True, False], False), + "symbol_offline_resolve": ([True, False], False), + "libbacktrace_elf_dynload_support": ([True, False], False), + "verbose": ([True, False], False), } options = { "shared": [True, False], @@ -67,6 +74,19 @@ def config_options(self): del self._tracy_options["no_crash_handler"] del self._tracy_options["timer_fallback"] + if Version(self.version) < "0.11.0": + self.options.rm_safe("libunwind_backtrace") + self.options.rm_safe("symbol_offline_resolve") + self.options.rm_safe("libbacktrace_elf_dynload_support") + + del self._tracy_options["libunwind_backtrace"] + del self._tracy_options["symbol_offline_resolve"] + del self._tracy_options["libbacktrace_elf_dynload_support"] + + if Version(self.version) < "0.11.1": + self.options.rm_safe("verbose") + del self._tracy_options["verbose"] + def configure(self): if self.options.shared: self.options.rm_safe("fPIC") @@ -74,13 +94,20 @@ def configure(self): def layout(self): cmake_layout(self, src_folder="src") + def requirements(self): + if self.options.get_safe("libunwind_backtrace"): + self.requires("libunwind/1.8.1", transitive_headers=True, transitive_libs=True) + def validate(self): if self.info.settings.compiler.get_safe("cppstd"): check_min_cppstd(self, 11) + # libunwind_backtrace is not supported in 0.11.0. https://github.com/wolfpld/tracy/pull/841 + if Version(self.version) == "0.11.0" and self.options.get_safe("libunwind_backtrace"): + raise ConanInvalidConfiguration(f"libunwind_backtrace is not supported in {self.ref}") + def source(self): - get(self, **self.conan_data["sources"][self.version], - destination=self.source_folder, strip_root=True) + get(self, **self.conan_data["sources"][self.version], strip_root=True) def generate(self): tc = CMakeToolchain(self) @@ -91,6 +118,9 @@ def generate(self): opt = f"TRACY_{opt.upper()}" tc.variables[opt] = switch tc.generate() + if self.options.get_safe("libunwind_backtrace"): + deps = PkgConfigDeps(self) + deps.generate() def build(self): cmake = CMake(self) @@ -113,10 +143,19 @@ def package_info(self): self.cpp_info.components["tracyclient"].defines.append( "TRACY_IMPORTS") if self.settings.os in ["Linux", "FreeBSD"]: - self.cpp_info.components["tracyclient"].system_libs.append( - "pthread") + self.cpp_info.components["tracyclient"].system_libs.extend([ + "pthread", + "m" + ]) if self.settings.os == "Linux": self.cpp_info.components["tracyclient"].system_libs.append("dl") + if self.settings.os == "Windows": + self.cpp_info.components["tracyclient"].system_libs.extend([ + "dbghelp", + "ws2_32" + ]) + if self.options.get_safe("libunwind_backtrace"): + self.cpp_info.components["tracyclient"].requires.append("libunwind::libunwind") # Tracy CMake adds options set to ON as public for opt in self._tracy_options.keys(): diff --git a/recipes/tracy/config.yml b/recipes/tracy/config.yml index 7f42fe99a398a..01f7199be9c6a 100644 --- a/recipes/tracy/config.yml +++ b/recipes/tracy/config.yml @@ -1,4 +1,8 @@ versions: + "0.11.1": + folder: all + "0.11.0": + folder: all "0.10": folder: all "0.9.1": diff --git a/recipes/trantor/all/conandata.yml b/recipes/trantor/all/conandata.yml index 8d7d3d5b8bb82..8d5dd0ad82696 100644 --- a/recipes/trantor/all/conandata.yml +++ b/recipes/trantor/all/conandata.yml @@ -1,4 +1,16 @@ sources: + "1.5.22": + url: "https://github.com/an-tao/trantor/archive/v1.5.22.tar.gz" + sha256: "2f870b016a592228d617ef51eec4e9a9ab7dc56c066923af9bf6dd42fefb63de" + "1.5.21": + url: "https://github.com/an-tao/trantor/archive/v1.5.21.tar.gz" + sha256: "c267e8d3657a85751554a6877efd1199f6766a9fd6418d2c72839ad0a8943988" + "1.5.20": + url: "https://github.com/an-tao/trantor/archive/v1.5.20.tar.gz" + sha256: "4d3b98c228aafde1001cff581cf8d1a4a9f71f7b2a85a28978b560aefc21c038" + "1.5.19": + url: "https://github.com/an-tao/trantor/archive/v1.5.19.tar.gz" + sha256: "a2f55a98fd4b0737ba0e2cd77d2f237253e607b2047071be04a9ea76587bb608" "1.5.16": url: "https://github.com/an-tao/trantor/archive/v1.5.16.tar.gz" sha256: "ef6f4d9c855ea7823dd9bfb094e852d23450b5fc149936f09964d19cb34741e9" @@ -11,22 +23,23 @@ sources: "1.5.13": url: "https://github.com/an-tao/trantor/archive/v1.5.13.tar.gz" sha256: "36f02302bff3ffa8d2b1bff29f451d7a11d215a43963fb95aa543b555de2f9bf" - "1.5.12": - url: "https://github.com/an-tao/trantor/archive/v1.5.12.tar.gz" - sha256: "3389a2ace83fdc0df7e3e7f9cd9fa9b774f8054889a13a73777c71e2d8e2f364" - "1.5.11": - url: "https://github.com/an-tao/trantor/archive/v1.5.11.tar.gz" - sha256: "3cff9653380f65acaa6ffa191620a2783e866a4552c3408a6919759ce4cfc1dc" - "1.5.10": - url: "https://github.com/an-tao/trantor/archive/v1.5.10.tar.gz" - sha256: "2d47775b3091a1a103bea46f5da017dc03c39883f8d717cf6ba24bdcdf01a15d" - "1.5.8": - url: "https://github.com/an-tao/trantor/archive/v1.5.8.tar.gz" - sha256: "705ec0176681be5c99fcc7af37416ece9d65ff4d907bca764cb11471b104fbf8" - "1.5.7": - url: "https://github.com/an-tao/trantor/archive/v1.5.7.tar.gz" - sha256: "42576563afbf1e58c7d68f758cf3fca4d193496d4e3f82c80069d8389a7839d5" patches: + "1.5.22": + - patch_file: "patches/1.5.19-0001-disable-werror.patch" + patch_description: "disable -Werror for gcc5" + patch_type: "portability" + "1.5.21": + - patch_file: "patches/1.5.19-0001-disable-werror.patch" + patch_description: "disable -Werror for gcc5" + patch_type: "portability" + "1.5.20": + - patch_file: "patches/1.5.19-0001-disable-werror.patch" + patch_description: "disable -Werror for gcc5" + patch_type: "portability" + "1.5.19": + - patch_file: "patches/1.5.19-0001-disable-werror.patch" + patch_description: "disable -Werror for gcc5" + patch_type: "portability" "1.5.16": - patch_file: "patches/1.5.15-0001-disable-werror.patch" patch_description: "disable -Werror for gcc5" @@ -43,27 +56,3 @@ patches: - patch_file: "patches/1.5.12-0001-disable-werror.patch" patch_description: "disable -Werror for gcc5" patch_type: "portability" - "1.5.12": - - patch_file: "patches/1.5.12-0001-disable-werror.patch" - patch_description: "disable -Werror for gcc5" - patch_type: "portability" - "1.5.11": - - patch_file: "patches/1.5.6-0001-include-cstdint.patch" - patch_description: "include cstdint for uint8_t, intmax_t" - patch_type: "portability" - patch_source: "https://github.com/an-tao/trantor/commit/e8e3887435dcfb310263c588743be1b3746193be" - "1.5.10": - - patch_file: "patches/1.5.6-0001-include-cstdint.patch" - patch_description: "include cstdint for uint8_t, intmax_t" - patch_type: "portability" - patch_source: "https://github.com/an-tao/trantor/commit/e8e3887435dcfb310263c588743be1b3746193be" - "1.5.8": - - patch_file: "patches/1.5.6-0001-include-cstdint.patch" - patch_description: "include cstdint for uint8_t, intmax_t" - patch_type: "portability" - patch_source: "https://github.com/an-tao/trantor/commit/e8e3887435dcfb310263c588743be1b3746193be" - "1.5.7": - - patch_file: "patches/1.5.6-0001-include-cstdint.patch" - patch_description: "include cstdint for uint8_t, intmax_t" - patch_type: "portability" - patch_source: "https://github.com/an-tao/trantor/commit/e8e3887435dcfb310263c588743be1b3746193be" diff --git a/recipes/trantor/all/conanfile.py b/recipes/trantor/all/conanfile.py index 7b8288e622c8a..0f9e11378b1a8 100644 --- a/recipes/trantor/all/conanfile.py +++ b/recipes/trantor/all/conanfile.py @@ -93,8 +93,7 @@ def source(self): def generate(self): tc = CMakeToolchain(self) # TODO: support other tls providers - if Version(self.version) >= "1.5.12": - tc.variables["TRANTOR_USE_TLS"] = "openssl" + tc.variables["TRANTOR_USE_TLS"] = "openssl" tc.variables["BUILD_C-ARES"] = self.options.with_c_ares tc.variables["USE_SPDLOG"] = self.options.get_safe("with_spdlog") tc.generate() diff --git a/recipes/trantor/all/patches/1.5.19-0001-disable-werror.patch b/recipes/trantor/all/patches/1.5.19-0001-disable-werror.patch new file mode 100644 index 0000000000000..c627d69cd2495 --- /dev/null +++ b/recipes/trantor/all/patches/1.5.19-0001-disable-werror.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index a0b10de..b2331dc 100755 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -76,7 +76,7 @@ if(NOT + "Windows" + AND CMAKE_CXX_COMPILER_ID MATCHES Clang|GNU + ) +- target_compile_options(${PROJECT_NAME} PRIVATE -Wall -Wextra -Werror) ++ target_compile_options(${PROJECT_NAME} PRIVATE -Wall -Wextra) + endif() + + if(${CMAKE_SYSTEM_NAME} STREQUAL "Haiku") diff --git a/recipes/trantor/all/patches/1.5.6-0001-include-cstdint.patch b/recipes/trantor/all/patches/1.5.6-0001-include-cstdint.patch deleted file mode 100644 index f910402545ffa..0000000000000 --- a/recipes/trantor/all/patches/1.5.6-0001-include-cstdint.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff --git a/trantor/utils/MsgBuffer.h b/trantor/utils/MsgBuffer.h -index 29817f6..f1d677e 100644 ---- a/trantor/utils/MsgBuffer.h -+++ b/trantor/utils/MsgBuffer.h -@@ -18,6 +18,7 @@ - #include - #include - #include -+#include - #include - #include - #include -diff --git a/trantor/utils/Utilities.cc b/trantor/utils/Utilities.cc -index 978dac8..0611e20 100644 ---- a/trantor/utils/Utilities.cc -+++ b/trantor/utils/Utilities.cc -@@ -25,6 +25,7 @@ - #include - #endif // __cplusplus - #endif // _WIN32 -+#include - - namespace trantor - { diff --git a/recipes/trantor/config.yml b/recipes/trantor/config.yml index be5d52dcb95bc..1869cd2282d5e 100644 --- a/recipes/trantor/config.yml +++ b/recipes/trantor/config.yml @@ -1,19 +1,17 @@ versions: - "1.5.16": + "1.5.22": folder: "all" - "1.5.15": + "1.5.21": folder: "all" - "1.5.14": - folder: "all" - "1.5.13": + "1.5.20": folder: "all" - "1.5.12": + "1.5.19": folder: "all" - "1.5.11": + "1.5.16": folder: "all" - "1.5.10": + "1.5.15": folder: "all" - "1.5.8": + "1.5.14": folder: "all" - "1.5.7": + "1.5.13": folder: "all" diff --git a/recipes/tree-gen/all/conandata.yml b/recipes/tree-gen/all/conandata.yml index 71aa893da1723..ff188eda8fa4f 100644 --- a/recipes/tree-gen/all/conandata.yml +++ b/recipes/tree-gen/all/conandata.yml @@ -1,4 +1,10 @@ sources: + "1.0.9": + url: "https://github.com/QuTech-Delft/tree-gen/archive/refs/tags/1.0.9.tar.gz" + sha256: "4ae8bd44f281ec76f25ac6f8228586467f7c7b2b9f67c4dc38ca524fb4e94d3a" + "1.0.8": + url: "https://github.com/QuTech-Delft/tree-gen/archive/refs/tags/1.0.8.tar.gz" + sha256: "a840f1da2fa377d2d791885d83b95dc15f081b308208d3497c395721488a4130" "1.0.7": url: "https://github.com/QuTech-Delft/tree-gen/archive/refs/tags/1.0.7.tar.gz" sha256: "bd27c88d789efe1d187846d3b819fbaa1ba3a520d6d4181d1216c4a2e73e4e85" diff --git a/recipes/tree-gen/all/conanfile.py b/recipes/tree-gen/all/conanfile.py index e2afb05918b37..7c2572f700bf5 100644 --- a/recipes/tree-gen/all/conanfile.py +++ b/recipes/tree-gen/all/conanfile.py @@ -60,7 +60,7 @@ def layout(self): def build_requirements(self): if self._should_build_test: - self.test_requires("gtest/1.14.0") + self.test_requires("gtest/1.15.0") self.tool_requires("m4/1.4.19") if self.settings.os == "Windows": self.tool_requires("winflexbison/2.5.24") @@ -76,7 +76,10 @@ def validate(self): raise ConanInvalidConfiguration(f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support.") def requirements(self): - self.requires("fmt/10.2.1", transitive_headers=True) + if Version(self.version) < "1.0.8": + self.requires("fmt/10.2.1", transitive_headers=True) + else: + self.requires("fmt/11.0.2", transitive_headers=True) self.requires("range-v3/0.12.0", transitive_headers=True) def source(self): diff --git a/recipes/tree-gen/config.yml b/recipes/tree-gen/config.yml index 4028d61266d40..afebf2e48e20c 100644 --- a/recipes/tree-gen/config.yml +++ b/recipes/tree-gen/config.yml @@ -1,4 +1,8 @@ versions: + "1.0.9": + folder: all + "1.0.8": + folder: all "1.0.7": folder: all "1.0.6": diff --git a/recipes/tree-sitter-c/all/CMakeLists.txt b/recipes/tree-sitter-c/all/CMakeLists.txt index a028ec4e4627c..afdc4445b1ec2 100644 --- a/recipes/tree-sitter-c/all/CMakeLists.txt +++ b/recipes/tree-sitter-c/all/CMakeLists.txt @@ -1,12 +1,11 @@ cmake_minimum_required(VERSION 3.0) -project(tree-sitter-c C) +project(tree-sitter-c LANGUAGES C) find_package(tree-sitter REQUIRED CONFIG) include(GenerateExportHeader) file(WRITE api.h [[ #pragma once -#include #include "tree_sitter_c_export.h" #ifdef __cplusplus diff --git a/recipes/tree-sitter-c/all/conandata.yml b/recipes/tree-sitter-c/all/conandata.yml index f225285a8fae5..32f5e8ac891a6 100644 --- a/recipes/tree-sitter-c/all/conandata.yml +++ b/recipes/tree-sitter-c/all/conandata.yml @@ -1,4 +1,10 @@ sources: + "0.23.1": + url: "https://github.com/tree-sitter/tree-sitter-c/archive/refs/tags/v0.23.1.tar.gz" + sha256: "8f90f481c28a45c7dcba84d05fc07853df043ff813868cdfa074a3835e89467a" + "0.20.7": + url: "https://github.com/tree-sitter/tree-sitter-c/archive/refs/tags/v0.20.7.tar.gz" + sha256: "00abd71259093983fc7e2b51f3efc724ccab3e69af3a37d3cdd0a2a01d703061" "0.20.3": url: "https://github.com/tree-sitter/tree-sitter-c/archive/refs/tags/v0.20.3.tar.gz" sha256: "8c72a765230324f2b64e9ed66e027daf1a2ed24dde5fbf21398ad8ff7fca2a2d" diff --git a/recipes/tree-sitter-c/all/conanfile.py b/recipes/tree-sitter-c/all/conanfile.py index 9f73c2c805dce..f0bb475259e82 100644 --- a/recipes/tree-sitter-c/all/conanfile.py +++ b/recipes/tree-sitter-c/all/conanfile.py @@ -9,10 +9,10 @@ class TreeSitterCConan(ConanFile): name = "tree-sitter-c" description = "C grammar for tree-sitter." - topics = ("parser", "grammar", "tree", "c", "ide") + license = "MIT" url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/tree-sitter/tree-sitter-c" - license = "MIT" + topics = ("parser", "grammar", "tree", "c", "ide") settings = "os", "arch", "compiler", "build_type" package_type = "library" @@ -25,9 +25,6 @@ class TreeSitterCConan(ConanFile): "fPIC": True, } - - exports_sources = "CMakeLists.txt" - def layout(self): cmake_layout(self, src_folder="src") @@ -55,7 +52,7 @@ def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) def requirements(self): - self.requires("tree-sitter/0.20.8", transitive_headers=True, transitive_libs=True) + self.requires("tree-sitter/0.24.3", transitive_headers=True, transitive_libs=True) def _patch_sources(self): if not self.options.shared: diff --git a/recipes/tree-sitter-c/all/test_package/CMakeLists.txt b/recipes/tree-sitter-c/all/test_package/CMakeLists.txt index 177a777e8ddf7..1b3fe337b8e92 100644 --- a/recipes/tree-sitter-c/all/test_package/CMakeLists.txt +++ b/recipes/tree-sitter-c/all/test_package/CMakeLists.txt @@ -1,7 +1,7 @@ cmake_minimum_required(VERSION 3.1) -project(test_package C) +project(test_package LANGUAGES C) find_package(tree-sitter-c REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.c) -target_link_libraries(${PROJECT_NAME} tree-sitter-c::tree-sitter-c) +target_link_libraries(${PROJECT_NAME} PRIVATE tree-sitter-c::tree-sitter-c) diff --git a/recipes/tree-sitter-c/all/test_package/test_package.c b/recipes/tree-sitter-c/all/test_package/test_package.c index d5f86eae18cce..5588357055b9a 100644 --- a/recipes/tree-sitter-c/all/test_package/test_package.c +++ b/recipes/tree-sitter-c/all/test_package/test_package.c @@ -3,6 +3,7 @@ #include #include +#include int main() { TSParser *parser = ts_parser_new(); diff --git a/recipes/tree-sitter-c/config.yml b/recipes/tree-sitter-c/config.yml index 7070a273f171a..b5f665440c8f8 100644 --- a/recipes/tree-sitter-c/config.yml +++ b/recipes/tree-sitter-c/config.yml @@ -1,4 +1,8 @@ versions: + "0.23.1": + folder: all + "0.20.7": + folder: all "0.20.3": folder: all "0.20.2": diff --git a/recipes/tree-sitter-sql/all/CMakeLists.txt b/recipes/tree-sitter-sql/all/CMakeLists.txt new file mode 100644 index 0000000000000..2c51456eb9a4e --- /dev/null +++ b/recipes/tree-sitter-sql/all/CMakeLists.txt @@ -0,0 +1,30 @@ +cmake_minimum_required(VERSION 3.15) +project(tree-sitter-sql LANGUAGES C) + +find_package(tree-sitter REQUIRED CONFIG) + +add_library(${PROJECT_NAME} + ${TREE_SITTER_SQL_SRC_DIR}/src/scanner.c + ${TREE_SITTER_SQL_SRC_DIR}/src/parser.c +) +target_link_libraries(${PROJECT_NAME} + PUBLIC + tree-sitter::tree-sitter +) +target_include_directories(${PROJECT_NAME} + PRIVATE + $ +) +set_target_properties(${PROJECT_NAME} + PROPERTIES + C_STANDARD 99 + PUBLIC_HEADER "${TREE_SITTER_SQL_SRC_DIR}/bindings/c/tree-sitter-sql.h" +) + +include(GNUInstallDirs) +install(TARGETS ${PROJECT_NAME} + ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" + LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" + RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" + PUBLIC_HEADER DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" +) diff --git a/recipes/tree-sitter-sql/all/conandata.yml b/recipes/tree-sitter-sql/all/conandata.yml new file mode 100644 index 0000000000000..89e867a3cdb74 --- /dev/null +++ b/recipes/tree-sitter-sql/all/conandata.yml @@ -0,0 +1,7 @@ +sources: + # As per the official README, the release tarballs don't include the generated codes. + # > We don't commit the generated parser files to the main branch. Instead, you can find them on the gh-pages branch. + # We have to obtain the corresponding snapshot of the github-pages branch. + "0.3.5": + url: "https://github.com/DerekStride/tree-sitter-sql/archive/c67ecbd37d8d12f22e4cc7138afd14bc20253e10.tar.gz" + sha256: "d8cd967ca4daa376614995fe8a439a957a303c7ca5b9858ca15ad243e6b176d3" diff --git a/recipes/tree-sitter-sql/all/conanfile.py b/recipes/tree-sitter-sql/all/conanfile.py new file mode 100644 index 0000000000000..59cc675b453aa --- /dev/null +++ b/recipes/tree-sitter-sql/all/conanfile.py @@ -0,0 +1,71 @@ +from conan import ConanFile +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.files import copy, get +from conan.tools.microsoft import is_msvc +import os + + +required_conan_version = ">=1.53.0" + + +class TreeSitterSqlConan(ConanFile): + name = "tree-sitter-sql" + description = "SQL grammar for tree-sitter" + license = "MIT" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/DerekStride/tree-sitter-sql" + topics = ("tree-sitter", "sql", "parser") + package_type = "library" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + } + exports_sources = ["CMakeLists.txt"] + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def configure(self): + if is_msvc(self): + del self.options.shared + self.package_type = "static-library" + if self.options.get_safe("shared"): + self.options.rm_safe("fPIC") + self.settings.rm_safe("compiler.cppstd") + self.settings.rm_safe("compiler.libcxx") + + def layout(self): + cmake_layout(self, src_folder="src") + + def requirements(self): + self.requires("tree-sitter/0.24.3", transitive_headers=True) + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + tc.variables["TREE_SITTER_SQL_SRC_DIR"] = self.source_folder.replace("\\", "/") + tc.generate() + tc = CMakeDeps(self) + tc.generate() + + def build(self): + cmake = CMake(self) + cmake.configure(build_script_folder=os.path.join(self.source_folder, os.pardir)) + cmake.build() + + def package(self): + copy(self, "LICENSE", self.source_folder, os.path.join(self.package_folder, "licenses")) + cmake = CMake(self) + cmake.install() + + def package_info(self): + self.cpp_info.libs = ["tree-sitter-sql"] + self.cpp_info.set_property("pkg_config_name", "tree-sitter-sql") diff --git a/recipes/tree-sitter-sql/all/test_package/CMakeLists.txt b/recipes/tree-sitter-sql/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..349ad00bbfc6d --- /dev/null +++ b/recipes/tree-sitter-sql/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES C) + +find_package(PkgConfig) +pkg_check_modules(TREE_SITTER_SQL IMPORTED_TARGET "tree-sitter-sql") + +add_executable(${PROJECT_NAME} test_package.c) +target_link_libraries(${PROJECT_NAME} PRIVATE PkgConfig::TREE_SITTER_SQL) diff --git a/recipes/tree-sitter-sql/all/test_package/conanfile.py b/recipes/tree-sitter-sql/all/test_package/conanfile.py new file mode 100644 index 0000000000000..e8f597c20ddd4 --- /dev/null +++ b/recipes/tree-sitter-sql/all/test_package/conanfile.py @@ -0,0 +1,30 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "PkgConfigDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) + + def build_requirements(self): + if not self.conf.get("tools.gnu:pkg_config", check_type=str): + self.tool_requires("pkgconf/[>=2.2 <3]") + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/tree-sitter-sql/all/test_package/test_package.c b/recipes/tree-sitter-sql/all/test_package/test_package.c new file mode 100644 index 0000000000000..7b528742c2577 --- /dev/null +++ b/recipes/tree-sitter-sql/all/test_package/test_package.c @@ -0,0 +1,26 @@ +#include +#include + +#include "tree_sitter/api.h" +#include "tree-sitter-sql.h" + +int main() { + TSParser *parser = ts_parser_new(); + ts_parser_set_language(parser, tree_sitter_sql()); + const char *source_code = "select * from dummy_table;\n"; + TSTree *tree = ts_parser_parse_string( + parser, + NULL, + source_code, + strlen(source_code) + ); + TSNode root_node = ts_tree_root_node(tree); + + char *string = ts_node_string(root_node); + printf("Syntax tree: %s\n", string); + free(string); + + ts_tree_delete(tree); + ts_parser_delete(parser); + return 0; +} diff --git a/recipes/tree-sitter-sql/config.yml b/recipes/tree-sitter-sql/config.yml new file mode 100644 index 0000000000000..ef7972c36ec69 --- /dev/null +++ b/recipes/tree-sitter-sql/config.yml @@ -0,0 +1,3 @@ +versions: + "0.3.5": + folder: all diff --git a/recipes/tree-sitter/all/conandata.yml b/recipes/tree-sitter/all/conandata.yml index 8277c606ebb37..6cb12dc5aaa0c 100644 --- a/recipes/tree-sitter/all/conandata.yml +++ b/recipes/tree-sitter/all/conandata.yml @@ -1,4 +1,19 @@ sources: + "0.24.3": + url: "https://github.com/tree-sitter/tree-sitter/archive/refs/tags/v0.24.3.tar.gz" + sha256: "0a8d0cf8e09caba22ed0d8439f7fa1e3d8453800038e43ccad1f34ef29537da1" + "0.23.1": + url: "https://github.com/tree-sitter/tree-sitter/archive/refs/tags/v0.23.1.tar.gz" + sha256: "30ea382bdaea8fc71e3d52850da509398f56d77b7c41e3494da46a1158d37b86" + "0.23.0": + url: "https://github.com/tree-sitter/tree-sitter/archive/refs/tags/v0.23.0.tar.gz" + sha256: "6403b361b0014999e96f61b9c84d6950d42f0c7d6e806be79382e0232e48a11b" + "0.22.6": + url: "https://github.com/tree-sitter/tree-sitter/archive/refs/tags/v0.22.6.tar.gz" + sha256: "e2b687f74358ab6404730b7fb1a1ced7ddb3780202d37595ecd7b20a8f41861f" + "0.22.5": + url: "https://github.com/tree-sitter/tree-sitter/archive/refs/tags/v0.22.5.tar.gz" + sha256: "6bc22ca7e0f81d77773462d922cf40b44bfd090d92abac75cb37dbae516c2417" "0.22.1": url: "https://github.com/tree-sitter/tree-sitter/archive/refs/tags/v0.22.1.tar.gz" sha256: "b21065e78da33e529893c954e712ad15d9ad44a594b74567321d4a3a007d6090" @@ -8,12 +23,3 @@ sources: "0.20.8": url: "https://github.com/tree-sitter/tree-sitter/archive/refs/tags/v0.20.8.tar.gz" sha256: "6181ede0b7470bfca37e293e7d5dc1d16469b9485d13f13a605baec4a8b1f791" - "0.20.6": - url: "https://github.com/tree-sitter/tree-sitter/archive/v0.20.6.tar.gz" - sha256: "4d37eaef8a402a385998ff9aca3e1043b4a3bba899bceeff27a7178e1165b9de" - "0.20.0": - url: "https://github.com/tree-sitter/tree-sitter/archive/refs/tags/v0.20.0.tar.gz" - sha256: "4a8070b9de17c3b8096181fe8530320ab3e8cca685d8bee6a3e8d164b5fb47da" - "0.17.3": - url: "https://github.com/tree-sitter/tree-sitter/archive/0.17.3.tar.gz" - sha256: "a897e5c9a7ccb74271d9b20d59121d2d2e9de8b896c4d1cfaac0f8104c1ef9f8" diff --git a/recipes/tree-sitter/all/conanfile.py b/recipes/tree-sitter/all/conanfile.py index a0c425765146a..ac605167e9581 100644 --- a/recipes/tree-sitter/all/conanfile.py +++ b/recipes/tree-sitter/all/conanfile.py @@ -2,7 +2,8 @@ from conan import ConanFile from conan.tools.cmake import CMakeToolchain, CMake, cmake_layout -from conan.tools.files import get, copy +from conan.tools.files import get, copy, rmdir +from conan.tools.scm import Version required_conan_version = ">=1.53.0" @@ -10,10 +11,10 @@ class TreeSitterConan(ConanFile): name = "tree-sitter" description = "Tree-sitter is a parser generator tool and an incremental parsing library. It can build a concrete syntax tree for a source file and efficiently update the syntax tree as the source file is edited." - topics = ("parser", "incremental", "rust") + license = "MIT" url = "https://github.com/conan-io/conan-center-index" homepage = "https://tree-sitter.github.io/tree-sitter" - license = "MIT" + topics = ("parser", "incremental", "rust") package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { @@ -24,14 +25,21 @@ class TreeSitterConan(ConanFile): "fPIC": True, "shared": False, } - exports_sources = "CMakeLists.txt" + + def export_sources(self): + if Version(self.version) < "0.24.1": + copy(self, "CMakeLists.txt", src=self.recipe_folder, dst=self.export_sources_folder) def config_options(self): if self.settings.os == "Windows": del self.options.fPIC + if Version(self.version) >= "0.24.1": + self.package_type = "static-library" def configure(self): - if self.options.shared: + if Version(self.version) >= "0.24.1" and self.settings.os == "Windows": + self.options.rm_safe("shared") + if self.options.get_safe("shared"): self.options.rm_safe("fPIC") self.settings.rm_safe("compiler.cppstd") self.settings.rm_safe("compiler.libcxx") @@ -44,13 +52,19 @@ def source(self): def generate(self): tc = CMakeToolchain(self) - tc.variables["TREE_SITTER_SRC_DIR"] = self.source_folder.replace("\\", "/") - tc.variables["TREE_SITTER_VERSION"] = str(self.version) + if Version(self.version) < "0.24.1": + tc.variables["TREE_SITTER_SRC_DIR"] = self.source_folder.replace("\\", "/") + tc.variables["TREE_SITTER_VERSION"] = str(self.version) + else: + tc.cache_variables["BUILD_SHARED_LIBS"] = self.options.get_safe("shared", False) tc.generate() def build(self): cmake = CMake(self) - cmake.configure(build_script_folder=os.path.join(self.source_folder, os.pardir)) + if Version(self.version) < "0.24.1": + cmake.configure(build_script_folder=os.path.join(self.source_folder, os.pardir)) + else: + cmake.configure(build_script_folder=os.path.join(self.source_folder, "lib")) cmake.build() def package(self): @@ -63,5 +77,7 @@ def package(self): cmake = CMake(self) cmake.install() + rmdir(self, os.path.join(self.package_folder, "share")) + def package_info(self): self.cpp_info.libs = ["tree-sitter"] diff --git a/recipes/tree-sitter/config.yml b/recipes/tree-sitter/config.yml index d166b5cb681fc..f93240ac8f1e5 100644 --- a/recipes/tree-sitter/config.yml +++ b/recipes/tree-sitter/config.yml @@ -1,13 +1,18 @@ versions: - "0.22.1": + "0.24.3": folder: all - "0.21.0": + "0.23.1": folder: all - "0.20.8": + "0.23.0": + folder: all + "0.22.6": folder: all - "0.20.6": + "0.22.5": folder: all - "0.20.0": + "0.22.1": + folder: all + "0.21.0": folder: all - "0.17.3": + # keep 0.20.8 for tree-sitter-c + "0.20.8": folder: all diff --git a/recipes/trompeloeil/all/conandata.yml b/recipes/trompeloeil/all/conandata.yml index ba2243425c538..8fdd3be7c6bf2 100644 --- a/recipes/trompeloeil/all/conandata.yml +++ b/recipes/trompeloeil/all/conandata.yml @@ -1,4 +1,10 @@ sources: + "49": + url: "https://github.com/rollbear/trompeloeil/archive/v49.tar.gz" + sha256: "2523571fb7920b2813cbc23b46e60294aba8ead7eba434bfec69c24408615593" + "48": + url: "https://github.com/rollbear/trompeloeil/archive/v48.tar.gz" + sha256: "eebd18456975251ea3450b815e241cccfefba5b883e4a36bd309f9cf629bdec6" "47": url: "https://github.com/rollbear/trompeloeil/archive/v47.tar.gz" sha256: "4a1d79260c1e49e065efe0817c8b9646098ba27eed1802b0c3ba7d959e4e5e84" diff --git a/recipes/trompeloeil/all/test_package/test_package.cpp b/recipes/trompeloeil/all/test_package/test_package.cpp index 356b535560158..2d62e62471f0e 100644 --- a/recipes/trompeloeil/all/test_package/test_package.cpp +++ b/recipes/trompeloeil/all/test_package/test_package.cpp @@ -1,3 +1,4 @@ +#include #include struct S diff --git a/recipes/trompeloeil/config.yml b/recipes/trompeloeil/config.yml index b8ee3e687f441..39c766357c1eb 100644 --- a/recipes/trompeloeil/config.yml +++ b/recipes/trompeloeil/config.yml @@ -1,4 +1,8 @@ versions: + "49": + folder: all + "48": + folder: all "47": folder: all "46": diff --git a/recipes/tsl-robin-map/all/conandata.yml b/recipes/tsl-robin-map/all/conandata.yml index 0898c1e12fe8b..184cd30d5f022 100644 --- a/recipes/tsl-robin-map/all/conandata.yml +++ b/recipes/tsl-robin-map/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.3.0": + url: "https://github.com/Tessil/robin-map/archive/v1.3.0.tar.gz" + sha256: "a8424ad3b0affd4c57ed26f0f3d8a29604f0e1f2ef2089f497f614b1c94c7236" "1.2.2": url: "https://github.com/Tessil/robin-map/archive/v1.2.2.tar.gz" sha256: "c72767ecea2a90074c7efbe91620c8f955af666505e22782e82813c652710821" diff --git a/recipes/tsl-robin-map/all/conanfile.py b/recipes/tsl-robin-map/all/conanfile.py index 14ac380eaf691..d6ee665d5c051 100644 --- a/recipes/tsl-robin-map/all/conanfile.py +++ b/recipes/tsl-robin-map/all/conanfile.py @@ -11,9 +11,9 @@ class TslRobinMapConan(ConanFile): name = "tsl-robin-map" license = "MIT" description = "C++ implementation of a fast hash map and hash set using robin hood hashing." - topics = ("robin-map", "structure", "hash map", "hash set") - homepage = "https://github.com/Tessil/robin-map" url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/Tessil/robin-map" + topics = ("robin-map", "structure", "hash map", "hash set", "header-only") package_type = "header-library" settings = "os", "arch", "compiler", "build_type" no_copy_source = True diff --git a/recipes/tsl-robin-map/config.yml b/recipes/tsl-robin-map/config.yml index cd852f361a5d2..05411da627de4 100644 --- a/recipes/tsl-robin-map/config.yml +++ b/recipes/tsl-robin-map/config.yml @@ -1,4 +1,6 @@ versions: + "1.3.0": + folder: all "1.2.2": folder: all "1.2.1": diff --git a/recipes/turtle/all/conandata.yml b/recipes/turtle/all/conandata.yml index 1b973e23b0f99..3460796e19388 100644 --- a/recipes/turtle/all/conandata.yml +++ b/recipes/turtle/all/conandata.yml @@ -1,7 +1,10 @@ sources: - "1.3.1": - url: "https://github.com/mat007/turtle/archive/v1.3.1.tar.gz" - sha256: "1ea10600a4046286a781c898ed3110d48fdab473f5320dc48cc2775353039b8b" + "2.0.0": + url: "https://github.com/mat007/turtle/archive/v2.0.0.tar.gz" + sha256: "636a552fc442d452955eca1f554e6a962b38270c1a6290538c6405da59b49e45" "1.3.2": url: "https://github.com/mat007/turtle/archive/v1.3.2.tar.gz" sha256: "4dc0bd79ddecd337691d5805ecb25f427bd85d9549f44d06cd3a6b7f0f0235d4" + "1.3.1": + url: "https://github.com/mat007/turtle/archive/v1.3.1.tar.gz" + sha256: "1ea10600a4046286a781c898ed3110d48fdab473f5320dc48cc2775353039b8b" diff --git a/recipes/turtle/all/conanfile.py b/recipes/turtle/all/conanfile.py index 1f12c41eb77c7..6b80db4af4ab7 100644 --- a/recipes/turtle/all/conanfile.py +++ b/recipes/turtle/all/conanfile.py @@ -1,6 +1,9 @@ from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.build import check_min_cppstd from conan.tools.files import get, copy from conan.tools.layout import basic_layout +from conan.tools.scm import Version import os required_conan_version = ">=1.53.0" @@ -8,13 +11,27 @@ class TurtleConan(ConanFile): name = "turtle" description = "Turtle is a C++ mock object library based on Boost with a focus on usability, simplicity and flexibility." - topics = ("mock", "test", "boost") + license = "BSL-1.0" url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/mat007/turtle" - license = "BSL-1.0" - no_copy_source = True + topics = ("mock", "test", "boost", "header-only") package_type = "header-library" settings = "os", "arch", "compiler", "build_type" + no_copy_source = True + + @property + def _min_cppstd(self): + return 14 + + @property + def _compilers_minimum_version(self): + return { + "apple-clang": "10", + "clang": "7", + "gcc": "7", + "msvc": "191", + "Visual Studio": "15", + } def layout(self): basic_layout(self, src_folder="src") @@ -25,9 +42,17 @@ def requirements(self): def package_id(self): self.info.clear() - def package_info(self): - self.cpp_info.libdirs = [] - self.cpp_info.bindirs = [] + def validate(self): + if Version(self.version) < "2.0.0": + return + + if self.settings.compiler.get_safe("cppstd"): + check_min_cppstd(self, self._min_cppstd) + minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) + if minimum_version and Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration( + f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." + ) def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) @@ -35,3 +60,7 @@ def source(self): def package(self): copy(self, "LICENSE_1_0.txt", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) copy(self, "*.hpp", dst=os.path.join(self.package_folder, "include"), src=os.path.join(self.source_folder, "include")) + + def package_info(self): + self.cpp_info.libdirs = [] + self.cpp_info.bindirs = [] diff --git a/recipes/turtle/all/test_package/CMakeLists.txt b/recipes/turtle/all/test_package/CMakeLists.txt index 284560de8122d..17dd4096afba2 100644 --- a/recipes/turtle/all/test_package/CMakeLists.txt +++ b/recipes/turtle/all/test_package/CMakeLists.txt @@ -5,3 +5,6 @@ find_package(turtle REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) target_link_libraries(${PROJECT_NAME} turtle::turtle) +if(turtle_VERSION VERSION_GREATER_EQUAL "2.0.0") + target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_14) +endif() diff --git a/recipes/turtle/config.yml b/recipes/turtle/config.yml index 266cd9ad48136..5a4bc86b61751 100644 --- a/recipes/turtle/config.yml +++ b/recipes/turtle/config.yml @@ -1,5 +1,7 @@ versions: - "1.3.1": + "2.0.0": folder: all "1.3.2": folder: all + "1.3.1": + folder: all diff --git a/recipes/type_safe/all/conandata.yml b/recipes/type_safe/all/conandata.yml index 0be0030fda0b5..1e778714e307e 100644 --- a/recipes/type_safe/all/conandata.yml +++ b/recipes/type_safe/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.2.4": + url: "https://github.com/foonathan/type_safe/archive/v0.2.4.tar.gz" + sha256: "a631d03c18c65726b3d1b7d41ac5806e9121367afe10dd2f408a2d75e144b734" "0.2.3": url: "https://github.com/foonathan/type_safe/archive/v0.2.3.tar.gz" sha256: "19008ab9526b0d2db1ae6bbd6640f5f7a398826bb2266561472e9f1b10d85bec" diff --git a/recipes/type_safe/config.yml b/recipes/type_safe/config.yml index ae20ba2754647..3e1d8c0bc781f 100644 --- a/recipes/type_safe/config.yml +++ b/recipes/type_safe/config.yml @@ -1,4 +1,6 @@ versions: + "0.2.4": + folder: all "0.2.3": folder: all "0.2.2": diff --git a/recipes/ulfius/all/conanfile.py b/recipes/ulfius/all/conanfile.py index cfafd90c8a600..22361ddec897d 100644 --- a/recipes/ulfius/all/conanfile.py +++ b/recipes/ulfius/all/conanfile.py @@ -31,8 +31,8 @@ class UlfiusConan(ConanFile): default_options = { "shared": False, "fPIC": True, - "enable_websockets": False, # FIXME: should be True (cannot be True because of missing gnutls recipe) - "with_gnutls": False, # FIXME: should be True + "enable_websockets": True, + "with_gnutls": True, "with_jansson": True, "with_libcurl": True, "with_yder": True, @@ -40,14 +40,13 @@ class UlfiusConan(ConanFile): def config_options(self): if self.settings.os == "Windows": - self.options.enable_websockets = False + # INSTALL.md says that websockets are not supported on Windows + del self.options.enable_websockets del self.options.fPIC def validate(self): - if self.options.with_gnutls: - raise ConanInvalidConfiguration("with_gnutls=True is not yet implemented due to missing gnutls CCI recipe") - if self.settings.os == "Windows" and self.options.enable_websockets: - raise ConanInvalidConfiguration("ulfius does not support with_websockets=True on Windows") + if self.options.get_safe("enable_websockets") and not self.options.with_gnutls: + raise ConanInvalidConfiguration(f"{self.ref} requires -o=&:with_gnutls=True when -o=&:enable_websockets=True") def configure(self): if self.options.shared: @@ -56,7 +55,7 @@ def configure(self): self.settings.rm_safe("compiler.libcxx") def requirements(self): - self.requires("orcania/2.3.1", transitive_headers=True) + self.requires("orcania/2.3.3", transitive_headers=True) self.requires("libmicrohttpd/0.9.75", transitive_headers=True) if self.options.with_yder: self.requires("yder/1.4.18", transitive_headers=True) @@ -64,6 +63,11 @@ def requirements(self): self.requires("jansson/2.14", transitive_headers=True) if self.options.with_libcurl: self.requires("libcurl/[>=7.78.0 <9]") + if self.options.with_gnutls: + # Used in public ulfius.h:43 + self.requires("gnutls/3.8.2", transitive_headers=True) + if self.options.get_safe("enable_websockets"): + self.requires("zlib/[>=1.2.11 <2]") def source(self): get(self, **self.conan_data["sources"][self.version], @@ -81,62 +85,33 @@ def generate(self): tc.variables["BUILD_STATIC"] = not self.options.shared tc.variables["DOWNLOAD_DEPENDENCIES"] = False tc.variables["WITH_GNUTLS"] = self.options.with_gnutls - tc.variables["WITH_WEBSOCKETS"] = self.options.enable_websockets + tc.variables["WITH_WEBSOCKET"] = self.options.get_safe("enable_websockets") tc.variables["WITH_CURL"] = self.options.with_libcurl tc.variables["WITH_JANSSON"] = self.options.with_jansson + + # Compilation issues when setting Ulifus as a dependency internally + tc.variables["BUILD_UWSC"] = False + tc.generate() deps = CMakeDeps(self) - deps.generate() - # https://github.com/conan-io/conan/issues/12367 + move this before running CMakeDeps.generate() - save(self, os.path.join(self.generators_folder, "MHDConfig.cmake"), textwrap.dedent(f"""\ - include(CMakeFindDependencyMacro) - find_dependency(libmicrohttpd) - - set(MHD_FOUND TRUE) - add_library(MHD::MHD INTERFACE IMPORTED) - set_target_properties(MHD::MHD PROPERTIES INTERFACE_LINK_LIBRARIES "libmicrohttpd::libmicrohttpd") - set(MHD_VERSION_STRING {self.dependencies['libmicrohttpd'].ref.version}) - """)) - save(self, os.path.join(self.generators_folder, "MHDConfigVersion.cmake"), textwrap.dedent(f"""\ - set(PACKAGE_VERSION "{ self.dependencies['libmicrohttpd'].ref.version }") - - if(PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION) - set(PACKAGE_VERSION_COMPATIBLE FALSE) - else() - set(PACKAGE_VERSION_COMPATIBLE TRUE) - if(PACKAGE_FIND_VERSION STREQUAL PACKAGE_VERSION) - set(PACKAGE_VERSION_EXACT TRUE) - endif() - endif() - """)) + deps.set_property("libmicrohttpd", "cmake_file_name", "MHD") + deps.set_property("libmicrohttpd", "cmake_target_name", "MHD::MHD") + + # Orcania generates -static targets for static libraries, but Ulfius does not check for them, + # unconditionally set the target name to Orcania::Orcania + deps.set_property("orcania", "cmake_target_name", "Orcania::Orcania") + + # Same for Yder + if self.options.with_yder: + deps.set_property("yder", "cmake_target_name", "Yder::Yder") - # Shared ulfius looks for Orcania::Orcania and Yder::Yder - # Static ulfius looks for Orcania::Orcania-static and Yder::Yder-static - if self.options.shared: - if not self.dependencies["orcania"].options.shared: - save(self, os.path.join(self.generators_folder, "OrcaniaConfig.cmake"), textwrap.dedent("""\ - add_library(Orcania::Orcania INTERFACE IMPORTED) - set_target_properties(Orcania::Orcania PROPERTIES INTERFACE_LINK_LIBRARIES "Orcania::Orcania-static") - """), append=True) - if self.options.with_yder and not self.dependencies["yder"].options.shared: - save(self, os.path.join(self.generators_folder, "YderConfig.cmake"), textwrap.dedent("""\ - add_library(Yder::Yder INTERFACE IMPORTED) - set_target_properties(Yder::Yder PROPERTIES INTERFACE_LINK_LIBRARIES "Yder::Yder-static") - """), append=True) - - # Create Jansson::Jansson if self.options.with_jansson: - save(self, os.path.join(self.generators_folder, "jansson-config.cmake"), textwrap.dedent(f"""\ - add_library(Jansson::Jansson INTERFACE IMPORTED) - set_target_properties(Jansson::Jansson PROPERTIES INTERFACE_LINK_LIBRARIES "jansson::jansson") - set(JANSSON_VERSION_STRING {self.dependencies['jansson'].ref.version}) - """), append=True) + deps.set_property("jansson", "cmake_file_name", "Jansson") + deps.set_property("jansson", "cmake_target_name", "Jansson::Jansson") - if self.options.with_gnutls: - # FIXME: make sure gnutls creates GnuTLSCOnfig.cmake + GnuTLS::GnuTLS target + GNUTLS_VERSION_STRING - pass + deps.generate() def _patch_sources(self): apply_conandata_patches(self) diff --git a/recipes/uncrustify/all/conandata.yml b/recipes/uncrustify/all/conandata.yml index b95a9b875d7e4..e46325da0f342 100644 --- a/recipes/uncrustify/all/conandata.yml +++ b/recipes/uncrustify/all/conandata.yml @@ -1,16 +1,10 @@ sources: + "0.79.0": + url: "https://github.com/uncrustify/uncrustify/archive/uncrustify-0.79.0.tar.gz" + sha256: "e7afaeabf636b7f0ce4e3e9747b95f7bd939613a8db49579755dddf44fedca5f" "0.78.1": url: "https://github.com/uncrustify/uncrustify/archive/uncrustify-0.78.1.tar.gz" sha256: "ecaf4c0adca14c36dfffa30bc28e69865115ecd602c90eb16a8cddccb41caad2" - "0.78.0": - url: "https://github.com/uncrustify/uncrustify/archive/refs/tags/uncrustify-0.78.0.tar.gz" - sha256: "377efec187c26c7ad77900d94032fa51b029831c69442d607a6e53ef2115928f" "0.77.1": url: "https://github.com/uncrustify/uncrustify/archive/refs/tags/uncrustify-0.77.1.tar.gz" sha256: "414bbc9f7860eb18a53074f9af14ed04638a633b2216a73f2629291300d37c1b" - "0.75.1": - url: "https://github.com/uncrustify/uncrustify/archive/refs/tags/uncrustify-0.75.1.tar.gz" - sha256: "fd14acc0a31ed88b33137bdc26d32964327488c835f885696473ef07caf2e182" - "0.74.0": - url: "https://github.com/uncrustify/uncrustify/archive/refs/tags/uncrustify-0.74.0.tar.gz" - sha256: "b7d24e256e7f919aa96289ac8167ac98340df7faa2d34b60d2242dc54700caaa" diff --git a/recipes/uncrustify/config.yml b/recipes/uncrustify/config.yml index d0d1205acdb6e..2c75346920bc6 100644 --- a/recipes/uncrustify/config.yml +++ b/recipes/uncrustify/config.yml @@ -1,11 +1,7 @@ versions: - "0.78.1": + "0.79.0": folder: all - "0.78.0": + "0.78.1": folder: all "0.77.1": folder: all - "0.75.1": - folder: all - "0.74.0": - folder: all diff --git a/recipes/unleash-client-cpp/all/CMakeLists.txt b/recipes/unleash-client-cpp/all/CMakeLists.txt deleted file mode 100644 index b71c882d9d33f..0000000000000 --- a/recipes/unleash-client-cpp/all/CMakeLists.txt +++ /dev/null @@ -1,7 +0,0 @@ -cmake_minimum_required(VERSION 3.1) -project(cmake_wrapper) - -include(conanbuildinfo.cmake) -conan_basic_setup(KEEP_RPATHS) - -add_subdirectory(source_subfolder) diff --git a/recipes/unleash-client-cpp/all/conandata.yml b/recipes/unleash-client-cpp/all/conandata.yml index 76a5bca8da701..69cfd9795a61f 100644 --- a/recipes/unleash-client-cpp/all/conandata.yml +++ b/recipes/unleash-client-cpp/all/conandata.yml @@ -1,8 +1,4 @@ sources: - "1.1.1": - url: "https://github.com/aruizs/unleash-client-cpp/archive/refs/tags/v1.1.1.tar.gz" - sha256: "2750dc231bf608910d4270ac39d83d46d25b88cc547a9d4d31f7ce4950effa7c" -patches: - "1.1.1": - - patch_file: "patches/0001-no-conan-cmake.patch" - base_path: "source_subfolder" + "1.3.0": + url: "https://github.com/aruizs/unleash-client-cpp/archive/refs/tags/v1.3.0.tar.gz" + sha256: "fa0b8d6101c6dbd08db23a3d353f386c17e9436a63d658f88c7d0b8619b8d501" diff --git a/recipes/unleash-client-cpp/all/conanfile.py b/recipes/unleash-client-cpp/all/conanfile.py index 08a60bfc378de..5c84a2f78a279 100644 --- a/recipes/unleash-client-cpp/all/conanfile.py +++ b/recipes/unleash-client-cpp/all/conanfile.py @@ -1,18 +1,22 @@ -from conans import ConanFile, CMake, tools -from conans.errors import ConanInvalidConfiguration +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.build import check_min_cppstd +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.files import copy, get, rmdir import os -required_conan_version = ">=1.43.0" +from conan.tools.scm import Version +required_conan_version = ">=1.53.0" class UnleashConan(ConanFile): name = "unleash-client-cpp" - homepage = "https://github.com/aruizs/unleash-client-cpp/" + description = "Unleash Client SDK for C++ projects." license = "MIT" url = "https://github.com/conan-io/conan-center-index" - description = "Unleash Client SDK for C++ projects." + homepage = "https://github.com/aruizs/unleash-client-cpp/" topics = ("unleash", "feature", "flag", "toggle") - + package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], @@ -23,17 +27,6 @@ class UnleashConan(ConanFile): "fPIC": True, } - generators = "cmake", "cmake_find_package" - _cmake = None - - @property - def _source_subfolder(self): - return "source_subfolder" - - @property - def _build_subfolder(self): - return "build_subfolder" - @property def _min_cppstd(self): return "17" @@ -42,75 +35,61 @@ def _min_cppstd(self): def _compilers_min_version(self): return { "Visual Studio": "15", # Should we check toolset? + "msvc": "191", "gcc": "7", "clang": "4.0", "apple-clang": "3.8", "intel": "17", } - def export_sources(self): - self.copy("CMakeLists.txt") - for patch in self.conan_data.get("patches", {}).get(self.version, []): - self.copy(patch["patch_file"]) - def config_options(self): if self.settings.os == "Windows": del self.options.fPIC def configure(self): if self.options.shared: - del self.options.fPIC + self.options.rm_safe("fPIC") + + def layout(self): + cmake_layout(self, src_folder="src") def requirements(self): - self.requires("cpr/1.7.2") - self.requires("nlohmann_json/3.10.5") + self.requires("cpr/1.10.5") + self.requires("nlohmann_json/3.11.3") def validate(self): if self.settings.compiler.get_safe("cppstd"): - tools.check_min_cppstd(self, self._min_cppstd) - - def loose_lt_semver(v1, v2): - lv1 = [int(v) for v in v1.split(".")] - lv2 = [int(v) for v in v2.split(".")] - min_length = min(len(lv1), len(lv2)) - return lv1[:min_length] < lv2[:min_length] + check_min_cppstd(self, self._min_cppstd) min_version = self._compilers_min_version.get(str(self.settings.compiler), False) - if min_version and loose_lt_semver(str(self.settings.compiler.version), min_version): + if min_version and Version(self.settings.compiler.version) < min_version: raise ConanInvalidConfiguration( - "{} requires C++{}, which your compiler does not support.".format(self.name, self._min_cppstd) + f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." ) def source(self): - tools.get(**self.conan_data["sources"][self.version], - strip_root=True, destination=self._source_subfolder) - - def _configure_cmake(self): - if self._cmake: - return self._cmake - self._cmake = CMake(self) - self._cmake.definitions["ENABLE_TESTING"] = False - self._cmake.definitions["ENABLE_TEST_COVERAGE"] = False - self._cmake.configure(build_folder=self._build_subfolder) - return self._cmake + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + tc.variables["ENABLE_TESTING"] = False + tc.variables["ENABLE_TESTING_COVERAGE"] = False + tc.generate() + deps = CMakeDeps(self) + deps.generate() def build(self): - for patch in self.conan_data.get("patches", {}).get(self.version, []): - tools.patch(**patch) - cmake = self._configure_cmake() + cmake = CMake(self) + cmake.configure() cmake.build() def package(self): - self.copy("LICENSE", dst="licenses", src=self._source_subfolder) - cmake = self._configure_cmake() + copy(self, "LICENSE", self.source_folder, os.path.join(self.package_folder, "licenses")) + cmake = CMake(self) cmake.install() - tools.rmdir(os.path.join(self.package_folder, "lib", "cmake")) + rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) def package_info(self): + self.cpp_info.libs = ["unleash"] self.cpp_info.set_property("cmake_file_name", "unleash") self.cpp_info.set_property("cmake_target_name", "unleash::unleash") - self.cpp_info.libs = ["unleash"] - - self.cpp_info.names["cmake_find_package"] = "unleash" - self.cpp_info.names["cmake_find_package_multi"] = "unleash" - diff --git a/recipes/unleash-client-cpp/all/patches/0001-no-conan-cmake.patch b/recipes/unleash-client-cpp/all/patches/0001-no-conan-cmake.patch deleted file mode 100644 index f88f88c81dde7..0000000000000 --- a/recipes/unleash-client-cpp/all/patches/0001-no-conan-cmake.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -25,8 +25,6 @@ if(DEFINED unleash_SHARED_LIBS) - endif() - - # External dependencies using Conan.io --include(cmake/Conan.cmake) --run_conan() - - # Create the main unleash library target - add_subdirectory(src) diff --git a/recipes/unleash-client-cpp/all/test_package/CMakeLists.txt b/recipes/unleash-client-cpp/all/test_package/CMakeLists.txt index 5dfa06d3b7057..bd4860f14d566 100644 --- a/recipes/unleash-client-cpp/all/test_package/CMakeLists.txt +++ b/recipes/unleash-client-cpp/all/test_package/CMakeLists.txt @@ -1,11 +1,8 @@ cmake_minimum_required(VERSION 3.8) -project(test_package) - -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) +project(test_package LANGUAGES CXX) find_package(unleash CONFIG REQUIRED) add_executable(${PROJECT_NAME} test_package.cpp) -target_link_libraries(${PROJECT_NAME} unleash::unleash) +target_link_libraries(${PROJECT_NAME} PRIVATE unleash::unleash) target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) diff --git a/recipes/unleash-client-cpp/all/test_package/conanfile.py b/recipes/unleash-client-cpp/all/test_package/conanfile.py index 38f4483872d47..ef5d7042163ec 100644 --- a/recipes/unleash-client-cpp/all/test_package/conanfile.py +++ b/recipes/unleash-client-cpp/all/test_package/conanfile.py @@ -1,10 +1,19 @@ -from conans import ConanFile, CMake, tools +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake import os class TestPackageConan(ConanFile): settings = "os", "arch", "compiler", "build_type" - generators = "cmake", "cmake_find_package_multi" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) def build(self): cmake = CMake(self) @@ -12,6 +21,6 @@ def build(self): cmake.build() def test(self): - if not tools.cross_building(self): - bin_path = os.path.join("bin", "test_package") - self.run(bin_path, run_environment=True) + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/unleash-client-cpp/all/test_package/test_package.cpp b/recipes/unleash-client-cpp/all/test_package/test_package.cpp index 9af855c3e03d7..1eaf68256bc88 100644 --- a/recipes/unleash-client-cpp/all/test_package/test_package.cpp +++ b/recipes/unleash-client-cpp/all/test_package/test_package.cpp @@ -1,10 +1,11 @@ #include +#include +#include #include int main() { unleash::UnleashClient unleashClient = unleash::UnleashClient::create("production", "https://www.apple.com/%"); - unleashClient.initializeClient(); - return unleashClient.isEnabled("feature.toogle"); - + std::cout << "feature.toggle - is enabled: " << std::boolalpha << unleashClient.isEnabled("feature.toogle") << '\n'; + return 0; } diff --git a/recipes/unleash-client-cpp/config.yml b/recipes/unleash-client-cpp/config.yml index 60d31991f5141..426a0e4c79e9b 100644 --- a/recipes/unleash-client-cpp/config.yml +++ b/recipes/unleash-client-cpp/config.yml @@ -1,3 +1,3 @@ versions: - "1.1.1": + "1.3.0": folder: all diff --git a/recipes/uriparser/all/conandata.yml b/recipes/uriparser/all/conandata.yml index 2e0f68c6098de..e42d123f7e6e6 100644 --- a/recipes/uriparser/all/conandata.yml +++ b/recipes/uriparser/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.9.8": + url: "https://github.com/uriparser/uriparser/releases/download/uriparser-0.9.8/uriparser-0.9.8.tar.xz" + sha256: "1d71c054837ea32a31e462bce5a1af272379ecf511e33448e88100b87ff73b2e" "0.9.7": url: "https://github.com/uriparser/uriparser/releases/download/uriparser-0.9.7/uriparser-0.9.7.tar.xz" sha256: "1ddae35cb3cc2c36e8199829d46f1c7f8b222e74a723fdae67ec8561e1ac5a39" diff --git a/recipes/uriparser/all/conanfile.py b/recipes/uriparser/all/conanfile.py index 9e901d6027dc5..c8edbccee9815 100644 --- a/recipes/uriparser/all/conanfile.py +++ b/recipes/uriparser/all/conanfile.py @@ -10,10 +10,10 @@ class UriparserConan(ConanFile): name = "uriparser" description = "Strictly RFC 3986 compliant URI parsing and handling library written in C89" - topics = ("uri", "parser") + license = "BSD-3-Clause" url = "https://github.com/conan-io/conan-center-index" homepage = "https://uriparser.github.io/" - license = "BSD-3-Clause" + topics = ("uri", "parser") package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { diff --git a/recipes/uriparser/config.yml b/recipes/uriparser/config.yml index 983b5479ac5be..42a189b84f1e9 100644 --- a/recipes/uriparser/config.yml +++ b/recipes/uriparser/config.yml @@ -1,4 +1,6 @@ versions: + "0.9.8": + folder: "all" "0.9.7": folder: "all" "0.9.6": diff --git a/recipes/userspace-rcu/all/conandata.yml b/recipes/userspace-rcu/all/conandata.yml index 570705edb2dd6..63079c64c1840 100644 --- a/recipes/userspace-rcu/all/conandata.yml +++ b/recipes/userspace-rcu/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.14.0": + url: "https://github.com/urcu/userspace-rcu/archive/refs/tags/v0.14.0.tar.gz" + sha256: "42fb5129a3fffe5a4b790dfe1ea3a734c69ee095fefbf649326269bba94c262d" "0.11.4": - sha256: d995598482221587ff6753d2a8da6ac74ff0fa79fbea29ccee196f295834531d - url: https://github.com/urcu/userspace-rcu/archive/refs/tags/v0.11.4.tar.gz + url: "https://github.com/urcu/userspace-rcu/archive/refs/tags/v0.11.4.tar.gz" + sha256: "d995598482221587ff6753d2a8da6ac74ff0fa79fbea29ccee196f295834531d" diff --git a/recipes/userspace-rcu/all/conanfile.py b/recipes/userspace-rcu/all/conanfile.py index ad697812f9c26..bc82bbc3b711b 100644 --- a/recipes/userspace-rcu/all/conanfile.py +++ b/recipes/userspace-rcu/all/conanfile.py @@ -1,28 +1,25 @@ import os -from conans import ConanFile, AutoToolsBuildEnvironment, tools -from conan.tools.files import get, rmdir -from conans.errors import ConanInvalidConfiguration +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.env import VirtualBuildEnv +from conan.tools.files import chdir, copy, get, rm, rmdir +from conan.tools.gnu import Autotools, AutotoolsToolchain +from conan.tools.layout import basic_layout -required_conan_version = ">=1.47.0" +required_conan_version = ">=1.53.0" class UserspaceRCUConan(ConanFile): name = "userspace-rcu" - homepage ="https://liburcu.org/" description = "Userspace RCU (read-copy-update) library" - topics = ("urcu") - url = "https://github.com/conan-io/conan-center-index" license = "LGPL-2.1" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://liburcu.org/" + topics = "urcu" - _autotools = None - - @property - def _source_subfolder(self): - return "source_subfolder" - - settings = "os", "compiler", "build_type", "arch" - + package_type = "library" + settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], "fPIC": [True, False], @@ -31,65 +28,58 @@ def _source_subfolder(self): "shared": False, "fPIC": True, } - build_requires = ( - "libtool/2.4.6", - ) - generators = "PkgConfigDeps" + def configure(self): + self.settings.rm_safe("compiler.libcxx") + self.settings.rm_safe("compiler.cppstd") + if self.options.shared: + self.options.rm_safe("fPIC") + + def layout(self): + basic_layout(self, src_folder="src") def validate(self): if self.settings.os not in ["Linux", "FreeBSD", "Macos"]: - raise ConanInvalidConfiguration("Building for {} unsupported".format(self.settings.os)) + raise ConanInvalidConfiguration(f"Building for {self.settings.os} unsupported") + if self.version == "0.11.4" and self.settings.compiler == "apple-clang": + # Fails with "cds_hlist_add_head_rcu.c:19:10: fatal error: 'urcu/urcu-memb.h' file not found" + raise ConanInvalidConfiguration(f"{self.ref} is not compatible with apple-clang") - def configure(self): - del self.settings.compiler.libcxx - del self.settings.compiler.cppstd - if self.options.shared: - del self.options.fPIC + def build_requirements(self): + self.tool_requires("libtool/2.4.7") def source(self): - get(self, **self.conan_data["sources"][self.version], - destination=self._source_subfolder, strip_root=True) - - def _configure_autotools(self): - if self._autotools: - return self._autotools - self._autotools = AutoToolsBuildEnvironment(self) - self._autotools.libs = [] - yes_no = lambda v: "yes" if v else "no" - conf_args = [ - "--enable-shared={}".format(yes_no(self.options.shared)), - "--enable-static={}".format(yes_no(not self.options.shared)), - ] - self._autotools.configure(args=conf_args, configure_dir=self._source_subfolder) - return self._autotools + get(self, **self.conan_data["sources"][self.version], strip_root=True) + def generate(self): + env = VirtualBuildEnv(self) + env.generate() + tc = AutotoolsToolchain(self) + tc.generate() def build(self): - with tools.chdir(self._source_subfolder): - self.run("./bootstrap") - autotools = self._configure_autotools() + autotools = Autotools(self) + autotools.autoreconf() + autotools.configure() autotools.make() def package(self): - self.copy(pattern="LICENSE*", src=self._source_subfolder, dst="licenses") - autotools = self._configure_autotools() + copy(self, "LICENSE*", + src=self.source_folder, + dst=os.path.join(self.package_folder, "licenses")) + autotools = Autotools(self) autotools.install() - tools.remove_files_by_mask(os.path.join(self.package_folder, "lib"), "*.la") + rm(self, "*.la", self.package_folder, recursive=True) rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) rmdir(self, os.path.join(self.package_folder, "share")) def package_info(self): for lib_type in ["", "-bp", "-cds", "-mb", "-memb", "-qsbr", "-signal"]: - component_name = "urcu{}".format(lib_type) + component_name = f"urcu{lib_type}" self.cpp_info.components[component_name].libs = ["urcu-common", component_name] self.cpp_info.components[component_name].set_property("pkg_config_name", component_name) - self.cpp_info.components[component_name].names["pkg_config"] = component_name - # todo Remove in Conan version 1.50.0 where these are set by default for the PkgConfigDeps generator. - self.cpp_info.components[component_name].includedirs = ["include"] - self.cpp_info.components[component_name].libdirs = ["lib"] - if self.settings.os == "Linux": + if self.settings.os in ["Linux", "FreeBSD"]: self.cpp_info.components[component_name].system_libs = ["pthread"] # Some definitions needed for MB and Signal variants diff --git a/recipes/userspace-rcu/all/test_package/CMakeLists.txt b/recipes/userspace-rcu/all/test_package/CMakeLists.txt index 2afe258693778..3dbdbb9223703 100644 --- a/recipes/userspace-rcu/all/test_package/CMakeLists.txt +++ b/recipes/userspace-rcu/all/test_package/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.15) -project(test_package) +project(test_package LANGUAGES C) find_package(userspace-rcu COMPONENTS urcu REQUIRED) diff --git a/recipes/userspace-rcu/all/test_package/conanfile.py b/recipes/userspace-rcu/all/test_package/conanfile.py index 78d6ce7aad715..28dc52eddfee5 100644 --- a/recipes/userspace-rcu/all/test_package/conanfile.py +++ b/recipes/userspace-rcu/all/test_package/conanfile.py @@ -1,15 +1,23 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake import os -from conans import ConanFile, CMake -from conan.tools.build import cross_building class TestPackageConan(ConanFile): settings = "os", "arch", "compiler", "build_type" - generators = "cmake", "cmake_find_package_multi" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" def configure(self): - del self.settings.compiler.libcxx - del self.settings.compiler.cppstd + self.settings.rm_safe("compiler.libcxx") + self.settings.rm_safe("compiler.cppstd") + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) def build(self): cmake = CMake(self) @@ -17,6 +25,7 @@ def build(self): cmake.build() def test(self): - if not cross_building(self): + if can_run(self): for test in ["", "-mb", "-signal"]: - self.run("test_package{}".format(test), run_environment=True) + bin_path = os.path.join(self.cpp.build.bindir, f"test_package{test}") + self.run(bin_path, env="conanrun") diff --git a/recipes/userspace-rcu/all/test_v1_package/CMakeLists.txt b/recipes/userspace-rcu/all/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..91630d79f4abb --- /dev/null +++ b/recipes/userspace-rcu/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/userspace-rcu/all/test_v1_package/conanfile.py b/recipes/userspace-rcu/all/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..a8ac0984771ba --- /dev/null +++ b/recipes/userspace-rcu/all/test_v1_package/conanfile.py @@ -0,0 +1,23 @@ +import os + +from conans import ConanFile, CMake +from conan.tools.build import cross_building + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "cmake", "cmake_find_package_multi" + + def configure(self): + del self.settings.compiler.libcxx + del self.settings.compiler.cppstd + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if not cross_building(self): + for test in ["", "-mb", "-signal"]: + bin_path = os.path.join("bin", f"test_package{test}") + self.run(bin_path, run_environment=True) diff --git a/recipes/userspace-rcu/config.yml b/recipes/userspace-rcu/config.yml index 813707cc5417d..8246204055b2f 100644 --- a/recipes/userspace-rcu/config.yml +++ b/recipes/userspace-rcu/config.yml @@ -1,3 +1,5 @@ versions: + "0.14.0": + folder: all "0.11.4": folder: all diff --git a/recipes/utfcpp/all/conandata.yml b/recipes/utfcpp/all/conandata.yml index 03f2a95423481..d1a732d445794 100644 --- a/recipes/utfcpp/all/conandata.yml +++ b/recipes/utfcpp/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "4.0.5": + url: "https://github.com/nemtrif/utfcpp/archive/v4.0.5.tar.gz" + sha256: "ffc668a310e77607d393f3c18b32715f223da1eac4c4d6e0579a11df8e6b59cf" "4.0.4": url: "https://github.com/nemtrif/utfcpp/archive/v4.0.4.tar.gz" sha256: "7c8a403d0c575d52473c8644cd9eb46c6ba028d2549bc3e0cdc2d45f5cfd78a0" @@ -11,27 +14,9 @@ sources: "3.2.5": url: "https://github.com/nemtrif/utfcpp/archive/v3.2.5.tar.gz" sha256: "14fd1b3c466814cb4c40771b7f207b61d2c7a0aa6a5e620ca05c00df27f25afd" - "3.2.4": - url: "https://github.com/nemtrif/utfcpp/archive/refs/tags/v3.2.4.tar.gz" - sha256: "fde21a4c519eed25f095a1cd8490167409cc70d7b5e9c38756142e588ccb7c7e" "3.2.3": url: "https://github.com/nemtrif/utfcpp/archive/v3.2.3.tar.gz" sha256: "3ba9b0dbbff08767bdffe8f03b10e596ca351228862722e4c9d4d126d2865250" - "3.2.2": - url: "https://github.com/nemtrif/utfcpp/archive/v3.2.2.tar.gz" - sha256: "6f81e7cb2be2a6a9109a8a0cb7dc39ec947f1bcdb5dfa4a660e11a23face19f5" - "3.2.1": - url: "https://github.com/nemtrif/utfcpp/archive/refs/tags/v3.2.1.tar.gz" - sha256: "8d6aa7d77ad0abb35bb6139cb9a33597ac4c5b33da6a004ae42429b8598c9605" - "3.2": - url: "https://github.com/nemtrif/utfcpp/archive/v3.2.tar.gz" - sha256: "cd4f9a66d23dc385bd7ea11bc0abfda8ea1ad1dcf5cd6d3a27bc551e86436364" "3.1.2": url: "https://github.com/nemtrif/utfcpp/archive/v3.1.2.tar.gz" sha256: "fea3bfa39fb8bd7368077ea5e1e0db9a8951f7e6fb6d9400b00ab3d92b807c6d" - "3.1.1": - url: "https://github.com/nemtrif/utfcpp/archive/v3.1.1.tar.gz" - sha256: "33496a4c3cc2de80e9809c4997052331af5fb32079f43ab4d667cd48c3a36e88" - "3.1": - url: "https://github.com/nemtrif/utfcpp/archive/v3.1.tar.gz" - sha256: "ab531c3fd5d275150430bfaca01d7d15e017a188183be932322f2f651506b096" diff --git a/recipes/utfcpp/all/conanfile.py b/recipes/utfcpp/all/conanfile.py index 247b54396ade2..23b9e402630b2 100644 --- a/recipes/utfcpp/all/conanfile.py +++ b/recipes/utfcpp/all/conanfile.py @@ -9,27 +9,24 @@ class UtfCppConan(ConanFile): name = "utfcpp" - url = "https://github.com/conan-io/conan-center-index" - homepage = "https://github.com/nemtrif/utfcpp" description = "UTF-8 with C++ in a Portable Way" - topics = ("utf", "utf8", "unicode", "text") license = "BSL-1.0" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/nemtrif/utfcpp" + topics = ("utf", "utf8", "unicode", "text", "header-only") package_type = "header-library" settings = "os", "arch", "compiler", "build_type" no_copy_source = True - def package_id(self): - self.info.clear() - def layout(self): basic_layout(self, src_folder="src") + def package_id(self): + self.info.clear() + def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) - def build(self): - pass - def package(self): copy(self, "LICENSE", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) copy(self, "*.h", src=os.path.join(self.source_folder, "source"), diff --git a/recipes/utfcpp/all/test_package/conanfile.py b/recipes/utfcpp/all/test_package/conanfile.py index d120a992c06a6..8a5bb47f50c4c 100644 --- a/recipes/utfcpp/all/test_package/conanfile.py +++ b/recipes/utfcpp/all/test_package/conanfile.py @@ -7,6 +7,7 @@ class TestPackageConan(ConanFile): settings = "os", "arch", "compiler", "build_type" generators = "CMakeToolchain", "CMakeDeps", "VirtualRunEnv" + test_type = "explicit" def requirements(self): self.requires(self.tested_reference_str) diff --git a/recipes/utfcpp/config.yml b/recipes/utfcpp/config.yml index 46e4658742975..93af14ff8ed78 100644 --- a/recipes/utfcpp/config.yml +++ b/recipes/utfcpp/config.yml @@ -1,4 +1,6 @@ versions: + "4.0.5": + folder: all "4.0.4": folder: all "4.0.1": @@ -7,19 +9,7 @@ versions: folder: all "3.2.5": folder: all - "3.2.4": - folder: all "3.2.3": folder: all - "3.2.2": - folder: all - "3.2.1": - folder: all - "3.2": - folder: all "3.1.2": folder: all - "3.1.1": - folder: all - "3.1": - folder: all diff --git a/recipes/util-linux-libuuid/all/conanfile.py b/recipes/util-linux-libuuid/all/conanfile.py index 0a90fad2ce052..33b4289d276d1 100644 --- a/recipes/util-linux-libuuid/all/conanfile.py +++ b/recipes/util-linux-libuuid/all/conanfile.py @@ -23,10 +23,12 @@ class UtilLinuxLibuuidConan(ConanFile): options = { "shared": [True, False], "fPIC": [True, False], + "with_python_bindings": [True, False], } default_options = { "shared": False, "fPIC": True, + "with_python_bindings": True, } @property @@ -82,6 +84,8 @@ def generate(self): tc = AutotoolsToolchain(self) tc.configure_args.append("--disable-all-programs") tc.configure_args.append("--enable-libuuid") + if not self.options.with_python_bindings: + tc.configure_args.append("--without-python") if self._has_sys_file_header: tc.extra_defines.append("HAVE_SYS_FILE_H") if "x86" in self.settings.arch: diff --git a/recipes/uvw/all/conandata.yml b/recipes/uvw/all/conandata.yml index f88dde6763845..9e2f0333781b4 100644 --- a/recipes/uvw/all/conandata.yml +++ b/recipes/uvw/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "3.4.0": + url: "https://github.com/skypjack/uvw/archive/v3.4.0_libuv_v1.48.tar.gz" + sha256: "c16600573871a5feeb524234b378ab832c8971b2a68d030c6bd0e3077d416ade" "3.3.0": url: "https://github.com/skypjack/uvw/archive/v3.3.0_libuv_v1.47.tar.gz" sha256: "aabb17d3d8f0b3481b44e981c889dd4a2a6a3f1a96a4d01055e669f4b7d37d0e" @@ -17,3 +20,11 @@ sources: "2.10.0": url: "https://github.com/skypjack/uvw/archive/v2.10.0_libuv_v1.42.tar.gz" sha256: "30b0ba97a94d5e652490c6b1b32c95e608263f21cf3bc606308d09b3e3a114bf" +libuv_version_mapping: + "3.4.0": "1.48.0" + "3.3.0": "1.47.0" + "3.2.0": "1.46.0" + "3.1.0": "1.45.0" + "2.12.1": "1.44.2" + "2.11.0": "1.43.0" + "2.10.0": "1.42.0" diff --git a/recipes/uvw/all/conanfile.py b/recipes/uvw/all/conanfile.py index fc221de9ee0df..b1ed6df28cbd3 100644 --- a/recipes/uvw/all/conanfile.py +++ b/recipes/uvw/all/conanfile.py @@ -37,14 +37,7 @@ def _compilers_minimum_version(self): @property def _required_libuv_version(self): - return { - "3.3.0": "1.47.0", - "3.2.0": "1.46.0", - "3.1.0": "1.45.0", - "2.12.1": "1.44.2", - "2.11.0": "1.43.0", - "2.10.0": "1.42.0", - }[self.version] + return self.conan_data["libuv_version_mapping"][self.version] def layout(self): basic_layout(self, src_folder="src") diff --git a/recipes/uvw/config.yml b/recipes/uvw/config.yml index 7b4a0bac4b71c..652dbe6c9d518 100644 --- a/recipes/uvw/config.yml +++ b/recipes/uvw/config.yml @@ -1,4 +1,6 @@ versions: + "3.4.0": + folder: "all" "3.3.0": folder: "all" "3.2.0": diff --git a/recipes/uwebsockets/all/conandata.yml b/recipes/uwebsockets/all/conandata.yml index 85952f5a23966..d785e8d1b3db4 100644 --- a/recipes/uwebsockets/all/conandata.yml +++ b/recipes/uwebsockets/all/conandata.yml @@ -1,28 +1,26 @@ sources: + "20.70.0": + url: "https://github.com/uNetworking/uWebSockets/archive/v20.70.0.tar.gz" + sha256: "39a7e32182df2da02955ab1c1681af9710c82115075f4caabb8689a2c04460b9" + "20.68.0": + url: "https://github.com/uNetworking/uWebSockets/archive/v20.68.0.tar.gz" + sha256: "02dd1dd2925c639c01222d19f4ddd6fe12261571bcb3befc7eedaf8fa75c008f" + "20.67.0": + url: "https://github.com/uNetworking/uWebSockets/archive/v20.67.0.tar.gz" + sha256: "8124bb46326f81d99ad3552b7a3bf78489784d3660fb60d7fe5f5337a21203a3" + "20.66.0": + url: "https://github.com/uNetworking/uWebSockets/archive/v20.66.0.tar.gz" + sha256: "54d1a8cfb46e1814e1525e9bc72a4652aa708f352e55f35ef4b55804c98bfee1" + "20.65.0": + url: "https://github.com/uNetworking/uWebSockets/archive/v20.65.0.tar.gz" + sha256: "e261f7c124b3b9e217fc766d6e51d4fdc4b227aa52c7a0ca5952a9e65cea4213" + "20.64.0": + url: "https://github.com/uNetworking/uWebSockets/archive/v20.64.0.tar.gz" + sha256: "bb81fa773dcbd6bc738904ad496554fd131a33269570e0e86fa09213d82ba9ef" + "20.63.0": + url: "https://github.com/uNetworking/uWebSockets/archive/v20.63.0.tar.gz" + sha256: "3bcb3fab4242d312e227b05f34e21d8468960e5eea59e12799aa21a94f1b2b1f" + # keep 20.62.0, the last version to provide C-API "20.62.0": url: "https://github.com/uNetworking/uWebSockets/archive/v20.62.0.tar.gz" sha256: "03dfc8037cf43856a41e64bbc7fc5a7cf5e6369c9158682753074ecbbe09eed1" - "20.60.0": - url: "https://github.com/uNetworking/uWebSockets/archive/v20.60.0.tar.gz" - sha256: "eb72223768f93d40038181653ee5b59a53736448a6ff4e8924fd56b2fcdc00db" - "20.58.0": - url: "https://github.com/uNetworking/uWebSockets/archive/v20.58.0.tar.gz" - sha256: "f71ca310cc5c39b12f56db1cf85727ee4d0f03fdf019a9e14ef4ba08addc6077" - "20.57.0": - url: "https://github.com/uNetworking/uWebSockets/archive/v20.57.0.tar.gz" - sha256: "82d15eea0889a6b73c6e6170dd506995162bddfc7565c6df2c2d1e8287bbb9b0" - "20.56.0": - url: "https://github.com/uNetworking/uWebSockets/archive/v20.56.0.tar.gz" - sha256: "bbac3e317eabf4e558dffe9bfeab4f5ae2d23affcc6df54fb8e580a9e0372767" - "20.55.0": - url: "https://github.com/uNetworking/uWebSockets/archive/v20.55.0.tar.gz" - sha256: "bf6b22229fcd10c7cbd256bfd9abf31c829d44eefd56341c0f404e0fa0184f2f" - "20.53.0": - url: "https://github.com/uNetworking/uWebSockets/archive/v20.53.0.tar.gz" - sha256: "324b857e787a472bd258aaa66f5ceeac6b01ebc41bbb423fff71559d72872783" - "19.3.0": - url: "https://github.com/uNetworking/uWebSockets/archive/v19.3.0.tar.gz" - sha256: "6f709b4e5fe053a94a952da93c07c919b36bcb8c838c69067560ae85f97c5621" - "18.3.0": - url: "https://github.com/uNetworking/uWebSockets/archive/v18.3.0.tar.gz" - sha256: "f51317e2a8cd743e6ff9dfd215569824eaca489c24f7d8fd94eaca44443a9728" diff --git a/recipes/uwebsockets/all/conanfile.py b/recipes/uwebsockets/all/conanfile.py index 27af62e1db549..e4cc307e9cf27 100644 --- a/recipes/uwebsockets/all/conanfile.py +++ b/recipes/uwebsockets/all/conanfile.py @@ -36,31 +36,20 @@ def _compilers_minimum_version(self): return { "Visual Studio": "15", "msvc": "191", - "gcc": "7" if Version(self.version) < "20.11.0" else "8", - "clang": "5" if Version(self.version) < "20.11.0" else "7", + "gcc": "8", + "clang": "7", "apple-clang": "10", } - def config_options(self): - # libdeflate is not supported before 19.0.0 - if Version(self.version) < "19.0.0": - del self.options.with_libdeflate - def layout(self): basic_layout(self, src_folder="src") def requirements(self): if self.options.with_zlib: self.requires("zlib/[>=1.2.11 <2]") - if self.options.get_safe("with_libdeflate"): + if self.options.with_libdeflate: self.requires("libdeflate/1.19") - - if Version(self.version) > "20.17.0": - self.requires("usockets/0.8.8") - elif Version(self.version) >= "19.0.0": - self.requires("usockets/0.8.1") - else: - self.requires("usockets/0.4.0") + self.requires("usockets/0.8.8") def package_id(self): self.info.clear() @@ -74,7 +63,7 @@ def validate(self): f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." ) - if Version(self.version) >= "20.14.0" and self.settings.compiler == "clang" and str(self.settings.compiler.libcxx) == "libstdc++": + if self.settings.compiler == "clang" and str(self.settings.compiler.libcxx) == "libstdc++": raise ConanInvalidConfiguration(f"{self.ref} needs recent libstdc++ with charconv.") def source(self): @@ -101,7 +90,7 @@ def package_info(self): if not self.options.with_zlib: self.cpp_info.defines.append("UWS_NO_ZLIB") - if self.options.get_safe("with_libdeflate"): + if self.options.with_libdeflate: self.cpp_info.defines.append("UWS_USE_LIBDEFLATE") self.cpp_info.includedirs.append(os.path.join("include", "uWebSockets")) diff --git a/recipes/uwebsockets/config.yml b/recipes/uwebsockets/config.yml index c2e19d13ebc2e..11fa83a523312 100644 --- a/recipes/uwebsockets/config.yml +++ b/recipes/uwebsockets/config.yml @@ -1,19 +1,17 @@ versions: - "20.62.0": - folder: all - "20.60.0": + "20.70.0": folder: all - "20.58.0": + "20.68.0": folder: all - "20.57.0": + "20.67.0": folder: all - "20.56.0": + "20.66.0": folder: all - "20.55.0": + "20.65.0": folder: all - "20.53.0": + "20.64.0": folder: all - "19.3.0": + "20.63.0": folder: all - "18.3.0": + "20.62.0": folder: all diff --git a/recipes/valijson/all/conandata.yml b/recipes/valijson/all/conandata.yml index 9c69d92d45720..3db6eca065b46 100644 --- a/recipes/valijson/all/conandata.yml +++ b/recipes/valijson/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.0.3": + url: "https://github.com/tristanpenman/valijson/archive/v1.0.3.tar.gz" + sha256: "0fbd3cd2312b441c6373ee116e9a162c400f9e3cd79f6b32665cdd22fa11ac3f" "1.0.2": url: "https://github.com/tristanpenman/valijson/archive/v1.0.2.tar.gz" sha256: "35d86e54fc727f1265226434dc996e33000a570f833537a25c8b702b0b824431" diff --git a/recipes/valijson/config.yml b/recipes/valijson/config.yml index 2244034e46866..b8be269bc2d5e 100644 --- a/recipes/valijson/config.yml +++ b/recipes/valijson/config.yml @@ -1,4 +1,6 @@ versions: + "1.0.3": + folder: "all" "1.0.2": folder: "all" "1.0.1": diff --git a/recipes/vigra/all/conandata.yml b/recipes/vigra/all/conandata.yml new file mode 100644 index 0000000000000..1d74fa25b7f22 --- /dev/null +++ b/recipes/vigra/all/conandata.yml @@ -0,0 +1,9 @@ +sources: + "1.11.2": + url: "https://github.com/ukoethe/vigra/archive/refs/tags/Version-1-11-2.tar.gz" + sha256: "4841936f5c3c137611ec782e293d961df29d3b5b70ade8cb711374de0f4cb5d3" +patches: + "1.11.2": + - patch_file: "patches/1.11.2-001-disable_doc_build.patch" + patch_description: "enable build to proceed when documentation is disabled" + patch_type: "conan" diff --git a/recipes/vigra/all/conanfile.py b/recipes/vigra/all/conanfile.py new file mode 100644 index 0000000000000..0ac9a204a6384 --- /dev/null +++ b/recipes/vigra/all/conanfile.py @@ -0,0 +1,123 @@ +import os +from conan import ConanFile +from conan.tools.build import check_min_cppstd +from conan.tools.cmake import CMakeDeps, CMakeToolchain, CMake, cmake_layout +from conan.tools.files import get, export_conandata_patches, apply_conandata_patches, rm, copy, replace_in_file + + +class VigraConan(ConanFile): + name = "vigra" + description = "A generic C++ library for image analysis" + license = "MIT" + url = "https://github.com/conan-io/conan-center-index" + homepage = "http://ukoethe.github.io/vigra/" + package_type = "library" + settings = "os", "arch", "compiler", "build_type" + topics = "image-processing", "computer-vision" + + options = { + "shared": [True, False], + "fPIC": [True, False], + "with_hdf5": [True, False], + "with_openexr": [True, False], + "with_boost_graph": [True, False], + "with_lemon": [True, False], + } + + default_options = { + "shared": False, + "fPIC": True, + "with_hdf5": True, + "with_openexr": True, + "with_boost_graph": True, + "with_lemon": True, + } + + def export_sources(self): + export_conandata_patches(self) + + def source(self): + get(self, **self.conan_data["sources"][self.version], + destination=self.source_folder, strip_root=True) + + apply_conandata_patches(self) + replace_in_file( + self, + os.path.join(self.source_folder, "src", "impex", "CMakeLists.txt"), + 'SOVERSION ${SOVERSION} INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}"', + 'SOVERSION ${SOVERSION} INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}" INSTALL_NAME_DIR "@rpath"' + ) + + def layout(self): + cmake_layout(self, src_folder="src") + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + + def requirements(self): + self.requires("libtiff/4.6.0") + self.requires("libpng/[>=1.6 <2]") + self.requires("fftw/3.3.10") + self.requires("zlib/[>=1.2.11 <2]") + self.requires("libjpeg/9e") + + if self.options.with_hdf5: + self.requires("hdf5/1.14.3") + + if self.options.with_openexr: + self.requires("openexr/3.2.4") + self.requires("imath/3.1.9") + + if self.options.with_boost_graph: + self.requires("boost/1.85.0") + + if self.options.with_lemon: + self.requires("coin-lemon/1.3.1") + + def validate(self): + if self.settings.compiler.cppstd: + check_min_cppstd(self, 11) + + def generate(self): + tc = CMakeToolchain(self) + tc.cache_variables["WITH_VIGRANUMPY"] = False + tc.cache_variables["BUILD_DOCS"] = False + tc.cache_variables["BUILD_TESTS"] = False + + tc.cache_variables["WITH_OPENEXR"] = self.options.with_openexr + tc.cache_variables["WITH_BOOST_GRAPH"] = self.options.with_boost_graph + tc.cache_variables["WITH_LEMON"] = self.options.with_lemon + + tc.cache_variables["VIGRA_STATIC_LIB"] = not self.options.shared + tc.generate() + + deps = CMakeDeps(self) + deps.generate() + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def package(self): + copy(self, "LICENSE.txt", self.source_folder, os.path.join(self.package_folder, "licenses")) + cm = CMake(self) + cm.install() + rm(self, "*.cmake", self.package_folder, recursive=True) + #fix_apple_shared_install_name(self) + + def package_info(self): + if not self.options.shared: + self.cpp_info.defines = ["VIGRA_STATIC_LIB"] + + self.cpp_info.libs = ["vigraimpex"] + self.cpp_info.set_property("cmake_file_name", "Vigra") + self.cpp_info.set_property("cmake_target_name", "vigraimpex") + + if self.settings.os == "Windows": + self.cpp_info.system_libs.append("shlwapi") diff --git a/recipes/vigra/all/patches/1.11.2-001-disable_doc_build.patch b/recipes/vigra/all/patches/1.11.2-001-disable_doc_build.patch new file mode 100644 index 0000000000000..322479285c3dd --- /dev/null +++ b/recipes/vigra/all/patches/1.11.2-001-disable_doc_build.patch @@ -0,0 +1,13 @@ +Index: CMakeLists.txt +=================================================================== +--- CMakeLists.txt ++++ CMakeLists.txt +@@ -341,7 +341,7 @@ add_custom_target(PACKAGE_SRC_TAR + COMMENT "Creating ${PROJECT_BINARY_DIR}/vigra-${vigra_version}-src.tar.gz") + + ADD_DEPENDENCIES(PACKAGE_SRC_TAR check) +-ADD_DEPENDENCIES(PACKAGE_SRC_TAR doc_cpp) ++#ADD_DEPENDENCIES(PACKAGE_SRC_TAR doc_cpp) + IF(WITH_VIGRANUMPY AND PYTHON_SPHINX) + ADD_DEPENDENCIES(PACKAGE_SRC_TAR doc_python) + ENDIF() diff --git a/recipes/vigra/all/test_package/CMakeLists.txt b/recipes/vigra/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..8063e47f90875 --- /dev/null +++ b/recipes/vigra/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) + +find_package(Vigra REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE vigraimpex) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) diff --git a/recipes/vigra/all/test_package/conanfile.py b/recipes/vigra/all/test_package/conanfile.py new file mode 100644 index 0000000000000..4385dcaa88926 --- /dev/null +++ b/recipes/vigra/all/test_package/conanfile.py @@ -0,0 +1,25 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import CMake, cmake_layout +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + + def layout(self): + cmake_layout(self) + + def requirements(self): + self.requires(self.tested_reference_str) + + def build(self): + cm = CMake(self) + cm.configure() + cm.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/vigra/all/test_package/test_package.cpp b/recipes/vigra/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..84b2dc0869089 --- /dev/null +++ b/recipes/vigra/all/test_package/test_package.cpp @@ -0,0 +1,18 @@ +#include +#include +#include + +using std::cout; +using std::endl; + +using namespace vigra; + +int main() +{ + cout << "creating a fixed size vigra array.." << endl; + + vigra::TinyVector arr = {1.1, 2.2, 3.3, 4.4, 5.5}; + + cout << "formats supported: " << endl; + cout << impexListFormats() << endl; +} diff --git a/recipes/vigra/config.yml b/recipes/vigra/config.yml new file mode 100644 index 0000000000000..68804c58d126a --- /dev/null +++ b/recipes/vigra/config.yml @@ -0,0 +1,3 @@ +versions: + "1.11.2": + folder: all diff --git a/recipes/vincentlaucsb-csv-parser/all/conandata.yml b/recipes/vincentlaucsb-csv-parser/all/conandata.yml index 1e001077318d9..ec36bbdac4426 100644 --- a/recipes/vincentlaucsb-csv-parser/all/conandata.yml +++ b/recipes/vincentlaucsb-csv-parser/all/conandata.yml @@ -1,4 +1,13 @@ sources: + "2.3.0": + url: "https://github.com/vincentlaucsb/csv-parser/archive/refs/tags/2.3.0.tar.gz" + sha256: "27b8ac51aa58b9a4debd8ccfb44738c8583a2e874da42f56bbdf3764b75f3af5" + "2.2.3": + url: "https://github.com/vincentlaucsb/csv-parser/archive/refs/tags/2.2.3.tar.gz" + sha256: "e70ea75612fb45f9a9dd83145fb3fbf0b5929a32683de478ad429cdd85f10e4e" + "2.2.2": + url: "https://github.com/vincentlaucsb/csv-parser/archive/refs/tags/2.2.2.tar.gz" + sha256: "8d7720021d19cf03880eb768d82d7f7e0a240b6d564bc6b495fceb4775b8f0c7" "2.2.0": url: "https://github.com/vincentlaucsb/csv-parser/archive/refs/tags/2.2.0.tar.gz" sha256: "027fd894c5e6a59f5afcedd6cc071364611df5f35fcc6fc4a8e193712b2f1e73" diff --git a/recipes/vincentlaucsb-csv-parser/all/conanfile.py b/recipes/vincentlaucsb-csv-parser/all/conanfile.py index eb5f85b4e4c16..02f230bb6cf6b 100644 --- a/recipes/vincentlaucsb-csv-parser/all/conanfile.py +++ b/recipes/vincentlaucsb-csv-parser/all/conanfile.py @@ -5,6 +5,7 @@ from conan.tools.build import check_min_cppstd from conan.tools.files import copy, get from conan.tools.scm import Version +from conan.tools.layout import basic_layout required_conan_version = ">=1.52.0" @@ -12,26 +13,44 @@ class VincentlaucsbCsvParserConan(ConanFile): name = "vincentlaucsb-csv-parser" description = "Vince's CSV Parser with simple and intuitive syntax" - topics = ("conan", "csv-parser", "csv", "rfc 4180", "parser", "generator") + license = "MIT" url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/vincentlaucsb/csv-parser" - license = "MIT" - settings = "os", "compiler" + topics = ("csv", "rfc 4180", "parser", "generator", "header-only") package_type = "header-library" + settings = "os", "arch", "compiler", "build_type" no_copy_source = True - def validate(self): - # C++17 recommended: https://github.com/vincentlaucsb/csv-parser/blob/2.1.3/README.md - if self.settings.compiler.get_safe("cppstd"): - check_min_cppstd(self, 14) - compiler = self.settings.compiler - compiler_version = Version(self.settings.compiler.version) - if compiler == "gcc" and compiler_version < "7": - raise ConanInvalidConfiguration("gcc version < 7 not supported") + @property + def _min_cppstd(self): + return 14 + + @property + def _compilers_minimum_version(self): + return { + "apple-clang": "10", + "clang": "7", + "gcc": "7", + "msvc": "191", + "Visual Studio": "15", + } + + def layout(self): + basic_layout(self, src_folder="src") def package_id(self): self.info.clear() + def validate(self): + # C++17 recommended: https://github.com/vincentlaucsb/csv-parser/blob/2.1.3/README.md + if self.settings.compiler.get_safe("cppstd"): + check_min_cppstd(self, self._min_cppstd) + minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) + if minimum_version and Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration( + f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." + ) + def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) diff --git a/recipes/vincentlaucsb-csv-parser/config.yml b/recipes/vincentlaucsb-csv-parser/config.yml index 46709ccf896d9..0aa8e836c3b2f 100644 --- a/recipes/vincentlaucsb-csv-parser/config.yml +++ b/recipes/vincentlaucsb-csv-parser/config.yml @@ -1,4 +1,10 @@ versions: + "2.3.0": + folder: all + "2.2.3": + folder: all + "2.2.2": + folder: all "2.2.0": folder: all "2.1.3": diff --git a/recipes/vir-simd/all/conandata.yml b/recipes/vir-simd/all/conandata.yml index f9462ed3ee48f..00b8471475e1b 100644 --- a/recipes/vir-simd/all/conandata.yml +++ b/recipes/vir-simd/all/conandata.yml @@ -1,4 +1,10 @@ sources: + "0.3.1": + url: "https://github.com/mattkretz/vir-simd/archive/refs/tags/v0.3.1.tar.gz" + sha256: "552b80773a72db2ec2c82fd8fa70211c0fe8a7a3aa9dd7003541d99ff886a360" + "0.3.0": + url: "https://github.com/mattkretz/vir-simd/archive/refs/tags/v0.3.0.tar.gz" + sha256: "545c8c3254d8369fa01b2a5f8c674a8cb2703340eff63bca352bcd6d7147728f" "0.2.0": url: "https://github.com/mattkretz/vir-simd/archive/refs/tags/v0.2.0.tar.gz" sha256: "197432196ec73009051188ba686124a469d75d639fc5408613b30ed2981f0b70" diff --git a/recipes/vir-simd/config.yml b/recipes/vir-simd/config.yml index 88f0acde73637..a996ca7a9b498 100644 --- a/recipes/vir-simd/config.yml +++ b/recipes/vir-simd/config.yml @@ -1,4 +1,8 @@ versions: # Newer versions at the top + "0.3.1": + folder: all + "0.3.0": + folder: all "0.2.0": folder: all diff --git a/recipes/volk/all/conandata.yml b/recipes/volk/all/conandata.yml index ca101fd03c2bd..5f8a920ef96d6 100644 --- a/recipes/volk/all/conandata.yml +++ b/recipes/volk/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.3.296.0": + url: "https://github.com/zeux/volk/archive/refs/tags/vulkan-sdk-1.3.296.0.tar.gz" + sha256: "8ffd0e81e29688f4abaa39e598937160b098228f37503903b10d481d4862ab85" "1.3.268.0": url: "https://github.com/zeux/volk/archive/refs/tags/vulkan-sdk-1.3.268.0.tar.gz" sha256: "f1d30fac1cdc17a8fdc8c69f371663547f92db99cfd612962190bb1e2c8ce74d" diff --git a/recipes/volk/all/conanfile.py b/recipes/volk/all/conanfile.py index ec73b65420573..d15dc5ab17016 100644 --- a/recipes/volk/all/conanfile.py +++ b/recipes/volk/all/conanfile.py @@ -59,16 +59,25 @@ def generate(self): def _patch_sources(self): cmakelists = os.path.join(self.source_folder, "CMakeLists.txt") - replace_in_file(self, cmakelists, "find_package(Vulkan QUIET)", "find_package(VulkanHeaders REQUIRED)") + if Version(self.version) < "1.3.296": + replace_in_file(self, cmakelists, "find_package(Vulkan QUIET)", "find_package(VulkanHeaders REQUIRED)") + if Version(self.version) < "1.3.261": replace_in_file(self, cmakelists, "Vulkan::Vulkan", "Vulkan::Headers") - else: + elif Version(self.version) < "1.3.296": replace_in_file( self, cmakelists, "if(VULKAN_HEADERS_INSTALL_DIR)", "if(1)\nset(VOLK_INCLUDES ${VulkanHeaders_INCLUDE_DIRS})\nelseif(VULKAN_HEADERS_INSTALL_DIR)", ) + else: + replace_in_file( + self, + cmakelists, + "if(VULKAN_HEADERS_INSTALL_DIR)", + "if(1)\nfind_package(VulkanHeaders REQUIRED)\nset(VOLK_INCLUDES ${VulkanHeaders_INCLUDE_DIRS})\nelseif(VULKAN_HEADERS_INSTALL_DIR)", + ) def build(self): self._patch_sources() diff --git a/recipes/volk/config.yml b/recipes/volk/config.yml index 76e46074dd1b4..a4fde06481cb0 100644 --- a/recipes/volk/config.yml +++ b/recipes/volk/config.yml @@ -1,4 +1,6 @@ versions: + "1.3.296.0": + folder: "all" "1.3.268.0": folder: "all" "1.3.261.1": diff --git a/recipes/vorbis/all/test_package/8kadpcm.wav b/recipes/vorbis/all/test_package/8kadpcm.wav deleted file mode 100644 index 40a362222bc7a..0000000000000 Binary files a/recipes/vorbis/all/test_package/8kadpcm.wav and /dev/null differ diff --git a/recipes/vorbis/all/test_package/conanfile.py b/recipes/vorbis/all/test_package/conanfile.py index 327c8dd400306..3a8c6c5442b33 100644 --- a/recipes/vorbis/all/test_package/conanfile.py +++ b/recipes/vorbis/all/test_package/conanfile.py @@ -22,6 +22,4 @@ def build(self): def test(self): if not cross_building(self): bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") - in_wav_path = os.path.join(self.source_folder, "8kadpcm.wav") - out_ogg_path = os.path.join(self.cpp.build.bindirs[0], "sample.ogg") - self.run(f"{bin_path} < {in_wav_path} > {out_ogg_path}", env="conanrun") + self.run(bin_path, env="conanrun") diff --git a/recipes/vorbis/all/test_package/test_package.c b/recipes/vorbis/all/test_package/test_package.c index d8d92bc3cbff7..794aa0d6e61b5 100644 --- a/recipes/vorbis/all/test_package/test_package.c +++ b/recipes/vorbis/all/test_package/test_package.c @@ -1,252 +1,7 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * - * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * - * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * - * * - * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2007 * - * by the Xiph.Org Foundation http://www.xiph.org/ * - * * - ******************************************************************** - - function: simple example encoder - last mod: $Id$ - - ********************************************************************/ - -/* takes a stereo 16bit 44.1kHz WAV file from stdin and encodes it into - a Vorbis bitstream */ - -/* Note that this is POSIX, not ANSI, code */ - #include -#include -#include -#include -#include #include -#ifdef _WIN32 /* We need the following two to set stdin/stdout to binary */ -#include -#include -#endif - -#if defined(__MACOS__) && defined(__MWERKS__) -#include /* CodeWarrior's Mac "command-line" support */ -#endif - -#define READ 1024 -signed char readbuffer[READ*4+44]; /* out of the data segment, not the stack */ - int main(){ - ogg_stream_state os; /* take physical pages, weld into a logical - stream of packets */ - ogg_page og; /* one Ogg bitstream page. Vorbis packets are inside */ - ogg_packet op; /* one raw packet of data for decode */ - - vorbis_info vi; /* struct that stores all the static vorbis bitstream - settings */ - vorbis_comment vc; /* struct that stores all the user comments */ - - vorbis_dsp_state vd; /* central working state for the packet->PCM decoder */ - vorbis_block vb; /* local working space for packet->PCM decode */ - - int eos=0,ret; - int i, founddata; - -#if defined(macintosh) && defined(__MWERKS__) - int argc = 0; - char **argv = NULL; - argc = ccommand(&argv); /* get a "command line" from the Mac user */ - /* this also lets the user set stdin and stdout */ -#endif - - /* we cheat on the WAV header; we just bypass 44 bytes (simplest WAV - header is 44 bytes) and assume that the data is 44.1khz, stereo, 16 bit - little endian pcm samples. This is just an example, after all. */ - -#ifdef _WIN32 /* We need to set stdin/stdout to binary mode. Damn windows. */ - /* if we were reading/writing a file, it would also need to in - binary mode, eg, fopen("file.wav","wb"); */ - /* Beware the evil ifdef. We avoid these where we can, but this one we - cannot. Don't add any more, you'll probably go to hell if you do. */ - _setmode( _fileno( stdin ), _O_BINARY ); - _setmode( _fileno( stdout ), _O_BINARY ); -#endif - - - /* we cheat on the WAV header; we just bypass the header and never - verify that it matches 16bit/stereo/44.1kHz. This is just an - example, after all. */ - - readbuffer[0] = '\0'; - for (i=0, founddata=0; i<30 && ! feof(stdin) && ! ferror(stdin); i++) - { - fread(readbuffer,1,2,stdin); - - if ( ! strncmp((char*)readbuffer, "da", 2) ){ - founddata = 1; - fread(readbuffer,1,6,stdin); - break; - } - } - - /********** Encode setup ************/ - - vorbis_info_init(&vi); - - /* choose an encoding mode. A few possibilities commented out, one - actually used: */ - - /********************************************************************* - Encoding using a VBR quality mode. The usable range is -.1 - (lowest quality, smallest file) to 1. (highest quality, largest file). - Example quality mode .4: 44kHz stereo coupled, roughly 128kbps VBR - - ret = vorbis_encode_init_vbr(&vi,2,44100,.4); - - --------------------------------------------------------------------- - - Encoding using an average bitrate mode (ABR). - example: 44kHz stereo coupled, average 128kbps VBR - - ret = vorbis_encode_init(&vi,2,44100,-1,128000,-1); - - --------------------------------------------------------------------- - - Encode using a quality mode, but select that quality mode by asking for - an approximate bitrate. This is not ABR, it is true VBR, but selected - using the bitrate interface, and then turning bitrate management off: - - ret = ( vorbis_encode_setup_managed(&vi,2,44100,-1,128000,-1) || - vorbis_encode_ctl(&vi,OV_ECTL_RATEMANAGE2_SET,NULL) || - vorbis_encode_setup_init(&vi)); - - *********************************************************************/ - - ret=vorbis_encode_init_vbr(&vi,2,44100,0.1); - - /* do not continue if setup failed; this can happen if we ask for a - mode that libVorbis does not support (eg, too low a bitrate, etc, - will return 'OV_EIMPL') */ - - if(ret)exit(1); - - /* add a comment */ + vorbis_comment vc; vorbis_comment_init(&vc); - vorbis_comment_add_tag(&vc,"ENCODER","encoder_example.c"); - - /* set up the analysis state and auxiliary encoding storage */ - vorbis_analysis_init(&vd,&vi); - vorbis_block_init(&vd,&vb); - - /* set up our packet->stream encoder */ - /* pick a random serial number; that way we can more likely build - chained streams just by concatenation */ - srand(time(NULL)); - ogg_stream_init(&os,rand()); - - /* Vorbis streams begin with three headers; the initial header (with - most of the codec setup parameters) which is mandated by the Ogg - bitstream spec. The second header holds any comment fields. The - third header holds the bitstream codebook. We merely need to - make the headers, then pass them to libvorbis one at a time; - libvorbis handles the additional Ogg bitstream constraints */ - - { - ogg_packet header; - ogg_packet header_comm; - ogg_packet header_code; - - vorbis_analysis_headerout(&vd,&vc,&header,&header_comm,&header_code); - ogg_stream_packetin(&os,&header); /* automatically placed in its own - page */ - ogg_stream_packetin(&os,&header_comm); - ogg_stream_packetin(&os,&header_code); - - /* This ensures the actual - * audio data will start on a new page, as per spec - */ - while(!eos){ - int result=ogg_stream_flush(&os,&og); - if(result==0)break; - fwrite(og.header,1,og.header_len,stdout); - fwrite(og.body,1,og.body_len,stdout); - } - - } - - while(!eos){ - long i; - long bytes=fread(readbuffer,1,READ*4,stdin); /* stereo hardwired here */ - - if(bytes==0){ - /* end of file. this can be done implicitly in the mainline, - but it's easier to see here in non-clever fashion. - Tell the library we're at end of stream so that it can handle - the last frame and mark end of stream in the output properly */ - vorbis_analysis_wrote(&vd,0); - - }else{ - /* data to encode */ - - /* expose the buffer to submit data */ - float **buffer=vorbis_analysis_buffer(&vd,READ); - - /* uninterleave samples */ - for(i=0;i {out_ogg_path}", run_environment=True) + self.run(bin_path, run_environment=True) diff --git a/recipes/vulkan-headers/all/conandata.yml b/recipes/vulkan-headers/all/conandata.yml index a2e54aa68230e..6aa8cd0d34424 100644 --- a/recipes/vulkan-headers/all/conandata.yml +++ b/recipes/vulkan-headers/all/conandata.yml @@ -1,4 +1,10 @@ sources: + "1.3.296.0": + url: "https://github.com/KhronosGroup/Vulkan-Headers/archive/refs/tags/vulkan-sdk-1.3.296.0.tar.gz" + sha256: "1e872a0be3890784bbe68dcd89b7e017fed77ba95820841848718c98bda6dc33" + "1.3.290.0": + url: "https://github.com/KhronosGroup/Vulkan-Headers/archive/refs/tags/vulkan-sdk-1.3.290.0.tar.gz" + sha256: "5b186e1492d97c44102fe858fb9f222b55524a8b6da940a8795c9e326ae6d722" "1.3.268.0": url: "https://github.com/KhronosGroup/Vulkan-Headers/archive/refs/tags/vulkan-sdk-1.3.268.0.tar.gz" sha256: "94993cbe2b1a604c0d5d9ea37a767e1aba4d771d2bfd4ddceefd66243095164f" diff --git a/recipes/vulkan-headers/config.yml b/recipes/vulkan-headers/config.yml index 34a8efbe22307..dca330da68efa 100644 --- a/recipes/vulkan-headers/config.yml +++ b/recipes/vulkan-headers/config.yml @@ -1,4 +1,8 @@ versions: + "1.3.296.0": + folder: all + "1.3.290.0": + folder: all "1.3.268.0": folder: all "1.3.261.1": diff --git a/recipes/vulkan-loader/all/conandata.yml b/recipes/vulkan-loader/all/conandata.yml index b31ce6fd5b07a..ad7d56b8cab7b 100644 --- a/recipes/vulkan-loader/all/conandata.yml +++ b/recipes/vulkan-loader/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.3.290.0": + url: "https://github.com/KhronosGroup/Vulkan-Loader/archive/refs/tags/v1.3.290.tar.gz" + sha256: "a1f0d80c4ee448d4fa37d1d4a4c4cf1d6d0f5873d3ca6dffe2a9498e6e654142" "1.3.268.0": url: "https://github.com/KhronosGroup/Vulkan-Loader/archive/refs/tags/vulkan-sdk-1.3.268.0.tar.gz" sha256: "404fa621f1ab2731bcc68bcbff64d8c6de322faad2d87f9198641bd37255fd39" diff --git a/recipes/vulkan-loader/all/conanfile.py b/recipes/vulkan-loader/all/conanfile.py index d1e31f8184d88..27aeb7d2928a6 100644 --- a/recipes/vulkan-loader/all/conanfile.py +++ b/recipes/vulkan-loader/all/conanfile.py @@ -132,12 +132,13 @@ def _patch_sources(self): "if(${configuration} MATCHES \"/MD\")", "if(FALSE)") else: - replace_in_file( - self, - cmakelists, - "set(TESTS_STANDARD_CXX_PROPERTIES ${LOADER_STANDARD_CXX_PROPERTIES} MSVC_RUNTIME_LIBRARY \"MultiThreaded$<$:Debug>DLL\")", - "set(TESTS_STANDARD_CXX_PROPERTIES ${LOADER_STANDARD_CXX_PROPERTIES})", - ) + if Version(self.version) < "1.3.275": + replace_in_file( + self, + cmakelists, + "set(TESTS_STANDARD_CXX_PROPERTIES ${LOADER_STANDARD_CXX_PROPERTIES} MSVC_RUNTIME_LIBRARY \"MultiThreaded$<$:Debug>DLL\")", + "set(TESTS_STANDARD_CXX_PROPERTIES ${LOADER_STANDARD_CXX_PROPERTIES})", + ) replace_in_file( self, cmakelists, diff --git a/recipes/vulkan-loader/config.yml b/recipes/vulkan-loader/config.yml index a9f30cdd286b9..0254c0a572bb2 100644 --- a/recipes/vulkan-loader/config.yml +++ b/recipes/vulkan-loader/config.yml @@ -1,4 +1,6 @@ versions: + "1.3.290.0": + folder: all "1.3.268.0": folder: all "1.3.250.0": diff --git a/recipes/vulkan-validationlayers/all/conanfile.py b/recipes/vulkan-validationlayers/all/conanfile.py index 8d5cc5e6efcf4..9806017bf17ae 100644 --- a/recipes/vulkan-validationlayers/all/conanfile.py +++ b/recipes/vulkan-validationlayers/all/conanfile.py @@ -23,14 +23,16 @@ class VulkanValidationLayersConan(ConanFile): topics = ("vulkan", "validation-layers") homepage = "https://github.com/KhronosGroup/Vulkan-ValidationLayers" url = "https://github.com/conan-io/conan-center-index" - + package_type = "static-library" settings = "os", "arch", "compiler", "build_type" options = { + "fPIC": [True, False], "with_wsi_xcb": [True, False], "with_wsi_xlib": [True, False], "with_wsi_wayland": [True, False], } default_options = { + "fPIC": True, "with_wsi_xcb": True, "with_wsi_xlib": True, "with_wsi_wayland": True, @@ -90,6 +92,8 @@ def config_options(self): del self.options.with_wsi_xcb del self.options.with_wsi_xlib del self.options.with_wsi_wayland + if self.settings.os == "Windows": + del self.options.fPIC def layout(self): cmake_layout(self, src_folder="src") @@ -153,9 +157,13 @@ def generate(self): tc.variables["VULKAN_HEADERS_INSTALL_DIR"] = self.dependencies["vulkan-headers"].package_folder.replace("\\", "/") tc.variables["USE_CCACHE"] = False if self.settings.os in ["Linux", "FreeBSD"]: - tc.variables["BUILD_WSI_XCB_SUPPORT"] = self.options.with_wsi_xcb - tc.variables["BUILD_WSI_XLIB_SUPPORT"] = self.options.with_wsi_xlib - tc.variables["BUILD_WSI_WAYLAND_SUPPORT"] = self.options.with_wsi_wayland + tc.variables["BUILD_WSI_XCB_SUPPORT"] = self.options.get_safe("with_wsi_xcb") + tc.variables["BUILD_WSI_XLIB_SUPPORT"] = self.options.get_safe("with_wsi_xlib") + tc.variables["BUILD_WSI_WAYLAND_SUPPORT"] = self.options.get_safe("with_wsi_wayland") + elif self.settings.os == "Android": + tc.variables["BUILD_WSI_XCB_SUPPORT"] = False + tc.variables["BUILD_WSI_XLIB_SUPPORT"] = False + tc.variables["BUILD_WSI_WAYLAND_SUPPORT"] = False tc.variables["BUILD_WERROR"] = False tc.variables["BUILD_TESTS"] = False tc.variables["INSTALL_TESTS"] = False @@ -190,6 +198,14 @@ def _patch_sources(self): os.path.join(self.generators_folder, "SPIRV-ToolsConfig.cmake"), os.path.join(self.generators_folder, "SPIRV-Tools-optConfig.cmake"), ) + if self.settings.os == "Android": + # INFO: libVkLayer_utils.a: error: undefined symbol: __android_log_print + # https://github.com/KhronosGroup/Vulkan-ValidationLayers/commit/a26638ae9fdd8c40b56d4c7b72859a5b9a0952c9 + replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), + "VkLayer_utils PUBLIC Vulkan::Headers", "VkLayer_utils PUBLIC Vulkan::Headers -landroid -llog") + if not self.options.get_safe("fPIC"): + replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), + "CMAKE_POSITION_INDEPENDENT_CODE ON", "CMAKE_POSITION_INDEPENDENT_CODE OFF") def build(self): self._patch_sources() @@ -239,3 +255,6 @@ def package_info(self): # TODO: to remove after conan v2, it allows to not break consumers still relying on virtualenv generator self.env_info.VK_LAYER_PATH.append(vk_layer_path) + + if self.settings.os == "Android": + self.cpp_info.system_libs.extend(["android", "log"]) diff --git a/recipes/vvenc/all/conandata.yml b/recipes/vvenc/all/conandata.yml index a3832678cf3e2..cab7ae30015bb 100644 --- a/recipes/vvenc/all/conandata.yml +++ b/recipes/vvenc/all/conandata.yml @@ -1,4 +1,10 @@ sources: + "1.12.0": + url: "https://github.com/fraunhoferhhi/vvenc/archive/refs/tags/v1.12.0.tar.gz" + sha256: "e7311ffcc87d8fcc4b839807061cca1b89be017ae7c449a69436dc2dd07615c2" + "1.11.1": + url: "https://github.com/fraunhoferhhi/vvenc/archive/refs/tags/v1.11.1.tar.gz" + sha256: "4f0c8ac3f03eb970bee7a0cacc57a886ac511d58f081bb08ba4bce6f547d92fa" "1.10.0": url: "https://github.com/fraunhoferhhi/vvenc/archive/refs/tags/v1.10.0.tar.gz" sha256: "579e4b19de3b356a96ec436dbfeb3b9583cb0a854e55f81226990924a5cfd38c" diff --git a/recipes/vvenc/all/conanfile.py b/recipes/vvenc/all/conanfile.py index 50d169ed09a7f..c1b3ae45e3f99 100644 --- a/recipes/vvenc/all/conanfile.py +++ b/recipes/vvenc/all/conanfile.py @@ -8,22 +8,28 @@ from conan.tools.build import stdcpp_library, check_min_cppstd from conan.tools.cmake import CMakeToolchain, CMake, cmake_layout, CMakeDeps from conan.tools.files import get, copy, rmdir, rm +from conan.tools.scm import Version required_conan_version = ">=1.60.1" class vvencRecipe(ConanFile): name = "vvenc" + description = "Fraunhofer Versatile Video Encoder (VVenC)" license = "BSD-3-Clause" url = "https://github.com/conan-io/conan-center-index" - description = "Fraunhofer Versatile Video Encoder (VVenC)" - topics = ("video", "encoder", "codec", "vvc", "h266") homepage = "https://www.hhi.fraunhofer.de/en/departments/vca/technologies-and-solutions/h266-vvc.html" + topics = ("video", "encoder", "codec", "vvc", "h266") package_type = "library" - - settings = "os", "compiler", "build_type", "arch" - options = {"shared": [True, False], "fPIC": [True, False]} - default_options = {"shared": False, "fPIC": True} + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + } def validate_build(self): if conan_version.major == 2: @@ -54,17 +60,29 @@ def _validate_build2(self): # and it cannot be built with newer C++ standard # because they have existing C++ features removed check_min_cppstd(self, 14) - # FIXME: linter complains, but function is there - # https://docs.conan.io/2.0/reference/tools/build.html?highlight=check_min_cppstd#conan-tools-build-check-max-cppstd - check_max_cppstd = getattr(sys.modules['conan.tools.build'], 'check_max_cppstd') - check_max_cppstd(self, 14) + if Version(self.version) < "1.10.0": + # FIXME: linter complains, but function is there + # https://docs.conan.io/2.0/reference/tools/build.html?highlight=check_min_cppstd#conan-tools-build-check-max-cppstd + check_max_cppstd = getattr(sys.modules['conan.tools.build'], 'check_max_cppstd') + check_max_cppstd(self, 14) + + def config_options(self): + if self.settings.os == "Windows": + self.options.rm_safe("fPIC") + + def configure(self): + if self.options.shared: + self.options.rm_safe('fPIC') + + def layout(self): + cmake_layout(self, src_folder='src') def package_id(self): # still important, older binutils cannot recognize # object files created with newer binutils, # thus linker cannot find any valid object and therefore symbols # (fails to find `vvenc_get_version`, which is obviously always there) - # this is not exactly modeled by conan right now, + # this is not exactly modeled by conan right now, # so "compiler" setting is closest thing to avoid an issue # (while technically it's not a compiler, but linker and archiver) # del self.info.settings.compiler @@ -73,17 +91,6 @@ def package_id(self): def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) - def config_options(self): - if self.settings.os == "Windows": - self.options.rm_safe("fPIC") - - def configure(self): - if self.options.shared: - self.options.rm_safe('fPIC') - - def layout(self): - cmake_layout(self, src_folder='src') - def generate(self): deps = CMakeDeps(self) deps.generate() diff --git a/recipes/vvenc/all/test_package/CMakeLists.txt b/recipes/vvenc/all/test_package/CMakeLists.txt index efaabb8094acb..c201147dc181d 100644 --- a/recipes/vvenc/all/test_package/CMakeLists.txt +++ b/recipes/vvenc/all/test_package/CMakeLists.txt @@ -1,9 +1,7 @@ cmake_minimum_required(VERSION 3.15) -project(PackageTest C) +project(test_package LANGUAGES C) find_package(vvenc CONFIG REQUIRED) - - -add_executable(example src/example.c) -target_link_libraries(example vvenc::vvenc) +add_executable(${PROJECT_NAME} test_package.c) +target_link_libraries(${PROJECT_NAME} PRIVATE vvenc::vvenc) diff --git a/recipes/vvenc/all/test_package/conanfile.py b/recipes/vvenc/all/test_package/conanfile.py index 0f4e9c14439cf..2f7db800db937 100644 --- a/recipes/vvenc/all/test_package/conanfile.py +++ b/recipes/vvenc/all/test_package/conanfile.py @@ -8,6 +8,7 @@ class vvencTestConan(ConanFile): settings = "os", "compiler", "build_type", "arch" generators = "CMakeDeps", 'VirtualRunEnv', "CMakeToolchain" + test_type = "explicit" def requirements(self): self.requires(self.tested_reference_str) @@ -22,5 +23,5 @@ def layout(self): def test(self): if can_run(self): - cmd = os.path.join(self.cpp.build.bindir, "example") + cmd = os.path.join(self.cpp.build.bindir, "test_package") self.run(cmd, env="conanrun") diff --git a/recipes/vvenc/all/test_package/src/example.c b/recipes/vvenc/all/test_package/test_package.c similarity index 100% rename from recipes/vvenc/all/test_package/src/example.c rename to recipes/vvenc/all/test_package/test_package.c diff --git a/recipes/vvenc/config.yml b/recipes/vvenc/config.yml index f88ad156fc791..dcf5ab8c72631 100644 --- a/recipes/vvenc/config.yml +++ b/recipes/vvenc/config.yml @@ -1,4 +1,8 @@ versions: + "1.12.0": + folder: "all" + "1.11.1": + folder: "all" "1.10.0": folder: "all" "1.8.0": diff --git a/recipes/wasm-micro-runtime/all/conandata.yml b/recipes/wasm-micro-runtime/all/conandata.yml index 507fb63f45893..ba4fdc32928ed 100644 --- a/recipes/wasm-micro-runtime/all/conandata.yml +++ b/recipes/wasm-micro-runtime/all/conandata.yml @@ -1,4 +1,10 @@ sources: + "2.2.0": + url: "https://github.com/bytecodealliance/wasm-micro-runtime/archive/refs/tags/WAMR-2.2.0.tar.gz" + sha256: "93b6ba03f681e061967106046b1908631ee705312b9a6410f3baee7af7c6aac9" + "1.3.3": + url: "https://github.com/bytecodealliance/wasm-micro-runtime/archive/refs/tags/WAMR-1.3.3.tar.gz" + sha256: "94d18b081b6fac0574faf36338c7762a659ff175b9ae2cbc1c0a8f045edcbe7a" "1.2.3": url: "https://github.com/bytecodealliance/wasm-micro-runtime/archive/refs/tags/WAMR-1.2.3.tar.gz" sha256: "85057f788630dc1b8c371f5443cc192627175003a8ea63c491beaff29a338346" @@ -6,6 +12,14 @@ sources: url: "https://github.com/bytecodealliance/wasm-micro-runtime/archive/refs/tags/WAMR-1.2.2.tar.gz" sha256: "d328fc1e19c54cfdb4248b861de54b62977b9b85c0a40eaaeb9cd9b628c0c788" patches: + "2.2.0": + - patch_file: "patches/2.2.0-0001-fix-cmake.patch" + patch_description: "link ntdll on Windows" + patch_type: "conan" + "1.3.3": + - patch_file: "patches/1.3.3-0001-fix-cmake.patch" + patch_description: "separate static and shared build, link ntdll on Windows" + patch_type: "conan" "1.2.3": - patch_file: "patches/1.2.3-0001-fix-cmake.patch" patch_description: "separate static and shasred build" diff --git a/recipes/wasm-micro-runtime/all/conanfile.py b/recipes/wasm-micro-runtime/all/conanfile.py index 4cd796f406c9c..e8354068cc7fd 100644 --- a/recipes/wasm-micro-runtime/all/conanfile.py +++ b/recipes/wasm-micro-runtime/all/conanfile.py @@ -4,6 +4,7 @@ from conan.tools.build import check_min_cppstd from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout from conan.tools.microsoft import is_msvc +from conan.tools.scm import Version import os required_conan_version = ">=1.53.0" @@ -136,3 +137,5 @@ def package_info(self): self.cpp_info.system_libs.append("pthread") if self.settings.os == "Windows": self.cpp_info.system_libs.append("ws2_32") + if Version(self.version) >= "1.3.0": + self.cpp_info.system_libs.append("ntdll") diff --git a/recipes/wasm-micro-runtime/all/patches/1.3.3-0001-fix-cmake.patch b/recipes/wasm-micro-runtime/all/patches/1.3.3-0001-fix-cmake.patch new file mode 100644 index 0000000000000..c86c12d4bcbe1 --- /dev/null +++ b/recipes/wasm-micro-runtime/all/patches/1.3.3-0001-fix-cmake.patch @@ -0,0 +1,64 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 0ffba05..68d03d2 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -114,10 +114,10 @@ set (WAMR_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}) + + include (${WAMR_ROOT_DIR}/build-scripts/runtime_lib.cmake) + +-set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wformat -Wformat-security -Wshadow -Wno-unused-parameter") ++# set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wformat -Wformat-security -Wshadow -Wno-unused-parameter") + # set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wconversion -Wsign-conversion") + +-set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wformat -Wformat-security -Wno-unused") ++# set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wformat -Wformat-security -Wno-unused") + + if (WAMR_BUILD_TARGET MATCHES "X86_.*" OR WAMR_BUILD_TARGET STREQUAL "AMD_64") + if (NOT (CMAKE_C_COMPILER MATCHES ".*clang.*" OR CMAKE_C_COMPILER_ID MATCHES ".*Clang")) +@@ -135,22 +135,34 @@ endif () + + include (${SHARED_DIR}/utils/uncommon/shared_uncommon.cmake) + ++if (NOT BUILD_SHARED_LIBS) + # STATIC LIBRARY + add_library(iwasm_static STATIC ${WAMR_RUNTIME_LIB_SOURCE}) + set_target_properties (iwasm_static PROPERTIES OUTPUT_NAME vmlib) + target_include_directories(iwasm_static INTERFACE ${WAMR_ROOT_DIR}/core/iwasm/include) +-target_link_libraries (iwasm_static INTERFACE ${LLVM_AVAILABLE_LIBS} ${UV_A_LIBS} -lm -ldl -lpthread) ++# target_link_libraries (iwasm_static INTERFACE ${LLVM_AVAILABLE_LIBS} ${UV_A_LIBS} -lm -ldl -lpthread) ++target_link_libraries (iwasm_static INTERFACE ${LLVM_AVAILABLE_LIBS} ${UV_A_LIBS}) ++if(NOT MSVC) ++ target_link_libraries (iwasm_static INTERFACE -lm -ldl -lpthread) ++endif() + if (WAMR_BUILD_WASM_CACHE EQUAL 1) + target_link_libraries(iwasm_static INTERFACE boringssl_crypto) + endif () + + install (TARGETS iwasm_static ARCHIVE DESTINATION lib) +- ++else() + # SHARED LIBRARY + add_library (iwasm_shared SHARED ${WAMR_RUNTIME_LIB_SOURCE}) + set_target_properties (iwasm_shared PROPERTIES OUTPUT_NAME iwasm) + target_include_directories(iwasm_shared INTERFACE ${WAMR_ROOT_DIR}/core/iwasm/include) +-target_link_libraries (iwasm_shared INTERFACE ${LLVM_AVAILABLE_LIBS} ${UV_A_LIBS} -lm -ldl -lpthread) ++# target_link_libraries (iwasm_shared INTERFACE ${LLVM_AVAILABLE_LIBS} ${UV_A_LIBS} -lm -ldl -lpthread) ++target_link_libraries (iwasm_shared INTERFACE ${LLVM_AVAILABLE_LIBS} ${UV_A_LIBS}) ++if(NOT MSVC) ++ target_link_libraries (iwasm_shared INTERFACE -lm -ldl -lpthread) ++endif() ++if(WIN32) ++ target_link_libraries (iwasm_shared PUBLIC ntdll) ++endif() + if (WAMR_BUILD_WASM_CACHE EQUAL 1) + target_link_libraries(iwasm_shared INTERFACE boringssl_crypto) + endif () +@@ -160,6 +172,7 @@ if (MINGW) + endif () + + install (TARGETS iwasm_shared LIBRARY DESTINATION lib) ++endif() + + # HEADERS + install (FILES + diff --git a/recipes/wasm-micro-runtime/all/patches/2.2.0-0001-fix-cmake.patch b/recipes/wasm-micro-runtime/all/patches/2.2.0-0001-fix-cmake.patch new file mode 100644 index 0000000000000..c386cfb73769f --- /dev/null +++ b/recipes/wasm-micro-runtime/all/patches/2.2.0-0001-fix-cmake.patch @@ -0,0 +1,55 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 40658e9..05538a2 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -122,13 +122,13 @@ set (WAMR_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}) + include (${WAMR_ROOT_DIR}/build-scripts/runtime_lib.cmake) + + if (NOT WIN32) +- set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wformat -Wformat-security \ +- -ffunction-sections -fdata-sections \ +- -Wno-unused-parameter -Wno-pedantic \ +- -fvisibility=hidden") ++ # set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wformat -Wformat-security \ ++ # -ffunction-sections -fdata-sections \ ++ # -Wno-unused-parameter -Wno-pedantic \ ++ # -fvisibility=hidden") + # Remove the extra spaces for better make log + string (REGEX REPLACE " *" " " CMAKE_C_FLAGS ${CMAKE_C_FLAGS}) +- set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wformat -Wformat-security -Wno-unused") ++ # set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wformat -Wformat-security -Wno-unused") + endif() + + if (WAMR_BUILD_TARGET MATCHES "X86_.*" OR WAMR_BUILD_TARGET STREQUAL "AMD_64") +@@ -159,7 +159,14 @@ if (WAMR_BUILD_STATIC) + add_library(iwasm_static STATIC ${WAMR_RUNTIME_LIB_SOURCE}) + set_target_properties (iwasm_static PROPERTIES OUTPUT_NAME vmlib) + target_include_directories(iwasm_static INTERFACE ${WAMR_ROOT_DIR}/core/iwasm/include) +- target_link_libraries (iwasm_static INTERFACE ${LLVM_AVAILABLE_LIBS} ${UV_A_LIBS} -lm -ldl ${CMAKE_THREAD_LIBS_INIT}) ++ target_link_libraries (iwasm_static INTERFACE ${LLVM_AVAILABLE_LIBS} ${UV_A_LIBS} ${CMAKE_THREAD_LIBS_INIT}) ++ target_link_libraries (iwasm_static INTERFACE ${LLVM_AVAILABLE_LIBS} ${UV_A_LIBS} ${CMAKE_THREAD_LIBS_INIT}) ++ if(NOT MSVC) ++ target_link_libraries (iwasm_static INTERFACE -lm -ldl) ++ endif() ++ if(WIN32) ++ target_link_libraries (iwasm_static PUBLIC ntdll) ++ endif() + if (WAMR_BUILD_WASM_CACHE EQUAL 1) + target_link_libraries(iwasm_static INTERFACE boringssl_crypto) + endif () +@@ -180,7 +187,14 @@ if (WAMR_BUILD_SHARED) + add_library (iwasm_shared SHARED ${WAMR_RUNTIME_LIB_SOURCE}) + set_target_properties (iwasm_shared PROPERTIES OUTPUT_NAME iwasm) + target_include_directories(iwasm_shared INTERFACE ${WAMR_ROOT_DIR}/core/iwasm/include) +- target_link_libraries (iwasm_shared INTERFACE ${LLVM_AVAILABLE_LIBS} ${UV_A_LIBS} -lm -ldl ${CMAKE_THREAD_LIBS_INIT}) ++ target_link_libraries (iwasm_shared INTERFACE ${LLVM_AVAILABLE_LIBS} ${UV_A_LIBS} ${CMAKE_THREAD_LIBS_INIT}) ++ target_link_libraries (iwasm_shared INTERFACE ${LLVM_AVAILABLE_LIBS} ${UV_A_LIBS} ${CMAKE_THREAD_LIBS_INIT}) ++ if(NOT MSVC) ++ target_link_libraries (iwasm_shared INTERFACE -lm -ldl) ++ endif() ++ if(WIN32) ++ target_link_libraries (iwasm_shared PUBLIC ntdll) ++ endif() + if (WAMR_BUILD_WASM_CACHE EQUAL 1) + target_link_libraries(iwasm_shared INTERFACE boringssl_crypto) + endif () diff --git a/recipes/wasm-micro-runtime/config.yml b/recipes/wasm-micro-runtime/config.yml index 6d9f399765e2d..542597ea3f803 100644 --- a/recipes/wasm-micro-runtime/config.yml +++ b/recipes/wasm-micro-runtime/config.yml @@ -1,4 +1,8 @@ versions: + "2.2.0": + folder: all + "1.3.3": + folder: all "1.2.3": folder: all "1.2.2": diff --git a/recipes/wasmedge/all/conandata.yml b/recipes/wasmedge/all/conandata.yml index b7eef0f907d2e..9dcc47a29915a 100644 --- a/recipes/wasmedge/all/conandata.yml +++ b/recipes/wasmedge/all/conandata.yml @@ -1,4 +1,86 @@ sources: + "0.14.1": + Windows: + "x86_64": + Visual Studio: + - url: "https://github.com/WasmEdge/WasmEdge/releases/download/0.14.1/WasmEdge-0.14.1-windows.zip" + sha256: "cc38f2be3000743becaeb8b00871dcd04b0a0a47b8329735a71615ee06cf1d7b" + - url: "https://raw.githubusercontent.com/WasmEdge/WasmEdge/0.14.1/LICENSE" + sha256: "c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4" + Linux: + "x86_64": + "gcc": + - url: "https://github.com/WasmEdge/WasmEdge/releases/download/0.14.1/WasmEdge-0.14.1-manylinux2014_x86_64.tar.gz" + sha256: "a82f9fb01a6a6f1dfbd1cb069dc96d116f22c15cdb01207a5d0e65096055d092" + - url: "https://raw.githubusercontent.com/WasmEdge/WasmEdge/0.14.1/LICENSE" + sha256: "c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4" + "armv8": + "gcc": + - url: "https://github.com/WasmEdge/WasmEdge/releases/download/0.14.1/WasmEdge-0.14.1-manylinux2014_aarch64.tar.gz" + sha256: "d5ac5c2405ff8a878558379740498e5fe4b126fe746eac585f7efa9bb7f32e28" + - url: "https://raw.githubusercontent.com/WasmEdge/WasmEdge/0.11.1/LICENSE" + sha256: "c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4" + Macos: + "x86_64": + "gcc": + - url: "https://github.com/WasmEdge/WasmEdge/releases/download/0.14.1/WasmEdge-0.14.1-darwin_x86_64.tar.gz" + sha256: "96d01cf083d4f7e1c55683dc4b60acca6d8517ad901e2d7b4b5d64ca9a6532e0" + - url: "https://raw.githubusercontent.com/WasmEdge/WasmEdge/0.14.1/LICENSE" + sha256: "c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4" + "armv8": + "gcc": + - url: "https://github.com/WasmEdge/WasmEdge/releases/download/0.14.1/WasmEdge-0.14.1-darwin_arm64.tar.gz" + sha256: "38dd10f4e78d339be91e0c3501055d4dad9bf08c3dc648e07a30df9bea2d6c4a" + - url: "https://raw.githubusercontent.com/WasmEdge/WasmEdge/0.14.1/LICENSE" + sha256: "c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4" + Android: + "armv8": + "gcc": + - url: "https://github.com/WasmEdge/WasmEdge/releases/download/0.14.1/WasmEdge-0.14.1-android_aarch64.tar.gz" + sha256: "8d979abc7777d01a4ab99e20c1052ba34985e795b6dc84101a7958fb171767a6" + - url: "https://raw.githubusercontent.com/WasmEdge/WasmEdge/0.14.0/LICENSE" + sha256: "c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4" + "0.14.0": + Windows: + "x86_64": + Visual Studio: + - url: "https://github.com/WasmEdge/WasmEdge/releases/download/0.14.0/WasmEdge-0.14.0-windows.zip" + sha256: "cd0dd57df8f3e8cb7ef0e57d2d09f1740093c2179fad933b270979bafe8295a1" + - url: "https://raw.githubusercontent.com/WasmEdge/WasmEdge/0.14.0/LICENSE" + sha256: "c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4" + Linux: + "x86_64": + "gcc": + - url: "https://github.com/WasmEdge/WasmEdge/releases/download/0.14.0/WasmEdge-0.14.0-manylinux2014_x86_64.tar.gz" + sha256: "73b3892f94c143dc09d53415c6848bb8e87206a1f614fd0edfc89957a0f1b027" + - url: "https://raw.githubusercontent.com/WasmEdge/WasmEdge/0.14.0/LICENSE" + sha256: "c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4" + "armv8": + "gcc": + - url: "https://github.com/WasmEdge/WasmEdge/releases/download/0.14.0/WasmEdge-0.14.0-manylinux2014_aarch64.tar.gz" + sha256: "6136c42066cdd9a96170285af2613dc00f262f5758a03d7afb3ab12a36363c79" + - url: "https://raw.githubusercontent.com/WasmEdge/WasmEdge/0.11.1/LICENSE" + sha256: "c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4" + Macos: + "x86_64": + "gcc": + - url: "https://github.com/WasmEdge/WasmEdge/releases/download/0.14.0/WasmEdge-0.14.0-darwin_x86_64.tar.gz" + sha256: "03c5d77be63ecad54ed33a1885f170bc854246ed8f9ae8e366b114bc8c0c2422" + - url: "https://raw.githubusercontent.com/WasmEdge/WasmEdge/0.14.0/LICENSE" + sha256: "c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4" + "armv8": + "gcc": + - url: "https://github.com/WasmEdge/WasmEdge/releases/download/0.14.0/WasmEdge-0.14.0-darwin_arm64.tar.gz" + sha256: "4f2f34545a97768e28700099ac9cbb18e7b434779d237de860324de400922546" + - url: "https://raw.githubusercontent.com/WasmEdge/WasmEdge/0.14.0/LICENSE" + sha256: "c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4" + Android: + "armv8": + "gcc": + - url: "https://github.com/WasmEdge/WasmEdge/releases/download/0.14.0/WasmEdge-0.14.0-android_aarch64.tar.gz" + sha256: "58b834db8814b27051494df60588dc56f3a5d740604e92c1eac9e5021b311c03" + - url: "https://raw.githubusercontent.com/WasmEdge/WasmEdge/0.14.0/LICENSE" + sha256: "c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4" "0.13.5": Windows: "x86_64": diff --git a/recipes/wasmedge/config.yml b/recipes/wasmedge/config.yml index 13b6ff12faa84..3eb29fd257a6f 100644 --- a/recipes/wasmedge/config.yml +++ b/recipes/wasmedge/config.yml @@ -1,4 +1,8 @@ versions: + "0.14.1": + folder: "all" + "0.14.0": + folder: "all" "0.13.5": folder: "all" "0.11.2": diff --git a/recipes/wasmer/all/conandata.yml b/recipes/wasmer/all/conandata.yml index 88b147bfcf235..0ac30b85d7ed6 100644 --- a/recipes/wasmer/all/conandata.yml +++ b/recipes/wasmer/all/conandata.yml @@ -1,4 +1,128 @@ sources: + "5.0.0": + Windows: + "x86_64": + "Visual Studio": + url: "https://github.com/wasmerio/wasmer/releases/download/v5.0.0/wasmer-windows-amd64.tar.gz" + sha256: "1da23b195fb44582f9ff798e5ff23b064ce94d918ff850e54e612c207c08caa6" + "gcc": + url: "https://github.com/wasmerio/wasmer/releases/download/v5.0.0/wasmer-windows-gnu64.tar.gz" + sha256: "9a9edeb9909b5314fd94a3afabf83d84ed0eb0ff52b29d3b425118b0df7c65c4" + Linux: + "x86_64": + "gcc": + url: "https://github.com/wasmerio/wasmer/releases/download/v5.0.0/wasmer-linux-amd64.tar.gz" + sha256: "3293457cd2c7cdc9cdebd684c7b9c22ece90e05ea1b8f2a0a97ce9e2af560bcb" + "armv8": + "gcc": + url: "https://github.com/wasmerio/wasmer/releases/download/v5.0.0/wasmer-linux-aarch64.tar.gz" + sha256: "99c5fbc2c448b089bb6195f0242ecca2a8ecc2bfb723400080ae653de59e34c1" + "riscv64": + "gcc": + url: "https://github.com/wasmerio/wasmer/releases/download/v5.0.0/wasmer-linux-riscv64.tar.gz" + sha256: "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + Macos: + "x86_64": + "gcc": + url: "https://github.com/wasmerio/wasmer/releases/download/v5.0.0/wasmer-darwin-amd64.tar.gz" + sha256: "b41d6120380add11ada9f4cbe8811bb3f051d0c00600bb2c20f2cfb10f99b4f9" + "armv8": + "gcc": + url: "https://github.com/wasmerio/wasmer/releases/download/v5.0.0/wasmer-darwin-arm64.tar.gz" + sha256: "b114eb2b42e3140a74f212d58e3b622e395bd83dad97466e1aa191d2d4af20ab" + "4.4.0": + Windows: + "x86_64": + "Visual Studio": + url: "https://github.com/wasmerio/wasmer/releases/download/v4.4.0/wasmer-windows-amd64.tar.gz" + sha256: "15565759624f6847135ea8f1d2ca94bc3c8971a32443df39ad0e5b04afc659b9" + "gcc": + url: "https://github.com/wasmerio/wasmer/releases/download/v4.4.0/wasmer-windows-gnu64.tar.gz" + sha256: "e4c275e52d74343abf03d231684d8e57f5d418eb28494972c7f311028cb4e433" + Linux: + "x86_64": + "gcc": + url: "https://github.com/wasmerio/wasmer/releases/download/v4.4.0/wasmer-linux-amd64.tar.gz" + sha256: "5d29f37c52089c4f8c0303df9ba82ab03fe5cc2b6cbafa25e9535347f26ce6a5" + "armv8": + "gcc": + url: "https://github.com/wasmerio/wasmer/releases/download/v4.4.0/wasmer-linux-aarch64.tar.gz" + sha256: "1efa2f6953248920cce1b27783ee3174bedcdb88b2e2bdca012446ad8a966261" + "riscv64": + "gcc": + url: "https://github.com/wasmerio/wasmer/releases/download/v4.4.0/wasmer-linux-riscv64.tar.gz" + sha256: "34e4350c2bca7a542d7a41d82f8104998b45bdf1dbafae22dbb0b4e5ca83bf4e" + Macos: + "x86_64": + "gcc": + url: "https://github.com/wasmerio/wasmer/releases/download/v4.4.0/wasmer-darwin-amd64.tar.gz" + sha256: "dd7a913e40e8d6a4051bf7430d5df15a818df0da6962ffdeb1a1c87860f5083f" + "armv8": + "gcc": + url: "https://github.com/wasmerio/wasmer/releases/download/v4.4.0/wasmer-darwin-arm64.tar.gz" + sha256: "c703e3a94e5010e68abdedf832175c64388e749fdbe31b532a5bdc8cf8ab628e" + "4.3.3": + Windows: + "x86_64": + "Visual Studio": + url: "https://github.com/wasmerio/wasmer/releases/download/v4.3.3/wasmer-windows-amd64.tar.gz" + sha256: "63239253e7dc5373a421941aaa9ac8ee2ddb2f34e3d94b12ea739319d7929bd4" + "gcc": + url: "https://github.com/wasmerio/wasmer/releases/download/v4.3.3/wasmer-windows-gnu64.tar.gz" + sha256: "6180ddaed4b758ddc563be493001204f067667406994b4a05bfeb8f7948d9898" + Linux: + "x86_64": + "gcc": + url: "https://github.com/wasmerio/wasmer/releases/download/v4.3.3/wasmer-linux-amd64.tar.gz" + sha256: "817ce5b0ba0a97989fe390b16e76352632a3185ebd0ef3e5bfbaf0dbda73cd13" + "armv8": + "gcc": + url: "https://github.com/wasmerio/wasmer/releases/download/v4.3.3/wasmer-linux-aarch64.tar.gz" + sha256: "d15b8170911b1dca69923844bd31f2ea8a73d6ac9ebe7de0d5a30f0cab4cc1b4" + "riscv64": + "gcc": + url: "https://github.com/wasmerio/wasmer/releases/download/v4.3.3/wasmer-linux-riscv64.tar.gz" + sha256: "b0ddc5ed34506f2c2674d3d09996b4c3da500644bc65880e8eede0a149dfaeae" + Macos: + "x86_64": + "gcc": + url: "https://github.com/wasmerio/wasmer/releases/download/v4.3.3/wasmer-darwin-amd64.tar.gz" + sha256: "cf49f6d421b0e8f00f3c4e96ac3ed1ee674b64e0e28f503ff46938cbf831c303" + "armv8": + "gcc": + url: "https://github.com/wasmerio/wasmer/releases/download/v4.3.3/wasmer-darwin-arm64.tar.gz" + sha256: "4b6bc3fc10e22c5347e240df6be7d2ac8db4c930768d7ed7a3d99b086cad4ba0" + "4.3.0": + Windows: + "x86_64": + "Visual Studio": + url: "https://github.com/wasmerio/wasmer/releases/download/v4.3.0/wasmer-windows-amd64.tar.gz" + sha256: "dc58db29591c3088da053336ddf52ab3f5c870daa0a6901e045a7f1a78b3358e" + "gcc": + url: "https://github.com/wasmerio/wasmer/releases/download/v4.3.0/wasmer-windows-gnu64.tar.gz" + sha256: "8d903af970293ab7987df71f31651e8a59911299c47c8062314dda28f8562556" + Linux: + "x86_64": + "gcc": + url: "https://github.com/wasmerio/wasmer/releases/download/v4.3.0/wasmer-linux-amd64.tar.gz" + sha256: "664c0fd253e86e88afd3977c5a09a1d8162b1e80ce1421da92a310fccfc14243" + "armv8": + "gcc": + url: "https://github.com/wasmerio/wasmer/releases/download/v4.3.0/wasmer-linux-aarch64.tar.gz" + sha256: "e4693e54e40c44957de78328b7711d2822a7e30c88119a68b1a2bd99fdd0a599" + "riscv64": + "gcc": + url: "https://github.com/wasmerio/wasmer/releases/download/v4.3.0/wasmer-linux-riscv64.tar.gz" + sha256: "d4ba4ce197f7dbb8e900e6f515143c73934a91feec556bd2f928ba872ddd60b2" + Macos: + "x86_64": + "gcc": + url: "https://github.com/wasmerio/wasmer/releases/download/v4.3.0/wasmer-darwin-amd64.tar.gz" + sha256: "7e58b848649ceba2f4d2d65ea34c72bf02f463327efc1549f027feb344525c69" + "armv8": + "gcc": + url: "https://github.com/wasmerio/wasmer/releases/download/v4.3.0/wasmer-darwin-arm64.tar.gz" + sha256: "ddf4079e3e0432bb1c856720cef8266494cfae2f3b294dbaf18c9853d32fbc1f" "4.2.7": Windows: "x86_64": @@ -17,6 +141,10 @@ sources: "gcc": url: "https://github.com/wasmerio/wasmer/releases/download/v4.2.7/wasmer-linux-aarch64.tar.gz" sha256: "5915f617f966cdedd0fe18f26237ef04701c6475c34e5b1cd2ffc0f6e84ffd3a" + "riscv64": + "gcc": + url: "https://github.com/wasmerio/wasmer/releases/download/v4.2.7/wasmer-linux-riscv64.tar.gz" + sha256: "bdb480c30ef07640edb63b59b84a5508e802571d8eab74d7a40ff1164e8b7151" Macos: "x86_64": "gcc": @@ -44,6 +172,10 @@ sources: "gcc": url: "https://github.com/wasmerio/wasmer/releases/download/v4.2.5/wasmer-linux-aarch64.tar.gz" sha256: "b29117eebce282b63d49de6bb11920da439d68937bd6bc69575fb8f5f29ef293" + "riscv64": + "gcc": + url: "https://github.com/wasmerio/wasmer/releases/download/v4.2.5/wasmer-linux-riscv64.tar.gz" + sha256: "d2002afdce6ecdcd0e31efb47b50a8c195a12ab6b5127520870ece3a1338e889" Macos: "x86_64": "gcc": @@ -71,6 +203,10 @@ sources: "gcc": url: "https://github.com/wasmerio/wasmer/releases/download/v4.2.0/wasmer-linux-aarch64.tar.gz" sha256: "681fe6ad3e7f139d3d2ed8cfbf6ceb4d54098c32da9663bbf849e6429d6e8f1c" + "riscv64": + "gcc": + url: "https://github.com/wasmerio/wasmer/releases/download/v4.2.0/wasmer-linux-riscv64.tar.gz" + sha256: "3b2dd3172ffd0084367a07565259d76c99099f3c1b8467c5d7c2a6d5d158de64" Macos: "x86_64": "gcc": @@ -98,6 +234,10 @@ sources: "gcc": url: "https://github.com/wasmerio/wasmer/releases/download/v4.1.1/wasmer-linux-aarch64.tar.gz" sha256: "74cc40fcfe4108c0240137a47704d4f6ade8895c70da25358b471fe32ce47a50" + "riscv64": + "gcc": + url: "https://github.com/wasmerio/wasmer/releases/download/v4.1.1/wasmer-linux-riscv64.tar.gz" + sha256: "2ee1ee5759133802771018fccd1a4b39a36a1b7ed2bf0e6f38e83266ba5c8bdb" Macos: "x86_64": "gcc": @@ -125,6 +265,10 @@ sources: "gcc": url: "https://github.com/wasmerio/wasmer/releases/download/v4.0.0/wasmer-linux-aarch64.tar.gz" sha256: "20f98f4be160e73e387444437f87aeaa276b46c1efee12729ab1108ebeda1d16" + "riscv64": + "gcc": + url: "https://github.com/wasmerio/wasmer/releases/download/v4.0.0/wasmer-linux-riscv64.tar.gz" + sha256: "87ca77de67bd60a8ddc4c9fa9d9aaa647961826564051a40169cb0dddc2362ad" Macos: "x86_64": "gcc": @@ -152,6 +296,10 @@ sources: "gcc": url: "https://github.com/wasmerio/wasmer/releases/download/v3.2.1/wasmer-linux-aarch64.tar.gz" sha256: "f1847405588339b4327ef9d68c266355b04d3d18d6fc2c9fdfb2c9f576f4d758" + "riscv64": + "gcc": + url: "https://github.com/wasmerio/wasmer/releases/download/v3.2.1/wasmer-linux-riscv64.tar.gz" + sha256: "0408442c1da0d3bf1f83014adfe58d24a9ab5d3268db5a8a2dc05026f3a0650c" Macos: "x86_64": "gcc": diff --git a/recipes/wasmer/all/conanfile.py b/recipes/wasmer/all/conanfile.py index 402e36fdcca0f..06ec3aa8052ea 100644 --- a/recipes/wasmer/all/conanfile.py +++ b/recipes/wasmer/all/conanfile.py @@ -60,18 +60,18 @@ def package_id(self): del self.info.settings.compiler.version self.info.settings.compiler = self._compiler_alias - def source(self): + def build(self): get( self, - **self.conan_data["sources"][self.version][str(self.info.settings.os)][str(self.info.settings.arch)][self._compiler_alias] + **self.conan_data["sources"][self.version][str(self.settings.os)][str(self.settings.arch)][self._compiler_alias] ) def package(self): - copy(self, pattern="LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) + copy(self, pattern="LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=self.build_folder) - copy(self, pattern="*.h", dst=os.path.join(self.package_folder, "include"), src=os.path.join(self.source_folder, "include")) + copy(self, pattern="*.h", dst=os.path.join(self.package_folder, "include"), src=os.path.join(self.build_folder, "include")) - srclibdir = os.path.join(self.source_folder, "lib") + srclibdir = os.path.join(self.build_folder, "lib") dstlibdir = os.path.join(self.package_folder, "lib") dstbindir = os.path.join(self.package_folder, "bin") if self.options.shared: diff --git a/recipes/wasmer/config.yml b/recipes/wasmer/config.yml index 7d131c7cb3eea..57768d8568a22 100644 --- a/recipes/wasmer/config.yml +++ b/recipes/wasmer/config.yml @@ -1,4 +1,12 @@ versions: + "5.0.0": + folder: "all" + "4.4.0": + folder: "all" + "4.3.3": + folder: "all" + "4.3.0": + folder: "all" "4.2.7": folder: "all" "4.2.5": diff --git a/recipes/wasmtime/all/conandata.yml b/recipes/wasmtime/all/conandata.yml index 033b48ec7ab2e..f552bb5d07af3 100644 --- a/recipes/wasmtime/all/conandata.yml +++ b/recipes/wasmtime/all/conandata.yml @@ -1,4 +1,94 @@ sources: + "21.0.0": + Windows: + "x86_64": + url: "https://github.com/bytecodealliance/wasmtime/releases/download/v21.0.0/wasmtime-v21.0.0-x86_64-windows-c-api.zip" + sha256: "aee0fb2d792f93d16cc3ae2857a384c1f3b105374dfdecb6ab3f3b2823e6acaf" + MinGW: + "x86_64": + url: "https://github.com/bytecodealliance/wasmtime/releases/download/v21.0.0/wasmtime-v21.0.0-x86_64-mingw-c-api.zip" + sha256: "d4253540cc201c12d356a0806786ea518577c486d66d83a0144b4227d559c507" + Linux: + "x86_64": + url: "https://github.com/bytecodealliance/wasmtime/releases/download/v21.0.0/wasmtime-v21.0.0-x86_64-linux-c-api.tar.xz" + sha256: "e91b15f242454ab916dd895d326f6c2585a1f93f0df5aeb079e6f0511c90b37d" + "armv8": + url: "https://github.com/bytecodealliance/wasmtime/releases/download/v21.0.0/wasmtime-v21.0.0-aarch64-linux-c-api.tar.xz" + sha256: "b3e77e3eab5c0c4c3085364701bdb5cdd05e5ac4e3308d40263b06ac67bae610" + "s390x": + url: "https://github.com/bytecodealliance/wasmtime/releases/download/v21.0.0/wasmtime-v21.0.0-s390x-linux-c-api.tar.xz" + sha256: "dad2b4c43aaaa6734ac0d2825767759338b0273c46500b46ac071ddc7e853bec" + Macos: + "x86_64": + url: "https://github.com/bytecodealliance/wasmtime/releases/download/v21.0.0/wasmtime-v21.0.0-x86_64-macos-c-api.tar.xz" + sha256: "f99c5682ce85f353645b2b642a90104d43f77eafe8a90faa2ecd9421c4d48d2f" + "armv8": + url: "https://github.com/bytecodealliance/wasmtime/releases/download/v21.0.0/wasmtime-v21.0.0-aarch64-macos-c-api.tar.xz" + sha256: "0414332f1d6c90e6226102a27e8b8767eba845f34f4c8cabab575b094a0500f1" + Android: + "armv8": + url: "https://github.com/bytecodealliance/wasmtime/releases/download/v21.0.0/wasmtime-v21.0.0-aarch64-linux-c-api.tar.xz" + sha256: "b3e77e3eab5c0c4c3085364701bdb5cdd05e5ac4e3308d40263b06ac67bae610" + "20.0.1": + Windows: + "x86_64": + url: "https://github.com/bytecodealliance/wasmtime/releases/download/v20.0.1/wasmtime-v20.0.1-x86_64-windows-c-api.zip" + sha256: "d9a8cfefe8684d7170b67ade0fda6da4ad21508909680a64eebe083b93aabc70" + MinGW: + "x86_64": + url: "https://github.com/bytecodealliance/wasmtime/releases/download/v20.0.1/wasmtime-v20.0.1-x86_64-mingw-c-api.zip" + sha256: "164ecbbe632d1368020bccf442a81b20ec1cb57f0d0cdfaccf92ed74bd2311e8" + Linux: + "x86_64": + url: "https://github.com/bytecodealliance/wasmtime/releases/download/v20.0.1/wasmtime-v20.0.1-x86_64-linux-c-api.tar.xz" + sha256: "ba2e7ce72a50b0a472888249aecfb27aac841e5dfc72c845175fbeeaaf6862d4" + "armv8": + url: "https://github.com/bytecodealliance/wasmtime/releases/download/v20.0.1/wasmtime-v20.0.1-aarch64-linux-c-api.tar.xz" + sha256: "e5f383012c4cacbe5ab78dba334fa77793e109c0da5840a8c00cb63633043bee" + "s390x": + url: "https://github.com/bytecodealliance/wasmtime/releases/download/v20.0.1/wasmtime-v20.0.1-s390x-linux-c-api.tar.xz" + sha256: "f331a0fee2856f42136aaf9fbdc413abae397070f7b688d4b8c4885ec04292ff" + Macos: + "x86_64": + url: "https://github.com/bytecodealliance/wasmtime/releases/download/v20.0.1/wasmtime-v20.0.1-x86_64-macos-c-api.tar.xz" + sha256: "a4031456c2c1e406395457bd7f452e9e71e8e024b727cf47ebb4da996f9a0c51" + "armv8": + url: "https://github.com/bytecodealliance/wasmtime/releases/download/v20.0.1/wasmtime-v20.0.1-aarch64-macos-c-api.tar.xz" + sha256: "4bce467752f64dc4632b7ccad52b7e2ea134ad02a23e6b540b39a11c8c4fa579" + Android: + "armv8": + url: "https://github.com/bytecodealliance/wasmtime/releases/download/v20.0.1/wasmtime-v20.0.1-aarch64-linux-c-api.tar.xz" + sha256: "e5f383012c4cacbe5ab78dba334fa77793e109c0da5840a8c00cb63633043bee" + "19.0.2": + Windows: + "x86_64": + url: "https://github.com/bytecodealliance/wasmtime/releases/download/v19.0.2/wasmtime-v19.0.2-x86_64-windows-c-api.zip" + sha256: "9814038a400680a322f8c287ccba68fc0c5ffccede31f9ed444e945bdeec5c70" + MinGW: + "x86_64": + url: "https://github.com/bytecodealliance/wasmtime/releases/download/v19.0.2/wasmtime-v19.0.2-x86_64-mingw-c-api.zip" + sha256: "0a1c37ec9eebc2322632c8275386f99cdb08c58020ad01409aecde874b8ad364" + Linux: + "x86_64": + url: "https://github.com/bytecodealliance/wasmtime/releases/download/v19.0.2/wasmtime-v19.0.2-x86_64-linux-c-api.tar.xz" + sha256: "734f82bc0fcf9e3214db37f4275536ee3b59be8935ec3ffac379b312423ee3ae" + "armv8": + url: "https://github.com/bytecodealliance/wasmtime/releases/download/v19.0.2/wasmtime-v19.0.2-aarch64-linux-c-api.tar.xz" + sha256: "6952c3ffcbb0d04c1c7f07c17e945d0fe2b756965d17717fde2c51dcce7465ab" + "s390x": + url: "https://github.com/bytecodealliance/wasmtime/releases/download/v19.0.2/wasmtime-v19.0.2-s390x-linux-c-api.tar.xz" + sha256: "536a9a676ffaa143c77fa4e9712e19f6035e93e0d58865d243ad5e15302ef9e8" + Macos: + "x86_64": + url: "https://github.com/bytecodealliance/wasmtime/releases/download/v19.0.2/wasmtime-v19.0.2-x86_64-macos-c-api.tar.xz" + sha256: "42948b3dc8ba7061101d83c55d1fb2ed2f537061291739e0582aa8375d6baf76" + "armv8": + url: "https://github.com/bytecodealliance/wasmtime/releases/download/v19.0.2/wasmtime-v19.0.2-aarch64-macos-c-api.tar.xz" + sha256: "d5b1121219d3503dac0f8cfc04a0557eea2330107867d0b32b91bd9fe0b62322" + Android: + "armv8": + url: "https://github.com/bytecodealliance/wasmtime/releases/download/v19.0.2/wasmtime-v19.0.2-aarch64-linux-c-api.tar.xz" + sha256: "6952c3ffcbb0d04c1c7f07c17e945d0fe2b756965d17717fde2c51dcce7465ab" "18.0.3": Windows: "x86_64": @@ -149,213 +239,3 @@ sources: "armv8": url: "https://github.com/bytecodealliance/wasmtime/releases/download/v7.0.0/wasmtime-v7.0.0-aarch64-linux-c-api.tar.xz" sha256: "47a5fcad64a0e223cf1796eafd0fc9ca62c8b3e457942695397feb56382d3db1" - "6.0.1": - Windows: - "x86_64": - url: "https://github.com/bytecodealliance/wasmtime/releases/download/v6.0.1/wasmtime-v6.0.1-x86_64-windows-c-api.zip" - sha256: "09e5a916421933c6b81ae040b1678450a0c23c4286a2327d515001c51e5fe344" - MinGW: - "x86_64": - url: "https://github.com/bytecodealliance/wasmtime/releases/download/v6.0.1/wasmtime-v6.0.1-x86_64-mingw-c-api.zip" - sha256: "03982d3ff2d34d47f5609b4ac3acbc517d25c8ab881df69328d1e21b19ff70c4" - Linux: - "x86_64": - url: "https://github.com/bytecodealliance/wasmtime/releases/download/v6.0.1/wasmtime-v6.0.1-x86_64-linux-c-api.tar.xz" - sha256: "a64c6e7bee46598d9efd357f4e7c6a4dfb3888e389755ff050555e0d330bcc0f" - "armv8": - url: "https://github.com/bytecodealliance/wasmtime/releases/download/v6.0.1/wasmtime-v6.0.1-aarch64-linux-c-api.tar.xz" - sha256: "6dbc2dc9b9cc5ecd937f7fca07b5c87014615a4c00bcbac51ceb78140f9ccdf1" - "s390x": - url: "https://github.com/bytecodealliance/wasmtime/releases/download/v6.0.1/wasmtime-v6.0.1-s390x-linux-c-api.tar.xz" - sha256: "047536e2085372d68ca5ee342d7c11722f8ac5858dd0e99615cf7c4cfa433225" - Macos: - "x86_64": - url: "https://github.com/bytecodealliance/wasmtime/releases/download/v6.0.1/wasmtime-v6.0.1-x86_64-macos-c-api.tar.xz" - sha256: "97bb023c9f8eb206fb2a11befbbdd55003dfd3bcf763dd4bdf72bd02768f3faf" - "armv8": - url: "https://github.com/bytecodealliance/wasmtime/releases/download/v6.0.1/wasmtime-v6.0.1-aarch64-macos-c-api.tar.xz" - sha256: "914c5b7a844c8e04d4f191ac229d4e3714d185971bde1be3203a6041aec5f465" - Android: - "armv8": - url: "https://github.com/bytecodealliance/wasmtime/releases/download/v6.0.1/wasmtime-v6.0.1-aarch64-linux-c-api.tar.xz" - sha256: "6dbc2dc9b9cc5ecd937f7fca07b5c87014615a4c00bcbac51ceb78140f9ccdf1" - "5.0.0": - Windows: - "x86_64": - url: "https://github.com/bytecodealliance/wasmtime/releases/download/v5.0.0/wasmtime-v5.0.0-x86_64-windows-c-api.zip" - sha256: "11b3c7473afee0db400683ac1aa9e5243b3d55dbdaeaca534c7b3481d3e3c8a3" - MinGW: - "x86_64": - url: "https://github.com/bytecodealliance/wasmtime/releases/download/v5.0.0/wasmtime-v5.0.0-x86_64-mingw-c-api.zip" - sha256: "3c87f5c59a10cfda484131dd1454a9bac8b56e48648377178b4b1cbb201358bd" - Linux: - "x86_64": - url: "https://github.com/bytecodealliance/wasmtime/releases/download/v5.0.0/wasmtime-v5.0.0-x86_64-linux-c-api.tar.xz" - sha256: "cbdec67ae16af672d50ff2c47718713d60b6cdc05f7c0bee77f612dde8c7ee92" - "armv8": - url: "https://github.com/bytecodealliance/wasmtime/releases/download/v5.0.0/wasmtime-v5.0.0-aarch64-linux-c-api.tar.xz" - sha256: "1b2baa5038afdd6d8338c4b94487c2b271d391b1f3e0bdf462ca7d9ef1c489df" - "s390x": - url: "https://github.com/bytecodealliance/wasmtime/releases/download/v5.0.0/wasmtime-v5.0.0-s390x-linux-c-api.tar.xz" - sha256: "4ee4fc1e43c5b588f52b309046549928e3f6c1daee373d245c71687c1bd8a2dd" - Macos: - "x86_64": - url: "https://github.com/bytecodealliance/wasmtime/releases/download/v5.0.0/wasmtime-v5.0.0-x86_64-macos-c-api.tar.xz" - sha256: "8c6f326c452598e23e2ba4894378e4ba73d18ce4d488cb1f29a377a47457321c" - "armv8": - url: "https://github.com/bytecodealliance/wasmtime/releases/download/v5.0.0/wasmtime-v5.0.0-aarch64-macos-c-api.tar.xz" - sha256: "7c773aa2650bd9b2b50cfe5faa8bbff772a5417d8fc2ae1f050f575331aa6015" - Android: - "armv8": - url: "https://github.com/bytecodealliance/wasmtime/releases/download/v5.0.0/wasmtime-v5.0.0-aarch64-linux-c-api.tar.xz" - sha256: "1b2baa5038afdd6d8338c4b94487c2b271d391b1f3e0bdf462ca7d9ef1c489df" - "4.0.0": - Windows: - "x86_64": - url: "https://github.com/bytecodealliance/wasmtime/releases/download/v4.0.0/wasmtime-v4.0.0-x86_64-windows-c-api.zip" - sha256: "b2874ab0e2f7588dacef433bd1f9c4cd958243ef4cbbc5886b328cd14eab5d48" - MinGW: - "x86_64": - url: "https://github.com/bytecodealliance/wasmtime/releases/download/v4.0.0/wasmtime-v4.0.0-x86_64-mingw-c-api.zip" - sha256: "68c0a5fccdd875c0d653110af94bceb2d8e35b0d836f8784bccea2d5b5b88108" - Linux: - "x86_64": - url: "https://github.com/bytecodealliance/wasmtime/releases/download/v4.0.0/wasmtime-v4.0.0-x86_64-linux-c-api.tar.xz" - sha256: "174166c8c2294d66844fe9736543e9edc8a28ff8db18b26e8b74f5a27024f8c5" - "armv8": - url: "https://github.com/bytecodealliance/wasmtime/releases/download/v4.0.0/wasmtime-v4.0.0-aarch64-linux-c-api.tar.xz" - sha256: "f3017e9272068a264234efec5df822b619299e138bd2fdab2eca43c73d8e7d26" - "s390x": - url: "https://github.com/bytecodealliance/wasmtime/releases/download/v4.0.0/wasmtime-v4.0.0-s390x-linux-c-api.tar.xz" - sha256: "9243404037187900ed85188744d28501c786abba1098a933a8c80363d3763350" - Macos: - "x86_64": - url: "https://github.com/bytecodealliance/wasmtime/releases/download/v4.0.0/wasmtime-v4.0.0-x86_64-macos-c-api.tar.xz" - sha256: "41d0d2fd9c9942f0b00eac3da6ddfaca5a660a61c6220bc608d2e15d5adfbdd4" - "armv8": - url: "https://github.com/bytecodealliance/wasmtime/releases/download/v4.0.0/wasmtime-v4.0.0-aarch64-macos-c-api.tar.xz" - sha256: "2761ee87f265e520a2ed1d82188c958f5dc244ad6fed94a80f6af33f705a320d" - Android: - "armv8": - url: "https://github.com/bytecodealliance/wasmtime/releases/download/v4.0.0/wasmtime-v4.0.0-aarch64-linux-c-api.tar.xz" - sha256: "f3017e9272068a264234efec5df822b619299e138bd2fdab2eca43c73d8e7d26" - "3.0.0": - Windows: - "x86_64": - url: "https://github.com/bytecodealliance/wasmtime/releases/download/v3.0.0/wasmtime-v3.0.0-x86_64-windows-c-api.zip" - sha256: "4375673c544e43fc5c9c939e05b30efafdb1449412912ee17937272a25ee1ddd" - MinGW: - "x86_64": - url: "https://github.com/bytecodealliance/wasmtime/releases/download/v3.0.0/wasmtime-v3.0.0-x86_64-mingw-c-api.zip" - sha256: "793a0179391e1f9b6699b1054b37dfffc36b7ab5eff401bb16a8fe66e6e42ee1" - Linux: - "x86_64": - url: "https://github.com/bytecodealliance/wasmtime/releases/download/v3.0.0/wasmtime-v3.0.0-x86_64-linux-c-api.tar.xz" - sha256: "0cdc7e36fa752c66d57121555fa58370581613e8c119654a4a12c197d4fde148" - "armv8": - url: "https://github.com/bytecodealliance/wasmtime/releases/download/v3.0.0/wasmtime-v3.0.0-aarch64-linux-c-api.tar.xz" - sha256: "93c3dcd7b315a98de221d68e0d253cfcbf122328aea285c28e70aa0ea6582088" - "s390x": - url: "https://github.com/bytecodealliance/wasmtime/releases/download/v3.0.0/wasmtime-v3.0.0-s390x-linux-c-api.tar.xz" - sha256: "9e19c795996a94ece9d0bf00c88cbb1081552c4ae0590effd50121351fb8303e" - Macos: - "x86_64": - url: "https://github.com/bytecodealliance/wasmtime/releases/download/v3.0.0/wasmtime-v3.0.0-x86_64-macos-c-api.tar.xz" - sha256: "df85111b0b20ee5a4201eae7c7cf368f905e6b73d186fcbf7347f750278a598d" - "armv8": - url: "https://github.com/bytecodealliance/wasmtime/releases/download/v3.0.0/wasmtime-v3.0.0-aarch64-macos-c-api.tar.xz" - sha256: "253a3d1c79134665ab2d7ae0672227b8d88b2becbb84ab96ceeee897a074801a" - Android: - "armv8": - url: "https://github.com/bytecodealliance/wasmtime/releases/download/v3.0.0/wasmtime-v3.0.0-aarch64-linux-c-api.tar.xz" - sha256: "93c3dcd7b315a98de221d68e0d253cfcbf122328aea285c28e70aa0ea6582088" - "2.0.0": - Windows: - "x86_64": - url: "https://github.com/bytecodealliance/wasmtime/releases/download/v2.0.0/wasmtime-v2.0.0-x86_64-windows-c-api.zip" - sha256: "ada9fe8f706811f3f63dcaa4c7c72519893f91ae7980f7f8ed6e542932ad6a4e" - MinGW: - "x86_64": - url: "https://github.com/bytecodealliance/wasmtime/releases/download/v2.0.0/wasmtime-v2.0.0-x86_64-mingw-c-api.zip" - sha256: "dc024d00671098260643b51b3609bb808f440bb8e2f06d9fad6c2af1160d16b7" - Linux: - "x86_64": - url: "https://github.com/bytecodealliance/wasmtime/releases/download/v2.0.0/wasmtime-v2.0.0-x86_64-linux-c-api.tar.xz" - sha256: "c216f16a0494b7b609890effcd417b9807dc8a6d5c47818fb4a297fef2bb54e3" - "armv8": - url: "https://github.com/bytecodealliance/wasmtime/releases/download/v2.0.0/wasmtime-v2.0.0-aarch64-linux-c-api.tar.xz" - sha256: "9bbcfbcc68b9b8c4572f0bdd956e1a558f9a01e82bd099fac9c7755220c92189" - "s390x": - url: "https://github.com/bytecodealliance/wasmtime/releases/download/v2.0.0/wasmtime-v2.0.0-s390x-linux-c-api.tar.xz" - sha256: "9bbe40d443a34b1d8f71c9239d87555e9f41e04a9d84f085186711b8075ec5ef" - Macos: - "x86_64": - url: "https://github.com/bytecodealliance/wasmtime/releases/download/v2.0.0/wasmtime-v2.0.0-x86_64-macos-c-api.tar.xz" - sha256: "658f8834a322ddf35cfcfc2c56afbbfad91106a00633d5c6c932757fa83378b2" - "armv8": - url: "https://github.com/bytecodealliance/wasmtime/releases/download/v2.0.0/wasmtime-v2.0.0-aarch64-macos-c-api.tar.xz" - sha256: "08749d061565f9b48a29c57d3ef9ee2d432d531fad8758be97b1c98bfda1c14b" - Android: - "armv8": - url: "https://github.com/bytecodealliance/wasmtime/releases/download/v2.0.0/wasmtime-v2.0.0-aarch64-linux-c-api.tar.xz" - sha256: "9bbcfbcc68b9b8c4572f0bdd956e1a558f9a01e82bd099fac9c7755220c92189" - "1.0.1": - Windows: - "x86_64": - url: "https://github.com/bytecodealliance/wasmtime/releases/download/v1.0.1/wasmtime-v1.0.1-x86_64-windows-c-api.zip" - sha256: "7b8ae00997d3d6fef21d084141f843db9d2c562ca24aebccb5b20cdbba93c8c2" - MinGW: - "x86_64": - url: "https://github.com/bytecodealliance/wasmtime/releases/download/v1.0.1/wasmtime-v1.0.1-x86_64-mingw-c-api.zip" - sha256: "ce5b516b3924fdf38e200cad2fd9438ac35bf7ddd734aea3e2dee8f319e275c3" - Linux: - "x86_64": - url: "https://github.com/bytecodealliance/wasmtime/releases/download/v1.0.1/wasmtime-v1.0.1-x86_64-linux-c-api.tar.xz" - sha256: "b481b015c8805acabf2d1aad3b005a8564ac11f3c5b360bbbf71ba0f03e2c067" - "armv8": - url: "https://github.com/bytecodealliance/wasmtime/releases/download/v1.0.1/wasmtime-v1.0.1-aarch64-linux-c-api.tar.xz" - sha256: "aa950e47fdff4970efb7a59a3ea9e96b965180f9e84be46280915086f0ad7519" - "s390x": - url: "https://github.com/bytecodealliance/wasmtime/releases/download/v1.0.1/wasmtime-v1.0.1-s390x-linux-c-api.tar.xz" - sha256: "b197a1d8878ae98b2a6ca769bc89aeda9352cb516f94d5a8d84453666ba57ab6" - Macos: - "x86_64": - url: "https://github.com/bytecodealliance/wasmtime/releases/download/v1.0.1/wasmtime-v1.0.1-x86_64-macos-c-api.tar.xz" - sha256: "fc570e49cf3c4d66b69770ecee692e1cf27d0fa6a6363c83f3f5cca23ac9dc3b" - "armv8": - url: "https://github.com/bytecodealliance/wasmtime/releases/download/v1.0.1/wasmtime-v1.0.1-aarch64-macos-c-api.tar.xz" - sha256: "48fe254302c6519bf289a4d1385dd425a1c65c4dd521d88dc6a1fab6f025bd19" - Android: - "armv8": - url: "https://github.com/bytecodealliance/wasmtime/releases/download/v1.0.1/wasmtime-v1.0.1-aarch64-linux-c-api.tar.xz" - sha256: "aa950e47fdff4970efb7a59a3ea9e96b965180f9e84be46280915086f0ad7519" - "0.39.1": - Windows: - "x86_64": - url: "https://github.com/bytecodealliance/wasmtime/releases/download/v0.39.1/wasmtime-v0.39.1-x86_64-windows-c-api.zip" - sha256: "1bf83b7bfda81e2b7df5cede0b0b3dd29ff615ecaccb2ad59f266651f13ccab4" - MinGW: - "x86_64": - url: "https://github.com/bytecodealliance/wasmtime/releases/download/v0.39.1/wasmtime-v0.39.1-x86_64-mingw-c-api.zip" - sha256: "802325d7f1bbacd8b4c439cac7df9cdd35a9e7285fcd70bee217967a0f8c7ee7" - Linux: - "x86_64": - url: "https://github.com/bytecodealliance/wasmtime/releases/download/v0.39.1/wasmtime-v0.39.1-x86_64-linux-c-api.tar.xz" - sha256: "b8580211b10b4380039700c5dd75813fc56138faf79fc86d63cc1abfe84c099b" - "armv8": - url: "https://github.com/bytecodealliance/wasmtime/releases/download/v0.39.1/wasmtime-v0.39.1-aarch64-linux-c-api.tar.xz" - sha256: "3fb770e9afa3114c3ffe9f60e696ba3e4a74d34e4b50b59cce27c3d118f215b1" - "s390x": - url: "https://github.com/bytecodealliance/wasmtime/releases/download/v0.39.1/wasmtime-v0.39.1-s390x-linux-c-api.tar.xz" - sha256: "65d662cc3948b89aab1f56d44da129d117798a59bdc938e90d6412d620980d72" - Macos: - "x86_64": - url: "https://github.com/bytecodealliance/wasmtime/releases/download/v0.39.1/wasmtime-v0.39.1-x86_64-macos-c-api.tar.xz" - sha256: "a045371654222d7eb29ca23520ebf64d8144ea8e1ae0b38df2f39cdeb83e3649" - "armv8": - url: "https://github.com/bytecodealliance/wasmtime/releases/download/v0.39.1/wasmtime-v0.39.1-aarch64-macos-c-api.tar.xz" - sha256: "a5e0e3b1acf924771d84beec6462baa00d9a436df2d65748bcd202cb8470d267" - Android: - "armv8": - url: "https://github.com/bytecodealliance/wasmtime/releases/download/v0.39.1/wasmtime-v0.39.1-aarch64-linux-c-api.tar.xz" - sha256: "3fb770e9afa3114c3ffe9f60e696ba3e4a74d34e4b50b59cce27c3d118f215b1" diff --git a/recipes/wasmtime/config.yml b/recipes/wasmtime/config.yml index e2a5b299e7fea..5bcf55a2755ca 100644 --- a/recipes/wasmtime/config.yml +++ b/recipes/wasmtime/config.yml @@ -1,4 +1,10 @@ versions: + "21.0.0": + folder: all + "20.0.1": + folder: all + "19.0.2": + folder: all "18.0.3": folder: all "16.0.0": @@ -11,15 +17,3 @@ versions: folder: all "6.0.1": folder: all - "5.0.0": - folder: all - "4.0.0": - folder: all - "3.0.0": - folder: all - "2.0.0": - folder: all - "1.0.1": - folder: all - "0.39.1": - folder: all diff --git a/recipes/watcher/all/conandata.yml b/recipes/watcher/all/conandata.yml index 533a3689631b9..6976da974f6c5 100644 --- a/recipes/watcher/all/conandata.yml +++ b/recipes/watcher/all/conandata.yml @@ -1,4 +1,13 @@ sources: + "0.12.0": + url: "https://github.com/e-dant/watcher/archive/release/0.12.0.tar.gz" + sha256: "9dd4758f4c45ae7925619ceee9e3bd5a0b33577aa5ac2cd857eca14d16749723" + "0.11.0": + url: "https://github.com/e-dant/watcher/archive/release/0.11.0.tar.gz" + sha256: "dd92496d77b6bc27e27ed28253faae4d81bc58b19407d154bb49504b2af73664" + "0.10.1": + url: "https://github.com/e-dant/watcher/archive/release/0.10.1.tar.gz" + sha256: "cc14b0adfc23ae90390cf8b4f20291abbc5bf0e358b5d12fa73f7e21d021ccd0" "0.10.0": url: "https://github.com/e-dant/watcher/archive/release/0.10.0.tar.gz" sha256: "c15f088ddc41b58100921ea0b630bcbde83c9960aefecf82221da997f4d4b4ec" @@ -14,26 +23,3 @@ sources: "0.8.7": url: "https://github.com/e-dant/watcher/archive/release/0.8.7.tar.gz" sha256: "e83eaf097f8ebe9b87bee2962e6e18f6f2597ae4e76d8d0258adc2c62fa545d2" - "0.8.0": - url: "https://github.com/e-dant/watcher/archive/release/0.8.0.tar.gz" - sha256: "74530f5f6c083ec0348ec41938ae43b02bed1d125125623394f31038fec6f9d1" - "0.6.0": - url: "https://github.com/e-dant/watcher/archive/release/0.6.0.tar.gz" - sha256: "156669c92f9119d658954e124fcd9fc640999fb8a45e2bd915ea8b05e15b925a" - "0.5.5": - url: "https://github.com/e-dant/watcher/archive/release/0.5.5.tar.gz" - sha256: "55da2b7a22cbdba836a405d5cab31a461e84e4e686a117f06399a806d33b2d09" - "0.5.4": - url: "https://github.com/e-dant/watcher/archive/release/0.5.4.tar.gz" - sha256: "0dac1d89886252bb0b999c2dad85aff283022a2b4393922a993459b180b8c663" - "0.5.2": - url: "https://github.com/e-dant/watcher/archive/release/0.5.2.tar.gz" - sha256: "e18e663f9a72a59fca3e7a9e125ca77823b03a3388aa569398965777c5671173" - "0.4.3": - url: "https://github.com/e-dant/watcher/archive/release/0.4.3.tar.gz" - sha256: "8603b45edfa5023752d9e2fdd731efe5a556a542aaf03f6be0e69c68f552b25a" -patches: - "0.5.5": - - patch_file: "patches/0.5.5-fix-limits_max.patch" - patch_description: "fix max macro error in windows" - patch_type: "portability" diff --git a/recipes/watcher/all/conanfile.py b/recipes/watcher/all/conanfile.py index e70c9cb544fb1..167c9652d196e 100644 --- a/recipes/watcher/all/conanfile.py +++ b/recipes/watcher/all/conanfile.py @@ -1,11 +1,10 @@ from conan import ConanFile from conan.errors import ConanInvalidConfiguration -from conan.tools.files import export_conandata_patches, apply_conandata_patches, get, copy +from conan.tools.files import get, copy from conan.tools.build import check_min_cppstd from conan.tools.apple import is_apple_os from conan.tools.layout import basic_layout from conan.tools.scm import Version -from conan.tools.microsoft import is_msvc import os required_conan_version = ">=1.49.0" @@ -19,6 +18,7 @@ class WatcherConan(ConanFile): topics = ("watch", "filesystem", "event", "header-only") package_type = "header-library" settings = "os", "arch", "compiler", "build_type" + no_copy_source = True @property def _min_cppstd(self): @@ -43,9 +43,6 @@ def _compilers_minimum_version(self): }, }.get(self._min_cppstd, {}) - def export_sources(self): - export_conandata_patches(self) - def layout(self): basic_layout(self, src_folder="src") @@ -71,9 +68,6 @@ def loose_lt_semver(v1, v2): def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) - def build(self): - apply_conandata_patches(self) - def package(self): copy(self, pattern="LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) copy( diff --git a/recipes/watcher/all/patches/0.5.5-fix-limits_max.patch b/recipes/watcher/all/patches/0.5.5-fix-limits_max.patch deleted file mode 100644 index aeed151aa95e0..0000000000000 --- a/recipes/watcher/all/patches/0.5.5-fix-limits_max.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/include/watcher/detail/adapter/adapter.hpp b/include/watcher/detail/adapter/adapter.hpp -index 3d43bb8..597c0bc 100644 ---- a/include/watcher/detail/adapter/adapter.hpp -+++ b/include/watcher/detail/adapter/adapter.hpp -@@ -23,7 +23,7 @@ namespace adapter { - - namespace { - inline constexpr size_t watch_count_max -- = std::numeric_limits::max() - 1; -+ = (std::numeric_limits::max)() - 1; - } /* namespace */ - - /* @brief wtr/watcher/detail/adapter/message diff --git a/recipes/watcher/config.yml b/recipes/watcher/config.yml index 83559e08c8922..4670527815f92 100644 --- a/recipes/watcher/config.yml +++ b/recipes/watcher/config.yml @@ -1,4 +1,10 @@ versions: + "0.12.0": + folder: all + "0.11.0": + folder: all + "0.10.1": + folder: all "0.10.0": folder: all "0.9.5": @@ -9,15 +15,3 @@ versions: folder: all "0.8.7": folder: all - "0.8.0": - folder: all - "0.6.0": - folder: all - "0.5.5": - folder: all - "0.5.4": - folder: all - "0.5.2": - folder: all - "0.4.3": - folder: all diff --git a/recipes/wayland-protocols/all/conandata.yml b/recipes/wayland-protocols/all/conandata.yml index f1d13be6a19d7..045450ce454eb 100644 --- a/recipes/wayland-protocols/all/conandata.yml +++ b/recipes/wayland-protocols/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.36": + url: "https://gitlab.freedesktop.org/wayland/wayland-protocols/-/releases/1.36/downloads/wayland-protocols-1.36.tar.xz" + sha256: "71fd4de05e79f9a1ca559fac30c1f8365fa10346422f9fe795f74d77b9ef7e92" "1.33": url: "https://gitlab.freedesktop.org/wayland/wayland-protocols/-/releases/1.33/downloads/wayland-protocols-1.33.tar.xz" sha256: "94f0c50b090d6e61a03f62048467b19abbe851be4e11ae7b36f65f8b98c3963a" diff --git a/recipes/wayland-protocols/all/conanfile.py b/recipes/wayland-protocols/all/conanfile.py index 9302d46b476a0..6a19784308d45 100644 --- a/recipes/wayland-protocols/all/conanfile.py +++ b/recipes/wayland-protocols/all/conanfile.py @@ -18,6 +18,7 @@ class WaylandProtocolsConan(ConanFile): homepage = "https://gitlab.freedesktop.org/wayland/wayland-protocols" license = "MIT" settings = "os", "arch", "compiler", "build_type" + short_paths = True def package_id(self): self.info.clear() diff --git a/recipes/wayland-protocols/config.yml b/recipes/wayland-protocols/config.yml index cc206c4509688..08a4d22e31f12 100644 --- a/recipes/wayland-protocols/config.yml +++ b/recipes/wayland-protocols/config.yml @@ -1,4 +1,6 @@ versions: + "1.36": + folder: all "1.33": folder: all "1.32": diff --git a/recipes/wayland/all/conanfile.py b/recipes/wayland/all/conanfile.py index 865c98752b9de..a946c8f8c05b2 100644 --- a/recipes/wayland/all/conanfile.py +++ b/recipes/wayland/all/conanfile.py @@ -50,15 +50,15 @@ def requirements(self): if self.options.enable_libraries: self.requires("libffi/3.4.4") if self.options.enable_dtd_validation: - self.requires("libxml2/2.12.3") - self.requires("expat/2.6.0") + self.requires("libxml2/[>=2.12.5 <3]") + self.requires("expat/[>=2.6.2 <3]") def validate(self): if self.settings.os != "Linux": raise ConanInvalidConfiguration(f"{self.ref} only supports Linux") def build_requirements(self): - self.tool_requires("meson/1.3.1") + self.tool_requires("meson/1.4.0") if not self.conf.get("tools.gnu:pkg_config", default=False, check_type=str): self.tool_requires("pkgconf/2.1.0") if not can_run(self): diff --git a/recipes/whisper-cpp/all/conandata.yml b/recipes/whisper-cpp/all/conandata.yml index 1c610fb8c4e68..9575136360485 100644 --- a/recipes/whisper-cpp/all/conandata.yml +++ b/recipes/whisper-cpp/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.6.2": + url: "https://github.com/ggerganov/whisper.cpp/archive/refs/tags/v1.6.2.tar.gz" + sha256: "da7988072022acc3cfa61b370b3c51baad017f1900c3dc4e68cb276499f66894" "1.5.2": url: "https://github.com/ggerganov/whisper.cpp/archive/refs/tags/v1.5.2.tar.gz" sha256: "be9c4d5d4b5f28f02e36f28e602b7d2dcfd734dd1c834ddae91ae8db601e951f" @@ -9,6 +12,10 @@ sources: url: "https://github.com/ggerganov/whisper.cpp/archive/refs/tags/v1.2.1.tar.gz" sha256: "69d47fc2ba982c42bd5bade4b7c827d5b3ed74b9c59323991c45a9f0f24eb6ed" patches: + "1.6.2": + - patch_file: "patches/1.6.2-0001-remove_hardcoded_cxxstd.patch" + patch_description: "Remove hardcoded CMAKE_CXX_STANDARD" + patch_type: "conan" "1.2.1": - patch_file: "patches/1.2.1-0001-find_package_openblas.patch" patch_description: "Fix OpenBlas cmake target name" diff --git a/recipes/whisper-cpp/all/patches/1.6.2-0001-remove_hardcoded_cxxstd.patch b/recipes/whisper-cpp/all/patches/1.6.2-0001-remove_hardcoded_cxxstd.patch new file mode 100644 index 0000000000000..9e041fd99d19b --- /dev/null +++ b/recipes/whisper-cpp/all/patches/1.6.2-0001-remove_hardcoded_cxxstd.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 82913aa..f3a2d27 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -125,8 +125,6 @@ find_package(Threads REQUIRED) + #compile flag sycl + if (WHISPER_SYCL) + set(CMAKE_CXX_STANDARD 17) +-else() +- set(CMAKE_CXX_STANDARD 11) + endif() + + if (WHISPER_FFMPEG) diff --git a/recipes/whisper-cpp/config.yml b/recipes/whisper-cpp/config.yml index 8c62d29e8f324..a159f6f70ca5c 100644 --- a/recipes/whisper-cpp/config.yml +++ b/recipes/whisper-cpp/config.yml @@ -1,4 +1,6 @@ versions: + "1.6.2": + folder: "all" "1.5.2": folder: "all" "1.4.3": diff --git a/recipes/wil/all/conandata.yml b/recipes/wil/all/conandata.yml index 50c0114259eca..4dda604c7c75a 100644 --- a/recipes/wil/all/conandata.yml +++ b/recipes/wil/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.0.240803.1": + url: "https://github.com/microsoft/wil/archive/refs/tags/v1.0.240803.1.tar.gz" + sha256: "39910ab105c6df345e4018a2b61dfbc909a8816c971a3d2cebbefa1f8c481cc6" "1.0.240122.1": url: "https://github.com/microsoft/wil/archive/refs/tags/v1.0.240122.1.tar.gz" sha256: "e599f2843c01b9e4827e46f11d3651180675c8ecdbba8bdae735f533672989d3" diff --git a/recipes/wil/config.yml b/recipes/wil/config.yml index f3a417272a35c..67c36e1a1f315 100644 --- a/recipes/wil/config.yml +++ b/recipes/wil/config.yml @@ -1,4 +1,6 @@ versions: + "1.0.240803.1": + folder: "all" "1.0.240122.1": folder: "all" "1.0.231216.1": diff --git a/recipes/wineditline/all/CMakeLists.txt b/recipes/wineditline/all/CMakeLists.txt deleted file mode 100644 index 1fedb144d2f6c..0000000000000 --- a/recipes/wineditline/all/CMakeLists.txt +++ /dev/null @@ -1,8 +0,0 @@ -cmake_minimum_required(VERSION 3.1) - -project(WinEditLineWrapper C) - -include("${CMAKE_BINARY_DIR}/conanbuildinfo.cmake") -conan_basic_setup(TARGETS) - -add_subdirectory(source_subfolder) diff --git a/recipes/wineditline/all/conandata.yml b/recipes/wineditline/all/conandata.yml index 789f36bc66156..d9e2a2c6f39a9 100644 --- a/recipes/wineditline/all/conandata.yml +++ b/recipes/wineditline/all/conandata.yml @@ -1,8 +1,4 @@ sources: "2.206": sha256: "2d255c417244e963261dc6171684265f405df030e90ba6e6690a99284d645161" - url: https://sourceforge.net/projects/mingweditline/files/wineditline-2.206.zip/download -patches: - "2.206": - - patch_file: patches/0001-fix-cmakelists.patch - base_path: source_subfolder + url: "https://sourceforge.net/projects/mingweditline/files/wineditline-2.206.zip" diff --git a/recipes/wineditline/all/conanfile.py b/recipes/wineditline/all/conanfile.py index 3888bf2a8557f..1a01961f91168 100644 --- a/recipes/wineditline/all/conanfile.py +++ b/recipes/wineditline/all/conanfile.py @@ -1,64 +1,63 @@ -import functools import os -from conans import ConanFile, CMake, tools -from conans.errors import ConanInvalidConfiguration +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout +from conan.tools.files import copy, get -required_conan_version = ">=1.43.0" +required_conan_version = ">=1.53.0" class WineditlineConan(ConanFile): name = "wineditline" - description = ( - "A BSD-licensed EditLine API implementation for the native " - "Windows Console" - ) + description = "A BSD-licensed EditLine API implementation for the native Windows Console" + license = "BSD-3-Clause" url = "https://github.com/conan-io/conan-center-index" homepage = "http://mingweditline.sourceforge.net/" topics = ("readline", "editline", "windows") - license = "BSD-3-Clause" - generators = ("cmake",) - settings = ("os", "arch", "compiler", "build_type") + + package_type = "library" + settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], } default_options = { "shared": False, } - exports_sources = ("patches/*", "CMakeLists.txt") + provides = "editline" + + @property + def _target_name(self): + return "edit" if self.options.shared else "edit_static" + + def configure(self): + self.settings.rm_safe("compiler.libcxx") + self.settings.rm_safe("compiler.cppstd") + + def layout(self): + cmake_layout(self, src_folder="src") def validate(self): if self.settings.os != "Windows": - message = "wineditline is supported only on Windows." - raise ConanInvalidConfiguration(message) - - @property - def _source_subfolder(self): - return "source_subfolder" + raise ConanInvalidConfiguration(f"{self.ref} is supported only on Windows.") def source(self): - root = self._source_subfolder - get_args = self.conan_data["sources"][self.version] - tools.get(**get_args, destination=root, strip_root=True) + get(self, **self.conan_data["sources"][self.version], strip_root=True) - def configure(self): - del self.settings.compiler.libcxx - del self.settings.compiler.cppstd + def generate(self): + tc = CMakeToolchain(self) + tc.generate() - @functools.lru_cache(1) - def _configure_cmake(self): + def build(self): cmake = CMake(self) cmake.configure() - return cmake - - def build(self): - for patch in self.conan_data["patches"][self.version]: - tools.patch(**patch) - self._configure_cmake().build() + cmake.build(target=self._target_name) def package(self): - self.copy("COPYING", "licenses", self._source_subfolder) - self._configure_cmake().install() + copy(self, "COPYING", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) + copy(self, "*.h", dst=os.path.join(self.package_folder, "include", "editline"), src=os.path.join(self.source_folder, "src", "editline")) + copy(self, "*.lib", dst=os.path.join(self.package_folder, "lib"), src=self.build_folder, keep_path=False) + copy(self, "*.dll", dst=os.path.join(self.package_folder, "bin"), src=self.build_folder, keep_path=False) def package_info(self): - self.cpp_info.libs = ["edit"] + self.cpp_info.libs = [self._target_name] diff --git a/recipes/wineditline/all/patches/0001-fix-cmakelists.patch b/recipes/wineditline/all/patches/0001-fix-cmakelists.patch deleted file mode 100644 index ef01b0ca0616b..0000000000000 --- a/recipes/wineditline/all/patches/0001-fix-cmakelists.patch +++ /dev/null @@ -1,43 +0,0 @@ ---- CMakeLists.txt -+++ CMakeLists.txt -@@ -1,25 +1,16 @@ --cmake_minimum_required (VERSION 2.6) --project (WinEditLine) --set (WinEditLine_VERSION_MAJOR 2) --set (WinEditLine_VERSION_MINOR 2) --if (MSVC AND MSVC_USE_STATIC_RUNTIME) --foreach(flag_var -- CMAKE_C_FLAGS CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_RELEASE -- CMAKE_C_FLAGS_MINSIZEREL CMAKE_C_FLAGS_RELWITHDEBINFO) -- if(${flag_var} MATCHES "/MD") -- string(REGEX REPLACE "/MD" "/MT" ${flag_var} "${${flag_var}}") -- endif(${flag_var} MATCHES "/MD") --endforeach(flag_var) --endif() --if(NOT DEFINED LIB_SUFFIX) -- if(CMAKE_SIZEOF_VOID_P MATCHES 4) -- set(LIB_SUFFIX "32") -- else() -- set(LIB_SUFFIX "64") -- endif() --endif() --configure_file ( -- "${PROJECT_SOURCE_DIR}/src/config.h.in" -- "${PROJECT_BINARY_DIR}/config.h" -+cmake_minimum_required(VERSION 3.1) -+ -+project(WinEditLine C) -+ -+add_library(edit src/editline.c src/fn_complete.c src/history.c src/libedit.def) -+target_include_directories(edit PRIVATE src) -+ -+include(GNUInstallDirs) -+ -+install( -+ TARGETS edit -+ RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" -+ ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" - ) --add_subdirectory (src) -+ -+install(DIRECTORY src/editline DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}") diff --git a/recipes/wineditline/all/test_package/CMakeLists.txt b/recipes/wineditline/all/test_package/CMakeLists.txt index 84a38c545c793..3d8aa097f7a2f 100644 --- a/recipes/wineditline/all/test_package/CMakeLists.txt +++ b/recipes/wineditline/all/test_package/CMakeLists.txt @@ -1,9 +1,6 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.15) project(test_package C) -include("${CMAKE_BINARY_DIR}/conanbuildinfo.cmake") -conan_basic_setup(TARGETS) - find_package(wineditline REQUIRED CONFIG) add_executable(test_package test_package.c) diff --git a/recipes/wineditline/all/test_package/conanfile.py b/recipes/wineditline/all/test_package/conanfile.py index ec80e0c5cc134..ef5d7042163ec 100644 --- a/recipes/wineditline/all/test_package/conanfile.py +++ b/recipes/wineditline/all/test_package/conanfile.py @@ -1,11 +1,19 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake import os -from conans import ConanFile, CMake, tools - class TestPackageConan(ConanFile): - settings = ("os", "compiler", "build_type", "arch") - generators = ("cmake", "cmake_find_package_multi") + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) def build(self): cmake = CMake(self) @@ -13,6 +21,6 @@ def build(self): cmake.build() def test(self): - if not tools.cross_building(self): - bin_path = os.path.join("bin", "test_package") - self.run(bin_path, run_environment=True) + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/wineditline/all/test_package/test_package.c b/recipes/wineditline/all/test_package/test_package.c index b51e6feba3274..452b5269fcee7 100644 --- a/recipes/wineditline/all/test_package/test_package.c +++ b/recipes/wineditline/all/test_package/test_package.c @@ -1,12 +1,7 @@ #include #include -int main(int argc, char const* argv[]) -{ - (void)argc; - (void)argv; - - free_history_entry(NULL); - - return 0; +int main() { + free_history_entry(NULL); + return 0; } diff --git a/recipes/wineditline/all/test_v1_package/CMakeLists.txt b/recipes/wineditline/all/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..91630d79f4abb --- /dev/null +++ b/recipes/wineditline/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/wineditline/all/test_v1_package/conanfile.py b/recipes/wineditline/all/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..ec80e0c5cc134 --- /dev/null +++ b/recipes/wineditline/all/test_v1_package/conanfile.py @@ -0,0 +1,18 @@ +import os + +from conans import ConanFile, CMake, tools + + +class TestPackageConan(ConanFile): + settings = ("os", "compiler", "build_type", "arch") + generators = ("cmake", "cmake_find_package_multi") + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if not tools.cross_building(self): + bin_path = os.path.join("bin", "test_package") + self.run(bin_path, run_environment=True) diff --git a/recipes/wiringpi/all/CMakeLists.txt b/recipes/wiringpi/all/CMakeLists.txt index 6d527ad7fbe95..80de9a56905b7 100644 --- a/recipes/wiringpi/all/CMakeLists.txt +++ b/recipes/wiringpi/all/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 2.8.11) -project(wiringPi C) +project(wiringPi LANGUAGES C) file(GLOB SRC_FILES ${WIRINGPI_SRC_DIR}/wiringPi/*.c) diff --git a/recipes/wiringpi/all/conandata.yml b/recipes/wiringpi/all/conandata.yml index 307e8283601a9..01a4914b9830b 100644 --- a/recipes/wiringpi/all/conandata.yml +++ b/recipes/wiringpi/all/conandata.yml @@ -1,4 +1,16 @@ sources: + "3.10": + url: "https://github.com/WiringPi/WiringPi/archive/refs/tags/3.10.tar.gz" + sha256: "d0a7b182154e763b4baff1a57a5e0fca093fcf081f663cb2fb17f5ada564e016" + "3.8": + url: "https://github.com/WiringPi/WiringPi/archive/refs/tags/3.8.tar.gz" + sha256: "6159764d3d036486f0a110cd5393b1413c1f334d464b7337117fece59ea04bc9" + "3.6": + url: "https://github.com/WiringPi/WiringPi/archive/refs/tags/3.6.tar.gz" + sha256: "bec180a14ccd2d6b4eb5248d6553593511e7881348f56f8c98515a6d5d5444ee" + "3.4": + url: "https://github.com/WiringPi/WiringPi/archive/refs/tags/3.4.tar.gz" + sha256: "a81219e9ea0ce08295d2fc0457c69c4df0c6d2e846cb5817ba3247f673480d55" "3.2": url: "https://github.com/WiringPi/WiringPi/archive/refs/tags/3.2.tar.gz" sha256: "45aeaf52d86631edb7a5c82a4f6d0050ef10c8b4de6c566cd8017fc52a17b68e" diff --git a/recipes/wiringpi/all/conanfile.py b/recipes/wiringpi/all/conanfile.py index ec52053dc1d9c..882e90a790561 100644 --- a/recipes/wiringpi/all/conanfile.py +++ b/recipes/wiringpi/all/conanfile.py @@ -12,7 +12,7 @@ class WiringpiConan(ConanFile): description = "GPIO Interface library for the Raspberry Pi" license = "LGPL-3.0" url = "https://github.com/conan-io/conan-center-index" - homepage = "http://wiringpi.com" + homepage = "https://github.com/WiringPi/WiringPi" topics = ("wiringpi", "gpio", "raspberrypi") settings = "os", "arch", "compiler", "build_type" package_type = "library" diff --git a/recipes/wiringpi/all/test_package/CMakeLists.txt b/recipes/wiringpi/all/test_package/CMakeLists.txt index 619241be63343..3dfbe8a866f08 100644 --- a/recipes/wiringpi/all/test_package/CMakeLists.txt +++ b/recipes/wiringpi/all/test_package/CMakeLists.txt @@ -1,7 +1,7 @@ -cmake_minimum_required(VERSION 3.1) -project(test_package C) +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES C) find_package(wiringpi REQUIRED CONFIG) add_executable(test_package test_package.c) -target_link_libraries(test_package wiringpi::wiringpi) +target_link_libraries(test_package PRIVATE wiringpi::wiringpi) diff --git a/recipes/wiringpi/config.yml b/recipes/wiringpi/config.yml index 09456181564b6..36ce1b9437329 100644 --- a/recipes/wiringpi/config.yml +++ b/recipes/wiringpi/config.yml @@ -1,4 +1,12 @@ versions: + "3.10": + folder: "all" + "3.8": + folder: "all" + "3.6": + folder: "all" + "3.4": + folder: "all" "3.2": folder: "all" "2.61-1": diff --git a/recipes/wolfssl/all/conandata.yml b/recipes/wolfssl/all/conandata.yml index df40064b3c0f9..ac2d8b39c2b06 100644 --- a/recipes/wolfssl/all/conandata.yml +++ b/recipes/wolfssl/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "5.7.2": + url: "https://github.com/wolfSSL/wolfssl/archive/v5.7.2-stable.tar.gz" + sha256: "0f2ed82e345b833242705bbc4b08a2a2037a33f7bf9c610efae6464f6b10e305" "5.7.0": url: "https://github.com/wolfSSL/wolfssl/archive/v5.7.0-stable.tar.gz" sha256: "2de93e8af588ee856fe67a6d7fce23fc1b226b74d710b0e3946bc8061f6aa18f" diff --git a/recipes/wolfssl/all/conanfile.py b/recipes/wolfssl/all/conanfile.py index 3ec9c448508a0..71b7470fcdfeb 100644 --- a/recipes/wolfssl/all/conanfile.py +++ b/recipes/wolfssl/all/conanfile.py @@ -14,13 +14,13 @@ class WolfSSLConan(ConanFile): name = "wolfssl" - license = "GPL-2.0-or-later" - url = "https://github.com/conan-io/conan-center-index" - homepage = "https://www.wolfssl.com/" description = ( "wolfSSL (formerly CyaSSL) is a small, fast, portable implementation " "of TLS/SSL for embedded devices to the cloud." ) + license = "GPL-2.0-or-later" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://www.wolfssl.com/" topics = ("wolfssl", "tls", "ssl", "iot", "fips", "secure", "cryptology", "secret") package_type = "library" settings = "os", "arch", "compiler", "build_type" @@ -40,7 +40,9 @@ class WolfSSLConan(ConanFile): "sni": [True, False], "testcert": [True, False], "with_curl": [True, False], + "with_quic": [True, False], "with_experimental": [True, False], + "with_rpk": [True, False], } default_options = { "shared": False, @@ -58,7 +60,9 @@ class WolfSSLConan(ConanFile): "sni": False, "testcert": False, "with_curl": False, + "with_quic": False, "with_experimental": False, + "with_rpk": False, } @property @@ -70,8 +74,12 @@ def config_options(self): del self.options.fPIC if Version(self.version) < "5.2.0": del self.options.with_curl + if Version(self.version) < "5.5.0": + del self.options.with_quic if Version(self.version) < "5.7.0": del self.options.with_experimental + if Version(self.version) < "5.7.2": + del self.options.with_rpk def configure(self): if self.options.shared: @@ -88,6 +96,7 @@ def validate(self): def build_requirements(self): self.tool_requires("libtool/2.4.7") + self.tool_requires("cmake/[>=3.22 <4]") if self._settings_build.os == "Windows": self.win_bash = True if not self.conf.get("tools.microsoft.bash:path", check_type=str): @@ -112,7 +121,7 @@ def generate(self): "--enable-sslv3={}".format(yes_no(self.options.sslv3)), "--enable-alpn={}".format(yes_no(self.options.alpn)), "--enable-des3={}".format(yes_no(self.options.des3)), - "--enable-tls13={}".format(yes_no(self.options.tls13)), + "--enable-tls13={}".format(yes_no(self.options.tls13 or self.options.get_safe("with_quic"))), "--enable-certgen={}".format(yes_no(self.options.certgen)), "--enable-dsa={}".format(yes_no(self.options.dsa)), "--enable-ripemd={}".format(yes_no(self.options.ripemd)), @@ -124,8 +133,12 @@ def generate(self): ]) if self.options.get_safe("with_curl"): tc.configure_args.append("--enable-curl") + if self.options.get_safe("with_quic"): + tc.configure_args.append("--enable-quic") if self.options.get_safe("with_experimental"): tc.configure_args.append("--enable-experimental") + if self.options.get_safe("with_rpk"): + tc.configure_args.append("--enable-rpk") if is_msvc(self): tc.extra_ldflags.append("-ladvapi32") if check_min_vs(self, "180", raise_invalid=False): diff --git a/recipes/wolfssl/config.yml b/recipes/wolfssl/config.yml index 336a121cbb73d..0734e5e20ba48 100644 --- a/recipes/wolfssl/config.yml +++ b/recipes/wolfssl/config.yml @@ -1,4 +1,6 @@ versions: + "5.7.2": + folder: all "5.7.0": folder: all "5.6.6": diff --git a/recipes/wxwidgets/all/conandata.yml b/recipes/wxwidgets/all/conandata.yml new file mode 100644 index 0000000000000..0b2357cd4a254 --- /dev/null +++ b/recipes/wxwidgets/all/conandata.yml @@ -0,0 +1,7 @@ +sources: + "3.2.6": + url: "https://github.com/wxWidgets/wxWidgets/archive/v3.2.6.tar.gz" + sha256: "46372b2dbf976521e1d7cca22afc3d3542d171a488b391444cf89aba87ea7d16" + "3.2.5": + url: "https://github.com/wxWidgets/wxWidgets/archive/v3.2.5.tar.gz" + sha256: "c3a54d1c5dc3feefc2893c28923fd722c990c572253d5ad353eec99386ba11eb" diff --git a/recipes/wxwidgets/all/conanfile.py b/recipes/wxwidgets/all/conanfile.py new file mode 100644 index 0000000000000..59a1e6e30d3ee --- /dev/null +++ b/recipes/wxwidgets/all/conanfile.py @@ -0,0 +1,477 @@ +from conan import ConanFile +from conan.tools.apple import is_apple_os +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, replace_in_file, rmdir +from conan.tools.microsoft import is_msvc +from conan.tools.scm import Version +from conan.tools.system import package_manager +from conan.errors import ConanInvalidConfiguration +import os + +required_conan_version = ">=1.60.0 <2.0 || >=2.0.6" + + +class wxWidgetsConan(ConanFile): + name = "wxwidgets" + description = "wxWidgets is a C++ library that lets developers create applications for Windows, macOS, " \ + "Linux and other platforms with a single code base." + topics = ("wxwidgets", "gui", "ui") + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://www.wxwidgets.org" + license = "wxWidgets" + settings = "os", "arch", "compiler", "build_type" + + options = {"shared": [True, False], + "fPIC": [True, False], + "jpeg": ["libjpeg", "libjpeg-turbo", "mozjpeg"], + "secretstore": [True, False], + "aui": [True, False], + "opengl": [True, False], + "html": [True, False], + "mediactrl": [True, False], + "propgrid": [True, False], + "debugreport": [True, False], + "ribbon": [True, False], + "richtext": [True, False], + "sockets": [True, False], + "stc": [True, False], + "webview": [True, False], + "xml": [True, False], + "xrc": [True, False], + "cairo": [True, False], + "help": [True, False], + "html_help": [True, False], + "url": [True, False], + "protocol": [True, False], + "fs_inet": [True, False], + "custom_enables": ["ANY"], # comma splitted list + "custom_disables": ["ANY"]} + default_options = { + "shared": False, + "fPIC": True, + "jpeg": "libjpeg", + "secretstore": True, + "aui": True, + "opengl": True, + "html": True, + "mediactrl": False, + "propgrid": True, + "debugreport": True, + "ribbon": True, + "richtext": True, + "sockets": True, + "stc": True, + # WebKitGTK for GTK2 is not available as a system dependency on modern distros. + # When gtk/system defaults to GTK3, turn this back on. + "webview": False, + "xml": True, + "xrc": True, + "cairo": True, + "help": True, + "html_help": True, + "url": True, + "protocol": True, + "fs_inet": True, + "custom_enables": "", + "custom_disables": "" + } + + def export_sources(self): + export_conandata_patches(self) + + def config_options(self): + if self.settings.os == "Windows": + self.options.rm_safe("fPIC") + if self.settings.os != "Linux": + self.options.rm_safe("secretstore") + self.options.rm_safe("cairo") + + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + + @property + def _gtk_version(self): + return f"gtk{self.dependencies['gtk'].options.version}" + + def system_requirements(self): + apt = package_manager.Apt(self) + packages = [] + if self.options.get_safe("secretstore"): + packages.append("libsecret-1-dev") + if self.options.webview: + if self._gtk_version == "gtk2": + packages.extend(["libsoup2.4-dev", + "libwebkitgtk-dev"]) + else: + packages.extend(["libsoup3.0-dev", + "libwebkit2gtk-4.0-dev"]) + if self.options.get_safe("cairo"): + packages.append("libcairo2-dev") + apt.install(packages) + + yum = package_manager.Yum(self) + packages = [] + if self.options.get_safe("secretstore"): + packages.append("libsecret-devel") + if self.options.webview: + packages.extend(["libsoup3-devel", + "webkit2gtk4.1-devel"]) + if self.options.get_safe("cairo"): + packages.append("cairo-devel") + yum.install(packages) + + def build_requirements(self): + self.tool_requires("ninja/1.11.1") + self.tool_requires("cmake/[>=3.17]") + + # TODO: add support for gtk non system version when it's ready for Conan 2 + def requirements(self): + if self.settings.os == "Linux": + self.requires("xorg/system") + self.requires("gtk/system") + if self.options.get_safe("opengl", default=False): + self.requires("opengl/system") + self.requires("xkbcommon/1.6.0", options={"with_x11": True}) + # TODO: Does not work right now + # if self.options.get_safe("cairo"): + # self.requires("cairo/1.18.0") + if self.options.mediactrl: + self.requires("gstreamer/1.22.3") + self.requires("gst-plugins-base/1.19.2") + self.requires("libcurl/[>=7.78.0 <9]") + + if self.options.jpeg == "libjpeg": + self.requires("libjpeg/9e") + elif self.options.jpeg == "libjpeg-turbo": + self.requires("libjpeg-turbo/3.0.2") + elif self.options.jpeg == "mozjpeg": + self.requires("mozjpeg/4.1.5") + + self.requires("libpng/[>=1.6 <2]") + self.requires("libtiff/4.6.0") + self.requires("zlib/[>=1.2.11 <2]") + self.requires("expat/[>=2.6.2 <3]") + self.requires("pcre2/10.42") + self.requires("nanosvg/cci.20231025") + + def validate(self): + if self.settings.os == "Linux": + if not self.dependencies.direct_host["xkbcommon"].options.with_x11: + raise ConanInvalidConfiguration("The 'with_x11' option for the 'xkbcommon' package must be enabled") + + def layout(self): + cmake_layout(self, src_folder="src") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def _patch_sources(self): + apply_conandata_patches(self) + # Don't change library names when cross-compiling + replace_in_file(self, os.path.join(self.source_folder, "build", "cmake", "functions.cmake"), + 'set(cross_target "-${CMAKE_SYSTEM_NAME}")', + 'set(cross_target)') + # Don't override Conan's toolchain + replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), + "CMAKE_OSX_DEPLOYMENT_TARGET", + "CMAKE_OSX_DEPLOYMENT_TARGET_IGNORED") + # Fix for strcpy_s (fix upstream?) + if is_apple_os(self): + cmake_version = "3.0" + replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), + f'cmake_minimum_required(VERSION {cmake_version})', + f'cmake_minimum_required(VERSION {cmake_version})\nadd_definitions(-D__STDC_WANT_LIB_EXT1__)') + + def generate(self): + tc = CMakeToolchain(self) + + # generic build options + tc.variables["wxBUILD_SHARED"] = self.options.shared + tc.variables["wxBUILD_SAMPLES"] = "OFF" + tc.variables["wxBUILD_TESTS"] = "OFF" + tc.variables["wxBUILD_DEMOS"] = "OFF" + tc.variables["wxBUILD_INSTALL"] = True + if self.settings.compiler == "clang": + tc.variables["wxBUILD_PRECOMP"] = "OFF" + + # platform-specific options + if is_msvc(self): + tc.variables["wxBUILD_USE_STATIC_RUNTIME"] = "MT" in str(self.settings.compiler.runtime) + tc.variables["wxBUILD_MSVC_MULTIPROC"] = True + if self.settings.os == "Linux": + tc.variables["wxBUILD_TOOLKIT"] = self._gtk_version + tc.variables["wxUSE_CAIRO"] = self.options.cairo + # Disable some optional libraries that will otherwise lead to non-deterministic builds + if self.settings.os != "Windows": + tc.variables["wxUSE_LIBSDL"] = "OFF" + tc.variables["wxUSE_LIBICONV"] = "OFF" + tc.variables["wxUSE_LIBNOTIFY"] = "OFF" + tc.variables["wxUSE_LIBMSPACK"] = "OFF" + tc.variables["wxUSE_LIBGNOMEVFS"] = "OFF" + + tc.variables["wxUSE_LIBPNG"] = "sys" + tc.variables["wxUSE_LIBJPEG"] = "sys" + tc.variables["wxUSE_LIBTIFF"] = "sys" + tc.variables["wxUSE_ZLIB"] = "sys" + tc.variables["wxUSE_EXPAT"] = "sys" + tc.variables["wxUSE_REGEX"] = "sys" + tc.variables["wxUSE_NANOSVG"] = "sys" + + # wxWidgets features + tc.variables["wxUSE_SECRETSTORE"] = self.options.get_safe("secretstore") + + # wxWidgets libraries + tc.variables["wxUSE_AUI"] = self.options.aui + tc.variables["wxUSE_OPENGL"] = self.options.get_safe("opengl", default=False) + tc.variables["wxUSE_HTML"] = self.options.html + tc.variables["wxUSE_MEDIACTRL"] = self.options.mediactrl + tc.variables["wxUSE_PROPGRID"] = self.options.propgrid + tc.variables["wxUSE_DEBUGREPORT"] = self.options.debugreport + tc.variables["wxUSE_RIBBON"] = self.options.ribbon + tc.variables["wxUSE_RICHTEXT"] = self.options.richtext + tc.variables["wxUSE_SOCKETS"] = self.options.sockets + tc.variables["wxUSE_STC"] = self.options.stc + tc.variables["wxUSE_WEBVIEW"] = self.options.webview + tc.variables["wxUSE_XML"] = self.options.xml + tc.variables["wxUSE_XRC"] = self.options.xrc + tc.variables["wxUSE_HELP"] = self.options.help + tc.variables["wxUSE_WXHTML_HELP"] = self.options.html_help + tc.variables["wxUSE_URL"] = self.options.protocol + tc.variables["wxUSE_PROTOCOL"] = self.options.protocol + tc.variables["wxUSE_FS_INET"] = self.options.fs_inet + tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0077"] = "NEW" + + for item in str(self.options.custom_enables).split(","): + if len(item) > 0: + tc.variables[item] = True + for item in str(self.options.custom_disables).split(","): + if len(item) > 0: + tc.variables[item] = False + + tc.generate() + + deps = CMakeDeps(self) + deps.set_property("expat", "cmake_file_name", "EXPAT") + deps.set_property("expat", "cmake_target_name", "EXPAT") + deps.set_property("nanosvg", "cmake_file_name", "NanoSVG") + deps.set_property("nanosvg", "cmake_target_name", "NanoSVG::nanosvg") + deps.generate() + + def build(self): + self._patch_sources() + cmake = CMake(self) + cmake.configure() + cmake.build() + + def package(self): + copy(self, pattern="licence.txt", + src=os.path.join(self.source_folder, "docs"), + dst=os.path.join(self.package_folder, "licenses")) + cmake = CMake(self) + cmake.install() + # remove cmake files + rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) + # copy setup.h + copy(self, pattern="*setup.h", + src=os.path.join(self.build_folder, "lib"), + dst=os.path.join(self.package_folder, "include", "wx"), + keep_path=False) + + if self.settings.os == "Windows": + # copy wxrc.exe + copy(self, pattern="*", + src=os.path.join(self.build_folder, "bin"), + dst=os.path.join(self.package_folder, "bin"), + keep_path=False) + else: + # make relative symlink + bin_dir = os.path.join(self.package_folder, "bin") + for x in os.listdir(bin_dir): + filename = os.path.join(bin_dir, x) + if os.path.islink(filename): + target = os.readlink(filename) + if os.path.isabs(target): + rel = os.path.relpath(target, bin_dir) + os.remove(filename) + os.symlink(rel, filename) + + def package_info(self): + self.cpp_info.set_property("cmake_find_mode", "both") + self.cpp_info.set_property("cmake_file_name", "wxWidgets") + self.cpp_info.set_property("cmake_target_name", "wxWidgets::wxWidgets") + self.cpp_info.set_property("pkg_config_name", "wxwidgets") + + _version = Version(self.version) + version_suffix_major_minor = f"-{_version.major}.{_version.minor}" + + # wx no longer uses a debug suffix for non-windows platforms from 3.1.3 onwards + use_debug_suffix = False + if self.settings.build_type == "Debug" and self.settings.os == "Windows": + use_debug_suffix = True + + debug = "d" if use_debug_suffix else "" + + if self.settings.os == "Linux": + prefix = "wx_" + toolkit = self._gtk_version + version = "" + suffix = version_suffix_major_minor + elif self.settings.os == "Macos": + prefix = "wx_" + toolkit = "osx_cocoa" + version = "" + suffix = version_suffix_major_minor + elif self.settings.os == "Windows": + toolkit = "msw" + if is_msvc(self): + prefix = "wx" + version = f"{_version.major}{_version.minor}" + suffix = "" + else: + prefix = "wx_" + version = "" + suffix = version_suffix_major_minor + + def base_library_pattern(library): + return "{prefix}base{version}u{debug}_%s{suffix}" % library + + def library_pattern(library): + return "{prefix}{toolkit}{version}u{debug}_%s{suffix}" % library + + libs = [] + libs.append("{prefix}base{version}u{debug}{suffix}") + libs.append(library_pattern("core")) + libs.append(library_pattern("adv")) + if self.options.sockets: + libs.append(base_library_pattern("net")) + if self.options.xml: + libs.append(base_library_pattern("xml")) + if self.options.aui: + libs.append(library_pattern("aui")) + if self.options.get_safe("opengl", default=False): + libs.append(library_pattern("gl")) + if self.options.html: + libs.append(library_pattern("html")) + if self.options.mediactrl: + libs.append(library_pattern("media")) + if self.options.propgrid: + libs.append(library_pattern("propgrid")) + if self.options.debugreport: + libs.append(library_pattern("qa")) + if self.options.ribbon: + libs.append(library_pattern("ribbon")) + if self.options.richtext: + libs.append(library_pattern("richtext")) + if self.options.stc: + if not self.options.shared: + scintilla_suffix = "{debug}" if self.settings.os == "Windows" else "{suffix}" + libs.append("wxscintilla" + scintilla_suffix) + libs.append(library_pattern("stc")) + if self.options.webview: + libs.append(library_pattern("webview")) + if self.options.xrc: + libs.append(library_pattern("xrc")) + for lib in reversed(libs): + self.cpp_info.libs.append(lib.format(prefix=prefix, + toolkit=toolkit, + version=version, + debug=debug, + suffix=suffix)) + + self.cpp_info.defines.append("wxUSE_GUI=1") + if self.settings.build_type == "Debug": + self.cpp_info.defines.append("__WXDEBUG__") + if self.options.shared: + self.cpp_info.defines.append("WXUSINGDLL") + if self.settings.os == "Linux": + self.cpp_info.defines.append("__WXGTK__") + self.cpp_info.system_libs.extend(["dl", "pthread", "SM"]) + elif self.settings.os == "Macos": + self.cpp_info.defines.extend(["__WXMAC__", "__WXOSX__", "__WXOSX_COCOA__"]) + for framework in ["Carbon", + "Cocoa", + "AudioToolbox", + "OpenGL", + "AppKit", + "AVKit", + "AVFoundation", + "Foundation", + "IOKit", + "ApplicationServices", + "CoreFoundation", + "CoreText", + "CoreGraphics", + "CoreServices", + "CoreMedia", + "CFNetwork", + "Security", + "ImageIO", + "System", + "WebKit", + "QuartzCore"]: + self.cpp_info.frameworks.append(framework) + elif self.settings.os == "Windows": + # see cmake/init.cmake + compiler_prefix = {"Visual Studio": "vc", + "msvc": "vc", + "gcc": "gcc", + "clang": "clang"}.get(str(self.settings.compiler)) + + arch_suffix = "_x64" if self.settings.arch == "x86_64" else "" + lib_suffix = "_dll" if self.options.shared else "_lib" + libdir = f"{compiler_prefix}{arch_suffix}{lib_suffix}" + libdir = os.path.join("lib", libdir) + self.cpp_info.bindirs.append(libdir) + self.cpp_info.libdirs.append(libdir) + self.cpp_info.defines.append("__WXMSW__") + # disable annoying auto-linking + self.cpp_info.defines.extend(["wxNO_NET_LIB", + "wxNO_XML_LIB", + "wxNO_REGEX_LIB", + "wxNO_ZLIB_LIB", + "wxNO_JPEG_LIB", + "wxNO_PNG_LIB", + "wxNO_TIFF_LIB", + "wxNO_ADV_LIB", + "wxNO_HTML_LIB", + "wxNO_GL_LIB", + "wxNO_QA_LIB", + "wxNO_XRC_LIB", + "wxNO_AUI_LIB", + "wxNO_PROPGRID_LIB", + "wxNO_RIBBON_LIB", + "wxNO_RICHTEXT_LIB", + "wxNO_MEDIA_LIB", + "wxNO_STC_LIB", + "wxNO_WEBVIEW_LIB"]) + self.cpp_info.system_libs.extend(["kernel32", + "user32", + "gdi32", + "comdlg32", + "winspool", + "shell32", + "comctl32", + "ole32", + "oleaut32", + "imm32", + "uuid", + "wininet", + "rpcrt4", + "winmm", + "advapi32", + "msimg32", + "opengl32", + "ws2_32", + "wsock32"]) + # Link a few libraries that are needed when using gcc on windows + if self.settings.compiler == "gcc": + self.cpp_info.system_libs.extend(["uxtheme", + "version", + "shlwapi", + "oleacc"]) + if is_msvc(self): + self.cpp_info.includedirs.append(os.path.join("include", "msvc")) + else: + include_path = os.path.join("include", f"wx{version_suffix_major_minor}") + self.cpp_info.includedirs = [include_path] + self.cpp_info.includedirs diff --git a/recipes/wxwidgets/all/test_package/CMakeLists.txt b/recipes/wxwidgets/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..c4d40ad29eb0f --- /dev/null +++ b/recipes/wxwidgets/all/test_package/CMakeLists.txt @@ -0,0 +1,13 @@ +cmake_minimum_required(VERSION 3.1) +project(test_package) + +find_package(wxWidgets REQUIRED) + +if(MSVC) + add_definitions("-DUNICODE") + add_definitions("-D_UNICODE") + add_definitions("-D_CRT_SECURE_NO_WARNINGS") +endif() + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} wxWidgets::wxWidgets) diff --git a/recipes/wxwidgets/all/test_package/conanfile.py b/recipes/wxwidgets/all/test_package/conanfile.py new file mode 100644 index 0000000000000..91817d9f2df17 --- /dev/null +++ b/recipes/wxwidgets/all/test_package/conanfile.py @@ -0,0 +1,26 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import CMake, cmake_layout +import os + + +class TestPackageConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "CMakeToolchain", "CMakeDeps", "VirtualRunEnv" + test_type = "explicit" + + def layout(self): + cmake_layout(self) + + def requirements(self): + self.requires(self.tested_reference_str) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/wxwidgets/all/test_package/test_package.cpp b/recipes/wxwidgets/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..40a8f99c42fac --- /dev/null +++ b/recipes/wxwidgets/all/test_package/test_package.cpp @@ -0,0 +1,27 @@ +#include +#include +#include +#include +#if wxUSE_STC +#include +#endif + +int main() +{ + int argc = 0; + wxChar * argv[] = {NULL}; + if (!wxEntryStart(argc, argv)) { + std::cerr << "wxEntryStart failed!" << std::endl; + return EXIT_FAILURE; + } + wxVersionInfo vi = wxGetLibraryVersionInfo(); + std::cout << "wxWidgets version: "; + std::cout << vi.GetMajor() << "."; + std::cout << vi.GetMinor() << "."; + std::cout << vi.GetMicro() << std::endl; +#if wxUSE_STC + wxStyledTextCtrl * stc = new wxStyledTextCtrl(); +#endif + wxEntryCleanup(); + return EXIT_SUCCESS; +} diff --git a/recipes/wxwidgets/config.yml b/recipes/wxwidgets/config.yml new file mode 100644 index 0000000000000..f849d473251f2 --- /dev/null +++ b/recipes/wxwidgets/config.yml @@ -0,0 +1,5 @@ +versions: + "3.2.6": + folder: "all" + "3.2.5": + folder: "all" diff --git a/recipes/wyhash/all/conanfile.py b/recipes/wyhash/all/conanfile.py index 5ef173786f6ec..1fde6aed28d50 100644 --- a/recipes/wyhash/all/conanfile.py +++ b/recipes/wyhash/all/conanfile.py @@ -16,6 +16,7 @@ class WyhashConan(ConanFile): package_type = "header-library" settings = "os", "arch", "compiler", "build_type" no_copy_source = True + deprecated = "rapidhash" def layout(self): basic_layout(self, src_folder="src") diff --git a/recipes/xapian-core/all/conandata.yml b/recipes/xapian-core/all/conandata.yml index 4514bc0f40509..18806738cffac 100644 --- a/recipes/xapian-core/all/conandata.yml +++ b/recipes/xapian-core/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.4.24": + url: "https://oligarchy.co.uk/xapian/1.4.24/xapian-core-1.4.24.tar.xz" + sha256: "eda5ae6dcf6b0553a8676af64b1fd304e998cd20f779031ccaaf7ab9a373531a" "1.4.19": url: "https://oligarchy.co.uk/xapian/1.4.19/xapian-core-1.4.19.tar.xz" sha256: "1fca48fca6cc3526cc4ba93dd194fe9c1326857b78edcfb37e68d086d714a9c3" @@ -6,6 +9,8 @@ sources: url: "https://oligarchy.co.uk/xapian/1.4.18/xapian-core-1.4.18.tar.xz" sha256: "196ddbb4ad10450100f0991a599e4ed944cbad92e4a6fe813be6dce160244b77" patches: + "1.4.24": + - patch_file: "patches/0001-add-msvc-cl-sh.patch" "1.4.19": - patch_file: "patches/0001-add-msvc-cl-sh.patch" "1.4.18": diff --git a/recipes/xapian-core/all/conanfile.py b/recipes/xapian-core/all/conanfile.py index e5d0241981b9f..fd5b09b5d2d5d 100644 --- a/recipes/xapian-core/all/conanfile.py +++ b/recipes/xapian-core/all/conanfile.py @@ -1,6 +1,6 @@ from conan import ConanFile from conan.errors import ConanInvalidConfiguration -from conan.tools.apple import fix_apple_shared_install_name +from conan.tools.apple import fix_apple_shared_install_name, is_apple_os from conan.tools.build import cross_building from conan.tools.env import Environment, VirtualBuildEnv, VirtualRunEnv from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rename, rm, rmdir, save @@ -101,6 +101,12 @@ def generate(self): env.define("OBJDUMP", ":") env.define("RANLIB", ":") env.define("STRIP", ":") + + if is_apple_os(self) and self.settings.arch == "armv8": + # A fix for ./configure issues on armv8 + tc.configure_args.append("--host=aarch64-apple-darwin") + tc.extra_ldflags.append("-arch arm64") + tc.generate(env) if is_msvc(self): diff --git a/recipes/xapian-core/config.yml b/recipes/xapian-core/config.yml index bc4d571521f81..9a97cca323477 100644 --- a/recipes/xapian-core/config.yml +++ b/recipes/xapian-core/config.yml @@ -1,4 +1,6 @@ versions: + "1.4.24": + folder: "all" "1.4.19": folder: "all" "1.4.18": diff --git a/recipes/xbyak/all/conandata.yml b/recipes/xbyak/all/conandata.yml index ecd59f56a583c..5fbe0f98a2367 100644 --- a/recipes/xbyak/all/conandata.yml +++ b/recipes/xbyak/all/conandata.yml @@ -1,4 +1,22 @@ sources: + "7.21": + url: "https://github.com/herumi/xbyak/archive/v7.21.tar.gz" + sha256: "23aad8abc682205ad718d77d51e8e66a569c66de1722b8772d1afb6cbb8d300b" + "7.20": + url: "https://github.com/herumi/xbyak/archive/v7.20.tar.gz" + sha256: "82824b436751d570f404f9d4598216dfd29596ac149bba8b6b5b4fc555061a12" + "7.10": + url: "https://github.com/herumi/xbyak/archive/v7.10.tar.gz" + sha256: "0f1060c9d14a090615f67391d7790ae596d0580726c79c9db6a249febda7ad63" + "7.08": + url: "https://github.com/herumi/xbyak/archive/v7.08.tar.gz" + sha256: "ef7f0504676635a04f2d0befdaf1c324bb1ea6af4e2636cb09eecb3da31d3402" + "7.07.1": + url: "https://github.com/herumi/xbyak/archive/v7.07.1.tar.gz" + sha256: "9f2a1215ed0511e421895d57e2681981f9f9f8fb952655919a9cf859cfe474ae" + "7.07": + url: "https://github.com/herumi/xbyak/archive/v7.07.tar.gz" + sha256: "7bd603fb8de9e605b86c1996a20111df66707c916a2ac0397424080cc0ad7bde" "7.06": url: "https://github.com/herumi/xbyak/archive/v7.06.tar.gz" sha256: "686c710a67c7fb8e99d8e326cf22aea310a29db27a9db8ba19a9fee44f8ec097" diff --git a/recipes/xbyak/all/test_package/conanfile.py b/recipes/xbyak/all/test_package/conanfile.py index d120a992c06a6..8a5bb47f50c4c 100644 --- a/recipes/xbyak/all/test_package/conanfile.py +++ b/recipes/xbyak/all/test_package/conanfile.py @@ -7,6 +7,7 @@ class TestPackageConan(ConanFile): settings = "os", "arch", "compiler", "build_type" generators = "CMakeToolchain", "CMakeDeps", "VirtualRunEnv" + test_type = "explicit" def requirements(self): self.requires(self.tested_reference_str) diff --git a/recipes/xbyak/config.yml b/recipes/xbyak/config.yml index d6d3f30f6e896..00913bb048c6f 100644 --- a/recipes/xbyak/config.yml +++ b/recipes/xbyak/config.yml @@ -1,4 +1,16 @@ versions: + "7.21": + folder: all + "7.20": + folder: all + "7.10": + folder: all + "7.08": + folder: all + "7.07.1": + folder: all + "7.07": + folder: all "7.06": folder: all "7.05": diff --git a/recipes/xege/all/conandata.yml b/recipes/xege/all/conandata.yml index 2f7535221dfb9..fecd7fb356766 100644 --- a/recipes/xege/all/conandata.yml +++ b/recipes/xege/all/conandata.yml @@ -1,4 +1,4 @@ sources: "20.08": - url: "https://github.com/wysaid/xege/archive/refs/tags/20.08.tar.gz" + url: "https://github.com/wysaid/xege/archive/refs/tags/v20.08.tar.gz" sha256: "33bc63366d093902b5bc68d3d613ebd90e449bc22800b40f2dd98e2b5c44b88a" diff --git a/recipes/xerces-c/all/conandata.yml b/recipes/xerces-c/all/conandata.yml index 42c60fa48a45e..7c2baf54d287f 100644 --- a/recipes/xerces-c/all/conandata.yml +++ b/recipes/xerces-c/all/conandata.yml @@ -14,9 +14,17 @@ sources: patches: "3.2.5": - patch_file: "patches/0002-find-icu-programs.patch" + patch_description: "Find ICU programs on environment" + patch_type: "conan" "3.2.4": - patch_file: "patches/0002-find-icu-programs.patch" + patch_description: "Find ICU programs on environment" + patch_type: "conan" "3.2.3": - patch_file: "patches/0002-find-icu-programs.patch" + patch_description: "Find ICU programs on environment" + patch_type: "conan" "3.2.2": - patch_file: "patches/0002-find-icu-programs.patch" + patch_description: "Find ICU programs on environment" + patch_type: "conan" diff --git a/recipes/xerces-c/all/conanfile.py b/recipes/xerces-c/all/conanfile.py index 88a28ee036fe6..a7daf64e71cdb 100644 --- a/recipes/xerces-c/all/conanfile.py +++ b/recipes/xerces-c/all/conanfile.py @@ -120,6 +120,10 @@ def generate(self): tc = CMakeToolchain(self) # Because upstream overrides BUILD_SHARED_LIBS as a CACHE variable tc.cache_variables["BUILD_SHARED_LIBS"] = "ON" if self.options.shared else "OFF" + + # Prevent linking against unused found library + tc.cache_variables["NSL_LIBRARY"] = "NSL_LIBRARY-NOTFOUND" + # https://xerces.apache.org/xerces-c/build-3.html tc.variables["network"] = self.options.network if self.options.network: @@ -131,6 +135,12 @@ def generate(self): # avoid picking up system dependency tc.variables["CMAKE_DISABLE_FIND_PACKAGE_CURL"] = self.options.get_safe("network_accessor") != "curl" tc.variables["CMAKE_DISABLE_FIND_PACKAGE_ICU"] = "icu" not in (self.options.transcoder, self.options.message_loader) + + # Fix compatibility with Clang on Windows + # https://issues.apache.org/jira/browse/XERCESC-2252 + if self.settings.os == "Windows" and self.settings.compiler == "clang": + tc.cache_variables["CMAKE_RC_FLAGS"] = "-C 1252" + tc.generate() deps = CMakeDeps(self) deps.generate() @@ -166,7 +176,7 @@ def package_info(self): if self.settings.os == "Macos": self.cpp_info.frameworks = ["CoreFoundation", "CoreServices"] elif self.settings.os in ["Linux", "FreeBSD"]: - self.cpp_info.system_libs.append("pthread") + self.cpp_info.system_libs.extend(["pthread"]) if Version(conan_version).major < 2: self.cpp_info.names["cmake_find_package"] = "XercesC" diff --git a/recipes/xkbcommon/all/conanfile.py b/recipes/xkbcommon/all/conanfile.py index 6c59c78b63932..cedd8883aca46 100644 --- a/recipes/xkbcommon/all/conanfile.py +++ b/recipes/xkbcommon/all/conanfile.py @@ -66,7 +66,7 @@ def requirements(self): if self.options.with_x11: self.requires("xorg/system") if self.options.get_safe("xkbregistry"): - self.requires("libxml2/2.12.3") + self.requires("libxml2/[>=2.12.5 <3]") if self.options.get_safe("with_wayland"): self.requires("wayland/1.22.0") @@ -113,10 +113,8 @@ def generate(self): else: # Manually generate pkgconfig file of wayland-protocols since # PkgConfigDeps.build_context_activated can't work with legacy 1 profile - # We must use legacy conan v1 deps_cpp_info because self.dependencies doesn't - # contain build requirements when using 1 profile. - wp_prefix = self.deps_cpp_info["wayland-protocols"].rootpath - wp_version = self.deps_cpp_info["wayland-protocols"].version + wp_prefix = self.dependencies.build["wayland-protocols"].package_folder + wp_version = self.dependencies.build["wayland-protocols"].ref.version wp_pkg_content = textwrap.dedent(f"""\ prefix={wp_prefix} datarootdir=${{prefix}}/res diff --git a/recipes/xlsxio/all/conanfile.py b/recipes/xlsxio/all/conanfile.py index 7724a07d64464..ed6652c07a361 100644 --- a/recipes/xlsxio/all/conanfile.py +++ b/recipes/xlsxio/all/conanfile.py @@ -62,7 +62,7 @@ def requirements(self): self.requires("minizip-ng/4.0.1") else: self.requires("minizip/1.2.13") - self.requires("expat/2.5.0") + self.requires("expat/[>=2.6.2 <3]") def validate(self): if Version(self.version) >= "0.2.34": diff --git a/recipes/xmlsec/all/conandata.yml b/recipes/xmlsec/all/conandata.yml index 17da2946f298e..d050eee6edc63 100644 --- a/recipes/xmlsec/all/conandata.yml +++ b/recipes/xmlsec/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.3.4": + url: "https://github.com/lsh123/xmlsec/releases/download/1.3.4/xmlsec1-1.3.4.tar.gz" + sha256: "45ad9078d41ae76844ad2f8651600ffeec0fdd128ead988a8d69e907c57aee75" "1.3.3": url: "https://github.com/lsh123/xmlsec/releases/download/1.3.3/xmlsec1-1.3.3.tar.gz" sha256: "ab5b9a9ffd6960f46f7466d9d91f174ec37e8c31989237ba6b9eacdd816464f2" diff --git a/recipes/xmlsec/all/conanfile.py b/recipes/xmlsec/all/conanfile.py index cafb303fe93b8..f6e3b2305fa3e 100644 --- a/recipes/xmlsec/all/conanfile.py +++ b/recipes/xmlsec/all/conanfile.py @@ -60,11 +60,11 @@ def layout(self): basic_layout(self, src_folder="src") def requirements(self): - self.requires("libxml2/2.12.4", transitive_headers=True) + self.requires("libxml2/[>=2.12.5 <3]", transitive_headers=True) if self.options.with_openssl: self.requires("openssl/[>=1.1 <4]", transitive_headers=True) if self.options.with_xslt: - self.requires("libxslt/1.1.39") + self.requires("libxslt/1.1.42") def validate(self): if self.options.with_nss: @@ -80,7 +80,7 @@ def build_requirements(self): if not is_msvc(self): self.tool_requires("libtool/2.4.7") if not self.conf.get("tools.gnu:pkg_config", check_type=str): - self.tool_requires("pkgconf/2.1.0") + self.tool_requires("pkgconf/[>=2.2 <3]") if self._settings_build.os == "Windows": self.win_bash = True if not self.conf.get("tools.microsoft.bash:path", check_type=str): diff --git a/recipes/xmlsec/config.yml b/recipes/xmlsec/config.yml index cbe3ff0b5cda4..ee5db77e3b9e5 100644 --- a/recipes/xmlsec/config.yml +++ b/recipes/xmlsec/config.yml @@ -1,4 +1,6 @@ versions: + "1.3.4": + folder: all "1.3.3": folder: all "1.3.2": diff --git a/recipes/xnnpack/all/conandata.yml b/recipes/xnnpack/all/conandata.yml index 347edb5af1787..94f6829c40eea 100644 --- a/recipes/xnnpack/all/conandata.yml +++ b/recipes/xnnpack/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "cci.20240229": + url: "https://github.com/google/XNNPACK/archive/fcbf55af6cf28a4627bcd1f703ab7ad843f0f3a2.tar.gz" + sha256: "96b2800652a605f0bd289faa09865792d139cadde89f681c79e1b2a08a7e0498" "cci.20231026": url: "https://github.com/google/XNNPACK/archive/ab16a544c1cbc5ee4ec105a2f35f8adca22e94c1.tar.gz" sha256: "11c7e0555d2c2c14d812b3fba2a277d59121cfb898dcc99de1c76477ff2055a0" diff --git a/recipes/xnnpack/all/conanfile.py b/recipes/xnnpack/all/conanfile.py index 579c065b64636..81bd0455ccc87 100644 --- a/recipes/xnnpack/all/conanfile.py +++ b/recipes/xnnpack/all/conanfile.py @@ -64,7 +64,7 @@ def requirements(self): def validate(self): check_min_vs(self, 192) - compiler = self.info.settings.compiler + compiler = self.settings.compiler compiler_version = Version(compiler.version) if self.version < "cci.20230715": if (compiler == "gcc" and compiler_version < "6") or \ @@ -75,6 +75,10 @@ def validate(self): if (compiler == "gcc" and compiler_version < "11") or \ (compiler == "clang" and compiler_version < "8"): raise ConanInvalidConfiguration(f"{self.ref} doesn't support {compiler} {compiler.version}") + if self.options.assembly and compiler == "clang" and self.settings.arch == "armv6": + # clang assembly validator fails on XNNPACK's math.h for armv6: + # https://github.com/google/XNNPACK/issues/4348#issuecomment-1445437613 + raise ConanInvalidConfiguration(f"{self.ref} assembly option is incompatible with clang+armv6") def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) @@ -120,6 +124,12 @@ def _patch_sources(self): replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), "LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}", "LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}") + if self.settings.compiler == "clang" and self.settings.arch == "armv7": + # https://github.com/google/XNNPACK/issues/4348 + # XNNPACK targets armv6, but clang fails to compile to due to a bug in the assembler (see linked issue). + # The user is targetting armv7, so adjust XNNPACK's -march accordingly to avoid the bug. + replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), + "-march=armv6 -mfpu=vfp", "-march=armv7-a -mfpu=neon") def build(self): self._patch_sources() diff --git a/recipes/xnnpack/config.yml b/recipes/xnnpack/config.yml index 5e502dd6fac1c..5557e99d09d21 100644 --- a/recipes/xnnpack/config.yml +++ b/recipes/xnnpack/config.yml @@ -1,4 +1,6 @@ versions: + "cci.20240229": + folder: all "cci.20231026": folder: all "cci.20230715": diff --git a/recipes/xorg-proto/all/conandata.yml b/recipes/xorg-proto/all/conandata.yml index a78c2d2c2da43..31aa321346999 100644 --- a/recipes/xorg-proto/all/conandata.yml +++ b/recipes/xorg-proto/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2024.1": + url: "https://www.x.org/releases/individual/proto/xorgproto-2024.1.tar.gz" + sha256: "4f6b9b4faf91e5df8265b71843a91fc73dc895be6210c84117a996545df296ce" "2022.2": url: "https://www.x.org/releases/individual/proto/xorgproto-2022.2.tar.gz" sha256: "da351a403d07a7006d7bdc8dcfc14ddc1b588b38fb81adab9989a8eef605757b" diff --git a/recipes/xorg-proto/all/conanfile.py b/recipes/xorg-proto/all/conanfile.py index f20cc54f7acb5..b6a780899bca5 100644 --- a/recipes/xorg-proto/all/conanfile.py +++ b/recipes/xorg-proto/all/conanfile.py @@ -45,10 +45,7 @@ def requirements(self): self.requires("xorg-macros/1.19.3") def package_id(self): - # self.info.clear() would be fine too, but keep the os to add c3i test coverage for Windows. - del self.info.settings.arch - del self.info.settings.build_type - del self.info.settings.compiler + self.info.clear() def export_sources(self): export_conandata_patches(self) diff --git a/recipes/xorg-proto/config.yml b/recipes/xorg-proto/config.yml index 2928e57dc1b28..0af5118e3b73a 100644 --- a/recipes/xorg-proto/config.yml +++ b/recipes/xorg-proto/config.yml @@ -1,4 +1,6 @@ versions: + "2024.1": + folder: "all" "2022.2": folder: "all" "2021.4": diff --git a/recipes/xorg/all/conanfile.py b/recipes/xorg/all/conanfile.py index 4b5a1dfb54844..18c7f048404e4 100644 --- a/recipes/xorg/all/conanfile.py +++ b/recipes/xorg/all/conanfile.py @@ -2,6 +2,7 @@ from conan.tools.gnu import PkgConfig from conan.tools.system import package_manager from conan.errors import ConanInvalidConfiguration +from conan.tools.scm import Version required_conan_version = ">=1.50.0" @@ -73,8 +74,17 @@ def system_requirements(self): "libXScrnSaver", "xcb-util-wm", "xcb-util-image", "xcb-util-keysyms", "xcb-util-renderutil", "libxxf86vm", "libxv", "xkeyboard-config", "xcb-util", "xcb-util-cursor"], update=True, check=True) + if Version(conan_version) >= "2.0.10": + alpine = package_manager.Apk(self) + alpine.install(["libx11-dev", " libxcb-dev", "libfontenc-dev", "libice-dev", "libsm-dev", " libxau-dev", "libxaw-dev", + "libxcomposite-dev", "libxcursor-dev", "libxdamage-dev", "libxdmcp-dev", " libxext-dev", "libxfixes-dev", "libxi-dev", + "libxinerama-dev", "libxkbfile-dev", " libxmu-dev", "libxpm-dev", "libxrandr-dev", "libxrender-dev", "libxres-dev", + "libxscrnsaver-dev", "libxt-dev", "libxtst-dev", "libxv-dev", "libxxf86vm-dev", + "xcb-util-wm-dev", "xcb-util-image-dev", "xcb-util-keysyms-dev", "xcb-util-renderutil-dev", + "libxinerama-dev", "libxcb-dev", "xcb-util-dev", "xcb-util-cursor-dev"], update=True, check=True) + def package_info(self): - if conan_version.major >= 2: + if Version(conan_version) >= 2: self.cpp_info.bindirs = [] self.cpp_info.includedirs = [] self.cpp_info.libdirs = [] diff --git a/recipes/xproperty/all/conandata.yml b/recipes/xproperty/all/conandata.yml index e22cd28ead6ab..b13aae1530d67 100644 --- a/recipes/xproperty/all/conandata.yml +++ b/recipes/xproperty/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.12.0": + url: "https://github.com/jupyter-xeus/xproperty/archive/refs/tags/0.12.0.tar.gz" + sha256: "27cbc8e441dcc515a1ebbf11bad5ef240748d32f5e1adf84deed87a1dc57a440" "0.11.0": url: "https://github.com/jupyter-xeus/xproperty/archive/refs/tags/0.11.0.tar.gz" sha256: "bf86a11c6758308aa0aa0f64d8dd24cd3e9d78378467b74002f552bfb75fc0eb" diff --git a/recipes/xproperty/all/conanfile.py b/recipes/xproperty/all/conanfile.py index e6eeff282118e..dce5d7f565304 100644 --- a/recipes/xproperty/all/conanfile.py +++ b/recipes/xproperty/all/conanfile.py @@ -2,35 +2,42 @@ from conan.tools.build import check_min_cppstd from conan.tools.files import copy, get, save from conan.tools.layout import basic_layout +from conan.tools.scm import Version import os import textwrap -required_conan_version = ">=1.52.0" +required_conan_version = ">=2.1.0" class XpropertyConan(ConanFile): name = "xproperty" description = "Traitlets-like C++ properties and implementation of the observer pattern." license = "BSD-3-Clause" - topics = ("observer", "traitlets") - homepage = "https://github.com/jupyter-xeus/xproperty" url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/jupyter-xeus/xproperty" + topics = ("observer", "traitlets", "header-only") package_type = "header-library" settings = "os", "arch", "compiler", "build_type" no_copy_source = True + @property + def _min_cppstd(self): + return "14" if Version(self.version) <= "0.12.0" else "17" + def layout(self): basic_layout(self, src_folder="src") def requirements(self): - self.requires("xtl/0.7.4", transitive_headers=True, transitive_libs=True) + if Version(self.version) < "0.12.0": + self.requires("xtl/0.7.4", transitive_headers=True, transitive_libs=True) + else: + self.requires("nlohmann_json/3.11.3") def package_id(self): self.info.clear() def validate(self): - if self.settings.compiler.get_safe("cppstd"): - check_min_cppstd(self, 14) + check_min_cppstd(self, self._min_cppstd) def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) diff --git a/recipes/xproperty/all/test_package/CMakeLists.txt b/recipes/xproperty/all/test_package/CMakeLists.txt index 5115f7961f51a..b676192b1da44 100644 --- a/recipes/xproperty/all/test_package/CMakeLists.txt +++ b/recipes/xproperty/all/test_package/CMakeLists.txt @@ -5,4 +5,8 @@ find_package(xproperty REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) target_link_libraries(${PROJECT_NAME} PRIVATE xproperty) -target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_14) +if(xproperty_VERSION VERSION_LESS "0.12.0") + target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_14) +else() + target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) +endif() diff --git a/recipes/xproperty/config.yml b/recipes/xproperty/config.yml index 98fa57f62a6c8..b63b89545fb06 100644 --- a/recipes/xproperty/config.yml +++ b/recipes/xproperty/config.yml @@ -1,3 +1,5 @@ versions: + "0.12.0": + folder: all "0.11.0": folder: all diff --git a/recipes/xsimd/all/conandata.yml b/recipes/xsimd/all/conandata.yml index f65775fd15ca5..04062faa8cea0 100644 --- a/recipes/xsimd/all/conandata.yml +++ b/recipes/xsimd/all/conandata.yml @@ -1,4 +1,10 @@ sources: + "13.0.0": + url: "https://github.com/xtensor-stack/xsimd/archive/13.0.0.tar.gz" + sha256: "8bdbbad0c3e7afa38d88d0d484d70a1671a1d8aefff03f4223ab2eb6a41110a3" + "12.1.1": + url: "https://github.com/xtensor-stack/xsimd/archive/12.1.1.tar.gz" + sha256: "73f94a051278ef3da4533b691d31244d12074d5d71107473a9fd8d7be15f0110" "12.1.0": url: "https://github.com/xtensor-stack/xsimd/archive/12.1.0.tar.gz" sha256: "86b86e0aeba7a85575f6e079728f0c2b65307dddb7210487f2b7cb261ac8a4a2" diff --git a/recipes/xsimd/all/test_package/test_package.cpp b/recipes/xsimd/all/test_package/test_package.cpp index be0d55dea1818..ed1e514c89b74 100644 --- a/recipes/xsimd/all/test_package/test_package.cpp +++ b/recipes/xsimd/all/test_package/test_package.cpp @@ -1,27 +1,17 @@ #include "xsimd/xsimd.hpp" #include -namespace xs = xsimd; - -#if XSIMD_VERSION_MAJOR >= 9 && (XSIMD_WITH_NEON64 || XSIMD_WITH_NEON) -using number_type = float; -#else -using number_type = double; -#endif - int main(int argc, char *argv[]) { + namespace xs = xsimd; #if XSIMD_VERSION_MAJOR < 8 - xs::batch a(1.5, 2.5, 3.5, 4.5); - xs::batch b(2.5, 3.5, 4.5, 5.5); -#elif XSIMD_VERSION_MAJOR < 9 - xs::batch a({1.5, 2.5, 3.5, 4.5}); - xs::batch b({2.5, 3.5, 4.5, 5.5}); + xs::batch a(1., 1.); + xs::batch b(2., 2.); #else - xs::batch a{1.5, 2.5, 3.5, 4.5}; - xs::batch b{2.5, 3.5, 4.5, 5.5}; + auto a = xs::broadcast(1.); + auto b = xs::broadcast(2.); #endif - auto mean = (a + b) / 2; - std::cout << mean << std::endl; + auto mean = (a + b) / 2.; + std::cout << "Mean: " << mean << std::endl; return 0; } diff --git a/recipes/xsimd/config.yml b/recipes/xsimd/config.yml index 65384140b0d83..1f8cc881d52a7 100644 --- a/recipes/xsimd/config.yml +++ b/recipes/xsimd/config.yml @@ -1,4 +1,8 @@ versions: + "13.0.0": + folder: all + "12.1.1": + folder: all "12.1.0": folder: all "12.0.0": diff --git a/recipes/xtensor/all/conanfile.py b/recipes/xtensor/all/conanfile.py index 892b72ea17486..1181b6ae698ab 100644 --- a/recipes/xtensor/all/conanfile.py +++ b/recipes/xtensor/all/conanfile.py @@ -57,7 +57,7 @@ def requirements(self): if Version(self.version) < "0.24.0": self.requires("xsimd/7.5.0") else: - self.requires("xsimd/12.0.0") + self.requires("xsimd/13.0.0") if self.options.tbb: self.requires("onetbb/2021.10.0") diff --git a/recipes/xtr/all/conandata.yml b/recipes/xtr/all/conandata.yml index 1e78ef99a9e55..36f7c0c7ec615 100644 --- a/recipes/xtr/all/conandata.yml +++ b/recipes/xtr/all/conandata.yml @@ -1,4 +1,10 @@ sources: + "2.1.2": + url: "https://github.com/choll/xtr/archive/refs/tags/2.1.2.tar.gz" + sha256: "81ff3511e877db68882d01be9e521d317c8222838b0793e48cfd631f405bb3e8" + "2.1.1": + url: "https://github.com/choll/xtr/archive/refs/tags/2.1.1.tar.gz" + sha256: "dbd8d1fbb5308329fe21bbe704206e2e69a5d49696959d43a2504ea1bec00140" "2.1.0": url: "https://github.com/choll/xtr/archive/refs/tags/2.1.0.tar.gz" sha256: "5abe2e53d91a893d63998968450d9bbfc23c45f552c81e2b7d17694699ab17c4" diff --git a/recipes/xtr/all/conanfile.py b/recipes/xtr/all/conanfile.py index 267bd2a3780a0..d298982bf4d46 100644 --- a/recipes/xtr/all/conanfile.py +++ b/recipes/xtr/all/conanfile.py @@ -133,11 +133,12 @@ def _patch_sources(self): "find_package(liburing REQUIRED NO_DEFAULT_PATH PATHS ${CMAKE_PREFIX_PATH})" if self.options.get_safe("enable_io_uring") else "") - # Non-single header installation is broken as of 2.1.0 - # https://github.com/choll/xtr/pull/4 - replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), - " PUBLIC_HEADER DESTINATION include)", - ")\ninstall(DIRECTORY ${CMAKE_SOURCE_DIR}/include/ DESTINATION include)") + if Version(self.version) < "2.1.2": + # Non-single header installation is broken until 2.1.2 + # https://github.com/choll/xtr/pull/4 + replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), + " PUBLIC_HEADER DESTINATION include)", + ")\ninstall(DIRECTORY ${CMAKE_SOURCE_DIR}/include/ DESTINATION include)") def build(self): self._patch_sources() diff --git a/recipes/xtr/config.yml b/recipes/xtr/config.yml index 4f7c23f02e7c5..6712968772b74 100644 --- a/recipes/xtr/config.yml +++ b/recipes/xtr/config.yml @@ -1,4 +1,8 @@ versions: + "2.1.2": + folder: all + "2.1.1": + folder: all "2.1.0": folder: all "2.0.1": diff --git a/recipes/xz_utils/all/conanfile.py b/recipes/xz_utils/all/conanfile.py index 388fe0cf2e851..212eb51f593cc 100644 --- a/recipes/xz_utils/all/conanfile.py +++ b/recipes/xz_utils/all/conanfile.py @@ -50,6 +50,13 @@ def _effective_msbuild_type(self): @property def _msbuild_target(self): return "liblzma_dll" if self.options.shared else "liblzma" + + @property + def _use_msbuild(self): + assume_clang_cl = (self.settings.os == "Windows" + and self.settings.compiler == "clang" + and self.settings.get_safe("compiler.runtime") is not None) + return is_msvc(self) or assume_clang_cl def export_sources(self): export_conandata_patches(self) @@ -68,7 +75,7 @@ def layout(self): basic_layout(self, src_folder="src") def build_requirements(self): - if self._settings_build.os == "Windows" and not is_msvc(self): + if self._settings_build.os == "Windows" and not self._use_msbuild: self.win_bash = True if not self.conf.get("tools.microsoft.bash:path", check_type=str): self.tool_requires("msys2/cci.latest") @@ -77,7 +84,7 @@ def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) def generate(self): - if is_msvc(self): + if self._use_msbuild: tc = MSBuildToolchain(self) tc.configuration = self._effective_msbuild_type tc.generate() @@ -124,16 +131,24 @@ def _build_msvc(self): "", f"", ) + + if self.settings.arch == "armv8": + replace_in_file(self, vcxproj_file, "x64", "ARM64") + + solution_file = os.path.join(build_script_folder, "xz_win.sln") + if self.settings.arch == "armv8": + replace_in_file(self, solution_file, "x64", "ARM64") + #============================== msbuild = MSBuild(self) msbuild.build_type = self._effective_msbuild_type msbuild.platform = "Win32" if self.settings.arch == "x86" else msbuild.platform - msbuild.build(os.path.join(build_script_folder, "xz_win.sln"), targets=[self._msbuild_target]) + msbuild.build(os.path.join(build_script_folder, solution_file), targets=[self._msbuild_target]) def build(self): apply_conandata_patches(self) - if is_msvc(self): + if self._use_msbuild: self._build_msvc() else: autotools = Autotools(self) @@ -142,7 +157,7 @@ def build(self): def package(self): copy(self, "COPYING", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) - if is_msvc(self): + if self._use_msbuild: inc_dir = os.path.join(self.source_folder, "src", "liblzma", "api") copy(self, "*.h", src=inc_dir, dst=os.path.join(self.package_folder, "include")) output_dir = os.path.join(self.source_folder, "windows") diff --git a/recipes/ydcpp-tcpcat/all/conandata.yml b/recipes/ydcpp-tcpcat/all/conandata.yml new file mode 100644 index 0000000000000..93679778e120e --- /dev/null +++ b/recipes/ydcpp-tcpcat/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "1.0.4": + url: "https://github.com/ydcpp/tcpcat/archive/refs/tags/1.0.4.tar.gz" + sha256: "3413e74eab0a1bf7927b747e393b1931e8a516ee769642ce89c558a93e00e38b" diff --git a/recipes/ydcpp-tcpcat/all/conanfile.py b/recipes/ydcpp-tcpcat/all/conanfile.py new file mode 100644 index 0000000000000..ff79b54fa821b --- /dev/null +++ b/recipes/ydcpp-tcpcat/all/conanfile.py @@ -0,0 +1,95 @@ +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.cmake import CMakeToolchain, CMake, CMakeDeps, cmake_layout +from conan.tools.microsoft import is_msvc +from conan.tools.files import copy, get +from conan.tools.build import check_min_cppstd +from conan.tools.scm import Version +import os + + +class TcpcatConan(ConanFile): + name = "ydcpp-tcpcat" + + # Optional metadata + license = "MIT" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/ydcpp/tcpcat" + description = "Simple C++ TCP Server and Client library." + topics = ("network", "tcp", "tcp-server", "tcp-client") + + # Binary configuration + package_type = "library" + settings = "os", "compiler", "build_type", "arch" + options = {"shared": [True, False], "fPIC": [True, False]} + default_options = {"shared": False, "fPIC": True} + + @property + def _min_cppstd(self): + return 17 + + @property + def _compilers_minimum_version(self): + return { + "gcc": "7", + "Visual Studio": "16", + "msvc": "192", + "clang": "7", + "apple-clang": "12" + } + + def config_options(self): + if self.settings.os == "Windows": + self.options.rm_safe("fPIC") + + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + + def layout(self): + cmake_layout(self, src_folder="src") + + def validate(self): + if self.settings.compiler.get_safe("cppstd"): + check_min_cppstd(self, self._min_cppstd) + + # Upstream meant to support Windows Shared builds, but they don't currently export any symbols + # Disable for now until fixed. As this is an upstream issue they want fixed, we don't set + # package_type = "static-library" in the configure() method so that users have a clear message error for now + if is_msvc(self) and self.options.shared: + raise ConanInvalidConfiguration(f"{self.ref} does not currently support Windows shared builds due to an upstream issue") + + minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) + if minimum_version and Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration( + f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." + ) + + def requirements(self): + self.requires("asio/1.30.2", transitive_headers = True) + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + deps = CMakeDeps(self) + deps.generate() + tc = CMakeToolchain(self) + tc.generate() + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def package(self): + copy(self, "LICENSE", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) + copy(self, "*", src=os.path.join(self.source_folder, "include"), dst=os.path.join(self.package_folder, "include")) + cmake = CMake(self) + cmake.install() + + def package_info(self): + self.cpp_info.libs = ["ydcpp-tcpcat"] + self.cpp_info.set_property("cmake_target_name", "ydcpp-tcpcat") + if self.settings.os in ("Linux", "FreeBSD"): + self.cpp_info.system_libs.append("m") diff --git a/recipes/ydcpp-tcpcat/all/test_package/CMakeLists.txt b/recipes/ydcpp-tcpcat/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..0be8339e35258 --- /dev/null +++ b/recipes/ydcpp-tcpcat/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(PackageTest CXX) + +add_executable(test_package test_package.cpp) + +find_package(ydcpp-tcpcat CONFIG REQUIRED) +target_link_libraries(test_package ydcpp-tcpcat) +target_compile_features(test_package PRIVATE cxx_std_17) diff --git a/recipes/ydcpp-tcpcat/all/test_package/conanfile.py b/recipes/ydcpp-tcpcat/all/test_package/conanfile.py new file mode 100644 index 0000000000000..806fd5ae2a792 --- /dev/null +++ b/recipes/ydcpp-tcpcat/all/test_package/conanfile.py @@ -0,0 +1,26 @@ +import os + +from conan import ConanFile +from conan.tools.cmake import CMake, cmake_layout +from conan.tools.build import can_run + + +class tcpcatTestConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "CMakeDeps", "CMakeToolchain" + + def requirements(self): + self.requires(self.tested_reference_str) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def layout(self): + cmake_layout(self) + + def test(self): + if can_run(self): + cmd = os.path.join(self.cpp.build.bindir, "test_package") + self.run(cmd, env="conanrun") diff --git a/recipes/ydcpp-tcpcat/all/test_package/test_package.cpp b/recipes/ydcpp-tcpcat/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..aa337b33b0be6 --- /dev/null +++ b/recipes/ydcpp-tcpcat/all/test_package/test_package.cpp @@ -0,0 +1,11 @@ +#include + +#include +#include + +int main() +{ + tcpcat::TcpSession session(nullptr, nullptr, 0); + std::cout << "session id: " << session.GetId() << std::endl; + return 0; +} diff --git a/recipes/ydcpp-tcpcat/config.yml b/recipes/ydcpp-tcpcat/config.yml new file mode 100644 index 0000000000000..c20e44b006f1a --- /dev/null +++ b/recipes/ydcpp-tcpcat/config.yml @@ -0,0 +1,3 @@ +versions: + "1.0.4": + folder: all diff --git a/recipes/yoga/all/conandata.yml b/recipes/yoga/all/conandata.yml index 4491f60c4cea8..beedad9ab39c3 100644 --- a/recipes/yoga/all/conandata.yml +++ b/recipes/yoga/all/conandata.yml @@ -1,4 +1,10 @@ sources: + "3.1.0": + url: "https://github.com/facebook/yoga/archive/refs/tags/v3.1.0.tar.gz" + sha256: "06ff9e6df9b2388a0c6ef8db55ba9bc2ae75e716e967cd12cf18785f6379159e" + "3.0.4": + url: "https://github.com/facebook/yoga/archive/refs/tags/v3.0.4.tar.gz" + sha256: "ef3ce5106eed03ab2e40dcfe5b868936a647c5f02b7ffd89ffaa5882dca3ef7f" "3.0.2": url: "https://github.com/facebook/yoga/archive/refs/tags/v3.0.2.tar.gz" sha256: "73a81c51d9ceb5b95cd3abcafeb4c840041801d59f5048dacce91fbaab0cc6f9" @@ -9,6 +15,14 @@ sources: url: "https://github.com/facebook/yoga/archive/refs/tags/v2.0.0.tar.gz" sha256: "29eaf05191dd857f76b6db97c77cce66db3c0067c88bd5e052909386ea66b8c5" patches: + "3.1.0": + - patch_file: "patches/0001-delete-tests.patch" + patch_description: "Delete test targets from cmake" + patch_type: "conan" + "3.0.4": + - patch_file: "patches/0001-delete-tests.patch" + patch_description: "Delete test targets from cmake" + patch_type: "conan" "3.0.2": - patch_file: "patches/0001-delete-tests.patch" patch_description: "Delete test targets from cmake" diff --git a/recipes/yoga/config.yml b/recipes/yoga/config.yml index c6a903df77248..542519cbca0f4 100644 --- a/recipes/yoga/config.yml +++ b/recipes/yoga/config.yml @@ -1,4 +1,8 @@ versions: + "3.1.0": + folder: all + "3.0.4": + folder: all "3.0.2": folder: all "2.0.1": diff --git a/recipes/yomm2/all/conandata.yml b/recipes/yomm2/all/conandata.yml new file mode 100644 index 0000000000000..b863f98db9295 --- /dev/null +++ b/recipes/yomm2/all/conandata.yml @@ -0,0 +1,10 @@ +sources: + "1.6.0": + url: "https://github.com/jll63/yomm2/archive/refs/tags/v1.6.0.tar.gz" + sha256: "5d617704755637b863a90129d09b8c3a1d3a06e3be809693c07575e0289cb508" + "1.5.2": + url: "https://github.com/jll63/yomm2/archive/refs/tags/v1.5.2.tar.gz" + sha256: "12f3f735b4870606199b889a242ebfed84cf0cd392b04a1c32db11291de684be" + "1.5.1": + url: "https://github.com/jll63/yomm2/archive/refs/tags/v1.5.1.tar.gz" + sha256: "323abba27a356555cc3ead3e3e950746ab43f90d97ad21950f2ba3afaf565ecc" diff --git a/recipes/yomm2/all/conanfile.py b/recipes/yomm2/all/conanfile.py new file mode 100644 index 0000000000000..3f5eaff0f2be7 --- /dev/null +++ b/recipes/yomm2/all/conanfile.py @@ -0,0 +1,121 @@ +import os + +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.build import check_min_cppstd +from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout, CMakeDeps +from conan.tools.files import get, rm, rmdir, copy, replace_in_file +from conan.tools.scm import Version + +required_conan_version = ">=1.54.0" + + +class yomm2Recipe(ConanFile): + name = "yomm2" + package_type = "header-library" + # Optional metadata + license = "BSL-1.0" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/jll63/yomm2" + description = "Fast, orthogonal, open multi-methods. Solve the Expression Problem in C++17" + topics = ("multi-methods", "multiple-dispatch", "open-methods", "shared-library", + "header-only", "polymorphism", "expression-problem", "c++17") + # Binary configuration + settings = "os", "compiler", "build_type", "arch" + options = { + "header_only": [True, False], + } + default_options = { + "header_only": True + } + + @property + def _min_cppstd(self): + return 17 + + @property + def _compilers_minimum_version(self): + return { + "gcc": "8", + "clang": "5", + "apple-clang": "13", + "msvc": "192" + } + + def configure(self): + if not bool(self.options.header_only): + self.package_type = "shared-library" + + def validate(self): + if self.settings.compiler.get_safe("cppstd"): + check_min_cppstd(self, self._min_cppstd) + minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) + if minimum_version and Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration( + f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." + ) + if self.settings.compiler == "apple-clang" and not bool(self.options.header_only): + raise ConanInvalidConfiguration( + f"{self.ref} dynamic library builds are not supported on MacOS." + ) + + def build_requirements(self): + self.tool_requires("cmake/[>=3.21 <4]") + + def requirements(self): + # Upstream requires Boost 1.74 + # Using more modern Boost version to avoid issues like the one commented here: + # - https://github.com/conan-io/conan/issues/15977#issuecomment-2098003085 + self.requires("boost/1.85.0", transitive_headers=True) + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def layout(self): + cmake_layout(self, src_folder="src") + + def generate(self): + deps = CMakeDeps(self) + deps.generate() + tc = CMakeToolchain(self) + tc.variables["YOMM2_ENABLE_EXAMPLES"] = "OFF" + tc.variables["YOMM2_ENABLE_TESTS"] = "OFF" + tc.variables["YOMM2_SHARED"] = not bool(self.options.header_only) + tc.generate() + + def _patch_sources(self): + if Version(self.version) <= "1.5.1": + cmakelists = os.path.join(self.source_folder, "CMakeLists.txt") + replace_in_file(self, cmakelists, "add_subdirectory(docs.in)", "") + + def build(self): + self._patch_sources() + cmake = CMake(self) + cmake.configure() + cmake.build() + + def package_id(self): + # if yomm2 is built as static, it behaves as a header-only one + if self.info.options.header_only: + self.info.clear() + + def package(self): + copy(self, "LICENSE", self.source_folder, os.path.join(self.package_folder, "licenses")) + cmake = CMake(self) + cmake.install() + rm(self, "*.pdb", os.path.join(self.package_folder, "bin")) + if self.options.header_only: + rmdir(self, os.path.join(self.package_folder, "lib")) + else: + rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) + + def package_info(self): + self.cpp_info.set_property("cmake_file_name", "YOMM2") + self.cpp_info.set_property("cmake_target_name", "YOMM2::yomm2") + if self.options.header_only: + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] + else: # shared-library + self.cpp_info.libs = ["yomm2"] + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.system_libs.append("m") diff --git a/recipes/yomm2/all/test_package/CMakeLists.txt b/recipes/yomm2/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..2686aaf2077a9 --- /dev/null +++ b/recipes/yomm2/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) + +find_package(YOMM2 REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE YOMM2::yomm2 ${CMAKE_THREAD_LIBS_INIT}) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) diff --git a/recipes/yomm2/all/test_package/conanfile.py b/recipes/yomm2/all/test_package/conanfile.py new file mode 100644 index 0000000000000..189c09687bde3 --- /dev/null +++ b/recipes/yomm2/all/test_package/conanfile.py @@ -0,0 +1,26 @@ +import os + +from conan import ConanFile +from conan.tools.cmake import CMake, cmake_layout +from conan.tools.build import can_run + + +class yomm2TestConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "CMakeDeps", "CMakeToolchain" + + def requirements(self): + self.requires(self.tested_reference_str) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def layout(self): + cmake_layout(self) + + def test(self): + if can_run(self): + cmd = os.path.join(self.cpp.build.bindir, "test_package") + self.run(cmd, env="conanrun") diff --git a/recipes/yomm2/all/test_package/test_package.cpp b/recipes/yomm2/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..ea5d7313d5408 --- /dev/null +++ b/recipes/yomm2/all/test_package/test_package.cpp @@ -0,0 +1,53 @@ +// Copyright (c) 2018-2024 Jean-Louis Leroy +// Distributed under the Boost Software License, Version 1.0. +// See accompanying file LICENSE_1_0.txt +// or copy at http://www.boost.org/LICENSE_1_0.txt) + +#include + +#include + +class Animal { + public: + virtual ~Animal() { + } +}; + +class Dog : public Animal {}; +class Cat : public Animal {}; + +register_classes(Animal, Dog, Cat); + +declare_method( + void, meet, (virtual_, virtual_, std::ostream&)); + +define_method(void, meet, (Animal&, Animal&, std::ostream& os)) { + os << "ignore"; +} + +// Add definitions for specific pairs of animals. +define_method(void, meet, (Dog& dog1, Dog& dog2, std::ostream& os)) { + os << "wag tail"; +} + +define_method(void, meet, (Dog& dog, Cat& cat, std::ostream& os)) { + os << "chase"; +} + +define_method(void, meet, (Cat& cat, Dog& dog, std::ostream& os)) { + os << "run"; +} + +int main() { + #ifndef NDEBUG + yorel::yomm2::default_policy::trace_enabled = true; + #endif + + yorel::yomm2::update(); + Animal&& snoopy = Dog(); + Animal&& felix = Cat(); + std::ostringstream os; + meet(snoopy, felix, os); // chase + + return os.str() == "chase" ? 0 : 1; +} diff --git a/recipes/yomm2/config.yml b/recipes/yomm2/config.yml new file mode 100644 index 0000000000000..46b176795aa94 --- /dev/null +++ b/recipes/yomm2/config.yml @@ -0,0 +1,7 @@ +versions: + "1.6.0": + folder: all + "1.5.2": + folder: all + "1.5.1": + folder: all diff --git a/recipes/yyjson/all/conandata.yml b/recipes/yyjson/all/conandata.yml index 856586629c80e..bd4149d822688 100644 --- a/recipes/yyjson/all/conandata.yml +++ b/recipes/yyjson/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.10.0": + url: "https://github.com/ibireme/yyjson/archive/refs/tags/0.10.0.tar.gz" + sha256: "0d901cb2c45c5586e3f3a4245e58c2252d6b24bf4b402723f6179523d389b165" "0.9.0": url: "https://github.com/ibireme/yyjson/archive/refs/tags/0.9.0.tar.gz" sha256: "59902bea55585d870fd7681eabe6091fbfd1a8776d1950f859d2dbbd510c74bd" diff --git a/recipes/yyjson/config.yml b/recipes/yyjson/config.yml index b8cc90950df51..b53dac867c374 100644 --- a/recipes/yyjson/config.yml +++ b/recipes/yyjson/config.yml @@ -1,4 +1,6 @@ versions: + "0.10.0": + folder: all "0.9.0": folder: all "0.8.0": diff --git a/recipes/zeus_expected/all/conandata.yml b/recipes/zeus_expected/all/conandata.yml new file mode 100644 index 0000000000000..4ddc999dfc0ef --- /dev/null +++ b/recipes/zeus_expected/all/conandata.yml @@ -0,0 +1,17 @@ +sources: + "1.2.0": + url: "https://github.com/zeus-cpp/expected/archive/refs/tags/v1.2.0.tar.gz" + sha256: "460da641f212c793f46a5a8f29107c9b9540a17a91f197e2dc396dac0269a2b5" + "1.1.1": + url: "https://github.com/zeus-cpp/expected/archive/refs/tags/v1.1.1.tar.gz" + sha256: "47b411677ffb2fa0d43b308797542509ae2bdb101426cf0d4777e3c162b1d726" + "1.1.0": + url: "https://github.com/zeus-cpp/expected/archive/refs/tags/v1.1.0.tar.gz" + sha256: "a963eba43f227498da2cbb924265344209696320c75ee63a92073936bb49f7e5" + +patches: + "1.1.0": + - patch_file: "patches/0001-fix-compiler-errors-with-msvc-v142.patch" + patch_source: "https://github.com/zeus-cpp/expected/pull/7/commits/82ed513aa65a3c2c7b8f8af7c63e0b8b57637dfb" + patch_description: "Fix for MSVC v142" + patch_type: "bugfix" diff --git a/recipes/zeus_expected/all/conanfile.py b/recipes/zeus_expected/all/conanfile.py new file mode 100644 index 0000000000000..1067fa8157091 --- /dev/null +++ b/recipes/zeus_expected/all/conanfile.py @@ -0,0 +1,84 @@ +from conan import ConanFile +from conan.tools.build import check_min_cppstd +from conan.tools.files import copy, get +from conan.tools.layout import basic_layout +from conan.errors import ConanInvalidConfiguration +from conan.tools.scm import Version +from conan.tools.files import apply_conandata_patches, export_conandata_patches +import os + +required_conan_version = ">=1.54.0" + + +class ZeusExpectedConan(ConanFile): + name = "zeus_expected" + + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/zeus-cpp/expected" + description = "Backporting std::expected to C++17." + topics = ("cpp17", "expected") + license = "MIT" + + package_type = "header-library" + settings = "os", "arch", "compiler", "build_type" + + no_copy_source = True + + def export_sources(self): + export_conandata_patches(self) + + @property + def _min_cppstd(self): + return 17 + + @property + def _minimum_compilers_version(self): + return { + "gcc": "7", + "clang": "5", + "Visual Studio": "15.7", + "apple-clang": "10", + } + + def validate(self): + if self.settings.compiler.get_safe("cppstd"): + check_min_cppstd(self, self._min_cppstd) + + min_version = self._minimum_compilers_version.get(str(self.settings.compiler)) + if min_version and Version(self.settings.compiler.version) < min_version: + raise ConanInvalidConfiguration( + f"{self.name} requires C++{self._min_cppstd}, which your compiler does not support." + ) + + def layout(self): + basic_layout(self, src_folder="src") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def build(self): + apply_conandata_patches(self) + + def package(self): + copy( + self, + "LICENSE", + src=self.source_folder, + dst=os.path.join(self.package_folder, "licenses"), + ) + copy( + self, + "*", + src=os.path.join(self.source_folder, "include"), + dst=os.path.join(self.package_folder, "include"), + ) + + def package_info(self): + self.cpp_info.set_property("cmake_target_name", "zeus::expected") + self.cpp_info.bindirs = [] + self.cpp_info.frameworkdirs = [] + self.cpp_info.libdirs = [] + self.cpp_info.resdirs = [] + + def package_id(self): + self.info.clear() diff --git a/recipes/zeus_expected/all/patches/0001-fix-compiler-errors-with-msvc-v142.patch b/recipes/zeus_expected/all/patches/0001-fix-compiler-errors-with-msvc-v142.patch new file mode 100644 index 0000000000000..82856fb33c345 --- /dev/null +++ b/recipes/zeus_expected/all/patches/0001-fix-compiler-errors-with-msvc-v142.patch @@ -0,0 +1,88 @@ +From 82ed513aa65a3c2c7b8f8af7c63e0b8b57637dfb Mon Sep 17 00:00:00 2001 +From: X1aomu +Date: Fri, 19 Apr 2024 14:15:14 +0800 +Subject: [PATCH] fix: compiler errors with msvc v142 + +--- + include/zeus/expected.hpp | 16 ++++++++-------- + 1 file changed, 8 insertions(+), 8 deletions(-) + +diff --git a/include/zeus/expected.hpp b/include/zeus/expected.hpp +index 6492953..790f870 100644 +--- a/include/zeus/expected.hpp ++++ b/include/zeus/expected.hpp +@@ -2441,7 +2441,7 @@ public: + constexpr auto and_then(F &&f) & + { + using U = expected_detail::remove_cvref_t>; +- static_assert(expected_detail::is_specialization_v, "U (return type of F) must be specialization of expected"); ++ static_assert(expected_detail::is_specialization_v, "U (return type of F) must be specialization of expected"); + static_assert(std::is_same_v, "The error type must be the same after calling the F"); + + if (has_value()) +@@ -2453,7 +2453,7 @@ public: + constexpr auto and_then(F &&f) const & + { + using U = expected_detail::remove_cvref_t>; +- static_assert(expected_detail::is_specialization_v, "U (return type of F) must be specialization of expected"); ++ static_assert(expected_detail::is_specialization_v, "U (return type of F) must be specialization of expected"); + static_assert(std::is_same_v, "The error type must be the same after calling the F"); + + if (has_value()) +@@ -2465,7 +2465,7 @@ public: + constexpr auto and_then(F &&f) && + { + using U = expected_detail::remove_cvref_t>; +- static_assert(expected_detail::is_specialization_v, "U (return type of F) must be specialization of expected"); ++ static_assert(expected_detail::is_specialization_v, "U (return type of F) must be specialization of expected"); + static_assert(std::is_same_v, "The error type must be the same after calling the F"); + + if (has_value()) +@@ -2477,7 +2477,7 @@ public: + constexpr auto and_then(F &&f) const && + { + using U = expected_detail::remove_cvref_t>; +- static_assert(expected_detail::is_specialization_v, "U (return type of F) must be specialization of expected"); ++ static_assert(expected_detail::is_specialization_v, "U (return type of F) must be specialization of expected"); + static_assert(std::is_same_v, "The error type must be the same after calling the F"); + + if (has_value()) +@@ -2490,7 +2490,7 @@ public: + constexpr auto or_else(F &&f) & + { + using G = expected_detail::remove_cvref_t>; +- static_assert(expected_detail::is_specialization_v, "G (return type of F) must be specialization of expected"); ++ static_assert(expected_detail::is_specialization_v, "G (return type of F) must be specialization of expected"); + static_assert(std::is_same_v, "The value type must be the same after calling the F"); + + if (has_value()) +@@ -2502,7 +2502,7 @@ public: + constexpr auto or_else(F &&f) const & + { + using G = expected_detail::remove_cvref_t>; +- static_assert(expected_detail::is_specialization_v, "G (return type of F) must be specialization of expected"); ++ static_assert(expected_detail::is_specialization_v, "G (return type of F) must be specialization of expected"); + static_assert(std::is_same_v, "The value type must be the same after calling the F"); + + if (has_value()) +@@ -2514,7 +2514,7 @@ public: + constexpr auto or_else(F &&f) && + { + using G = expected_detail::remove_cvref_t>; +- static_assert(expected_detail::is_specialization_v, "G (return type of F) must be specialization of expected"); ++ static_assert(expected_detail::is_specialization_v, "G (return type of F) must be specialization of expected"); + static_assert(std::is_same_v, "The value type must be the same after calling the F"); + + if (has_value()) +@@ -2526,7 +2526,7 @@ public: + constexpr auto or_else(F &&f) const && + { + using G = expected_detail::remove_cvref_t>; +- static_assert(expected_detail::is_specialization_v, "G (return type of F) must be specialization of expected"); ++ static_assert(expected_detail::is_specialization_v, "G (return type of F) must be specialization of expected"); + static_assert(std::is_same_v, "The value type must be the same after calling the F"); + + if (has_value()) +-- +2.44.0.windows.1 + diff --git a/recipes/zeus_expected/all/test_package/CMakeLists.txt b/recipes/zeus_expected/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..5afcbf812c8a3 --- /dev/null +++ b/recipes/zeus_expected/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.8) +project(test_package LANGUAGES CXX) + +find_package(zeus_expected REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE zeus::expected) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) diff --git a/recipes/zeus_expected/all/test_package/conanfile.py b/recipes/zeus_expected/all/test_package/conanfile.py new file mode 100644 index 0000000000000..d120a992c06a6 --- /dev/null +++ b/recipes/zeus_expected/all/test_package/conanfile.py @@ -0,0 +1,25 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import CMake, cmake_layout +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeToolchain", "CMakeDeps", "VirtualRunEnv" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/zeus_expected/all/test_package/test_package.cpp b/recipes/zeus_expected/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..1577435ab0a55 --- /dev/null +++ b/recipes/zeus_expected/all/test_package/test_package.cpp @@ -0,0 +1,21 @@ +#include + +zeus::expected func(int argc) +{ + if (argc > 1) + { + return {}; + } + else + { + return zeus::unexpected(1); + } +} + +int main(int argc, char** argv) +{ + return func(argc) + .and_then([] { return zeus::expected {}; }) + .transform_error([](int) { return 0; }) + .error_or(1); +} diff --git a/recipes/zeus_expected/config.yml b/recipes/zeus_expected/config.yml new file mode 100644 index 0000000000000..3e22acea70d08 --- /dev/null +++ b/recipes/zeus_expected/config.yml @@ -0,0 +1,7 @@ +versions: + "1.2.0": + folder: all + "1.1.1": + folder: all + "1.1.0": + folder: all diff --git a/recipes/zlib-ng/all/conandata.yml b/recipes/zlib-ng/all/conandata.yml index c46c2b8a3621f..ec5f329c3876a 100644 --- a/recipes/zlib-ng/all/conandata.yml +++ b/recipes/zlib-ng/all/conandata.yml @@ -1,4 +1,13 @@ sources: + "2.2.2": + url: "https://github.com/zlib-ng/zlib-ng/archive/refs/tags/2.2.2.tar.gz" + sha256: "fcb41dd59a3f17002aeb1bb21f04696c9b721404890bb945c5ab39d2cb69654c" + "2.2.1": + url: "https://github.com/zlib-ng/zlib-ng/archive/refs/tags/2.2.1.tar.gz" + sha256: "ec6a76169d4214e2e8b737e0850ba4acb806c69eeace6240ed4481b9f5c57cdf" + "2.1.7": + url: "https://github.com/zlib-ng/zlib-ng/archive/refs/tags/2.1.7.tar.gz" + sha256: "59e68f67cbb16999842daeb517cdd86fc25b177b4affd335cd72b76ddc2a46d8" "2.1.6": url: "https://github.com/zlib-ng/zlib-ng/archive/refs/tags/2.1.6.tar.gz" sha256: "a5d504c0d52e2e2721e7e7d86988dec2e290d723ced2307145dedd06aeb6fef2" diff --git a/recipes/zlib-ng/all/conanfile.py b/recipes/zlib-ng/all/conanfile.py index e0d0177aaa348..3e9b57a60b9de 100644 --- a/recipes/zlib-ng/all/conanfile.py +++ b/recipes/zlib-ng/all/conanfile.py @@ -13,10 +13,10 @@ class ZlibNgConan(ConanFile): name = "zlib-ng" description = "zlib data compression library for the next generation systems" - topics = ("zlib", "compression") license ="Zlib" url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/zlib-ng/zlib-ng/" + topics = ("zlib", "compression") package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { @@ -28,6 +28,7 @@ class ZlibNgConan(ConanFile): "with_new_strategies": [True, False], "with_native_instructions": [True, False], "with_reduced_mem": [True, False], + "with_runtime_cpu_detection": [True, False], } default_options = { "shared": False, @@ -38,6 +39,7 @@ class ZlibNgConan(ConanFile): "with_new_strategies": True, "with_native_instructions": False, "with_reduced_mem": False, + "with_runtime_cpu_detection": True, } def config_options(self): @@ -45,6 +47,8 @@ def config_options(self): del self.options.fPIC if Version(self.version) < "2.1.0": del self.options.with_reduced_mem + if Version(self.version) < "2.2.1": + del self.options.with_runtime_cpu_detection def configure(self): if self.options.shared: @@ -76,6 +80,8 @@ def generate(self): tc.variables["WITH_NATIVE_INSTRUCTIONS"] = self.options.with_native_instructions if Version(self.version) >= "2.1.0": tc.variables["WITH_REDUCED_MEM"] = self.options.with_reduced_mem + if Version(self.version) >= "2.2.1": + tc.variables["WITH_RUNTIME_CPU_DETECTION"] = self.options.with_runtime_cpu_detection tc.generate() def build(self): @@ -89,6 +95,7 @@ def package(self): cmake = CMake(self) cmake.install() rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) + rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) # upstream CMakeLists intentionally hardcodes install_name with full # install path (to match autootools behavior), instead of @rpath fix_apple_shared_install_name(self) diff --git a/recipes/zlib-ng/config.yml b/recipes/zlib-ng/config.yml index 2b7d8b2941104..d3e8e7960ca7d 100644 --- a/recipes/zlib-ng/config.yml +++ b/recipes/zlib-ng/config.yml @@ -1,4 +1,10 @@ versions: + "2.2.2": + folder: all + "2.2.1": + folder: all + "2.1.7": + folder: all "2.1.6": folder: all "2.1.5": diff --git a/recipes/zlib/all/patches/1.3/0002-gzguts-xcode12-compile-fix.patch b/recipes/zlib/all/patches/1.3/0002-gzguts-xcode12-compile-fix.patch deleted file mode 100644 index d299f4962fa59..0000000000000 --- a/recipes/zlib/all/patches/1.3/0002-gzguts-xcode12-compile-fix.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff --git a/gzguts.h b/gzguts.h -index f937504..c4654b5 100644 ---- a/gzguts.h -+++ b/gzguts.h -@@ -25,6 +25,10 @@ - # include - #endif - -+#ifdef __APPLE__ -+#include -+#endif -+ - #ifndef _POSIX_SOURCE - # define _POSIX_SOURCE - #endif diff --git a/recipes/zoe/all/conandata.yml b/recipes/zoe/all/conandata.yml index 568b6a5cdb8e4..697851d7b8d24 100644 --- a/recipes/zoe/all/conandata.yml +++ b/recipes/zoe/all/conandata.yml @@ -1,9 +1,22 @@ sources: + "3.3": + url: "https://github.com/winsoft666/zoe/archive/refs/tags/v3.3.tar.gz" + sha256: "e75d24690d16feff8bf1fc57d1943d545a5203ba769ff94034dc1f35f89927a5" + "3.1": + url: "https://github.com/winsoft666/zoe/archive/refs/tags/v3.1.tar.gz" + sha256: "4b5a0c0cac5fb61846875699cb7e013c84bc33d852041824bde7af80d793f15d" "3.0": url: "https://github.com/winsoft666/zoe/archive/refs/tags/v3.0.tar.gz" sha256: "718c6de993bea2a4b1866070a8685e77cfa7929bbd9e22abb29e54c67a687a5e" - patches: + "3.3": + - patch_file: "patches/3.1-0002-support-macosx.patch" + patch_description: "support macosx" + patch_type: "portability" + "3.1": + - patch_file: "patches/3.1-0002-support-macosx.patch" + patch_description: "support macosx" + patch_type: "portability" "3.0": - patch_file: "patches/3.0-0001-follow-cxx-standards.patch" patch_description: "include threads header" diff --git a/recipes/zoe/all/conanfile.py b/recipes/zoe/all/conanfile.py index 4e403d637b5d2..598bbd6c08ccd 100644 --- a/recipes/zoe/all/conanfile.py +++ b/recipes/zoe/all/conanfile.py @@ -1,13 +1,13 @@ from conan import ConanFile from conan.errors import ConanInvalidConfiguration from conan.tools.microsoft import is_msvc_static_runtime -from conan.tools.files import get, copy, apply_conandata_patches, export_conandata_patches +from conan.tools.files import get, copy, apply_conandata_patches, export_conandata_patches, rmdir, replace_in_file from conan.tools.build import check_min_cppstd from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout from conan.tools.scm import Version import os -required_conan_version = ">=1.53.0" +required_conan_version = ">=2.1" class ZoeConan(ConanFile): name = "zoe" @@ -27,21 +27,11 @@ class ZoeConan(ConanFile): "fPIC": True, } - @property - def _min_cppstd(self): - return 11 + implements = ["auto_shared_fpic"] def export_sources(self): export_conandata_patches(self) - def config_options(self): - if self.settings.os == "Windows": - del self.options.fPIC - - def configure(self): - if self.options.shared: - self.options.rm_safe("fPIC") - def layout(self): cmake_layout(self, src_folder="src") @@ -50,11 +40,13 @@ def requirements(self): self.requires("openssl/[>=1.1 <4]", transitive_headers=True) def validate(self): - if self.info.settings.compiler.get_safe("cppstd"): - check_min_cppstd(self, self._min_cppstd) + check_min_cppstd(self, "11") if self.info.settings.compiler == "apple-clang" and Version(self.info.settings.compiler.version) < "12.0": raise ConanInvalidConfiguration(f"{self.ref} can not build on apple-clang < 12.0.") + def build_requirements(self): + self.tool_requires("cmake/[>=3.16 <4]") + def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) @@ -68,8 +60,16 @@ def generate(self): deps = CMakeDeps(self) deps.generate() - def build(self): + def _apply_patches(self): apply_conandata_patches(self) + # Remove hardcoded CMAKE_CXX_STANDANRD in newer versions + if Version(self.version) >= "3.2": + replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), + "set (CMAKE_CXX_STANDARD 11)", + "") + + def build(self): + self._apply_patches() cmake = CMake(self) cmake.configure() cmake.build() @@ -78,6 +78,7 @@ def package(self): copy(self, pattern="LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) cmake = CMake(self) cmake.install() + rmdir(self, os.path.join(self.package_folder, "share")) def package_info(self): libname = "zoe" if self.options.shared else "zoe-static" @@ -89,5 +90,9 @@ def package_info(self): else: self.cpp_info.defines.append("ZOE_STATIC") + # https://github.com/winsoft666/zoe/blob/master/src/CMakeLists.txt#L88 + if self.settings.os == "Windows": + self.cpp_info.system_libs = ["ws2_32", "crypt32"] + if self.settings.os in ["Linux", "FreeBSD"]: self.cpp_info.system_libs.append("m") diff --git a/recipes/zoe/all/patches/3.1-0002-support-macosx.patch b/recipes/zoe/all/patches/3.1-0002-support-macosx.patch new file mode 100644 index 0000000000000..deb4b7f1cb9e7 --- /dev/null +++ b/recipes/zoe/all/patches/3.1-0002-support-macosx.patch @@ -0,0 +1,40 @@ +diff --git a/src/file_util.cpp b/src/file_util.cpp +index 386bfc8..70086be 100644 +--- a/src/file_util.cpp ++++ b/src/file_util.cpp +@@ -47,6 +47,9 @@ int64_t FileUtil::GetFileSize(FILE* f) { + #if defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__NT__) + _fseeki64(f, 0L, SEEK_END); + int64_t fsize = _ftelli64(f); ++#elif defined(__APPLE__) ++ fseeko(f, 0L, SEEK_END); ++ int64_t fsize = ftello(f); + #else + fseeko64(f, 0L, SEEK_END); + int64_t fsize = ftello64(f); +@@ -182,6 +185,8 @@ int FileUtil::Seek(FILE* f, int64_t offset, int origin) { + if (f) { + #if defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__NT__) + return _fseeki64(f, offset, origin); ++#elif defined(__APPLE__) ++ return fseeko(f, offset, origin); + #else + return fseeko64(f, offset, origin); + #endif +@@ -266,6 +271,16 @@ bool FileUtil::CreateFixedSizeFile(const utf8string& path, int64_t fixed_size) { + } + + return prealloc; ++#elif defined(__APPLE__) ++ int fd = open(path.c_str(), O_RDWR | O_CREAT, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH); ++ fstore_t store = {F_ALLOCATECONTIG, F_PEOFPOSMODE, 0, fixed_size}; ++ if (fcntl(fd, F_PREALLOCATE, &store) == -1) { ++ store.fst_flags = F_ALLOCATEALL; ++ if (fcntl(fd, F_PREALLOCATE, &store) == -1) { ++ return false; ++ } ++ } ++ return ftruncate(fd, fixed_size) == 0; + #else + int fd = open(path.c_str(), O_RDWR | O_CREAT, + S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH); diff --git a/recipes/zoe/all/test_package/test_package.cpp b/recipes/zoe/all/test_package/test_package.cpp index c802a922c2c55..3e7bf50d85e8c 100644 --- a/recipes/zoe/all/test_package/test_package.cpp +++ b/recipes/zoe/all/test_package/test_package.cpp @@ -1,4 +1,3 @@ -#include #include "zoe/zoe.h" int main(int argc, char** argv) { @@ -8,20 +7,6 @@ int main(int argc, char** argv) { Zoe efd; - efd.setThreadNum(10); // Optional - efd.setTmpFileExpiredTime(3600); // Optional - efd.setDiskCacheSize(20 * (2 << 19)); // Optional - efd.setMaxDownloadSpeed(50 * (2 << 19)); // Optional - efd.setHashVerifyPolicy(ALWAYS, MD5, "6fe294c3ef4765468af4950d44c65525"); // Optional, support MD5, CRC32, SHA256 - // There are more options available, please check zoe.h - efd.setVerboseOutput([](const utf8string& verbose) { // Optional - printf("%s\n", verbose.c_str()); - }); - efd.setHttpHeaders({ // Optional - {"Origin", "http://xxx.xxx.com"}, - {"User-Agent", "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1)"} - }); - Zoe::GlobalUnInit(); return 0; diff --git a/recipes/zoe/config.yml b/recipes/zoe/config.yml index fdd08f532337f..21e9fe947a6b1 100644 --- a/recipes/zoe/config.yml +++ b/recipes/zoe/config.yml @@ -1,3 +1,7 @@ versions: + "3.3": + folder: all + "3.1": + folder: all "3.0": folder: all diff --git a/recipes/zookeeper-client-c/all/conandata.yml b/recipes/zookeeper-client-c/all/conandata.yml index 0487be945d8c9..30c4962751575 100644 --- a/recipes/zookeeper-client-c/all/conandata.yml +++ b/recipes/zookeeper-client-c/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "3.9.1": + url: "https://archive.apache.org/dist/zookeeper/zookeeper-3.9.1/apache-zookeeper-3.9.1.tar.gz" + sha256: "918f0fcf4ca8c53c2cccb97237ea72d2ccba978233ca85eff08f8ba077a8dadf" "3.9.0": url: "https://archive.apache.org/dist/zookeeper/zookeeper-3.9.0/apache-zookeeper-3.9.0.tar.gz" sha256: "c7af07e7411c798398bb8cd50f47780d8e014831666c41df6ec6540c143c0da2" @@ -6,6 +9,10 @@ sources: url: "https://archive.apache.org/dist/zookeeper/zookeeper-3.8.1/apache-zookeeper-3.8.1.tar.gz" sha256: "ccc16850c8ab2553583583234d11c813061b5ea5f3b8ff1d740cde6c1fd1e219" patches: + "3.9.1": + - patch_file: "patches/3.8.1-0001-add-install.patch" + patch_description: "add installer, disable cli program" + patch_type: "conan" "3.9.0": - patch_file: "patches/3.8.1-0001-add-install.patch" patch_description: "add installer, disable cli program" diff --git a/recipes/zookeeper-client-c/all/conanfile.py b/recipes/zookeeper-client-c/all/conanfile.py index ec48f11ba450f..020e3c8246146 100644 --- a/recipes/zookeeper-client-c/all/conanfile.py +++ b/recipes/zookeeper-client-c/all/conanfile.py @@ -44,12 +44,12 @@ def layout(self): def requirements(self): if self.options.with_cyrus_sasl: - self.requires("cyrus-sasl/2.1.27") + self.requires("cyrus-sasl/2.1.28") if self.options.with_openssl: self.requires("openssl/[>=1.1 <4]") def build_requirements(self): - self.tool_requires("maven/3.9.2") + self.tool_requires("maven/3.9.4") def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) @@ -69,7 +69,9 @@ def build(self): apply_conandata_patches(self) # We have to install maven to generate jute files which are required by zookeeper-client - self.run("mvn compile", cwd=os.path.join(self.source_folder, "zookeeper-jute")) + # Override maven.repo.local to avoid writing to ~/.m2 + m2_repository = os.path.join(self.build_folder, "m2", "repository") + self.run(f'mvn compile -Dmaven.repo.local="{m2_repository}"', cwd=os.path.join(self.source_folder, "zookeeper-jute")) cmake = CMake(self) cmake.configure(build_script_folder=os.path.join(self.source_folder, "zookeeper-client", "zookeeper-client-c")) diff --git a/recipes/zookeeper-client-c/config.yml b/recipes/zookeeper-client-c/config.yml index 31b8685d6b74a..2bc00633d1dbc 100644 --- a/recipes/zookeeper-client-c/config.yml +++ b/recipes/zookeeper-client-c/config.yml @@ -1,4 +1,6 @@ versions: + "3.9.1": + folder: all "3.9.0": folder: all "3.8.1": diff --git a/recipes/zpp_bits/all/conandata.yml b/recipes/zpp_bits/all/conandata.yml index 21dad3174e487..8ce4aa57f1915 100644 --- a/recipes/zpp_bits/all/conandata.yml +++ b/recipes/zpp_bits/all/conandata.yml @@ -1,4 +1,10 @@ sources: + "4.4.25": + url: "https://github.com/eyalz800/zpp_bits/archive/v4.4.25.tar.gz" + sha256: "d4afb8cf73aec19686928445e912dbbe8d39bffdac43ea69b4781f145195a09e" + "4.4.24": + url: "https://github.com/eyalz800/zpp_bits/archive/v4.4.24.tar.gz" + sha256: "eff8bf4507f26e670ddf760374c9b691abf501426c468b5fd938cc8d53985153" "4.4.20": url: "https://github.com/eyalz800/zpp_bits/archive/v4.4.20.tar.gz" sha256: "13023d3752392d64f89113bf8099a2a50b2602a7e26a2fdf78a27e327104819c" diff --git a/recipes/zpp_bits/config.yml b/recipes/zpp_bits/config.yml index 4b6dc9c688350..e5c2dd1bf22b4 100644 --- a/recipes/zpp_bits/config.yml +++ b/recipes/zpp_bits/config.yml @@ -1,4 +1,8 @@ versions: + "4.4.25": + folder: all + "4.4.24": + folder: all "4.4.20": folder: all "4.4.19": diff --git a/recipes/zserio/all/conandata.yml b/recipes/zserio/all/conandata.yml index 9a65ed8b0e67c..7a037e6e14e17 100644 --- a/recipes/zserio/all/conandata.yml +++ b/recipes/zserio/all/conandata.yml @@ -1,4 +1,34 @@ sources: + "2.15.0": + runtime: + url: "https://github.com/ndsev/zserio/releases/download/v2.15.0/zserio-2.15.0-runtime-libs.zip" + sha256: "6bfc82723715dccc4022f1aaf590513f4105f402cf33e3cf7bd15b04e203b218" + compiler: + url: "https://github.com/ndsev/zserio/releases/download/v2.15.0/zserio-2.15.0-bin.zip" + sha256: "17398de9856cc48e05e37eab34783f5d421a758f65efad6a20672f2547fc60b8" + license: + url: "https://raw.githubusercontent.com/ndsev/zserio/v2.15.0/LICENSE" + sha256: "8fd7b040fc223bb07551dfed490df0d55d6af25e331e58bc7c7599163ed1bb5a" + "2.14.1": + runtime: + url: "https://github.com/ndsev/zserio/releases/download/v2.14.1/zserio-2.14.1-runtime-libs.zip" + sha256: "ae3d7660ed3dd02fc77f535d7c7c721d9f03179c441efd0f4d09dc889da929fc" + compiler: + url: "https://github.com/ndsev/zserio/releases/download/v2.14.1/zserio-2.14.1-bin.zip" + sha256: "3280d620b2c23e01cc2e73bae9b60c93f94b23859c68edb1f105ba499b377049" + license: + url: "https://raw.githubusercontent.com/ndsev/zserio/v2.14.1/LICENSE" + sha256: "8fd7b040fc223bb07551dfed490df0d55d6af25e331e58bc7c7599163ed1bb5a" + "2.14.0": + runtime: + url: "https://github.com/ndsev/zserio/releases/download/v2.14.0/zserio-2.14.0-runtime-libs.zip" + sha256: "6002bfe179333435c84d3be2cfb612c008bd52837512aecea8a888e4a3139564" + compiler: + url: "https://github.com/ndsev/zserio/releases/download/v2.14.0/zserio-2.14.0-bin.zip" + sha256: "c1d4668371ad3543cb24f86b218640da7f720f31afe3f8af2d427114d7c7ae5c" + license: + url: "https://raw.githubusercontent.com/ndsev/zserio/v2.14.0/LICENSE" + sha256: "8fd7b040fc223bb07551dfed490df0d55d6af25e331e58bc7c7599163ed1bb5a" "2.13.0": runtime: url: "https://github.com/ndsev/zserio/releases/download/v2.13.0/zserio-2.13.0-runtime-libs.zip" diff --git a/recipes/zserio/all/conanfile.py b/recipes/zserio/all/conanfile.py index 2ab5a23336294..6a69b2c814401 100644 --- a/recipes/zserio/all/conanfile.py +++ b/recipes/zserio/all/conanfile.py @@ -5,6 +5,7 @@ from conan.tools.files import copy, download, get from conan.tools.build import check_min_cppstd from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout +from conan.tools.scm import Version required_conan_version = ">=1.54.0" @@ -25,12 +26,24 @@ class ZserioConanFile(ConanFile): "fPIC": True } + @property + def _compilers_minimum_version(self): + # https://github.com/ndsev/zserio/tree/master/compiler/extensions/cpp#supported-compilers + return { + "apple-clang": "11", + "clang": "11", + "gcc": "5", + "msvc": "191", + "Visual Studio": "15", + } + @property def _min_cppstd(self): return 11 def export_sources(self): - copy(self, "zserio_compiler.cmake", self.recipe_folder, self.export_sources_folder) + if Version(self.version) < "2.14.0": + copy(self, "zserio_compiler.cmake", self.recipe_folder, self.export_sources_folder) def config_options(self): if self.settings.os == "Windows": @@ -50,6 +63,13 @@ def validate(self): if self.settings.compiler.cppstd: check_min_cppstd(self, self._min_cppstd) + minimum_compiler_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) + if minimum_compiler_version and Version(self.settings.compiler.version) < minimum_compiler_version: + raise ConanInvalidConfiguration( + f"Compiler version '{self.settings.compiler.version}' not supported, " + f"minumum is '{minimum_compiler_version}'!" + ) + def source(self): sources = self.conan_data["sources"][self.version] get(self, **sources["runtime"], strip_root=True) @@ -57,6 +77,8 @@ def source(self): def generate(self): tc = CMakeToolchain(self) + if not self.settings.get_safe("compiler.cppstd"): + tc.variables["CMAKE_CXX_STANDARD"] = str(self._min_cppstd) tc.generate() def build(self): @@ -65,6 +87,8 @@ def build(self): cmake.build() sources = self.conan_data["sources"][self.version] get(self, **sources["compiler"], pattern="zserio.jar") + if Version(self.version) >= "2.14.0": + get(self, **sources["compiler"], pattern="cmake/zserio_compiler.cmake") @property def _cmake_module_path(self): @@ -80,8 +104,13 @@ def package(self): copy(self, "*.a", self.build_folder, lib_dir, keep_path=False) copy(self, "zserio.jar", self.build_folder, os.path.join(self.package_folder, "bin")) - copy(self, "zserio_compiler.cmake", self.export_sources_folder, - os.path.join(self.package_folder, self._cmake_module_path)) + if Version(self.version) >= "2.14.0": + # from 2.14.0 the cmake script is available directly in zserio repository + copy(self, "zserio_compiler.cmake", os.path.join(self.build_folder, "cmake"), + os.path.join(self.package_folder, self._cmake_module_path)) + else: + copy(self, "zserio_compiler.cmake", self.export_sources_folder, + os.path.join(self.package_folder, self._cmake_module_path)) def package_info(self): self.cpp_info.libs = ["ZserioCppRuntime"] diff --git a/recipes/zserio/config.yml b/recipes/zserio/config.yml index 319f45f887837..723c11ae74ab0 100644 --- a/recipes/zserio/config.yml +++ b/recipes/zserio/config.yml @@ -1,3 +1,9 @@ versions: + "2.15.0": + folder: all + "2.14.1": + folder: all + "2.14.0": + folder: all "2.13.0": folder: all diff --git a/recipes/zstd/all/conandata.yml b/recipes/zstd/all/conandata.yml index 522d0033ac6d3..03a332ccef7aa 100644 --- a/recipes/zstd/all/conandata.yml +++ b/recipes/zstd/all/conandata.yml @@ -5,28 +5,18 @@ sources: "1.5.5": url: "https://github.com/facebook/zstd/releases/download/v1.5.5/zstd-1.5.5.tar.gz" sha256: "9c4396cc829cfae319a6e2615202e82aad41372073482fce286fac78646d3ee4" - "1.5.4": - url: "https://github.com/facebook/zstd/releases/download/v1.5.4/zstd-1.5.4.tar.gz" - sha256: "0f470992aedad543126d06efab344dc5f3e171893810455787d38347343a4424" "1.5.2": url: "https://github.com/facebook/zstd/releases/download/v1.5.2/zstd-1.5.2.tar.gz" sha256: "7c42d56fac126929a6a85dbc73ff1db2411d04f104fae9bdea51305663a83fd0" - "1.5.1": - url: "https://github.com/facebook/zstd/releases/download/v1.5.1/zstd-1.5.1.tar.gz" - sha256: "e28b2f2ed5710ea0d3a1ecac3f6a947a016b972b9dd30242369010e5f53d7002" "1.5.0": url: "https://github.com/facebook/zstd/releases/download/v1.5.0/zstd-1.5.0.tar.gz" sha256: "5194fbfa781fcf45b98c5e849651aa7b3b0a008c6b72d4a0db760f3002291e94" - "1.4.9": - url: "https://github.com/facebook/zstd/releases/download/v1.4.9/zstd-1.4.9.tar.gz" - sha256: "29ac74e19ea28659017361976240c4b5c5c24db3b89338731a6feb97c038d293" patches: "1.5.6": - patch_file: "patches/1.5.6-public-scope-windows-shared.patch" patch_description: "Include zstd.h folder when building shared library on Windows" patch_type: "bugfix" patch_source: "https://github.com/facebook/zstd/pull/4009" - "1.5.5": - patch_file: "patches/1.5.2-cmake-remove-asm-except-x86_64.patch" patch_description: "use assembler codes only on x86_64" @@ -35,14 +25,6 @@ patches: patch_description: "Add qnx to platform" patch_type: "portability" patch_source: "https://github.com/facebook/zstd/pull/3745" - "1.5.4": - - patch_file: "patches/1.5.2-cmake-remove-asm-except-x86_64.patch" - patch_description: "use assembler codes only on x86_64" - patch_type: "portability" - - patch_file: "patches/1.5.4-decrease-min-cmake-version.patch" - patch_description: "Don't require CMake 3.18 or later" - patch_type: "portability" - patch_source: "https://github.com/facebook/zstd/pull/3510" "1.5.2": - patch_file: "patches/1.5.2-cmake-remove-asm-except-x86_64.patch" patch_description: "use assembler codes only on x86_64" @@ -51,14 +33,6 @@ patches: patch_description: "fix strange performance and scalability issues" patch_type: "bugfix" patch_source: "https://github.com/facebook/zstd/pull/3167" - "1.5.1": - - patch_file: "patches/1.5.1-cmake-remove-asm-except-x86_64.patch" - patch_description: "use assembler codes only on x86_64" - patch_type: "portability" - - patch_file: "patches/1.5.0-remove-explicit-standard-setting.patch" - patch_description: "fix strange performance and scalability issues" - patch_type: "bugfix" - patch_source: "https://github.com/facebook/zstd/pull/3167" "1.5.0": - patch_file: "patches/1.5.0-remove-explicit-standard-setting.patch" patch_description: "fix strange performance and scalability issues" diff --git a/recipes/zstd/all/conanfile.py b/recipes/zstd/all/conanfile.py index 62abbe3967884..397fedfdf0451 100644 --- a/recipes/zstd/all/conanfile.py +++ b/recipes/zstd/all/conanfile.py @@ -1,7 +1,6 @@ from conan import ConanFile from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout from conan.tools.files import apply_conandata_patches, collect_libs, copy, export_conandata_patches, get, replace_in_file, rmdir, rm -from conan.tools.microsoft import is_msvc import glob import os @@ -55,8 +54,6 @@ def generate(self): tc.variables["ZSTD_BUILD_STATIC"] = not self.options.shared or self.options.build_programs tc.variables["ZSTD_BUILD_SHARED"] = self.options.shared tc.variables["ZSTD_MULTITHREAD_SUPPORT"] = self.options.threading - if not is_msvc(self): - tc.variables["CMAKE_C_FLAGS"] = "-Wno-maybe-uninitialized" tc.generate() def _patch_sources(self): diff --git a/recipes/zstd/all/patches/1.5.1-cmake-remove-asm-except-x86_64.patch b/recipes/zstd/all/patches/1.5.1-cmake-remove-asm-except-x86_64.patch deleted file mode 100644 index 34bb693b4e039..0000000000000 --- a/recipes/zstd/all/patches/1.5.1-cmake-remove-asm-except-x86_64.patch +++ /dev/null @@ -1,17 +0,0 @@ -diff --git a/build/cmake/lib/CMakeLists.txt b/build/cmake/lib/CMakeLists.txt -index 7ba4693..d6e1046 100644 ---- a/build/cmake/lib/CMakeLists.txt -+++ b/build/cmake/lib/CMakeLists.txt -@@ -22,7 +22,11 @@ include_directories(${LIBRARY_DIR} ${LIBRARY_DIR}/common) - - file(GLOB CommonSources ${LIBRARY_DIR}/common/*.c) - file(GLOB CompressSources ${LIBRARY_DIR}/compress/*.c) --file(GLOB DecompressSources ${LIBRARY_DIR}/decompress/*.c ${LIBRARY_DIR}/decompress/*.S) -+if(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64") -+ file(GLOB DecompressSources ${LIBRARY_DIR}/decompress/*.c ${LIBRARY_DIR}/decompress/*.S) -+else() -+ file(GLOB DecompressSources ${LIBRARY_DIR}/decompress/*.c) -+endif() - file(GLOB DictBuilderSources ${LIBRARY_DIR}/dictBuilder/*.c) - - set(Sources diff --git a/recipes/zstd/all/patches/1.5.4-decrease-min-cmake-version.patch b/recipes/zstd/all/patches/1.5.4-decrease-min-cmake-version.patch deleted file mode 100644 index d846e0df710df..0000000000000 --- a/recipes/zstd/all/patches/1.5.4-decrease-min-cmake-version.patch +++ /dev/null @@ -1,36 +0,0 @@ ---- a/build/cmake/CMakeModules/AddZstdCompilationFlags.cmake -+++ b/build/cmake/CMakeModules/AddZstdCompilationFlags.cmake -@@ -1,6 +1,15 @@ - include(CheckCXXCompilerFlag) - include(CheckCCompilerFlag) --include(CheckLinkerFlag) -+# VERSION_GREATER_EQUAL requires CMake 3.7 or later. -+# https://cmake.org/cmake/help/latest/command/if.html#version-greater-equal -+if (CMAKE_VERSION VERSION_LESS 3.18) -+ set(ZSTD_HAVE_CHECK_LINKER_FLAG false) -+else () -+ set(ZSTD_HAVE_CHECK_LINKER_FLAG true) -+endif () -+if (ZSTD_HAVE_CHECK_LINKER_FLAG) -+ include(CheckLinkerFlag) -+endif() - - function(EnableCompilerFlag _flag _C _CXX _LD) - string(REGEX REPLACE "\\+" "PLUS" varname "${_flag}") -@@ -20,7 +29,15 @@ function(EnableCompilerFlag _flag _C _CXX _LD) - endif () - endif () - if (_LD) -- CHECK_LINKER_FLAG(C ${_flag} LD_FLAG_${varname}) -+ # We never add a linker flag with CMake < 3.18. We will -+ # implement CHECK_LINKER_FLAG() like feature for CMake < 3.18 -+ # or require CMake >= 3.18 when we need to add a required -+ # linker flag in future. -+ if (ZSTD_HAVE_CHECK_LINKER_FLAG) -+ CHECK_LINKER_FLAG(C ${_flag} LD_FLAG_${varname}) -+ else () -+ set(LD_FLAG_${varname} false) -+ endif () - if (LD_FLAG_${varname}) - set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${_flag}" PARENT_SCOPE) - set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${_flag}" PARENT_SCOPE) diff --git a/recipes/zstd/all/test_package/conanfile.py b/recipes/zstd/all/test_package/conanfile.py index 5c69b0e8faebe..541303d07640d 100644 --- a/recipes/zstd/all/test_package/conanfile.py +++ b/recipes/zstd/all/test_package/conanfile.py @@ -25,7 +25,4 @@ def test(self): return bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") - png_file = os.path.join(self.source_folder, "logo.png") - self.run(f"{bin_path} {png_file}", env="conanrun") - - self.run(f"zstd --version", env="conanrun") + self.run(bin_path, env="conanrun") diff --git a/recipes/zstd/all/test_package/logo.png b/recipes/zstd/all/test_package/logo.png deleted file mode 100644 index ef3d175cdec07..0000000000000 Binary files a/recipes/zstd/all/test_package/logo.png and /dev/null differ diff --git a/recipes/zstd/all/test_package/test_package.c b/recipes/zstd/all/test_package/test_package.c index 6ef7323d43a0d..29bca24047b95 100644 --- a/recipes/zstd/all/test_package/test_package.c +++ b/recipes/zstd/all/test_package/test_package.c @@ -1,126 +1,12 @@ -/* - * Copyright (c) 2016-present, Yann Collet, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under both the BSD-style license (found in the - * LICENSE file in the root directory of this source tree) and the GPLv2 (found - * in the COPYING file in the root directory of this source tree). - * You may select, at your option, one of the above-listed licenses. - */ - - -#include // malloc, free, exit -#include // fprintf, perror, feof, fopen, etc. -#include // strlen, memset, strcat -#include // presumes zstd library is installed - - -static void* malloc_orDie(size_t size) -{ - void* const buff = malloc(size); - if (buff) return buff; - /* error */ - perror("malloc:"); - exit(1); -} - -static FILE* fopen_orDie(const char *filename, const char *instruction) -{ - FILE* const inFile = fopen(filename, instruction); - if (inFile) return inFile; - /* error */ - perror(filename); - exit(3); -} - -static size_t fread_orDie(void* buffer, size_t sizeToRead, FILE* file) -{ - size_t const readSize = fread(buffer, 1, sizeToRead, file); - if (readSize == sizeToRead) return readSize; /* good */ - if (feof(file)) return readSize; /* good, reached end of file */ - /* error */ - perror("fread"); - exit(4); -} - -static size_t fwrite_orDie(const void* buffer, size_t sizeToWrite, FILE* file) -{ - size_t const writtenSize = fwrite(buffer, 1, sizeToWrite, file); - if (writtenSize == sizeToWrite) return sizeToWrite; /* good */ - /* error */ - perror("fwrite"); - exit(5); -} - -static size_t fclose_orDie(FILE* file) -{ - if (!fclose(file)) return 0; - /* error */ - perror("fclose"); - exit(6); -} - - -static void compressFile_orDie(const char* fname, const char* outName, int cLevel) -{ - FILE* const fin = fopen_orDie(fname, "rb"); - FILE* const fout = fopen_orDie(outName, "wb"); - size_t const buffInSize = ZSTD_CStreamInSize(); /* can always read one full block */ - void* const buffIn = malloc_orDie(buffInSize); - size_t const buffOutSize = ZSTD_CStreamOutSize(); /* can always flush a full block */ - void* const buffOut = malloc_orDie(buffOutSize); - - ZSTD_CStream* const cstream = ZSTD_createCStream(); - if (cstream==NULL) { fprintf(stderr, "ZSTD_createCStream() error \n"); exit(10); } - size_t const initResult = ZSTD_initCStream(cstream, cLevel); - if (ZSTD_isError(initResult)) { fprintf(stderr, "ZSTD_initCStream() error : %s \n", ZSTD_getErrorName(initResult)); exit(11); } - - size_t read, toRead = buffInSize; - while( (read = fread_orDie(buffIn, toRead, fin)) ) { - ZSTD_inBuffer input = { buffIn, read, 0 }; - while (input.pos < input.size) { - ZSTD_outBuffer output = { buffOut, buffOutSize, 0 }; - toRead = ZSTD_compressStream(cstream, &output , &input); /* toRead is guaranteed to be <= ZSTD_CStreamInSize() */ - if (ZSTD_isError(toRead)) { fprintf(stderr, "ZSTD_compressStream() error : %s \n", ZSTD_getErrorName(toRead)); exit(12); } - if (toRead > buffInSize) toRead = buffInSize; /* Safely handle case when `buffInSize` is manually changed to a value < ZSTD_CStreamInSize()*/ - fwrite_orDie(buffOut, output.pos, fout); - } - } - - ZSTD_outBuffer output = { buffOut, buffOutSize, 0 }; - size_t const remainingToFlush = ZSTD_endStream(cstream, &output); /* close frame */ - if (remainingToFlush) { fprintf(stderr, "not fully flushed"); exit(13); } - fwrite_orDie(buffOut, output.pos, fout); - - ZSTD_freeCStream(cstream); - fclose_orDie(fout); - fclose_orDie(fin); - free(buffIn); - free(buffOut); -} - - -static const char* createOutFilename_orDie(const char* filename) -{ - size_t const inL = strlen(filename); - size_t const outL = inL + 5; - void* outSpace = malloc_orDie(outL); - memset(outSpace, 0, outL); - strcat(outSpace, filename); - strcat(outSpace, ".zst"); - return (const char*)outSpace; -} - -int main(int argc, const char** argv) -{ - if (argc < 2) { - fprintf(stderr, "Need at least one argument\n"); - return 1; - } - const char* const inFilename = argv[1]; - - const char* const outFilename = createOutFilename_orDie("logo.png"); - compressFile_orDie(inFilename, outFilename, 1); +#include +#include +#include +#include + +int main() { + const char* originalData = "Sample text"; + size_t compressedSize = ZSTD_compressBound(strlen(originalData) + 1); + printf("%zu\n", compressedSize); return 0; } diff --git a/recipes/zstd/all/test_v1_package/conanfile.py b/recipes/zstd/all/test_v1_package/conanfile.py index c6bf65d610aa1..38f4483872d47 100644 --- a/recipes/zstd/all/test_v1_package/conanfile.py +++ b/recipes/zstd/all/test_v1_package/conanfile.py @@ -14,5 +14,4 @@ def build(self): def test(self): if not tools.cross_building(self): bin_path = os.path.join("bin", "test_package") - png_file = os.path.join(self.source_folder, os.pardir, "test_package", "logo.png") - self.run(f"{bin_path} {png_file}", run_environment=True) + self.run(bin_path, run_environment=True) diff --git a/recipes/zstd/config.yml b/recipes/zstd/config.yml index c8d10e6c34e70..3b1802f0177ee 100644 --- a/recipes/zstd/config.yml +++ b/recipes/zstd/config.yml @@ -3,13 +3,7 @@ versions: folder: all "1.5.5": folder: all - "1.5.4": - folder: all "1.5.2": folder: all - "1.5.1": - folder: all "1.5.0": folder: all - "1.4.9": - folder: all diff --git a/recipes/zulu-openjdk/all/conandata.yml b/recipes/zulu-openjdk/all/conandata.yml index 9e14b09c940cf..79b65fbdb247a 100644 --- a/recipes/zulu-openjdk/all/conandata.yml +++ b/recipes/zulu-openjdk/all/conandata.yml @@ -1,4 +1,26 @@ sources: + "21.0.4": + "Windows": + "x86_64": + url: "https://cdn.azul.com/zulu/bin/zulu21.36.17-ca-jdk21.0.4-win_x64.zip" + sha256: "d771dad10d3f0b440c3686d1f3d2b68b320802ac97b212d87671af3f2eef8848" + "armv8": + url: "https://cdn.azul.com/zulu/bin/zulu21.36.17-ca-jdk21.0.4-win_aarch64.zip" + sha256: "9f873eccf030b1d3dc879ec1eb0ff5e11bf76002dc81c5c644c3462bf6c5146b" + "Linux": + "x86_64": + url: "https://cdn.azul.com/zulu/bin/zulu21.36.17-ca-jdk21.0.4-linux_x64.tar.gz" + sha256: "318d0c2ed3c876fb7ea2c952945cdcf7decfb5264ca51aece159e635ac53d544" + "armv8": + url: "https://cdn.azul.com/zulu/bin/zulu21.36.17-ca-jdk21.0.4-linux_aarch64.tar.gz" + sha256: "da3c2d7db33670bcf66532441aeb7f33dcf0d227c8dafe7ce35cee67f6829c4c" + "Macos": + "x86_64": + url: "https://cdn.azul.com/zulu/bin/zulu21.36.17-ca-jdk21.0.4-macosx_x64.tar.gz" + sha256: "5ce75a6a247c7029b74c4ca7cf6f60fd2b2d68ce1e8956fb448d2984316b5fea" + "armv8": + url: "https://cdn.azul.com/zulu/bin/zulu21.36.17-ca-jdk21.0.4-macosx_aarch64.tar.gz" + sha256: "bc2750f81a166cc6e9c30ae8aaba54f253a8c8ec9d8cfc04a555fe20712c7bff" "21.0.1": "Windows": "x86_64": @@ -37,6 +59,38 @@ sources: "armv8": url: "https://cdn.azul.com/zulu/bin/zulu17.46.19-ca-jdk17.0.9-macosx_aarch64.tar.gz" sha256: "d6837676e55b97772b6512e253fdaf8ab282bb216c0f8366b6c5905cd02b5056" + "11.0.24": + "Linux": + "x86_64": + url: "https://cdn.azul.com/zulu/bin/zulu11.74.15-ca-jdk11.0.24-linux_x64.tar.gz" + sha256: "a7aac0e69a99bf64a1a3ec96f08149ac069a5bbdaaefae922ee3a7465fd918b3" + "armv8": + url: "https://cdn.azul.com/zulu/bin/zulu11.74.15-ca-jdk11.0.24-linux_aarch64.tar.gz" + sha256: "4f473e6307c465c037889981ae2cb3c4133648409c7331b6e57540a4896033e1" + "x86": + url: "https://cdn.azul.com/zulu/bin/zulu11.74.15-ca-jdk11.0.24-linux_i686.tar.gz" + sha256: "d6e9f14562b6a6b89e37bc740e0700de8f831e81a64ce701ab0c5d6ba4fc1b71" + "Macos": + "armv8": + url: "https://cdn.azul.com/zulu/bin/zulu11.74.15-ca-jdk11.0.24-macosx_aarch64.tar.gz" + sha256: "f8ac458076c10f13753b7342033aaa073b715ef798023acf155ba814bff67514" + "x86_64": + url: "https://cdn.azul.com/zulu/bin/zulu11.74.15-ca-jdk11.0.24-macosx_x64.tar.gz" + sha256: "087ea956e8b43c89c732df8024e1344f686b02611c2c5449be6478299b9a9dac" + "SunOS": + "sparcv9": + url: "https://cdn.azul.com/zulu/bin/zulu11.74.15-ca-jdk11.0.24-solaris_sparcv9.zip" + sha256: "82e8eb5887592f290cec095c6c8466a576c8d8049c1c5eb8987822fba3bfdbb7" + "x86_64": + url: "https://cdn.azul.com/zulu/bin/zulu11.74.15-ca-jdk11.0.24-solaris_x64.zip" + sha256: "60b67de2325b7041e2495c5ae10574c960542fd7ad7eee1fef0d9bcaf63ce514" + "Windows": + "x86": + url: "https://cdn.azul.com/zulu/bin/zulu11.74.15-ca-jdk11.0.24-win_i686.zip" + sha256: "bae034bc5075e31123f76980f3f3234150f68cbe96e48d288291b8ea6c5124f4" + "x86_64": + url: "https://cdn.azul.com/zulu/bin/zulu11.74.15-ca-jdk11.0.24-win_x64.zip" + sha256: "1b1870eb161076dcadf2c6f85855969484d907f44f11c1483d86e964dc946323" "11.0.19": "Windows": "x86_64": diff --git a/recipes/zulu-openjdk/config.yml b/recipes/zulu-openjdk/config.yml index d9b1272d1abe9..0ef2c791e311c 100644 --- a/recipes/zulu-openjdk/config.yml +++ b/recipes/zulu-openjdk/config.yml @@ -1,8 +1,12 @@ versions: + "21.0.4": + folder: all "21.0.1": folder: all "17.0.9": folder: all + "11.0.24": + folder: all "11.0.19": folder: all "11.0.15":